var $m=Object.defineProperty,Bm=Object.defineProperties;var jm=Object.getOwnPropertyDescriptors;var to=Object.getOwnPropertySymbols;var xu=Object.prototype.hasOwnProperty,bu=Object.prototype.propertyIsEnumerable;var Za=(e,t,n)=>t in e?$m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ce=(e,t)=>{for(var n in t||(t={}))xu.call(t,n)&&Za(e,n,t[n]);if(to)for(var n of to(t))bu.call(t,n)&&Za(e,n,t[n]);return e},Ae=(e,t)=>Bm(e,jm(t));var Ya=e=>typeof e=="symbol"?e:e+"",yu=(e,t)=>{var n={};for(var r in e)xu.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&to)for(var r of to(e))t.indexOf(r)<0&&bu.call(e,r)&&(n[r]=e[r]);return n};var T=(e,t,n)=>(Za(e,typeof t!="symbol"?t+"":t,n),n);const x4={},zm=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}};zm();var Fs,le,Lf,Df,is,Ff,ku,Pf,Yo={},$f=[],Um=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Vn(e,t){for(var n in t)e[n]=t[n];return e}function Bf(e){var t=e.parentNode;t&&t.removeChild(e)}function Wt(e,t,n){var r,i,s,o={};for(s in t)s=="key"?r=t[s]:s=="ref"?i=t[s]:o[s]=t[s];if(arguments.length>2&&(o.children=arguments.length>3?Fs.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)o[s]===void 0&&(o[s]=e.defaultProps[s]);return ss(e,o,r,i,null)}function ss(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i==null?++Lf:i};return i==null&&le.vnode!=null&&le.vnode(s),s}function jf(){return{current:null}}function Yn(e){return e.children}function en(e,t){this.props=e,this.context=t}function Si(e,t){if(t==null)return e.__?Si(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?ss(h.type,h.props,h.key,null,h.__v):h)!=null){if(h.__=n,h.__b=n.__b+1,(f=m[c])===null||f&&h.key==f.key&&h.type===f.type)m[c]=void 0;else for(d=0;d2&&(o.children=arguments.length>3?Fs.call(arguments,2):n),ss(e.type,o,r||e.key,i||e.ref,null)}function wr(e,t){var n={__c:t="__cC"+Pf++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,s;return this.getChildContext||(i=[],(s={})[t]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(Bl)},this.sub=function(o){i.push(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){i.splice(i.indexOf(o),1),a&&a.call(o)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Fs=$f.slice,le={__e:function(e,t,n,r){for(var i,s,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(a){e=a}throw e}},Lf=0,Df=function(e){return e!=null&&e.constructor===void 0},en.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Vn({},this.state),typeof e=="function"&&(e=e(Vn({},n),this.props)),e&&Vn(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),Bl(this))},en.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Bl(this))},en.prototype.render=Yn,is=[],Ff=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Wo.__r=0,Pf=0;var Zm=Object.freeze(Object.defineProperty({__proto__:null,render:Lr,hydrate:Tc,createElement:Wt,h:Wt,Fragment:Yn,createRef:jf,get isValidElement(){return Df},Component:en,cloneElement:Oc,createContext:wr,toChildArray:tn,get options(){return le}},Symbol.toStringTag,{value:"Module"}));var Ym={};function Wf(e,t){for(var n in t)e[n]=t[n];return e}function qf(e,t,n){var r=/(?:\?([^#]*))?(#.*)?$/,i=e.match(r),s={},o;if(i&&i[1])for(var a=i[1].split("&"),l=0;lt.rank?-1:e.index-t.index}function qm(e,t){return e.index=t,e.rank=Jm(e),e.props}function jl(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}function Xm(e){return e.charAt(0)==":"?1+"*+?".indexOf(e.charAt(e.length-1))||4:5}function Km(e){return jl(e).map(Xm).join("")}function Jm(e){return e.props.default?0:Km(e.props.path)}var Ht=null,Tr=[],zl=[],Qm={};function eg(e,t){t===void 0&&(t="push"),Ht&&Ht[t]?Ht[t](e):typeof history!="undefined"&&history[t+"State"]&&history[t+"State"](null,null,e)}function Ii(){var e;return Ht&&Ht.location?e=Ht.location:Ht&&Ht.getCurrentLocation?e=Ht.getCurrentLocation():e=typeof location!="undefined"?location:Qm,""+(e.pathname||"")+(e.search||"")}function Gr(e,t){return t===void 0&&(t=!1),typeof e!="string"&&e.url&&(t=e.replace,e=e.url),tg(e)&&eg(e,t?"replace":"push"),Xf(e)}function tg(e){for(var t=Tr.length;t--;)if(Tr[t].canRoute(e))return!0;return!1}function Xf(e){for(var t=!1,n=0;n0},t.prototype.routeTo=function(r){this.setState({url:r});var i=this.canRoute(r);return this.updating||this.forceUpdate(),i},t.prototype.componentWillMount=function(){Tr.push(this),this.updating=!0},t.prototype.componentDidMount=function(){var r=this;Ht&&(this.unlisten=Ht.listen(function(i){r.routeTo(""+(i.pathname||"")+(i.search||""))})),this.updating=!1},t.prototype.componentWillUnmount=function(){typeof this.unlisten=="function"&&this.unlisten(),Tr.splice(Tr.indexOf(this),1)},t.prototype.componentWillUpdate=function(){this.updating=!0},t.prototype.componentDidUpdate=function(){this.updating=!1},t.prototype.getMatchingChildren=function(r,i,s){return r.filter(qm).sort(Wm).map(function(o){var a=qf(i,o.props.path,o.props);if(a){if(s!==!1){var l={url:i,matches:a};return Wf(l,a),delete l.ref,delete l.key,Oc(o,l)}return o}}).filter(Boolean)},t.prototype.render=function(r,i){var s=r.children,o=r.onChange,a=i.url,l=this.getMatchingChildren(tn(s),a,!0),u=l[0]||null,c=this.previousUrl;return a!==c&&(this.previousUrl=a,typeof o=="function"&&o({router:this,url:a,previous:c,active:l,current:u})),u},t}(en),Qf=function(e){return Wt("a",Wf({onClick:ng},e))},sg=function(e){return Wt(e.component,e)};Wn.subscribers=zl;Wn.getCurrentUrl=Ii;Wn.route=Gr;Wn.Router=Wn;Wn.Route=sg;Wn.Link=Qf;Wn.exec=qf;var Se;(e=>{const t="Site",n="Generator";function l(j,J,ge){ga("send","event",j,J,ge)}function u(j,J){ga("set",`dimension${j}`,J)}function c(j){ga("set","page",j),ga("send","pageview")}e.pageview=c;function d(j,J){l(n,j,J)}e.generatorEvent=d;function f(j){return j==="menu"?"Menu":"Hotkey"}function h(j){u(4,j),gtag("set",{locale:j})}e.setLocale=h;function _(j,J){h(J),l(t,"set-language",J),gtag("event","change_locale",{prev_locale:j})}e.changeLocale=_;function g(j){u(1,j),gtag("set",{theme:j})}e.setTheme=g;function p(j,J){g(J),l(t,"set-theme",J),gtag("event","change_theme",{prev_theme:j})}e.changeTheme=p;function m(j){u(3,j),gtag("set",{version:j})}e.setVersion=m;function v(j){gtag("set",{selected_version:j})}e.setSelectedVersion=v;function y(j,J){m(J),l(n,"set-version",J),gtag("event","change_version",{prev_version:j})}e.changeVersion=y;function x(j){u(6,j),gtag("event","use_generator",{file_type:j})}e.setGenerator=x;function b(j){u(7,j),gtag("set",{prefers_color_scheme:j})}e.setPrefersColorScheme=b;function k(j){gtag("set",{tree_view_mode:j})}e.setTreeViewMode=k;function E(j,J,ge){l(n,"reset"),gtag("event","reset_generator",{file_type:j,history:J,method:ge})}e.resetGenerator=E;function S(j,J,ge){l(n,"undo",f(ge)),gtag("event","undo_generator",{file_type:j,history:J,method:ge})}e.undoGenerator=S;function C(j,J,ge){l(n,"undo",f(ge)),gtag("event","redo_generator",{file_type:j,history:J,method:ge})}e.redoGenerator=C;function A(j,J){l(n,"load-preset",J),gtag("event","load_generator_preset",{file_type:j,file_name:J})}e.loadPreset=A;function O(j,J){gtag("event","open_generator_preset",{file_type:j,file_name:J})}e.openPreset=O;function D(j,J,ge,we,We,He){gtag("event","create_generator_snippet",{file_type:j,snippet_id:J,version:ge,data_size:we,compressed_size:We,compression_rate:He})}e.createSnippet=D;function L(j,J,ge){gtag("event","open_generator_snippet",{file_type:j,snippet_id:J,version:ge})}e.openSnippet=L;function W(j,J){l(n,"copy"),gtag("event","copy_generator_output",{file_type:j,method:J})}e.copyOutput=W;function U(j,J){l(n,"download"),gtag("event","download_generator_output",{file_type:j,method:J})}e.downloadOutput=U;function M(j,J){l(n,"toggle-output","visible"),gtag("event","show_generator_output",{file_type:j,method:J})}e.showOutput=M;function $(j,J){l(n,"toggle-output","hidden"),gtag("event","hide_generator_output",{file_type:j,method:J})}e.hideOutput=$;function V(j,J){l(n,"toggle-preview","visible"),gtag("event","show_generator_preview",{file_type:j,method:J})}e.showPreview=V;function Q(j,J){l(n,"toggle-preview","hidden"),gtag("event","hide_generator_preview",{file_type:j,method:J})}e.hidePreview=Q;function R(j,J,ge,we){l(n,"show-project",f(we)),gtag("event","show_project",{file_type:j,projects_count:J,project_size:ge,method:we})}e.showProject=R;function I(j,J,ge,we){l(n,"hide-project",f(we)),gtag("event","hide_project",{file_type:j,projects_count:J,project_size:ge,method:we})}e.hideProject=I;function N(j,J,ge,we){l(n,"save-project-file",f(we)),gtag("event","save_project_file",{file_type:j,projects_count:J,project_size:ge,method:we})}e.saveProjectFile=N;function B(j,J,ge,we){l(n,"delete-project-file",f(we)),gtag("event","delete_project_file",{file_type:j,projects_count:J,project_size:ge,method:we})}e.deleteProjectFile=B;function q(j,J,ge,we){l(n,"rename-project-file",f(we)),gtag("event","rename_project_file",{file_type:j,projects_count:J,project_size:ge,method:we})}e.renameProjectFile=q;function ie(j,J,ge){l(n,"delete-project",f(ge)),gtag("event","delete_project",{projects_count:j,project_size:J,method:ge})}e.deleteProject=ie})(Se||(Se={}));var Zr,lt,Wa,Cu,Ci=0,eh=[],Tu=le.__b,Ou=le.__r,Mu=le.diffed,Nu=le.__c,Ru=le.unmount;function Di(e,t){le.__h&&le.__h(lt,e,Ci||t),Ci=0;var n=lt.__H||(lt.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function K(e){return Ci=1,th(ih,e)}function th(e,t,n){var r=Di(Zr++,2);return r.t=e,r.__c||(r.__=[n?n(t):ih(void 0,t),function(i){var s=r.t(r.__[0],i);r.__[0]!==s&&(r.__=[s,r.__[1]],r.__c.setState({}))}],r.__c=lt),r.__}function he(e,t){var n=Di(Zr++,3);!le.__s&&Mc(n.__H,t)&&(n.__=e,n.__H=t,lt.__H.__h.push(n))}function nh(e,t){var n=Di(Zr++,4);!le.__s&&Mc(n.__H,t)&&(n.__=e,n.__H=t,lt.__h.push(n))}function Oe(e){return Ci=5,$e(function(){return{current:e}},[])}function og(e,t,n){Ci=6,nh(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 $e(e,t){var n=Di(Zr++,7);return Mc(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Le(e,t){return Ci=8,$e(function(){return e},t)}function Yr(e){var t=lt.context[e.__c],n=Di(Zr++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(lt)),t.props.value):e.__}function ag(e,t){le.useDebugValue&&le.useDebugValue(t?t(e):e)}function rh(e){var t=Di(Zr++,10),n=K();return t.__=e,lt.componentDidCatch||(lt.componentDidCatch=function(r){t.__&&t.__(r),n[1](r)}),[n[0],function(){n[1](void 0)}]}function lg(){for(var e;e=eh.shift();)if(e.__P)try{e.__H.__h.forEach(Io),e.__H.__h.forEach(Ul),e.__H.__h=[]}catch(t){e.__H.__h=[],le.__e(t,e.__v)}}le.__b=function(e){lt=null,Tu&&Tu(e)},le.__r=function(e){Ou&&Ou(e),Zr=0;var t=(lt=e.__c).__H;t&&(Wa===lt?(t.__h=[],lt.__h=[],t.__.forEach(function(n){n.__H&&(n.__H=void 0)})):(t.__h.forEach(Io),t.__h.forEach(Ul),t.__h=[])),Wa=lt},le.diffed=function(e){Mu&&Mu(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(eh.push(t)!==1&&Cu===le.requestAnimationFrame||((Cu=le.requestAnimationFrame)||function(n){var r,i=function(){clearTimeout(s),Lu&&cancelAnimationFrame(r),setTimeout(n)},s=setTimeout(i,100);Lu&&(r=requestAnimationFrame(i))})(lg)),lt=null,Wa=null},le.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Io),n.__h=n.__h.filter(function(r){return!r.__||Ul(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],le.__e(r,n.__v)}}),Nu&&Nu(e,t)},le.unmount=function(e){Ru&&Ru(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Io(r)}catch(i){t=i}}),t&&le.__e(t,n.__v))};var Lu=typeof requestAnimationFrame=="function";function Io(e){var t=lt,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),lt=t}function Ul(e){var t=lt;e.__c=e.__(),lt=t}function Mc(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function ih(e,t){return typeof t=="function"?t(e):t}var no=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function cg(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 sh(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 ug=cg(Zm),oh,ah,lh,Vl=ug,dg=0;function Du(e,t,n,r,i){var s,o,a={};for(o in t)o=="ref"?s=t[o]:a[o]=t[o];var l={type:e,props:a,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--dg,__source:i,__self:r};if(typeof e=="function"&&(s=e.defaultProps))for(o in s)a[o]===void 0&&(a[o]=s[o]);return Vl.options.vnode&&Vl.options.vnode(l),l}lh=Vl.Fragment,ah=Du,oh=Du;const w=ah,F=oh,be=lh;function ya({type:e,id:t}){return he(()=>{var n;(n=document.getElementById("ad-placeholder"))==null||n.remove(),"ethicalads"in window&ðicalads.load()},[]),w("div",{"data-ea-publisher":"misode-github-io","data-ea-type":e,class:"ad dark flat",id:t})}function oe({icon:e,label:t,active:n,class:r,tooltip:i,tooltipLoc:s,onClick:o,disabled:a}){return F("div",{class:`btn${n?" active":""}${r?` ${r}`:""}${i?` tooltipped tip-${s!=null?s:"sw"}`:""}${a?" disabled":""}${n?" tip-shown":""}`,onClick:a?void 0:o,"aria-label":i,children:[e&&me[e],t&&w("span",{children:t})]})}var P={},Nn={},Sn={};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.ModelPath=Sn.Path=Sn.relativePath=void 0;function fg(e,t){return t.reduce((n,r)=>r==="pop"?n.pop():n.push(r.push),e)}Sn.relativePath=fg;class Fn{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 Fn(this.modelArr.slice(t,n),this.contextArr)}shift(){return new Fn(this.modelArr.slice(1),this.contextArr)}pop(){return new Fn(this.modelArr.slice(0,-1),this.contextArr)}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new Fn([...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 Fn([...this.modelArr],[...this.contextArr,n])}copy(){return new Fn([...this.modelArr],[...this.contextArr])}getArray(){return this.modelArr}withModel(t){return new Pn(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.lengthn===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)}}Sn.Path=Fn;class Pn extends Fn{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 Pn(this.model,super.slice(t,n))}shift(){return new Pn(this.model,super.shift())}pop(){return new Pn(this.model,super.pop())}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new Pn(this.model,super.modelPush(t))}contextPush(t){return new Pn(this.model,super.contextPush(t))}copy(){return new Pn(this.model,super.copy())}}Sn.ModelPath=Pn;var Fi={};Object.defineProperty(Fi,"__esModule",{value:!0});Fi.Errors=void 0;class hg{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}}Fi.Errors=hg;var In={};Object.defineProperty(In,"__esModule",{value:!0});In.hexId=In.quoteString=In.escapeString=void 0;function ch(e){return e.replace(/(\\|")/g,"\\$1")}In.escapeString=ch;function pg(e){return`"${ch(e)}"`}In.quoteString=pg;const mg=e=>("0"+e.toString(16)).substr(-2);function gg(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,mg).join("")}In.hexId=gg;Object.defineProperty(Nn,"__esModule",{value:!0});Nn.DataModel=void 0;const _g=Sn,Fu=Fi,qa=In;class Nc{constructor(t,n){var r,i,s,o;this.historyMax=(r=n==null?void 0:n.historyMax)!==null&&r!==void 0?r:50,this.verbose=(i=n==null?void 0:n.verbose)!==null&&i!==void 0?i:!1,this.wrapLists=(s=n==null?void 0:n.wrapLists)!==null&&s!==void 0?s:!1,this.schema=t;const a=(o=n==null?void 0:n.initialData)!==null&&o!==void 0?o:t.default();this.data=this.wrapLists?Nc.wrapLists(a):a,this.listeners=[],this.errors=new Fu.Errors,this.history=[JSON.stringify(this.data)],this.historyIndex=0}addListener(t){this.listeners.push(t)}removeListener(t){const n=this.listeners.indexOf(t);n>-1&&this.listeners.splice(n,1)}invalidate(){const t=JSON.stringify(this.data);this.history[this.historyIndex]!==t&&(this.historyIndex+=1,this.history.splice(this.historyIndex,this.historyMax,t),this.history.length>this.historyMax&&(this.history.splice(0,1),this.historyIndex-=1)),this.silentInvalidate()}silentInvalidate(){this.listeners.forEach(t=>{t.invalidated&&t.invalidated(this),t.errors&&t.errors(this.errors)})}reset(t,n){this.data=t,this.validate(n),this.invalidate()}get(t){let n=this.data;return t.forEach(r=>{if(n===void 0)return n;this.wrapLists&&typeof r=="number"?n=n[r].node:n=n[r]}),n}set(t,n,r){if(t.getArray().length===0){this.reset(n,!0);return}let i=this.data;t.pop().forEach(s=>{(i[s]===void 0||typeof i[s]=="string"||typeof i[s]=="number")&&(this.wrapLists&&typeof s=="number"?i[s]={node:{},id:(0,qa.hexId)()}:i[s]={}),this.wrapLists&&typeof s=="number"?i=i[s].node:i=i[s]}),i!==null&&(n===void 0||typeof n=="number"&&isNaN(n)?typeof t.last()=="number"?i.splice(t.last(),1):delete i[t.last()]:this.wrapLists&&typeof t.last()=="number"?i[t.last()]={node:n,id:(0,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{s.errors&&s.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}}Nn.DataModel=Nc;var Qn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Keep=e.Opt=e.Has=e.Mod=e.Base=void 0,e.Base={type:()=>"base",category:()=>{},default:()=>{},enabled:()=>!0,keep:()=>!1,optional:()=>!1,navigate(){return this},pathPush:s=>s,suggest:()=>[],validate:(s,o)=>o,validationOption:()=>{},hook(s,o,...a){return s.base({node:this},o,...a)},canUpdate:()=>!1,update:()=>[]};const t=(s,o)=>ce(ce({},s),typeof o=="function"?o(s):o);e.Mod=t;const n=(s,o)=>(0,e.Mod)(o,{enabled:a=>a.push(s).get()!==void 0});e.Has=n;function r(s){return Ae(ce({},s),{optional:()=>!0})}e.Opt=r;function i(s){return Ae(ce({},s),{keep:()=>!0})}e.Keep=i})(Qn);var ka={};Object.defineProperty(ka,"__esModule",{value:!0});ka.BooleanNode=void 0;const wg=Nn,vg=Qn,xg=()=>Ae(ce({},vg.Base),{type:()=>"boolean",default:()=>!1,suggest:()=>["false","true"],validate(e,t,n,r){return r.loose&&typeof t!="boolean"&&(t=r.wrapLists?wg.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)}});ka.BooleanNode=xg;var uh={},Ps={};Object.defineProperty(Ps,"__esModule",{value:!0});Ps.ListNode=void 0;const bg=Nn,yg=Qn,kg=(e,t)=>{var n,r;const i=(n=t==null?void 0:t.minLength)!==null&&n!==void 0?n:0,s=(r=t==null?void 0:t.maxLength)!==null&&r!==void 0?r:1/0,o=(t==null?void 0:t.minLength)&&(t==null?void 0:t.maxLength);return Ae(ce({},yg.Base),{type:()=>"list",default:()=>t!=null&&t.minLength?[...Array(i)].map(a=>e.default()):[],navigate(a,l){const u=l+1;return a.getArray().length<=u?this:e.navigate(a,u)},pathPush(a,l){return a.push(parseInt(l.toString())).contextPush("entry")},validate(a,l,u,c){if(c.loose&&!Array.isArray(l)&&(l=c.wrapLists?bg.DataModel.wrapLists(this.default()):this.default()),Array.isArray(l))o&&(l.lengths)?i===s?u.add(a,"error.invalid_list_range.exact",l.length,i):u.add(a,"error.invalid_list_range.between",l.length,i,s):l.lengths&&u.add(a,"error.invalid_list_range.larger",l.length,s);else return u.add(a,"error.expected_list"),l;const d=l.map((f,h)=>{const _=e.validate(a.push(h),c.wrapLists?f.node:f,u,c);return c.wrapLists?{node:_,id:f.id}:_});for(const f of Object.getOwnPropertySymbols(l))d[f]=l[f];return d},hook(a,l,...u){var c;return((c=a.list)!==null&&c!==void 0?c:a.base).call(a,{node:this,children:e,config:t!=null?t:{}},l,...u)}})};Ps.ListNode=kg;var $s={};Object.defineProperty($s,"__esModule",{value:!0});$s.SwitchNode=void 0;const Eg=Qn,Ag=e=>Ae(ce({},Eg.Base),{type(t){return this.activeCase(t,!0).node.type(t)},category(t){return this.activeCase(t,!0).node.category(t)},default:()=>e[0].node.default(),navigate(t,n){var r;const i=n+1;return(r=this.activeCase(t.slice(0,i)))===null||r===void 0?void 0:r.node.navigate(t,n)},pathPush(t,n){var r,i;return(i=(r=this.activeCase(t))===null||r===void 0?void 0:r.node.pathPush(t,n))!==null&&i!==void 0?i:t},suggest(t,n){var r,i;return(i=(r=this.activeCase(t))===null||r===void 0?void 0:r.node.suggest(t,n))!==null&&i!==void 0?i:e.filter(s=>s.match(t)).map(s=>s.node.suggest(t,n)).reduce((s,o)=>s.concat(o))},validate(t,n,r,i){let s=this.activeCase(t);return s===void 0?n:s.node.validate(t,n,r,i)},validationOption(t){var n;return(n=this.activeCase(t))===null||n===void 0?void 0:n.node.validationOption(t)},activeCase(t,n){const r=(s,o)=>{var a,l;return((a=o.priority)!==null&&a!==void 0?a:0)-((l=s.priority)!==null&&l!==void 0?l:0)},i=e.filter(s=>s.match(t)).sort(r);return n&&i.length===0?e.sort(r)[0]:i.length>0?i[0]:void 0},hook(t,n,...r){return this.activeCase(n,!0).node.hook(t,n,...r)}});$s.SwitchNode=Ag;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectOrPreset=e.StringOrList=e.ObjectOrList=e.ChoiceNode=void 0;const t=Ps,n=$s,r=(o,a)=>{const l=(c,d)=>{if(c.match)return c.match(d);switch(c.type){case"list":return Array.isArray(d);case"object":return typeof d=="object"&&!Array.isArray(d);default:return typeof d===c.type}},u=(0,n.SwitchNode)(o.map(c=>({type:c.type,priority:c.priority,match:d=>l(c,d.get()),node:c.node})));return Ae(ce({},u),{validate(c,d,f,h){let _=u.activeCase(c,!0);return _.node.optional()?d:_.node.validate(c,d,f,h)},hook(c,d,...f){var h;return((h=c.choice)!==null&&h!==void 0?h:c.base).call(c,{node:this,choices:o,config:a!=null?a:{},switchNode:u},d,...f)}})};e.ChoiceNode=r;const i=o=>(a,l)=>(0,e.ChoiceNode)([{type:o,node:a,change:u=>{var c;return(c=u[0])!==null&&c!==void 0?c:a.default()}},{type:"list",node:(0,t.ListNode)(a),change:u=>u?[u]:[]}],l);e.ObjectOrList=i("object"),e.StringOrList=i("string");const s=(o,a,l)=>(0,e.ChoiceNode)([{type:"string",priority:1,node:o,change:u=>Object.keys(l)[0]},{type:"object",node:a,change:u=>{var c;return(c=l[u])!==null&&c!==void 0?c:l[Object.keys(l)[0]]}}]);e.ObjectOrPreset=s})(uh);var Ea={};Object.defineProperty(Ea,"__esModule",{value:!0});Ea.MapNode=void 0;const Sg=Qn,Ig=Nn,Cg=(e,t,n)=>Ae(ce({},Sg.Base),{type:()=>"map",default:()=>({}),navigate(r,i){const s=i+1;return r.getArray().length<=s?this:t.navigate(r,s)},pathPush(r,i){return r.modelPush(i)},suggest:r=>e.suggest(r,""),validate(r,i,s,o){if(o.loose&&typeof i!="object"&&(i=o.wrapLists?Ig.DataModel.wrapLists(this.default()):this.default()),i===null||typeof i!="object")return s.add(r,"error.expected_object"),i;const a={};Object.keys(i).forEach(l=>{e.validate(r,l,s,o),a[l]=t.validate(r.push(l),i[l],s,o)});for(const l of Object.getOwnPropertySymbols(i))a[l]=i[l];return a},validationOption(r){var i;return(i=n==null?void 0:n.validation)!==null&&i!==void 0?i:e.validationOption(r.push(""))},hook(r,i,...s){var o;return((o=r.map)!==null&&o!==void 0?o:r.base).call(r,{node:this,keys:e,children:t,config:n!=null?n:{}},i,...s)}});Ea.MapNode=Cg;var dh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberEnum=e.NumberNode=void 0;const t=P,n=Nn,r=Qn,i=o=>{var a,l,u;const c=o!=null&&o.color?!0:(a=o==null?void 0:o.integer)!==null&&a!==void 0?a:!1,d=o!=null&&o.color?0:(l=o==null?void 0:o.min)!==null&&l!==void 0?l:-1/0,f=o!=null&&o.color?16777215:(u=o==null?void 0:o.max)!==null&&u!==void 0?u:1/0,h=(o==null?void 0:o.min)!==void 0&&(o==null?void 0:o.max)!==void 0;return Ae(ce({},r.Base),{type:()=>"number",default:()=>d>0?d:0,validate(_,g,p,m){return m.loose&&typeof g!="number"&&(g=m.wrapLists?n.DataModel.wrapLists(this.default()):this.default()),typeof g!="number"?p.add(_,"error.expected_number"):c&&!Number.isInteger(g)?p.add(_,"error.expected_integer"):h&&(gf)?p.add(_,"error.invalid_number_range.between",g,d,f):gf&&p.add(_,"error.invalid_number_range.larger",g,f),g},hook(_,g,...p){var m;return((m=_.number)!==null&&m!==void 0?m:_.base).call(_,{node:this,integer:c,min:d,max:f,between:h,config:o!=null?o:{}},g,...p)}})};e.NumberNode=i;const s=({integer:o,values:a})=>(0,t.Mod)((0,e.NumberNode)({integer:o}),l=>({validate:(u,c,d,f)=>(c=l.validate(u,c,d,f),a.includes(c)||d.add(u,"error.invalid_number_enum",a.join(", ")),c)}));e.NumberEnum=s})(dh);var fh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectNode=e.Case=e.Switch=void 0;const t=Qn,n=Sn,r=Fi,i=In,s=Nn;e.Switch=Symbol("switch"),e.Case=Symbol("case");const o=(a,l)=>{var _,g;const p=a,{[_=e.Switch]:u,[g=e.Case]:c}=p,d=yu(p,[Ya(_),Ya(g)]),f=m=>{if(u===void 0)return d;const v=(0,n.relativePath)(m,u).get(),y=c[v];return ce(ce({},d),y)},h=(m,v)=>{var y;const x=u?(0,n.relativePath)(m,u).get():void 0,b=u?(y=c[x])!==null&&y!==void 0?y:{}:{},k=Object.keys(b),E=l!=null&&l.context?new n.ModelPath(m.getModel(),new n.Path(m.getArray(),[l.context])):m;return(!(l!=null&&l.disableSwitchContext)&&x&&k.includes(v)?E.contextPush(x):E).push(v)};return Ae(ce({},t.Base),{type:()=>"object",category:()=>l==null?void 0:l.category,default:()=>({}),keep(){return this.optional()},navigate(m,v){const y=v+1,x=m.getArray();if(x.length<=y)return this;const k=f(m.slice(0,y))[x[y]];return k==null?void 0:k.navigate(m,y)},pathPush(m,v){return h(m,v.toString())},suggest(m,v){const y=f(m),x=Object.keys(typeof v=="object"?v:{});return Object.keys(y).filter(b=>y[b].enabled(m)).filter(b=>!x.includes(b)).map(i.quoteString)},validate(m,v,y,x){if(x.loose&&typeof v!="object"&&(v=x.wrapLists?s.DataModel.wrapLists(this.default()):this.default()),typeof v!="object"||v===null)return y.add(m,"error.expected_object"),v;let b=d;if(u){const A=(0,n.relativePath)(m,u);let O=A.get();if(m.equals(A.pop())){const D=A.last();O=d[D].validate(m.push(D),v[D],new r.Errors,x)}b=ce(ce({},b),c[O])}const k=Object.keys(b),E=k.filter(A=>!b[A].optional()),S=new Set([...E,...Object.keys(v)]),C={};S.forEach(A=>{if(k.includes(A)){if(!b[A].enabled(m))return;const O=b[A].validate(m.push(A),v[A],y,x);!b[A].keep()&&b[A].optional()&&(O===void 0||Array.isArray(O)&&O.length===0||O.constructor===Object&&Object.keys(O).length===0)?delete C[A]:(C[A]=O,m.getModel().set(m.push(A),O,!0))}else C[A]=v[A]});for(const A of Object.getOwnPropertySymbols(v))C[A]=v[A];return C},hook(m,v,...y){var x;return((x=m.object)!==null&&x!==void 0?x:m.base).call(m,{node:this,fields:d,config:l!=null?l:{},filter:u,cases:c,getActiveFields:f,getChildModelPath:h},v,...y)}})};e.ObjectNode=o})(fh);var Aa={};Object.defineProperty(Aa,"__esModule",{value:!0});Aa.Reference=void 0;const Tg=(e,t)=>({type(n){return e.get(t).type.bind(this)(n)},category(n){return e.get(t).category.bind(this)(n)},default(){return e.get(t).default.bind(this)()},transform(n,r){return e.get(t).transform(n,r)},enabled(n){return e.get(t).enabled.bind(this)(n)},keep(){return e.get(t).keep.bind(this)()},optional(){return e.get(t).optional.bind(this)()},navigate(n,r){return e.get(t).navigate.bind(this)(n,r)},pathPush(n,r){return e.get(t).pathPush.bind(this)(n,r)},suggest(n,r){return e.get(t).suggest.bind(this)(n,r)},validate(n,r,i,s){return e.get(t).validate.bind(this)(n,r,i,s)},validationOption(n){return e.get(t).validationOption.bind(this)(n)},hook(n,r,...i){return e.get(t).hook.bind(this)(n,r,...i)},activeCase(n,r){return e.get(t).activeCase.bind(this)(n,r)},canUpdate(n,r){return e.get(t).canUpdate.bind(this)(n,r)},update(n,r){return e.get(t).update.bind(this)(n,r)}});Aa.Reference=Tg;var Sa={};Object.defineProperty(Sa,"__esModule",{value:!0});Sa.StringNode=void 0;const Og=Qn,Mg=In,Ng=Nn,Pu=e=>!!(e!=null&&e.enum),$u=e=>!!(e!=null&&e.validator),Rg=(e,t)=>{const n=()=>{var r,i,s,o;if(Pu(t))return typeof t.enum=="string"?(r=e==null?void 0:e.get(t.enum))!==null&&r!==void 0?r:[]:t.enum;if((t==null?void 0:t.validator)==="resource"){if(typeof t.params.pool=="string"){if(t.params.requireTag)return(i=e==null?void 0:e.get(`tag/${t.params.pool}`).map(l=>`#${l}`))!==null&&i!==void 0?i:[];const a=t.params.pool.replace(/^\$/,"");return[...t.params.allowTag?(s=e==null?void 0:e.get(`tag/${a}`).map(l=>`#${l}`))!==null&&s!==void 0?s:[]:[],...(o=e==null?void 0:e.get(a))!==null&&o!==void 0?o:[]]}return t.params.pool}return[]};return Ae(ce({},Og.Base),{type:()=>"string",default:()=>"",validate(r,i,s,o){if(o.loose&&typeof i!="string"&&(i=(o.wrapLists?Ng.DataModel.wrapLists(this.default()):this.default())||void 0),typeof i!="string")return s.add(r,"error.expected_string"),i;if($u(t)){if(t.validator==="resource"&&i.length>0&&!i.includes(":")&&(i=i.startsWith("#")?"#minecraft:"+i.slice(1):"minecraft:"+i),t.validator==="resource"&&typeof i=="string"){let l=i;if(i.startsWith("#")){if(typeof t.params.pool=="string"&&t.params.pool.startsWith("$tag/"))return s.add(r,"error.disallowed_tag_prefix"),i;if(!t.params.allowTag&&!t.params.requireTag)return s.add(r,"error.disallowed_tag"),i;l=l.slice(1)}else if(t.params.requireTag)return s.add(r,"error.expected_tag"),i;if(!l.match(/^(?:[_\-a-z0-9.]*:)?[_\-a-z0-9/.]*$/g))return s.add(r,"error.invalid_resource_location"),i}if(t.validator==="resource"&&(typeof t.params.pool=="string"&&t.params.pool.startsWith("$")||(t.params.allowTag||t.params.requireTag)&&i.startsWith("#")||typeof i=="string"&&i.includes(":")&&!i.startsWith("minecraft:")||t.params.isDefinition||t.params.allowUnknown))return i}if(Pu(t)&&t.additional)return i;const a=n();return a.length>0&&!a.includes(i)&&s.add(r,"error.invalid_enum_option",i),i},suggest:()=>n().map(Mg.quoteString),validationOption(){return $u(t)?t:void 0},hook(r,i,...s){var o;return((o=r.string)!==null&&o!==void 0?o:r.base).call(r,{node:this,getValues:n,config:t},i,...s)}})};Sa.StringNode=Rg;var hh={};Object.defineProperty(hh,"__esModule",{value:!0});var Ti={};Object.defineProperty(Ti,"__esModule",{value:!0});Ti.CollectionRegistry=Ti.SchemaRegistry=void 0;class Lg{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}}Ti.SchemaRegistry=Lg;class Dg{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:[]}}Ti.CollectionRegistry=Dg;var ph={};Object.defineProperty(ph,"__esModule",{value:!0});(function(e){var t=no&&no.__createBinding||(Object.create?function(r,i,s,o){o===void 0&&(o=s);var a=Object.getOwnPropertyDescriptor(i,s);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(r,o,a)}:function(r,i,s,o){o===void 0&&(o=s),r[o]=i[s]}),n=no&&no.__exportStar||function(r,i){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&t(i,r,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(Nn,e),n(Sn,e),n(Fi,e),n(Qn,e),n(ka,e),n(uh,e),n(Ps,e),n(Ea,e),n(dh,e),n(fh,e),n(Aa,e),n(Sa,e),n($s,e),n(hh,e),n(Ti,e),n(ph,e)})(P);const ps=15,Hl=30,Gl=19,Fg=29,Xo=256,Rc=Xo+1+Fg,Bu=2*Rc+1,Ui=256,Pg=7,ju=16,zu=17,Uu=18,Xa=8*2,Ko=-1,$g=1,ro=2,Bg=0,ai=0,Vu=1,jg=3,Rt=4,ln=0,mh=1,io=2,fn=-2,zg=-3,Qr=-5;function Ia(e){return Ca(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function Ca(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?Ca(n):n),[])}const Hu=[0,1,2,3].concat(...Ia([[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 Qe(){const e=this;function t(i){const s=e.dyn_tree,o=e.stat_desc.static_tree,a=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,u=e.stat_desc.max_length;let c,d,f,h,_,g,p=0;for(h=0;h<=ps;h++)i.bl_count[h]=0;for(s[i.heap[i.heap_max]*2+1]=0,c=i.heap_max+1;cu&&(h=u,p++),s[d*2+1]=h,!(d>e.max_code)&&(i.bl_count[h]++,_=0,d>=l&&(_=a[d-l]),g=s[d*2],i.opt_len+=g*(h+_),o&&(i.static_len+=g*(o[d*2+1]+_)));if(p!==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]--,p-=2}while(p>0);for(h=u;h!==0;h--)for(d=i.bl_count[h];d!==0;)f=i.heap[--c],!(f>e.max_code)&&(s[f*2+1]!=h&&(i.opt_len+=(h-s[f*2+1])*s[f*2],s[f*2+1]=h),d--)}}function n(i,s){let o=0;do o|=i&1,i>>>=1,o<<=1;while(--s>0);return o>>>1}function r(i,s,o){const a=[];let l=0,u,c,d;for(u=1;u<=ps;u++)a[u]=l=l+o[u-1]<<1;for(c=0;c<=s;c++)d=i[c*2+1],d!==0&&(i[c*2]=n(a[d]++,d))}e.build_tree=function(i){const s=e.dyn_tree,o=e.stat_desc.static_tree,a=e.stat_desc.elems;let l,u,c=-1,d;for(i.heap_len=0,i.heap_max=Bu,l=0;l=1;l--)i.pqdownheap(s,l);d=a;do l=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(s,1),u=i.heap[1],i.heap[--i.heap_max]=l,i.heap[--i.heap_max]=u,s[d*2]=s[l*2]+s[u*2],i.depth[d]=Math.max(i.depth[l],i.depth[u])+1,s[l*2+1]=s[u*2+1]=d,i.heap[1]=d++,i.pqdownheap(s,1);while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],t(i),r(s,e.max_code,i.bl_count)}}Qe._length_code=[0,1,2,3,4,5,6,7].concat(...Ia([[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]]));Qe.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];Qe.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];Qe.d_code=function(e){return e<256?Hu[e]:Hu[256+(e>>>7)]};Qe.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];Qe.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];Qe.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];Qe.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function yt(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}const Ug=[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],Vg=Ia([[144,8],[112,9],[24,7],[8,8]]);yt.static_ltree=Ca(Ug.map((e,t)=>[e,Vg[t]]));const Hg=[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],Gg=Ia([[30,5]]);yt.static_dtree=Ca(Hg.map((e,t)=>[e,Gg[t]]));yt.static_l_desc=new yt(yt.static_ltree,Qe.extra_lbits,Xo+1,Rc,ps);yt.static_d_desc=new yt(yt.static_dtree,Qe.extra_dbits,0,Hl,ps);yt.static_bl_desc=new yt(null,Qe.extra_blbits,0,Gl,Pg);const Zg=9,Yg=8;function xn(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}const gh=0,Co=1,kr=2,an=[new xn(0,0,0,0,gh),new xn(4,4,8,4,Co),new xn(4,5,16,8,Co),new xn(4,6,32,32,Co),new xn(4,4,16,16,kr),new xn(8,16,32,32,kr),new xn(8,16,128,128,kr),new xn(8,32,128,256,kr),new xn(32,128,258,1024,kr),new xn(32,258,258,4096,kr)],so=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Xt=0,oo=1,Vi=2,ao=3,Wg=32,Ka=42,lo=113,Hi=666,Ja=8,qg=0,Qa=1,Xg=2,rt=3,To=258,Ut=To+rt+1;function Gu(e,t,n,r){const i=e[t*2],s=e[n*2];return i=3&&$[Qe.bl_order[z]*2+1]===0;z--);return e.opt_len+=3*(z+1)+5+5+4,z}function Ke(z){e.pending_buf[e.pending++]=z}function vt(z){Ke(z&255),Ke(z>>>8&255)}function Ce(z){Ke(z>>8&255),Ke(z&255&255)}function je(z,Z){let H;const Y=Z;j>Xa-Y?(H=z,ie|=H<>>Xa-j,j+=Y-Xa):(ie|=z<=8&&(Ke(ie&255),ie>>>=8,j-=8)}function Ne(){je(Qa<<1,3),ze(Ui,yt.static_ltree),Ue(),1+q+10-j<9&&(je(Qa<<1,3),ze(Ui,yt.static_ltree),Ue()),q=7}function tt(z,Z){let H,Y,te;if(e.dist_buf[N]=z,e.lc_buf[N]=Z&255,N++,z===0?U[Z*2]++:(B++,z--,U[(Qe._length_code[Z]+Xo+1)*2]++,M[Qe.d_code(z)*2]++),(N&8191)===0&&O>2){for(H=N*8,Y=b-m,te=0;te>>=3,B8?vt(ie):j>0&&Ke(ie&255),ie=0,j=0}function Rn(z,Z,H){vn(),q=8,H&&(vt(Z),vt(~Z)),e.pending_buf.set(l.subarray(z,z+Z),e.pending),e.pending+=Z}function ee(z,Z,H){je((qg<<1)+(H?1:0),3),Rn(z,Z,!0)}function ne(z,Z,H){let Y,te,G=0;O>0?(V.build_tree(e),Q.build_tree(e),G=He(),Y=e.opt_len+3+7>>>3,te=e.static_len+3+7>>>3,te<=Y&&(Y=te)):Y=te=Z+5,Z+4<=Y&&z!=-1?ee(z,Z,H):te==Y?(je((Qa<<1)+(H?1:0),3),xt(yt.static_ltree,yt.static_dtree)):(je((Xg<<1)+(H?1:0),3),wn(V.max_code+1,Q.max_code+1,G+1),xt(U,M)),ge(),H&&vn()}function fe(z){ne(m>=0?m:-1,b-m,z),m=b,t.flush_pending()}function Ee(){let z,Z,H,Y;do{if(Y=u-E-b,Y===0&&b===0&&E===0)Y=s;else if(Y==-1)Y--;else if(b>=s+s-Ut){l.set(l.subarray(s,s+s),0),k-=s,b-=s,m-=s,z=h,H=z;do Z=d[--H]&65535,d[H]=Z>=s?Z-s:0;while(--z!==0);z=s,H=z;do Z=c[--H]&65535,c[H]=Z>=s?Z-s:0;while(--z!==0);Y+=s}if(t.avail_in===0)return;z=t.read_buf(l,b+E,Y),E+=z,E>=rt&&(f=l[b]&255,f=(f<r-5&&(Z=r-5);;){if(E<=1){if(Ee(),E===0&&z==ai)return Xt;if(E===0)break}if(b+=E,E=0,H=m+Z,(b===0||b>=H)&&(E=b-H,b=H,fe(!1),t.avail_out===0)||b-m>=s-Ut&&(fe(!1),t.avail_out===0))return Xt}return fe(z==Rt),t.avail_out===0?z==Rt?Vi:Xt:z==Rt?ao:oo}function Ot(z){let Z=C,H=b,Y,te,G=S;const se=b>s-Ut?b-(s-Ut):0;let Je=W;const qe=a,ft=b+To;let on=l[H+G-1],eo=l[H+G];S>=L&&(Z>>=2),Je>E&&(Je=E);do if(Y=z,!(l[Y+G]!=eo||l[Y+G-1]!=on||l[Y]!=l[H]||l[++Y]!=l[H+1])){H+=2,Y++;do;while(l[++H]==l[++Y]&&l[++H]==l[++Y]&&l[++H]==l[++Y]&&l[++H]==l[++Y]&&l[++H]==l[++Y]&&l[++H]==l[++Y]&&l[++H]==l[++Y]&&l[++H]==l[++Y]&&HG){if(k=z,G=te,te>=Je)break;on=l[H+G-1],eo=l[H+G]}}while((z=c[z&qe]&65535)>se&&--Z!==0);return G<=E?G:E}function zi(z){let Z=0,H;for(;;){if(E=rt&&(f=(f<=rt)if(H=tt(b-k,v-rt),E-=v,v<=A&&E>=rt){v--;do b++,f=(f<=rt&&(f=(f<4096)&&(v=rt-1)),S>=rt&&v<=S){Y=b+E-rt,H=tt(b-1-y,S-rt),E-=S-1,S-=2;do++b<=Y&&(f=(f<Zg||Y!=Ja||H<9||H>15||Z<0||Z>9||G<0||G>ro?fn:(z.dstate=e,o=H,s=1<9||H<0||H>ro?fn:(an[O].func!=an[Z].func&&z.total_in!==0&&(Y=z.deflate(Vu)),O!=Z&&(O=Z,A=an[O].max_lazy,L=an[O].good_length,W=an[O].nice_length,C=an[O].max_chain),D=H,Y)},e.deflateSetDictionary=function(z,Z,H){let Y=H,te,G=0;if(!Z||n!=Ka)return fn;if(Ys-Ut&&(Y=s-Ut,G=H-Y),l.set(Z.subarray(G,G+Y),0),b=Y,m=Y,f=l[0]&255,f=(f<Rt||Z<0)return fn;if(!z.next_out||!z.next_in&&z.avail_in!==0||n==Hi&&Z!=Rt)return z.msg=so[io-fn],fn;if(z.avail_out===0)return z.msg=so[io-Qr],Qr;if(t=z,G=i,i=Z,n==Ka&&(Y=Ja+(o-8<<4)<<8,te=(O-1&255)>>1,te>3&&(te=3),Y|=te<<6,b!==0&&(Y|=Wg),Y+=31-Y%31,n=lo,Ce(Y)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return i=-1,ln}else if(t.avail_in===0&&Z<=G&&Z!=Rt)return t.msg=so[io-Qr],Qr;if(n==Hi&&t.avail_in!==0)return z.msg=so[io-Qr],Qr;if(t.avail_in!==0||E!==0||Z!=ai&&n!=Hi){switch(se=-1,an[O].func){case gh:se=at(Z);break;case Co:se=zi(Z);break;case kr:se=Jr(Z);break}if((se==Vi||se==ao)&&(n=Hi),se==Xt||se==Vi)return t.avail_out===0&&(i=-1),ln;if(se==oo){if(Z==Vu)Ne();else if(ee(0,0,!1),Z==jg)for(H=0;Hn&&(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 Jg(e){const t=this,n=new _h,r=Qg(e&&e.chunkSize?e.chunkSize:64*1024),i=ai,s=new Uint8Array(r);let o=e?e.level:Ko;typeof o=="undefined"&&(o=Ko),n.deflateInit(o),n.next_out=s,t.append=function(a,l){let u,c,d=0,f=0,h=0;const _=[];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!=ln)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==r?_.push(new Uint8Array(s)):_.push(s.slice(0,n.next_out_index))),h+=n.next_out_index,l&&n.next_in_index>0&&n.next_in_index!=d&&(l(n.next_in_index),d=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return _.length>1?(c=new Uint8Array(h),_.forEach(function(g){c.set(g,f),f+=g.length})):c=_[0]||new Uint8Array(0),c}},t.flush=function(){let a,l,u=0,c=0;const d=[];do{if(n.next_out_index=0,n.avail_out=r,a=n.deflate(Rt),a!=mh&&a!=ln)throw new Error("deflating: "+n.msg);r-n.avail_out>0&&d.push(s.slice(0,n.next_out_index)),c+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),l=new Uint8Array(c),d.forEach(function(f){l.set(f,u),u+=f.length}),l}}function Qg(e){return e+5*(Math.floor(e/16383)+1)}const e_=15,Me=0,Hn=1,t_=2,Dt=-2,et=-3,Zu=-4,Gn=-5,Vt=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],wh=1440,n_=0,r_=4,i_=9,s_=5,o_=[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],a_=[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],l_=[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],c_=[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],u_=[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],d_=[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],nr=15;function Zl(){const e=this;let t,n,r,i,s,o;function a(u,c,d,f,h,_,g,p,m,v,y){let x,b,k,E,S,C,A,O,D,L,W,U,M,$,V;L=0,S=d;do r[u[c+L]]++,L++,S--;while(S!==0);if(r[0]==d)return g[0]=-1,p[0]=0,Me;for(O=p[0],C=1;C<=nr&&r[C]===0;C++);for(A=C,OS&&(O=S),p[0]=O,$=1<U+O;){if(E++,U+=O,V=k-U,V=V>O?O:V,(b=1<<(C=A-U))>x+1&&(b-=x+1,M=A,Cwh)return et;s[E]=W=v[0],v[0]+=V,E!==0?(o[E]=S,i[0]=C,i[1]=O,C=S>>>U-O,i[2]=W-s[E-1]-C,m.set(i,(s[E-1]+C)*3)):g[0]=W}for(i[1]=A-U,L>=d?i[0]=128+64:y[L]>>U;C>>=1)S^=C;for(S^=C,D=(1<257?(v==et?m.msg="oversubscribed distance tree":v==Gn?(m.msg="incomplete distance tree",v=et):v!=Zu&&(m.msg="empty distance tree with lengths",v=et),v):Me)}}Zl.inflate_trees_fixed=function(e,t,n,r){return e[0]=i_,t[0]=s_,n[0]=o_,r[0]=a_,Me};const co=0,Yu=1,Wu=2,qu=3,Xu=4,Ku=5,Ju=6,el=7,Qu=8,uo=9;function f_(){const e=this;let t,n=0,r,i=0,s=0,o=0,a=0,l=0,u=0,c=0,d,f=0,h,_=0;function g(p,m,v,y,x,b,k,E){let S,C,A,O,D,L,W,U,M,$,V,Q,R,I,N,B;W=E.next_in_index,U=E.avail_in,D=k.bitb,L=k.bitk,M=k.write,$=M>=C[B+1],L-=C[B+1],k.win[M++]=C[B+2],$--;continue}do{if(D>>=C[B+1],L-=C[B+1],(O&16)!==0){for(O&=15,R=C[B+2]+(D&Vt[O]),D>>=O,L-=O;L<15;)U--,D|=(E.read_byte(W++)&255)<>=C[B+1],L-=C[B+1],(O&16)!==0){for(O&=15;L>=O,L-=O,$-=R,M>=I)N=M-I,M-N>0&&2>M-N?(k.win[M++]=k.win[N++],k.win[M++]=k.win[N++],R-=2):(k.win.set(k.win.subarray(N,N+2),M),M+=2,N+=2,R-=2);else{N=M-I;do N+=k.end;while(N<0);if(O=k.end-N,R>O){if(R-=O,M-N>0&&O>M-N)do k.win[M++]=k.win[N++];while(--O!==0);else k.win.set(k.win.subarray(N,N+O),M),M+=O,N+=O,O=0;N=0}}if(M-N>0&&R>M-N)do k.win[M++]=k.win[N++];while(--R!==0);else k.win.set(k.win.subarray(N,N+R),M),M+=R,N+=R,R=0;break}else if((O&64)===0)S+=C[B+2],S+=D&Vt[O],B=(A+S)*3,O=C[B];else return E.msg="invalid distance code",R=E.avail_in-U,R=L>>3>3:R,U+=R,W-=R,L-=R<<3,k.bitb=D,k.bitk=L,E.avail_in=U,E.total_in+=W-E.next_in_index,E.next_in_index=W,k.write=M,et;while(!0);break}if((O&64)===0){if(S+=C[B+2],S+=D&Vt[O],B=(A+S)*3,(O=C[B])===0){D>>=C[B+1],L-=C[B+1],k.win[M++]=C[B+2],$--;break}}else return(O&32)!==0?(R=E.avail_in-U,R=L>>3>3:R,U+=R,W-=R,L-=R<<3,k.bitb=D,k.bitk=L,E.avail_in=U,E.total_in+=W-E.next_in_index,E.next_in_index=W,k.write=M,Hn):(E.msg="invalid literal/length code",R=E.avail_in-U,R=L>>3>3:R,U+=R,W-=R,L-=R<<3,k.bitb=D,k.bitk=L,E.avail_in=U,E.total_in+=W-E.next_in_index,E.next_in_index=W,k.write=M,et)}while(!0)}while($>=258&&U>=10);return R=E.avail_in-U,R=L>>3>3:R,U+=R,W-=R,L-=R<<3,k.bitb=D,k.bitk=L,E.avail_in=U,E.total_in+=W-E.next_in_index,E.next_in_index=W,k.write=M,Me}e.init=function(p,m,v,y,x,b){t=co,u=p,c=m,d=v,f=y,h=x,_=b,r=null},e.proc=function(p,m,v){let y,x,b,k=0,E=0,S=0,C,A,O,D;for(S=m.next_in_index,C=m.avail_in,k=p.bitb,E=p.bitk,A=p.write,O=A=258&&C>=10&&(p.bitb=k,p.bitk=E,m.avail_in=C,m.total_in+=S-m.next_in_index,m.next_in_index=S,p.write=A,v=g(u,c,d,f,h,_,p,m),S=m.next_in_index,C=m.avail_in,k=p.bitb,E=p.bitk,A=p.write,O=A>>=r[x+1],E-=r[x+1],b=r[x],b===0){o=r[x+2],t=Ju;break}if((b&16)!==0){a=b&15,n=r[x+2],t=Wu;break}if((b&64)===0){s=b,i=x/3+r[x+2];break}if((b&32)!==0){t=el;break}return t=uo,m.msg="invalid literal/length code",v=et,p.bitb=k,p.bitk=E,m.avail_in=C,m.total_in+=S-m.next_in_index,m.next_in_index=S,p.write=A,p.inflate_flush(m,v);case Wu:for(y=a;E>=y,E-=y,s=c,r=h,i=_,t=qu;case qu:for(y=s;E>=r[x+1],E-=r[x+1],b=r[x],(b&16)!==0){a=b&15,l=r[x+2],t=Xu;break}if((b&64)===0){s=b,i=x/3+r[x+2];break}return t=uo,m.msg="invalid distance code",v=et,p.bitb=k,p.bitk=E,m.avail_in=C,m.total_in+=S-m.next_in_index,m.next_in_index=S,p.write=A,p.inflate_flush(m,v);case Xu:for(y=a;E>=y,E-=y,t=Ku;case Ku:for(D=A-l;D<0;)D+=p.end;for(;n!==0;){if(O===0&&(A==p.end&&p.read!==0&&(A=0,O=A7&&(E-=8,C++,S--),p.write=A,v=p.inflate_flush(m,v),A=p.write,O=Ag.avail_out&&(m=g.avail_out),m!==0&&p==Gn&&(p=Me),g.avail_out-=m,g.total_out+=m,g.next_out.set(n.win.subarray(y,y+m),v),v+=m,y+=m,y==n.end&&(y=0,n.write==n.end&&(n.write=0),m=n.write-y,m>g.avail_out&&(m=g.avail_out),m!==0&&p==Gn&&(p=Me),g.avail_out-=m,g.total_out+=m,g.next_out.set(n.win.subarray(y,y+m),v),v+=m,y+=m),g.next_out_index=v,n.read=y,p},n.proc=function(g,p){let m,v,y,x,b,k,E,S;for(x=g.next_in_index,b=g.avail_in,v=n.bitb,y=n.bitk,k=n.write,E=k>>1){case 0:v>>>=3,y-=3,m=y&7,v>>>=m,y-=m,r=tl;break;case 1:C=[],A=[],O=[[]],D=[[]],Zl.inflate_trees_fixed(C,A,O,D),c.init(C[0],A[0],O[0],0,D[0],0),v>>>=3,y-=3,r=fo;break;case 2:v>>>=3,y-=3,r=nd;break;case 3:return v>>>=3,y-=3,r=xr,g.msg="invalid block type",p=et,n.bitb=v,n.bitk=y,g.avail_in=b,g.total_in+=x-g.next_in_index,g.next_in_index=x,n.write=k,n.inflate_flush(g,p)}break;case tl:for(;y<32;){if(b!==0)p=Me;else return n.bitb=v,n.bitk=y,g.avail_in=b,g.total_in+=x-g.next_in_index,g.next_in_index=x,n.write=k,n.inflate_flush(g,p);b--,v|=(g.read_byte(x++)&255)<>>16&65535)!=(v&65535))return r=xr,g.msg="invalid stored block lengths",p=et,n.bitb=v,n.bitk=y,g.avail_in=b,g.total_in+=x-g.next_in_index,g.next_in_index=x,n.write=k,n.inflate_flush(g,p);i=v&65535,v=y=0,r=i!==0?td:d!==0?ho:ei;break;case td:if(b===0||E===0&&(k==n.end&&n.read!==0&&(k=0,E=kb&&(m=b),m>E&&(m=E),n.win.set(g.read_buf(x,m),k),x+=m,b-=m,k+=m,E-=m,(i-=m)!==0)break;r=d!==0?ho:ei;break;case nd:for(;y<14;){if(b!==0)p=Me;else return n.bitb=v,n.bitk=y,g.avail_in=b,g.total_in+=x-g.next_in_index,g.next_in_index=x,n.write=k,n.inflate_flush(g,p);b--,v|=(g.read_byte(x++)&255)<29||(m>>5&31)>29)return r=xr,g.msg="too many length or distance symbols",p=et,n.bitb=v,n.bitk=y,g.avail_in=b,g.total_in+=x-g.next_in_index,g.next_in_index=x,n.write=k,n.inflate_flush(g,p);if(m=258+(m&31)+(m>>5&31),!a||a.length>>=14,y-=14,o=0,r=rd;case rd:for(;o<4+(s>>>10);){for(;y<3;){if(b!==0)p=Me;else return n.bitb=v,n.bitk=y,g.avail_in=b,g.total_in+=x-g.next_in_index,g.next_in_index=x,n.write=k,n.inflate_flush(g,p);b--,v|=(g.read_byte(x++)&255)<>>=3,y-=3}for(;o<19;)a[ed[o++]]=0;if(l[0]=7,m=_.inflate_trees_bits(a,l,u,f,g),m!=Me)return p=m,p==et&&(a=null,r=xr),n.bitb=v,n.bitk=y,g.avail_in=b,g.total_in+=x-g.next_in_index,g.next_in_index=x,n.write=k,n.inflate_flush(g,p);o=0,r=id;case id:for(;m=s,!(o>=258+(m&31)+(m>>5&31));){let $,V;for(m=l[0];y>>=m,y-=m,a[o++]=V;else{for(S=V==18?7:V-14,$=V==18?11:3;y>>=m,y-=m,$+=v&Vt[S],v>>>=S,y-=S,S=o,m=s,S+$>258+(m&31)+(m>>5&31)||V==16&&S<1)return a=null,r=xr,g.msg="invalid bit length repeat",p=et,n.bitb=v,n.bitk=y,g.avail_in=b,g.total_in+=x-g.next_in_index,g.next_in_index=x,n.write=k,n.inflate_flush(g,p);V=V==16?a[S-1]:0;do a[S++]=V;while(--$!==0);o=S}}if(u[0]=-1,L=[],W=[],U=[],M=[],L[0]=9,W[0]=6,m=s,m=_.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),a,L,W,U,M,f,g),m!=Me)return m==et&&(a=null,r=xr),p=m,n.bitb=v,n.bitk=y,g.avail_in=b,g.total_in+=x-g.next_in_index,g.next_in_index=x,n.write=k,n.inflate_flush(g,p);c.init(L[0],W[0],f,U[0],f,M[0]),r=fo;case fo:if(n.bitb=v,n.bitk=y,g.avail_in=b,g.total_in+=x-g.next_in_index,g.next_in_index=x,n.write=k,(p=c.proc(n,g,p))!=Hn)return n.inflate_flush(g,p);if(p=Me,c.free(g),x=g.next_in_index,b=g.avail_in,v=n.bitb,y=n.bitk,k=n.write,E=k15?(e.inflateEnd(n),Dt):(e.wbits=r,n.istate.blocks=new h_(n,1<>4)+8>o.wbits){o.mode=rr,n.msg="invalid win size",o.marker=5;break}o.mode=od;case od:if(n.avail_in===0)return i;if(i=r,n.avail_in--,n.total_in++,s=n.read_byte(n.next_in_index++)&255,((o.method<<8)+s)%31!==0){o.mode=rr,n.msg="incorrect header check",o.marker=5;break}if((s&p_)===0){o.mode=Gi;break}o.mode=ad;case ad:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,o.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,o.mode=ld;case ld:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,o.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,o.mode=cd;case cd:if(n.avail_in===0)return i;i=r,n.avail_in--,n.total_in++,o.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,o.mode=ud;case ud:return n.avail_in===0?i:(i=r,n.avail_in--,n.total_in++,o.need+=n.read_byte(n.next_in_index++)&255,o.mode=nl,t_);case nl:return o.mode=rr,n.msg="need dictionary",o.marker=0,Dt;case Gi:if(i=o.blocks.proc(n,i),i==et){o.mode=rr,o.marker=0;break}if(i==Me&&(i=r),i!=Hn)return i;i=r,o.blocks.reset(n,o.was),o.mode=dd;case dd:return Hn;case rr:return et;default:return Dt}},e.inflateSetDictionary=function(n,r,i){let s=0,o=i;if(!n||!n.istate||n.istate.mode!=nl)return Dt;const a=n.istate;return o>=1<0&&n.next_in_index!=f&&(l(n.next_in_index),f=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return u.length>1?(d=new Uint8Array(_),u.forEach(function(g){d.set(g,h),h+=g.length})):d=u[0]||new Uint8Array(0),d}},t.flush=function(){n.inflateEnd()}}const x_={chunkSize:512*1024,maxWorkers:typeof navigator!="undefined"&&navigator.hardwareConcurrency||2,terminateWorkerTimeout:5e3,useWebWorkers:!0,workerScripts:void 0},Lt=Object.assign({},x_);function xh(){return Lt}function Lc(e){if(e.baseURL!==void 0&&(Lt.baseURL=e.baseURL),e.chunkSize!==void 0&&(Lt.chunkSize=e.chunkSize),e.maxWorkers!==void 0&&(Lt.maxWorkers=e.maxWorkers),e.terminateWorkerTimeout!==void 0&&(Lt.terminateWorkerTimeout=e.terminateWorkerTimeout),e.useWebWorkers!==void 0&&(Lt.useWebWorkers=e.useWebWorkers),e.Deflate!==void 0&&(Lt.Deflate=e.Deflate),e.Inflate!==void 0&&(Lt.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");Lt.workerScripts||(Lt.workerScripts={}),Lt.workerScripts.deflate=e.workerScripts.deflate}if(e.workerScripts.inflate){if(!Array.isArray(e.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");Lt.workerScripts||(Lt.workerScripts={}),Lt.workerScripts.inflate=e.workerScripts.inflate}}}const Zi={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 Zi)if(Zi.hasOwnProperty(t)){for(let n in Zi[t])if(Zi[t].hasOwnProperty(n)){const r=Zi[t][n];if(typeof r=="string")e[r]=t+"/"+n;else for(let i=0;i>>1^3988292384:t=t>>>1;bh[e]=t}class ms{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let r=0,i=t.length|0;r>>8^bh[(n^t[r])&255];this.crc=n}get(){return~this.crc}}function Yl(e){if(typeof TextEncoder=="undefined"){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n0&&t&&(e[n-1]=$t.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(t===0)return r.concat(e);for(let o=0;o>>t),n=e[o]<<32-t;const i=e.length?e[e.length-1]:0,s=$t.getPartial(i);return r.push($t.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},yh={bytes:{fromBits(e){const n=$t.bitLength(e)/8,r=new Uint8Array(n);let i;for(let s=0;s>>24,i<<=8;return r},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(n);let o=0;for(let a=t.blockSize+r-(t.blockSize+r&t.blockSize-1);a<=i;a+=t.blockSize)t._block(s.subarray(16*o,16*(o+1))),o+=1;return n.splice(0,16*o),t},finalize:function(){const e=this;let t=e._buffer;const n=e._h;t=$t.concat(t,[$t.partial(1,1)]);for(let r=t.length+2;r&15;r++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:function(e,t,n,r){if(e<=19)return t&n|~t&r;if(e<=39)return t^n^r;if(e<=59)return t&n|t&r|n&r;if(e<=79)return t^n^r},_S:function(e,t){return t<>>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],s=n[1],o=n[2],a=n[3],l=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 c=t._S(5,i)+t._f(u,s,o,a)+l+r[u]+t._key[Math.floor(u/20)]|0;l=a,a=o,o=t._S(30,s),s=i,i=c}n[0]=n[0]+i|0,n[1]=n[1]+s|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+l|0}};const kh={};kh.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 s,o,a,l=1;if(i!==4&&i!==6&&i!==8)throw new Error("invalid aes key size");for(t._key=[o=e.slice(0),a=[]],s=i;s<4*i+28;s++){let u=o[s-1];(s%i===0||i===8&&s%i===4)&&(u=n[u>>>24]<<24^n[u>>16&255]<<16^n[u>>8&255]<<8^n[u&255],s%i===0&&(u=u<<8^u>>>24^l<<24,l=l<<1^(l>>7)*283)),o[s]=o[s-i]^u}for(let u=0;s;u++,s--){const c=o[u&3?s:s-4];s<=4||u<4?a[u]=c:a[u]=r[0][n[c>>>24]]^r[1][n[c>>16&255]]^r[2][n[c>>8&255]]^r[3][n[c&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],s=[];let o,a,l,u;for(let c=0;c<256;c++)s[(i[c]=c<<1^(c>>7)*283)^c]=c;for(let c=o=0;!n[c];c^=a||1,o=s[o]||1){let d=o^o<<1^o<<2^o<<3^o<<4;d=d>>8^d&255^99,n[c]=d,r[d]=c,u=i[l=i[a=i[c]]];let f=u*16843009^l*65537^a*257^c*16843008,h=i[d]*257^d*16843008;for(let _=0;_<4;_++)e[_][c]=h=h<<24^h>>>8,t[_][d]=f=f<<24^f>>>8}for(let c=0;c<5;c++)e[c]=e[c].slice(0),t[c]=t[c].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],o=s[0],a=s[1],l=s[2],u=s[3],c=s[4];let d=e[0]^n[0],f=e[t?3:1]^n[1],h=e[2]^n[2],_=e[t?1:3]^n[3],g=4,p,m,v;for(let y=0;y>>24]^a[f>>16&255]^l[h>>8&255]^u[_&255]^n[g],m=o[f>>>24]^a[h>>16&255]^l[_>>8&255]^u[d&255]^n[g+1],v=o[h>>>24]^a[_>>16&255]^l[d>>8&255]^u[f&255]^n[g+2],_=o[_>>>24]^a[d>>16&255]^l[f>>8&255]^u[h&255]^n[g+3],g+=4,d=p,f=m,h=v;for(let y=0;y<4;y++)i[t?3&-y:y]=c[d>>>24]<<24^c[f>>16&255]<<16^c[h>>8&255]<<8^c[_&255]^n[g++],p=d,d=f,f=h,h=_,_=p;return i}};const Eh={};Eh.ctrGladman=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if((e>>24&255)===255){let t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=$t.bitLength(t);for(let s=0;si&&(e=n.hash(e));for(let s=0;se.length){const n=e;e=new Uint8Array(t),e.set(n,0)}return e}function Zt(e,t,n){return e.subarray(t,n)}const _i=12;class N_{constructor(t,n){const r=this;Object.assign(r,{password:t,passwordVerification:n}),Lh(r,t)}append(t){const n=this;if(n.password){const r=fd(n,t.subarray(0,_i));if(n.password=null,r[_i-1]!=n.passwordVerification)throw new Error(Sh);t=t.subarray(_i)}return fd(n,t)}flush(){return{valid:!0,data:new Uint8Array(0)}}}class R_{constructor(t,n){const r=this;Object.assign(r,{password:t,passwordVerification:n}),Lh(r,t)}append(t){const n=this;let r,i;if(n.password){n.password=null;const s=crypto.getRandomValues(new Uint8Array(_i));s[_i-1]=n.passwordVerification,r=new Uint8Array(t.length+s.length),r.set(hd(n,s),0),i=_i}else r=new Uint8Array(t.length),i=0;return r.set(hd(n,t),i),r}flush(){return{data:new Uint8Array(0)}}}function fd(e,t){const n=new Uint8Array(t.length);for(let r=0;r>>24]),e.keys[2]=~e.crcKey2.get()}function Dh(e){const t=e.keys[2]|2;return Fh(Math.imul(t,t^1)>>>8)}function Fh(e){return e&255}function pd(e){return e&4294967295}const Ph="deflate",$h="inflate",md="Invalid signature";class L_{constructor(t,{signature:n,password:r,signed:i,compressed:s,zipCrypto:o,passwordVerification:a,encryptionStrength:l},{chunkSize:u}){const c=Boolean(r);Object.assign(this,{signature:n,encrypted:c,signed:i,compressed:s,inflate:s&&new t({chunkSize:u}),crc32:i&&new ms,zipCrypto:o,decrypt:c&&o?new N_(r,a):new I_(r,i,l)})}async append(t){const n=this;return n.encrypted&&t.length&&(t=await n.decrypt.append(t)),n.compressed&&t.length&&(t=await n.inflate.append(t)),(!n.encrypted||n.zipCrypto)&&n.signed&&t.length&&n.crc32.append(t),t}async flush(){const t=this;let n,r=new Uint8Array(0);if(t.encrypted){const i=t.decrypt.flush();if(!i.valid)throw new Error(md);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(md)}return t.compressed&&(r=await t.inflate.append(r)||new Uint8Array(0),await t.inflate.flush()),{data:r,signature:n}}}class D_{constructor(t,{encrypted:n,signed:r,compressed:i,level:s,zipCrypto:o,password:a,passwordVerification:l,encryptionStrength:u},{chunkSize:c}){Object.assign(this,{encrypted:n,signed:r,compressed:i,deflate:i&&new t({level:s||5,chunkSize:c}),crc32:r&&new ms,zipCrypto:o,encrypt:n&&o?new R_(a,l):new C_(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 s=new Uint8Array(r.length+i.data.length);s.set(r,0),s.set(i.data,r.length),r=s}return(!t.encrypted||t.zipCrypto)&&t.signed&&(n=t.crc32.get()),{data:r,signature:n}}}function F_(e,t,n){if(t.codecType.startsWith(Ph))return new D_(e,t,n);if(t.codecType.startsWith($h))return new L_(e,t,n)}const gd="init",_d="append",rl="flush",P_="message";let wd=!0;var il=(e,t,n,r,i,s,o)=>(Object.assign(e,{busy:!0,codecConstructor:t,options:Object.assign({},n),scripts:o,terminate(){e.worker&&!e.busy&&(e.worker.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,i(e)}}),s?B_(e,r):$_(e,r));function $_(e,t){const n=F_(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 B_(e,t){let n;const r={type:"module"};if(!e.interface){if(!wd)e.worker=i(r,t.baseURL);else try{e.worker=i({},t.baseURL)}catch{wd=!1,e.worker=i(r,t.baseURL)}e.worker.addEventListener(P_,a,!1),e.interface={append(l){return s({type:_d,data:l})},flush(){return s({type:rl})},abort(){e.onTaskFinished()}}}return e.interface;function i(l,u){let c,d;c=e.scripts[0],typeof c=="function"&&(c=c());try{d=new URL(c,u)}catch{d=c}return new Worker(d,l)}async function s(l){if(!n){const u=e.options,c=e.scripts.slice(1);await o({scripts:c,type:gd,options:u,config:{chunkSize:t.chunkSize}})}return o(l)}function o(l){const u=e.worker,c=new Promise((d,f)=>n={resolve:d,reject:f});try{if(l.data)try{l.data=l.data.buffer,u.postMessage(l,[l.data])}catch{u.postMessage(l)}else u.postMessage(l)}catch(d){n.reject(d),n=null,e.onTaskFinished()}return c}function a(l){const u=l.data;if(n){const c=u.error,d=u.type;if(c){const f=new Error(c.message);f.stack=c.stack,n.reject(f),n=null,e.onTaskFinished()}else if(d==gd||d==rl||d==_d){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 br=[],sl=[];function Bh(e,t,n){const i=!(!t.compressed&&!t.signed&&!t.encrypted)&&(t.useWebWorkers||t.useWebWorkers===void 0&&n.useWebWorkers),s=i&&n.workerScripts?n.workerScripts[t.codecType]:[];if(br.length!l.busy);return a?(vd(a),il(a,e,t,n,o,i,s)):new Promise(l=>sl.push({resolve:l,codecConstructor:e,options:t,webWorker:i,scripts:s}))}function o(a){if(sl.length){const[{resolve:l,codecConstructor:u,options:c,webWorker:d,scripts:f}]=sl.splice(0,1);l(il(a,u,c,n,o,d,f))}else a.worker?(vd(a),Number.isFinite(n.terminateWorkerTimeout)&&n.terminateWorkerTimeout>=0&&(a.terminateTimeout=setTimeout(()=>{br=br.filter(l=>l!=a),a.terminate()},n.terminateWorkerTimeout))):br=br.filter(l=>l!=a)}}function vd(e){e.terminateTimeout&&(clearTimeout(e.terminateTimeout),e.terminateTimeout=null)}var j_=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.length0&&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>>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;n9007199254740991)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<>>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>>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],++ss?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<>>16-q,q+=r-16):(W|=t<=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,Kf);$(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<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(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<(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<=i;i++)p=(p<{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<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<{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<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<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;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=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(;++vn[++A];)b-=n[A];if(E=1<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[_]d[_]?0:96,r[2]=d[_++]):(r[0]=l[d[_]-f]+16+64,r[2]=c[d[_++]-f]):r[0]=192,b=1<>>C;E>v;v+=b)w.set(r,3*(I+v));for(v=1<>>=1)g^=v;for(g^=v,S=(1<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=bh;)p--,w|=(255&f.we(d++))<>=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++))<>=l[S+1],h-=l[S+1],0!=(16&a)){for(a&=15;a>h;)p--,w|=(255&f.we(d++))<>=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=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=zC;){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++))<>>=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++))<>=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++))<>=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++))<>=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=z7&&(C-=8,m++,A--),t.write=z,y=t.pe(b,y),z=t.write,S=z{}}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=gb;){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++))<>>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++))<>>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=gk&&(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++))<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.lengthm;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++))<>>=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++))<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++))<>>=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.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<{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<{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 Wl="text/plain";class jh{constructor(){this.size=0}init(){this.initialized=!0}}class zh extends jh{}class $c extends jh{writeUint8Array(t){this.size+=t.length}}class z_ extends zh{constructor(t){super(),this.blobReader=new Uh(new Blob([t],{type:Wl}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,n){return this.blobReader.readUint8Array(t,n)}}class U_ extends $c{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:Wl})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:Wl})}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 V_ extends $c{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;n2?this.data+=btoa(r):this.pending=r}getData(){return this.data+btoa(this.pending)}}class Uh extends zh{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,s)=>{r.onload=o=>i(new Uint8Array(o.target.result)),r.onerror=()=>s(r.error),r.readAsArrayBuffer(this.blob.slice(t,t+n))})}}}class H_ extends $c{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 kt=4294967295,hn=65535,ql=8,Vh=0,Hh=99,Gh=67324752,G_=134695760,Xl=33639248,Zh=101010256,Kl=101075792,Yh=117853008,Jo=22,Oo=20,Mo=56,Z_=Jo+Oo+Mo,Y_=1,Wh=1,qh=39169,Xh=10,Kh=1,Bc=21589,W_=28789,q_=25461,Jl=1,X_=6,Ql=8,ec=2048,tc=16,K_=20,xd=45,bd=51,No="/",yd=new Date(2107,11,31),kd=new Date(1980,0,1),J_="\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 Q_=e=>{let t="";for(let n=0;n{n.onload=s=>r(s.target.result),n.onerror=()=>i(n.error),n.readAsText(new Blob([e]))})}else return new TextDecoder(t).decode(e)}const e2=64,t2="Abort error";async function Jh(e,t,n,r,i,s,o){const a=Math.max(s.chunkSize,e2);return l();async function l(u=0,c=0){const d=o.signal;if(uthis[n]=t[n])}}const al="File format is not recognized",r2="End of central directory not found",i2="End of Zip64 central directory not found",s2="End of Zip64 central directory locator not found",o2="Central directory header not found",a2="Local file header not found",l2="Zip64 extra field not found",c2="File contains encrypted entry",u2="Encryption method not supported",Ad="Compression method not supported",Sd="utf-8",Id="cp437",Cd=["uncompressedSize","compressedSize","offset"];class d2{constructor(t,n={}){Object.assign(this,{reader:t,options:n,config:xh()})}async getEntries(t={}){const n=this,r=n.reader;if(r.initialized||await r.init(),r.size=r.size)throw new Error(al);let c=0,d=await ar(r,a,o),f=It(d);if(o){const _=i.offset-o;if(ht(f,c)!=Xl&&a!=_){const g=a;a=_,u=a-g,d=await ar(r,a,o),f=It(d)}}if(a<0||a>=r.size)throw new Error(al);const h=[];for(let _=0;_g.getData(D,O,L),h.push(O),c=k,t.onprogress)try{t.onprogress(_+1,l,new Qo(g))}catch{}}return h}async close(){}}class f2{constructor(t,n,r){Object.assign(this,{reader:t,config:n,options:r})}async getData(t,n,r={}){const i=this,{reader:s,offset:o,extraFieldAES:a,compressionMethod:l,config:u,bitFlag:c,signature:d,rawLastModDate:f,compressedSize:h}=i,_=i.localDirectory={};s.initialized||await s.init();let g=await ar(s,o,30);const p=It(g);let m=ui(i,r,"password");if(m=m&&m.length&&m,a&&a.originalCompressionMethod!=Hh)throw new Error(Ad);if(l!=Vh&&l!=ql)throw new Error(Ad);if(ht(p,0)!=Gh)throw new Error(a2);Qh(_,p,4),g=await ar(s,o,30+_.filenameLength+_.extraFieldLength),_.rawExtraField=g.subarray(30+_.filenameLength),await e1(i,_,p,4),n.lastAccessDate=_.lastAccessDate,n.creationDate=_.creationDate;const v=i.encrypted&&_.encrypted,y=v&&!a;if(v){if(!y&&a.strength===void 0)throw new Error(u2);if(!m)throw new Error(c2)}const x=await Bh(u.Inflate,{codecType:$h,password:m,zipCrypto:y,encryptionStrength:a&&a.strength,signed:ui(i,r,"checkSignature"),passwordVerification:y&&(c.dataDescriptor?f>>>8&255:d>>>24&255),signature:d,compressed:l!=0,encrypted:v,useWebWorkers:ui(i,r,"useWebWorkers")},u);t.initialized||await t.init();const b=ui(i,r,"signal"),k=o+30+_.filenameLength+_.extraFieldLength;return await Jh(x,s,t,k,h,u,{onprogress:r.onprogress,signal:b}),t.getData()}}function Qh(e,t,n){const r=e.rawBitFlag=Yt(t,n+2),i=(r&Jl)==Jl,s=ht(t,n+6);Object.assign(e,{encrypted:i,version:Yt(t,n),bitFlag:{level:(r&X_)>>1,dataDescriptor:(r&Ql)==Ql,languageEncodingFlag:(r&ec)==ec},rawLastModDate:s,lastModDate:w2(s),filenameLength:Yt(t,n+22),extraFieldLength:Yt(t,n+24)})}async function e1(e,t,n,r){const i=t.rawExtraField,s=t.extraField=new Map,o=It(new Uint8Array(i));let a=0;try{for(;at[i]==kt);for(let i=0;i{if(t[i]==kt)if(e[i]!==void 0)t[i]=e[i];else throw new Error(l2)})}async function Td(e,t,n,r,i){const s=It(e.data);e.version=wi(s,0),e.signature=ht(s,1);const o=new ms;o.append(i[n]);const a=It(new Uint8Array(4));a.setUint32(0,o.get(),!0),e[t]=await nc(e.data.subarray(5)),e.valid=!i.bitFlag.languageEncodingFlag&&e.signature==ht(a,0),e.valid&&(r[t]=e[t],r[t+"UTF8"]=!0)}function p2(e,t,n){const r=It(e.data);e.vendorVersion=wi(r,0),e.vendorId=wi(r,2);const i=wi(r,4);e.strength=i,e.originalCompressionMethod=n,t.compressionMethod=e.compressionMethod=Yt(r,5)}function m2(e,t){const n=It(e.data);let r=4,i;try{for(;r{if(e.data.length>=o+4){const u=ht(n,o);t[a]=e[a]=new Date(u*1e3);const c=s[l];e[c]=u}o+=4})}async function _2(e,t,n,r,i){const s=new Uint8Array(4),o=It(s);v2(o,0,t);const a=r+i;return await l(r)||await l(Math.min(a,n));async function l(u){const c=n-u,d=await ar(e,c,u);for(let f=d.length-r;f>=0;f--)if(d[f]==s[0]&&d[f+1]==s[1]&&d[f+2]==s[2]&&d[f+3]==s[3])return{offset:c+f,buffer:d.slice(f,f+r).buffer}}}function ui(e,t,n){return t[n]===void 0?e.options[n]:t[n]}function w2(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 wi(e,t){return e.getUint8(t)}function Yt(e,t){return e.getUint16(t,!0)}function ht(e,t){return e.getUint32(t,!0)}function Ro(e,t){return Number(e.getBigUint64(t,!0))}function v2(e,t,n){e.setUint32(t,n,!0)}function It(e){return new DataView(e.buffer)}function ar(e,t,n){return e.readUint8Array(t,n)}const x2="File already exists",b2="Zip file comment exceeds 64KB",y2="File entry comment exceeds 64KB",k2="File entry name exceeds 64KB",Od="Version exceeds 65535",E2="The strength must equal 1, 2, or 3",A2="Extra field type exceeds 65535",S2="Extra field data exceeds 64KB",jc="Zip64 is not supported",Md=new Uint8Array([7,0,2,0,65,69,3,0,0]),Nd=24;let cl=0;class I2{constructor(t,n={}){Object.assign(this,{writer:t,options:n,config:xh(),files:new Map,offset:t.size,pendingCompressedSize:0,pendingEntries:[]})}async add(t="",n,r={}){const i=this;if(cli.pendingEntries.push({name:t,reader:n,options:r,resolve:s,reject:o}))}async close(t=new Uint8Array(0),n={}){return await M2(this,t,n),this.writer.getData()}}async function C2(e,t,n,r){if(t=t.trim(),r.directory&&!t.endsWith(No)?t+=No:r.directory=t.endsWith(No),e.files.has(t))throw new Error(x2);const i=Yl(t);if(i.length>hn)throw new Error(k2);const s=r.comment||"",o=Yl(s);if(o.length>hn)throw new Error(y2);const a=e.options.version||r.version||0;if(a>hn)throw new Error(Od);const l=e.options.versionMadeBy||r.versionMadeBy||20;if(l>hn)throw new Error(Od);const u=bt(e,r,"lastModDate")||new Date,c=bt(e,r,"lastAccessDate"),d=bt(e,r,"creationDate"),f=bt(e,r,"password"),h=bt(e,r,"encryptionStrength")||3,_=bt(e,r,"zipCrypto");if(f!==void 0&&h!==void 0&&(h<1||h>3))throw new Error(E2);let g=new Uint8Array(0);const p=r.extraField;if(p){let M=0,$=0;p.forEach(V=>M+=4+V.length),g=new Uint8Array(M),p.forEach((V,Q)=>{if(Q>hn)throw new Error(A2);if(V.length>hn)throw new Error(S2);gt(g,new Uint16Array([Q]),$),gt(g,new Uint16Array([V.length]),$+2),gt(g,V,$+4),$+=4+V.length})}let m=bt(e,r,"extendedTimestamp");m===void 0&&(m=!0);let v=0,y=bt(e,r,"keepOrder");y===void 0&&(y=!0);let x=0,b=bt(e,r,"msDosCompatible");b===void 0&&(b=!0);const k=bt(e,r,"internalFileAttribute")||0,E=bt(e,r,"externalFileAttribute")||0;n&&(n.initialized||await n.init(),x=n.size,v=R2(x));let S=r.zip64||e.options.zip64||!1;if(e.offset+e.pendingCompressedSize>=kt||x>=kt||v>=kt){if(r.zip64===!1||e.options.zip64===!1||!y)throw new Error(jc);S=!0}e.pendingCompressedSize+=v,await Promise.resolve();const C=bt(e,r,"level"),A=bt(e,r,"useWebWorkers"),O=bt(e,r,"bufferedWrite");let D=bt(e,r,"dataDescriptor"),L=bt(e,r,"dataDescriptorSignature");const W=bt(e,r,"signal");D===void 0&&(D=!0),D&&L===void 0&&(L=!0);const U=await T2(e,t,n,Object.assign({},r,{rawFilename:i,rawComment:o,version:a,versionMadeBy:l,lastModDate:u,lastAccessDate:c,creationDate:d,rawExtraField:g,zip64:S,password:f,level:C,useWebWorkers:A,encryptionStrength:h,extendedTimestamp:m,zipCrypto:_,bufferedWrite:O,keepOrder:y,dataDescriptor:D,dataDescriptorSignature:L,signal:W,msDosCompatible:b,internalFileAttribute:k,externalFileAttribute:E}));return v&&(e.pendingCompressedSize-=v),Object.assign(U,{name:t,comment:s,extraField:p}),new Qo(U)}async function T2(e,t,n,r){const i=e.files,s=e.writer,o=Array.from(i.values()).pop();let a={},l,u,c;i.set(t,a);try{let d,f,h;if(r.keepOrder&&(d=o&&o.lock),a.lock=h=new Promise(_=>c=_),r.bufferedWrite||e.lockWrite||!r.dataDescriptor?(f=new H_,f.init(),l=!0):(e.lockWrite=new Promise(_=>u=_),s.initialized||await s.init(),f=s),a=await O2(n,f,e.config,r),a.lock=h,i.set(t,a),a.filename=t,l){let _=0;const g=f.getData();await Promise.all([e.lockWrite,d]);let p;do p=Array.from(i.values()).find(m=>m.writingBufferedData),p&&await p.lock;while(p&&p.lock);if(a.writingBufferedData=!0,!r.dataDescriptor){const v=await t1(g,0,26),y=new DataView(v);(!a.encrypted||r.zipCrypto)&&De(y,14,a.signature),a.zip64?(De(y,18,kt),De(y,22,kt)):(De(y,18,a.compressedSize),De(y,22,a.uncompressedSize)),await s.writeUint8Array(new Uint8Array(v)),_=26}await N2(s,g,_),delete a.writingBufferedData}if(a.offset=e.offset,a.zip64){const _=dn(a.rawExtraFieldZip64);Pt(_,20,BigInt(a.offset))}else if(a.offset>=kt)throw new Error(jc);return e.offset+=a.length,a}catch(d){throw(l&&a.writingBufferedData||!l&&a.dataWritten)&&(d.corruptedEntry=e.hasCorruptedEntries=!0,a.uncompressedSize&&(e.offset+=a.uncompressedSize)),i.delete(t),d}finally{c(),u&&u()}}async function O2(e,t,n,r){const{rawFilename:i,lastAccessDate:s,creationDate:o,password:a,level:l,zip64:u,zipCrypto:c,dataDescriptor:d,dataDescriptorSignature:f,directory:h,version:_,versionMadeBy:g,rawComment:p,rawExtraField:m,useWebWorkers:v,onprogress:y,signal:x,encryptionStrength:b,extendedTimestamp:k,msDosCompatible:E,internalFileAttribute:S,externalFileAttribute:C}=r,A=Boolean(a&&a.length),O=l!==0&&!h;let D;if(A&&!c){D=new Uint8Array(Md.length+2);const Ce=dn(D);Xe(Ce,0,qh),gt(D,Md,2),ea(Ce,8,b)}else D=new Uint8Array(0);let L,W;if(k){W=new Uint8Array(9+(s?4:0)+(o?4:0));const Ce=dn(W);Xe(Ce,0,Bc),Xe(Ce,2,W.length-4);const je=1+(s?2:0)+(o?4:0);ea(Ce,4,je),De(Ce,5,Math.floor(r.lastModDate.getTime()/1e3)),s&&De(Ce,9,Math.floor(s.getTime()/1e3)),o&&De(Ce,13,Math.floor(o.getTime()/1e3));try{L=new Uint8Array(36);const ze=dn(L),ae=ul(r.lastModDate);Xe(ze,0,Xh),Xe(ze,2,32),Xe(ze,8,Kh),Xe(ze,10,24),Pt(ze,12,ae),Pt(ze,20,ul(s)||ae),Pt(ze,28,ul(o)||ae)}catch{L=new Uint8Array(0)}}else L=W=new Uint8Array(0);const U={version:_||K_,versionMadeBy:g,zip64:u,directory:Boolean(h),filenameUTF8:!0,rawFilename:i,commentUTF8:!0,rawComment:p,rawExtraFieldZip64:u?new Uint8Array(Nd+4):new Uint8Array(0),rawExtraFieldExtendedTimestamp:W,rawExtraFieldNTFS:L,rawExtraFieldAES:D,rawExtraField:m,extendedTimestamp:k,msDosCompatible:E,internalFileAttribute:S,externalFileAttribute:C};let M=U.uncompressedSize=0,$=ec;d&&($=$|Ql);let V=Vh;O&&(V=ql),u&&(U.version=U.version>xd?U.version:xd),A&&($=$|Jl,c||(U.version=U.version>bd?U.version:bd,V=Hh,O&&(U.rawExtraFieldAES[9]=ql))),U.compressionMethod=V;const Q=U.headerArray=new Uint8Array(26),R=dn(Q);Xe(R,0,U.version),Xe(R,2,$),Xe(R,4,V);const I=new Uint32Array(1),N=dn(I);let B;r.lastModDateyd?B=yd:B=r.lastModDate,Xe(N,0,(B.getHours()<<6|B.getMinutes())<<5|B.getSeconds()/2),Xe(N,2,(B.getFullYear()-1980<<4|B.getMonth()+1)<<5|B.getDate());const q=I[0];De(R,6,q),Xe(R,22,i.length);const ie=D.length+W.length+L.length+U.rawExtraField.length;Xe(R,24,ie);const j=new Uint8Array(30+i.length+ie),J=dn(j);De(J,0,Gh),gt(j,Q,4),gt(j,i,30),gt(j,D,30+i.length),gt(j,W,30+i.length+D.length),gt(j,L,30+i.length+D.length+W.length),gt(j,U.rawExtraField,30+i.length+D.length+W.length+L.length);let ge,we=0;if(e){M=U.uncompressedSize=e.size;const Ce=await Bh(n.Deflate,{codecType:Ph,level:l,password:a,encryptionStrength:b,zipCrypto:A&&c,passwordVerification:A&&c&&q>>8&255,signed:!0,compressed:O,encrypted:A,useWebWorkers:v},n);await t.writeUint8Array(j),U.dataWritten=!0,ge=await Jh(Ce,e,t,0,M,n,{onprogress:y,signal:x}),we=ge.length}else await t.writeUint8Array(j),U.dataWritten=!0;let We=new Uint8Array(0),He,Ke=0;if(d&&(We=new Uint8Array(u?f?24:20:f?16:12),He=dn(We),f&&(Ke=4,De(He,0,G_))),e){const Ce=ge.signature;if((!A||c)&&Ce!==void 0&&(De(R,10,Ce),U.signature=Ce,d&&De(He,Ke,Ce)),u){const je=dn(U.rawExtraFieldZip64);Xe(je,0,Wh),Xe(je,2,Nd),De(R,14,kt),Pt(je,12,BigInt(we)),De(R,18,kt),Pt(je,4,BigInt(M)),d&&(Pt(He,Ke+4,BigInt(we)),Pt(He,Ke+12,BigInt(M)))}else De(R,14,we),De(R,18,M),d&&(De(He,Ke+4,we),De(He,Ke+8,M))}d&&await t.writeUint8Array(We);const vt=j.length+we+We.length;return Object.assign(U,{compressedSize:we,lastModDate:B,rawLastModDate:q,creationDate:o,lastAccessDate:s,encrypted:A,length:vt}),U}async function M2(e,t,n){const r=e.writer,i=e.files;let s=0,o=0,a=e.offset,l=i.size;for(const[,f]of i)o+=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>=kt||o>=kt||l>=hn){if(n.zip64===!1||e.options.zip64===!1)throw new Error(jc);u=!0}const c=new Uint8Array(o+(u?Z_:Jo)),d=dn(c);if(t&&t.length)if(t.length<=hn)Xe(d,s+20,t.length);else throw new Error(b2);for(const[f,h]of Array.from(i.values()).entries()){const{rawFilename:_,rawExtraFieldZip64:g,rawExtraFieldAES:p,rawExtraField:m,rawComment:v,versionMadeBy:y,headerArray:x,directory:b,zip64:k,msDosCompatible:E,internalFileAttribute:S,externalFileAttribute:C}=h;let A,O;if(h.extendedTimestamp){O=h.rawExtraFieldNTFS,A=new Uint8Array(9);const L=dn(A);Xe(L,0,Bc),Xe(L,2,A.length-4),ea(L,4,1),De(L,5,Math.floor(h.lastModDate.getTime()/1e3))}else O=A=new Uint8Array(0);const D=g.length+p.length+A.length+O.length+m.length;if(De(d,s,Xl),Xe(d,s+4,y),gt(c,x,s+6),Xe(d,s+30,D),Xe(d,s+32,v.length),De(d,s+34,S),C?De(d,s+38,C):b&&E&&ea(d,s+38,tc),k?De(d,s+42,kt):De(d,s+42,h.offset),gt(c,_,s+46),gt(c,g,s+46+_.length),gt(c,p,s+46+_.length+g.length),gt(c,A,s+46+_.length+g.length+p.length),gt(c,O,s+46+_.length+g.length+p.length+A.length),gt(c,m,s+46+_.length+g.length+p.length+A.length+O.length),gt(c,v,s+46+_.length+D),s+=46+_.length+D+v.length,n.onprogress)try{n.onprogress(f+1,i.size,new Qo(h))}catch{}}u&&(De(d,s,Kl),Pt(d,s+4,BigInt(44)),Xe(d,s+12,45),Xe(d,s+14,45),Pt(d,s+24,BigInt(l)),Pt(d,s+32,BigInt(l)),Pt(d,s+40,BigInt(o)),Pt(d,s+48,BigInt(a)),De(d,s+56,Yh),Pt(d,s+64,BigInt(a)+BigInt(o)),De(d,s+72,Y_),l=hn,a=kt,o=kt,s+=76),De(d,s,Zh),Xe(d,s+8,l),Xe(d,s+10,l),De(d,s+12,o),De(d,s+16,a),await r.writeUint8Array(c),t&&t.length&&await r.writeUint8Array(t)}function t1(e,t,n){if(e.arrayBuffer)return t||n?e.slice(t,n).arrayBuffer():e.arrayBuffer();{const r=new FileReader;return new Promise((i,s)=>{r.onload=o=>i(o.target.result),r.onerror=()=>s(r.error),r.readAsArrayBuffer(t||n?e.slice(t,n):e)})}}async function N2(e,t,n=0){await i();async function i(){if(n0&&`\0\r \x85\u2028\u2029`.indexOf(this.buffer.charAt(i-1))===-1;)if(i-=1,this.position-i>n/2-1){r=" ... ",i+=5;break}for(s="",o=this.position;on/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(i,o),Rd.repeat(" ",t)+r+a+s+` `+Rd.repeat(" ",t+this.position-i+r.length)+"^"};zc.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 B2=zc,Ld=js,j2=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],z2=["scalar","sequence","mapping"];function U2(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function V2(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(j2.indexOf(n)===-1)throw new Ld('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=U2(t.styleAliases||null),z2.indexOf(this.kind)===-1)throw new Ld('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var wt=V2,Dd=sn,Lo=js,H2=wt;function rc(e,t,n){var r=[];return e.include.forEach(function(i){n=rc(i,t,n)}),e[t].forEach(function(i){n.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&r.push(o)}),n.push(i)}),n.filter(function(i,s){return r.indexOf(s)===-1})}function G2(){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=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"]}}),i1=sn,ww=wt,vw=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 xw(e){return!(e===null||!vw.test(e)||e[e.length-1]==="_")}function bw(e){var t,n,r,i;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,i=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(s){i.unshift(parseFloat(s,10))}),t=0,r=1,i.forEach(function(s){t+=s*r,r*=60}),n*t):n*parseFloat(t,10)}var yw=/^[-+]?[0-9]+e/;function kw(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(i1.isNegativeZero(e))return"-0.0";return n=e.toString(10),yw.test(n)?n.replace("e",".e"):n}function Ew(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||i1.isNegativeZero(e))}var Aw=new ww("tag:yaml.org,2002:float",{kind:"scalar",resolve:xw,construct:bw,predicate:Ew,represent:kw,defaultStyle:"lowercase"}),Sw=Pi,s1=new Sw({include:[Uc],implicit:[rw,lw,_w,Aw]}),Iw=Pi,o1=new Iw({include:[s1]}),Cw=wt,a1=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),l1=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 Tw(e){return e===null?!1:a1.exec(e)!==null||l1.exec(e)!==null}function Ow(e){var t,n,r,i,s,o,a,l=0,u=null,c,d,f;if(t=a1.exec(e),t===null&&(t=l1.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(s=+t[4],o=+t[5],a=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],d=+(t[11]||0),u=(c*60+d)*6e4,t[9]==="-"&&(u=-u)),f=new Date(Date.UTC(n,r,i,s,o,a,l)),u&&f.setTime(f.getTime()-u),f}function Mw(e){return e.toISOString()}var Nw=new Cw("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Tw,construct:Ow,instanceOf:Date,represent:Mw}),Rw=wt;function Lw(e){return e==="<<"||e===null}var Dw=new Rw("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Lw}),Sr;try{var Fw=sh;Sr=Fw("buffer").Buffer}catch{}var Pw=wt,Vc=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`;function $w(e){if(e===null)return!1;var t,n,r=0,i=e.length,s=Vc;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8===0}function Bw(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,s=Vc,o=0,a=[];for(t=0;t>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(r.charAt(t));return n=i%4*6,n===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):n===18?(a.push(o>>10&255),a.push(o>>2&255)):n===12&&a.push(o>>4&255),Sr?Sr.from?Sr.from(a):new Sr(a):a}function jw(e){var t="",n=0,r,i,s=e.length,o=Vc;for(r=0;r>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]),n=(n<<8)+e[r];return i=s%3,i===0?(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]):i===2?(t+=o[n>>10&63],t+=o[n>>4&63],t+=o[n<<2&63],t+=o[64]):i===1&&(t+=o[n>>2&63],t+=o[n<<4&63],t+=o[64],t+=o[64]),t}function zw(e){return Sr&&Sr.isBuffer(e)}var Uw=new Pw("tag:yaml.org,2002:binary",{kind:"scalar",resolve:$w,construct:Bw,predicate:zw,represent:jw}),Vw=wt,Hw=Object.prototype.hasOwnProperty,Gw=Object.prototype.toString;function Zw(e){if(e===null)return!0;var t=[],n,r,i,s,o,a=e;for(n=0,r=a.length;n3||t[t.length-r.length-1]!=="/"))}function p5(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 m5(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function g5(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var _5=new f5("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:h5,construct:p5,predicate:g5,represent:m5}),ta;try{var w5=sh;ta=w5("esprima")}catch{typeof window!="undefined"&&(ta=window.esprima)}var v5=wt;function x5(e){if(e===null)return!1;try{var t="("+e+")",n=ta.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 b5(e){var t="("+e+")",n=ta.parse(t,{range:!0}),r=[],i;if(n.type!=="Program"||n.body.length!==1||n.body[0].type!=="ExpressionStatement"||n.body[0].expression.type!=="ArrowFunctionExpression"&&n.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return n.body[0].expression.params.forEach(function(s){r.push(s.name)}),i=n.body[0].expression.body.range,n.body[0].expression.body.type==="BlockStatement"?new Function(r,t.slice(i[0]+1,i[1]-1)):new Function(r,"return "+t.slice(i[0],i[1]))}function y5(e){return e.toString()}function k5(e){return Object.prototype.toString.call(e)==="[object Function]"}var E5=new v5("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:x5,construct:b5,predicate:k5,represent:y5}),Fd=Pi,Ta=Fd.DEFAULT=new Fd({include:[zs],explicit:[d5,_5,E5]}),zn=sn,c1=js,A5=B2,u1=zs,S5=Ta,gr=Object.prototype.hasOwnProperty,na=1,d1=2,f1=3,ra=4,dl=1,I5=2,Pd=3,C5=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,T5=/[\x85\u2028\u2029]/,O5=/[,\[\]\{\}]/,h1=/^(?:!|!!|![a-z\-]+!)$/i,p1=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function $d(e){return Object.prototype.toString.call(e)}function Tn(e){return e===10||e===13}function Or(e){return e===9||e===32}function Bt(e){return e===9||e===32||e===10||e===13}function fi(e){return e===44||e===91||e===93||e===123||e===125}function M5(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function N5(e){return e===120?2:e===117?4:e===85?8:0}function R5(e){return 48<=e&&e<=57?e-48:-1}function Bd(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 L5(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var m1=new Array(256),g1=new Array(256);for(var ti=0;ti<256;ti++)m1[ti]=Bd(ti)?1:0,g1[ti]=Bd(ti);function D5(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||S5,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 _1(e,t){return new c1(t,new A5(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function de(e,t){throw _1(e,t)}function ia(e,t){e.onWarning&&e.onWarning.call(null,_1(e,t))}var jd={YAML:function(t,n,r){var i,s,o;t.version!==null&&de(t,"duplication of %YAML directive"),r.length!==1&&de(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&de(t,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),o=parseInt(i[2],10),s!==1&&de(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&ia(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,s;r.length!==2&&de(t,"TAG directive accepts exactly two arguments"),i=r[0],s=r[1],h1.test(i)||de(t,"ill-formed tag handle (first argument) of the TAG directive"),gr.call(t.tagMap,i)&&de(t,'there is a previously declared suffix for "'+i+'" tag handle'),p1.test(s)||de(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=s}};function fr(e,t,n,r){var i,s,o,a;if(t1&&(e.result+=zn.repeat(` `,t-1))}function F5(e,t,n){var r,i,s,o,a,l,u,c,d=e.kind,f=e.result,h;if(h=e.input.charCodeAt(e.position),Bt(h)||fi(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(i=e.input.charCodeAt(e.position+1),Bt(i)||n&&fi(i)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,a=!1;h!==0;){if(h===58){if(i=e.input.charCodeAt(e.position+1),Bt(i)||n&&fi(i))break}else if(h===35){if(r=e.input.charCodeAt(e.position-1),Bt(r))break}else{if(e.position===e.lineStart&&Oa(e)||n&&fi(h))break;if(Tn(h))if(l=e.line,u=e.lineStart,c=e.lineIndent,ct(e,!1,-1),e.lineIndent>=t){a=!0,h=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=u,e.lineIndent=c;break}}a&&(fr(e,s,o,!1),Gc(e,e.line-l),s=o=e.position,a=!1),Or(h)||(o=e.position+1),h=e.input.charCodeAt(++e.position)}return fr(e,s,o,!1),e.result?!0:(e.kind=d,e.result=f,!1)}function P5(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(fr(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 Tn(n)?(fr(e,r,i,!0),Gc(e,ct(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Oa(e)?de(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);de(e,"unexpected end of the stream within a single quoted scalar")}function $5(e,t){var n,r,i,s,o,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return fr(e,n,e.position,!0),e.position++,!0;if(a===92){if(fr(e,n,e.position,!0),a=e.input.charCodeAt(++e.position),Tn(a))ct(e,!1,t);else if(a<256&&m1[a])e.result+=g1[a],e.position++;else if((o=N5(a))>0){for(i=o,s=0;i>0;i--)a=e.input.charCodeAt(++e.position),(o=M5(a))>=0?s=(s<<4)+o:de(e,"expected hexadecimal character");e.result+=L5(s),e.position++}else de(e,"unknown escape sequence");n=r=e.position}else Tn(a)?(fr(e,n,r,!0),Gc(e,ct(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Oa(e)?de(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}de(e,"unexpected end of the stream within a double quoted scalar")}function B5(e,t){var n=!0,r,i=e.tag,s,o=e.anchor,a,l,u,c,d,f={},h,_,g,p;if(p=e.input.charCodeAt(e.position),p===91)l=93,d=!1,s=[];else if(p===123)l=125,d=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),p=e.input.charCodeAt(++e.position);p!==0;){if(ct(e,!0,t),p=e.input.charCodeAt(e.position),p===l)return e.position++,e.tag=i,e.anchor=o,e.kind=d?"mapping":"sequence",e.result=s,!0;n||de(e,"missed comma between flow collection entries"),_=h=g=null,u=c=!1,p===63&&(a=e.input.charCodeAt(e.position+1),Bt(a)&&(u=c=!0,e.position++,ct(e,!0,t))),r=e.line,Oi(e,t,na,!1,!0),_=e.tag,h=e.result,ct(e,!0,t),p=e.input.charCodeAt(e.position),(c||e.line===r)&&p===58&&(u=!0,p=e.input.charCodeAt(++e.position),ct(e,!0,t),Oi(e,t,na,!1,!0),g=e.result),d?hi(e,s,f,_,h,g):u?s.push(hi(e,null,f,_,h,g)):s.push(h),ct(e,!0,t),p=e.input.charCodeAt(e.position),p===44?(n=!0,p=e.input.charCodeAt(++e.position)):n=!1}de(e,"unexpected end of the stream within a flow collection")}function j5(e,t){var n,r,i=dl,s=!1,o=!1,a=t,l=0,u=!1,c,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?Pd:I5:de(e,"repeat of a chomping mode identifier");else if((c=R5(d))>=0)c===0?de(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?de(e,"repeat of an indentation width identifier"):(a=t+c-1,o=!0);else break;if(Or(d)){do d=e.input.charCodeAt(++e.position);while(Or(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!Tn(d)&&d!==0)}for(;d!==0;){for(Hc(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!o||e.lineIndenta&&(a=e.lineIndent),Tn(d)){l++;continue}if(e.lineIndentt)&&l!==0)de(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(Oi(e,t,ra,!0,i)&&(_?f=e.result:h=e.result),_||(hi(e,u,c,d,f,h,s,o),d=f=h=null),ct(e,!0,-1),p=e.input.charCodeAt(e.position)),e.lineIndent>t&&p!==0)de(e,"bad indentation of a mapping entry");else if(e.lineIndentt?l=1:e.lineIndent===t?l=0:e.lineIndentt?l=1:e.lineIndent===t?l=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),d=0,f=e.implicitTypes.length;d 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)):de(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):de(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}function G5(e){var t=e.position,n,r,i,s=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(o=e.input.charCodeAt(e.position))!==0&&(ct(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(s=!0,o=e.input.charCodeAt(++e.position),n=e.position;o!==0&&!Bt(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&de(e,"directive name must not be less than one character in length");o!==0;){for(;Or(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!Tn(o));break}if(Tn(o))break;for(n=e.position;o!==0&&!Bt(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}o!==0&&Hc(e),gr.call(jd,r)?jd[r](e,r,i):ia(e,'unknown document directive "'+r+'"')}if(ct(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,ct(e,!0,-1)):s&&de(e,"directives end mark is expected"),Oi(e,e.lineIndent-1,ra,!1,!0),ct(e,!0,-1),e.checkLineBreaks&&T5.test(e.input.slice(t,e.position))&&ia(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Oa(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,ct(e,!0,-1));return}if(e.position0?e.charCodeAt(s-1):null,f=f&&Gd(o,a)}else{for(s=0;sr&&e[d+1]!==" ",d=s);else if(!Mi(o))return Do;a=s>0?e.charCodeAt(s-1):null,f=f&&Gd(o,a)}u=u||c&&s-d-1>r&&e[d+1]!==" "}return!l&&!u?f&&!i(e)?M1:N1:n>9&&O1(e)?Do:u?L1:R1}function vv(e,t,n,r){e.dump=function(){if(t.length===0)return"''";if(!e.noCompatMode&&fv.indexOf(t)!==-1)return"'"+t+"'";var i=e.indent*Math.max(1,n),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),o=r||e.flowLevel>-1&&n>=e.flowLevel;function a(l){return mv(e,l)}switch(wv(t,o,e.indent,s,a)){case M1:return t;case N1:return"'"+t.replace(/'/g,"''")+"'";case R1:return"|"+Zd(t,e.indent)+Yd(Hd(t,i));case L1:return">"+Zd(t,e.indent)+Yd(Hd(xv(t,s),i));case Do:return'"'+bv(t)+'"';default:throw new Vs("impossible error: invalid scalar style")}}()}function Zd(e,t){var n=O1(e)?String(t):"",r=e[e.length-1]===` `,i=r&&(e[e.length-2]===` `||e===` `),s=i?"+":r?"":"-";return n+s+` `}function Yd(e){return e[e.length-1]===` `?e.slice(0,-1):e}function xv(e,t){for(var n=/(\n+)([^\n]*)/g,r=function(){var u=e.indexOf(` `);return u=u!==-1?u:e.length,n.lastIndex=u,Wd(e.slice(0,u),t)}(),i=e[0]===` `||e[0]===" ",s,o;o=n.exec(e);){var a=o[1],l=o[2];s=l[0]===" ",r+=a+(!i&&!s&&l!==""?` `:"")+Wd(l,t),i=s}return r}function Wd(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,s,o=0,a=0,l="";r=n.exec(e);)a=r.index,a-i>t&&(s=o>i?o:a,l+=` `+e.slice(i,s),i=s+1),o=a;return l+=` `,e.length-i>t&&o>i?l+=e.slice(i,o)+` `+e.slice(o+1):l+=e.slice(i),l.slice(1)}function bv(e){for(var t="",n,r,i,s=0;s=55296&&n<=56319&&(r=e.charCodeAt(s+1),r>=56320&&r<=57343)){t+=Vd((n-55296)*1024+r-56320+65536),s++;continue}i=Tt[n],t+=!i&&Mi(n)?e[s]:i||Vd(n)}return t}function yv(e,t,n){var r="",i=e.tag,s,o;for(s=0,o=n.length;s1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Dr(e,t,u,!1,!1)&&(c+=e.dump,r+=c));e.tag=i,e.dump="{"+r+"}"}function Av(e,t,n,r){var i="",s=e.tag,o=Object.keys(n),a,l,u,c,d,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new Vs("sortKeys must be a boolean or a function");for(a=0,l=o.length;a1024,d&&(e.dump&&ws===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,d&&(f+=ic(e,t)),Dr(e,t+1,c,!0,d)&&(e.dump&&ws===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,i+=f));e.tag=s,e.dump=i||"{}"}function qd(e,t,n){var r,i,s,o,a,l;for(i=n?e.explicitTypes:e.implicitTypes,s=0,o=i.length;s tag resolver accepts not "'+l+'" style');e.dump=r}return!0}return!1}function Dr(e,t,n,r,i,s){e.tag=null,e.dump=n,qd(e,n,!1)||qd(e,n,!0);var o=b1.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var a=o==="[object Object]"||o==="[object Array]",l,u;if(a&&(l=e.duplicates.indexOf(n),u=l!==-1),(e.tag!==null&&e.tag!=="?"||u||e.indent!==2&&t>0)&&(i=!1),u&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(a&&u&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),o==="[object Object]")r&&Object.keys(e.dump).length!==0?(Av(e,t,e.dump,i),u&&(e.dump="&ref_"+l+e.dump)):(Ev(e,t,e.dump),u&&(e.dump="&ref_"+l+" "+e.dump));else if(o==="[object Array]"){var c=e.noArrayIndent&&t>0?t-1:t;r&&e.dump.length!==0?(kv(e,c,e.dump,i),u&&(e.dump="&ref_"+l+e.dump)):(yv(e,c,e.dump),u&&(e.dump="&ref_"+l+" "+e.dump))}else if(o==="[object String]")e.tag!=="?"&&vv(e,e.dump,t,s);else{if(e.skipInvalid)return!1;throw new Vs("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function Sv(e,t){var n=[],r=[],i,s;for(sc(e,n,r),i=0,s=r.length;i{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 $1(e){let t=0;for(let n=0;n=0&&(e=e.slice(0,t)),On(e)}function B1(e){const t=Rv(e).replace(/^\//,"").replace(/\/$/,"");return ke.generators.find(n=>n.url===t)}function j1({path:e,search:t,hash:n,replace:r}){const i=(e!==void 0?On(e):location.pathname)+(t!==void 0?t.startsWith("?")||t.length===0?t:"?"+t:location.search)+(n!==void 0?n.startsWith("#")?n:"#"+n:location.hash);Gr(i,r)}function Lv(e){const t=oc.load(e.substring(3,e.indexOf("---",3)));return vr(t)?t:{}}function Dv(e,t){var r;let n=0;for(;;){const i=e.indexOf("{#",n);if(i<0)break;const s=Fv(e,i+2),o=e.indexOf("#[",i+1);let a="";if(o>=0&&oc.id===t);a=(r={version:u==null?void 0:u.id,pack_format:u==null?void 0:u.pack_format.toString()}[l])!=null?r:""}e=e.substring(0,i)+a+e.substring(s+2),n=i}return e}function Fv(e,t){let n=0,r=0;for(;r++<1e3;){const i=e.indexOf("#}",t),s=e.indexOf("{#",t);if(i<0)return console.warn("Missing closing bracket"),e.length;if(s<0){if(n===0)return i;n-=1,t=i+2}else if(s>8)%256,(t>>16)%256]}function Pv(e){if(!Array.isArray(e)||e.length!==3)return"#000000";const[t,n,r]=e;return"#"+Fo(t)+Fo(n)+Fo(r)}function $v(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 Wi(e){return e*e}function Gt(e,t,n){return Math.max(e,Math.min(t,n))}function fl(e,t,n){return n<0?e:n>1?t:Po(n,e,t)}function Po(e,t,n){return t+e*(n-t)}function Bv(e,t,n,r,i,s){return Po(t,Po(e,n,r),Po(e,i,s))}function qt(e){return e instanceof Error?e.message:`${e}`}const Ra=Tv();function Fr(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!i.directory).map(async i=>{var o;const s=new U_("utf-8");return[i.filename,await((o=i.getData)==null?void 0:o.call(i,s))]}))}async function Uv(e){const t=new I2(new V_("application/zip"));return await Promise.all(e.map(async([n,r])=>{await t.add(n,new z_(r))})),await t.close()}function $o({icon:e,label:t,large:n,larger:r,doSelect:i,value:s,placeholder:o,dataList:a,onChange:l}){const u=l===void 0?()=>{}:f=>{const h=f.target.value;l==null||l(h)},c=Oe(null);he(()=>{i&&c.current&&c.current.select()},[i]);const d=a&&Mr();return F("div",{class:`btn btn-input ${n?"large-input":""} ${r?"larger-input":""}`,onClick:f=>f.stopPropagation(),children:[e&&me[e],t&&w("span",{children:t}),w("input",{ref:c,type:"text",value:s,onChange:u,placeholder:o,list:d}),a&&w("datalist",{id:d,children:a.map(f=>w("option",{value:f}))})]})}function hl({link:e,icon:t,label:n,tooltip:r,tooltipLoc:i,swapped:s}){return w("a",Ae(ce({},e?{href:e}:{disabled:!0}),{class:`btn btn-link${r?` tooltipped tip-${i!=null?i:"sw"}`:""}`,"aria-label":r,children:s?F(be,{children:[n&&w("span",{children:n}),t&&me[t]]}):F(be,{children:[t&&me[t],n&&w("span",{children:n})]})}))}function ac({cooldown:e,invert:t,initial:n}={}){const[r,i]=K(n),s=Oe(void 0);return[r,()=>{i(!t),s.current!==void 0&&clearTimeout(s.current),s.current=setTimeout(()=>{i(!!t)},e!=null?e:2e3)}]}function Hs(e,t=[],n={loading:!0}){const[r,i]=Vv(e,t,n);return he(()=>{i()},[i]),Ae(ce({},r),{refresh:i})}const Bo=Symbol("async-cancel");function Vv(e,t=[],n={loading:!1}){const[r,i]=K(n),s=Oe(!1),o=Oe(0);he(()=>(s.current=!0,()=>s.current=!1),[]);const a=Le((...l)=>{const u=++o.current;return r.loading||i(c=>Ae(ce({},c),{loading:!0})),e(...l).then(c=>(s.current&&u===o.current&&c!==Bo&&i({value:c,loading:!1}),c),c=>{s.current&&u===o.current&&i({error:c,loading:!1})})},t);return[r,a]}function Gs({size:e,draw:t,onDrag:n,onHover:r,onLeave:i},s){const o=Oe(null),a=Oe(),l=Oe(),u=Oe([0,0]),c=Oe(!1);he(()=>{if(!o.current)return;const h=m=>{a.current=[m.offsetX,m.offsetY]},_=m=>{if(a.current===void 0){if(!o.current)return;const x=m.offsetX/o.current.clientWidth,b=m.offsetY/o.current.clientHeight;r==null||r(x,b);return}if(!n)return;const v=m.offsetX-a.current[0],y=m.offsetY-a.current[1];v===0&&y===0||(u.current=[u.current[0]+v,u.current[1]+y],c.current||(l.current&&cancelAnimationFrame(l.current),l.current=requestAnimationFrame(async()=>{if(!o.current)return;c.current=!0;const x=u.current[0]/o.current.clientWidth,b=u.current[1]/o.current.clientHeight;u.current=[0,0],await(n==null?void 0:n(x,b)),c.current=!1}))),a.current=[m.offsetX,m.offsetY]},g=()=>{a.current=void 0},p=()=>{i==null||i()};return o.current.addEventListener("mousedown",h),o.current.addEventListener("mousemove",_),o.current.addEventListener("mouseleave",p),document.body.addEventListener("mouseup",g),()=>{var m,v,y;(m=o.current)==null||m.removeEventListener("mousedown",h),(v=o.current)==null||v.removeEventListener("mousemove",_),(y=o.current)==null||y.removeEventListener("mouseleave",p),document.body.removeEventListener("mouseup",g)}},[...s!=null?s:[],o.current]);const d=Oe(),f=Oe(0);return d.current=async()=>{if(!o.current)return;const h=o.current.getContext("2d"),_=e();o.current.width=_[0],o.current.height=_[1];const g=h.getImageData(0,0,_[0],_[1]),p=f.current+=1;try{await t(g)}catch(m){throw m}p===f.current&&h.putImageData(g,0,0)},{canvas:o,redraw:d.current}}const lc="misode-lose-focus";function La(){const[e,t]=K(!1),n=()=>{t(!1)};return he(()=>(e&&(document.body.addEventListener("click",n),document.body.addEventListener("contextmenu",n),document.body.addEventListener(lc,n)),()=>{document.body.removeEventListener("click",n),document.body.removeEventListener("contextmenu",n),document.body.removeEventListener(lc,n)}),[e]),[e,(r=!0)=>t(r)]}function Hv(){const[e,t]=K(window.location.hash),n=Le(()=>{t(window.location.hash)},[]);he(()=>(window.addEventListener("hashchange",n),window.addEventListener("replacestate",n),()=>{window.removeEventListener("hashchange",n),window.removeEventListener("replacestate",n)}),[]);const r=Le(i=>{i!==e&&j1({hash:i})},[e]);return[e,r]}function Gv(e,t,n,r){const i=Le(()=>{const l=localStorage.getItem(e);return l===null?t:n===void 0?l:n(l)},[]),[s,o]=K(i()),a=Le(l=>{l==null?(localStorage.removeItem(e),o(t)):r!==void 0?(localStorage.setItem(e,r(l)),o(l)):(localStorage.setItem(e,l),o(l))},[]);return[s,a]}function Xd(e){const[t,n]=K(matchMedia(e).matches),r=i=>{n(i.matches)};return he(()=>{const i=matchMedia(e);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[e]),t}function Da(e,t,n){const r={invalidated(){e&&t(e)}};he(()=>(e==null||e.addListener(r),()=>{e==null||e.removeListener(r)}),[e,...n!=null?n:[]])}const Kd=(e,t)=>{var n;return(n=new URLSearchParams(e).get(t))!=null?n:void 0};function Pr(e){const t=window.location,[n,r]=K(Kd(t.search,e));he(()=>{const s=()=>{r(Kd(t.search,e))};return window.addEventListener("popstate",s),window.addEventListener("pushstate",s),window.addEventListener("replacestate",s),()=>{window.removeEventListener("popstate",s),window.removeEventListener("pushstate",s),window.removeEventListener("replacestate",s)}},[]);const i=Le((s,o)=>{if(s!==n){r(s);const a=new URLSearchParams(t.search);s===void 0||s.length===0?a.delete(e):a.set(e,s),j1({search:a.toString().replaceAll("%7C","|"),replace:o})}},[n]);return[n,i]}const Zv="tags",pl="|";function z1(){const[e,t]=Pr(Zv),n=$e(()=>{var i;return(i=e==null?void 0:e.split(pl))!=null?i:[]},[e]);return[n,(i,s)=>{s===!1||n.includes(i)&&s!==!0?t(n.filter(o=>o!==i).join(pl),!0):t([...n,i].sort().join(pl),!0)}]}function jt(e){const{icon:t,label:n,relative:r,tooltip:i,tooltipLoc:s,children:o}=e,[a,l]=La();return F("div",Ae(ce({},e),{class:`btn-menu${r===!1?" no-relative":""} ${e.class}`,children:[w(oe,{icon:t,label:n,tooltip:i,tooltipLoc:s,onClick:()=>l()}),a&&w("div",{class:"btn-group",children:o})]}))}const Yv="modulepreload",Jd={},Wv="/",xe=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${Wv}${r}`,r in Jd)return;Jd[r]=!0;const i=r.endsWith(".css"),s=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${s}`))return;const o=document.createElement("link");if(o.rel=i?"stylesheet":Yv,i||(o.as="script",o.crossOrigin=""),o.href=r,document.head.appendChild(o),i)return new Promise((a,l)=>{o.addEventListener("load",a),o.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())};function xi({error:e,onDismiss:t}){const[n,r]=K(!1),[i,s]=K(void 0);he(()=>{if(e instanceof Error){const a=e.stack.split(` `).map(l=>l.replace(/^(\s+)at (?:async )?(https?:.*)/,"$1at ($2)"));s(a.join(` `)),xe(()=>import("./sourcemapped-stacktrace.2adccb9b.js").then(function(l){return l.s}),[]).then(({mapStackTrace:l})=>{l(a.join(` `),u=>{const c=u.map(d=>d.replace(/..\/..\/src\//,"src/")).join(` `);s(c)})})}},[e]);const o=$e(()=>{let a="https://github.com/misode/misode.github.io/issues/new";return e instanceof Error?(a+=`?title=${encodeURIComponent(`${e.name}: ${e.message}`)}`,i&&(a+=`&body=${encodeURIComponent(`\`\`\` ${e.name}: ${e.message} ${i} \`\`\` `)}`)):a+=`?title=${encodeURIComponent(e.toString())}`,a},[e,i]);return F("div",{class:"error",children:[t&&w("div",{class:"error-dismiss",onClick:t,children:me.x}),F("h3",{children:[e instanceof Error?e.message:e,i&&w("span",{onClick:()=>r(!n),children:me.info})]}),i&&n&&w("pre",{children:i}),F("p",{children:["If you think this is a bug, you can report it ",w("a",{href:o,target:"_blank",children:"on GitHub"})]})]})}const qc="https://raw.githubusercontent.com/misode/technical-changes/main";let ml=null;async function U1(){if(!ml){const e=await(await fetch(`${qc}/index.json`)).json();ml=(await Promise.all(e.map((t,n)=>qv(V1(t),n)))).flat().map(t=>Ae(ce({},t),{tags:[t.group,...t.tags]}))}return ml}async function qv(e,t){const n=await(await fetch(`${qc}/${e}/index.json`)).json();return(await Promise.all(n.map((r,i)=>Xv(e,V1(r),t,i)))).flat()}async function Xv(e,t,n,r){const i=await(await fetch(`${qc}/${e}/${t}.md`)).text();return Kv(i).map(s=>ce({version:t,group:e,order:n*1e3+r},s))}function Kv(e){return e.split(` `).map(t=>{const n=t.indexOf("|");return{tags:t.substring(0,n).trim().split(" "),content:t.slice(n+1).trim().replaceAll("->","\u2192").replaceAll(` ... `,` `)}})}function V1(e){return typeof e=="string"?e:vr(e)?e.id:"unknown"}const qi="https://www.minecraft.net/article/",Jv=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:"the-wild-update-out-today-java"}));function Qv(e){const t=Jv.get(e);if(t)return qi+t;let n;if((n=e.match(/^(\d\dw\d\d)[a-z]$/))&&n[1])return qi+"minecraft-snapshot-"+n[1]+"a";if((n=e.match(/^(\d+\.\d+(?:\.\d+)?)-pre([0-9]+)$/))&&n[1]&&n[2])return qi+"minecraft-"+n[1].replaceAll(".","-")+"-pre-release-"+n[2];if((n=e.match(/^(\d+\.\d+(?:\.\d+)?)-rc[0-9]+$/))&&n[1])return qi+"minecraft-"+n[1].replaceAll(".","-")+"-release-candidate-1";if(e.match(/^\d+\.\d+\.\d+$/))return qi+"minecraft-java-edition-"+e.replaceAll(".","-")}const bi="misode-v2",Qd="cached_latest_version",e0="misode_cache_patch",gl="1.19.1-rc1",pi="https://raw.githubusercontent.com/misode/mcmeta";function Xn(e,t){return`${pi}/${e.dynamic?t:`${e.ref}-${t}`}`}async function Fa(e){await ax(),e.dynamic&&(localStorage.getItem(Qd)!==gl&&(await G1(t=>t.startsWith(`${pi}/summary/`)||t.startsWith(`${pi}/data/`)||t.startsWith(`${pi}/assets/`)||t.startsWith(`${pi}/registries/`)),localStorage.setItem(Qd,gl)),e.ref=gl)}async function ex(e,t,n){const r=ke.versions.find(i=>i.id===e);if(!r){console.error(`[fetchData] Unknown version ${r} in ${JSON.stringify(ke.versions)}`);return}await Fa(r),await Promise.all([tx(r,t),nx(r,n)])}async function tx(e,t){console.debug(`[fetchRegistries] ${e.id}`);try{const n=await Ni(`${Xn(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:",qt(n))}}async function nx(e,t){console.debug(`[fetchBlockStateMap] ${e.id}`);try{const n=await Ni(`${Xn(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:",qt(n))}}async function H1(e,t,n){console.debug(`[fetchPreset] ${e} ${t} ${n}`);const r=ke.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 o=["blockstates","models"].includes(t)?"assets":"data";i=`${Xn(r,o)}/${o}/minecraft/${t}/${n}.json`}return await(await fetch(i)).json()}catch(i){throw new Error(`Error occurred while fetching ${t} preset ${n}: ${qt(i)}`)}}async function t0(e,t){console.debug(`[fetchAllPresets] ${e} ${t}`);const n=ke.versions.find(r=>r.id===e);await Fa(n);try{const r=await Ni(`${Xn(n,"registries")}/${t}/data.min.json`);return new Map(await Promise.all(r.map(async i=>[i,await Ni(`${Xn(n,"data")}/data/minecraft/${t}/${i}.json`)])))}catch(r){throw new Error(`Error occurred while fetching all ${t} presets: ${qt(r)}`)}}async function rx(e){const t=ke.versions.find(n=>n.id===e);await Fa(t);try{const n=`${Xn(t,"summary")}/sounds/data.min.json`;return await Ni(n)}catch(n){throw new Error(`Error occurred while fetching sounds for ${t}: ${qt(n)}`)}}function ix(e,t){const n=ke.versions.find(r=>r.id===e);return`${Xn(n,"assets")}/assets/minecraft/sounds/${t}.ogg`}async function sx(){const e=ke.versions[ke.versions.length-1];await Fa(e);try{return Ni(`${Xn(e,"summary")}/versions/data.min.json`)}catch(t){throw new Error(`Error occured while fetching versions: ${qt(t)}`)}}function ox(e,t){const n=ke.versions.find(r=>r.id===e);return`${Xn(n,"assets")}/assets/minecraft/textures/${t}.png`}async function Ni(e,t=n=>n){try{const n=await caches.open(bi);console.debug(`[getData] Opened cache ${bi} ${e}`);const r=await n.match(e);if(r&&r.ok)return console.debug(`[getData] Retrieving cached data ${e}`),await r.json();console.debug(`[getData] fetching data ${e}`);const i=await fetch(e),s=t(await i.json());return await n.put(e,new Response(JSON.stringify(s))),s}catch(n){console.warn(`[getData] Failed to open cache ${bi}: ${qt(n)}`),console.debug(`[getData] fetching data ${e}`);const r=await fetch(e);return t(await r.json())}}async function G1(e){try{const t=await caches.open(bi);console.debug(`[deleteMatching] Opened cache ${bi}`);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 ${bi}: ${qt(t)}`)}}const n0=[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 G1(e=>e.startsWith(`${pi}/1.18.2-summary/`))}];async function ax(){var t;const e=parseInt((t=localStorage.getItem(e0))!=null?t:"0");for(let n=e+1;n<=n0.length;n+=1){const r=n0[n-1];r&&await r(),localStorage.setItem(e0,n.toFixed())}}const it="immersive_weathering";function lx(e,t){const n=P.Reference.bind(void 0,e),r=P.StringNode.bind(void 0,t),i=s=>P.ChoiceNode([{type:"string",node:r({validator:"resource",params:{pool:s,allowTag:!0}}),change:o=>{if(Array.isArray(o)&&typeof o[0]=="string"&&!o[0].startsWith("#"))return o[0]}},{type:"list",node:P.ListNode(r({validator:"resource",params:{pool:s}})),change:o=>typeof o=="string"&&!o.startsWith("#")?[o]:[]}],{choiceContext:"tag"});e.register(`${it}:block_growth`,P.ObjectNode({area_condition:n(`${it}:area_condition`),position_predicates:P.Opt(P.ListNode(n(`${it}: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(`${it}:block_pair`),weight:P.NumberNode({integer:!0})}))},{category:"pool"})),owners:P.ListNode(r({validator:"resource",params:{pool:"block"}})),replacing_target:n(`${it}:rule_test`),target_self:P.Opt(P.BooleanNode()),destroy_target:P.Opt(P.BooleanNode())},{context:`${it}.block_growth`})),e.register(`${it}: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(`${it}:rule_test`)),must_not_have:P.Opt(n(`${it}:rule_test`)),includes:P.Opt(i("block"))},neighbor_based_generation:{must_have:n(`${it}:rule_test`),must_not_have:P.Opt(n(`${it}:rule_test`)),required_amount:P.Opt(P.NumberNode({integer:!0})),directions:P.ListNode(r({enum:"direction"}))}}},{context:`${it}.area_condition`})),e.register(`${it}:block_pair`,P.ObjectNode({block:n(`${it}:block_state`),above_block:P.Opt(n(`${it}:block_state`))},{context:`${it}.block_pair`})),e.register(`${it}:block_state`,P.ObjectNode({Name:r({validator:"resource",params:{pool:"block"}}),Properties:P.Opt(P.MapNode(r(),r()))},{context:"block_state"})),e.register(`${it}: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(`${it}: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:`${it}.position_test`,category:"predicate"})),t.register(`${it}:rule_test`,[...t.get("rule_test"),"immersive_weathering:block_set_match","immersive_weathering:fluid_match","immersive_weathering:tree_log"]),e.register(`${it}:rule_test`,P.ObjectNode({predicate_type:r({validator:"resource",params:{pool:`${it}: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 cx(e,t){lx(e,t)}const cc=["1.15","1.16","1.17","1.18","1.18.2","1.19"],ux="1.19",ni={},ri={},dx={1.15:()=>xe(()=>import("./index.2c724a1f.js").then(function(e){return e.i}),[]),1.16:()=>xe(()=>import("./index.a2f58d81.js").then(function(e){return e.i}),[]),1.17:()=>xe(()=>import("./index.e6c824ef.js").then(function(e){return e.i}),[]),1.18:()=>xe(()=>import("./index.3bcb9c48.js").then(function(e){return e.i}),[]),"1.18.2":()=>xe(()=>import("./index.ad0237bc.js").then(function(e){return e.i}),[]),1.19:()=>xe(()=>import("./index.19162177.js").then(function(e){return e.i}),[])};let Z1,Y1,os;async function Xc(e){return ni[e]||(ni[e]=(async()=>{try{const t=await dx[e](),n=t.getCollections(),r={};await ex(e,n,r);const i=t.getSchemas(n);return cx(i,n),ni[e]={collections:n,schemas:i,blockStates:r},ni[e]}catch(t){throw new Error(`Cannot get version "${e}": ${qt(t)}`)}})()),ni[e]}async function fx(e,t){var n;if(!ri[t]||ri[t].version!==e){const r=await Xc(e);Z1=P.Reference(r.schemas,"configured_decorator"),Y1=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=ke.generators.find(s=>s.id===t))==null?void 0:n.schema;if(!i)throw new Error(`Cannot find model ${t}`);try{const s=r.schemas.get(i),o=new P.DataModel(s,{wrapLists:!0});ri[t]?o.reset(ri[t].model.data,!1):(o.validate(!0),o.history=[JSON.stringify(o.data)]),ri[t]={model:o,version:e}}catch(s){const o=new Error(`Cannot get generator "${t}" for version "${e}": ${qt(s)}`);throw s instanceof Error&&(o.stack=s.stack),o}}return ri[t].model}async function hx(e){const t=await Xc(e);return os=t.collections,t.collections}async function px(e){return(await Xc(e)).blockStates}function _t(e,t,n){const r=ke.versions.findIndex(o=>o.id===e),i=t?ke.versions.findIndex(o=>o.id===t):0,s=n?ke.versions.findIndex(o=>o.id===n):ke.versions.length-1;return i<=r&&r<=s}var W1={exports:{}};(function(e){var t=function(){var n=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",s={};function o(l,u){if(!s[l]){s[l]={};for(var c=0;c>>8,c[d*2+1]=h%256}return c},decompressFromUint8Array:function(l){if(l==null)return a.decompress(l);for(var u=new Array(l.length/2),c=0,d=u.length;c>1}else{for(f=1,d=0;d>1}v--,v==0&&(v=Math.pow(2,x),x++),delete _[m]}else for(f=h[m],d=0;d>1;v--,v==0&&(v=Math.pow(2,x),x++),h[p]=y++,m=String(g)}if(m!==""){if(Object.prototype.hasOwnProperty.call(_,m)){if(m.charCodeAt(0)<256){for(d=0;d>1}else{for(f=1,d=0;d>1}v--,v==0&&(v=Math.pow(2,x),x++),delete _[m]}else for(f=h[m],d=0;d>1;v--,v==0&&(v=Math.pow(2,x),x++)}for(f=2,d=0;d>1;for(;;)if(k=k<<1,E==u-1){b.push(c(k));break}else E++;return b.join("")},decompress:function(l){return l==null?"":l==""?null:a._decompress(l.length,32768,function(u){return l.charCodeAt(u)})},_decompress:function(l,u,c){var d=[],f=4,h=4,_=3,g="",p=[],m,v,y,x,b,k,E,S={val:c(0),position:u,index:1};for(m=0;m<3;m+=1)d[m]=m;for(y=0,b=Math.pow(2,2),k=1;k!=b;)x=S.val&S.position,S.position>>=1,S.position==0&&(S.position=u,S.val=c(S.index++)),y|=(x>0?1:0)*k,k<<=1;switch(y){case 0:for(y=0,b=Math.pow(2,8),k=1;k!=b;)x=S.val&S.position,S.position>>=1,S.position==0&&(S.position=u,S.val=c(S.index++)),y|=(x>0?1:0)*k,k<<=1;E=n(y);break;case 1:for(y=0,b=Math.pow(2,16),k=1;k!=b;)x=S.val&S.position,S.position>>=1,S.position==0&&(S.position=u,S.val=c(S.index++)),y|=(x>0?1:0)*k,k<<=1;E=n(y);break;case 2:return""}for(d[3]=E,v=E,p.push(E);;){if(S.index>l)return"";for(y=0,b=Math.pow(2,_),k=1;k!=b;)x=S.val&S.position,S.position>>=1,S.position==0&&(S.position=u,S.val=c(S.index++)),y|=(x>0?1:0)*k,k<<=1;switch(E=y){case 0:for(y=0,b=Math.pow(2,8),k=1;k!=b;)x=S.val&S.position,S.position>>=1,S.position==0&&(S.position=u,S.val=c(S.index++)),y|=(x>0?1:0)*k,k<<=1;d[h++]=n(y),E=h-1,f--;break;case 1:for(y=0,b=Math.pow(2,16),k=1;k!=b;)x=S.val&S.position,S.position>>=1,S.position==0&&(S.position=u,S.val=c(S.index++)),y|=(x>0?1:0)*k,k<<=1;d[h++]=n(y),E=h-1,f--;break;case 2:return p.join("")}if(f==0&&(f=Math.pow(2,_),_++),d[E])g=d[E];else if(E===h)g=v+v.charAt(0);else return null;p.push(g),d[h++]=v+g.charAt(0),f--,v=g,f==0&&(f=Math.pow(2,_),_++)}}};return a}();e!=null&&(e.exports=t)})(W1);var q1=W1.exports;const mx="https://z15g7can.directus.app/items",r0=new Map;async function gx(e,t,n,r){try{const i=JSON.stringify(n),s=q1.compressToBase64(i);console.debug("Compression rate",i.length/i.length);const o=JSON.stringify({data:s,type:e,version:t,show_preview:r});let a=r0.get(o);if(!a){const l=await X1("/snippets",o);r0.set(o,l.id),a=l.id}return{id:a,length:i.length,compressed:s.length,rate:i.length/s.length}}catch(i){throw i instanceof Error&&(i.message=`Error creating share link: ${i.message}`),i}}async function _x(e){var t;try{const n=await X1(`/snippets/${e}`);return Ae(ce({},n),{data:JSON.parse((t=q1.decompressFromBase64(n.data))!=null?t:"{}")})}catch(n){throw n instanceof Error&&(n.message=`Error loading shared content: ${n.message}`),n}}async function X1(e,t){var i,s,o;const r=await(await fetch(mx+e,t?{method:"post",headers:{"Content-Type":"application/json"},body:t}:void 0)).json();if(r.data)return r.data;throw new Error((o=(s=(i=r.errors)==null?void 0:i[0])==null?void 0:s.message)!=null?o:"Unknown error")}const Kc={"2_spaces":2,"4_spaces":4,tabs:" ",minified:void 0};let Xi=null;const Jc={json:{parse:async e=>{try{return JSON.parse(e)}catch{return Xi=await xe(()=>import("./index.53db48a5.js").then(function(n){return n.i}),[]),Xi.parse(e)}},stringify:(e,t)=>(Xi!=null?Xi:JSON).stringify(e,null,t)+` `},yaml:{parse:async e=>oc.load(e),stringify:(e,t)=>oc.dump(e,{flowLevel:t===void 0?0:-1,indent:typeof t=="string"?4:t})}};function uc(e,t,n){return Jc[t!=null?t:Ge.getFormat()].stringify(e,Kc[n!=null?n:Ge.getIndent()])}async function K1(e,t){return await Jc[t].parse(e)}function wx(e){return Kc[e]}function vx(){return Object.keys(Kc)}function xx(){return Object.keys(Jc)}var Ge;(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";function t(){var A;return(A=localStorage.getItem(e.ID_LANGUAGE))!=null?A:"en"}e.getLanguage=t;function n(){var A;return(A=localStorage.getItem(e.ID_THEME))!=null?A:"dark"}e.getTheme=n;function r(){const A=localStorage.getItem(e.ID_VERSION);return A&&cc.includes(A)?A:"1.19"}e.getVersionOrDefault=r;function i(){const A=localStorage.getItem(e.ID_VERSION);return A&&cc.includes(A)?A:null}e.getVersion=i;function s(){var A;return(A=localStorage.getItem(e.ID_INDENT))!=null?A:"2_spaces"}e.getIndent=s;function o(){var A;return(A=localStorage.getItem(e.ID_FORMAT))!=null?A:"json"}e.getFormat=o;function a(){return localStorage.getItem(e.ID_HIGHLIGHTING)!=="false"}e.getHighlighting=a;function l(){var A;return(A=localStorage.getItem(e.ID_SOUNDS_VERSION))!=null?A:"latest"}e.getSoundsVersion=l;function u(){const A=localStorage.getItem(e.ID_PROJECTS);return A?JSON.parse(A):[_r]}e.getProjects=u;function c(A){var D;return JSON.parse((D=localStorage.getItem(e.ID_BACKUPS))!=null?D:"{}")[A]}e.getBackup=c;function d(){const A=localStorage.getItem(e.ID_PROJECT_PANEL_OPEN);if(A!==null)return JSON.parse(A)}e.getProjectPanelOpen=d;function f(){var A;return(A=localStorage.getItem(e.ID_OPEN_PROJECT))!=null?A:_r.name}e.getOpenProject=f;function h(){var A;return(A=localStorage.getItem(e.ID_TREE_VIEW_MODE))!=null?A:"resources"}e.getTreeViewMode=h;function _(A){A&&localStorage.setItem(e.ID_LANGUAGE,A)}e.setLanguage=_;function g(A){A&&localStorage.setItem(e.ID_THEME,A)}e.setTheme=g;function p(A){A&&localStorage.setItem(e.ID_VERSION,A)}e.setVersion=p;function m(A){A&&localStorage.setItem(e.ID_INDENT,A)}e.setIndent=m;function v(A){A&&localStorage.setItem(e.ID_FORMAT,A)}e.setFormat=v;function y(A){A!==void 0&&localStorage.setItem(e.ID_HIGHLIGHTING,A.toString())}e.setHighlighting=y;function x(A){A&&localStorage.setItem(e.ID_SOUNDS_VERSION,A)}e.setSoundsVersion=x;function b(A){A&&localStorage.setItem(e.ID_PROJECTS,JSON.stringify(A))}e.setProjects=b;function k(A,O){var L;const D=JSON.parse((L=localStorage.getItem(e.ID_BACKUPS))!=null?L:"{}");O===void 0?delete D[A]:D[A]=O,localStorage.setItem(e.ID_BACKUPS,JSON.stringify(D))}e.setBackup=k;function E(A){A===void 0?localStorage.removeItem(e.ID_PROJECT_PANEL_OPEN):localStorage.setItem(e.ID_PROJECT_PANEL_OPEN,JSON.stringify(A))}e.setProjectPanelOpen=E;function S(A){A===void 0?localStorage.removeItem(e.ID_OPEN_PROJECT):localStorage.setItem(e.ID_OPEN_PROJECT,A)}e.setOpenProject=S;function C(A){A&&localStorage.setItem(e.ID_TREE_VIEW_MODE,A)}e.setTreeViewMode=C})(Ge||(Ge={}));var J1=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.search":"Search changes","changelog.no_results":"No 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","format.json":"JSON","format.yaml":"YAML","fields":"Fields","generate_new_seed":"Generate new seed","generate_new_uuid":"Generate new UUID","github":"GitHub","guides.all":"All guides","guides.search":"Search guides","guides.no_results.version":"No guides for this version","guides.no_results.query":"No guides for this query","hide_output":"Hide output","hide_preview":"Hide preview","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.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","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","world":"World Settings","worldgen":"Worldgen","worldgen/biome":"Biome","worldgen/configured_carver":"Carver","worldgen/configured_feature":"Feature","worldgen/density_function":"Density Function","worldgen/placed_feature":"Placed Feature","worldgen/noise":"Noise","worldgen/noise_settings":"Noise Settings","worldgen/processor_list":"Processor List","worldgen/configured_structure_feature":"Structure Feature","worldgen/structure":"Structure","worldgen/structure_set":"Structure Set","worldgen/configured_surface_builder":"Surface Builder","worldgen/template_pool":"Template Pool","worldgen/world_preset":"World Preset","worldgen/flat_level_generator_preset":"Flat World Preset","zoom_in":"Zoom in","zoom_out":"Zoom out"}'),bx=Object.freeze(Object.defineProperty({__proto__:null,default:J1},Symbol.toStringTag,{value:"Module"}));function yx(e){switch(e){case"../../../node_modules/@mcschema/locales/src/cs.json":return xe(()=>import("./cs.967a01eb.js"),[]);case"../../../node_modules/@mcschema/locales/src/de.json":return xe(()=>import("./de.489974c1.js"),[]);case"../../../node_modules/@mcschema/locales/src/en.json":return xe(()=>import("./en.8708b83f.js"),[]);case"../../../node_modules/@mcschema/locales/src/es.json":return xe(()=>import("./es.6b3597bc.js"),[]);case"../../../node_modules/@mcschema/locales/src/fr.json":return xe(()=>import("./fr.e316b1e2.js"),[]);case"../../../node_modules/@mcschema/locales/src/it.json":return xe(()=>import("./it.7ff123cd.js"),[]);case"../../../node_modules/@mcschema/locales/src/ja.json":return xe(()=>import("./ja.3170354d.js"),[]);case"../../../node_modules/@mcschema/locales/src/pl.json":return xe(()=>import("./pl.ae1f6791.js"),[]);case"../../../node_modules/@mcschema/locales/src/pt.json":return xe(()=>import("./pt.31e14993.js"),[]);case"../../../node_modules/@mcschema/locales/src/ru.json":return xe(()=>import("./ru.1298edc9.js"),[]);case"../../../node_modules/@mcschema/locales/src/sk.json":return xe(()=>import("./sk.d4265232.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-cn.json":return xe(()=>import("./zh-cn.4129665a.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-tw.json":return xe(()=>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 kx(e){switch(e){case"../../locales/de.json":return xe(()=>import("./de.a269acce.js"),[]);case"../../locales/en.json":return xe(()=>Promise.resolve().then(function(){return bx}),void 0);case"../../locales/es.json":return xe(()=>import("./es.833a9774.js"),[]);case"../../locales/fr.json":return xe(()=>import("./fr.0918dd41.js"),[]);case"../../locales/it.json":return xe(()=>import("./it.fd9a8268.js"),[]);case"../../locales/ja.json":return xe(()=>import("./ja.167de97b.js"),[]);case"../../locales/ko.json":return xe(()=>import("./ko.b4055eb4.js"),[]);case"../../locales/pl.json":return xe(()=>import("./pl.3a9fb38c.js"),[]);case"../../locales/pt.json":return xe(()=>import("./pt.1a04bd2d.js"),[]);case"../../locales/ru.json":return xe(()=>import("./ru.578070fe.js"),[]);case"../../locales/sk.json":return xe(()=>import("./sk.96bbf351.js"),[]);case"../../locales/zh-cn.json":return xe(()=>import("./zh-cn.e3c47b68.js"),[]);case"../../locales/zh-tw.json":return xe(()=>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 Q1=wr({lang:"none",locale:e=>e,changeLocale:()=>{}}),as={fallback:J1};function Te(e,t,...n){var i,s,o,a,l;const r=(l=(a=(o=(i=as[e])==null?void 0:i[t])!=null?o:(s=as.en)==null?void 0:s[t])!=null?a:as.fallback[t])!=null?l:t;return Ex(r,n)}function Ex(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 _l(e){if(as[e])return;const t=ke.languages.find(s=>s.code===e);if(!t)return;const n=await kx(`../../locales/${e}.json`),r=t.schemas!==!1&&await yx(`../../../node_modules/@mcschema/locales/src/${e}.json`);let i={default:{}};e==="en"&&(i=await xe(()=>import("./en.321d8b56.js"),[])),as[e]=ce(ce(ce({},n.default),r.default),i.default)}function Be(){return Yr(Q1)}function Ax({children:e}){const[t,n]=K("none"),r=Le((o,...a)=>Te(t,o,...a),[t]),i=Le(async o=>{await _l(o),Se.changeLocale(t,o),Ge.setLanguage(o),n(o)},[t]);he(()=>{(async()=>{const o=Ge.getLanguage();Se.setLocale(o),await Promise.all([_l("en"),...o!=="en"?[_l(o)]:[]]),n(o)})()},[]);const s={lang:t,locale:r,changeLocale:i};return w(Q1.Provider,{value:s,children:e})}const _r={name:"Drafts",namespace:"draft",files:[]},Sx=["worldgen/[a-z_]+","tags/worldgen/[a-z_]+","tags/[a-z_]+","[a-z_]+"].map(e=>RegExp(`^data/([a-z0-9._-]+)/(${e})/([a-z0-9/._-]+)$`)),ep=wr({projects:[_r],project:_r,createProject:()=>{},deleteProject:()=>{},changeProject:()=>{},updateProject:()=>{},updateFile:()=>!1,openFile:()=>{},closeFile:()=>{}});function er(){return Yr(ep)}function Ix({children:e}){const[t,n]=K(Ge.getProjects()),[r,i]=K(Ge.getOpenProject()),s=$e(()=>{var v;return(v=t.find(y=>y.name===r))!=null?v:_r},[t,r]),[o,a]=K(void 0),l=$e(()=>{if(!!o)return s.files.find(v=>v.type===o[0]&&v.id===o[1])},[s,o]),u=Le(v=>{Ge.setProjects(v),n(v)},[]),c=Le((v,y,x)=>{u([...t,{name:v,namespace:y,version:x,files:[]}])},[t]),d=Le(v=>{v!==_r.name&&u(t.filter(y=>y.name!==v))},[t]),f=Le(v=>{Ge.setOpenProject(v),i(v)},[]),h=Le(v=>{u(t.map(y=>y.name===r?ce(ce({},y),v):y))},[t,r]),_=Le((v,y,x)=>{var b,k;if(!x.id)h({files:s.files.filter(E=>E.type!==v||E.id!==y)});else{const E=v==="pack_mcmeta"?"pack":x.id.includes(":")?x.id:`${(b=s.namespace)!=null?b:"minecraft"}:${x.id}`,S=s.files.some(C=>C.type===v&&C.id===E);if(y){if((l==null?void 0:l.id)===y&&y!==E&&S)return!1;h({files:s.files.map(C=>C.type===v&&C.id===y?Ae(ce(ce({},C),x),{id:E}):C)}),(l==null?void 0:l.id)===y&&a([v,E])}else{if(S)return!1;h({files:[...s.files,{type:v,id:E,data:(k=x.data)!=null?k:{}}]}),a([v,E])}}return!0},[h,s,l]),g=Le((v,y)=>{const x=ke.generators.find(b=>b.id===v||b.path===v);if(!x)throw new Error(`Cannot find generator of type ${v}`);a([x.id,y]),Gr(On(x.url))},[]),p=Le(()=>{a(void 0)},[]),m={projects:t,project:s,file:l,createProject:c,changeProject:f,deleteProject:d,updateProject:h,updateFile:_,openFile:g,closeFile:p};return w(ep.Provider,{value:m,children:e})}function wl(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=ke.generators.find(s=>s.id===e.type);if(!!r)return`data/${t}/${(i=r.path)!=null?i:r.id}/${n}.json`}function tp(e){if(e==="pack.mcmeta")return{type:"pack_mcmeta",id:"pack"};for(const t of Sx){const n=e.match(t);if(!n)continue;const r=ke.generators.find(o=>{var a;return((a=o.path)!=null?a:o.id)===n[2]});if(!r)continue;const i=n[1],s=n[3].replace(/\.[a-z]+$/,"");return{type:r.id,id:`${i}:${s}`}}}const np=wr({biomeColors:{},setBiomeColor:()=>{}});function rp(){return Yr(np)}function Cx({children:e}){const[t,n]=Gv("misode_biome_colors",{},JSON.parse,JSON.stringify),r=Le((s,o)=>{n(Ae(ce({},t),{[s]:o}))},[t]),i={biomeColors:t,setBiomeColor:r};return w(np.Provider,{value:i,children:e})}const ip=wr({theme:"dark",actualTheme:"dark",changeTheme:()=>{}});function sp(){return Yr(ip)}function Tx({children:e}){const[t,n]=K(Ge.getTheme()),r=Xd("(prefers-color-scheme: light)"),i=Xd("(prefers-color-scheme: dark)");he(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const s=Le(a=>{Se.changeTheme(t,a),Ge.setTheme(a),n(a)},[t]);he(()=>{Se.setPrefersColorScheme(r?"light":i?"dark":"none")},[r,i]),he(()=>{Se.setTheme(t)},[]);const o={theme:t,actualTheme:t==="light"||t!=="dark"&&r?"light":"dark",changeTheme:s};return w(ip.Provider,{value:o,children:e})}const Ox=3,op=wr({title:"",changeTitle:()=>{}});function gn(e,t,n){const r=Yr(op);return he(()=>{e&&r.changeTitle(e,t,n)},[e,t,n]),r}function Mx({children:e}){const{locale:t}=Be(),[n,r]=K(t("title.home")),i=Le((o,a,l)=>{let u=ke.versions;a!==void 0&&(u=ke.versions.filter(d=>a==null?void 0:a.includes(d.id)));let c="";l&&(c=` - ${l}`),(a==null?void 0:a.length)!==0&&(c=` - Minecraft ${u.map(f=>f.id).slice(-Ox).join(", ")}`),document.title=o+c,r(o)},[]),s={title:n,changeTitle:i};return w(op.Provider,{value:s,children:e})}const Nx="version",ap=wr({version:"1.18.2",changeVersion:()=>{},changeTargetVersion:()=>{}});function Wr(){return Yr(ap)}function Rx({children:e}){const[t,n]=K(Ge.getVersionOrDefault()),[r,i]=Pr(Nx);he(()=>{cc.includes(r)&&t!==r&&(Se.setVersion(r),n(r))},[t,r]);const s=Le((a,l=!0,u=!1)=>{(u||r)&&i(a,!0),l&&(Se.changeVersion(t,a),Ge.setVersion(a)),n(a)},[t,r]);he(()=>{var a;Se.setVersion(t),Se.setSelectedVersion((a=Ge.getVersion())!=null?a:"default")},[]);const o={version:t,changeVersion:s,changeTargetVersion:i};return w(ap.Provider,{value:o,children:e})}function Lx({value:e,onChange:t,label:n,accept:r}){const{locale:i}=Be(),s=Oe(null),o=()=>{var l,u;if(s.current!==null)for(let c=0;c<((u=(l=s.current.files)==null?void 0:l.length)!=null?u:0);c++){const d=s.current.files[c];t(d)}},a=Le(l=>{if(l.preventDefault(),!!l.dataTransfer)for(let u=0;ul.preventDefault(),children:[w("input",{ref:s,type:"file",onChange:o,accept:r}),w(oe,{label:n!=null?n:i("choose_file")}),w("span",{children:e?e.name:i("no_file_chosen")})]})}function tr({donate:e}){const{locale:t}=Be();return F("footer",{children:[w("p",{children:F("span",{children:[t("developed_by")," ",w("a",{href:"https://github.com/misode",target:"_blank",rel:"noreferrer",children:"Misode"})]})}),e!==!1&&F("p",{class:"donate",children:[me.heart,w("a",{href:"https://ko-fi.com/misode",target:"_blank",rel:"noreferrer",children:t("donate")})]}),F("p",{children:[me.mark_github,F("span",{children:[t("source_code_on")," ",w("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer",children:t("github")})]})]})]})}function Dx({label:e,value:t,onChange:n}){const r=Mr();return F("label",{class:"checkbox",children:[w("input",{id:r,type:"checkbox",checked:t,onClick:()=>n(!t)}),e]})}function Qc(e,t,n){const r=i=>{const s=i.onChange&&(l=>{var c;const u=l.target.value;(c=i.onChange)==null||c.call(i,n(u))}),o=i.onEnter&&(l=>{var u,c;if(l.key==="Enter"){const d=l.target.value;(u=i.onEnter)==null||u.call(i,n(d))}else l.key==="Escape"&&((c=i.onCancel)==null||c.call(i))}),a=Oe(null);return he(()=>{var l;i.autofocus&&((l=a.current)==null||l.select())},[i.autofocus]),w("input",Ae(ce({ref:a},i),{type:t,onChange:s,onKeyDown:o}))};return r.displayName=e,r}const Mn=Qc("TextInput","text",e=>e),Fx=Qc("NumberInput","number",e=>Number(e)),i0=Qc("RangeInput","range",e=>Number(e));function Px({values:e,onSelect:t,searchPlaceholder:n,noResults:r}){const[i,s]=K(""),o=$e(()=>{var l;const a=i.trim().split(" ");return(l=e==null?void 0:e.filter(u=>a.every(c=>u.includes(c))))!=null?l:[]},[e,i]);return F(be,{children:[w($o,{icon:"search",large:!0,value:i,onChange:s,doSelect:1,placeholder:n!=null?n:"Search"}),F("div",{class:"result-list",children:[o.map(a=>w(oe,{label:a,onClick:()=>t==null?void 0:t(a)},a)),o.length===0&&w(oe,{label:r!=null?r:"No results"})]})]})}const vl="data-modals";function Pa(e){var n;he(()=>(s0(1),window.addEventListener("click",e.onDismiss),()=>{s0(-1),window.removeEventListener("click",e.onDismiss)}));const t=Le(r=>{var i;r.stopPropagation(),(i=r.target)==null||i.dispatchEvent(new Event(lc,{bubbles:!0}))},[]);return w("div",Ae(ce({},e),{class:`modal ${(n=e.class)!=null?n:""}`,onClick:t,children:e.children}))}function s0(e){var r;const n=parseInt((r=document.body.getAttribute(vl))!=null?r:"0")+e;n<=0?document.body.removeAttribute(vl):document.body.setAttribute(vl,n.toFixed())}function $x({model:e,id:t,method:n,onClose:r}){const{locale:i}=Be(),{projects:s,project:o,updateFile:a}=er(),[l,u]=K(t==="pack_mcmeta"?"pack":""),c=()=>{Se.saveProjectFile(t,s.length,o.files.length,n),a(t,void 0,{type:t,id:l,data:P.DataModel.unwrapLists(e.data)}),r()};return F(Pa,{class:"file-modal",onDismiss:r,children:[w("p",{children:i("project.save_current_file")}),w(Mn,{autofocus:t!=="pack_mcmeta",class:"btn btn-input",value:l,onChange:u,onEnter:c,onCancel:r,placeholder:i("resource_location"),spellcheck:!1,readOnly:t==="pack_mcmeta"}),w(oe,{icon:"file",label:i("project.save"),onClick:c})]})}function Bx({id:e,name:t,onClose:n}){const{locale:r}=Be(),{projects:i,project:s,updateFile:o}=er(),[a,l]=K(t),u=()=>{Se.renameProjectFile(e,i.length,s.files.length,"menu"),o(e,t,{type:e,id:a}),n()};return F(Pa,{class:"file-modal",onDismiss:n,children:[w("p",{children:r("project.rename_file")}),w(Mn,{autofocus:!0,class:"btn btn-input",value:a,onChange:l,onEnter:u,placeholder:r("resource_location"),spellcheck:!1}),w(oe,{icon:"pencil",label:r("project.rename"),onClick:u})]})}let ve,lp=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});lp.decode();let po=null;function jx(){return(po===null||po.buffer!==ve.memory.buffer)&&(po=new Uint8Array(ve.memory.buffer)),po}function zx(e,t){return lp.decode(jx().subarray(e,e+t))}const dc=new Uint32Array(2),Ux=new BigInt64Array(dc.buffer);let mo=null;function vs(){return(mo===null||mo.buffer!==ve.memory.buffer)&&(mo=new Int32Array(ve.memory.buffer)),mo}let go=null;function cp(){return(go===null||go.buffer!==ve.memory.buffer)&&(go=new Float64Array(ve.memory.buffer)),go}function Vx(e,t){return cp().subarray(e/8,e/8+t)}let st=0;function ut(e,t){const n=t(e.length*8);return cp().set(e,n/8),st=e.length,n}let _o=null;function Hx(){return(_o===null||_o.buffer!==ve.memory.buffer)&&(_o=new Uint32Array(ve.memory.buffer)),_o}function Gx(e,t){const n=t(e.length*4);return Hx().set(e,n/4),st=e.length,n}function Zx(e,t,n,r,i,s,o,a,l,u,c,d,f,h){var _=ut(e,ve.__wbindgen_malloc),g=st,p=ut(t,ve.__wbindgen_malloc),m=st,v=ut(n,ve.__wbindgen_malloc),y=st,x=ut(r,ve.__wbindgen_malloc),b=st,k=ut(i,ve.__wbindgen_malloc),E=st,S=ut(s,ve.__wbindgen_malloc),C=st,A=ut(o,ve.__wbindgen_malloc),O=st,D=ut(a,ve.__wbindgen_malloc),L=st,W=ut(l,ve.__wbindgen_malloc),U=st,M=ut(u,ve.__wbindgen_malloc),$=st,V=ut(c,ve.__wbindgen_malloc),Q=st,R=ut(d,ve.__wbindgen_malloc),I=st,N=ut(f,ve.__wbindgen_malloc),B=st,q=Gx(h,ve.__wbindgen_malloc),ie=st,j=ve.biome_parameters(_,g,p,m,v,y,x,b,k,E,S,C,A,O,D,L,W,U,M,$,V,Q,R,I,N,B,q,ie);return $a.__wrap(j)}function Yx(e,t,n,r,i,s,o,a,l,u,c,d,f){Ux[0]=e;const h=dc[0],_=dc[1];var g=ut(n,ve.__wbindgen_malloc),p=st,m=ut(i,ve.__wbindgen_malloc),v=st,y=ut(o,ve.__wbindgen_malloc),x=st,b=ut(l,ve.__wbindgen_malloc),k=st,E=ut(c,ve.__wbindgen_malloc),S=st,C=ut(f,ve.__wbindgen_malloc),A=st,O=ve.climate_sampler(h,_,t,g,p,r,m,v,s,y,x,a,b,k,u,E,S,d,C,A);return Zs.__wrap(O)}function fc(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`);return e.ptr}function Wx(e,t){return vs().subarray(e/4,e/4+t)}function o0(e,t,n,r,i,s,o,a,l,u,c){try{const _=ve.__wbindgen_add_to_stack_pointer(-16);fc(e,$a),fc(t,Zs),ve.multi_noise(_,e.ptr,t.ptr,n,r,i,s,o,a,l,u,c);var d=vs()[_/4+0],f=vs()[_/4+1],h=Wx(d,f).slice();return ve.__wbindgen_free(d,f*4),h}finally{ve.__wbindgen_add_to_stack_pointer(16)}}function a0(e,t,n,r,i,s,o,a,l,u){try{const h=ve.__wbindgen_add_to_stack_pointer(-16);fc(e,Zs),ve.climate_noise(h,e.ptr,t,n,r,i,s,o,a,l,u);var c=vs()[h/4+0],d=vs()[h/4+1],f=Vx(c,d).slice();return ve.__wbindgen_free(c,d*8),f}finally{ve.__wbindgen_add_to_stack_pointer(16)}}class $a{static __wrap(t){const n=Object.create($a.prototype);return n.ptr=t,n}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();ve.__wbg_parameterlist_free(t)}}class Zs{static __wrap(t){const n=Object.create(Zs.prototype);return n.ptr=t,n}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();ve.__wbg_sampler_free(t)}}async function qx(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(r){if(e.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}async function up(e){typeof e=="undefined"&&(e=new URL("/assets/deepslate_rs_bg.4990c219.wasm",self.location));const t={};t.wbg={},t.wbg.__wbindgen_throw=function(i,s){throw new Error(zx(i,s))},(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:n,module:r}=await qx(await e,t);return ve=n.exports,up.__wbindgen_wasm_module=r,ve}var l0="/assets/deepslate_rs_bg.4990c219.wasm",Qt;(function(e){e.UP="up",e.DOWN="down",e.NORTH="north",e.EAST="east",e.SOUTH="south",e.WEST="west"})(Qt||(Qt={}));const Xx={[Qt.UP]:[0,1,0],[Qt.DOWN]:[0,-1,0],[Qt.NORTH]:[0,0,-1],[Qt.EAST]:[1,0,0],[Qt.SOUTH]:[0,0,1],[Qt.WEST]:[-1,0,0]};(function(e){e.ALL=[e.UP,e.DOWN,e.NORTH,e.EAST,e.SOUTH,e.WEST];function t(n){return Xx[n]}e.normal=t})(Qt||(Qt={}));var Ft;(function(e){function t(o,a,l){return[o,a,l]}e.create=t,e.ZERO=e.create(0,0,0);function n(o,a,l,u){return[o[0]+a,o[1]+l,o[2]+u]}e.offset=n;function r(o,a){return e.offset(o,...Qt.normal(a))}e.towards=r;function i(o,a){return o===a?!0:o[0]===a[0]&&o[1]===a[1]&&o[2]===a[2]}e.equals=i;function s(o){return o[0]*o[0]+o[1]*o[1]+o[2]*o[2]}e.magnitude=s})(Ft||(Ft={}));/*! pako 2.0.4 https://github.com/nodeca/pako @license (MIT AND Zlib) */const Kx=4,c0=0,u0=1,Jx=2;function $i(e){let t=e.length;for(;--t>=0;)e[t]=0}const Qx=0,dp=1,eb=2,tb=3,nb=258,eu=29,Ys=256,xs=Ys+1+eu,yi=30,tu=19,fp=2*xs+1,Ir=15,xl=16,rb=7,nu=256,hp=16,pp=17,mp=18,hc=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]),jo=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]),ib=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),gp=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),sb=512,$n=new Array((xs+2)*2);$i($n);const ls=new Array(yi*2);$i(ls);const bs=new Array(sb);$i(bs);const ys=new Array(nb-tb+1);$i(ys);const ru=new Array(eu);$i(ru);const sa=new Array(yi);$i(sa);function bl(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 _p,wp,vp;function yl(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const xp=e=>e<256?bs[e]:bs[256+(e>>>7)],ks=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},zt=(e,t,n)=>{e.bi_valid>xl-n?(e.bi_buf|=t<>xl-e.bi_valid,e.bi_valid+=n-xl):(e.bi_buf|=t<{zt(e,n[t*2],n[t*2+1])},bp=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},ob=e=>{e.bi_valid===16?(ks(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)},ab=(e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,s=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,l=t.stat_desc.max_length;let u,c,d,f,h,_,g=0;for(f=0;f<=Ir;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,u=e.heap_max+1;ul&&(f=l,g++),n[c*2+1]=f,!(c>r)&&(e.bl_count[f]++,h=0,c>=a&&(h=o[c-a]),_=n[c*2],e.opt_len+=_*(f+h),s&&(e.static_len+=_*(i[c*2+1]+h)));if(g!==0){do{for(f=l-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[l]--,g-=2}while(g>0);for(f=l;f!==0;f--)for(c=e.bl_count[f];c!==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),c--)}},yp=(e,t,n)=>{const r=new Array(Ir+1);let i=0,s,o;for(s=1;s<=Ir;s++)r[s]=i=i+n[s-1]<<1;for(o=0;o<=t;o++){let a=e[o*2+1];a!==0&&(e[o*2]=bp(r[a]++,a))}},lb=()=>{let e,t,n,r,i;const s=new Array(Ir+1);for(n=0,r=0;r>=7;r{let t;for(t=0;t{e.bi_valid>8?ks(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},cb=(e,t,n,r)=>{Ep(e),r&&(ks(e,n),ks(e,~n)),e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},d0=(e,t,n,r)=>{const i=t*2,s=n*2;return e[i]{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i{let r,i,s=0,o,a;if(e.last_lit!==0)do r=e.pending_buf[e.d_buf+s*2]<<8|e.pending_buf[e.d_buf+s*2+1],i=e.pending_buf[e.l_buf+s],s++,r===0?En(e,i,t):(o=ys[i],En(e,o+Ys+1,t),a=hc[o],a!==0&&(i-=ru[o],zt(e,i,a)),r--,o=xp(r),En(e,o,n),a=jo[o],a!==0&&(r-=sa[o],zt(e,r,a)));while(s{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,s=t.stat_desc.elems;let o,a,l=-1,u;for(e.heap_len=0,e.heap_max=fp,o=0;o>1;o>=1;o--)kl(e,n,o);u=s;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],kl(e,n,1),a=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=a,n[u*2]=n[o*2]+n[a*2],e.depth[u]=(e.depth[o]>=e.depth[a]?e.depth[o]:e.depth[a])+1,n[o*2+1]=n[a*2+1]=u,e.heap[1]=u++,kl(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],ab(e,t),yp(n,l,e.bl_count)},h0=(e,t,n)=>{let r,i=-1,s,o=t[0*2+1],a=0,l=7,u=4;for(o===0&&(l=138,u=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)s=o,o=t[(r+1)*2+1],!(++a{let r,i=-1,s,o=t[0*2+1],a=0,l=7,u=4;for(o===0&&(l=138,u=3),r=0;r<=n;r++)if(s=o,o=t[(r+1)*2+1],!(++a{let t;for(h0(e,e.dyn_ltree,e.l_desc.max_code),h0(e,e.dyn_dtree,e.d_desc.max_code),pc(e,e.bl_desc),t=tu-1;t>=3&&e.bl_tree[gp[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},db=(e,t,n,r)=>{let i;for(zt(e,t-257,5),zt(e,n-1,5),zt(e,r-4,4),i=0;i{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return c0;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return u0;for(n=32;n{m0||(lb(),m0=!0),e.l_desc=new yl(e.dyn_ltree,_p),e.d_desc=new yl(e.dyn_dtree,wp),e.bl_desc=new yl(e.bl_tree,vp),e.bi_buf=0,e.bi_valid=0,kp(e)},Ap=(e,t,n,r)=>{zt(e,(Qx<<1)+(r?1:0),3),cb(e,t,n,!0)},pb=e=>{zt(e,dp<<1,3),En(e,nu,$n),ob(e)},mb=(e,t,n,r)=>{let i,s,o=0;e.level>0?(e.strm.data_type===Jx&&(e.strm.data_type=fb(e)),pc(e,e.l_desc),pc(e,e.d_desc),o=ub(e),i=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=i&&(i=s)):i=s=n+5,n+4<=i&&t!==-1?Ap(e,t,n,r):e.strategy===Kx||s===i?(zt(e,(dp<<1)+(r?1:0),3),f0(e,$n,ls)):(zt(e,(eb<<1)+(r?1:0),3),db(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),f0(e,e.dyn_ltree,e.dyn_dtree)),kp(e),r&&Ep(e)},gb=(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[(ys[n]+Ys+1)*2]++,e.dyn_dtree[xp(t)*2]++),e.last_lit===e.lit_bufsize-1);var _b=hb,wb=Ap,vb=mb,xb=gb,bb=pb,yb={_tr_init:_b,_tr_stored_block:wb,_tr_flush_block:vb,_tr_tally:xb,_tr_align:bb};const kb=(e,t,n,r)=>{let i=e&65535|0,s=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,s=s+i|0;while(--o);i%=65521,s%=65521}return i|s<<16|0};var Es=kb;const Eb=()=>{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},Ab=new Uint32Array(Eb()),Sb=(e,t,n,r)=>{const i=Ab,s=r+n;e^=-1;for(let o=r;o>>8^i[(e^t[o])&255];return e^-1};var pt=Sb,$r={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:Ib,_tr_stored_block:Cb,_tr_flush_block:Tb,_tr_tally:hr,_tr_align:Ob}=yb,{Z_NO_FLUSH:Xr,Z_PARTIAL_FLUSH:Mb,Z_FULL_FLUSH:Nb,Z_FINISH:pr,Z_BLOCK:g0,Z_OK:An,Z_STREAM_END:_0,Z_STREAM_ERROR:nn,Z_DATA_ERROR:Rb,Z_BUF_ERROR:El,Z_DEFAULT_COMPRESSION:Lb,Z_FILTERED:Db,Z_HUFFMAN_ONLY:wo,Z_RLE:Fb,Z_FIXED:Pb,Z_DEFAULT_STRATEGY:$b,Z_UNKNOWN:Bb,Z_DEFLATED:Ba}=qr,jb=9,zb=15,Ub=8,Vb=29,Hb=256,mc=Hb+1+Vb,Gb=30,Zb=19,Yb=2*mc+1,Wb=15,Ie=3,cr=258,mn=cr+Ie+1,qb=32,ja=42,gc=69,zo=73,Uo=91,Vo=103,Cr=113,Qi=666,dt=1,Ws=2,Br=3,Bi=4,Xb=3,ur=(e,t)=>(e.msg=$r[t],t),w0=e=>(e<<1)-(e>4?9:0),lr=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let Kb=(e,t,n)=>(t<{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},Et=(e,t)=>{Tb(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,sr(e.strm)},Re=(e,t)=>{e.pending_buf[e.pending++]=t},Ki=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},Jb=(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=Es(e.adler,t,i,n):e.state.wrap===2&&(e.adler=pt(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},Sp=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,s,o=e.prev_length,a=e.nice_match;const l=e.strstart>e.w_size-mn?e.strstart-(e.w_size-mn):0,u=e.window,c=e.w_mask,d=e.prev,f=e.strstart+cr;let h=u[r+o-1],_=u[r+o];e.prev_length>=e.good_match&&(n>>=2),a>e.lookahead&&(a=e.lookahead);do if(i=t,!(u[i+o]!==_||u[i+o-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]&&ro){if(e.match_start=t,o=s,s>=a)break;h=u[r+o-1],_=u[r+o]}}while((t=d[t&c])>l&&--n!==0);return o<=e.lookahead?o:e.lookahead},jr=e=>{const t=e.w_size;let n,r,i,s,o;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-mn)){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);s+=t}if(e.strm.avail_in===0)break;if(r=Jb(e.strm,e.window,e.strstart+e.lookahead,s),e.lookahead+=r,e.lookahead+e.insert>=Ie)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=mr(e,e.ins_h,e.window[o+1]);e.insert&&(e.ins_h=mr(e,e.ins_h,e.window[o+Ie-1]),e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert{let n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(jr(e),e.lookahead===0&&t===Xr)return dt;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;const r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,Et(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-mn&&(Et(e,!1),e.strm.avail_out===0))return dt}return e.insert=0,t===pr?(Et(e,!0),e.strm.avail_out===0?Br:Bi):(e.strstart>e.block_start&&(Et(e,!1),e.strm.avail_out===0),dt)},Al=(e,t)=>{let n,r;for(;;){if(e.lookahead=Ie&&(e.ins_h=mr(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-mn&&(e.match_length=Sp(e,n)),e.match_length>=Ie)if(r=hr(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=mr(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=mr(e,e.ins_h,e.window[e.strstart+1]);else r=hr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Et(e,!1),e.strm.avail_out===0))return dt}return e.insert=e.strstart{let n,r,i;for(;;){if(e.lookahead=Ie&&(e.ins_h=mr(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_length4096)&&(e.match_length=Ie-1)),e.prev_length>=Ie&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-Ie,r=hr(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=mr(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&&(Et(e,!1),e.strm.avail_out===0))return dt}else if(e.match_available){if(r=hr(e,0,e.window[e.strstart-1]),r&&Et(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return dt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=hr(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart{let n,r,i,s;const o=e.window;for(;;){if(e.lookahead<=cr){if(jr(e),e.lookahead<=cr&&t===Xr)return dt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Ie&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){s=e.strstart+cr;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Ie?(n=hr(e,1,e.match_length-Ie),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=hr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Et(e,!1),e.strm.avail_out===0))return dt}return e.insert=0,t===pr?(Et(e,!0),e.strm.avail_out===0?Br:Bi):e.last_lit&&(Et(e,!1),e.strm.avail_out===0)?dt:Ws},ty=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(jr(e),e.lookahead===0)){if(t===Xr)return dt;break}if(e.match_length=0,n=hr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Et(e,!1),e.strm.avail_out===0))return dt}return e.insert=0,t===pr?(Et(e,!0),e.strm.avail_out===0?Br:Bi):e.last_lit&&(Et(e,!1),e.strm.avail_out===0)?dt:Ws};function bn(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 es=[new bn(0,0,0,0,Qb),new bn(4,4,8,4,Al),new bn(4,5,16,8,Al),new bn(4,6,32,32,Al),new bn(4,4,16,16,ii),new bn(8,16,32,32,ii),new bn(8,16,128,128,ii),new bn(8,32,128,256,ii),new bn(32,128,258,1024,ii),new bn(32,258,258,4096,ii)],ny=e=>{e.window_size=2*e.w_size,lr(e.head),e.max_lazy_match=es[e.level].max_lazy,e.good_match=es[e.level].good_length,e.nice_match=es[e.level].nice_length,e.max_chain_length=es[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 ry(){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=Ba,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(Yb*2),this.dyn_dtree=new Uint16Array((2*Gb+1)*2),this.bl_tree=new Uint16Array((2*Zb+1)*2),lr(this.dyn_ltree),lr(this.dyn_dtree),lr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Wb+1),this.heap=new Uint16Array(2*mc+1),lr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*mc+1),lr(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 Ip=e=>{if(!e||!e.state)return ur(e,nn);e.total_in=e.total_out=0,e.data_type=Bb;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?ja:Cr,e.adler=t.wrap===2?0:1,t.last_flush=Xr,Ib(t),An},Cp=e=>{const t=Ip(e);return t===An&&ny(e.state),t},iy=(e,t)=>!e||!e.state||e.state.wrap!==2?nn:(e.state.gzhead=t,An),Tp=(e,t,n,r,i,s)=>{if(!e)return nn;let o=1;if(t===Lb&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>jb||n!==Ba||r<8||r>15||t<0||t>9||s<0||s>Pb)return ur(e,nn);r===8&&(r=9);const a=new ry;return e.state=a,a.strm=e,a.wrap=o,a.gzhead=null,a.w_bits=r,a.w_size=1<Tp(e,t,Ba,zb,Ub,$b),oy=(e,t)=>{let n,r;if(!e||!e.state||t>g0||t<0)return e?ur(e,nn):nn;const i=e.state;if(!e.output||!e.input&&e.avail_in!==0||i.status===Qi&&t!==pr)return ur(e,e.avail_out===0?El:nn);i.strm=e;const s=i.last_flush;if(i.last_flush=t,i.status===ja)if(i.wrap===2)e.adler=0,Re(i,31),Re(i,139),Re(i,8),i.gzhead?(Re(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)),Re(i,i.gzhead.time&255),Re(i,i.gzhead.time>>8&255),Re(i,i.gzhead.time>>16&255),Re(i,i.gzhead.time>>24&255),Re(i,i.level===9?2:i.strategy>=wo||i.level<2?4:0),Re(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(Re(i,i.gzhead.extra.length&255),Re(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=pt(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=gc):(Re(i,0),Re(i,0),Re(i,0),Re(i,0),Re(i,0),Re(i,i.level===9?2:i.strategy>=wo||i.level<2?4:0),Re(i,Xb),i.status=Cr);else{let o=Ba+(i.w_bits-8<<4)<<8,a=-1;i.strategy>=wo||i.level<2?a=0:i.level<6?a=1:i.level===6?a=2:a=3,o|=a<<6,i.strstart!==0&&(o|=qb),o+=31-o%31,i.status=Cr,Ki(i,o),i.strstart!==0&&(Ki(i,e.adler>>>16),Ki(i,e.adler&65535)),e.adler=1}if(i.status===gc)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=pt(e.adler,i.pending_buf,i.pending-n,n)),sr(e),n=i.pending,i.pending===i.pending_buf_size));)Re(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=pt(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=zo)}else i.status=zo;if(i.status===zo)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=pt(e.adler,i.pending_buf,i.pending-n,n)),sr(e),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}i.gzindexn&&(e.adler=pt(e.adler,i.pending_buf,i.pending-n,n)),r===0&&(i.gzindex=0,i.status=Uo)}else i.status=Uo;if(i.status===Uo)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=pt(e.adler,i.pending_buf,i.pending-n,n)),sr(e),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}i.gzindexn&&(e.adler=pt(e.adler,i.pending_buf,i.pending-n,n)),r===0&&(i.status=Vo)}else i.status=Vo;if(i.status===Vo&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&sr(e),i.pending+2<=i.pending_buf_size&&(Re(i,e.adler&255),Re(i,e.adler>>8&255),e.adler=0,i.status=Cr)):i.status=Cr),i.pending!==0){if(sr(e),e.avail_out===0)return i.last_flush=-1,An}else if(e.avail_in===0&&w0(t)<=w0(s)&&t!==pr)return ur(e,El);if(i.status===Qi&&e.avail_in!==0)return ur(e,El);if(e.avail_in!==0||i.lookahead!==0||t!==Xr&&i.status!==Qi){let o=i.strategy===wo?ty(i,t):i.strategy===Fb?ey(i,t):es[i.level].func(i,t);if((o===Br||o===Bi)&&(i.status=Qi),o===dt||o===Br)return e.avail_out===0&&(i.last_flush=-1),An;if(o===Ws&&(t===Mb?Ob(i):t!==g0&&(Cb(i,0,0,!1),t===Nb&&(lr(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),sr(e),e.avail_out===0))return i.last_flush=-1,An}return t!==pr?An:i.wrap<=0?_0:(i.wrap===2?(Re(i,e.adler&255),Re(i,e.adler>>8&255),Re(i,e.adler>>16&255),Re(i,e.adler>>24&255),Re(i,e.total_in&255),Re(i,e.total_in>>8&255),Re(i,e.total_in>>16&255),Re(i,e.total_in>>24&255)):(Ki(i,e.adler>>>16),Ki(i,e.adler&65535)),sr(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?An:_0)},ay=e=>{if(!e||!e.state)return nn;const t=e.state.status;return t!==ja&&t!==gc&&t!==zo&&t!==Uo&&t!==Vo&&t!==Cr&&t!==Qi?ur(e,nn):(e.state=null,t===Cr?ur(e,Rb):An)},ly=(e,t)=>{let n=t.length;if(!e||!e.state)return nn;const r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==ja||r.lookahead)return nn;if(i===1&&(e.adler=Es(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(lr(r.head),r.strstart=0,r.block_start=0,r.insert=0);let l=new Uint8Array(r.w_size);l.set(t.subarray(n-r.w_size,n),0),t=l,n=r.w_size}const s=e.avail_in,o=e.next_in,a=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,jr(r);r.lookahead>=Ie;){let l=r.strstart,u=r.lookahead-(Ie-1);do r.ins_h=mr(r,r.ins_h,r.window[l+Ie-1]),r.prev[l&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=l,l++;while(--u);r.strstart=l,r.lookahead=Ie-1,jr(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=o,e.input=a,e.avail_in=s,r.wrap=i,An};var cy=sy,uy=Tp,dy=Cp,fy=Ip,hy=iy,py=oy,my=ay,gy=ly,_y="pako deflate (from Nodeca project)",cs={deflateInit:cy,deflateInit2:uy,deflateReset:dy,deflateResetKeep:fy,deflateSetHeader:hy,deflate:py,deflateEnd:my,deflateSetDictionary:gy,deflateInfo:_y};const wy=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var vy=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)wy(n,r)&&(e[r]=n[r])}}return e},xy=e=>{let t=0;for(let r=0,i=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;As[254]=As[254]=1;var by=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,s,o=e.length,a=0;for(i=0;i>>6,t[s++]=128|n&63):n<65536?(t[s++]=224|n>>>12,t[s++]=128|n>>>6&63,t[s++]=128|n&63):(t[s++]=240|n>>>18,t[s++]=128|n>>>12&63,t[s++]=128|n>>>6&63,t[s++]=128|n&63);return t};const yy=(e,t)=>{if(t<65534&&e.subarray&&Op)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r{const n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i;const s=new Array(n*2);for(i=0,r=0;r4){s[i++]=65533,r+=a-1;continue}for(o&=a===2?31:a===3?15:7;a>1&&r1){s[i++]=65533;continue}o<65536?s[i++]=o:(o-=65536,s[i++]=55296|o>>10&1023,s[i++]=56320|o&1023)}return yy(s,i)},Ey=(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+As[e[n]]>t?n:t},Ss={string2buf:by,buf2string:ky,utf8border:Ey};function Ay(){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 Mp=Ay;const Np=Object.prototype.toString,{Z_NO_FLUSH:Sy,Z_SYNC_FLUSH:Iy,Z_FULL_FLUSH:Cy,Z_FINISH:Ty,Z_OK:oa,Z_STREAM_END:Oy,Z_DEFAULT_COMPRESSION:My,Z_DEFAULT_STRATEGY:Ny,Z_DEFLATED:Ry}=qr;function qs(e){this.options=za.assign({level:My,method:Ry,chunkSize:16384,windowBits:15,memLevel:8,strategy:Ny},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 Mp,this.strm.avail_out=0;let n=cs.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==oa)throw new Error($r[n]);if(t.header&&cs.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=Ss.string2buf(t.dictionary):Np.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=cs.deflateSetDictionary(this.strm,r),n!==oa)throw new Error($r[n]);this._dict_set=!0}}qs.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,s;if(this.ended)return!1;for(t===~~t?s=t:s=t===!0?Ty:Sy,typeof e=="string"?n.input=Ss.string2buf(e):Np.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),(s===Iy||s===Cy)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=cs.deflate(n,s),i===Oy)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=cs.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===oa;if(n.avail_out===0){this.onData(n.output);continue}if(s>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};qs.prototype.onData=function(e){this.chunks.push(e)};qs.prototype.onEnd=function(e){e===oa&&(this.result=za.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function iu(e,t){const n=new qs(t);if(n.push(e,!0),n.err)throw n.msg||$r[n.err];return n.result}function Ly(e,t){return t=t||{},t.raw=!0,iu(e,t)}function Dy(e,t){return t=t||{},t.gzip=!0,iu(e,t)}var Fy=qs,Py=iu,$y=Ly,By=Dy,jy=qr,zy={Deflate:Fy,deflate:Py,deflateRaw:$y,gzip:By,constants:jy};const vo=30,Uy=12;var Vy=function(t,n){let r,i,s,o,a,l,u,c,d,f,h,_,g,p,m,v,y,x,b,k,E,S,C,A;const O=t.state;r=t.next_in,C=t.input,i=r+(t.avail_in-5),s=t.next_out,A=t.output,o=s-(n-t.avail_out),a=s+(t.avail_out-257),l=O.dmax,u=O.wsize,c=O.whave,d=O.wnext,f=O.window,h=O.hold,_=O.bits,g=O.lencode,p=O.distcode,m=(1<>>24,h>>>=x,_-=x,x=y>>>16&255,x===0)A[s++]=y&65535;else if(x&16){b=y&65535,x&=15,x&&(_>>=x,_-=x),_<15&&(h+=C[r++]<<_,_+=8,h+=C[r++]<<_,_+=8),y=p[h&v];n:for(;;){if(x=y>>>24,h>>>=x,_-=x,x=y>>>16&255,x&16){if(k=y&65535,x&=15,_l){t.msg="invalid distance too far back",O.mode=vo;break e}if(h>>>=x,_-=x,x=s-o,k>x){if(x=k-x,x>c&&O.sane){t.msg="invalid distance too far back",O.mode=vo;break e}if(E=0,S=f,d===0){if(E+=u-x,x2;)A[s++]=S[E++],A[s++]=S[E++],A[s++]=S[E++],b-=3;b&&(A[s++]=S[E++],b>1&&(A[s++]=S[E++]))}else{E=s-k;do A[s++]=A[E++],A[s++]=A[E++],A[s++]=A[E++],b-=3;while(b>2);b&&(A[s++]=A[E++],b>1&&(A[s++]=A[E++]))}}else if((x&64)===0){y=p[(y&65535)+(h&(1<>3,r-=b,_-=b<<3,h&=(1<<_)-1,t.next_in=r,t.next_out=s,t.avail_in=r{const l=a.bits;let u=0,c=0,d=0,f=0,h=0,_=0,g=0,p=0,m=0,v=0,y,x,b,k,E,S=null,C=0,A;const O=new Uint16Array(si+1),D=new Uint16Array(si+1);let L=null,W=0,U,M,$;for(u=0;u<=si;u++)O[u]=0;for(c=0;c=1&&O[f]===0;f--);if(h>f&&(h=f),f===0)return i[s++]=1<<24|64<<16|0,i[s++]=1<<24|64<<16|0,a.bits=1,0;for(d=1;d0&&(e===b0||f!==1))return-1;for(D[1]=0,u=1;uv0||e===y0&&m>x0)return 1;for(;;){U=u-g,o[c]A?(M=L[W+o[c]],$=S[C+o[c]]):(M=32+64,$=0),y=1<>g)+x]=U<<24|M<<16|$|0;while(x!==0);for(y=1<>=1;if(y!==0?(v&=y-1,v+=y):v=0,c++,--O[u]===0){if(u===f)break;u=t[n+o[c]]}if(u>h&&(v&k)!==b){for(g===0&&(g=h),E+=d,_=u-g,p=1<<_;_+gv0||e===y0&&m>x0)return 1;b=v&k,i[b]=h<<24|_<<16|E-s|0}}return v!==0&&(i[E+v]=u-g<<24|64<<16|0),a.bits=h,0};var us=Wy;const qy=0,Rp=1,Lp=2,{Z_FINISH:k0,Z_BLOCK:Xy,Z_TREES:xo,Z_OK:zr,Z_STREAM_END:Ky,Z_NEED_DICT:Jy,Z_STREAM_ERROR:rn,Z_DATA_ERROR:Dp,Z_MEM_ERROR:Fp,Z_BUF_ERROR:Qy,Z_DEFLATED:E0}=qr,Pp=1,A0=2,S0=3,I0=4,C0=5,T0=6,O0=7,M0=8,N0=9,R0=10,aa=11,Ln=12,Il=13,L0=14,Cl=15,D0=16,F0=17,P0=18,$0=19,bo=20,yo=21,B0=22,j0=23,z0=24,U0=25,V0=26,Tl=27,H0=28,G0=29,nt=30,$p=31,e8=32,t8=852,n8=592,r8=15,i8=r8,Z0=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function s8(){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 Bp=e=>{if(!e||!e.state)return rn;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=Pp,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(t8),t.distcode=t.distdyn=new Int32Array(n8),t.sane=1,t.back=-1,zr},jp=e=>{if(!e||!e.state)return rn;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Bp(e)},zp=(e,t)=>{let n;if(!e||!e.state)return rn;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15)?rn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,jp(e))},Up=(e,t)=>{if(!e)return rn;const n=new s8;e.state=n,n.window=null;const r=zp(e,t);return r!==zr&&(e.state=null),r},o8=e=>Up(e,i8);let Y0=!0,Ol,Ml;const a8=e=>{if(Y0){Ol=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(us(Rp,e.lens,0,288,Ol,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;us(Lp,e.lens,0,32,Ml,0,e.work,{bits:5}),Y0=!1}e.lencode=Ol,e.lenbits=9,e.distcode=Ml,e.distbits=5},Vp=(e,t,n,r)=>{let i;const s=e.state;return s.window===null&&(s.wsize=1<=s.wsize?(s.window.set(t.subarray(n-s.wsize,n),0),s.wnext=0,s.whave=s.wsize):(i=s.wsize-s.wnext,i>r&&(i=r),s.window.set(t.subarray(n-r,n-r+i),s.wnext),r-=i,r?(s.window.set(t.subarray(n-r,n),0),s.wnext=r,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave{let n,r,i,s,o,a,l,u,c,d,f,h,_,g,p=0,m,v,y,x,b,k,E,S;const C=new Uint8Array(4);let A,O;const D=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 rn;n=e.state,n.mode===Ln&&(n.mode=Il),o=e.next_out,i=e.output,l=e.avail_out,s=e.next_in,r=e.input,a=e.avail_in,u=n.hold,c=n.bits,d=a,f=l,S=zr;e:for(;;)switch(n.mode){case Pp:if(n.wrap===0){n.mode=Il;break}for(;c<16;){if(a===0)break e;a--,u+=r[s++]<>>8&255,n.check=pt(n.check,C,2,0),u=0,c=0,n.mode=A0;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=nt;break}if((u&15)!==E0){e.msg="unknown compression method",n.mode=nt;break}if(u>>>=4,c-=4,E=(u&15)+8,n.wbits===0)n.wbits=E;else if(E>n.wbits){e.msg="invalid window size",n.mode=nt;break}n.dmax=1<>8&1),n.flags&512&&(C[0]=u&255,C[1]=u>>>8&255,n.check=pt(n.check,C,2,0)),u=0,c=0,n.mode=S0;case S0:for(;c<32;){if(a===0)break e;a--,u+=r[s++]<>>8&255,C[2]=u>>>16&255,C[3]=u>>>24&255,n.check=pt(n.check,C,4,0)),u=0,c=0,n.mode=I0;case I0:for(;c<16;){if(a===0)break e;a--,u+=r[s++]<>8),n.flags&512&&(C[0]=u&255,C[1]=u>>>8&255,n.check=pt(n.check,C,2,0)),u=0,c=0,n.mode=C0;case C0:if(n.flags&1024){for(;c<16;){if(a===0)break e;a--,u+=r[s++]<>>8&255,n.check=pt(n.check,C,2,0)),u=0,c=0}else n.head&&(n.head.extra=null);n.mode=T0;case T0:if(n.flags&1024&&(h=n.length,h>a&&(h=a),h&&(n.head&&(E=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(s,s+h),E)),n.flags&512&&(n.check=pt(n.check,r,h,s)),a-=h,s+=h,n.length-=h),n.length))break e;n.length=0,n.mode=O0;case O0:if(n.flags&2048){if(a===0)break e;h=0;do E=r[s+h++],n.head&&E&&n.length<65536&&(n.head.name+=String.fromCharCode(E));while(E&&h>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Ln;break;case R0:for(;c<32;){if(a===0)break e;a--,u+=r[s++]<>>=c&7,c-=c&7,n.mode=Tl;break}for(;c<3;){if(a===0)break e;a--,u+=r[s++]<>>=1,c-=1,u&3){case 0:n.mode=L0;break;case 1:if(a8(n),n.mode=bo,t===xo){u>>>=2,c-=2;break e}break;case 2:n.mode=F0;break;case 3:e.msg="invalid block type",n.mode=nt}u>>>=2,c-=2;break;case L0:for(u>>>=c&7,c-=c&7;c<32;){if(a===0)break e;a--,u+=r[s++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=nt;break}if(n.length=u&65535,u=0,c=0,n.mode=Cl,t===xo)break e;case Cl:n.mode=D0;case D0:if(h=n.length,h){if(h>a&&(h=a),h>l&&(h=l),h===0)break e;i.set(r.subarray(s,s+h),o),a-=h,s+=h,l-=h,o+=h,n.length-=h;break}n.mode=Ln;break;case F0:for(;c<14;){if(a===0)break e;a--,u+=r[s++]<>>=5,c-=5,n.ndist=(u&31)+1,u>>>=5,c-=5,n.ncode=(u&15)+4,u>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=nt;break}n.have=0,n.mode=P0;case P0:for(;n.have>>=3,c-=3}for(;n.have<19;)n.lens[D[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,A={bits:n.lenbits},S=us(qy,n.lens,0,19,n.lencode,0,n.work,A),n.lenbits=A.bits,S){e.msg="invalid code lengths set",n.mode=nt;break}n.have=0,n.mode=$0;case $0:for(;n.have>>24,v=p>>>16&255,y=p&65535,!(m<=c);){if(a===0)break e;a--,u+=r[s++]<>>=m,c-=m,n.lens[n.have++]=y;else{if(y===16){for(O=m+2;c>>=m,c-=m,n.have===0){e.msg="invalid bit length repeat",n.mode=nt;break}E=n.lens[n.have-1],h=3+(u&3),u>>>=2,c-=2}else if(y===17){for(O=m+3;c>>=m,c-=m,E=0,h=3+(u&7),u>>>=3,c-=3}else{for(O=m+7;c>>=m,c-=m,E=0,h=11+(u&127),u>>>=7,c-=7}if(n.have+h>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=nt;break}for(;h--;)n.lens[n.have++]=E}}if(n.mode===nt)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=nt;break}if(n.lenbits=9,A={bits:n.lenbits},S=us(Rp,n.lens,0,n.nlen,n.lencode,0,n.work,A),n.lenbits=A.bits,S){e.msg="invalid literal/lengths set",n.mode=nt;break}if(n.distbits=6,n.distcode=n.distdyn,A={bits:n.distbits},S=us(Lp,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,A),n.distbits=A.bits,S){e.msg="invalid distances set",n.mode=nt;break}if(n.mode=bo,t===xo)break e;case bo:n.mode=yo;case yo:if(a>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=s,e.avail_in=a,n.hold=u,n.bits=c,Vy(e,f),o=e.next_out,i=e.output,l=e.avail_out,s=e.next_in,r=e.input,a=e.avail_in,u=n.hold,c=n.bits,n.mode===Ln&&(n.back=-1);break}for(n.back=0;p=n.lencode[u&(1<>>24,v=p>>>16&255,y=p&65535,!(m<=c);){if(a===0)break e;a--,u+=r[s++]<>x)],m=p>>>24,v=p>>>16&255,y=p&65535,!(x+m<=c);){if(a===0)break e;a--,u+=r[s++]<>>=x,c-=x,n.back+=x}if(u>>>=m,c-=m,n.back+=m,n.length=y,v===0){n.mode=V0;break}if(v&32){n.back=-1,n.mode=Ln;break}if(v&64){e.msg="invalid literal/length code",n.mode=nt;break}n.extra=v&15,n.mode=B0;case B0:if(n.extra){for(O=n.extra;c>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=j0;case j0:for(;p=n.distcode[u&(1<>>24,v=p>>>16&255,y=p&65535,!(m<=c);){if(a===0)break e;a--,u+=r[s++]<>x)],m=p>>>24,v=p>>>16&255,y=p&65535,!(x+m<=c);){if(a===0)break e;a--,u+=r[s++]<>>=x,c-=x,n.back+=x}if(u>>>=m,c-=m,n.back+=m,v&64){e.msg="invalid distance code",n.mode=nt;break}n.offset=y,n.extra=v&15,n.mode=z0;case z0:if(n.extra){for(O=n.extra;c>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=nt;break}n.mode=U0;case U0:if(l===0)break e;if(h=f-l,n.offset>h){if(h=n.offset-h,h>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=nt;break}h>n.wnext?(h-=n.wnext,_=n.wsize-h):_=n.wnext-h,h>n.length&&(h=n.length),g=n.window}else g=i,_=o-n.offset,h=n.length;h>l&&(h=l),l-=h,n.length-=h;do i[o++]=g[_++];while(--h);n.length===0&&(n.mode=yo);break;case V0:if(l===0)break e;i[o++]=n.length,l--,n.mode=yo;break;case Tl:if(n.wrap){for(;c<32;){if(a===0)break e;a--,u|=r[s++]<{if(!e||!e.state)return rn;let t=e.state;return t.window&&(t.window=null),e.state=null,zr},u8=(e,t)=>{if(!e||!e.state)return rn;const n=e.state;return(n.wrap&2)===0?rn:(n.head=t,t.done=!1,zr)},d8=(e,t)=>{const n=t.length;let r,i,s;return!e||!e.state||(r=e.state,r.wrap!==0&&r.mode!==aa)?rn:r.mode===aa&&(i=1,i=Es(i,t,n,0),i!==r.check)?Dp:(s=Vp(e,t,n,n),s?(r.mode=$p,Fp):(r.havedict=1,zr))};var f8=jp,h8=zp,p8=Bp,m8=o8,g8=Up,_8=l8,w8=c8,v8=u8,x8=d8,b8="pako inflate (from Nodeca project)",Bn={inflateReset:f8,inflateReset2:h8,inflateResetKeep:p8,inflateInit:m8,inflateInit2:g8,inflate:_8,inflateEnd:w8,inflateGetHeader:v8,inflateSetDictionary:x8,inflateInfo:b8};function y8(){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 k8=y8;const Hp=Object.prototype.toString,{Z_NO_FLUSH:E8,Z_FINISH:A8,Z_OK:Is,Z_STREAM_END:Nl,Z_NEED_DICT:Rl,Z_STREAM_ERROR:S8,Z_DATA_ERROR:W0,Z_MEM_ERROR:I8}=qr;function Xs(e){this.options=za.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 Mp,this.strm.avail_out=0;let n=Bn.inflateInit2(this.strm,t.windowBits);if(n!==Is)throw new Error($r[n]);if(this.header=new k8,Bn.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Ss.string2buf(t.dictionary):Hp.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Bn.inflateSetDictionary(this.strm,t.dictionary),n!==Is)))throw new Error($r[n])}Xs.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let s,o,a;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?A8:E8,Hp.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),s=Bn.inflate(n,o),s===Rl&&i&&(s=Bn.inflateSetDictionary(n,i),s===Is?s=Bn.inflate(n,o):s===W0&&(s=Rl));n.avail_in>0&&s===Nl&&n.state.wrap>0&&e[n.next_in]!==0;)Bn.inflateReset(n),s=Bn.inflate(n,o);switch(s){case S8:case W0:case Rl:case I8:return this.onEnd(s),this.ended=!0,!1}if(a=n.avail_out,n.next_out&&(n.avail_out===0||s===Nl))if(this.options.to==="string"){let l=Ss.utf8border(n.output,n.next_out),u=n.next_out-l,c=Ss.buf2string(n.output,l);n.next_out=u,n.avail_out=r-u,u&&n.output.set(n.output.subarray(l,l+u),0),this.onData(c)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(s===Is&&a===0)){if(s===Nl)return s=Bn.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};Xs.prototype.onData=function(e){this.chunks.push(e)};Xs.prototype.onEnd=function(e){e===Is&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=za.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function su(e,t){const n=new Xs(t);if(n.push(e),n.err)throw n.msg||$r[n.err];return n.result}function C8(e,t){return t=t||{},t.raw=!0,su(e,t)}var T8=Xs,O8=su,M8=C8,N8=su,R8=qr,L8={Inflate:T8,inflate:O8,inflateRaw:M8,ungzip:N8,constants:R8};const{Deflate:D8,deflate:F8,deflateRaw:P8,gzip:$8}=zy,{Inflate:B8,inflate:j8,inflateRaw:z8,ungzip:U8}=L8;var V8=D8,H8=F8,G8=P8,Z8=$8,Y8=B8,W8=j8,q8=z8,X8=U8,K8=qr,y4={Deflate:V8,deflate:H8,deflateRaw:G8,gzip:Z8,Inflate:Y8,inflate:W8,inflateRaw:q8,ungzip:X8,constants:K8};function ki(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 ko(e,t,n,r){const i=ki(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 Gp(e,t){try{return e()}catch{return t}}var X;(function(e){function t(c){return typeof c=="number"?c:void 0}e.readNumber=t;function n(c){return typeof c=="number"?Math.floor(c):void 0}e.readInt=n;function r(c){return typeof c=="string"?c:void 0}e.readString=r;function i(c){return typeof c=="boolean"?c:void 0}e.readBoolean=i;function s(c){return typeof c=="object"&&c!==null?c:void 0}e.readObject=s;function o(c,d){if(!!Array.isArray(c))return c.map(f=>d(f))}e.readArray=o;function a(c,d){var h;const f=(h=s(c))!=null?h:{};return Object.fromEntries(Object.entries(f).map(([_,g])=>[_,d(g)]))}e.readMap=a;function l(c,d,f){const h=d(c);return h?f(h):void 0}e.compose=l;function u(c,d){return typeof c!="string"?d[0]:d.includes(c)?c:d[0]}e.readEnum=u})(X||(X={}));function ds(e){let t=null;return()=>(t==null&&(t=e()),t)}function Ks(e,t,n){const r=e.get(t);if(r)return r;const i=n(t);return e.set(t,i),i}const or=class{constructor(t,n){T(this,"namespace");T(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}${or.SEPARATOR}${n}`);if(!n.match(/^[a-z0-9/._-]+$/))throw new Error(`Non [a-z0-9/._-] character in path of ${t}${or.SEPARATOR}${n}`)}equals(t){return this===t?!0:this.namespace===t.namespace&&this.path===t.path}toString(){return this.namespace+or.SEPARATOR+this.path}static create(t){return new or(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 or(r,i)}return new or(this.DEFAULT_NAMESPACE,t)}};let Pe=or;T(Pe,"DEFAULT_NAMESPACE","minecraft"),T(Pe,"SEPARATOR",":");const cn=class{constructor(t,n={}){T(this,"properties");T(this,"name");this.properties=n,this.name=typeof t=="string"?Pe.parse(t):t}getName(){return this.name}getProperties(){return this.properties}getProperty(t){return this.properties[t]}isFluid(){return this.is(cn.WATER)||this.is(cn.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=Pe.parse(ki(t.value,"Name","string")),r=Gp(()=>ki(t.value,"Properties","compound"),{}),i=Object.keys(r).reduce((s,o)=>Ae(ce({},s),{[o]:ki(r,o,"string")}),{});return new cn(n,i)}static fromJson(t){var s,o;const n=(s=X.readObject(t))!=null?s:{},r=Pe.parse((o=X.readString(n.Name))!=null?o:cn.STONE.name.toString()),i=X.readMap(n.Properties,a=>{var l;return(l=X.readString(a))!=null?l:""});return new cn(r,i)}};let Fe=cn;T(Fe,"AIR",new cn(Pe.create("air"))),T(Fe,"STONE",new cn(Pe.create("stone"))),T(Fe,"WATER",new cn(Pe.create("water"),{level:"0"})),T(Fe,"LAVA",new cn(Pe.create("lava"),{level:"0"}));const gi=class{constructor(t){T(this,"minY");T(this,"storage");T(this,"palette");this.minY=t,this.storage=Array(gi.SIZE).fill(0),this.palette=[Fe.AIR]}get minBlockY(){return this.minY<<4}index(t,n,r){return(t<<8)+(n<<4)+r}getBlockState(t,n,r){var s;const i=this.storage[this.index(t,n,r)];return(s=this.palette[i])!=null?s:Fe.AIR}setBlockState(t,n,r,i){let s=this.palette.findIndex(o=>o.equals(i));s===-1&&(s=this.palette.length,this.palette.push(i)),this.storage[this.index(t,n,r)]=s}};let mi=gi;T(mi,"WIDTH",16),T(mi,"SIZE",gi.WIDTH*gi.WIDTH*gi.WIDTH);class J8{constructor(t,n,r){T(this,"minY");T(this,"height");T(this,"pos");T(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 o;const[n,r,i]=t,s=this.sections[this.getSectionIndex(r)];return(o=s==null?void 0:s.getBlockState(n&15,r&15,i&15))!=null?o:Fe.AIR}setBlockState(t,n){const[r,i,s]=t,o=this.getSectionIndex(i);let a=this.sections[o];if(a===null){if(n.equals(Fe.AIR))return;a=this.getOrCreateSection(o)}a.setBlockState(r&15,i&15,s&15,n)}getOrCreateSection(t){return this.sections[t]==null&&(this.sections[t]=new mi(this.minSection+t)),this.sections[t]}}var Nt;(function(e){function t(c,d){return[c,d]}e.create=t;function n(c){return[c[0]>>4,c[2]>>4]}e.fromBlockPos=n;function r(c){return[Number(c)&4294967295,Number(c>>BigInt(32))]}e.fromLong=r;function i(c){return s(c[0],c[1])}e.toLong=i;function s(c,d){return BigInt(c&4294967295)|BigInt(d&4294967295)<typeof o=="string"?r(i,Pe.parse(o)):n(s(o))}e.parser=t;function n(i){return{value:()=>i,key:()=>{}}}e.direct=n;function r(i,s){return{value:()=>i.getOrThrow(s),key:()=>s}}e.reference=r})(Ur||(Ur={}));const ba=class{constructor(t,n){T(this,"key");T(this,"parser");T(this,"storage",new Map);T(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),Ur.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=>Pe.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(Pe.parse(n),r,this)}map(t){return[...this.storage.entries()].map(([n,r])=>t(Pe.parse(n),r,this))}};let Ei=ba;T(Ei,"REGISTRY",new ba(Pe.create("root")));class ou{constructor(t,n=[],r=[]){T(this,"size");T(this,"palette");T(this,"blocks");T(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 s=new Fe(n,r);let o=this.palette.findIndex(a=>a.equals(s));return o===-1&&(o=this.palette.length,this.palette.push(s)),this.blocks.push({pos:t,state:o,nbt:i}),this.blocksMap[t[0]*this.size[1]*this.size[2]+t[1]*this.size[2]+t[2]]={pos:t,state:o,nbt:i},this}getBlocks(){return this.blocks.map(t=>({pos:t.pos,state:this.palette[t.state],nbt:t.nbt}))}getBlock(t){if(!this.isInside(t))return null;const n=this.blocksMap[t[0]*this.size[1]*this.size[2]+t[1]*this.size[2]+t[2]];return n?{pos:n.pos,state:this.palette[n.state],nbt:n.nbt}:null}isInside(t){return t[0]>=0&&t[0]=0&&t[1]=0&&t[2]Fe.fromNbt({name:"",value:s})),i=ko(t.value,"blocks","compound").map(s=>{const o=ko(s,"pos","int",3),a=ki(s,"state","int"),l=Gp(()=>ki(s,"nbt","compound"),void 0);return{pos:o,state:a,nbt:l}});return new ou(n,r,i)}}function Dn(e){return e*e}function Cs(e,t,n){return Math.max(t,Math.min(n,e))}function Zn(e,t,n){return t+e*(n-t)}function la(e,t,n,r,i,s){return Zn(t,Zn(e,n,r),Zn(e,i,s))}function Zp(e,t,n,r,i,s,o,a,l,u,c){return Zn(n,la(e,t,r,i,s,o),la(e,t,a,l,u,c))}function fs(e,t,n){return e===0?t():e===1?n():t()+e*(n()-t())}function _c(e,t,n,r,i,s){return fs(t,()=>fs(e,n,r),()=>fs(e,i,s))}function Yp(e,t,n,r,i,s,o,a,l,u,c){return fs(n,()=>_c(e,t,r,i,s,o),()=>_c(e,t,a,l,u,c))}function Ua(e,t,n){return n<0?e:n>1?t:Zn(n,e,t)}function au(e,t,n){return(e-t)/(n-t)}function Ho(e){return e*e*e*(e*(e*6-15)+10)}function Ts(e,t,n,r,i){return Zn(au(e,t,n),r,i)}function Va(e,t,n,r,i){return Ua(r,i,au(e,t,n))}function Wp(e,t,n){let r=t-e;for(;r>0;){const i=Math.floor(r/2),s=e+i;if(n(s)){r=i;continue}e=s+1,r-=i+1}return e}function lu(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,s,o,a){return BigInt(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,s){var u,c,d,f;if(typeof i=="number")return new n(i);const o=(u=X.readObject(i))!=null?u:{},a=new r(s(o.coordinate)),l=(c=X.readArray(o.points,h=>{var _;return(_=X.readObject(h))!=null?_:{}}))!=null?c:[];if(l.length===0)return new n(0);for(const h of l){const _=(d=X.readNumber(h.location))!=null?d:0,g=t(h.value,s),p=(f=X.readNumber(h.derivative))!=null?f:0;a.addPoint(_,g,p)}return a}e.fromJson=t;class n{constructor(s){T(this,"value");this.value=s}compute(){return this.value}min(){return this.value}max(){return this.value}mapAll(){return this}calculateMinMax(){}}e.Constant=n;class r{constructor(s,o=[],a=[],l=[]){T(this,"coordinate");T(this,"locations");T(this,"values");T(this,"derivatives");T(this,"calculatedMin",Number.NEGATIVE_INFINITY);T(this,"calculatedMax",Number.POSITIVE_INFINITY);this.coordinate=s,this.locations=o,this.values=a,this.derivatives=l}compute(s){const o=this.coordinate.compute(s),a=Wp(0,this.locations.length,y=>oo.mapAll(s)),this.derivatives)}addPoint(s,o,a=0){return this.locations.push(s),this.values.push(typeof o=="number"?new e.Constant(o):o),this.derivatives.push(a),this}calculateMinMax(){if(!ua.is(this.coordinate))return;const s=this.locations.length-1;var o=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;const l=this.coordinate.minValue(),u=this.coordinate.maxValue();for(const d of this.values)d.calculateMinMax();if(lthis.locations[s]){const d=r.linearExtend(u,this.locations,this.values[s].min(),this.derivatives,s),f=r.linearExtend(u,this.locations,this.values[s].max(),this.derivatives,s);o=Math.min(o,Math.min(d,f)),a=Math.max(a,Math.max(d,f))}for(const d of this.values)o=Math.min(o,d.min()),a=Math.max(a,d.max());for(var c=0;c>>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;r0;n--)r.push(Math.floor(Math.random()*256));return r},bytesToWords:function(n){for(var r=[],i=0,s=0;i>>5]|=n[i]<<24-s%32;return r},wordsToBytes:function(n){for(var r=[],i=0;i>>5]>>>24-i%32&255);return r},bytesToHex:function(n){for(var r=[],i=0;i>>4).toString(16)),r.push((n[i]&15).toString(16));return r.join("")},hexToBytes:function(n){for(var r=[],i=0;i>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var r=[],i=0,s=0;i>>6-s*2);return r}};Xp.exports=t})();var wc={utf8:{stringToBytes:function(e){return wc.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(wc.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n * @license MIT */var t3=function(e){return e!=null&&(Kp(e)||n3(e)||!!e._isBuffer)};function Kp(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function n3(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&Kp(e.slice(0,0))}(function(){var e=Xp.exports,t=q0.utf8,n=t3,r=q0.bin,i=function(s,o){s.constructor==String?o&&o.encoding==="binary"?s=r.stringToBytes(s):s=t.stringToBytes(s):n(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var a=e.bytesToWords(s),l=s.length*8,u=1732584193,c=-271733879,d=-1732584194,f=271733878,h=0;h>>24)&16711935|(a[h]<<24|a[h]>>>8)&4278255360;a[l>>>5]|=128<>>9<<4)+14]=l;for(var _=i._ff,g=i._gg,p=i._hh,m=i._ii,h=0;h>>0,c=c+y>>>0,d=d+x>>>0,f=f+b>>>0}return e.endian([u,c,d,f])};i._ff=function(s,o,a,l,u,c,d){var f=s+(o&a|~o&l)+(u>>>0)+d;return(f<>>32-c)+o},i._gg=function(s,o,a,l,u,c,d){var f=s+(o&l|a&~l)+(u>>>0)+d;return(f<>>32-c)+o},i._hh=function(s,o,a,l,u,c,d){var f=s+(o^a^l)+(u>>>0)+d;return(f<>>32-c)+o},i._ii=function(s,o,a,l,u,c,d){var f=s+(a^(o|~l))+(u>>>0)+d;return(f<>>32-c)+o},i._blocksize=16,i._digestsize=16,qp.exports=function(s,o){if(s==null)throw new Error("Illegal argument "+s);var a=e.wordsToBytes(i(s,o));return o&&o.asBytes?a:o&&o.asString?r.bytesToString(a):e.bytesToHex(a)}})();var Jp=qp.exports;const un=class{constructor(t){T(this,"seed",BigInt(0));this.setSeed(t)}fork(){return new un(this.nextLong())}forkPositional(){return new Qp(this.nextLong())}setSeed(t){this.seed=t^un.MULTIPLIER&un.MODULUS_MASK}advance(){this.seed=this.seed*un.MULTIPLIER+un.INCREMENT&un.MODULUS_MASK}consume(t){for(let n=0;n>BigInt(un.MODULUS_BITS-t));return n>2147483647?n-4294967296:n}nextInt(t){if(t===void 0)return this.next(32);if((t&t-1)==0)return Number(BigInt(t)*BigInt(this.next(31))>>BigInt(31));let n,r;for(;(n=this.next(31))-(r=n%t)+(t-1)<0;);return r}nextLong(){return(BigInt(this.next(32))<>pe.BIGINT_30)*pe.STAFFORD_1&pe.MAX_ULONG,t=(t^t>>pe.BIGINT_27)*pe.STAFFORD_2&pe.MAX_ULONG,(t^t>>pe.BIGINT_31)&pe.MAX_ULONG}static upgradeSeedTo128bit(t){t<0&&(t+=pe.POW2_60);const n=t^pe.SILVER_RATIO_64,r=n+pe.GOLDEN_RATIO_64&pe.MAX_ULONG;return[pe.mixStafford13(n),pe.mixStafford13(r)]}static rotateLeft(t,n){return t<>pe.BIGINT_64-n}setSeed(t){this.seed=pe.upgradeSeedTo128bit(t)}fork(){return new pe([this.next(),this.next()])}forkPositional(){return new em(this.next(),this.next())}next(){const t=this.seed[0];let n=this.seed[1];const r=pe.rotateLeft(t+n&pe.MAX_ULONG,pe.BIGINT_17)+t&pe.MAX_ULONG;return n^=t,this.seed=[pe.rotateLeft(t,pe.BIGINT_49)^n^n<pe.POW2_63&&(t-=pe.POW2_60),t}consume(t){let n=this.seed[0],r=this.seed[1];for(let i=0;i>BigInt(64-t)}nextInt(t){let n=this.next()&pe.MAX_UINT;if(t){const r=BigInt(t);let i=n*r,s=i&pe.MAX_UINT;if(s>pe.BIGINT_32;return Number(o)}else{let r=Number(n);return r>=2147483648&&(r-=4294967296),r}}nextFloat(){return Number(this.nextBits(24))*pe.FLOAT_MULTIPLIER}nextDouble(){return Number(this.nextBits(53))*pe.DOUBLE_MULTIPLIER}parityConfigString(){return"seedLo: "+this.seed[0]+", seedHi: "+this.seed[1]}};let Ve=pe;T(Ve,"SILVER_RATIO_64",BigInt("7640891576956012809")),T(Ve,"GOLDEN_RATIO_64",BigInt("-7046029254386353131")),T(Ve,"FLOAT_MULTIPLIER",1/Math.pow(2,24)),T(Ve,"DOUBLE_MULTIPLIER",11102230246251565e-32),T(Ve,"BIGINT_1",BigInt(1)),T(Ve,"BIGINT_17",BigInt(17)),T(Ve,"BIGINT_21",BigInt(21)),T(Ve,"BIGINT_27",BigInt(27)),T(Ve,"BIGINT_28",BigInt(28)),T(Ve,"BIGINT_30",BigInt(30)),T(Ve,"BIGINT_31",BigInt(31)),T(Ve,"BIGINT_32",BigInt(32)),T(Ve,"BIGINT_49",BigInt(49)),T(Ve,"BIGINT_64",BigInt(64)),T(Ve,"STAFFORD_1",BigInt("-4658895280553007687")),T(Ve,"STAFFORD_2",BigInt("-7723592293110705685")),T(Ve,"MAX_ULONG",BigInt("0xFFFFFFFFFFFFFFFF")),T(Ve,"POW2_60",BigInt("0x10000000000000000")),T(Ve,"POW2_63",BigInt("0x8000000000000000")),T(Ve,"MAX_UINT",BigInt(4294967295));class em{constructor(t,n){T(this,"seedLo");T(this,"seedHi");this.seedLo=t,this.seedHi=n}at(t,n,r){const s=lu(t,n,r)^this.seedLo;return new Ve([s,this.seedHi])}fromHashOf(t){const n=Jp(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 Ve([r^this.seedLo,i^this.seedHi])}seedKey(){return[this.seedLo,this.seedHi]}}const kn=class{constructor(t){T(this,"p");T(this,"xo");T(this,"yo");T(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,s;const o=(t+n)*kn.F2,a=Math.floor(t+o),l=a-(r=(a+(i=Math.floor(n+o)))*kn.G2),u=t-l;let c,d;u>(s=n-(i-r))?(c=1,d=0):(c=0,d=1);const f=u-c+kn.G2,h=s-d+kn.G2,_=u-1+2*kn.G2,g=s-1+2*kn.G2,p=a&255,m=i&255,v=this.P(p+this.P(m))%12,y=this.P(p+c+this.P(m+d))%12,x=this.P(p+1+this.P(m+1))%12,b=this.getCornerNoise3D(v,u,s,0,.5),k=this.getCornerNoise3D(y,f,h,0,.5),E=this.getCornerNoise3D(x,_,g,0,.5);return 70*(b+k+E)}sample(t,n,r){const i=(t+n+r)*.3333333333333333,s=Math.floor(t+i),o=Math.floor(n+i),a=Math.floor(r+i),l=(s+o+a)*.16666666666666666,u=t-(s-l),c=n-(o-l),d=r-(a-l);let f,h,_,g,p,m;u>=c?c>=d?(f=1,h=0,_=0,g=1,p=1,m=0):u>=d?(f=1,h=0,_=0,g=1,p=0,m=1):(f=0,h=0,_=1,g=1,p=0,m=1):c127?n-256:n;for(let n=0;n<256;n+=1){const r=t.nextInt(256-n),i=this.p[n];this.p[n]=this.p[n+r],this.p[n+r]=i}}sample(t,n,r,i=0,s=0){const o=t+this.xo,a=n+this.yo,l=r+this.zo,u=Math.floor(o),c=Math.floor(a),d=Math.floor(l),f=o-u,h=a-c,_=l-d;let g=0;if(i!==0){const p=s>=0&&s=0;i-=1)i0&&(f=this.maxLimitNoise.getOctaveNoise(m))&&(p+=f.sample(v,y,x,b,s*_)/_),_/=2}return Ua(g/512,p/512,h)/128}}const hs=class{constructor(t,{firstOctave:n,amplitudes:r}){T(this,"valueFactor");T(this,"first");T(this,"second");T(this,"maxValue");this.first=new Ze(t,n,r),this.second=new Ze(t,n,r);let i=1/0,s=-1/0;for(let a=0;a{var u;return(u=X.readNumber(l))!=null?u:0}))!=null?a:[]}}e.fromJson=n})(Vr||(Vr={}));class r3{constructor(t,n){T(this,"noiseLevels");T(this,"highestFreqInputFactor");T(this,"highestFreqValueFactor");const r=n[n.length-1],s=-n[0]+r+1,o=new Set(n),a=new St(t);this.noiseLevels=Array(s),r>=0&&r=0&&o.has(r-l)?this.noiseLevels[l]=new St(t):t.consume(262);if(r>0)throw new Error("Positive octaves are not allowed");this.highestFreqInputFactor=Math.pow(2,r),this.highestFreqValueFactor=1/(Math.pow(2,s)-1)}sample(t,n,r){let i=0,s=this.highestFreqInputFactor,o=this.highestFreqValueFactor;for(let a=0;aye.fromJson(n));function t(n,r){const i=new Ei(Pe.create(n),r);return Ei.REGISTRY.register(i.key,i),i}})(Hr||(Hr={}));class ye{minValue(){return-this.maxValue()}mapAll(t){return t.map(this)}}(function(e){function t(Q,R,I){return{x:Q,y:R,z:I}}e.context=t;class n extends e{constructor(I){super();T(this,"input");this.input=I}compute(I){return this.transform(I,this.input.compute(I))}}const r=Ur.parser(Hr.NOISE,Vr.fromJson);function i(Q,R=i){var B,q,ie,j,J,ge,we,We,He,Ke,vt,Ce,je,ze,ae,wn,Ue,Ne,tt,xt;if(typeof Q=="string")return new o(Ur.reference(Hr.DENSITY_FUNCTION,Pe.parse(Q)));if(typeof Q=="number")return new s(Q);const I=(B=X.readObject(Q))!=null?B:{},N=(q=X.readString(I.type))==null?void 0:q.replace(/^minecraft:/,"");switch(N){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 l((ie=X.readNumber(I.xz_scale))!=null?ie:1,(j=X.readNumber(I.y_scale))!=null?j:1,(J=X.readNumber(I.xz_factor))!=null?J:80,(ge=X.readNumber(I.y_factor))!=null?ge:160,(we=X.readNumber(I.smear_scale_multiplier))!=null?we:8);case"flat_cache":return new c(R(I.argument));case"interpolated":return new _(R(I.argument));case"cache_2d":return new f(R(I.argument));case"cache_once":return new h(R(I.argument));case"cache_all_in_cell":return new d(R(I.argument));case"noise":return new g((We=X.readNumber(I.xz_scale))!=null?We:1,(He=X.readNumber(I.y_scale))!=null?He:1,r(I.noise));case"end_islands":return new p;case"weird_scaled_sampler":return new v(R(I.input),X.readEnum(I.rarity_value_mapper,m),r(I.noise));case"shifted_noise":return new y(R(I.shift_x),R(I.shift_y),R(I.shift_z),(Ke=X.readNumber(I.xz_scale))!=null?Ke:1,(vt=X.readNumber(I.y_scale))!=null?vt:1,r(I.noise));case"range_choice":return new x(R(I.input),(Ce=X.readNumber(I.min_inclusive))!=null?Ce:0,(je=X.readNumber(I.max_exclusive))!=null?je:1,R(I.when_in_range),R(I.when_out_of_range));case"shift_a":return new k(r(I.argument));case"shift_b":return new E(r(I.argument));case"shift":return new S(r(I.argument));case"blend_density":return new C(R(I.argument));case"clamp":return new A(R(I.input),(ze=X.readNumber(I.min))!=null?ze:0,(ae=X.readNumber(I.max))!=null?ae:1);case"abs":case"square":case"cube":case"half_negative":case"quarter_negative":case"squeeze":return new O(N,R(I.argument));case"add":case"mul":case"min":case"max":return new L(X.readEnum(N,D),R(I.argument1),R(I.argument2));case"spline":return new W(da.fromJson(I.spline,R));case"constant":return new s((wn=X.readNumber(I.argument))!=null?wn:0);case"y_clamped_gradient":return new U((Ue=X.readInt(I.from_y))!=null?Ue:-4064,(Ne=X.readInt(I.to_y))!=null?Ne:4062,(tt=X.readNumber(I.from_value))!=null?tt:-4064,(xt=X.readNumber(I.to_value))!=null?xt:4062)}return s.ZERO}e.fromJson=i;const M=class extends e{constructor(I){super();T(this,"value");this.value=I}compute(){return this.value}minValue(){return this.value}maxValue(){return this.value}};let s=M;T(s,"ZERO",new M(0)),T(s,"ONE",new M(1)),e.Constant=s;class o extends e{constructor(I){super();T(this,"holder");this.holder=I}compute(I){return this.holder.value().compute(I)}minValue(){return this.holder.value().minValue()}maxValue(){return this.holder.value().maxValue()}}e.HolderHolder=o;class a extends e.Constant{constructor(I,N,B){super(I);T(this,"min");T(this,"max");this.min=N,this.max=B}minValue(){return this.min}maxValue(){return this.max}}e.ConstantMinMax=a;class l extends e{constructor(I,N,B,q,ie,j){super();T(this,"xzScale");T(this,"yScale");T(this,"xzFactor");T(this,"yFactor");T(this,"smearScaleMultiplier");T(this,"blendedNoise");this.xzScale=I,this.yScale=N,this.xzFactor=B,this.yFactor=q,this.smearScaleMultiplier=ie,this.blendedNoise=j}compute(I){var N,B;return(B=(N=this.blendedNoise)==null?void 0:N.sample(I.x,I.y,I.z))!=null?B:0}maxValue(){var I,N;return(N=(I=this.blendedNoise)==null?void 0:I.maxValue)!=null?N:0}}e.OldBlendedNoise=l;class u extends e{constructor(I){super();T(this,"wrapped");this.wrapped=I}minValue(){return this.wrapped.minValue()}maxValue(){return this.wrapped.maxValue()}}class c extends u{constructor(I){super(I);T(this,"lastQuartX");T(this,"lastQuartZ");T(this,"lastValue",0)}compute(I){const N=I.x>>2,B=I.z>>2;return(this.lastQuartX!==N||this.lastQuartZ!==B)&&(this.lastValue=this.wrapped.compute(e.context(N<<2,0,B<<2)),this.lastQuartX=N,this.lastQuartZ=B),this.lastValue}mapAll(I){return I.map(new c(this.wrapped.mapAll(I)))}}e.FlatCache=c;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(I){super(I);T(this,"lastBlockX");T(this,"lastBlockZ");T(this,"lastValue",0)}compute(I){const N=I.x,B=I.z;return(this.lastBlockX!==N||this.lastBlockZ!==B)&&(this.lastValue=this.wrapped.compute(I),this.lastBlockX=N,this.lastBlockZ=B),this.lastValue}mapAll(I){return I.map(new f(this.wrapped.mapAll(I)))}}e.Cache2D=f;class h extends u{constructor(I){super(I);T(this,"lastBlockX");T(this,"lastBlockY");T(this,"lastBlockZ");T(this,"lastValue",0)}compute(I){const N=I.x,B=I.y,q=I.z;return(this.lastBlockX!==N||this.lastBlockY!==B||this.lastBlockZ!==q)&&(this.lastValue=this.wrapped.compute(I),this.lastBlockX=N,this.lastBlockY=B,this.lastBlockZ=q),this.lastValue}mapAll(I){return I.map(new h(this.wrapped.mapAll(I)))}}e.CacheOnce=h;class _ extends u{constructor(I,N=4,B=4){super(I);T(this,"cellWidth");T(this,"cellHeight");T(this,"values");this.cellWidth=N,this.cellHeight=B,this.values=new Map}compute({x:I,y:N,z:B}){const q=this.cellWidth,ie=this.cellHeight,j=(I%q+q)%q/q,J=(N%ie+ie)%ie/ie,ge=(B%q+q)%q/q,we=Math.floor(I/q)*q,We=Math.floor(N/ie)*ie,He=Math.floor(B/q)*q;return Yp(j,J,ge,()=>this.computeCorner(we,We,He),()=>this.computeCorner(we+q,We,He),()=>this.computeCorner(we,We+ie,He),()=>this.computeCorner(we+q,We+ie,He),()=>this.computeCorner(we,We,He+q),()=>this.computeCorner(we+q,We,He+q),()=>this.computeCorner(we,We+ie,He+q),()=>this.computeCorner(we+q,We+ie,He+q))}computeCorner(I,N,B){return Ks(this.values,`${I} ${N} ${B}`,()=>this.wrapped.compute(e.context(I,N,B)))}mapAll(I){return I.map(new _(this.wrapped.mapAll(I)))}withCellSize(I,N){return new _(this.wrapped,I,N)}}e.Interpolated=_;class g extends e{constructor(I,N,B,q){super();T(this,"xzScale");T(this,"yScale");T(this,"noiseData");T(this,"noise");this.xzScale=I,this.yScale=N,this.noiseData=B,this.noise=q}compute(I){var N,B;return(B=(N=this.noise)==null?void 0:N.sample(I.x*this.xzScale,I.y*this.yScale,I.z*this.xzScale))!=null?B:0}maxValue(){var I,N;return(N=(I=this.noise)==null?void 0:I.maxValue)!=null?N:2}}e.Noise=g;class p extends e{compute(){return 0}minValue(){return-.84375}maxValue(){return .5625}}const m=["type_1","type_2"],$=class extends n{constructor(I,N,B,q){super(I);T(this,"rarityValueMapper");T(this,"noiseData");T(this,"noise");T(this,"mapper");this.rarityValueMapper=N,this.noiseData=B,this.noise=q,this.mapper=$.ValueMapper[this.rarityValueMapper]}transform(I,N){if(!this.noise)return 0;const B=this.mapper(N);return B*Math.abs(this.noise.sample(I.x/B,I.y/B,I.z/B))}mapAll(I){return I.map(new $(this.input.mapAll(I),this.rarityValueMapper,this.noiseData,this.noise))}minValue(){return 0}maxValue(){return this.rarityValueMapper==="type_1"?2:3}static rarityValueMapper1(I){return I<-.5?.75:I<0?1:I<.5?1.5:2}static rarityValueMapper2(I){return I<-.75?.5:I<-.5?.75:I<.5?1:I<.75?2:3}};let v=$;T(v,"ValueMapper",{type_1:$.rarityValueMapper1,type_2:$.rarityValueMapper2}),e.WeirdScaledSampler=v;class y extends g{constructor(I,N,B,q,ie,j,J){super(q,ie,j,J);T(this,"shiftX");T(this,"shiftY");T(this,"shiftZ");this.shiftX=I,this.shiftY=N,this.shiftZ=B}compute(I){var ie,j;const N=I.x*this.xzScale+this.shiftX.compute(I),B=I.y*this.yScale+this.shiftY.compute(I),q=I.z*this.xzScale+this.shiftZ.compute(I);return(j=(ie=this.noise)==null?void 0:ie.sample(N,B,q))!=null?j:0}mapAll(I){return I.map(new y(this.shiftX.mapAll(I),this.shiftY.mapAll(I),this.shiftZ.mapAll(I),this.xzScale,this.yScale,this.noiseData,this.noise))}}e.ShiftedNoise=y;class x extends e{constructor(I,N,B,q,ie){super();T(this,"input");T(this,"minInclusive");T(this,"maxExclusive");T(this,"whenInRange");T(this,"whenOutOfRange");this.input=I,this.minInclusive=N,this.maxExclusive=B,this.whenInRange=q,this.whenOutOfRange=ie}compute(I){const N=this.input.compute(I);return this.minInclusive<=N&&NMath.abs(I),square:I=>I*I,cube:I=>I*I*I,half_negative:I=>I>0?I:I*.5,quarter_negative:I=>I>0?I:I*.25,squeeze:I=>{const N=Cs(I,-1,1);return N/2-N*N*N/24}}),e.Mapped=O;const D=["add","mul","min","max"];class L extends e{constructor(I,N,B,q,ie){super();T(this,"type");T(this,"argument1");T(this,"argument2");T(this,"min");T(this,"max");this.type=I,this.argument1=N,this.argument2=B,this.min=q,this.max=ie}compute(I){const N=this.argument1.compute(I);switch(this.type){case"add":return N+this.argument2.compute(I);case"mul":return N===0?0:N*this.argument2.compute(I);case"min":return Nthis.argument2.maxValue()?N:Math.max(N,this.argument2.compute(I))}}mapAll(I){return I.map(new L(this.type,this.argument1.mapAll(I),this.argument2.mapAll(I)))}minValue(){var I;return(I=this.min)!=null?I:-1/0}maxValue(){var I;return(I=this.max)!=null?I:1/0}withMinMax(){const I=this.argument1.minValue(),N=this.argument2.minValue(),B=this.argument1.maxValue(),q=this.argument2.maxValue();(this.type==="min"||this.type==="max")&&(I>=q||N>=B)&&console.warn(`Creating a ${this.type} function between two non-overlapping inputs`);let ie,j;switch(this.type){case"add":ie=I+N,j=B+q;break;case"mul":ie=I>0&&N>0?I*N||0:B<0&&q<0?B*q||0:Math.min(I*q||0,N*B||0),j=I>0&&N>0?B*q||0:B<0&&q<0?I*N||0:Math.max(I*N||0,B*q||0);break;case"min":ie=Math.min(I,N),j=Math.min(B,q);break;case"max":ie=Math.max(I,N),j=Math.max(B,q);break}return new L(this.type,this.argument1,this.argument2,ie,j)}}e.Ap2=L;class W extends e{constructor(I){super();T(this,"spline");this.spline=I}compute(I){return this.spline.compute(I)}mapAll(I){const N=this.spline.mapAll(B=>B instanceof e?B.mapAll(I):B);return N.calculateMinMax(),I.map(new W(N))}minValue(){return this.spline.min()}maxValue(){return this.spline.max()}}e.Spline=W;class U extends e{constructor(I,N,B,q){super();T(this,"fromY");T(this,"toY");T(this,"fromValue");T(this,"toValue");this.fromY=I,this.toY=N,this.fromValue=B,this.toValue=q}compute(I){return Va(I.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=U})(ye||(ye={}));class Os{constructor(t,n){T(this,"level");T(this,"type");this.level=t,this.type=n}at(t){return t0))return n(r,i,s).at(i)}}}e.createDisabled=t})(fa||(fa={}));const Jt=class{constructor(t,n,r,i,s,o,a,l,u,c){T(this,"noiseChunk");T(this,"barrierNoise");T(this,"fluidLevelFloodednessNoise");T(this,"fluidLevelSpreadNoise");T(this,"lavaNoise");T(this,"random");T(this,"globalFluidPicker");T(this,"minGridX");T(this,"minGridY");T(this,"minGridZ");T(this,"gridSizeX");T(this,"gridSizeZ");T(this,"gridSize");T(this,"aquiferCache");T(this,"aquiferLocationCache");this.noiseChunk=t,this.barrierNoise=r,this.fluidLevelFloodednessNoise=i,this.fluidLevelSpreadNoise=s,this.lavaNoise=o,this.random=a,this.globalFluidPicker=c,this.minGridX=this.gridX(Nt.minBlockX(n))-1,this.gridSizeX=this.gridX(Nt.maxBlockX(n))+1-this.minGridX+1,this.minGridY=this.gridY(l)-1,this.minGridZ=this.gridZ(Nt.minBlockZ(n))-1,this.gridSizeZ=this.gridZ(Nt.maxBlockZ(n))+1-this.minGridZ+1;const d=this.gridY(l+u)+1-this.minGridY+1;this.gridSize=this.gridSizeX*d*this.gridSizeZ,this.aquiferCache=Array(this.gridSize).fill(void 0),this.aquiferLocationCache=Array(this.gridSize).fill(Ft.ZERO)}compute({x:t,y:n,z:r},i){if(i<=0){if(this.globalFluidPicker(t,n,r).at(n).is(Fe.LAVA))return Fe.LAVA;{const s=this.gridX(t-5),o=this.gridY(n+1),a=this.gridZ(r-5);let l=Number.MAX_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,c=Number.MAX_SAFE_INTEGER,d=Ft.ZERO,f=Ft.ZERO,h=Ft.ZERO;for(let b=0;b<=1;b+=1)for(let k=-1;k<=1;k+=1)for(let E=0;E<=1;E+=1){const S=this.getLocation(s+b,o+k,a+E),C=Ft.magnitude(S);l>=C?(h=f,f=d,d=S,c=u,u=l,l=C):u>=C?(h=f,f=S,c=u,u=C):c>=C&&(h=S,c=C)}const _=this.getStatus(d),g=this.getStatus(f),p=this.getStatus(h),m=Jt.similarity(l,u),v=Jt.similarity(l,c),y=Jt.similarity(u,c);let x;if(_.at(n).is(Fe.WATER)&&this.globalFluidPicker(t,n-1,r).at(n-1).is(Fe.LAVA))x=1;else if(m>-1){const b=ds(()=>this.barrierNoise.compute(ye.context(t,n*.5,r))),k=this.calculatePressure(n,_,g,b),E=this.calculatePressure(n,_,p,b),S=this.calculatePressure(n,g,p,b),C=Math.max(k,E*Math.max(0,v),S*Math.max(y));x=Math.max(0,2*Math.max(0,m)*C)}else x=0;if(i+x<=0)return _.at(n)}}}static similarity(t,n){return 1-Math.abs(n-t)/25}calculatePressure(t,n,r,i){const s=n.at(t),o=r.at(t);if(s.is(Fe.LAVA)&&o.is(Fe.WATER)||s.is(Fe.WATER)&&o.is(Fe.LAVA))return 1;const a=Math.abs(n.level-r.level);if(a===0)return 0;const l=(n.level+r.level)/2,u=t+.5-l,c=a/2-Math.abs(u),d=u>0?c>0?c/1.5:c/2.5:c>-3?(c+3)/3:(c+3)/10;return d<-2||d>2?d:d+i()}getStatus(t){const[n,r,i]=t,s=this.getIndex(this.gridX(n),this.gridY(r),this.gridZ(i)),o=this.aquiferCache[s];if(o!==void 0)return o;const a=this.computeStatus(n,r,i);return this.aquiferCache[s]=a,a}computeStatus(t,n,r){const i=this.globalFluidPicker(t,n,r);let s=Number.MAX_SAFE_INTEGER,o=!1;for(const[_,g]of Jt.SURFACE_SAMPLING){const p=t+(g<<4),m=r+(g<<4),v=this.noiseChunk.getPreliminarySurfaceLevel(p,m);s=Math.min(s,v);const y=_===0&&g===0;if(y&&n-12>v+8)return i;if(y||n+12>v+8){const x=this.globalFluidPicker(p,v+8,m);if(!x.at(v+8).is(Fe.AIR)){if(y)return x;o=!0}}}const a=o?Va(s+8-n,0,64,1,0):0,l=Cs(this.fluidLevelFloodednessNoise.compute(ye.context(t,n*.67,r)),-1,1);if(l>Ts(a,1,0,-.3,.8))return i;if(l<=Ts(a,1,0,-.8,.4))return new Os(Number.MIN_SAFE_INTEGER,i.type);const u=Math.floor(n/40),c=this.fluidLevelSpreadNoise.compute(ye.context(Math.floor(t/16),u,Math.floor(r/16))),d=u*40+20+Math.floor(c/3)*3,f=Math.min(s,d),h=this.getFluidType(t,n,r,i.type,d);return new Os(f,h)}getFluidType(t,n,r,i,s){if(s<=-10){const o=this.lavaNoise.compute(ye.context(Math.floor(t/64),Math.floor(n/40),Math.floor(r/64)));if(Math.abs(o)>.3)return Fe.LAVA}return i}getLocation(t,n,r){const i=this.getIndex(t,n,r),s=this.aquiferLocationCache[i];if(Ft.equals(s,Ft.ZERO))return s;const o=this.random.at(t,n,r),a=Ft.create(t*Jt.X_SPACING+o.nextInt(10),n*Jt.Y_SPACING+o.nextInt(9),r*Jt.Z_SPACING+o.nextInt(10));return this.aquiferLocationCache[i]=a,a}getIndex(t,n,r){const i=t-this.minGridX,s=n-this.minGridY,o=r-this.minGridZ,a=(s*this.gridSizeZ+o)*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/Jt.X_SPACING)}gridY(t){return Math.floor(t/Jt.Y_SPACING)}gridZ(t){return Math.floor(t/Jt.Z_SPACING)}};let Er=Jt;T(Er,"X_SPACING",16),T(Er,"Y_SPACING",12),T(Er,"Z_SPACING",16),T(Er,"SURFACE_SAMPLING",[[-2,-1],[-1,-1],[0,-1],[1,-1],[-3,0],[-2,0],[-1,0],[0,0],[1,0],[-2,1],[-1,1],[0,1],[1,1]]);var Ms;(function(e){function n(g,p,m,v,y,x){return new a(g,p,m,v,y,x)}e.target=n;function r(g,p,m,v,y,x,b){return new o(i(g),i(p),i(m),i(v),i(y),i(x),b)}e.parameters=r;function i(g,p){return typeof g=="number"?new s(g,p!=null?p:g):g}e.param=i;class s{constructor(p,m){T(this,"min");T(this,"max");this.min=p,this.max=m}distance(p){const m=(typeof p=="number"?p:p.min)-this.max,v=this.min-(typeof p=="number"?p:p.max);return m>0?m:Math.max(v,0)}union(p){return new s(Math.min(this.min,p.min),Math.max(this.max,p.max))}static fromJson(p){var y;if(typeof p=="number")return new s(p,p);const[m,v]=(y=X.readArray(p,x=>X.readNumber(x)))!=null?y:[];return new s(m!=null?m:0,v!=null?v:0)}}e.Param=s;class o{constructor(p,m,v,y,x,b,k){T(this,"temperature");T(this,"humidity");T(this,"continentalness");T(this,"erosion");T(this,"depth");T(this,"weirdness");T(this,"offset");this.temperature=p,this.humidity=m,this.continentalness=v,this.erosion=y,this.depth=x,this.weirdness=b,this.offset=k}fittness(p){return Dn(this.temperature.distance(p.temperature))+Dn(this.humidity.distance(p.humidity))+Dn(this.continentalness.distance(p.continentalness))+Dn(this.erosion.distance(p.erosion))+Dn(this.depth.distance(p.depth))+Dn(this.weirdness.distance(p.weirdness))+Dn(this.offset-p.offset)}space(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,new s(this.offset,this.offset)]}static fromJson(p){var v,y;const m=(v=X.readObject(p))!=null?v:{};return new o(s.fromJson(m.temperature),s.fromJson(m.humidity),s.fromJson(m.continentalness),s.fromJson(m.erosion),s.fromJson(m.depth),s.fromJson(m.weirdness),(y=X.readInt(m.offset))!=null?y:0)}}e.ParamPoint=o;class a{constructor(p,m,v,y,x,b){T(this,"temperature");T(this,"humidity");T(this,"continentalness");T(this,"erosion");T(this,"depth");T(this,"weirdness");this.temperature=p,this.humidity=m,this.continentalness=v,this.erosion=y,this.depth=x,this.weirdness=b}get offset(){return 0}toArray(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,this.offset]}}e.TargetPoint=a;class l{constructor(p){T(this,"things");T(this,"index");this.things=p,this.index=new c(p)}find(p){return this.index.search(p,(m,v)=>m.distance(v))}}e.Parameters=l;class u{constructor(p,m,v,y,x,b){T(this,"temperature");T(this,"humidity");T(this,"continentalness");T(this,"erosion");T(this,"depth");T(this,"weirdness");this.temperature=p,this.humidity=m,this.continentalness=v,this.erosion=y,this.depth=x,this.weirdness=b}static fromRouter(p){return new e.Sampler(p.temperature,p.vegetation,p.continents,p.erosion,p.depth,p.ridges)}sample(p,m,v){const y=ye.context(p<<2,m<<2,v<<2);return e.target(this.temperature.compute(y),this.humidity.compute(y),this.continentalness.compute(y),this.erosion.compute(y),this.depth.compute(y),this.weirdness.compute(y))}}e.Sampler=u;const _=class{constructor(p){T(this,"root");this.root=_.build(p.map(([m,v])=>new h(m,v)))}static build(p){if(p.length===1)return p[0];if(p.length<=_.CHILDREN_PER_NODE){const x=p.map(b=>{let k=0;for(let E=0;E<7;E+=1){const S=b.space[E];k+=Math.abs((S.min+S.max)/2)}return{key:k,node:b}}).sort((b,k)=>b.key-k.key).map(({node:b})=>b);return new f(x)}let m=1/0,v=-1,y=[];for(let x=0;x<7;++x){p=_.sort(p,x,!1),y=_.bucketize(p);let b=0;for(const k of y)b+=_.area(k.space);m>b&&(m=b,v=x)}return p=_.sort(p,v,!1),y=_.bucketize(p),y=_.sort(y,v,!0),new f(y.map(x=>_.build(x.children)))}static sort(p,m,v){return p.map(y=>{const x=y.space[m],b=(x.min+x.max)/2;return{key:v?Math.abs(b):b,node:y}}).sort((y,x)=>y.key-x.key).map(({node:y})=>y)}static bucketize(p){const m=[];let v=[];const y=Math.pow(10,Math.floor(Math.log(p.length-.01)/Math.log(10)));for(const x of p)v.push(x),!(v.lengthnew s(1/0,-1/0));for(const y of m)v=[...Array(7)].map((x,b)=>v[b].union(y.space[b]));return v}search(m,v){let y=1/0,x=null;for(const b of this.children){const k=v(b,m);if(y<=k)continue;const E=b.search(m,v),S=b==E?k:v(E,m);y<=S||(y=S,x=E)}return x}}e.RSubTree=f;class h extends d{constructor(m,v){super(m.space());T(this,"thing");this.thing=v}search(){return this}}e.RLeaf=h})(Ms||(Ms={}));class Ns{constructor(t){T(this,"biome");this.biome=t}getBiome(){return this.biome}static fromJson(t){var i,s;const n=(i=X.readObject(t))!=null?i:{},r=Pe.parse((s=X.readString(n.biome))!=null?s:"minecraft:the_void");return new Ns(r)}}class cu{constructor(t){T(this,"parameters");this.parameters=t}getBiome(t,n,r,i){const s=i.sample(t,n,r);return this.parameters.find(s)}static fromJson(t){var s,o;const n=(s=X.readObject(t))!=null?s:{},i=((o=X.readArray(n.biomes,a=>{var l;return(u=>{var c;return{biome:Pe.parse((c=X.readString(u.biome))!=null?c:"minecraft:the_void"),parameters:Ms.ParamPoint.fromJson(u.parameters)}})((l=X.readObject(a))!=null?l:{})}))!=null?o:[]).map(a=>[a.parameters,()=>a.biome]);return new cu(new Ms.Parameters(i))}}var pn;(function(e){e.TEMPERATURE=t("temperature",-10,[1.5,0,1,0,0,0]),e.VEGETATION=t("vegetation",-8,[1,1,0,0,0,0]),e.CONTINENTALNESS=t("continentalness",-9,[1,1,2,2,2,1,1,1,1]),e.EROSION=t("erosion",-9,[1,1,0,1,1]),e.TEMPERATURE_LARGE=t("temperature_large",-12,[1.5,0,1,0,0,0]),e.VEGETATION_LARGE=t("vegetation_large",-10,[1,1,0,0,0,0]),e.CONTINENTALNESS_LARGE=t("continentalness_large",-11,[1,1,2,2,2,1,1,1,1]),e.EROSION_LARGE=t("erosion_large",-11,[1,1,0,1,1]),e.RIDGE=t("ridge",-7,[1,2,1,0,0,0]),e.SHIFT=t("offset",-3,[1,1,1,0]),e.AQUIFER_BARRIER=t("aquifer_barrier",-3,[1]),e.AQUIFER_FLUID_LEVEL_FLOODEDNESS=t("aquifer_fluid_level_floodedness",-7,[1]),e.AQUIFER_FLUID_LEVEL_SPREAD=t("aquifer_fluid_level_spread",-5,[1]),e.AQUIFER_LAVA=t("aquifer_lava",-1,[1]),e.PILLAR=t("pillar",-7,[1,1]),e.PILLAR_RARENESS=t("pillar_rareness",-8,[1]),e.PILLAR_THICKNESS=t("pillar_thickness",-8,[1]),e.SPAGHETTI_2D=t("spaghetti_2d",-8,[1]),e.SPAGHETTI_2D_ELEVATION=t("spaghetti_2d_elevation",-8,[1]),e.SPAGHETTI_2D_MODULATOR=t("spaghetti_2d_modulator",-8,[1]),e.SPAGHETTI_2D_THICKNESS=t("spaghetti_2d_thickness",-8,[1]),e.SPAGHETTI_3D_1=t("spaghetti_3d_1",-8,[1]),e.SPAGHETTI_3D_2=t("spaghetti_3d_2",-8,[1]),e.SPAGHETTI_3D_RARITY=t("spaghetti_3d_rarity",-8,[1]),e.SPAGHETTI_3D_THICKNESS=t("spaghetti_3d_thickness",-8,[1]),e.SPAGHETTI_ROUGHNESS=t("spaghetti_roughness",-8,[1]),e.SPAGHETTI_ROUGHNESS_MODULATOR=t("spaghetti_roughness_modulator",-8,[1]),e.CAVE_ENTRANCE=t("cave_entrance",-7,[.4,.5,1]),e.CAVE_LAYER=t("cave_layer",-8,[1]),e.CAVE_CHEESE=t("cave_cheese",-8,[.5,1,2,1,2,1,0,2,0]),e.NOODLE=t("noodle",-8,[1]),e.NOODLE_THICKNESS=t("noodle_thickness",-8,[1]),e.NOODLE_RIDGE_A=t("noodle_ridge_a",-7,[1]),e.NOODLE_RIDGE_B=t("noodle_ridge_b",-7,[1]),e.JAGGED=t("jagged",-16,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),e.SURFACE=t("surface",-6,[1,1,1]),e.SURFACE_SECONDARY=t("surface_secondary",-6,[1,1,0,1]);function t(i,s,o){return Hr.NOISE.register(Pe.create(i),Vr.create(s,o),!0)}const n=new Map;function r(i,s){var c;const o=(c=s.key())==null?void 0:c.toString();if(!o)throw new Error("Cannot instantiate noise from direct holder");const a=i.seedKey(),l=n.get(o);if(l&&l[0]===a[0]&&l[1]===a[1])return l[2];const u=new Nr(i.fromHashOf(o),s.value());return n.set(o,[a[0],a[1],u]),u}e.instantiate=r})(pn||(pn={}));var Ct;(function(e){function t(o){var l,u,c,d,f;const a=(l=X.readObject(o))!=null?l:{};return{minY:(u=X.readInt(a.min_y))!=null?u:0,height:(c=X.readInt(a.height))!=null?c:256,xzSize:(d=X.readInt(a.size_horizontal))!=null?d:1,ySize:(f=X.readInt(a.size_vertical))!=null?f:1}}e.fromJson=t;function n(o){return o.ySize<<2}e.cellHeight=n;function r(o){return o.xzSize<<2}e.cellWidth=r;function i(o){return o.height/n(o)}e.cellCountY=i;function s(o){return Math.floor(o.minY/n(o))}e.minCellY=s})(Ct||(Ct={}));var xc;(function(e){function t(r){var s,o,a,l;const i=(s=X.readObject(r))!=null?s:{};return{target:(o=X.readNumber(i.target))!=null?o:0,size:(a=X.readInt(i.size))!=null?a:0,offset:(l=X.readInt(i.offset))!=null?l:0}}e.fromJson=t;function n(r,i,s){if(r.size<=0)return i;const o=(s-r.offset)/r.size;return Ua(r.target,i,o)}e.apply=n})(xc||(xc={}));var Ri;(function(e){const t=a=>Ur.parser(Hr.DENSITY_FUNCTION,ye.fromJson)(a).value();function n(a){var u;const l=(u=X.readObject(a))!=null?u:{};return{barrier:t(l.barrier),fluidLevelFloodedness:t(l.fluid_level_floodedness),fluidLevelSpread:t(l.fluid_level_spread),lava:t(l.lava),temperature:t(l.temperature),vegetation:t(l.vegetation),continents:t(l.continents),erosion:t(l.erosion),depth:t(l.depth),ridges:t(l.ridges),initialDensityWithoutJaggedness:t(l.initial_density_without_jaggedness),finalDensity:t(l.final_density),veinToggle:t(l.vein_toggle),veinRidged:t(l.vein_ridged),veinGap:t(l.vein_gap)}}e.fromJson=n;function r(a){return ce({barrier:ye.Constant.ZERO,fluidLevelFloodedness:ye.Constant.ZERO,fluidLevelSpread:ye.Constant.ZERO,lava:ye.Constant.ZERO,temperature:ye.Constant.ZERO,vegetation:ye.Constant.ZERO,continents:ye.Constant.ZERO,erosion:ye.Constant.ZERO,depth:ye.Constant.ZERO,ridges:ye.Constant.ZERO,initialDensityWithoutJaggedness:ye.Constant.ZERO,finalDensity:ye.Constant.ZERO,veinToggle:ye.Constant.ZERO,veinRidged:ye.Constant.ZERO,veinGap:ye.Constant.ZERO},a)}e.create=r;function i(a,l,u,c=!1){const d=(c?new Mt(u):Ve.create(u)).forkPositional(),f=new s(d,l);return Ae(ce({},f.mapAll(a)),{aquiferPositionalRandomFactory:d.fromHashOf(Pe.create("aquifer").toString()).forkPositional(),oreVeinsPositionalRandomFactory:d.fromHashOf(Pe.create("ore").toString()).forkPositional()})}e.withSettings=i;class s{constructor(l,u){T(this,"random");T(this,"settings");T(this,"mapped",new Map);this.random=l,this.settings=u}map(l){if(l instanceof ye.HolderHolder){const u=l.holder.key();if(u!==void 0&&this.mapped.has(u.toString()))return this.mapped.get(u.toString());{const c=l.holder.value().mapAll(this);return u!==void 0&&this.mapped.set(u.toString(),c),c}}if(l instanceof ye.Interpolated)return l.withCellSize(Ct.cellWidth(this.settings),Ct.cellHeight(this.settings));if(l instanceof ye.ShiftedNoise){const u=pn.instantiate(this.random,l.noiseData);return new ye.ShiftedNoise(l.shiftX,l.shiftY,l.shiftZ,l.xzScale,l.yScale,l.noiseData,u)}return l instanceof ye.Noise?new ye.Noise(l.xzScale,l.yScale,l.noiseData,pn.instantiate(this.random,l.noiseData)):l instanceof ye.ShiftNoise?l.withNewNoise(pn.instantiate(this.random,l.noiseData)):l instanceof ye.WeirdScaledSampler?new ye.WeirdScaledSampler(l.input,l.rarityValueMapper,l.noiseData,pn.instantiate(this.random,l.noiseData)):l instanceof ye.OldBlendedNoise?new ye.OldBlendedNoise(l.xzScale,l.yScale,l.xzFactor,l.yFactor,l.smearScaleMultiplier,new tm(this.random.fromHashOf(Pe.create("terrain").toString()),l.xzScale,l.yScale,l.xzFactor,l.yFactor,l.smearScaleMultiplier)):l instanceof ye.Mapped||l instanceof ye.Ap2?l.withMinMax():l}mapAll(l){return{barrier:l.barrier.mapAll(this),fluidLevelFloodedness:l.fluidLevelFloodedness.mapAll(this),fluidLevelSpread:l.fluidLevelSpread.mapAll(this),lava:l.lava.mapAll(this),temperature:l.temperature.mapAll(this),vegetation:l.vegetation.mapAll(this),continents:l.continents.mapAll(this),erosion:l.erosion.mapAll(this),depth:l.depth.mapAll(this),ridges:l.ridges.mapAll(this),initialDensityWithoutJaggedness:l.initialDensityWithoutJaggedness.mapAll(this),finalDensity:l.finalDensity.mapAll(this),veinToggle:l.veinToggle.mapAll(this),veinRidged:l.veinRidged.mapAll(this),veinGap:l.veinGap.mapAll(this)}}}e.Visitor=s;function o(a,l,u,c){const d=Ct.minCellY(a)+Ct.cellCountY(a),f=Ct.minCellY(a),h=Ct.cellHeight(a);for(let _=d;_>=f;_-=1){const g=_*h;if(Cs(l.compute(ye.context(u,g,c)),-64,64)>=.390625)return g}return Number.MAX_SAFE_INTEGER}e.computePreliminarySurfaceLevelScanning=o})(Ri||(Ri={}));class nm{constructor(t,n,r,i,s,o,a,l,u){T(this,"cellCountXZ");T(this,"cellCountY");T(this,"cellNoiseMinY");T(this,"router");T(this,"minX");T(this,"minZ");T(this,"settings");T(this,"cellWidth");T(this,"cellHeight");T(this,"firstCellX");T(this,"firstCellZ");T(this,"firstNoiseX");T(this,"firstNoiseZ");T(this,"noiseSizeXZ");T(this,"preliminarySurfaceLevel",new Map);T(this,"aquifer");T(this,"materialRule");T(this,"initialDensityWithoutJaggedness");this.cellCountXZ=t,this.cellCountY=n,this.cellNoiseMinY=r,this.router=i,this.minX=s,this.minZ=o,this.settings=a,this.cellWidth=Ct.cellWidth(a),this.cellHeight=Ct.cellHeight(a),this.firstCellX=Math.floor(s/this.cellWidth),this.firstCellZ=Math.floor(o/this.cellWidth),this.firstNoiseX=s>>2,this.firstNoiseZ=o>>2,this.noiseSizeXZ=t*this.cellWidth>>2,this.aquifer=fa.createDisabled(u);const c=this.router.finalDensity;this.materialRule=ha.fromList([d=>this.aquifer.compute(d,c.compute(d))]),this.initialDensityWithoutJaggedness=this.router.initialDensityWithoutJaggedness}getFinalState(t,n,r){return this.materialRule({x:t,y:n,z:r})}getPreliminarySurfaceLevel(t,n){return Ks(this.preliminarySurfaceLevel,Nt.asLong(t,n),()=>Ri.computePreliminarySurfaceLevelScanning(this.settings,this.initialDensityWithoutJaggedness,t<<2,n<<2))}getAquifer(){return this.aquifer}}var ha;(function(e){function t(n){return r=>{for(const i of n){const s=i(r);if(s)return s}}}e.fromList=t})(ha||(ha={}));var Ai;(function(e){function t(s){var a,l,u,c;const o=(a=X.readObject(s))!=null?a:{};return o.absolute!==void 0?n((l=X.readNumber(o.absolute))!=null?l:0):o.above_bottom!==void 0?r((u=X.readNumber(o.above_bottom))!=null?u:0):o.below_top!==void 0?i((c=X.readNumber(o.below_top))!=null?c:0):()=>0}e.fromJson=t;function n(s){return()=>s}function r(s){return o=>o.minY+s}function i(s){return o=>o.maxY-s}})(Ai||(Ai={}));var pa;(function(e){function t(n,r){return{minY:n,height:r,maxY:n+r-1}}e.create=t})(pa||(pa={}));class rm{constructor(t,n,r){T(this,"rule");T(this,"defaultBlock");T(this,"surfaceNoise");T(this,"surfaceSecondaryNoise");T(this,"random");T(this,"positionalRandoms");this.rule=t,this.defaultBlock=n,this.random=Ve.create(r).forkPositional(),this.surfaceNoise=pn.instantiate(this.random,pn.SURFACE),this.surfaceSecondaryNoise=pn.instantiate(this.random,pn.SURFACE_SECONDARY),this.positionalRandoms=new Map}buildSurface(t,n,r,i){const s=Nt.minBlockX(t.pos),o=Nt.minBlockZ(t.pos),a=new im(this,t,n,r,i),l=this.rule(a);for(let u=0;u<16;u+=1){const c=s+u;for(let d=0;d<1;d+=1){const f=o+d;a.updateXZ(c,f);let h=0,_=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER;for(let p=t.maxY;p>=t.minY;p-=1){const m=Ft.create(c,p,f),v=t.getBlockState(m);if(v.equals(Fe.AIR)){h=0,_=Number.MIN_SAFE_INTEGER;continue}if(v.isFluid()){_===Number.MIN_SAFE_INTEGER&&(_=p+1);continue}if(g>=p){g=Number.MIN_SAFE_INTEGER;for(let b=p-1;b>=t.minY;b-=1){const k=t.getBlockState(Ft.create(c,b,f));if(k.equals(Fe.AIR)||k.isFluid()){g=b+1;break}}}h+=1;const y=p-g+1;if(!v.equals(this.defaultBlock))continue;a.updateY(h,y,_,p);const x=l(c,p,f);x&&t.setBlockState(m,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 Ks(this.positionalRandoms,t,()=>this.random.fromHashOf(t))}}class im{constructor(t,n,r,i,s){T(this,"system");T(this,"chunk");T(this,"noiseChunk");T(this,"context");T(this,"getBiome");T(this,"blockX",0);T(this,"blockY",0);T(this,"blockZ",0);T(this,"stoneDepthAbove",0);T(this,"stoneDepthBelow",0);T(this,"surfaceDepth",0);T(this,"waterHeight",0);T(this,"biome",()=>"");T(this,"surfaceSecondary",()=>0);T(this,"minSurfaceLevel",()=>0);this.system=t,this.chunk=n,this.noiseChunk=r,this.context=i,this.getBiome=s}updateXZ(t,n){this.blockX=t,this.blockZ=n,this.surfaceDepth=this.system.getSurfaceDepth(t,n),this.surfaceSecondary=ds(()=>this.system.getSurfaceSecondary(t,n)),this.minSurfaceLevel=ds(()=>this.calculateMinSurfaceLevel(t,n))}updateY(t,n,r,i){this.blockY=i,this.stoneDepthAbove=t,this.stoneDepthBelow=n,this.waterHeight=r,this.biome=ds(()=>this.getBiome(Ft.create(this.blockX,this.blockY,this.blockZ)))}calculateMinSurfaceLevel(t,n){const r=t>>4,i=n>>4,s=this.noiseChunk.getPreliminarySurfaceLevel(r<<4,i<<4),o=this.noiseChunk.getPreliminarySurfaceLevel(r+1<<4,i<<4),a=this.noiseChunk.getPreliminarySurfaceLevel(r<<4,i+1<<4),l=this.noiseChunk.getPreliminarySurfaceLevel(r+1<<4,i+1<<4);return Math.floor(la((t&15)/16,(n&15)/16,s,o,a,l))+this.surfaceDepth-8}}var ma;(function(e){e.NOOP=()=>()=>{};function t(s){var l,u,c;const o=(l=X.readObject(s))!=null?l:{};switch((u=X.readString(o.type))==null?void 0:u.replace(/^minecraft:/,"")){case"block":return n(Fe.fromJson(o.result_state));case"sequence":return r((c=X.readArray(o.sequence,e.fromJson))!=null?c:[]);case"condition":return i(_a.fromJson(o.if_true),e.fromJson(o.then_run))}return e.NOOP}e.fromJson=t;function n(s){return()=>()=>s}e.block=n;function r(s){return o=>{const a=s.map(l=>l(o));return(l,u,c)=>{for(const d of a){const f=d(l,u,c);if(f)return f}}}}e.sequence=r;function i(s,o){return a=>(l,u,c)=>{if(s(a))return o(a)(l,u,c)}}e.condition=i})(ma||(ma={}));var _a;(function(e){e.FALSE=()=>!1,e.TRUE=()=>!0;function t(u){var f,h,_,g,p,m,v,y,x,b,k,E;const c=(f=X.readObject(u))!=null?f:{};switch((h=X.readString(c.type))==null?void 0:h.replace(/^minecraft:/,"")){case"above_preliminary_surface":return n();case"biome":return r((_=X.readArray(c.biome_is,S=>{var C;return(C=X.readString(S))!=null?C:""}))!=null?_:[]);case"not":return i(e.fromJson(c.invert));case"stone_depth":return s((g=X.readInt(c.offset))!=null?g:0,(p=X.readBoolean(c.add_surface_depth))!=null?p:!1,(m=X.readInt(c.secondary_depth_range))!=null?m:0,X.readString(c.surface_type)==="ceiling");case"vertical_gradient":return o((v=X.readString(c.random_name))!=null?v:"",Ai.fromJson(c.true_at_and_below),Ai.fromJson(c.false_at_and_above));case"water":return a((y=X.readInt(c.offset))!=null?y:0,(x=X.readInt(c.surface_depth_multiplier))!=null?x:0,(b=X.readBoolean(c.add_surface_depth))!=null?b:!1);case"y_above":return l(Ai.fromJson(c.anchor),(k=X.readInt(c.surface_depth_multiplier))!=null?k:0,(E=X.readBoolean(c.add_surface_depth))!=null?E:!1)}return e.FALSE}e.fromJson=t;function n(){return u=>u.blockY>=u.minSurfaceLevel()}e.abovePreliminarySurface=n;function r(u){const c=new Set(u);return d=>c.has(d.biome())}e.biome=r;function i(u){return c=>!u(c)}e.not=i;function s(u,c,d,f){return h=>{const _=f?h.stoneDepthBelow:h.stoneDepthAbove,g=c?h.surfaceDepth:0,p=d===0?0:Ts(h.surfaceSecondary(),-1,1,0,d);return _<=1+u+g+p}}e.stoneDepth=s;function o(u,c,d){return f=>{const h=c(f.context),_=d(f.context);if(f.blockY<=h)return!0;if(f.blockY>=_)return!1;const g=f.system.getRandom(u),p=Ts(f.blockY,h,_,1,0);return g.nextFloat(){if(f.waterHeight===Number.MIN_SAFE_INTEGER)return!0;const h=d?f.stoneDepthAbove:0;return f.blockY+h>=f.waterHeight+u+f.surfaceDepth*c}}e.water=a;function l(u,c,d){return f=>{const h=d?f.stoneDepthAbove:0;return f.blockY+h>=u(f.context)+f.surfaceDepth*c}}e.yAbove=l})(_a||(_a={}));class i3{constructor(t,n,r){T(this,"biomeSource");T(this,"settings");T(this,"router");T(this,"noiseChunkCache");T(this,"surfaceSystem");T(this,"globalFluidPicker");this.biomeSource=n,this.settings=r,this.router=Ri.withSettings(r.noiseRouter,r.noise,t,r.legacyRandomSource),this.noiseChunkCache=new Map,this.surfaceSystem=new rm(r.surfaceRule,r.defaultBlock,t);const i=new Os(-54,Fe.LAVA),s=new Os(r.seaLevel,r.defaultFluid);this.globalFluidPicker=(o,a,l)=>a=0;m-=1)for(let v=o-1;v>=0;v-=1){const y=(l+m)*o+v,x=y&15,b=t.getSectionIndex(y);t.getSectionIndex(p.minBlockY)!==b&&(p=t.getOrCreateSection(b));for(let k=0;kn)}getNoiseChunk(t){return Ks(this.noiseChunkCache,Nt.toLong(t.pos),()=>{const n=Math.max(t.minY,this.settings.noise.minY),r=Math.min(t.maxY,this.settings.noise.minY+this.settings.noise.height),i=Ct.cellWidth(this.settings.noise),s=Ct.cellHeight(this.settings.noise),o=Math.floor(16/i),a=Math.floor(n/s),l=Math.floor((r-n)/s),u=Nt.minBlockX(t.pos),c=Nt.minBlockZ(t.pos);return new nm(o,l,a,this.router,u,c,this.settings.noise,this.settings.aquifersEnabled,this.globalFluidPicker)})}}var bc;(function(e){function t(n){var i,s,o,a,l,u;const r=(i=X.readObject(n))!=null?i:{};return{surfaceRule:ma.fromJson(r.surface_rule),noise:Ct.fromJson(r.noise),defaultBlock:Fe.fromJson(r.default_block),defaultFluid:Fe.fromJson(r.default_fluid),noiseRouter:Ri.fromJson(r.noise_router),seaLevel:(s=X.readInt(r.sea_level))!=null?s:0,disableMobGeneration:(o=X.readBoolean(r.disable_mob_generation))!=null?o:!1,aquifersEnabled:(a=X.readBoolean(r.aquifers_enabled))!=null?a:!1,oreVeinsEnabled:(l=X.readBoolean(r.ore_veins_enabled))!=null?l:!1,legacyRandomSource:(u=X.readBoolean(r.legacy_random_source))!=null?u:!1}}e.fromJson=t})(bc||(bc={}));var X0=Object.freeze(Object.defineProperty({__proto__:null,get BlockPos(){return Ft},BlockState:Fe,Chunk:J8,get ChunkPos(){return Nt},ChunkSection:mi,get Direction(){return Qt},get Holder(){return Ur},Identifier:Pe,Registry:Ei,Structure:ou,get MinMaxNumberFunction(){return ua},get CubicSpline(){return da},BlendedNoise:tm,ImprovedNoise:vc,NormalNoise:Nr,get NoiseParameters(){return Vr},PerlinNoise:Ze,PerlinSimplexNoise:r3,SimplexNoise:St,LegacyRandom:Mt,LegacyPositionalRandom:Qp,XoroshiroRandom:Ve,XoroshiroPositionalRandom:em,square:Dn,clamp:Cs,lerp:Zn,lerp2:la,lerp3:Zp,lazyLerp:fs,lazyLerp2:_c,lazyLerp3:Yp,clampedLerp:Ua,inverseLerp:au,smoothstep:Ho,map:Ts,clampedMap:Va,binarySearch:Wp,getSeed:lu,longfromBytes:ca,isPowerOfTwo:Q8,upperPowerOfTwo:e3,get Json(){return X},lazy:ds,computeIfAbsent:Ks,FluidStatus:Os,get Aquifer(){return fa},NoiseAquifer:Er,get Climate(){return Ms},FixedBiome:Ns,MultiNoise:cu,get DensityFunction(){return ye},NoiseChunk:nm,get MaterialRule(){return ha},NoiseChunkGenerator:i3,get NoiseGeneratorSettings(){return bc},get NoiseRouter(){return Ri},get Noises(){return pn},get NoiseSettings(){return Ct},get NoiseSlideSettings(){return xc},SurfaceSystem:rm,SurfaceContext:im,get SurfaceRule(){return ma},get SurfaceCondition(){return _a},get VerticalAnchor(){return Ai},get WorldgenContext(){return pa},get WorldgenRegistries(){return Hr}},Symbol.toStringTag,{value:"Module"}));let K0=!1;async function s3(){K0||(await up(l0),K0=!0,console.debug(`Loaded deepslate-rs from "${l0}"`))}const o3={temperature:[-1,1],humidity:[-1,1],continentalness:[-1.1,1],erosion:[-1,1],weirdness:[-1,1],offset:[-1,1],factor:[0,12],jaggedness:[0,1]};let J0,Q0;async function a3(e,t,n){var _,g,p;const{biomeSource:r}=await sm(e,n),i=t.data,s=-Math.round(n.offset[0])-100+n.res/2,o=-Math.round(n.offset[1])-100+n.res/2,a=t.width*4/n.res,l=4/n.res,u=[s*n.scale,(200+s)*n.scale,n.res*n.scale],c=[o*n.scale,(200+o)*n.scale,n.res*n.scale],d=n.layers.has("biomes")?(_=r.getBiomes)==null?void 0:_.call(r,...u,64,65,1,...c):void 0,f=[...n.layers].filter(m=>m!=="biomes"),h=f.length===0||(g=r.getClimates)==null?void 0:g.call(r,...u,64,65,1,...c);for(let m=0;m<200;m+=n.res)for(let v=0;v<200;v+=n.res){const y=v*a+m*l,x=m/n.res*200/n.res+v/n.res,b=(m+s)*n.scale,k=(v+o)*n.scale;let E=[50,50,50];if(n.layers.has("biomes")){const S=(p=d==null?void 0:d[x])!=null?p:r.getBiome(b,64,k);E=u3(S.toString(),n.biomeColors)}else if(h&&f[0]){const S=h[x][f[0]],[C,A]=o3[f[0]],O=(S-C)/(A-C)*256;E=[O,O,O]}i[y]=E[0],i[y+1]=E[1],i[y+2]=E[2],i[y+3]=255}}async function l3(e,t,n,r){var a;const{biomeSource:i}=await sm(e,r),[s,o]=d3([t,n],r);return ce({biome:i.getBiome(s,64,o).toString()},(a=i.getClimate)==null?void 0:a.call(i,s,64,o))}async function sm(e,t){const n=[e,t.octaves,`${t.seed}`,t.version];return Fr(n,J0)||(J0=Ra(n),Q0=await c3(e,t)),{biomeSource:Q0}}async function c3(e,t){var n,r,i,s,o;switch((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,"")){case"fixed":return new Ns(Pe.parse(e.biome));case"checkerboard":const a=((r=e.scale)!=null?r:2)+2,l=(s=(i=e.biomes)==null?void 0:i.length)!=null?s:0;return{getBiome(u,c,d){var h;const f=(((u>>a)+(d>>a))%l+l)%l;return Pe.parse((h=e.biomes)==null?void 0:h[f].node)}};case"multi_noise":switch((o=e.preset)==null?void 0:o.replace(/^minecraft:/,"")){case"nether":e=_t(t.version,"1.18")?h3:f3;break;case"overworld":e=_t(t.version,"1.18")?await p3():e;break}if(e=P.DataModel.unwrapLists(e),_t(t.version,"1.18")){await s3();const u=new jv,c=O=>typeof O=="number"?[O,O]:O,[d,f,h,_,g,p,m,v,y,x,b,k,E,S]=[[],[],[],[],[],[],[],[],[],[],[],[],[],[]];for(const O of e.biomes){const{temperature:D,humidity:L,continentalness:W,erosion:U,weirdness:M,depth:$,offset:V}=O.parameters;d.push(c(D)[0]),f.push(c(D)[1]),h.push(c(L)[0]),_.push(c(L)[1]),g.push(c(W)[0]),p.push(c(W)[1]),m.push(c(U)[0]),v.push(c(U)[1]),y.push(c(M)[0]),x.push(c(M)[1]),b.push(c($)[0]),k.push(c($)[1]),E.push(V),S.push(u.getOrPut(O.biome,Math.floor(Math.random()*2147483647)))}const C=Zx(new Float64Array(d),new Float64Array(f),new Float64Array(h),new Float64Array(_),new Float64Array(g),new Float64Array(p),new Float64Array(m),new Float64Array(v),new Float64Array(y),new Float64Array(x),new Float64Array(b),new Float64Array(k),new Float64Array(E),new Int32Array(S)),A=Yx(t.seed,t.octaves.temperature.firstOctave,new Float64Array(t.octaves.temperature.amplitudes),t.octaves.humidity.firstOctave,new Float64Array(t.octaves.humidity.amplitudes),t.octaves.continentalness.firstOctave,new Float64Array(t.octaves.continentalness.amplitudes),t.octaves.erosion.firstOctave,new Float64Array(t.octaves.erosion.amplitudes),t.octaves.weirdness.firstOctave,new Float64Array(t.octaves.weirdness.amplitudes),t.octaves.shift.firstOctave,new Float64Array(t.octaves.shift.amplitudes));return{getBiome(O,D,L){var U;const W=o0(C,A,O,O+1,1,D,D+1,1,L,L+1,1);return Pe.parse((U=u.getA(W[0]))!=null?U:"unknown")},getBiomes(O,D,L,W,U,M,$,V,Q){return[...o0(C,A,O,D,L,W,U,M,$,V,Q)].map(I=>{var N;return Pe.parse((N=u.getA(I))!=null?N:"unknown")})},getClimate(O,D,L){const W=a0(A,O,O+1,1,D,D+1,1,L,L+1,1),[U,M,$,V,Q]=W.slice(0,5);return{temperature:U,humidity:M,continentalness:$,erosion:V,weirdness:Q}},getClimates(O,D,L,W,U,M,$,V,Q){const R=a0(A,O,D,L,W,U,M,$,V,Q),I=[];for(let N=0;N{var h;const f=e[`${c}_noise`];return f.firstOctave=Gt((h=f.firstOctave)!=null?h:-7,-100,-1),new Nr(new Mt(t.seed+BigInt(d)),f)});return!Array.isArray(e.biomes)||e.biomes.length===0?new Ns(Pe.create("unknown")):{getBiome(c,d,f){const h=u.map(p=>p.sample(c,f,0));let _=1/0,g="";for(const{biome:p,parameters:m}of e.biomes){const v=Wi(m.altitude-h[0])+Wi(m.temperature-h[1])+Wi(m.humidity-h[2])+Wi(m.weirdness-h[3])+Wi(m.offset);v<_&&(_=v,g=p)}return Pe.parse(g)}}}}throw new Error("Unknown biome source")}function u3(e,t){var r;if(!e)return[128,128,128];const n=(r=t[e])!=null?r:om[e];return n===void 0?Wc(e):n}function d3([e,t],n){const r=(e-n.offset[0]-100+n.res/2)*n.scale,i=(t-n.offset[1]-100+n.res/2)*n.scale;return[r,i]}const om={"minecraft:badlands":[217,69,21],"minecraft:badlands_plateau":[202,140,101],"minecraft:bamboo_jungle":[118,142,20],"minecraft:bamboo_jungle_hills":[59,71,10],"minecraft:basalt_deltas":[64,54,54],"minecraft:beach":[250,222,85],"minecraft:birch_forest":[48,116,68],"minecraft:birch_forest_hills":[31,95,50],"minecraft:cold_ocean":[32,32,112],"minecraft:crimson_forest":[221,8,8],"minecraft:dark_forest":[64,81,26],"minecraft:dark_forest_hills":[104,121,66],"minecraft:deep_cold_ocean":[32,32,56],"minecraft:deep_frozen_ocean":[64,64,144],"minecraft:deep_lukewarm_ocean":[0,0,64],"minecraft:deep_ocean":[0,0,48],"minecraft:deep_warm_ocean":[0,0,80],"minecraft:desert":[250,148,24],"minecraft:desert_hills":[210,95,18],"minecraft:desert_lakes":[255,188,64],"minecraft:end_barrens":[128,128,255],"minecraft:end_highlands":[128,128,255],"minecraft:end_midlands":[128,128,255],"minecraft:eroded_badlands":[255,109,61],"minecraft:flower_forest":[45,142,73],"minecraft:forest":[5,102,33],"minecraft:frozen_ocean":[112,112,214],"minecraft:frozen_river":[160,160,255],"minecraft:giant_spruce_taiga":[129,142,121],"minecraft:old_growth_spruce_taiga":[129,142,121],"minecraft:giant_spruce_taiga_hills":[109,119,102],"minecraft:giant_tree_taiga":[89,102,81],"minecraft:old_growth_pine_taiga":[89,102,81],"minecraft:giant_tree_taiga_hills":[69,79,62],"minecraft:gravelly_hills":[136,136,136],"minecraft:gravelly_mountains":[136,136,136],"minecraft:windswept_gravelly_hills":[136,136,136],"minecraft:ice_spikes":[180,220,220],"minecraft:jungle":[83,123,9],"minecraft:jungle_edge":[98,139,23],"minecraft:sparse_jungle":[98,139,23],"minecraft:jungle_hills":[44,66,5],"minecraft:lukewarm_ocean":[0,0,144],"minecraft:modified_badlands_plateau":[242,180,141],"minecraft:modified_gravelly_mountains":[120,152,120],"minecraft:modified_jungle":[123,163,49],"minecraft:modified_jungle_edge":[138,179,63],"minecraft:modified_wooded_badlands_plateau":[216,191,141],"minecraft:mountain_edge":[114,120,154],"minecraft:extreme_hills":[96,96,96],"minecraft:mountains":[96,96,96],"minecraft:windswept_hills":[96,96,96],"minecraft:mushroom_field_shore":[160,0,255],"minecraft:mushroom_fields":[255,0,255],"minecraft:nether_wastes":[191,59,59],"minecraft:ocean":[0,0,112],"minecraft:plains":[141,179,96],"minecraft:river":[0,0,255],"minecraft:savanna":[189,178,95],"minecraft:savanna_plateau":[167,157,100],"minecraft:shattered_savanna":[229,218,135],"minecraft:windswept_savanna":[229,218,135],"minecraft:shattered_savanna_plateau":[207,197,140],"minecraft:small_end_islands":[128,128,255],"minecraft:snowy_beach":[250,240,192],"minecraft:snowy_mountains":[160,160,160],"minecraft:snowy_taiga":[49,85,74],"minecraft:snowy_taiga_hills":[36,63,54],"minecraft:snowy_taiga_mountains":[89,125,114],"minecraft:snowy_tundra":[255,255,255],"minecraft:snowy_plains":[255,255,255],"minecraft:soul_sand_valley":[94,56,48],"minecraft:stone_shore":[162,162,132],"minecraft:stony_shore":[162,162,132],"minecraft:sunflower_plains":[181,219,136],"minecraft:swamp":[7,249,178],"minecraft:swamp_hills":[47,255,218],"minecraft:taiga":[11,102,89],"minecraft:taiga_hills":[22,57,51],"minecraft:taiga_mountains":[51,142,129],"minecraft:tall_birch_forest":[88,156,108],"minecraft:old_growth_birch_forest":[88,156,108],"minecraft:tall_birch_hills":[71,135,90],"minecraft:the_end":[128,128,255],"minecraft:the_void":[0,0,0],"minecraft:warm_ocean":[0,0,172],"minecraft:warped_forest":[73,144,123],"minecraft:wooded_badlands_plateau":[176,151,101],"minecraft:wooded_badlands":[176,151,101],"minecraft:wooded_hills":[34,85,28],"minecraft:wooded_mountains":[80,112,80],"minecraft:windswept_forest":[80,112,80],"minecraft:snowy_slopes":[140,195,222],"minecraft:lofty_peaks":[196,168,193],"minecraft:jagged_peaks":[196,168,193],"minecraft:snowcapped_peaks":[200,198,200],"minecraft:frozen_peaks":[200,198,200],"minecraft:stony_peaks":[82,92,103],"minecraft:grove":[150,150,189],"minecraft:meadow":[169,197,80],"minecraft:lush_caves":[112,255,79],"minecraft:dripstone_caves":[140,124,0]},f3={type:"minecraft:multi_noise",seed:0,altitude_noise:{firstOctave:-7,amplitudes:[1,1]},temperature_noise:{firstOctave:-7,amplitudes:[1,1]},humidity_noise:{firstOctave:-7,amplitudes:[1,1]},weirdness_noise:{firstOctave:-7,amplitudes:[1,1]},biomes:[{biome:"minecraft:nether_wastes",parameters:{altitude:0,temperature:0,humidity:0,weirdness:0,offset:0}},{biome:"minecraft:soul_sand_valley",parameters:{altitude:0,temperature:0,humidity:-.5,weirdness:0,offset:0}},{biome:"minecraft:crimson_forest",parameters:{altitude:0,temperature:.4,humidity:0,weirdness:0,offset:0}},{biome:"minecraft:warped_forest",parameters:{altitude:0,temperature:0,humidity:.5,weirdness:0,offset:.375}},{biome:"minecraft:basalt_deltas",parameters:{altitude:0,temperature:-.5,humidity:0,weirdness:0,offset:.175}}]},h3={type:"minecraft:multi_noise",biomes:[{biome:"minecraft:nether_wastes",parameters:{temperature:0,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:"minecraft:soul_sand_valley",parameters:{temperature:0,humidity:-.5,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:"minecraft:crimson_forest",parameters:{temperature:.4,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:"minecraft:warped_forest",parameters:{temperature:0,humidity:.5,continentalness:0,erosion:0,depth:0,weirdness:0,offset:.375}},{biome:"minecraft:basalt_deltas",parameters:{temperature:-.5,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:.175}}]};async function p3(){return(await H1("1.18","dimension","overworld")).generator.biome_source}const Ar=[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],ef=[[255,77,54],[59,118,255],[91,207,25],[217,32,245],[255,209,41],[52,204,209]];function m3(e,t,n){const r=new Mt(n.seed),i={placements:[],features:[],random:r,biomeInfoNoise:new Ze(r.fork(),0,[1]),seaLevel:63,version:n.version,nextFloat:()=>r.nextFloat(),nextInt:o=>r.nextInt(o),nextGaussian:()=>Math.sqrt(-2*Math.log(1-r.nextFloat()))*Math.cos(2*Math.PI*r.nextFloat()),sampleInt(o){return g3(o,this)}};for(let o=0;o=n.size[0]||o[1]>=n.size[1]||o[2]>=n.size[2])continue;const l=o[2]*(t.width*4)+o[0]*4,u=aa+l.weight,0);let o=t.nextInt(s);for(const a of e.distribution)if(o-=a.weight,o<0)return t.sampleInt(a.data);return 0}return 1}function yn(e,t){if(!vr(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 _3(e,t){var n,r,i,s;if(!vr(e))throw new Error("Invalid height provider");if(typeof e.type!="string")return yn(e);switch(Li(e.type)){case"constant":return yn(e.value);case"uniform":{const o=yn(e.min_inclusive),a=yn(e.max_inclusive);return o+t.nextInt(a-o+1)}case"biased_to_bottom":{const o=yn(e.min_inclusive),a=yn(e.max_inclusive),l=t.nextInt(a-o-((n=e.inner)!=null?n:1)+1);return o+t.nextInt(l+((r=e.inner)!=null?r:1))}case"very_biased_to_bottom":{const o=yn(e.min_inclusive),a=yn(e.max_inclusive),l=(i=e.inner)!=null?i:1,u=o+l+t.nextInt(a-o-l+1),c=o+t.nextInt(u-o);return o+t.nextInt(c-o+l)}case"trapezoid":{const o=yn(e.min_inclusive),a=yn(e.max_inclusive),l=(s=e.plateau)!=null?s:0;if(l>=a-o)return o+t.nextInt(a-o+1);const u=(a-o-l)/2,c=a-o-u;return o+t.nextInt(c+1)+t.nextInt(u+1)}default:throw new Error(`Invalid height provider ${e.type}`)}}function tf(e,t){const n=t.features.indexOf(e);return n!=-1?n:(t.features.push(e),t.features.length-1)}function li(e,t,n){var s;if(typeof t=="string"){n.placements.push([e,tf(t,n)]);return}const r=Li((s=t==null?void 0:t.type)!=null?s:"no_op"),i=w3[r];i?i(t.config,e,n):n.placements.push([e,tf(JSON.stringify(t),n)])}function yc(e,t,n){var s;const r=Li((s=t==null?void 0:t.type)!=null?s:"nope"),i=v3[r];return i?i(t==null?void 0:t.config,e,n):[e]}const w3={decorated:(e,t,n)=>{yc(t,e==null?void 0:e.decorator,n).forEach(i=>li(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;li(t,r,n)},random_selector:(e,t,n)=>{var r,i;for(const s of(r=e==null?void 0:e.features)!=null?r:[])if(n.nextFloat()<((i=s==null?void 0:s.chance)!=null?i:0)){li(t,s.feature,n);return}li(t,e==null?void 0:e.default,n)},simple_random_selector:(e,t,n)=>{var i,s,o;const r=(o=e==null?void 0:e.features)==null?void 0:o[n.nextInt((s=(i=e==null?void 0:e.features)==null?void 0:i.length)!=null?s:0)];li(t,r,n)}},v3={chance:(e,t,n)=>{var r;return n.nextFloat()<1/((r=e==null?void 0:e.chance)!=null?r:1)?[t]:[]},count:(e,t,n)=>{var r;return new Array(n.sampleInt((r=e==null?void 0:e.count)!=null?r:1)).fill(t)},count_extra:(e,t,n)=>{var i,s;let r=(i=e==null?void 0:e.count)!=null?i:1;return n.nextFloat(){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){var o;const r=Math.max(1,e.noise_factor),i=n.biomeInfoNoise.sample(t[0]/r,0,t[2]/r),s=Math.max(0,Math.ceil((i+((o=e.noise_offset)!=null?o:0))*e.noise_to_count_ratio));return new Array(s).fill(t)},dark_oak_tree:(e,t,n)=>[...new Array(16)].map((r,i)=>{const s=Math.floor(i/4)*4+1+n.nextInt(3)+t[0],o=Math.max(n.seaLevel,Ar[Gt(0,63,s)]),a=Math.floor(i%4)*4+1+n.nextInt(3)+t[2];return[s,o,a]}),decorated:(e,t,n)=>yc(t,e==null?void 0:e.outer,n).flatMap(r=>yc(r,e==null?void 0:e.inner,n)),depth_average:(e,t,n)=>{var i,s,o,a;const r=n.nextInt((i=e==null?void 0:e.spread)!=null?i:0)+n.nextInt((s=e==null?void 0:e.spread)!=null?s:0)-((o=e.spread)!=null?o:0)+((a=e==null?void 0:e.baseline)!=null?a:0);return Kt(t,r)},emerald_ore:(e,t,n)=>{const r=3+n.nextInt(6);return[...new Array(r)].map(()=>[t[0]+n.nextInt(16),4+n.nextInt(28),t[2]+n.nextInt(16)])},fire:(e,t,n)=>{const r=1+n.nextInt(n.nextInt(n.sampleInt(e==null?void 0:e.count)));return[...new Array(r)].map(()=>[t[0]+n.nextInt(16),n.nextInt(128),t[2]+n.nextInt(16)])},glowstone:(e,t,n)=>{const r=n.nextInt(1+n.nextInt(n.sampleInt(e==null?void 0:e.count)));return[...new Array(r)].map(()=>[t[0]+n.nextInt(16),n.nextInt(128),t[2]+n.nextInt(16)])},heightmap:(e,t,n)=>{const r=Math.max(n.seaLevel,Ar[Gt(0,63,t[0])]);return Kt(t,r)},heightmap_spread_double:(e,t,n)=>{const r=Math.max(n.seaLevel,Ar[Gt(0,63,t[0])]);return Kt(t,n.nextInt(r*2))},heightmap_world_surface:(e,t,n)=>{const r=Math.max(n.seaLevel,Ar[Gt(0,63,t[0])]);return Kt(t,r)},iceberg:(e,t,n)=>[[t[0]+4+n.nextInt(8),t[1],t[2]+4+n.nextInt(8)]],lava_lake:(e,t,n)=>{var r,i;if(n.nextInt(((r=e.chance)!=null?r:1)/10)===0){const s=n.nextInt(n.nextInt(248)+8);if(s[t],range:(e,t,n)=>{var i,s,o;const r=n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((s=e==null?void 0:e.top_offset)!=null?s:0))+((o=e==null?void 0:e.bottom_offset)!=null?o:0);return Kt(t,r)},range_biased:(e,t,n)=>{var i,s,o;const r=n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((s=e==null?void 0:e.top_offset)!=null?s:0))+((o=e==null?void 0:e.bottom_offset)!=null?o:0));return Kt(t,r)},range_very_biased:(e,t,n)=>{var i,s,o,a;const r=n.nextInt(n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((s=e==null?void 0:e.top_offset)!=null?s:0))+((o=e==null?void 0:e.bottom_offset)!=null?o:0))+((a=e==null?void 0:e.bottom_offset)!=null?a:0));return Kt(t,r)},spread_32_above:(e,t,n)=>{const r=n.nextInt(t[1]+32);return Kt(t,r)},top_solid_heightmap:(e,t)=>{const n=Ar[Gt(0,63,t[0])];return Kt(t,n)},magma:(e,t,n)=>{const r=n.nextInt(t[1]+32);return Kt(t,r)},square:(e,t,n)=>[[t[0]+n.nextInt(16),t[1],t[2]+n.nextInt(16)]],surface_relative_threshold:(e,t)=>{var s,o;const n=Ar[Gt(0,63,t[0])],r=n+((s=e==null?void 0:e.min_inclusive)!=null?s:-1/0),i=n+((o=e==null?void 0:e.max_inclusive)!=null?o:1/0);return t[1]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 x3(e,t,n){var i;let r=[e];for(const s of t)!nf[Li((i=s==null?void 0:s.type)!=null?i:"nope")]||(r=r.flatMap(a=>nf[Li(s.type)](s,a,n)));for(const s of r)n.placements.push([s,0])}const nf={count:({count:e},t,n)=>new Array(n.sampleInt(e!=null?e:1)).fill(t),count_on_every_layer:({count:e},t,n)=>new Array(n.sampleInt(e!=null?e:1)).fill(t).map(r=>[r[0]+n.nextInt(16),r[1],r[2]+n.nextInt(16)]),environment_scan:({},e)=>[e],height_range:({height:e},t,n)=>Kt(t,_3(e,n)),heightmap:({},e,t)=>{const n=Math.max(t.seaLevel,Ar[Gt(0,63,e[0])]);return Kt(e,n)},in_square:({},e,t)=>[[e[0]+t.nextInt(16),e[1],e[2]+t.nextInt(16)]],noise_based_count:({noise_to_count_ratio:e,noise_factor:t,noise_offset:n},r,i)=>{const s=Math.max(1,t),o=i.biomeInfoNoise.sample(r[0]/s,0,r[2]/s),a=Math.max(0,Math.ceil((o+(n!=null?n:0))*e));return new Array(a).fill(r)},noise_threshold_count:({noise_level:e,below_noise:t,above_noise:n},r,i)=>{const o=i.biomeInfoNoise.sample(r[0]/200,0,r[2]/200)[[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]:[]},rf=new Set(["minecraft:worldgen/noise","minecraft:worldgen/density_function"]);class b3{constructor(){this.d=X0,this.deepslateCache=new Map,this.Z=0,this.chunksCache=[]}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);if(r)this.d=r;else{if(_t(t,"1.19")?this.d=X0:_t(t,"1.18.2")?this.d=await xe(()=>import("./deepslate.esm.b562fa57.js"),["assets/deepslate.esm.b562fa57.js","assets/vec3.6bb9fc18.js"]):this.d=await xe(()=>import("./deepslate.esm.18be4dc0.js"),["assets/deepslate.esm.18be4dc0.js","assets/vec3.6bb9fc18.js"]),_t(t,"1.19"))await Promise.all(this.d.Registry.REGISTRY.map(async(i,s)=>{if(rf.has(i.toString())){const o=await t0(t,i.path);for(const[a,l]of o.entries())s.register(this.d.Identifier.parse(a),s.parse(l),!0)}}));else if(_t(t,"1.18.2")){const i=[["worldgen/noise","NOISE",this.d.NoiseParameters],["worldgen/density_function","DENSITY_FUNCTION",this.d.DensityFunction]];await Promise.all(i.map(async([s,o,a])=>{const l=await t0(t,s);for(const[u,c]of l.entries())this.d.WorldgenRegistries[o].register(this.d.Identifier.parse(u),a.fromJson(c),!0)}))}this.deepslateCache.set(t,this.d)}this.applyProjectData(t,n),this.loadedVersion=t,this.loadingVersion=void 0}applyProjectData(t,n){_t(t,"1.19")&&this.d.Registry.REGISTRY.forEach((r,i)=>{var s;if(rf.has(r.toString())){i.clear();for(const[o,a]of Object.entries((s=n==null?void 0:n[r.path])!=null?s:{}))i.register(this.d.Identifier.parse(o),i.parse(a))}})}loadChunkGenerator(t,n,r="unknown"){if(!this.loadedVersion)throw new Error("No deepslate version loaded");const i=[t,`${n}`,r];if(!Fr(this.cacheState,i)){const s=new this.d.FixedBiome(_t(this.loadedVersion,"1.18.2")?this.d.Identifier.parse(r):r),o=this.d.NoiseGeneratorSettings.fromJson(P.DataModel.unwrapLists(t)),a=new this.d.NoiseChunkGenerator(n,s,o);this.settingsCache=o.noise,this.generatorCache=a,this.chunksCache=[],this.cacheState=Ra(i)}}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,s=this.settingsCache.height;return[...Array(Math.ceil(n/16)+1)].map((o,a)=>{const l=(t>>4)+a,u=this.chunksCache.find(d=>d.pos[0]===l);if(u)return u;const c=new this.d.Chunk(i,s,this.d.ChunkPos.create(l,this.Z>>4));if(!this.generatorCache)throw new Error("Tried to generate chunks before generator is loaded");return this.generatorCache.fill(c,!0),this.generatorCache.buildSurface(c,r),this.chunksCache.push(c),c})}loadDensityFunction(t,n){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))}}class y3{constructor(t){this.settings={},this.chunkWidth=4,this.chunkHeight=4,this.chunkCountY=32,this.biomeDepth=.1,this.biomeScale=.2,this.noiseColumnCache=[],this.xOffset=0;const n=new Mt(t);this.minLimitPerlinNoise=new Ze(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.maxLimitPerlinNoise=new Ze(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.mainPerlinNoise=new Ze(n,-7,[1,1,1,1,1,1,1,1]),this.depthNoise=new Ze(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])}reset(t,n,r,i,s){this.settings=t,this.chunkWidth=t.size_horizontal*4,this.chunkHeight=t.size_vertical*4,this.chunkCountY=Math.floor(t.height/this.chunkHeight),t.amplified&&n>0&&(n=1+n*2,r=1+r*4),this.biomeDepth=.265625*(n*.5-.125),this.biomeScale=96/(r*.9+.1),this.noiseColumnCache=Array(s).fill(null),this.xOffset=i}iterateNoiseColumn(t){const n=Array(this.chunkCountY*this.chunkHeight),r=Math.floor(t/this.chunkWidth),i=Math.floor(t%this.chunkWidth)/this.chunkWidth,s=this.fillNoiseColumn(r),o=this.fillNoiseColumn(r+1);for(let a=this.chunkCountY-1;a>=0;a-=1)for(let l=this.chunkHeight;l>=0;l-=1){const u=l/this.chunkHeight,c=a*this.chunkHeight+l;n[c]=Bv(u,i,s[a],s[a+1],o[a],o[a+1])}return n}fillNoiseColumn(t){const n=this.noiseColumnCache[t-this.xOffset];if(n)return n;const r=Array(this.chunkCountY+1),i=684.412*this.settings.sampling.xz_scale,s=684.412*this.settings.sampling.y_scale,o=i/this.settings.sampling.xz_factor,a=s/this.settings.sampling.y_factor,l=this.settings.random_density_offset?this.getRandomDensity(t):0;for(let u=0;u<=this.chunkCountY;u+=1){let c=this.sampleAndClampNoise(t,u,this.mainPerlinNoise.getOctaveNoise(0).zo,i,s,o,a);const h=((1-u*2/this.chunkCountY+l)*this.settings.density_factor+this.settings.density_offset+this.biomeDepth)*this.biomeScale;c+=h*(h>0?4:1),this.settings.top_slide.size>0&&(c=fl(this.settings.top_slide.target,c,(this.chunkCountY-u-this.settings.top_slide.offset)/this.settings.top_slide.size)),this.settings.bottom_slide.size>0&&(c=fl(this.settings.bottom_slide.target,c,(u-this.settings.bottom_slide.offset)/this.settings.bottom_slide.size)),r[u]=c}return this.noiseColumnCache[t-this.xOffset]=r,r}getRandomDensity(t){const n=this.depthNoise.sample(t*200,10,this.depthNoise.getOctaveNoise(0).zo,1,0,!0),i=(n<0?-n*.3:n)*24.575625-2;return i<0?i*.009486607142857142:Math.min(i,1)*.006640625}sampleAndClampNoise(t,n,r,i,s,o,a){let l=0,u=0,c=0,d=1;for(let f=0;f<16;f+=1){const h=Ze.wrap(t*i*d),_=Ze.wrap(n*s*d),g=Ze.wrap(r*i*d),p=s*d,m=this.minLimitPerlinNoise.getOctaveNoise(f);m&&(l+=m.sample(h,_,g,p,n*p)/d);const v=this.maxLimitPerlinNoise.getOctaveNoise(f);if(v&&(u+=v.sample(h,_,g,p,n*p)/d),f<8){const y=this.mainPerlinNoise.getOctaveNoise(f);y&&(c+=y.sample(Ze.wrap(t*o*d),Ze.wrap(n*a*d),Ze.wrap(r*o*d),a*d,n*a*d)/d)}d/=2}return fl(l/512,u/512,(c/10+1)/2)}}const k3={"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]},Un=new b3;async function E3(e,t,n){var o,a,l,u;if(_t(n.version,"1.18")){await Un.loadVersion(n.version,am(n.project)),Un.loadChunkGenerator(e,n.seed,n.biome),Un.generateChunks(-n.offset,n.width,n.biome);const c=Un.getNoiseSettings(),d=t.data;for(let f=0;f{const n=Object.fromEntries(e.files.filter(r=>r.type===t).map(r=>[r.id,r.data]));return[t,n]}))}function I3(e,t){return e[t]>0?0:e[t+1]>0?150:255}function C3(e,t,n){const r=Ve.create(n.seed),i=Vr.fromJson(P.DataModel.unwrapLists(e)),s=new Nr(r,i),o=-n.offset[0]-100,a=-n.offset[1]-100,l=t.data;for(let u=0;u<256;u+=1)for(let c=0;c<256;c+=1){const d=u*4+c*4*256,f=(u+o)*n.scale,h=(c+a)*n.scale,_=(s.sample(f,h,0)+1)*128;l[d]=_,l[d+1]=_,l[d+2]=_,l[d+3]=255}}const T3=["biomes","temperature","humidity","continentalness","erosion","weirdness"],O3=({model:e,data:t,shown:n,version:r})=>{var E,S;const{locale:i}=Be(),[s]=K(qn()),[o,a]=K(2),[l,u]=K(void 0),[c,d]=K(new Set(["biomes"])),{biomeColors:f}=rp(),h=Oe([0,0]),_=Oe(1),g=Oe(),p=BigInt((E=e.get(new P.Path(["generator","seed"])))!=null?E:s),m=$e(()=>{if(!!n)return N3(e.get(new P.Path(["generator","settings"])))},[n]),v=n?M3(t,m):"",y=(S=t.type)==null?void 0:S.replace(/^minecraft:/,""),{canvas:x,redraw:b}=Gs({size(){return[200/_.current,200/_.current]},async draw(C){const A={octaves:m,biomeColors:f,layers:c,offset:h.current,scale:o,seed:p,res:_.current,version:r};await a3(t,C,A),_.current===4&&(clearTimeout(g.current),g.current=setTimeout(()=>{_.current=1,b()},150))},async onDrag(C,A){h.current[0]=h.current[0]+C*200,h.current[1]=h.current[1]+A*200,clearTimeout(g.current),_.current=y==="multi_noise"?4:1,b()},async onHover(C,A){const O={octaves:m,biomeColors:f,layers:c,offset:h.current,scale:o,seed:s,res:1,version:r},D=await l3(t,Math.floor(C*200),Math.floor(A*200),O);u(D)},onLeave(){u(void 0)}},[r,v,o,s,c,f]);he(()=>{n&&(_.current=y==="multi_noise"?4:1,b())},[r,v,o,s,c,n,f]);const k=C=>{h.current[0]=h.current[0]*o/C,h.current[1]=h.current[1]*o/C,a(C)};return F(be,{children:[F("div",{class:"controls preview-controls",children:[l&&w(oe,{label:l.biome,class:"no-pointer"}),y==="multi_noise"&&w(jt,{icon:"stack",tooltip:i("configure_layers"),children:T3.map(C=>{const A=c.has(C);return w(oe,{label:i(`layer.${C}`),active:A,tooltip:i(A?"enabled":"disabled"),onClick:O=>{d(new Set([C])),O.stopPropagation()}})})}),(y==="multi_noise"||y==="checkerboard")&&F(be,{children:[w(oe,{icon:"dash",tooltip:i("zoom_out"),onClick:()=>k(o*1.5)}),w(oe,{icon:"plus",tooltip:i("zoom_in"),onClick:()=>k(o/1.5)})]}),y==="multi_noise"&&w(oe,{icon:"sync",tooltip:i("generate_new_seed"),onClick:()=>P1(e)})]}),(l==null?void 0:l.temperature)!==void 0&&w("div",{class:"controls secondary-controls",children:w(oe,{class:"no-pointer",label:Object.entries(l).filter(([C])=>C!=="biome").map(([C,A])=>`${C[0].toUpperCase()}: ${A.toFixed(2)}`).join(" ")})}),w("canvas",{ref:x,width:"200",height:"200"})]})};function M3(e,t){return JSON.stringify([e,t])}function N3(e){switch(typeof e!="string"&&(e=e.legacy_random_source?"minecraft:nether":"minecraft:overworld"),e.replace(/^minecraft:/,"")){case"overworld":case"amplified":return{temperature:{firstOctave:-9,amplitudes:[1.5,0,1,0,0,0]},humidity:{firstOctave:-7,amplitudes:[1,1,0,0,0,0]},continentalness:{firstOctave:-9,amplitudes:[1,1,2,2,2,1,1,1,1]},erosion:{firstOctave:-9,amplitudes:[1,1,0,1,1]},weirdness:{firstOctave:-7,amplitudes:[1,2,1,0,0,0]},shift:{firstOctave:-3,amplitudes:[1,1,1,0]}};case"large_biomes":return{temperature:{firstOctave:-12,amplitudes:[1.5,0,1,0,0,0]},humidity:{firstOctave:-10,amplitudes:[1,1,0,0,0,0]},continentalness:{firstOctave:-11,amplitudes:[1,1,2,2,2,1,1,1,1]},erosion:{firstOctave:-11,amplitudes:[1,1,0,1,1]},weirdness:{firstOctave:-7,amplitudes:[1,2,1,0,0,0]},shift:{firstOctave:-3,amplitudes:[1,1,1,0]}};default:return{temperature:{firstOctave:-7,amplitudes:[1,1]},humidity:{firstOctave:-7,amplitudes:[1,1]},continentalness:{firstOctave:-7,amplitudes:[1,1]},erosion:{firstOctave:-7,amplitudes:[1,1]},weirdness:{firstOctave:-7,amplitudes:[1,1]},shift:{firstOctave:0,amplitudes:[0]}}}}const R3=({data:e,version:t,shown:n})=>{const{locale:r}=Be(),[i,s]=K(4),[o,a]=K(qn()),l=JSON.stringify(e),{canvas:u,redraw:c}=Gs({size(){return[i*16,i*16]},async draw(d){m3(e,d,{seed:o,version:t,size:[i*16,128,i*16]})}},[t,l,o]);return he(()=>{n&&c()},[t,l,i,o,n]),F(be,{children:[F("div",{class:"controls preview-controls",children:[w(oe,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>s(Math.min(16,i+1))}),w(oe,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>s(Math.max(1,i-1))}),w(oe,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>a(qn())})]}),w("canvas",{ref:u,width:"64",height:"64"})]})},L3=({data:e,shown:t,version:n})=>{var m,v;const{locale:r}=Be(),{project:i}=er(),[s,o]=K(qn()),[a,l]=K(!1),[u,c]=K(void 0),d=Oe(0),f=Oe(void 0),h=JSON.stringify([e]),_=(v=(m=e==null?void 0:e.noise)==null?void 0:m.height)!=null?v:256,{canvas:g,redraw:p}=Gs({size(){return[_,_]},async draw(y){const x={offset:d.current,width:y.width,seed:s,version:n,project:i};await S3(e,y,x)},async onDrag(y){d.current+=y*_,p()},async onHover(y,x){var E,S;const b=Math.floor(y*_-d.current),k=_-Math.max(1,Math.ceil(x*_))+((S=(E=e==null?void 0:e.noise)==null?void 0:E.min_y)!=null?S:0);c(`X=${b} Y=${k}`)},onLeave(){c(void 0)}},[n,h,s,i]);return he(()=>{f.current&&clearInterval(f.current),t&&(p(),a&&(f.current=setInterval(()=>{d.current-=8,p()},100)))},[n,h,s,i,t,a]),F(be,{children:[F("div",{class:"controls preview-controls",children:[u&&w(oe,{label:u,class:"no-pointer"}),w(jt,{icon:"gear",tooltip:r("terrain_settings"),children:w(oe,{icon:a?"square_fill":"square",label:r("preview.auto_scroll"),onClick:()=>l(!a)})}),w(oe,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>o(qn())})]}),w("canvas",{ref:g,width:_,height:_})]})},D3=({data:e,shown:t,version:n})=>{const{locale:r}=Be(),[i,s]=K(qn()),[o,a]=K(2),l=Oe([0,0]),u=JSON.stringify([e]),{canvas:c,redraw:d}=Gs({size(){return[256,256]},async draw(h){const _={offset:l.current,scale:o,seed:i,version:n};C3(e,h,_)},async onDrag(h,_){l.current[0]=l.current[0]+h*256,l.current[1]=l.current[1]+_*256,d()}},[n,u,o,i]);he(()=>{t&&d()},[n,u,o,i,t]);const f=h=>{l.current[0]=l.current[0]*o/h,l.current[1]=l.current[1]*o/h,a(h)};return F(be,{children:[F("div",{class:"controls preview-controls",children:[w(oe,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>f(o*1.5)}),w(oe,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>f(o/1.5)}),w(oe,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>s(qn())})]}),w("canvas",{ref:c,width:"256",height:"256"})]})},F3=({data:e,shown:t,version:n})=>{var S,C;const{locale:r}=Be(),{project:i}=er(),[s,o]=K(qn()),[a,l]=K("minecraft:plains"),[u,c]=K(.2),[d,f]=K(.1),[h,_]=K(!1),[g,p]=K(void 0),m=Oe(0),v=Oe(void 0),y=JSON.stringify([e,u,d]),x=(C=(S=e==null?void 0:e.noise)==null?void 0:S.height)!=null?C:256,{canvas:b,redraw:k}=Gs({size(){return[x,x]},async draw(A){const O={biome:a,biomeDepth:d,biomeScale:u,offset:m.current,width:A.width,seed:s,version:n,project:i};await E3(e,A,O)},async onDrag(A){m.current+=A*x,k()},async onHover(A,O){var U,M;const D=Math.floor(A*x-m.current),L=x-Math.max(1,Math.ceil(O*x))+((M=(U=e==null?void 0:e.noise)==null?void 0:U.min_y)!=null?M:0),W=A3(D,L);p(W?`Y=${L} (${W.getName().path})`:`Y=${L}`)},onLeave(){p(void 0)}},[y,s,i]);he(()=>{v.current&&clearInterval(v.current),t&&(async()=>{try{await k(),h&&(v.current=setInterval(()=>{m.current-=8,k()},100))}catch(A){throw A}})()},[n,y,s,i,t,a,u,d,h]);const E=$e(()=>{var A;return(A=os==null?void 0:os.get("worldgen/biome"))!=null?A:[]},[n]);return F(be,{children:[F("div",{class:"controls preview-controls",children:[g&&w(oe,{label:g,class:"no-pointer"}),F(jt,{icon:"gear",tooltip:r("terrain_settings"),children:[_t(n,void 0,"1.17")?F(be,{children:[w($o,{label:r("preview.scale"),value:`${u}`,onChange:A=>c(Number(A))}),w($o,{label:r("preview.depth"),value:`${d}`,onChange:A=>f(Number(A))})]}):w($o,{label:r("preview.biome"),value:a,onChange:l,dataList:E,larger:!0}),w(oe,{icon:h?"square_fill":"square",label:r("preview.auto_scroll"),onClick:()=>_(!h)})]}),w(oe,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>o(qn())})]}),w("canvas",{ref:b,width:x,height:x})]})},P3=["dimension","worldgen/density_function","worldgen/noise","worldgen/noise_settings","worldgen/configured_feature","worldgen/placed_feature"];function $3({model:e,version:t,id:n,shown:r}){var s;const[,i]=K(0);if(Da(e,()=>{i(o=>o+1)}),!e)return w(be,{});if(n==="dimension"&&((s=e.get(new P.Path(["generator","type"])))==null?void 0:s.endsWith("noise"))){const o=e.get(new P.Path(["generator","biome_source"]));if(o)return w(O3,{model:e,version:t,shown:r,data:o})}if(n==="worldgen/density_function"){const o=e.get(new P.Path([]));if(o)return w(L3,{model:e,version:t,shown:r,data:o})}if(n==="worldgen/noise"){const o=e.get(new P.Path([]));if(o)return w(D3,{model:e,version:t,shown:r,data:o})}if(n==="worldgen/noise_settings"){const o=e.get(new P.Path([]));if(o)return w(F3,{model:e,version:t,shown:r,data:o})}if(n==="worldgen/placed_feature"||n==="worldgen/configured_feature"&&_t(t,"1.16","1.17")){const o=e.get(new P.Path([]));if(o)return w(R3,{model:e,version:t,shown:r,data:o})}return w(be,{})}function B3({onClose:e}){const{locale:t}=Be(),{projects:n,createProject:r,changeProject:i,updateProject:s}=er(),[o,a]=K(""),[l,u]=K(""),[c,d]=K(ux),[f,h]=K(void 0),[_,g]=K(!1),p=k=>{k.type.match(/^application\/(x-)?zip(-compressed)?$/)&&(o.length===0&&a(k.name.replace(/\.zip$/,"").replaceAll(/[ _-]+/g," ")),h(k))},m=Oe(s);he(()=>{m.current=s},[s]);const v=()=>{g(!0),r(o,l||void 0,c),i(o),f?zv(f).then(async k=>{const E={files:[]};await Promise.all(k.map(async S=>{const C=tp(S[0]);if(C)try{const A=await K1(S[1],"json");E.files.push(Ae(ce({},C),{data:A}))}catch(A){console.error(`Failed parsing ${C.type} ${C.id}: ${qt(A)}`)}})),m.current(E),e()}).catch(()=>{e()}):e()},y=$e(()=>n.map(k=>k.name.trim().toLowerCase()).includes(o.trim().toLowerCase()),[n,o]),x=$e(()=>!(l.length===0||l.match(/^(?:[a-z0-9._-]+:)?[a-z0-9/._-]+$/)),[l]),b=ke.versions.map(k=>k.id).reverse();return F(Pa,{class:"project-creation",onDismiss:e,children:[w("p",{children:t("project.create")}),F("div",{class:"input-group",children:[w(Mn,{autofocus:!0,class:`btn btn-input${!_&&(y||o.length===0)?" invalid":""}`,placeholder:t("project.name"),value:o,onChange:a}),!_&&y&&w("div",{class:"status-icon danger tooltipped tip-e","aria-label":t("project.name.already_exists"),children:me.issue_opened})]}),F("div",{class:"input-group",children:[w(Mn,{class:`btn btn-input${!_&&x?" invalid":""}`,placeholder:t("project.namespace"),value:l,onChange:u}),!_&&x&&w("div",{class:"status-icon danger tooltipped tip-e","aria-label":t("project.namespace.invalid"),children:me.issue_opened})]}),w(jt,{icon:"tag",label:c,tooltip:t("switch_version"),"data-cy":"version-switcher",children:b.map(k=>w(oe,{label:k,active:k===c,onClick:()=>d(k)}))}),w(Lx,{value:f,onChange:p,label:t("choose_zip_file"),accept:".zip"}),w(oe,{icon:"rocket",label:"Create!",disabled:_||y||o.length===0||x,onClick:v})]})}function j3({onClose:e}){const{locale:t}=Be(),{projects:n,project:r,deleteProject:i}=er(),s=()=>{Se.deleteProject(n.length,r.files.length,"menu"),i(r.name),e()};return F(Pa,{class:"file-modal",onDismiss:e,children:[w("p",{children:t("project.delete_confirm.1",r.name)}),w("p",{children:w("b",{children:t("project.delete_confirm.2")})}),F("div",{class:"button-group",children:[w(oe,{icon:"trashcan",label:t("project.delete"),onClick:s,class:"danger"}),w(oe,{label:t("project.cancel"),onClick:e})]})]})}const yr="/";function lm({entries:e,onSelect:t,selected:n,actions:r,errors:i,indent:s}){const o=$e(()=>{var f;const d={};for(const h of e){const _=h.indexOf(yr);if(_>=0){const g=h.slice(0,_);((f=d[g])!=null?f:d[g]=[]).push(h.slice(_+1))}}return Object.entries(d).map(([h,_])=>{const g=r==null?void 0:r.map(m=>Ae(ce({},m),{onAction:v=>m.onAction(h+yr+v)})),p=i==null?void 0:i.flatMap(m=>m.path.startsWith(h+yr)?[Ae(ce({},m),{path:m.path.slice(h.length+yr.length)})]:[]);return[h,_,g,p]}).sort()},[e,r,i]),a=$e(()=>e.filter(d=>!d.includes(yr)),[e]),[l,u]=K(new Set),c=d=>{l.has(d)?l.delete(d):l.add(d),u(new Set(l))};return F("div",{class:"tree-view",style:`--indent: ${s!=null?s:0};`,children:[o.map(([d,f,h,_])=>{var g;return F("div",{children:[w(sf,{icon:l.has(d)?"chevron_right":"chevron_down",label:d,onClick:()=>c(d),error:((g=_==null?void 0:_.length)!=null?g:0)>0},d),!l.has(d)&&w(lm,{entries:f,onSelect:p=>t(`${d}${yr}${p}`),selected:n!=null&&n.startsWith(d+yr)?n.substring(d.length+1):void 0,actions:h,errors:_,indent:(s!=null?s:0)+1})]})}),a.map(d=>{var f;return w(sf,{icon:"file",label:d,active:d===n,onClick:()=>t(d),actions:r==null?void 0:r.map(h=>Ae(ce({},h),{onAction:()=>h.onAction(d)})),error:(f=i==null?void 0:i.find(h=>h.path===d))==null?void 0:f.message},d)})]})}function sf({icon:e,label:t,active:n,onClick:r,actions:i,error:s}){const[o,a]=La();return F("div",{class:`entry${s?" has-error":""}${n?" active":""}${o?" focused":""}`,onClick:r,onContextMenu:u=>{u.preventDefault(),i!=null&&i.length&&a()},children:[me[e],w("span",{children:t.replaceAll("\u2215","/")}),typeof s=="string"&&w("div",{class:"status-icon danger tooltipped tip-se","aria-label":s,children:me.issue_opened}),o&&w("div",{class:"entry-menu",children:i==null?void 0:i.map(u=>F("div",{class:"action",onClick:c=>{u.onAction(""),c.stopPropagation(),a(!1)},children:[me[u.icon],u.label]}))})]})}function z3({onRename:e,onCreate:t,onDeleteProject:n}){const{locale:r}=Be(),{version:i}=Wr(),{projects:s,project:o,changeProject:a,file:l,openFile:u,updateFile:c}=er(),[d,f]=K(Ge.getTreeViewMode()),h=Le(b=>{Ge.setTreeViewMode(b),Se.setTreeViewMode(b),f(b)},[]),_=Le(b=>{if(d==="resources"&&b!=="pack.mcmeta"){const[k,E]=b.split("/");return{type:k.replaceAll("\u2215","/"),id:E.replaceAll("\u2215","/")}}return tp(b)},[d]),g=$e(()=>o.files.flatMap(b=>{const k=wl(b);return k?b.type==="pack_mcmeta"?"pack.mcmeta":d==="resources"?[`${b.type.replaceAll("/","\u2215")}/${b.id.replaceAll("/","\u2215")}`]:[k]:[]}),[d,...o.files]),p=$e(()=>l&&wl(l),[l]),m=Le(b=>{const k=_(b);k&&u(k.type,k.id)},[_]),v=Oe(null),y=async()=>{if(!v.current)return;let b=!1;const k=o.files.flatMap(S=>{const C=wl(S);return C===void 0?[]:(C==="pack.mcmeta"&&(b=!0),[[C,uc(S.data)]])});if(!b){const S=ke.versions.find(C=>C.id===i).pack_format;k.push(["pack.mcmeta",uc({pack:{pack_format:S,description:""}})])}const E=await Uv(k);v.current.setAttribute("href",E),v.current.setAttribute("download",`${o.name.replaceAll(" ","_")}.zip`),v.current.click()},x=$e(()=>[{icon:"pencil",label:r("project.rename_file"),onAction:b=>{const k=_(b);k&&e(k)}},{icon:"trashcan",label:r("project.delete_file"),onAction:b=>{const k=_(b);k&&(Se.deleteProjectFile(k.type,s.length,o.files.length,"menu"),c(k.type,k.id,{}))}}],[_,c,e]);return F(be,{children:[F("div",{class:"project-controls",children:[w(jt,{icon:"chevron_down",label:o.name,tooltip:r("switch_project"),tooltipLoc:"se",children:s.map(b=>w(oe,{label:b.name,active:b.name===o.name,onClick:()=>a(b.name)}))}),F(jt,{icon:"kebab_horizontal",children:[w(oe,{icon:"file_zip",label:r("project.download"),onClick:y}),w(oe,{icon:"plus_circle",label:r("project.new"),onClick:t}),w(oe,{icon:d==="resources"?"three_bars":"rows",label:r(d==="resources"?"project.show_file_paths":"project.show_resources"),onClick:()=>h(d==="resources"?"files":"resources")}),o.name!==_r.name&&w(oe,{icon:"trashcan",label:r("project.delete"),onClick:n})]})]}),w("div",{class:"file-view",children:g.length===0?w("span",{children:r("project.no_files")}):w(lm,{entries:g,selected:p,onSelect:m,actions:x})}),w("a",{ref:v,style:"display: none;"})]})}function kc(e,t){return e.schema.hook(U3,new P.ModelPath(e),e.data,{blockStates:t})}const U3={base({},e,t){return t},choice({switchNode:e},t,n,r){return e.hook(this,t,n,r)},list({children:e},t,n,r){if(!Array.isArray(n))return n;const i=n.map((s,o)=>e.hook(this,t.push(o),s.node,r));for(const s of Object.getOwnPropertySymbols(n))i[s]=n[s];return i},map({children:e,config:t},n,r,i){var a,l;if(r===void 0)return;const s=((a=t.validation)==null?void 0:a.validator)==="block_state_map"?(l=i.blockStates)==null?void 0:l[P.relativePath(n,t.validation.params.id).get()]:null,o={};Object.keys(r).forEach(u=>{var c;s&&!Object.keys((c=s.properties)!=null?c:{}).includes(u)||(o[u]=e.hook(this,n.push(u),r[u],i))});for(const u of Object.getOwnPropertySymbols(r))o[u]=r[u];return o},object({getActiveFields:e},t,n,r){if(n==null||typeof n!="object")return n;const i={},s=e(t);Object.keys(s).filter(o=>s[o].enabled(t)).forEach(o=>{const a=s[o].hook(this,t.push(o),n[o],r);a!=null&&(i[o]=a)});for(const o of Object.getOwnPropertySymbols(n))i[o]=n[o];return i}};function V3({name:e,model:t,blockStates:n,doCopy:r,doDownload:i,doImport:s,copySuccess:o,onError:a}){const{locale:l}=Be(),[u,c]=K(Ge.getIndent()),[d,f]=K(Ge.getFormat()),[h,_]=K(Ge.getHighlighting()),[g,p]=K(!1),m=Oe(null),v=Oe(()=>{}),y=Oe(async()=>{}),x=Oe(null),b=Oe(),k=Le((A,O)=>{const D=kc(A,O);return uc(D,d,u)},[u,d]);he(()=>{v.current=()=>{if(!!b.current&&!(!t||!n))try{const A=k(t,n);b.current.setValue(A)}catch(A){A instanceof Error?(A.message=`Error getting JSON output: ${A.message}`,a(A)):a(`Error getting JSON output: ${qt(A)}`),console.error(A),b.current.setValue("")}},y.current=async()=>{if(!b.current)return;const A=b.current.getValue();if(A.length!==0)try{const O=await K1(A,d);t==null||t.reset(P.DataModel.wrapLists(O),!1)}catch(O){O instanceof Error?(O.message=`Error importing: ${O.message}`,a(O)):a(`Error importing: ${qt(O)}`),console.error(O)}}},[t,n,u,d,h]),he(()=>{h?(p(!1),b.current={getValue(){return""},setValue(){},configure(){},select(){}},xe(()=>import("./index.8ac52a74.js").then(function(A){return A.i}),[]).then(async A=>{await Promise.all([xe(()=>import("./json.c327d69b.js").then(function(D){return D.j}),[]),xe(()=>import("./yaml.e8f3b9ab.js"),[])]);const O=A.edit("editor");O.setOptions({fontSize:14,showFoldWidgets:!1,highlightSelectedWord:!1}),O.$blockScrolling=1/0,O.on("blur",()=>y.current()),O.getSession().setMode("ace/mode/json"),b.current={getValue(){return O.getSession().getValue()},setValue(D){O.getSession().setValue(D)},configure(D,L){O.setOption("useSoftTabs",D!=="tabs"),O.setOption("tabSize",D==="tabs"?4:wx(D)),O.getSession().setMode(`ace/mode/${L}`)},select(){O.selectAll()}},p(!0)})):b.current={getValue(){return x.current?x.current.value:""},setValue(A){!x.current||(x.current.value=A)},configure(){},select(){}}},[h]),Da(t,()=>{!v.current||v.current()}),he(()=>{!v.current||t&&v.current()},[t]),he(()=>{!b.current||!v.current||(!h||g)&&(b.current.configure(u,d),v.current())},[u,d,h,g]),he(()=>{r&&t&&n&&navigator.clipboard.writeText(k(t,n)).then(()=>{o()})},[r]),he(()=>{if(i&&t&&n&&m.current){const A=encodeURIComponent(k(t,n));m.current.setAttribute("href",`data:text/json;charset=utf-8,${A}`);const O=e==="pack_mcmeta"?"pack.mcmeta":`${e}.${d}`;m.current.setAttribute("download",O),m.current.click()}},[i]),he(()=>{s&&b.current&&(b.current.setValue(""),b.current.select())},[s]);const E=A=>{Ge.setIndent(A),c(A)},S=A=>{Ge.setFormat(A),f(A)},C=A=>{Ge.setHighlighting(A),_(A)};return F(be,{children:[w("div",{class:"controls source-controls",children:F(jt,{icon:"gear",tooltip:l("output_settings"),"data-cy":"source-controls",children:[vx().map(A=>w(oe,{label:l(`indentation.${A}`),active:u===A,onClick:()=>E(A)})),w("hr",{}),xx().map(A=>w(oe,{label:l(`format.${A}`),active:d===A,onClick:()=>S(A)})),w("hr",{}),w(oe,{icon:h?"square_fill":"square",label:l("highlighting"),onClick:()=>C(!h)})]})}),h?w("pre",{id:"editor",class:"source"}):w("textarea",{ref:x,class:"source",spellcheck:!1,autocorrect:"off",onBlur:y.current}),w("a",{ref:m,style:"display: none;"})]})}function cm(e,t){for(var n in t)e[n]=t[n];return e}function Ec(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 Ac(e){this.props=e}function um(e,t){function n(i){var s=this.props.ref,o=s==i.ref;return!o&&s&&(s.call?s(null):s.current=null),t?!t(this.props,i)||!o:Ec(this.props,i)}function r(i){return this.shouldComponentUpdate=n,Wt(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Ac.prototype=new en).isPureReactComponent=!0,Ac.prototype.shouldComponentUpdate=function(e,t){return Ec(this.props,e)||Ec(this.state,t)};var of=le.__b;le.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),of&&of(e)};var H3=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function G3(e){function t(n){var r=cm({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=H3,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var af=function(e,t){return e==null?null:tn(tn(e).map(t))},Z3={map:af,forEach:af,count:function(e){return e?tn(e).length:0},only:function(e){var t=tn(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:tn},Y3=le.__e;le.__e=function(e,t,n,r){if(e.then){for(var i,s=t;s=s.__;)if((i=s.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Y3(e,t,n,r)};var lf=le.unmount;function Go(){this.__u=0,this.t=null,this.__b=null}function dm(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function W3(e){var t,n,r;function i(s){if(t||(t=e()).then(function(o){n=o.default||o},function(o){r=o}),r)throw r;if(!n)throw t;return Wt(n,s)}return i.displayName="Lazy",i.__f=!0,i}function ts(){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),lf&&lf(e)},(Go.prototype=new en).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=dm(r.__v),s=!1,o=function(){s||(s=!0,n.__R=null,i?i(a):a())};n.__R=o;var a=function(){if(!--r.__u){if(r.state.__e){var u=r.state.__e;r.__v.__k[0]=function d(f,h,_){return f&&(f.__v=null,f.__k=f.__k&&f.__k.map(function(g){return d(g,h,_)}),f.__c&&f.__c.__P===h&&(f.__e&&_.insertBefore(f.__e,f.__d),f.__c.__e=!0,f.__c.__P=_)),f}(u,u.__c.__P,u.__c.__O)}var c;for(r.setState({__e:r.__b=null});c=r.t.pop();)c.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(o,o)},Go.prototype.componentWillUnmount=function(){this.t=[]},Go.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function s(o,a,l){return o&&(o.__c&&o.__c.__H&&(o.__c.__H.__.forEach(function(u){typeof u.__c=="function"&&u.__c()}),o.__c.__H=null),(o=cm({},o)).__c!=null&&(o.__c.__P===l&&(o.__c.__P=a),o.__c=null),o.__k=o.__k&&o.__k.map(function(u){return s(u,a,l)})),o}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__e&&Wt(Yn,null,e.fallback);return i&&(i.__h=null),[Wt(Yn,null,t.__e?null:e.children),i]};var cf=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]>>1,1),t.i.removeChild(r)}}),Lr(Wt(q3,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function K3(e,t){var n=Wt(X3,{__v:e,i:t});return n.containerInfo=t,n}(ts.prototype=new en).__e=function(e){var t=this,n=dm(t.__v),r=t.o.get(e);return r[0]++,function(i){var s=function(){t.props.revealOrder?(r.push(i),cf(t,e,r)):i()};n?n(s):s()}},ts.prototype.render=function(e){this.u=null,this.o=new Map;var t=tn(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},ts.prototype.componentDidUpdate=ts.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){cf(e,n,t)})};var fm=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,J3=/^(?: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]/,Q3=typeof document!="undefined",e7=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function t7(e,t,n){return t.__k==null&&(t.textContent=""),Lr(e,t),typeof n=="function"&&n(),e?e.__c:null}function n7(e,t,n){return Tc(e,t),typeof n=="function"&&n(),e?e.__c:null}en.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(en.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var uf=le.event;function r7(){}function i7(){return this.cancelBubble}function s7(){return this.defaultPrevented}le.event=function(e){return uf&&(e=uf(e)),e.persist=r7,e.isPropagationStopped=i7,e.isDefaultPrevented=s7,e.nativeEvent=e};var hm,df={configurable:!0,get:function(){return this.class}},ff=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 s in r={},n){var o=n[s];Q3&&s==="children"&&t==="noscript"||s==="value"&&"defaultValue"in n&&o==null||(s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&o===!0?o="":/ondoubleclick/i.test(s)?s="ondblclick":/^onchange(textarea|input)/i.test(s+t)&&!e7(n.type)?s="oninput":/^onfocus$/i.test(s)?s="onfocusin":/^onblur$/i.test(s)?s="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(s)?s=s.toLowerCase():i&&J3.test(s)?s=s.replace(/[A-Z0-9]/,"-$&").toLowerCase():o===null&&(o=void 0),/^oninput/i.test(s)&&(s=s.toLowerCase(),r[s]&&(s="oninputCapture")),r[s]=o)}t=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=tn(n.children).forEach(function(a){a.props.selected=r.value.indexOf(a.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=tn(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&&(df.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",df))}e.$$typeof=fm,ff&&ff(e)};var hf=le.__r;le.__r=function(e){hf&&hf(e),hm=e.__c};var o7={ReactCurrentDispatcher:{current:{readContext:function(e){return hm.__n[e.__c].props.value}}}};function a7(e){return Wt.bind(null,e)}function pm(e){return!!e&&e.$$typeof===fm}function l7(e){return pm(e)?Oc.apply(null,arguments):e}function c7(e){return!!e.__k&&(Lr(null,e),!0)}function u7(e){return e&&(e.base||e.nodeType===1&&e)||null}var d7=function(e,t){return e(t)},f7=function(e,t){return e(t)},Sc={useState:K,useReducer:th,useEffect:he,useLayoutEffect:nh,useRef:Oe,useImperativeHandle:og,useMemo:$e,useCallback:Le,useContext:Yr,useDebugValue:ag,version:"17.0.2",Children:Z3,render:t7,hydrate:n7,unmountComponentAtNode:c7,createPortal:K3,createElement:Wt,createContext:wr,createFactory:a7,cloneElement:l7,createRef:jf,Fragment:Yn,isValidElement:pm,findDOMNode:u7,Component:en,PureComponent:Ac,memo:um,forwardRef:G3,flushSync:f7,unstable_batchedUpdates:d7,StrictMode:Yn,Suspense:Go,SuspenseList:ts,lazy:W3,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:o7};class mm 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 h7=["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"],p7=["number_provider.type","score_provider.type","nbt_provider.type","int_provider.type","float_provider.type","height_provider.type"],m7=["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"],g7=["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","immersive_weathering.area_condition.type","immersive_weathering.block_growth.growth_for_face.entry.direction","immersive_weathering.position_test.predicate_type"],_7=["function.set_nbt.tag","advancement.display.icon.nbt","text_component_object.nbt","entity.nbt","block.nbt","item.nbt"],w7=["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"],pf=["noise_settings.surface_rule","noise_settings.noise.terrain_shaper"],v7=["density_function.argument","density_function.argument1","density_function.argument2","density_function.input","density_function.when_in_range","density_function.when_out_of_range"],x7='',b7=e=>ke.generators.find(t=>t.id===e.replace(/^\$/,"")),y7=new P.DataModel(P.MapNode(P.StringNode(),P.StringNode()),{historyMax:0});function k7({model:e,lang:t,version:n,blockStates:r}){var l;const i=new P.ModelPath(e),[s,o,a]=e.schema.hook(gm,i,Ra(e.data),t,n,r,{});return(l=o==null?void 0:o.props)!=null&&l.children.some(u=>u)?F("div",{class:`node ${e.schema.type(i)}-node`,"data-category":e.schema.category(i),children:[F("div",{class:"node-header",children:[s,o]}),w("div",{class:"node-body",children:a})]}):a}const gm={base(){return[null,null,null]},boolean(e,t,n,r,i,s,o){return[null,w(E7,Ae(ce({},e),{path:t,value:n,lang:r,version:i,states:s,ctx:o})),null]},choice({choices:e,config:t,switchNode:n},r,i,s,o,a,l){const u=n.activeCase(r,!0),c=t!=null&&t.context?new P.ModelPath(r.getModel(),new P.Path(r.getArray(),[t.context])):r,[d,f,h]=u.node.hook(this,c,i,s,o,a,l);if(e.length===1)return[d,f,h];const _=t!=null&&t.choiceContext?new P.Path([],[t.choiceContext]):t!=null&&t.context?new P.Path([],[t.context]):r,g=m=>{var b;const v=(b=e.find(k=>k.type===m))!=null?b:u,y=v.node.default(),x=v.change?v.change(P.DataModel.unwrapLists(i)):t.choiceContext==="feature"&&(y==null?void 0:y.type)==="minecraft:decorated"?y.config.feature:y;r.model.set(r,P.DataModel.wrapLists(x))},p=w("select",{value:u.type,onChange:m=>g(m.target.value),children:e.map(m=>w("option",{value:m.type,children:wa(s,_.contextPush(m.type))}))});return[d,F(be,{children:[p,f]}),h]},list({children:e,config:t},n,r,i,s,o,a){const{expand:l,collapse:u,isToggled:c}=Ll(),[d,f]=K(50),h=n.getContext().join(".");if(w7.includes(h)){const v=F(be,{children:[[...Array(t.maxLength)].map((x,b)=>w(ns,{lang:i,path:n.modelPush(b)})),w("div",{class:"fixed-list"})]}),y=w(be,{children:[...Array(t.maxLength)].map((x,b)=>{var E;return e.hook(this,n.modelPush(b),(E=r==null?void 0:r[b])==null?void 0:E.node,i,s,o,a)[1]})});return[v,y,null]}const _=()=>{Array.isArray(r)||(r=[]);const v=P.DataModel.wrapLists(e.default());n.model.set(n,[{node:v,id:Mr()},...r])},g=()=>{Array.isArray(r)||(r=[]);const v=P.DataModel.wrapLists(e.default());n.model.set(n,[...r,{node:v,id:Mr()}])},p=w("button",{class:"add tooltipped tip-se","aria-label":Te(i,"add_top"),onClick:_,children:me.plus_circle}),m=F(be,{children:[r&&Array.isArray(r)&&r.map(({node:v,id:y},x)=>{if(x===d)return F("div",{class:"node node-header",children:[w("label",{children:Te(i,"entries_hidden",`${r.length-d}`)}),w("button",{onClick:()=>f(Math.min(d+50,r.length)),children:Te(i,"entries_hidden.more","50")}),w("button",{onClick:()=>f(r.length),children:Te(i,"entries_hidden.all")})]});if(x>d)return null;const b=n.push(x).contextPush("entry"),k=e.type(b)==="object",E=c(y);let S;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(b.getContext().join("."))&&vr(v)&&typeof v.type=="string"&&v.type.replace(/^minecraft:/,"")==="item"&&typeof v.name=="string"){const L=`item/${v.name.replace(/^minecraft:/,"")}`;os.get("texture").includes("minecraft:"+L)?S=w("img",{src:ox(s,L),alt:"",onError:W=>W.currentTarget.outerHTML=x7}):S=me.package}if(k&&(E===!1||E===void 0&&r.length>20))return F("div",{class:"node node-header","data-category":e.category(b),children:[w(ns,{lang:i,path:b,nested:!0}),w("button",{class:"toggle tooltipped tip-se","aria-label":`${Te(i,"expand")} ${Te(i,"expand_all","Ctrl")}`,onClick:l(y),children:me.chevron_right}),w("label",{children:S!=null?S:wa(i,b,`${x}`)}),w(mf,{path:b,value:v,schema:e},y)]});const C=()=>b.set(void 0),A=()=>{const L=[...n.get()];[L[x-1],L[x]]=[L[x],L[x-1]],n.model.set(n,L)},O=()=>{const L=[...n.get()];[L[x+1],L[x]]=[L[x],L[x+1]],n.model.set(n,L)};return F(Dl,{label:S,path:b,schema:e,value:v,lang:i,version:s,states:o,actions:[{icon:"duplicate",label:"duplicate",onSelect:()=>{const L=[...n.get()];L.splice(x,0,{id:Mr(),node:Ra(v)}),n.model.set(n,L)}}],ctx:Ae(ce({},a),{index:(x===0?1:0)+(x===r.length-1?2:0)}),children:[k&&w("button",{class:"toggle tooltipped tip-se","aria-label":`${Te(i,"collapse")} ${Te(i,"collapse_all","Ctrl")}`,onClick:u(y),children:me.chevron_down}),w("button",{class:"remove tooltipped tip-se","aria-label":Te(i,"remove"),onClick:C,children:me.trashcan}),r.length>1&&F("div",{class:"node-move",children:[w("button",{class:"move tooltipped tip-se","aria-label":Te(i,"move_up"),onClick:A,disabled:x===0,children:me.chevron_up}),w("button",{class:"move tooltipped tip-se","aria-label":Te(i,"move_down"),onClick:O,disabled:x===r.length-1,children:me.chevron_down})]})]},y)}),r&&r.length>0&&r.length<=d&&w("div",{class:"node node-header",children:w("button",{class:"add tooltipped tip-se","aria-label":Te(i,"add_bottom"),onClick:g,children:me.plus_circle})})]});return[null,p,m]},map({children:e,keys:t,config:n},r,i,s,o,a,l){var v,y,x,b,k;const{expand:u,collapse:c,isToggled:d}=Ll(),f=new P.ModelPath(y7,new P.Path([C7(r.toString())])),h=()=>{const E=f.get();r.model.set(r.push(E),P.DataModel.wrapLists(e.default()))},_=((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,g=_!=null&&_.properties?P.StringNode(null,{enum:Object.keys((y=_.properties)!=null?y:{})}):t;if(_&&r.last()==="Properties"){typeof i!="object"&&(i={});const E=Object.entries((x=_.properties)!=null?x:{}).map(([S,C])=>[S,P.StringNode(null,{enum:C})]);return Object.entries((b=_.properties)!=null?b:{}).forEach(([S,C])=>{typeof i[S]!="string"?r.model.errors.add(r.push(S),"error.expected_string"):C.includes(i[S])||r.model.errors.add(r.push(S),"error.invalid_enum_option",i[S])}),P.ObjectNode(Object.fromEntries(E)).hook(this,r,i,s,o,a,l)}const p=F(be,{children:[g.hook(this,f,(k=f.get())!=null?k:"",s,o,a,l)[1],w("button",{class:"add tooltipped tip-se","aria-label":Te(s,"add"),onClick:h,children:me.plus_circle})]}),m=w(be,{children:typeof i=="object"&&Object.entries(i).map(([E,S])=>{var W,U,M,$;const C=r.modelPush(E),A=e.type(C)==="object",O=d(E);if(A&&(O===!1||O===void 0&&i.length>20))return F("div",{class:"node node-header","data-category":e.category(C),children:[w(ns,{lang:s,path:C,nested:!0}),w("button",{class:"toggle tooltipped tip-se","aria-label":`${Te(s,"expand")} ${Te(s,"expand_all","Ctrl")}`,onClick:u(E),children:me.chevron_right}),w("label",{children:E}),w(mf,{path:C,value:S,schema:e},E)]});const D=_?P.StringNode(null,{enum:(U=(W=_.properties)==null?void 0:W[E])!=null?U:[]}):e;((M=_==null?void 0:_.properties)==null?void 0:M[E])&&typeof S=="string"&&!(($=_.properties)!=null&&$[E].includes(S))&&r.model.errors.add(C,"error.invalid_enum_option",S);const L=()=>C.set(void 0);return F(Dl,{schema:D,path:C,value:S,lang:s,version:o,states:a,ctx:l,label:E,children:[A&&w("button",{class:"toggle tooltipped tip-se","aria-label":`${Te(s,"collapse")} ${Te(s,"collapse_all","Ctrl")}`,onClick:c(E),children:me.chevron_down}),w("button",{class:"remove tooltipped tip-se","aria-label":Te(s,"remove"),onClick:L,children:me.trashcan})]},E)})});return[null,p,m]},number(e,t,n,r,i,s,o){return[null,w(A7,Ae(ce({},e),{path:t,value:n,lang:r,version:i,states:s,ctx:o})),null]},object({node:e,config:t,getActiveFields:n,getChildModelPath:r},i,s,o,a,l,u){var v;const{expand:c,collapse:d,isToggled:f}=Ll();if(i.getArray().length==0&&T7(t.context,s)){const{wrapper:y,fields:x}=O7(n(i),i,s);s=y.data,n=()=>x,r=(b,k)=>new P.ModelPath(y,new P.Path(b.getArray(),["feature"])).push(k)}let h=null,_=null;if(e.optional())if(s===void 0){const y=()=>i.set(P.DataModel.wrapLists(e.default()));_=w("button",{class:"collapse closed tooltipped tip-se","aria-label":Te(o,"expand"),onClick:y,children:me.plus_circle})}else{const y=()=>i.set(void 0);_=w("button",{class:"collapse open tooltipped tip-se","aria-label":Te(o,"remove"),onClick:y,children:me.trashcan})}const g=i.getContext().join(".");if(v7.includes(g)||pf.includes(g)){const y=f(""),x=pf.includes(g)?y:!y;if(h=w(be,{children:w("button",{class:"toggle tooltipped tip-se","aria-label":Te(o,x?"collapse":"expand"),onClick:y?d(""):c(""),children:x?me.chevron_down:me.chevron_right})}),!x)return[h,_,null]}const p=typeof s=="object"&&s!==null&&((v=e.default())==null?void 0:v.pools)?Ae(ce({},u),{loot:s==null?void 0:s.type}):u,m=w(be,{children:typeof s=="object"&&s!==null&&!(e.optional()&&s===void 0)&&Object.entries(n(i)).filter(([y,x])=>x.enabled(i)).map(([y,x])=>{const b=r(i,y),k=b.getContext().join(".");if(p7.includes(k))return null;const[E,S,C]=x.hook(this,b,s[y],o,a,l,p),A=x.type(b)==="object"&&m7.includes(k),O=g7.includes(k);return A||O?(h=F(be,{children:[h,w(ns,{lang:o,path:b}),w(_m,{lang:o,path:b}),E]}),_=F(be,{children:[_,S]}),A?C:null):w(Dl,{schema:x,path:b,value:s[y],lang:o,version:a,states:l,ctx:p},y)})});return[h,_,m]},string(e,t,n,r,i,s,o){return[null,w(S7,Ae(ce({},e),{path:t,value:n,lang:r,version:i,states:s,ctx:o})),null]}};function mf({path:e,value:t}){var r,i,s,o,a;switch(e.getContext().join(".")){case"loot_table.pools.entry":return F("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 w("label",{children:(a=(s=t==null?void 0:t.name)==null?void 0:s.replace(/^minecraft:/,""))!=null?a:(o=t==null?void 0:t.type)==null?void 0:o.replace(/^minecraft:/,"")})}for(const l of Object.values(t!=null?t:{}))if(typeof l=="string")return w("label",{children:l.replace(/^minecraft:/,"")});return null}function Ll(){const[e,t]=K(new Map),[n,r]=K(void 0);return{expand:a=>l=>{l.ctrlKey?(t(new Map),r(!0)):t(u=>new Map(u.set(a,!0)))},collapse:a=>l=>{l.ctrlKey?(t(new Map),r(!1)):t(u=>new Map(u.set(a,!1)))},isToggled:a=>{var l;return e instanceof Map?(l=e.get(a))!=null?l:n:!1}}}function E7({path:e,node:t,value:n,lang:r}){const i=s=>{e.model.set(e,t.optional()&&n===s?void 0:s)};return F(be,{children:[w("button",{class:n===!1?"selected":"",onClick:()=>i(!1),children:Te(r,"false")}),w("button",{class:n===!0?"selected":"",onClick:()=>i(!0),children:Te(r,"true")})]})}function A7({path:e,config:t,integer:n,value:r,lang:i}){var a;const s=l=>{const u=l.target.value,c=n?parseInt(u):parseFloat(u);e.model.set(e,c)},o=l=>{const u=l.target.value,c=parseInt(u.slice(1),16);e.model.set(e,c)};return F(be,{children:[w("input",{type:"text",value:r!=null?r:"",onBlur:s,onKeyDown:l=>{l.key==="Enter"&&s(l)}}),(t==null?void 0:t.color)&&w("input",{type:"color",value:"#"+((a=r==null?void 0:r.toString(16).padStart(6,"0"))!=null?a:"000000"),onChange:o}),["dimension.generator.seed","dimension.generator.biome_source.seed","world_settings.seed","structure_placement.salt"].includes(e.getContext().join("."))&&w("button",{onClick:()=>P1(e.model),class:"tooltipped tip-se","aria-label":Te(i,"generate_new_seed"),children:me.sync})]})}function S7({path:e,getValues:t,config:n,node:r,value:i,lang:s,version:o,states:a}){var f,h,_;const l=g=>{g.stopPropagation();const p=g.target.value;p!==i&&e.model.set(e,p.length===0?void 0:p)},u=t(),c=e.getContext().join("."),d=!Ji(n)&&(n==null?void 0:n.validator)==="resource"&&typeof n.params.pool=="string"?n.params.pool:void 0;if(_7.includes(c))return w("textarea",{value:i!=null?i:"",onBlur:l});if(Ji(n)&&!n.additional||h7.includes(c)){let g=new P.Path([]);return Ji(n)&&typeof n.enum=="string"?g=g.contextPush(n.enum):d?g=g.contextPush(d):Ji(n)&&(g=e),F("select",{value:i!=null?i:"",onChange:l,children:[r.optional()&&w("option",{value:"",children:Te(s,"unset")}),u.map(p=>w("option",{value:p,children:wa(s,g.contextPush(p.replace(/^minecraft:/,"")))}))]})}else if(!Ji(n)&&(n==null?void 0:n.validator)==="block_state_key"){const g=a==null?void 0:a[P.relativePath(e,n.params.id).get()],p=Object.keys((f=g==null?void 0:g.properties)!=null?f:{});return w("select",{value:i!=null?i:"",onChange:l,children:p.map(m=>w("option",{children:m}))})}else{const{biomeColors:g,setBiomeColor:p}=rp(),m=typeof i=="string"?i.includes(":")?i:"minecraft:"+i:"unknown",v=Mr(),y=d?b7(d):void 0;return F(be,{children:[w("input",{value:i!=null?i:"",onBlur:l,onKeyDown:x=>{x.key==="Enter"&&l(x)},list:u.length>0?v:""}),u.length>0&&w("datalist",{id:v,children:u.map(x=>w("option",{value:x}))}),["generator_biome.biome"].includes(c)&&w("input",{type:"color",value:Pv((_=(h=g[m])!=null?h:om[m])!=null?_:Wc(m)),onChange:x=>p(m,$v(x.currentTarget.value))}),["attribute_modifier.id","text_component_object.hoverEvent.show_entity.contents.id"].includes(c)&&w("button",{onClick:()=>e.set(Nv()),class:"tooltipped tip-se","aria-label":Te(s,"generate_new_uuid"),children:me.sync}),y&&u.includes(i)&&i.startsWith("minecraft:")&&w("a",{href:`/${y.url}/?version=${o}&preset=${i.replace(/^minecraft:/,"")}`,class:"tooltipped tip-se","aria-label":Te(s,"follow_reference"),children:me.link_external})]})}}function I7({label:e,schema:t,path:n,value:r,lang:i,version:s,states:o,ctx:a,actions:l,children:u}){var x;const c=t.type(n),d=t.category(n),f=n.getContext().join("."),[h,_]=La(),g=b=>{b.preventDefault(),_()},p=Ae(ce({},a),{depth:((x=a.depth)!=null?x:0)+1});delete p.index;const[m,v,y]=t.hook(gm,n,r,i,s,o,p);return F("div",{class:`node ${c}-node`,"data-category":d,children:[F("div",{class:"node-header",onContextMenu:g,children:[w(ns,{lang:i,path:n}),w(_m,{lang:i,path:n}),u,m,F("label",{children:[e!=null?e:wa(i,n,`${n.last()}`),h&&F("div",{class:"node-menu",children:[l==null?void 0:l.map(b=>{var k;return F("div",{class:"menu-item",children:[w(oe,{icon:b.icon,tooltip:Te(i,b.label),tooltipLoc:"se",onClick:()=>b.onSelect()}),w("span",{children:(k=b.description)!=null?k:Te(i,b.label)})]},b.label)}),F("div",{class:"menu-item",children:[w(oe,{icon:"clippy",tooltip:Te(i,"copy_context"),tooltipLoc:"se",onClick:()=>navigator.clipboard.writeText(f)}),w("span",{children:f})]})]})]}),v]}),y&&w("div",{class:"node-body",children:y})]})}const Dl=um(I7,(e,t)=>e.schema===t.schema&&e.lang===t.lang&&e.path.equals(t.path)&&Fr(e.ctx,t.ctx)&&Fr(e.value,t.value));function Ji(e){return!!(e!=null&&e.enum)}function C7(e){var t=0,n,r;for(n=0;no.path.startsWith(t)):t.model.errors.get(t,!0);if(r.length===0)return null;const i=Te(e,r[0].error,...(s=r[0].params)!=null?s:[]);return wm("node-error","issue_opened",i)}function _m({lang:e,path:t}){const n=t.contextPush("help").getContext().join("."),r=Te(e,n);return r===n?null:wm("node-help","info",r)}const wm=(e,t,n)=>{const[r,i]=La();return F("div",{class:`node-icon ${e}${r?" show":""}`,onClick:()=>i(),children:[me[t],w("span",{class:"icon-popup",children:n})]})};function T7(e,t){var n;return e==="feature"&&((n=t==null?void 0:t.type)==null?void 0:n.replace(/^minecraft:/,""))==="decorated"&&vr(t==null?void 0:t.config)}function O7(e,t,n){const r=[],i=rs(n,r),s={type:e.type,config:P.ObjectNode({decorators:P.ListNode(Z1),feature:Y1},{context:"feature.decorated"})},o=P.ObjectNode(s,{context:"feature"}),a=new P.Path(["config","feature"]),l=new P.Path(["config","decorators"]),u=t.getModel(),c=new mm(o,d=>{if(d.startsWith(a))return new P.Path([...[...Array(r.length-1)].flatMap(()=>["config","feature"]),...d.modelArr]);if(d.startsWith(l)){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(l)){const f=[];return rs(u.data,f),f}return u.get(c.map(d))},(d,f,h)=>{if(d.startsWith(a)){const _=[];rs(u.data,_);const g=new P.Path([...[...Array(_.length-1)].flatMap(()=>["config","feature"]),...d.modelArr]);return u.set(g,f,h)}else if(d.startsWith(l)){const _=d.modelArr[2];if(d.modelArr.length===2){const g=c.get(a);return u.set(new P.Path,Ic(g,f),h)}else if(typeof _=="number")if(d.modelArr.length===3&&f===void 0){const g=c.get(a),p=[];rs(u.data,p),p.splice(_,1);const m=Ic(g,p);return u.set(new P.Path,m,h)}else{const g=new P.Path([...[...Array(_)].flatMap(()=>["config","feature"]),"config","decorator",...d.modelArr.slice(3)]);return u.set(g,f,h)}}u.set(d,f,h)});return c.data={type:u.data.type,config:{decorators:r,feature:i}},c.errors=u.errors,{fields:s,wrapper:c}}function rs(e,t){var n,r;return((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,""))!=="decorated"||!vr(e==null?void 0:e.config)?e:(t.push({id:t.length,node:e.config.decorator}),rs((r=e.config.feature)!=null?r:"",t))}function Ic(e,t){return t.length===0?e:{type:"minecraft:decorated",config:{decorator:t.shift().node,feature:Ic(e,t)}}}function M7({version:e,model:t,blockStates:n,onError:r}){const{lang:i}=Be();if(!t||!n||i==="none")return w(be,{});const[s]=rh(a=>{r(`Error rendering the tree: ${a.message}`),console.error(a)});if(s)return w(be,{});const[,o]=K(0);return Da(t,()=>{o(a=>a+1)}),w("div",{class:"tree","data-cy":"tree",children:w(k7,{model:t,lang:i,version:e,blockStates:n})})}var N7=Object.defineProperty,R7=Object.defineProperties,L7=Object.getOwnPropertyDescriptors,gf=Object.getOwnPropertySymbols,D7=Object.prototype.hasOwnProperty,F7=Object.prototype.propertyIsEnumerable,_f=(e,t,n)=>t in e?N7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vm=(e,t)=>{for(var n in t||(t={}))D7.call(t,n)&&_f(e,n,t[n]);if(gf)for(var n of gf(t))F7.call(t,n)&&_f(e,n,t[n]);return e};const wf="Please consider reporting this error at https://github.com/laymonage/giscus/issues/new.";function Eo(e){return`[giscus] An error occurred. Error message: "${e}".`}function vf(e){const t=document.querySelector(`meta[property='og:${e}'],meta[name='${e}']`);return t?t.content:""}function P7(){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 $7(e){const[t,n]=K(""),r=function({repo:o,repoId:a,category:l="",categoryId:u="",mapping:c,term:d="",theme:f="light",reactionsEnabled:h="1",emitMetadata:_="0",inputPosition:g="bottom",lang:p="en",session:m,origin:v}){const y=new URL(location.href);y.searchParams.delete("giscus");const x=y.toString(),b={origin:v=v||x,session:m,theme:f,reactionsEnabled:h,emitMetadata:_,inputPosition:g,repo:o,repoId:a,category:l,categoryId:u,description:vf("description")};switch(c){case"url":b.term=x;break;case"title":b.term=document.title;break;case"og:title":b.term=vf("title");break;case"specific":b.term=d;break;case"number":b.number=d;break;case"pathname":default:b.term=location.pathname.length<2?"index":location.pathname.substring(1).replace(/\.\w+$/,"")}return`https://giscus.app/${p}/widget?${new URLSearchParams(b)}`}((i=vm({},e),R7(i,L7({session:t}))));var i;const s=Oe(null);return he(()=>{const o=location.href,a=new URL(o),l=localStorage.getItem("giscus-session"),u=a.searchParams.get("giscus")||"";if(u)return localStorage.setItem("giscus-session",JSON.stringify(u)),n(u),a.searchParams.delete("giscus"),void history.replaceState(void 0,document.title,a.toString());if(l)try{n(JSON.parse(l||"")||"")}catch(c){n(""),localStorage.removeItem("giscus-session"),console.warn(`${Eo(c==null?void 0:c.message)} Session has been cleared.`)}},[]),he(P7,[]),he(()=>{const o=function(a,l=null){return function(u){if(u.origin!=="https://giscus.app")return;const{data:c}=u;if(typeof c!="object"||!c.giscus||(l&&c.giscus.resizeHeight&&(l.style.height=`${c.giscus.resizeHeight}px`),!c.giscus.error))return;const d=c.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(`${Eo(d)} Session has been cleared.`);console.error(`${Eo(d)} No session is stored initially. ${wf}`)}d.includes("Discussion not found")?console.warn(`[giscus] ${d}. A new discussion will be created if a comment/reaction is submitted.`):console.error(`${Eo(d)} ${wf}`)}}(()=>n(""),s.current);return window.addEventListener("message",o),()=>window.removeEventListener("message",o)},[]),Sc.createElement("div",{className:"giscus"},Sc.createElement("iframe",{className:"giscus-frame",title:"Comments",scrolling:"no",src:r,ref:s}))}function B7(e){const[t,n]=K(!1);return he(()=>n(!0),[]),t?Sc.createElement($7,vm({},e)):null}function uu({term:e}){const{actualTheme:t}=sp(),n=t==="light"?"-burn":"",r=`${location.protocol}//${location.host}/assets/giscus${n}.css`;return w("div",{class:"giscus-container",children:w(B7,{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 j7({title:e,link:t,versions:n,tags:r,activeTags:i,toggleTag:s}){const o=a=>l=>{s&&s(a),l.preventDefault(),l.stopImmediatePropagation()};return F("a",{class:"guide-card",href:t,children:[w("span",{class:"guide-versions",children:n.join(" \u2022 ")}),w("h3",{children:e}),w("div",{class:"guide-tags",children:r.sort().map(a=>w(Js,{label:a,onClick:o(a),active:i==null?void 0:i.includes(a)}))})]})}const xf={system:"device_desktop",dark:"moon",light:"sun"};function z7(){const{lang:e,locale:t,changeLocale:n}=Be(),{theme:r,changeTheme:i}=sp(),{version:s}=Wr(),{projects:o,project:a,changeProject:l}=er(),{title:u}=gn(),c=Ii(),d=B1(c);return F("header",{children:[F("div",{class:"title",children:[w(Qf,{class:"home-link",href:"/","aria-label":t("home"),"data-cy":"home-link",children:xm.home}),w("h1",{children:u}),d&&w(jt,{icon:"chevron_down",tooltip:t("switch_generator"),"data-cy":"generator-switcher",children:ke.generators.filter(f=>f.category===(d==null?void 0:d.category)&&_t(s,f.minVersion)).map(f=>w(oe,{label:t(f.partner?`partner.${f.partner}.${f.id}`:f.id),active:f.id===d.id,onClick:()=>Gr(On(f.url))}))}),!d&&c.match(/\/?project\/?$/)&&w(jt,{icon:"chevron_down",tooltip:t("switch_project"),children:o.map(f=>w(oe,{label:f.name,active:f.name===a.name,onClick:()=>l(f.name)}))})]}),w("nav",{children:F("ul",{children:[w("li",{"data-cy":"language-switcher",children:w(jt,{icon:"globe",tooltip:t("language"),children:ke.languages.map(({code:f,name:h})=>w(oe,{label:h,active:f===e,onClick:()=>n(f)}))})}),w("li",{"data-cy":"theme-switcher",children:w(jt,{icon:xf[r],tooltip:t("theme"),children:Object.entries(xf).map(([f,h])=>w(oe,{icon:h,label:t(`theme.${f}`),active:f===r,onClick:()=>i(f)}))})}),w("li",{class:"dimmed",children:w("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer",class:"tooltipped tip-sw","aria-label":t("github"),children:me.mark_github})})]})})]})}const xm={home:F("svg",{width:"32",height:"28",viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w("rect",{width:"26",height:"6",rx:"3",fill:"#7CB45C"}),w("rect",{x:"8",width:"18",height:"6",rx:"3",fill:"#4BA041"}),w("rect",{y:"11",width:"32",height:"6",rx:"3",fill:"#AAA8A8"}),w("rect",{x:"11",y:"11",width:"21",height:"6",rx:"3",fill:"#91908F"}),w("rect",{x:"11",y:"22",width:"21",height:"6",rx:"3",fill:"#70B5C3"}),w("rect",{x:"17",y:"22",width:"15",height:"6",rx:"3",fill:"#4D989B"})]}),report:F("svg",{width:"30",height:"36",viewBox:"0 0 30 36",xmlns:"http://www.w3.org/2000/svg",children:[w("path",{d:"M0 16C0 13.7909 1.79086 12 4 12V12C6.20914 12 8 13.7909 8 16V32C8 34.2091 6.20914 36 4 36V36C1.79086 36 0 34.2091 0 32V16Z",fill:"#6ACC5D"}),w("path",{d:"M11 4C11 1.79086 12.7909 0 15 0V0C17.2091 0 19 1.79086 19 4V32C19 34.2091 17.2091 36 15 36V36C12.7909 36 11 34.2091 11 32V4Z",fill:"#FF4C4C"}),w("path",{d:"M22 10C22 7.79086 23.7909 6 26 6V6C28.2091 6 30 7.79086 30 10V32C30 34.2091 28.2091 36 26 36V36C23.7909 36 22 34.2091 22 32V10Z",fill:"#E5B442"}),w("path",{d:"M0 23C0 20.7909 1.79086 19 4 19V19C6.20914 19 8 20.7909 8 23V32C8 34.2091 6.20914 36 4 36V36C1.79086 36 0 34.2091 0 32V23Z",fill:"#2BAD1D"}),w("path",{d:"M11 15C11 12.7909 12.7909 11 15 11V11C17.2091 11 19 12.7909 19 15V32C19 34.2091 17.2091 36 15 36V36C12.7909 36 11 34.2091 11 32V15Z",fill:"#C10B0B"}),w("path",{d:"M22 19C22 16.7909 23.7909 15 26 15V15C28.2091 15 30 16.7909 30 19V32C30 34.2091 28.2091 36 26 36V36C23.7909 36 22 34.2091 22 32V19Z",fill:"#CC8E00"})]}),sounds:F("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[w("circle",{cx:"10",cy:"10",r:"10",fill:"#451475"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.5 10C3.5 8.27609 4.18482 6.62279 5.40381 5.40381C6.62279 4.18482 8.27609 3.5 10 3.5C11.7239 3.5 13.3772 4.18482 14.5962 5.40381C15.8152 6.62279 16.5 8.27609 16.5 10C16.5 11.7239 15.8152 13.3772 14.5962 14.5962C13.3772 15.8152 11.7239 16.5 10 16.5C8.27609 16.5 6.62279 15.8152 5.40381 14.5962C4.18482 13.3772 3.5 11.7239 3.5 10V10ZM10 2C7.87827 2 5.84344 2.84285 4.34315 4.34315C2.84285 5.84344 2 7.87827 2 10C2 12.1217 2.84285 14.1566 4.34315 15.6569C5.84344 17.1571 7.87827 18 10 18C12.1217 18 14.1566 17.1571 15.6569 15.6569C17.1571 14.1566 18 12.1217 18 10C18 7.87827 17.1571 5.84344 15.6569 4.34315C14.1566 2.84285 12.1217 2 10 2V2ZM8.379 7.227C8.34101 7.20412 8.29762 7.19175 8.25327 7.19117C8.20892 7.19059 8.16522 7.20181 8.12664 7.2237C8.08807 7.24558 8.05601 7.27733 8.03375 7.3157C8.0115 7.35406 7.99985 7.39765 8 7.442V12.559C8.00003 12.6033 8.0118 12.6467 8.03413 12.685C8.05646 12.7232 8.08854 12.7548 8.12708 12.7765C8.16563 12.7983 8.20926 12.8095 8.25352 12.8088C8.29778 12.8082 8.34108 12.7958 8.379 12.773L12.643 10.214C12.6798 10.1917 12.7103 10.1604 12.7315 10.1229C12.7526 10.0854 12.7638 10.043 12.7638 10C12.7638 9.95695 12.7526 9.91463 12.7315 9.87714C12.7103 9.83965 12.6798 9.80825 12.643 9.786L8.379 7.227Z",fill:"#C5A5E6"})]})},me={alert:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"})}),archive:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M1.75 2.5a.25.25 0 00-.25.25v1.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25v-1.5a.25.25 0 00-.25-.25H1.75zM0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v1.5A1.75 1.75 0 0114.25 6H1.75A1.75 1.75 0 010 4.25v-1.5zM1.75 7a.75.75 0 01.75.75v5.5c0 .138.112.25.25.25h10.5a.25.25 0 00.25-.25v-5.5a.75.75 0 111.5 0v5.5A1.75 1.75 0 0113.25 15H2.75A1.75 1.75 0 011 13.25v-5.5A.75.75 0 011.75 7zm4.5 1a.75.75 0 000 1.5h3.5a.75.75 0 100-1.5h-3.5z"})}),arrow_left:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M7.78 12.53a.75.75 0 01-1.06 0L2.47 8.28a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 1.06L4.81 7h7.44a.75.75 0 010 1.5H4.81l2.97 2.97a.75.75 0 010 1.06z"})}),arrow_right:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M8.22 2.97a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06l2.97-2.97H3.75a.75.75 0 010-1.5h7.44L8.22 4.03a.75.75 0 010-1.06z"})}),check:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"})}),chevron_down:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M12.78 6.22a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06 0L3.22 7.28a.75.75 0 011.06-1.06L8 9.94l3.72-3.72a.75.75 0 011.06 0z"})}),chevron_left:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z"})}),chevron_up:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M3.22 9.78a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 0l4.25 4.25a.75.75 0 01-1.06 1.06L8 6.06 4.28 9.78a.75.75 0 01-1.06 0z"})}),clippy:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M5.75 1a.75.75 0 00-.75.75v3c0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75v-3a.75.75 0 00-.75-.75h-4.5zm.75 3V2.5h3V4h-3zm-2.874-.467a.75.75 0 00-.752-1.298A1.75 1.75 0 002 3.75v9.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 13.25v-9.5a1.75 1.75 0 00-.874-1.515.75.75 0 10-.752 1.298.25.25 0 01.126.217v9.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-9.5a.25.25 0 01.126-.217z"})}),code:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M4.72 3.22a.75.75 0 011.06 1.06L2.06 8l3.72 3.72a.75.75 0 11-1.06 1.06L.47 8.53a.75.75 0 010-1.06l4.25-4.25zm6.56 0a.75.75 0 10-1.06 1.06L13.94 8l-3.72 3.72a.75.75 0 101.06 1.06l4.25-4.25a.75.75 0 000-1.06l-4.25-4.25z"})}),codescan_checkmark:F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:[w("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"}),w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M2 8a.75.75 0 01.75-.75h10.5a.75.75 0 010 1.5H2.75A.75.75 0 012 8z"})}),device_desktop:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M1.75 2.5h12.5a.25.25 0 01.25.25v7.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25v-7.5a.25.25 0 01.25-.25zM14.25 1H1.75A1.75 1.75 0 000 2.75v7.5C0 11.216.784 12 1.75 12h3.727c-.1 1.041-.52 1.872-1.292 2.757A.75.75 0 004.75 16h6.5a.75.75 0 00.565-1.243c-.772-.885-1.193-1.716-1.292-2.757h3.727A1.75 1.75 0 0016 10.25v-7.5A1.75 1.75 0 0014.25 1zM9.018 12H6.982a5.72 5.72 0 01-.765 2.5h3.566a5.72 5.72 0 01-.765-2.5z"})}),dot_fill:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8z"})}),download:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M7.47 10.78a.75.75 0 001.06 0l3.75-3.75a.75.75 0 00-1.06-1.06L8.75 8.44V1.75a.75.75 0 00-1.5 0v6.69L4.78 5.97a.75.75 0 00-1.06 1.06l3.75 3.75zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z"})}),duplicate:F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:[w("path",{d:"M10.5 3a.75.75 0 01.75.75v1h1a.75.75 0 010 1.5h-1v1a.75.75 0 01-1.5 0v-1h-1a.75.75 0 010-1.5h1v-1A.75.75 0 0110.5 3z"}),w("path",{"fill-rule":"evenodd",d:"M6.75 0A1.75 1.75 0 005 1.75v7.5c0 .966.784 1.75 1.75 1.75h7.5A1.75 1.75 0 0016 9.25v-7.5A1.75 1.75 0 0014.25 0h-7.5zM6.5 1.75a.25.25 0 01.25-.25h7.5a.25.25 0 01.25.25v7.5a.25.25 0 01-.25.25h-7.5a.25.25 0 01-.25-.25v-7.5z"}),w("path",{d:"M1.75 5A1.75 1.75 0 000 6.75v7.5C0 15.216.784 16 1.75 16h7.5A1.75 1.75 0 0011 14.25v-1.5a.75.75 0 00-1.5 0v1.5a.25.25 0 01-.25.25h-7.5a.25.25 0 01-.25-.25v-7.5a.25.25 0 01.25-.25h1.5a.75.75 0 000-1.5h-1.5z"})]}),eye:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M1.679 7.932c.412-.621 1.242-1.75 2.366-2.717C5.175 4.242 6.527 3.5 8 3.5c1.473 0 2.824.742 3.955 1.715 1.124.967 1.954 2.096 2.366 2.717a.119.119 0 010 .136c-.412.621-1.242 1.75-2.366 2.717C10.825 11.758 9.473 12.5 8 12.5c-1.473 0-2.824-.742-3.955-1.715C2.92 9.818 2.09 8.69 1.679 8.068a.119.119 0 010-.136zM8 2c-1.981 0-3.67.992-4.933 2.078C1.797 5.169.88 6.423.43 7.1a1.619 1.619 0 000 1.798c.45.678 1.367 1.932 2.637 3.024C4.329 13.008 6.019 14 8 14c1.981 0 3.67-.992 4.933-2.078 1.27-1.091 2.187-2.345 2.637-3.023a1.619 1.619 0 000-1.798c-.45-.678-1.367-1.932-2.637-3.023C11.671 2.992 9.981 2 8 2zm0 8a2 2 0 100-4 2 2 0 000 4z"})}),eye_closed:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M.143 2.31a.75.75 0 011.047-.167l14.5 10.5a.75.75 0 11-.88 1.214l-2.248-1.628C11.346 13.19 9.792 14 8 14c-1.981 0-3.67-.992-4.933-2.078C1.797 10.832.88 9.577.43 8.9a1.618 1.618 0 010-1.797c.353-.533.995-1.42 1.868-2.305L.31 3.357A.75.75 0 01.143 2.31zm3.386 3.378a14.21 14.21 0 00-1.85 2.244.12.12 0 00-.022.068c0 .021.006.045.022.068.412.621 1.242 1.75 2.366 2.717C5.175 11.758 6.527 12.5 8 12.5c1.195 0 2.31-.488 3.29-1.191L9.063 9.695A2 2 0 016.058 7.52l-2.53-1.832zM8 3.5c-.516 0-1.017.09-1.499.251a.75.75 0 11-.473-1.423A6.23 6.23 0 018 2c1.981 0 3.67.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.619 1.619 0 010 1.798c-.11.166-.248.365-.41.587a.75.75 0 11-1.21-.887c.148-.201.272-.382.371-.53a.119.119 0 000-.137c-.412-.621-1.242-1.75-2.366-2.717C10.825 4.242 9.473 3.5 8 3.5z"})}),file:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M3.75 1.5a.25.25 0 00-.25.25v11.5c0 .138.112.25.25.25h8.5a.25.25 0 00.25-.25V6H9.75A1.75 1.75 0 018 4.25V1.5H3.75zm5.75.56v2.19c0 .138.112.25.25.25h2.19L9.5 2.06zM2 1.75C2 .784 2.784 0 3.75 0h5.086c.464 0 .909.184 1.237.513l3.414 3.414c.329.328.513.773.513 1.237v8.086A1.75 1.75 0 0112.25 15h-8.5A1.75 1.75 0 012 13.25V1.75z"})}),file_directory:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M1.75 1A1.75 1.75 0 000 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3h-6.5a.25.25 0 01-.2-.1l-.9-1.2c-.33-.44-.85-.7-1.4-.7h-3.5z"})}),file_zip:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M7.429 1.525a6.593 6.593 0 011.142 0c.036.003.108.036.137.146l.289 1.105c.147.56.55.967.997 1.189.174.086.341.183.501.29.417.278.97.423 1.53.27l1.102-.303c.11-.03.175.016.195.046.219.31.41.641.573.989.014.031.022.11-.059.19l-.815.806c-.411.406-.562.957-.53 1.456a4.588 4.588 0 010 .582c-.032.499.119 1.05.53 1.456l.815.806c.08.08.073.159.059.19a6.494 6.494 0 01-.573.99c-.02.029-.086.074-.195.045l-1.103-.303c-.559-.153-1.112-.008-1.529.27-.16.107-.327.204-.5.29-.449.222-.851.628-.998 1.189l-.289 1.105c-.029.11-.101.143-.137.146a6.613 6.613 0 01-1.142 0c-.036-.003-.108-.037-.137-.146l-.289-1.105c-.147-.56-.55-.967-.997-1.189a4.502 4.502 0 01-.501-.29c-.417-.278-.97-.423-1.53-.27l-1.102.303c-.11.03-.175-.016-.195-.046a6.492 6.492 0 01-.573-.989c-.014-.031-.022-.11.059-.19l.815-.806c.411-.406.562-.957.53-1.456a4.587 4.587 0 010-.582c.032-.499-.119-1.05-.53-1.456l-.815-.806c-.08-.08-.073-.159-.059-.19a6.44 6.44 0 01.573-.99c.02-.029.086-.075.195-.045l1.103.303c.559.153 1.112.008 1.529-.27.16-.107.327-.204.5-.29.449-.222.851-.628.998-1.189l.289-1.105c.029-.11.101-.143.137-.146zM8 0c-.236 0-.47.01-.701.03-.743.065-1.29.615-1.458 1.261l-.29 1.106c-.017.066-.078.158-.211.224a5.994 5.994 0 00-.668.386c-.123.082-.233.09-.3.071L3.27 2.776c-.644-.177-1.392.02-1.82.63a7.977 7.977 0 00-.704 1.217c-.315.675-.111 1.422.363 1.891l.815.806c.05.048.098.147.088.294a6.084 6.084 0 000 .772c.01.147-.038.246-.088.294l-.815.806c-.474.469-.678 1.216-.363 1.891.2.428.436.835.704 1.218.428.609 1.176.806 1.82.63l1.103-.303c.066-.019.176-.011.299.071.213.143.436.272.668.386.133.066.194.158.212.224l.289 1.106c.169.646.715 1.196 1.458 1.26a8.094 8.094 0 001.402 0c.743-.064 1.29-.614 1.458-1.26l.29-1.106c.017-.066.078-.158.211-.224a5.98 5.98 0 00.668-.386c.123-.082.233-.09.3-.071l1.102.302c.644.177 1.392-.02 1.82-.63.268-.382.505-.789.704-1.217.315-.675.111-1.422-.364-1.891l-.814-.806c-.05-.048-.098-.147-.088-.294a6.1 6.1 0 000-.772c-.01-.147.039-.246.088-.294l.814-.806c.475-.469.679-1.216.364-1.891a7.992 7.992 0 00-.704-1.218c-.428-.609-1.176-.806-1.82-.63l-1.103.303c-.066.019-.176.011-.299-.071a5.991 5.991 0 00-.668-.386c-.133-.066-.194-.158-.212-.224L10.16 1.29C9.99.645 9.444.095 8.701.031A8.094 8.094 0 008 0zm1.5 8a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM11 8a3 3 0 11-6 0 3 3 0 016 0z"})}),globe:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M1.543 7.25h2.733c.144-2.074.866-3.756 1.58-4.948.12-.197.237-.381.353-.552a6.506 6.506 0 00-4.666 5.5zm2.733 1.5H1.543a6.506 6.506 0 004.666 5.5 11.13 11.13 0 01-.352-.552c-.715-1.192-1.437-2.874-1.581-4.948zm1.504 0h4.44a9.637 9.637 0 01-1.363 4.177c-.306.51-.612.919-.857 1.215a9.978 9.978 0 01-.857-1.215A9.637 9.637 0 015.78 8.75zm4.44-1.5H5.78a9.637 9.637 0 011.363-4.177c.306-.51.612-.919.857-1.215.245.296.55.705.857 1.215A9.638 9.638 0 0110.22 7.25zm1.504 1.5c-.144 2.074-.866 3.756-1.58 4.948-.12.197-.237.381-.353.552a6.506 6.506 0 004.666-5.5h-2.733zm2.733-1.5h-2.733c-.144-2.074-.866-3.756-1.58-4.948a11.738 11.738 0 00-.353-.552 6.506 6.506 0 014.666 5.5zM8 0a8 8 0 100 16A8 8 0 008 0z"})}),heart:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M1.643 3.143L.427 1.927A.25.25 0 000 2.104V5.75c0 .138.112.25.25.25h3.646a.25.25 0 00.177-.427L2.715 4.215a6.5 6.5 0 11-1.18 4.458.75.75 0 10-1.493.154 8.001 8.001 0 101.6-5.684zM7.75 4a.75.75 0 01.75.75v2.992l2.028.812a.75.75 0 01-.557 1.392l-2.5-1A.75.75 0 017 8.25v-3.5A.75.75 0 017.75 4z"})}),info:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm6.5-.25A.75.75 0 017.25 7h1a.75.75 0 01.75.75v2.75h.25a.75.75 0 010 1.5h-2a.75.75 0 010-1.5h.25v-2h-.25a.75.75 0 01-.75-.75zM8 6a1 1 0 100-2 1 1 0 000 2z"})}),issue_opened:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zm-.25-6.25a.75.75 0 00-1.5 0v3.5a.75.75 0 001.5 0v-3.5z"})}),kebab_horizontal:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{d:"M8 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM1.5 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zm13 0a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"})}),link:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"})}),link_external:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M10.604 1h4.146a.25.25 0 01.25.25v4.146a.25.25 0 01-.427.177L13.03 4.03 9.28 7.78a.75.75 0 01-1.06-1.06l3.75-3.75-1.543-1.543A.25.25 0 0110.604 1zM3.75 2A1.75 1.75 0 002 3.75v8.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 12.25v-3.5a.75.75 0 00-1.5 0v3.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-8.5a.25.25 0 01.25-.25h3.5a.75.75 0 000-1.5h-3.5z"})}),mark_github:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})}),moon:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M9.598 1.591a.75.75 0 01.785-.175 7 7 0 11-8.967 8.967.75.75 0 01.961-.96 5.5 5.5 0 007.046-7.046.75.75 0 01.175-.786zm1.616 1.945a7 7 0 01-7.678 7.678 5.5 5.5 0 107.678-7.678z"})}),package:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zM6.379 5.227A.25.25 0 006 5.442v5.117a.25.25 0 00.379.214l4.264-2.559a.25.25 0 000-.428L6.379 5.227z"})}),plus:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M8 2a.75.75 0 01.75.75v4.5h4.5a.75.75 0 010 1.5h-4.5v4.5a.75.75 0 01-1.5 0v-4.5h-4.5a.75.75 0 010-1.5h4.5v-4.5A.75.75 0 018 2z"})}),plus_circle:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zm.75 4.75a.75.75 0 00-1.5 0v2.5h-2.5a.75.75 0 000 1.5h2.5v2.5a.75.75 0 001.5 0v-2.5h2.5a.75.75 0 000-1.5h-2.5v-2.5z"})}),repo:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"})}),rocket:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("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:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z"})}),sort_asc:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M0 4.25a.75.75 0 01.75-.75h2.5a.75.75 0 010 1.5H.75A.75.75 0 010 4.25zm0 4a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5H.75A.75.75 0 010 8.25zm0 4a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5H.75a.75.75 0 01-.75-.75zm12.927-9.677a.25.25 0 00-.354 0l-3 3A.25.25 0 009.75 6H12v6.75a.75.75 0 001.5 0V6h2.25a.25.25 0 00.177-.427l-3-3z"})}),sort_desc:F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:[w("path",{"fill-rule":"evenodd",d:"M0 4.25a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5H.75A.75.75 0 010 4.25zm0 4a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5H.75A.75.75 0 010 8.25zm0 4a.75.75 0 01.75-.75h2.5a.75.75 0 010 1.5H.75a.75.75 0 01-.75-.75z"}),w("path",{d:"M13.5 10h2.25a.25.25 0 01.177.427l-3 3a.25.25 0 01-.354 0l-3-3A.25.25 0 019.75 10H12V3.75a.75.75 0 011.5 0V10z"})]}),square:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M4 5.75C4 4.784 4.784 4 5.75 4h4.5c.966 0 1.75.784 1.75 1.75v4.5A1.75 1.75 0 0110.25 12h-4.5A1.75 1.75 0 014 10.25v-4.5zm1.75-.25a.25.25 0 00-.25.25v4.5c0 .138.112.25.25.25h4.5a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-4.5z"})}),square_fill:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M5.75 4A1.75 1.75 0 004 5.75v4.5c0 .966.784 1.75 1.75 1.75h4.5A1.75 1.75 0 0012 10.25v-4.5A1.75 1.75 0 0010.25 4h-4.5z"})}),stack:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M7.122.392a1.75 1.75 0 011.756 0l5.003 2.902c.83.481.83 1.68 0 2.162L8.878 8.358a1.75 1.75 0 01-1.756 0L2.119 5.456a1.25 1.25 0 010-2.162L7.122.392zM8.125 1.69a.25.25 0 00-.25 0l-4.63 2.685 4.63 2.685a.25.25 0 00.25 0l4.63-2.685-4.63-2.685zM1.601 7.789a.75.75 0 011.025-.273l5.249 3.044a.25.25 0 00.25 0l5.249-3.044a.75.75 0 01.752 1.298l-5.248 3.044a1.75 1.75 0 01-1.756 0L1.874 8.814A.75.75 0 011.6 7.789zm0 3.5a.75.75 0 011.025-.273l5.249 3.044a.25.25 0 00.25 0l5.249-3.044a.75.75 0 01.752 1.298l-5.248 3.044a1.75 1.75 0 01-1.756 0l-5.248-3.044a.75.75 0 01-.273-1.025z"})}),sun:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M8 10.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zM8 12a4 4 0 100-8 4 4 0 000 8zM8 0a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0V.75A.75.75 0 018 0zm0 13a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 018 13zM2.343 2.343a.75.75 0 011.061 0l1.06 1.061a.75.75 0 01-1.06 1.06l-1.06-1.06a.75.75 0 010-1.06zm9.193 9.193a.75.75 0 011.06 0l1.061 1.06a.75.75 0 01-1.06 1.061l-1.061-1.06a.75.75 0 010-1.061zM16 8a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 0116 8zM3 8a.75.75 0 01-.75.75H.75a.75.75 0 010-1.5h1.5A.75.75 0 013 8zm10.657-5.657a.75.75 0 010 1.061l-1.061 1.06a.75.75 0 11-1.06-1.06l1.06-1.06a.75.75 0 011.06 0zm-9.193 9.193a.75.75 0 010 1.06l-1.06 1.061a.75.75 0 11-1.061-1.06l1.06-1.061a.75.75 0 011.061 0z"})}),sync:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M8 2.5a5.487 5.487 0 00-4.131 1.869l1.204 1.204A.25.25 0 014.896 6H1.25A.25.25 0 011 5.75V2.104a.25.25 0 01.427-.177l1.38 1.38A7.001 7.001 0 0114.95 7.16a.75.75 0 11-1.49.178A5.501 5.501 0 008 2.5zM1.705 8.005a.75.75 0 01.834.656 5.501 5.501 0 009.592 2.97l-1.204-1.204a.25.25 0 01.177-.427h3.646a.25.25 0 01.25.25v3.646a.25.25 0 01-.427.177l-1.38-1.38A7.001 7.001 0 011.05 8.84a.75.75 0 01.656-.834z"})}),tag:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"})}),terminal:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0114.25 15H1.75A1.75 1.75 0 010 13.25V2.75zm1.75-.25a.25.25 0 00-.25.25v10.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25V2.75a.25.25 0 00-.25-.25H1.75zM7.25 8a.75.75 0 01-.22.53l-2.25 2.25a.75.75 0 11-1.06-1.06L5.44 8 3.72 6.28a.75.75 0 111.06-1.06l2.25 2.25c.141.14.22.331.22.53zm1.5 1.5a.75.75 0 000 1.5h3a.75.75 0 000-1.5h-3z"})}),three_bars:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M1 2.75A.75.75 0 011.75 2h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 2.75zm0 5A.75.75 0 011.75 7h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 7.75zM1.75 12a.75.75 0 100 1.5h12.5a.75.75 0 100-1.5H1.75z"})}),trashcan:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M6.5 1.75a.25.25 0 01.25-.25h2.5a.25.25 0 01.25.25V3h-3V1.75zm4.5 0V3h2.25a.75.75 0 010 1.5H2.75a.75.75 0 010-1.5H5V1.75C5 .784 5.784 0 6.75 0h2.5C10.216 0 11 .784 11 1.75zM4.496 6.675a.75.75 0 10-1.492.15l.66 6.6A1.75 1.75 0 005.405 15h5.19c.9 0 1.652-.681 1.741-1.576l.66-6.6a.75.75 0 00-1.492-.149l-.66 6.6a.25.25 0 01-.249.225h-5.19a.25.25 0 01-.249-.225l-.66-6.6z"})}),unfold:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{d:"M8.177.677l2.896 2.896a.25.25 0 01-.177.427H8.75v1.25a.75.75 0 01-1.5 0V4H5.104a.25.25 0 01-.177-.427L7.823.677a.25.25 0 01.354 0zM7.25 10.75a.75.75 0 011.5 0V12h2.146a.25.25 0 01.177.427l-2.896 2.896a.25.25 0 01-.354 0l-2.896-2.896A.25.25 0 015.104 12H7.25v-1.25zm-5-2a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM6 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 016 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM12 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 0112 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5z"})}),upload:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M8.53 1.22a.75.75 0 00-1.06 0L3.72 4.97a.75.75 0 001.06 1.06l2.47-2.47v6.69a.75.75 0 001.5 0V3.56l2.47 2.47a.75.75 0 101.06-1.06L8.53 1.22zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z"})}),x:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"})}),x_circle:w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16",children:w("path",{"fill-rule":"evenodd",d:"M3.404 12.596a6.5 6.5 0 119.192-9.192 6.5 6.5 0 01-9.192 9.192zM2.344 2.343a8 8 0 1011.313 11.314A8 8 0 002.343 2.343zM6.03 4.97a.75.75 0 00-1.06 1.06L6.94 8 4.97 9.97a.75.75 0 101.06 1.06L8 9.06l1.97 1.97a.75.75 0 101.06-1.06L9.06 8l1.97-1.97a.75.75 0 10-1.06-1.06L8 6.94 6.03 4.97z"})})};function U7({howler:e,sounds:t,sound:n,delay:r,pitch:i,volume:s,onEdit:o,onDelete:a,delayedPlay:l}){const{locale:u}=Be(),{version:c}=Wr(),[d,f]=K(!0),[h,_]=K(!1),[g,p]=K(!1),m=Oe([]),v=`playsound minecraft:${n} master @s ~ ~ ~ ${s} ${i}`;he(()=>{var A,O,D;const C=t[n];p(((O=(A=C==null?void 0:C.sounds)==null?void 0:A.length)!=null?O:0)===0),m.current.forEach(L=>L.stop()),m.current=((D=C==null?void 0:C.sounds)!=null?D:[]).map(L=>{const W=typeof L=="string"?L:L.name,U=ix(c,W),M=e({src:[U],format:["ogg"],volume:s,rate:i});M.on("end",()=>{_(!1)});const $=()=>{d&&m.current.every(V=>V.state()==="loaded")&&f(!1)};return M.state()==="loaded"?setTimeout(()=>$()):M.on("load",()=>{$()}),M}),f(!0)},[n,t]),he(()=>{m.current.forEach(C=>C.rate(i))},[i]),he(()=>{m.current.forEach(C=>C.volume(s))},[s]);const y=()=>{if(d||g)return;x();const C=Math.floor(Math.random()*m.current.length);m.current[C].play(),_(!0)},x=()=>{m.current.forEach(C=>C.stop())};he(()=>{l&&setTimeout(()=>y(),r*50)},[l]),he(()=>()=>x(),[]);const[b,k]=K(!1),E=Oe(void 0),S=()=>{navigator.clipboard.writeText(v),k(!0),E.current!==void 0&&clearTimeout(E.current),E.current=setTimeout(()=>{k(!1)},2e3)};return F("div",{class:`sound-config${d?" loading":h?" playing":""}${g?" invalid":""}`,children:[w(oe,{class:"play",icon:g?"alert":d?"sync":"play",label:u("sounds.play"),onClick:y,tooltip:u(g?"sounds.unknown_sound":d?"sounds.loading_sound":"sounds.play_sound"),tooltipLoc:"se"}),w(Mn,{class:"btn btn-input sound",list:"sound-list",spellcheck:!1,value:n,onChange:C=>o({sound:C})}),F("label",{class:"delay-label",children:[u("sounds.delay"),": "]}),w(Fx,{class:"btn btn-input delay",min:0,value:r,onChange:C=>o({delay:C})}),F("label",{class:"pitch-label",children:[u("sounds.pitch"),": "]}),w(i0,{class:"pitch tooltipped tip-s",min:.5,max:2,step:.01,"aria-label":i.toFixed(2),style:`--x: ${(i-.5)*(100/1.5)}%`,value:i,onChange:C=>o({pitch:C})}),F("label",{class:"volume-label",children:[u("sounds.volume"),": "]}),w(i0,{class:"volume tooltipped tip-s",min:0,max:1,step:.01,"aria-label":s.toFixed(2),style:`--x: ${s*100}%`,value:s,onChange:C=>o({volume:C})}),w(oe,{class:`copy${b?" active":""}`,icon:b?"check":"terminal",label:u("copy"),tooltip:u(b?"copied":"sounds.copy_command"),onClick:S}),w(oe,{class:"remove",icon:"trashcan",tooltip:u("sounds.remove_sound"),onClick:()=>{a(),x()}})]})}function At({title:e,desc:t,link:n,icon:r,children:i}){const s=F(be,{children:[F("div",{class:"tool-head",children:[r&&xm[r],F("div",{children:[w("h3",{children:e}),w("p",{children:t})]})]}),i&&w("div",{class:"tool-body",children:i})]});return n?w("a",{class:"tool-card",href:n,children:s}):w("div",{class:"tool-card",children:s})}function bm(){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 ji=bm();function V7(e){ji=e}const H7=/[&<>"']/,G7=/[&<>"']/g,Z7=/[<>"']|&(?!#?\w+;)/,Y7=/[<>"']|&(?!#?\w+;)/g,W7={"&":"&","<":"<",">":">",'"':""","'":"'"},bf=e=>W7[e];function mt(e,t){if(t){if(H7.test(e))return e.replace(G7,bf)}else if(Z7.test(e))return e.replace(Y7,bf);return e}const q7=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ym(e){return e.replace(q7,(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 X7=/(^|[^\[])\^/g;function Ye(e,t){e=e.source||e,t=t||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(X7,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}const K7=/[^\w:]/g,J7=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function yf(e,t,n){if(e){let r;try{r=decodeURIComponent(ym(n)).replace(K7,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!J7.test(n)&&(n=n6(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const Ao={},Q7=/^[^:]+:\/*[^/]*$/,e6=/^([^:]+:)[\s\S]*$/,t6=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n6(e,t){Ao[" "+e]||(Q7.test(e)?Ao[" "+e]=e+"/":Ao[" "+e]=Zo(e,"/",!0)),e=Ao[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(e6,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(t6,"$1")+t:e+t}const va={exec:function(){}};function _n(e){let t=1,n,r;for(;t{let l=!1,u=o;for(;--u>=0&&a[u]==="\\";)l=!l;return l?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r[r.length-1].trim()||r.pop(),r.length>t)r.splice(t);else for(;r.length1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function Af(e,t,n,r){const i=t.href,s=t.title?mt(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const a={type:"link",raw:n,href:i,title:s,text:o,tokens:r.inlineTokens(o,[])};return r.state.inLink=!1,a}else return{type:"image",raw:n,href:i,title:s,text:mt(o)}}function i6(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(` `).map(i=>{const s=i.match(/^\s+/);if(s===null)return i;const[o]=s;return o.length>=r.length?i.slice(r.length):i}).join(` `)}class du{constructor(t){this.options=t||ji}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:Zo(r,` `)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=i6(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim():n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const s=Zo(r,"#");(this.options.pedantic||!s||/ $/.test(s))&&(r=s.trim())}const i={type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=n[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:n[0],tokens:this.lexer.blockTokens(r,[]),text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r,i,s,o,a,l,u,c,d,f,h,_,g=n[1].trim();const p=g.length>1,m={type:"list",raw:"",ordered:p,start:p?+g.slice(0,-1):"",loose:!1,items:[]};g=p?`\\d{1,9}\\${g.slice(-1)}`:`\\${g}`,this.options.pedantic&&(g=p?g:"[*+-]");const v=new RegExp(`^( {0,3}${g})((?: [^\\n]*)?(?:\\n|$))`);for(;t&&(_=!1,!(!(n=v.exec(t))||this.rules.block.hr.test(t)));){if(r=n[0],t=t.substring(r.length),c=n[2].split(` `,1)[0],d=t.split(` `,1)[0],this.options.pedantic?(o=2,h=c.trimLeft()):(o=n[2].search(/[^ ]/),o=o>4?1:o,h=c.slice(o),o+=n[1].length),l=!1,!c&&/^ *$/.test(d)&&(r+=d+` `,t=t.substring(d.length+1),_=!0),!_){const x=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;t&&(f=t.split(` `,1)[0],c=f,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!x.test(c));){if(c.search(/[^ ]/)>=o||!c.trim())h+=` `+c.slice(o);else if(!l)h+=` `+c;else break;!l&&!c.trim()&&(l=!0),r+=f+` `,t=t.substring(f.length+1)}}m.loose||(u?m.loose=!0:/\n *\n *$/.test(r)&&(u=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(h),i&&(s=i[0]!=="[ ] ",h=h.replace(/^\[[ xX]\] +/,""))),m.items.push({type:"list_item",raw:r,task:!!i,checked:s,loose:!1,text:h}),m.raw+=r}m.items[m.items.length-1].raw=r.trimRight(),m.items[m.items.length-1].text=h.trimRight(),m.raw=m.raw.trimRight();const y=m.items.length;for(a=0;ak.type==="space"),b=x.every(k=>{const E=k.raw.split("");let S=0;for(const C of E)if(C===` `&&(S+=1),S>1)return!0;return!1});!m.loose&&x.length&&b&&(m.loose=!0,m.items[a].loose=!0)}return m}}html(t){const n=this.rules.block.html.exec(t);if(n){const r={type:"html",raw:n[0],pre:!this.options.sanitizer&&(n[1]==="pre"||n[1]==="script"||n[1]==="style"),text:n[0]};return this.options.sanitize&&(r.type="paragraph",r.text=this.options.sanitizer?this.options.sanitizer(n[0]):mt(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:kf(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]?n[3].replace(/\n[ \t]*$/,"").split(` `):[]};if(r.header.length===r.align.length){r.raw=n[0];let i=r.align.length,s,o,a,l;for(s=0;s({text:u}));for(i=r.header.length,o=0;o/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]):mt(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))return;const o=Zo(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{const o=r6(n[2],"()");if(o>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+o;n[2]=n[2].substring(0,o),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let i=n[2],s="";if(this.options.pedantic){const o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o&&(i=o[1],s=o[3])}else s=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),Af(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:s&&s.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i||!i.href){const s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return Af(r,i,r[0],this.lexer)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;const s=i[1]||i[2]||"";if(!s||s&&(r===""||this.rules.inline.punctuation.exec(r))){const o=i[0].length-1;let a,l,u=o,c=0;const d=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+o);(i=d.exec(n))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(l=a.length,i[3]||i[4]){u+=l;continue}else if((i[5]||i[6])&&o%3&&!((o+l)%3)){c+=l;continue}if(u-=l,u>0)continue;if(l=Math.min(l,l+u+c),Math.min(o,l)%2){const h=t.slice(1,o+i.index+l);return{type:"em",raw:t.slice(0,o+i.index+l+1),text:h,tokens:this.lexer.inlineTokens(h,[])}}const f=t.slice(2,o+i.index+l-1);return{type:"strong",raw:t.slice(0,o+i.index+l+1),text:f,tokens:this.lexer.inlineTokens(f,[])}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),s=/^ /.test(r)&&/ $/.test(r);return i&&s&&(r=r.substring(1,r.length-1)),r=mt(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2],[])}}autolink(t,n){const r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=mt(this.options.mangle?n(r[1]):r[1]),s="mailto:"+i):(i=mt(r[1]),s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t,n){let r;if(r=this.rules.inline.url.exec(t)){let i,s;if(r[2]==="@")i=mt(this.options.mangle?n(r[0]):r[0]),s="mailto:"+i;else{let o;do o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(o!==r[0]);i=mt(r[0]),r[1]==="www."?s="http://"+i:s=i}return{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t,n){const r=this.rules.inline.text.exec(t);if(r){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):mt(r[0]):r[0]:i=mt(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}}}}const ue={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]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\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]+/};ue._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;ue._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;ue.def=Ye(ue.def).replace("label",ue._label).replace("title",ue._title).getRegex();ue.bullet=/(?:[*+-]|\d{1,9}[.)])/;ue.listItemStart=Ye(/^( *)(bull) */).replace("bull",ue.bullet).getRegex();ue.list=Ye(ue.list).replace(/bull/g,ue.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ue.def.source+")").getRegex();ue._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";ue._comment=/|$)/;ue.html=Ye(ue.html,"i").replace("comment",ue._comment).replace("tag",ue._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();ue.paragraph=Ye(ue._paragraph).replace("hr",ue.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",")|<(?:script|pre|style|textarea|!--)").replace("tag",ue._tag).getRegex();ue.blockquote=Ye(ue.blockquote).replace("paragraph",ue.paragraph).getRegex();ue.normal=_n({},ue);ue.gfm=_n({},ue.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});ue.gfm.table=Ye(ue.gfm.table).replace("hr",ue.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",")|<(?:script|pre|style|textarea|!--)").replace("tag",ue._tag).getRegex();ue.gfm.paragraph=Ye(ue._paragraph).replace("hr",ue.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",ue.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ue._tag).getRegex();ue.pedantic=_n({},ue.normal,{html:Ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ue._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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:va,paragraph:Ye(ue.normal._paragraph).replace("hr",ue.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",ue.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-]*(?:attribute)*?\\s*/?>|^<\\?[\\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]*?(?:(?=[\\?@\\[\\]`^{|}~";re.punctuation=Ye(re.punctuation).replace(/punctuation/g,re._punctuation).getRegex();re.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;re.escapedEmSt=/\\\*|\\_/g;re._comment=Ye(ue._comment).replace("(?:-->|$)","-->").getRegex();re.emStrong.lDelim=Ye(re.emStrong.lDelim).replace(/punct/g,re._punctuation).getRegex();re.emStrong.rDelimAst=Ye(re.emStrong.rDelimAst,"g").replace(/punct/g,re._punctuation).getRegex();re.emStrong.rDelimUnd=Ye(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=Ye(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=Ye(re.tag).replace("comment",re._comment).replace("attribute",re._attribute).getRegex();re._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;re._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;re._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;re.link=Ye(re.link).replace("label",re._label).replace("href",re._href).replace("title",re._title).getRegex();re.reflink=Ye(re.reflink).replace("label",re._label).replace("ref",ue._label).getRegex();re.nolink=Ye(re.nolink).replace("ref",ue._label).getRegex();re.reflinkSearch=Ye(re.reflinkSearch,"g").replace("reflink",re.reflink).replace("nolink",re.nolink).getRegex();re.normal=_n({},re);re.pedantic=_n({},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:Ye(/^!?\[(label)\]\((.*?)\)/).replace("label",re._label).getRegex(),reflink:Ye(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",re._label).getRegex()});re.gfm=_n({},re.normal,{escape:Ye(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]*?(?:(?=[\\.5&&(r="x"+r.toString(16)),t+="&#"+r+";";return t}class Kn{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ji,this.options.tokenizer=this.options.tokenizer||new du,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:ue.normal,inline:re.normal};this.options.pedantic?(n.block=ue.pedantic,n.inline=re.pedantic):this.options.gfm&&(n.block=ue.gfm,this.options.breaks?n.inline=re.breaks:n.inline=re.gfm),this.tokenizer.rules=n}static get rules(){return{block:ue,inline:re}}static lex(t,n){return new Kn(n).lex(t)}static lexInline(t,n){return new Kn(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,` `).replace(/\t/g," "),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic&&(t=t.replace(/^ +$/gm,""));let r,i,s,o;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(r=a.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` `:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=` `+r.raw,i.text+=` `+r.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=` `+r.raw,i.text+=` `+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(s=t,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const l=t.slice(1);let u;this.options.extensions.startBlock.forEach(function(c){u=c.call({lexer:this},l),typeof u=="number"&&u>=0&&(a=Math.min(a,u))}),a<1/0&&a>=0&&(s=t.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(s))){i=n[n.length-1],o&&i.type==="paragraph"?(i.raw+=` `+r.raw,i.text+=` `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r),o=s.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=` `+r.raw,i.text+=` `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(t){const a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n){this.inlineQueue.push({src:t,tokens:n})}inlineTokens(t,n=[]){let r,i,s,o=t,a,l,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)c.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,a.index)+"["+Ef("a",a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,a.index)+"["+Ef("a",a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.escapedEmSt.exec(o))!=null;)o=o.slice(0,a.index)+"++"+o.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;t;)if(l||(u=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,o,u)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t,Sf)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t,Sf))){t=t.substring(r.raw.length),n.push(r);continue}if(s=t,this.options.extensions&&this.options.extensions.startInline){let c=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&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(s=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(s,s6)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),l=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class fu{constructor(t){this.options=t||ji}code(t,n,r){const i=(n||"").match(/\S*/)[0];if(this.options.highlight){const s=this.options.highlight(t,i);s!=null&&s!==t&&(r=!0,t=s)}return t=t.replace(/\n$/,"")+` `,i?'
'+(r?t:mt(t,!0))+`
`:"
"+(r?t:mt(t,!0))+`
`}blockquote(t){return`
`+t+`
`}html(t){return t}heading(t,n,r,i){return this.options.headerIds?"'+t+" `:""+t+" `}hr(){return this.options.xhtml?`
`:`
`}list(t,n,r){const i=n?"ol":"ul",s=n&&r!==1?' start="'+r+'"':"";return"<"+i+s+`> `+t+" `}listitem(t){return"
  • "+t+`
  • `}checkbox(t){return" "}paragraph(t){return"

    "+t+`

    `}table(t,n){return n&&(n=""+n+""),` `+t+` `+n+`
    `}tablerow(t){return` `+t+` `}tablecell(t,n){const r=n.header?"th":"td";return(n.align?"<"+r+' align="'+n.align+'">':"<"+r+">")+t+" `}strong(t){return""+t+""}em(t){return""+t+""}codespan(t){return""+t+""}br(){return this.options.xhtml?"
    ":"
    "}del(t){return""+t+""}link(t,n,r){if(t=yf(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i='",i}image(t,n,r){if(t=yf(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i=''+r+'":">",i}text(t){return t}}class Em{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 Am{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 Jn{constructor(t){this.options=t||ji,this.options.renderer=this.options.renderer||new fu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Em,this.slugger=new Am}static parse(t,n){return new Jn(n).parse(t)}static parseInline(t,n){return new Jn(n).parseInline(t)}parse(t,n=!0){let r="",i,s,o,a,l,u,c,d,f,h,_,g,p,m,v,y,x,b,k;const E=t.length;for(i=0;i0&&v.tokens[0].type==="paragraph"?(v.tokens[0].text=b+" "+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=b+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:b}):m+=b),m+=this.parse(v.tokens,p),f+=this.renderer.listitem(m,x,y);r+=this.renderer.list(f,_,g);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{r(a.text,a.lang,function(l,u){if(l)return s(l);u!=null&&u!==a.text&&(a.text=u,a.escaped=!0),o--,o===0&&s()})},0))}),o===0&&s();return}try{const r=Kn.lex(e,t);return t.walkTokens&&_e.walkTokens(r,t.walkTokens),Jn.parse(r,t)}catch(r){if(r.message+=` Please report this to https://github.com/markedjs/marked.`,t.silent)return"

    An error occurred:

    "+mt(r.message+"",!0)+"
    ";throw r}}_e.options=_e.setOptions=function(e){return _n(_e.defaults,e),V7(_e.defaults),_e};_e.getDefaults=bm;_e.defaults=ji;_e.use=function(...e){const t=_n({},...e),n=_e.defaults.extensions||{renderers:{},childTokens:{}};let r;e.forEach(i=>{if(i.extensions&&(r=!0,i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if(s.renderer){const o=n.renderers?n.renderers[s.name]:null;o?n.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=o.apply(this,a)),l}:n.renderers[s.name]=s.renderer}if(s.tokenizer){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");n[s.level]?n[s.level].unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}s.childTokens&&(n.childTokens[s.name]=s.childTokens)})),i.renderer){const s=_e.defaults.renderer||new fu;for(const o in i.renderer){const a=s[o];s[o]=(...l)=>{let u=i.renderer[o].apply(s,l);return u===!1&&(u=a.apply(s,l)),u}}t.renderer=s}if(i.tokenizer){const s=_e.defaults.tokenizer||new du;for(const o in i.tokenizer){const a=s[o];s[o]=(...l)=>{let u=i.tokenizer[o].apply(s,l);return u===!1&&(u=a.apply(s,l)),u}}t.tokenizer=s}if(i.walkTokens){const s=_e.defaults.walkTokens;t.walkTokens=function(o){i.walkTokens.call(this,o),s&&s.call(this,o)}}r&&(t.extensions=n),_e.setOptions(t)})};_e.walkTokens=function(e,t){for(const n of e)switch(t.call(_e,n),n.type){case"table":{for(const r of n.header)_e.walkTokens(r.tokens,t);for(const r of n.rows)for(const i of r)_e.walkTokens(i.tokens,t);break}case"list":{_e.walkTokens(n.items,t);break}default:_e.defaults.extensions&&_e.defaults.extensions.childTokens&&_e.defaults.extensions.childTokens[n.type]?_e.defaults.extensions.childTokens[n.type].forEach(function(r){_e.walkTokens(n[r],t)}):n.tokens&&_e.walkTokens(n.tokens,t)}};_e.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=_n({},_e.defaults,t||{}),km(t);try{const n=Kn.lexInline(e,t);return t.walkTokens&&_e.walkTokens(n,t.walkTokens),Jn.parseInline(n,t)}catch(n){if(n.message+=` Please report this to https://github.com/markedjs/marked.`,t.silent)return"

    An error occurred:

    "+mt(n.message+"",!0)+"
    ";throw n}};_e.Parser=Jn;_e.parser=Jn.parse;_e.Renderer=fu;_e.TextRenderer=Em;_e.Lexer=Kn;_e.lexer=Kn.lex;_e.Tokenizer=du;_e.Slugger=Am;_e.parse=_e;Jn.parse;Kn.lex;function o6({change:e,activeTags:t,toggleTag:n}){return F("div",{class:"changelog-entry",children:[F("div",{class:"changelog-version",children:[w("a",{href:`/versions/?id=${e.version}`,children:e.version}),w("a",{href:`/versions/?id=${e.group}`,children:e.group})]}),w("div",{class:"changelog-tags",children:e.tags.map(r=>w(Js,{label:r,onClick:n?()=>n(r):void 0,active:t==null?void 0:t.includes(r)}))}),w("div",{class:"changelog-content",dangerouslySetInnerHTML:{__html:_e(e.content)}})]})}function Js({label:e,active:t,onClick:n}){const r=e==="breaking"?5:$1(e)%360;return F("div",{class:`changelog-tag${t?" active":""}${n?" clickable":""}`,style:`--tint: ${r}`,onClick:n,children:[e==="breaking"&&me.alert,e]})}const a6="search";function Sm({changes:e,defaultOrder:t}){const{locale:n}=Be(),[r,i]=Pr(a6),[s,o]=z1(),a=$e(()=>{const d=(r!=null?r:"").split(" ").map(f=>f.trim().toLowerCase()).filter(f=>f.length>0);return d.length===0&&s.length===0?e:e==null?void 0:e.filter(f=>{if(!s.every(_=>f.tags.includes(_)))return!1;const h=f.tags.join(" ")+" "+f.content.toLowerCase();return d.every(_=>_.startsWith("!")?_.length===1||!h.includes(_.slice(1)):h.includes(_))})},[e,r,s]),[l,u]=K(t==="desc"),c=$e(()=>a==null?void 0:a.sort((d,f)=>l?f.order-d.order:d.order-f.order),[a,l]);return F(be,{children:[F("div",{class:"changelog-query",children:[w(Mn,{class:"btn btn-input changelog-search",list:"sound-list",placeholder:n("changelog.search"),value:r,onChange:d=>i(d,!0)}),w(oe,{icon:l?"sort_desc":"sort_asc",label:l?"Newest first":"Oldest first",onClick:()=>u(!l)})]}),s.length>0&&w("div",{class:"changelog-tags",children:s.map(d=>w(Js,{label:d,onClick:()=>o(d)}))}),w("div",{class:"changelog-list",children:c===void 0?w("span",{class:"note",children:n("loading")}):c.length===0?w("span",{class:"note",children:n("changelog.no_results")}):c.map(d=>w(o6,{change:d,activeTags:s,toggleTag:o}))})]})}function l6({id:e,version:t}){var u,c;const{locale:n}=Be(),[r,i]=K("changelog"),[s,o]=K(void 0);he(()=>{U1().then(d=>o(d.map(f=>Ae(ce({},f),{tags:f.tags.filter(h=>h!==f.group)})))).catch(d=>console.error(d))},[]);const a=$e(()=>s==null?void 0:s.filter(d=>d.version===e||d.group===e),[e,s]),l=t&&Qv(t.id);return w(be,{children:F("div",{class:"version-detail",children:[w("h2",{children:(u=t==null?void 0:t.name)!=null?u:e}),w("div",{class:"version-info",children:t?F(be,{children:[w(jn,{label:n("versions.released"),value:Im(t)}),w(jn,{label:n("versions.release_target"),value:t.release_target,link:t.id!==t.release_target?`/versions/?id=${t.release_target}`:void 0}),w(jn,{label:n("versions.data_version"),value:t.data_version}),w(jn,{label:n("versions.protocol_version"),value:t.protocol_version}),w(jn,{label:n("versions.data_pack_format"),value:t.data_pack_version}),w(jn,{label:n("versions.resource_pack_format"),value:t.resource_pack_version})]}):((c=a==null?void 0:a.length)!=null?c:0>1)?w("p",{children:"This version is not released yet."}):w("p",{children:"This version does not exist. Only versions since 1.14 are tracked, or it may be too recent."})}),F("div",{class:"version-tabs",children:[w("span",{class:r==="changelog"?"selected":"",onClick:()=>i("changelog"),children:n("versions.technical_changes")}),w("span",{class:r==="discussion"?"selected":"",onClick:()=>i("discussion"),children:n("versions.discussion")}),l&&F("a",{href:l,target:"_blank",children:[n("versions.article"),me.link_external]})]}),F("div",{class:"version-tab",children:[r==="changelog"&&w(Sm,{changes:a,defaultOrder:"asc"}),r==="discussion"&&w(uu,{term:`version/${e}/`})]})]})})}function Im(e){return new Date(e.release_time).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}function c6({version:e,link:t}){const{locale:n}=Be();return F("a",{class:"version-entry",href:t,children:[w("span",{class:"version-id",children:e.id}),w(jn,{label:n("versions.released"),value:Im(e),compact:!0}),w(jn,{label:n("versions.data_version"),value:e.data_version,optional:!0}),w(jn,{label:n("versions.pack_format"),value:e.data_pack_version,optional:!0})]})}const u6="search";function d6({versions:e,link:t}){const{locale:n}=Be(),[r,i]=K(!0),[s,o]=Pr(u6),a=$e(()=>e.filter(l=>l.type==="snapshot"&&!r?!1:l.id.includes(s!=null?s:"")),[e,r,s]);return F(be,{children:[F("div",{class:"versions-controls",children:[w(Mn,{class:"btn btn-input version-search",placeholder:n("versions.search"),value:s,onChange:o}),w(Dx,{label:"Include snapshots",value:r,onChange:i})]}),F("div",{class:"version-list",children:[a.map(l=>w(c6,{version:l,link:t==null?void 0:t(l.id)})),a.length===0&&w("span",{children:n("versions.no_results")})]})]})}function jn({label:e,value:t,link:n,compact:r,optional:i}){return F("div",{class:`version-metadata${i?" version-metadata-hide":""}`,children:[F("span",{class:r?"version-metadata-hide":void 0,children:[e,": "]}),w("span",{class:"version-metadata-value",children:t}),n&&w("a",{href:n,class:"version-metadata-link",children:me.link_external})]})}function Ha({value:e,allowed:t,hasAny:n,onChange:r,onAny:i}){const{locale:s}=Be(),o=$e(()=>t||ke.versions.map(a=>a.id).reverse(),[t]);return F(jt,{class:`version-switcher${Ge.getVersion()===null?" attention":""}`,icon:"tag",label:e!=null?e:s("any_version"),tooltip:s("switch_version"),children:[n&&w(oe,{label:s("any_version"),onClick:i,active:!e}),o.map(a=>w(oe,{label:a,active:a===e,onClick:()=>r(a)}))]})}function Fl({category:e}){const{locale:t}=Be();return gn(t("title.generator_category",t(e))),F("main",{children:[w("div",{class:"container",children:ke.generators.filter(n=>n.category===e).map(n=>w(At,{title:t(n.id),link:On(n.url)}))}),w(tr,{donate:!1})]})}function f6({}){const{locale:e}=Be();gn(e("title.changelog"));const{value:t,error:n}=Hs(U1,[]);return F("main",{children:[w(ya,{type:"text",id:"changelog"}),n&&w(xi,{error:n}),w("div",{class:"container changelog",children:w(Sm,{changes:t,defaultOrder:"desc"})}),w(tr,{})]})}const Pl="share";function h6({}){var Y,te;const{locale:e}=Be(),{version:t,changeVersion:n,changeTargetVersion:r}=Wr(),{projects:i,project:s,file:o,updateProject:a,updateFile:l}=er(),[u,c]=K(null),[d,f]=rh();if(d)return d.message=`Something went wrong rendering the generator: ${d.message}`,w("main",{children:w(xi,{error:d,onDismiss:f})});const h=B1(Ii());if(!h)return w("main",{children:w(xi,{error:`Cannot find generator "${Ii()}"`})});const _=$e(()=>ke.versions.filter(G=>_t(G.id,h.minVersion,h.maxVersion)).map(G=>G.id).reverse(),[h.minVersion,h.maxVersion]);gn(e("title.generator",e(h.partner?`partner.${h.partner}.${h.id}`:h.id)),_),_t(t,h.minVersion)||c(`The minimum version for this generator is ${h.minVersion}`),_t(t,void 0,h.maxVersion)||c(`This generator is not available in versions above ${h.maxVersion}`);const[g,p]=Pr("preset"),[m,v]=Pr(Pl),y=Oe(!1),x=$e(()=>Ge.getBackup(h.id),[h.id]),b=()=>{x!==void 0&&(E==null||E.reset(P.DataModel.wrapLists(x),!1))},{value:k}=Hs(async()=>{let G;if(g&&m)return v(void 0),Bo;if(g)G=await $(g);else if(m){const qe=await _x(m);let ft=!1;if(qe.version&&qe.version!==t&&(n(qe.version,!1),ft=!0),qe.type&&qe.type!==h.id){const on=ke.generators.find(eo=>eo.id===qe.type);on&&(Gr(`${On(on.url)}?${Pl}=${qe.id}`),ft=!0)}if(ft)return Bo;qe.show_preview&&!tt&&(xt(!0),ge(!1)),Se.openSnippet(h.id,m,t),G=qe.data}else if(o){if(s.version&&s.version!==t)return n(s.version,!1),Bo;G=o.data}const[se,Je]=await Promise.all([fx(t,h.id),px(t)]);return G&&(y.current=!0,se.reset(P.DataModel.wrapLists(G),!1)),Se.setGenerator(h.id),{model:se,blockStates:Je}},[h.id,t,m,g,s.name,o==null?void 0:o.id]),E=k==null?void 0:k.model,S=k==null?void 0:k.blockStates;Da(E,G=>{if(y.current||(p(void 0,!0),v(void 0,!0)),o&&G&&S){const se=kc(G,S);l(h.id,o.id,{id:o.id,data:se})}y.current=!1,Ge.setBackup(h.id,P.DataModel.unwrapLists(G.data)),c(null)},[h.id,p,v,S,o==null?void 0:o.id]);const C=()=>{var G;Se.resetGenerator(h.id,(G=E==null?void 0:E.historyIndex)!=null?G:1,"menu"),E==null||E.reset(P.DataModel.wrapLists(E.schema.default()),!0)},A=G=>{var se;G.stopPropagation(),Se.undoGenerator(h.id,(se=E==null?void 0:E.historyIndex)!=null?se:1,"menu"),E==null||E.undo()},O=G=>{var se;G.stopPropagation(),Se.redoGenerator(h.id,(se=E==null?void 0:E.historyIndex)!=null?se:1,"menu"),E==null||E.redo()},D=G=>{var se,Je;G.ctrlKey&&G.key==="z"?(Se.undoGenerator(h.id,(se=E==null?void 0:E.historyIndex)!=null?se:1,"hotkey"),E==null||E.undo()):G.ctrlKey&&G.key==="y"&&(Se.redoGenerator(h.id,(Je=E==null?void 0:E.historyIndex)!=null?Je:1,"hotkey"),E==null||E.redo())},L=G=>{G.ctrlKey&&G.key==="s"&&(z("hotkey"),G.preventDefault(),G.stopPropagation())};he(()=>(document.addEventListener("keyup",D),document.addEventListener("keydown",L),()=>{document.removeEventListener("keyup",D),document.removeEventListener("keydown",L)}),[E,S,o]);const[W,U]=K([]);he(()=>{hx(t).then(G=>{U(G.get(h.id).map(se=>se.startsWith("minecraft:")?se.slice(10):se))}).catch(G=>{console.error(G),c(G)})},[t,h.id]);const M=G=>{Se.loadPreset(h.id,G),v(void 0,!0),r(t,!0),p(G)},$=async G=>{var se,Je,qe;try{const ft=await H1(t,(se=h.path)!=null?se:h.id,G),on=E==null?void 0:E.get(new P.Path(["generator","seed"]));return((Je=ft==null?void 0:ft.generator)==null?void 0:Je.seed)!==void 0&&on!==void 0&&(ft.generator.seed=on,((qe=ft.generator.biome_source)==null?void 0:qe.seed)!==void 0&&(ft.generator.biome_source.seed=on)),ft}catch{c(`Cannot load preset ${G} in ${t}`),p(void 0,!0)}},V=G=>{v(void 0,!0),n(G),s.name!==_r.name&&s.version!==G&&a({version:G})},[Q,R]=K(void 0),[I,N]=K(!1),[B,q]=ac({cooldown:3e3}),ie=()=>{if(I){N(!1);return}if(g)R(`${location.origin}/${h.url}/?version=${t}&preset=${g}`),N(!0),j();else if(E&&S){const G=kc(E,S);Fr(G,E.schema.default())?(R(`${location.origin}/${h.url}/?version=${t}`),N(!0)):gx(h.id,t,G,tt).then(({id:se,length:Je,compressed:qe,rate:ft})=>{Se.createSnippet(h.id,se,t,Je,qe,ft);const on=`${location.origin}/${h.url}/?${Pl}=${se}`;R(on),N(!0)}).catch(se=>{se instanceof Error&&c(se)})}},j=()=>{navigator.clipboard.writeText(Q!=null?Q:""),q()};he(()=>{B||(R(void 0),N(!1))},[B]);const[J,ge]=K(window.innerWidth>820),[we,We]=K(0),[He,Ke]=K(0),[vt,Ce]=K(0),je=()=>{Se.copyOutput(h.id,"menu"),We(we+1)},ze=()=>{Se.downloadOutput(h.id,"menu"),Ke(He+1)},ae=()=>{Se.generatorEvent("import"),ge(!0),Ce(vt+1)},wn=()=>{J?Se.hideOutput(h.id,"menu"):Se.showOutput(h.id,"menu"),ge(!J),We(0),Ke(0),Ce(0)},[Ue,Ne]=ac(),[tt,xt]=K(!1),vn=P3.includes(h.id)&&!(h.id==="worldgen/configured_feature"&&_t(t,"1.18"));tt&&!vn&&xt(!1);let Rn=2;vn&&(Rn+=1),J&&(Rn+=2);const ee=()=>{J?Se.hidePreview(h.id,"menu"):Se.showPreview(h.id,"menu"),xt(!tt),!tt&&J&&ge(!1)},[ne,fe]=K((Y=Ge.getProjectPanelOpen())!=null?Y:window.innerWidth>600),Ee=Le(()=>{ne?Se.hideProject(h.id,i.length,s.files.length,"menu"):Se.showProject(h.id,i.length,s.files.length,"menu"),Ge.setProjectPanelOpen(!ne),fe(!ne)},[ne]),[at,Ot]=K(!1),[zi,Jr]=K(!1),[Qs,z]=K(void 0),[Z,H]=K(void 0);return F(be,{children:[F("main",{class:`generator${tt?" has-preview":""}${ne?" has-project":""}`,children:[!h.partner&&w(ya,{id:"data-pack-generator",type:"text"}),F("div",{class:"controls generator-controls",children:[w(oe,{icon:"upload",label:e("import"),onClick:ae}),w(jt,{icon:"archive",label:e("presets"),relative:!1,children:w(Px,{searchPlaceholder:e("search"),noResults:e("no_presets"),values:W,onSelect:M})}),w(Ha,{value:t,onChange:V,allowed:_}),F(jt,{icon:"kebab_horizontal",tooltip:e("more"),children:[w(oe,{icon:"history",label:e("reset_default"),onClick:C}),x!==void 0&&w(oe,{icon:"history",label:e("restore_backup"),onClick:b}),w(oe,{icon:"arrow_left",label:e("undo"),onClick:A}),w(oe,{icon:"arrow_right",label:e("redo"),onClick:O}),w(oe,{icon:"file",label:e("project.save"),onClick:()=>z("menu")})]})]}),u&&w(xi,{error:u,onDismiss:()=>c(null)}),w(M7,{model:E,version:t,blockStates:S,onError:c}),w(tr,{donate:!h.partner})]}),F("div",{class:"popup-actions right-actions",style:`--offset: -${8+Rn*50}px;`,children:[w("div",{class:`popup-action action-preview${vn?" shown":""} tooltipped tip-nw`,"aria-label":e(tt?"hide_preview":"show_preview"),onClick:ee,children:tt?me.x_circle:me.play}),w("div",{class:"popup-action action-share shown tooltipped tip-nw","aria-label":e("share"),onClick:ie,children:me.link}),w("div",{class:`popup-action action-download${J?" shown":""} tooltipped tip-nw`,"aria-label":e("download"),onClick:ze,children:me.download}),w("div",{class:`popup-action action-copy${J?" shown":""}${Ue?" active":""} tooltipped tip-nw`,"aria-label":e(Ue?"copied":"copy"),onClick:je,children:Ue?me.check:me.clippy}),w("div",{class:"popup-action action-code shown tooltipped tip-nw","aria-label":e(J?"hide_output":"show_output"),onClick:wn,children:J?me.chevron_right:me.code})]}),w("div",{class:`popup-preview${tt?" shown":""}`,children:w($3,{model:E,version:t,id:h.id,shown:tt,onError:c})}),w("div",{class:`popup-source${J?" shown":""}`,children:w(V3,{model:E,blockStates:S,doCopy:we,doDownload:He,doImport:vt,name:(te=h.schema)!=null?te:"data",copySuccess:Ne,onError:c})}),F("div",{class:`popup-share${I?" shown":""}`,children:[w(Mn,{value:Q,readonly:!0}),w(oe,{icon:B?"check":"clippy",onClick:j,tooltip:e(B?"copied":"copy_share"),tooltipLoc:"nw",active:B})]}),w("div",{class:"popup-actions left-actions",style:"--offset: 50px;",children:w("div",{class:"popup-action action-project shown tooltipped tip-ne","aria-label":e(ne?"hide_project":"show_project"),onClick:Ee,children:ne?me.chevron_left:me.repo})}),w("div",{class:`popup-project${ne?" shown":""}`,children:w(z3,{model:E,version:t,id:h.id,onError:c,onDeleteProject:()=>Jr(!0),onRename:H,onCreate:()=>Ot(!0)})}),at&&w(B3,{onClose:()=>Ot(!1)}),zi&&w(j3,{onClose:()=>Jr(!1)}),E&&Qs&&w($x,{id:h.id,model:E,method:Qs,onClose:()=>z(void 0)}),Z&&w(Bx,{id:Z.type,name:Z.id,onClose:()=>H(void 0)})]})}var hu={exports:{}};function pu(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)&&pu(n)}),e}hu.exports=pu;hu.exports.default=pu;var p6=hu.exports;class If{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Cm(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function dr(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 m6="",Cf=e=>!!e.kind,g6=(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 _6{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=Cm(t)}openNode(t){if(!Cf(t))return;let n=t.kind;t.sublanguage?n=`language-${n}`:n=g6(n,{prefix:this.classPrefix}),this.span(n)}closeNode(t){!Cf(t)||(this.buffer+=m6)}value(){return this.buffer}span(t){this.buffer+=``}}class mu{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=>{mu._collapse(n)})))}}class w6 extends mu{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 _6(this,this.options).value()}finalize(){return!0}}function Rs(e){return e?typeof e=="string"?e:e.source:null}function Tm(e){return Kr("(?=",e,")")}function v6(e){return Kr("(?:",e,")*")}function x6(e){return Kr("(?:",e,")?")}function Kr(...e){return e.map(n=>Rs(n)).join("")}function b6(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function gu(...e){const t=b6(e);return"("+(t.capture?"":"?:")+e.map(r=>Rs(r)).join("|")+")"}function Om(e){return new RegExp(e.toString()+"|").exec("").length-1}function y6(e,t){const n=e&&e.exec(t);return n&&n.index===0}const k6=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function _u(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let s=Rs(r),o="";for(;s.length>0;){const a=k6.exec(s);if(!a){o+=s;break}o+=s.substring(0,a.index),s=s.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?o+="\\"+String(Number(a[1])+i):(o+=a[0],a[0]==="("&&n++)}return o}).map(r=>`(${r})`).join(t)}const E6=/\b\B/,Mm="[a-zA-Z]\\w*",wu="[a-zA-Z_]\\w*",Nm="\\b\\d+(\\.\\d+)?",Rm="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Lm="\\b(0b[01]+)",A6="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",S6=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=Kr(t,/.*\b/,e.binary,/\b.*/)),dr({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},Ls={begin:"\\\\[\\s\\S]",relevance:0},I6={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Ls]},C6={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Ls]},T6={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/},Ga=function(e,t,n={}){const r=dr({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=gu("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:Kr(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},O6=Ga("//","$"),M6=Ga("/\\*","\\*/"),N6=Ga("#","$"),R6={scope:"number",begin:Nm,relevance:0},L6={scope:"number",begin:Rm,relevance:0},D6={scope:"number",begin:Lm,relevance:0},F6={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[Ls,{begin:/\[/,end:/\]/,relevance:0,contains:[Ls]}]}]},P6={scope:"title",begin:Mm,relevance:0},$6={scope:"title",begin:wu,relevance:0},B6={begin:"\\.\\s*"+wu,relevance:0},j6=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 So=Object.freeze({__proto__:null,MATCH_NOTHING_RE:E6,IDENT_RE:Mm,UNDERSCORE_IDENT_RE:wu,NUMBER_RE:Nm,C_NUMBER_RE:Rm,BINARY_NUMBER_RE:Lm,RE_STARTERS_RE:A6,SHEBANG:S6,BACKSLASH_ESCAPE:Ls,APOS_STRING_MODE:I6,QUOTE_STRING_MODE:C6,PHRASAL_WORDS_MODE:T6,COMMENT:Ga,C_LINE_COMMENT_MODE:O6,C_BLOCK_COMMENT_MODE:M6,HASH_COMMENT_MODE:N6,NUMBER_MODE:R6,C_NUMBER_MODE:L6,BINARY_NUMBER_MODE:D6,REGEXP_MODE:F6,TITLE_MODE:P6,UNDERSCORE_TITLE_MODE:$6,METHOD_GUARD:B6,END_SAME_AS_BEGIN:j6});function z6(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function U6(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function V6(e,t){!t||!e.beginKeywords||(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=z6,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function H6(e,t){!Array.isArray(e.illegal)||(e.illegal=gu(...e.illegal))}function G6(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 Z6(e,t){e.relevance===void 0&&(e.relevance=1)}const Y6=(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=Kr(n.beforeMatch,Tm(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},W6=["of","and","for","in","not","or","if","then","parent","list","value"],q6="keyword";function Dm(e,t,n=q6){const r=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(s){Object.assign(r,Dm(e[s],t,s))}),r;function i(s,o){t&&(o=o.map(a=>a.toLowerCase())),o.forEach(function(a){const l=a.split("|");r[l[0]]=[s,X6(l[0],l[1])]})}}function X6(e,t){return t?Number(t):K6(e)?0:1}function K6(e){return W6.includes(e.toLowerCase())}const Tf={},Rr=e=>{console.error(e)},Of=(e,...t)=>{console.log(`WARN: ${e}`,...t)},oi=(e,t)=>{Tf[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Tf[`${e}/${t}`]=!0)},xa=new Error;function Fm(e,t,{key:n}){let r=0;const i=e[n],s={},o={};for(let a=1;a<=t.length;a++)o[a+r]=i[a],s[a+r]=!0,r+=Om(t[a-1]);e[n]=o,e[n]._emit=s,e[n]._multi=!0}function J6(e){if(!!Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Rr("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),xa;if(typeof e.beginScope!="object"||e.beginScope===null)throw Rr("beginScope must be object"),xa;Fm(e,e.begin,{key:"beginScope"}),e.begin=_u(e.begin,{joinWith:""})}}function Q6(e){if(!!Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Rr("skip, excludeEnd, returnEnd not compatible with endScope: {}"),xa;if(typeof e.endScope!="object"||e.endScope===null)throw Rr("endScope must be object"),xa;Fm(e,e.end,{key:"endScope"}),e.end=_u(e.end,{joinWith:""})}}function e4(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function t4(e){e4(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),J6(e),Q6(e)}function n4(e){function t(o,a){return new RegExp(Rs(o),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=Om(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(l=>l[1]);this.matcherRe=t(_u(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(a);if(!l)return null;const u=l.findIndex((d,f)=>f>0&&d!==void 0),c=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,c)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const l=new n;return this.rules.slice(a).forEach(([u,c])=>l.addRule(u,c)),l.compile(),this.multiRegexes[a]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,l){this.rules.push([a,l]),l.type==="begin"&&this.count++}exec(a){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(a);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(a)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function i(o){const a=new r;return o.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),o.terminatorEnd&&a.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&a.addRule(o.illegal,{type:"illegal"}),a}function s(o,a){const l=o;if(o.isCompiled)return l;[U6,G6,t4,Y6].forEach(c=>c(o,a)),e.compilerExtensions.forEach(c=>c(o,a)),o.__beforeBegin=null,[V6,H6,Z6].forEach(c=>c(o,a)),o.isCompiled=!0;let u=null;return typeof o.keywords=="object"&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),u=o.keywords.$pattern,delete o.keywords.$pattern),u=u||/\w+/,o.keywords&&(o.keywords=Dm(o.keywords,e.case_insensitive)),l.keywordPatternRe=t(u,!0),a&&(o.begin||(o.begin=/\B|\b/),l.beginRe=t(l.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(l.endRe=t(l.end)),l.terminatorEnd=Rs(l.end)||"",o.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd)),o.illegal&&(l.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(c){return r4(c==="self"?o:c)})),o.contains.forEach(function(c){s(c,l)}),o.starts&&s(o.starts,a),l.matcher=i(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=dr(e.classNameAliases||{}),s(e)}function Pm(e){return e?e.endsWithParent||Pm(e.starts):!1}function r4(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return dr(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Pm(e)?dr(e,{starts:e.starts?dr(e.starts):null}):Object.isFrozen(e)?dr(e):e}var i4="11.5.1";class s4 extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const $l=Cm,Mf=dr,Nf=Symbol("nomatch"),o4=7,a4=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:w6};function l(M){return a.noHighlightRe.test(M)}function u(M){let $=M.className+" ";$+=M.parentNode?M.parentNode.className:"";const V=a.languageDetectRe.exec($);if(V){const Q=C(V[1]);return Q||(Of(s.replace("{}",V[1])),Of("Falling back to no-highlight mode for this block.",M)),Q?V[1]:"no-highlight"}return $.split(/\s+/).find(Q=>l(Q)||C(Q))}function c(M,$,V){let Q="",R="";typeof $=="object"?(Q=M,V=$.ignoreIllegals,R=$.language):(oi("10.7.0","highlight(lang, code, ...args) has been deprecated."),oi("10.7.0",`Please use highlight(code, options) instead. https://github.com/highlightjs/highlight.js/issues/2277`),R=M,Q=$),V===void 0&&(V=!0);const I={code:Q,language:R};W("before:highlight",I);const N=I.result?I.result:d(I.language,I.code,V);return N.code=I.code,W("after:highlight",N),N}function d(M,$,V,Q){const R=Object.create(null);function I(ee,ne){return ee.keywords[ne]}function N(){if(!ae.keywords){Ue.addText(Ne);return}let ee=0;ae.keywordPatternRe.lastIndex=0;let ne=ae.keywordPatternRe.exec(Ne),fe="";for(;ne;){fe+=Ne.substring(ee,ne.index);const Ee=Ce.case_insensitive?ne[0].toLowerCase():ne[0],at=I(ae,Ee);if(at){const[Ot,zi]=at;if(Ue.addText(fe),fe="",R[Ee]=(R[Ee]||0)+1,R[Ee]<=o4&&(tt+=zi),Ot.startsWith("_"))fe+=ne[0];else{const Jr=Ce.classNameAliases[Ot]||Ot;Ue.addKeyword(ne[0],Jr)}}else fe+=ne[0];ee=ae.keywordPatternRe.lastIndex,ne=ae.keywordPatternRe.exec(Ne)}fe+=Ne.substr(ee),Ue.addText(fe)}function B(){if(Ne==="")return;let ee=null;if(typeof ae.subLanguage=="string"){if(!t[ae.subLanguage]){Ue.addText(Ne);return}ee=d(ae.subLanguage,Ne,!0,wn[ae.subLanguage]),wn[ae.subLanguage]=ee._top}else ee=h(Ne,ae.subLanguage.length?ae.subLanguage:null);ae.relevance>0&&(tt+=ee.relevance),Ue.addSublanguage(ee._emitter,ee.language)}function q(){ae.subLanguage!=null?B():N(),Ne=""}function ie(ee,ne){let fe=1;const Ee=ne.length-1;for(;fe<=Ee;){if(!ee._emit[fe]){fe++;continue}const at=Ce.classNameAliases[ee[fe]]||ee[fe],Ot=ne[fe];at?Ue.addKeyword(Ot,at):(Ne=Ot,N(),Ne=""),fe++}}function j(ee,ne){return ee.scope&&typeof ee.scope=="string"&&Ue.openNode(Ce.classNameAliases[ee.scope]||ee.scope),ee.beginScope&&(ee.beginScope._wrap?(Ue.addKeyword(Ne,Ce.classNameAliases[ee.beginScope._wrap]||ee.beginScope._wrap),Ne=""):ee.beginScope._multi&&(ie(ee.beginScope,ne),Ne="")),ae=Object.create(ee,{parent:{value:ae}}),ae}function J(ee,ne,fe){let Ee=y6(ee.endRe,fe);if(Ee){if(ee["on:end"]){const at=new If(ee);ee["on:end"](ne,at),at.isMatchIgnored&&(Ee=!1)}if(Ee){for(;ee.endsParent&&ee.parent;)ee=ee.parent;return ee}}if(ee.endsWithParent)return J(ee.parent,ne,fe)}function ge(ee){return ae.matcher.regexIndex===0?(Ne+=ee[0],1):(Rn=!0,0)}function we(ee){const ne=ee[0],fe=ee.rule,Ee=new If(fe),at=[fe.__beforeBegin,fe["on:begin"]];for(const Ot of at)if(!!Ot&&(Ot(ee,Ee),Ee.isMatchIgnored))return ge(ne);return fe.skip?Ne+=ne:(fe.excludeBegin&&(Ne+=ne),q(),!fe.returnBegin&&!fe.excludeBegin&&(Ne=ne)),j(fe,ee),fe.returnBegin?0:ne.length}function We(ee){const ne=ee[0],fe=$.substr(ee.index),Ee=J(ae,ee,fe);if(!Ee)return Nf;const at=ae;ae.endScope&&ae.endScope._wrap?(q(),Ue.addKeyword(ne,ae.endScope._wrap)):ae.endScope&&ae.endScope._multi?(q(),ie(ae.endScope,ee)):at.skip?Ne+=ne:(at.returnEnd||at.excludeEnd||(Ne+=ne),q(),at.excludeEnd&&(Ne=ne));do ae.scope&&Ue.closeNode(),!ae.skip&&!ae.subLanguage&&(tt+=ae.relevance),ae=ae.parent;while(ae!==Ee.parent);return Ee.starts&&j(Ee.starts,ee),at.returnEnd?0:ne.length}function He(){const ee=[];for(let ne=ae;ne!==Ce;ne=ne.parent)ne.scope&&ee.unshift(ne.scope);ee.forEach(ne=>Ue.openNode(ne))}let Ke={};function vt(ee,ne){const fe=ne&&ne[0];if(Ne+=ee,fe==null)return q(),0;if(Ke.type==="begin"&&ne.type==="end"&&Ke.index===ne.index&&fe===""){if(Ne+=$.slice(ne.index,ne.index+1),!i){const Ee=new Error(`0 width match regex (${M})`);throw Ee.languageName=M,Ee.badRule=Ke.rule,Ee}return 1}if(Ke=ne,ne.type==="begin")return we(ne);if(ne.type==="illegal"&&!V){const Ee=new Error('Illegal lexeme "'+fe+'" for mode "'+(ae.scope||"")+'"');throw Ee.mode=ae,Ee}else if(ne.type==="end"){const Ee=We(ne);if(Ee!==Nf)return Ee}if(ne.type==="illegal"&&fe==="")return 1;if(vn>1e5&&vn>ne.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ne+=fe,fe.length}const Ce=C(M);if(!Ce)throw Rr(s.replace("{}",M)),new Error('Unknown language: "'+M+'"');const je=n4(Ce);let ze="",ae=Q||je;const wn={},Ue=new a.__emitter(a);He();let Ne="",tt=0,xt=0,vn=0,Rn=!1;try{for(ae.matcher.considerAll();;){vn++,Rn?Rn=!1:ae.matcher.considerAll(),ae.matcher.lastIndex=xt;const ee=ae.matcher.exec($);if(!ee)break;const ne=$.substring(xt,ee.index),fe=vt(ne,ee);xt=ee.index+fe}return vt($.substr(xt)),Ue.closeAllNodes(),Ue.finalize(),ze=Ue.toHTML(),{language:M,value:ze,relevance:tt,illegal:!1,_emitter:Ue,_top:ae}}catch(ee){if(ee.message&&ee.message.includes("Illegal"))return{language:M,value:$l($),illegal:!0,relevance:0,_illegalBy:{message:ee.message,index:xt,context:$.slice(xt-100,xt+100),mode:ee.mode,resultSoFar:ze},_emitter:Ue};if(i)return{language:M,value:$l($),illegal:!1,relevance:0,errorRaised:ee,_emitter:Ue,_top:ae};throw ee}}function f(M){const $={value:$l(M),illegal:!1,relevance:0,_top:o,_emitter:new a.__emitter(a)};return $._emitter.addText(M),$}function h(M,$){$=$||a.languages||Object.keys(t);const V=f(M),Q=$.filter(C).filter(O).map(q=>d(q,M,!1));Q.unshift(V);const R=Q.sort((q,ie)=>{if(q.relevance!==ie.relevance)return ie.relevance-q.relevance;if(q.language&&ie.language){if(C(q.language).supersetOf===ie.language)return 1;if(C(ie.language).supersetOf===q.language)return-1}return 0}),[I,N]=R,B=I;return B.secondBest=N,B}function _(M,$,V){const Q=$&&n[$]||V;M.classList.add("hljs"),M.classList.add(`language-${Q}`)}function g(M){let $=null;const V=u(M);if(l(V))return;if(W("before:highlightElement",{el:M,language:V}),M.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(M)),a.throwUnescapedHTML))throw new s4("One of your code blocks includes unescaped HTML.",M.innerHTML);$=M;const Q=$.textContent,R=V?c(Q,{language:V,ignoreIllegals:!0}):h(Q);M.innerHTML=R.value,_(M,V,R.language),M.result={language:R.language,re:R.relevance,relevance:R.relevance},R.secondBest&&(M.secondBest={language:R.secondBest.language,relevance:R.secondBest.relevance}),W("after:highlightElement",{el:M,result:R,text:Q})}function p(M){a=Mf(a,M)}const m=()=>{x(),oi("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function v(){x(),oi("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let y=!1;function x(){if(document.readyState==="loading"){y=!0;return}document.querySelectorAll(a.cssSelector).forEach(g)}function b(){y&&x()}typeof window!="undefined"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",b,!1);function k(M,$){let V=null;try{V=$(e)}catch(Q){if(Rr("Language definition for '{}' could not be registered.".replace("{}",M)),i)Rr(Q);else throw Q;V=o}V.name||(V.name=M),t[M]=V,V.rawDefinition=$.bind(null,e),V.aliases&&A(V.aliases,{languageName:M})}function E(M){delete t[M];for(const $ of Object.keys(n))n[$]===M&&delete n[$]}function S(){return Object.keys(t)}function C(M){return M=(M||"").toLowerCase(),t[M]||t[n[M]]}function A(M,{languageName:$}){typeof M=="string"&&(M=[M]),M.forEach(V=>{n[V.toLowerCase()]=$})}function O(M){const $=C(M);return $&&!$.disableAutodetect}function D(M){M["before:highlightBlock"]&&!M["before:highlightElement"]&&(M["before:highlightElement"]=$=>{M["before:highlightBlock"](Object.assign({block:$.el},$))}),M["after:highlightBlock"]&&!M["after:highlightElement"]&&(M["after:highlightElement"]=$=>{M["after:highlightBlock"](Object.assign({block:$.el},$))})}function L(M){D(M),r.push(M)}function W(M,$){const V=M;r.forEach(function(Q){Q[V]&&Q[V]($)})}function U(M){return oi("10.7.0","highlightBlock will be removed entirely in v12.0"),oi("10.7.0","Please use highlightElement now."),g(M)}Object.assign(e,{highlight:c,highlightAuto:h,highlightAll:x,highlightElement:g,highlightBlock:U,configure:p,initHighlighting:m,initHighlightingOnLoad:v,registerLanguage:k,unregisterLanguage:E,listLanguages:S,getLanguage:C,registerAliases:A,autoDetection:O,inherit:Mf,addPlugin:L}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=i4,e.regex={concat:Kr,lookahead:Tm,either:gu,optional:x6,anyNumberOfTimes:v6};for(const M in So)typeof So[M]=="object"&&p6(So[M]);return Object.assign(e,So),e};var Ds=a4({}),l4=Ds;Ds.HighlightJS=Ds;Ds.default=Ds;var vu=l4;function c4(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 u4='';vu.registerLanguage("json",c4);_e.use({highlight:(e,t)=>{if(t!=="")return vu.highlight(e,{language:t}).value}});function d4({id:e}){const{locale:t}=Be(),{version:n,changeVersion:r}=Wr(),{changeTitle:i}=gn(),{value:s,refresh:o}=Hs(async()=>await(await fetch(`../../guides/${e}.md`)).text(),[e]),a=$e(()=>{if(!s)return;const x=Lv(s);return i(x==null?void 0:x.title,x==null?void 0:x.versions),x},[s]),l=$e(()=>{var b;const x=ke.versions.map(k=>k.id);return(b=a==null?void 0:a.versions)==null?void 0:b.sort((k,E)=>x.indexOf(E)-x.indexOf(k))},[a==null?void 0:a.versions]),u=$e(()=>!l||l.includes(n)?n:l[0],[n,a==null?void 0:a.versions]),c=$e(()=>{if(!s)return;const x=[];let b=!1;_e.use({extensions:[{name:"styledCode",level:"inline",start(S){var C,A;return(A=(C=S.match(/\b[fsnj]`/))==null?void 0:C.index)!=null?A:-1},tokenizer(S){const C=S.match(/^([fsnj])`([^`]+)`/);if(C)return{type:"styledCode",raw:C[0],prefix:C[1],text:C[2]}},renderer(S){let C=S.text,A={f:"hljs-attr",s:"hljs-string",n:"hljs-number"}[S.prefix];return S.prefix==="j"&&(C=vu.highlight("json",S.text).value,A="language-json"),`${C}`}}],walkTokens(S){S.type==="heading"&&x.push(S)},renderer:{link(S,C,A){if(S===null)return A;const O=C?` title="${C}"`:"",D=S!=null&&S.match(/^https?:\/\//)?' target="_blank"':"";return`
    ${A}`},heading(S,C,A,O){let D="";b||(D=`
      ${x.filter(U=>U.depth===2).map(U=>{var V,Q;const M=O.slug((Q=(V=U.raw.match(/^#+ (.*)/))==null?void 0:V[1])!=null?Q:"",{dryrun:!0}),$=U.text.replaceAll("`","");return`
    1. ${$}
    2. `}).join("")}
    `,b=!0);const L=O.slug(A),W=`${u4}`;return`${D}${W}${S}`}}});const k=s.substring(s.indexOf("---",3)+3),E=Dv(k,u);return _e(E,{version:"1.19"})},[u,s]),[d,f]=Hv(),h=Le(()=>{if(!c)return;const x=document.querySelector(`[id=guide-${d.slice(1)}]`);if(x){const b=x.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:b-68,behavior:"smooth"})}},[c,d]);he(()=>{h()},[c===void 0,d]);const _=Le(x=>{if(!(x.target instanceof HTMLSpanElement))return;const b="#"+x.target.id.replace(/^guide-/,"");r(n,!1,!0),f(b),b===d&&h()},[h,d,n]),[g,p]=ac(),m=Le(()=>{const x=`${location.origin}/guides/${e}/?version=${n}`;navigator.clipboard.writeText(x),p()},[e,n]),v=Le(x=>{Gr(`/guides/?tags=${x}`)},[]),[y]=K(window.innerWidth>600);return F("main",{children:[F("div",{class:"container guide",children:[F("div",{class:"navigation",children:[F("a",{class:"btn btn-link",href:"/guides/",children:[me.arrow_left,t("guides.all")]}),w(oe,{icon:g?"check":"link",label:t("share"),onClick:m,active:g,tooltip:t(g?"copied":"copy_share"),class:"guide-share"}),l&&w(Ha,{value:u,allowed:l,onChange:r})]}),(a==null?void 0:a.tags)&&a.tags.length>0&&w("div",{class:"guide-tags",children:a.tags.map(x=>w(Js,{label:x,active:!0,onClick:()=>v(x)}))}),c&&F(be,{children:[w(ya,{id:"guide",type:y?"image":"text"}),w("div",{class:"guide-content",dangerouslySetInnerHTML:{__html:c},onClick:_}),w(uu,{})]})]}),w(tr,{})]})}function f4({}){const{locale:e}=Be(),{version:t,changeVersion:n}=Wr();gn(e("title.guides"));const[r,i]=K(""),[s,o]=z1(),[a,l]=K(!1),u=$e(()=>a===!1?[{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"]}]:[{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"]}].filter(d=>{var f;return(f=d.versions)==null?void 0:f.includes(t)}),[t,a]),c=$e(()=>{const d=r.split(" ").map(f=>f.trim().toLowerCase()).filter(f=>f.length>0);return u.filter(f=>{var _;if(!s.every(g=>{var p;return(p=f.tags)==null?void 0:p.includes(g)}))return!1;const h=((_=f.tags)==null?void 0:_.join(" "))+" "+f.title.toLowerCase();return d.every(g=>g.startsWith("!")?g.length===1||!h.includes(g.slice(1)):h.includes(g))})},[u,r,s]);return F("main",{children:[F("div",{class:"container",children:[F("div",{class:"changelog-query",children:[w(Mn,{class:"btn btn-input changelog-search",placeholder:e("guides.search"),value:r,onChange:i}),w(Ha,{value:a?t:void 0,onChange:d=>{n(d),l(!0)},hasAny:!0,onAny:()=>l(!1)})]}),s.length>0&&w("div",{class:"changelog-tags",children:s.map(d=>w(Js,{label:d,onClick:()=>o(d)}))}),u.length===0?w(be,{children:w("span",{class:"note",children:e("guides.no_results.version")})}):c.length===0?w(be,{children:w("span",{class:"note",children:e("guides.no_results.query")})}):c.map(d=>{var f,h;return w(j7,{title:d.title,link:`/guides/${d.id}/`,tags:(f=d.tags)!=null?f:[],versions:(h=d.versions)!=null?h:[],activeTags:s,toggleTag:o})})]}),w(tr,{})]})}function h4({}){const{locale:e}=Be();return gn(e("title.home")),w("main",{children:F("div",{class:"container home",children:[F(At,{title:"Data packs",children:[ke.generators.filter(t=>!t.category).map(t=>w(At,{title:e(t.id),link:On(t.url)})),w(At,{title:e("tags"),link:"/tags/"}),w(At,{title:e("worldgen"),link:"/worldgen/"})]}),w(At,{title:"Resource packs",children:ke.generators.filter(t=>t.category==="assets").map(t=>w(At,{title:e(t.id),link:On(t.url)}))}),w(At,{title:"Partners",link:"/partners/"}),w(At,{title:"Report Inspector",icon:"report",link:"https://misode.github.io/report/",desc:"Analyse your performance reports"}),w(At,{title:"Minecraft Sounds",icon:"sounds",link:"/sounds/",desc:"Browse through and mix all the vanilla sounds"}),w(At,{title:"Data Pack Upgrader",link:"https://misode.github.io/upgrader/",desc:"Convert your data packs from 1.16 to 1.17 to 1.18"}),w(At,{title:"Technical Changelog",link:"/changelog/"}),w(At,{title:"Minecraft Versions",link:"/versions/"}),w(At,{title:"Data Pack Guides",link:"/guides/"}),w(uu,{}),w(tr,{})]})})}const p4=[...new Set(ke.generators.filter(e=>e.partner!==void 0).map(e=>e.partner))];function m4({}){const{locale:e}=Be();return gn(e("title.partners")),F("main",{children:[w("div",{class:"container",children:p4.map(t=>w(At,{title:e(`partner.${t}`),children:ke.generators.filter(n=>n.partner===t).map(n=>w(At,{title:e(`partner.${t}.${n.id}`),link:On(n.url)}))}))}),w(tr,{donate:!1})]})}function g4({}){const{locale:e}=Be(),{version:t,changeVersion:n}=Wr();gn(e("title.sounds"));const[r,i]=K(void 0);he(()=>{(async()=>{const x=await xe(()=>import("./howler.5a0196e8.js").then(function(b){return b.h}),[]);i(()=>b=>new x.Howl(b))})()},[]);const{value:s,error:o}=Hs(async()=>await rx(t),[t]),a=$e(()=>Object.keys(s!=null?s:{}),[s]),[l,u]=K(""),[c,d]=K([]),f=()=>{d([{id:Mr(),sound:l,delay:0,pitch:1,volume:1},...c])},h=x=>b=>{d(c.map(k=>k.id===x?ce(ce({},k),b):k))},_=x=>()=>{d(c.filter(b=>b.id!==x))},[g,p]=K(0),m=()=>{p(g+1)},v=Oe(null),y=()=>{if(!v.current)return;const x=c.some(k=>k.delay>0),b=c.sort((k,E)=>k.delay-E.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,"+b+"%0A"),v.current.setAttribute("download","sounds.mcfunction"),v.current.click()};return F("main",{children:[o&&w(xi,{error:o}),a.length>0&&F(be,{children:[F("div",{class:"sounds-controls",children:[F("div",{class:"sound-search-group",children:[w(Mn,{class:"btn btn-input sound-search",list:"sound-list",placeholder:e("sounds.search"),value:l,onChange:u,onEnter:f}),w(oe,{icon:"plus",tooltip:e("sounds.add_sound"),class:"add-sound",onClick:f})]}),c.length>1&&w(oe,{icon:"play",label:e("sounds.play_all"),class:"play-all-sounds",onClick:m}),w("div",{class:"spacer"}),w(oe,{icon:"download",label:e("download"),tooltip:e("sounds.download_function"),tooltipLoc:"se",class:"download-sounds",onClick:y}),w(Ha,{value:t,onChange:n})]}),w("div",{class:"sounds",children:s&&r&&c.map(x=>w(U7,Ae(ce({},x),{howler:r,sounds:s,delayedPlay:g,onEdit:h(x.id),onDelete:_(x.id)}),x.id))}),w("a",{ref:v,style:"display: none;"}),w("datalist",{id:"sound-list",children:a.map(x=>w("option",{value:x},x))})]}),w(tr,{donate:!1})]})}function _4({}){const{locale:e}=Be();gn(e("title.versions"));const{value:t,error:n}=Hs(sx,[]),[r]=Pr("id"),i=(t!=null?t:[]).find(a=>a.id===r);gn(i?`Minecraft ${i.name}`:"Versions Explorer",i?[]:void 0,i?"Changes and metadata":void 0);const s=i&&Rf(t!=null?t:[],i,-1),o=i&&Rf(t!=null?t:[],i,1);return F("main",{children:[w(ya,{type:"text",id:"versions"}),n&&w(xi,{error:n}),w("div",{class:"container",children:r?F(be,{children:[F("div",{class:"navigation",children:[w(hl,{link:"/versions/",icon:"three_bars",label:e("versions.all")}),w(hl,{link:o?`/versions/?id=${o.id}`:void 0,icon:"arrow_left",label:e("versions.previous")}),w(hl,{link:s?`/versions/?id=${s.id}`:void 0,icon:"arrow_right",label:e("versions.next"),swapped:!0})]}),w(l6,{id:r,version:i})]}):w(d6,{versions:t!=null?t:[],link:a=>`/versions/?id=${a}`})}),w(tr,{donate:!1})]})}function Rf(e,t,n){const i=e.findIndex(s=>s.id===t.id)+n;if(!(i<0||i>=e.length))return e[i]}function w4(){const e=t=>{window.dispatchEvent(new CustomEvent("replacestate")),setTimeout(()=>Se.pageview(On(t.url)))};return F(be,{children:[w(z7,{}),F(Wn,{onChange:e,children:[w(h4,{path:"/"}),w(Fl,{path:"/worldgen",category:"worldgen"}),w(Fl,{path:"/tags",category:"tags"}),w(Fl,{path:"/assets",category:"assets"}),w(m4,{path:"/partners"}),w(g4,{path:"/sounds"}),w(f6,{path:"/changelog"}),w(_4,{path:"/versions"}),w(f4,{path:"/guides/"}),w(d4,{path:"/guides/:id"}),w(h6,{default:!0})]})]})}function v4(){return w(Cx,{children:w(Ax,{children:w(Tx,{children:w(Rx,{children:w(Mx,{children:w(Ix,{children:w(w4,{})})})})})})})}Lr(w(v4,{}),document.body);export{no as c,Jp as e,P as l,y4 as p}; //# sourceMappingURL=index.93a30b86.js.map