mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-30 09:42:44 +00:00
183 lines
1.1 MiB
183 lines
1.1 MiB
var mg=Object.defineProperty,vg=Object.defineProperties;var wg=Object.getOwnPropertyDescriptors;var Ds=Object.getOwnPropertySymbols;var Lc=Object.prototype.hasOwnProperty,$c=Object.prototype.propertyIsEnumerable;var Tc=(e,t,n)=>t in e?mg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ce=(e,t)=>{for(var n in t||(t={}))Lc.call(t,n)&&Tc(e,n,t[n]);if(Ds)for(var n of Ds(t))$c.call(t,n)&&Tc(e,n,t[n]);return e},tt=(e,t)=>vg(e,wg(t));var Zo=e=>typeof e=="symbol"?e:e+"",Mc=(e,t)=>{var n={};for(var i in e)Lc.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&Ds)for(var i of Ds(e))t.indexOf(i)<0&&$c.call(e,i)&&(n[i]=e[i]);return n};const _g=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerpolicy&&(s.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?s.credentials="include":r.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}};_g();var _e,$r,Bf,Rc,Tf,ro={},Ll=[],Ag=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Mn(e,t){for(var n in t)e[n]=t[n];return e}function Lf(e){var t=e.parentNode;t&&t.removeChild(e)}function S(e,t,n){var i,r,s,u=arguments,o={};for(s in t)s=="key"?i=t[s]:s=="ref"?r=t[s]:o[s]=t[s];if(arguments.length>3)for(n=[n],s=3;s<arguments.length;s++)n.push(u[s]);if(n!=null&&(o.children=n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)o[s]===void 0&&(o[s]=e.defaultProps[s]);return Mr(e,o,i,r,null)}function Mr(e,t,n,i,r){var s={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:r==null?++_e.__v:r};return _e.vnode!=null&&_e.vnode(s),s}function yg(){return{current:null}}function De(e){return e.children}function nn(e,t){this.props=e,this.context=t}function jr(e,t){if(t==null)return e.__?jr(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?jr(e):null}function $f(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return $f(e)}}function Ha(e){(!e.__d&&(e.__d=!0)&&$r.push(e)&&!so.__r++||Rc!==_e.debounceRendering)&&((Rc=_e.debounceRendering)||Bf)(so)}function so(){for(var e;so.__r=$r.length;)e=$r.sort(function(t,n){return t.__v.__b-n.__v.__b}),$r=[],e.some(function(t){var n,i,r,s,u,o;t.__d&&(u=(s=(n=t).__v).__e,(o=n.__P)&&(i=[],(r=Mn({},s)).__v=s.__v+1,$l(o,s,r,n.__n,o.ownerSVGElement!==void 0,s.__h!=null?[u]:null,i,u==null?jr(s):u,s.__h),Of(i,s),s.__e!=u&&$f(s)))})}function Mf(e,t,n,i,r,s,u,o,c,a){var f,l,h,d,g,p,m,w=i&&i.__k||Ll,v=w.length;for(n.__k=[],f=0;f<t.length;f++)if((d=n.__k[f]=(d=t[f])==null||typeof d=="boolean"?null:typeof d=="string"||typeof d=="number"||typeof d=="bigint"?Mr(null,d,null,null,d):Array.isArray(d)?Mr(De,{children:d},null,null,null):d.__b>0?Mr(d.type,d.props,d.key,null,d.__v):d)!=null){if(d.__=n,d.__b=n.__b+1,(h=w[f])===null||h&&d.key==h.key&&d.type===h.type)w[f]=void 0;else for(l=0;l<v;l++){if((h=w[l])&&d.key==h.key&&d.type===h.type){w[l]=void 0;break}h=null}$l(e,d,h=h||ro,r,s,u,o,c,a),g=d.__e,(l=d.ref)&&h.ref!=l&&(m||(m=[]),h.ref&&m.push(h.ref,null,d),m.push(l,d.__c||g,d)),g!=null?(p==null&&(p=g),typeof d.type=="function"&&d.__k!=null&&d.__k===h.__k?d.__d=c=Rf(d,c,e):c=If(e,d,h,w,g,c),a||n.type!=="option"?typeof n.type=="function"&&(n.__d=c):e.value=""):c&&h.__e==c&&c.parentNode!=e&&(c=jr(h))}for(n.__e=p,f=v;f--;)w[f]!=null&&(typeof n.type=="function"&&w[f].__e!=null&&w[f].__e==n.__d&&(n.__d=jr(i,f+1)),Pf(w[f],w[f]));if(m)for(f=0;f<m.length;f++)Nf(m[f],m[++f],m[++f])}function Rf(e,t,n){var i,r;for(i=0;i<e.__k.length;i++)(r=e.__k[i])&&(r.__=e,t=typeof r.type=="function"?Rf(r,t,n):If(n,r,r,e.__k,r.__e,t));return t}function rn(e,t){return t=t||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(n){rn(n,t)}):t.push(e)),t}function If(e,t,n,i,r,s){var u,o,c;if(t.__d!==void 0)u=t.__d,t.__d=void 0;else if(n==null||r!=s||r.parentNode==null)e:if(s==null||s.parentNode!==e)e.appendChild(r),u=null;else{for(o=s,c=0;(o=o.nextSibling)&&c<i.length;c+=2)if(o==r)break e;e.insertBefore(r,s),u=s}return u!==void 0?u:r.nextSibling}function Eg(e,t,n,i,r){var s;for(s in n)s==="children"||s==="key"||s in t||oo(e,s,null,n[s],i);for(s in t)r&&typeof t[s]!="function"||s==="children"||s==="key"||s==="value"||s==="checked"||n[s]===t[s]||oo(e,s,t[s],n[s],i)}function Ic(e,t,n){t[0]==="-"?e.setProperty(t,n):e[t]=n==null?"":typeof n!="number"||Ag.test(t)?n:n+"px"}function oo(e,t,n,i,r){var s;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof i=="string"&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||Ic(e.style,t,"");if(n)for(t in n)i&&n[t]===i[t]||Ic(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")s=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?i||e.addEventListener(t,s?Nc:Oc,s):e.removeEventListener(t,s?Nc:Oc,s);else if(t!=="dangerouslySetInnerHTML"){if(r)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n==null?"":n;break e}catch{}typeof n=="function"||(n!=null&&(n!==!1||t[0]==="a"&&t[1]==="r")?e.setAttribute(t,n):e.removeAttribute(t))}}function Oc(e){this.l[e.type+!1](_e.event?_e.event(e):e)}function Nc(e){this.l[e.type+!0](_e.event?_e.event(e):e)}function $l(e,t,n,i,r,s,u,o,c){var a,f,l,h,d,g,p,m,w,v,A,_=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(c=n.__h,o=t.__e=n.__e,t.__h=null,s=[o]),(a=_e.__b)&&a(t);try{e:if(typeof _=="function"){if(m=t.props,w=(a=_.contextType)&&i[a.__c],v=a?w?w.props.value:a.__:i,n.__c?p=(f=t.__c=n.__c).__=f.__E:("prototype"in _&&_.prototype.render?t.__c=f=new _(m,v):(t.__c=f=new nn(m,v),f.constructor=_,f.render=xg),w&&w.sub(f),f.props=m,f.state||(f.state={}),f.context=v,f.__n=i,l=f.__d=!0,f.__h=[]),f.__s==null&&(f.__s=f.state),_.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=Mn({},f.__s)),Mn(f.__s,_.getDerivedStateFromProps(m,f.__s))),h=f.props,d=f.state,l)_.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(_.getDerivedStateFromProps==null&&m!==h&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(m,v),!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(m,f.__s,v)===!1||t.__v===n.__v){f.props=m,f.state=f.__s,t.__v!==n.__v&&(f.__d=!1),f.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(E){E&&(E.__=t)}),f.__h.length&&u.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(m,f.__s,v),f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(h,d,g)})}f.context=v,f.props=m,f.state=f.__s,(a=_e.__r)&&a(t),f.__d=!1,f.__v=t,f.__P=e,a=f.render(f.props,f.state,f.context),f.state=f.__s,f.getChildContext!=null&&(i=Mn(Mn({},i),f.getChildContext())),l||f.getSnapshotBeforeUpdate==null||(g=f.getSnapshotBeforeUpdate(h,d)),A=a!=null&&a.type===De&&a.key==null?a.props.children:a,Mf(e,Array.isArray(A)?A:[A],t,n,i,r,s,u,o,c),f.base=t.__e,t.__h=null,f.__h.length&&u.push(f),p&&(f.__E=f.__=null),f.__e=!1}else s==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=bg(n.__e,t,n,i,r,s,u,c);(a=_e.diffed)&&a(t)}catch(E){t.__v=null,(c||s!=null)&&(t.__e=o,t.__h=!!c,s[s.indexOf(o)]=null),_e.__e(E,t,n)}}function Of(e,t){_e.__c&&_e.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){_e.__e(i,n.__v)}})}function bg(e,t,n,i,r,s,u,o){var c,a,f,l,h=n.props,d=t.props,g=t.type,p=0;if(g==="svg"&&(r=!0),s!=null){for(;p<s.length;p++)if((c=s[p])&&(c===e||(g?c.localName==g:c.nodeType==3))){e=c,s[p]=null;break}}if(e==null){if(g===null)return document.createTextNode(d);e=r?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,d.is&&d),s=null,o=!1}if(g===null)h===d||o&&e.data===d||(e.data=d);else{if(s=s&&Ll.slice.call(e.childNodes),a=(h=n.props||ro).dangerouslySetInnerHTML,f=d.dangerouslySetInnerHTML,!o){if(s!=null)for(h={},l=0;l<e.attributes.length;l++)h[e.attributes[l].name]=e.attributes[l].value;(f||a)&&(f&&(a&&f.__html==a.__html||f.__html===e.innerHTML)||(e.innerHTML=f&&f.__html||""))}if(Eg(e,d,h,r,o),f)t.__k=[];else if(p=t.props.children,Mf(e,Array.isArray(p)?p:[p],t,n,i,r&&g!=="foreignObject",s,u,e.firstChild,o),s!=null)for(p=s.length;p--;)s[p]!=null&&Lf(s[p]);o||("value"in d&&(p=d.value)!==void 0&&(p!==e.value||g==="progress"&&!p)&&oo(e,"value",p,h.value,!1),"checked"in d&&(p=d.checked)!==void 0&&p!==e.checked&&oo(e,"checked",p,h.checked,!1))}return e}function Nf(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(i){_e.__e(i,n)}}function Pf(e,t,n){var i,r,s;if(_e.unmount&&_e.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||Nf(i,null,t)),n||typeof e.type=="function"||(n=(r=e.__e)!=null),e.__e=e.__d=void 0,(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(u){_e.__e(u,t)}i.base=i.__P=null}if(i=e.__k)for(s=0;s<i.length;s++)i[s]&&Pf(i[s],t,n);r!=null&&Lf(r)}function xg(e,t,n){return this.constructor(e,n)}function Qi(e,t,n){var i,r,s;_e.__&&_e.__(e,t),r=(i=typeof n=="function")?null:n&&n.__k||t.__k,s=[],$l(t,e=(!i&&n||t).__k=S(De,null,[e]),r||ro,ro,t.ownerSVGElement!==void 0,!i&&n?[n]:r?null:t.firstChild?Ll.slice.call(t.childNodes):null,s,!i&&n?n:r?r.__e:t.firstChild,i),Of(s,e)}function zf(e,t){Qi(e,t,zf)}function Uf(e,t,n){var i,r,s,u=arguments,o=Mn({},e.props);for(s in t)s=="key"?i=t[s]:s=="ref"?r=t[s]:o[s]=t[s];if(arguments.length>3)for(n=[n],s=3;s<arguments.length;s++)n.push(u[s]);return n!=null&&(o.children=n),Mr(e.type,o,i||e.key,r||e.ref,null)}function fr(e,t){var n={__c:t="__cC"+Tf++,__:e,Consumer:function(i,r){return i.children(r)},Provider:function(i){var r,s;return this.getChildContext||(r=[],(s={})[t]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(u){this.props.value!==u.value&&r.some(Ha)},this.sub=function(u){r.push(u);var o=u.componentWillUnmount;u.componentWillUnmount=function(){r.splice(r.indexOf(u),1),o&&o.call(u)}}),i.children}};return n.Provider.__=n.Consumer.contextType=n}_e={__e:function(e,t){for(var n,i,r;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&i.getDerivedStateFromError!=null&&(n.setState(i.getDerivedStateFromError(e)),r=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e),r=n.__d),r)return n.__E=n}catch(s){e=s}throw e},__v:0},nn.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Mn({},this.state),typeof e=="function"&&(e=e(Mn({},n),this.props)),e&&Mn(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),Ha(this))},nn.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ha(this))},nn.prototype.render=De,$r=[],Bf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,so.__r=0,Tf=0;var Cg={};function Hf(e,t){for(var n in t)e[n]=t[n];return e}function jf(e,t,n){var i=/(?:\?([^#]*))?(#.*)?$/,r=e.match(i),s={},u;if(r&&r[1])for(var o=r[1].split("&"),c=0;c<o.length;c++){var a=o[c].split("=");s[decodeURIComponent(a[0])]=decodeURIComponent(a.slice(1).join("="))}e=ja(e.replace(i,"")),t=ja(t||"");for(var f=Math.max(e.length,t.length),l=0;l<f;l++)if(t[l]&&t[l].charAt(0)===":"){var h=t[l].replace(/(^:|[+*?]+$)/g,""),d=(t[l].match(/[+*?]+$/)||Cg)[0]||"",g=~d.indexOf("+"),p=~d.indexOf("*"),m=e[l]||"";if(!m&&!p&&(d.indexOf("?")<0||g)){u=!1;break}if(s[h]=decodeURIComponent(m),g||p){s[h]=e.slice(l).map(decodeURIComponent).join("/");break}}else if(t[l]!==e[l]){u=!1;break}return n.default!==!0&&u===!1?!1:s}function Fg(e,t){return e.rank<t.rank?1:e.rank>t.rank?-1:e.index-t.index}function Sg(e,t){return e.index=t,e.rank=Bg(e),e.props}function ja(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}function Dg(e){return e.charAt(0)==":"?1+"*+?".indexOf(e.charAt(e.length-1))||4:5}function kg(e){return ja(e).map(Dg).join("")}function Bg(e){return e.props.default?0:kg(e.props.path)}var Ot=null,gi=[],Wa=[],Tg={};function Lg(e,t){t===void 0&&(t="push"),Ot&&Ot[t]?Ot[t](e):typeof history!="undefined"&&history[t+"State"]&&history[t+"State"](null,null,e)}function er(){var e;return Ot&&Ot.location?e=Ot.location:Ot&&Ot.getCurrentLocation?e=Ot.getCurrentLocation():e=typeof location!="undefined"?location:Tg,""+(e.pathname||"")+(e.search||"")}function ri(e,t){return t===void 0&&(t=!1),typeof e!="string"&&e.url&&(t=e.replace,e=e.url),$g(e)&&Lg(e,t?"replace":"push"),Wf(e)}function $g(e){for(var t=gi.length;t--;)if(gi[t].canRoute(e))return!0;return!1}function Wf(e){for(var t=!1,n=0;n<gi.length;n++)gi[n].routeTo(e)===!0&&(t=!0);for(var i=Wa.length;i--;)Wa[i](e);return t}function Vf(e){if(!(!e||!e.getAttribute)){var t=e.getAttribute("href"),n=e.getAttribute("target");if(!(!t||!t.match(/^\//g)||n&&!n.match(/^_?self$/i)))return ri(t)}}function Mg(e){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||e.button!==0))return Vf(e.currentTarget||e.target||this),Gf(e)}function Gf(e){return e&&(e.stopImmediatePropagation&&e.stopImmediatePropagation(),e.stopPropagation&&e.stopPropagation(),e.preventDefault()),!1}function Rg(e){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||e.button!==0)){var t=e.target;do if(String(t.nodeName).toUpperCase()==="A"&&t.getAttribute("href")){if(t.hasAttribute("native"))return;if(Vf(t))return Gf(e)}while(t=t.parentNode)}}var Pc=!1;function Ig(){Pc||(typeof addEventListener=="function"&&(Ot||addEventListener("popstate",function(){Wf(er())}),addEventListener("click",Rg)),Pc=!0)}var In=function(e){function t(n){e.call(this,n),n.history&&(Ot=n.history),this.state={url:n.url||er()},Ig()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.shouldComponentUpdate=function(i){return i.static!==!0?!0:i.url!==this.props.url||i.onChange!==this.props.onChange},t.prototype.canRoute=function(i){var r=rn(this.props.children);return this.getMatchingChildren(r,i,!1).length>0},t.prototype.routeTo=function(i){this.setState({url:i});var r=this.canRoute(i);return this.updating||this.forceUpdate(),r},t.prototype.componentWillMount=function(){gi.push(this),this.updating=!0},t.prototype.componentDidMount=function(){var i=this;Ot&&(this.unlisten=Ot.listen(function(r){i.routeTo(""+(r.pathname||"")+(r.search||""))})),this.updating=!1},t.prototype.componentWillUnmount=function(){typeof this.unlisten=="function"&&this.unlisten(),gi.splice(gi.indexOf(this),1)},t.prototype.componentWillUpdate=function(){this.updating=!0},t.prototype.componentDidUpdate=function(){this.updating=!1},t.prototype.getMatchingChildren=function(i,r,s){return i.filter(Sg).sort(Fg).map(function(u){var o=jf(r,u.props.path,u.props);if(o){if(s!==!1){var c={url:r,matches:o};return Hf(c,o),delete c.ref,delete c.key,Uf(u,c)}return u}}).filter(Boolean)},t.prototype.render=function(i,r){var s=i.children,u=i.onChange,o=r.url,c=this.getMatchingChildren(rn(s),o,!0),a=c[0]||null,f=this.previousUrl;return o!==f&&(this.previousUrl=o,typeof u=="function"&&u({router:this,url:o,previous:f,active:c,current:a})),a},t}(nn),Kf=function(e){return S("a",Hf({onClick:Mg},e))},Og=function(e){return S(e.component,e)};In.subscribers=Wa;In.getCurrentUrl=er;In.route=ri;In.Router=In;In.Route=Og;In.Link=Kf;In.exec=jf;var lt;(e=>{const t="Site",n="Generator";function a(A,_,E){ga("send","event",A,_,E)}function f(A,_){ga("set",`dimension${A}`,_)}function l(A){ga("set","page",A),ga("send","pageview")}e.pageview=l;function h(A){f(4,A),a(t,"set-language",A)}e.setLanguage=h;function d(A){f(1,A),a(t,"set-theme",A)}e.setTheme=d;function g(A){f(3,A),a(n,"set-version",A)}e.setVersion=g;function p(A){f(5,A),a(n,"set-preview",A)}e.setPreview=p;function m(A){f(6,A)}e.setGenerator=m;function w(A){f(7,A)}e.setPrefersColorScheme=w;function v(A,_){a(n,A,_)}e.generatorEvent=v})(lt||(lt={}));var Si,Ct,zc,tr=0,Va=[],Uc=_e.__b,Hc=_e.__r,jc=_e.diffed,Wc=_e.__c,Vc=_e.unmount;function dr(e,t){_e.__h&&_e.__h(Ct,e,tr||t),tr=0;var n=Ct.__H||(Ct.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function oe(e){return tr=1,Xf(Zf,e)}function Xf(e,t,n){var i=dr(Si++,2);return i.t=e,i.__c||(i.__=[n?n(t):Zf(void 0,t),function(r){var s=i.t(i.__[0],r);i.__[0]!==s&&(i.__=[s,i.__[1]],i.__c.setState({}))}],i.__c=Ct),i.__}function xe(e,t){var n=dr(Si++,3);!_e.__s&&Ml(n.__H,t)&&(n.__=e,n.__H=t,Ct.__H.__h.push(n))}function Jf(e,t){var n=dr(Si++,4);!_e.__s&&Ml(n.__H,t)&&(n.__=e,n.__H=t,Ct.__h.push(n))}function Xe(e){return tr=5,Qe(function(){return{current:e}},[])}function Ng(e,t,n){tr=6,Jf(function(){typeof e=="function"?e(t()):e&&(e.current=t())},n==null?n:n.concat(e))}function Qe(e,t){var n=dr(Si++,7);return Ml(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function At(e,t){return tr=8,Qe(function(){return e},t)}function pr(e){var t=Ct.context[e.__c],n=dr(Si++,9);return n.__c=e,t?(n.__==null&&(n.__=!0,t.sub(Ct)),t.props.value):e.__}function Pg(e,t){_e.useDebugValue&&_e.useDebugValue(t?t(e):e)}function Yf(e){var t=dr(Si++,10),n=oe();return t.__=e,Ct.componentDidCatch||(Ct.componentDidCatch=function(i){t.__&&t.__(i),n[1](i)}),[n[0],function(){n[1](void 0)}]}function zg(){Va.forEach(function(e){if(e.__P)try{e.__H.__h.forEach(Us),e.__H.__h.forEach(Ga),e.__H.__h=[]}catch(t){e.__H.__h=[],_e.__e(t,e.__v)}}),Va=[]}_e.__b=function(e){Ct=null,Uc&&Uc(e)},_e.__r=function(e){Hc&&Hc(e),Si=0;var t=(Ct=e.__c).__H;t&&(t.__h.forEach(Us),t.__h.forEach(Ga),t.__h=[])},_e.diffed=function(e){jc&&jc(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(Va.push(t)!==1&&zc===_e.requestAnimationFrame||((zc=_e.requestAnimationFrame)||function(n){var i,r=function(){clearTimeout(s),Gc&&cancelAnimationFrame(i),setTimeout(n)},s=setTimeout(r,100);Gc&&(i=requestAnimationFrame(r))})(zg)),Ct=void 0},_e.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Us),n.__h=n.__h.filter(function(i){return!i.__||Ga(i)})}catch(i){t.some(function(r){r.__h&&(r.__h=[])}),t=[],_e.__e(i,n.__v)}}),Wc&&Wc(e,t)},_e.unmount=function(e){Vc&&Vc(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(Us)}catch(n){_e.__e(n,t.__v)}};var Gc=typeof requestAnimationFrame=="function";function Us(e){var t=Ct;typeof e.__c=="function"&&e.__c(),Ct=t}function Ga(e){var t=Ct;e.__c=e.__(),Ct=t}function Ml(e,t){return!e||e.length!==t.length||t.some(function(n,i){return n!==e[i]})}function Zf(e,t){return typeof t=="function"?t(e):t}function ps({type:e,id:t}){return xe(()=>{var n;(n=document.getElementById("ad-placeholder"))==null||n.remove(),"ethicalads"in window&ðicalads.load()},[]),S("div",{"data-ea-publisher":"misode-github-io","data-ea-type":e,class:"ad dark flat",id:t})}function Ee({icon:e,label:t,active:n,class:i,tooltip:r,tooltipLoc:s,onClick:u}){return S("div",{class:`btn${n?" active":""}${i?` ${i}`:""}${r?` tooltipped tip-${s!=null?s:"sw"}`:""}${n?" tip-shown":""}`,onClick:u,"aria-label":r},e&&$e[e],t&&S("span",null,t))}var tn=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function qf(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 ae={},bn={},An={};Object.defineProperty(An,"__esModule",{value:!0});An.ModelPath=An.Path=An.relativePath=void 0;function Ug(e,t){return t.reduce((n,i)=>i==="pop"?n.pop():n.push(i.push),e)}An.relativePath=Ug;class Dn{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 Dn(this.modelArr.slice(t,n),this.contextArr)}shift(){return new Dn(this.modelArr.slice(1),this.contextArr)}pop(){return new Dn(this.modelArr.slice(0,-1),this.contextArr)}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new Dn([...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 Dn([...this.modelArr],[...this.contextArr,n])}copy(){return new Dn([...this.modelArr],[...this.contextArr])}getArray(){return this.modelArr}withModel(t){return new kn(t,this)}getContext(){return this.contextArr}equals(t){return t.modelArr.length===this.modelArr.length&&t.modelArr.every((n,i)=>n===this.modelArr[i])}startsWith(t){return this.modelArr.length<t.modelArr.length?!1:t.modelArr.every((n,i)=>n===this.modelArr[i])}endsWith(t){const n=this.modelArr.length-t.modelArr.length;return n<0?!1:t.modelArr.every((i,r)=>i===this.modelArr[n+r])}toString(){return this.modelArr.map(t=>typeof t=="string"?`.${t}`:`[${t}]`).join("").replace(/^\./,"")}forEach(t,n){return this.modelArr.forEach(t,n)}}An.Path=Dn;class kn extends Dn{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 kn(this.model,super.slice(t,n))}shift(){return new kn(this.model,super.shift())}pop(){return new kn(this.model,super.pop())}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new kn(this.model,super.modelPush(t))}contextPush(t){return new kn(this.model,super.contextPush(t))}copy(){return new kn(this.model,super.copy())}}An.ModelPath=kn;var gr={};Object.defineProperty(gr,"__esModule",{value:!0});gr.Errors=void 0;class Hg{constructor(){this.errors=[]}add(t,n,...i){return this.errors.push({path:t,error:n,params:i}),!1}get(t,n=!1){return n?this.errors.filter(i=>i.path.equals(t)):this.errors.filter(i=>i.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}}gr.Errors=Hg;var yn={};Object.defineProperty(yn,"__esModule",{value:!0});yn.hexId=yn.quoteString=yn.escapeString=void 0;function Qf(e){return e.replace(/(\\|")/g,"\\$1")}yn.escapeString=Qf;function jg(e){return`"${Qf(e)}"`}yn.quoteString=jg;const Wg=e=>("0"+e.toString(16)).substr(-2);function Vg(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,Wg).join("")}yn.hexId=Vg;Object.defineProperty(bn,"__esModule",{value:!0});bn.DataModel=void 0;const Gg=An,Kc=gr,qo=yn;class Rl{constructor(t,n){var i,r,s,u;this.historyMax=(i=n==null?void 0:n.historyMax)!==null&&i!==void 0?i:50,this.verbose=(r=n==null?void 0:n.verbose)!==null&&r!==void 0?r:!1,this.wrapLists=(s=n==null?void 0:n.wrapLists)!==null&&s!==void 0?s:!1,this.schema=t;const o=(u=n==null?void 0:n.initialData)!==null&&u!==void 0?u:t.default();this.data=this.wrapLists?Rl.wrapLists(o):o,this.listeners=[],this.errors=new Kc.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(i=>{if(n===void 0)return n;this.wrapLists&&typeof i=="number"?n=n[i].node:n=n[i]}),n}set(t,n,i){if(t.getArray().length===0){this.reset(n,!0);return}let r=this.data;t.pop().forEach(s=>{(r[s]===void 0||typeof r[s]=="string"||typeof r[s]=="number")&&(this.wrapLists&&typeof s=="number"?r[s]={node:{},id:(0,qo.hexId)()}:r[s]={}),this.wrapLists&&typeof s=="number"?r=r[s].node:r=r[s]}),r!==null&&(n===void 0||typeof n=="number"&&isNaN(n)?typeof t.last()=="number"?r.splice(t.last(),1):delete r[t.last()]:this.wrapLists&&typeof t.last()=="number"?r[t.last()]={node:n,id:(0,qo.hexId)()}:r[t.last()]=n,!i&&(this.verbose&&console.log("Set",t.toString(),JSON.stringify(n)),this.validate(!0),this.invalidate()))}undo(){this.historyIndex>0&&(this.historyIndex-=1,this.data=JSON.parse(this.history[this.historyIndex]),this.validate(!1),this.silentInvalidate())}redo(){this.historyIndex<this.history.length-1&&(this.historyIndex+=1,this.data=JSON.parse(this.history[this.historyIndex]),this.validate(!1),this.silentInvalidate())}validate(t){var n;const i=new Gg.Path().withModel(this);this.errors.clear(),this.data=(n=this.schema.validate(i,this.data,this.errors,{loose:t,wrapLists:this.wrapLists}))!==null&&n!==void 0?n:{}}error(t,n,...i){const r=new Kc.Errors;r.add(t,n,i),this.listeners.forEach(s=>{s.errors&&s.errors(r)})}static wrapLists(t){if(Array.isArray(t)){const n=t.map(i=>({node:this.wrapLists(i),id:(0,qo.hexId)()}));for(const i of Object.getOwnPropertySymbols(t))n[i]=t[i];return n}else if(typeof t=="object"&&t!==null){const n={};Object.entries(t).map(([i,r])=>{n[i]=this.wrapLists(r)});for(const i of Object.getOwnPropertySymbols(t))n[i]=t[i];return n}else return t}static unwrapLists(t){if(Array.isArray(t)){const n=t.map(i=>this.unwrapLists(i.node));for(const i of Object.getOwnPropertySymbols(t))n[i]=t[i];return n}else if(typeof t=="object"&&t!==null){const n={};Object.entries(t).map(([i,r])=>{n[i]=this.unwrapLists(r)});for(const i of Object.getOwnPropertySymbols(t))n[i]=t[i];return n}else return t}}bn.DataModel=Rl;var Un={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Keep=e.Opt=e.Has=e.Mod=e.Base=void 0,e.Base={type:()=>"base",category:()=>{},default:()=>{},enabled:()=>!0,keep:()=>!1,optional:()=>!1,navigate(){return this},pathPush:s=>s,suggest:()=>[],validate:(s,u)=>u,validationOption:()=>{},hook(s,u,...o){return s.base({node:this},u,...o)},canUpdate:()=>!1,update:()=>[]};const t=(s,u)=>Ce(Ce({},s),typeof u=="function"?u(s):u);e.Mod=t;const n=(s,u)=>(0,e.Mod)(u,{enabled:o=>o.push(s).get()!==void 0});e.Has=n;function i(s){return tt(Ce({},s),{optional:()=>!0})}e.Opt=i;function r(s){return tt(Ce({},s),{keep:()=>!0})}e.Keep=r})(Un);var Co={};Object.defineProperty(Co,"__esModule",{value:!0});Co.BooleanNode=void 0;const Kg=bn,Xg=Un,Jg=()=>tt(Ce({},Xg.Base),{type:()=>"boolean",default:()=>!1,suggest:()=>["false","true"],validate(e,t,n,i){return i.loose&&typeof t!="boolean"&&(t=i.wrapLists?Kg.DataModel.wrapLists(this.default()):this.default()),(typeof t!="boolean"||t===void 0)&&n.add(e,"error.expected_boolean"),t},hook(e,t,...n){var i;return((i=e.boolean)!==null&&i!==void 0?i:e.base).call(e,{node:this},t,...n)}});Co.BooleanNode=Jg;var ed={},gs={};Object.defineProperty(gs,"__esModule",{value:!0});gs.ListNode=void 0;const Yg=bn,Zg=Un,qg=(e,t)=>{var n,i;const r=(n=t==null?void 0:t.minLength)!==null&&n!==void 0?n:0,s=(i=t==null?void 0:t.maxLength)!==null&&i!==void 0?i:1/0,u=(t==null?void 0:t.minLength)&&(t==null?void 0:t.maxLength);return tt(Ce({},Zg.Base),{type:()=>"list",default:()=>t!=null&&t.minLength?[...Array(r)].map(o=>e.default()):[],navigate(o,c){const a=c+1;return o.getArray().length<=a?this:e.navigate(o,a)},pathPush(o,c){return o.push(parseInt(c.toString())).contextPush("entry")},validate(o,c,a,f){if(f.loose&&!Array.isArray(c)&&(c=f.wrapLists?Yg.DataModel.wrapLists(this.default()):this.default()),Array.isArray(c))u&&(c.length<r||c.length>s)?r===s?a.add(o,"error.invalid_list_range.exact",c.length,r):a.add(o,"error.invalid_list_range.between",c.length,r,s):c.length<r?a.add(o,"error.invalid_list_range.smaller",c.length,r):c.length>s&&a.add(o,"error.invalid_list_range.larger",c.length,s);else return a.add(o,"error.expected_list"),c;const l=c.map((h,d)=>{const g=e.validate(o.push(d),f.wrapLists?h.node:h,a,f);return f.wrapLists?{node:g,id:h.id}:g});for(const h of Object.getOwnPropertySymbols(c))l[h]=c[h];return l},hook(o,c,...a){var f;return((f=o.list)!==null&&f!==void 0?f:o.base).call(o,{node:this,children:e,config:t!=null?t:{}},c,...a)}})};gs.ListNode=qg;var ms={};Object.defineProperty(ms,"__esModule",{value:!0});ms.SwitchNode=void 0;const Qg=Un,em=e=>tt(Ce({},Qg.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 i;const r=n+1;return(i=this.activeCase(t.slice(0,r)))===null||i===void 0?void 0:i.node.navigate(t,n)},pathPush(t,n){var i,r;return(r=(i=this.activeCase(t))===null||i===void 0?void 0:i.node.pathPush(t,n))!==null&&r!==void 0?r:t},suggest(t,n){var i,r;return(r=(i=this.activeCase(t))===null||i===void 0?void 0:i.node.suggest(t,n))!==null&&r!==void 0?r:e.filter(s=>s.match(t)).map(s=>s.node.suggest(t,n)).reduce((s,u)=>s.concat(u))},validate(t,n,i,r){let s=this.activeCase(t);return s===void 0?n:s.node.validate(t,n,i,r)},validationOption(t){var n;return(n=this.activeCase(t))===null||n===void 0?void 0:n.node.validationOption(t)},activeCase(t,n){const i=(s,u)=>{var o,c;return((o=u.priority)!==null&&o!==void 0?o:0)-((c=s.priority)!==null&&c!==void 0?c:0)},r=e.filter(s=>s.match(t)).sort(i);return n&&r.length===0?e.sort(i)[0]:r.length>0?r[0]:void 0},hook(t,n,...i){return this.activeCase(n,!0).node.hook(t,n,...i)}});ms.SwitchNode=em;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectOrPreset=e.StringOrList=e.ObjectOrList=e.ChoiceNode=void 0;const t=gs,n=ms,i=(u,o)=>{const c=(f,l)=>{if(f.match)return f.match(l);switch(f.type){case"list":return Array.isArray(l);case"object":return typeof l=="object"&&!Array.isArray(l);default:return typeof l===f.type}},a=(0,n.SwitchNode)(u.map(f=>({type:f.type,priority:f.priority,match:l=>c(f,l.get()),node:f.node})));return tt(Ce({},a),{validate(f,l,h,d){let g=a.activeCase(f,!0);return g.node.optional()?l:g.node.validate(f,l,h,d)},hook(f,l,...h){var d;return((d=f.choice)!==null&&d!==void 0?d:f.base).call(f,{node:this,choices:u,config:o!=null?o:{},switchNode:a},l,...h)}})};e.ChoiceNode=i;const r=u=>(o,c)=>(0,e.ChoiceNode)([{type:u,node:o,change:a=>{var f;return(f=a[0])!==null&&f!==void 0?f:o.default()}},{type:"list",node:(0,t.ListNode)(o),change:a=>a?[a]:[]}],c);e.ObjectOrList=r("object"),e.StringOrList=r("string");const s=(u,o,c)=>(0,e.ChoiceNode)([{type:"string",priority:1,node:u,change:a=>Object.keys(c)[0]},{type:"object",node:o,change:a=>{var f;return(f=c[a])!==null&&f!==void 0?f:c[Object.keys(c)[0]]}}]);e.ObjectOrPreset=s})(ed);var Fo={};Object.defineProperty(Fo,"__esModule",{value:!0});Fo.MapNode=void 0;const tm=Un,nm=bn,im=(e,t,n)=>tt(Ce({},tm.Base),{type:()=>"map",default:()=>({}),navigate(i,r){const s=r+1;return i.getArray().length<=s?this:t.navigate(i,s)},pathPush(i,r){return i.modelPush(r)},suggest:i=>e.suggest(i,""),validate(i,r,s,u){if(u.loose&&typeof r!="object"&&(r=u.wrapLists?nm.DataModel.wrapLists(this.default()):this.default()),r===null||typeof r!="object")return s.add(i,"error.expected_object"),r;const o={};Object.keys(r).forEach(c=>{e.validate(i,c,s,u),o[c]=t.validate(i.push(c),r[c],s,u)});for(const c of Object.getOwnPropertySymbols(r))o[c]=r[c];return o},validationOption(i){var r;return(r=n==null?void 0:n.validation)!==null&&r!==void 0?r:e.validationOption(i.push(""))},hook(i,r,...s){var u;return((u=i.map)!==null&&u!==void 0?u:i.base).call(i,{node:this,keys:e,children:t,config:n!=null?n:{}},r,...s)}});Fo.MapNode=im;var td={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberEnum=e.NumberNode=void 0;const t=ae,n=bn,i=Un,r=u=>{var o,c,a;const f=u!=null&&u.color?!0:(o=u==null?void 0:u.integer)!==null&&o!==void 0?o:!1,l=u!=null&&u.color?0:(c=u==null?void 0:u.min)!==null&&c!==void 0?c:-1/0,h=u!=null&&u.color?16777215:(a=u==null?void 0:u.max)!==null&&a!==void 0?a:1/0,d=(u==null?void 0:u.min)!==void 0&&(u==null?void 0:u.max)!==void 0;return tt(Ce({},i.Base),{type:()=>"number",default:()=>l>0?l:0,validate(g,p,m,w){return w.loose&&typeof p!="number"&&(p=w.wrapLists?n.DataModel.wrapLists(this.default()):this.default()),typeof p!="number"?m.add(g,"error.expected_number"):f&&!Number.isInteger(p)?m.add(g,"error.expected_integer"):d&&(p<l||p>h)?m.add(g,"error.invalid_number_range.between",p,l,h):p<l?m.add(g,"error.invalid_number_range.smaller",p,l):p>h&&m.add(g,"error.invalid_number_range.larger",p,h),p},hook(g,p,...m){var w;return((w=g.number)!==null&&w!==void 0?w:g.base).call(g,{node:this,integer:f,min:l,max:h,between:d,config:u!=null?u:{}},p,...m)}})};e.NumberNode=r;const s=({integer:u,values:o})=>(0,t.Mod)((0,e.NumberNode)({integer:u}),c=>({validate:(a,f,l,h)=>(f=c.validate(a,f,l,h),o.includes(f)||l.add(a,"error.invalid_number_enum",o.join(", ")),f)}));e.NumberEnum=s})(td);var nd={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectNode=e.Case=e.Switch=void 0;const t=Un,n=An,i=gr,r=yn,s=bn;e.Switch=Symbol("switch"),e.Case=Symbol("case");const u=(o,c)=>{var g,p;const m=o,{[g=e.Switch]:a,[p=e.Case]:f}=m,l=Mc(m,[Zo(g),Zo(p)]),h=w=>{if(a===void 0)return l;const v=(0,n.relativePath)(w,a).get(),A=f[v];return Ce(Ce({},l),A)},d=(w,v)=>{var A;const _=a?(0,n.relativePath)(w,a).get():void 0,E=a?(A=f[_])!==null&&A!==void 0?A:{}:{},b=Object.keys(E),x=c!=null&&c.context?new n.ModelPath(w.getModel(),new n.Path(w.getArray(),[c.context])):w;return(!(c!=null&&c.disableSwitchContext)&&_&&b.includes(v)?x.contextPush(_):x).push(v)};return tt(Ce({},t.Base),{type:()=>"object",category:()=>c==null?void 0:c.category,default:()=>({}),keep(){return this.optional()},navigate(w,v){const A=v+1,_=w.getArray();if(_.length<=A)return this;const b=h(w.slice(0,A))[_[A]];return b==null?void 0:b.navigate(w,A)},pathPush(w,v){return d(w,v.toString())},suggest(w,v){const A=h(w),_=Object.keys(typeof v=="object"?v:{});return Object.keys(A).filter(E=>A[E].enabled(w)).filter(E=>!_.includes(E)).map(r.quoteString)},validate(w,v,A,_){if(_.loose&&typeof v!="object"&&(v=_.wrapLists?s.DataModel.wrapLists(this.default()):this.default()),typeof v!="object"||v===null)return A.add(w,"error.expected_object"),v;let E=l;if(a){const B=(0,n.relativePath)(w,a);let T=B.get();if(w.equals(B.pop())){const M=B.last();T=l[M].validate(w.push(M),v[M],new i.Errors,_)}E=Ce(Ce({},E),f[T])}const b=Object.keys(E),x=b.filter(B=>!E[B].optional()),y=new Set([...x,...Object.keys(v)]),C={};y.forEach(B=>{if(b.includes(B)){if(!E[B].enabled(w))return;const T=E[B].validate(w.push(B),v[B],A,_);!E[B].keep()&&E[B].optional()&&(T===void 0||Array.isArray(T)&&T.length===0||T.constructor===Object&&Object.keys(T).length===0)?delete C[B]:(C[B]=T,w.getModel().set(w.push(B),T,!0))}else C[B]=v[B]});for(const B of Object.getOwnPropertySymbols(v))C[B]=v[B];return C},hook(w,v,...A){var _;return((_=w.object)!==null&&_!==void 0?_:w.base).call(w,{node:this,fields:l,config:c!=null?c:{},filter:a,cases:f,getActiveFields:h,getChildModelPath:d},v,...A)}})};e.ObjectNode=u})(nd);var So={};Object.defineProperty(So,"__esModule",{value:!0});So.Reference=void 0;const rm=(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,i){return e.get(t).transform(n,i)},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,i){return e.get(t).navigate.bind(this)(n,i)},pathPush(n,i){return e.get(t).pathPush.bind(this)(n,i)},suggest(n,i){return e.get(t).suggest.bind(this)(n,i)},validate(n,i,r,s){return e.get(t).validate.bind(this)(n,i,r,s)},validationOption(n){return e.get(t).validationOption.bind(this)(n)},hook(n,i,...r){return e.get(t).hook.bind(this)(n,i,...r)},activeCase(n,i){return e.get(t).activeCase.bind(this)(n,i)},canUpdate(n,i){return e.get(t).canUpdate.bind(this)(n,i)},update(n,i){return e.get(t).update.bind(this)(n,i)}});So.Reference=rm;var Do={};Object.defineProperty(Do,"__esModule",{value:!0});Do.StringNode=void 0;const sm=Un,om=yn,am=bn,Xc=e=>!!(e!=null&&e.enum),Jc=e=>!!(e!=null&&e.validator),lm=(e,t)=>{const n=()=>{var i,r,s,u;if(Xc(t))return typeof t.enum=="string"?(i=e==null?void 0:e.get(t.enum))!==null&&i!==void 0?i:[]:t.enum;if((t==null?void 0:t.validator)==="resource"){if(typeof t.params.pool=="string"){if(t.params.requireTag)return(r=e==null?void 0:e.get(`tag/${t.params.pool}`).map(c=>`#${c}`))!==null&&r!==void 0?r:[];const o=t.params.pool.replace(/^\$/,"");return[...t.params.allowTag?(s=e==null?void 0:e.get(`tag/${o}`).map(c=>`#${c}`))!==null&&s!==void 0?s:[]:[],...(u=e==null?void 0:e.get(o))!==null&&u!==void 0?u:[]]}return t.params.pool}return[]};return tt(Ce({},sm.Base),{type:()=>"string",default:()=>"",validate(i,r,s,u){if(u.loose&&typeof r!="string"&&(r=(u.wrapLists?am.DataModel.wrapLists(this.default()):this.default())||void 0),typeof r!="string")return s.add(i,"error.expected_string"),r;if(Jc(t)){if(t.validator==="resource"&&r.length>0&&!r.includes(":")&&(r=r.startsWith("#")?"#minecraft:"+r.slice(1):"minecraft:"+r),t.validator==="resource"&&typeof r=="string"){let c=r;if(r.startsWith("#")){if(typeof t.params.pool=="string"&&t.params.pool.startsWith("$tag/"))return s.add(i,"error.disallowed_tag_prefix"),r;if(!t.params.allowTag&&!t.params.requireTag)return s.add(i,"error.disallowed_tag"),r;c=c.slice(1)}else if(t.params.requireTag)return s.add(i,"error.expected_tag"),r;if(!c.match(/^(?:[_\-a-z0-9.]*:)?[_\-a-z0-9/.]*$/g))return s.add(i,"error.invalid_resource_location"),r}if(t.validator==="resource"&&(typeof t.params.pool=="string"&&t.params.pool.startsWith("$")||(t.params.allowTag||t.params.requireTag)&&r.startsWith("#")||t.params.isDefinition||t.params.allowUnknown))return r}if(Xc(t)&&t.additional)return r;const o=n();return o.length>0&&!o.includes(r)&&s.add(i,"error.invalid_enum_option",r),r},suggest:()=>n().map(om.quoteString),validationOption(){return Jc(t)?t:void 0},hook(i,r,...s){var u;return((u=i.string)!==null&&u!==void 0?u:i.base).call(i,{node:this,getValues:n,config:t},r,...s)}})};Do.StringNode=lm;var id={};Object.defineProperty(id,"__esModule",{value:!0});var nr={};Object.defineProperty(nr,"__esModule",{value:!0});nr.CollectionRegistry=nr.SchemaRegistry=void 0;class cm{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}}nr.SchemaRegistry=cm;class um{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:[]}}nr.CollectionRegistry=um;var rd={};Object.defineProperty(rd,"__esModule",{value:!0});(function(e){var t=tn&&tn.__createBinding||(Object.create?function(i,r,s,u){u===void 0&&(u=s);var o=Object.getOwnPropertyDescriptor(r,s);(!o||("get"in o?!r.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return r[s]}}),Object.defineProperty(i,u,o)}:function(i,r,s,u){u===void 0&&(u=s),i[u]=r[s]}),n=tn&&tn.__exportStar||function(i,r){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(r,s)&&t(r,i,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(bn,e),n(An,e),n(gr,e),n(Un,e),n(Co,e),n(ed,e),n(gs,e),n(Fo,e),n(td,e),n(nd,e),n(So,e),n(Do,e),n(ms,e),n(id,e),n(nr,e),n(rd,e)})(ae);var at={},vs={},Zt={};function sd(e){return typeof e=="undefined"||e===null}function hm(e){return typeof e=="object"&&e!==null}function fm(e){return Array.isArray(e)?e:sd(e)?[]:[e]}function dm(e,t){var n,i,r,s;if(t)for(s=Object.keys(t),n=0,i=s.length;n<i;n+=1)r=s[n],e[r]=t[r];return e}function pm(e,t){var n="",i;for(i=0;i<t;i+=1)n+=e;return n}function gm(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}Zt.isNothing=sd;Zt.isObject=hm;Zt.toArray=fm;Zt.repeat=pm;Zt.isNegativeZero=gm;Zt.extend=dm;function Wr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Wr.prototype=Object.create(Error.prototype);Wr.prototype.constructor=Wr;Wr.prototype.toString=function(t){var n=this.name+": ";return n+=this.reason||"(unknown reason)",!t&&this.mark&&(n+=" "+this.mark.toString()),n};var ws=Wr,Yc=Zt;function Il(e,t,n,i,r){this.name=e,this.buffer=t,this.position=n,this.line=i,this.column=r}Il.prototype.getSnippet=function(t,n){var i,r,s,u,o;if(!this.buffer)return null;for(t=t||4,n=n||75,i="",r=this.position;r>0&&`\0\r
|
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(r-1))===-1;)if(r-=1,this.position-r>n/2-1){i=" ... ",r+=5;break}for(s="",u=this.position;u<this.buffer.length&&`\0\r
|
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(u))===-1;)if(u+=1,u-this.position>n/2-1){s=" ... ",u-=5;break}return o=this.buffer.slice(r,u),Yc.repeat(" ",t)+i+o+s+`
|
|
`+Yc.repeat(" ",t+this.position-r+i.length)+"^"};Il.prototype.toString=function(t){var n,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),t||(n=this.getSnippet(),n&&(i+=`:
|
|
`+n)),i};var mm=Il,Zc=ws,vm=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],wm=["scalar","sequence","mapping"];function _m(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(i){t[String(i)]=n})}),t}function Am(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(vm.indexOf(n)===-1)throw new Zc('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=_m(t.styleAliases||null),wm.indexOf(this.kind)===-1)throw new Zc('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var yt=Am,qc=Zt,Hs=ws,ym=yt;function Ka(e,t,n){var i=[];return e.include.forEach(function(r){n=Ka(r,t,n)}),e[t].forEach(function(r){n.forEach(function(s,u){s.tag===r.tag&&s.kind===r.kind&&i.push(u)}),n.push(r)}),n.filter(function(r,s){return i.indexOf(s)===-1})}function Em(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},t,n;function i(r){e[r.kind][r.tag]=e.fallback[r.tag]=r}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(i);return e}function ji(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&t.loadKind!=="scalar")throw new Hs("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=Ka(this,"implicit",[]),this.compiledExplicit=Ka(this,"explicit",[]),this.compiledTypeMap=Em(this.compiledImplicit,this.compiledExplicit)}ji.DEFAULT=null;ji.create=function(){var t,n;switch(arguments.length){case 1:t=ji.DEFAULT,n=arguments[0];break;case 2:t=arguments[0],n=arguments[1];break;default:throw new Hs("Wrong number of arguments for Schema.create function")}if(t=qc.toArray(t),n=qc.toArray(n),!t.every(function(i){return i instanceof ji}))throw new Hs("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!n.every(function(i){return i instanceof ym}))throw new Hs("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new ji({include:t,explicit:n})};var mr=ji,bm=yt,xm=new bm("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Cm=yt,Fm=new Cm("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Sm=yt,Dm=new Sm("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),km=mr,Ol=new km({explicit:[xm,Fm,Dm]}),Bm=yt;function Tm(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Lm(){return null}function $m(e){return e===null}var Mm=new Bm("tag:yaml.org,2002:null",{kind:"scalar",resolve:Tm,construct:Lm,predicate:$m,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"}),Rm=yt;function Im(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function Om(e){return e==="true"||e==="True"||e==="TRUE"}function Nm(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Pm=new Rm("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Im,construct:Om,predicate:Nm,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"}),zm=Zt,Um=yt;function Hm(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function jm(e){return 48<=e&&e<=55}function Wm(e){return 48<=e&&e<=57}function Vm(e){if(e===null)return!1;var t=e.length,n=0,i=!1,r;if(!t)return!1;if(r=e[n],(r==="-"||r==="+")&&(r=e[++n]),r==="0"){if(n+1===t)return!0;if(r=e[++n],r==="b"){for(n++;n<t;n++)if(r=e[n],r!=="_"){if(r!=="0"&&r!=="1")return!1;i=!0}return i&&r!=="_"}if(r==="x"){for(n++;n<t;n++)if(r=e[n],r!=="_"){if(!Hm(e.charCodeAt(n)))return!1;i=!0}return i&&r!=="_"}for(;n<t;n++)if(r=e[n],r!=="_"){if(!jm(e.charCodeAt(n)))return!1;i=!0}return i&&r!=="_"}if(r==="_")return!1;for(;n<t;n++)if(r=e[n],r!=="_"){if(r===":")break;if(!Wm(e.charCodeAt(n)))return!1;i=!0}return!i||r==="_"?!1:r!==":"?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(n))}function Gm(e){var t=e,n=1,i,r,s=[];return t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(n=-1),t=t.slice(1),i=t[0]),t==="0"?0:i==="0"?t[1]==="b"?n*parseInt(t.slice(2),2):t[1]==="x"?n*parseInt(t,16):n*parseInt(t,8):t.indexOf(":")!==-1?(t.split(":").forEach(function(u){s.unshift(parseInt(u,10))}),t=0,r=1,s.forEach(function(u){t+=u*r,r*=60}),n*t):n*parseInt(t,10)}function Km(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!zm.isNegativeZero(e)}var Xm=new Um("tag:yaml.org,2002:int",{kind:"scalar",resolve:Vm,construct:Gm,predicate:Km,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),od=Zt,Jm=yt,Ym=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 Zm(e){return!(e===null||!Ym.test(e)||e[e.length-1]==="_")}function qm(e){var t,n,i,r;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,r=[],"+-".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){r.unshift(parseFloat(s,10))}),t=0,i=1,r.forEach(function(s){t+=s*i,i*=60}),n*t):n*parseFloat(t,10)}var Qm=/^[-+]?[0-9]+e/;function e1(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(od.isNegativeZero(e))return"-0.0";return n=e.toString(10),Qm.test(n)?n.replace("e",".e"):n}function t1(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||od.isNegativeZero(e))}var n1=new Jm("tag:yaml.org,2002:float",{kind:"scalar",resolve:Zm,construct:qm,predicate:t1,represent:e1,defaultStyle:"lowercase"}),i1=mr,ad=new i1({include:[Ol],implicit:[Mm,Pm,Xm,n1]}),r1=mr,ld=new r1({include:[ad]}),s1=yt,cd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ud=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 o1(e){return e===null?!1:cd.exec(e)!==null||ud.exec(e)!==null}function a1(e){var t,n,i,r,s,u,o,c=0,a=null,f,l,h;if(t=cd.exec(e),t===null&&(t=ud.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r));if(s=+t[4],u=+t[5],o=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(f=+t[10],l=+(t[11]||0),a=(f*60+l)*6e4,t[9]==="-"&&(a=-a)),h=new Date(Date.UTC(n,i,r,s,u,o,c)),a&&h.setTime(h.getTime()-a),h}function l1(e){return e.toISOString()}var c1=new s1("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:o1,construct:a1,instanceOf:Date,represent:l1}),u1=yt;function h1(e){return e==="<<"||e===null}var f1=new u1("tag:yaml.org,2002:merge",{kind:"scalar",resolve:h1}),fi;try{var d1=qf;fi=d1("buffer").Buffer}catch{}var p1=yt,Nl=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
\r`;function g1(e){if(e===null)return!1;var t,n,i=0,r=e.length,s=Nl;for(n=0;n<r;n++)if(t=s.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}function m1(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,s=Nl,u=0,o=[];for(t=0;t<r;t++)t%4===0&&t&&(o.push(u>>16&255),o.push(u>>8&255),o.push(u&255)),u=u<<6|s.indexOf(i.charAt(t));return n=r%4*6,n===0?(o.push(u>>16&255),o.push(u>>8&255),o.push(u&255)):n===18?(o.push(u>>10&255),o.push(u>>2&255)):n===12&&o.push(u>>4&255),fi?fi.from?fi.from(o):new fi(o):o}function v1(e){var t="",n=0,i,r,s=e.length,u=Nl;for(i=0;i<s;i++)i%3===0&&i&&(t+=u[n>>18&63],t+=u[n>>12&63],t+=u[n>>6&63],t+=u[n&63]),n=(n<<8)+e[i];return r=s%3,r===0?(t+=u[n>>18&63],t+=u[n>>12&63],t+=u[n>>6&63],t+=u[n&63]):r===2?(t+=u[n>>10&63],t+=u[n>>4&63],t+=u[n<<2&63],t+=u[64]):r===1&&(t+=u[n>>2&63],t+=u[n<<4&63],t+=u[64],t+=u[64]),t}function w1(e){return fi&&fi.isBuffer(e)}var _1=new p1("tag:yaml.org,2002:binary",{kind:"scalar",resolve:g1,construct:m1,predicate:w1,represent:v1}),A1=yt,y1=Object.prototype.hasOwnProperty,E1=Object.prototype.toString;function b1(e){if(e===null)return!0;var t=[],n,i,r,s,u,o=e;for(n=0,i=o.length;n<i;n+=1){if(r=o[n],u=!1,E1.call(r)!=="[object Object]")return!1;for(s in r)if(y1.call(r,s))if(!u)u=!0;else return!1;if(!u)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function x1(e){return e!==null?e:[]}var C1=new A1("tag:yaml.org,2002:omap",{kind:"sequence",resolve:b1,construct:x1}),F1=yt,S1=Object.prototype.toString;function D1(e){if(e===null)return!0;var t,n,i,r,s,u=e;for(s=new Array(u.length),t=0,n=u.length;t<n;t+=1){if(i=u[t],S1.call(i)!=="[object Object]"||(r=Object.keys(i),r.length!==1))return!1;s[t]=[r[0],i[r[0]]]}return!0}function k1(e){if(e===null)return[];var t,n,i,r,s,u=e;for(s=new Array(u.length),t=0,n=u.length;t<n;t+=1)i=u[t],r=Object.keys(i),s[t]=[r[0],i[r[0]]];return s}var B1=new F1("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:D1,construct:k1}),T1=yt,L1=Object.prototype.hasOwnProperty;function $1(e){if(e===null)return!0;var t,n=e;for(t in n)if(L1.call(n,t)&&n[t]!==null)return!1;return!0}function M1(e){return e!==null?e:{}}var R1=new T1("tag:yaml.org,2002:set",{kind:"mapping",resolve:$1,construct:M1}),I1=mr,_s=new I1({include:[ld],implicit:[c1,f1],explicit:[_1,C1,B1,R1]}),O1=yt;function N1(){return!0}function P1(){}function z1(){return""}function U1(e){return typeof e=="undefined"}var H1=new O1("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:N1,construct:P1,predicate:U1,represent:z1}),j1=yt;function W1(e){if(e===null||e.length===0)return!1;var t=e,n=/\/([gim]*)$/.exec(e),i="";return!(t[0]==="/"&&(n&&(i=n[1]),i.length>3||t[t.length-i.length-1]!=="/"))}function V1(e){var t=e,n=/\/([gim]*)$/.exec(e),i="";return t[0]==="/"&&(n&&(i=n[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)}function G1(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function K1(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var X1=new j1("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:W1,construct:V1,predicate:K1,represent:G1}),ao;try{var J1=qf;ao=J1("esprima")}catch{typeof window!="undefined"&&(ao=window.esprima)}var Y1=yt;function Z1(e){if(e===null)return!1;try{var t="("+e+")",n=ao.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 q1(e){var t="("+e+")",n=ao.parse(t,{range:!0}),i=[],r;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){i.push(s.name)}),r=n.body[0].expression.body.range,n.body[0].expression.body.type==="BlockStatement"?new Function(i,t.slice(r[0]+1,r[1]-1)):new Function(i,"return "+t.slice(r[0],r[1]))}function Q1(e){return e.toString()}function ev(e){return Object.prototype.toString.call(e)==="[object Function]"}var tv=new Y1("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:Z1,construct:q1,predicate:ev,represent:Q1}),Qc=mr,ko=Qc.DEFAULT=new Qc({include:[_s],explicit:[H1,X1,tv]}),$n=Zt,hd=ws,nv=mm,fd=_s,iv=ko,si=Object.prototype.hasOwnProperty,lo=1,dd=2,pd=3,co=4,Qo=1,rv=2,eu=3,sv=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ov=/[\x85\u2028\u2029]/,av=/[,\[\]\{\}]/,gd=/^(?:!|!!|![a-z\-]+!)$/i,md=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function tu(e){return Object.prototype.toString.call(e)}function En(e){return e===10||e===13}function mi(e){return e===9||e===32}function Lt(e){return e===9||e===32||e===10||e===13}function Wi(e){return e===44||e===91||e===93||e===123||e===125}function lv(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function cv(e){return e===120?2:e===117?4:e===85?8:0}function uv(e){return 48<=e&&e<=57?e-48:-1}function nu(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 hv(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var vd=new Array(256),wd=new Array(256);for(var Ti=0;Ti<256;Ti++)vd[Ti]=nu(Ti)?1:0,wd[Ti]=nu(Ti);function fv(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||iv,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 _d(e,t){return new hd(t,new nv(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function be(e,t){throw _d(e,t)}function uo(e,t){e.onWarning&&e.onWarning.call(null,_d(e,t))}var iu={YAML:function(t,n,i){var r,s,u;t.version!==null&&be(t,"duplication of %YAML directive"),i.length!==1&&be(t,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),r===null&&be(t,"ill-formed argument of the YAML directive"),s=parseInt(r[1],10),u=parseInt(r[2],10),s!==1&&be(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=u<2,u!==1&&u!==2&&uo(t,"unsupported YAML version of the document")},TAG:function(t,n,i){var r,s;i.length!==2&&be(t,"TAG directive accepts exactly two arguments"),r=i[0],s=i[1],gd.test(r)||be(t,"ill-formed tag handle (first argument) of the TAG directive"),si.call(t.tagMap,r)&&be(t,'there is a previously declared suffix for "'+r+'" tag handle'),md.test(s)||be(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[r]=s}};function Qn(e,t,n,i){var r,s,u,o;if(t<n){if(o=e.input.slice(t,n),i)for(r=0,s=o.length;r<s;r+=1)u=o.charCodeAt(r),u===9||32<=u&&u<=1114111||be(e,"expected valid JSON character");else sv.test(o)&&be(e,"the stream contains non-printable characters");e.result+=o}}function ru(e,t,n,i){var r,s,u,o;for($n.isObject(n)||be(e,"cannot merge mappings; the provided source object is unacceptable"),r=Object.keys(n),u=0,o=r.length;u<o;u+=1)s=r[u],si.call(t,s)||(t[s]=n[s],i[s]=!0)}function Vi(e,t,n,i,r,s,u,o){var c,a;if(Array.isArray(r))for(r=Array.prototype.slice.call(r),c=0,a=r.length;c<a;c+=1)Array.isArray(r[c])&&be(e,"nested arrays are not supported inside keys"),typeof r=="object"&&tu(r[c])==="[object Object]"&&(r[c]="[object Object]");if(typeof r=="object"&&tu(r)==="[object Object]"&&(r="[object Object]"),r=String(r),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(c=0,a=s.length;c<a;c+=1)ru(e,t,s[c],n);else ru(e,t,s,n);else!e.json&&!si.call(n,r)&&si.call(t,r)&&(e.line=u||e.line,e.position=o||e.position,be(e,"duplicated mapping key")),t[r]=s,delete n[r];return t}function Pl(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):be(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function ft(e,t,n){for(var i=0,r=e.input.charCodeAt(e.position);r!==0;){for(;mi(r);)r=e.input.charCodeAt(++e.position);if(t&&r===35)do r=e.input.charCodeAt(++e.position);while(r!==10&&r!==13&&r!==0);if(En(r))for(Pl(e),r=e.input.charCodeAt(e.position),i++,e.lineIndent=0;r===32;)e.lineIndent++,r=e.input.charCodeAt(++e.position);else break}return n!==-1&&i!==0&&e.lineIndent<n&&uo(e,"deficient indentation"),i}function Bo(e){var t=e.position,n;return n=e.input.charCodeAt(t),!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||Lt(n)))}function zl(e,t){t===1?e.result+=" ":t>1&&(e.result+=$n.repeat(`
|
|
`,t-1))}function dv(e,t,n){var i,r,s,u,o,c,a,f,l=e.kind,h=e.result,d;if(d=e.input.charCodeAt(e.position),Lt(d)||Wi(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(r=e.input.charCodeAt(e.position+1),Lt(r)||n&&Wi(r)))return!1;for(e.kind="scalar",e.result="",s=u=e.position,o=!1;d!==0;){if(d===58){if(r=e.input.charCodeAt(e.position+1),Lt(r)||n&&Wi(r))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),Lt(i))break}else{if(e.position===e.lineStart&&Bo(e)||n&&Wi(d))break;if(En(d))if(c=e.line,a=e.lineStart,f=e.lineIndent,ft(e,!1,-1),e.lineIndent>=t){o=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=u,e.line=c,e.lineStart=a,e.lineIndent=f;break}}o&&(Qn(e,s,u,!1),zl(e,e.line-c),s=u=e.position,o=!1),mi(d)||(u=e.position+1),d=e.input.charCodeAt(++e.position)}return Qn(e,s,u,!1),e.result?!0:(e.kind=l,e.result=h,!1)}function pv(e,t){var n,i,r;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=r=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(Qn(e,i,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)i=e.position,e.position++,r=e.position;else return!0;else En(n)?(Qn(e,i,r,!0),zl(e,ft(e,!1,t)),i=r=e.position):e.position===e.lineStart&&Bo(e)?be(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);be(e,"unexpected end of the stream within a single quoted scalar")}function gv(e,t){var n,i,r,s,u,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return Qn(e,n,e.position,!0),e.position++,!0;if(o===92){if(Qn(e,n,e.position,!0),o=e.input.charCodeAt(++e.position),En(o))ft(e,!1,t);else if(o<256&&vd[o])e.result+=wd[o],e.position++;else if((u=cv(o))>0){for(r=u,s=0;r>0;r--)o=e.input.charCodeAt(++e.position),(u=lv(o))>=0?s=(s<<4)+u:be(e,"expected hexadecimal character");e.result+=hv(s),e.position++}else be(e,"unknown escape sequence");n=i=e.position}else En(o)?(Qn(e,n,i,!0),zl(e,ft(e,!1,t)),n=i=e.position):e.position===e.lineStart&&Bo(e)?be(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}be(e,"unexpected end of the stream within a double quoted scalar")}function mv(e,t){var n=!0,i,r=e.tag,s,u=e.anchor,o,c,a,f,l,h={},d,g,p,m;if(m=e.input.charCodeAt(e.position),m===91)c=93,l=!1,s=[];else if(m===123)c=125,l=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),m=e.input.charCodeAt(++e.position);m!==0;){if(ft(e,!0,t),m=e.input.charCodeAt(e.position),m===c)return e.position++,e.tag=r,e.anchor=u,e.kind=l?"mapping":"sequence",e.result=s,!0;n||be(e,"missed comma between flow collection entries"),g=d=p=null,a=f=!1,m===63&&(o=e.input.charCodeAt(e.position+1),Lt(o)&&(a=f=!0,e.position++,ft(e,!0,t))),i=e.line,ir(e,t,lo,!1,!0),g=e.tag,d=e.result,ft(e,!0,t),m=e.input.charCodeAt(e.position),(f||e.line===i)&&m===58&&(a=!0,m=e.input.charCodeAt(++e.position),ft(e,!0,t),ir(e,t,lo,!1,!0),p=e.result),l?Vi(e,s,h,g,d,p):a?s.push(Vi(e,null,h,g,d,p)):s.push(d),ft(e,!0,t),m=e.input.charCodeAt(e.position),m===44?(n=!0,m=e.input.charCodeAt(++e.position)):n=!1}be(e,"unexpected end of the stream within a flow collection")}function vv(e,t){var n,i,r=Qo,s=!1,u=!1,o=t,c=0,a=!1,f,l;if(l=e.input.charCodeAt(e.position),l===124)i=!1;else if(l===62)i=!0;else return!1;for(e.kind="scalar",e.result="";l!==0;)if(l=e.input.charCodeAt(++e.position),l===43||l===45)Qo===r?r=l===43?eu:rv:be(e,"repeat of a chomping mode identifier");else if((f=uv(l))>=0)f===0?be(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?be(e,"repeat of an indentation width identifier"):(o=t+f-1,u=!0);else break;if(mi(l)){do l=e.input.charCodeAt(++e.position);while(mi(l));if(l===35)do l=e.input.charCodeAt(++e.position);while(!En(l)&&l!==0)}for(;l!==0;){for(Pl(e),e.lineIndent=0,l=e.input.charCodeAt(e.position);(!u||e.lineIndent<o)&&l===32;)e.lineIndent++,l=e.input.charCodeAt(++e.position);if(!u&&e.lineIndent>o&&(o=e.lineIndent),En(l)){c++;continue}if(e.lineIndent<o){r===eu?e.result+=$n.repeat(`
|
|
`,s?1+c:c):r===Qo&&s&&(e.result+=`
|
|
`);break}for(i?mi(l)?(a=!0,e.result+=$n.repeat(`
|
|
`,s?1+c:c)):a?(a=!1,e.result+=$n.repeat(`
|
|
`,c+1)):c===0?s&&(e.result+=" "):e.result+=$n.repeat(`
|
|
`,c):e.result+=$n.repeat(`
|
|
`,s?1+c:c),s=!0,u=!0,c=0,n=e.position;!En(l)&&l!==0;)l=e.input.charCodeAt(++e.position);Qn(e,n,e.position,!1)}return!0}function su(e,t){var n,i=e.tag,r=e.anchor,s=[],u,o=!1,c;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),c=e.input.charCodeAt(e.position);c!==0&&!(c!==45||(u=e.input.charCodeAt(e.position+1),!Lt(u)));){if(o=!0,e.position++,ft(e,!0,-1)&&e.lineIndent<=t){s.push(null),c=e.input.charCodeAt(e.position);continue}if(n=e.line,ir(e,t,pd,!1,!0),s.push(e.result),ft(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&c!==0)be(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=i,e.anchor=r,e.kind="sequence",e.result=s,!0):!1}function wv(e,t,n){var i,r,s,u,o=e.tag,c=e.anchor,a={},f={},l=null,h=null,d=null,g=!1,p=!1,m;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),m=e.input.charCodeAt(e.position);m!==0;){if(i=e.input.charCodeAt(e.position+1),s=e.line,u=e.position,(m===63||m===58)&&Lt(i))m===63?(g&&(Vi(e,a,f,l,h,null),l=h=d=null),p=!0,g=!0,r=!0):g?(g=!1,r=!0):be(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,m=i;else if(ir(e,n,dd,!1,!0))if(e.line===s){for(m=e.input.charCodeAt(e.position);mi(m);)m=e.input.charCodeAt(++e.position);if(m===58)m=e.input.charCodeAt(++e.position),Lt(m)||be(e,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(Vi(e,a,f,l,h,null),l=h=d=null),p=!0,g=!1,r=!1,l=e.tag,h=e.result;else if(p)be(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=o,e.anchor=c,!0}else if(p)be(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=o,e.anchor=c,!0;else break;if((e.line===s||e.lineIndent>t)&&(ir(e,t,co,!0,r)&&(g?h=e.result:d=e.result),g||(Vi(e,a,f,l,h,d,s,u),l=h=d=null),ft(e,!0,-1),m=e.input.charCodeAt(e.position)),e.lineIndent>t&&m!==0)be(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return g&&Vi(e,a,f,l,h,null),p&&(e.tag=o,e.anchor=c,e.kind="mapping",e.result=a),p}function _v(e){var t,n=!1,i=!1,r,s,u;if(u=e.input.charCodeAt(e.position),u!==33)return!1;if(e.tag!==null&&be(e,"duplication of a tag property"),u=e.input.charCodeAt(++e.position),u===60?(n=!0,u=e.input.charCodeAt(++e.position)):u===33?(i=!0,r="!!",u=e.input.charCodeAt(++e.position)):r="!",t=e.position,n){do u=e.input.charCodeAt(++e.position);while(u!==0&&u!==62);e.position<e.length?(s=e.input.slice(t,e.position),u=e.input.charCodeAt(++e.position)):be(e,"unexpected end of the stream within a verbatim tag")}else{for(;u!==0&&!Lt(u);)u===33&&(i?be(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),gd.test(r)||be(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),u=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),av.test(s)&&be(e,"tag suffix cannot contain flow indicator characters")}return s&&!md.test(s)&&be(e,"tag name cannot contain such characters: "+s),n?e.tag=s:si.call(e.tagMap,r)?e.tag=e.tagMap[r]+s:r==="!"?e.tag="!"+s:r==="!!"?e.tag="tag:yaml.org,2002:"+s:be(e,'undeclared tag handle "'+r+'"'),!0}function Av(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&be(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Lt(n)&&!Wi(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&be(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function yv(e){var t,n,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Lt(i)&&!Wi(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&be(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),si.call(e.anchorMap,n)||be(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],ft(e,!0,-1),!0}function ir(e,t,n,i,r){var s,u,o,c=1,a=!1,f=!1,l,h,d,g,p;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=u=o=co===n||pd===n,i&&ft(e,!0,-1)&&(a=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;_v(e)||Av(e);)ft(e,!0,-1)?(a=!0,o=s,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):o=!1;if(o&&(o=a||r),(c===1||co===n)&&(lo===n||dd===n?g=t:g=t+1,p=e.position-e.lineStart,c===1?o&&(su(e,p)||wv(e,p,g))||mv(e,g)?f=!0:(u&&vv(e,g)||pv(e,g)||gv(e,g)?f=!0:yv(e)?(f=!0,(e.tag!==null||e.anchor!==null)&&be(e,"alias node should not have any properties")):dv(e,g,lo===n)&&(f=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(f=o&&su(e,p))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&be(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),l=0,h=e.implicitTypes.length;l<h;l+=1)if(d=e.implicitTypes[l],d.resolve(e.result)){e.result=d.construct(e.result),e.tag=d.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else si.call(e.typeMap[e.kind||"fallback"],e.tag)?(d=e.typeMap[e.kind||"fallback"][e.tag],e.result!==null&&d.kind!==e.kind&&be(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+d.kind+'", not "'+e.kind+'"'),d.resolve(e.result)?(e.result=d.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):be(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):be(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||f}function Ev(e){var t=e.position,n,i,r,s=!1,u;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(u=e.input.charCodeAt(e.position))!==0&&(ft(e,!0,-1),u=e.input.charCodeAt(e.position),!(e.lineIndent>0||u!==37));){for(s=!0,u=e.input.charCodeAt(++e.position),n=e.position;u!==0&&!Lt(u);)u=e.input.charCodeAt(++e.position);for(i=e.input.slice(n,e.position),r=[],i.length<1&&be(e,"directive name must not be less than one character in length");u!==0;){for(;mi(u);)u=e.input.charCodeAt(++e.position);if(u===35){do u=e.input.charCodeAt(++e.position);while(u!==0&&!En(u));break}if(En(u))break;for(n=e.position;u!==0&&!Lt(u);)u=e.input.charCodeAt(++e.position);r.push(e.input.slice(n,e.position))}u!==0&&Pl(e),si.call(iu,i)?iu[i](e,i,r):uo(e,'unknown document directive "'+i+'"')}if(ft(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,ft(e,!0,-1)):s&&be(e,"directives end mark is expected"),ir(e,e.lineIndent-1,co,!1,!0),ft(e,!0,-1),e.checkLineBreaks&&ov.test(e.input.slice(t,e.position))&&uo(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Bo(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,ft(e,!0,-1));return}if(e.position<e.length-1)be(e,"end of the stream or a document separator is expected");else return}function Ad(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new fv(e,t),i=e.indexOf("\0");for(i!==-1&&(n.position=i,be(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Ev(n);return n.documents}function yd(e,t,n){t!==null&&typeof t=="object"&&typeof n=="undefined"&&(n=t,t=null);var i=Ad(e,n);if(typeof t!="function")return i;for(var r=0,s=i.length;r<s;r+=1)t(i[r])}function Ed(e,t){var n=Ad(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new hd("expected a single document in the stream, but found more")}}function bv(e,t,n){return typeof t=="object"&&t!==null&&typeof n=="undefined"&&(n=t,t=null),yd(e,t,$n.extend({schema:fd},n))}function xv(e,t){return Ed(e,$n.extend({schema:fd},t))}vs.loadAll=yd;vs.load=Ed;vs.safeLoadAll=bv;vs.safeLoad=xv;var Ul={},As=Zt,ys=ws,Cv=ko,Fv=_s,bd=Object.prototype.toString,xd=Object.prototype.hasOwnProperty,Sv=9,Vr=10,Dv=13,kv=32,Bv=33,Tv=34,Cd=35,Lv=37,$v=38,Mv=39,Rv=42,Fd=44,Iv=45,Sd=58,Ov=61,Nv=62,Pv=63,zv=64,Dd=91,kd=93,Uv=96,Bd=123,Hv=124,Td=125,Dt={};Dt[0]="\\0";Dt[7]="\\a";Dt[8]="\\b";Dt[9]="\\t";Dt[10]="\\n";Dt[11]="\\v";Dt[12]="\\f";Dt[13]="\\r";Dt[27]="\\e";Dt[34]='\\"';Dt[92]="\\\\";Dt[133]="\\N";Dt[160]="\\_";Dt[8232]="\\L";Dt[8233]="\\P";var jv=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Wv(e,t){var n,i,r,s,u,o,c;if(t===null)return{};for(n={},i=Object.keys(t),r=0,s=i.length;r<s;r+=1)u=i[r],o=String(t[u]),u.slice(0,2)==="!!"&&(u="tag:yaml.org,2002:"+u.slice(2)),c=e.compiledTypeMap.fallback[u],c&&xd.call(c.styleAliases,o)&&(o=c.styleAliases[o]),n[u]=o;return n}function ou(e){var t,n,i;if(t=e.toString(16).toUpperCase(),e<=255)n="x",i=2;else if(e<=65535)n="u",i=4;else if(e<=4294967295)n="U",i=8;else throw new ys("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+As.repeat("0",i-t.length)+t}function Vv(e){this.schema=e.schema||Cv,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=As.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Wv(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function au(e,t){for(var n=As.repeat(" ",t),i=0,r=-1,s="",u,o=e.length;i<o;)r=e.indexOf(`
|
|
`,i),r===-1?(u=e.slice(i),i=o):(u=e.slice(i,r+1),i=r+1),u.length&&u!==`
|
|
`&&(s+=n),s+=u;return s}function Xa(e,t){return`
|
|
`+As.repeat(" ",e.indent*t)}function Gv(e,t){var n,i,r;for(n=0,i=e.implicitTypes.length;n<i;n+=1)if(r=e.implicitTypes[n],r.resolve(t))return!0;return!1}function Hl(e){return e===kv||e===Sv}function rr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==65279||65536<=e&&e<=1114111}function Kv(e){return rr(e)&&!Hl(e)&&e!==65279&&e!==Dv&&e!==Vr}function lu(e,t){return rr(e)&&e!==65279&&e!==Fd&&e!==Dd&&e!==kd&&e!==Bd&&e!==Td&&e!==Sd&&(e!==Cd||t&&Kv(t))}function Xv(e){return rr(e)&&e!==65279&&!Hl(e)&&e!==Iv&&e!==Pv&&e!==Sd&&e!==Fd&&e!==Dd&&e!==kd&&e!==Bd&&e!==Td&&e!==Cd&&e!==$v&&e!==Rv&&e!==Bv&&e!==Hv&&e!==Ov&&e!==Nv&&e!==Mv&&e!==Tv&&e!==Lv&&e!==zv&&e!==Uv}function Ld(e){var t=/^\n* /;return t.test(e)}var $d=1,Md=2,Rd=3,Id=4,js=5;function Jv(e,t,n,i,r){var s,u,o,c=!1,a=!1,f=i!==-1,l=-1,h=Xv(e.charCodeAt(0))&&!Hl(e.charCodeAt(e.length-1));if(t)for(s=0;s<e.length;s++){if(u=e.charCodeAt(s),!rr(u))return js;o=s>0?e.charCodeAt(s-1):null,h=h&&lu(u,o)}else{for(s=0;s<e.length;s++){if(u=e.charCodeAt(s),u===Vr)c=!0,f&&(a=a||s-l-1>i&&e[l+1]!==" ",l=s);else if(!rr(u))return js;o=s>0?e.charCodeAt(s-1):null,h=h&&lu(u,o)}a=a||f&&s-l-1>i&&e[l+1]!==" "}return!c&&!a?h&&!r(e)?$d:Md:n>9&&Ld(e)?js:a?Id:Rd}function Yv(e,t,n,i){e.dump=function(){if(t.length===0)return"''";if(!e.noCompatMode&&jv.indexOf(t)!==-1)return"'"+t+"'";var r=e.indent*Math.max(1,n),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-r),u=i||e.flowLevel>-1&&n>=e.flowLevel;function o(c){return Gv(e,c)}switch(Jv(t,u,e.indent,s,o)){case $d:return t;case Md:return"'"+t.replace(/'/g,"''")+"'";case Rd:return"|"+cu(t,e.indent)+uu(au(t,r));case Id:return">"+cu(t,e.indent)+uu(au(Zv(t,s),r));case js:return'"'+qv(t)+'"';default:throw new ys("impossible error: invalid scalar style")}}()}function cu(e,t){var n=Ld(e)?String(t):"",i=e[e.length-1]===`
|
|
`,r=i&&(e[e.length-2]===`
|
|
`||e===`
|
|
`),s=r?"+":i?"":"-";return n+s+`
|
|
`}function uu(e){return e[e.length-1]===`
|
|
`?e.slice(0,-1):e}function Zv(e,t){for(var n=/(\n+)([^\n]*)/g,i=function(){var a=e.indexOf(`
|
|
`);return a=a!==-1?a:e.length,n.lastIndex=a,hu(e.slice(0,a),t)}(),r=e[0]===`
|
|
`||e[0]===" ",s,u;u=n.exec(e);){var o=u[1],c=u[2];s=c[0]===" ",i+=o+(!r&&!s&&c!==""?`
|
|
`:"")+hu(c,t),r=s}return i}function hu(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,i,r=0,s,u=0,o=0,c="";i=n.exec(e);)o=i.index,o-r>t&&(s=u>r?u:o,c+=`
|
|
`+e.slice(r,s),r=s+1),u=o;return c+=`
|
|
`,e.length-r>t&&u>r?c+=e.slice(r,u)+`
|
|
`+e.slice(u+1):c+=e.slice(r),c.slice(1)}function qv(e){for(var t="",n,i,r,s=0;s<e.length;s++){if(n=e.charCodeAt(s),n>=55296&&n<=56319&&(i=e.charCodeAt(s+1),i>=56320&&i<=57343)){t+=ou((n-55296)*1024+i-56320+65536),s++;continue}r=Dt[n],t+=!r&&rr(n)?e[s]:r||ou(n)}return t}function Qv(e,t,n){var i="",r=e.tag,s,u;for(s=0,u=n.length;s<u;s+=1)Ai(e,t,n[s],!1,!1)&&(s!==0&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=r,e.dump="["+i+"]"}function ew(e,t,n,i){var r="",s=e.tag,u,o;for(u=0,o=n.length;u<o;u+=1)Ai(e,t+1,n[u],!0,!0)&&((!i||u!==0)&&(r+=Xa(e,t)),e.dump&&Vr===e.dump.charCodeAt(0)?r+="-":r+="- ",r+=e.dump);e.tag=s,e.dump=r||"[]"}function tw(e,t,n){var i="",r=e.tag,s=Object.keys(n),u,o,c,a,f;for(u=0,o=s.length;u<o;u+=1)f="",u!==0&&(f+=", "),e.condenseFlow&&(f+='"'),c=s[u],a=n[c],Ai(e,t,c,!1,!1)&&(e.dump.length>1024&&(f+="? "),f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ai(e,t,a,!1,!1)&&(f+=e.dump,i+=f));e.tag=r,e.dump="{"+i+"}"}function nw(e,t,n,i){var r="",s=e.tag,u=Object.keys(n),o,c,a,f,l,h;if(e.sortKeys===!0)u.sort();else if(typeof e.sortKeys=="function")u.sort(e.sortKeys);else if(e.sortKeys)throw new ys("sortKeys must be a boolean or a function");for(o=0,c=u.length;o<c;o+=1)h="",(!i||o!==0)&&(h+=Xa(e,t)),a=u[o],f=n[a],Ai(e,t+1,a,!0,!0,!0)&&(l=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,l&&(e.dump&&Vr===e.dump.charCodeAt(0)?h+="?":h+="? "),h+=e.dump,l&&(h+=Xa(e,t)),Ai(e,t+1,f,!0,l)&&(e.dump&&Vr===e.dump.charCodeAt(0)?h+=":":h+=": ",h+=e.dump,r+=h));e.tag=s,e.dump=r||"{}"}function fu(e,t,n){var i,r,s,u,o,c;for(r=n?e.explicitTypes:e.implicitTypes,s=0,u=r.length;s<u;s+=1)if(o=r[s],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(e.tag=n?o.tag:"?",o.represent){if(c=e.styleMap[o.tag]||o.defaultStyle,bd.call(o.represent)==="[object Function]")i=o.represent(t,c);else if(xd.call(o.represent,c))i=o.represent[c](t,c);else throw new ys("!<"+o.tag+'> tag resolver accepts not "'+c+'" style');e.dump=i}return!0}return!1}function Ai(e,t,n,i,r,s){e.tag=null,e.dump=n,fu(e,n,!1)||fu(e,n,!0);var u=bd.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var o=u==="[object Object]"||u==="[object Array]",c,a;if(o&&(c=e.duplicates.indexOf(n),a=c!==-1),(e.tag!==null&&e.tag!=="?"||a||e.indent!==2&&t>0)&&(r=!1),a&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(o&&a&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),u==="[object Object]")i&&Object.keys(e.dump).length!==0?(nw(e,t,e.dump,r),a&&(e.dump="&ref_"+c+e.dump)):(tw(e,t,e.dump),a&&(e.dump="&ref_"+c+" "+e.dump));else if(u==="[object Array]"){var f=e.noArrayIndent&&t>0?t-1:t;i&&e.dump.length!==0?(ew(e,f,e.dump,r),a&&(e.dump="&ref_"+c+e.dump)):(Qv(e,f,e.dump),a&&(e.dump="&ref_"+c+" "+e.dump))}else if(u==="[object String]")e.tag!=="?"&&Yv(e,e.dump,t,s);else{if(e.skipInvalid)return!1;throw new ys("unacceptable kind of an object to dump "+u)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function iw(e,t){var n=[],i=[],r,s;for(Ja(e,n,i),r=0,s=i.length;r<s;r+=1)t.duplicates.push(n[i[r]]);t.usedDuplicates=new Array(s)}function Ja(e,t,n){var i,r,s;if(e!==null&&typeof e=="object")if(r=t.indexOf(e),r!==-1)n.indexOf(r)===-1&&n.push(r);else if(t.push(e),Array.isArray(e))for(r=0,s=e.length;r<s;r+=1)Ja(e[r],t,n);else for(i=Object.keys(e),r=0,s=i.length;r<s;r+=1)Ja(e[i[r]],t,n)}function Od(e,t){t=t||{};var n=new Vv(t);return n.noRefs||iw(e,n),Ai(n,0,e,!0,!0)?n.dump+`
|
|
`:""}function rw(e,t){return Od(e,As.extend({schema:Fv},t))}Ul.dump=Od;Ul.safeDump=rw;var To=vs,Nd=Ul;function Lo(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}at.Type=yt;at.Schema=mr;at.FAILSAFE_SCHEMA=Ol;at.JSON_SCHEMA=ad;at.CORE_SCHEMA=ld;at.DEFAULT_SAFE_SCHEMA=_s;at.DEFAULT_FULL_SCHEMA=ko;at.load=To.load;at.loadAll=To.loadAll;at.safeLoad=To.safeLoad;at.safeLoadAll=To.safeLoadAll;at.dump=Nd.dump;at.safeDump=Nd.safeDump;at.YAMLException=ws;at.MINIMAL_SCHEMA=Ol;at.SAFE_SCHEMA=_s;at.DEFAULT_SCHEMA=ko;at.scan=Lo("scan");at.parse=Lo("parse");at.compose=Lo("compose");at.addConstructor=Lo("addConstructor");var sw=at,Ya=sw,ow=aw;function Ki(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function aw(e){if(e=e||{},e.circles)return lw(e);return e.proto?i:n;function t(r,s){for(var u=Object.keys(r),o=new Array(u.length),c=0;c<u.length;c++){var a=u[c],f=r[a];typeof f!="object"||f===null?o[a]=f:f instanceof Date?o[a]=new Date(f):ArrayBuffer.isView(f)?o[a]=Ki(f):o[a]=s(f)}return o}function n(r){if(typeof r!="object"||r===null)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return t(r,n);if(r instanceof Map)return new Map(t(Array.from(r),n));if(r instanceof Set)return new Set(t(Array.from(r),n));var s={};for(var u in r)if(Object.hasOwnProperty.call(r,u)!==!1){var o=r[u];typeof o!="object"||o===null?s[u]=o:o instanceof Date?s[u]=new Date(o):o instanceof Map?s[u]=new Map(t(Array.from(o),n)):o instanceof Set?s[u]=new Set(t(Array.from(o),n)):ArrayBuffer.isView(o)?s[u]=Ki(o):s[u]=n(o)}return s}function i(r){if(typeof r!="object"||r===null)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return t(r,i);if(r instanceof Map)return new Map(t(Array.from(r),i));if(r instanceof Set)return new Set(t(Array.from(r),i));var s={};for(var u in r){var o=r[u];typeof o!="object"||o===null?s[u]=o:o instanceof Date?s[u]=new Date(o):o instanceof Map?s[u]=new Map(t(Array.from(o),i)):o instanceof Set?s[u]=new Set(t(Array.from(o),i)):ArrayBuffer.isView(o)?s[u]=Ki(o):s[u]=i(o)}return s}}function lw(e){var t=[],n=[];return e.proto?s:r;function i(u,o){for(var c=Object.keys(u),a=new Array(c.length),f=0;f<c.length;f++){var l=c[f],h=u[l];if(typeof h!="object"||h===null)a[l]=h;else if(h instanceof Date)a[l]=new Date(h);else if(ArrayBuffer.isView(h))a[l]=Ki(h);else{var d=t.indexOf(h);d!==-1?a[l]=n[d]:a[l]=o(h)}}return a}function r(u){if(typeof u!="object"||u===null)return u;if(u instanceof Date)return new Date(u);if(Array.isArray(u))return i(u,r);if(u instanceof Map)return new Map(i(Array.from(u),r));if(u instanceof Set)return new Set(i(Array.from(u),r));var o={};t.push(u),n.push(o);for(var c in u)if(Object.hasOwnProperty.call(u,c)!==!1){var a=u[c];if(typeof a!="object"||a===null)o[c]=a;else if(a instanceof Date)o[c]=new Date(a);else if(a instanceof Map)o[c]=new Map(i(Array.from(a),r));else if(a instanceof Set)o[c]=new Set(i(Array.from(a),r));else if(ArrayBuffer.isView(a))o[c]=Ki(a);else{var f=t.indexOf(a);f!==-1?o[c]=n[f]:o[c]=r(a)}}return t.pop(),n.pop(),o}function s(u){if(typeof u!="object"||u===null)return u;if(u instanceof Date)return new Date(u);if(Array.isArray(u))return i(u,s);if(u instanceof Map)return new Map(i(Array.from(u),s));if(u instanceof Set)return new Set(i(Array.from(u),s));var o={};t.push(u),n.push(o);for(var c in u){var a=u[c];if(typeof a!="object"||a===null)o[c]=a;else if(a instanceof Date)o[c]=new Date(a);else if(a instanceof Map)o[c]=new Map(i(Array.from(a),s));else if(a instanceof Set)o[c]=new Set(i(Array.from(a),s));else if(ArrayBuffer.isView(a))o[c]=Ki(a);else{var f=t.indexOf(a);f!==-1?o[c]=n[f]:o[c]=s(a)}}return t.pop(),n.pop(),o}}var He=JSON.parse('{"languages":[{"code":"de","name":"Deutsch"},{"code":"en","name":"English"},{"code":"es","name":"Espa\xF1ol"},{"code":"fr","name":"Fran\xE7ais"},{"code":"it","name":"Italiano"},{"code":"ja","name":"\u65E5\u672C\u8A9E"},{"code":"pl","name":"Polski"},{"code":"pt","name":"Portugu\xEAs"},{"code":"ru","name":"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"},{"code":"sk","name":"Sloven\u010Dina","schemas":false},{"code":"zh-cn","name":"\u7B80\u4F53\u4E2D\u6587"},{"code":"zh-tw","name":"\u6B63\u9AD4\u4E2D\u6587"}],"versions":[{"id":"1.15","ref":"1.15.2","pack_format":5},{"id":"1.16","ref":"1.16.5","pack_format":6},{"id":"1.17","ref":"1.17.1","pack_format":7},{"id":"1.18","ref":"1.18.1","pack_format":8},{"id":"1.18.2","ref":"1.18.2","pack_format":9},{"id":"1.19","dynamic":true,"pack_format":10}],"generators":[{"id":"loot_table","url":"loot-table","path":"loot_tables","schema":"loot_table"},{"id":"predicate","url":"predicate","path":"predicates","schema":"predicate"},{"id":"item_modifier","url":"item-modifier","path":"item_modifiers","schema":"item_modifier","minVersion":"1.17"},{"id":"advancement","url":"advancement","path":"advancements","schema":"advancement"},{"id":"recipe","url":"recipe","path":"recipes","schema":"recipe"},{"id":"text_component","url":"text-component","schema":"text_component"},{"id":"chat_type","url":"chat-type","schema":"chat_type","minVersion":"1.19"},{"id":"dimension","url":"dimension","schema":"dimension","category":"worldgen","minVersion":"1.16"},{"id":"dimension_type","url":"dimension-type","schema":"dimension_type","category":"worldgen","minVersion":"1.16"},{"id":"world","url":"world","schema":"world_settings","category":"worldgen","minVersion":"1.16"},{"id":"worldgen/biome","url":"worldgen/biome","category":"worldgen","schema":"biome","minVersion":"1.16"},{"id":"worldgen/configured_carver","url":"worldgen/carver","category":"worldgen","schema":"configured_carver","minVersion":"1.16"},{"id":"worldgen/configured_feature","url":"worldgen/feature","category":"worldgen","schema":"configured_feature","minVersion":"1.16"},{"id":"worldgen/density_function","url":"worldgen/density-function","category":"worldgen","schema":"density_function","minVersion":"1.18.2"},{"id":"worldgen/placed_feature","url":"worldgen/placed-feature","category":"worldgen","schema":"placed_feature","minVersion":"1.18"},{"id":"worldgen/noise","url":"worldgen/noise","category":"worldgen","schema":"noise_parameters","minVersion":"1.18"},{"id":"worldgen/noise_settings","url":"worldgen/noise-settings","category":"worldgen","schema":"noise_settings","minVersion":"1.16"},{"id":"worldgen/configured_structure_feature","url":"worldgen/structure-feature","category":"worldgen","schema":"configured_structure_feature","minVersion":"1.16","maxVersion":"1.18.2"},{"id":"worldgen/structure","url":"worldgen/structure","category":"worldgen","schema":"structure","minVersion":"1.19"},{"id":"worldgen/structure_set","url":"worldgen/structure-set","category":"worldgen","schema":"structure_set","minVersion":"1.18.2"},{"id":"worldgen/configured_surface_builder","url":"worldgen/surface-builder","category":"worldgen","schema":"configured_surface_builder","minVersion":"1.16","maxVersion":"1.17"},{"id":"worldgen/processor_list","url":"worldgen/processor-list","category":"worldgen","schema":"processor_list","minVersion":"1.16"},{"id":"worldgen/template_pool","url":"worldgen/template-pool","category":"worldgen","schema":"template_pool","minVersion":"1.16"},{"id":"worldgen/world_preset","url":"worldgen/world-preset","category":"worldgen","schema":"world_preset","minVersion":"1.19"},{"id":"worldgen/flat_level_generator_preset","url":"worldgen/flat-world-preset","category":"worldgen","schema":"flat_level_generator_preset","minVersion":"1.19"},{"id":"block_definition","url":"assets/blockstate","path":"blockstates","category":"assets","schema":"block_definition"},{"id":"model","url":"assets/model","path":"models","category":"assets","schema":"model"}]}');function Di(e){return typeof e=="object"&&e!==null}const cw=e=>("0"+e.toString(16)).substr(-2);function vi(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,cw).join("")}function On(){return BigInt(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))}function Pd(e){const t=Math.floor(Math.random()*4294967296)-2147483648,n=e.get(new ae.Path(["dimensions"]));e.set(new ae.Path(["seed"]),t,!0),Di(n)&&Object.keys(n).forEach(i=>{e.set(new ae.Path(["dimensions",i,"generator","seed"]),t,!0),e.set(new ae.Path(["dimensions",i,"generator","biome_source","seed"]),t,!0)}),e.set(new ae.Path(["placement","salt"]),Math.abs(t),!0),e.set(new ae.Path(["generator","seed"]),t,!0),e.set(new ae.Path(["generator","biome_source","seed"]),t)}function zd(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(31,t)+e.charCodeAt(n)|0;return t}function Nn(e){return`/${e}/`.replaceAll("//","/")}function uw(e){const t=e.indexOf("?");return t>=0&&(e=e.slice(0,t)),Nn(e)}function Ud(e){const t=uw(e).replace(/^\//,"").replace(/\/$/,"");return He.generators.find(n=>n.url===t)}function Hd({path:e,search:t,hash:n,replace:i}){const r=(e!==void 0?Nn(e):location.pathname)+(t!==void 0?t.startsWith("?")||t.length===0?t:"?"+t:location.search)+(n!==void 0?n.startsWith("#")?n:"#"+n:location.hash);ri(r,i)}function hw(e){const t=Ya.load(e.substring(3,e.indexOf("---",3)));return Di(t)?t:{}}function fw(e,t){var i;let n=0;for(;;){const r=e.indexOf("{#",n);if(r<0)break;const s=dw(e,r+2),u=e.indexOf("#[",r+1);let o="";if(u>=0&&u<s){const c=e.indexOf("]",u+2);e.substring(u+2,c)===t&&(o=e.substring(c+1,s).trim())}else{const c=e.substring(r+2,s),a=He.versions.find(f=>f.id===t);o=(i={version:a==null?void 0:a.id,pack_format:a==null?void 0:a.pack_format.toString()}[c])!=null?i:""}e=e.substring(0,r)+o+e.substring(s+2),n=r}return e}function dw(e,t){let n=0,i=0;for(;i++<1e3;){const r=e.indexOf("#}",t),s=e.indexOf("{#",t);if(r<0)return console.warn("Missing closing bracket"),e.length;if(s<0){if(n===0)return r;n-=1,t=r+2}else if(s<r)n+=1,t=s+2;else{if(n===0)return r;n-=1,t=r+2}}return console.warn("Exceeded max iterations while finding closing bracket"),e.length}function jd(e){const t=Math.abs(zd(e));return[t%256,(t>>8)%256,(t>>16)%256]}function yr(e){return e*e}function Nt(e,t,n){return Math.max(e,Math.min(t,n))}function ea(e,t,n){return n<0?e:n>1?t:Ws(n,e,t)}function Ws(e,t,n){return t+e*(n-t)}function pw(e,t,n,i,r,s){return Ws(t,Ws(e,n,i),Ws(e,r,s))}function Xt(e){return e instanceof Error?e.message:`${e}`}const $o=ow();function yi(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,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(i=0;i<n;i++)if(!yi(e[i],t[i]))return!1;return!0}if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e);if(n=r.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,r[i]))return!1;for(i=n;i--!==0;){const s=r[i];if(!yi(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}class gw{constructor(){this.forward=new Map,this.backward=new Map}set(t,n){this.forward.set(t,n),this.backward.set(n,t)}getA(t){return this.backward.get(t)}getB(t){return this.forward.get(t)}getOrPut(t,n){const i=this.forward.get(t);return i===void 0?(this.set(t,n),n):i}}function Vs({icon:e,label:t,large:n,larger:i,doSelect:r,value:s,placeholder:u,dataList:o,onChange:c}){const a=c===void 0?()=>{}:h=>{const d=h.target.value;c==null||c(d)},f=Xe(null);xe(()=>{r&&f.current&&f.current.select()},[r]);const l=o&&vi();return S("div",{class:`btn btn-input ${n?"large-input":""} ${i?"larger-input":""}`,onClick:h=>h.stopPropagation()},e&&$e[e],t&&S("span",null,t),S("input",{ref:f,type:"text",value:s,onChange:a,placeholder:u,list:l}),o&&S("datalist",{id:l},o.map(h=>S("option",{value:h}))))}function Cr({cooldown:e,invert:t,initial:n}={}){const[i,r]=oe(n),s=Xe(void 0);return[i,()=>{r(!t),s.current!==void 0&&clearTimeout(s.current),s.current=setTimeout(()=>{r(!!t)},e!=null?e:2e3)}]}function Es({size:e,draw:t,onDrag:n,onHover:i,onLeave:r},s){const u=Xe(null),o=Xe(),c=Xe(),a=Xe([0,0]),f=Xe(!1);xe(()=>{const d=w=>{o.current=[w.offsetX,w.offsetY]},g=w=>{if(o.current===void 0){const _=w.offsetX/u.current.clientWidth,E=w.offsetY/u.current.clientHeight;i==null||i(_,E);return}if(!n)return;const v=w.offsetX-o.current[0],A=w.offsetY-o.current[1];v===0&&A===0||(a.current=[a.current[0]+v,a.current[1]+A],f.current||(cancelAnimationFrame(c.current),c.current=requestAnimationFrame(async()=>{f.current=!0;const _=a.current[0]/u.current.clientWidth,E=a.current[1]/u.current.clientHeight;a.current=[0,0],await(n==null?void 0:n(_,E)),f.current=!1}))),o.current=[w.offsetX,w.offsetY]},p=()=>{o.current=void 0},m=()=>{r==null||r()};return u.current.addEventListener("mousedown",d),u.current.addEventListener("mousemove",g),u.current.addEventListener("mouseleave",m),document.body.addEventListener("mouseup",p),()=>{var w,v,A;(w=u.current)==null||w.removeEventListener("mousedown",d),(v=u.current)==null||v.removeEventListener("mousemove",g),(A=u.current)==null||A.removeEventListener("mouseleave",m),document.body.removeEventListener("mouseup",p)}},[...s!=null?s:[],u.current]);const l=Xe(),h=Xe(0);return l.current=async()=>{const d=u.current.getContext("2d"),g=e();u.current.width=g[0],u.current.height=g[1];const p=d.getImageData(0,0,g[0],g[1]),m=h.current+=1;try{await t(p)}catch(w){throw w}m===h.current&&d.putImageData(p,0,0)},{canvas:u,redraw:l.current}}function jl(){const[e,t]=oe(!1),n=()=>{t(!1)};return xe(()=>(e&&(document.body.addEventListener("click",n),document.body.addEventListener("contextmenu",n)),()=>{document.body.removeEventListener("click",n),document.body.removeEventListener("contextmenu",n)}),[e]),[e,()=>t(!0)]}function mw(){const[e,t]=oe(window.location.hash),n=At(()=>{t(window.location.hash)},[]);xe(()=>(window.addEventListener("hashchange",n),window.addEventListener("replacestate",n),()=>{window.removeEventListener("hashchange",n),window.removeEventListener("replacestate",n)}),[]);const i=At(r=>{r!==e&&Hd({hash:r})},[e]);return[e,i]}function du(e){const[t,n]=oe(matchMedia(e).matches),i=r=>{n(r.matches)};return xe(()=>{const r=matchMedia(e);return r.addEventListener("change",i),()=>{r.removeEventListener("change",i)}},[e]),t}function Mo(e,t,n){const i={invalidated(){e&&t(e)}};xe(()=>(e==null||e.addListener(i),()=>{e==null||e.removeListener(i)}),[e,...n!=null?n:[]])}const pu=(e,t)=>{var n;return(n=new URLSearchParams(e).get(t))!=null?n:void 0};function Gr(e){const t=window.location,[n,i]=oe(pu(t.search,e));xe(()=>{const s=()=>{i(pu(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 r=At((s,u)=>{if(s!==n){const o=new URLSearchParams(t.search);s===void 0||s.length===0?o.delete(e):o.set(e,s),Hd({search:o.toString().replaceAll("%7C","|"),replace:u})}},[n]);return[n,r]}function $t(e){const{icon:t,label:n,relative:i,tooltip:r,tooltipLoc:s,children:u}=e,[o,c]=jl();return S("div",Ce({class:`btn-menu${i===!1?" no-relative":""}`},e),S(Ee,{icon:t,label:n,tooltip:r,tooltipLoc:s,onClick:c}),o&&S("div",{class:"btn-group"},u))}var Wd={exports:{}};(function(e,t){(function(i,r){e.exports=r()})(tn,function(){return function(n){var i={};function r(s){if(i[s])return i[s].exports;var u=i[s]={exports:{},id:s,loaded:!1};return n[s].call(u.exports,u,u.exports,r),u.loaded=!0,u.exports}return r.m=n,r.c=i,r.p="",r(0)}([function(n,i,r){var s,u;s=[r(1)],u=function(o){var c={},a=function(x,y,C){var B,T,M={},R,I,H,P,j,V=new p(C),K=C&&C.traceFormat;if(K!=="chrome"&&K!=="firefox"){if(K)throw new Error('unknown traceFormat "'+K+'" :(');if(f()||d())K="chrome";else if(l()||h())K="firefox";else throw new Error("unknown browser :(")}K==="chrome"?(P=/^ +at.+\((.*):([0-9]+):([0-9]+)/,H=4,j=1):(P=/@(.*):([0-9]+):([0-9]+)/,H=4,j=0),B=x.split(`
|
|
`).slice(j);for(var N=0;N<B.length;N++)T=B[N],!(C&&C.filter&&!C.filter(T))&&(R=T.match(P),R&&R.length===H&&(M[N]=R,I=R[1],I.match(/<anonymous>/)||V.fetchScript(I)));V.sem.whenReady(function(){var k=w(B,M,V.mapForUri,K);y(k)})},f=function(){return navigator.userAgent.toLowerCase().indexOf("chrome")>-1},l=function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1},h=function(){return navigator.userAgent.toLowerCase().indexOf("safari")>-1},d=function(){return document.documentMode&&document.documentMode>=11},g=function(){this.count=0,this.pending=[]};g.prototype.incr=function(){this.count++},g.prototype.decr=function(){this.count--,this.flush()},g.prototype.whenReady=function(x){this.pending.push(x),this.flush()},g.prototype.flush=function(){this.count===0&&(this.pending.forEach(function(x){x()}),this.pending=[])};var p=function(x){this.sem=new g,this.sync=x&&x.sync,this.mapForUri=x&&x.cacheGlobally?c:{}};p.prototype.ajax=function(x,y){var C=b(),B=this;C.onreadystatechange=function(){C.readyState==4&&y.call(B,C,x)},C.open("GET",x,!this.sync),C.send()},p.prototype.fetchScript=function(x){if(!(x in this.mapForUri))this.sem.incr(),this.mapForUri[x]=null;else return;this.ajax(x,this.onScriptLoad)};var m=new RegExp("^(?:[a-z]+:)?//","i");p.prototype.onScriptLoad=function(x,y){if(x.status===200||y.slice(0,7)==="file://"&&x.status===0){var C=x.responseText.match("//# [s]ourceMappingURL=(.*)[\\s]*$","m");if(C&&C.length===2){var B=C[1],T=B.match("data:application/json;(charset=[^;]+;)?base64,(.*)");if(T&&T[2])this.mapForUri[y]=new o.SourceMapConsumer(atob(T[2])),this.sem.decr();else{if(!m.test(B)){var M,R=y.lastIndexOf("/");R!==-1&&(M=y.slice(0,R+1),B=M+B)}this.ajax(B,function(I){(I.status===200||B.slice(0,7)==="file://"&&I.status===0)&&(this.mapForUri[y]=new o.SourceMapConsumer(I.responseText)),this.sem.decr()})}}else this.sem.decr()}else this.sem.decr()};var w=function(x,y,C,B){for(var T=[],M,R=B==="chrome"?v:A,I=0;I<x.length;I++){var H=y[I];if(H){var P=H[1],j=parseInt(H[2],10),V=parseInt(H[3],10);if(M=C[P],M){var K=M.originalPositionFor({line:j,column:V});T.push(_(K.source,K.line,K.column,K.name||R(x[I])))}else T.push(_(P,j,V,R(x[I])))}else T.push(x[I])}return T};function v(x){var y=/ +at +([^ ]*).*/.exec(x);return y&&y[1]}function A(x){var y=/([^@]*)@.*/.exec(x);return y&&y[1]}var _=function(x,y,C,B){return" at "+(B||"(unknown)")+" ("+x+":"+y+":"+C+")"},E=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}];function b(){for(var x=!1,y=0;y<E.length;y++){try{x=E[y]()}catch{continue}break}return x}return{mapStackTrace:a}}.apply(i,s),u!==void 0&&(n.exports=u)},function(n,i,r){var s=r(2),u=r(3),o=r(4).ArraySet,c=r(5),a=r(7).quickSort;function f(g){var p=g;return typeof g=="string"&&(p=JSON.parse(g.replace(/^\)\]\}'/,""))),p.sections!=null?new d(p):new l(p)}f.fromSourceMap=function(g){return l.fromSourceMap(g)},f.prototype._version=3,f.prototype.__generatedMappings=null,Object.defineProperty(f.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),f.prototype.__originalMappings=null,Object.defineProperty(f.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),f.prototype._charIsMappingSeparator=function(p,m){var w=p.charAt(m);return w===";"||w===","},f.prototype._parseMappings=function(p,m){throw new Error("Subclasses must implement _parseMappings")},f.GENERATED_ORDER=1,f.ORIGINAL_ORDER=2,f.GREATEST_LOWER_BOUND=1,f.LEAST_UPPER_BOUND=2,f.prototype.eachMapping=function(p,m,w){var v=m||null,A=w||f.GENERATED_ORDER,_;switch(A){case f.GENERATED_ORDER:_=this._generatedMappings;break;case f.ORIGINAL_ORDER:_=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var E=this.sourceRoot;_.map(function(b){var x=b.source===null?null:this._sources.at(b.source);return x!=null&&E!=null&&(x=s.join(E,x)),{source:x,generatedLine:b.generatedLine,generatedColumn:b.generatedColumn,originalLine:b.originalLine,originalColumn:b.originalColumn,name:b.name===null?null:this._names.at(b.name)}},this).forEach(p,v)},f.prototype.allGeneratedPositionsFor=function(p){var m=s.getArg(p,"line"),w={source:s.getArg(p,"source"),originalLine:m,originalColumn:s.getArg(p,"column",0)};if(this.sourceRoot!=null&&(w.source=s.relative(this.sourceRoot,w.source)),!this._sources.has(w.source))return[];w.source=this._sources.indexOf(w.source);var v=[],A=this._findMapping(w,this._originalMappings,"originalLine","originalColumn",s.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(A>=0){var _=this._originalMappings[A];if(p.column===void 0)for(var E=_.originalLine;_&&_.originalLine===E;)v.push({line:s.getArg(_,"generatedLine",null),column:s.getArg(_,"generatedColumn",null),lastColumn:s.getArg(_,"lastGeneratedColumn",null)}),_=this._originalMappings[++A];else for(var b=_.originalColumn;_&&_.originalLine===m&&_.originalColumn==b;)v.push({line:s.getArg(_,"generatedLine",null),column:s.getArg(_,"generatedColumn",null),lastColumn:s.getArg(_,"lastGeneratedColumn",null)}),_=this._originalMappings[++A]}return v},i.SourceMapConsumer=f;function l(g){var p=g;typeof g=="string"&&(p=JSON.parse(g.replace(/^\)\]\}'/,"")));var m=s.getArg(p,"version"),w=s.getArg(p,"sources"),v=s.getArg(p,"names",[]),A=s.getArg(p,"sourceRoot",null),_=s.getArg(p,"sourcesContent",null),E=s.getArg(p,"mappings"),b=s.getArg(p,"file",null);if(m!=this._version)throw new Error("Unsupported version: "+m);w=w.map(String).map(s.normalize).map(function(x){return A&&s.isAbsolute(A)&&s.isAbsolute(x)?s.relative(A,x):x}),this._names=o.fromArray(v.map(String),!0),this._sources=o.fromArray(w,!0),this.sourceRoot=A,this.sourcesContent=_,this._mappings=E,this.file=b}l.prototype=Object.create(f.prototype),l.prototype.consumer=f,l.fromSourceMap=function(p){var m=Object.create(l.prototype),w=m._names=o.fromArray(p._names.toArray(),!0),v=m._sources=o.fromArray(p._sources.toArray(),!0);m.sourceRoot=p._sourceRoot,m.sourcesContent=p._generateSourcesContent(m._sources.toArray(),m.sourceRoot),m.file=p._file;for(var A=p._mappings.toArray().slice(),_=m.__generatedMappings=[],E=m.__originalMappings=[],b=0,x=A.length;b<x;b++){var y=A[b],C=new h;C.generatedLine=y.generatedLine,C.generatedColumn=y.generatedColumn,y.source&&(C.source=v.indexOf(y.source),C.originalLine=y.originalLine,C.originalColumn=y.originalColumn,y.name&&(C.name=w.indexOf(y.name)),E.push(C)),_.push(C)}return a(m.__originalMappings,s.compareByOriginalPositions),m},l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){return this._sources.toArray().map(function(g){return this.sourceRoot!=null?s.join(this.sourceRoot,g):g},this)}});function h(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}l.prototype._parseMappings=function(p,m){for(var w=1,v=0,A=0,_=0,E=0,b=0,x=p.length,y=0,C={},B={},T=[],M=[],R,I,H,P,j;y<x;)if(p.charAt(y)===";")w++,y++,v=0;else if(p.charAt(y)===",")y++;else{for(R=new h,R.generatedLine=w,P=y;P<x&&!this._charIsMappingSeparator(p,P);P++);if(I=p.slice(y,P),H=C[I],H)y+=I.length;else{for(H=[];y<P;)c.decode(p,y,B),j=B.value,y=B.rest,H.push(j);if(H.length===2)throw new Error("Found a source, but no line and column");if(H.length===3)throw new Error("Found a source and line, but no column");C[I]=H}R.generatedColumn=v+H[0],v=R.generatedColumn,H.length>1&&(R.source=E+H[1],E+=H[1],R.originalLine=A+H[2],A=R.originalLine,R.originalLine+=1,R.originalColumn=_+H[3],_=R.originalColumn,H.length>4&&(R.name=b+H[4],b+=H[4])),M.push(R),typeof R.originalLine=="number"&&T.push(R)}a(M,s.compareByGeneratedPositionsDeflated),this.__generatedMappings=M,a(T,s.compareByOriginalPositions),this.__originalMappings=T},l.prototype._findMapping=function(p,m,w,v,A,_){if(p[w]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+p[w]);if(p[v]<0)throw new TypeError("Column must be greater than or equal to 0, got "+p[v]);return u.search(p,m,A,_)},l.prototype.computeColumnSpans=function(){for(var p=0;p<this._generatedMappings.length;++p){var m=this._generatedMappings[p];if(p+1<this._generatedMappings.length){var w=this._generatedMappings[p+1];if(m.generatedLine===w.generatedLine){m.lastGeneratedColumn=w.generatedColumn-1;continue}}m.lastGeneratedColumn=1/0}},l.prototype.originalPositionFor=function(p){var m={generatedLine:s.getArg(p,"line"),generatedColumn:s.getArg(p,"column")},w=this._findMapping(m,this._generatedMappings,"generatedLine","generatedColumn",s.compareByGeneratedPositionsDeflated,s.getArg(p,"bias",f.GREATEST_LOWER_BOUND));if(w>=0){var v=this._generatedMappings[w];if(v.generatedLine===m.generatedLine){var A=s.getArg(v,"source",null);A!==null&&(A=this._sources.at(A),this.sourceRoot!=null&&(A=s.join(this.sourceRoot,A)));var _=s.getArg(v,"name",null);return _!==null&&(_=this._names.at(_)),{source:A,line:s.getArg(v,"originalLine",null),column:s.getArg(v,"originalColumn",null),name:_}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(p){return p==null}):!1},l.prototype.sourceContentFor=function(p,m){if(!this.sourcesContent)return null;if(this.sourceRoot!=null&&(p=s.relative(this.sourceRoot,p)),this._sources.has(p))return this.sourcesContent[this._sources.indexOf(p)];var w;if(this.sourceRoot!=null&&(w=s.urlParse(this.sourceRoot))){var v=p.replace(/^file:\/\//,"");if(w.scheme=="file"&&this._sources.has(v))return this.sourcesContent[this._sources.indexOf(v)];if((!w.path||w.path=="/")&&this._sources.has("/"+p))return this.sourcesContent[this._sources.indexOf("/"+p)]}if(m)return null;throw new Error('"'+p+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(p){var m=s.getArg(p,"source");if(this.sourceRoot!=null&&(m=s.relative(this.sourceRoot,m)),!this._sources.has(m))return{line:null,column:null,lastColumn:null};m=this._sources.indexOf(m);var w={source:m,originalLine:s.getArg(p,"line"),originalColumn:s.getArg(p,"column")},v=this._findMapping(w,this._originalMappings,"originalLine","originalColumn",s.compareByOriginalPositions,s.getArg(p,"bias",f.GREATEST_LOWER_BOUND));if(v>=0){var A=this._originalMappings[v];if(A.source===w.source)return{line:s.getArg(A,"generatedLine",null),column:s.getArg(A,"generatedColumn",null),lastColumn:s.getArg(A,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},i.BasicSourceMapConsumer=l;function d(g){var p=g;typeof g=="string"&&(p=JSON.parse(g.replace(/^\)\]\}'/,"")));var m=s.getArg(p,"version"),w=s.getArg(p,"sections");if(m!=this._version)throw new Error("Unsupported version: "+m);this._sources=new o,this._names=new o;var v={line:-1,column:0};this._sections=w.map(function(A){if(A.url)throw new Error("Support for url field in sections not implemented.");var _=s.getArg(A,"offset"),E=s.getArg(_,"line"),b=s.getArg(_,"column");if(E<v.line||E===v.line&&b<v.column)throw new Error("Section offsets must be ordered and non-overlapping.");return v=_,{generatedOffset:{generatedLine:E+1,generatedColumn:b+1},consumer:new f(s.getArg(A,"map"))}})}d.prototype=Object.create(f.prototype),d.prototype.constructor=f,d.prototype._version=3,Object.defineProperty(d.prototype,"sources",{get:function(){for(var g=[],p=0;p<this._sections.length;p++)for(var m=0;m<this._sections[p].consumer.sources.length;m++)g.push(this._sections[p].consumer.sources[m]);return g}}),d.prototype.originalPositionFor=function(p){var m={generatedLine:s.getArg(p,"line"),generatedColumn:s.getArg(p,"column")},w=u.search(m,this._sections,function(A,_){var E=A.generatedLine-_.generatedOffset.generatedLine;return E||A.generatedColumn-_.generatedOffset.generatedColumn}),v=this._sections[w];return v?v.consumer.originalPositionFor({line:m.generatedLine-(v.generatedOffset.generatedLine-1),column:m.generatedColumn-(v.generatedOffset.generatedLine===m.generatedLine?v.generatedOffset.generatedColumn-1:0),bias:p.bias}):{source:null,line:null,column:null,name:null}},d.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(p){return p.consumer.hasContentsOfAllSources()})},d.prototype.sourceContentFor=function(p,m){for(var w=0;w<this._sections.length;w++){var v=this._sections[w],A=v.consumer.sourceContentFor(p,!0);if(A)return A}if(m)return null;throw new Error('"'+p+'" is not in the SourceMap.')},d.prototype.generatedPositionFor=function(p){for(var m=0;m<this._sections.length;m++){var w=this._sections[m];if(w.consumer.sources.indexOf(s.getArg(p,"source"))!==-1){var v=w.consumer.generatedPositionFor(p);if(v){var A={line:v.line+(w.generatedOffset.generatedLine-1),column:v.column+(w.generatedOffset.generatedLine===v.line?w.generatedOffset.generatedColumn-1:0)};return A}}}return{line:null,column:null}},d.prototype._parseMappings=function(p,m){this.__generatedMappings=[],this.__originalMappings=[];for(var w=0;w<this._sections.length;w++)for(var v=this._sections[w],A=v.consumer._generatedMappings,_=0;_<A.length;_++){var E=A[_],b=v.consumer._sources.at(E.source);v.consumer.sourceRoot!==null&&(b=s.join(v.consumer.sourceRoot,b)),this._sources.add(b),b=this._sources.indexOf(b);var x=v.consumer._names.at(E.name);this._names.add(x),x=this._names.indexOf(x);var y={source:b,generatedLine:E.generatedLine+(v.generatedOffset.generatedLine-1),generatedColumn:E.generatedColumn+(v.generatedOffset.generatedLine===E.generatedLine?v.generatedOffset.generatedColumn-1:0),originalLine:E.originalLine,originalColumn:E.originalColumn,name:x};this.__generatedMappings.push(y),typeof y.originalLine=="number"&&this.__originalMappings.push(y)}a(this.__generatedMappings,s.compareByGeneratedPositionsDeflated),a(this.__originalMappings,s.compareByOriginalPositions)},i.IndexedSourceMapConsumer=d},function(n,i){function r(E,b,x){if(b in E)return E[b];if(arguments.length===3)return x;throw new Error('"'+b+'" is a required argument.')}i.getArg=r;var s=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,u=/^data:.+\,.+$/;function o(E){var b=E.match(s);return b?{scheme:b[1],auth:b[2],host:b[3],port:b[4],path:b[5]}:null}i.urlParse=o;function c(E){var b="";return E.scheme&&(b+=E.scheme+":"),b+="//",E.auth&&(b+=E.auth+"@"),E.host&&(b+=E.host),E.port&&(b+=":"+E.port),E.path&&(b+=E.path),b}i.urlGenerate=c;function a(E){var b=E,x=o(E);if(x){if(!x.path)return E;b=x.path}for(var y=i.isAbsolute(b),C=b.split(/\/+/),B,T=0,M=C.length-1;M>=0;M--)B=C[M],B==="."?C.splice(M,1):B===".."?T++:T>0&&(B===""?(C.splice(M+1,T),T=0):(C.splice(M,2),T--));return b=C.join("/"),b===""&&(b=y?"/":"."),x?(x.path=b,c(x)):b}i.normalize=a;function f(E,b){E===""&&(E="."),b===""&&(b=".");var x=o(b),y=o(E);if(y&&(E=y.path||"/"),x&&!x.scheme)return y&&(x.scheme=y.scheme),c(x);if(x||b.match(u))return b;if(y&&!y.host&&!y.path)return y.host=b,c(y);var C=b.charAt(0)==="/"?b:a(E.replace(/\/+$/,"")+"/"+b);return y?(y.path=C,c(y)):C}i.join=f,i.isAbsolute=function(E){return E.charAt(0)==="/"||!!E.match(s)};function l(E,b){E===""&&(E="."),E=E.replace(/\/$/,"");for(var x=0;b.indexOf(E+"/")!==0;){var y=E.lastIndexOf("/");if(y<0||(E=E.slice(0,y),E.match(/^([^\/]+:\/)?\/*$/)))return b;++x}return Array(x+1).join("../")+b.substr(E.length+1)}i.relative=l;var h=function(){var E=Object.create(null);return!("__proto__"in E)}();function d(E){return E}function g(E){return m(E)?"$"+E:E}i.toSetString=h?d:g;function p(E){return m(E)?E.slice(1):E}i.fromSetString=h?d:p;function m(E){if(!E)return!1;var b=E.length;if(b<9||E.charCodeAt(b-1)!==95||E.charCodeAt(b-2)!==95||E.charCodeAt(b-3)!==111||E.charCodeAt(b-4)!==116||E.charCodeAt(b-5)!==111||E.charCodeAt(b-6)!==114||E.charCodeAt(b-7)!==112||E.charCodeAt(b-8)!==95||E.charCodeAt(b-9)!==95)return!1;for(var x=b-10;x>=0;x--)if(E.charCodeAt(x)!==36)return!1;return!0}function w(E,b,x){var y=E.source-b.source;return y!==0||(y=E.originalLine-b.originalLine,y!==0)||(y=E.originalColumn-b.originalColumn,y!==0||x)||(y=E.generatedColumn-b.generatedColumn,y!==0)||(y=E.generatedLine-b.generatedLine,y!==0)?y:E.name-b.name}i.compareByOriginalPositions=w;function v(E,b,x){var y=E.generatedLine-b.generatedLine;return y!==0||(y=E.generatedColumn-b.generatedColumn,y!==0||x)||(y=E.source-b.source,y!==0)||(y=E.originalLine-b.originalLine,y!==0)||(y=E.originalColumn-b.originalColumn,y!==0)?y:E.name-b.name}i.compareByGeneratedPositionsDeflated=v;function A(E,b){return E===b?0:E>b?1:-1}function _(E,b){var x=E.generatedLine-b.generatedLine;return x!==0||(x=E.generatedColumn-b.generatedColumn,x!==0)||(x=A(E.source,b.source),x!==0)||(x=E.originalLine-b.originalLine,x!==0)||(x=E.originalColumn-b.originalColumn,x!==0)?x:A(E.name,b.name)}i.compareByGeneratedPositionsInflated=_},function(n,i){i.GREATEST_LOWER_BOUND=1,i.LEAST_UPPER_BOUND=2;function r(s,u,o,c,a,f){var l=Math.floor((u-s)/2)+s,h=a(o,c[l],!0);return h===0?l:h>0?u-l>1?r(l,u,o,c,a,f):f==i.LEAST_UPPER_BOUND?u<c.length?u:-1:l:l-s>1?r(s,l,o,c,a,f):f==i.LEAST_UPPER_BOUND?l:s<0?-1:s}i.search=function(u,o,c,a){if(o.length===0)return-1;var f=r(-1,o.length,u,o,c,a||i.GREATEST_LOWER_BOUND);if(f<0)return-1;for(;f-1>=0&&c(o[f],o[f-1],!0)===0;)--f;return f}},function(n,i,r){var s=r(2),u=Object.prototype.hasOwnProperty;function o(){this._array=[],this._set=Object.create(null)}o.fromArray=function(a,f){for(var l=new o,h=0,d=a.length;h<d;h++)l.add(a[h],f);return l},o.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},o.prototype.add=function(a,f){var l=s.toSetString(a),h=u.call(this._set,l),d=this._array.length;(!h||f)&&this._array.push(a),h||(this._set[l]=d)},o.prototype.has=function(a){var f=s.toSetString(a);return u.call(this._set,f)},o.prototype.indexOf=function(a){var f=s.toSetString(a);if(u.call(this._set,f))return this._set[f];throw new Error('"'+a+'" is not in the set.')},o.prototype.at=function(a){if(a>=0&&a<this._array.length)return this._array[a];throw new Error("No element indexed by "+a)},o.prototype.toArray=function(){return this._array.slice()},i.ArraySet=o},function(n,i,r){var s=r(6),u=5,o=1<<u,c=o-1,a=o;function f(h){return h<0?(-h<<1)+1:(h<<1)+0}function l(h){var d=(h&1)===1,g=h>>1;return d?-g:g}i.encode=function(d){var g="",p,m=f(d);do p=m&c,m>>>=u,m>0&&(p|=a),g+=s.encode(p);while(m>0);return g},i.decode=function(d,g,p){var m=d.length,w=0,v=0,A,_;do{if(g>=m)throw new Error("Expected more digits in base 64 VLQ value.");if(_=s.decode(d.charCodeAt(g++)),_===-1)throw new Error("Invalid base64 digit: "+d.charAt(g-1));A=!!(_&a),_&=c,w=w+(_<<v),v+=u}while(A);p.value=l(w),p.rest=g}},function(n,i){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");i.encode=function(s){if(0<=s&&s<r.length)return r[s];throw new TypeError("Must be between 0 and 63: "+s)},i.decode=function(s){var u=65,o=90,c=97,a=122,f=48,l=57,h=43,d=47,g=26,p=52;return u<=s&&s<=o?s-u:c<=s&&s<=a?s-c+g:f<=s&&s<=l?s-f+p:s==h?62:s==d?63:-1}},function(n,i){function r(o,c,a){var f=o[c];o[c]=o[a],o[a]=f}function s(o,c){return Math.round(o+Math.random()*(c-o))}function u(o,c,a,f){if(a<f){var l=s(a,f),h=a-1;r(o,l,f);for(var d=o[f],g=a;g<f;g++)c(o[g],d)<=0&&(h+=1,r(o,h,g));r(o,h+1,g);var p=h+1;u(o,c,a,p-1),u(o,c,p+1,f)}}i.quickSort=function(o,c){u(o,c,0,o.length-1)}}])})})(Wd);const $e={alert:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("path",{"fill-rule":"evenodd",d:"M12.78 6.22a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06 0L3.22 7.28a.75.75 0 011.06-1.06L8 9.94l3.72-3.72a.75.75 0 011.06 0z"})),chevron_right:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("path",{"fill-rule":"evenodd",d:"M4.72 3.22a.75.75 0 011.06 1.06L2.06 8l3.72 3.72a.75.75 0 11-1.06 1.06L.47 8.53a.75.75 0 010-1.06l4.25-4.25zm6.56 0a.75.75 0 10-1.06 1.06L13.94 8l-3.72 3.72a.75.75 0 101.06 1.06l4.25-4.25a.75.75 0 000-1.06l-4.25-4.25z"})),dash:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8z"})),download:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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"}),S("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"}),S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("path",{"fill-rule":"evenodd",d:"M1.75 1A1.75 1.75 0 000 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3h-6.5a.25.25 0 01-.2-.1l-.9-1.2c-.33-.44-.85-.7-1.4-.7h-3.5z"})),gear:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("path",{"fill-rule":"evenodd",d:"M1.543 7.25h2.733c.144-2.074.866-3.756 1.58-4.948.12-.197.237-.381.353-.552a6.506 6.506 0 00-4.666 5.5zm2.733 1.5H1.543a6.506 6.506 0 004.666 5.5 11.13 11.13 0 01-.352-.552c-.715-1.192-1.437-2.874-1.581-4.948zm1.504 0h4.44a9.637 9.637 0 01-1.363 4.177c-.306.51-.612.919-.857 1.215a9.978 9.978 0 01-.857-1.215A9.637 9.637 0 015.78 8.75zm4.44-1.5H5.78a9.637 9.637 0 011.363-4.177c.306-.51.612-.919.857-1.215.245.296.55.705.857 1.215A9.638 9.638 0 0110.22 7.25zm1.504 1.5c-.144 2.074-.866 3.756-1.58 4.948-.12.197-.237.381-.353.552a6.506 6.506 0 004.666-5.5h-2.733zm2.733-1.5h-2.733c-.144-2.074-.866-3.756-1.58-4.948a11.738 11.738 0 00-.353-.552 6.506 6.506 0 014.666 5.5zM8 0a8 8 0 100 16A8 8 0 008 0z"})),history:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("path",{"fill-rule":"evenodd",d:"M9.598 1.591a.75.75 0 01.785-.175 7 7 0 11-8.967 8.967.75.75 0 01.961-.96 5.5 5.5 0 007.046-7.046.75.75 0 01.175-.786zm1.616 1.945a7 7 0 01-7.678 7.678 5.5 5.5 0 107.678-7.678z"})),play:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("path",{"fill-rule":"evenodd",d:"M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"})),search:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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"}),S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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:S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},S("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 Xi({error:e,onDismiss:t}){const[n,i]=oe(!1),[r,s]=oe(void 0);xe(()=>{if(e instanceof Error){const o=e.stack.split(`
|
|
`).map(c=>c.replace(/^(\s+)at (?:async )?(https?:.*)/,"$1at ($2)"));s(o.join(`
|
|
`)),Wd.exports.mapStackTrace(o.join(`
|
|
`),c=>{const a=c.map(f=>f.replace(/..\/..\/src\//,"src/")).join(`
|
|
`);s(a)})}},[e]);const u=Qe(()=>{let o="https://github.com/misode/misode.github.io/issues/new";return e instanceof Error?(o+=`?title=${encodeURIComponent(`${e.name}: ${e.message}`)}`,r&&(o+=`&body=${encodeURIComponent(`\`\`\`
|
|
${e.name}: ${e.message}
|
|
${r}
|
|
\`\`\`
|
|
`)}`)):o+=`?title=${encodeURIComponent(e.toString())}`,o},[e,r]);return S("div",{class:"error"},t&&S("div",{class:"error-dismiss",onClick:t},$e.x),S("h3",null,e instanceof Error?e.message:e,r&&S("span",{onClick:()=>i(!n)},$e.info)),r&&n&&S("pre",null,r),S("p",null,"If you think this is a bug, you can report it ",S("a",{href:u,target:"_blank"},"on GitHub")))}function vw({label:e,value:t,onChange:n}){const i=vi();return S("label",{class:"checkbox"},S("input",{id:i,type:"checkbox",checked:t,onClick:()=>n(!t)}),e)}function Wl(e,t,n){const i=r=>{const s=r.onChange&&(o=>{var a;const c=o.target.value;(a=r.onChange)==null||a.call(r,n(c))}),u=r.onEnter&&(o=>{var c;if(o.key==="Enter"){const a=o.target.value;(c=r.onEnter)==null||c.call(r,n(a))}});return S("input",tt(Ce({},r),{type:t,onChange:s,onKeyDown:u}))};return i.displayName=e,i}const Ei=Wl("TextInput","text",e=>e),ww=Wl("NumberInput","number",e=>Number(e)),gu=Wl("RangeInput","range",e=>Number(e));function mu({values:e,onSelect:t,searchPlaceholder:n,noResults:i}){const[r,s]=oe(""),u=Qe(()=>{var c;const o=r.trim().split(" ");return(c=e==null?void 0:e.filter(a=>o.every(f=>a.includes(f))))!=null?c:[]},[e,r]);return S(De,null,S(Vs,{icon:"search",large:!0,value:r,onChange:s,doSelect:1,placeholder:n!=null?n:"Search"}),S("div",{class:"result-list"},u.map(o=>S(Ee,{key:o,label:o,onClick:()=>t==null?void 0:t(o)})),u.length===0&&S(Ee,{label:i!=null?i:"No results"})))}const Vl="https://raw.githubusercontent.com/misode/technical-changes/main";let ta=null;async function Vd(){if(!ta){const e=await(await fetch(`${Vl}/index.json`)).json();ta=(await Promise.all(e.map((t,n)=>_w(Gd(t),n)))).flat().map(t=>tt(Ce({},t),{tags:[t.group.id,...t.tags]}))}return ta}async function _w(e,t){const n=await(await fetch(`${Vl}/${e.id}/index.json`)).json();return(await Promise.all(n.map((i,r)=>Aw(e,Gd(i),t,r)))).flat()}async function Aw(e,t,n,i){const r=await(await fetch(`${Vl}/${e.id}/${t.id}.md`)).text();return yw(r).map(s=>Ce({version:t,group:e,order:n*1e3+i},s))}function yw(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 Gd(e){return typeof e=="string"?{id:e,article:e.match(/\d\dw\d\d[a-z]/)?"minecraft-snapshot-"+e:e.match(/\d+\.\d+(\.\d+)?-pre[0-9]+/)?"minecraft-"+e.replaceAll(".","-").replaceAll("pre","pre-release-"):null}:Di(e)?e:{id:"unknown",article:null}}["1.15","1.16","1.17"].forEach(e=>localStorage.removeItem(`cache_${e}`));["mcdata_master","vanilla_datapack_summary"].forEach(e=>localStorage.removeItem(`cached_${e}`));caches.delete("misode-v1");const Ji="misode-v2",vu="cached_latest_version",na="22w18a",Fr="https://raw.githubusercontent.com/misode/mcmeta";function oi(e,t){return`${Fr}/${e.dynamic?t:`${e.ref}-${t}`}`}async function Ro(e){e.dynamic&&(localStorage.getItem(vu)!==na&&(await kw(t=>t.startsWith(`${Fr}/summary/`)||t.startsWith(`${Fr}/data/`)||t.startsWith(`${Fr}/assets/`)||t.startsWith(`${Fr}/registries/`)),localStorage.setItem(vu,na)),e.ref=na)}async function Ew(e,t,n){const i=He.versions.find(r=>r.id===e);if(!i){console.error(`[fetchData] Unknown version ${i} in ${JSON.stringify(He.versions)}`);return}await Ro(i),await Promise.all([bw(i,t),xw(i,n)])}async function bw(e,t){console.debug(`[fetchRegistries] ${e.id}`);try{const n=await sr(`${oi(e,"summary")}/registries/data.min.json`);for(const i in n)t.register(i,n[i].map(r=>"minecraft:"+r))}catch(n){console.warn("Error occurred while fetching registries:",Xt(n))}}async function xw(e,t){console.debug(`[fetchBlockStateMap] ${e.id}`);try{const n=await sr(`${oi(e,"summary")}/blocks/data.min.json`);for(const i in n)t["minecraft:"+i]={properties:n[i][0],default:n[i][1]}}catch(n){console.warn("Error occurred while fetching block state map:",Xt(n))}}async function Kd(e,t,n){console.debug(`[fetchPreset] ${e} ${t} ${n}`);const i=He.versions.find(r=>r.id===e);try{const r=["blockstates","models"].includes(t)?"assets":"data",s=`${oi(i,r)}/${r}/minecraft/${t}/${n}.json`;return await(await fetch(s)).json()}catch(r){throw new Error(`Error occurred while fetching ${t} preset ${n}: ${Xt(r)}`)}}async function Cw(e,t){console.debug(`[fetchAllPresets] ${e} ${t}`);const n=He.versions.find(i=>i.id===e);await Ro(n);try{const i=await sr(`${oi(n,"registries")}/${t}/data.min.json`);return new Map(await Promise.all(i.map(async r=>[r,await sr(`${oi(n,"data")}/data/minecraft/${t}/${r}.json`)])))}catch(i){throw new Error(`Error occurred while fetching all ${t} presets: ${Xt(i)}`)}}async function Fw(e){const t=He.versions.find(n=>n.id===e);await Ro(t);try{const n=`${oi(t,"summary")}/sounds/data.min.json`;return await sr(n)}catch(n){throw new Error(`Error occurred while fetching sounds for ${t}: ${Xt(n)}`)}}function Sw(e,t){const n=He.versions.find(i=>i.id===e);return`${oi(n,"assets")}/assets/minecraft/sounds/${t}.ogg`}async function Dw(){const e=He.versions[He.versions.length-1];await Ro(e);try{return sr(`${oi(e,"summary")}/versions/data.min.json`)}catch(t){throw new Error(`Error occured while fetching versions: ${Xt(t)}`)}}async function sr(e,t=n=>n){try{const n=await caches.open(Ji);console.debug(`[getData] Opened cache ${Ji} ${e}`);const i=await n.match(e);if(i&&i.ok)return console.debug(`[getData] Retrieving cached data ${e}`),await i.json();console.debug(`[getData] fetching data ${e}`);const r=await fetch(e),s=t(await r.json());return await n.put(e,new Response(JSON.stringify(s))),s}catch(n){console.warn(`[getData] Failed to open cache ${Ji}: ${Xt(n)}`),console.debug(`[getData] fetching data ${e}`);const i=await fetch(e);return t(await i.json())}}async function kw(e){try{const t=await caches.open(Ji);console.debug(`[deleteMatching] Opened cache ${Ji}`);const n=[];for(const i of await t.keys())e(i.url)&&n.push(t.delete(i));console.debug(`[deleteMatching] Removing ${n.length} cache objects...`),await Promise.all(n)}catch(t){console.warn(`[deleteMatching] Failed to open cache ${Ji}: ${Xt(t)}`)}}const Bw="modulepreload",wu={},Tw="/",ze=function(t,n){return!n||n.length===0?t():Promise.all(n.map(i=>{if(i=`${Tw}${i}`,i in wu)return;wu[i]=!0;const r=i.endsWith(".css"),s=r?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${s}`))return;const u=document.createElement("link");if(u.rel=r?"stylesheet":Bw,r||(u.as="script",u.crossOrigin=""),u.href=i,document.head.appendChild(u),r)return new Promise((o,c)=>{u.addEventListener("load",o),u.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},Xd=["1.15","1.16","1.17","1.18","1.18.2","1.19"],Li={},$i={},Lw={1.15:()=>ze(()=>import("./index.6fef1ef7.js").then(function(e){return e.i}),[]),1.16:()=>ze(()=>import("./index.a00dac78.js").then(function(e){return e.i}),[]),1.17:()=>ze(()=>import("./index.8076ef8d.js").then(function(e){return e.i}),[]),1.18:()=>ze(()=>import("./index.d40edef2.js").then(function(e){return e.i}),[]),"1.18.2":()=>ze(()=>import("./index.636ef3ff.js").then(function(e){return e.i}),[]),1.19:()=>ze(()=>import("./index.10fe8e42.js").then(function(e){return e.i}),[])};let Jd,Yd,Gs;async function Gl(e){return Li[e]||(Li[e]=(async()=>{try{const t=await Lw[e](),n=t.getCollections(),i={};await Ew(e,n,i);const r=t.getSchemas(n);return Li[e]={collections:n,schemas:r,blockStates:i},Li[e]}catch(t){throw new Error(`Cannot get version "${e}": ${Xt(t)}`)}})()),Li[e]}async function $w(e,t){var n;if(!$i[t]||$i[t].version!==e){const i=await Gl(e);Jd=ae.Reference(i.schemas,"configured_decorator"),Yd=ae.ChoiceNode([{type:"string",node:ae.StringNode(i.collections,{validator:"resource",params:{pool:"$worldgen/configured_feature"}})},{type:"object",node:ae.Reference(i.schemas,"configured_feature")}],{choiceContext:"feature"});const r=(n=He.generators.find(s=>s.id===t))==null?void 0:n.schema;if(!r)throw new Error(`Cannot find model ${t}`);try{const s=i.schemas.get(r),u=new ae.DataModel(s,{wrapLists:!0});$i[t]?u.reset($i[t].model.data,!1):(u.validate(!0),u.history=[JSON.stringify(u.data)]),$i[t]={model:u,version:e}}catch(s){const u=new Error(`Cannot get generator "${t}" for version "${e}": ${Xt(s)}`);throw s instanceof Error&&(u.stack=s.stack),u}}return $i[t].model}async function Mw(e){const t=await Gl(e);return Gs=t.collections,t.collections}async function Rw(e){return(await Gl(e)).blockStates}function Mt(e,t,n){const i=He.versions.findIndex(u=>u.id===e),r=t?He.versions.findIndex(u=>u.id===t):0,s=n?He.versions.findIndex(u=>u.id===n):He.versions.length-1;return r<=i&&i<=s}var Zd={exports:{}};(function(e){var t=function(){var n=String.fromCharCode,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",s={};function u(c,a){if(!s[c]){s[c]={};for(var f=0;f<c.length;f++)s[c][c.charAt(f)]=f}return s[c][a]}var o={compressToBase64:function(c){if(c==null)return"";var a=o._compress(c,6,function(f){return i.charAt(f)});switch(a.length%4){default:case 0:return a;case 1:return a+"===";case 2:return a+"==";case 3:return a+"="}},decompressFromBase64:function(c){return c==null?"":c==""?null:o._decompress(c.length,32,function(a){return u(i,c.charAt(a))})},compressToUTF16:function(c){return c==null?"":o._compress(c,15,function(a){return n(a+32)})+" "},decompressFromUTF16:function(c){return c==null?"":c==""?null:o._decompress(c.length,16384,function(a){return c.charCodeAt(a)-32})},compressToUint8Array:function(c){for(var a=o.compress(c),f=new Uint8Array(a.length*2),l=0,h=a.length;l<h;l++){var d=a.charCodeAt(l);f[l*2]=d>>>8,f[l*2+1]=d%256}return f},decompressFromUint8Array:function(c){if(c==null)return o.decompress(c);for(var a=new Array(c.length/2),f=0,l=a.length;f<l;f++)a[f]=c[f*2]*256+c[f*2+1];var h=[];return a.forEach(function(d){h.push(n(d))}),o.decompress(h.join(""))},compressToEncodedURIComponent:function(c){return c==null?"":o._compress(c,6,function(a){return r.charAt(a)})},decompressFromEncodedURIComponent:function(c){return c==null?"":c==""?null:(c=c.replace(/ /g,"+"),o._decompress(c.length,32,function(a){return u(r,c.charAt(a))}))},compress:function(c){return o._compress(c,16,function(a){return n(a)})},_compress:function(c,a,f){if(c==null)return"";var l,h,d={},g={},p="",m="",w="",v=2,A=3,_=2,E=[],b=0,x=0,y;for(y=0;y<c.length;y+=1)if(p=c.charAt(y),Object.prototype.hasOwnProperty.call(d,p)||(d[p]=A++,g[p]=!0),m=w+p,Object.prototype.hasOwnProperty.call(d,m))w=m;else{if(Object.prototype.hasOwnProperty.call(g,w)){if(w.charCodeAt(0)<256){for(l=0;l<_;l++)b=b<<1,x==a-1?(x=0,E.push(f(b)),b=0):x++;for(h=w.charCodeAt(0),l=0;l<8;l++)b=b<<1|h&1,x==a-1?(x=0,E.push(f(b)),b=0):x++,h=h>>1}else{for(h=1,l=0;l<_;l++)b=b<<1|h,x==a-1?(x=0,E.push(f(b)),b=0):x++,h=0;for(h=w.charCodeAt(0),l=0;l<16;l++)b=b<<1|h&1,x==a-1?(x=0,E.push(f(b)),b=0):x++,h=h>>1}v--,v==0&&(v=Math.pow(2,_),_++),delete g[w]}else for(h=d[w],l=0;l<_;l++)b=b<<1|h&1,x==a-1?(x=0,E.push(f(b)),b=0):x++,h=h>>1;v--,v==0&&(v=Math.pow(2,_),_++),d[m]=A++,w=String(p)}if(w!==""){if(Object.prototype.hasOwnProperty.call(g,w)){if(w.charCodeAt(0)<256){for(l=0;l<_;l++)b=b<<1,x==a-1?(x=0,E.push(f(b)),b=0):x++;for(h=w.charCodeAt(0),l=0;l<8;l++)b=b<<1|h&1,x==a-1?(x=0,E.push(f(b)),b=0):x++,h=h>>1}else{for(h=1,l=0;l<_;l++)b=b<<1|h,x==a-1?(x=0,E.push(f(b)),b=0):x++,h=0;for(h=w.charCodeAt(0),l=0;l<16;l++)b=b<<1|h&1,x==a-1?(x=0,E.push(f(b)),b=0):x++,h=h>>1}v--,v==0&&(v=Math.pow(2,_),_++),delete g[w]}else for(h=d[w],l=0;l<_;l++)b=b<<1|h&1,x==a-1?(x=0,E.push(f(b)),b=0):x++,h=h>>1;v--,v==0&&(v=Math.pow(2,_),_++)}for(h=2,l=0;l<_;l++)b=b<<1|h&1,x==a-1?(x=0,E.push(f(b)),b=0):x++,h=h>>1;for(;;)if(b=b<<1,x==a-1){E.push(f(b));break}else x++;return E.join("")},decompress:function(c){return c==null?"":c==""?null:o._decompress(c.length,32768,function(a){return c.charCodeAt(a)})},_decompress:function(c,a,f){var l=[],h=4,d=4,g=3,p="",m=[],w,v,A,_,E,b,x,y={val:f(0),position:a,index:1};for(w=0;w<3;w+=1)l[w]=w;for(A=0,E=Math.pow(2,2),b=1;b!=E;)_=y.val&y.position,y.position>>=1,y.position==0&&(y.position=a,y.val=f(y.index++)),A|=(_>0?1:0)*b,b<<=1;switch(A){case 0:for(A=0,E=Math.pow(2,8),b=1;b!=E;)_=y.val&y.position,y.position>>=1,y.position==0&&(y.position=a,y.val=f(y.index++)),A|=(_>0?1:0)*b,b<<=1;x=n(A);break;case 1:for(A=0,E=Math.pow(2,16),b=1;b!=E;)_=y.val&y.position,y.position>>=1,y.position==0&&(y.position=a,y.val=f(y.index++)),A|=(_>0?1:0)*b,b<<=1;x=n(A);break;case 2:return""}for(l[3]=x,v=x,m.push(x);;){if(y.index>c)return"";for(A=0,E=Math.pow(2,g),b=1;b!=E;)_=y.val&y.position,y.position>>=1,y.position==0&&(y.position=a,y.val=f(y.index++)),A|=(_>0?1:0)*b,b<<=1;switch(x=A){case 0:for(A=0,E=Math.pow(2,8),b=1;b!=E;)_=y.val&y.position,y.position>>=1,y.position==0&&(y.position=a,y.val=f(y.index++)),A|=(_>0?1:0)*b,b<<=1;l[d++]=n(A),x=d-1,h--;break;case 1:for(A=0,E=Math.pow(2,16),b=1;b!=E;)_=y.val&y.position,y.position>>=1,y.position==0&&(y.position=a,y.val=f(y.index++)),A|=(_>0?1:0)*b,b<<=1;l[d++]=n(A),x=d-1,h--;break;case 2:return m.join("")}if(h==0&&(h=Math.pow(2,g),g++),l[x])p=l[x];else if(x===d)p=v+v.charAt(0);else return null;m.push(p),l[d++]=v+p.charAt(0),h--,v=p,h==0&&(h=Math.pow(2,g),g++)}}};return o}();e!=null&&(e.exports=t)})(Zd);var qd=Zd.exports;const Iw="https://z15g7can.directus.app/items",Za="share",_u=new Map;async function Ow(e,t,n,i){try{const r=qd.compressToBase64(JSON.stringify(n)),s=btoa(JSON.stringify(n));console.log("Compression rate",s.length/r.length);const u=JSON.stringify({data:r,type:e,version:t,show_preview:i});let o=_u.get(u);if(!o){const a=await Qd("/snippets",u);_u.set(u,a.id),o=a.id}const c=He.generators.find(a=>a.id===e);return`${location.protocol}//${location.host}/${c.url}/?${Za}=${o}`}catch(r){throw r instanceof Error&&(r.message=`Error creating share link: ${r.message}`),r}}async function Au(e){var t;try{const n=await Qd(`/snippets/${e}`);return tt(Ce({},n),{data:JSON.parse((t=qd.decompressFromBase64(n.data))!=null?t:"{}")})}catch(n){throw n instanceof Error&&(n.message=`Error loading shared content: ${n.message}`),n}}async function Qd(e,t){var r,s,u;const i=await(await fetch(Iw+e,t?{method:"post",headers:{"Content-Type":"application/json"},body:t}:void 0)).json();if(i.data)return i.data;throw new Error((u=(s=(r=i.errors)==null?void 0:r[0])==null?void 0:s.message)!=null?u:"Unknown error")}var e0=JSON.parse('{"add":"Add","add_bottom":"Add to bottom","add_top":"Add to top","advancement":"Advancement","any_version":"Any","assets":"Assets","block_definition":"Blockstate","changelog.search":"Search changes","changelog.no_results":"No changes","chat_type":"Chat Type","collapse":"Collapse","collapse_all":"Hold %0% to collapse all","configure_layers":"Configure layers","copy":"Copy","copy_share":"Copy share link","copied":"Copied!","copy_context":"Copy context","dimension_type":"Dimension Type","dimension":"Dimension","disabled":"Disabled","download":"Download","duplicate":"Duplicate","enabled":"Enabled","entries_hidden":"%0% entries hidden","entries_hidden.more":"Show %0% more","entries_hidden.all":"Show all","expand":"Expand","expand_all":"Hold %0% to expand all","feature.decorated.decorators":"Decorators","feature.decorated.decorators.entry":"Decorator","follow_reference":"Follow reference","format.json":"JSON","format.yaml":"YAML","fields":"Fields","generate_new_seed":"Generate new seed","github":"GitHub","guides.all":"All guides","guides.search":"Search guides","guides.no_results.version":"No guides for this version","guides.no_results.query":"No guides for this query","hide_output":"Hide output","hide_preview":"Hide preview","home":"Home","import":"Import","indentation.2_spaces":"2 spaces","indentation.4_spaces":"4 spaces","indentation.minified":"Minified","indentation.tabs":"Tabs","item_modifier":"Item Modifier","language":"Language","layer.biomes":"Biomes","layer.temperature":"Temperature","layer.humidity":"Humidity","layer.continentalness":"Continentalness","layer.erosion":"Erosion","layer.weirdness":"Weirdness","layer.offset":"Offset","layer.factor":"Factor","layer.jaggedness":"Jaggedness","highlighting":"Highlighting","loading":"Loading...","loot_table":"Loot Table","model":"Model","more":"More","move_down":"Move down","move_up":"Move up","not_found.description":"The page you were looking for does not exist.","no_presets":"No presets","output_settings":"Output settings","predicate":"Predicate","recipe":"Recipe","redo":"Redo","reset":"Reset","restore_backup":"Restore last backup","settings":"Settings","settings.fields.description":"Customize advanced field settings","settings.fields.path":"Context","settings.fields.name":"Name","share":"Share","theme":"Theme","theme.dark":"Dark","theme.light":"Light","theme.system":"System","title.changelog":"Technical Changelog","title.generator":"%0% Generator","title.generator_category":"%0% Generators","title.guides":"Data Pack Guides","title.home":"Data Pack Generators","title.project":"%0% Project","title.sounds":"Sound Explorer","title.versions":"Versions Explorer","presets":"Presets","preview":"Visualize","preview.auto_scroll":"Auto scroll","preview.biome":"Biome","preview.scale":"Scale","preview.depth":"Depth","preview.factor":"Factor","preview.offset":"Offset","preview.peaks":"Peaks","preview.width":"Width","project.delete_file":"Delete file","project.go_to":"Go to project","project.new_file":"New file","project.no_files":"No files","project.search":"Search project","project.search_drafts":"Search drafts","project.unsaved_file":"Unsaved file","remove":"Remove","search":"Search","show_output":"Show output","show_preview":"Show preview","sounds.play":"Play","sounds.play_sound":"Play sound","sounds.play_all":"Play all","sounds.search":"Search sounds","sounds.download_function":"Download Mcfunction","sounds.delay":"Delay","sounds.pitch":"Pitch","sounds.volume":"Volume","sounds.copy_command":"Copy command","sounds.add_sound":"Add sound","sounds.remove_sound":"Remove sound","sounds.unknown_sound":"Unknown sound","sounds.loading_sound":"Loading sound","source_placeholder":"Paste raw %0% content here","switch_generator":"Switch generator","switch_version":"Switch version","terrain_settings":"Terrain settings","text_component":"Text Component","undo":"Undo","versions.search":"Search versions","versions.no_results":"No results","versions.all":"All versions","versions.previous":"Previous","versions.next":"Next","versions.released":"Released","versions.release_target":"Release target","versions.data_version":"Data version","versions.protocol_version":"Protocol version","versions.pack_format":"Pack format","versions.data_pack_format":"Data pack format","versions.resource_pack_format":"Resource pack format","versions.technical_changes":"Technical changes","versions.discussion":"Discussion","world":"World Settings","worldgen":"Worldgen","worldgen/biome":"Biome","worldgen/configured_carver":"Carver","worldgen/configured_feature":"Feature","worldgen/density_function":"Density Function","worldgen/placed_feature":"Placed Feature","worldgen/noise":"Noise","worldgen/noise_settings":"Noise Settings","worldgen/processor_list":"Processor List","worldgen/configured_structure_feature":"Structure Feature","worldgen/structure":"Structure","worldgen/structure_set":"Structure Set","worldgen/configured_surface_builder":"Surface Builder","worldgen/template_pool":"Template Pool","worldgen/world_preset":"World Preset","worldgen/flat_level_generator_preset":"Flat World Preset","zoom_in":"Zoom in","zoom_out":"Zoom out"}'),Nw=Object.freeze(Object.defineProperty({__proto__:null,default:e0},Symbol.toStringTag,{value:"Module"})),_t;(e=>{e.ID_LANGUAGE="language",e.ID_THEME="theme",e.ID_VERSION="schema_version",e.ID_INDENT="indentation",e.ID_FORMAT="output_format",e.ID_HIGHLIGHTING="output_highlighting",e.ID_SOUNDS_VERSION="minecraft_sounds_version",e.ID_PROJECTS="misode_projects",e.ID_BACKUPS="misode_generator_backups";function t(){var 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 i(){const A=localStorage.getItem(e.ID_VERSION);return A&&Xd.includes(A)?A:"1.18.2"}e.getVersion=i;function r(){var A;return(A=localStorage.getItem(e.ID_INDENT))!=null?A:"2_spaces"}e.getIndent=r;function s(){var A;return(A=localStorage.getItem(e.ID_FORMAT))!=null?A:"json"}e.getFormat=s;function u(){return localStorage.getItem(e.ID_HIGHLIGHTING)!=="false"}e.getHighlighting=u;function o(){var A;return(A=localStorage.getItem(e.ID_SOUNDS_VERSION))!=null?A:"latest"}e.getSoundsVersion=o;function c(){const A=localStorage.getItem(e.ID_PROJECTS);return A?JSON.parse(A):[ho]}e.getProjects=c;function a(A){var E;return JSON.parse((E=localStorage.getItem(e.ID_BACKUPS))!=null?E:"{}")[A]}e.getBackup=a;function f(A){A&&localStorage.setItem(e.ID_LANGUAGE,A)}e.setLanguage=f;function l(A){A&&localStorage.setItem(e.ID_THEME,A)}e.setTheme=l;function h(A){A&&localStorage.setItem(e.ID_VERSION,A)}e.setVersion=h;function d(A){A&&localStorage.setItem(e.ID_INDENT,A)}e.setIndent=d;function g(A){A&&localStorage.setItem(e.ID_FORMAT,A)}e.setFormat=g;function p(A){A!==void 0&&localStorage.setItem(e.ID_HIGHLIGHTING,A.toString())}e.setHighlighting=p;function m(A){A&&localStorage.setItem(e.ID_SOUNDS_VERSION,A)}e.setSoundsVersion=m;function w(A){A&&localStorage.setItem(e.ID_PROJECTS,JSON.stringify(A))}e.setProjects=w;function v(A,_){var b;const E=JSON.parse((b=localStorage.getItem(e.ID_BACKUPS))!=null?b:"{}");_===void 0?delete E[A]:E[A]=_,localStorage.setItem(e.ID_BACKUPS,JSON.stringify(E))}e.setBackup=v})(_t||(_t={}));function Pw(e){switch(e){case"../../../node_modules/@mcschema/locales/src/cs.json":return ze(()=>import("./cs.967a01eb.js"),[]);case"../../../node_modules/@mcschema/locales/src/de.json":return ze(()=>import("./de.8e2383d8.js"),[]);case"../../../node_modules/@mcschema/locales/src/en.json":return ze(()=>import("./en.4ab98cb7.js"),[]);case"../../../node_modules/@mcschema/locales/src/es.json":return ze(()=>import("./es.6b3597bc.js"),[]);case"../../../node_modules/@mcschema/locales/src/fr.json":return ze(()=>import("./fr.e316b1e2.js"),[]);case"../../../node_modules/@mcschema/locales/src/it.json":return ze(()=>import("./it.7ff123cd.js"),[]);case"../../../node_modules/@mcschema/locales/src/ja.json":return ze(()=>import("./ja.3170354d.js"),[]);case"../../../node_modules/@mcschema/locales/src/pl.json":return ze(()=>import("./pl.ae1f6791.js"),[]);case"../../../node_modules/@mcschema/locales/src/pt.json":return ze(()=>import("./pt.31e14993.js"),[]);case"../../../node_modules/@mcschema/locales/src/ru.json":return ze(()=>import("./ru.1298edc9.js"),[]);case"../../../node_modules/@mcschema/locales/src/sk.json":return ze(()=>import("./sk.d4265232.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-cn.json":return ze(()=>import("./zh-cn.4129665a.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-tw.json":return ze(()=>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 zw(e){switch(e){case"../../locales/de.json":return ze(()=>import("./de.a269acce.js"),[]);case"../../locales/en.json":return ze(()=>Promise.resolve().then(function(){return Nw}),void 0);case"../../locales/es.json":return ze(()=>import("./es.833a9774.js"),[]);case"../../locales/fr.json":return ze(()=>import("./fr.f5531eea.js"),[]);case"../../locales/it.json":return ze(()=>import("./it.fd9a8268.js"),[]);case"../../locales/ja.json":return ze(()=>import("./ja.167de97b.js"),[]);case"../../locales/pl.json":return ze(()=>import("./pl.3a9fb38c.js"),[]);case"../../locales/pt.json":return ze(()=>import("./pt.1a04bd2d.js"),[]);case"../../locales/ru.json":return ze(()=>import("./ru.578070fe.js"),[]);case"../../locales/sk.json":return ze(()=>import("./sk.96bbf351.js"),[]);case"../../locales/zh-cn.json":return ze(()=>import("./zh-cn.e3c47b68.js"),[]);case"../../locales/zh-tw.json":return ze(()=>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 t0=fr({lang:"none",locale:e=>e,changeLanguage:()=>{}}),Rr={fallback:e0};function Oe(e,t,...n){var r,s,u,o,c;const i=(c=(o=(u=(r=Rr[e])==null?void 0:r[t])!=null?u:(s=Rr.en)==null?void 0:s[t])!=null?o:Rr.fallback[t])!=null?c:t;return Uw(i,n)}function Uw(e,t){return e.replace(/%\d+%/g,n=>{const i=parseInt(n.slice(1,-1));return(t==null?void 0:t[i])!==void 0?t[i]:n})}async function ia(e){if(Rr[e])return;const t=He.languages.find(r=>r.code===e);if(!t)return;const n=await zw(`../../locales/${e}.json`),i=t.schemas!==!1&&await Pw(`../../../node_modules/@mcschema/locales/src/${e}.json`);Rr[e]=Ce(Ce({},n.default),i.default)}function rt(){return pr(t0)}function Hw({children:e}){const[t,n]=oe("none"),i=At((u,...o)=>Oe(t,u,...o),[t]),r=At(async u=>{await ia(u),lt.setLanguage(u),_t.setLanguage(u),n(u)},[]);xe(()=>{(async()=>{const u=_t.getLanguage();await Promise.all([ia("en"),...u!=="en"?[ia(u)]:[]]),n(u)})()},[]);const s={lang:t,locale:i,changeLanguage:r};return S(t0.Provider,{value:s},e)}const ho={name:"Drafts",namespace:"draft",files:[]},n0=fr({project:ho,changeProject:()=>{},updateProject:()=>{},updateFile:()=>!1,openFile:()=>{},closeFile:()=>{}});function i0(){return pr(n0)}function jw({children:e}){const[t,n]=oe(_t.getProjects()),[i,r]=oe(ho.name),s=Qe(()=>{var p;return(p=t.find(m=>m.name===i))!=null?p:ho},[t,i]),[u,o]=oe(void 0),c=Qe(()=>{if(!!u)return s.files.find(p=>p.type===u[0]&&p.id===u[1])},[s,u]),a=At(p=>{_t.setProjects(p),n(p)},[]),f=At(p=>{a(t.map(m=>m.name===i?Ce(Ce({},m),p):m))},[t,i]),l=At((p,m,w)=>{var v;if(!w.id)f({files:s.files.filter(A=>A.type!==p||A.id!==m)});else{const A=w.id.includes(":")?w.id:`${s.namespace}:${w.id}`,_=s.files.some(E=>E.type===p&&E.id===A);if(m){if((c==null?void 0:c.id)===m&&m!==A&&_)return!1;f({files:s.files.map(E=>E.type===p&&E.id===m?tt(Ce(Ce({},E),w),{id:A}):E)}),(c==null?void 0:c.id)===m&&o([p,A])}else{if(_)return!1;f({files:[...s.files,{type:p,id:A,data:(v=w.data)!=null?v:{}}]}),o([p,A])}}return!0},[f,s,c]),h=At((p,m)=>{const w=He.generators.find(v=>v.id===p||v.path===p);if(!w)throw new Error(`Cannot find generator of type ${p}`);o([w.id,m]),ri(Nn(w.url))},[]),d=At(()=>{o(void 0)},[]),g={project:s,file:c,changeProject:r,updateProject:f,updateFile:l,openFile:h,closeFile:d};return S(n0.Provider,{value:g},e)}function Ww(e){var r;const[t,n]=e.id.includes(":")?e.id.split(":"):["minecraft",e.id],i=He.generators.find(s=>s.id===e.type);if(!i)throw new Error(`Cannot find generator of type ${e.type}`);return`data/${t}/${(r=i.path)!=null?r:i.id}/${n}`}const r0=fr({theme:"dark",actualTheme:"dark",changeTheme:()=>{}});function s0(){return pr(r0)}function Vw({children:e}){const[t,n]=oe(_t.getTheme()),i=du("(prefers-color-scheme: light)"),r=du("(prefers-color-scheme: dark)");xe(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const s=At(o=>{lt.setTheme(o),_t.setTheme(o),n(o)},[]);xe(()=>{lt.setPrefersColorScheme(i?"light":r?"dark":"none")},[i,r]);const u={theme:t,actualTheme:t==="light"||t!=="dark"&&i?"light":"dark",changeTheme:s};return S(r0.Provider,{value:u},e)}const Gw=3,o0=fr({title:"",changeTitle:()=>{}});function on(e,t){const n=pr(o0);return xe(()=>{e&&n.changeTitle(e,t)},[e,t]),n}function Kw({children:e}){const{locale:t}=rt(),[n,i]=oe(t("title.home")),r=At((u,o)=>{o!=null||(o=He.versions.map(a=>a.id));const c=o.slice(-Gw);document.title=`${u} Minecraft ${c.join(", ")}`,i(u)},[]),s={title:n,changeTitle:r};return S(o0.Provider,{value:s},e)}const Xw="version",a0=fr({version:"1.18.2",changeVersion:()=>{},changeTargetVersion:()=>{}});function vr(){return pr(a0)}function Jw({children:e}){const[t,n]=oe(_t.getVersion()),[i,r]=Gr(Xw);xe(()=>{Xd.includes(i)&&t!==i&&n(i)},[t,i]);const s=At((o,c=!0,a=!1)=>{(a||i)&&r(o,!0),c&&(lt.setVersion(o),_t.setVersion(o)),n(o)},[i]),u={version:t,changeVersion:s,changeTargetVersion:r};return S(a0.Provider,{value:u},e)}/*! pako 2.0.4 https://github.com/nodeca/pako @license (MIT AND Zlib) */const Yw=4,yu=0,Eu=1,Zw=2;function wr(e){let t=e.length;for(;--t>=0;)e[t]=0}const qw=0,l0=1,Qw=2,e_=3,t_=258,Kl=29,bs=256,Kr=bs+1+Kl,Yi=30,Xl=19,c0=2*Kr+1,di=15,ra=16,n_=7,Jl=256,u0=16,h0=17,f0=18,qa=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]),Ks=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]),i_=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),d0=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),r_=512,Bn=new Array((Kr+2)*2);wr(Bn);const Ir=new Array(Yi*2);wr(Ir);const Xr=new Array(r_);wr(Xr);const Jr=new Array(t_-e_+1);wr(Jr);const Yl=new Array(Kl);wr(Yl);const fo=new Array(Yi);wr(fo);function sa(e,t,n,i,r){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=i,this.max_length=r,this.has_stree=e&&e.length}let p0,g0,m0;function oa(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const v0=e=>e<256?Xr[e]:Xr[256+(e>>>7)],Yr=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},Rt=(e,t,n)=>{e.bi_valid>ra-n?(e.bi_buf|=t<<e.bi_valid&65535,Yr(e,e.bi_buf),e.bi_buf=t>>ra-e.bi_valid,e.bi_valid+=n-ra):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},fn=(e,t,n)=>{Rt(e,n[t*2],n[t*2+1])},w0=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},s_=e=>{e.bi_valid===16?(Yr(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)},o_=(e,t)=>{const n=t.dyn_tree,i=t.max_code,r=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.extra_bits,o=t.stat_desc.extra_base,c=t.stat_desc.max_length;let a,f,l,h,d,g,p=0;for(h=0;h<=di;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,a=e.heap_max+1;a<c0;a++)f=e.heap[a],h=n[n[f*2+1]*2+1]+1,h>c&&(h=c,p++),n[f*2+1]=h,!(f>i)&&(e.bl_count[h]++,d=0,f>=o&&(d=u[f-o]),g=n[f*2],e.opt_len+=g*(h+d),s&&(e.static_len+=g*(r[f*2+1]+d)));if(p!==0){do{for(h=c-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[c]--,p-=2}while(p>0);for(h=c;h!==0;h--)for(f=e.bl_count[h];f!==0;)l=e.heap[--a],!(l>i)&&(n[l*2+1]!==h&&(e.opt_len+=(h-n[l*2+1])*n[l*2],n[l*2+1]=h),f--)}},_0=(e,t,n)=>{const i=new Array(di+1);let r=0,s,u;for(s=1;s<=di;s++)i[s]=r=r+n[s-1]<<1;for(u=0;u<=t;u++){let o=e[u*2+1];o!==0&&(e[u*2]=w0(i[o]++,o))}},a_=()=>{let e,t,n,i,r;const s=new Array(di+1);for(n=0,i=0;i<Kl-1;i++)for(Yl[i]=n,e=0;e<1<<qa[i];e++)Jr[n++]=i;for(Jr[n-1]=i,r=0,i=0;i<16;i++)for(fo[i]=r,e=0;e<1<<Ks[i];e++)Xr[r++]=i;for(r>>=7;i<Yi;i++)for(fo[i]=r<<7,e=0;e<1<<Ks[i]-7;e++)Xr[256+r++]=i;for(t=0;t<=di;t++)s[t]=0;for(e=0;e<=143;)Bn[e*2+1]=8,e++,s[8]++;for(;e<=255;)Bn[e*2+1]=9,e++,s[9]++;for(;e<=279;)Bn[e*2+1]=7,e++,s[7]++;for(;e<=287;)Bn[e*2+1]=8,e++,s[8]++;for(_0(Bn,Kr+1,s),e=0;e<Yi;e++)Ir[e*2+1]=5,Ir[e*2]=w0(e,5);p0=new sa(Bn,qa,bs+1,Kr,di),g0=new sa(Ir,Ks,0,Yi,di),m0=new sa(new Array(0),i_,0,Xl,n_)},A0=e=>{let t;for(t=0;t<Kr;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Yi;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Xl;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Jl*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},y0=e=>{e.bi_valid>8?Yr(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},l_=(e,t,n,i)=>{y0(e),i&&(Yr(e,n),Yr(e,~n)),e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},bu=(e,t,n,i)=>{const r=t*2,s=n*2;return e[r]<e[s]||e[r]===e[s]&&i[t]<=i[n]},aa=(e,t,n)=>{const i=e.heap[n];let r=n<<1;for(;r<=e.heap_len&&(r<e.heap_len&&bu(t,e.heap[r+1],e.heap[r],e.depth)&&r++,!bu(t,i,e.heap[r],e.depth));)e.heap[n]=e.heap[r],n=r,r<<=1;e.heap[n]=i},xu=(e,t,n)=>{let i,r,s=0,u,o;if(e.last_lit!==0)do i=e.pending_buf[e.d_buf+s*2]<<8|e.pending_buf[e.d_buf+s*2+1],r=e.pending_buf[e.l_buf+s],s++,i===0?fn(e,r,t):(u=Jr[r],fn(e,u+bs+1,t),o=qa[u],o!==0&&(r-=Yl[u],Rt(e,r,o)),i--,u=v0(i),fn(e,u,n),o=Ks[u],o!==0&&(i-=fo[u],Rt(e,i,o)));while(s<e.last_lit);fn(e,Jl,t)},Qa=(e,t)=>{const n=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.has_stree,s=t.stat_desc.elems;let u,o,c=-1,a;for(e.heap_len=0,e.heap_max=c0,u=0;u<s;u++)n[u*2]!==0?(e.heap[++e.heap_len]=c=u,e.depth[u]=0):n[u*2+1]=0;for(;e.heap_len<2;)a=e.heap[++e.heap_len]=c<2?++c:0,n[a*2]=1,e.depth[a]=0,e.opt_len--,r&&(e.static_len-=i[a*2+1]);for(t.max_code=c,u=e.heap_len>>1;u>=1;u--)aa(e,n,u);a=s;do u=e.heap[1],e.heap[1]=e.heap[e.heap_len--],aa(e,n,1),o=e.heap[1],e.heap[--e.heap_max]=u,e.heap[--e.heap_max]=o,n[a*2]=n[u*2]+n[o*2],e.depth[a]=(e.depth[u]>=e.depth[o]?e.depth[u]:e.depth[o])+1,n[u*2+1]=n[o*2+1]=a,e.heap[1]=a++,aa(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],o_(e,t),_0(n,c,e.bl_count)},Cu=(e,t,n)=>{let i,r=-1,s,u=t[0*2+1],o=0,c=7,a=4;for(u===0&&(c=138,a=3),t[(n+1)*2+1]=65535,i=0;i<=n;i++)s=u,u=t[(i+1)*2+1],!(++o<c&&s===u)&&(o<a?e.bl_tree[s*2]+=o:s!==0?(s!==r&&e.bl_tree[s*2]++,e.bl_tree[u0*2]++):o<=10?e.bl_tree[h0*2]++:e.bl_tree[f0*2]++,o=0,r=s,u===0?(c=138,a=3):s===u?(c=6,a=3):(c=7,a=4))},Fu=(e,t,n)=>{let i,r=-1,s,u=t[0*2+1],o=0,c=7,a=4;for(u===0&&(c=138,a=3),i=0;i<=n;i++)if(s=u,u=t[(i+1)*2+1],!(++o<c&&s===u)){if(o<a)do fn(e,s,e.bl_tree);while(--o!==0);else s!==0?(s!==r&&(fn(e,s,e.bl_tree),o--),fn(e,u0,e.bl_tree),Rt(e,o-3,2)):o<=10?(fn(e,h0,e.bl_tree),Rt(e,o-3,3)):(fn(e,f0,e.bl_tree),Rt(e,o-11,7));o=0,r=s,u===0?(c=138,a=3):s===u?(c=6,a=3):(c=7,a=4)}},c_=e=>{let t;for(Cu(e,e.dyn_ltree,e.l_desc.max_code),Cu(e,e.dyn_dtree,e.d_desc.max_code),Qa(e,e.bl_desc),t=Xl-1;t>=3&&e.bl_tree[d0[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},u_=(e,t,n,i)=>{let r;for(Rt(e,t-257,5),Rt(e,n-1,5),Rt(e,i-4,4),r=0;r<i;r++)Rt(e,e.bl_tree[d0[r]*2+1],3);Fu(e,e.dyn_ltree,t-1),Fu(e,e.dyn_dtree,n-1)},h_=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return yu;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Eu;for(n=32;n<bs;n++)if(e.dyn_ltree[n*2]!==0)return Eu;return yu};let Su=!1;const f_=e=>{Su||(a_(),Su=!0),e.l_desc=new oa(e.dyn_ltree,p0),e.d_desc=new oa(e.dyn_dtree,g0),e.bl_desc=new oa(e.bl_tree,m0),e.bi_buf=0,e.bi_valid=0,A0(e)},E0=(e,t,n,i)=>{Rt(e,(qw<<1)+(i?1:0),3),l_(e,t,n,!0)},d_=e=>{Rt(e,l0<<1,3),fn(e,Jl,Bn),s_(e)},p_=(e,t,n,i)=>{let r,s,u=0;e.level>0?(e.strm.data_type===Zw&&(e.strm.data_type=h_(e)),Qa(e,e.l_desc),Qa(e,e.d_desc),u=c_(e),r=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=r&&(r=s)):r=s=n+5,n+4<=r&&t!==-1?E0(e,t,n,i):e.strategy===Yw||s===r?(Rt(e,(l0<<1)+(i?1:0),3),xu(e,Bn,Ir)):(Rt(e,(Qw<<1)+(i?1:0),3),u_(e,e.l_desc.max_code+1,e.d_desc.max_code+1,u+1),xu(e,e.dyn_ltree,e.dyn_dtree)),A0(e),i&&y0(e)},g_=(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[(Jr[n]+bs+1)*2]++,e.dyn_dtree[v0(t)*2]++),e.last_lit===e.lit_bufsize-1);var m_=f_,v_=E0,w_=p_,__=g_,A_=d_,y_={_tr_init:m_,_tr_stored_block:v_,_tr_flush_block:w_,_tr_tally:__,_tr_align:A_};const E_=(e,t,n,i)=>{let r=e&65535|0,s=e>>>16&65535|0,u=0;for(;n!==0;){u=n>2e3?2e3:n,n-=u;do r=r+t[i++]|0,s=s+r|0;while(--u);r%=65521,s%=65521}return r|s<<16|0};var Zr=E_;const b_=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},x_=new Uint32Array(b_()),C_=(e,t,n,i)=>{const r=x_,s=i+n;e^=-1;for(let u=i;u<s;u++)e=e>>>8^r[(e^t[u])&255];return e^-1};var vt=C_,qr={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Io={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:F_,_tr_stored_block:S_,_tr_flush_block:D_,_tr_tally:ei,_tr_align:k_}=y_,{Z_NO_FLUSH:ki,Z_PARTIAL_FLUSH:B_,Z_FULL_FLUSH:T_,Z_FINISH:ti,Z_BLOCK:Du,Z_OK:dn,Z_STREAM_END:ku,Z_STREAM_ERROR:Kt,Z_DATA_ERROR:L_,Z_BUF_ERROR:la,Z_DEFAULT_COMPRESSION:$_,Z_FILTERED:M_,Z_HUFFMAN_ONLY:ks,Z_RLE:R_,Z_FIXED:I_,Z_DEFAULT_STRATEGY:O_,Z_UNKNOWN:N_,Z_DEFLATED:Oo}=Io,P_=9,z_=15,U_=8,H_=29,j_=256,el=j_+1+H_,W_=30,V_=19,G_=2*el+1,K_=15,Ie=3,Jn=258,sn=Jn+Ie+1,X_=32,No=42,tl=69,Xs=73,Js=91,Ys=103,pi=113,Sr=666,mt=1,xs=2,bi=3,_r=4,J_=3,Yn=(e,t)=>(e.msg=qr[t],t),Bu=e=>(e<<1)-(e>4?9:0),Kn=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let Y_=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask,ni=Y_;const Wn=e=>{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},xt=(e,t)=>{D_(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Wn(e.strm)},Pe=(e,t)=>{e.pending_buf[e.pending++]=t},Er=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},Z_=(e,t,n,i)=>{let r=e.avail_in;return r>i&&(r=i),r===0?0:(e.avail_in-=r,t.set(e.input.subarray(e.next_in,e.next_in+r),n),e.state.wrap===1?e.adler=Zr(e.adler,t,r,n):e.state.wrap===2&&(e.adler=vt(e.adler,t,r,n)),e.next_in+=r,e.total_in+=r,r)},b0=(e,t)=>{let n=e.max_chain_length,i=e.strstart,r,s,u=e.prev_length,o=e.nice_match;const c=e.strstart>e.w_size-sn?e.strstart-(e.w_size-sn):0,a=e.window,f=e.w_mask,l=e.prev,h=e.strstart+Jn;let d=a[i+u-1],g=a[i+u];e.prev_length>=e.good_match&&(n>>=2),o>e.lookahead&&(o=e.lookahead);do if(r=t,!(a[r+u]!==g||a[r+u-1]!==d||a[r]!==a[i]||a[++r]!==a[i+1])){i+=2,r++;do;while(a[++i]===a[++r]&&a[++i]===a[++r]&&a[++i]===a[++r]&&a[++i]===a[++r]&&a[++i]===a[++r]&&a[++i]===a[++r]&&a[++i]===a[++r]&&a[++i]===a[++r]&&i<h);if(s=Jn-(h-i),i=h-Jn,s>u){if(e.match_start=t,u=s,s>=o)break;d=a[i+u-1],g=a[i+u]}}while((t=l[t&f])>c&&--n!==0);return u<=e.lookahead?u:e.lookahead},xi=e=>{const t=e.w_size;let n,i,r,s,u;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-sn)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,i=e.hash_size,n=i;do r=e.head[--n],e.head[n]=r>=t?r-t:0;while(--i);i=t,n=i;do r=e.prev[--n],e.prev[n]=r>=t?r-t:0;while(--i);s+=t}if(e.strm.avail_in===0)break;if(i=Z_(e.strm,e.window,e.strstart+e.lookahead,s),e.lookahead+=i,e.lookahead+e.insert>=Ie)for(u=e.strstart-e.insert,e.ins_h=e.window[u],e.ins_h=ni(e,e.ins_h,e.window[u+1]);e.insert&&(e.ins_h=ni(e,e.ins_h,e.window[u+Ie-1]),e.prev[u&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=u,u++,e.insert--,!(e.lookahead+e.insert<Ie)););}while(e.lookahead<sn&&e.strm.avail_in!==0)},q_=(e,t)=>{let n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(xi(e),e.lookahead===0&&t===ki)return mt;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;const i=e.block_start+n;if((e.strstart===0||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,xt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-sn&&(xt(e,!1),e.strm.avail_out===0))return mt}return e.insert=0,t===ti?(xt(e,!0),e.strm.avail_out===0?bi:_r):(e.strstart>e.block_start&&(xt(e,!1),e.strm.avail_out===0),mt)},ca=(e,t)=>{let n,i;for(;;){if(e.lookahead<sn){if(xi(e),e.lookahead<sn&&t===ki)return mt;if(e.lookahead===0)break}if(n=0,e.lookahead>=Ie&&(e.ins_h=ni(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-sn&&(e.match_length=b0(e,n)),e.match_length>=Ie)if(i=ei(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=ni(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=ni(e,e.ins_h,e.window[e.strstart+1]);else i=ei(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(xt(e,!1),e.strm.avail_out===0))return mt}return e.insert=e.strstart<Ie-1?e.strstart:Ie-1,t===ti?(xt(e,!0),e.strm.avail_out===0?bi:_r):e.last_lit&&(xt(e,!1),e.strm.avail_out===0)?mt:xs},Mi=(e,t)=>{let n,i,r;for(;;){if(e.lookahead<sn){if(xi(e),e.lookahead<sn&&t===ki)return mt;if(e.lookahead===0)break}if(n=0,e.lookahead>=Ie&&(e.ins_h=ni(e,e.ins_h,e.window[e.strstart+Ie-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=Ie-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-sn&&(e.match_length=b0(e,n),e.match_length<=5&&(e.strategy===M_||e.match_length===Ie&&e.strstart-e.match_start>4096)&&(e.match_length=Ie-1)),e.prev_length>=Ie&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-Ie,i=ei(e,e.strstart-1-e.prev_match,e.prev_length-Ie),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=r&&(e.ins_h=ni(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++,i&&(xt(e,!1),e.strm.avail_out===0))return mt}else if(e.match_available){if(i=ei(e,0,e.window[e.strstart-1]),i&&xt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return mt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=ei(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Ie-1?e.strstart:Ie-1,t===ti?(xt(e,!0),e.strm.avail_out===0?bi:_r):e.last_lit&&(xt(e,!1),e.strm.avail_out===0)?mt:xs},Q_=(e,t)=>{let n,i,r,s;const u=e.window;for(;;){if(e.lookahead<=Jn){if(xi(e),e.lookahead<=Jn&&t===ki)return mt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Ie&&e.strstart>0&&(r=e.strstart-1,i=u[r],i===u[++r]&&i===u[++r]&&i===u[++r])){s=e.strstart+Jn;do;while(i===u[++r]&&i===u[++r]&&i===u[++r]&&i===u[++r]&&i===u[++r]&&i===u[++r]&&i===u[++r]&&i===u[++r]&&r<s);e.match_length=Jn-(s-r),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Ie?(n=ei(e,1,e.match_length-Ie),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=ei(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(xt(e,!1),e.strm.avail_out===0))return mt}return e.insert=0,t===ti?(xt(e,!0),e.strm.avail_out===0?bi:_r):e.last_lit&&(xt(e,!1),e.strm.avail_out===0)?mt:xs},eA=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(xi(e),e.lookahead===0)){if(t===ki)return mt;break}if(e.match_length=0,n=ei(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(xt(e,!1),e.strm.avail_out===0))return mt}return e.insert=0,t===ti?(xt(e,!0),e.strm.avail_out===0?bi:_r):e.last_lit&&(xt(e,!1),e.strm.avail_out===0)?mt:xs};function cn(e,t,n,i,r){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=i,this.func=r}const Dr=[new cn(0,0,0,0,q_),new cn(4,4,8,4,ca),new cn(4,5,16,8,ca),new cn(4,6,32,32,ca),new cn(4,4,16,16,Mi),new cn(8,16,32,32,Mi),new cn(8,16,128,128,Mi),new cn(8,32,128,256,Mi),new cn(32,128,258,1024,Mi),new cn(32,258,258,4096,Mi)],tA=e=>{e.window_size=2*e.w_size,Kn(e.head),e.max_lazy_match=Dr[e.level].max_lazy,e.good_match=Dr[e.level].good_length,e.nice_match=Dr[e.level].nice_length,e.max_chain_length=Dr[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 nA(){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=Oo,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(G_*2),this.dyn_dtree=new Uint16Array((2*W_+1)*2),this.bl_tree=new Uint16Array((2*V_+1)*2),Kn(this.dyn_ltree),Kn(this.dyn_dtree),Kn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(K_+1),this.heap=new Uint16Array(2*el+1),Kn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*el+1),Kn(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 x0=e=>{if(!e||!e.state)return Yn(e,Kt);e.total_in=e.total_out=0,e.data_type=N_;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?No:pi,e.adler=t.wrap===2?0:1,t.last_flush=ki,F_(t),dn},C0=e=>{const t=x0(e);return t===dn&&tA(e.state),t},iA=(e,t)=>!e||!e.state||e.state.wrap!==2?Kt:(e.state.gzhead=t,dn),F0=(e,t,n,i,r,s)=>{if(!e)return Kt;let u=1;if(t===$_&&(t=6),i<0?(u=0,i=-i):i>15&&(u=2,i-=16),r<1||r>P_||n!==Oo||i<8||i>15||t<0||t>9||s<0||s>I_)return Yn(e,Kt);i===8&&(i=9);const o=new nA;return e.state=o,o.strm=e,o.wrap=u,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=r+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+Ie-1)/Ie),o.window=new Uint8Array(o.w_size*2),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<r+6,o.pending_buf_size=o.lit_bufsize*4,o.pending_buf=new Uint8Array(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=(1+2)*o.lit_bufsize,o.level=t,o.strategy=s,o.method=n,C0(e)},rA=(e,t)=>F0(e,t,Oo,z_,U_,O_),sA=(e,t)=>{let n,i;if(!e||!e.state||t>Du||t<0)return e?Yn(e,Kt):Kt;const r=e.state;if(!e.output||!e.input&&e.avail_in!==0||r.status===Sr&&t!==ti)return Yn(e,e.avail_out===0?la:Kt);r.strm=e;const s=r.last_flush;if(r.last_flush=t,r.status===No)if(r.wrap===2)e.adler=0,Pe(r,31),Pe(r,139),Pe(r,8),r.gzhead?(Pe(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Pe(r,r.gzhead.time&255),Pe(r,r.gzhead.time>>8&255),Pe(r,r.gzhead.time>>16&255),Pe(r,r.gzhead.time>>24&255),Pe(r,r.level===9?2:r.strategy>=ks||r.level<2?4:0),Pe(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(Pe(r,r.gzhead.extra.length&255),Pe(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=vt(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=tl):(Pe(r,0),Pe(r,0),Pe(r,0),Pe(r,0),Pe(r,0),Pe(r,r.level===9?2:r.strategy>=ks||r.level<2?4:0),Pe(r,J_),r.status=pi);else{let u=Oo+(r.w_bits-8<<4)<<8,o=-1;r.strategy>=ks||r.level<2?o=0:r.level<6?o=1:r.level===6?o=2:o=3,u|=o<<6,r.strstart!==0&&(u|=X_),u+=31-u%31,r.status=pi,Er(r,u),r.strstart!==0&&(Er(r,e.adler>>>16),Er(r,e.adler&65535)),e.adler=1}if(r.status===tl)if(r.gzhead.extra){for(n=r.pending;r.gzindex<(r.gzhead.extra.length&65535)&&!(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>n&&(e.adler=vt(e.adler,r.pending_buf,r.pending-n,n)),Wn(e),n=r.pending,r.pending===r.pending_buf_size));)Pe(r,r.gzhead.extra[r.gzindex]&255),r.gzindex++;r.gzhead.hcrc&&r.pending>n&&(e.adler=vt(e.adler,r.pending_buf,r.pending-n,n)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=Xs)}else r.status=Xs;if(r.status===Xs)if(r.gzhead.name){n=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>n&&(e.adler=vt(e.adler,r.pending_buf,r.pending-n,n)),Wn(e),n=r.pending,r.pending===r.pending_buf_size)){i=1;break}r.gzindex<r.gzhead.name.length?i=r.gzhead.name.charCodeAt(r.gzindex++)&255:i=0,Pe(r,i)}while(i!==0);r.gzhead.hcrc&&r.pending>n&&(e.adler=vt(e.adler,r.pending_buf,r.pending-n,n)),i===0&&(r.gzindex=0,r.status=Js)}else r.status=Js;if(r.status===Js)if(r.gzhead.comment){n=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>n&&(e.adler=vt(e.adler,r.pending_buf,r.pending-n,n)),Wn(e),n=r.pending,r.pending===r.pending_buf_size)){i=1;break}r.gzindex<r.gzhead.comment.length?i=r.gzhead.comment.charCodeAt(r.gzindex++)&255:i=0,Pe(r,i)}while(i!==0);r.gzhead.hcrc&&r.pending>n&&(e.adler=vt(e.adler,r.pending_buf,r.pending-n,n)),i===0&&(r.status=Ys)}else r.status=Ys;if(r.status===Ys&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Wn(e),r.pending+2<=r.pending_buf_size&&(Pe(r,e.adler&255),Pe(r,e.adler>>8&255),e.adler=0,r.status=pi)):r.status=pi),r.pending!==0){if(Wn(e),e.avail_out===0)return r.last_flush=-1,dn}else if(e.avail_in===0&&Bu(t)<=Bu(s)&&t!==ti)return Yn(e,la);if(r.status===Sr&&e.avail_in!==0)return Yn(e,la);if(e.avail_in!==0||r.lookahead!==0||t!==ki&&r.status!==Sr){let u=r.strategy===ks?eA(r,t):r.strategy===R_?Q_(r,t):Dr[r.level].func(r,t);if((u===bi||u===_r)&&(r.status=Sr),u===mt||u===bi)return e.avail_out===0&&(r.last_flush=-1),dn;if(u===xs&&(t===B_?k_(r):t!==Du&&(S_(r,0,0,!1),t===T_&&(Kn(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),Wn(e),e.avail_out===0))return r.last_flush=-1,dn}return t!==ti?dn:r.wrap<=0?ku:(r.wrap===2?(Pe(r,e.adler&255),Pe(r,e.adler>>8&255),Pe(r,e.adler>>16&255),Pe(r,e.adler>>24&255),Pe(r,e.total_in&255),Pe(r,e.total_in>>8&255),Pe(r,e.total_in>>16&255),Pe(r,e.total_in>>24&255)):(Er(r,e.adler>>>16),Er(r,e.adler&65535)),Wn(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?dn:ku)},oA=e=>{if(!e||!e.state)return Kt;const t=e.state.status;return t!==No&&t!==tl&&t!==Xs&&t!==Js&&t!==Ys&&t!==pi&&t!==Sr?Yn(e,Kt):(e.state=null,t===pi?Yn(e,L_):dn)},aA=(e,t)=>{let n=t.length;if(!e||!e.state)return Kt;const i=e.state,r=i.wrap;if(r===2||r===1&&i.status!==No||i.lookahead)return Kt;if(r===1&&(e.adler=Zr(e.adler,t,n,0)),i.wrap=0,n>=i.w_size){r===0&&(Kn(i.head),i.strstart=0,i.block_start=0,i.insert=0);let c=new Uint8Array(i.w_size);c.set(t.subarray(n-i.w_size,n),0),t=c,n=i.w_size}const s=e.avail_in,u=e.next_in,o=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,xi(i);i.lookahead>=Ie;){let c=i.strstart,a=i.lookahead-(Ie-1);do i.ins_h=ni(i,i.ins_h,i.window[c+Ie-1]),i.prev[c&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=c,c++;while(--a);i.strstart=c,i.lookahead=Ie-1,xi(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=Ie-1,i.match_available=0,e.next_in=u,e.input=o,e.avail_in=s,i.wrap=r,dn};var lA=rA,cA=F0,uA=C0,hA=x0,fA=iA,dA=sA,pA=oA,gA=aA,mA="pako deflate (from Nodeca project)",Or={deflateInit:lA,deflateInit2:cA,deflateReset:uA,deflateResetKeep:hA,deflateSetHeader:fA,deflate:dA,deflateEnd:pA,deflateSetDictionary:gA,deflateInfo:mA};const vA=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var wA=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 i in n)vA(n,i)&&(e[i]=n[i])}}return e},_A=e=>{let t=0;for(let i=0,r=e.length;i<r;i++)t+=e[i].length;const n=new Uint8Array(t);for(let i=0,r=0,s=e.length;i<s;i++){let u=e[i];n.set(u,r),r+=u.length}return n},Po={assign:wA,flattenChunks:_A};let S0=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{S0=!1}const Qr=new Uint8Array(256);for(let e=0;e<256;e++)Qr[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Qr[254]=Qr[254]=1;var AA=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,i,r,s,u=e.length,o=0;for(r=0;r<u;r++)n=e.charCodeAt(r),(n&64512)===55296&&r+1<u&&(i=e.charCodeAt(r+1),(i&64512)===56320&&(n=65536+(n-55296<<10)+(i-56320),r++)),o+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(o),s=0,r=0;s<o;r++)n=e.charCodeAt(r),(n&64512)===55296&&r+1<u&&(i=e.charCodeAt(r+1),(i&64512)===56320&&(n=65536+(n-55296<<10)+(i-56320),r++)),n<128?t[s++]=n:n<2048?(t[s++]=192|n>>>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 yA=(e,t)=>{if(t<65534&&e.subarray&&S0)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let i=0;i<t;i++)n+=String.fromCharCode(e[i]);return n};var EA=(e,t)=>{const n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let i,r;const s=new Array(n*2);for(r=0,i=0;i<n;){let u=e[i++];if(u<128){s[r++]=u;continue}let o=Qr[u];if(o>4){s[r++]=65533,i+=o-1;continue}for(u&=o===2?31:o===3?15:7;o>1&&i<n;)u=u<<6|e[i++]&63,o--;if(o>1){s[r++]=65533;continue}u<65536?s[r++]=u:(u-=65536,s[r++]=55296|u>>10&1023,s[r++]=56320|u&1023)}return yA(s,r)},bA=(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+Qr[e[n]]>t?n:t},es={string2buf:AA,buf2string:EA,utf8border:bA};function xA(){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 D0=xA;const k0=Object.prototype.toString,{Z_NO_FLUSH:CA,Z_SYNC_FLUSH:FA,Z_FULL_FLUSH:SA,Z_FINISH:DA,Z_OK:po,Z_STREAM_END:kA,Z_DEFAULT_COMPRESSION:BA,Z_DEFAULT_STRATEGY:TA,Z_DEFLATED:LA}=Io;function Zl(e){this.options=Po.assign({level:BA,method:LA,chunkSize:16384,windowBits:15,memLevel:8,strategy:TA},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 D0,this.strm.avail_out=0;let n=Or.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==po)throw new Error(qr[n]);if(t.header&&Or.deflateSetHeader(this.strm,t.header),t.dictionary){let i;if(typeof t.dictionary=="string"?i=es.string2buf(t.dictionary):k0.call(t.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(t.dictionary):i=t.dictionary,n=Or.deflateSetDictionary(this.strm,i),n!==po)throw new Error(qr[n]);this._dict_set=!0}}Zl.prototype.push=function(e,t){const n=this.strm,i=this.options.chunkSize;let r,s;if(this.ended)return!1;for(t===~~t?s=t:s=t===!0?DA:CA,typeof e=="string"?n.input=es.string2buf(e):k0.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(i),n.next_out=0,n.avail_out=i),(s===FA||s===SA)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(r=Or.deflate(n,s),r===kA)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),r=Or.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===po;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};Zl.prototype.onData=function(e){this.chunks.push(e)};Zl.prototype.onEnd=function(e){e===po&&(this.result=Po.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const Bs=30,$A=12;var MA=function(t,n){let i,r,s,u,o,c,a,f,l,h,d,g,p,m,w,v,A,_,E,b,x,y,C,B;const T=t.state;i=t.next_in,C=t.input,r=i+(t.avail_in-5),s=t.next_out,B=t.output,u=s-(n-t.avail_out),o=s+(t.avail_out-257),c=T.dmax,a=T.wsize,f=T.whave,l=T.wnext,h=T.window,d=T.hold,g=T.bits,p=T.lencode,m=T.distcode,w=(1<<T.lenbits)-1,v=(1<<T.distbits)-1;e:do{g<15&&(d+=C[i++]<<g,g+=8,d+=C[i++]<<g,g+=8),A=p[d&w];t:for(;;){if(_=A>>>24,d>>>=_,g-=_,_=A>>>16&255,_===0)B[s++]=A&65535;else if(_&16){E=A&65535,_&=15,_&&(g<_&&(d+=C[i++]<<g,g+=8),E+=d&(1<<_)-1,d>>>=_,g-=_),g<15&&(d+=C[i++]<<g,g+=8,d+=C[i++]<<g,g+=8),A=m[d&v];n:for(;;){if(_=A>>>24,d>>>=_,g-=_,_=A>>>16&255,_&16){if(b=A&65535,_&=15,g<_&&(d+=C[i++]<<g,g+=8,g<_&&(d+=C[i++]<<g,g+=8)),b+=d&(1<<_)-1,b>c){t.msg="invalid distance too far back",T.mode=Bs;break e}if(d>>>=_,g-=_,_=s-u,b>_){if(_=b-_,_>f&&T.sane){t.msg="invalid distance too far back",T.mode=Bs;break e}if(x=0,y=h,l===0){if(x+=a-_,_<E){E-=_;do B[s++]=h[x++];while(--_);x=s-b,y=B}}else if(l<_){if(x+=a+l-_,_-=l,_<E){E-=_;do B[s++]=h[x++];while(--_);if(x=0,l<E){_=l,E-=_;do B[s++]=h[x++];while(--_);x=s-b,y=B}}}else if(x+=l-_,_<E){E-=_;do B[s++]=h[x++];while(--_);x=s-b,y=B}for(;E>2;)B[s++]=y[x++],B[s++]=y[x++],B[s++]=y[x++],E-=3;E&&(B[s++]=y[x++],E>1&&(B[s++]=y[x++]))}else{x=s-b;do B[s++]=B[x++],B[s++]=B[x++],B[s++]=B[x++],E-=3;while(E>2);E&&(B[s++]=B[x++],E>1&&(B[s++]=B[x++]))}}else if((_&64)===0){A=m[(A&65535)+(d&(1<<_)-1)];continue n}else{t.msg="invalid distance code",T.mode=Bs;break e}break}}else if((_&64)===0){A=p[(A&65535)+(d&(1<<_)-1)];continue t}else if(_&32){T.mode=$A;break e}else{t.msg="invalid literal/length code",T.mode=Bs;break e}break}}while(i<r&&s<o);E=g>>3,i-=E,g-=E<<3,d&=(1<<g)-1,t.next_in=i,t.next_out=s,t.avail_in=i<r?5+(r-i):5-(i-r),t.avail_out=s<o?257+(o-s):257-(s-o),T.hold=d,T.bits=g};const Ri=15,Tu=852,Lu=592,$u=0,ua=1,Mu=2,RA=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),IA=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),OA=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),NA=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),PA=(e,t,n,i,r,s,u,o)=>{const c=o.bits;let a=0,f=0,l=0,h=0,d=0,g=0,p=0,m=0,w=0,v=0,A,_,E,b,x,y=null,C=0,B;const T=new Uint16Array(Ri+1),M=new Uint16Array(Ri+1);let R=null,I=0,H,P,j;for(a=0;a<=Ri;a++)T[a]=0;for(f=0;f<i;f++)T[t[n+f]]++;for(d=c,h=Ri;h>=1&&T[h]===0;h--);if(d>h&&(d=h),h===0)return r[s++]=1<<24|64<<16|0,r[s++]=1<<24|64<<16|0,o.bits=1,0;for(l=1;l<h&&T[l]===0;l++);for(d<l&&(d=l),m=1,a=1;a<=Ri;a++)if(m<<=1,m-=T[a],m<0)return-1;if(m>0&&(e===$u||h!==1))return-1;for(M[1]=0,a=1;a<Ri;a++)M[a+1]=M[a]+T[a];for(f=0;f<i;f++)t[n+f]!==0&&(u[M[t[n+f]]++]=f);if(e===$u?(y=R=u,B=19):e===ua?(y=RA,C-=257,R=IA,I-=257,B=256):(y=OA,R=NA,B=-1),v=0,f=0,a=l,x=s,g=d,p=0,E=-1,w=1<<d,b=w-1,e===ua&&w>Tu||e===Mu&&w>Lu)return 1;for(;;){H=a-p,u[f]<B?(P=0,j=u[f]):u[f]>B?(P=R[I+u[f]],j=y[C+u[f]]):(P=32+64,j=0),A=1<<a-p,_=1<<g,l=_;do _-=A,r[x+(v>>p)+_]=H<<24|P<<16|j|0;while(_!==0);for(A=1<<a-1;v&A;)A>>=1;if(A!==0?(v&=A-1,v+=A):v=0,f++,--T[a]===0){if(a===h)break;a=t[n+u[f]]}if(a>d&&(v&b)!==E){for(p===0&&(p=d),x+=l,g=a-p,m=1<<g;g+p<h&&(m-=T[g+p],!(m<=0));)g++,m<<=1;if(w+=1<<g,e===ua&&w>Tu||e===Mu&&w>Lu)return 1;E=v&b,r[E]=d<<24|g<<16|x-s|0}}return v!==0&&(r[x+v]=a-p<<24|64<<16|0),o.bits=d,0};var Nr=PA;const zA=0,B0=1,T0=2,{Z_FINISH:Ru,Z_BLOCK:UA,Z_TREES:Ts,Z_OK:Ci,Z_STREAM_END:HA,Z_NEED_DICT:jA,Z_STREAM_ERROR:Jt,Z_DATA_ERROR:L0,Z_MEM_ERROR:$0,Z_BUF_ERROR:WA,Z_DEFLATED:Iu}=Io,M0=1,Ou=2,Nu=3,Pu=4,zu=5,Uu=6,Hu=7,ju=8,Wu=9,Vu=10,go=11,xn=12,ha=13,Gu=14,fa=15,Ku=16,Xu=17,Ju=18,Yu=19,Ls=20,$s=21,Zu=22,qu=23,Qu=24,eh=25,th=26,da=27,nh=28,ih=29,nt=30,R0=31,VA=32,GA=852,KA=592,XA=15,JA=XA,rh=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function YA(){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 I0=e=>{if(!e||!e.state)return Jt;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=M0,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(GA),t.distcode=t.distdyn=new Int32Array(KA),t.sane=1,t.back=-1,Ci},O0=e=>{if(!e||!e.state)return Jt;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,I0(e)},N0=(e,t)=>{let n;if(!e||!e.state)return Jt;const i=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15)?Jt:(i.window!==null&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,O0(e))},P0=(e,t)=>{if(!e)return Jt;const n=new YA;e.state=n,n.window=null;const i=N0(e,t);return i!==Ci&&(e.state=null),i},ZA=e=>P0(e,JA);let sh=!0,pa,ma;const qA=e=>{if(sh){pa=new Int32Array(512),ma=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(Nr(B0,e.lens,0,288,pa,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Nr(T0,e.lens,0,32,ma,0,e.work,{bits:5}),sh=!1}e.lencode=pa,e.lenbits=9,e.distcode=ma,e.distbits=5},z0=(e,t,n,i)=>{let r;const s=e.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),i>=s.wsize?(s.window.set(t.subarray(n-s.wsize,n),0),s.wnext=0,s.whave=s.wsize):(r=s.wsize-s.wnext,r>i&&(r=i),s.window.set(t.subarray(n-i,n-i+r),s.wnext),i-=r,i?(s.window.set(t.subarray(n-i,n),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=r,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=r))),0},QA=(e,t)=>{let n,i,r,s,u,o,c,a,f,l,h,d,g,p,m=0,w,v,A,_,E,b,x,y;const C=new Uint8Array(4);let B,T;const M=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 Jt;n=e.state,n.mode===xn&&(n.mode=ha),u=e.next_out,r=e.output,c=e.avail_out,s=e.next_in,i=e.input,o=e.avail_in,a=n.hold,f=n.bits,l=o,h=c,y=Ci;e:for(;;)switch(n.mode){case M0:if(n.wrap===0){n.mode=ha;break}for(;f<16;){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}if(n.wrap&2&&a===35615){n.check=0,C[0]=a&255,C[1]=a>>>8&255,n.check=vt(n.check,C,2,0),a=0,f=0,n.mode=Ou;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((a&255)<<8)+(a>>8))%31){e.msg="incorrect header check",n.mode=nt;break}if((a&15)!==Iu){e.msg="unknown compression method",n.mode=nt;break}if(a>>>=4,f-=4,x=(a&15)+8,n.wbits===0)n.wbits=x;else if(x>n.wbits){e.msg="invalid window size",n.mode=nt;break}n.dmax=1<<n.wbits,e.adler=n.check=1,n.mode=a&512?Vu:xn,a=0,f=0;break;case Ou:for(;f<16;){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}if(n.flags=a,(n.flags&255)!==Iu){e.msg="unknown compression method",n.mode=nt;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=nt;break}n.head&&(n.head.text=a>>8&1),n.flags&512&&(C[0]=a&255,C[1]=a>>>8&255,n.check=vt(n.check,C,2,0)),a=0,f=0,n.mode=Nu;case Nu:for(;f<32;){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}n.head&&(n.head.time=a),n.flags&512&&(C[0]=a&255,C[1]=a>>>8&255,C[2]=a>>>16&255,C[3]=a>>>24&255,n.check=vt(n.check,C,4,0)),a=0,f=0,n.mode=Pu;case Pu:for(;f<16;){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}n.head&&(n.head.xflags=a&255,n.head.os=a>>8),n.flags&512&&(C[0]=a&255,C[1]=a>>>8&255,n.check=vt(n.check,C,2,0)),a=0,f=0,n.mode=zu;case zu:if(n.flags&1024){for(;f<16;){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}n.length=a,n.head&&(n.head.extra_len=a),n.flags&512&&(C[0]=a&255,C[1]=a>>>8&255,n.check=vt(n.check,C,2,0)),a=0,f=0}else n.head&&(n.head.extra=null);n.mode=Uu;case Uu:if(n.flags&1024&&(d=n.length,d>o&&(d=o),d&&(n.head&&(x=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(i.subarray(s,s+d),x)),n.flags&512&&(n.check=vt(n.check,i,d,s)),o-=d,s+=d,n.length-=d),n.length))break e;n.length=0,n.mode=Hu;case Hu:if(n.flags&2048){if(o===0)break e;d=0;do x=i[s+d++],n.head&&x&&n.length<65536&&(n.head.name+=String.fromCharCode(x));while(x&&d<o);if(n.flags&512&&(n.check=vt(n.check,i,d,s)),o-=d,s+=d,x)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=ju;case ju:if(n.flags&4096){if(o===0)break e;d=0;do x=i[s+d++],n.head&&x&&n.length<65536&&(n.head.comment+=String.fromCharCode(x));while(x&&d<o);if(n.flags&512&&(n.check=vt(n.check,i,d,s)),o-=d,s+=d,x)break e}else n.head&&(n.head.comment=null);n.mode=Wu;case Wu:if(n.flags&512){for(;f<16;){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}if(a!==(n.check&65535)){e.msg="header crc mismatch",n.mode=nt;break}a=0,f=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=xn;break;case Vu:for(;f<32;){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}e.adler=n.check=rh(a),a=0,f=0,n.mode=go;case go:if(n.havedict===0)return e.next_out=u,e.avail_out=c,e.next_in=s,e.avail_in=o,n.hold=a,n.bits=f,jA;e.adler=n.check=1,n.mode=xn;case xn:if(t===UA||t===Ts)break e;case ha:if(n.last){a>>>=f&7,f-=f&7,n.mode=da;break}for(;f<3;){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}switch(n.last=a&1,a>>>=1,f-=1,a&3){case 0:n.mode=Gu;break;case 1:if(qA(n),n.mode=Ls,t===Ts){a>>>=2,f-=2;break e}break;case 2:n.mode=Xu;break;case 3:e.msg="invalid block type",n.mode=nt}a>>>=2,f-=2;break;case Gu:for(a>>>=f&7,f-=f&7;f<32;){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}if((a&65535)!==(a>>>16^65535)){e.msg="invalid stored block lengths",n.mode=nt;break}if(n.length=a&65535,a=0,f=0,n.mode=fa,t===Ts)break e;case fa:n.mode=Ku;case Ku:if(d=n.length,d){if(d>o&&(d=o),d>c&&(d=c),d===0)break e;r.set(i.subarray(s,s+d),u),o-=d,s+=d,c-=d,u+=d,n.length-=d;break}n.mode=xn;break;case Xu:for(;f<14;){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}if(n.nlen=(a&31)+257,a>>>=5,f-=5,n.ndist=(a&31)+1,a>>>=5,f-=5,n.ncode=(a&15)+4,a>>>=4,f-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=nt;break}n.have=0,n.mode=Ju;case Ju:for(;n.have<n.ncode;){for(;f<3;){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}n.lens[M[n.have++]]=a&7,a>>>=3,f-=3}for(;n.have<19;)n.lens[M[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,B={bits:n.lenbits},y=Nr(zA,n.lens,0,19,n.lencode,0,n.work,B),n.lenbits=B.bits,y){e.msg="invalid code lengths set",n.mode=nt;break}n.have=0,n.mode=Yu;case Yu:for(;n.have<n.nlen+n.ndist;){for(;m=n.lencode[a&(1<<n.lenbits)-1],w=m>>>24,v=m>>>16&255,A=m&65535,!(w<=f);){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}if(A<16)a>>>=w,f-=w,n.lens[n.have++]=A;else{if(A===16){for(T=w+2;f<T;){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}if(a>>>=w,f-=w,n.have===0){e.msg="invalid bit length repeat",n.mode=nt;break}x=n.lens[n.have-1],d=3+(a&3),a>>>=2,f-=2}else if(A===17){for(T=w+3;f<T;){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}a>>>=w,f-=w,x=0,d=3+(a&7),a>>>=3,f-=3}else{for(T=w+7;f<T;){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}a>>>=w,f-=w,x=0,d=11+(a&127),a>>>=7,f-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=nt;break}for(;d--;)n.lens[n.have++]=x}}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,B={bits:n.lenbits},y=Nr(B0,n.lens,0,n.nlen,n.lencode,0,n.work,B),n.lenbits=B.bits,y){e.msg="invalid literal/lengths set",n.mode=nt;break}if(n.distbits=6,n.distcode=n.distdyn,B={bits:n.distbits},y=Nr(T0,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,B),n.distbits=B.bits,y){e.msg="invalid distances set",n.mode=nt;break}if(n.mode=Ls,t===Ts)break e;case Ls:n.mode=$s;case $s:if(o>=6&&c>=258){e.next_out=u,e.avail_out=c,e.next_in=s,e.avail_in=o,n.hold=a,n.bits=f,MA(e,h),u=e.next_out,r=e.output,c=e.avail_out,s=e.next_in,i=e.input,o=e.avail_in,a=n.hold,f=n.bits,n.mode===xn&&(n.back=-1);break}for(n.back=0;m=n.lencode[a&(1<<n.lenbits)-1],w=m>>>24,v=m>>>16&255,A=m&65535,!(w<=f);){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}if(v&&(v&240)===0){for(_=w,E=v,b=A;m=n.lencode[b+((a&(1<<_+E)-1)>>_)],w=m>>>24,v=m>>>16&255,A=m&65535,!(_+w<=f);){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}a>>>=_,f-=_,n.back+=_}if(a>>>=w,f-=w,n.back+=w,n.length=A,v===0){n.mode=th;break}if(v&32){n.back=-1,n.mode=xn;break}if(v&64){e.msg="invalid literal/length code",n.mode=nt;break}n.extra=v&15,n.mode=Zu;case Zu:if(n.extra){for(T=n.extra;f<T;){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}n.length+=a&(1<<n.extra)-1,a>>>=n.extra,f-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=qu;case qu:for(;m=n.distcode[a&(1<<n.distbits)-1],w=m>>>24,v=m>>>16&255,A=m&65535,!(w<=f);){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}if((v&240)===0){for(_=w,E=v,b=A;m=n.distcode[b+((a&(1<<_+E)-1)>>_)],w=m>>>24,v=m>>>16&255,A=m&65535,!(_+w<=f);){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}a>>>=_,f-=_,n.back+=_}if(a>>>=w,f-=w,n.back+=w,v&64){e.msg="invalid distance code",n.mode=nt;break}n.offset=A,n.extra=v&15,n.mode=Qu;case Qu:if(n.extra){for(T=n.extra;f<T;){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}n.offset+=a&(1<<n.extra)-1,a>>>=n.extra,f-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=nt;break}n.mode=eh;case eh:if(c===0)break e;if(d=h-c,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=nt;break}d>n.wnext?(d-=n.wnext,g=n.wsize-d):g=n.wnext-d,d>n.length&&(d=n.length),p=n.window}else p=r,g=u-n.offset,d=n.length;d>c&&(d=c),c-=d,n.length-=d;do r[u++]=p[g++];while(--d);n.length===0&&(n.mode=$s);break;case th:if(c===0)break e;r[u++]=n.length,c--,n.mode=$s;break;case da:if(n.wrap){for(;f<32;){if(o===0)break e;o--,a|=i[s++]<<f,f+=8}if(h-=c,e.total_out+=h,n.total+=h,h&&(e.adler=n.check=n.flags?vt(n.check,r,h,u-h):Zr(n.check,r,h,u-h)),h=c,(n.flags?a:rh(a))!==n.check){e.msg="incorrect data check",n.mode=nt;break}a=0,f=0}n.mode=nh;case nh:if(n.wrap&&n.flags){for(;f<32;){if(o===0)break e;o--,a+=i[s++]<<f,f+=8}if(a!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=nt;break}a=0,f=0}n.mode=ih;case ih:y=HA;break e;case nt:y=L0;break e;case R0:return $0;case VA:default:return Jt}return e.next_out=u,e.avail_out=c,e.next_in=s,e.avail_in=o,n.hold=a,n.bits=f,(n.wsize||h!==e.avail_out&&n.mode<nt&&(n.mode<da||t!==Ru))&&z0(e,e.output,e.next_out,h-e.avail_out),l-=e.avail_in,h-=e.avail_out,e.total_in+=l,e.total_out+=h,n.total+=h,n.wrap&&h&&(e.adler=n.check=n.flags?vt(n.check,r,h,e.next_out-h):Zr(n.check,r,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===xn?128:0)+(n.mode===Ls||n.mode===fa?256:0),(l===0&&h===0||t===Ru)&&y===Ci&&(y=WA),y},ey=e=>{if(!e||!e.state)return Jt;let t=e.state;return t.window&&(t.window=null),e.state=null,Ci},ty=(e,t)=>{if(!e||!e.state)return Jt;const n=e.state;return(n.wrap&2)===0?Jt:(n.head=t,t.done=!1,Ci)},ny=(e,t)=>{const n=t.length;let i,r,s;return!e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==go)?Jt:i.mode===go&&(r=1,r=Zr(r,t,n,0),r!==i.check)?L0:(s=z0(e,t,n,n),s?(i.mode=R0,$0):(i.havedict=1,Ci))};var iy=O0,ry=N0,sy=I0,oy=ZA,ay=P0,ly=QA,cy=ey,uy=ty,hy=ny,fy="pako inflate (from Nodeca project)",Tn={inflateReset:iy,inflateReset2:ry,inflateResetKeep:sy,inflateInit:oy,inflateInit2:ay,inflate:ly,inflateEnd:cy,inflateGetHeader:uy,inflateSetDictionary:hy,inflateInfo:fy};function dy(){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 py=dy;const U0=Object.prototype.toString,{Z_NO_FLUSH:gy,Z_FINISH:my,Z_OK:ts,Z_STREAM_END:va,Z_NEED_DICT:wa,Z_STREAM_ERROR:vy,Z_DATA_ERROR:oh,Z_MEM_ERROR:wy}=Io;function ql(e){this.options=Po.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 D0,this.strm.avail_out=0;let n=Tn.inflateInit2(this.strm,t.windowBits);if(n!==ts)throw new Error(qr[n]);if(this.header=new py,Tn.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=es.string2buf(t.dictionary):U0.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Tn.inflateSetDictionary(this.strm,t.dictionary),n!==ts)))throw new Error(qr[n])}ql.prototype.push=function(e,t){const n=this.strm,i=this.options.chunkSize,r=this.options.dictionary;let s,u,o;if(this.ended)return!1;for(t===~~t?u=t:u=t===!0?my:gy,U0.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(i),n.next_out=0,n.avail_out=i),s=Tn.inflate(n,u),s===wa&&r&&(s=Tn.inflateSetDictionary(n,r),s===ts?s=Tn.inflate(n,u):s===oh&&(s=wa));n.avail_in>0&&s===va&&n.state.wrap>0&&e[n.next_in]!==0;)Tn.inflateReset(n),s=Tn.inflate(n,u);switch(s){case vy:case oh:case wa:case wy:return this.onEnd(s),this.ended=!0,!1}if(o=n.avail_out,n.next_out&&(n.avail_out===0||s===va))if(this.options.to==="string"){let c=es.utf8border(n.output,n.next_out),a=n.next_out-c,f=es.buf2string(n.output,c);n.next_out=a,n.avail_out=i-a,a&&n.output.set(n.output.subarray(c,c+a),0),this.onData(f)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(s===ts&&o===0)){if(s===va)return s=Tn.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};ql.prototype.onData=function(e){this.chunks.push(e)};ql.prototype.onEnd=function(e){e===ts&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Po.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var H0={exports:{}},j0={exports:{}};(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,i){return n<<i|n>>>32-i},rotr:function(n,i){return n<<32-i|n>>>i},endian:function(n){if(n.constructor==Number)return t.rotl(n,8)&16711935|t.rotl(n,24)&4278255360;for(var i=0;i<n.length;i++)n[i]=t.endian(n[i]);return n},randomBytes:function(n){for(var i=[];n>0;n--)i.push(Math.floor(Math.random()*256));return i},bytesToWords:function(n){for(var i=[],r=0,s=0;r<n.length;r++,s+=8)i[s>>>5]|=n[r]<<24-s%32;return i},wordsToBytes:function(n){for(var i=[],r=0;r<n.length*32;r+=8)i.push(n[r>>>5]>>>24-r%32&255);return i},bytesToHex:function(n){for(var i=[],r=0;r<n.length;r++)i.push((n[r]>>>4).toString(16)),i.push((n[r]&15).toString(16));return i.join("")},hexToBytes:function(n){for(var i=[],r=0;r<n.length;r+=2)i.push(parseInt(n.substr(r,2),16));return i},bytesToBase64:function(n){for(var i=[],r=0;r<n.length;r+=3)for(var s=n[r]<<16|n[r+1]<<8|n[r+2],u=0;u<4;u++)r*8+u*6<=n.length*8?i.push(e.charAt(s>>>6*(3-u)&63)):i.push("=");return i.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var i=[],r=0,s=0;r<n.length;s=++r%4)s!=0&&i.push((e.indexOf(n.charAt(r-1))&Math.pow(2,-2*s+8)-1)<<s*2|e.indexOf(n.charAt(r))>>>6-s*2);return i}};j0.exports=t})();var nl={utf8:{stringToBytes:function(e){return nl.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(nl.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(e.charCodeAt(n)&255);return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},ah=nl;/*!
|
|
* Determine if an object is a Buffer
|
|
*
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
* @license MIT
|
|
*/var _y=function(e){return e!=null&&(W0(e)||Ay(e)||!!e._isBuffer)};function W0(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function Ay(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&W0(e.slice(0,0))}(function(){var e=j0.exports,t=ah.utf8,n=_y,i=ah.bin,r=function(s,u){s.constructor==String?u&&u.encoding==="binary"?s=i.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 o=e.bytesToWords(s),c=s.length*8,a=1732584193,f=-271733879,l=-1732584194,h=271733878,d=0;d<o.length;d++)o[d]=(o[d]<<8|o[d]>>>24)&16711935|(o[d]<<24|o[d]>>>8)&4278255360;o[c>>>5]|=128<<c%32,o[(c+64>>>9<<4)+14]=c;for(var g=r._ff,p=r._gg,m=r._hh,w=r._ii,d=0;d<o.length;d+=16){var v=a,A=f,_=l,E=h;a=g(a,f,l,h,o[d+0],7,-680876936),h=g(h,a,f,l,o[d+1],12,-389564586),l=g(l,h,a,f,o[d+2],17,606105819),f=g(f,l,h,a,o[d+3],22,-1044525330),a=g(a,f,l,h,o[d+4],7,-176418897),h=g(h,a,f,l,o[d+5],12,1200080426),l=g(l,h,a,f,o[d+6],17,-1473231341),f=g(f,l,h,a,o[d+7],22,-45705983),a=g(a,f,l,h,o[d+8],7,1770035416),h=g(h,a,f,l,o[d+9],12,-1958414417),l=g(l,h,a,f,o[d+10],17,-42063),f=g(f,l,h,a,o[d+11],22,-1990404162),a=g(a,f,l,h,o[d+12],7,1804603682),h=g(h,a,f,l,o[d+13],12,-40341101),l=g(l,h,a,f,o[d+14],17,-1502002290),f=g(f,l,h,a,o[d+15],22,1236535329),a=p(a,f,l,h,o[d+1],5,-165796510),h=p(h,a,f,l,o[d+6],9,-1069501632),l=p(l,h,a,f,o[d+11],14,643717713),f=p(f,l,h,a,o[d+0],20,-373897302),a=p(a,f,l,h,o[d+5],5,-701558691),h=p(h,a,f,l,o[d+10],9,38016083),l=p(l,h,a,f,o[d+15],14,-660478335),f=p(f,l,h,a,o[d+4],20,-405537848),a=p(a,f,l,h,o[d+9],5,568446438),h=p(h,a,f,l,o[d+14],9,-1019803690),l=p(l,h,a,f,o[d+3],14,-187363961),f=p(f,l,h,a,o[d+8],20,1163531501),a=p(a,f,l,h,o[d+13],5,-1444681467),h=p(h,a,f,l,o[d+2],9,-51403784),l=p(l,h,a,f,o[d+7],14,1735328473),f=p(f,l,h,a,o[d+12],20,-1926607734),a=m(a,f,l,h,o[d+5],4,-378558),h=m(h,a,f,l,o[d+8],11,-2022574463),l=m(l,h,a,f,o[d+11],16,1839030562),f=m(f,l,h,a,o[d+14],23,-35309556),a=m(a,f,l,h,o[d+1],4,-1530992060),h=m(h,a,f,l,o[d+4],11,1272893353),l=m(l,h,a,f,o[d+7],16,-155497632),f=m(f,l,h,a,o[d+10],23,-1094730640),a=m(a,f,l,h,o[d+13],4,681279174),h=m(h,a,f,l,o[d+0],11,-358537222),l=m(l,h,a,f,o[d+3],16,-722521979),f=m(f,l,h,a,o[d+6],23,76029189),a=m(a,f,l,h,o[d+9],4,-640364487),h=m(h,a,f,l,o[d+12],11,-421815835),l=m(l,h,a,f,o[d+15],16,530742520),f=m(f,l,h,a,o[d+2],23,-995338651),a=w(a,f,l,h,o[d+0],6,-198630844),h=w(h,a,f,l,o[d+7],10,1126891415),l=w(l,h,a,f,o[d+14],15,-1416354905),f=w(f,l,h,a,o[d+5],21,-57434055),a=w(a,f,l,h,o[d+12],6,1700485571),h=w(h,a,f,l,o[d+3],10,-1894986606),l=w(l,h,a,f,o[d+10],15,-1051523),f=w(f,l,h,a,o[d+1],21,-2054922799),a=w(a,f,l,h,o[d+8],6,1873313359),h=w(h,a,f,l,o[d+15],10,-30611744),l=w(l,h,a,f,o[d+6],15,-1560198380),f=w(f,l,h,a,o[d+13],21,1309151649),a=w(a,f,l,h,o[d+4],6,-145523070),h=w(h,a,f,l,o[d+11],10,-1120210379),l=w(l,h,a,f,o[d+2],15,718787259),f=w(f,l,h,a,o[d+9],21,-343485551),a=a+v>>>0,f=f+A>>>0,l=l+_>>>0,h=h+E>>>0}return e.endian([a,f,l,h])};r._ff=function(s,u,o,c,a,f,l){var h=s+(u&o|~u&c)+(a>>>0)+l;return(h<<f|h>>>32-f)+u},r._gg=function(s,u,o,c,a,f,l){var h=s+(u&c|o&~c)+(a>>>0)+l;return(h<<f|h>>>32-f)+u},r._hh=function(s,u,o,c,a,f,l){var h=s+(u^o^c)+(a>>>0)+l;return(h<<f|h>>>32-f)+u},r._ii=function(s,u,o,c,a,f,l){var h=s+(o^(u|~c))+(a>>>0)+l;return(h<<f|h>>>32-f)+u},r._blocksize=16,r._digestsize=16,H0.exports=function(s,u){if(s==null)throw new Error("Illegal argument "+s);var o=e.wordsToBytes(r(s,u));return u&&u.asBytes?o:u&&u.asString?i.bytesToString(o):e.bytesToHex(o)}})();var zo=H0.exports,Qt,Ii;(Ii=Qt||(Qt={})).UP="up",Ii.DOWN="down",Ii.NORTH="north",Ii.EAST="east",Ii.SOUTH="south",Ii.WEST="west";const yy={[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]};var or,Hn;(function(e){e.ALL=[e.UP,e.DOWN,e.NORTH,e.EAST,e.SOUTH,e.WEST],e.normal=function(t){return yy[t]}})(Qt||(Qt={})),(Hn=or||(or={})).create=function(e,t,n){return[e,t,n]},Hn.ZERO=Hn.create(0,0,0),Hn.offset=function(e,t,n,i){return[e[0]+t,e[1]+n,e[2]+i]},Hn.towards=function(e,t){return Hn.offset(e,...Qt.normal(t))},Hn.equals=function(e,t){return e===t||e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},Hn.magnitude=function(e){return e[0]*e[0]+e[1]*e[1]+e[2]*e[2]};function _a(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 Ey(e,t){try{return e()}catch{return t}}var ie;function Aa(e){let t=null;return()=>(t==null&&(t=e()),t)}function Uo(e,t,n){const i=e.get(t);if(i)return i;const r=n(t);return e.set(t,r),r}(function(e){function t(n){return typeof n=="object"&&n!==null?n:void 0}e.readNumber=function(n){return typeof n=="number"?n:void 0},e.readInt=function(n){return typeof n=="number"?Math.floor(n):void 0},e.readString=function(n){return typeof n=="string"?n:void 0},e.readBoolean=function(n){return typeof n=="boolean"?n:void 0},e.readObject=t,e.readArray=function(n,i){if(Array.isArray(n))return n.map(r=>i(r))},e.readMap=function(n,i){var r;const s=(r=t(n))!=null?r:{};return Object.fromEntries(Object.entries(s).map(([u,o])=>[u,i(o)]))},e.compose=function(n,i,r){const s=i(n);return s?r(s):void 0},e.readEnum=function(n,i){return typeof n!="string"?i[0]:i.includes(n)?n:i[0]}})(ie||(ie={}));const Zs=class{constructor(e,t){if(this.namespace=e,this.path=t,!e.match(/^[a-z0-9._-]+$/))throw new Error(`Non [a-z0-9._-] character in namespace of ${e}:${t}`);if(!t.match(/^[a-z0-9/._-]+$/))throw new Error(`Non [a-z0-9/._-] character in path of ${e}:${t}`)}equals(e){return this===e||this.namespace===e.namespace&&this.path===e.path}toString(){return`${this.namespace}:${this.path}`}static create(e){return new Zs(this.DEFAULT_NAMESPACE,e)}static parse(e){const t=e.indexOf(this.SEPARATOR);if(t>=0){const n=t>=1?e.substring(0,t):this.DEFAULT_NAMESPACE,i=e.substring(t+1);return new Zs(n,i)}return new Zs(this.DEFAULT_NAMESPACE,e)}};let Ue=Zs;Ue.DEFAULT_NAMESPACE="minecraft",Ue.SEPARATOR=":";var by=Object.defineProperty,xy=Object.defineProperties,Cy=Object.getOwnPropertyDescriptors,lh=Object.getOwnPropertySymbols,Fy=Object.prototype.hasOwnProperty,Sy=Object.prototype.propertyIsEnumerable,ch=(e,t,n)=>t in e?by(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const pn=class{constructor(e,t={}){this.properties=t,this.name=typeof e=="string"?Ue.parse(e):e}getName(){return this.name}getProperties(){return this.properties}getProperty(e){return this.properties[e]}isFluid(){return this.is(pn.WATER)||this.is(pn.LAVA)}equals(e){return!!this.name.equals(e.name)&&Object.keys(this.properties).every(t=>e.properties[t]===this.properties[t])}is(e){return this.name.equals(e.name)}toString(){return Object.keys(this.properties).length===0?this.name.toString():`${this.name.toString()}[${Object.entries(this.properties).map(([e,t])=>e+"="+t).join(",")}]`}static fromNbt(e){const t=Ue.parse(_a(e.value,"Name","string")),n=Ey(()=>_a(e.value,"Properties","compound"),{}),i=Object.keys(n).reduce((r,s)=>{return u=((c,a)=>{for(var f in a||(a={}))Fy.call(a,f)&&ch(c,f,a[f]);if(lh)for(var f of lh(a))Sy.call(a,f)&&ch(c,f,a[f]);return c})({},r),o={[s]:_a(n,s,"string")},xy(u,Cy(o));var u,o},{});return new pn(t,i)}static fromJson(e){var t,n;const i=(t=ie.readObject(e))!=null?t:{},r=Ue.parse((n=ie.readString(i.Name))!=null?n:pn.STONE.name.toString()),s=ie.readMap(i.Properties,u=>{var o;return(o=ie.readString(u))!=null?o:""});return new pn(r,s)}};let Bt=pn;Bt.AIR=new pn(Ue.create("air")),Bt.STONE=new pn(Ue.create("stone")),Bt.WATER=new pn(Ue.create("water"),{level:"0"}),Bt.LAVA=new pn(Ue.create("lava"),{level:"0"});const Pr=class{constructor(e){this.minY=e,this.storage=Array(Pr.SIZE).fill(0),this.palette=[Bt.AIR]}get minBlockY(){return this.minY<<4}index(e,t,n){return(e<<8)+(t<<4)+n}getBlockState(e,t,n){var i;const r=this.storage[this.index(e,t,n)];return(i=this.palette[r])!=null?i:Bt.AIR}setBlockState(e,t,n,i){let r=this.palette.findIndex(s=>s.equals(i));r===-1&&(r=this.palette.length,this.palette.push(i)),this.storage[this.index(e,t,n)]=r}};let il=Pr;il.WIDTH=16,il.SIZE=Pr.WIDTH*Pr.WIDTH*Pr.WIDTH;class Dy{constructor(t,n,i){this.minY=t,this.height=n,this.pos=i,this.sections=Array(this.sectionsCount).fill(null)}get maxY(){return this.minY+this.height}get minSection(){return this.minY>>4}get maxSection(){return 1+(this.maxY-1>>4)}get sectionsCount(){return this.maxSection-this.minSection}getSectionIndex(t){return(t>>4)-this.minSection}getBlockState(t){var n;const[i,r,s]=t,u=this.sections[this.getSectionIndex(r)];return(n=u==null?void 0:u.getBlockState(15&i,15&r,15&s))!=null?n:Bt.AIR}setBlockState(t,n){const[i,r,s]=t,u=this.getSectionIndex(r);let o=this.sections[u];if(o===null){if(n.equals(Bt.AIR))return;o=this.getOrCreateSection(u)}o.setBlockState(15&i,15&r,15&s,n)}getOrCreateSection(t){return this.sections[t]==null&&(this.sections[t]=new il(this.minSection+t)),this.sections[t]}}var Ut,ar;(function(e){function t(n,i){return BigInt(4294967295&n)|BigInt(4294967295&i)<<BigInt(32)}e.create=function(n,i){return[n,i]},e.fromBlockPos=function(n){return[n[0]>>4,n[2]>>4]},e.fromLong=function(n){return[4294967295&Number(n),Number(n>>BigInt(32))]},e.toLong=function(n){return t(n[0],n[1])},e.asLong=t,e.minBlockX=function(n){return n[0]<<4},e.minBlockZ=function(n){return n[1]<<4},e.maxBlockX=function(n){return 15+(n[0]<<4)},e.maxBlockZ=function(n){return 15+(n[1]<<4)}})(Ut||(Ut={})),function(e){function t(i){return{value:()=>i,key:()=>{}}}function n(i,r){return{value:()=>i.getOrThrow(r),key:()=>r}}e.parser=function(i,r){return s=>typeof s=="string"?n(i,Ue.parse(s)):t(r(s))},e.direct=t,e.reference=n}(ar||(ar={}));const Ql=class{constructor(e,t){this.key=e,this.parser=t,this.storage=new Map,this.builtin=new Map}register(e,t,n){return this.storage.set(e.toString(),t),n&&this.builtin.set(e.toString(),t),ar.reference(this,e)}keys(){return[...this.storage.keys()].map(e=>Ue.parse(e))}get(e){return this.storage.get(e.toString())}getOrThrow(e){const t=this.storage.get(e.toString());if(t===void 0)throw new Error(`Missing key in ${this.key.toString()}: ${e.toString()}`);return t}parse(e){if(!this.parser)throw new Error(`No parser exists for ${this.key.toString()}`);return this.parser(e)}clear(){this.storage.clear();for(const[e,t]of this.builtin.entries())this.storage.set(e,t);return this}assign(e){if(!this.key.equals(e.key))throw new Error(`Cannot assign registry of type ${e.key.toString()} to registry of type ${this.key.toString()}`);for(const t of e.keys())this.storage.set(t.toString(),e.getOrThrow(t));return this}cloneEmpty(){return new Ql(this.key,this.parser)}};let ns=Ql;ns.REGISTRY=new Ql(Ue.create("root"));function jn(e){return e*e}function kr(e,t,n){return Math.max(t,Math.min(n,e))}function ii(e,t,n){return t+e*(n-t)}function rl(e,t,n,i,r,s){return ii(t,ii(e,n,i),ii(e,r,s))}function ky(e,t,n,i,r,s,u,o,c,a,f){return ii(n,rl(e,t,i,r,s,u),rl(e,t,o,c,a,f))}function qs(e,t,n){return e===0?t():e===1?n():t()+e*(n()-t())}function uh(e,t,n,i,r,s){return qs(t,()=>qs(e,n,i),()=>qs(e,r,s))}function By(e,t,n,i,r,s,u,o,c,a,f){return qs(n,()=>uh(e,t,i,r,s,u),()=>uh(e,t,o,c,a,f))}function ec(e,t,n){return n<0?e:n>1?t:ii(n,e,t)}function V0(e,t,n){return(e-t)/(n-t)}function ya(e){return e*e*e*(e*(6*e-15)+10)}function hh(e,t,n,i,r){return ii(V0(e,t,n),i,r)}function G0(e,t,n,i,r){return ec(i,r,V0(e,t,n))}function Ty(e,t,n){let i=t-e;for(;i>0;){const r=Math.floor(i/2),s=e+r;n(s)?i=r:(e=s+1,i-=r+1)}return e}function K0(e,t,n){let i=BigInt(3129871*e)^BigInt(n)*BigInt(116129781)^BigInt(t);return i=i*i*BigInt(42317861)+i*BigInt(11),i>>BigInt(16)}function sl(e,t,n,i,r,s,u,o){return BigInt(e)<<BigInt(56)|BigInt(t)<<BigInt(48)|BigInt(n)<<BigInt(40)|BigInt(i)<<BigInt(32)|BigInt(r)<<BigInt(24)|BigInt(s)<<BigInt(16)|BigInt(u)<<BigInt(8)|BigInt(o)}var Zi;(function(e){e.fromJson=function i(r,s){var u,o,c,a;if(typeof r=="number")return new t(r);const f=(u=ie.readObject(r))!=null?u:{},l=new n(s(f.coordinate)),h=(o=ie.readArray(f.points,d=>{var g;return(g=ie.readObject(d))!=null?g:{}}))!=null?o:[];if(h.length===0)return new t(0);for(const d of h){const g=(c=ie.readNumber(d.location))!=null?c:0,p=i(d.value,s),m=(a=ie.readNumber(d.derivative))!=null?a:0;l.addPoint(g,p,m)}return l};class t{constructor(r){this.value=r}compute(){return this.value}min(){return this.value}max(){return this.value}mapAll(){return this}}e.Constant=t;class n{constructor(r,s=[],u=[],o=[]){this.coordinate=r,this.locations=s,this.values=u,this.derivatives=o}compute(r){const s=this.coordinate.compute(r),u=Ty(0,this.locations.length,w=>s<this.locations[w])-1,o=this.locations.length-1;if(u<0)return this.values[0].compute(r)+this.derivatives[0]*(s-this.locations[0]);if(u===o)return this.values[o].compute(r)+this.derivatives[o]*(s-this.locations[o]);const c=this.locations[u],a=this.locations[u+1],f=this.derivatives[u],l=this.derivatives[u+1],h=(s-c)/(a-c),d=this.values[u].compute(r),g=this.values[u+1].compute(r),p=f*(a-c)-(g-d),m=-l*(a-c)+(g-d);return ii(h,d,g)+h*(1-h)*ii(h,p,m)}min(){return Math.min(...this.values.map(r=>r.min()))}max(){return Math.max(...this.values.map(r=>r.max()))}mapAll(r){return new n(r(this.coordinate),this.locations,this.values.map(s=>s.mapAll(r)),this.derivatives)}addPoint(r,s,u=0){return this.locations.push(r),this.values.push(typeof s=="number"?new e.Constant(s):s),this.derivatives.push(u),this}}e.MultiPoint=n})(Zi||(Zi={}));const hn=class{constructor(e){this.seed=BigInt(0),this.setSeed(e)}fork(){return new hn(this.nextLong())}forkPositional(){return new Ly(this.nextLong())}setSeed(e){this.seed=e^hn.MULTIPLIER&hn.MODULUS_MASK}advance(){this.seed=this.seed*hn.MULTIPLIER+hn.INCREMENT&hn.MODULUS_MASK}consume(e){for(let t=0;t<e;t+=1)this.advance()}next(e){this.advance();const t=Number(this.seed>>BigInt(hn.MODULUS_BITS-e));return t>2147483647?t-4294967296:t}nextInt(e){if(e===void 0)return this.next(32);if((e&e-1)==0)return Number(BigInt(e)*BigInt(this.next(31))>>BigInt(31));let t,n;for(;(t=this.next(31))-(n=t%e)+(e-1)<0;);return n}nextLong(){return(BigInt(this.next(32))<<BigInt(32))+BigInt(this.next(32))}nextFloat(){return this.next(24)*hn.FLOAT_MULTIPLIER}nextDouble(){const e=this.next(30);return this.advance(),e*hn.DOUBLE_MULTIPLIER}};let Pt=hn;Pt.MODULUS_BITS=48,Pt.MODULUS_MASK=BigInt("281474976710655"),Pt.MULTIPLIER=BigInt("25214903917"),Pt.INCREMENT=BigInt("11"),Pt.FLOAT_MULTIPLIER=1/Math.pow(2,24),Pt.DOUBLE_MULTIPLIER=1/Math.pow(2,30);class Ly{constructor(t){this.seed=t}at(t,n,i){const r=K0(t,n,i);return new Pt(r^this.seed)}fromHashOf(t){const n=zo(t,{asBytes:!0}),i=sl(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]);return new Pt(i^this.seed)}seedKey(){return[this.seed,BigInt(0)]}}const Fe=class{constructor(e){this.seed=[BigInt(0),BigInt(0)],this.seed=e}static create(e){return new Fe(Fe.upgradeSeedTo128bit(e))}static mixStafford13(e){return((e=((e=(e^e>>Fe.BIGINT_30)*Fe.STAFFORD_1&Fe.MAX_ULONG)^e>>Fe.BIGINT_27)*Fe.STAFFORD_2&Fe.MAX_ULONG)^e>>Fe.BIGINT_31)&Fe.MAX_ULONG}static upgradeSeedTo128bit(e){e<0&&(e+=Fe.POW2_60);const t=e^Fe.SILVER_RATIO_64,n=t+Fe.GOLDEN_RATIO_64&Fe.MAX_ULONG;return[Fe.mixStafford13(t),Fe.mixStafford13(n)]}static rotateLeft(e,t){return e<<t&Fe.MAX_ULONG|e>>Fe.BIGINT_64-t}setSeed(e){this.seed=Fe.upgradeSeedTo128bit(e)}fork(){return new Fe([this.next(),this.next()])}forkPositional(){return new $y(this.next(),this.next())}next(){const e=this.seed[0];let t=this.seed[1];const n=Fe.rotateLeft(e+t&Fe.MAX_ULONG,Fe.BIGINT_17)+e&Fe.MAX_ULONG;return t^=e,this.seed=[Fe.rotateLeft(e,Fe.BIGINT_49)^t^t<<Fe.BIGINT_21&Fe.MAX_ULONG,Fe.rotateLeft(t,Fe.BIGINT_28)],n}nextLong(){let e=this.next();return e>Fe.POW2_63&&(e-=Fe.POW2_60),e}consume(e){let t=this.seed[0],n=this.seed[1];for(let i=0;i<e;i+=1)n^=t,t=Fe.rotateLeft(t,Fe.BIGINT_49)^n^n<<Fe.BIGINT_21,n=Fe.rotateLeft(n,Fe.BIGINT_28);this.seed=[t,n]}nextBits(e){return this.next()>>BigInt(64-e)}nextInt(e){let t=this.next()&Fe.MAX_UINT;if(e){const n=BigInt(e);let i=t*n,r=i&Fe.MAX_UINT;if(r<n){const u=((~n&Fe.MAX_UINT)+Fe.BIGINT_1)%n;for(;r<u;)t=this.next()&Fe.MAX_UINT,i=t*n,r=i&Fe.MAX_UINT}const s=i>>Fe.BIGINT_32;return Number(s)}{let n=Number(t);return n>=2147483648&&(n-=4294967296),n}}nextFloat(){return Number(this.nextBits(24))*Fe.FLOAT_MULTIPLIER}nextDouble(){return Number(this.nextBits(53))*Fe.DOUBLE_MULTIPLIER}parityConfigString(){return"seedLo: "+this.seed[0]+", seedHi: "+this.seed[1]}};let Je=Fe;Je.SILVER_RATIO_64=BigInt("7640891576956012809"),Je.GOLDEN_RATIO_64=BigInt("-7046029254386353131"),Je.FLOAT_MULTIPLIER=1/Math.pow(2,24),Je.DOUBLE_MULTIPLIER=11102230246251565e-32,Je.BIGINT_1=BigInt(1),Je.BIGINT_17=BigInt(17),Je.BIGINT_21=BigInt(21),Je.BIGINT_27=BigInt(27),Je.BIGINT_28=BigInt(28),Je.BIGINT_30=BigInt(30),Je.BIGINT_31=BigInt(31),Je.BIGINT_32=BigInt(32),Je.BIGINT_49=BigInt(49),Je.BIGINT_64=BigInt(64),Je.STAFFORD_1=BigInt("-4658895280553007687"),Je.STAFFORD_2=BigInt("-7723592293110705685"),Je.MAX_ULONG=BigInt("0xFFFFFFFFFFFFFFFF"),Je.POW2_60=BigInt("0x10000000000000000"),Je.POW2_63=BigInt("0x8000000000000000"),Je.MAX_UINT=BigInt(4294967295);class $y{constructor(t,n){this.seedLo=t,this.seedHi=n}at(t,n,i){const r=K0(t,n,i)^this.seedLo;return new Je([r,this.seedHi])}fromHashOf(t){const n=zo(t,{asBytes:!0}),i=sl(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),r=sl(n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]);return new Je([i^this.seedLo,r^this.seedHi])}seedKey(){return[this.seedLo,this.seedHi]}}const Fn=class{constructor(e){this.xo=256*e.nextDouble(),this.yo=256*e.nextDouble(),this.zo=256*e.nextDouble(),this.p=Array(256);for(let t=0;t<256;t+=1)this.p[t]=t;for(let t=0;t<256;t+=1){const n=e.nextInt(256-t),i=this.p[t];this.p[t]=this.p[t+n],this.p[t+n]=i}}sample2D(e,t){let n,i,r;const s=(e+t)*Fn.F2,u=Math.floor(e+s),o=e-(u-(n=(u+(i=Math.floor(t+s)))*Fn.G2));let c,a;o>(r=t-(i-n))?(c=1,a=0):(c=0,a=1);const f=o-c+Fn.G2,l=r-a+Fn.G2,h=o-1+2*Fn.G2,d=r-1+2*Fn.G2,g=255&u,p=255&i,m=this.P(g+this.P(p))%12,w=this.P(g+c+this.P(p+a))%12,v=this.P(g+1+this.P(p+1))%12;return 70*(this.getCornerNoise3D(m,o,r,0,.5)+this.getCornerNoise3D(w,f,l,0,.5)+this.getCornerNoise3D(v,h,d,0,.5))}sample(e,t,n){const i=.3333333333333333*(e+t+n),r=Math.floor(e+i),s=Math.floor(t+i),u=Math.floor(n+i),o=.16666666666666666*(r+s+u),c=e-(r-o),a=t-(s-o),f=n-(u-o);let l,h,d,g,p,m;c>=a?a>=f?(l=1,h=0,d=0,g=1,p=1,m=0):c>=f?(l=1,h=0,d=0,g=1,p=0,m=1):(l=0,h=0,d=1,g=1,p=0,m=1):a<f?(l=0,h=0,d=1,g=0,p=1,m=1):c<f?(l=0,h=1,d=0,g=0,p=1,m=1):(l=0,h=1,d=0,g=1,p=1,m=0);const w=c-l+.16666666666666666,v=a-h+.16666666666666666,A=f-d+.16666666666666666,_=c-g+.3333333333333333,E=a-p+.3333333333333333,b=f-m+.3333333333333333,x=c-.5,y=a-.5,C=f-.5,B=255&r,T=255&s,M=255&u,R=this.P(B+this.P(T+this.P(M)))%12,I=this.P(B+l+this.P(T+h+this.P(M+d)))%12,H=this.P(B+g+this.P(T+p+this.P(M+m)))%12,P=this.P(B+1+this.P(T+1+this.P(M+1)))%12;return 32*(this.getCornerNoise3D(R,c,a,f,.6)+this.getCornerNoise3D(I,w,v,A,.6)+this.getCornerNoise3D(H,_,E,b,.6)+this.getCornerNoise3D(P,x,y,C,.6))}P(e){return this.p[255&e]}getCornerNoise3D(e,t,n,i,r){let s,u=r-t*t-n*n-i*i;return u<0?s=0:(u*=u,s=u*u*Fn.gradDot(e,t,n,i)),s}static gradDot(e,t,n,i){const r=Fn.GRADIENT[15&e];return r[0]*t+r[1]*n+r[2]*i}};let qt=Fn;qt.GRADIENT=[[1,1,0],[-1,1,0],[1,-1,0],[-1,-1,0],[1,0,1],[-1,0,1],[1,0,-1],[-1,0,-1],[0,1,1],[0,-1,1],[0,1,-1],[0,-1,-1],[1,1,0],[0,-1,1],[-1,1,0],[0,-1,-1]],qt.F2=.5*(Math.sqrt(3)-1),qt.G2=(3-Math.sqrt(3))/6;class fh{constructor(t){this.xo=256*t.nextDouble(),this.yo=256*t.nextDouble(),this.zo=256*t.nextDouble(),this.p=Array(256);for(let n=0;n<256;n+=1)this.p[n]=n>127?n-256:n;for(let n=0;n<256;n+=1){const i=t.nextInt(256-n),r=this.p[n];this.p[n]=this.p[n+i],this.p[n+i]=r}}sample(t,n,i,r=0,s=0){const u=t+this.xo,o=n+this.yo,c=i+this.zo,a=Math.floor(u),f=Math.floor(o),l=Math.floor(c),h=u-a,d=o-f,g=c-l;let p=0;if(r!==0){const m=s>=0&&s<d?s:d;p=Math.floor(m/r+1e-7)*r}return this.sampleAndLerp(a,f,l,h,d-p,g,d)}sampleAndLerp(t,n,i,r,s,u,o){const c=this.P(t),a=this.P(t+1),f=this.P(c+n),l=this.P(c+n+1),h=this.P(a+n),d=this.P(a+n+1),g=qt.gradDot(this.P(f+i),r,s,u),p=qt.gradDot(this.P(h+i),r-1,s,u),m=qt.gradDot(this.P(l+i),r,s-1,u),w=qt.gradDot(this.P(d+i),r-1,s-1,u),v=qt.gradDot(this.P(f+i+1),r,s,u-1),A=qt.gradDot(this.P(h+i+1),r-1,s,u-1),_=qt.gradDot(this.P(l+i+1),r,s-1,u-1),E=qt.gradDot(this.P(d+i+1),r-1,s-1,u-1);return ky(ya(r),ya(o),ya(u),g,p,m,w,v,A,_,E)}P(t){return 255&this.p[255&t]}}class qe{constructor(t,n,i){if(t instanceof Je){const r=t.forkPositional();this.noiseLevels=Array(i.length);for(let s=0;s<i.length;s++)if(i[s]!==0){const u=n+s;this.noiseLevels[s]=new fh(r.fromHashOf("octave_"+u))}}else{if(1-n<i.length)throw new Error("Positive octaves are not allowed when using LegacyRandom");this.noiseLevels=Array(i.length);for(let r=-n;r>=0;r-=1)r<i.length&&i[r]!==0?this.noiseLevels[r]=new fh(t):t.consume(262)}this.amplitudes=i,this.lowestFreqInputFactor=Math.pow(2,n),this.lowestFreqValueFactor=Math.pow(2,i.length-1)/(Math.pow(2,i.length)-1),this.maxValue=this.edgeValue(2)}sample(t,n,i,r=0,s=0,u=!1){let o=0,c=this.lowestFreqInputFactor,a=this.lowestFreqValueFactor;for(let f=0;f<this.noiseLevels.length;f+=1){const l=this.noiseLevels[f];l&&(o+=this.amplitudes[f]*a*l.sample(qe.wrap(t*c),u?-l.yo:qe.wrap(n*c),qe.wrap(i*c),r*c,s*c)),c*=2,a/=2}return o}getOctaveNoise(t){return this.noiseLevels[this.noiseLevels.length-1-t]}edgeValue(t){let n=0,i=this.lowestFreqValueFactor;for(let r=0;r<this.noiseLevels.length;r+=1)this.noiseLevels[r]&&(n+=this.amplitudes[r]*t*i),i/=2;return n}static wrap(t){return t-33554432*Math.floor(t/33554432+.5)}}class X0{constructor(t,n,i,r){this.cellWidth=i,this.cellHeight=r,this.minLimitNoise=new qe(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.maxLimitNoise=new qe(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.mainNoise=new qe(t,-7,[1,1,1,1,1,0,0,0]),this.xzScale=684.412*n.xzScale,this.yScale=684.412*n.yScale,this.xzMainScale=this.xzScale/n.xzFactor,this.yMainScale=this.yScale/n.yFactor,this.maxValue=this.minLimitNoise.edgeValue(this.yScale+2)}sample(t,n,i){let r;t=Math.floor(t/this.cellWidth),n=Math.floor(n/this.cellHeight),i=Math.floor(i/this.cellWidth);let s=0,u=1;for(let a=0;a<8;a+=1){if(r=this.mainNoise.getOctaveNoise(a),r){const f=this.xzMainScale*u,l=this.yMainScale*u,h=qe.wrap(t*f),d=qe.wrap(n*l),g=qe.wrap(i*f);s+=r.sample(h,d,g,l,n*l)/u}u/=2}s=(s/10+1)/2,u=1;let o=0,c=0;for(let a=0;a<16;a+=1){const f=this.xzScale*u,l=this.yScale*u,h=qe.wrap(t*f),d=qe.wrap(n*l),g=qe.wrap(i*f);s<1&&(r=this.minLimitNoise.getOctaveNoise(a))&&(o+=r.sample(h,d,g,l,n*l)/u),s>0&&(r=this.maxLimitNoise.getOctaveNoise(a))&&(c+=r.sample(h,d,g,l,n*l)/u),u/=2}return ec(o/512,c/512,s)/128}}var ol;(ol||(ol={})).fromJson=function(e){var t,n,i,r,s;const u=(t=ie.readObject(e))!=null?t:{};return{xzScale:(n=ie.readNumber(u.xz_scale))!=null?n:1,yScale:(i=ie.readNumber(u.y_scale))!=null?i:1,xzFactor:(r=ie.readNumber(u.xz_factor))!=null?r:80,yFactor:(s=ie.readNumber(u.y_factor))!=null?s:80}};const Qs=class{constructor(e,{firstOctave:t,amplitudes:n}){this.first=new qe(e,t,n),this.second=new qe(e,t,n);let i=1/0,r=-1/0;for(let u=0;u<n.length;u+=1)n[u]!==0&&(i=Math.min(i,u),r=Math.max(r,u));const s=.1*(1+1/(r-i+1));this.valueFactor=1/6/s,this.maxValue=(this.first.maxValue+this.second.maxValue)*this.valueFactor}sample(e,t,n){const i=e*Qs.INPUT_FACTOR,r=t*Qs.INPUT_FACTOR,s=n*Qs.INPUT_FACTOR;return(this.first.sample(e,t,n)+this.second.sample(i,r,s))*this.valueFactor}};let Ho=Qs;var lr,dh;Ho.INPUT_FACTOR=1.0181268882175227,(dh=lr||(lr={})).create=function(e,t){return{firstOctave:e,amplitudes:t}},dh.fromJson=function(e){var t,n,i;const r=(t=ie.readObject(e))!=null?t:{};return{firstOctave:(n=ie.readInt(r.firstOctave))!=null?n:0,amplitudes:(i=ie.readArray(r.amplitudes,s=>{var u;return(u=ie.readNumber(s))!=null?u:0}))!=null?i:[]}};var ph;(ph||(ph={})).rotate=function(e,t,n){let{up:i,down:r,north:s,east:u,south:o,west:c}=e;switch(n){case 90:[s,u,o,c]=[u,o,c,s];break;case 180:[s,u,o,c]=[o,c,s,u];break;case 270:[s,u,o,c]=[c,s,u,o]}switch(t){case 90:[i,s,r,o]=[s,r,o,i];break;case 180:[i,s,r,o]=[r,o,i,s];break;case 270:[i,s,r,o]=[o,i,s,r]}return{up:i,down:r,north:s,east:u,south:o,west:c}};const Xn=class{constructor(e,t,n){this.offsetSampler=e,this.factorSampler=t,this.jaggednessSampler=n}static extractor(e){return{compute:t=>t[e]}}static fromJson(e){var t;const n=(t=ie.readObject(e))!=null?t:{};return new Xn(Zi.fromJson(n.offset,this.EXTRACTOR),Zi.fromJson(n.factor,this.EXTRACTOR),Zi.fromJson(n.jaggedness,this.EXTRACTOR))}offset(e){return this.offsetSampler.compute(e)+Xn.GLOBAL_OFFSET}factor(e){return this.factorSampler.compute(e)}jaggedness(e){return this.jaggednessSampler.compute(e)}static point(e,t,n){return{continents:e,erosion:t,weirdness:n,ridges:this.peaksAndValleys(n)}}static peaksAndValleys(e){return 3*-(Math.abs(Math.abs(e)-.6666667)-.33333334)}};let Vn=Xn;var ut,Oi,gh,ai,al;Vn.GLOBAL_OFFSET=-.50375,Vn.EXTRACTOR=e=>{var t;const n=(t=ie.readString(e))!=null?t:"continents";return Xn.extractor(n)},Vn.CONTINENTS=Xn.extractor("continents"),Vn.EROSION=Xn.extractor("erosion"),Vn.WEIRDNESS=Xn.extractor("weirdness"),Vn.RIDGES=Xn.extractor("ridges"),function(e){function t(n){return n.ySize<<2}e.fromJson=function(n){var i,r,s,u,o;const c=(i=ie.readObject(n))!=null?i:{};return{minY:(r=ie.readInt(c.min_y))!=null?r:0,height:(s=ie.readInt(c.height))!=null?s:256,xzSize:(u=ie.readInt(c.size_horizontal))!=null?u:1,ySize:(o=ie.readInt(c.size_vertical))!=null?o:1,sampling:ol.fromJson(c.sampling),topSlide:Oi.fromJson(c.top_slide),bottomSlide:Oi.fromJson(c.bottom_slide),terrainShaper:Vn.fromJson(c.terrain_shaper)}},e.cellHeight=t,e.cellWidth=function(n){return n.xzSize<<2},e.cellCountY=function(n){return n.height/t(n)},e.minCellY=function(n){return Math.floor(n.minY/t(n))},e.applySlides=function(n,i,r){const s=Math.floor(r/t(n))-e.minCellY(n);return i=Oi.apply(n.topSlide,i,e.cellCountY(n)-s),i=Oi.apply(n.bottomSlide,i,s)}}(ut||(ut={})),(gh=Oi||(Oi={})).fromJson=function(e){var t,n,i,r;const s=(t=ie.readObject(e))!=null?t:{};return{target:(n=ie.readNumber(s.target))!=null?n:0,size:(i=ie.readInt(s.size))!=null?i:0,offset:(r=ie.readInt(s.offset))!=null?r:0}},gh.apply=function(e,t,n){if(e.size<=0)return t;const i=(n-e.offset)/e.size;return ec(e.target,t,i)},function(e){function t(n){const i=new ns(Ue.create(n));return ns.REGISTRY.register(i.key,i),i}e.NOISE=t("worldgen/noise"),e.DENSITY_FUNCTION=t("worldgen/density_function")}(ai||(ai={}));class Me{minValue(){return-this.maxValue()}mapAll(t){return t.map(this)}}(function(e){e.context=function(N,k,$){return{x:N,y:k,z:$}};class t extends e{constructor(k){super(),this.input=k}compute(k){return this.transform(k,this.input.compute(k))}}const n=ar.parser(ai.NOISE,lr.fromJson);e.fromJson=function N(k,$=N){var z,U,G,Q,X,te,le,ye,ve,ee,ce,he,je,Ve,ge,Tt,Re,Te,bt;if(typeof k=="string")return new s(ar.reference(ai.DENSITY_FUNCTION,Ue.parse(k)));if(typeof k=="number")return new r(k);const ue=(z=ie.readObject(k))!=null?z:{},Ft=(U=ie.readString(ue.type))==null?void 0:U.replace(/^minecraft:/,"");switch(Ft){case"blend_alpha":return new u(1,0,1);case"blend_offset":case"beardifier":return new u(0,-1/0,1/0);case"old_blended_noise":return new o;case"flat_cache":return new a($(ue.argument));case"interpolated":return new d($(ue.argument));case"cache_2d":return new l($(ue.argument));case"cache_once":return new h($(ue.argument));case"cache_all_in_cell":return new f($(ue.argument));case"noise":return new g((G=ie.readNumber(ue.xz_scale))!=null?G:1,(Q=ie.readNumber(ue.y_scale))!=null?Q:1,n(ue.noise));case"end_islands":return new p;case"weird_scaled_sampler":return new v($(ue.input),ie.readEnum(ue.rarity_value_mapper,m),n(ue.noise));case"shifted_noise":return new A($(ue.shift_x),$(ue.shift_y),$(ue.shift_z),(X=ie.readNumber(ue.xz_scale))!=null?X:1,(te=ie.readNumber(ue.y_scale))!=null?te:1,n(ue.noise));case"range_choice":return new _($(ue.input),(le=ie.readNumber(ue.min_inclusive))!=null?le:0,(ye=ie.readNumber(ue.max_exclusive))!=null?ye:1,$(ue.when_in_range),$(ue.when_out_of_range));case"shift_a":return new b(n(ue.argument));case"shift_b":return new x(n(ue.argument));case"shift":return new y(n(ue.argument));case"blend_density":return new C($(ue.argument));case"clamp":return new B($(ue.input),(ve=ie.readNumber(ue.min))!=null?ve:0,(ee=ie.readNumber(ue.max))!=null?ee:1);case"abs":case"square":case"cube":case"half_negative":case"quarter_negative":case"squeeze":return new M(Ft,$(ue.argument));case"slide":return new R($(ue.argument));case"add":case"mul":case"min":case"max":return new H(ie.readEnum(Ft,I),$(ue.argument1),$(ue.argument2));case"spline":return new P(Zi.fromJson(ue.spline,$),(ce=ie.readNumber(ue.min_value))!=null?ce:0,(he=ie.readNumber(ue.max_value))!=null?he:1);case"terrain_shaper_spline":return new V($(ue.continentalness),$(ue.erosion),$(ue.weirdness),ie.readEnum(ue.spline,j),(je=ie.readNumber(ue.min_value))!=null?je:0,(Ve=ie.readNumber(ue.max_value))!=null?Ve:1);case"constant":return new r((ge=ie.readNumber(ue.argument))!=null?ge:0);case"y_clamped_gradient":return new K((Tt=ie.readInt(ue.from_y))!=null?Tt:-4064,(Re=ie.readInt(ue.to_y))!=null?Re:4062,(Te=ie.readNumber(ue.from_value))!=null?Te:-4064,(bt=ie.readNumber(ue.to_value))!=null?bt:4062)}return r.ZERO};const i=class extends e{constructor(N){super(),this.value=N}compute(){return this.value}minValue(){return this.value}maxValue(){return this.value}};let r=i;r.ZERO=new i(0),r.ONE=new i(1),e.Constant=r;class s extends e{constructor(k){super(),this.holder=k}compute(k){return this.holder.value().compute(k)}minValue(){return this.holder.value().minValue()}maxValue(){return this.holder.value().maxValue()}}e.HolderHolder=s;class u extends e.Constant{constructor(k,$,z){super(k),this.min=$,this.max=z}minValue(){return this.min}maxValue(){return this.max}}e.ConstantMinMax=u;class o extends e{constructor(k){super(),this.blendedNoise=k!=null?k:new X0(Je.create(BigInt(0)),{xzScale:1,yScale:1,xzFactor:80,yFactor:160},4,8)}compute(k){return this.blendedNoise.sample(k.x,k.y,k.z)}maxValue(){return this.blendedNoise.maxValue}}e.OldBlendedNoise=o;class c extends e{constructor(k){super(),this.wrapped=k}minValue(){return this.wrapped.minValue()}maxValue(){return this.wrapped.maxValue()}}class a extends c{constructor(k){super(k),this.lastValue=0}compute(k){const $=k.x>>2,z=k.z>>2;return this.lastQuartX===$&&this.lastQuartZ===z||(this.lastValue=this.wrapped.compute(e.context($<<2,0,z<<2)),this.lastQuartX=$,this.lastQuartZ=z),this.lastValue}mapAll(k){return k.map(new a(this.wrapped.mapAll(k)))}}e.FlatCache=a;class f extends c{constructor(k){super(k)}compute(k){return this.wrapped.compute(k)}mapAll(k){return k.map(new f(this.wrapped.mapAll(k)))}}e.CacheAllInCell=f;class l extends c{constructor(k){super(k),this.lastValue=0}compute(k){const $=k.x,z=k.z;return this.lastBlockX===$&&this.lastBlockZ===z||(this.lastValue=this.wrapped.compute(k),this.lastBlockX=$,this.lastBlockZ=z),this.lastValue}mapAll(k){return k.map(new l(this.wrapped.mapAll(k)))}}e.Cache2D=l;class h extends c{constructor(k){super(k),this.lastValue=0}compute(k){const $=k.x,z=k.y,U=k.z;return this.lastBlockX===$&&this.lastBlockY===z&&this.lastBlockZ===U||(this.lastValue=this.wrapped.compute(k),this.lastBlockX=$,this.lastBlockY=z,this.lastBlockZ=U),this.lastValue}mapAll(k){return k.map(new h(this.wrapped.mapAll(k)))}}e.CacheOnce=h;class d extends c{constructor(k,$=4,z=4){super(k),this.cellWidth=$,this.cellHeight=z,this.values=new Map}compute({x:k,y:$,z}){const U=this.cellWidth,G=this.cellHeight,Q=(k%U+U)%U/U,X=($%G+G)%G/G,te=(z%U+U)%U/U,le=Math.floor(k/U)*U,ye=Math.floor($/G)*G,ve=Math.floor(z/U)*U;return By(Q,X,te,()=>this.computeCorner(le,ye,ve),()=>this.computeCorner(le+U,ye,ve),()=>this.computeCorner(le,ye+G,ve),()=>this.computeCorner(le+U,ye+G,ve),()=>this.computeCorner(le,ye,ve+U),()=>this.computeCorner(le+U,ye,ve+U),()=>this.computeCorner(le,ye+G,ve+U),()=>this.computeCorner(le+U,ye+G,ve+U))}computeCorner(k,$,z){return Uo(this.values,`${k} ${$} ${z}`,()=>this.wrapped.compute(e.context(k,$,z)))}mapAll(k){return k.map(new d(this.wrapped.mapAll(k)))}withCellSize(k,$){return new d(this.wrapped,k,$)}}e.Interpolated=d;class g extends e{constructor(k,$,z,U){super(),this.xzScale=k,this.yScale=$,this.noiseData=z,this.noise=U}compute(k){var $,z;return(z=($=this.noise)==null?void 0:$.sample(k.x*this.xzScale,k.y*this.yScale,k.z*this.xzScale))!=null?z:0}maxValue(){var k,$;return($=(k=this.noise)==null?void 0:k.maxValue)!=null?$:2}}e.Noise=g;class p extends e{compute(){return 0}minValue(){return-.84375}maxValue(){return .5625}}const m=["type_1","type_2"],w=class extends t{constructor(N,k,$,z){super(N),this.rarityValueMapper=k,this.noiseData=$,this.noise=z,this.mapper=w.ValueMapper[this.rarityValueMapper]}transform(N,k){if(!this.noise)return 0;const $=this.mapper(k);return $*Math.abs(this.noise.sample(N.x/$,N.y/$,N.z/$))}mapAll(N){return N.map(new w(this.input.mapAll(N),this.rarityValueMapper,this.noiseData,this.noise))}minValue(){return 0}maxValue(){return this.rarityValueMapper==="type_1"?2:3}static rarityValueMapper1(N){return N<-.5?.75:N<0?1:N<.5?1.5:2}static rarityValueMapper2(N){return N<-.75?.5:N<-.5?.75:N<.5?1:N<.75?2:3}};let v=w;v.ValueMapper={type_1:w.rarityValueMapper1,type_2:w.rarityValueMapper2},e.WeirdScaledSampler=v;class A extends g{constructor(k,$,z,U,G,Q,X){super(U,G,Q,X),this.shiftX=k,this.shiftY=$,this.shiftZ=z}compute(k){var $,z;const U=k.x*this.xzScale+this.shiftX.compute(k),G=k.y*this.yScale+this.shiftY.compute(k),Q=k.z*this.xzScale+this.shiftZ.compute(k);return(z=($=this.noise)==null?void 0:$.sample(U,G,Q))!=null?z:0}mapAll(k){return k.map(new A(this.shiftX.mapAll(k),this.shiftY.mapAll(k),this.shiftZ.mapAll(k),this.xzScale,this.yScale,this.noiseData,this.noise))}}e.ShiftedNoise=A;class _ extends e{constructor(k,$,z,U,G){super(),this.input=k,this.minInclusive=$,this.maxExclusive=z,this.whenInRange=U,this.whenOutOfRange=G}compute(k){const $=this.input.compute(k);return this.minInclusive<=$&&$<this.maxExclusive?this.whenInRange.compute(k):this.whenOutOfRange.compute(k)}mapAll(k){return k.map(new _(this.input.mapAll(k),this.minInclusive,this.maxExclusive,this.whenInRange.mapAll(k),this.whenOutOfRange.mapAll(k)))}minValue(){return Math.min(this.whenInRange.minValue(),this.whenOutOfRange.minValue())}maxValue(){return Math.max(this.whenInRange.maxValue(),this.whenOutOfRange.maxValue())}}e.RangeChoice=_;class E extends e{constructor(k,$){super(),this.noiseData=k,this.offsetNoise=$}compute(k){var $,z;return(z=($=this.offsetNoise)==null?void 0:$.sample(.25*k.x,.25*k.y,.25*k.z))!=null?z:0}maxValue(){var k,$;return 4*(($=(k=this.offsetNoise)==null?void 0:k.maxValue)!=null?$:2)}}e.ShiftNoise=E;class b extends E{constructor(k,$){super(k,$)}compute(k){return super.compute(e.context(k.x,0,k.z))}withNewNoise(k){return new b(this.noiseData,k)}}e.ShiftA=b;class x extends E{constructor(k,$){super(k,$)}compute(k){return super.compute(e.context(k.z,k.x,0))}withNewNoise(k){return new x(this.noiseData,k)}}e.ShiftB=x;class y extends E{constructor(k,$){super(k,$)}withNewNoise(k){return new y(this.noiseData,k)}}e.Shift=y;class C extends t{constructor(k){super(k)}transform(k,$){return $}mapAll(k){return k.map(new C(this.input.mapAll(k)))}minValue(){return-1/0}maxValue(){return 1/0}}e.BlendDensity=C;class B extends t{constructor(k,$,z){super(k),this.min=$,this.max=z}transform(k,$){return kr($,this.min,this.max)}mapAll(k){return k.map(new B(this.input.mapAll(k),this.min,this.max))}minValue(){return this.min}maxValue(){return this.max}}e.Clamp=B;const T=class extends t{constructor(N,k,$,z){super(k),this.type=N,this.min=$,this.max=z,this.transformer=T.MappedTypes[this.type]}transform(N,k){return this.transformer(k)}mapAll(N){return N.map(new T(this.type,this.input.mapAll(N)))}minValue(){var N;return(N=this.min)!=null?N:-1/0}maxValue(){var N;return(N=this.max)!=null?N:1/0}withMinMax(){const N=this.input.minValue();let k=this.transformer(N),$=this.transformer(this.input.maxValue());return this.type!=="abs"&&this.type!=="square"||($=Math.max(k,$),k=Math.max(0,N)),new T(this.type,this.input,k,$)}};let M=T;M.MappedTypes={abs:N=>Math.abs(N),square:N=>N*N,cube:N=>N*N*N,half_negative:N=>N>0?N:.5*N,quarter_negative:N=>N>0?N:.25*N,squeeze:N=>{const k=kr(N,-1,1);return k/2-k*k*k/24}},e.Mapped=M;class R extends t{constructor(k,$){super(k),this.settings=$}transform(k,$){return this.settings?ut.applySlides(this.settings,$,k.y):$}mapAll(k){return k.map(new R(this.input.mapAll(k),this.settings))}minValue(){return this.settings?Math.min(this.input.minValue(),this.settings.bottomSlide.target,this.settings.topSlide.target):this.input.minValue()}maxValue(){return this.settings?Math.max(this.input.maxValue(),this.settings.bottomSlide.target,this.settings.topSlide.target):this.input.maxValue()}}e.Slide=R;const I=["add","mul","min","max"];class H extends e{constructor(k,$,z,U,G){super(),this.type=k,this.argument1=$,this.argument2=z,this.min=U,this.max=G}compute(k){const $=this.argument1.compute(k);switch(this.type){case"add":return $+this.argument2.compute(k);case"mul":return $===0?0:$*this.argument2.compute(k);case"min":return $<this.argument2.minValue()?$:Math.min($,this.argument2.compute(k));case"max":return $>this.argument2.maxValue()?$:Math.max($,this.argument2.compute(k))}}mapAll(k){return k.map(new H(this.type,this.argument1.mapAll(k),this.argument2.mapAll(k)))}minValue(){var k;return(k=this.min)!=null?k:-1/0}maxValue(){var k;return(k=this.max)!=null?k:1/0}withMinMax(){const k=this.argument1.minValue(),$=this.argument2.minValue(),z=this.argument1.maxValue(),U=this.argument2.maxValue();let G,Q;switch(this.type!=="min"&&this.type!=="max"||!(k>=U||$>=z)||console.warn(`Creating a ${this.type} function between two non-overlapping inputs`),this.type){case"add":G=k+$,Q=z+U;break;case"mul":G=k>0&&$>0?k*$||0:z<0&&U<0?z*U||0:Math.min(k*U||0,$*z||0),Q=k>0&&$>0?z*U||0:z<0&&U<0?k*$||0:Math.max(k*$||0,z*U||0);break;case"min":G=Math.min(k,$),Q=Math.min(z,U);break;case"max":G=Math.max(k,$),Q=Math.max(z,U)}return new H(this.type,this.argument1,this.argument2,G,Q)}}e.Ap2=H;class P extends e{constructor(k,$,z){super(),this.spline=k,this.min=$,this.max=z}compute(k){return kr(this.spline.compute(k),this.min,this.max)}mapAll(k){return k.map(new P(this.spline.mapAll($=>$ instanceof e?$.mapAll(k):$),this.min,this.max))}minValue(){return this.min}maxValue(){return this.max}}e.Spline=P;const j=["offset","factor","jaggedness"];class V extends e{constructor(k,$,z,U,G,Q,X){super(),this.continentalness=k,this.erosion=$,this.weirdness=z,this.spline=U,this.min=G,this.max=Q,this.shaper=X}compute(k){if(!this.shaper)return 0;const $=Vn.point(this.continentalness.compute(k),this.erosion.compute(k),this.weirdness.compute(k));return kr(this.shaper[this.spline]($),this.min,this.max)}mapAll(k){return k.map(new V(this.continentalness.mapAll(k),this.erosion.mapAll(k),this.weirdness.mapAll(k),this.spline,this.min,this.max,this.shaper))}minValue(){return this.min}maxValue(){return this.max}}e.TerrainShaperSpline=V;class K extends e{constructor(k,$,z,U){super(),this.fromY=k,this.toY=$,this.fromValue=z,this.toValue=U}compute(k){return G0(k.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=K})(Me||(Me={}));class mh{constructor(t,n){this.level=t,this.type=n}at(t){return t<this.level?this.type:Bt.AIR}}(al||(al={})).createDisabled=function(e){return{compute({x:t,y:n,z:i},r){if(!(r>0))return e(t,n,i).at(n)}}};var vh,_n;(function(e){function t(f,l){return typeof f=="number"?new n(f,l!=null?l:f):f}e.target=function(f,l,h,d,g,p){return new r(f,l,h,d,g,p)},e.parameters=function(f,l,h,d,g,p,m){return new i(t(f),t(l),t(h),t(d),t(g),t(p),m)},e.param=t;class n{constructor(l,h){this.min=l,this.max=h}distance(l){const h=(typeof l=="number"?l:l.min)-this.max,d=this.min-(typeof l=="number"?l:l.max);return h>0?h:Math.max(d,0)}union(l){return new n(Math.min(this.min,l.min),Math.max(this.max,l.max))}static fromJson(l){var h;if(typeof l=="number")return new n(l,l);const[d,g]=(h=ie.readArray(l,p=>ie.readNumber(p)))!=null?h:[];return new n(d!=null?d:0,g!=null?g:0)}}e.Param=n;class i{constructor(l,h,d,g,p,m,w){this.temperature=l,this.humidity=h,this.continentalness=d,this.erosion=g,this.depth=p,this.weirdness=m,this.offset=w}fittness(l){return jn(this.temperature.distance(l.temperature))+jn(this.humidity.distance(l.humidity))+jn(this.continentalness.distance(l.continentalness))+jn(this.erosion.distance(l.erosion))+jn(this.depth.distance(l.depth))+jn(this.weirdness.distance(l.weirdness))+jn(this.offset-l.offset)}space(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,new n(this.offset,this.offset)]}static fromJson(l){var h,d;const g=(h=ie.readObject(l))!=null?h:{};return new i(n.fromJson(g.temperature),n.fromJson(g.humidity),n.fromJson(g.continentalness),n.fromJson(g.erosion),n.fromJson(g.depth),n.fromJson(g.weirdness),(d=ie.readInt(g.offset))!=null?d:0)}}e.ParamPoint=i;class r{constructor(l,h,d,g,p,m){this.temperature=l,this.humidity=h,this.continentalness=d,this.erosion=g,this.depth=p,this.weirdness=m}get offset(){return 0}toArray(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,this.offset]}}e.TargetPoint=r,e.Parameters=class{constructor(f){this.things=f,this.index=new u(f)}find(f){return this.index.search(f,(l,h)=>l.distance(h))}},e.Sampler=class{constructor(f,l,h,d,g,p){this.temperature=f,this.humidity=l,this.continentalness=h,this.erosion=d,this.depth=g,this.weirdness=p}static fromRouter(f){return new e.Sampler(f.temperature,f.vegetation,f.continents,f.erosion,f.depth,f.ridges)}sample(f,l,h){const d=Me.context(f<<2,l<<2,h<<2);return e.target(this.temperature.compute(d),this.humidity.compute(d),this.continentalness.compute(d),this.erosion.compute(d),this.depth.compute(d),this.weirdness.compute(d))}};const s=class{constructor(f){this.root=s.build(f.map(([l,h])=>new a(l,h)))}static build(f){if(f.length===1)return f[0];if(f.length<=s.CHILDREN_PER_NODE){const g=f.map(p=>{let m=0;for(let w=0;w<7;w+=1){const v=p.space[w];m+=Math.abs((v.min+v.max)/2)}return{key:m,node:p}}).sort((p,m)=>p.key-m.key).map(({node:p})=>p);return new c(g)}let l=1/0,h=-1,d=[];for(let g=0;g<7;++g){f=s.sort(f,g,!1),d=s.bucketize(f);let p=0;for(const m of d)p+=s.area(m.space);l>p&&(l=p,h=g)}return f=s.sort(f,h,!1),d=s.bucketize(f),d=s.sort(d,h,!0),new c(d.map(g=>s.build(g.children)))}static sort(f,l,h){return f.map(d=>{const g=d.space[l],p=(g.min+g.max)/2;return{key:h?Math.abs(p):p,node:d}}).sort((d,g)=>d.key-g.key).map(({node:d})=>d)}static bucketize(f){const l=[];let h=[];const d=Math.pow(10,Math.floor(Math.log(f.length-.01)/Math.log(10)));for(const g of f)h.push(g),h.length<d||(l.push(new c(h)),h=[]);return h.length!==0&&l.push(new c(h)),l}static area(f){let l=0;for(const h of f)l+=Math.abs(h.max-h.min);return l}search(f,l){return this.root.search(f.toArray(),l).thing()}};let u=s;u.CHILDREN_PER_NODE=10,e.RTree=u;class o{constructor(l){this.space=l}distance(l){let h=0;for(let d=0;d<7;d+=1)h+=jn(this.space[d].distance(l[d]));return h}}e.RNode=o;class c extends o{constructor(l){super(c.buildSpace(l)),this.children=l}static buildSpace(l){let h=[...Array(7)].map(()=>new n(1/0,-1/0));for(const d of l)h=[...Array(7)].map((g,p)=>h[p].union(d.space[p]));return h}search(l,h){let d=1/0,g=null;for(const p of this.children){const m=h(p,l);if(d<=m)continue;const w=p.search(l,h),v=p==w?m:h(w,l);d<=v||(d=v,g=w)}return g}}e.RSubTree=c;class a extends o{constructor(l,h){super(l.space()),this.thing=h}search(){return this}}e.RLeaf=a})(vh||(vh={}));class is{constructor(t){this.biome=t}getBiome(){return this.biome}static fromJson(t){var n,i;const r=(n=ie.readObject(t))!=null?n:{},s=Ue.parse((i=ie.readString(r.biome))!=null?i:"minecraft:the_void");return new is(s)}}(function(e){function t(i,r,s){return ai.NOISE.register(Ue.create(i),lr.create(r,s))}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]);const n=new Map;e.instantiate=function(i,r){var s;const u=(s=r.key())==null?void 0:s.toString();if(!u)throw new Error("Cannot instantiate noise from direct holder");const o=i.seedKey(),c=n.get(u);if(c&&c[0]===o[0]&&c[1]===o[1])return c[2];const a=new Ho(i.fromHashOf(u),r.value());return n.set(u,[o[0],o[1],a]),a}})(_n||(_n={}));var cr,ll,zr,cl,ul,Ea,hl,My=Object.defineProperty,Ry=Object.defineProperties,Iy=Object.getOwnPropertyDescriptors,wh=Object.getOwnPropertySymbols,Oy=Object.prototype.hasOwnProperty,Ny=Object.prototype.propertyIsEnumerable,_h=(e,t,n)=>t in e?My(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ah=(e,t)=>{for(var n in t||(t={}))Oy.call(t,n)&&_h(e,n,t[n]);if(wh)for(var n of wh(t))Ny.call(t,n)&&_h(e,n,t[n]);return e};(function(e){const t=i=>ar.parser(ai.DENSITY_FUNCTION,Me.fromJson)(i).value();e.fromJson=function(i){var r;const s=(r=ie.readObject(i))!=null?r:{};return{barrier:t(s.barrier),fluidLevelFloodedness:t(s.fluid_level_floodedness),fluidLevelSpread:t(s.fluid_level_spread),lava:t(s.lava),temperature:t(s.temperature),vegetation:t(s.vegetation),continents:t(s.continents),erosion:t(s.erosion),depth:t(s.depth),ridges:t(s.ridges),initialDensityWithoutJaggedness:t(s.initial_density_without_jaggedness),finalDensity:t(s.final_density),veinToggle:t(s.vein_toggle),veinRidged:t(s.vein_ridged),veinGap:t(s.vein_gap)}},e.create=function(i){return Ah({barrier:Me.Constant.ZERO,fluidLevelFloodedness:Me.Constant.ZERO,fluidLevelSpread:Me.Constant.ZERO,lava:Me.Constant.ZERO,temperature:Me.Constant.ZERO,vegetation:Me.Constant.ZERO,continents:Me.Constant.ZERO,erosion:Me.Constant.ZERO,depth:Me.Constant.ZERO,ridges:Me.Constant.ZERO,initialDensityWithoutJaggedness:Me.Constant.ZERO,finalDensity:Me.Constant.ZERO,veinToggle:Me.Constant.ZERO,veinRidged:Me.Constant.ZERO,veinGap:Me.Constant.ZERO},i)},e.withSettings=function(i,r,s,u=!1){const o=(u?new Pt(s):Je.create(s)).forkPositional(),c=new n(o,r);return a=Ah({},c.mapAll(i)),f={aquiferPositionalRandomFactory:o.fromHashOf(Ue.create("aquifer").toString()).forkPositional(),oreVeinsPositionalRandomFactory:o.fromHashOf(Ue.create("ore").toString()).forkPositional()},Ry(a,Iy(f));var a,f};class n{constructor(r,s){this.random=r,this.settings=s,this.mapped=new Map}map(r){if(r instanceof Me.HolderHolder){const s=r.holder.key();if(s!==void 0&&this.mapped.has(s.toString()))return this.mapped.get(s.toString());{const u=r.holder.value().mapAll(this);return s!==void 0&&this.mapped.set(s.toString(),u),u}}if(r instanceof Me.Interpolated)return r.withCellSize(ut.cellWidth(this.settings),ut.cellHeight(this.settings));if(r instanceof Me.Noise)return new Me.Noise(r.xzScale,r.yScale,r.noiseData,_n.instantiate(this.random,r.noiseData));if(r instanceof Me.ShiftNoise)return r.withNewNoise(_n.instantiate(this.random,r.noiseData));if(r instanceof Me.ShiftedNoise){const s=_n.instantiate(this.random,r.noiseData);return new Me.ShiftedNoise(r.shiftX,r.shiftY,r.shiftZ,r.xzScale,r.yScale,r.noiseData,s)}return r instanceof Me.WeirdScaledSampler?new Me.WeirdScaledSampler(r.input,r.rarityValueMapper,r.noiseData,_n.instantiate(this.random,r.noiseData)):r instanceof Me.OldBlendedNoise?new Me.OldBlendedNoise(new X0(this.random.fromHashOf(Ue.create("terrain").toString()),this.settings.sampling,ut.cellWidth(this.settings),ut.cellHeight(this.settings))):r instanceof Me.Mapped||r instanceof Me.Ap2?r.withMinMax():r instanceof Me.TerrainShaperSpline?new Me.TerrainShaperSpline(r.continentalness,r.erosion,r.weirdness,r.spline,r.min,r.max,this.settings.terrainShaper):r instanceof Me.Slide?new Me.Slide(r.input,this.settings):r}mapAll(r){return{barrier:r.barrier.mapAll(this),fluidLevelFloodedness:r.fluidLevelFloodedness.mapAll(this),fluidLevelSpread:r.fluidLevelSpread.mapAll(this),lava:r.lava.mapAll(this),temperature:r.temperature.mapAll(this),vegetation:r.vegetation.mapAll(this),continents:r.continents.mapAll(this),erosion:r.erosion.mapAll(this),depth:r.depth.mapAll(this),ridges:r.ridges.mapAll(this),initialDensityWithoutJaggedness:r.initialDensityWithoutJaggedness.mapAll(this),finalDensity:r.finalDensity.mapAll(this),veinToggle:r.veinToggle.mapAll(this),veinRidged:r.veinRidged.mapAll(this),veinGap:r.veinGap.mapAll(this)}}}e.Visitor=n,e.computePreliminarySurfaceLevelScanning=function(i,r,s,u){const o=ut.minCellY(i)+ut.cellCountY(i),c=ut.minCellY(i),a=ut.cellHeight(i);for(let f=o;f>=c;f-=1){const l=f*a,h=kr(r.compute(Me.context(s,l,u)),-64,64);if(ut.applySlides(i,h,l)>=.390625)return l}return Number.MAX_SAFE_INTEGER}})(cr||(cr={}));class Py{constructor(t,n,i,r,s,u,o,c,a){this.cellCountXZ=t,this.cellCountY=n,this.cellNoiseMinY=i,this.router=r,this.minX=s,this.minZ=u,this.settings=o,this.preliminarySurfaceLevel=new Map,this.cellWidth=ut.cellWidth(o),this.cellHeight=ut.cellHeight(o),this.firstCellX=Math.floor(s/this.cellWidth),this.firstCellZ=Math.floor(u/this.cellWidth),this.firstNoiseX=s>>2,this.firstNoiseZ=u>>2,this.noiseSizeXZ=t*this.cellWidth>>2,this.aquifer=al.createDisabled(a);const f=this.router.finalDensity;this.materialRule=ll.fromList([l=>this.aquifer.compute(l,f.compute(l))]),this.initialDensityWithoutJaggedness=this.router.initialDensityWithoutJaggedness}getFinalState(t,n,i){return this.materialRule({x:t,y:n,z:i})}getPreliminarySurfaceLevel(t,n){return Uo(this.preliminarySurfaceLevel,Ut.asLong(t,n),()=>cr.computePreliminarySurfaceLevelScanning(this.settings,this.initialDensityWithoutJaggedness,t<<2,n<<2))}getAquifer(){return this.aquifer}}(ll||(ll={})).fromList=function(e){return t=>{for(const n of e){const i=n(t);if(i)return i}}},(zr||(zr={})).fromJson=function(e){var t,n,i,r;const s=(t=ie.readObject(e))!=null?t:{};return s.absolute!==void 0?(u=(n=ie.readNumber(s.absolute))!=null?n:0,()=>u):s.above_bottom!==void 0?function(o){return c=>c.minY+o}((i=ie.readNumber(s.above_bottom))!=null?i:0):s.below_top!==void 0?function(o){return c=>c.maxY-o}((r=ie.readNumber(s.below_top))!=null?r:0):()=>0;var u},(cl||(cl={})).create=function(e,t){return{minY:e,height:t,maxY:e+t-1}};class zy{constructor(t,n,i){this.rule=t,this.defaultBlock=n,this.random=Je.create(i).forkPositional(),this.surfaceNoise=_n.instantiate(this.random,_n.SURFACE),this.surfaceSecondaryNoise=_n.instantiate(this.random,_n.SURFACE_SECONDARY),this.positionalRandoms=new Map}buildSurface(t,n,i,r){const s=Ut.minBlockX(t.pos),u=Ut.minBlockZ(t.pos),o=new Uy(this,t,n,i,r),c=this.rule(o);for(let a=0;a<16;a+=1){const f=s+a;for(let l=0;l<1;l+=1){const h=u+l;o.updateXZ(f,h);let d=0,g=Number.MIN_SAFE_INTEGER,p=Number.MAX_SAFE_INTEGER;for(let m=t.maxY;m>=t.minY;m-=1){const w=or.create(f,m,h),v=t.getBlockState(w);if(v.equals(Bt.AIR)){d=0,g=Number.MIN_SAFE_INTEGER;continue}if(v.isFluid()){g===Number.MIN_SAFE_INTEGER&&(g=m+1);continue}if(p>=m){p=Number.MIN_SAFE_INTEGER;for(let E=m-1;E>=t.minY;E-=1){const b=t.getBlockState(or.create(f,E,h));if(b.equals(Bt.AIR)||b.isFluid()){p=E+1;break}}}d+=1;const A=m-p+1;if(!v.equals(this.defaultBlock))continue;o.updateY(d,A,g,m);const _=c(f,m,h);_&&t.setBlockState(w,_)}}}}getSurfaceDepth(t,n){return 2.75*this.surfaceNoise.sample(t,0,n)+3+.25*this.random.at(t,0,n).nextDouble()}getSurfaceSecondary(t,n){return this.surfaceSecondaryNoise.sample(t,0,n)}getRandom(t){return Uo(this.positionalRandoms,t,()=>this.random.fromHashOf(t))}}class Uy{constructor(t,n,i,r,s){this.system=t,this.chunk=n,this.noiseChunk=i,this.context=r,this.getBiome=s,this.blockX=0,this.blockY=0,this.blockZ=0,this.stoneDepthAbove=0,this.stoneDepthBelow=0,this.surfaceDepth=0,this.waterHeight=0,this.biome=()=>"",this.surfaceSecondary=()=>0,this.minSurfaceLevel=()=>0}updateXZ(t,n){this.blockX=t,this.blockZ=n,this.surfaceDepth=this.system.getSurfaceDepth(t,n),this.surfaceSecondary=Aa(()=>this.system.getSurfaceSecondary(t,n)),this.minSurfaceLevel=Aa(()=>this.calculateMinSurfaceLevel(t,n))}updateY(t,n,i,r){this.blockY=r,this.stoneDepthAbove=t,this.stoneDepthBelow=n,this.waterHeight=i,this.biome=Aa(()=>this.getBiome(or.create(this.blockX,this.blockY,this.blockZ)))}calculateMinSurfaceLevel(t,n){const i=t>>4,r=n>>4,s=this.noiseChunk.getPreliminarySurfaceLevel(i<<4,r<<4),u=this.noiseChunk.getPreliminarySurfaceLevel(i+1<<4,r<<4),o=this.noiseChunk.getPreliminarySurfaceLevel(i<<4,r+1<<4),c=this.noiseChunk.getPreliminarySurfaceLevel(i+1<<4,r+1<<4);return Math.floor(rl((15&t)/16,(15&n)/16,s,u,o,c))+this.surfaceDepth-8}}(function(e){function t(r){return()=>()=>r}function n(r){return s=>{const u=r.map(o=>o(s));return(o,c,a)=>{for(const f of u){const l=f(o,c,a);if(l)return l}}}}function i(r,s){return u=>(o,c,a)=>{if(r(u))return s(u)(o,c,a)}}e.NOOP=()=>()=>{},e.fromJson=function(r){var s,u,o;const c=(s=ie.readObject(r))!=null?s:{};switch((u=ie.readString(c.type))==null?void 0:u.replace(/^minecraft:/,"")){case"block":return t(Bt.fromJson(c.result_state));case"sequence":return n((o=ie.readArray(c.sequence,e.fromJson))!=null?o:[]);case"condition":return i(Ea.fromJson(c.if_true),e.fromJson(c.then_run))}return e.NOOP},e.block=t,e.sequence=n,e.condition=i})(ul||(ul={})),function(e){function t(){return c=>c.blockY>=c.minSurfaceLevel()}function n(c){const a=new Set(c);return f=>a.has(f.biome())}function i(c){return a=>!c(a)}function r(c,a,f,l){return h=>{const d=l?h.stoneDepthBelow:h.stoneDepthAbove,g=a?h.surfaceDepth:0,p=f===0?0:hh(h.surfaceSecondary(),-1,1,0,f);return d<=1+c+g+p}}function s(c,a,f){return l=>{const h=a(l.context),d=f(l.context);if(l.blockY<=h)return!0;if(l.blockY>=d)return!1;const g=l.system.getRandom(c),p=hh(l.blockY,h,d,1,0);return g.nextFloat()<p}}function u(c,a,f){return l=>{if(l.waterHeight===Number.MIN_SAFE_INTEGER)return!0;const h=f?l.stoneDepthAbove:0;return l.blockY+h>=l.waterHeight+c+l.surfaceDepth*a}}function o(c,a,f){return l=>{const h=f?l.stoneDepthAbove:0;return l.blockY+h>=c(l.context)+l.surfaceDepth*a}}e.FALSE=()=>!1,e.TRUE=()=>!0,e.fromJson=function(c){var a,f,l,h,d,g,p,m,w,v,A,_;const E=(a=ie.readObject(c))!=null?a:{};switch((f=ie.readString(E.type))==null?void 0:f.replace(/^minecraft:/,"")){case"above_preliminary_surface":return b=>b.blockY>=b.minSurfaceLevel();case"biome":return n((l=ie.readArray(E.biome_is,b=>{var x;return(x=ie.readString(b))!=null?x:""}))!=null?l:[]);case"not":return i(e.fromJson(E.invert));case"stone_depth":return r((h=ie.readInt(E.offset))!=null?h:0,(d=ie.readBoolean(E.add_surface_depth))!=null&&d,(g=ie.readInt(E.secondary_depth_range))!=null?g:0,ie.readString(E.surface_type)==="ceiling");case"vertical_gradient":return s((p=ie.readString(E.random_name))!=null?p:"",zr.fromJson(E.true_at_and_below),zr.fromJson(E.false_at_and_above));case"water":return u((m=ie.readInt(E.offset))!=null?m:0,(w=ie.readInt(E.surface_depth_multiplier))!=null?w:0,(v=ie.readBoolean(E.add_surface_depth))!=null&&v);case"y_above":return o(zr.fromJson(E.anchor),(A=ie.readInt(E.surface_depth_multiplier))!=null?A:0,(_=ie.readBoolean(E.add_surface_depth))!=null&&_)}return e.FALSE},e.abovePreliminarySurface=t,e.biome=n,e.not=i,e.stoneDepth=r,e.verticalGradient=s,e.water=u,e.yAbove=o}(Ea||(Ea={}));class Hy{constructor(t,n,i){this.biomeSource=n,this.settings=i,this.router=cr.withSettings(i.noiseRouter,i.noise,t,i.legacyRandomSource),this.noiseChunkCache=new Map,this.surfaceSystem=new zy(i.surfaceRule,i.defaultBlock,t);const r=new mh(-54,Bt.LAVA),s=new mh(i.seaLevel,i.defaultFluid);this.globalFluidPicker=(u,o,c)=>o<Math.min(-54,i.seaLevel)?r:s}fill(t,n=!1){var i;const r=Math.max(t.minY,this.settings.noise.minY),s=Math.min(t.maxY,this.settings.noise.minY+this.settings.noise.height),u=ut.cellWidth(this.settings.noise),o=ut.cellHeight(this.settings.noise),c=Math.floor(16/u),a=Math.floor(r/o),f=Math.floor((s-r)/o),l=Ut.minBlockX(t.pos),h=Ut.minBlockZ(t.pos),d=this.getNoiseChunk(t);for(let g=0;g<c;g+=1)for(let p=0;p<(n?1:c);p+=1){let m=t.getOrCreateSection(t.sectionsCount-1);for(let w=f-1;w>=0;w-=1)for(let v=o-1;v>=0;v-=1){const A=(a+w)*o+v,_=15&A,E=t.getSectionIndex(A);t.getSectionIndex(m.minBlockY)!==E&&(m=t.getOrCreateSection(E));for(let b=0;b<u;b+=1){const x=l+g*u+b,y=15&x;for(let C=0;C<(n?1:u);C+=1){const B=h+p*u+C,T=15&B,M=(i=d.getFinalState(x,A,B))!=null?i:this.settings.defaultBlock;m.setBlockState(y,_,T,M)}}}}}buildSurface(t,n="minecraft:plains"){const i=this.getNoiseChunk(t),r=cl.create(this.settings.noise.minY,this.settings.noise.height);this.surfaceSystem.buildSurface(t,i,r,()=>n)}getNoiseChunk(t){return Uo(this.noiseChunkCache,Ut.toLong(t.pos),()=>{const n=Math.max(t.minY,this.settings.noise.minY),i=Math.min(t.maxY,this.settings.noise.minY+this.settings.noise.height),r=ut.cellWidth(this.settings.noise),s=ut.cellHeight(this.settings.noise),u=Math.floor(16/r),o=Math.floor(n/s),c=Math.floor((i-n)/s),a=Ut.minBlockX(t.pos),f=Ut.minBlockZ(t.pos);return new Py(u,c,o,this.router,a,f,this.settings.noise,this.settings.aquifersEnabled,this.globalFluidPicker)})}}(hl||(hl={})).fromJson=function(e){var t,n,i,r,s,u;const o=(t=ie.readObject(e))!=null?t:{};return{surfaceRule:ul.fromJson(o.surface_rule),noise:ut.fromJson(o.noise),defaultBlock:Bt.fromJson(o.default_block),defaultFluid:Bt.fromJson(o.default_fluid),noiseRouter:cr.fromJson(o.noise_router),seaLevel:(n=ie.readInt(o.sea_level))!=null?n:0,disableMobGeneration:(i=ie.readBoolean(o.disable_mob_generation))!=null&&i,aquifersEnabled:(r=ie.readBoolean(o.aquifers_enabled))!=null&&r,oreVeinsEnabled:(s=ie.readBoolean(o.ore_veins_enabled))!=null&&s,legacyRandomSource:(u=ie.readBoolean(o.legacy_random_source))!=null&&u}};let Be,J0=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});J0.decode();let Ms=null;function jy(){return(Ms===null||Ms.buffer!==Be.memory.buffer)&&(Ms=new Uint8Array(Be.memory.buffer)),Ms}function Wy(e,t){return J0.decode(jy().subarray(e,e+t))}const fl=new Uint32Array(2),Vy=new BigInt64Array(fl.buffer);let Rs=null;function rs(){return(Rs===null||Rs.buffer!==Be.memory.buffer)&&(Rs=new Int32Array(Be.memory.buffer)),Rs}let Is=null;function Y0(){return(Is===null||Is.buffer!==Be.memory.buffer)&&(Is=new Float64Array(Be.memory.buffer)),Is}function Gy(e,t){return Y0().subarray(e/8,e/8+t)}let st=0;function pt(e,t){const n=t(e.length*8);return Y0().set(e,n/8),st=e.length,n}let Os=null;function Ky(){return(Os===null||Os.buffer!==Be.memory.buffer)&&(Os=new Uint32Array(Be.memory.buffer)),Os}function Xy(e,t){const n=t(e.length*4);return Ky().set(e,n/4),st=e.length,n}function Jy(e,t,n,i,r,s,u,o,c,a,f,l,h,d){var g=pt(e,Be.__wbindgen_malloc),p=st,m=pt(t,Be.__wbindgen_malloc),w=st,v=pt(n,Be.__wbindgen_malloc),A=st,_=pt(i,Be.__wbindgen_malloc),E=st,b=pt(r,Be.__wbindgen_malloc),x=st,y=pt(s,Be.__wbindgen_malloc),C=st,B=pt(u,Be.__wbindgen_malloc),T=st,M=pt(o,Be.__wbindgen_malloc),R=st,I=pt(c,Be.__wbindgen_malloc),H=st,P=pt(a,Be.__wbindgen_malloc),j=st,V=pt(f,Be.__wbindgen_malloc),K=st,N=pt(l,Be.__wbindgen_malloc),k=st,$=pt(h,Be.__wbindgen_malloc),z=st,U=Xy(d,Be.__wbindgen_malloc),G=st,Q=Be.biome_parameters(g,p,m,w,v,A,_,E,b,x,y,C,B,T,M,R,I,H,P,j,V,K,N,k,$,z,U,G);return jo.__wrap(Q)}function Yy(e,t,n,i,r,s,u,o,c,a,f,l,h){Vy[0]=e;const d=fl[0],g=fl[1];var p=pt(n,Be.__wbindgen_malloc),m=st,w=pt(r,Be.__wbindgen_malloc),v=st,A=pt(u,Be.__wbindgen_malloc),_=st,E=pt(c,Be.__wbindgen_malloc),b=st,x=pt(f,Be.__wbindgen_malloc),y=st,C=pt(h,Be.__wbindgen_malloc),B=st,T=Be.climate_sampler(d,g,t,p,m,i,w,v,s,A,_,o,E,b,a,x,y,l,C,B);return Cs.__wrap(T)}function dl(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`);return e.ptr}function Zy(e,t){return rs().subarray(e/4,e/4+t)}function yh(e,t,n,i,r,s,u,o,c,a,f){try{const g=Be.__wbindgen_add_to_stack_pointer(-16);dl(e,jo),dl(t,Cs),Be.multi_noise(g,e.ptr,t.ptr,n,i,r,s,u,o,c,a,f);var l=rs()[g/4+0],h=rs()[g/4+1],d=Zy(l,h).slice();return Be.__wbindgen_free(l,h*4),d}finally{Be.__wbindgen_add_to_stack_pointer(16)}}function Eh(e,t,n,i,r,s,u,o,c,a){try{const d=Be.__wbindgen_add_to_stack_pointer(-16);dl(e,Cs),Be.climate_noise(d,e.ptr,t,n,i,r,s,u,o,c,a);var f=rs()[d/4+0],l=rs()[d/4+1],h=Gy(f,l).slice();return Be.__wbindgen_free(f,l*8),h}finally{Be.__wbindgen_add_to_stack_pointer(16)}}class jo{static __wrap(t){const n=Object.create(jo.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();Be.__wbg_parameterlist_free(t)}}class Cs{static __wrap(t){const n=Object.create(Cs.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();Be.__wbg_sampler_free(t)}}async function qy(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(i){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",i);else throw i}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 Z0(e){typeof e=="undefined"&&(e=new URL("/assets/deepslate_rs_bg.4990c219.wasm",self.location));const t={};t.wbg={},t.wbg.__wbindgen_throw=function(r,s){throw new Error(Wy(r,s))},(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:n,module:i}=await qy(await e,t);return Be=n.exports,Z0.__wbindgen_wasm_module=i,Be}var bh="/assets/deepslate_rs_bg.4990c219.wasm";let xh=!1;async function Qy(){xh||(await Z0(bh),xh=!0,console.debug(`Loaded deepslate-rs from "${bh}"`))}const e2={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 Ch,Fh;async function t2(e,t,n){var g,p,m;const{biomeSource:i}=await q0(e,n),r=t.data,s=-Math.round(n.offset[0])-100+n.res/2,u=-Math.round(n.offset[1])-100+n.res/2,o=t.width*4/n.res,c=4/n.res,a=[s*n.scale,(200+s)*n.scale,n.res*n.scale],f=[u*n.scale,(200+u)*n.scale,n.res*n.scale],l=n.layers.has("biomes")?(g=i.getBiomes)==null?void 0:g.call(i,...a,64,65,1,...f):void 0,h=[...n.layers].filter(w=>w!=="biomes"),d=h.length===0||(p=i.getClimates)==null?void 0:p.call(i,...a,64,65,1,...f);for(let w=0;w<200;w+=n.res)for(let v=0;v<200;v+=n.res){const A=v*o+w*c,_=w/n.res*200/n.res+v/n.res,E=(w+s)*n.scale,b=(v+u)*n.scale;let x=[50,50,50];if(n.layers.has("biomes")){const y=(m=l==null?void 0:l[_])!=null?m:i.getBiome(E,64,b);x=r2(y.toString(),n.biomeColors)}else if(d&&h[0]){const y=d[_][h[0]],[C,B]=e2[h[0]],T=(y-C)/(B-C)*256;x=[T,T,T]}r[A]=x[0],r[A+1]=x[1],r[A+2]=x[2],r[A+3]=255}}async function n2(e,t,n,i){var o;const{biomeSource:r}=await q0(e,i),[s,u]=s2([t,n],i);return Ce({biome:r.getBiome(s,64,u).toString()},(o=r.getClimate)==null?void 0:o.call(r,s,64,u))}async function q0(e,t){const n=[e,t.octaves,`${t.seed}`,t.version];return yi(n,Ch)||(Ch=$o(n),Fh=await i2(e,t)),{biomeSource:Fh}}async function i2(e,t){var n,i,r,s,u;switch((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,"")){case"fixed":return new is(Ue.parse(e.biome));case"checkerboard":const o=((i=e.scale)!=null?i:2)+2,c=(s=(r=e.biomes)==null?void 0:r.length)!=null?s:0;return{getBiome(a,f,l){var d;const h=(((a>>o)+(l>>o))%c+c)%c;return Ue.parse((d=e.biomes)==null?void 0:d[h].node)}};case"multi_noise":switch((u=e.preset)==null?void 0:u.replace(/^minecraft:/,"")){case"nether":e=Mt(t.version,"1.18")?l2:a2;break;case"overworld":e=Mt(t.version,"1.18")?await c2():e;break}if(e=ae.DataModel.unwrapLists(e),Mt(t.version,"1.18")){await Qy();const a=new gw,f=T=>typeof T=="number"?[T,T]:T,[l,h,d,g,p,m,w,v,A,_,E,b,x,y]=[[],[],[],[],[],[],[],[],[],[],[],[],[],[]];for(const T of e.biomes){const{temperature:M,humidity:R,continentalness:I,erosion:H,weirdness:P,depth:j,offset:V}=T.parameters;l.push(f(M)[0]),h.push(f(M)[1]),d.push(f(R)[0]),g.push(f(R)[1]),p.push(f(I)[0]),m.push(f(I)[1]),w.push(f(H)[0]),v.push(f(H)[1]),A.push(f(P)[0]),_.push(f(P)[1]),E.push(f(j)[0]),b.push(f(j)[1]),x.push(V),y.push(a.getOrPut(T.biome,Math.floor(Math.random()*2147483647)))}const C=Jy(new Float64Array(l),new Float64Array(h),new Float64Array(d),new Float64Array(g),new Float64Array(p),new Float64Array(m),new Float64Array(w),new Float64Array(v),new Float64Array(A),new Float64Array(_),new Float64Array(E),new Float64Array(b),new Float64Array(x),new Int32Array(y)),B=Yy(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(T,M,R){var H;const I=yh(C,B,T,T+1,1,M,M+1,1,R,R+1,1);return Ue.parse((H=a.getA(I[0]))!=null?H:"unknown")},getBiomes(T,M,R,I,H,P,j,V,K){return[...yh(C,B,T,M,R,I,H,P,j,V,K)].map(k=>{var $;return Ue.parse(($=a.getA(k))!=null?$:"unknown")})},getClimate(T,M,R){const I=Eh(B,T,T+1,1,M,M+1,1,R,R+1,1),[H,P,j,V,K]=I.slice(0,5);return{temperature:H,humidity:P,continentalness:j,erosion:V,weirdness:K}},getClimates(T,M,R,I,H,P,j,V,K){const N=Eh(B,T,M,R,I,H,P,j,V,K),k=[];for(let $=0;$<N.length;$+=7){const[z,U,G,Q,X]=N.slice($,$+5);k.push({temperature:z,humidity:U,continentalness:G,erosion:Q,weirdness:X})}return k}}}else{const a=["altitude","temperature","humidity","weirdness"].map((f,l)=>{var d;const h=e[`${f}_noise`];return h.firstOctave=Nt((d=h.firstOctave)!=null?d:-7,-100,-1),new Ho(new Pt(t.seed+BigInt(l)),h)});return!Array.isArray(e.biomes)||e.biomes.length===0?new is(Ue.create("unknown")):{getBiome(f,l,h){const d=a.map(m=>m.sample(f,h,0));let g=1/0,p="";for(const{biome:m,parameters:w}of e.biomes){const v=yr(w.altitude-d[0])+yr(w.temperature-d[1])+yr(w.humidity-d[2])+yr(w.weirdness-d[3])+yr(w.offset);v<g&&(g=v,p=m)}return Ue.parse(p)}}}}throw new Error("Unknown biome source")}function r2(e,t){var i;if(!e)return[128,128,128];const n=(i=t[e])!=null?i:o2[e];return n===void 0?jd(e):n}function s2([e,t],n){const i=(e-n.offset[0]-100+n.res/2)*n.scale,r=(t-n.offset[1]-100+n.res/2)*n.scale;return[i,r]}const o2={"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]},a2={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}}]},l2={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 c2(){return(await Kd("1.18","dimension","overworld")).generator.biome_source}const hi=[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],Sh=[[255,77,54],[59,118,255],[91,207,25],[217,32,245],[255,209,41],[52,204,209]];function u2(e,t,n){const i=new Pt(n.seed),r={placements:[],features:[],random:i,biomeInfoNoise:new qe(i.fork(),0,[1]),seaLevel:63,version:n.version,nextFloat:()=>i.nextFloat(),nextInt:u=>i.nextInt(u),nextGaussian:()=>Math.sqrt(-2*Math.log(1-i.nextFloat()))*Math.cos(2*Math.PI*i.nextFloat()),sampleInt(u){return h2(u,this)}};for(let u=0;u<n.size[0]/16;u+=1)for(let o=0;o<n.size[2]/16;o+=1)Mt(n.version,void 0,"1.17")?Hi([u*16,0,o*16],ae.DataModel.unwrapLists(e),r):g2([u*16,0,o*16],ae.DataModel.unwrapLists(e.placement),r);const s=t.data;t.data.fill(255);for(const[u,o]of r.placements){if(u[0]<0||u[1]<0||u[2]<0||u[0]>=n.size[0]||u[1]>=n.size[1]||u[2]>=n.size[2])continue;const c=u[2]*(t.width*4)+u[0]*4,a=o<Sh.length?Sh[o]:jd(r.features[o]);s[c]=Nt(50,205,a[0]),s[c+1]=Nt(50,205,a[1]),s[c+2]=Nt(50,205,a[2]),s[c+3]=255}for(let u=0;u<n.size[0];u+=1)for(let o=0;o<n.size[2];o+=1){if((Math.floor(u/16)+Math.floor(o/16))%2===0)continue;const c=o*(t.width*4)+u*4;for(let a=0;a<3;a+=1)s[c+a]=.85*s[c+a]}}function ur(e){return e.startsWith("minecraft:")?e.slice(10):e}function Wt(e,t){return[[e[0],t,e[2]]]}function h2(e,t){var n,i;if(typeof e=="number")return e;if(e.base)return(i=e.base)!=null?i:1+t.nextInt(1+((n=e.spread)!=null?n:0));switch(ur(e.type)){case"constant":return e.value;case"uniform":return e.value.min_inclusive+t.nextInt(e.value.max_inclusive-e.value.min_inclusive+1);case"biased_to_bottom":return e.value.min_inclusive+t.nextInt(t.nextInt(e.value.max_inclusive-e.value.min_inclusive+1)+1);case"clamped":return Nt(t.sampleInt(e.value.source),e.value.min_inclusive,e.value.max_inclusive);case"clamped_normal":const r=e.value.mean+t.nextGaussian()*e.value.deviation;return Math.floor(Nt(e.value.min_inclusive,e.value.max_inclusive,r));case"weighted_list":const s=e.distribution.reduce((o,c)=>o+c.weight,0);let u=t.nextInt(s);for(const o of e.distribution)if(u-=o.weight,u<0)return t.sampleInt(o.data);return 0}return 1}function un(e,t){if(!Di(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 f2(e,t){var n,i,r,s;if(!Di(e))throw new Error("Invalid height provider");if(typeof e.type!="string")return un(e);switch(ur(e.type)){case"constant":return un(e.value);case"uniform":{const u=un(e.min_inclusive),o=un(e.max_inclusive);return u+t.nextInt(o-u+1)}case"biased_to_bottom":{const u=un(e.min_inclusive),o=un(e.max_inclusive),c=t.nextInt(o-u-((n=e.inner)!=null?n:1)+1);return u+t.nextInt(c+((i=e.inner)!=null?i:1))}case"very_biased_to_bottom":{const u=un(e.min_inclusive),o=un(e.max_inclusive),c=(r=e.inner)!=null?r:1,a=u+c+t.nextInt(o-u-c+1),f=u+t.nextInt(a-u);return u+t.nextInt(f-u+c)}case"trapezoid":{const u=un(e.min_inclusive),o=un(e.max_inclusive),c=(s=e.plateau)!=null?s:0;if(c>=o-u)return u+t.nextInt(o-u+1);const a=(o-u-c)/2,f=o-u-a;return u+t.nextInt(f+1)+t.nextInt(a+1)}default:throw new Error(`Invalid height provider ${e.type}`)}}function Dh(e,t){const n=t.features.indexOf(e);return n!=-1?n:(t.features.push(e),t.features.length-1)}function Hi(e,t,n){var s;if(typeof t=="string"){n.placements.push([e,Dh(t,n)]);return}const i=ur((s=t==null?void 0:t.type)!=null?s:"no_op"),r=d2[i];r?r(t.config,e,n):n.placements.push([e,Dh(JSON.stringify(t),n)])}function pl(e,t,n){var s;const i=ur((s=t==null?void 0:t.type)!=null?s:"nope"),r=p2[i];return r?r(t==null?void 0:t.config,e,n):[e]}const d2={decorated:(e,t,n)=>{pl(t,e==null?void 0:e.decorator,n).forEach(r=>Hi(r,e==null?void 0:e.feature,n))},random_boolean_selector:(e,t,n)=>{const i=n.nextFloat()<.5?e==null?void 0:e.feature_true:e==null?void 0:e.feature_false;Hi(t,i,n)},random_selector:(e,t,n)=>{var i,r;for(const s of(i=e==null?void 0:e.features)!=null?i:[])if(n.nextFloat()<((r=s==null?void 0:s.chance)!=null?r:0)){Hi(t,s.feature,n);return}Hi(t,e==null?void 0:e.default,n)},simple_random_selector:(e,t,n)=>{var r,s,u;const i=(u=e==null?void 0:e.features)==null?void 0:u[n.nextInt((s=(r=e==null?void 0:e.features)==null?void 0:r.length)!=null?s:0)];Hi(t,i,n)}},p2={chance:(e,t,n)=>{var i;return n.nextFloat()<1/((i=e==null?void 0:e.chance)!=null?i:1)?[t]:[]},count:(e,t,n)=>{var i;return new Array(n.sampleInt((i=e==null?void 0:e.count)!=null?i:1)).fill(t)},count_extra:(e,t,n)=>{var r,s;let i=(r=e==null?void 0:e.count)!=null?r:1;return n.nextFloat()<e.extra_chance&&(i+=(s=e.extra_count)!=null?s:0),new Array(i).fill(t)},count_multilayer:(e,t,n)=>{var i;return new Array(n.sampleInt((i=e==null?void 0:e.count)!=null?i:1)).fill(t).map(r=>[r[0]+n.nextInt(16),r[1],r[2]+n.nextInt(16)])},count_noise:(e,t,n)=>{const r=n.biomeInfoNoise.sample(t[0]/200,0,t[2]/200)<e.noise_level?e.below_noise:e.above_noise;return new Array(r).fill(t)},count_noise_biased:(e,t,n)=>{var u;const i=Math.max(1,e.noise_factor),r=n.biomeInfoNoise.sample(t[0]/i,0,t[2]/i),s=Math.max(0,Math.ceil((r+((u=e.noise_offset)!=null?u:0))*e.noise_to_count_ratio));return new Array(s).fill(t)},dark_oak_tree:(e,t,n)=>[...new Array(16)].map((i,r)=>{const s=Math.floor(r/4)*4+1+n.nextInt(3)+t[0],u=Math.max(n.seaLevel,hi[Nt(0,63,s)]),o=Math.floor(r%4)*4+1+n.nextInt(3)+t[2];return[s,u,o]}),decorated:(e,t,n)=>pl(t,e==null?void 0:e.outer,n).flatMap(i=>pl(i,e==null?void 0:e.inner,n)),depth_average:(e,t,n)=>{var r,s,u,o;const i=n.nextInt((r=e==null?void 0:e.spread)!=null?r:0)+n.nextInt((s=e==null?void 0:e.spread)!=null?s:0)-((u=e.spread)!=null?u:0)+((o=e==null?void 0:e.baseline)!=null?o:0);return Wt(t,i)},emerald_ore:(e,t,n)=>{const i=3+n.nextInt(6);return[...new Array(i)].map(()=>[t[0]+n.nextInt(16),4+n.nextInt(28),t[2]+n.nextInt(16)])},fire:(e,t,n)=>{const i=1+n.nextInt(n.nextInt(n.sampleInt(e==null?void 0:e.count)));return[...new Array(i)].map(()=>[t[0]+n.nextInt(16),n.nextInt(128),t[2]+n.nextInt(16)])},glowstone:(e,t,n)=>{const i=n.nextInt(1+n.nextInt(n.sampleInt(e==null?void 0:e.count)));return[...new Array(i)].map(()=>[t[0]+n.nextInt(16),n.nextInt(128),t[2]+n.nextInt(16)])},heightmap:(e,t,n)=>{const i=Math.max(n.seaLevel,hi[Nt(0,63,t[0])]);return Wt(t,i)},heightmap_spread_double:(e,t,n)=>{const i=Math.max(n.seaLevel,hi[Nt(0,63,t[0])]);return Wt(t,n.nextInt(i*2))},heightmap_world_surface:(e,t,n)=>{const i=Math.max(n.seaLevel,hi[Nt(0,63,t[0])]);return Wt(t,i)},iceberg:(e,t,n)=>[[t[0]+4+n.nextInt(8),t[1],t[2]+4+n.nextInt(8)]],lava_lake:(e,t,n)=>{var i,r;if(n.nextInt(((i=e.chance)!=null?i:1)/10)===0){const s=n.nextInt(n.nextInt(248)+8);if(s<n.seaLevel||n.nextInt(((r=e==null?void 0:e.chance)!=null?r:1)/8)==0){const u=n.nextInt(16)+t[0],o=n.nextInt(16)+t[2];return[[u,s,o]]}}return[]},nope:(e,t)=>[t],range:(e,t,n)=>{var r,s,u;const i=n.nextInt(((r=e==null?void 0:e.maximum)!=null?r:1)-((s=e==null?void 0:e.top_offset)!=null?s:0))+((u=e==null?void 0:e.bottom_offset)!=null?u:0);return Wt(t,i)},range_biased:(e,t,n)=>{var r,s,u;const i=n.nextInt(n.nextInt(((r=e==null?void 0:e.maximum)!=null?r:1)-((s=e==null?void 0:e.top_offset)!=null?s:0))+((u=e==null?void 0:e.bottom_offset)!=null?u:0));return Wt(t,i)},range_very_biased:(e,t,n)=>{var r,s,u,o;const i=n.nextInt(n.nextInt(n.nextInt(((r=e==null?void 0:e.maximum)!=null?r:1)-((s=e==null?void 0:e.top_offset)!=null?s:0))+((u=e==null?void 0:e.bottom_offset)!=null?u:0))+((o=e==null?void 0:e.bottom_offset)!=null?o:0));return Wt(t,i)},spread_32_above:(e,t,n)=>{const i=n.nextInt(t[1]+32);return Wt(t,i)},top_solid_heightmap:(e,t)=>{const n=hi[Nt(0,63,t[0])];return Wt(t,n)},magma:(e,t,n)=>{const i=n.nextInt(t[1]+32);return Wt(t,i)},square:(e,t,n)=>[[t[0]+n.nextInt(16),t[1],t[2]+n.nextInt(16)]],surface_relative_threshold:(e,t)=>{var s,u;const n=hi[Nt(0,63,t[0])],i=n+((s=e==null?void 0:e.min_inclusive)!=null?s:-1/0),r=n+((u=e==null?void 0:e.max_inclusive)!=null?u:1/0);return t[1]<i||t[1]>r?[t]:[]},water_lake:(e,t,n)=>{var i;return n.nextInt((i=e.chance)!=null?i:1)===0?[[t[0]+n.nextInt(16),n.nextInt(256),t[2]+n.nextInt(16)]]:[]}};function g2(e,t,n){var r;let i=[e];for(const s of t)!kh[ur((r=s==null?void 0:s.type)!=null?r:"nope")]||(i=i.flatMap(o=>kh[ur(s.type)](s,o,n)));for(const s of i)n.placements.push([s,0])}const kh={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(i=>[i[0]+n.nextInt(16),i[1],i[2]+n.nextInt(16)]),environment_scan:({},e)=>[e],height_range:({height:e},t,n)=>Wt(t,f2(e,n)),heightmap:({},e,t)=>{const n=Math.max(t.seaLevel,hi[Nt(0,63,e[0])]);return Wt(e,n)},in_square:({},e,t)=>[[e[0]+t.nextInt(16),e[1],e[2]+t.nextInt(16)]],noise_based_count:({noise_to_count_ratio:e,noise_factor:t,noise_offset:n},i,r)=>{const s=Math.max(1,t),u=r.biomeInfoNoise.sample(i[0]/s,0,i[2]/s),o=Math.max(0,Math.ceil((u+(n!=null?n:0))*e));return new Array(o).fill(i)},noise_threshold_count:({noise_level:e,below_noise:t,above_noise:n},i,r)=>{const u=r.biomeInfoNoise.sample(i[0]/200,0,i[2]/200)<e?t:n;return new Array(u).fill(i)},random_offset:({xz_spread:e,y_spread:t},n,i)=>[[n[0]+i.sampleInt(e),n[1]+i.sampleInt(t),n[2]+i.sampleInt(e)]],rarity_filter:({chance:e},t,n)=>n.nextFloat()<1/(e!=null?e:1)?[t]:[]};var en;(function(e){e.UP="up",e.DOWN="down",e.NORTH="north",e.EAST="east",e.SOUTH="south",e.WEST="west"})(en||(en={}));const m2={[en.UP]:[0,1,0],[en.DOWN]:[0,-1,0],[en.NORTH]:[0,0,-1],[en.EAST]:[1,0,0],[en.SOUTH]:[0,0,1],[en.WEST]:[-1,0,0]};var ss;(function(e){e.ALL=[e.UP,e.DOWN,e.NORTH,e.EAST,e.SOUTH,e.WEST],e.normal=function(t){return m2[t]}})(en||(en={})),function(e){e.create=function(t,n,i){return[t,n,i]},e.offset=function(t,n,i,r){return[t[0]+n,t[1]+i,t[2]+r]},e.towards=function(t,n){return e.offset(t,...en.normal(n))}}(ss||(ss={}));function ba(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 v2(e,t){try{return e()}catch{return t}}var se,gn,gl,qi,Ur;(function(e){function t(n){return typeof n=="object"&&n!==null?n:void 0}e.readNumber=function(n){return typeof n=="number"?n:void 0},e.readInt=function(n){return typeof n=="number"?Math.floor(n):void 0},e.readString=function(n){return typeof n=="string"?n:void 0},e.readBoolean=function(n){return typeof n=="boolean"?n:void 0},e.readObject=t,e.readArray=function(n,i){if(Array.isArray(n))return n.map(r=>i(r))},e.readMap=function(n,i){var r;const s=(r=t(n))!==null&&r!==void 0?r:{};return Object.fromEntries(Object.entries(s).map(([u,o])=>[u,i(o)]))},e.compose=function(n,i,r){const s=i(n);return s?r(s):void 0}})(se||(se={}));class Yt{constructor(t,n={}){this.name=t,this.properties=n}getName(){return this.name}getProperties(){return this.properties}getProperty(t){return this.properties[t]}isFluid(){return this.name==="minecraft:water"||this.name==="minecraft:lava"}equals(t){return this.name===t.name&&Object.keys(this.properties).every(n=>t.properties[n]===this.properties[n])}toString(){return Object.keys(this.properties).length===0?this.name:`${this.name}[${Object.entries(this.properties).map(([t,n])=>t+"="+n).join(",")}]`}static fromNbt(t){const n=ba(t.value,"Name","string"),i=v2(()=>ba(t.value,"Properties","compound"),{}),r=Object.keys(i).reduce((s,u)=>Object.assign(Object.assign({},s),{[u]:ba(i,u,"string")}),{});return new Yt(n,r)}static fromJson(t){var n,i;const r=(n=se.readObject(t))!==null&&n!==void 0?n:{},s=(i=se.readString(r.Name))!==null&&i!==void 0?i:"minecraft:stone",u=se.readMap(r.Properties,o=>{var c;return(c=se.readString(o))!==null&&c!==void 0?c:""});return new Yt(s,u)}}Yt.AIR=new Yt("minecraft:air");(function(e){function t(n,i){return BigInt(4294967295&n)|BigInt(4294967295&i)<<BigInt(32)}e.create=function(n,i){return[n,i]},e.fromBlockPos=function(n){return[n[0]>>4,n[2]>>4]},e.fromLong=function(n){return[4294967295&Number(n),Number(n>>BigInt(32))]},e.toLong=function(n){return t(n[0],n[1])},e.asLong=t,e.minBlockX=function(n){return n[0]<<4},e.minBlockZ=function(n){return n[1]<<4},e.maxBlockX=function(n){return 15+(n[0]<<4)},e.maxBlockZ=function(n){return 15+(n[1]<<4)}})(gn||(gn={}));function xa(e){let t=null;return()=>(t==null&&(t=e()),t)}function tc(e,t,n){const i=e.get(t);if(i)return i;const r=n(t);return e.set(t,r),r}function Sn(e){return e*e}function Ni(e,t,n){return Math.max(t,Math.min(n,e))}function gt(e,t,n){return t+e*(n-t)}function ml(e,t,n,i,r,s){return gt(t,gt(e,n,i),gt(e,r,s))}function w2(e,t,n,i,r,s,u,o,c,a,f){return gt(n,ml(e,t,i,r,s,u),ml(e,t,o,c,a,f))}function os(e,t,n){return n<0?e:n>1?t:gt(n,e,t)}function Q0(e,t,n){return(e-t)/(n-t)}function Ca(e){return e*e*e*(e*(6*e-15)+10)}function Gn(e,t,n,i,r){return gt(Q0(e,t,n),i,r)}function _2(e,t,n,i,r){return os(i,r,Q0(e,t,n))}function A2(e,t,n){let i=t-e;for(;i>0;){const r=Math.floor(i/2),s=e+r;n(s)?i=r:(e=s+1,i-=r+1)}return e}function ep(e,t,n){let i=BigInt(3129871*e)^BigInt(n)*BigInt(116129781)^BigInt(t);return i=i*i*BigInt(42317861)+i*BigInt(11),i>>BigInt(16)}function vl(e,t,n,i,r,s,u,o){return BigInt(e)<<BigInt(56)|BigInt(t)<<BigInt(48)|BigInt(n)<<BigInt(40)|BigInt(i)<<BigInt(32)|BigInt(r)<<BigInt(24)|BigInt(s)<<BigInt(16)|BigInt(u)<<BigInt(8)|BigInt(o)}class it{constructor(t){this.seed=BigInt(0),this.setSeed(t)}fork(){return new it(this.nextLong())}forkPositional(){return new y2(this.seed)}setSeed(t){this.seed=t^it.MULTIPLIER&it.MODULUS_MASK}advance(){this.seed=this.seed*it.MULTIPLIER+it.INCREMENT&it.MODULUS_MASK}consume(t){for(let n=0;n<t;n+=1)this.advance()}next(t){this.advance();const n=Number(this.seed>>BigInt(it.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,i;for(;(n=this.next(31))-(i=n%t)+(t-1)<0;);return i}nextLong(){return(BigInt(this.next(32))<<BigInt(32))+BigInt(this.next(32))}nextFloat(){return this.next(24)*it.FLOAT_MULTIPLIER}nextDouble(){const t=this.next(30);return this.advance(),t*it.DOUBLE_MULTIPLIER}}it.MODULUS_BITS=48,it.MODULUS_MASK=BigInt("281474976710655"),it.MULTIPLIER=BigInt("25214903917"),it.INCREMENT=BigInt("11"),it.FLOAT_MULTIPLIER=1/Math.pow(2,24),it.DOUBLE_MULTIPLIER=1/Math.pow(2,30);class y2{constructor(t){this.seed=t}at(t,n,i){const r=ep(t,n,i);return new it(r^this.seed)}fromHashOf(t){const n=zo(t,{asBytes:!0}),i=vl(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]);return new it(i^this.seed)}}class et{constructor(t){this.seed=[BigInt(0),BigInt(0)],this.seed=t}static create(t){return new et(et.upgradeSeedTo128bit(t))}static mixStafford13(t){return((t=((t=(t^t>>BigInt(30))*BigInt("-4658895280553007687")&BigInt("0xFFFFFFFFFFFFFFFF"))^t>>BigInt(27))*BigInt("-7723592293110705685")&BigInt("0xFFFFFFFFFFFFFFFF"))^t>>BigInt(31))&BigInt("0xFFFFFFFFFFFFFFFF")}static upgradeSeedTo128bit(t){t<0&&(t+=BigInt("0x10000000000000000"));const n=t^et.SILVER_RATIO_64,i=n+et.GOLDEN_RATIO_64&BigInt("0xFFFFFFFFFFFFFFFF");return[et.mixStafford13(n),et.mixStafford13(i)]}static rotateLeft(t,n){return t<<n&BigInt("0xFFFFFFFFFFFFFFFF")|t>>BigInt(64)-n}setSeed(t){this.seed=et.upgradeSeedTo128bit(t)}fork(){return new et([this.next(),this.next()])}forkPositional(){return new E2(this.next(),this.next())}next(){const t=this.seed[0];let n=this.seed[1];const i=et.rotateLeft(t+n&BigInt("0xFFFFFFFFFFFFFFFF"),BigInt(17))+t&BigInt("0xFFFFFFFFFFFFFFFF");return n^=t,this.seed=[et.rotateLeft(t,BigInt(49))^n^n<<BigInt(21)&BigInt("0xFFFFFFFFFFFFFFFF"),et.rotateLeft(n,BigInt(28))],i}nextLong(){let t=this.next();return t>BigInt("0x8000000000000000")&&(t-=BigInt("0x10000000000000000")),t}consume(t){let n=this.seed[0],i=this.seed[1];for(let r=0;r<t;r+=1)i^=n,n=et.rotateLeft(n,BigInt(49))^i^i<<BigInt(21),i=et.rotateLeft(i,BigInt(28));this.seed=[n,i]}nextBits(t){return this.next()>>BigInt(64-t)}nextInt(t){let n=this.next()&BigInt(4294967295);if(t){const i=BigInt(t);let r=n*i,s=r&BigInt(4294967295);if(s<i){const o=((~i&BigInt(4294967295))+BigInt(1))%i;for(;s<o;)n=this.next()&BigInt(4294967295),r=n*i,s=r&BigInt(4294967295)}const u=r>>BigInt(32);return Number(u)}{let i=Number(n);return i>=2147483648&&(i-=4294967296),i}}nextFloat(){return Number(this.nextBits(24))*et.FLOAT_MULTIPLIER}nextDouble(){return Number(this.nextBits(53))*et.DOUBLE_MULTIPLIER}parityConfigString(){return"seedLo: "+this.seed[0]+", seedHi: "+this.seed[1]}}et.SILVER_RATIO_64=BigInt("7640891576956012809"),et.GOLDEN_RATIO_64=BigInt("-7046029254386353131"),et.FLOAT_MULTIPLIER=1/Math.pow(2,24),et.DOUBLE_MULTIPLIER=11102230246251565e-32;class E2{constructor(t,n){this.seedLo=t,this.seedHi=n}at(t,n,i){const r=ep(t,n,i)^this.seedLo;return new et([r,this.seedHi])}fromHashOf(t){const n=zo(t,{asBytes:!0}),i=vl(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),r=vl(n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]);return new et([i^this.seedLo,r^this.seedHi])}}class ht{constructor(t){this.xo=256*t.nextDouble(),this.yo=256*t.nextDouble(),this.zo=256*t.nextDouble(),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 i=t.nextInt(256-n),r=this.p[n];this.p[n]=this.p[n+i],this.p[n+i]=r}}sample2D(t,n){let i,r,s;const u=(t+n)*ht.F2,o=Math.floor(t+u),c=t-(o-(i=(o+(r=Math.floor(n+u)))*ht.G2));let a,f;c>(s=n-(r-i))?(a=1,f=0):(a=0,f=1);const l=c-a+ht.G2,h=s-f+ht.G2,d=c-1+2*ht.G2,g=s-1+2*ht.G2,p=255&o,m=255&r,w=this.P(p+this.P(m))%12,v=this.P(p+a+this.P(m+f))%12,A=this.P(p+1+this.P(m+1))%12;return 70*(this.getCornerNoise3D(w,c,s,0,.5)+this.getCornerNoise3D(v,l,h,0,.5)+this.getCornerNoise3D(A,d,g,0,.5))}sample(t,n,i){const r=.3333333333333333*(t+n+i),s=Math.floor(t+r),u=Math.floor(n+r),o=Math.floor(i+r),c=.16666666666666666*(s+u+o),a=t-(s-c),f=n-(u-c),l=i-(o-c);let h,d,g,p,m,w;a>=f?f>=l?(h=1,d=0,g=0,p=1,m=1,w=0):a>=l?(h=1,d=0,g=0,p=1,m=0,w=1):(h=0,d=0,g=1,p=1,m=0,w=1):f<l?(h=0,d=0,g=1,p=0,m=1,w=1):a<l?(h=0,d=1,g=0,p=0,m=1,w=1):(h=0,d=1,g=0,p=1,m=1,w=0);const v=a-h+.16666666666666666,A=f-d+.16666666666666666,_=l-g+.16666666666666666,E=a-p+.3333333333333333,b=f-m+.3333333333333333,x=l-w+.3333333333333333,y=a-.5,C=f-.5,B=l-.5,T=255&s,M=255&u,R=255&o,I=this.P(T+this.P(M+this.P(R)))%12,H=this.P(T+h+this.P(M+d+this.P(R+g)))%12,P=this.P(T+p+this.P(M+m+this.P(R+w)))%12,j=this.P(T+1+this.P(M+1+this.P(R+1)))%12;return 32*(this.getCornerNoise3D(I,a,f,l,.6)+this.getCornerNoise3D(H,v,A,_,.6)+this.getCornerNoise3D(P,E,b,x,.6)+this.getCornerNoise3D(j,y,C,B,.6))}P(t){return this.p[255&t]}getCornerNoise3D(t,n,i,r,s){let u,o=s-n*n-i*i-r*r;return o<0?u=0:(o*=o,u=o*o*ht.gradDot(t,n,i,r)),u}static gradDot(t,n,i,r){const s=ht.GRADIENT[15&t];return s[0]*n+s[1]*i+s[2]*r}}ht.GRADIENT=[[1,1,0],[-1,1,0],[1,-1,0],[-1,-1,0],[1,0,1],[-1,0,1],[1,0,-1],[-1,0,-1],[0,1,1],[0,-1,1],[0,1,-1],[0,-1,-1],[1,1,0],[0,-1,1],[-1,1,0],[0,-1,-1]],ht.F2=.5*(Math.sqrt(3)-1),ht.G2=(3-Math.sqrt(3))/6;class Bh{constructor(t){this.xo=256*t.nextDouble(),this.yo=256*t.nextDouble(),this.zo=256*t.nextDouble(),this.p=Array(256);for(let n=0;n<256;n+=1)this.p[n]=n>127?n-256:n;for(let n=0;n<256;n+=1){const i=t.nextInt(256-n),r=this.p[n];this.p[n]=this.p[n+i],this.p[n+i]=r}}sample(t,n,i,r=0,s=0){const u=t+this.xo,o=n+this.yo,c=i+this.zo,a=Math.floor(u),f=Math.floor(o),l=Math.floor(c),h=u-a,d=o-f,g=c-l;let p=0;if(r!==0){const m=s>=0&&s<d?s:d;p=Math.floor(m/r+1e-7)*r}return this.sampleAndLerp(a,f,l,h,d-p,g,d)}sampleAndLerp(t,n,i,r,s,u,o){const c=this.P(t),a=this.P(t+1),f=this.P(c+n),l=this.P(c+n+1),h=this.P(a+n),d=this.P(a+n+1),g=ht.gradDot(this.P(f+i),r,s,u),p=ht.gradDot(this.P(h+i),r-1,s,u),m=ht.gradDot(this.P(l+i),r,s-1,u),w=ht.gradDot(this.P(d+i),r-1,s-1,u),v=ht.gradDot(this.P(f+i+1),r,s,u-1),A=ht.gradDot(this.P(h+i+1),r-1,s,u-1),_=ht.gradDot(this.P(l+i+1),r,s-1,u-1),E=ht.gradDot(this.P(d+i+1),r-1,s-1,u-1);return w2(Ca(r),Ca(o),Ca(u),g,p,m,w,v,A,_,E)}P(t){return 255&this.p[255&t]}}class kt{constructor(t,n,i){if(t instanceof et){const r=t.forkPositional();this.noiseLevels=Array(i.length);for(let s=0;s<i.length;s++)if(i[s]!==0){const u=n+s;this.noiseLevels[s]=new Bh(r.fromHashOf("octave_"+u))}}else{if(1-n<i.length)throw new Error("Positive octaves are not allowed when using LegacyRandom");this.noiseLevels=Array(i.length);for(let r=-n;r>=0;r-=1)r<i.length&&i[r]!==0?this.noiseLevels[r]=new Bh(t):t.consume(262)}this.amplitudes=i,this.lowestFreqInputFactor=Math.pow(2,n),this.lowestFreqValueFactor=Math.pow(2,i.length-1)/(Math.pow(2,i.length)-1)}sample(t,n,i,r=0,s=0,u=!1){let o=0,c=this.lowestFreqInputFactor,a=this.lowestFreqValueFactor;for(let f=0;f<this.noiseLevels.length;f+=1){const l=this.noiseLevels[f];l&&(o+=this.amplitudes[f]*a*l.sample(kt.wrap(t*c),u?-l.yo:kt.wrap(n*c),kt.wrap(i*c),r*c,s*c)),c*=2,a/=2}return o}getOctaveNoise(t){return this.noiseLevels[this.noiseLevels.length-1-t]}static wrap(t){return t-33554432*Math.floor(t/33554432+.5)}}class Th{constructor(t,n,i,r){this.cellWidth=i,this.cellHeight=r,this.minLimitNoise=new kt(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.maxLimitNoise=new kt(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.mainNoise=new kt(t,-7,[1,1,1,1,1,0,0,0]),this.xzScale=684.412*n.xzScale,this.yScale=684.412*n.yScale,this.xzMainScale=this.xzScale/n.xzFactor,this.yMainScale=this.yScale/n.yFactor}sample(t,n,i){let r;t=Math.floor(t/this.cellWidth),n=Math.floor(n/this.cellHeight),i=Math.floor(i/this.cellWidth);let s=0,u=1;for(let a=0;a<8;a+=1){if(r=this.mainNoise.getOctaveNoise(a),r){const f=this.xzMainScale*u,l=this.yMainScale*u,h=kt.wrap(t*f),d=kt.wrap(n*l),g=kt.wrap(i*f);s+=r.sample(h,d,g,l,n*l)/u}u/=2}s=(s/10+1)/2,u=1;let o=0,c=0;for(let a=0;a<16;a+=1){const f=this.xzScale*u,l=this.yScale*u,h=kt.wrap(t*f),d=kt.wrap(n*l),g=kt.wrap(i*f);s<1&&(r=this.minLimitNoise.getOctaveNoise(a))&&(o+=r.sample(h,d,g,l,n*l)/u),s>0&&(r=this.maxLimitNoise.getOctaveNoise(a))&&(c+=r.sample(h,d,g,l,n*l)/u),u/=2}return os(o/512,c/512,s)/128}}(function(e){e.fromJson=function(t){var n,i,r,s,u;const o=(n=se.readObject(t))!==null&&n!==void 0?n:{};return{xzScale:(i=se.readNumber(o.xz_scale))!==null&&i!==void 0?i:1,yScale:(r=se.readNumber(o.y_scale))!==null&&r!==void 0?r:1,xzFactor:(s=se.readNumber(o.xz_factor))!==null&&s!==void 0?s:80,yFactor:(u=se.readNumber(o.y_factor))!==null&&u!==void 0?u:80}}})(gl||(gl={}));class Rn{constructor(t,{firstOctave:n,amplitudes:i}){this.first=new kt(t,n,i),this.second=new kt(t,n,i);let r=1/0,s=-1/0;for(let o=0;o<i.length;o+=1)i[o]!==0&&(r=Math.min(r,o),s=Math.max(s,o));const u=.1*(1+1/(s-r+1));this.valueFactor=1/6/u}sample(t,n,i){const r=t*Rn.INPUT_FACTOR,s=n*Rn.INPUT_FACTOR,u=i*Rn.INPUT_FACTOR;return(this.first.sample(t,n,i)+this.second.sample(r,s,u))*this.valueFactor}}Rn.INPUT_FACTOR=1.0181268882175227,function(e){e.create=function(t,n){return{firstOctave:t,amplitudes:n}},e.fromJson=function(t){var n,i,r;const s=(n=se.readObject(t))!==null&&n!==void 0?n:{};return{firstOctave:(i=se.readInt(s.firstOctave))!==null&&i!==void 0?i:0,amplitudes:(r=se.readArray(s.amplitudes,u=>{var o;return(o=se.readNumber(u))!==null&&o!==void 0?o:0}))!==null&&r!==void 0?r:[]}}}(qi||(qi={}));(function(e){e.fromJson=function(t,n){var i,r,s,u;if(typeof t=="number")return new wl(t);const o=(i=se.readObject(t))!==null&&i!==void 0?i:{},c=new dt(n(o.coordinate)),a=(r=se.readArray(o.points,f=>{var l;return(l=se.readObject(f))!==null&&l!==void 0?l:{}}))!==null&&r!==void 0?r:[];if(a.length===0)return new wl(0);for(const f of a){const l=(s=se.readNumber(f.location))!==null&&s!==void 0?s:0,h=e.fromJson(f.value,n),d=(u=se.readNumber(f.derivative))!==null&&u!==void 0?u:0;c.addPoint(l,h,d)}return c}})(Ur||(Ur={}));class wl{constructor(t){this.value=t}apply(){return this.value}toJson(){return this.value}}class dt{constructor(t,n=[],i=[],r=[]){this.coordinate=t,this.locations=n,this.values=i,this.derivatives=r}apply(t){const n=this.coordinate.apply(t),i=A2(0,this.locations.length,g=>n<this.locations[g])-1,r=this.locations.length-1;if(i<0)return this.values[0].apply(t)+this.derivatives[0]*(n-this.locations[0]);if(i===r)return this.values[r].apply(t)+this.derivatives[r]*(n-this.locations[r]);const s=this.locations[i],u=this.locations[i+1],o=this.derivatives[i],c=this.derivatives[i+1],a=(n-s)/(u-s),f=this.values[i].apply(t),l=this.values[i+1].apply(t),h=o*(u-s)-(l-f),d=-c*(u-s)+(l-f);return gt(a,f,l)+a*(1-a)*gt(a,h,d)}addPoint(t,n,i=0){return this.locations.push(t),this.values.push(typeof n=="number"?new wl(n):n),this.derivatives.push(i),this}toJson(){return{coordinate:this.coordinate.toJson(),points:this.locations.map((t,n)=>({location:t,value:this.values[n].toJson(),derivative:this.derivatives[n]}))}}}var Lh;(function(e){e.rotate=function(t,n,i){let{up:r,down:s,north:u,east:o,south:c,west:a}=t;switch(i){case 90:[u,o,c,a]=[o,c,a,u];break;case 180:[u,o,c,a]=[c,a,u,o];break;case 270:[u,o,c,a]=[a,u,o,c]}switch(n){case 90:[r,u,s,c]=[u,s,c,r];break;case 180:[r,u,s,c]=[s,c,r,u];break;case 270:[r,u,s,c]=[c,r,u,s]}return{up:r,down:s,north:u,east:o,south:c,west:a}}})(Lh||(Lh={}));var _l,Al,ot,Gi,yl,pe,El,Hr,bl,xl,Fa,$h,Sa;(function(e){function t(a,f){return typeof a=="number"?new n(a,f!=null?f:a):a}e.target=function(a,f,l,h,d,g){return new r(a,f,l,h,d,g)},e.parameters=function(a,f,l,h,d,g,p){return new i(t(a),t(f),t(l),t(h),t(d),t(g),p)},e.param=t;class n{constructor(f,l){this.min=f,this.max=l}distance(f){const l=(typeof f=="number"?f:f.min)-this.max,h=this.min-(typeof f=="number"?f:f.max);return l>0?l:Math.max(h,0)}union(f){return new n(Math.min(this.min,f.min),Math.max(this.max,f.max))}static fromJson(f){var l;if(typeof f=="number")return new n(f,f);const[h,d]=(l=se.readArray(f,g=>se.readNumber(g)))!==null&&l!==void 0?l:[];return new n(h!=null?h:0,d!=null?d:0)}}e.Param=n;class i{constructor(f,l,h,d,g,p,m){this.temperature=f,this.humidity=l,this.continentalness=h,this.erosion=d,this.depth=g,this.weirdness=p,this.offset=m}fittness(f){return Sn(this.temperature.distance(f.temperature))+Sn(this.humidity.distance(f.humidity))+Sn(this.continentalness.distance(f.continentalness))+Sn(this.erosion.distance(f.erosion))+Sn(this.depth.distance(f.depth))+Sn(this.weirdness.distance(f.weirdness))+Sn(this.offset-f.offset)}space(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,new n(this.offset,this.offset)]}static fromJson(f){var l,h;const d=(l=se.readObject(f))!==null&&l!==void 0?l:{};return new i(n.fromJson(d.temperature),n.fromJson(d.humidity),n.fromJson(d.continentalness),n.fromJson(d.erosion),n.fromJson(d.depth),n.fromJson(d.weirdness),(h=se.readInt(d.offset))!==null&&h!==void 0?h:0)}}e.ParamPoint=i;class r{constructor(f,l,h,d,g,p){this.temperature=f,this.humidity=l,this.continentalness=h,this.erosion=d,this.depth=g,this.weirdness=p}get offset(){return 0}toArray(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,this.offset]}}e.TargetPoint=r,e.Parameters=class{constructor(a){this.things=a,this.index=new s(a)}find(a){return this.index.search(a,(f,l)=>f.distance(l))}};class s{constructor(f){this.root=s.build(f.map(([l,h])=>new c(l,h)))}static build(f){if(f.length===1)return f[0];if(f.length<=s.CHILDREN_PER_NODE){const g=f.map(p=>{let m=0;for(let w=0;w<7;w+=1){const v=p.space[w];m+=Math.abs((v.min+v.max)/2)}return{key:m,node:p}}).sort((p,m)=>p.key-m.key).map(({node:p})=>p);return new o(g)}let l=1/0,h=-1,d=[];for(let g=0;g<7;++g){f=s.sort(f,g,!1),d=s.bucketize(f);let p=0;for(const m of d)p+=s.area(m.space);l>p&&(l=p,h=g)}return f=s.sort(f,h,!1),d=s.bucketize(f),d=s.sort(d,h,!0),new o(d.map(g=>s.build(g.children)))}static sort(f,l,h){return f.map(d=>{const g=d.space[l],p=(g.min+g.max)/2;return{key:h?Math.abs(p):p,node:d}}).sort((d,g)=>d.key-g.key).map(({node:d})=>d)}static bucketize(f){const l=[];let h=[];const d=Math.pow(10,Math.floor(Math.log(f.length-.01)/Math.log(10)));for(const g of f)h.push(g),h.length<d||(l.push(new o(h)),h=[]);return h.length!==0&&l.push(new o(h)),l}static area(f){let l=0;for(const h of f)l+=Math.abs(h.max-h.min);return l}search(f,l){return this.root.search(f.toArray(),l).thing()}}s.CHILDREN_PER_NODE=10,e.RTree=s;class u{constructor(f){this.space=f}distance(f){let l=0;for(let h=0;h<7;h+=1)l+=Sn(this.space[h].distance(f[h]));return l}}e.RNode=u;class o extends u{constructor(f){super(o.buildSpace(f)),this.children=f}static buildSpace(f){let l=[...Array(7)].map(()=>new n(1/0,-1/0));for(const h of f)l=[...Array(7)].map((d,g)=>l[g].union(h.space[g]));return l}search(f,l){let h=1/0,d=null;for(const g of this.children){const p=l(g,f);if(h<=p)continue;const m=g.search(f,l),w=g==m?p:l(m,f);h<=w||(h=w,d=m)}return d}}e.RSubTree=o;class c extends u{constructor(f,l){super(f.space()),this.thing=l}search(){return this}}e.RLeaf=c})(_l||(_l={}));class nc{constructor(t){this.biome=t}getBiome(){return this.biome}static fromJson(t){var n,i;const r=(n=se.readObject(t))!==null&&n!==void 0?n:{},s=(i=se.readString(r.biome))!==null&&i!==void 0?i:"minecraft:the_void";return new nc(s)}}class ct{constructor(t,n,i){this.offsetSampler=t,this.factorSampler=n,this.jaggednessSampler=i}static extractor(t){return{apply:n=>n[t],toJson:()=>t}}static fromJson(t){var n;const i=(n=se.readObject(t))!==null&&n!==void 0?n:{};return new ct(Ur.fromJson(i.offset,this.EXTRACTOR),Ur.fromJson(i.factor,this.EXTRACTOR),Ur.fromJson(i.jaggedness,this.EXTRACTOR))}toJson(){return{offset:this.offsetSampler.toJson(),factor:this.factorSampler.toJson(),jaggedness:this.jaggednessSampler.toJson()}}offset(t){return this.offsetSampler.apply(t)+ct.GLOBAL_OFFSET}factor(t){return this.factorSampler.apply(t)}jaggedness(t){return this.jaggednessSampler.apply(t)}static point(t,n,i){return{continents:t,erosion:n,weirdness:i,ridges:this.peaksAndValleys(i)}}static peaksAndValleys(t){return 3*-(Math.abs(Math.abs(t)-.6666667)-.33333334)}static overworld(){const t=this.buildErosionOffsetSpline(-.05,0,0,.1,0,-.03,!1,!1),n=this.buildErosionOffsetSpline(-.1,.03,.1,.1,.01,-.03,!1,!1),i=this.buildErosionOffsetSpline(-.1,.03,.1,.7,.01,-.03,!0,!0),r=this.buildErosionOffsetSpline(.3,.03,.1,1,.01,.01,!0,!0),s=new dt(this.CONTINENTS).addPoint(-1.1,.044).addPoint(-1.02,-.2222).addPoint(-.51,-.2222).addPoint(-.44,-.12).addPoint(-.18,-.12).addPoint(-.16,t).addPoint(-.15,t).addPoint(-.1,n).addPoint(.25,i).addPoint(1,r),u=new dt(this.CONTINENTS).addPoint(-.19,3.95).addPoint(-.15,this.getErosionFactor(6.25,!0)).addPoint(-.1,this.getErosionFactor(5.47,!0)).addPoint(.03,this.getErosionFactor(5.08,!0)).addPoint(.06,this.getErosionFactor(4.69,!1)),o=new dt(this.CONTINENTS).addPoint(.11,0).addPoint(.03,this.buildErosionJaggednessSpline(1,.5,0,0)).addPoint(.65,this.buildErosionJaggednessSpline(1,1,1,0));return new ct(s,u,o)}static getErosionFactor(t,n){const i=new dt(this.WEIRDNESS).addPoint(-.2,6.3).addPoint(.2,t),r=new dt(this.EROSION).addPoint(-.6,i).addPoint(-.5,new dt(this.WEIRDNESS).addPoint(-.05,6.3).addPoint(.05,2.67)).addPoint(-.35,i).addPoint(-.25,i).addPoint(-.1,new dt(this.WEIRDNESS).addPoint(-.05,2.67).addPoint(.05,6.3)).addPoint(.03,i);if(n){const s=new dt(this.WEIRDNESS).addPoint(0,t).addPoint(.1,.625),u=new dt(this.RIDGES).addPoint(-.9,t).addPoint(-.69,s);r.addPoint(.35,t).addPoint(.45,u).addPoint(.55,u).addPoint(.62,t)}else{const s=new dt(this.RIDGES).addPoint(-.7,i).addPoint(-.15,1.37),u=new dt(this.RIDGES).addPoint(.45,i).addPoint(.7,1.56);r.addPoint(.05,u).addPoint(.4,u).addPoint(.45,s).addPoint(.55,s).addPoint(.58,t)}return r}static buildErosionOffsetSpline(t,n,i,r,s,u,o,c){const a=this.buildMountainRidgeSplineWithPoints(gt(r,.6,1.5),c),f=this.buildMountainRidgeSplineWithPoints(gt(r,.6,1),c),l=this.buildMountainRidgeSplineWithPoints(r,c),h=this.ridgeSpline(t-.15,.5*r,gt(.5,.5,.5)*r,.5*r,.6*r,.5),d=this.ridgeSpline(t,s*r,n*r,.5*r,.6*r,.5),g=this.ridgeSpline(t,s,s,n,i,.5),p=this.ridgeSpline(t,s,s,n,i,.5),m=new dt(this.RIDGES).addPoint(-1,t).addPoint(-.4,g).addPoint(0,i+.07),w=this.ridgeSpline(-.02,u,u,n,i,0),v=new dt(this.EROSION).addPoint(-.85,a).addPoint(-.7,f).addPoint(-.4,l).addPoint(-.35,h).addPoint(-.1,d).addPoint(.2,g);return o&&v.addPoint(.4,p).addPoint(.45,m).addPoint(.55,m).addPoint(.58,p),v.addPoint(.7,w),v}static buildMountainRidgeSplineWithPoints(t,n){const i=new dt(this.RIDGES),r=this.mountainContinentalness(-1,t,-.7),s=this.mountainContinentalness(1,t,-.7),u=this.calculateMountainRidgeZeroContinentalnessPoint(t);if(-.65<u&&u<1){const o=this.mountainContinentalness(-.65,t,-.7),c=this.mountainContinentalness(-.75,t,-.7),a=this.calculateSlope(r,c,-1,-.75);i.addPoint(-1,r,a),i.addPoint(-.75,c),i.addPoint(-.65,o);const f=this.mountainContinentalness(u,t,-.7),l=this.calculateSlope(f,s,u,1);i.addPoint(u-.01,f),i.addPoint(u,f,l),i.addPoint(1,s,l)}else{const o=this.calculateSlope(r,s,-1,1);n?(i.addPoint(-1,Math.max(.2,r)),i.addPoint(0,gt(.5,r,s),o)):i.addPoint(-1,r,o),i.addPoint(1,s,o)}return i}static mountainContinentalness(t,n,i){const r=.46082947*(t+1.17)*(1-.5*(1-n))-.5*(1-n);return t<i?Math.max(r,-.2222):Math.max(r,0)}static calculateMountainRidgeZeroContinentalnessPoint(t){return .5*(1-t)/(.46082947*(1-.5*(1-t)))-1.17}static calculateSlope(t,n,i,r){return(n-t)/(r-i)}static ridgeSpline(t,n,i,r,s,u){const o=Math.max(.5*(n-t),u),c=5*(i-n);return new dt(this.RIDGES).addPoint(-1,t,o).addPoint(-.4,n,Math.min(o,c)).addPoint(0,i,c).addPoint(.4,r,2*(r-i)).addPoint(1,s,.7*(s-r))}static buildErosionJaggednessSpline(t,n,i,r){const s=this.buildRidgeJaggednessSpline(t,i),u=this.buildRidgeJaggednessSpline(n,r);return new dt(this.EROSION).addPoint(-1,s).addPoint(-.78,u).addPoint(-.5775,u).addPoint(-.375,0)}static buildRidgeJaggednessSpline(t,n){const i=ct.peaksAndValleys(.4),r=(i+ct.peaksAndValleys(.56666666))/2;return new dt(this.RIDGES).addPoint(i,0).addPoint(r,n>0?this.buildWeirdnessJaggednessSpline(n):0).addPoint(1,t>0?this.buildWeirdnessJaggednessSpline(t):0)}static buildWeirdnessJaggednessSpline(t){return new dt(ct.WEIRDNESS).addPoint(-.01,.63*t).addPoint(.01,.3*t)}}ct.GLOBAL_OFFSET=-.50375,ct.EXTRACTOR=e=>{var t;const n=(t=se.readString(e))!==null&&t!==void 0?t:"continents";return ct.extractor(n)},ct.CONTINENTS=ct.extractor("continents"),ct.EROSION=ct.extractor("erosion"),ct.WEIRDNESS=ct.extractor("weirdness"),ct.RIDGES=ct.extractor("ridges"),function(e){e.fromList=function(t){return(n,i,r,s)=>{for(const u of t){const o=u(n,i,r,s);if(o)return o}return null}}}(Al||(Al={})),function(e){function t(n){return n.ySize<<2}e.fromJson=function(n){var i,r,s,u,o,c,a,f;const l=(i=se.readObject(n))!==null&&i!==void 0?i:{};return{minY:(r=se.readInt(l.min_y))!==null&&r!==void 0?r:0,height:(s=se.readInt(l.height))!==null&&s!==void 0?s:256,xzSize:(u=se.readInt(l.size_horizontal))!==null&&u!==void 0?u:1,ySize:(o=se.readInt(l.size_vertical))!==null&&o!==void 0?o:1,sampling:gl.fromJson(l.sampling),topSlide:Gi.fromJson(l.top_slide),bottomSlide:Gi.fromJson(l.bottom_slide),terrainShaper:ct.fromJson(l.terrain_shaper),islandNoiseOverride:(c=se.readBoolean(l.island_noise_override))!==null&&c!==void 0&&c,isAmplified:(a=se.readBoolean(l.amplified))!==null&&a!==void 0&&a,hasLargeBiomes:(f=se.readBoolean(l.large_biomes))!==null&&f!==void 0&&f}},e.cellHeight=t,e.cellWidth=function(n){return n.xzSize<<2},e.cellCountY=function(n){return n.height/t(n)},e.minCellY=function(n){return Math.floor(n.minY/t(n))}}(ot||(ot={})),function(e){e.fromJson=function(t){var n,i,r,s;const u=(n=se.readObject(t))!==null&&n!==void 0?n:{};return{target:(i=se.readNumber(u.target))!==null&&i!==void 0?i:0,size:(r=se.readInt(u.size))!==null&&r!==void 0?r:0,offset:(s=se.readInt(u.offset))!==null&&s!==void 0?s:0}},e.apply=function(t,n,i){if(t.size<=0)return n;const r=(i-t.offset)/t.size;return os(t.target,n,r)}}(Gi||(Gi={}));class mo{constructor(t,n){this.chunk=t,this.filler=n,this.noise000=0,this.noise001=0,this.noise100=0,this.noise101=0,this.noise010=0,this.noise011=0,this.noise110=0,this.noise111=0,this.valueXZ00=0,this.valueXZ10=0,this.valueXZ01=0,this.valueXZ11=0,this.valueZ0=0,this.valueZ1=0,this.value=0,this.slice0=mo.allocateSlice(t.cellCountY,t.cellCountXZ),this.slice1=mo.allocateSlice(t.cellCountY,t.cellCountXZ)}static allocateSlice(t,n){const i=Array(n+1);for(let r=0;r<n+1;r+=1)i[r]=Array(t+1);return i}initializeForFirstCellX(){this.fillSlice(this.slice0,this.chunk.firstCellX)}advanceCellX(t){this.fillSlice(this.slice1,this.chunk.firstCellX+t+1)}fillSlice(t,n){const i=ot.cellWidth(this.chunk.settings.noise),r=ot.cellHeight(this.chunk.settings.noise),s=n*i;for(let u=0;u<this.chunk.cellCountXZ+1;u+=1){const o=(this.chunk.firstCellZ+u)*i;for(let c=0;c<this.chunk.cellCountY+1;c+=1){const a=(this.chunk.cellCountNoiseMinY+c)*r;t[u][c]=this.filler(s,a,o)}}}selectCellYZ(t,n){this.noise000=this.slice0[n][t],this.noise001=this.slice0[n+1][t],this.noise100=this.slice1[n][t],this.noise101=this.slice1[n+1][t],this.noise010=this.slice0[n][t+1],this.noise011=this.slice0[n+1][t+1],this.noise110=this.slice1[n][t+1],this.noise111=this.slice1[n+1][t+1]}updateForY(t){this.valueXZ00=gt(t,this.noise000,this.noise010),this.valueXZ10=gt(t,this.noise100,this.noise110),this.valueXZ01=gt(t,this.noise001,this.noise011),this.valueXZ11=gt(t,this.noise101,this.noise111)}updateForX(t){this.valueZ0=gt(t,this.valueXZ00,this.valueXZ10),this.valueZ1=gt(t,this.valueXZ01,this.valueXZ11)}updateForZ(t){this.value=gt(t,this.valueZ0,this.valueZ1)}sample(){return this.value}swapSlices(){[this.slice0,this.slice1]=[this.slice1,this.slice0]}}class b2{constructor(t,n,i,r,s,u,o,c){this.cellCountXZ=t,this.cellCountY=n,this.cellCountNoiseMinY=i,this.sampler=r,this.settings=c;const a=ot.cellWidth(c.noise);this.firstCellX=Math.floor(s/a),this.firstCellZ=Math.floor(u/a),this.firstNoiseX=s>>2,this.firstNoiseZ=u>>2,this.interpolators=[];const f=t*a>>2;this.noiseData=Array(f+1);for(let l=0;l<=f;l+=1){const h=this.firstNoiseX+l;this.noiseData[l]=Array(f+1);for(let d=0;d<=f;d+=1){const g=this.firstNoiseZ+d;this.noiseData[l][d]=r.noiseData(h,g)}}this.preliminarySurfaceLevel=new Map,this.baseNoise=r.makeBaseNoiseFiller(this,o,c.noodleCavesEnabled)}getNoiseData(t,n){return this.noiseData[t-this.firstNoiseX][n-this.firstNoiseZ]}getPreliminarySurfaceLevel(t,n){return tc(this.preliminarySurfaceLevel,gn.asLong(t,n),()=>{const i=t-this.firstNoiseX,r=n-this.firstNoiseZ,s=this.noiseData.length,u=i>=0&&r>=0&&i<s&&r<s?this.noiseData[i][r].terrainInfo:this.sampler.noiseData(t,n).terrainInfo;return this.sampler.getPreliminarySurfaceLevel(t<<2,n<<2,u)})}createNoiseInterpolator(t){const n=new mo(this,t);return this.interpolators.push(n),n.sample.bind(n)}initializeForFirstCellX(){this.interpolators.forEach(t=>t.initializeForFirstCellX())}advanceCellX(t){this.interpolators.forEach(n=>n.advanceCellX(t))}selectCellYZ(t,n){this.interpolators.forEach(i=>i.selectCellYZ(t,n))}updateForY(t){this.interpolators.forEach(n=>n.updateForY(t))}updateForX(t){this.interpolators.forEach(n=>n.updateForX(t))}updateForZ(t){this.interpolators.forEach(n=>n.updateForZ(t))}swapSlices(){this.interpolators.forEach(t=>t.swapSlices())}updateNoiseAndGenerateBaseState(t,n,i){return this.baseNoise(t,n,i)}}(function(e){e.create=function(t,n,i){return{offset:t,factor:n,jaggedness:i}}})(yl||(yl={})),function(e){const t=new Map;function n(i,r,s){const u=Object.assign({name:`minecraft:${i}`},qi.create(r,s));return t.set(i,u),u}e.TEMPERATURE=n("temperature",-10,[1.5,0,1,0,0,0]),e.VEGETATION=n("vegetation",-8,[1,1,0,0,0,0]),e.CONTINENTALNESS=n("continentalness",-9,[1,1,2,2,2,1,1,1,1]),e.EROSION=n("erosion",-9,[1,1,0,1,1]),e.TEMPERATURE_LARGE=n("temperature_large",-12,[1.5,0,1,0,0,0]),e.VEGETATION_LARGE=n("vegetation_large",-10,[1,1,0,0,0,0]),e.CONTINENTALNESS_LARGE=n("continentalness_large",-11,[1,1,2,2,2,1,1,1,1]),e.EROSION_LARGE=n("erosion_large",-11,[1,1,0,1,1]),e.RIDGE=n("ridge",-7,[1,2,1,0,0,0]),e.SHIFT=n("offset",-3,[1,1,1,0]),e.PILLAR=n("pillar",-7,[1,1]),e.PILLAR_RARENESS=n("pillar_rareness",-8,[1]),e.PILLAR_THICKNESS=n("pillar_thickness",-8,[1]),e.SPAGHETTI_2D=n("spaghetti_2d",-8,[1]),e.SPAGHETTI_2D_ELEVATION=n("spaghetti_2d_elevation",-8,[1]),e.SPAGHETTI_2D_MODULATOR=n("spaghetti_2d_modulator",-8,[1]),e.SPAGHETTI_2D_THICKNESS=n("spaghetti_2d_thickness",-8,[1]),e.SPAGHETTI_3D_1=n("spaghetti_3d_1",-8,[1]),e.SPAGHETTI_3D_2=n("spaghetti_3d_2",-8,[1]),e.SPAGHETTI_3D_RARITY=n("spaghetti_3d_rarity",-8,[1]),e.SPAGHETTI_3D_THICKNESS=n("spaghetti_3d_thickness",-8,[1]),e.SPAGHETTI_ROUGHNESS=n("spaghetti_roughness",-8,[1]),e.SPAGHETTI_ROUGHNESS_MODULATOR=n("spaghetti_roughness_modulator",-8,[1]),e.CAVE_ENTRANCE=n("cave_entrance",-7,[.4,.5,1]),e.CAVE_LAYER=n("cave_layer",-8,[1]),e.CAVE_CHEESE=n("cave_cheese",-8,[.5,1,2,1,2,1,0,2,0]),e.NOODLE=n("noodle",-8,[1]),e.NOODLE_THICKNESS=n("noodle_thickness",-8,[1]),e.NOODLE_RIDGE_A=n("noodle_ridge_a",-7,[1]),e.NOODLE_RIDGE_B=n("noodle_ridge_b",-7,[1]),e.JAGGED=n("jagged",-16,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),e.SURFACE=n("surface",-6,[1,1,1]),e.SURFACE_SECONDARY=n("surface_secondary",-6,[1,1,0,1]),e.instantiate=function(i,r){return new Rn(i.fromHashOf(r.name),r)}}(pe||(pe={}));class x2{constructor(t,n,i,r=!1){this.settings=t,this.isNoiseCavesEnabled=n;const s=t.hasLargeBiomes,u=(r?new it(i):et.create(i)).forkPositional();r?(this.blendedNoise=new Th(new it(i),t.sampling,ot.cellWidth(t),ot.cellHeight(t)),this.temperatureNoise=new Rn(new it(i),qi.create(-7,[1,1])),this.humidityNoise=new Rn(new it(i+BigInt(1)),qi.create(-7,[1,1])),this.offsetNoise=new Rn(new it(i+BigInt(5)),qi.create(0,[0]))):(this.blendedNoise=new Th(u.fromHashOf("minecraft:terrain"),t.sampling,ot.cellWidth(t),ot.cellHeight(t)),this.temperatureNoise=pe.instantiate(u,s?pe.TEMPERATURE_LARGE:pe.TEMPERATURE),this.humidityNoise=pe.instantiate(u,s?pe.VEGETATION_LARGE:pe.VEGETATION),this.offsetNoise=pe.instantiate(u,pe.SHIFT)),this.continentalnessNoise=pe.instantiate(u,s?pe.CONTINENTALNESS_LARGE:pe.CONTINENTALNESS),this.erosionNoise=pe.instantiate(u,s?pe.EROSION_LARGE:pe.EROSION),this.weirdnessNoise=pe.instantiate(u,pe.RIDGE),this.pillarNoise=pe.instantiate(u,pe.PILLAR),this.pillarRarenessModulator=pe.instantiate(u,pe.PILLAR_RARENESS),this.pillarThicknessModulator=pe.instantiate(u,pe.PILLAR_THICKNESS),this.spaghetti2DNoise=pe.instantiate(u,pe.SPAGHETTI_2D),this.spaghetti2DElevationModulator=pe.instantiate(u,pe.SPAGHETTI_2D_ELEVATION),this.spaghetti2DRarityModulator=pe.instantiate(u,pe.SPAGHETTI_2D_MODULATOR),this.spaghetti2DThicknessModulator=pe.instantiate(u,pe.SPAGHETTI_2D_THICKNESS),this.spaghetti3DNoise1=pe.instantiate(u,pe.SPAGHETTI_3D_1),this.spaghetti3DNoise2=pe.instantiate(u,pe.SPAGHETTI_3D_2),this.spaghetti3DRarityModulator=pe.instantiate(u,pe.SPAGHETTI_3D_RARITY),this.spaghetti3DThicknessModulator=pe.instantiate(u,pe.SPAGHETTI_3D_THICKNESS),this.spaghettiRoughnessNoise=pe.instantiate(u,pe.SPAGHETTI_ROUGHNESS),this.spaghettiRoughnessModulator=pe.instantiate(u,pe.SPAGHETTI_ROUGHNESS_MODULATOR),this.bigEntranceNoise=pe.instantiate(u,pe.CAVE_ENTRANCE),this.layerNoise=pe.instantiate(u,pe.CAVE_LAYER),this.cheeseNoise=pe.instantiate(u,pe.CAVE_CHEESE);const o=t.minY+4,c=o+t.height;this.noodleToggleNoise=this.yLimitedInterpolatable(pe.instantiate(u,pe.NOODLE),o,c,-1,1),this.noodleThicknessNoise=this.yLimitedInterpolatable(pe.instantiate(u,pe.NOODLE_THICKNESS),o,c,0,1),this.noodleRidgeANoise=this.yLimitedInterpolatable(pe.instantiate(u,pe.NOODLE_RIDGE_A),o,c,0,8/3),this.noodleRidgeBNoise=this.yLimitedInterpolatable(pe.instantiate(u,pe.NOODLE_RIDGE_B),o,c,0,8/3),this.jaggedNoise=pe.instantiate(u,pe.JAGGED),this.shaper=t.terrainShaper,this.baseNoise=a=>a.createNoiseInterpolator((f,l,h)=>this.calculateBlendedBaseNoise(f,l,h,a.getNoiseData(f>>2,h>>2).terrainInfo))}yLimitedInterpolatable(t,n,i,r,s){const u=(o,c,a)=>c>i||c<n?r:t.sample(o*s,c*s,a*s);return o=>o.createNoiseInterpolator(u)}noiseData(t,n){const i=t+this.getOffset(t,0,n),r=n+this.getOffset(n,t,0),s=this.getContinentalness(i,r),u=this.getErosion(i,r),o=this.getWeirdness(i,r),c=this.terrainInfo(s,u,o);return El.create(i,r,s,u,o,c)}sample(t,n,i){return this.target(t,n,i,this.noiseData(t,i))}target(t,n,i,r){const s=r.shiftedX,u=n+this.getOffset(n,i,t),o=r.shiftedZ,c=this.getTemperature(s,u,o),a=this.getHumidity(s,u,o),f=this.computeDimensionDensity(n<<2,r.terrainInfo);return _l.target(c,a,r.continentalness,r.erosion,f,r.weirdness)}terrainInfo(t,n,i){const r=ct.point(t,n,i),s=this.shaper.offset(r),u=this.shaper.factor(r),o=this.shaper.jaggedness(r);return yl.create(s,u,o)}getOffset(t,n,i){return 4*this.offsetNoise.sample(t,n,i)}getTemperature(t,n,i){return this.temperatureNoise.sample(t,n,i)}getHumidity(t,n,i){return this.humidityNoise.sample(t,n,i)}getContinentalness(t,n){return this.continentalnessNoise.sample(t,0,n)}getErosion(t,n){return this.erosionNoise.sample(t,0,n)}getWeirdness(t,n){return this.weirdnessNoise.sample(t,0,n)}makeBaseNoiseFiller(t,n,i){const r=this.baseNoise(t),s=i?this.noodleToggleNoise(t):()=>-1,u=i?this.noodleThicknessNoise(t):()=>0,o=i?this.noodleRidgeANoise(t):()=>0,c=i?this.noodleRidgeBNoise(t):()=>0;return(a,f,l)=>{let h=r();if(h=Ni(.64*h,-1,1),h=h/2-h*h*h/24,s()>=0){const d=_2(u(),-1,1,.05,.1),g=Math.abs(1.5*o())-d,p=Math.abs(1.5*c())-d;h=Math.min(h,Math.max(g,p))}return h+=n(a,f,l),h>0?null:Yt.AIR}}calculateBlendedBaseNoise(t,n,i,r){const s=this.blendedNoise.sample(t,n,i);return this.calculateBaseNoise(t,n,i,r,s,!this.isNoiseCavesEnabled,!0)}calculateBaseNoise(t,n,i,r,s,u,o){if(!this.settings.islandNoiseOverride){const f=o?this.sampleJaggedNoise(r.jaggedness,t,i):0,l=this.computeDimensionDensity(n,r),h=r.factor*(f+l);s+=h>0?4*h:h}let c=-64,a=64;if(!u&&s>=-64){const f=s-1.5625,l=this.getBigEntrances(t,n,i),h=this.getSpaghettiRoughness(t,n,i),d=this.getSpaghetti3D(t,n,i),g=Math.min(l,d+h);if(f<0)a=g;else{const p=this.getLayerizedCaverns(t,n,i);p>64?s=64:s=this.getCheese(t,n,i)+p+os(.5,0,1.28*f);const m=this.getSpaghetti2D(t,n,i);c=this.getPillars(t,n,i),a=Math.min(g,m+h)}}return s=Ni(s,c,a),s=Ni(s=this.applySlide(s,n/ot.cellHeight(this.settings)),-64,64)}sampleJaggedNoise(t,n,i){if(t===0)return 0;const r=this.jaggedNoise.sample(1500*n,0,1500*i);return r>0?t*r:t/2*r}computeDimensionDensity(t,n){return 1-t/128+n.offset}getBigEntrances(t,n,i){return this.bigEntranceNoise.sample(.75*t,.5*n,.75*i)+.37+os(.3,0,(n+10)/40)}getSpaghettiRoughness(t,n,i){const r=this.spaghettiRoughnessNoise.sample(t,n,i),s=Gn(this.spaghettiRoughnessModulator.sample(t,n,i),-1,1,0,1);return(.4-Math.abs(r))*s}getSpaghetti2D(t,n,i){const r=this.quantizeSpaghettiRarity2D(this.spaghetti2DRarityModulator.sample(2*t,n,2*i)),s=Gn(this.spaghetti2DThicknessModulator.sample(2*t,n,2*i),-1,1,.6,1.3),u=this.sampleWithRarity(this.spaghetti2DNoise,t,n,i,r),o=Math.abs(r*u)-.083*s,c=ot.minCellY(this.settings),a=Gn(this.spaghetti2DElevationModulator.sample(t,0,i),-1,1,c,8),f=Math.abs(a-n/8)-1*s;return Ni(Math.max(f,o),-1,1)}getSpaghetti3D(t,n,i){const r=this.quantizeSpaghettiRarity3D(this.spaghetti3DRarityModulator.sample(2*t,n,2*i)),s=Gn(this.spaghetti3DThicknessModulator.sample(t,n,i),-1,1,.065,.088),u=this.sampleWithRarity(this.spaghetti3DNoise1,t,n,i,r),o=Math.abs(r*u)-s,c=this.sampleWithRarity(this.spaghetti3DNoise2,t,n,i,r),a=Math.abs(r*c)-s;return Ni(Math.max(o,a),-1,1)}quantizeSpaghettiRarity2D(t){return t<-.75?.5:t<-.5?.75:t<.5?1:t<.75?2:3}quantizeSpaghettiRarity3D(t){return t<-.5?.75:t<0?1:t<.5?1.5:2}sampleWithRarity(t,n,i,r,s){return t.sample(n/s,i/s,r/s)}getLayerizedCaverns(t,n,i){return 4*Sn(this.layerNoise.sample(t,8*n,i))}getCheese(t,n,i){return Ni(this.cheeseNoise.sample(t,n/1.5,i)+.27,-1,1)}getPillars(t,n,i){const r=Gn(this.pillarRarenessModulator.sample(t,n,i),-1,1,0,2),s=Gn(this.pillarThicknessModulator.sample(t,n,i),-1,1,0,1.1),u=this.pillarNoise.sample(25*t,.3*n,25*i),o=Math.pow(s,3)*(2*u-r);return o<=.03?Number.MIN_SAFE_INTEGER:o}applySlide(t,n){const i=n-ot.minCellY(this.settings);return t=Gi.apply(this.settings.topSlide,t,ot.cellCountY(this.settings)-i),t=Gi.apply(this.settings.bottomSlide,t,i)}getPreliminarySurfaceLevel(t,n,i){const r=ot.minCellY(this.settings)+ot.cellCountY(this.settings),s=ot.minCellY(this.settings),u=ot.cellHeight(this.settings);for(let o=r;o>=s;o-=1){const c=o*u;if(this.calculateBaseNoise(t,c,n,i,-.703125,!0,!1)>=.390625)return c}return Number.MAX_SAFE_INTEGER}}(function(e){e.create=function(t,n,i,r,s,u){return{shiftedX:t,shiftedZ:n,continentalness:i,weirdness:r,erosion:s,terrainInfo:u}}})(El||(El={})),function(e){e.fromJson=function(t){var n,i,r,s;const u=(n=se.readObject(t))!==null&&n!==void 0?n:{};return u.absolute!==void 0?(o=(i=se.readNumber(u.absolute))!==null&&i!==void 0?i:0,()=>o):u.above_bottom!==void 0?function(c){return a=>a.minY+c}((r=se.readNumber(u.above_bottom))!==null&&r!==void 0?r:0):u.below_top!==void 0?function(c){return a=>a.maxY-c}((s=se.readNumber(u.below_top))!==null&&s!==void 0?s:0):()=>0;var o}}(Hr||(Hr={})),function(e){e.create=function(t,n){return{minY:t,height:n,maxY:t+n-1}}}(bl||(bl={}));class C2{constructor(t,n,i){this.rule=t,this.defaultBlock=n,this.random=et.create(i).forkPositional(),this.surfaceNoise=pe.instantiate(this.random,pe.SURFACE),this.surfaceSecondaryNoise=pe.instantiate(this.random,pe.SURFACE_SECONDARY),this.positionalRandoms=new Map}buildSurface(t,n,i,r){const s=gn.minBlockX(t.pos),u=gn.minBlockZ(t.pos),o=new F2(this,t,n,i,r),c=this.rule(o);for(let a=0;a<16;a+=1){const f=s+a;for(let l=0;l<1;l+=1){const h=u+l;o.updateXZ(f,h);let d=0,g=Number.MIN_SAFE_INTEGER,p=Number.MAX_SAFE_INTEGER;for(let m=t.maxY;m>=t.minY;m-=1){const w=ss.create(f,m,h),v=t.getBlockState(w);if(v.equals(Yt.AIR)){d=0,g=Number.MIN_SAFE_INTEGER;continue}if(v.isFluid()){g===Number.MIN_SAFE_INTEGER&&(g=m+1);continue}if(p>=m){p=Number.MIN_SAFE_INTEGER;for(let E=m-1;E>=t.minY;E-=1){const b=t.getBlockState(ss.create(f,E,h));if(b.equals(Yt.AIR)||b.isFluid()){p=E+1;break}}}d+=1;const A=m-p+1;if(!v.equals(this.defaultBlock))continue;o.updateY(d,A,g,m);const _=c(f,m,h);_&&t.setBlockState(w,_)}}}}getSurfaceDepth(t,n){return 2.75*this.surfaceNoise.sample(t,0,n)+3+.25*this.random.at(t,0,n).nextDouble()}getSurfaceSecondary(t,n){return this.surfaceSecondaryNoise.sample(t,0,n)}getRandom(t){return tc(this.positionalRandoms,t,()=>this.random.fromHashOf(t))}}class F2{constructor(t,n,i,r,s){this.system=t,this.chunk=n,this.noiseChunk=i,this.context=r,this.getBiome=s,this.blockX=0,this.blockY=0,this.blockZ=0,this.stoneDepthAbove=0,this.stoneDepthBelow=0,this.surfaceDepth=0,this.waterHeight=0,this.biome=()=>"",this.surfaceSecondary=()=>0,this.minSurfaceLevel=()=>0}updateXZ(t,n){this.blockX=t,this.blockZ=n,this.surfaceDepth=this.system.getSurfaceDepth(t,n),this.surfaceSecondary=xa(()=>this.system.getSurfaceSecondary(t,n)),this.minSurfaceLevel=xa(()=>this.calculateMinSurfaceLevel(t,n))}updateY(t,n,i,r){this.blockY=r,this.stoneDepthAbove=t,this.stoneDepthBelow=n,this.waterHeight=i,this.biome=xa(()=>this.getBiome(ss.create(this.blockX,this.blockY,this.blockZ)))}calculateMinSurfaceLevel(t,n){const i=t>>4,r=n>>4,s=this.noiseChunk.getPreliminarySurfaceLevel(i<<4,r<<4),u=this.noiseChunk.getPreliminarySurfaceLevel(i+1<<4,r<<4),o=this.noiseChunk.getPreliminarySurfaceLevel(i<<4,r+1<<4),c=this.noiseChunk.getPreliminarySurfaceLevel(i+1<<4,r+1<<4);return Math.floor(ml((15&t)/16,(15&n)/16,s,u,o,c))+this.surfaceDepth-8}}(function(e){function t(r){return()=>()=>r}function n(r){return s=>{const u=r.map(o=>o(s));return(o,c,a)=>{for(const f of u){const l=f(o,c,a);if(l)return l}}}}function i(r,s){return u=>(o,c,a)=>{if(r(u))return s(u)(o,c,a)}}e.NOOP=()=>()=>{},e.fromJson=function(r){var s,u,o;const c=(s=se.readObject(r))!==null&&s!==void 0?s:{};switch((u=se.readString(c.type))===null||u===void 0?void 0:u.replace(/^minecraft:/,"")){case"block":return t(Yt.fromJson(c.result_state));case"sequence":return n((o=se.readArray(c.sequence,e.fromJson))!==null&&o!==void 0?o:[]);case"condition":return i(Fa.fromJson(c.if_true),e.fromJson(c.then_run))}return e.NOOP},e.block=t,e.sequence=n,e.condition=i})(xl||(xl={})),function(e){function t(){return c=>c.blockY>=c.minSurfaceLevel()}function n(c){const a=new Set(c);return f=>a.has(f.biome())}function i(c){return a=>!c(a)}function r(c,a,f,l){return h=>{const d=l?h.stoneDepthBelow:h.stoneDepthAbove,g=a?h.surfaceDepth:0,p=f===0?0:Gn(h.surfaceSecondary(),-1,1,0,f);return d<=1+c+g+p}}function s(c,a,f){return l=>{const h=a(l.context),d=f(l.context);if(l.blockY<=h)return!0;if(l.blockY>=d)return!1;const g=l.system.getRandom(c),p=Gn(l.blockY,h,d,1,0);return g.nextFloat()<p}}function u(c,a,f){return l=>{if(l.waterHeight===Number.MIN_SAFE_INTEGER)return!0;const h=f?l.stoneDepthAbove:0;return l.blockY+h>=l.waterHeight+c+l.surfaceDepth*a}}function o(c,a,f){return l=>{const h=f?l.stoneDepthAbove:0;return l.blockY+h>=c(l.context)+l.surfaceDepth*a}}e.FALSE=()=>!1,e.TRUE=()=>!0,e.fromJson=function(c){var a,f,l,h,d,g,p,m,w,v,A,_;const E=(a=se.readObject(c))!==null&&a!==void 0?a:{};switch((f=se.readString(E.type))===null||f===void 0?void 0:f.replace(/^minecraft:/,"")){case"above_preliminary_surface":return b=>b.blockY>=b.minSurfaceLevel();case"biome":return n((l=se.readArray(E.biome_is,b=>{var x;return(x=se.readString(b))!==null&&x!==void 0?x:""}))!==null&&l!==void 0?l:[]);case"not":return i(e.fromJson(E.invert));case"stone_depth":return r((h=se.readInt(E.offset))!==null&&h!==void 0?h:0,(d=se.readBoolean(E.add_surface_depth))!==null&&d!==void 0&&d,(g=se.readInt(E.secondary_depth_range))!==null&&g!==void 0?g:0,se.readString(E.surface_type)==="ceiling");case"vertical_gradient":return s((p=se.readString(E.random_name))!==null&&p!==void 0?p:"",Hr.fromJson(E.true_at_and_below),Hr.fromJson(E.false_at_and_above));case"water":return u((m=se.readInt(E.offset))!==null&&m!==void 0?m:0,(w=se.readInt(E.surface_depth_multiplier))!==null&&w!==void 0?w:0,(v=se.readBoolean(E.add_surface_depth))!==null&&v!==void 0&&v);case"y_above":return o(Hr.fromJson(E.anchor),(A=se.readInt(E.surface_depth_multiplier))!==null&&A!==void 0?A:0,(_=se.readBoolean(E.add_surface_depth))!==null&&_!==void 0&&_)}return e.FALSE},e.abovePreliminarySurface=t,e.biome=n,e.not=i,e.stoneDepth=r,e.verticalGradient=s,e.water=u,e.yAbove=o}(Fa||(Fa={}));class S2{constructor(t,n,i){this.biomeSource=n,this.settings=i,this.sampler=new x2(i.noise,i.noiseCavesEnabled,t,i.legacyRandomSource),this.noiseChunkCache=new Map,this.materialRule=Al.fromList([(r,s,u,o)=>r.updateNoiseAndGenerateBaseState(s,u,o)]),this.surfaceSystem=new C2(i.surfaceRule,i.defaultBlock,t)}fill(t){var n;const i=Math.max(t.minY,this.settings.noise.minY),r=Math.min(t.maxY,this.settings.noise.minY+this.settings.noise.height),s=ot.cellWidth(this.settings.noise),u=ot.cellHeight(this.settings.noise),o=Math.floor(16/s),c=Math.floor(i/u),a=Math.floor((r-i)/u),f=gn.minBlockX(t.pos),l=gn.minBlockZ(t.pos),h=this.getNoiseChunk(t);h.initializeForFirstCellX();for(let d=0;d<o;d+=1){h.advanceCellX(d);for(let g=0;g<o;g+=1){let p=t.getOrCreateSection(t.sectionsCount-1);for(let m=a-1;m>=0;m-=1){h.selectCellYZ(m,g);for(let w=u-1;w>=0;w-=1){const v=(c+m)*u+w,A=15&v,_=t.getSectionIndex(v);t.getSectionIndex(p.minBlockY)!==_&&(p=t.getOrCreateSection(_));const E=w/u;h.updateForY(E);for(let b=0;b<s;b+=1){const x=f+d*s+b,y=15&x,C=b/s;h.updateForX(C);for(let B=0;B<s;B+=1){const T=l+g*s+B,M=15&T,R=B/s;h.updateForZ(R);let I=(n=this.materialRule(h,x,v,T))!==null&&n!==void 0?n:this.settings.defaultBlock;if(I.equals(Yt.AIR)){if(!(v<this.settings.seaLevel))continue;I=this.settings.defaultFluid}p.setBlockState(y,A,M,I)}}}}}h.swapSlices()}}buildSurface(t,n="minecraft:plains"){const i=this.getNoiseChunk(t),r=bl.create(this.settings.noise.minY,this.settings.noise.height);this.surfaceSystem.buildSurface(t,i,r,()=>n)}getNoiseChunk(t){return tc(this.noiseChunkCache,gn.toLong(t.pos),()=>{const n=Math.max(t.minY,this.settings.noise.minY),i=Math.min(t.maxY,this.settings.noise.minY+this.settings.noise.height),r=ot.cellWidth(this.settings.noise),s=ot.cellHeight(this.settings.noise),u=Math.floor(16/r),o=Math.floor(n/s),c=Math.floor((i-n)/s),a=gn.minBlockX(t.pos),f=gn.minBlockZ(t.pos);return new b2(u,c,o,this.sampler,a,f,()=>0,this.settings)})}}(function(e){e.fromJson=function(t){var n,i,r,s,u,o,c,a,f,l,h;const d=(n=se.readObject(t))!==null&&n!==void 0?n:{};return{structures:Sa.fromJson(d.structures),surfaceRule:xl.fromJson(d.surface_rule),noise:ot.fromJson(d.noise),defaultBlock:Yt.fromJson(d.default_block),defaultFluid:Yt.fromJson(d.default_fluid),bedrockRoofPosition:(i=se.readInt(d.bedrock_roof_position))!==null&&i!==void 0?i:0,bedrockFloorPosition:(r=se.readInt(d.bedrock_floor_position))!==null&&r!==void 0?r:0,seaLevel:(s=se.readInt(d.sea_level))!==null&&s!==void 0?s:0,disableMobGeneration:(u=se.readBoolean(d.disable_mob_generation))!==null&&u!==void 0&&u,aquifersEnabled:(o=se.readBoolean(d.aquifers_enabled))!==null&&o!==void 0&&o,noiseCavesEnabled:(c=se.readBoolean(d.noise_caves_enabled))!==null&&c!==void 0&&c,deepslateEnabled:(a=se.readBoolean(d.deepslate_enabled))!==null&&a!==void 0&&a,oreVeinsEnabled:(f=se.readBoolean(d.ore_veins_enabled))!==null&&f!==void 0&&f,noodleCavesEnabled:(l=se.readBoolean(d.noodle_caves_enabled))!==null&&l!==void 0&&l,legacyRandomSource:(h=se.readBoolean(d.legacy_random_source))!==null&&h!==void 0&&h}}})($h||($h={})),function(e){e.fromJson=function(t){var n;const i=(n=se.readObject(t))!==null&&n!==void 0?n:{};return{stronghold:se.compose(i.stronghold,se.readObject,r=>{var s,u,o;return{distance:(s=se.readInt(r.distance))!==null&&s!==void 0?s:0,spread:(u=se.readInt(r.spread))!==null&&u!==void 0?u:0,count:(o=se.readInt(r.count))!==null&&o!==void 0?o:0}}),structures:se.readMap(i.structures,r=>{var s;return(u=>{var o,c,a;return{spacing:(o=se.readInt(u.spacing))!==null&&o!==void 0?o:0,separation:(c=se.readInt(u.separation))!==null&&c!==void 0?c:0,salt:(a=se.readInt(u.salt))!==null&&a!==void 0?a:0}})((s=se.readObject(r))!==null&&s!==void 0?s:{})})}}}(Sa||(Sa={}));class D2{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 Pt(t);this.minLimitPerlinNoise=new qe(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.maxLimitPerlinNoise=new qe(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.mainPerlinNoise=new qe(n,-7,[1,1,1,1,1,1,1,1]),this.depthNoise=new qe(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])}reset(t,n,i,r,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,i=1+i*4),this.biomeDepth=.265625*(n*.5-.125),this.biomeScale=96/(i*.9+.1),this.noiseColumnCache=Array(s).fill(null),this.xOffset=r}iterateNoiseColumn(t){const n=Array(this.chunkCountY*this.chunkHeight),i=Math.floor(t/this.chunkWidth),r=Math.floor(t%this.chunkWidth)/this.chunkWidth,s=this.fillNoiseColumn(i),u=this.fillNoiseColumn(i+1);for(let o=this.chunkCountY-1;o>=0;o-=1)for(let c=this.chunkHeight;c>=0;c-=1){const a=c/this.chunkHeight,f=o*this.chunkHeight+c;n[f]=pw(a,r,s[o],s[o+1],u[o],u[o+1])}return n}fillNoiseColumn(t){const n=this.noiseColumnCache[t-this.xOffset];if(n)return n;const i=Array(this.chunkCountY+1),r=684.412*this.settings.sampling.xz_scale,s=684.412*this.settings.sampling.y_scale,u=r/this.settings.sampling.xz_factor,o=s/this.settings.sampling.y_factor,c=this.settings.random_density_offset?this.getRandomDensity(t):0;for(let a=0;a<=this.chunkCountY;a+=1){let f=this.sampleAndClampNoise(t,a,this.mainPerlinNoise.getOctaveNoise(0).zo,r,s,u,o);const d=((1-a*2/this.chunkCountY+c)*this.settings.density_factor+this.settings.density_offset+this.biomeDepth)*this.biomeScale;f+=d*(d>0?4:1),this.settings.top_slide.size>0&&(f=ea(this.settings.top_slide.target,f,(this.chunkCountY-a-this.settings.top_slide.offset)/this.settings.top_slide.size)),this.settings.bottom_slide.size>0&&(f=ea(this.settings.bottom_slide.target,f,(a-this.settings.bottom_slide.offset)/this.settings.bottom_slide.size)),i[a]=f}return this.noiseColumnCache[t-this.xOffset]=i,i}getRandomDensity(t){const n=this.depthNoise.sample(t*200,10,this.depthNoise.getOctaveNoise(0).zo,1,0,!0),r=(n<0?-n*.3:n)*24.575625-2;return r<0?r*.009486607142857142:Math.min(r,1)*.006640625}sampleAndClampNoise(t,n,i,r,s,u,o){let c=0,a=0,f=0,l=1;for(let h=0;h<16;h+=1){const d=qe.wrap(t*r*l),g=qe.wrap(n*s*l),p=qe.wrap(i*r*l),m=s*l,w=this.minLimitPerlinNoise.getOctaveNoise(h);w&&(c+=w.sample(d,g,p,m,n*m)/l);const v=this.maxLimitPerlinNoise.getOctaveNoise(h);if(v&&(a+=v.sample(d,g,p,m,n*m)/l),h<8){const A=this.mainPerlinNoise.getOctaveNoise(h);A&&(f+=A.sample(qe.wrap(t*u*l),qe.wrap(n*o*l),qe.wrap(i*u*l),o*l,n*o*l)/l)}l/=2}return ea(c/512,a/512,(f/10+1)/2)}}const ic=0,k2={"minecraft:air":[150,160,170],"minecraft:water":[20,80,170],"minecraft:lava":[200,100,0],"minecraft:stone":[55,55,55],"minecraft:deepslate":[34,34,36],"minecraft:bedrock":[10,10,10],"minecraft:grass_block":[47,120,23],"minecraft:dirt":[64,40,8],"minecraft:gravel":[70,70,70],"minecraft:sand":[196,180,77],"minecraft:sandstone":[148,135,52],"minecraft:netherrack":[100,40,40],"minecraft:crimson_nylium":[144,22,22],"minecraft:warped_nylium":[28,115,113],"minecraft:basalt":[73,74,85],"minecraft:end_stone":[200,200,140]};let Mh,Da,vo=[];const ka=new Map;async function B2(e,t,n){var u,o,c;if(Mt(n.version,"1.18")){Mt(n.version,"1.18.2")&&await tp(n.version);const{settings:a,generator:f}=I2(e,n),l=new N2(-n.offset,n.width,a.noise.minY,a.noise.height);l.generate(f,n.biome);const h=t.data;for(let d=0;d<n.width;d+=1)for(let g=0;g<a.noise.height;g+=1){const p=d*4+(a.noise.height-g-1)*4*t.width,m=l.getBlockState([d-n.offset,g+a.noise.minY,ic]),w=(u=k2[m.getName().toString()])!=null?u:[0,0,0];h[p]=w[0],h[p+1]=w[1],h[p+2]=w[2],h[p+3]=255}return}const i=new D2(n.seed);i.reset(e.noise,(o=n.biomeDepth)!=null?o:0,(c=n.biomeScale)!=null?c:0,n.offset,n.width);const r=t.data,s=t.width*4;for(let a=0;a<n.width;a+=1){const f=i.iterateNoiseColumn(a-n.offset).reverse();for(let l=0;l<e.noise.height;l+=1){const h=l*s+a*4,d=O2(f,l);r[h]=d,r[h+1]=d,r[h+2]=d,r[h+3]=255}}}function T2(e,t){const n=vo.find(i=>Ut.minBlockX(i.pos)<=e&&Ut.maxBlockX(i.pos)>=e);if(!!n)return n.getBlockState(or.create(e,t,ic))}async function L2(e,t,n){const{fn:i,settings:r}=await $2(e,n),s=Array(n.width*r.height);let u=1/0,o=-1/0;for(let a=0;a<n.width;a+=1)for(let f=0;f<r.height;f+=1){const l=a+(r.height-f-1)*n.width,h=i.compute(Me.context(a-n.offset,f,0));u=Math.min(u,h),o=Math.max(o,h),s[l]=h}const c=t.data;for(let a=0;a<n.width*r.height;a+=1){const f=Math.floor(G0(s[a],u,o,0,256));c[4*a]=f,c[4*a+1]=f,c[4*a+2]=f,c[4*a+3]=255}}async function $2(e,t){await tp(t.version);const n=Je.create(t.seed).forkPositional(),i=ut.fromJson({min_y:-64,height:384,size_horizontal:1,size_vertical:2,sampling:{xz_scale:1,y_scale:1,xz_factor:80,y_factor:160},bottom_slide:{target:.1171875,size:3,offset:0},top_slide:{target:-.078125,size:2,offset:8},terrain_shaper:{offset:.044,factor:4,jaggedness:0}});return{fn:Me.fromJson(e).mapAll(new cr.Visitor(n,i)),settings:i}}const M2=[["worldgen/noise",lr],["worldgen/density_function",Me]];async function tp(e){var n;const t=(n=ka.get(e))!=null?n:new ns(new Ue("misode","temp"));ka.has(e)||(await Promise.all(M2.map(([i,r])=>R2(e,t,i,r))),ka.set(e,t)),ai.DENSITY_FUNCTION.clear().assign(t.getOrThrow(Ue.create("worldgen/density_function"))),ai.NOISE.clear().assign(t.getOrThrow(Ue.create("worldgen/noise")))}async function R2(e,t,n,i){const r=await Cw(e,n),s=new ns(Ue.create(n));for(const[u,o]of r.entries())s.register(Ue.parse(u),i.fromJson(o));t.register(s.key,s)}function I2(e,t){const n=hl.fromJson(ae.DataModel.unwrapLists(e)),i=[e,`${t.seed}`,t.biome];if(!yi(i,Mh))if(Mh=$o(i),vo=[],Mt(t.version,"1.18.2")){const r=new is(Ue.create("unknown"));Da=new Hy(t.seed,r,n)}else{const r=new nc("unknown");Da=new S2(t.seed,r,n)}return{settings:n,generator:Da}}function O2(e,t){return e[t]>0?0:e[t+1]>0?150:255}class N2{constructor(t,n,i,r){this.minX=t,this.done=[],this.chunks=[...Array(Math.ceil(n/16)+1)].map((s,u)=>{const o=(t>>4)+u,c=vo.find(a=>a.pos[0]===o);return c?(this.done[u]=!0,c):new Dy(i,r,Ut.create(o,ic>>4))})}generate(t,n){this.chunks.forEach((i,r)=>{this.done[r]||(t.fill(i,!0),t.buildSurface(i,n),this.done[r]=!0,vo.push(i))})}getBlockState(t){const n=(t[0]>>4)-(this.minX>>4);return this.chunks[n].getBlockState(t)}}function P2(e,t,n){const i=new Pt(n.seed),r=lr.fromJson(ae.DataModel.unwrapLists(e)),s=new Ho(i,r),u=-n.offset[0]-100,o=-n.offset[1]-100,c=t.data;for(let a=0;a<256;a+=1)for(let f=0;f<256;f+=1){const l=a*4+f*4*256,h=(a+u)*n.scale,d=(f+o)*n.scale,g=(s.sample(h,d,0)+1)*128;c[l]=g,c[l+1]=g,c[l+2]=g,c[l+3]=255}}const z2=["biomes","temperature","humidity","continentalness","erosion","weirdness"],U2=({model:e,data:t,shown:n,version:i})=>{var b,x;const{locale:r}=rt(),[s]=oe(On()),[u,o]=oe(2),[c,a]=oe(void 0),[f,l]=oe(new Set(["biomes"])),h=Xe([0,0]),d=Xe(1),g=Xe(void 0),p=BigInt((b=e.get(new ae.Path(["generator","seed"])))!=null?b:s),m=Qe(()=>{if(!!n)return j2(e.get(new ae.Path(["generator","settings"])))},[n]),w=n?H2(t,m):"",v=(x=t.type)==null?void 0:x.replace(/^minecraft:/,""),{canvas:A,redraw:_}=Es({size(){return[200/d.current,200/d.current]},async draw(y){const C={octaves:m,biomeColors:{},layers:f,offset:h.current,scale:u,seed:p,res:d.current,version:i};await t2(t,y,C),d.current===4&&(clearTimeout(g.current),g.current=setTimeout(()=>{d.current=1,_()},150))},async onDrag(y,C){h.current[0]=h.current[0]+y*200,h.current[1]=h.current[1]+C*200,clearTimeout(g.current),d.current=v==="multi_noise"?4:1,_()},async onHover(y,C){const B={octaves:m,biomeColors:{},layers:f,offset:h.current,scale:u,seed:s,res:1,version:i},T=await n2(t,Math.floor(y*200),Math.floor(C*200),B);a(T)},onLeave(){a(void 0)}},[w,u,s,f]);xe(()=>{n&&(d.current=v==="multi_noise"?4:1,_())},[w,u,s,f,n]);const E=y=>{h.current[0]=h.current[0]*u/y,h.current[1]=h.current[1]*u/y,o(y)};return S(De,null,S("div",{class:"controls preview-controls"},c&&S(Ee,{label:c.biome,class:"no-pointer"}),v==="multi_noise"&&S($t,{icon:"stack",tooltip:r("configure_layers")},z2.map(y=>{const C=f.has(y);return S(Ee,{label:r(`layer.${y}`),active:C,tooltip:r(C?"enabled":"disabled"),onClick:B=>{l(new Set([y])),B.stopPropagation()}})})),(v==="multi_noise"||v==="checkerboard")&&S(De,null,S(Ee,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>E(u*1.5)}),S(Ee,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>E(u/1.5)})),v==="multi_noise"&&S(Ee,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>Pd(e)})),(c==null?void 0:c.temperature)!==void 0&&S("div",{class:"controls secondary-controls"},S(Ee,{class:"no-pointer",label:Object.entries(c).filter(([y])=>y!=="biome").map(([y,C])=>`${y[0].toUpperCase()}: ${C.toFixed(2)}`).join(" ")})),S("canvas",{ref:A,width:"200",height:"200"}))};function H2(e,t){return JSON.stringify([e,t])}function j2(e){switch(typeof e!="string"&&(e=e.legacy_random_source?"minecraft:nether":"minecraft:overworld"),e.replace(/^minecraft:/,"")){case"overworld":case"amplified":return{temperature:{firstOctave:-9,amplitudes:[1.5,0,1,0,0,0]},humidity:{firstOctave:-7,amplitudes:[1,1,0,0,0,0]},continentalness:{firstOctave:-9,amplitudes:[1,1,2,2,2,1,1,1,1]},erosion:{firstOctave:-9,amplitudes:[1,1,0,1,1]},weirdness:{firstOctave:-7,amplitudes:[1,2,1,0,0,0]},shift:{firstOctave:-3,amplitudes:[1,1,1,0]}};case"end":case"floating_islands":return{temperature:{firstOctave:0,amplitudes:[0]},humidity:{firstOctave:0,amplitudes:[0]},continentalness:{firstOctave:0,amplitudes:[0]},erosion:{firstOctave:0,amplitudes:[0]},weirdness:{firstOctave:0,amplitudes:[0]},shift:{firstOctave:0,amplitudes:[0]}};default:return{temperature:{firstOctave:-7,amplitudes:[1,1]},humidity:{firstOctave:-7,amplitudes:[1,1]},continentalness:{firstOctave:-7,amplitudes:[1,1]},erosion:{firstOctave:-7,amplitudes:[1,1]},weirdness:{firstOctave:-7,amplitudes:[1,1]},shift:{firstOctave:0,amplitudes:[0]}}}}const W2=({data:e,version:t,shown:n})=>{const{locale:i}=rt(),[r,s]=oe(4),[u,o]=oe(On()),{canvas:c,redraw:a}=Es({size(){return[r*16,r*16]},async draw(l){u2(e,l,{seed:u,version:t,size:[r*16,128,r*16]})}}),f=JSON.stringify(e);return xe(()=>{n&&a()},[f,r,u,n]),S(De,null,S("div",{class:"controls preview-controls"},S(Ee,{icon:"dash",tooltip:i("zoom_out"),onClick:()=>s(Math.min(16,r+1))}),S(Ee,{icon:"plus",tooltip:i("zoom_in"),onClick:()=>s(Math.max(1,r-1))}),S(Ee,{icon:"sync",tooltip:i("generate_new_seed"),onClick:()=>o(On())})),S("canvas",{ref:c,width:"64",height:"64"}))},V2=({data:e,shown:t,version:n})=>{var m,w;const{locale:i}=rt(),[r,s]=oe(On()),[u,o]=oe(!1),[c,a]=oe(void 0),f=Xe(0),l=Xe(void 0),h=JSON.stringify([e]),d=(w=(m=e==null?void 0:e.noise)==null?void 0:m.height)!=null?w:256,{canvas:g,redraw:p}=Es({size(){return[d,d]},async draw(v){const A={offset:f.current,width:v.width,seed:r,version:n};await L2(e,v,A)},async onDrag(v){f.current+=v*d,p()},async onHover(v,A){var b,x;const _=Math.floor(v*d-f.current),E=d-Math.max(1,Math.ceil(A*d))+((x=(b=e==null?void 0:e.noise)==null?void 0:b.min_y)!=null?x:0);a(`X=${_} Y=${E}`)},onLeave(){a(void 0)}},[h,r]);return xe(()=>{l.current&&clearInterval(l.current),t&&(p(),u&&(l.current=setInterval(()=>{f.current-=8,p()},100)))},[h,r,t,u]),S(De,null,S("div",{class:"controls preview-controls"},c&&S(Ee,{label:c,class:"no-pointer"}),S($t,{icon:"gear",tooltip:i("terrain_settings")},S(Ee,{icon:u?"square_fill":"square",label:i("preview.auto_scroll"),onClick:()=>o(!u)})),S(Ee,{icon:"sync",tooltip:i("generate_new_seed"),onClick:()=>s(On())})),S("canvas",{ref:g,width:d,height:d}))},G2=({data:e,shown:t,version:n})=>{const{locale:i}=rt(),[r,s]=oe(On()),[u,o]=oe(2),c=Xe([0,0]),a=JSON.stringify([e]),{canvas:f,redraw:l}=Es({size(){return[256,256]},async draw(d){const g={offset:c.current,scale:u,seed:r,version:n};P2(e,d,g)},async onDrag(d,g){c.current[0]=c.current[0]+d*256,c.current[1]=c.current[1]+g*256,l()}},[a,u,r]);xe(()=>{t&&l()},[a,u,r,t]);const h=d=>{c.current[0]=c.current[0]*u/d,c.current[1]=c.current[1]*u/d,o(d)};return S(De,null,S("div",{class:"controls preview-controls"},S(Ee,{icon:"dash",tooltip:i("zoom_out"),onClick:()=>h(u*1.5)}),S(Ee,{icon:"plus",tooltip:i("zoom_in"),onClick:()=>h(u/1.5)}),S(Ee,{icon:"sync",tooltip:i("generate_new_seed"),onClick:()=>s(On())})),S("canvas",{ref:f,width:"256",height:"256"}))},K2=({data:e,shown:t,version:n})=>{var x,y;const{locale:i}=rt(),[r,s]=oe(On()),[u,o]=oe("minecraft:plains"),[c,a]=oe(.2),[f,l]=oe(.1),[h,d]=oe(!1),[g,p]=oe(void 0),m=Xe(0),w=Xe(void 0),v=JSON.stringify([e,c,f]),A=(y=(x=e==null?void 0:e.noise)==null?void 0:x.height)!=null?y:256,{canvas:_,redraw:E}=Es({size(){return[A,A]},async draw(C){const B={biome:u,biomeDepth:f,biomeScale:c,offset:m.current,width:C.width,seed:r,version:n};await B2(e,C,B)},async onDrag(C){m.current+=C*A,E()},async onHover(C,B){var I,H;const T=Math.floor(C*A-m.current),M=A-Math.max(1,Math.ceil(B*A))+((H=(I=e==null?void 0:e.noise)==null?void 0:I.min_y)!=null?H:0),R=T2(T,M);p(R?`Y=${M} (${R.getName().path})`:`Y=${M}`)},onLeave(){p(void 0)}},[v,r]);xe(()=>{w.current&&clearInterval(w.current),t&&(async()=>{try{await E(),h&&(w.current=setInterval(()=>{m.current-=8,E()},100))}catch(C){throw C}})()},[v,r,t,u,c,f,h]);const b=Qe(()=>{var C;return(C=Gs==null?void 0:Gs.get("worldgen/biome"))!=null?C:[]},[n]);return S(De,null,S("div",{class:"controls preview-controls"},g&&S(Ee,{label:g,class:"no-pointer"}),S($t,{icon:"gear",tooltip:i("terrain_settings")},Mt(n,void 0,"1.17")?S(De,null,S(Vs,{label:i("preview.scale"),value:`${c}`,onChange:C=>a(Number(C))}),S(Vs,{label:i("preview.depth"),value:`${f}`,onChange:C=>l(Number(C))})):S(Vs,{label:i("preview.biome"),value:u,onChange:o,dataList:b,larger:!0}),S(Ee,{icon:h?"square_fill":"square",label:i("preview.auto_scroll"),onClick:()=>d(!h)})),S(Ee,{icon:"sync",tooltip:i("generate_new_seed"),onClick:()=>s(On())})),S("canvas",{ref:_,width:A,height:A}))},X2=["dimension","worldgen/density_function","worldgen/noise","worldgen/noise_settings","worldgen/configured_feature","worldgen/placed_feature"];function J2({model:e,version:t,id:n,shown:i}){var s;const[,r]=oe(0);if(Mo(e,()=>{r(u=>u+1)}),!e)return S(De,null);if(n==="dimension"&&((s=e.get(new ae.Path(["generator","type"])))==null?void 0:s.endsWith("noise"))){const u=e.get(new ae.Path(["generator","biome_source"]));if(u)return S(U2,{model:e,version:t,shown:i,data:u})}if(n==="worldgen/density_function"){const u=e.get(new ae.Path([]));if(u)return S(V2,{model:e,version:t,shown:i,data:u})}if(n==="worldgen/noise"){const u=e.get(new ae.Path([]));if(u)return S(G2,{model:e,version:t,shown:i,data:u})}if(n==="worldgen/noise_settings"){const u=e.get(new ae.Path([]));if(u)return S(K2,{model:e,version:t,shown:i,data:u})}if(n==="worldgen/placed_feature"||n==="worldgen/configured_feature"&&Mt(t,"1.16","1.17")){const u=e.get(new ae.Path([]));if(u)return S(W2,{model:e,version:t,shown:i,data:u})}return S(De,null)}(function(){var e="ace",t=function(){return this}();!t&&typeof window!="undefined"&&(t=window);var n=function(c,a,f){if(typeof c!="string"){n.original?n.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(f=a),n.modules[c]||(n.payloads[c]=f,n.modules[c]=null)};n.modules={},n.payloads={};var i=function(c,a,f){if(typeof a=="string"){var l=u(c,a);if(l!=null)return f&&f(),l}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var h=[],d=0,g=a.length;d<g;++d){var p=u(c,a[d]);if(p==null&&r.original)return;h.push(p)}return f&&f.apply(null,h)||!0}},r=function(c,a){var f=i("",c,a);return f==null&&r.original?r.original.apply(this,arguments):f},s=function(c,a){if(a.indexOf("!")!==-1){var f=a.split("!");return s(c,f[0])+"!"+s(c,f[1])}if(a.charAt(0)=="."){var l=c.split("/").slice(0,-1).join("/");for(a=l+"/"+a;a.indexOf(".")!==-1&&h!=a;){var h=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},u=function(c,a){a=s(c,a);var f=n.modules[a];if(!f){if(f=n.payloads[a],typeof f=="function"){var l={},h={id:a,uri:"",exports:l,packaged:!0},d=function(p,m){return i(a,p,m)},g=f(d,l,h);l=g||h.exports,n.modules[a]=l,delete n.payloads[a]}f=n.modules[a]=l||f}return f};function o(c){var a=t;c&&(t[c]||(t[c]={}),a=t[c]),(!a.define||!a.define.packaged)&&(n.original=a.define,a.define=n,a.define.packaged=!0),(!a.acequire||!a.acequire.packaged)&&(r.original=a.acequire,a.acequire=r,a.acequire.packaged=!0)}o(e)})();ace.define("ace/lib/regexp",["require","exports","module"],function(e,t,n){var i={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},r=i.exec.call(/()??/,"")[1]===void 0,s=function(){var c=/^/g;return i.test.call(c,""),!c.lastIndex}();if(s&&r)return;RegExp.prototype.exec=function(c){var a=i.exec.apply(this,arguments),f,l;if(typeof c=="string"&&a){if(!r&&a.length>1&&o(a,"")>-1&&(l=RegExp(this.source,i.replace.call(u(this),"g","")),i.replace.call(c.slice(a.index),l,function(){for(var d=1;d<arguments.length-2;d++)arguments[d]===void 0&&(a[d]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var h=1;h<a.length;h++)f=this._xregexp.captureNames[h-1],f&&(a[f]=a[h]);!s&&this.global&&!a[0].length&&this.lastIndex>a.index&&this.lastIndex--}return a},s||(RegExp.prototype.test=function(c){var a=i.exec.call(this,c);return a&&this.global&&!a[0].length&&this.lastIndex>a.index&&this.lastIndex--,!!a});function u(c){return(c.global?"g":"")+(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.extended?"x":"")+(c.sticky?"y":"")}function o(c,a,f){if(Array.prototype.indexOf)return c.indexOf(a,f);for(var l=f||0;l<c.length;l++)if(c[l]===a)return l;return-1}});ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function i(){}Function.prototype.bind||(Function.prototype.bind=function(k){var $=this;if(typeof $!="function")throw new TypeError("Function.prototype.bind called on incompatible "+$);var z=o.call(arguments,1),U=function(){if(this instanceof U){var G=$.apply(this,z.concat(o.call(arguments)));return Object(G)===G?G:this}else return $.apply(k,z.concat(o.call(arguments)))};return $.prototype&&(i.prototype=$.prototype,U.prototype=new i,i.prototype=null),U});var r=Function.prototype.call,s=Array.prototype,u=Object.prototype,o=s.slice,c=r.bind(u.toString),a=r.bind(u.hasOwnProperty),f,l,h,d,g;if((g=a(u,"__defineGetter__"))&&(f=r.bind(u.__defineGetter__),l=r.bind(u.__defineSetter__),h=r.bind(u.__lookupGetter__),d=r.bind(u.__lookupSetter__)),[1,2].splice(0).length!=2)if(function(){function N(z){var U=new Array(z+2);return U[0]=U[1]=0,U}var k=[],$;if(k.splice.apply(k,N(20)),k.splice.apply(k,N(26)),$=k.length,k.splice(5,0,"XXX"),$+1==k.length,$+1==k.length)return!0}()){var p=Array.prototype.splice;Array.prototype.splice=function(N,k){return arguments.length?p.apply(this,[N===void 0?0:N,k===void 0?this.length-N:k].concat(o.call(arguments,2))):[]}}else Array.prototype.splice=function(N,k){var $=this.length;N>0?N>$&&(N=$):N==null?N=0:N<0&&(N=Math.max($+N,0)),N+k<$||(k=$-N);var z=this.slice(N,N+k),U=o.call(arguments,2),G=U.length;if(N===$)G&&this.push.apply(this,U);else{var Q=Math.min(k,$-N),X=N+Q,te=X+G-Q,le=$-X,ye=$-Q;if(te<X)for(var ve=0;ve<le;++ve)this[te+ve]=this[X+ve];else if(te>X)for(ve=le;ve--;)this[te+ve]=this[X+ve];if(G&&N===ye)this.length=ye,this.push.apply(this,U);else for(this.length=ye+G,ve=0;ve<G;++ve)this[N+ve]=U[ve]}return z};Array.isArray||(Array.isArray=function(k){return c(k)=="[object Array]"});var m=Object("a"),w=m[0]!="a"||!(0 in m);if(Array.prototype.forEach||(Array.prototype.forEach=function(k){var $=K(this),z=w&&c(this)=="[object String]"?this.split(""):$,U=arguments[1],G=-1,Q=z.length>>>0;if(c(k)!="[object Function]")throw new TypeError;for(;++G<Q;)G in z&&k.call(U,z[G],G,$)}),Array.prototype.map||(Array.prototype.map=function(k){var $=K(this),z=w&&c(this)=="[object String]"?this.split(""):$,U=z.length>>>0,G=Array(U),Q=arguments[1];if(c(k)!="[object Function]")throw new TypeError(k+" is not a function");for(var X=0;X<U;X++)X in z&&(G[X]=k.call(Q,z[X],X,$));return G}),Array.prototype.filter||(Array.prototype.filter=function(k){var $=K(this),z=w&&c(this)=="[object String]"?this.split(""):$,U=z.length>>>0,G=[],Q,X=arguments[1];if(c(k)!="[object Function]")throw new TypeError(k+" is not a function");for(var te=0;te<U;te++)te in z&&(Q=z[te],k.call(X,Q,te,$)&&G.push(Q));return G}),Array.prototype.every||(Array.prototype.every=function(k){var $=K(this),z=w&&c(this)=="[object String]"?this.split(""):$,U=z.length>>>0,G=arguments[1];if(c(k)!="[object Function]")throw new TypeError(k+" is not a function");for(var Q=0;Q<U;Q++)if(Q in z&&!k.call(G,z[Q],Q,$))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(k){var $=K(this),z=w&&c(this)=="[object String]"?this.split(""):$,U=z.length>>>0,G=arguments[1];if(c(k)!="[object Function]")throw new TypeError(k+" is not a function");for(var Q=0;Q<U;Q++)if(Q in z&&k.call(G,z[Q],Q,$))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(k){var $=K(this),z=w&&c(this)=="[object String]"?this.split(""):$,U=z.length>>>0;if(c(k)!="[object Function]")throw new TypeError(k+" is not a function");if(!U&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var G=0,Q;if(arguments.length>=2)Q=arguments[1];else do{if(G in z){Q=z[G++];break}if(++G>=U)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;G<U;G++)G in z&&(Q=k.call(void 0,Q,z[G],G,$));return Q}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(k){var $=K(this),z=w&&c(this)=="[object String]"?this.split(""):$,U=z.length>>>0;if(c(k)!="[object Function]")throw new TypeError(k+" is not a function");if(!U&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var G,Q=U-1;if(arguments.length>=2)G=arguments[1];else do{if(Q in z){G=z[Q--];break}if(--Q<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do Q in this&&(G=k.call(void 0,G,z[Q],Q,$));while(Q--);return G}),(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)&&(Array.prototype.indexOf=function(k){var $=w&&c(this)=="[object String]"?this.split(""):K(this),z=$.length>>>0;if(!z)return-1;var U=0;for(arguments.length>1&&(U=V(arguments[1])),U=U>=0?U:Math.max(0,z+U);U<z;U++)if(U in $&&$[U]===k)return U;return-1}),(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)&&(Array.prototype.lastIndexOf=function(k){var $=w&&c(this)=="[object String]"?this.split(""):K(this),z=$.length>>>0;if(!z)return-1;var U=z-1;for(arguments.length>1&&(U=Math.min(U,V(arguments[1]))),U=U>=0?U:z-Math.abs(U);U>=0;U--)if(U in $&&k===$[U])return U;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(k){return k.__proto__||(k.constructor?k.constructor.prototype:u)}),!Object.getOwnPropertyDescriptor){var v="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(k,$){if(typeof k!="object"&&typeof k!="function"||k===null)throw new TypeError(v+k);if(!!a(k,$)){var z,U,G;if(z={enumerable:!0,configurable:!0},g){var Q=k.__proto__;k.__proto__=u;var U=h(k,$),G=d(k,$);if(k.__proto__=Q,U||G)return U&&(z.get=U),G&&(z.set=G),z}return z.value=k[$],z}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(k){return Object.keys(k)}),!Object.create){var A;Object.prototype.__proto__===null?A=function(){return{__proto__:null}}:A=function(){var N={};for(var k in N)N[k]=null;return N.constructor=N.hasOwnProperty=N.propertyIsEnumerable=N.isPrototypeOf=N.toLocaleString=N.toString=N.valueOf=N.__proto__=null,N},Object.create=function(k,$){var z;if(k===null)z=A();else{if(typeof k!="object")throw new TypeError("typeof prototype["+typeof k+"] != 'object'");var U=function(){};U.prototype=k,z=new U,z.__proto__=k}return $!==void 0&&Object.defineProperties(z,$),z}}function _(N){try{return Object.defineProperty(N,"sentinel",{}),"sentinel"in N}catch{}}if(Object.defineProperty){var E=_({}),b=typeof document=="undefined"||_(document.createElement("div"));if(!E||!b)var x=Object.defineProperty}if(!Object.defineProperty||x){var y="Property description must be an object: ",C="Object.defineProperty called on non-object: ",B="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(k,$,z){if(typeof k!="object"&&typeof k!="function"||k===null)throw new TypeError(C+k);if(typeof z!="object"&&typeof z!="function"||z===null)throw new TypeError(y+z);if(x)try{return x.call(Object,k,$,z)}catch{}if(a(z,"value"))if(g&&(h(k,$)||d(k,$))){var U=k.__proto__;k.__proto__=u,delete k[$],k[$]=z.value,k.__proto__=U}else k[$]=z.value;else{if(!g)throw new TypeError(B);a(z,"get")&&f(k,$,z.get),a(z,"set")&&l(k,$,z.set)}return k}}Object.defineProperties||(Object.defineProperties=function(k,$){for(var z in $)a($,z)&&Object.defineProperty(k,z,$[z]);return k}),Object.seal||(Object.seal=function(k){return k}),Object.freeze||(Object.freeze=function(k){return k});try{Object.freeze(function(){})}catch{Object.freeze=function($){return function(U){return typeof U=="function"?U:$(U)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(k){return k}),Object.isSealed||(Object.isSealed=function(k){return!1}),Object.isFrozen||(Object.isFrozen=function(k){return!1}),Object.isExtensible||(Object.isExtensible=function(k){if(Object(k)===k)throw new TypeError;for(var $="";a(k,$);)$+="?";k[$]=!0;var z=a(k,$);return delete k[$],z}),!Object.keys){var T=!0,M=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],R=M.length;for(var I in{toString:null})T=!1;Object.keys=function(k){if(typeof k!="object"&&typeof k!="function"||k===null)throw new TypeError("Object.keys called on a non-object");var $=[];for(var z in k)a(k,z)&&$.push(z);if(T)for(var U=0,G=R;U<G;U++){var Q=M[U];a(k,Q)&&$.push(Q)}return $}}Date.now||(Date.now=function(){return new Date().getTime()});var H=`
|
|
\v\f\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`;if(!String.prototype.trim||H.trim()){H="["+H+"]";var P=new RegExp("^"+H+H+"*"),j=new RegExp(H+H+"*$");String.prototype.trim=function(){return String(this).replace(P,"").replace(j,"")}}function V(N){return N=+N,N!==N?N=0:N!==0&&N!==1/0&&N!==-(1/0)&&(N=(N>0||-1)*Math.floor(Math.abs(N))),N}var K=function(N){if(N==null)throw new TypeError("can't convert "+N+" to object");return Object(N)}});ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e,t,n){e("./regexp"),e("./es5-shim")});ace.define("ace/lib/dom",["require","exports","module"],function(e,t,n){var i="http://www.w3.org/1999/xhtml";if(t.getDocumentHead=function(r){return r||(r=document),r.head||r.getElementsByTagName("head")[0]||r.documentElement},t.createElement=function(r,s){return document.createElementNS?document.createElementNS(s||i,r):document.createElement(r)},t.hasCssClass=function(r,s){var u=(r.className+"").split(/\s+/g);return u.indexOf(s)!==-1},t.addCssClass=function(r,s){t.hasCssClass(r,s)||(r.className+=" "+s)},t.removeCssClass=function(r,s){for(var u=r.className.split(/\s+/g);;){var o=u.indexOf(s);if(o==-1)break;u.splice(o,1)}r.className=u.join(" ")},t.toggleCssClass=function(r,s){for(var u=r.className.split(/\s+/g),o=!0;;){var c=u.indexOf(s);if(c==-1)break;o=!1,u.splice(c,1)}return o&&u.push(s),r.className=u.join(" "),o},t.setCssClass=function(r,s,u){u?t.addCssClass(r,s):t.removeCssClass(r,s)},t.hasCssString=function(r,s){var u=0,o;if(s=s||document,s.createStyleSheet&&(o=s.styleSheets)){for(;u<o.length;)if(o[u++].owningElement.id===r)return!0}else if(o=s.getElementsByTagName("style")){for(;u<o.length;)if(o[u++].id===r)return!0}return!1},t.importCssString=function(s,u,o){if(o=o||document,u&&t.hasCssString(u,o))return null;var c;u&&(s+=`
|
|
/*# sourceURL=ace/css/`+u+" */"),o.createStyleSheet?(c=o.createStyleSheet(),c.cssText=s,u&&(c.owningElement.id=u)):(c=t.createElement("style"),c.appendChild(o.createTextNode(s)),u&&(c.id=u),t.getDocumentHead(o).appendChild(c))},t.importCssStylsheet=function(r,s){if(s.createStyleSheet)s.createStyleSheet(r);else{var u=t.createElement("link");u.rel="stylesheet",u.href=r,t.getDocumentHead(s).appendChild(u)}},t.getInnerWidth=function(r){return parseInt(t.computedStyle(r,"paddingLeft"),10)+parseInt(t.computedStyle(r,"paddingRight"),10)+r.clientWidth},t.getInnerHeight=function(r){return parseInt(t.computedStyle(r,"paddingTop"),10)+parseInt(t.computedStyle(r,"paddingBottom"),10)+r.clientHeight},t.scrollbarWidth=function(r){var s=t.createElement("ace_inner");s.style.width="100%",s.style.minWidth="0px",s.style.height="200px",s.style.display="block";var u=t.createElement("ace_outer"),o=u.style;o.position="absolute",o.left="-10000px",o.overflow="hidden",o.width="200px",o.minWidth="0px",o.height="150px",o.display="block",u.appendChild(s);var c=r.documentElement;c.appendChild(u);var a=s.offsetWidth;o.overflow="scroll";var f=s.offsetWidth;return a==f&&(f=u.clientWidth),c.removeChild(u),a-f},typeof document=="undefined"){t.importCssString=function(){};return}window.pageYOffset!==void 0?(t.getPageScrollTop=function(){return window.pageYOffset},t.getPageScrollLeft=function(){return window.pageXOffset}):(t.getPageScrollTop=function(){return document.body.scrollTop},t.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?t.computedStyle=function(r,s){return s?(window.getComputedStyle(r,"")||{})[s]||"":window.getComputedStyle(r,"")||{}}:t.computedStyle=function(r,s){return s?r.currentStyle[s]:r.currentStyle},t.setInnerHtml=function(r,s){var u=r.cloneNode(!1);return u.innerHTML=s,r.parentNode.replaceChild(u,r),u},"textContent"in document.documentElement?(t.setInnerText=function(r,s){r.textContent=s},t.getInnerText=function(r){return r.textContent}):(t.setInnerText=function(r,s){r.innerText=s},t.getInnerText=function(r){return r.innerText}),t.getParentWindow=function(r){return r.defaultView||r.parentWindow}});ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){t.inherits=function(i,r){i.super_=r,i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(i,r){for(var s in r)i[s]=r[s];return i},t.implement=function(i,r){t.mixin(i,r)}});ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"],function(e,t,n){e("./fixoldbrowsers");var i=e("./oop"),r=function(){var s={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},u,o;for(o in s.FUNCTION_KEYS)u=s.FUNCTION_KEYS[o].toLowerCase(),s[u]=parseInt(o,10);for(o in s.PRINTABLE_KEYS)u=s.PRINTABLE_KEYS[o].toLowerCase(),s[u]=parseInt(o,10);return i.mixin(s,s.MODIFIER_KEYS),i.mixin(s,s.PRINTABLE_KEYS),i.mixin(s,s.FUNCTION_KEYS),s.enter=s.return,s.escape=s.esc,s.del=s.delete,s[173]="-",function(){for(var c=["cmd","ctrl","alt","shift"],a=Math.pow(2,c.length);a--;)s.KEY_MODS[a]=c.filter(function(f){return a&s.KEY_MODS[f]}).join("-")+"-"}(),s.KEY_MODS[0]="",s.KEY_MODS[-1]="input-",s}();i.mixin(t,r),t.keyCodeToString=function(s){var u=r[s];return typeof u!="string"&&(u=String.fromCharCode(s)),u.toLowerCase()}});ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,n){if(t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS},typeof navigator=="object"){var i=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),r=navigator.userAgent;t.isWin=i=="win",t.isMac=i=="mac",t.isLinux=i=="linux",t.isIE=navigator.appName=="Microsoft Internet Explorer"||navigator.appName.indexOf("MSAppHost")>=0?parseFloat((r.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((r.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&window.navigator.product==="Gecko",t.isOldGecko=t.isGecko&&parseInt((r.match(/rv:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&Object.prototype.toString.call(window.opera)=="[object Opera]",t.isWebKit=parseFloat(r.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(r.split(" Chrome/")[1])||void 0,t.isAIR=r.indexOf("AdobeAIR")>=0,t.isIPad=r.indexOf("iPad")>=0,t.isChromeOS=r.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(r)&&!window.MSStream,t.isIOS&&(t.isMac=!0)}});ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){var i=e("./keys"),r=e("./useragent"),s=null,u=0;t.addListener=function(l,h,d){if(l.addEventListener)return l.addEventListener(h,d,!1);if(l.attachEvent){var g=function(){d.call(l,window.event)};d._wrapper=g,l.attachEvent("on"+h,g)}},t.removeListener=function(l,h,d){if(l.removeEventListener)return l.removeEventListener(h,d,!1);l.detachEvent&&l.detachEvent("on"+h,d._wrapper||d)},t.stopEvent=function(l){return t.stopPropagation(l),t.preventDefault(l),!1},t.stopPropagation=function(l){l.stopPropagation?l.stopPropagation():l.cancelBubble=!0},t.preventDefault=function(l){l.preventDefault?l.preventDefault():l.returnValue=!1},t.getButton=function(l){return l.type=="dblclick"?0:l.type=="contextmenu"||r.isMac&&l.ctrlKey&&!l.altKey&&!l.shiftKey?2:l.preventDefault?l.button:{1:0,2:2,4:1}[l.button]},t.capture=function(l,h,d){function g(p){h&&h(p),d&&d(p),t.removeListener(document,"mousemove",h,!0),t.removeListener(document,"mouseup",g,!0),t.removeListener(document,"dragstart",g,!0)}return t.addListener(document,"mousemove",h,!0),t.addListener(document,"mouseup",g,!0),t.addListener(document,"dragstart",g,!0),g},t.addTouchMoveListener=function(l,h){var d,g;t.addListener(l,"touchstart",function(p){var m=p.touches,w=m[0];d=w.clientX,g=w.clientY}),t.addListener(l,"touchmove",function(p){var m=p.touches;if(!(m.length>1)){var w=m[0];p.wheelX=d-w.clientX,p.wheelY=g-w.clientY,d=w.clientX,g=w.clientY,h(p)}})},t.addMouseWheelListener=function(l,h){"onmousewheel"in l?t.addListener(l,"mousewheel",function(d){var g=8;d.wheelDeltaX!==void 0?(d.wheelX=-d.wheelDeltaX/g,d.wheelY=-d.wheelDeltaY/g):(d.wheelX=0,d.wheelY=-d.wheelDelta/g),h(d)}):"onwheel"in l?t.addListener(l,"wheel",function(d){var g=.35;switch(d.deltaMode){case d.DOM_DELTA_PIXEL:d.wheelX=d.deltaX*g||0,d.wheelY=d.deltaY*g||0;break;case d.DOM_DELTA_LINE:case d.DOM_DELTA_PAGE:d.wheelX=(d.deltaX||0)*5,d.wheelY=(d.deltaY||0)*5;break}h(d)}):t.addListener(l,"DOMMouseScroll",function(d){d.axis&&d.axis==d.HORIZONTAL_AXIS?(d.wheelX=(d.detail||0)*5,d.wheelY=0):(d.wheelX=0,d.wheelY=(d.detail||0)*5),h(d)})},t.addMultiMouseDownListener=function(l,h,d,g){var p=0,m,w,v,A={2:"dblclick",3:"tripleclick",4:"quadclick"};function _(b){if(t.getButton(b)!==0?p=0:b.detail>1?(p++,p>4&&(p=1)):p=1,r.isIE){var x=Math.abs(b.clientX-m)>5||Math.abs(b.clientY-w)>5;(!v||x)&&(p=1),v&&clearTimeout(v),v=setTimeout(function(){v=null},h[p-1]||600),p==1&&(m=b.clientX,w=b.clientY)}if(b._clicks=p,d[g]("mousedown",b),p>4)p=0;else if(p>1)return d[g](A[p],b)}function E(b){p=2,v&&clearTimeout(v),v=setTimeout(function(){v=null},h[p-1]||600),d[g]("mousedown",b),d[g](A[p],b)}Array.isArray(l)||(l=[l]),l.forEach(function(b){t.addListener(b,"mousedown",_),r.isOldIE&&t.addListener(b,"dblclick",E)})};var o=r.isMac&&r.isOpera&&!("KeyboardEvent"in window)?function(l){return 0|(l.metaKey?1:0)|(l.altKey?2:0)|(l.shiftKey?4:0)|(l.ctrlKey?8:0)}:function(l){return 0|(l.ctrlKey?1:0)|(l.altKey?2:0)|(l.shiftKey?4:0)|(l.metaKey?8:0)};t.getModifierString=function(l){return i.KEY_MODS[o(l)]};function c(l,h,d){var g=o(h);if(!r.isMac&&s){if(h.getModifierState&&(h.getModifierState("OS")||h.getModifierState("Win"))&&(g|=8),s.altGr)if((3&g)!=3)s.altGr=0;else return;if(d===18||d===17){var p="location"in h?h.location:h.keyLocation;if(d===17&&p===1)s[d]==1&&(u=h.timeStamp);else if(d===18&&g===3&&p===2){var m=h.timeStamp-u;m<50&&(s.altGr=!0)}}}if(d in i.MODIFIER_KEYS&&(d=-1),g&8&&d>=91&&d<=93&&(d=-1),!g&&d===13){var p="location"in h?h.location:h.keyLocation;if(p===3&&(l(h,g,-d),h.defaultPrevented))return}if(r.isChromeOS&&g&8){if(l(h,g,d),h.defaultPrevented)return;g&=-9}return!g&&!(d in i.FUNCTION_KEYS)&&!(d in i.PRINTABLE_KEYS)?!1:l(h,g,d)}t.addCommandKeyListener=function(l,h){var d=t.addListener;if(r.isOldGecko||r.isOpera&&!("KeyboardEvent"in window)){var g=null;d(l,"keydown",function(m){g=m.keyCode}),d(l,"keypress",function(m){return c(h,m,g)})}else{var p=null;d(l,"keydown",function(m){s[m.keyCode]=(s[m.keyCode]||0)+1;var w=c(h,m,m.keyCode);return p=m.defaultPrevented,w}),d(l,"keypress",function(m){p&&(m.ctrlKey||m.altKey||m.shiftKey||m.metaKey)&&(t.stopEvent(m),p=null)}),d(l,"keyup",function(m){s[m.keyCode]=null}),s||(a(),d(window,"focus",a))}};function a(){s=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!r.isOldIE){var f=1;t.nextTick=function(l,h){h=h||window;var d="zero-timeout-message-"+f;t.addListener(h,"message",function g(p){p.data==d&&(t.stopPropagation(p),t.removeListener(h,"message",g),l())}),h.postMessage(d,"*")}}t.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(l){setTimeout(l,17)}});ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){t.last=function(s){return s[s.length-1]},t.stringReverse=function(s){return s.split("").reverse().join("")},t.stringRepeat=function(s,u){for(var o="";u>0;)u&1&&(o+=s),(u>>=1)&&(s+=s);return o};var i=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(s){return s.replace(i,"")},t.stringTrimRight=function(s){return s.replace(r,"")},t.copyObject=function(s){var u={};for(var o in s)u[o]=s[o];return u},t.copyArray=function(s){for(var u=[],o=0,c=s.length;o<c;o++)s[o]&&typeof s[o]=="object"?u[o]=this.copyObject(s[o]):u[o]=s[o];return u},t.deepCopy=function s(u){if(typeof u!="object"||!u)return u;var o;if(Array.isArray(u)){o=[];for(var c=0;c<u.length;c++)o[c]=s(u[c]);return o}if(Object.prototype.toString.call(u)!=="[object Object]")return u;o={};for(var c in u)o[c]=s(u[c]);return o},t.arrayToMap=function(s){for(var u={},o=0;o<s.length;o++)u[s[o]]=1;return u},t.createMap=function(s){var u=Object.create(null);for(var o in s)u[o]=s[o];return u},t.arrayRemove=function(s,u){for(var o=0;o<=s.length;o++)u===s[o]&&s.splice(o,1)},t.escapeRegExp=function(s){return s.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(s){return s.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(s,u){var o=[];return s.replace(u,function(c){o.push({offset:arguments[arguments.length-2],length:c.length})}),o},t.deferredCall=function(s){var u=null,o=function(){u=null,s()},c=function(a){return c.cancel(),u=setTimeout(o,a||0),c};return c.schedule=c,c.call=function(){return this.cancel(),s(),c},c.cancel=function(){return clearTimeout(u),u=null,c},c.isPending=function(){return u},c},t.delayedCall=function(s,u){var o=null,c=function(){o=null,s()},a=function(f){o==null&&(o=setTimeout(c,f||u))};return a.delay=function(f){o&&clearTimeout(o),o=setTimeout(c,f||u)},a.schedule=a,a.call=function(){this.cancel(),s()},a.cancel=function(){o&&clearTimeout(o),o=null},a.isPending=function(){return o},a}});ace.define("ace/keyboard/textinput_ios",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/lib/keys"],function(e,t,n){var i=e("../lib/event"),r=e("../lib/useragent"),s=e("../lib/dom"),u=e("../lib/lang"),o=e("../lib/keys"),c=o.KEY_MODS,a=r.isChrome<18,f=r.isIE,l=function(h,d){var g=s.createElement("textarea");g.className=r.isIOS?"ace_text-input ace_text-input-ios":"ace_text-input",r.isTouchPad&&g.setAttribute("x-palm-disable-auto-cap",!0),g.setAttribute("wrap","off"),g.setAttribute("autocorrect","off"),g.setAttribute("autocapitalize","off"),g.setAttribute("spellcheck",!1),g.style.opacity="0",h.insertBefore(g,h.firstChild);var p=`
|
|
aaaa a
|
|
`,m=!1,w=!1,v=!1,A=!1,_="",E=!0;try{var b=document.activeElement===g}catch{}i.addListener(g,"blur",function(ee){d.onBlur(ee),b=!1}),i.addListener(g,"focus",function(ee){b=!0,d.onFocus(ee),C()}),this.focus=function(){if(_)return g.focus();g.style.position="fixed",g.focus()},this.blur=function(){g.blur()},this.isFocused=function(){return b};var x=u.delayedCall(function(){b&&C(E)}),y=u.delayedCall(function(){A||(g.value=p,b&&C())});function C(ee){if(!A){if(A=!0,R)ce=0,he=ee?0:g.value.length-1;else var ce=4,he=5;try{g.setSelectionRange(ce,he)}catch{}A=!1}}function B(){A||(g.value=p,r.isWebKit&&y.schedule())}r.isWebKit||d.addEventListener("changeSelection",function(){d.selection.isEmpty()!=E&&(E=!E,x.schedule())}),B(),b&&d.onFocus();var T=function(ee){return ee.selectionStart===0&&ee.selectionEnd===ee.value.length},M=function(ee){T(g)?(d.selectAll(),C()):R&&C(d.selection.isEmpty())},R=null;this.setInputHandler=function(ee){R=ee},this.getInputHandler=function(){return R};var I=!1,H=function(ee){g.selectionStart===4&&g.selectionEnd===5||(R&&(ee=R(ee),R=null),v?(C(),ee&&d.onPaste(ee),v=!1):ee==p.substr(0)&&g.selectionStart===4?I?d.execCommand("del",{source:"ace"}):d.execCommand("backspace",{source:"ace"}):m||(ee.substring(0,9)==p&&ee.length>p.length?ee=ee.substr(9):ee.substr(0,4)==p.substr(0,4)?ee=ee.substr(4,ee.length-p.length+1):ee.charAt(ee.length-1)==p.charAt(0)&&(ee=ee.slice(0,-1)),ee==p.charAt(0)||ee.charAt(ee.length-1)==p.charAt(0)&&(ee=ee.slice(0,-1)),ee&&d.onTextInput(ee)),m&&(m=!1),I&&(I=!1))},P=function(ee){if(!A){var ce=g.value;H(ce),B()}},j=function(ee,ce,he){var je=ee.clipboardData||window.clipboardData;if(!(!je||a)){var Ve=f||he?"Text":"text/plain";try{return ce?je.setData(Ve,ce)!==!1:je.getData(Ve)}catch(ge){if(!he)return j(ge,ce,!0)}}},V=function(ee,ce){var he=d.getCopyText();if(!he)return i.preventDefault(ee);j(ee,he)?(r.isIOS&&(w=ce,g.value=`
|
|
aa`+he+`a a
|
|
`,g.setSelectionRange(4,4+he.length),m={value:he}),ce?d.onCut():d.onCopy(),r.isIOS||i.preventDefault(ee)):(m=!0,g.value=he,g.select(),setTimeout(function(){m=!1,B(),C(),ce?d.onCut():d.onCopy()}))},K=function(ee){V(ee,!0)},N=function(ee){V(ee,!1)},k=function(ee){var ce=j(ee);typeof ce=="string"?(ce&&d.onPaste(ce,ee),r.isIE&&setTimeout(C),i.preventDefault(ee)):(g.value="",v=!0)};i.addCommandKeyListener(g,d.onCommandKey.bind(d)),i.addListener(g,"select",M),i.addListener(g,"input",P),i.addListener(g,"cut",K),i.addListener(g,"copy",N),i.addListener(g,"paste",k);var $=function(ee){A||!d.onCompositionStart||d.$readOnly||(A={},A.canUndo=d.session.$undoManager,d.onCompositionStart(),setTimeout(z,0),d.on("mousedown",U),A.canUndo&&!d.selection.isEmpty()&&(d.insert(""),d.session.markUndoGroup(),d.selection.clearSelection()),d.session.markUndoGroup())},z=function(){if(!(!A||!d.onCompositionUpdate||d.$readOnly)){var ee=g.value.replace(/\x01/g,"");if(A.lastValue!==ee&&(d.onCompositionUpdate(ee),A.lastValue&&d.undo(),A.canUndo&&(A.lastValue=ee),A.lastValue)){var ce=d.selection.getRange();d.insert(A.lastValue),d.session.markUndoGroup(),A.range=d.selection.getRange(),d.selection.setRange(ce),d.selection.clearSelection()}}},U=function(ee){if(!(!d.onCompositionEnd||d.$readOnly)){var ce=A;A=!1;var he=setTimeout(function(){he=null;var Ve=g.value.replace(/\x01/g,"");A||(Ve==ce.lastValue?B():!ce.lastValue&&Ve&&(B(),H(Ve)))});R=function(ge){return he&&clearTimeout(he),ge=ge.replace(/\x01/g,""),ge==ce.lastValue?"":(ce.lastValue&&he&&d.undo(),ge)},d.onCompositionEnd(),d.removeListener("mousedown",U),ee.type=="compositionend"&&ce.range&&d.selection.setRange(ce.range);var je=!!r.isChrome&&r.isChrome>=53||!!r.isWebKit&&r.isWebKit>=603;je&&P()}},G=u.delayedCall(z,50);i.addListener(g,"compositionstart",$),r.isGecko?i.addListener(g,"text",function(){G.schedule()}):(i.addListener(g,"keyup",function(){G.schedule()}),i.addListener(g,"keydown",function(){G.schedule()})),i.addListener(g,"compositionend",U),this.getElement=function(){return g},this.setReadOnly=function(ee){g.readOnly=ee},this.onContextMenu=function(ee){I=!0,C(d.selection.isEmpty()),d._emit("nativecontextmenu",{target:d,domEvent:ee}),this.moveToMouse(ee,!0)},this.moveToMouse=function(ee,ce){_||(_=g.style.cssText),g.style.cssText=(ce?"z-index:100000;":"")+"height:"+g.style.height+";"+(r.isIE?"opacity:0.1;":"");var he=d.container.getBoundingClientRect(),je=s.computedStyle(d.container),Ve=he.top+(parseInt(je.borderTopWidth)||0),ge=he.left+(parseInt(he.borderLeftWidth)||0),Tt=he.bottom-Ve-g.clientHeight-2,Re=function(Te){g.style.left=Te.clientX-ge-2+"px",g.style.top=Math.min(Te.clientY-Ve-2,Tt)+"px"};Re(ee),ee.type=="mousedown"&&(d.renderer.$keepTextAreaAtCursor&&(d.renderer.$keepTextAreaAtCursor=null),clearTimeout(Q),r.isWin&&i.capture(d.container,Re,X))},this.onContextMenuClose=X;var Q;function X(){clearTimeout(Q),Q=setTimeout(function(){_&&(g.style.cssText=_,_=""),d.renderer.$keepTextAreaAtCursor==null&&(d.renderer.$keepTextAreaAtCursor=!0,d.renderer.$moveTextAreaToCursor())},0)}var te=function(ee){d.textInput.onContextMenu(ee),X()};if(i.addListener(g,"mouseup",te),i.addListener(g,"mousedown",function(ee){ee.preventDefault(),X()}),i.addListener(d.renderer.scroller,"contextmenu",te),i.addListener(g,"contextmenu",te),r.isIOS){var le=null,ye=!1;h.addEventListener("keydown",function(ee){le&&clearTimeout(le),ye=!0}),h.addEventListener("keyup",function(ee){le=setTimeout(function(){ye=!1},100)});var ve=function(ee){if(document.activeElement===g&&!ye){if(w)return setTimeout(function(){w=!1},100);var ce=g.selectionStart,he=g.selectionEnd;if(g.setSelectionRange(4,5),ce==he)switch(ce){case 0:d.onCommandKey(null,0,o.up);break;case 1:d.onCommandKey(null,0,o.home);break;case 2:d.onCommandKey(null,c.option,o.left);break;case 4:d.onCommandKey(null,0,o.left);break;case 5:d.onCommandKey(null,0,o.right);break;case 7:d.onCommandKey(null,c.option,o.right);break;case 8:d.onCommandKey(null,0,o.end);break;case 9:d.onCommandKey(null,0,o.down);break}else{switch(he){case 6:d.onCommandKey(null,c.shift,o.right);break;case 7:d.onCommandKey(null,c.shift|c.option,o.right);break;case 8:d.onCommandKey(null,c.shift,o.end);break;case 9:d.onCommandKey(null,c.shift,o.down);break}switch(ce){case 0:d.onCommandKey(null,c.shift,o.up);break;case 1:d.onCommandKey(null,c.shift,o.home);break;case 2:d.onCommandKey(null,c.shift|c.option,o.left);break;case 3:d.onCommandKey(null,c.shift,o.left);break}}}};document.addEventListener("selectionchange",ve),d.on("destroy",function(){document.removeEventListener("selectionchange",ve)})}};t.TextInput=l});ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/keyboard/textinput_ios"],function(e,t,n){var i=e("../lib/event"),r=e("../lib/useragent"),s=e("../lib/dom"),u=e("../lib/lang"),o=r.isChrome<18,c=r.isIE,a=e("./textinput_ios").TextInput,f=function(l,h){if(r.isIOS)return a.call(this,l,h);var d=s.createElement("textarea");d.className="ace_text-input",d.setAttribute("wrap","off"),d.setAttribute("autocorrect","off"),d.setAttribute("autocapitalize","off"),d.setAttribute("spellcheck",!1),d.style.opacity="0",l.insertBefore(d,l.firstChild);var g="\u2028\u2028",p=!1,m=!1,w=!1,v="",A=!0;try{var _=document.activeElement===d}catch{}i.addListener(d,"blur",function(X){h.onBlur(X),_=!1}),i.addListener(d,"focus",function(X){_=!0,h.onFocus(X),x()}),this.focus=function(){if(v)return d.focus();var X=d.style.top;d.style.position="fixed",d.style.top="0px",d.focus(),setTimeout(function(){d.style.position="",d.style.top=="0px"&&(d.style.top=X)},0)},this.blur=function(){d.blur()},this.isFocused=function(){return _};var E=u.delayedCall(function(){_&&x(A)}),b=u.delayedCall(function(){w||(d.value=g,_&&x())});function x(X){if(!w){if(w=!0,T)var te=0,le=X?0:d.value.length-1;else var te=X?2:1,le=2;try{d.setSelectionRange(te,le)}catch{}w=!1}}function y(){w||(d.value=g,r.isWebKit&&b.schedule())}r.isWebKit||h.addEventListener("changeSelection",function(){h.selection.isEmpty()!=A&&(A=!A,E.schedule())}),y(),_&&h.onFocus();var C=function(X){return X.selectionStart===0&&X.selectionEnd===X.value.length},B=function(X){p?p=!1:C(d)?(h.selectAll(),x()):T&&x(h.selection.isEmpty())},T=null;this.setInputHandler=function(X){T=X},this.getInputHandler=function(){return T};var M=!1,R=function(X){T&&(X=T(X),T=null),m?(x(),X&&h.onPaste(X),m=!1):X==g.charAt(0)?M?h.execCommand("del",{source:"ace"}):h.execCommand("backspace",{source:"ace"}):(X.substring(0,2)==g?X=X.substr(2):X.charAt(0)==g.charAt(0)?X=X.substr(1):X.charAt(X.length-1)==g.charAt(0)&&(X=X.slice(0,-1)),X.charAt(X.length-1)==g.charAt(0)&&(X=X.slice(0,-1)),X&&h.onTextInput(X)),M&&(M=!1)},I=function(X){if(!w){var te=d.value;R(te),y()}},H=function(X,te,le){var ye=X.clipboardData||window.clipboardData;if(!(!ye||o)){var ve=c||le?"Text":"text/plain";try{return te?ye.setData(ve,te)!==!1:ye.getData(ve)}catch(ee){if(!le)return H(ee,te,!0)}}},P=function(X,te){var le=h.getCopyText();if(!le)return i.preventDefault(X);H(X,le)?(te?h.onCut():h.onCopy(),i.preventDefault(X)):(p=!0,d.value=le,d.select(),setTimeout(function(){p=!1,y(),x(),te?h.onCut():h.onCopy()}))},j=function(X){P(X,!0)},V=function(X){P(X,!1)},K=function(X){var te=H(X);typeof te=="string"?(te&&h.onPaste(te,X),r.isIE&&setTimeout(x),i.preventDefault(X)):(d.value="",m=!0)};i.addCommandKeyListener(d,h.onCommandKey.bind(h)),i.addListener(d,"select",B),i.addListener(d,"input",I),i.addListener(d,"cut",j),i.addListener(d,"copy",V),i.addListener(d,"paste",K),(!("oncut"in d)||!("oncopy"in d)||!("onpaste"in d))&&i.addListener(l,"keydown",function(X){if(!(r.isMac&&!X.metaKey||!X.ctrlKey))switch(X.keyCode){case 67:V(X);break;case 86:K(X);break;case 88:j(X);break}});var N=function(X){w||!h.onCompositionStart||h.$readOnly||(w={},w.canUndo=h.session.$undoManager,h.onCompositionStart(),setTimeout(k,0),h.on("mousedown",$),w.canUndo&&!h.selection.isEmpty()&&(h.insert(""),h.session.markUndoGroup(),h.selection.clearSelection()),h.session.markUndoGroup())},k=function(){if(!(!w||!h.onCompositionUpdate||h.$readOnly)){var X=d.value.replace(/\u2028/g,"");if(w.lastValue!==X&&(h.onCompositionUpdate(X),w.lastValue&&h.undo(),w.canUndo&&(w.lastValue=X),w.lastValue)){var te=h.selection.getRange();h.insert(w.lastValue),h.session.markUndoGroup(),w.range=h.selection.getRange(),h.selection.setRange(te),h.selection.clearSelection()}}},$=function(X){if(!(!h.onCompositionEnd||h.$readOnly)){var te=w;w=!1;var le=setTimeout(function(){le=null;var ve=d.value.replace(/\u2028/g,"");w||(ve==te.lastValue?y():!te.lastValue&&ve&&(y(),R(ve)))});T=function(ee){return le&&clearTimeout(le),ee=ee.replace(/\u2028/g,""),ee==te.lastValue?"":(te.lastValue&&le&&h.undo(),ee)},h.onCompositionEnd(),h.removeListener("mousedown",$),X.type=="compositionend"&&te.range&&h.selection.setRange(te.range);var ye=!!r.isChrome&&r.isChrome>=53||!!r.isWebKit&&r.isWebKit>=603;ye&&I()}},z=u.delayedCall(k,50);i.addListener(d,"compositionstart",N),r.isGecko?i.addListener(d,"text",function(){z.schedule()}):(i.addListener(d,"keyup",function(){z.schedule()}),i.addListener(d,"keydown",function(){z.schedule()})),i.addListener(d,"compositionend",$),this.getElement=function(){return d},this.setReadOnly=function(X){d.readOnly=X},this.onContextMenu=function(X){M=!0,x(h.selection.isEmpty()),h._emit("nativecontextmenu",{target:h,domEvent:X}),this.moveToMouse(X,!0)},this.moveToMouse=function(X,te){v||(v=d.style.cssText),d.style.cssText=(te?"z-index:100000;":"")+"height:"+d.style.height+";"+(r.isIE?"opacity:0.1;":"");var le=h.container.getBoundingClientRect(),ye=s.computedStyle(h.container),ve=le.top+(parseInt(ye.borderTopWidth)||0),ee=le.left+(parseInt(le.borderLeftWidth)||0),ce=le.bottom-ve-d.clientHeight-2,he=function(je){d.style.left=je.clientX-ee-2+"px",d.style.top=Math.min(je.clientY-ve-2,ce)+"px"};he(X),X.type=="mousedown"&&(h.renderer.$keepTextAreaAtCursor&&(h.renderer.$keepTextAreaAtCursor=null),clearTimeout(U),r.isWin&&i.capture(h.container,he,G))},this.onContextMenuClose=G;var U;function G(){clearTimeout(U),U=setTimeout(function(){v&&(d.style.cssText=v,v=""),h.renderer.$keepTextAreaAtCursor==null&&(h.renderer.$keepTextAreaAtCursor=!0,h.renderer.$moveTextAreaToCursor())},0)}var Q=function(X){h.textInput.onContextMenu(X),G()};i.addListener(d,"mouseup",Q),i.addListener(d,"mousedown",function(X){X.preventDefault(),G()}),i.addListener(h.renderer.scroller,"contextmenu",Q),i.addListener(d,"contextmenu",Q)};t.TextInput=f});ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){e("../lib/dom"),e("../lib/event");var i=e("../lib/useragent"),r=0,s=250;function u(a){a.$clickSelection=null;var f=a.editor;f.setDefaultHandler("mousedown",this.onMouseDown.bind(a)),f.setDefaultHandler("dblclick",this.onDoubleClick.bind(a)),f.setDefaultHandler("tripleclick",this.onTripleClick.bind(a)),f.setDefaultHandler("quadclick",this.onQuadClick.bind(a)),f.setDefaultHandler("mousewheel",this.onMouseWheel.bind(a)),f.setDefaultHandler("touchmove",this.onTouchMove.bind(a));var l=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];l.forEach(function(h){a[h]=this[h]},this),a.selectByLines=this.extendSelectionBy.bind(a,"getLineRange"),a.selectByWords=this.extendSelectionBy.bind(a,"getWordRange")}(function(){this.onMouseDown=function(a){var f=a.inSelection(),l=a.getDocumentPosition();this.mousedownEvent=a;var h=this.editor,d=a.getButton();if(d!==0){var g=h.getSelectionRange(),p=g.isEmpty();h.$blockScrolling++,(p||d==1)&&h.selection.moveToPosition(l),h.$blockScrolling--,d==2&&(h.textInput.onContextMenu(a.domEvent),i.isMozilla||a.preventDefault());return}if(this.mousedownEvent.time=Date.now(),f&&!h.isFocused()&&(h.focus(),this.$focusTimout&&!this.$clickSelection&&!h.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(a);return}return this.captureMouse(a),this.startSelect(l,a.domEvent._clicks>1),a.preventDefault()},this.startSelect=function(a,f){a=a||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var l=this.editor;l.$blockScrolling++,this.mousedownEvent.getShiftKey()?l.selection.selectToPosition(a):f||l.selection.moveToPosition(a),f||this.select(),l.renderer.scroller.setCapture&&l.renderer.scroller.setCapture(),l.setStyle("ace_selecting"),this.setState("select"),l.$blockScrolling--},this.select=function(){var a,f=this.editor,l=f.renderer.screenToTextCoordinates(this.x,this.y);if(f.$blockScrolling++,this.$clickSelection){var h=this.$clickSelection.comparePoint(l);if(h==-1)a=this.$clickSelection.end;else if(h==1)a=this.$clickSelection.start;else{var d=c(this.$clickSelection,l);l=d.cursor,a=d.anchor}f.selection.setSelectionAnchor(a.row,a.column)}f.selection.selectToPosition(l),f.$blockScrolling--,f.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(a){var f,l=this.editor,h=l.renderer.screenToTextCoordinates(this.x,this.y),d=l.selection[a](h.row,h.column);if(l.$blockScrolling++,this.$clickSelection){var g=this.$clickSelection.comparePoint(d.start),p=this.$clickSelection.comparePoint(d.end);if(g==-1&&p<=0)f=this.$clickSelection.end,(d.end.row!=h.row||d.end.column!=h.column)&&(h=d.start);else if(p==1&&g>=0)f=this.$clickSelection.start,(d.start.row!=h.row||d.start.column!=h.column)&&(h=d.end);else if(g==-1&&p==1)h=d.end,f=d.start;else{var m=c(this.$clickSelection,h);h=m.cursor,f=m.anchor}l.selection.setSelectionAnchor(f.row,f.column)}l.selection.selectToPosition(h),l.$blockScrolling--,l.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var a=o(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),f=Date.now();(a>r||f-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(a){var f=a.getDocumentPosition(),l=this.editor,h=l.session,d=h.getBracketRange(f);d?(d.isEmpty()&&(d.start.column--,d.end.column++),this.setState("select")):(d=l.selection.getWordRange(f.row,f.column),this.setState("selectByWords")),this.$clickSelection=d,this.select()},this.onTripleClick=function(a){var f=a.getDocumentPosition(),l=this.editor;this.setState("selectByLines");var h=l.getSelectionRange();h.isMultiLine()&&h.contains(f.row,f.column)?(this.$clickSelection=l.selection.getLineRange(h.start.row),this.$clickSelection.end=l.selection.getLineRange(h.end.row).end):this.$clickSelection=l.selection.getLineRange(f.row),this.select()},this.onQuadClick=function(a){var f=this.editor;f.selectAll(),this.$clickSelection=f.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(a){if(!a.getAccelKey()){a.getShiftKey()&&a.wheelY&&!a.wheelX&&(a.wheelX=a.wheelY,a.wheelY=0);var f=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var l=this.$lastScroll,h=a.domEvent.timeStamp,d=h-l.t,g=a.wheelX/d,p=a.wheelY/d;d<s&&(g=(g+l.vx)/2,p=(p+l.vy)/2);var m=Math.abs(g/p),w=!1;if(m>=1&&f.renderer.isScrollableBy(a.wheelX*a.speed,0)&&(w=!0),m<=1&&f.renderer.isScrollableBy(0,a.wheelY*a.speed)&&(w=!0),w)l.allowed=h;else if(h-l.allowed<s){var v=Math.abs(g)<=1.1*Math.abs(l.vx)&&Math.abs(p)<=1.1*Math.abs(l.vy);v?(w=!0,l.allowed=h):l.allowed=0}if(l.t=h,l.vx=g,l.vy=p,w)return f.renderer.scrollBy(a.wheelX*a.speed,a.wheelY*a.speed),a.stop()}},this.onTouchMove=function(a){this.editor._emit("mousewheel",a)}}).call(u.prototype),t.DefaultHandlers=u;function o(a,f,l,h){return Math.sqrt(Math.pow(l-a,2)+Math.pow(h-f,2))}function c(a,f){if(a.start.row==a.end.row)var l=2*f.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var l=f.column-4;else var l=2*f.row-a.start.row-a.end.row;return l<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}});ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,n){e("./lib/oop");var i=e("./lib/dom");function r(s){this.isOpen=!1,this.$element=null,this.$parentNode=s}(function(){this.$init=function(){return this.$element=i.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(s){i.setInnerText(this.getElement(),s)},this.setHtml=function(s){this.getElement().innerHTML=s},this.setPosition=function(s,u){this.getElement().style.left=s+"px",this.getElement().style.top=u+"px"},this.setClassName=function(s){i.addCssClass(this.getElement(),s)},this.show=function(s,u,o){s!=null&&this.setText(s),u!=null&&o!=null&&this.setPosition(u,o),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(r.prototype),t.Tooltip=r});ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,n){var i=e("../lib/dom"),r=e("../lib/oop"),s=e("../lib/event"),u=e("../tooltip").Tooltip;function o(a){var f=a.editor,l=f.renderer.$gutterLayer,h=new c(f.container);a.editor.setDefaultHandler("guttermousedown",function(A){if(!(!f.isFocused()||A.getButton()!=0)){var _=l.getRegion(A);if(_!="foldWidgets"){var E=A.getDocumentPosition().row,b=f.session.selection;if(A.getShiftKey())b.selectTo(E,0);else{if(A.domEvent.detail==2)return f.selectAll(),A.preventDefault();a.$clickSelection=f.selection.getLineRange(E)}return a.setState("selectByLines"),a.captureMouse(A),A.preventDefault()}}});var d,g,p;function m(){var A=g.getDocumentPosition().row,_=l.$annotations[A];if(!_)return w();var E=f.session.getLength();if(A==E){var b=f.renderer.pixelToScreenCoordinates(0,g.y).row,x=g.$pos;if(b>f.session.documentToScreenRow(x.row,x.column))return w()}if(p!=_)if(p=_.text.join("<br/>"),h.setHtml(p),h.show(),f._signal("showGutterTooltip",h),f.on("mousewheel",w),a.$tooltipFollowsMouse)v(g);else{var y=g.domEvent.target,C=y.getBoundingClientRect(),B=h.getElement().style;B.left=C.right+"px",B.top=C.bottom+"px"}}function w(){d&&(d=clearTimeout(d)),p&&(h.hide(),p=null,f._signal("hideGutterTooltip",h),f.removeEventListener("mousewheel",w))}function v(A){h.setPosition(A.x,A.y)}a.editor.setDefaultHandler("guttermousemove",function(A){var _=A.domEvent.target||A.domEvent.srcElement;if(i.hasCssClass(_,"ace_fold-widget"))return w();p&&a.$tooltipFollowsMouse&&v(A),g=A,!d&&(d=setTimeout(function(){d=null,g&&!a.isMousePressed?m():w()},50))}),s.addListener(f.renderer.$gutter,"mouseout",function(A){g=null,!(!p||d)&&(d=setTimeout(function(){d=null,w()},50))}),f.on("changeSession",w)}function c(a){u.call(this,a)}r.inherits(c,u),function(){this.setPosition=function(a,f){var l=window.innerWidth||document.documentElement.clientWidth,h=window.innerHeight||document.documentElement.clientHeight,d=this.getWidth(),g=this.getHeight();a+=15,f+=15,a+d>l&&(a-=a+d-l),f+g>h&&(f-=20+g),u.prototype.setPosition.call(this,a,f)}}.call(c.prototype),t.GutterHandler=o});ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){var i=e("../lib/event"),r=e("../lib/useragent"),s=t.MouseEvent=function(u,o){this.domEvent=u,this.editor=o,this.x=this.clientX=u.clientX,this.y=this.clientY=u.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var u=this.editor,o=u.getSelectionRange();if(o.isEmpty())this.$inSelection=!1;else{var c=this.getDocumentPosition();this.$inSelection=o.contains(c.row,c.column)}return this.$inSelection},this.getButton=function(){return i.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(s.prototype)});ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){var i=e("../lib/dom"),r=e("../lib/event"),s=e("../lib/useragent"),u=200,o=200,c=5;function a(l){var h=l.editor,d=i.createElement("img");d.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",s.isOpera&&(d.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var g=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];g.forEach(function(k){l[k]=this[k]},this),h.addEventListener("mousedown",this.onMouseDown.bind(l));var p=h.container,m,w,v,A,_,E,b=0,x,y,C,B,T;this.onDragStart=function(k){if(this.cancelDrag||!p.draggable){var $=this;return setTimeout(function(){$.startSelect(),$.captureMouse(k)},0),k.preventDefault()}_=h.getSelectionRange();var z=k.dataTransfer;z.effectAllowed=h.getReadOnly()?"copy":"copyMove",s.isOpera&&(h.container.appendChild(d),d.scrollTop=0),z.setDragImage&&z.setDragImage(d,0,0),s.isOpera&&h.container.removeChild(d),z.clearData(),z.setData("Text",h.session.getTextRange()),y=!0,this.setState("drag")},this.onDragEnd=function(k){if(p.draggable=!1,y=!1,this.setState(null),!h.getReadOnly()){var $=k.dataTransfer.dropEffect;!x&&$=="move"&&h.session.remove(h.getSelectionRange()),h.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(k){if(!(h.getReadOnly()||!K(k.dataTransfer)))return w=k.clientX,v=k.clientY,m||H(),b++,k.dataTransfer.dropEffect=x=N(k),r.preventDefault(k)},this.onDragOver=function(k){if(!(h.getReadOnly()||!K(k.dataTransfer)))return w=k.clientX,v=k.clientY,m||(H(),b++),j!==null&&(j=null),k.dataTransfer.dropEffect=x=N(k),r.preventDefault(k)},this.onDragLeave=function(k){if(b--,b<=0&&m)return P(),x=null,r.preventDefault(k)},this.onDrop=function(k){if(!!E){var $=k.dataTransfer;if(y)switch(x){case"move":_.contains(E.row,E.column)?_={start:E,end:E}:_=h.moveText(_,E);break;case"copy":_=h.moveText(_,E,!0);break}else{var z=$.getData("Text");_={start:E,end:h.session.insert(E,z)},h.focus(),x=null}return P(),r.preventDefault(k)}},r.addListener(p,"dragstart",this.onDragStart.bind(l)),r.addListener(p,"dragend",this.onDragEnd.bind(l)),r.addListener(p,"dragenter",this.onDragEnter.bind(l)),r.addListener(p,"dragover",this.onDragOver.bind(l)),r.addListener(p,"dragleave",this.onDragLeave.bind(l)),r.addListener(p,"drop",this.onDrop.bind(l));function M(k,$){var z=Date.now(),U=!$||k.row!=$.row,G=!$||k.column!=$.column;if(!B||U||G)h.$blockScrolling+=1,h.moveCursorToPosition(k),h.$blockScrolling-=1,B=z,T={x:w,y:v};else{var Q=f(T.x,T.y,w,v);Q>c?B=null:z-B>=o&&(h.renderer.scrollCursorIntoView(),B=null)}}function R(k,$){var z=Date.now(),U=h.renderer.layerConfig.lineHeight,G=h.renderer.layerConfig.characterWidth,Q=h.renderer.scroller.getBoundingClientRect(),X={x:{left:w-Q.left,right:Q.right-w},y:{top:v-Q.top,bottom:Q.bottom-v}},te=Math.min(X.x.left,X.x.right),le=Math.min(X.y.top,X.y.bottom),ye={row:k.row,column:k.column};te/G<=2&&(ye.column+=X.x.left<X.x.right?-3:2),le/U<=1&&(ye.row+=X.y.top<X.y.bottom?-1:1);var ve=k.row!=ye.row,ee=k.column!=ye.column,ce=!$||k.row!=$.row;ve||ee&&!ce?C?z-C>=u&&h.renderer.scrollCursorIntoView(ye):C=z:C=null}function I(){var k=E;E=h.renderer.screenToTextCoordinates(w,v),M(E,k),R(E,k)}function H(){_=h.selection.toOrientedRange(),m=h.session.addMarker(_,"ace_selection",h.getSelectionStyle()),h.clearSelection(),h.isFocused()&&h.renderer.$cursorLayer.setBlinking(!1),clearInterval(A),I(),A=setInterval(I,20),b=0,r.addListener(document,"mousemove",V)}function P(){clearInterval(A),h.session.removeMarker(m),m=null,h.$blockScrolling+=1,h.selection.fromOrientedRange(_),h.$blockScrolling-=1,h.isFocused()&&!y&&h.renderer.$cursorLayer.setBlinking(!h.getReadOnly()),_=null,E=null,b=0,C=null,B=null,r.removeListener(document,"mousemove",V)}var j=null;function V(){j==null&&(j=setTimeout(function(){j!=null&&m&&P()},20))}function K(k){var $=k.types;return!$||Array.prototype.some.call($,function(z){return z=="text/plain"||z=="Text"})}function N(k){var $=["copy","copymove","all","uninitialized"],z=["move","copymove","linkmove","all","uninitialized"],U=s.isMac?k.altKey:k.ctrlKey,G="uninitialized";try{G=k.dataTransfer.effectAllowed.toLowerCase()}catch{}var Q="none";return U&&$.indexOf(G)>=0?Q="copy":z.indexOf(G)>=0?Q="move":$.indexOf(G)>=0&&(Q="copy"),Q}}(function(){this.dragWait=function(){var l=Date.now()-this.mousedownEvent.time;l>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var l=this.editor.container;l.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(l){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var l=this.editor,h=l.container;h.draggable=!0,l.renderer.$cursorLayer.setBlinking(!1),l.setStyle("ace_dragging");var d=s.isWin?"default":"move";l.renderer.setCursorStyle(d),this.setState("dragReady")},this.onMouseDrag=function(l){var h=this.editor.container;if(s.isIE&&this.state=="dragReady"){var d=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);d>3&&h.dragDrop()}if(this.state==="dragWait"){var d=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);d>0&&(h.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(l){if(!!this.$dragEnabled){this.mousedownEvent=l;var h=this.editor,d=l.inSelection(),g=l.getButton(),p=l.domEvent.detail||1;if(p===1&&g===0&&d){if(l.editor.inMultiSelectMode&&(l.getAccelKey()||l.getShiftKey()))return;this.mousedownEvent.time=Date.now();var m=l.domEvent.target||l.domEvent.srcElement;if("unselectable"in m&&(m.unselectable="on"),h.getDragDelay()){if(s.isWebKit){this.cancelDrag=!0;var w=h.container;w.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(l,this.onMouseDrag.bind(this)),l.defaultPrevented=!0}}}}).call(a.prototype);function f(l,h,d,g){return Math.sqrt(Math.pow(d-l,2)+Math.pow(g-h,2))}t.DragdropHandler=a});ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,n){var i=e("./dom");t.get=function(r,s){var u=new XMLHttpRequest;u.open("GET",r,!0),u.onreadystatechange=function(){u.readyState===4&&s(u.responseText)},u.send(null)},t.loadScript=function(r,s){var u=i.getDocumentHead(),o=document.createElement("script");o.src=r,u.appendChild(o),o.onload=o.onreadystatechange=function(c,a){(a||!o.readyState||o.readyState=="loaded"||o.readyState=="complete")&&(o=o.onload=o.onreadystatechange=null,a||s())}},t.qualifyURL=function(r){var s=document.createElement("a");return s.href=r,s.href}});ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){var i={},r=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(u,o){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var c=this._eventRegistry[u]||[],a=this._defaultHandlers[u];if(!(!c.length&&!a)){(typeof o!="object"||!o)&&(o={}),o.type||(o.type=u),o.stopPropagation||(o.stopPropagation=r),o.preventDefault||(o.preventDefault=s),c=c.slice();for(var f=0;f<c.length&&(c[f](o,this),!o.propagationStopped);f++);if(a&&!o.defaultPrevented)return a(o,this)}},i._signal=function(u,o){var c=(this._eventRegistry||{})[u];if(!!c){c=c.slice();for(var a=0;a<c.length;a++)c[a](o,this)}},i.once=function(u,o){var c=this;o&&this.addEventListener(u,function a(){c.removeEventListener(u,a),o.apply(null,arguments)})},i.setDefaultHandler=function(u,o){var c=this._defaultHandlers;if(c||(c=this._defaultHandlers={_disabled_:{}}),c[u]){var a=c[u],f=c._disabled_[u];f||(c._disabled_[u]=f=[]),f.push(a);var l=f.indexOf(o);l!=-1&&f.splice(l,1)}c[u]=o},i.removeDefaultHandler=function(u,o){var c=this._defaultHandlers;if(!!c){var a=c._disabled_[u];if(c[u]==o)c[u],a&&this.setDefaultHandler(u,a.pop());else if(a){var f=a.indexOf(o);f!=-1&&a.splice(f,1)}}},i.on=i.addEventListener=function(u,o,c){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[u];return a||(a=this._eventRegistry[u]=[]),a.indexOf(o)==-1&&a[c?"unshift":"push"](o),o},i.off=i.removeListener=i.removeEventListener=function(u,o){this._eventRegistry=this._eventRegistry||{};var c=this._eventRegistry[u];if(!!c){var a=c.indexOf(o);a!==-1&&c.splice(a,1)}},i.removeAllListeners=function(u){this._eventRegistry&&(this._eventRegistry[u]=[])},t.EventEmitter=i});ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var i=e("./oop"),r=e("./event_emitter").EventEmitter,s={setOptions:function(a){Object.keys(a).forEach(function(f){this.setOption(f,a[f])},this)},getOptions:function(a){var f={};return a?Array.isArray(a)||(f=a,a=Object.keys(f)):a=Object.keys(this.$options),a.forEach(function(l){f[l]=this.getOption(l)},this),f},setOption:function(a,f){if(this["$"+a]!==f){var l=this.$options[a];if(!l)return u('misspelled option "'+a+'"');if(l.forwardTo)return this[l.forwardTo]&&this[l.forwardTo].setOption(a,f);l.handlesSet||(this["$"+a]=f),l&&l.set&&l.set.call(this,f)}},getOption:function(a){var f=this.$options[a];return f?f.forwardTo?this[f.forwardTo]&&this[f.forwardTo].getOption(a):f&&f.get?f.get.call(this):this["$"+a]:u('misspelled option "'+a+'"')}};function u(a){typeof console!="undefined"&&console.warn&&console.warn.apply(console,arguments)}function o(a,f){var l=new Error(a);l.data=f,typeof console=="object"&&console.error&&console.error(l),setTimeout(function(){throw l})}var c=function(){this.$defaultOptions={}};(function(){i.implement(this,r),this.defineOptions=function(a,f,l){return a.$options||(this.$defaultOptions[f]=a.$options={}),Object.keys(l).forEach(function(h){var d=l[h];typeof d=="string"&&(d={forwardTo:d}),d.name||(d.name=h),a.$options[d.name]=d,"initialValue"in d&&(a["$"+d.name]=d.initialValue)}),i.implement(a,s),this},this.resetOptions=function(a){Object.keys(a.$options).forEach(function(f){var l=a.$options[f];"value"in l&&a.setOption(f,l.value)})},this.setDefaultValue=function(a,f,l){var h=this.$defaultOptions[a]||(this.$defaultOptions[a]={});h[f]&&(h.forwardTo?this.setDefaultValue(h.forwardTo,f,l):h[f].value=l)},this.setDefaultValues=function(a,f){Object.keys(f).forEach(function(l){this.setDefaultValue(a,l,f[l])},this)},this.warn=u,this.reportError=o}).call(c.prototype),t.AppConfig=c});ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],function(e,t,n){var i=e("./lib/lang");e("./lib/oop");var r=e("./lib/net"),s=e("./lib/app_config").AppConfig;n.exports=t=new s;var u=function(){return this||typeof window!="undefined"&&window}(),o={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};t.get=function(f){if(!o.hasOwnProperty(f))throw new Error("Unknown config key: "+f);return o[f]},t.set=function(f,l){if(!o.hasOwnProperty(f))throw new Error("Unknown config key: "+f);o[f]=l},t.all=function(){return i.copyObject(o)},t.moduleUrl=function(f,l){if(o.$moduleUrls[f])return o.$moduleUrls[f];var h=f.split("/");l=l||h[h.length-2]||"";var d=l=="snippets"?"/":"-",g=h[h.length-1];if(l=="worker"&&d=="-"){var p=new RegExp("^"+l+"[\\-_]|[\\-_]"+l+"$","g");g=g.replace(p,"")}(!g||g==l)&&h.length>1&&(g=h[h.length-2]);var m=o[l+"Path"];return m==null?m=o.basePath:d=="/"&&(l=d=""),m&&m.slice(-1)!="/"&&(m+="/"),m+l+d+g+this.get("suffix")},t.setModuleUrl=function(f,l){return o.$moduleUrls[f]=l},t.$loading={},t.loadModule=function(f,l){var h,d;Array.isArray(f)&&(d=f[0],f=f[1]);try{h=e(f)}catch{}if(h&&!t.$loading[f])return l&&l(h);if(t.$loading[f]||(t.$loading[f]=[]),t.$loading[f].push(l),!(t.$loading[f].length>1)){var g=function(){e([f],function(p){t._emit("load.module",{name:f,module:p});var m=t.$loading[f];t.$loading[f]=null,m.forEach(function(w){w&&w(p)})})};if(!t.get("packaged"))return g();r.loadScript(t.moduleUrl(f,d),g)}},c(!0);function c(f){if(!(!u||!u.document)){o.packaged=f||e.packaged||n.packaged||u.define&&(void 0).packaged;for(var l={},h="",d=document.currentScript||document._currentScript,g=d&&d.ownerDocument||document,p=g.getElementsByTagName("script"),m=0;m<p.length;m++){var w=p[m],v=w.src||w.getAttribute("src");if(!!v){for(var A=w.attributes,_=0,E=A.length;_<E;_++){var b=A[_];b.name.indexOf("data-ace-")===0&&(l[a(b.name.replace(/^data-ace-/,""))]=b.value)}var x=v.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);x&&(h=x[1])}}h&&(l.base=l.base||h,l.packaged=!0),l.basePath=l.base,l.workerPath=l.workerPath||l.base,l.modePath=l.modePath||l.base,l.themePath=l.themePath||l.base,delete l.base;for(var y in l)typeof l[y]!="undefined"&&t.set(y,l[y])}}t.init=c;function a(f){return f.replace(/-(.)/g,function(l,h){return h.toUpperCase()})}});ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(e,t,n){var i=e("../lib/event"),r=e("../lib/useragent"),s=e("./default_handlers").DefaultHandlers,u=e("./default_gutter_handler").GutterHandler,o=e("./mouse_event").MouseEvent,c=e("./dragdrop_handler").DragdropHandler,a=e("../config"),f=function(l){var h=this;this.editor=l,new s(this),new u(this),new c(this);var d=function(m){var w=!document.hasFocus||!document.hasFocus()||!l.isFocused()&&document.activeElement==(l.textInput&&l.textInput.getElement());w&&window.focus(),l.focus()},g=l.renderer.getMouseEventTarget();i.addListener(g,"click",this.onMouseEvent.bind(this,"click")),i.addListener(g,"mousemove",this.onMouseMove.bind(this,"mousemove")),i.addMultiMouseDownListener([g,l.renderer.scrollBarV&&l.renderer.scrollBarV.inner,l.renderer.scrollBarH&&l.renderer.scrollBarH.inner,l.textInput&&l.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent"),i.addMouseWheelListener(l.container,this.onMouseWheel.bind(this,"mousewheel")),i.addTouchMoveListener(l.container,this.onTouchMove.bind(this,"touchmove"));var p=l.renderer.$gutter;i.addListener(p,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),i.addListener(p,"click",this.onMouseEvent.bind(this,"gutterclick")),i.addListener(p,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),i.addListener(p,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),i.addListener(g,"mousedown",d),i.addListener(p,"mousedown",d),r.isIE&&l.renderer.scrollBarV&&(i.addListener(l.renderer.scrollBarV.element,"mousedown",d),i.addListener(l.renderer.scrollBarH.element,"mousedown",d)),l.on("mousemove",function(m){if(!(h.state||h.$dragDelay||!h.$dragEnabled)){var w=l.renderer.screenToTextCoordinates(m.x,m.y),v=l.session.selection.getRange(),A=l.renderer;!v.isEmpty()&&v.insideStart(w.row,w.column)?A.setCursorStyle("default"):A.setCursorStyle("")}})};(function(){this.onMouseEvent=function(l,h){this.editor._emit(l,new o(h,this.editor))},this.onMouseMove=function(l,h){var d=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!d||!d.length||this.editor._emit(l,new o(h,this.editor))},this.onMouseWheel=function(l,h){var d=new o(h,this.editor);d.speed=this.$scrollSpeed*2,d.wheelX=h.wheelX,d.wheelY=h.wheelY,this.editor._emit(l,d)},this.onTouchMove=function(l,h){var d=new o(h,this.editor);d.speed=1,d.wheelX=h.wheelX,d.wheelY=h.wheelY,this.editor._emit(l,d)},this.setState=function(l){this.state=l},this.captureMouse=function(l,h){this.x=l.x,this.y=l.y,this.isMousePressed=!0;var d=this.editor.renderer;d.$keepTextAreaAtCursor&&(d.$keepTextAreaAtCursor=null);var g=this,p=function(A){if(!!A){if(r.isWebKit&&!A.which&&g.releaseMouse)return g.releaseMouse();g.x=A.clientX,g.y=A.clientY,h&&h(A),g.mouseEvent=new o(A,g.editor),g.$mouseMoved=!0}},m=function(A){clearInterval(v),w(),g[g.state+"End"]&&g[g.state+"End"](A),g.state="",d.$keepTextAreaAtCursor==null&&(d.$keepTextAreaAtCursor=!0,d.$moveTextAreaToCursor()),g.isMousePressed=!1,g.$onCaptureMouseMove=g.releaseMouse=null,A&&g.onMouseEvent("mouseup",A)},w=function(){g[g.state]&&g[g.state](),g.$mouseMoved=!1};if(r.isOldIE&&l.domEvent.type=="dblclick")return setTimeout(function(){m(l)});g.$onCaptureMouseMove=p,g.releaseMouse=i.capture(this.editor.container,p,m);var v=setInterval(w,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var l=function(h){h&&h.domEvent&&h.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",l),h&&h.domEvent&&i.stopEvent(h.domEvent))}.bind(this);setTimeout(l,10),this.editor.on("nativecontextmenu",l)}}).call(f.prototype),a.defineOptions(f.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:r.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=f});ace.define("ace/mouse/fold_handler",["require","exports","module"],function(e,t,n){function i(r){r.on("click",function(s){var u=s.getDocumentPosition(),o=r.session,c=o.getFoldAt(u.row,u.column,1);c&&(s.getAccelKey()?o.removeFold(c):o.expandFold(c),s.stop())}),r.on("gutterclick",function(s){var u=r.renderer.$gutterLayer.getRegion(s);if(u=="foldWidgets"){var o=s.getDocumentPosition().row,c=r.session;c.foldWidgets&&c.foldWidgets[o]&&r.session.onFoldWidgetClick(o,s),r.isFocused()||r.focus(),s.stop()}}),r.on("gutterdblclick",function(s){var u=r.renderer.$gutterLayer.getRegion(s);if(u=="foldWidgets"){var o=s.getDocumentPosition().row,c=r.session,a=c.getParentFoldRangeData(o,!0),f=a.range||a.firstRange;if(f){o=f.start.row;var l=c.getFoldAt(o,c.getLine(o).length,1);l?c.removeFold(l):(c.addFold("...",f),r.renderer.scrollCursorIntoView({row:f.start.row,column:0}))}s.stop()}})}t.FoldHandler=i});ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){var i=e("../lib/keys"),r=e("../lib/event"),s=function(u){this.$editor=u,this.$data={editor:u},this.$handlers=[],this.setDefaultHandler(u.commands)};(function(){this.setDefaultHandler=function(u){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=u,this.addKeyboardHandler(u,0)},this.setKeyboardHandler=function(u){var o=this.$handlers;if(o[o.length-1]!=u){for(;o[o.length-1]&&o[o.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(o[o.length-1]);this.addKeyboardHandler(u,1)}},this.addKeyboardHandler=function(u,o){if(!!u){typeof u=="function"&&!u.handleKeyboard&&(u.handleKeyboard=u);var c=this.$handlers.indexOf(u);c!=-1&&this.$handlers.splice(c,1),o==null?this.$handlers.push(u):this.$handlers.splice(o,0,u),c==-1&&u.attach&&u.attach(this.$editor)}},this.removeKeyboardHandler=function(u){var o=this.$handlers.indexOf(u);return o==-1?!1:(this.$handlers.splice(o,1),u.detach&&u.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var u=this.$data,o=u.editor;return this.$handlers.map(function(c){return c.getStatusText&&c.getStatusText(o,u)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(u,o,c,a){for(var f,l=!1,h=this.$editor.commands,d=this.$handlers.length;d--&&(f=this.$handlers[d].handleKeyboard(this.$data,u,o,c,a),!(!(!f||!f.command)&&(f.command=="null"?l=!0:l=h.exec(f.command,this.$editor,f.args,a),l&&a&&u!=-1&&f.passEvent!=!0&&f.command.passEvent!=!0&&r.stopEvent(a),l))););return!l&&u==-1&&(f={command:"insertstring"},l=h.exec("insertstring",this.$editor,o)),l&&this.$editor._signal&&this.$editor._signal("keyboardActivity",f),l},this.onCommandKey=function(u,o,c){var a=i.keyCodeToString(c);this.$callKeyboardHandlers(o,a,c,u)},this.onTextInput=function(u){this.$callKeyboardHandlers(-1,u)}}).call(s.prototype),t.KeyBinding=s});ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,t,n){var i=0,r=0,s=!1,u=!1,o=!1,c=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],a=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],f=0,l=1,h=0,d=1,g=2,p=3,m=4,w=5,v=6,A=7,_=8,E=9,b=10,x=11,y=12,C=13,B=14,T=15,M=16,R=17,I=18,H=[I,I,I,I,I,I,I,I,I,v,w,v,_,w,I,I,I,I,I,I,I,I,I,I,I,I,I,I,w,w,w,v,_,m,m,x,x,x,m,m,m,m,m,b,E,b,E,E,g,g,g,g,g,g,g,g,g,g,E,m,m,m,m,m,m,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,m,m,m,m,m,m,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,m,m,m,m,I,I,I,I,I,I,w,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,E,m,x,x,x,x,m,m,m,m,h,m,m,I,m,m,x,x,g,g,m,h,m,m,m,g,h,m,m,m,m,m],P=[_,_,_,_,_,_,_,_,_,_,_,I,I,I,h,d,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,_,w,C,B,T,M,R,E,x,x,x,x,x,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,E,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,_];function j(k,$,z,U){var G=i?a:c,Q=null,X=null,te=null,le=0,ye=null,ve=null,ee=-1,ce=null,he=null,je=[];if(!U)for(ce=0,U=[];ce<z;ce++)U[ce]=N(k[ce]);for(r=i,s=!1,u=!1,o=!1,he=0;he<z;he++){if(Q=le,je[he]=X=K(k,U,je,he),le=G[Q][X],ye=le&240,le&=15,$[he]=te=G[le][5],ye>0)if(ye==16){for(ce=ee;ce<he;ce++)$[ce]=1;ee=-1}else ee=-1;if(ve=G[le][6],ve)ee==-1&&(ee=he);else if(ee>-1){for(ce=ee;ce<he;ce++)$[ce]=te;ee=-1}U[he]==w&&($[he]=0),r|=te}if(o){for(ce=0;ce<z;ce++)if(U[ce]==v){$[ce]=i;for(var Ve=ce-1;Ve>=0&&U[Ve]==_;Ve--)$[Ve]=i}}}function V(k,$,z){if(!(r<k)){if(k==1&&i==l&&!u){z.reverse();return}for(var U=z.length,G=0,Q,X,te,le;G<U;){if($[G]>=k){for(Q=G+1;Q<U&&$[Q]>=k;)Q++;for(X=G,te=Q-1;X<te;X++,te--)le=z[X],z[X]=z[te],z[te]=le;G=Q}G++}}}function K(k,$,z,U){var G=$[U],Q,X,te,le;switch(G){case h:case d:s=!1;case m:case p:return G;case g:return s?p:g;case A:return s=!0,d;case _:return m;case E:return U<1||U+1>=$.length||(Q=z[U-1])!=g&&Q!=p||(X=$[U+1])!=g&&X!=p?m:(s&&(X=p),X==Q?X:m);case b:return Q=U>0?z[U-1]:w,Q==g&&U+1<$.length&&$[U+1]==g?g:m;case x:if(U>0&&z[U-1]==g)return g;if(s)return m;for(le=U+1,te=$.length;le<te&&$[le]==x;)le++;return le<te&&$[le]==g?g:m;case y:for(te=$.length,le=U+1;le<te&&$[le]==y;)le++;if(le<te){var ye=k[U],ve=ye>=1425&&ye<=2303||ye==64286;if(Q=$[le],ve&&(Q==d||Q==A))return d}return U<1||(Q=$[U-1])==w?m:z[U-1];case w:return s=!1,u=!0,i;case v:return o=!0,m;case C:case B:case M:case R:case T:s=!1;case I:return m}}function N(k){var $=k.charCodeAt(0),z=$>>8;return z==0?$>191?h:H[$]:z==5?/[\u0591-\u05f4]/.test(k)?d:h:z==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(k)?y:/[\u0660-\u0669\u066b-\u066c]/.test(k)?p:$==1642?x:/[\u06f0-\u06f9]/.test(k)?g:A:z==32&&$<=8287?P[$&255]:z==254&&$>=65136?A:m}t.L=h,t.R=d,t.EN=g,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.DOT="\xB7",t.doBidiReorder=function(k,$,z){if(k.length<2)return{};var U=k.split(""),G=new Array(U.length),Q=new Array(U.length),X=[];i=z?l:f,j(U,X,U.length,$);for(var te=0;te<G.length;G[te]=te,te++);V(2,X,G),V(1,X,G);for(var te=0;te<G.length-1;te++)$[te]===p?X[te]=t.AN:X[te]===d&&($[te]>A&&$[te]<C||$[te]===m||$[te]===I)?X[te]=t.ON_R:te>0&&U[te-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(U[te])&&(X[te-1]=X[te]=t.R_H,te++);U[U.length-1]===t.DOT&&(X[U.length-1]=t.B);for(var te=0;te<G.length;te++)Q[te]=X[G[te]];return{logicalFromVisual:G,bidiLevels:Q}},t.hasBidiCharacters=function(k,$){for(var z=!1,U=0;U<k.length;U++)$[U]=N(k.charAt(U)),!z&&($[U]==d||$[U]==A)&&(z=!0);return z},t.getVisualFromLogicalIdx=function(k,$){for(var z=0;z<$.logicalFromVisual.length;z++)if($.logicalFromVisual[z]==k)return z;return 0}});ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang","ace/lib/useragent"],function(e,t,n){var i=e("./lib/bidiutil"),r=e("./lib/lang"),s=e("./lib/useragent"),u=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=function(c){this.session=c,this.bidiMap={},this.currentRow=null,this.bidiUtil=i,this.charWidths=[],this.EOL="\xAC",this.showInvisibles=!0,this.isRtlDir=!1,this.line="",this.wrapIndent=0,this.isLastRow=!1,this.EOF="\xB6",this.seenBidi=!1};(function(){this.isBidiRow=function(c,a,f){return this.seenBidi?(c!==this.currentRow&&(this.currentRow=c,this.updateRowLine(a,f),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},this.onChange=function(c){this.seenBidi?this.currentRow=null:c.action=="insert"&&u.test(c.lines.join(`
|
|
`))&&(this.seenBidi=!0,this.currentRow=null)},this.getDocumentRow=function(){var c=0,a=this.session.$screenRowCache;if(a.length){var f=this.session.$getRowCacheIndex(a,this.currentRow);f>=0&&(c=this.session.$docRowCache[f])}return c},this.getSplitIndex=function(){var c=0,a=this.session.$screenRowCache;if(a.length)for(var f,l=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-c>0&&(f=this.session.$getRowCacheIndex(a,this.currentRow-c-1),f===l);)l=f,c++;return c},this.updateRowLine=function(c,a){if(c===void 0&&(c=this.getDocumentRow()),this.wrapIndent=0,this.isLastRow=c===this.session.getLength()-1,this.line=this.session.getLine(c),this.session.$useWrapMode){var f=this.session.$wrapData[c];f&&(a===void 0&&(a=this.getSplitIndex()),a>0&&f.length?(this.wrapIndent=f.indent,this.line=a<f.length?this.line.substring(f[a-1],f[f.length-1]):this.line.substring(f[f.length-1])):this.line=this.line.substring(0,f[a]))}var l=this.session,h=0,d;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(g,p){return g===" "||l.isFullWidth(g.charCodeAt(0))?(d=g===" "?l.getScreenTabSize(p+h):2,h+=d-1,r.stringRepeat(i.DOT,d)):g})},this.updateBidiMap=function(){var c=[],a=this.isLastRow?this.EOF:this.EOL,f=this.line+(this.showInvisibles?a:i.DOT);i.hasBidiCharacters(f,c)?this.bidiMap=i.doBidiReorder(f,c,this.isRtlDir):this.bidiMap={}},this.markAsDirty=function(){this.currentRow=null},this.updateCharacterWidths=function(c){if(!!this.seenBidi&&this.characterWidth!==c.$characterSize.width){var a=this.characterWidth=c.$characterSize.width,f=c.$measureCharWidth("\u05D4");this.charWidths[i.L]=this.charWidths[i.EN]=this.charWidths[i.ON_R]=a,this.charWidths[i.R]=this.charWidths[i.AN]=f,this.charWidths[i.R_H]=s.isChrome?f:f*.45,this.charWidths[i.B]=0,this.currentRow=null}},this.getShowInvisibles=function(){return this.showInvisibles},this.setShowInvisibles=function(c){this.showInvisibles=c,this.currentRow=null},this.setEolChar=function(c){this.EOL=c},this.setTextDir=function(c){this.isRtlDir=c},this.getPosLeft=function(c){c-=this.wrapIndent;var a=i.getVisualFromLogicalIdx(c>0?c-1:0,this.bidiMap),f=this.bidiMap.bidiLevels,l=0;c===0&&f[a]%2!==0&&a++;for(var h=0;h<a;h++)l+=this.charWidths[f[h]];return c!==0&&f[a]%2===0&&(l+=this.charWidths[f[a]]),this.wrapIndent&&(l+=this.wrapIndent*this.charWidths[i.L]),l},this.getSelections=function(c,a){for(var f=this.bidiMap,l=f.bidiLevels,h,d=this.wrapIndent*this.charWidths[i.L],g=[],p=Math.min(c,a)-this.wrapIndent,m=Math.max(c,a)-this.wrapIndent,w=!1,v=!1,A=0,_,E=0;E<l.length;E++)_=f.logicalFromVisual[E],h=l[E],w=_>=p&&_<m,w&&!v?A=d:!w&&v&&g.push({left:A,width:d-A}),d+=this.charWidths[h],v=w;return w&&E===l.length&&g.push({left:A,width:d-A}),g},this.offsetToCol=function(f){var a=0,f=Math.max(f,0),l=0,h=0,d=this.bidiMap.bidiLevels,g=this.charWidths[d[h]];for(this.wrapIndent&&(f-=this.wrapIndent*this.charWidths[i.L]);f>l+g/2;){if(l+=g,h===d.length-1){g=0;break}g=this.charWidths[d[++h]]}return h>0&&d[h-1]%2!==0&&d[h]%2===0?(f<l&&h--,a=this.bidiMap.logicalFromVisual[h]):h>0&&d[h-1]%2===0&&d[h]%2!==0?a=1+(f>l?this.bidiMap.logicalFromVisual[h]:this.bidiMap.logicalFromVisual[h-1]):this.isRtlDir&&h===d.length-1&&g===0&&d[h-1]%2===0||!this.isRtlDir&&h===0&&d[h]%2!==0?a=1+this.bidiMap.logicalFromVisual[h]:(h>0&&d[h-1]%2!==0&&g!==0&&h--,a=this.bidiMap.logicalFromVisual[h]),a+this.wrapIndent}}).call(o.prototype),t.BidiHandler=o});ace.define("ace/range",["require","exports","module"],function(e,t,n){var i=function(s,u){return s.row-u.row||s.column-u.column},r=function(s,u,o,c){this.start={row:s,column:u},this.end={row:o,column:c}};(function(){this.isEqual=function(s){return this.start.row===s.start.row&&this.end.row===s.end.row&&this.start.column===s.start.column&&this.end.column===s.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(s,u){return this.compare(s,u)==0},this.compareRange=function(s){var u,o=s.end,c=s.start;return u=this.compare(o.row,o.column),u==1?(u=this.compare(c.row,c.column),u==1?2:u==0?1:0):u==-1?-2:(u=this.compare(c.row,c.column),u==-1?-1:u==1?42:0)},this.comparePoint=function(s){return this.compare(s.row,s.column)},this.containsRange=function(s){return this.comparePoint(s.start)==0&&this.comparePoint(s.end)==0},this.intersects=function(s){var u=this.compareRange(s);return u==-1||u==0||u==1},this.isEnd=function(s,u){return this.end.row==s&&this.end.column==u},this.isStart=function(s,u){return this.start.row==s&&this.start.column==u},this.setStart=function(s,u){typeof s=="object"?(this.start.column=s.column,this.start.row=s.row):(this.start.row=s,this.start.column=u)},this.setEnd=function(s,u){typeof s=="object"?(this.end.column=s.column,this.end.row=s.row):(this.end.row=s,this.end.column=u)},this.inside=function(s,u){return this.compare(s,u)==0?!(this.isEnd(s,u)||this.isStart(s,u)):!1},this.insideStart=function(s,u){return this.compare(s,u)==0?!this.isEnd(s,u):!1},this.insideEnd=function(s,u){return this.compare(s,u)==0?!this.isStart(s,u):!1},this.compare=function(s,u){return!this.isMultiLine()&&s===this.start.row?u<this.start.column?-1:u>this.end.column?1:0:s<this.start.row?-1:s>this.end.row?1:this.start.row===s?u>=this.start.column?0:-1:this.end.row===s?u<=this.end.column?0:1:0},this.compareStart=function(s,u){return this.start.row==s&&this.start.column==u?-1:this.compare(s,u)},this.compareEnd=function(s,u){return this.end.row==s&&this.end.column==u?1:this.compare(s,u)},this.compareInside=function(s,u){return this.end.row==s&&this.end.column==u?1:this.start.row==s&&this.start.column==u?-1:this.compare(s,u)},this.clipRows=function(s,u){if(this.end.row>u)var o={row:u+1,column:0};else if(this.end.row<s)var o={row:s,column:0};if(this.start.row>u)var c={row:u+1,column:0};else if(this.start.row<s)var c={row:s,column:0};return r.fromPoints(c||this.start,o||this.end)},this.extend=function(s,u){var o=this.compare(s,u);if(o==0)return this;if(o==-1)var c={row:s,column:u};else var a={row:s,column:u};return r.fromPoints(c||this.start,a||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return r.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new r(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new r(this.start.row,0,this.end.row,0)},this.toScreenRange=function(s){var u=s.documentToScreenPosition(this.start),o=s.documentToScreenPosition(this.end);return new r(u.row,u.column,o.row,o.column)},this.moveBy=function(s,u){this.start.row+=s,this.start.column+=u,this.end.row+=s,this.end.column+=u}}).call(r.prototype),r.fromPoints=function(s,u){return new r(s.row,s.column,u.row,u.column)},r.comparePoints=i,r.comparePoints=function(s,u){return s.row-u.row||s.column-u.column},t.Range=r});ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,n){var i=e("./lib/oop"),r=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,u=e("./range").Range,o=function(c){this.session=c,this.doc=c.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var a=this;this.lead.on("change",function(f){a._emit("changeCursor"),a.$isEmpty||a._emit("changeSelection"),!a.$keepDesiredColumnOnChange&&f.old.column!=f.value.column&&(a.$desiredColumn=null)}),this.selectionAnchor.on("change",function(){a.$isEmpty||a._emit("changeSelection")})};(function(){i.implement(this,s),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return this.isEmpty()?!1:this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(c,a){this.anchor.setPosition(c,a),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(c){if(this.$isEmpty){this.moveCursorTo(this.lead.row,this.lead.column+c);return}var a=this.getSelectionAnchor(),f=this.getSelectionLead(),l=this.isBackwards();(!l||a.column!==0)&&this.setSelectionAnchor(a.row,a.column+c),(l||f.column!==0)&&this.$moveSelection(function(){this.moveCursorTo(f.row,f.column+c)})},this.isBackwards=function(){var c=this.anchor,a=this.lead;return c.row>a.row||c.row==a.row&&c.column>a.column},this.getRange=function(){var c=this.anchor,a=this.lead;return this.isEmpty()?u.fromPoints(a,a):this.isBackwards()?u.fromPoints(a,c):u.fromPoints(c,a)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var c=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(c,this.doc.getLine(c).length)},this.setRange=this.setSelectionRange=function(c,a){a?(this.setSelectionAnchor(c.end.row,c.end.column),this.selectTo(c.start.row,c.start.column)):(this.setSelectionAnchor(c.start.row,c.start.column),this.selectTo(c.end.row,c.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(c){var a=this.lead;this.$isEmpty&&this.setSelectionAnchor(a.row,a.column),c.call(this)},this.selectTo=function(c,a){this.$moveSelection(function(){this.moveCursorTo(c,a)})},this.selectToPosition=function(c){this.$moveSelection(function(){this.moveCursorToPosition(c)})},this.moveTo=function(c,a){this.clearSelection(),this.moveCursorTo(c,a)},this.moveToPosition=function(c){this.clearSelection(),this.moveCursorToPosition(c)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(c,a){if(typeof a=="undefined"){var f=c||this.lead;c=f.row,a=f.column}return this.session.getWordRange(c,a)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var c=this.getCursor(),a=this.session.getAWordRange(c.row,c.column);this.setSelectionRange(a)},this.getLineRange=function(c,a){var f=typeof c=="number"?c:this.lead.row,l,h=this.session.getFoldLine(f);return h?(f=h.start.row,l=h.end.row):l=f,a===!0?new u(f,0,l,this.session.getLine(l).length):new u(f,0,l+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(c,a,f){var l=c.column,h=c.column+a;return f<0&&(l=c.column-a,h=c.column),this.session.isTabStop(c)&&this.doc.getLine(c.row).slice(l,h).split(" ").length-1==a},this.moveCursorLeft=function(){var c=this.lead.getPosition(),a;if(a=this.session.getFoldAt(c.row,c.column,-1))this.moveCursorTo(a.start.row,a.start.column);else if(c.column===0)c.row>0&&this.moveCursorTo(c.row-1,this.doc.getLine(c.row-1).length);else{var f=this.session.getTabSize();this.wouldMoveIntoSoftTab(c,f,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-f):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var c=this.lead.getPosition(),a;if(a=this.session.getFoldAt(c.row,c.column,1))this.moveCursorTo(a.end.row,a.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var f=this.session.getTabSize(),c=this.lead;this.wouldMoveIntoSoftTab(c,f,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,f):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var c=this.lead.row,a=this.lead.column,f=this.session.documentToScreenRow(c,a),l=this.session.screenToDocumentPosition(f,0),h=this.session.getDisplayLine(c,null,l.row,l.column),d=h.match(/^\s*/);d[0].length!=a&&!this.session.$useEmacsStyleLineStart&&(l.column+=d[0].length),this.moveCursorToPosition(l)},this.moveCursorLineEnd=function(){var c=this.lead,a=this.session.getDocumentLastRowColumnPosition(c.row,c.column);if(this.lead.column==a.column){var f=this.session.getLine(a.row);if(a.column==f.length){var l=f.search(/\s+$/);l>0&&(a.column=l)}}this.moveCursorTo(a.row,a.column)},this.moveCursorFileEnd=function(){var c=this.doc.getLength()-1,a=this.doc.getLine(c).length;this.moveCursorTo(c,a)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var c=this.lead.row,a=this.lead.column,f=this.doc.getLine(c),l=f.substring(a);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var h=this.session.getFoldAt(c,a,1);if(h){this.moveCursorTo(h.end.row,h.end.column);return}if(this.session.nonTokenRe.exec(l)&&(a+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,l=f.substring(a)),a>=f.length){this.moveCursorTo(c,f.length),this.moveCursorRight(),c<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(l)&&(a+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(c,a)},this.moveCursorLongWordLeft=function(){var c=this.lead.row,a=this.lead.column,f;if(f=this.session.getFoldAt(c,a,-1)){this.moveCursorTo(f.start.row,f.start.column);return}var l=this.session.getFoldStringAt(c,a,-1);l==null&&(l=this.doc.getLine(c).substring(0,a));var h=r.stringReverse(l);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(h)&&(a-=this.session.nonTokenRe.lastIndex,h=h.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),a<=0){this.moveCursorTo(c,0),this.moveCursorLeft(),c>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(h)&&(a-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(c,a)},this.$shortWordEndIndex=function(c){var a=0,f,l=/\s/,h=this.session.tokenRe;if(h.lastIndex=0,this.session.tokenRe.exec(c))a=this.session.tokenRe.lastIndex;else{for(;(f=c[a])&&l.test(f);)a++;if(a<1){for(h.lastIndex=0;(f=c[a])&&!h.test(f);)if(h.lastIndex=0,a++,l.test(f))if(a>2){a--;break}else{for(;(f=c[a])&&l.test(f);)a++;if(a>2)break}}}return h.lastIndex=0,a},this.moveCursorShortWordRight=function(){var c=this.lead.row,a=this.lead.column,f=this.doc.getLine(c),l=f.substring(a),h=this.session.getFoldAt(c,a,1);if(h)return this.moveCursorTo(h.end.row,h.end.column);if(a==f.length){var d=this.doc.getLength();do c++,l=this.doc.getLine(c);while(c<d&&/^\s*$/.test(l));/^\s+/.test(l)||(l=""),a=0}var g=this.$shortWordEndIndex(l);this.moveCursorTo(c,a+g)},this.moveCursorShortWordLeft=function(){var c=this.lead.row,a=this.lead.column,f;if(f=this.session.getFoldAt(c,a,-1))return this.moveCursorTo(f.start.row,f.start.column);var l=this.session.getLine(c).substring(0,a);if(a===0){do c--,l=this.doc.getLine(c);while(c>0&&/^\s*$/.test(l));a=l.length,/\s+$/.test(l)||(l="")}var h=r.stringReverse(l),d=this.$shortWordEndIndex(h);return this.moveCursorTo(c,a-d)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(c,a){var f=this.session.documentToScreenPosition(this.lead.row,this.lead.column),l;a===0&&(c!==0&&(this.session.$bidiHandler.isBidiRow(f.row,this.lead.row)?(l=this.session.$bidiHandler.getPosLeft(f.column),f.column=Math.round(l/this.session.$bidiHandler.charWidths[0])):l=f.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?f.column=this.$desiredColumn:this.$desiredColumn=f.column);var h=this.session.screenToDocumentPosition(f.row+c,f.column,l);c!==0&&a===0&&h.row===this.lead.row&&h.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[h.row]&&(h.row>0||c>0)&&h.row++,this.moveCursorTo(h.row,h.column+a,a===0)},this.moveCursorToPosition=function(c){this.moveCursorTo(c.row,c.column)},this.moveCursorTo=function(c,a,f){var l=this.session.getFoldAt(c,a,1);l&&(c=l.start.row,a=l.start.column),this.$keepDesiredColumnOnChange=!0;var h=this.session.getLine(c);/[\uDC00-\uDFFF]/.test(h.charAt(a))&&h.charAt(a-1)&&(this.lead.row==c&&this.lead.column==a+1?a=a-1:a=a+1),this.lead.setPosition(c,a),this.$keepDesiredColumnOnChange=!1,f||(this.$desiredColumn=null)},this.moveCursorToScreen=function(c,a,f){var l=this.session.screenToDocumentPosition(c,a);this.moveCursorTo(l.row,l.column,f)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(c){this.setSelectionRange(c,c.cursor==c.start),this.$desiredColumn=c.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(c){var a=this.getRange();return c?(c.start.column=a.start.column,c.start.row=a.start.row,c.end.column=a.end.column,c.end.row=a.end.row):c=a,c.cursor=this.isBackwards()?c.start:c.end,c.desiredColumn=this.$desiredColumn,c},this.getRangeOfMovements=function(c){var a=this.getCursor();try{c(this);var f=this.getCursor();return u.fromPoints(a,f)}catch{return u.fromPoints(a,a)}finally{this.moveCursorToPosition(a)}},this.toJSON=function(){if(this.rangeCount)var c=this.ranges.map(function(a){var f=a.clone();return f.isBackwards=a.cursor==a.start,f});else{var c=this.getRange();c.isBackwards=this.isBackwards()}return c},this.fromJSON=function(c){if(c.start==null)if(this.rangeList){this.toSingleRange(c[0]);for(var a=c.length;a--;){var f=u.fromPoints(c[a].start,c[a].end);c[a].isBackwards&&(f.cursor=f.start),this.addRange(f,!0)}return}else c=c[0];this.rangeList&&this.toSingleRange(c),this.setSelectionRange(c,c.isBackwards)},this.isEqual=function(c){if((c.length||this.rangeCount)&&c.length!=this.rangeCount)return!1;if(!c.length||!this.ranges)return this.getRange().isEqual(c);for(var a=this.ranges.length;a--;)if(!this.ranges[a].isEqual(c[a]))return!1;return!0}}).call(o.prototype),t.Selection=o});ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t,n){var i=e("./config"),r=2e3,s=function(u){this.states=u,this.regExps={},this.matchMappings={};for(var o in this.states){for(var c=this.states[o],a=[],f=0,l=this.matchMappings[o]={defaultToken:"text"},h="g",d=[],g=0;g<c.length;g++){var p=c[g];if(p.defaultToken&&(l.defaultToken=p.defaultToken),p.caseInsensitive&&(h="gi"),p.regex!=null){p.regex instanceof RegExp&&(p.regex=p.regex.toString().slice(1,-1));var m=p.regex,w=new RegExp("(?:("+m+")|(.))").exec("a").length-2;Array.isArray(p.token)?p.token.length==1||w==1?p.token=p.token[0]:w-1!=p.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:p,groupCount:w-1}),p.token=p.token[0]):(p.tokenArray=p.token,p.token=null,p.onMatch=this.$arrayTokens):typeof p.token=="function"&&!p.onMatch&&(w>1?p.onMatch=this.$applyToken:p.onMatch=p.token),w>1&&(/\\\d/.test(p.regex)?m=p.regex.replace(/\\([0-9]+)/g,function(v,A){return"\\"+(parseInt(A,10)+f+1)}):(w=1,m=this.removeCapturingGroups(p.regex)),!p.splitRegex&&typeof p.token!="string"&&d.push(p)),l[f]=g,f+=w,a.push(m),p.onMatch||(p.onMatch=null)}}a.length||(l[0]=0,a.push("$")),d.forEach(function(v){v.splitRegex=this.createSplitterRegexp(v.regex,h)},this),this.regExps[o]=new RegExp("("+a.join(")|(")+")|($)",h)}};(function(){this.$setMaxTokenCount=function(u){r=u|0},this.$applyToken=function(u){var o=this.splitRegex.exec(u).slice(1),c=this.token.apply(this,o);if(typeof c=="string")return[{type:c,value:u}];for(var a=[],f=0,l=c.length;f<l;f++)o[f]&&(a[a.length]={type:c[f],value:o[f]});return a},this.$arrayTokens=function(u){if(!u)return[];var o=this.splitRegex.exec(u);if(!o)return"text";for(var c=[],a=this.tokenArray,f=0,l=a.length;f<l;f++)o[f+1]&&(c[c.length]={type:a[f],value:o[f+1]});return c},this.removeCapturingGroups=function(u){var o=u.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(c,a){return a?"(?:":c});return o},this.createSplitterRegexp=function(u,o){if(u.indexOf("(?=")!=-1){var c=0,a=!1,f={};u.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(l,h,d,g,p,m){return a?a=p!="]":p?a=!0:g?(c==f.stack&&(f.end=m+1,f.stack=-1),c--):d&&(c++,d.length!=1&&(f.stack=c,f.start=m)),l}),f.end!=null&&/^\)*$/.test(u.substr(f.end))&&(u=u.substring(0,f.start)+u.substr(f.end))}return u.charAt(0)!="^"&&(u="^"+u),u.charAt(u.length-1)!="$"&&(u+="$"),new RegExp(u,(o||"").replace("g",""))},this.getLineTokens=function(u,o){if(o&&typeof o!="string"){var c=o.slice(0);o=c[0],o==="#tmp"&&(c.shift(),o=c.shift())}else var c=[];var a=o||"start",f=this.states[a];f||(a="start",f=this.states[a]);var l=this.matchMappings[a],h=this.regExps[a];h.lastIndex=0;for(var d,g=[],p=0,m=0,w={type:null,value:""};d=h.exec(u);){var v=l.defaultToken,A=null,_=d[0],E=h.lastIndex;if(E-_.length>p){var b=u.substring(p,E-_.length);w.type==v?w.value+=b:(w.type&&g.push(w),w={type:v,value:b})}for(var x=0;x<d.length-2;x++)if(d[x+1]!==void 0){A=f[l[x]],A.onMatch?v=A.onMatch(_,a,c,u):v=A.token,A.next&&(typeof A.next=="string"?a=A.next:a=A.next(a,c),f=this.states[a],f||(this.reportError("state doesn't exist",a),a="start",f=this.states[a]),l=this.matchMappings[a],p=E,h=this.regExps[a],h.lastIndex=E),A.consumeLineEnd&&(p=E);break}if(_){if(typeof v=="string")(!A||A.merge!==!1)&&w.type===v?w.value+=_:(w.type&&g.push(w),w={type:v,value:_});else if(v){w.type&&g.push(w),w={type:null,value:""};for(var x=0;x<v.length;x++)g.push(v[x])}}if(p==u.length)break;if(p=E,m++>r){for(m>2*u.length&&this.reportError("infinite loop with in ace tokenizer",{startState:o,line:u});p<u.length;)w.type&&g.push(w),w={value:u.substring(p,p+=2e3),type:"overflow"};a="start",c=[];break}}return w.type&&g.push(w),c.length>1&&c[0]!==a&&c.unshift("#tmp",a),{tokens:g,state:c.length?c:a}},this.reportError=i.reportError}).call(s.prototype),t.Tokenizer=s});ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,n){var i=e("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(o,c){if(!c){for(var a in o)this.$rules[a]=o[a];return}for(var a in o){for(var f=o[a],l=0;l<f.length;l++){var h=f[l];(h.next||h.onMatch)&&(typeof h.next=="string"&&h.next.indexOf(c)!==0&&(h.next=c+h.next),h.nextState&&h.nextState.indexOf(c)!==0&&(h.nextState=c+h.nextState))}this.$rules[c+a]=f}},this.getRules=function(){return this.$rules},this.embedRules=function(o,c,a,f,l){var h=typeof o=="function"?new o().getRules():o;if(f)for(var d=0;d<f.length;d++)f[d]=c+f[d];else{f=[];for(var g in h)f.push(c+g)}if(this.addRules(h,c),a)for(var p=Array.prototype[l?"push":"unshift"],d=0;d<f.length;d++)p.apply(this.$rules[f[d]],i.deepCopy(a));this.$embeds||(this.$embeds=[]),this.$embeds.push(c)},this.getEmbeds=function(){return this.$embeds};var s=function(o,c){return(o!="start"||c.length)&&c.unshift(this.nextState,o),this.nextState},u=function(o,c){return c.shift(),c.shift()||"start"};this.normalizeRules=function(){var o=0,c=this.$rules;function a(f){var l=c[f];l.processed=!0;for(var h=0;h<l.length;h++){var d=l[h],g=null;Array.isArray(d)&&(g=d,d={}),!d.regex&&d.start&&(d.regex=d.start,d.next||(d.next=[]),d.next.push({defaultToken:d.token},{token:d.token+".end",regex:d.end||d.start,next:"pop"}),d.token=d.token+".start",d.push=!0);var p=d.next||d.push;if(p&&Array.isArray(p)){var m=d.stateName;m||(m=d.token,typeof m!="string"&&(m=m[0]||""),c[m]&&(m+=o++)),c[m]=p,d.next=m,a(m)}else p=="pop"&&(d.next=u);if(d.push&&(d.nextState=d.next||d.push,d.next=s,delete d.push),d.rules)for(var w in d.rules)c[w]?c[w].push&&c[w].push.apply(c[w],d.rules[w]):c[w]=d.rules[w];var v=typeof d=="string"?d:d.include;if(v&&(Array.isArray(v)?g=v.map(function(_){return c[_]}):g=c[v]),g){var A=[h,1].concat(g);d.noEscape&&(A=A.filter(function(_){return!_.next})),l.splice.apply(l,A),h--}d.keywordMap&&(d.token=this.createKeywordMapper(d.keywordMap,d.defaultToken||"text",d.caseInsensitive),delete d.defaultToken)}}Object.keys(c).forEach(a,this)},this.createKeywordMapper=function(o,c,a,f){var l=Object.create(null);return Object.keys(o).forEach(function(h){var d=o[h];a&&(d=d.toLowerCase());for(var g=d.split(f||"|"),p=g.length;p--;)l[g[p]]=h}),Object.getPrototypeOf(l)&&(l.__proto__=null),this.$keywordList=Object.keys(l),o=null,a?function(h){return l[h.toLowerCase()]||c}:function(h){return l[h]||c}},this.getKeywords=function(){return this.$keywords}}).call(r.prototype),t.TextHighlightRules=r});ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,n){var i=function(){this.$behaviours={}};(function(){this.add=function(r,s,u){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[r]:this.$behaviours[r]={}}this.$behaviours[r][s]=u},this.addBehaviours=function(r){for(var s in r)for(var u in r[s])this.add(s,u,r[s][u])},this.remove=function(r){this.$behaviours&&this.$behaviours[r]&&delete this.$behaviours[r]},this.inherit=function(r,s){if(typeof r=="function")var u=new r().getBehaviours(s);else var u=r.getBehaviours(s);this.addBehaviours(u)},this.getBehaviours=function(r){if(r){for(var s={},u=0;u<r.length;u++)this.$behaviours[r[u]]&&(s[r[u]]=this.$behaviours[r[u]]);return s}else return this.$behaviours}}).call(i.prototype),t.Behaviour=i});ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,t,n){var i=e("./range").Range,r=function(s,u,o){this.$session=s,this.$row=u,this.$rowTokens=s.getTokens(u);var c=s.getTokenAt(u,o);this.$tokenIndex=c?c.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){this.$tokenIndex+=1;for(var s;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,s||(s=this.$session.getLength()),this.$row>=s)return this.$row=s-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var s=this.$rowTokens,u=this.$tokenIndex,o=s[u].start;if(o!==void 0)return o;for(o=0;u>0;)u-=1,o+=s[u].value.length;return o},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var s=this.$rowTokens[this.$tokenIndex],u=this.getCurrentTokenColumn();return new i(this.$row,u,this.$row,u+s.value.length)}}).call(r.prototype),t.TokenIterator=r});ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){var i=e("../../lib/oop"),r=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=e("../../lib/lang"),o=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],a,f={},l={'"':'"',"'":"'"},h=function(p){var m=-1;if(p.multiSelect&&(m=p.selection.index,f.rangeCount!=p.multiSelect.rangeCount&&(f={rangeCount:p.multiSelect.rangeCount})),f[m])return a=f[m];a=f[m]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},d=function(p,m,w,v){var A=p.end.row-p.start.row;return{text:w+m+v,selection:[0,p.start.column+1,A,p.end.column+(A?0:1)]}},g=function(p){this.add("braces","insertion",function(m,w,v,A,_){var E=v.getCursorPosition(),b=A.doc.getLine(E.row);if(_=="{"){h(v);var x=v.getSelectionRange(),y=A.doc.getTextRange(x);if(y!==""&&y!=="{"&&v.getWrapBehavioursEnabled())return d(x,y,"{","}");if(g.isSaneInsertion(v,A))return/[\]\}\)]/.test(b[E.column])||v.inMultiSelectMode||p&&p.braces?(g.recordAutoInsert(v,A,"}"),{text:"{}",selection:[1,1]}):(g.recordMaybeInsert(v,A,"{"),{text:"{",selection:[1,1]})}else if(_=="}"){h(v);var C=b.substring(E.column,E.column+1);if(C=="}"){var B=A.$findOpeningBracket("}",{column:E.column+1,row:E.row});if(B!==null&&g.isAutoInsertedClosing(E,b,_))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(_==`
|
|
`||_==`\r
|
|
`){h(v);var T="";g.isMaybeInsertedClosing(E,b)&&(T=u.stringRepeat("}",a.maybeInsertedBrackets),g.clearMaybeInsertedClosing());var C=b.substring(E.column,E.column+1);if(C==="}"){var M=A.findMatchingBracket({row:E.row,column:E.column+1},"}");if(!M)return null;var R=this.$getIndent(A.getLine(M.row))}else if(T)var R=this.$getIndent(b);else{g.clearMaybeInsertedClosing();return}var I=R+A.getTabString();return{text:`
|
|
`+I+`
|
|
`+R+T,selection:[1,I.length,1,I.length]}}else g.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(m,w,v,A,_){var E=A.doc.getTextRange(_);if(!_.isMultiLine()&&E=="{"){h(v);var b=A.doc.getLine(_.start.row),x=b.substring(_.end.column,_.end.column+1);if(x=="}")return _.end.column++,_;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(m,w,v,A,_){if(_=="("){h(v);var E=v.getSelectionRange(),b=A.doc.getTextRange(E);if(b!==""&&v.getWrapBehavioursEnabled())return d(E,b,"(",")");if(g.isSaneInsertion(v,A))return g.recordAutoInsert(v,A,")"),{text:"()",selection:[1,1]}}else if(_==")"){h(v);var x=v.getCursorPosition(),y=A.doc.getLine(x.row),C=y.substring(x.column,x.column+1);if(C==")"){var B=A.$findOpeningBracket(")",{column:x.column+1,row:x.row});if(B!==null&&g.isAutoInsertedClosing(x,y,_))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(m,w,v,A,_){var E=A.doc.getTextRange(_);if(!_.isMultiLine()&&E=="("){h(v);var b=A.doc.getLine(_.start.row),x=b.substring(_.start.column+1,_.start.column+2);if(x==")")return _.end.column++,_}}),this.add("brackets","insertion",function(m,w,v,A,_){if(_=="["){h(v);var E=v.getSelectionRange(),b=A.doc.getTextRange(E);if(b!==""&&v.getWrapBehavioursEnabled())return d(E,b,"[","]");if(g.isSaneInsertion(v,A))return g.recordAutoInsert(v,A,"]"),{text:"[]",selection:[1,1]}}else if(_=="]"){h(v);var x=v.getCursorPosition(),y=A.doc.getLine(x.row),C=y.substring(x.column,x.column+1);if(C=="]"){var B=A.$findOpeningBracket("]",{column:x.column+1,row:x.row});if(B!==null&&g.isAutoInsertedClosing(x,y,_))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(m,w,v,A,_){var E=A.doc.getTextRange(_);if(!_.isMultiLine()&&E=="["){h(v);var b=A.doc.getLine(_.start.row),x=b.substring(_.start.column+1,_.start.column+2);if(x=="]")return _.end.column++,_}}),this.add("string_dquotes","insertion",function(m,w,v,A,_){var E=A.$mode.$quotes||l;if(_.length==1&&E[_]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(_)!=-1)return;h(v);var b=_,x=v.getSelectionRange(),y=A.doc.getTextRange(x);if(y!==""&&(y.length!=1||!E[y])&&v.getWrapBehavioursEnabled())return d(x,y,b,b);if(!y){var C=v.getCursorPosition(),B=A.doc.getLine(C.row),T=B.substring(C.column-1,C.column),M=B.substring(C.column,C.column+1),R=A.getTokenAt(C.row,C.column),I=A.getTokenAt(C.row,C.column+1);if(T=="\\"&&R&&/escape/.test(R.type))return null;var H=R&&/string|escape/.test(R.type),P=!I||/string|escape/.test(I.type),j;if(M==b)j=H!==P,j&&/string\.end/.test(I.type)&&(j=!1);else{if(H&&!P||H&&P)return null;var V=A.$mode.tokenRe;V.lastIndex=0;var K=V.test(T);V.lastIndex=0;var N=V.test(T);if(K||N||M&&!/[\s;,.})\]\\]/.test(M))return null;j=!0}return{text:j?b+b:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(m,w,v,A,_){var E=A.doc.getTextRange(_);if(!_.isMultiLine()&&(E=='"'||E=="'")){h(v);var b=A.doc.getLine(_.start.row),x=b.substring(_.start.column+1,_.start.column+2);if(x==E)return _.end.column++,_}})};g.isSaneInsertion=function(p,m){var w=p.getCursorPosition(),v=new s(m,w.row,w.column);if(!this.$matchTokenType(v.getCurrentToken()||"text",o)){var A=new s(m,w.row,w.column+1);if(!this.$matchTokenType(A.getCurrentToken()||"text",o))return!1}return v.stepForward(),v.getCurrentTokenRow()!==w.row||this.$matchTokenType(v.getCurrentToken()||"text",c)},g.$matchTokenType=function(p,m){return m.indexOf(p.type||p)>-1},g.recordAutoInsert=function(p,m,w){var v=p.getCursorPosition(),A=m.doc.getLine(v.row);this.isAutoInsertedClosing(v,A,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=v.row,a.autoInsertedLineEnd=w+A.substr(v.column),a.autoInsertedBrackets++},g.recordMaybeInsert=function(p,m,w){var v=p.getCursorPosition(),A=m.doc.getLine(v.row);this.isMaybeInsertedClosing(v,A)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=v.row,a.maybeInsertedLineStart=A.substr(0,v.column)+w,a.maybeInsertedLineEnd=A.substr(v.column),a.maybeInsertedBrackets++},g.isAutoInsertedClosing=function(p,m,w){return a.autoInsertedBrackets>0&&p.row===a.autoInsertedRow&&w===a.autoInsertedLineEnd[0]&&m.substr(p.column)===a.autoInsertedLineEnd},g.isMaybeInsertedClosing=function(p,m){return a.maybeInsertedBrackets>0&&p.row===a.maybeInsertedRow&&m.substr(p.column)===a.maybeInsertedLineEnd&&m.substr(0,p.column)==a.maybeInsertedLineStart},g.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},g.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},i.inherits(g,r),t.CstyleBehaviour=g});ace.define("ace/unicode",["require","exports","module"],function(e,t,n){t.packages={},i({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"});function i(r){var s=/\w{4}/g;for(var u in r)t.packages[u]=r[u].replace(s,"\\u$&")}});ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,n){var i=e("../tokenizer").Tokenizer,r=e("./text_highlight_rules").TextHighlightRules,s=e("./behaviour/cstyle").CstyleBehaviour,u=e("../unicode"),o=e("../lib/lang"),c=e("../token_iterator").TokenIterator,a=e("../range").Range,f=function(){this.HighlightRules=r};(function(){this.$defaultBehaviour=new s,this.tokenRe=new RegExp("^["+u.packages.L+u.packages.Mn+u.packages.Mc+u.packages.Nd+u.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+u.packages.L+u.packages.Mn+u.packages.Mc+u.packages.Nd+u.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new i(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(l,h,d,g){var p=h.doc,m=!0,w=!0,v=1/0,A=h.getTabSize(),_=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var x=this.lineCommentStart.map(o.escapeRegExp).join("|"),E=this.lineCommentStart[0];else var x=o.escapeRegExp(this.lineCommentStart),E=this.lineCommentStart;x=new RegExp("^(\\s*)(?:"+x+") ?"),_=h.getUseSoftTabs();var B=function(K,N){var k=K.match(x);if(!!k){var $=k[1].length,z=k[0].length;!R(K,$,z)&&k[0][z-1]==" "&&z--,p.removeInLine(N,$,z)}},M=E+" ",C=function(K,N){(!m||/\S/.test(K))&&(R(K,v,v)?p.insertInLine({row:N,column:v},M):p.insertInLine({row:N,column:v},E))},T=function(K,N){return x.test(K)},R=function(K,N,k){for(var $=0;N--&&K.charAt(N)==" ";)$++;if($%A!=0)return!1;for(var $=0;K.charAt(k++)==" ";)$++;return A>2?$%A!=A-1:$%A==0}}else{if(!this.blockComment)return!1;var E=this.blockComment.start,b=this.blockComment.end,x=new RegExp("^(\\s*)(?:"+o.escapeRegExp(E)+")"),y=new RegExp("(?:"+o.escapeRegExp(b)+")\\s*$"),C=function(P,j){T(P,j)||(!m||/\S/.test(P))&&(p.insertInLine({row:j,column:P.length},b),p.insertInLine({row:j,column:v},E))},B=function(P,j){var V;(V=P.match(y))&&p.removeInLine(j,P.length-V[0].length,P.length),(V=P.match(x))&&p.removeInLine(j,V[1].length,V[0].length)},T=function(P,j){if(x.test(P))return!0;for(var V=h.getTokens(j),K=0;K<V.length;K++)if(V[K].type==="comment")return!0}}function I(P){for(var j=d;j<=g;j++)P(p.getLine(j),j)}var H=1/0;I(function(P,j){var V=P.search(/\S/);V!==-1?(V<v&&(v=V),w&&!T(P,j)&&(w=!1)):H>P.length&&(H=P.length)}),v==1/0&&(v=H,m=!1,w=!1),_&&v%A!=0&&(v=Math.floor(v/A)*A),I(w?B:C)},this.toggleBlockComment=function(l,h,d,g){var p=this.blockComment;if(!!p){!p.start&&p[0]&&(p=p[0]);var m=new c(h,g.row,g.column),w=m.getCurrentToken();h.selection;var v=h.selection.toOrientedRange(),A,_;if(w&&/comment/.test(w.type)){for(var E,b;w&&/comment/.test(w.type);){var x=w.value.indexOf(p.start);if(x!=-1){var y=m.getCurrentTokenRow(),C=m.getCurrentTokenColumn()+x;E=new a(y,C,y,C+p.start.length);break}w=m.stepBackward()}for(var m=new c(h,g.row,g.column),w=m.getCurrentToken();w&&/comment/.test(w.type);){var x=w.value.indexOf(p.end);if(x!=-1){var y=m.getCurrentTokenRow(),C=m.getCurrentTokenColumn()+x;b=new a(y,C,y,C+p.end.length);break}w=m.stepForward()}b&&h.remove(b),E&&(h.remove(E),A=E.start.row,_=-p.start.length)}else _=p.start.length,A=d.start.row,h.insert(d.end,p.end),h.insert(d.start,p.start);v.start.row==A&&(v.start.column+=_),v.end.row==A&&(v.end.column+=_),h.selection.fromOrientedRange(v)}},this.getNextLineIndent=function(l,h,d){return this.$getIndent(h)},this.checkOutdent=function(l,h,d){return!1},this.autoOutdent=function(l,h,d){},this.$getIndent=function(l){return l.match(/^\s*/)[0]},this.createWorker=function(l){return null},this.createModeDelegates=function(l){this.$embeds=[],this.$modes={};for(var h in l)l[h]&&(this.$embeds.push(h),this.$modes[h]=new l[h]);for(var d=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],h=0;h<d.length;h++)(function(p){var m=d[h],w=p[m];p[d[h]]=function(){return this.$delegator(m,arguments,w)}})(this)},this.$delegator=function(l,h,d){var g=h[0];typeof g!="string"&&(g=g[0]);for(var p=0;p<this.$embeds.length;p++)if(!!this.$modes[this.$embeds[p]]){var m=g.split(this.$embeds[p]);if(!m[0]&&m[1]){h[0]=m[1];var w=this.$modes[this.$embeds[p]];return w[l].apply(w,h)}}var v=d.apply(this,h);return d?v:void 0},this.transformAction=function(l,h,d,g,p){if(this.$behaviour){var m=this.$behaviour.getBehaviours();for(var w in m)if(m[w][h]){var v=m[w][h].apply(this,arguments);if(v)return v}}},this.getKeywords=function(l){if(!this.completionKeywords){var h=this.$tokenizer.rules,d=[];for(var g in h)for(var p=h[g],m=0,w=p.length;m<w;m++)if(typeof p[m].token=="string")/keyword|support|storage/.test(p[m].token)&&d.push(p[m].regex);else if(typeof p[m].token=="object"){for(var v=0,A=p[m].token.length;v<A;v++)if(/keyword|support|storage/.test(p[m].token[v])){var g=p[m].regex.match(/\(.+?\)/g)[v];d.push(g.substr(1,g.length-2))}}this.completionKeywords=d}return l?d.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(l,h,d,g){var p=this.$keywordList||this.$createKeywordList();return p.map(function(m){return{name:m,value:m,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(f.prototype),t.Mode=f});ace.define("ace/apply_delta",["require","exports","module"],function(e,t,n){t.applyDelta=function(i,r,s){var u=r.start.row,o=r.start.column,c=i[u]||"";switch(r.action){case"insert":var a=r.lines;if(a.length===1)i[u]=c.substring(0,o)+r.lines[0]+c.substring(o);else{var f=[u,1].concat(r.lines);i.splice.apply(i,f),i[u]=c.substring(0,o)+i[u],i[u+r.lines.length-1]+=c.substring(o)}break;case"remove":var l=r.end.column,h=r.end.row;u===h?i[u]=c.substring(0,o)+c.substring(l):i.splice(u,h-u+1,c.substring(0,o)+i[h].substring(l));break}}});ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var i=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(u,o,c){this.$onChange=this.onChange.bind(this),this.attach(u),typeof c=="undefined"?this.setPosition(o.row,o.column):this.setPosition(o,c)};(function(){i.implement(this,r),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(c){if(!(c.start.row==c.end.row&&c.start.row!=this.row)&&!(c.start.row>this.row)){var a=o(c,{row:this.row,column:this.column},this.$insertRight);this.setPosition(a.row,a.column,!0)}};function u(c,a,f){var l=f?c.column<=a.column:c.column<a.column;return c.row<a.row||c.row==a.row&&l}function o(c,a,f){var l=c.action=="insert",h=(l?1:-1)*(c.end.row-c.start.row),d=(l?1:-1)*(c.end.column-c.start.column),g=c.start,p=l?g:c.end;return u(a,g,f)?{row:a.row,column:a.column}:u(p,a,!f)?{row:a.row+h,column:a.column+(a.row==p.row?d:0)}:{row:g.row,column:g.column}}this.setPosition=function(c,a,f){var l;if(f?l={row:c,column:a}:l=this.$clipPositionToDocument(c,a),!(this.row==l.row&&this.column==l.column)){var h={row:this.row,column:this.column};this.row=l.row,this.column=l.column,this._signal("change",{old:h,value:l})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(c){this.document=c||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(c,a){var f={};return c>=this.document.getLength()?(f.row=Math.max(0,this.document.getLength()-1),f.column=this.document.getLine(f.row).length):c<0?(f.row=0,f.column=0):(f.row=c,f.column=Math.min(this.document.getLine(f.row).length,Math.max(0,a))),a<0&&(f.column=0),f}}).call(s.prototype)});ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){var i=e("./lib/oop"),r=e("./apply_delta").applyDelta,s=e("./lib/event_emitter").EventEmitter,u=e("./range").Range,o=e("./anchor").Anchor,c=function(a){this.$lines=[""],a.length===0?this.$lines=[""]:Array.isArray(a)?this.insertMergedLines({row:0,column:0},a):this.insert({row:0,column:0},a)};(function(){i.implement(this,s),this.setValue=function(a){var f=this.getLength()-1;this.remove(new u(0,0,f,this.getLine(f).length)),this.insert({row:0,column:0},a)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(a,f){return new o(this,a,f)},"aaa".split(/a/).length===0?this.$split=function(a){return a.replace(/\r\n|\r/g,`
|
|
`).split(`
|
|
`)}:this.$split=function(a){return a.split(/\r\n|\r|\n/)},this.$detectNewLine=function(a){var f=a.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=f?f[1]:`
|
|
`,this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
|
`;case"unix":return`
|
|
`;default:return this.$autoNewLine||`
|
|
`}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(a){this.$newLineMode!==a&&(this.$newLineMode=a,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(a){return a==`\r
|
|
`||a=="\r"||a==`
|
|
`},this.getLine=function(a){return this.$lines[a]||""},this.getLines=function(a,f){return this.$lines.slice(a,f+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(a){return this.getLinesForRange(a).join(this.getNewLineCharacter())},this.getLinesForRange=function(a){var f;if(a.start.row===a.end.row)f=[this.getLine(a.start.row).substring(a.start.column,a.end.column)];else{f=this.getLines(a.start.row,a.end.row),f[0]=(f[0]||"").substring(a.start.column);var l=f.length-1;a.end.row-a.start.row==l&&(f[l]=f[l].substring(0,a.end.column))}return f},this.insertLines=function(a,f){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(a,f)},this.removeLines=function(a,f){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(a,f)},this.insertNewLine=function(a){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(a,["",""])},this.insert=function(a,f){return this.getLength()<=1&&this.$detectNewLine(f),this.insertMergedLines(a,this.$split(f))},this.insertInLine=function(a,f){var l=this.clippedPos(a.row,a.column),h=this.pos(a.row,a.column+f.length);return this.applyDelta({start:l,end:h,action:"insert",lines:[f]},!0),this.clonePos(h)},this.clippedPos=function(a,f){var l=this.getLength();a===void 0?a=l:a<0?a=0:a>=l&&(a=l-1,f=void 0);var h=this.getLine(a);return f==null&&(f=h.length),f=Math.min(Math.max(f,0),h.length),{row:a,column:f}},this.clonePos=function(a){return{row:a.row,column:a.column}},this.pos=function(a,f){return{row:a,column:f}},this.$clipPosition=function(a){var f=this.getLength();return a.row>=f?(a.row=Math.max(0,f-1),a.column=this.getLine(f-1).length):(a.row=Math.max(0,a.row),a.column=Math.min(Math.max(a.column,0),this.getLine(a.row).length)),a},this.insertFullLines=function(a,f){a=Math.min(Math.max(a,0),this.getLength());var l=0;a<this.getLength()?(f=f.concat([""]),l=0):(f=[""].concat(f),a--,l=this.$lines[a].length),this.insertMergedLines({row:a,column:l},f)},this.insertMergedLines=function(a,f){var l=this.clippedPos(a.row,a.column),h={row:l.row+f.length-1,column:(f.length==1?l.column:0)+f[f.length-1].length};return this.applyDelta({start:l,end:h,action:"insert",lines:f}),this.clonePos(h)},this.remove=function(a){var f=this.clippedPos(a.start.row,a.start.column),l=this.clippedPos(a.end.row,a.end.column);return this.applyDelta({start:f,end:l,action:"remove",lines:this.getLinesForRange({start:f,end:l})}),this.clonePos(f)},this.removeInLine=function(a,f,l){var h=this.clippedPos(a,f),d=this.clippedPos(a,l);return this.applyDelta({start:h,end:d,action:"remove",lines:this.getLinesForRange({start:h,end:d})},!0),this.clonePos(h)},this.removeFullLines=function(a,f){a=Math.min(Math.max(0,a),this.getLength()-1),f=Math.min(Math.max(0,f),this.getLength()-1);var l=f==this.getLength()-1&&a>0,h=f<this.getLength()-1,d=l?a-1:a,g=l?this.getLine(d).length:0,p=h?f+1:f,m=h?0:this.getLine(p).length,w=new u(d,g,p,m),v=this.$lines.slice(a,f+1);return this.applyDelta({start:w.start,end:w.end,action:"remove",lines:this.getLinesForRange(w)}),v},this.removeNewLine=function(a){a<this.getLength()-1&&a>=0&&this.applyDelta({start:this.pos(a,this.getLine(a).length),end:this.pos(a+1,0),action:"remove",lines:["",""]})},this.replace=function(a,f){if(a instanceof u||(a=u.fromPoints(a.start,a.end)),f.length===0&&a.isEmpty())return a.start;if(f==this.getTextRange(a))return a.end;this.remove(a);var l;return f?l=this.insert(a.start,f):l=a.start,l},this.applyDeltas=function(a){for(var f=0;f<a.length;f++)this.applyDelta(a[f])},this.revertDeltas=function(a){for(var f=a.length-1;f>=0;f--)this.revertDelta(a[f])},this.applyDelta=function(a,f){var l=a.action=="insert";(l?a.lines.length<=1&&!a.lines[0]:!u.comparePoints(a.start,a.end))||(l&&a.lines.length>2e4&&this.$splitAndapplyLargeDelta(a,2e4),r(this.$lines,a,f),this._signal("change",a))},this.$splitAndapplyLargeDelta=function(a,f){var l=a.lines,h=l.length,d=a.start.row,g=a.start.column,p=0,m=0;do{p=m,m+=f-1;var w=l.slice(p,m);if(m>h){a.lines=w,a.start.row=d+p,a.start.column=g;break}w.push(""),this.applyDelta({start:this.pos(d+p,g),end:this.pos(d+m,g=0),action:a.action,lines:w},!0)}while(!0)},this.revertDelta=function(a){this.applyDelta({start:this.clonePos(a.start),end:this.clonePos(a.end),action:a.action=="insert"?"remove":"insert",lines:a.lines.slice()})},this.indexToPosition=function(a,f){for(var l=this.$lines||this.getAllLines(),h=this.getNewLineCharacter().length,d=f||0,g=l.length;d<g;d++)if(a-=l[d].length+h,a<0)return{row:d,column:a+l[d].length+h};return{row:g-1,column:l[g-1].length}},this.positionToIndex=function(a,f){for(var l=this.$lines||this.getAllLines(),h=this.getNewLineCharacter().length,d=0,g=Math.min(a.row,l.length),p=f||0;p<g;++p)d+=l[p].length+h;return d+a.column}}).call(c.prototype),t.Document=c});ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var i=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,s=function(u,o){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=u;var c=this;this.$worker=function(){if(!!c.running){for(var a=new Date,f=c.currentLine,l=-1,h=c.doc,d=f;c.lines[f];)f++;var g=h.getLength(),p=0;for(c.running=!1;f<g;){c.$tokenizeRow(f),l=f;do f++;while(c.lines[f]);if(p++,p%5===0&&new Date-a>20){c.running=setTimeout(c.$worker,20);break}}c.currentLine=f,l==-1&&(l=f),d<=l&&c.fireUpdateEvent(d,l)}}};(function(){i.implement(this,r),this.setTokenizer=function(u){this.tokenizer=u,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(u){this.doc=u,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(u,o){var c={first:u,last:o};this._signal("update",{data:c})},this.start=function(u){this.currentLine=Math.min(u||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(u){var o=u.start.row,c=u.end.row-o;if(c===0)this.lines[o]=null;else if(u.action=="remove")this.lines.splice(o,c+1,null),this.states.splice(o,c+1,null);else{var a=Array(c+1);a.unshift(o,1),this.lines.splice.apply(this.lines,a),this.states.splice.apply(this.states,a)}this.currentLine=Math.min(o,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(u){return this.lines[u]||this.$tokenizeRow(u)},this.getState=function(u){return this.currentLine==u&&this.$tokenizeRow(u),this.states[u]||"start"},this.$tokenizeRow=function(u){var o=this.doc.getLine(u),c=this.states[u-1],a=this.tokenizer.getLineTokens(o,c,u);return this.states[u]+""!=a.state+""?(this.states[u]=a.state,this.lines[u+1]=null,this.currentLine>u+1&&(this.currentLine=u+1)):this.currentLine==u&&(this.currentLine=u+1),this.lines[u]=a.tokens}}).call(s.prototype),t.BackgroundTokenizer=s});ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){var i=e("./lib/lang");e("./lib/oop");var r=e("./range").Range,s=function(u,o,c){this.setRegexp(u),this.clazz=o,this.type=c||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(u){this.regExp+""!=u+""&&(this.regExp=u,this.cache=[])},this.update=function(u,o,c,a){if(!!this.regExp)for(var f=a.firstRow,l=a.lastRow,h=f;h<=l;h++){var d=this.cache[h];d==null&&(d=i.getMatchOffsets(c.getLine(h),this.regExp),d.length>this.MAX_RANGES&&(d=d.slice(0,this.MAX_RANGES)),d=d.map(function(p){return new r(h,p.offset,h,p.offset+p.length)}),this.cache[h]=d.length?d:"");for(var g=d.length;g--;)o.drawSingleLineMarker(u,d[g].toScreenRange(c),this.clazz,a)}}}).call(s.prototype),t.SearchHighlight=s});ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){var i=e("../range").Range;function r(s,u){this.foldData=s,Array.isArray(u)?this.folds=u:u=this.folds=[u];var o=u[u.length-1];this.range=new i(u[0].start.row,u[0].start.column,o.end.row,o.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(c){c.setFoldLine(this)},this)}(function(){this.shiftRow=function(s){this.start.row+=s,this.end.row+=s,this.folds.forEach(function(u){u.start.row+=s,u.end.row+=s})},this.addFold=function(s){if(s.sameRow){if(s.start.row<this.startRow||s.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(s),this.folds.sort(function(u,o){return-u.range.compareEnd(o.start.row,o.start.column)}),this.range.compareEnd(s.start.row,s.start.column)>0?(this.end.row=s.end.row,this.end.column=s.end.column):this.range.compareStart(s.end.row,s.end.column)<0&&(this.start.row=s.start.row,this.start.column=s.start.column)}else if(s.start.row==this.end.row)this.folds.push(s),this.end.row=s.end.row,this.end.column=s.end.column;else if(s.end.row==this.start.row)this.folds.unshift(s),this.start.row=s.start.row,this.start.column=s.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");s.foldLine=this},this.containsRow=function(s){return s>=this.start.row&&s<=this.end.row},this.walk=function(s,u,o){var c=0,a=this.folds,f,l,h,d=!0;u==null&&(u=this.end.row,o=this.end.column);for(var g=0;g<a.length;g++){if(f=a[g],l=f.range.compareStart(u,o),l==-1){s(null,u,o,c,d);return}if(h=s(null,f.start.row,f.start.column,c,d),h=!h&&s(f.placeholder,f.start.row,f.start.column,c),h||l===0)return;d=!f.sameRow,c=f.end.column}s(null,u,o,c,d)},this.getNextFoldTo=function(s,u){for(var o,c,a=0;a<this.folds.length;a++){if(o=this.folds[a],c=o.range.compareEnd(s,u),c==-1)return{fold:o,kind:"after"};if(c===0)return{fold:o,kind:"inside"}}return null},this.addRemoveChars=function(s,u,o){var c=this.getNextFoldTo(s,u),a,f;if(c){if(a=c.fold,c.kind=="inside"&&a.start.column!=u&&a.start.row!=s)window.console&&window.console.log(s,u,a);else if(a.start.row==s){f=this.folds;var l=f.indexOf(a);for(l===0&&(this.start.column+=o),l;l<f.length;l++){if(a=f[l],a.start.column+=o,!a.sameRow)return;a.end.column+=o}this.end.column+=o}}},this.split=function(s,u){var o=this.getNextFoldTo(s,u);if(!o||o.kind=="inside")return null;var c=o.fold,a=this.folds,f=this.foldData,l=a.indexOf(c),h=a[l-1];this.end.row=h.end.row,this.end.column=h.end.column,a=a.splice(l,a.length-l);var d=new r(f,a);return f.splice(f.indexOf(this)+1,0,d),d},this.merge=function(s){for(var u=s.folds,o=0;o<u.length;o++)this.addFold(u[o]);var c=this.foldData;c.splice(c.indexOf(s),1)},this.toString=function(){var s=[this.range.toString()+": ["];return this.folds.forEach(function(u){s.push(" "+u.toString())}),s.push("]"),s.join(`
|
|
`)},this.idxToPosition=function(s){for(var u=0,o=0;o<this.folds.length;o++){var c=this.folds[o];if(s-=c.start.column-u,s<0)return{row:c.start.row,column:c.start.column+s};if(s-=c.placeholder.length,s<0)return c.start;u=c.end.column}return{row:this.end.row,column:this.end.column+s}}}).call(r.prototype),t.FoldLine=r});ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,n){var i=e("./range").Range,r=i.comparePoints,s=function(){this.ranges=[]};(function(){this.comparePoints=r,this.pointIndex=function(u,o,c){for(var a=this.ranges,f=c||0;f<a.length;f++){var l=a[f],h=r(u,l.end);if(!(h>0)){var d=r(u,l.start);return h===0?o&&d!==0?-f-2:f:d>0||d===0&&!o?f:-f-1}}return-f-1},this.add=function(u){var o=!u.isEmpty(),c=this.pointIndex(u.start,o);c<0&&(c=-c-1);var a=this.pointIndex(u.end,o,c);return a<0?a=-a-1:a++,this.ranges.splice(c,a-c,u)},this.addList=function(u){for(var o=[],c=u.length;c--;)o.push.apply(o,this.add(u[c]));return o},this.substractPoint=function(u){var o=this.pointIndex(u);if(o>=0)return this.ranges.splice(o,1)},this.merge=function(){var u=[],o=this.ranges;o=o.sort(function(h,d){return r(h.start,d.start)});for(var c=o[0],a,f=1;f<o.length;f++){a=c,c=o[f];var l=r(a.end,c.start);l<0||l==0&&!a.isEmpty()&&!c.isEmpty()||(r(a.end,c.end)<0&&(a.end.row=c.end.row,a.end.column=c.end.column),o.splice(f,1),u.push(c),c=a,f--)}return this.ranges=o,u},this.contains=function(u,o){return this.pointIndex({row:u,column:o})>=0},this.containsPoint=function(u){return this.pointIndex(u)>=0},this.rangeAtPoint=function(u){var o=this.pointIndex(u);if(o>=0)return this.ranges[o]},this.clipRows=function(u,o){var c=this.ranges;if(c[0].start.row>o||c[c.length-1].start.row<u)return[];var a=this.pointIndex({row:u,column:0});a<0&&(a=-a-1);var f=this.pointIndex({row:o,column:0},a);f<0&&(f=-f-1);for(var l=[],h=a;h<f;h++)l.push(c[h]);return l},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(u){this.session&&this.detach(),this.session=u,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){!this.session||(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(u){if(u.action=="insert")var o=u.start,c=u.end;else var c=u.start,o=u.end;for(var a=o.row,f=c.row,l=f-a,h=-o.column+c.column,d=this.ranges,g=0,p=d.length;g<p;g++){var m=d[g];if(!(m.end.row<a)){if(m.start.row>a)break;if(m.start.row==a&&m.start.column>=o.column&&(m.start.column==o.column&&this.$insertRight||(m.start.column+=h,m.start.row+=l)),m.end.row==a&&m.end.column>=o.column){if(m.end.column==o.column&&this.$insertRight)continue;m.end.column==o.column&&h>0&&g<p-1&&m.end.column>m.start.column&&m.end.column==d[g+1].start.column&&(m.end.column-=h),m.end.column+=h,m.end.row+=l}}}if(l!=0&&g<p)for(;g<p;g++){var m=d[g];m.start.row+=l,m.end.row+=l}}}).call(s.prototype),t.RangeList=s});ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(e,t,n){e("../range").Range;var i=e("../range_list").RangeList,r=e("../lib/oop"),s=t.Fold=function(f,l){this.foldLine=null,this.placeholder=l,this.range=f,this.start=f.start,this.end=f.end,this.sameRow=f.start.row==f.end.row,this.subFolds=this.ranges=[]};r.inherits(s,i),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(f){this.foldLine=f,this.subFolds.forEach(function(l){l.setFoldLine(f)})},this.clone=function(){var f=this.range.clone(),l=new s(f,this.placeholder);return this.subFolds.forEach(function(h){l.subFolds.push(h.clone())}),l.collapseChildren=this.collapseChildren,l},this.addSubFold=function(f){if(!this.range.isEqual(f)){if(!this.range.containsRange(f))throw new Error("A fold can't intersect already existing fold"+f.range+this.range);o(f,this.start);for(var g=f.start.row,p=f.start.column,l=0,h=-1;l<this.subFolds.length&&(h=this.subFolds[l].range.compare(g,p),h==1);l++);var d=this.subFolds[l];if(h==0)return d.addSubFold(f);for(var g=f.range.end.row,p=f.range.end.column,m=l,h=-1;m<this.subFolds.length&&(h=this.subFolds[m].range.compare(g,p),h==1);m++);if(this.subFolds[m],h==0)throw new Error("A fold can't intersect already existing fold"+f.range+this.range);return this.subFolds.splice(l,m-l,f),f.setFoldLine(this.foldLine),f}},this.restoreRange=function(f){return a(f,this.start)}}.call(s.prototype);function u(f,l){f.row-=l.row,f.row==0&&(f.column-=l.column)}function o(f,l){u(f.start,l),u(f.end,l)}function c(f,l){f.row==0&&(f.column+=l.column),f.row+=l.row}function a(f,l){c(f.start,l),c(f.end,l)}});ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(e,t,n){var i=e("../range").Range,r=e("./fold_line").FoldLine,s=e("./fold").Fold,u=e("../token_iterator").TokenIterator;function o(){this.getFoldAt=function(c,a,f){var l=this.getFoldLine(c);if(!l)return null;for(var h=l.folds,d=0;d<h.length;d++){var g=h[d];if(g.range.contains(c,a)){if(f==1&&g.range.isEnd(c,a))continue;if(f==-1&&g.range.isStart(c,a))continue;return g}}},this.getFoldsInRange=function(c){var a=c.start,f=c.end,l=this.$foldData,h=[];a.column+=1,f.column-=1;for(var d=0;d<l.length;d++){var g=l[d].range.compareRange(c);if(g!=2){if(g==-2)break;for(var p=l[d].folds,m=0;m<p.length;m++){var w=p[m];if(g=w.range.compareRange(c),g==-2)break;if(g==2)continue;if(g==42)break;h.push(w)}}}return a.column-=1,f.column+=1,h},this.getFoldsInRangeList=function(c){if(Array.isArray(c)){var a=[];c.forEach(function(f){a=a.concat(this.getFoldsInRange(f))},this)}else var a=this.getFoldsInRange(c);return a},this.getAllFolds=function(){for(var c=[],a=this.$foldData,f=0;f<a.length;f++)for(var l=0;l<a[f].folds.length;l++)c.push(a[f].folds[l]);return c},this.getFoldStringAt=function(c,a,f,l){if(l=l||this.getFoldLine(c),!l)return null;for(var h={end:{column:0}},d,g,p=0;p<l.folds.length;p++){g=l.folds[p];var m=g.range.compareEnd(c,a);if(m==-1){d=this.getLine(g.start.row).substring(h.end.column,g.start.column);break}else if(m===0)return null;h=g}return d||(d=this.getLine(g.start.row).substring(h.end.column)),f==-1?d.substring(0,a-h.end.column):f==1?d.substring(a-h.end.column):d},this.getFoldLine=function(c,a){var f=this.$foldData,l=0;for(a&&(l=f.indexOf(a)),l==-1&&(l=0),l;l<f.length;l++){var h=f[l];if(h.start.row<=c&&h.end.row>=c)return h;if(h.end.row>c)return null}return null},this.getNextFoldLine=function(c,a){var f=this.$foldData,l=0;for(a&&(l=f.indexOf(a)),l==-1&&(l=0),l;l<f.length;l++){var h=f[l];if(h.end.row>=c)return h}return null},this.getFoldedRowCount=function(c,a){for(var f=this.$foldData,l=a-c+1,h=0;h<f.length;h++){var d=f[h],g=d.end.row,p=d.start.row;if(g>=a){p<a&&(p>=c?l-=a-p:l=0);break}else g>=c&&(p>=c?l-=g-p:l-=g-c+1)}return l},this.$addFoldLine=function(c){return this.$foldData.push(c),this.$foldData.sort(function(a,f){return a.start.row-f.start.row}),c},this.addFold=function(c,a){var f=this.$foldData,l=!1,h;c instanceof s?h=c:(h=new s(a,c),h.collapseChildren=a.collapseChildren),this.$clipRangeToDocument(h.range);var d=h.start.row,g=h.start.column,p=h.end.row,m=h.end.column;if(!(d<p||d==p&&g<=m-2))throw new Error("The range has to be at least 2 characters width");var w=this.getFoldAt(d,g,1),v=this.getFoldAt(p,m,-1);if(w&&v==w)return w.addSubFold(h);w&&!w.range.isStart(d,g)&&this.removeFold(w),v&&!v.range.isEnd(p,m)&&this.removeFold(v);var A=this.getFoldsInRange(h.range);A.length>0&&(this.removeFolds(A),A.forEach(function(x){h.addSubFold(x)}));for(var _=0;_<f.length;_++){var E=f[_];if(p==E.start.row){E.addFold(h),l=!0;break}else if(d==E.end.row){if(E.addFold(h),l=!0,!h.sameRow){var b=f[_+1];if(b&&b.start.row==p){E.merge(b);break}}break}else if(p<=E.start.row)break}return l||(E=this.$addFoldLine(new r(this.$foldData,h))),this.$useWrapMode?this.$updateWrapData(E.start.row,E.start.row):this.$updateRowLengthCache(E.start.row,E.start.row),this.$modified=!0,this._signal("changeFold",{data:h,action:"add"}),h},this.addFolds=function(c){c.forEach(function(a){this.addFold(a)},this)},this.removeFold=function(c){var a=c.foldLine,f=a.start.row,l=a.end.row,h=this.$foldData,d=a.folds;if(d.length==1)h.splice(h.indexOf(a),1);else if(a.range.isEnd(c.end.row,c.end.column))d.pop(),a.end.row=d[d.length-1].end.row,a.end.column=d[d.length-1].end.column;else if(a.range.isStart(c.start.row,c.start.column))d.shift(),a.start.row=d[0].start.row,a.start.column=d[0].start.column;else if(c.sameRow)d.splice(d.indexOf(c),1);else{var g=a.split(c.start.row,c.start.column);d=g.folds,d.shift(),g.start.row=d[0].start.row,g.start.column=d[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(f,l):this.$updateRowLengthCache(f,l)),this.$modified=!0,this._signal("changeFold",{data:c,action:"remove"})},this.removeFolds=function(c){for(var a=[],f=0;f<c.length;f++)a.push(c[f]);a.forEach(function(l){this.removeFold(l)},this),this.$modified=!0},this.expandFold=function(c){this.removeFold(c),c.subFolds.forEach(function(a){c.restoreRange(a),this.addFold(a)},this),c.collapseChildren>0&&this.foldAll(c.start.row+1,c.end.row,c.collapseChildren-1),c.subFolds=[]},this.expandFolds=function(c){c.forEach(function(a){this.expandFold(a)},this)},this.unfold=function(c,a){var f,l;if(c==null?(f=new i(0,0,this.getLength(),0),a=!0):typeof c=="number"?f=new i(c,0,c,this.getLine(c).length):"row"in c?f=i.fromPoints(c,c):f=c,l=this.getFoldsInRangeList(f),a)this.removeFolds(l);else for(var h=l;h.length;)this.expandFolds(h),h=this.getFoldsInRangeList(f);if(l.length)return l},this.isRowFolded=function(c,a){return!!this.getFoldLine(c,a)},this.getRowFoldEnd=function(c,a){var f=this.getFoldLine(c,a);return f?f.end.row:c},this.getRowFoldStart=function(c,a){var f=this.getFoldLine(c,a);return f?f.start.row:c},this.getFoldDisplayLine=function(c,a,f,l,h){l==null&&(l=c.start.row),h==null&&(h=0),a==null&&(a=c.end.row),f==null&&(f=this.getLine(a).length);var d=this.doc,g="";return c.walk(function(p,m,w,v){if(!(m<l)){if(m==l){if(w<h)return;v=Math.max(h,v)}p!=null?g+=p:g+=d.getLine(m).substring(v,w)}},a,f),g},this.getDisplayLine=function(c,a,f,l){var h=this.getFoldLine(c);if(h)return this.getFoldDisplayLine(h,c,a,f,l);var d;return d=this.doc.getLine(c),d.substring(l||0,a||d.length)},this.$cloneFoldData=function(){var c=[];return c=this.$foldData.map(function(a){var f=a.folds.map(function(l){return l.clone()});return new r(c,f)}),c},this.toggleFold=function(c){var a=this.selection,f=a.getRange(),l,h;if(f.isEmpty()){var d=f.start;if(l=this.getFoldAt(d.row,d.column),l){this.expandFold(l);return}else(h=this.findMatchingBracket(d))?f.comparePoint(h)==1?f.end=h:(f.start=h,f.start.column++,f.end.column--):(h=this.findMatchingBracket({row:d.row,column:d.column+1}))?(f.comparePoint(h)==1?f.end=h:f.start=h,f.start.column++):f=this.getCommentFoldRange(d.row,d.column)||f}else{var g=this.getFoldsInRange(f);if(c&&g.length){this.expandFolds(g);return}else g.length==1&&(l=g[0])}if(l||(l=this.getFoldAt(f.start.row,f.start.column)),l&&l.range.toString()==f.toString()){this.expandFold(l);return}var p="...";if(!f.isMultiLine()){if(p=this.getTextRange(f),p.length<4)return;p=p.trim().substring(0,2)+".."}this.addFold(p,f)},this.getCommentFoldRange=function(c,a,f){var l=new u(this,c,a),h=l.getCurrentToken(),d=h.type;if(h&&/^comment|string/.test(d)){d=d.match(/comment|string/)[0],d=="comment"&&(d+="|doc-start");var g=new RegExp(d),p=new i;if(f!=1){do h=l.stepBackward();while(h&&g.test(h.type));l.stepForward()}if(p.start.row=l.getCurrentTokenRow(),p.start.column=l.getCurrentTokenColumn()+2,l=new u(this,c,a),f!=-1){var m=-1;do if(h=l.stepForward(),m==-1){var w=this.getState(l.$row);g.test(w)||(m=l.$row)}else if(l.$row>m)break;while(h&&g.test(h.type));h=l.stepBackward()}else h=l.getCurrentToken();return p.end.row=l.getCurrentTokenRow(),p.end.column=l.getCurrentTokenColumn()+h.value.length-2,p}},this.foldAll=function(c,a,f){f==null&&(f=1e5);var l=this.foldWidgets;if(!!l){a=a||this.getLength(),c=c||0;for(var h=c;h<a;h++)if(l[h]==null&&(l[h]=this.getFoldWidget(h)),l[h]=="start"){var d=this.getFoldWidgetRange(h);if(d&&d.isMultiLine()&&d.end.row<=a&&d.start.row>=c){h=d.end.row;try{var g=this.addFold("...",d);g&&(g.collapseChildren=f)}catch{}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(c){if(!this.$foldStyles[c])throw new Error("invalid fold style: "+c+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=c){this.$foldStyle=c,c=="manual"&&this.unfold();var a=this.$foldMode;this.$setFolding(null),this.$setFolding(a)}},this.$setFolding=function(c){if(this.$foldMode!=c){if(this.$foldMode=c,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!c||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=c.getFoldWidget.bind(c,this,this.$foldStyle),this.getFoldWidgetRange=c.getFoldWidgetRange.bind(c,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(c,a){var f=this.foldWidgets;if(!f||a&&f[c])return{};for(var l=c-1,h;l>=0;){var d=f[l];if(d==null&&(d=f[l]=this.getFoldWidget(l)),d=="start"){var g=this.getFoldWidgetRange(l);if(h||(h=g),g&&g.end.row>=c)break}l--}return{range:l!==-1&&g,firstRange:h}},this.onFoldWidgetClick=function(c,a){a=a.domEvent;var f={children:a.shiftKey,all:a.ctrlKey||a.metaKey,siblings:a.altKey},l=this.$toggleFoldWidget(c,f);if(!l){var h=a.target||a.srcElement;h&&/ace_fold-widget/.test(h.className)&&(h.className+=" ace_invalid")}},this.$toggleFoldWidget=function(c,a){if(!!this.getFoldWidget){var f=this.getFoldWidget(c),l=this.getLine(c),h=f==="end"?-1:1,d=this.getFoldAt(c,h===-1?0:l.length,h);if(d)return a.children||a.all?this.removeFold(d):this.expandFold(d),d;var g=this.getFoldWidgetRange(c,!0);if(g&&!g.isMultiLine()&&(d=this.getFoldAt(g.start.row,g.start.column,1),d&&g.isEqual(d.range)))return this.removeFold(d),d;if(a.siblings){var p=this.getParentFoldRangeData(c);if(p.range)var m=p.range.start.row+1,w=p.range.end.row;this.foldAll(m,w,a.all?1e4:0)}else a.children?(w=g?g.end.row:this.getLength(),this.foldAll(c+1,w,a.all?1e4:0)):g&&(a.all&&(g.collapseChildren=1e4),this.addFold("...",g));return g}},this.toggleFoldWidget=function(c){var a=this.selection.getCursor().row;a=this.getRowFoldStart(a);var f=this.$toggleFoldWidget(a,{});if(!f){var l=this.getParentFoldRangeData(a,!0);if(f=l.range||l.firstRange,f){a=f.start.row;var h=this.getFoldAt(a,this.getLine(a).length,1);h?this.removeFold(h):this.addFold("...",f)}}},this.updateFoldWidgets=function(c){var a=c.start.row,f=c.end.row-a;if(f===0)this.foldWidgets[a]=null;else if(c.action=="remove")this.foldWidgets.splice(a,f+1,null);else{var l=Array(f+1);l.unshift(a,1),this.foldWidgets.splice.apply(this.foldWidgets,l)}},this.tokenizerUpdateFoldWidgets=function(c){var a=c.data;a.first!=a.last&&this.foldWidgets.length>a.first&&this.foldWidgets.splice(a.first,this.foldWidgets.length)}}t.Folding=o});ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){var i=e("../token_iterator").TokenIterator,r=e("../range").Range;function s(){this.findMatchingBracket=function(u,o){if(u.column==0)return null;var c=o||this.getLine(u.row).charAt(u.column-1);if(c=="")return null;var a=c.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],u):this.$findOpeningBracket(a[2],u):null},this.getBracketRange=function(u){var o=this.getLine(u.row),c=!0,a,f=o.charAt(u.column-1),l=f&&f.match(/([\(\[\{])|([\)\]\}])/);if(l||(f=o.charAt(u.column),u={row:u.row,column:u.column+1},l=f&&f.match(/([\(\[\{])|([\)\]\}])/),c=!1),!l)return null;if(l[1]){var h=this.$findClosingBracket(l[1],u);if(!h)return null;a=r.fromPoints(u,h),c||(a.end.column++,a.start.column--),a.cursor=a.end}else{var h=this.$findOpeningBracket(l[2],u);if(!h)return null;a=r.fromPoints(h,u),c||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(u,o,c){var a=this.$brackets[u],f=1,l=new i(this,o.row,o.column),h=l.getCurrentToken();if(h||(h=l.stepForward()),!!h){c||(c=new RegExp("(\\.?"+h.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var d=o.column-l.getCurrentTokenColumn()-2,g=h.value;;){for(;d>=0;){var p=g.charAt(d);if(p==a){if(f-=1,f==0)return{row:l.getCurrentTokenRow(),column:d+l.getCurrentTokenColumn()}}else p==u&&(f+=1);d-=1}do h=l.stepBackward();while(h&&!c.test(h.type));if(h==null)break;g=h.value,d=g.length-1}return null}},this.$findClosingBracket=function(u,o,c){var a=this.$brackets[u],f=1,l=new i(this,o.row,o.column),h=l.getCurrentToken();if(h||(h=l.stepForward()),!!h){c||(c=new RegExp("(\\.?"+h.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var d=o.column-l.getCurrentTokenColumn();;){for(var g=h.value,p=g.length;d<p;){var m=g.charAt(d);if(m==a){if(f-=1,f==0)return{row:l.getCurrentTokenRow(),column:d+l.getCurrentTokenColumn()}}else m==u&&(f+=1);d+=1}do h=l.stepForward();while(h&&!c.test(h.type));if(h==null)break;d=0}return null}}}t.BracketMatch=s});ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,n){var i=e("./lib/oop"),r=e("./lib/lang"),s=e("./bidihandler").BidiHandler,u=e("./config"),o=e("./lib/event_emitter").EventEmitter,c=e("./selection").Selection,a=e("./mode/text").Mode,f=e("./range").Range,l=e("./document").Document,h=e("./background_tokenizer").BackgroundTokenizer,d=e("./search_highlight").SearchHighlight,g=function(p,m){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++g.$uid,this.$foldData.toString=function(){return this.join(`
|
|
`)},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof p!="object"||!p.getLine)&&(p=new l(p)),this.$bidiHandler=new s(this),this.setDocument(p),this.selection=new c(this),u.resetOptions(this),this.setMode(m),u._signal("session",this)};g.$uid=0,function(){i.implement(this,o),this.setDocument=function(y){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=y,y.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(y){if(!y){this.$docRowCache=[],this.$screenRowCache=[];return}var C=this.$docRowCache.length,B=this.$getRowCacheIndex(this.$docRowCache,y)+1;C>B&&(this.$docRowCache.splice(B,C),this.$screenRowCache.splice(B,C))},this.$getRowCacheIndex=function(y,C){for(var B=0,T=y.length-1;B<=T;){var M=B+T>>1,R=y[M];if(C>R)B=M+1;else if(C<R)T=M-1;else return M}return B-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(y){var C=y.data;this.$resetRowCache(C.start.row)},this.onChange=function(y){this.$modified=!0,this.$bidiHandler.onChange(y),this.$resetRowCache(y.start.row);var C=this.$updateInternalDataOnChange(y);!this.$fromUndo&&this.$undoManager&&!y.ignore&&(this.$deltasDoc.push(y),C&&C.length!=0&&this.$deltasFold.push({action:"removeFolds",folds:C}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(y),this._signal("change",y)},this.setValue=function(y){this.doc.setValue(y),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(y){return this.bgTokenizer.getState(y)},this.getTokens=function(y){return this.bgTokenizer.getTokens(y)},this.getTokenAt=function(y,C){var B=this.bgTokenizer.getTokens(y),T,M=0;if(C==null){var R=B.length-1;M=this.getLine(y).length}else for(var R=0;R<B.length&&(M+=B[R].value.length,!(M>=C));R++);return T=B[R],T?(T.index=R,T.start=M-T.value.length,T):null},this.setUndoManager=function(y){if(this.$undoManager=y,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),y){var C=this;this.$syncInformUndoManager=function(){C.$informUndoManager.cancel(),C.$deltasFold.length&&(C.$deltas.push({group:"fold",deltas:C.$deltasFold}),C.$deltasFold=[]),C.$deltasDoc.length&&(C.$deltas.push({group:"doc",deltas:C.$deltasDoc}),C.$deltasDoc=[]),C.$deltas.length>0&&y.execute({action:"aceupdate",args:[C.$deltas,C],merge:C.mergeUndoDeltas}),C.mergeUndoDeltas=!1,C.$deltas=[]},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):" "},this.setUseSoftTabs=function(y){this.setOption("useSoftTabs",y)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(y){this.setOption("tabSize",y)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(y){return this.$useSoftTabs&&y.column%this.$tabSize===0},this.setNavigateWithinSoftTabs=function(y){this.setOption("navigateWithinSoftTabs",y)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(y){this.setOption("overwrite",y)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(y,C){this.$decorations[y]||(this.$decorations[y]=""),this.$decorations[y]+=" "+C,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(y,C){this.$decorations[y]=(this.$decorations[y]||"").replace(" "+C,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(y){this.$breakpoints=[];for(var C=0;C<y.length;C++)this.$breakpoints[y[C]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(y,C){C===void 0&&(C="ace_breakpoint"),C?this.$breakpoints[y]=C:delete this.$breakpoints[y],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(y){delete this.$breakpoints[y],this._signal("changeBreakpoint",{})},this.addMarker=function(y,C,B,T){var M=this.$markerId++,R={range:y,type:B||"line",renderer:typeof B=="function"?B:null,clazz:C,inFront:!!T,id:M};return T?(this.$frontMarkers[M]=R,this._signal("changeFrontMarker")):(this.$backMarkers[M]=R,this._signal("changeBackMarker")),M},this.addDynamicMarker=function(y,C){if(!!y.update){var B=this.$markerId++;return y.id=B,y.inFront=!!C,C?(this.$frontMarkers[B]=y,this._signal("changeFrontMarker")):(this.$backMarkers[B]=y,this._signal("changeBackMarker")),y}},this.removeMarker=function(y){var C=this.$frontMarkers[y]||this.$backMarkers[y];if(!!C){var B=C.inFront?this.$frontMarkers:this.$backMarkers;C&&(delete B[y],this._signal(C.inFront?"changeFrontMarker":"changeBackMarker"))}},this.getMarkers=function(y){return y?this.$frontMarkers:this.$backMarkers},this.highlight=function(y){if(!this.$searchHighlight){var C=new d(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(C)}this.$searchHighlight.setRegexp(y)},this.highlightLines=function(y,C,B,T){typeof C!="number"&&(B=C,C=y),B||(B="ace_step");var M=new f(y,0,C,1/0);return M.id=this.addMarker(M,B,"fullLine",T),M},this.setAnnotations=function(y){this.$annotations=y,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(y){var C=y.match(/^.*?(\r?\n)/m);C?this.$autoNewLine=C[1]:this.$autoNewLine=`
|
|
`},this.getWordRange=function(y,C){var B=this.getLine(y),T=!1;if(C>0&&(T=!!B.charAt(C-1).match(this.tokenRe)),T||(T=!!B.charAt(C).match(this.tokenRe)),T)var M=this.tokenRe;else if(/^\s+$/.test(B.slice(C-1,C+1)))var M=/\s/;else var M=this.nonTokenRe;var R=C;if(R>0){do R--;while(R>=0&&B.charAt(R).match(M));R++}for(var I=C;I<B.length&&B.charAt(I).match(M);)I++;return new f(y,R,y,I)},this.getAWordRange=function(y,C){for(var B=this.getWordRange(y,C),T=this.getLine(B.end.row);T.charAt(B.end.column).match(/[ \t]/);)B.end.column+=1;return B},this.setNewLineMode=function(y){this.doc.setNewLineMode(y)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(y){this.setOption("useWorker",y)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(y){var C=y.data;this.bgTokenizer.start(C.first),this._signal("tokenizerUpdate",y)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(y,C){if(y&&typeof y=="object"){if(y.getTokenizer)return this.$onChangeMode(y);var B=y,T=B.path}else T=y||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[T]&&!B){this.$onChangeMode(this.$modes[T]),C&&C();return}this.$modeId=T,u.loadModule(["mode",T],function(M){if(this.$modeId!==T)return C&&C();this.$modes[T]&&!B?this.$onChangeMode(this.$modes[T]):M&&M.Mode&&(M=new M.Mode(B),B||(this.$modes[T]=M,M.$id=T),this.$onChangeMode(M)),C&&C()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(y,C){if(C||(this.$modeId=y.$id),this.$mode!==y){this.$mode=y,this.$stopWorker(),this.$useWorker&&this.$startWorker();var B=y.getTokenizer();if(B.addEventListener!==void 0){var T=this.onReloadTokenizer.bind(this);B.addEventListener("update",T)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(B);else{this.bgTokenizer=new h(B);var M=this;this.bgTokenizer.addEventListener("update",function(R){M._signal("tokenizerUpdate",R)})}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=y.tokenRe,this.nonTokenRe=y.nonTokenRe,C||(y.attachToSession&&y.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(y.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode"))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(y){u.warn("Could not load worker",y),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(y){this.$scrollTop===y||isNaN(y)||(this.$scrollTop=y,this._signal("changeScrollTop",y))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(y){this.$scrollLeft===y||isNaN(y)||(this.$scrollLeft=y,this._signal("changeScrollLeft",y))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var y=0;return this.lineWidgets.forEach(function(C){C&&C.screenWidth>y&&(y=C.screenWidth)}),this.lineWidgetWidth=y},this.$computeWidth=function(y){if(this.$modified||y){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var C=this.doc.getAllLines(),B=this.$rowLengthCache,T=0,M=0,R=this.$foldData[M],I=R?R.start.row:1/0,H=C.length,P=0;P<H;P++){if(P>I){if(P=R.end.row+1,P>=H)break;R=this.$foldData[M++],I=R?R.start.row:1/0}B[P]==null&&(B[P]=this.$getStringScreenWidth(C[P])[0]),B[P]>T&&(T=B[P])}this.screenWidth=T}},this.getLine=function(y){return this.doc.getLine(y)},this.getLines=function(y,C){return this.doc.getLines(y,C)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(y){return this.doc.getTextRange(y||this.selection.getRange())},this.insert=function(y,C){return this.doc.insert(y,C)},this.remove=function(y){return this.doc.remove(y)},this.removeFullLines=function(y,C){return this.doc.removeFullLines(y,C)},this.undoChanges=function(y,C){if(!!y.length){this.$fromUndo=!0;for(var B=null,T=y.length-1;T!=-1;T--){var M=y[T];M.group=="doc"?(this.doc.revertDeltas(M.deltas),B=this.$getUndoSelection(M.deltas,!0,B)):M.deltas.forEach(function(R){this.addFolds(R.folds)},this)}return this.$fromUndo=!1,B&&this.$undoSelect&&!C&&this.selection.setSelectionRange(B),B}},this.redoChanges=function(y,C){if(!!y.length){this.$fromUndo=!0;for(var B=null,T=0;T<y.length;T++){var M=y[T];M.group=="doc"&&(this.doc.applyDeltas(M.deltas),B=this.$getUndoSelection(M.deltas,!1,B))}return this.$fromUndo=!1,B&&this.$undoSelect&&!C&&this.selection.setSelectionRange(B),B}},this.setUndoSelect=function(y){this.$undoSelect=y},this.$getUndoSelection=function(y,C,B){function T(j){return C?j.action!=="insert":j.action==="insert"}var M=y[0],R,I;T(M)?R=f.fromPoints(M.start,M.end):R=f.fromPoints(M.start,M.start);for(var H=1;H<y.length;H++)M=y[H],T(M)?(I=M.start,R.compare(I.row,I.column)==-1&&R.setStart(I),I=M.end,R.compare(I.row,I.column)==1&&R.setEnd(I)):(I=M.start,R.compare(I.row,I.column)==-1&&(R=f.fromPoints(M.start,M.start)));if(B!=null){f.comparePoints(B.start,R.start)===0&&(B.start.column+=R.end.column-R.start.column,B.end.column+=R.end.column-R.start.column);var P=B.compareRange(R);P==1?R.setStart(B.start):P==-1&&R.setEnd(B.end)}return R},this.replace=function(y,C){return this.doc.replace(y,C)},this.moveText=function(y,C,B){var T=this.getTextRange(y),M=this.getFoldsInRange(y),R=f.fromPoints(C,C);if(!B){this.remove(y);var I=y.start.row-y.end.row,H=I?-y.end.column:y.start.column-y.end.column;H&&(R.start.row==y.end.row&&R.start.column>y.end.column&&(R.start.column+=H),R.end.row==y.end.row&&R.end.column>y.end.column&&(R.end.column+=H)),I&&R.start.row>=y.end.row&&(R.start.row+=I,R.end.row+=I)}if(R.end=this.insert(R.start,T),M.length){var P=y.start,j=R.start,I=j.row-P.row,H=j.column-P.column;this.addFolds(M.map(function(N){return N=N.clone(),N.start.row==P.row&&(N.start.column+=H),N.end.row==P.row&&(N.end.column+=H),N.start.row+=I,N.end.row+=I,N}))}return R},this.indentRows=function(y,C,B){B=B.replace(/\t/g,this.getTabString());for(var T=y;T<=C;T++)this.doc.insertInLine({row:T,column:0},B)},this.outdentRows=function(y){for(var C=y.collapseRows(),B=new f(0,0,0,0),T=this.getTabSize(),M=C.start.row;M<=C.end.row;++M){var R=this.getLine(M);B.start.row=M,B.end.row=M;for(var I=0;I<T&&R.charAt(I)==" ";++I);I<T&&R.charAt(I)==" "?(B.start.column=I,B.end.column=I+1):(B.start.column=0,B.end.column=I),this.remove(B)}},this.$moveLines=function(y,C,B){if(y=this.getRowFoldStart(y),C=this.getRowFoldEnd(C),B<0){var T=this.getRowFoldStart(y+B);if(T<0)return 0;var M=T-y}else if(B>0){var T=this.getRowFoldEnd(C+B);if(T>this.doc.getLength()-1)return 0;var M=T-C}else{y=this.$clipRowToDocument(y),C=this.$clipRowToDocument(C);var M=C-y+1}var R=new f(y,0,C,Number.MAX_VALUE),I=this.getFoldsInRange(R).map(function(P){return P=P.clone(),P.start.row+=M,P.end.row+=M,P}),H=B==0?this.doc.getLines(y,C):this.doc.removeFullLines(y,C);return this.doc.insertFullLines(y+M,H),I.length&&this.addFolds(I),M},this.moveLinesUp=function(y,C){return this.$moveLines(y,C,-1)},this.moveLinesDown=function(y,C){return this.$moveLines(y,C,1)},this.duplicateLines=function(y,C){return this.$moveLines(y,C,0)},this.$clipRowToDocument=function(y){return Math.max(0,Math.min(y,this.doc.getLength()-1))},this.$clipColumnToRow=function(y,C){return C<0?0:Math.min(this.doc.getLine(y).length,C)},this.$clipPositionToDocument=function(y,C){if(C=Math.max(0,C),y<0)y=0,C=0;else{var B=this.doc.getLength();y>=B?(y=B-1,C=this.doc.getLine(B-1).length):C=Math.min(this.doc.getLine(y).length,C)}return{row:y,column:C}},this.$clipRangeToDocument=function(y){y.start.row<0?(y.start.row=0,y.start.column=0):y.start.column=this.$clipColumnToRow(y.start.row,y.start.column);var C=this.doc.getLength()-1;return y.end.row>C?(y.end.row=C,y.end.column=this.doc.getLine(C).length):y.end.column=this.$clipColumnToRow(y.end.row,y.end.column),y},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(y){if(y!=this.$useWrapMode){if(this.$useWrapMode=y,this.$modified=!0,this.$resetRowCache(0),y){var C=this.getLength();this.$wrapData=Array(C),this.$updateWrapData(0,C-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(y,C){(this.$wrapLimitRange.min!==y||this.$wrapLimitRange.max!==C)&&(this.$wrapLimitRange={min:y,max:C},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(y,C){var B=this.$wrapLimitRange;B.max<0&&(B={min:C,max:C});var T=this.$constrainWrapLimit(y,B.min,B.max);return T!=this.$wrapLimit&&T>1?(this.$wrapLimit=T,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(y,C,B){return C&&(y=Math.max(C,y)),B&&(y=Math.min(B,y)),y},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(y){this.setWrapLimitRange(y,y)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(y){var C=this.$useWrapMode,B=y.action,T=y.start,M=y.end,R=T.row,I=M.row,H=I-R,P=null;if(this.$updating=!0,H!=0)if(B==="remove"){this[C?"$wrapData":"$rowLengthCache"].splice(R,H);var j=this.$foldData;P=this.getFoldsInRange(y),this.removeFolds(P);var V=this.getFoldLine(M.row),K=0;if(V){V.addRemoveChars(M.row,M.column,T.column-M.column),V.shiftRow(-H);var N=this.getFoldLine(R);N&&N!==V&&(N.merge(V),V=N),K=j.indexOf(V)+1}for(K;K<j.length;K++){var V=j[K];V.start.row>=M.row&&V.shiftRow(-H)}I=R}else{var k=Array(H);k.unshift(R,0);var $=C?this.$wrapData:this.$rowLengthCache;$.splice.apply($,k);var j=this.$foldData,V=this.getFoldLine(R),K=0;if(V){var z=V.range.compareInside(T.row,T.column);z==0?(V=V.split(T.row,T.column),V&&(V.shiftRow(H),V.addRemoveChars(I,0,M.column-T.column))):z==-1&&(V.addRemoveChars(R,0,M.column-T.column),V.shiftRow(H)),K=j.indexOf(V)+1}for(K;K<j.length;K++){var V=j[K];V.start.row>=R&&V.shiftRow(H)}}else{H=Math.abs(y.start.column-y.end.column),B==="remove"&&(P=this.getFoldsInRange(y),this.removeFolds(P),H=-H);var V=this.getFoldLine(R);V&&V.addRemoveChars(R,T.column,H)}return C&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,C?this.$updateWrapData(R,I):this.$updateRowLengthCache(R,I),P},this.$updateRowLengthCache=function(y,C,B){this.$rowLengthCache[y]=null,this.$rowLengthCache[C]=null},this.$updateWrapData=function(y,C){var B=this.doc.getAllLines(),T=this.getTabSize(),M=this.$wrapData,R=this.$wrapLimit,I,H,P=y;for(C=Math.min(C,B.length-1);P<=C;)H=this.getFoldLine(P,H),H?(I=[],H.walk(function(j,V,K,N){var k;if(j!=null){k=this.$getDisplayTokens(j,I.length),k[0]=w;for(var $=1;$<k.length;$++)k[$]=v}else k=this.$getDisplayTokens(B[V].substring(N,K),I.length);I=I.concat(k)}.bind(this),H.end.row,B[H.end.row].length+1),M[H.start.row]=this.$computeWrapSplits(I,R,T),P=H.end.row+1):(I=this.$getDisplayTokens(B[P]),M[P]=this.$computeWrapSplits(I,R,T),P++)};var p=1,m=2,w=3,v=4,A=9,_=10,E=11,b=12;this.$computeWrapSplits=function(y,C,B){if(y.length==0)return[];var T=[],M=y.length,R=0,I=0,H=this.$wrapAsCode,P=this.$indentedSoftWrap,j=C<=Math.max(2*B,8)||P===!1?0:Math.floor(C/2);function V(){var z=0;if(j===0)return z;if(P)for(var U=0;U<y.length;U++){var G=y[U];if(G==_)z+=1;else if(G==E)z+=B;else{if(G==b)continue;break}}return H&&P!==!1&&(z+=B),Math.min(z,j)}function K(z){var U=y.slice(R,z),G=U.length;U.join("").replace(/12/g,function(){G-=1}).replace(/2/g,function(){G-=1}),T.length||(N=V(),T.indent=N),I+=G,T.push(I),R=z}for(var N=0;M-R>C-N;){var k=R+C-N;if(y[k-1]>=_&&y[k]>=_){K(k);continue}if(y[k]==w||y[k]==v){for(k;k!=R-1&&y[k]!=w;k--);if(k>R){K(k);continue}for(k=R+C,k;k<y.length&&y[k]==v;k++);if(k==y.length)break;K(k);continue}for(var $=Math.max(k-(C-(C>>2)),R-1);k>$&&y[k]<w;)k--;if(H){for(;k>$&&y[k]<w;)k--;for(;k>$&&y[k]==A;)k--}else for(;k>$&&y[k]<_;)k--;if(k>$){K(++k);continue}k=R+C,y[k]==m&&k--,K(k-N)}return T},this.$getDisplayTokens=function(y,C){var B=[],T;C=C||0;for(var M=0;M<y.length;M++){var R=y.charCodeAt(M);if(R==9){T=this.getScreenTabSize(B.length+C),B.push(E);for(var I=1;I<T;I++)B.push(b)}else R==32?B.push(_):R>39&&R<48||R>57&&R<64?B.push(A):R>=4352&&x(R)?B.push(p,m):B.push(p)}return B},this.$getStringScreenWidth=function(y,C,B){if(C==0)return[0,0];C==null&&(C=1/0),B=B||0;var T,M;for(M=0;M<y.length&&(T=y.charCodeAt(M),T==9?B+=this.getScreenTabSize(B):T>=4352&&x(T)?B+=2:B+=1,!(B>C));M++);return[B,M]},this.lineWidgets=null,this.getRowLength=function(y){if(this.lineWidgets)var C=this.lineWidgets[y]&&this.lineWidgets[y].rowCount||0;else C=0;return!this.$useWrapMode||!this.$wrapData[y]?1+C:this.$wrapData[y].length+1+C},this.getRowLineCount=function(y){return!this.$useWrapMode||!this.$wrapData[y]?1:this.$wrapData[y].length+1},this.getRowWrapIndent=function(y){if(this.$useWrapMode){var C=this.screenToDocumentPosition(y,Number.MAX_VALUE),B=this.$wrapData[C.row];return B.length&&B[0]<C.column?B.indent:0}else return 0},this.getScreenLastRowColumn=function(y){var C=this.screenToDocumentPosition(y,Number.MAX_VALUE);return this.documentToScreenColumn(C.row,C.column)},this.getDocumentLastRowColumn=function(y,C){var B=this.documentToScreenRow(y,C);return this.getScreenLastRowColumn(B)},this.getDocumentLastRowColumnPosition=function(y,C){var B=this.documentToScreenRow(y,C);return this.screenToDocumentPosition(B,Number.MAX_VALUE/10)},this.getRowSplitData=function(y){if(this.$useWrapMode)return this.$wrapData[y]},this.getScreenTabSize=function(y){return this.$tabSize-y%this.$tabSize},this.screenToDocumentRow=function(y,C){return this.screenToDocumentPosition(y,C).row},this.screenToDocumentColumn=function(y,C){return this.screenToDocumentPosition(y,C).column},this.screenToDocumentPosition=function(y,C,B){if(y<0)return{row:0,column:0};var T,M=0,R=0,I,H=0,P=0,j=this.$screenRowCache,V=this.$getRowCacheIndex(j,y),K=j.length;if(K&&V>=0)var H=j[V],M=this.$docRowCache[V],N=y>j[K-1];else var N=!K;for(var k=this.getLength()-1,$=this.getNextFoldLine(M),z=$?$.start.row:1/0;H<=y&&(P=this.getRowLength(M),!(H+P>y||M>=k));)H+=P,M++,M>z&&(M=$.end.row+1,$=this.getNextFoldLine(M,$),z=$?$.start.row:1/0),N&&(this.$docRowCache.push(M),this.$screenRowCache.push(H));if($&&$.start.row<=M)T=this.getFoldDisplayLine($),M=$.start.row;else{if(H+P<=y||M>k)return{row:k,column:this.getLine(k).length};T=this.getLine(M),$=null}var U=0,G=Math.floor(y-H);if(this.$useWrapMode){var Q=this.$wrapData[M];Q&&(I=Q[G],G>0&&Q.length&&(U=Q.indent,R=Q[G-1]||Q[Q.length-1],T=T.substring(R)))}return B!==void 0&&this.$bidiHandler.isBidiRow(H+G,M,G)&&(C=this.$bidiHandler.offsetToCol(B)),R+=this.$getStringScreenWidth(T,C-U)[1],this.$useWrapMode&&R>=I&&(R=I-1),$?$.idxToPosition(R):{row:M,column:R}},this.documentToScreenPosition=function(y,C){if(typeof C=="undefined")var B=this.$clipPositionToDocument(y.row,y.column);else B=this.$clipPositionToDocument(y,C);y=B.row,C=B.column;var T=0,M=null,R=null;R=this.getFoldAt(y,C,1),R&&(y=R.start.row,C=R.start.column);var I,H=0,P=this.$docRowCache,j=this.$getRowCacheIndex(P,y),V=P.length;if(V&&j>=0)var H=P[j],T=this.$screenRowCache[j],K=y>P[V-1];else var K=!V;for(var N=this.getNextFoldLine(H),k=N?N.start.row:1/0;H<y;){if(H>=k){if(I=N.end.row+1,I>y)break;N=this.getNextFoldLine(I,N),k=N?N.start.row:1/0}else I=H+1;T+=this.getRowLength(H),H=I,K&&(this.$docRowCache.push(H),this.$screenRowCache.push(T))}var $="";N&&H>=k?($=this.getFoldDisplayLine(N,y,C),M=N.start.row):($=this.getLine(y).substring(0,C),M=y);var z=0;if(this.$useWrapMode){var U=this.$wrapData[M];if(U){for(var G=0;$.length>=U[G];)T++,G++;$=$.substring(U[G-1]||0,$.length),z=G>0?U.indent:0}}return{row:T,column:z+this.$getStringScreenWidth($)[0]}},this.documentToScreenColumn=function(y,C){return this.documentToScreenPosition(y,C).column},this.documentToScreenRow=function(y,C){return this.documentToScreenPosition(y,C).row},this.getScreenLength=function(){var y=0,C=null;if(this.$useWrapMode)for(var M=this.$wrapData.length,R=0,T=0,C=this.$foldData[T++],I=C?C.start.row:1/0;R<M;){var H=this.$wrapData[R];y+=H?H.length+1:1,R++,R>I&&(R=C.end.row+1,C=this.$foldData[T++],I=C?C.start.row:1/0)}else{y=this.getLength();for(var B=this.$foldData,T=0;T<B.length;T++)C=B[T],y-=C.end.row-C.start.row}return this.lineWidgets&&(y+=this.$getWidgetScreenLength()),y},this.$setFontMetrics=function(y){!this.$enableVarChar||(this.$getStringScreenWidth=function(C,B,T){if(B===0)return[0,0];B||(B=1/0),T=T||0;var M,R;for(R=0;R<C.length&&(M=C.charAt(R),M===" "?T+=this.getScreenTabSize(T):T+=y.getCharacterWidth(M),!(T>B));R++);return[T,R]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()},this.isFullWidth=x;function x(y){return y<4352?!1:y>=4352&&y<=4447||y>=4515&&y<=4519||y>=4602&&y<=4607||y>=9001&&y<=9002||y>=11904&&y<=11929||y>=11931&&y<=12019||y>=12032&&y<=12245||y>=12272&&y<=12283||y>=12288&&y<=12350||y>=12353&&y<=12438||y>=12441&&y<=12543||y>=12549&&y<=12589||y>=12593&&y<=12686||y>=12688&&y<=12730||y>=12736&&y<=12771||y>=12784&&y<=12830||y>=12832&&y<=12871||y>=12880&&y<=13054||y>=13056&&y<=19903||y>=19968&&y<=42124||y>=42128&&y<=42182||y>=43360&&y<=43388||y>=44032&&y<=55203||y>=55216&&y<=55238||y>=55243&&y<=55291||y>=63744&&y<=64255||y>=65040&&y<=65049||y>=65072&&y<=65106||y>=65108&&y<=65126||y>=65128&&y<=65131||y>=65281&&y<=65376||y>=65504&&y<=65510}}.call(g.prototype),e("./edit_session/folding").Folding.call(g.prototype),e("./edit_session/bracket_match").BracketMatch.call(g.prototype),u.defineOptions(g.prototype,"session",{wrap:{set:function(p){if(!p||p=="off"?p=!1:p=="free"?p=!0:p=="printMargin"?p=-1:typeof p=="string"&&(p=parseInt(p,10)||!1),this.$wrap!=p)if(this.$wrap=p,!p)this.setUseWrapMode(!1);else{var m=typeof p=="number"?p:null;this.setWrapLimitRange(m,m),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(p){p=p=="auto"?this.$mode.type!="text":p!="text",p!=this.$wrapAsCode&&(this.$wrapAsCode=p,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(p){this.$useWorker=p,this.$stopWorker(),p&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(p){isNaN(p)||this.$tabSize===p||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=p,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},overwrite:{set:function(p){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(p){this.doc.setNewLineMode(p)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(p){this.setMode(p)},get:function(){return this.$modeId}}}),t.EditSession=g});ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){var i=e("./lib/lang"),r=e("./lib/oop"),s=e("./range").Range,u=function(){this.$options={}};(function(){this.set=function(c){return r.mixin(this.$options,c),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(c){this.$options=c},this.find=function(c){var a=this.$options,f=this.$matchIterator(c,a);if(!f)return!1;var l=null;return f.forEach(function(h,d,g,p){return l=new s(h,d,g,p),d==p&&a.start&&a.start.start&&a.skipCurrent!=!1&&l.isEqual(a.start)?(l=null,!1):!0}),l},this.findAll=function(c){var a=this.$options;if(!a.needle)return[];this.$assembleRegExp(a);var f=a.range,l=f?c.getLines(f.start.row,f.end.row):c.doc.getAllLines(),h=[],d=a.re;if(a.$isMultiLine){var g=d.length,p=l.length-g,m;e:for(var w=d.offset||0;w<=p;w++){for(var v=0;v<g;v++)if(l[w+v].search(d[v])==-1)continue e;var A=l[w],_=l[w+g-1],E=A.length-A.match(d[0])[0].length,b=_.match(d[g-1])[0].length;m&&m.end.row===w&&m.end.column>E||(h.push(m=new s(w,E,w+g-1,b)),g>2&&(w=w+g-2))}}else for(var x=0;x<l.length;x++)for(var y=i.getMatchOffsets(l[x],d),v=0;v<y.length;v++){var C=y[v];h.push(new s(x,C.offset,x,C.offset+C.length))}if(f){for(var B=f.start.column,T=f.start.column,x=0,v=h.length-1;x<v&&h[x].start.column<B&&h[x].start.row==f.start.row;)x++;for(;x<v&&h[v].end.column>T&&h[v].end.row==f.end.row;)v--;for(h=h.slice(x,v+1),x=0,v=h.length;x<v;x++)h[x].start.row+=f.start.row,h[x].end.row+=f.start.row}return h},this.replace=function(c,a){var f=this.$options,l=this.$assembleRegExp(f);if(f.$isMultiLine)return a;if(!!l){var h=l.exec(c);if(!h||h[0].length!=c.length)return null;if(a=c.replace(l,a),f.preserveCase){a=a.split("");for(var d=Math.min(c.length,c.length);d--;){var g=c[d];g&&g.toLowerCase()!=g?a[d]=a[d].toUpperCase():a[d]=a[d].toLowerCase()}a=a.join("")}return a}},this.$assembleRegExp=function(c,a){if(c.needle instanceof RegExp)return c.re=c.needle;var f=c.needle;if(!c.needle)return c.re=!1;c.regExp||(f=i.escapeRegExp(f)),c.wholeWord&&(f=o(f,c));var l=c.caseSensitive?"gm":"gmi";if(c.$isMultiLine=!a&&/[\n\r]/.test(f),c.$isMultiLine)return c.re=this.$assembleMultilineRegExp(f,l);try{var h=new RegExp(f,l)}catch{h=!1}return c.re=h},this.$assembleMultilineRegExp=function(c,a){for(var f=c.replace(/\r\n|\r|\n/g,`$
|
|
^`).split(`
|
|
`),l=[],h=0;h<f.length;h++)try{l.push(new RegExp(f[h],a))}catch{return!1}return l},this.$matchIterator=function(c,a){var f=this.$assembleRegExp(a);if(!f)return!1;var l=a.backwards==!0,h=a.skipCurrent!=!1,d=a.range,g=a.start;g||(g=d?d[l?"end":"start"]:c.selection.getRange()),g.start&&(g=g[h!=l?"end":"start"]);var p=d?d.start.row:0,m=d?d.end.row:c.getLength()-1;if(l)var w=function(_){var E=g.row;if(!A(E,g.column,_)){for(E--;E>=p;E--)if(A(E,Number.MAX_VALUE,_))return;if(a.wrap!=!1){for(E=m,p=g.row;E>=p;E--)if(A(E,Number.MAX_VALUE,_))return}}};else var w=function(E){var b=g.row;if(!A(b,g.column,E)){for(b=b+1;b<=m;b++)if(A(b,0,E))return;if(a.wrap!=!1){for(b=p,m=g.row;b<=m;b++)if(A(b,0,E))return}}};if(a.$isMultiLine)var v=f.length,A=function(_,E,b){var x=l?_-v+1:_;if(!(x<0)){var y=c.getLine(x),C=y.search(f[0]);if(!(!l&&C<E||C===-1)){for(var B=1;B<v;B++)if(y=c.getLine(x+B),y.search(f[B])==-1)return;var T=y.match(f[v-1])[0].length;if(!(l&&T>E)&&b(x,C,x+v-1,T))return!0}}};else if(l)var A=function(E,b,x){var y=c.getLine(E),C=[],B,T=0;for(f.lastIndex=0;B=f.exec(y);){var M=B[0].length;if(T=B.index,!M){if(T>=y.length)break;f.lastIndex=T+=1}if(B.index+M>b)break;C.push(B.index,M)}for(var R=C.length-1;R>=0;R-=2){var I=C[R-1],M=C[R];if(x(E,I,E,I+M))return!0}};else var A=function(E,b,x){var y=c.getLine(E),C,B=b;for(f.lastIndex=b;C=f.exec(y);){var T=C[0].length;if(B=C.index,x(E,B,E,B+T))return!0;if(!T&&(f.lastIndex=B+=1,B>=y.length))return!1}};return{forEach:w}}}).call(u.prototype);function o(c,a){function f(l){return/\w/.test(l)||a.regExp?"\\b":""}return f(c[0])+c+f(c[c.length-1])}t.Search=u});ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){var i=e("../lib/keys"),r=e("../lib/useragent"),s=i.KEY_MODS;function u(c,a){this.platform=a||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(c),this.$singleCommand=!0}function o(c,a){u.call(this,c,a),this.$singleCommand=!1}o.prototype=u.prototype,function(){this.addCommand=function(a){this.commands[a.name]&&this.removeCommand(a),this.commands[a.name]=a,a.bindKey&&this._buildKeyHash(a)},this.removeCommand=function(a,f){var l=a&&(typeof a=="string"?a:a.name);a=this.commands[l],f||delete this.commands[l];var h=this.commandKeyBinding;for(var d in h){var g=h[d];if(g==a)delete h[d];else if(Array.isArray(g)){var p=g.indexOf(a);p!=-1&&(g.splice(p,1),g.length==1&&(h[d]=g[0]))}}},this.bindKey=function(a,f,l){if(typeof a=="object"&&a&&(l==null&&(l=a.position),a=a[this.platform]),!!a){if(typeof f=="function")return this.addCommand({exec:f,bindKey:a,name:f.name||a});a.split("|").forEach(function(h){var d="";if(h.indexOf(" ")!=-1){var g=h.split(/\s+/);h=g.pop(),g.forEach(function(w){var v=this.parseKeys(w),A=s[v.hashId]+v.key;d+=(d?" ":"")+A,this._addCommandToBinding(d,"chainKeys")},this),d+=" "}var p=this.parseKeys(h),m=s[p.hashId]+p.key;this._addCommandToBinding(d+m,f,l)},this)}};function c(a){return typeof a=="object"&&a.bindKey&&a.bindKey.position||(a.isDefault?-100:0)}this._addCommandToBinding=function(a,f,l){var h=this.commandKeyBinding,d;if(!f)delete h[a];else if(!h[a]||this.$singleCommand)h[a]=f;else{Array.isArray(h[a])?(d=h[a].indexOf(f))!=-1&&h[a].splice(d,1):h[a]=[h[a]],typeof l!="number"&&(l=c(f));var g=h[a];for(d=0;d<g.length;d++){var p=g[d],m=c(p);if(m>l)break}g.splice(d,0,f)}},this.addCommands=function(a){a&&Object.keys(a).forEach(function(f){var l=a[f];if(!!l){if(typeof l=="string")return this.bindKey(l,f);typeof l=="function"&&(l={exec:l}),typeof l=="object"&&(l.name||(l.name=f),this.addCommand(l))}},this)},this.removeCommands=function(a){Object.keys(a).forEach(function(f){this.removeCommand(a[f])},this)},this.bindKeys=function(a){Object.keys(a).forEach(function(f){this.bindKey(f,a[f])},this)},this._buildKeyHash=function(a){this.bindKey(a.bindKey,a)},this.parseKeys=function(a){var f=a.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(m){return m}),l=f.pop(),h=i[l];if(i.FUNCTION_KEYS[h])l=i.FUNCTION_KEYS[h].toLowerCase();else if(f.length){if(f.length==1&&f[0]=="shift")return{key:l.toUpperCase(),hashId:-1}}else return{key:l,hashId:-1};for(var d=0,g=f.length;g--;){var p=i.KEY_MODS[f[g]];if(p==null)return typeof console!="undefined"&&console.error("invalid modifier "+f[g]+" in "+a),!1;d|=p}return{key:l,hashId:d}},this.findKeyCommand=function(f,l){var h=s[f]+l;return this.commandKeyBinding[h]},this.handleKeyboard=function(a,f,l,h){if(!(h<0)){var d=s[f]+l,g=this.commandKeyBinding[d];return a.$keyChain&&(a.$keyChain+=" "+d,g=this.commandKeyBinding[a.$keyChain]||g),g&&(g=="chainKeys"||g[g.length-1]=="chainKeys")?(a.$keyChain=a.$keyChain||d,{command:"null"}):(a.$keyChain&&((!f||f==4)&&l.length==1?a.$keyChain=a.$keyChain.slice(0,-d.length-1):(f==-1||h>0)&&(a.$keyChain="")),{command:g})}},this.getStatusText=function(a,f){return f.$keyChain||""}}.call(u.prototype),t.HashHandler=u,t.MultiHashHandler=o});ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,n){var i=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,s=e("../lib/event_emitter").EventEmitter,u=function(o,c){r.call(this,c,o),this.byName=this.commands,this.setDefaultHandler("exec",function(a){return a.command.exec(a.editor,a.args||{})})};i.inherits(u,r),function(){i.implement(this,s),this.exec=function(o,c,a){if(Array.isArray(o)){for(var f=o.length;f--;)if(this.exec(o[f],c,a))return!0;return!1}if(typeof o=="string"&&(o=this.commands[o]),!o||c&&c.$readOnly&&!o.readOnly||o.isAvailable&&!o.isAvailable(c))return!1;var l={editor:c,command:o,args:a};return l.returnValue=this._emit("exec",l),this._signal("afterExec",l),l.returnValue!==!1},this.toggleRecording=function(o){if(!this.$inReplay)return o&&o._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(c){this.macro.push([c.command,c.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(o){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(o);try{this.$inReplay=!0,this.macro.forEach(function(c){typeof c=="string"?this.exec(c,o):this.exec(c[0],o,c[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(o){return o.map(function(c){return typeof c[0]!="string"&&(c[0]=c[0].name),c[1]||(c=c[0]),c})}}.call(u.prototype),t.CommandManager=u});ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){var i=e("../lib/lang"),r=e("../config"),s=e("../range").Range;function u(o,c){return{win:o,mac:c}}t.commands=[{name:"showSettingsMenu",bindKey:u("Ctrl-,","Command-,"),exec:function(o){r.loadModule("ace/ext/settings_menu",function(c){c.init(o),o.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:u("Alt-E","F4"),exec:function(o){r.loadModule("ace/ext/error_marker",function(c){c.showErrorMarker(o,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:u("Alt-Shift-E","Shift-F4"),exec:function(o){r.loadModule("ace/ext/error_marker",function(c){c.showErrorMarker(o,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:u("Ctrl-A","Command-A"),exec:function(o){o.selectAll()},readOnly:!0},{name:"centerselection",bindKey:u(null,"Ctrl-L"),exec:function(o){o.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:u("Ctrl-L","Command-L"),exec:function(o){var c=parseInt(prompt("Enter line number:"),10);isNaN(c)||o.gotoLine(c)},readOnly:!0},{name:"fold",bindKey:u("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(o){o.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:u("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(o){o.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:u("F2","F2"),exec:function(o){o.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:u("Alt-F2","Alt-F2"),exec:function(o){o.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:u(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:u("Alt-0","Command-Option-0"),exec:function(o){o.session.foldAll(),o.session.unfold(o.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:u("Alt-Shift-0","Command-Option-Shift-0"),exec:function(o){o.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:u("Ctrl-K","Command-G"),exec:function(o){o.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:u("Ctrl-Shift-K","Command-Shift-G"),exec:function(o){o.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:u("Alt-K","Ctrl-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:u("Alt-Shift-K","Ctrl-Shift-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findPrevious()},readOnly:!0},{name:"find",bindKey:u("Ctrl-F","Command-F"),exec:function(o){r.loadModule("ace/ext/searchbox",function(c){c.Search(o)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(o){o.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:u("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(o){o.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:u("Ctrl-Home","Command-Home|Command-Up"),exec:function(o){o.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:u("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(o){o.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:u("Up","Up|Ctrl-P"),exec:function(o,c){o.navigateUp(c.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:u("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(o){o.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:u("Ctrl-End","Command-End|Command-Down"),exec:function(o){o.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:u("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(o){o.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:u("Down","Down|Ctrl-N"),exec:function(o,c){o.navigateDown(c.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:u("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(o){o.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:u("Ctrl-Left","Option-Left"),exec:function(o){o.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:u("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:u("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(o){o.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:u("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(o){o.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:u("Left","Left|Ctrl-B"),exec:function(o,c){o.navigateLeft(c.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:u("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(o){o.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:u("Ctrl-Right","Option-Right"),exec:function(o){o.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:u("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:u("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(o){o.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:u("Shift-Right","Shift-Right"),exec:function(o){o.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:u("Right","Right|Ctrl-F"),exec:function(o,c){o.navigateRight(c.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(o){o.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:u(null,"Option-PageDown"),exec:function(o){o.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:u("PageDown","PageDown|Ctrl-V"),exec:function(o){o.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(o){o.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:u(null,"Option-PageUp"),exec:function(o){o.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(o){o.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:u("Ctrl-Up",null),exec:function(o){o.renderer.scrollBy(0,-2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:u("Ctrl-Down",null),exec:function(o){o.renderer.scrollBy(0,2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:u("Ctrl-Alt-E","Command-Option-E"),exec:function(o){o.commands.toggleRecording(o)},readOnly:!0},{name:"replaymacro",bindKey:u("Ctrl-Shift-E","Command-Shift-E"),exec:function(o){o.commands.replay(o)},readOnly:!0},{name:"jumptomatching",bindKey:u("Ctrl-P","Ctrl-P"),exec:function(o){o.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:u("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(o){o.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:u("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(o){o.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:u(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(o){},readOnly:!0},{name:"cut",exec:function(o){var c=o.getSelectionRange();o._emit("cut",c),o.selection.isEmpty()||(o.session.remove(c),o.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(o,c){o.$handlePaste(c)},scrollIntoView:"cursor"},{name:"removeline",bindKey:u("Ctrl-D","Command-D"),exec:function(o){o.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:u("Ctrl-Shift-D","Command-Shift-D"),exec:function(o){o.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:u("Ctrl-Alt-S","Command-Alt-S"),exec:function(o){o.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:u("Ctrl-/","Command-/"),exec:function(o){o.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:u("Ctrl-Shift-/","Command-Shift-/"),exec:function(o){o.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:u("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(o){o.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:u("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(o){o.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:u("Ctrl-H","Command-Option-F"),exec:function(o){r.loadModule("ace/ext/searchbox",function(c){c.Search(o,!0)})}},{name:"undo",bindKey:u("Ctrl-Z","Command-Z"),exec:function(o){o.undo()}},{name:"redo",bindKey:u("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(o){o.redo()}},{name:"copylinesup",bindKey:u("Alt-Shift-Up","Command-Option-Up"),exec:function(o){o.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:u("Alt-Up","Option-Up"),exec:function(o){o.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:u("Alt-Shift-Down","Command-Option-Down"),exec:function(o){o.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:u("Alt-Down","Option-Down"),exec:function(o){o.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:u("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(o){o.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:u("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(o){o.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:u("Shift-Delete",null),exec:function(o){if(o.selection.isEmpty())o.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:u("Alt-Backspace","Command-Backspace"),exec:function(o){o.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:u("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(o){o.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",bindKey:u("Ctrl-Shift-Backspace",null),exec:function(o){var c=o.selection.getRange();c.start.column=0,o.session.remove(c)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",bindKey:u("Ctrl-Shift-Delete",null),exec:function(o){var c=o.selection.getRange();c.end.column=Number.MAX_VALUE,o.session.remove(c)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:u("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(o){o.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:u("Ctrl-Delete","Alt-Delete"),exec:function(o){o.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:u("Shift-Tab","Shift-Tab"),exec:function(o){o.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:u("Tab","Tab"),exec:function(o){o.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:u("Ctrl-[","Ctrl-["),exec:function(o){o.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:u("Ctrl-]","Ctrl-]"),exec:function(o){o.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(o,c){o.insert(c)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(o,c){o.insert(i.stringRepeat(c.text||"",c.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:u(null,"Ctrl-O"),exec:function(o){o.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:u("Alt-Shift-X","Ctrl-T"),exec:function(o){o.transposeLetters()},multiSelectAction:function(o){o.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:u("Ctrl-U","Ctrl-U"),exec:function(o){o.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:u("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(o){o.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:u("Ctrl-Shift-L","Command-Shift-L"),exec:function(o){var c=o.selection.getRange();c.start.column=c.end.column=0,c.end.row++,o.selection.setRange(c,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:u(null,null),exec:function(o){for(var c=o.selection.isBackwards(),a=c?o.selection.getSelectionLead():o.selection.getSelectionAnchor(),f=c?o.selection.getSelectionAnchor():o.selection.getSelectionLead(),l=o.session.doc.getLine(a.row).length,h=o.session.doc.getTextRange(o.selection.getRange()),d=h.replace(/\n\s*/," ").length,g=o.session.doc.getLine(a.row),p=a.row+1;p<=f.row+1;p++){var m=i.stringTrimLeft(i.stringTrimRight(o.session.doc.getLine(p)));m.length!==0&&(m=" "+m),g+=m}f.row+1<o.session.doc.getLength()-1&&(g+=o.session.doc.getNewLineCharacter()),o.clearSelection(),o.session.doc.replace(new s(a.row,0,f.row+2,0),g),d>0?(o.selection.moveCursorTo(a.row,a.column),o.selection.selectTo(a.row,a.column+d)):(l=o.session.doc.getLine(a.row).length>l?l+1:l,o.selection.moveCursorTo(a.row,l))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:u(null,null),exec:function(o){var c=o.session.doc.getLength()-1,a=o.session.doc.getLine(c).length,f=o.selection.rangeList.ranges,l=[];f.length<1&&(f=[o.selection.getRange()]);for(var h=0;h<f.length;h++)h==f.length-1&&(f[h].end.row===c&&f[h].end.column===a||l.push(new s(f[h].end.row,f[h].end.column,c,a))),h===0?f[h].start.row===0&&f[h].start.column===0||l.push(new s(0,0,f[h].start.row,f[h].start.column)):l.push(new s(f[h-1].end.row,f[h-1].end.column,f[h].start.row,f[h].start.column));o.exitMultiSelectMode(),o.clearSelection();for(var h=0;h<l.length;h++)o.selection.addRange(l[h],!1)},readOnly:!0,scrollIntoView:"none"}]});ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"],function(e,t,n){e("./lib/fixoldbrowsers");var i=e("./lib/oop"),r=e("./lib/dom"),s=e("./lib/lang"),u=e("./lib/useragent"),o=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,a=e("./mouse/fold_handler").FoldHandler,f=e("./keyboard/keybinding").KeyBinding,l=e("./edit_session").EditSession,h=e("./search").Search,d=e("./range").Range,g=e("./lib/event_emitter").EventEmitter,p=e("./commands/command_manager").CommandManager,m=e("./commands/default_commands").commands,w=e("./config"),v=e("./token_iterator").TokenIterator,A=function(_,E){var b=_.getContainerElement();this.container=b,this.renderer=_,this.id="editor"+ ++A.$uid,this.commands=new p(u.isMac?"mac":"win",m),typeof document=="object"&&(this.textInput=new o(_.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new a(this)),this.keyBinding=new f(this),this.$blockScrolling=0,this.$search=new h().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(x,y){y._$emitInputEvent.schedule(31)}),this.setSession(E||new l("")),w.resetOptions(this),w._signal("editor",this)};A.$uid=0,function(){i.implement(this,g),this.$initOperationListeners=function(){this.selections=[],this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(_){if(this.curOp){if(!_||this.curOp.command)return;this.prevOp=this.curOp}_||(this.previousCommand=null,_={}),this.$opResetTimer.schedule(),this.curOp={command:_.command||{},args:_.args,scrollTop:this.renderer.scrollTop},this.curOp.command.name&&this.curOp.command.scrollIntoView!==void 0&&this.$blockScrolling++},this.endOperation=function(_){if(this.curOp){if(_&&_.returnValue===!1)return this.curOp=null;this._signal("beforeEndOperation");var E=this.curOp.command;E.name&&this.$blockScrolling>0&&this.$blockScrolling--;var b=E&&E.scrollIntoView;if(b){switch(b){case"center-animate":b="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var x=this.selection.getRange(),y=this.renderer.layerConfig;(x.start.row>=y.lastRow||x.end.row<=y.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}b=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(_){if(!!this.$mergeUndoDeltas){var E=this.prevOp,b=this.$mergeableCommands,x=E.command&&_.command.name==E.command.name;if(_.command.name=="insertstring"){var y=_.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),x=x&&this.mergeNextCommand&&(!/\s/.test(y)||/\s/.test(E.args)),this.mergeNextCommand=!0}else x=x&&b.indexOf(_.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(x=!1),x?this.session.mergeUndoDeltas=!0:b.indexOf(_.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(_,E){if(_&&typeof _=="string"){this.$keybindingId=_;var b=this;w.loadModule(["keybinding",_],function(x){b.$keybindingId==_&&b.keyBinding.setKeyboardHandler(x&&x.handler),E&&E()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(_),E&&E()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(_){if(this.session!=_){this.curOp&&this.endOperation(),this.curOp={};var E=this.session;if(E){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var b=this.session.getSelection();b.off("changeCursor",this.$onCursorChange),b.off("changeSelection",this.$onSelectionChange)}this.session=_,_?(this.$onDocumentChange=this.onDocumentChange.bind(this),_.on("change",this.$onDocumentChange),this.renderer.setSession(_),this.$onChangeMode=this.onChangeMode.bind(this),_.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),_.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),_.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),_.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),_.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),_.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=_.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(_)),this._signal("changeSession",{session:_,oldSession:E}),this.curOp=null,E&&E._signal("changeEditor",{oldEditor:this}),_&&_._signal("changeEditor",{editor:this}),_&&_.bgTokenizer&&_.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(_,E){return this.session.doc.setValue(_),E?E==1?this.navigateFileEnd():E==-1&&this.navigateFileStart():this.selectAll(),_},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(_){this.renderer.onResize(_)},this.setTheme=function(_,E){this.renderer.setTheme(_,E)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(_){this.renderer.setStyle(_)},this.unsetStyle=function(_){this.renderer.unsetStyle(_)},this.getFontSize=function(){return this.getOption("fontSize")||r.computedStyle(this.container,"fontSize")},this.setFontSize=function(_){this.setOption("fontSize",_)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var _=this;this.$highlightPending=!0,setTimeout(function(){_.$highlightPending=!1;var E=_.session;if(!(!E||!E.bgTokenizer)){var b=E.findMatchingBracket(_.getCursorPosition());if(b)var x=new d(b.row,b.column,b.row,b.column+1);else if(E.$mode.getMatching)var x=E.$mode.getMatching(_.session);x&&(E.$bracketHighlight=E.addMarker(x,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var _=this;this.$highlightTagPending=!0,setTimeout(function(){_.$highlightTagPending=!1;var E=_.session;if(!(!E||!E.bgTokenizer)){var b=_.getCursorPosition(),x=new v(_.session,b.row,b.column),y=x.getCurrentToken();if(!y||!/\b(?:tag-open|tag-name)/.test(y.type)){E.removeMarker(E.$tagHighlight),E.$tagHighlight=null;return}if(!(y.type.indexOf("tag-open")!=-1&&(y=x.stepForward(),!y))){var C=y.value,B=0,T=x.stepBackward();if(T.value=="<")do T=y,y=x.stepForward(),y&&y.value===C&&y.type.indexOf("tag-name")!==-1&&(T.value==="<"?B++:T.value==="</"&&B--);while(y&&B>=0);else{do y=T,T=x.stepBackward(),y&&y.value===C&&y.type.indexOf("tag-name")!==-1&&(T.value==="<"?B++:T.value==="</"&&B--);while(T&&B<=0);x.stepForward()}if(!y){E.removeMarker(E.$tagHighlight),E.$tagHighlight=null;return}var M=x.getCurrentTokenRow(),R=x.getCurrentTokenColumn(),I=new d(M,R,M,R+y.value.length),H=E.$backMarkers[E.$tagHighlight];E.$tagHighlight&&H!=null&&I.compareRange(H.range)!==0&&(E.removeMarker(E.$tagHighlight),E.$tagHighlight=null),I&&!E.$tagHighlight&&(E.$tagHighlight=E.addMarker(I,"ace_bracket","text"))}}},50)}},this.focus=function(){var _=this;setTimeout(function(){_.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(_){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",_))},this.onBlur=function(_){!this.$isFocused||(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",_))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(_){var E=this.session.$useWrapMode,b=_.start.row==_.end.row?_.end.row:1/0;this.renderer.updateLines(_.start.row,b,E),this._signal("change",_),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(_){var E=_.data;this.renderer.updateLines(E.first,E.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||(w.warn("Automatically scrolling cursor into view after selection change","this will be disabled in the next version","set editor.$blockScrolling = Infinity to disable this message"),this.renderer.scrollCursorIntoView()),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var _=this.getSession(),E;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(E=this.getCursorPosition()),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(E=!1)),_.$highlightLineMarker&&!E)_.removeMarker(_.$highlightLineMarker.id),_.$highlightLineMarker=null;else if(!_.$highlightLineMarker&&E){var b=new d(E.row,E.column,E.row,1/0);b.id=_.addMarker(b,"ace_active-line","screenLine"),_.$highlightLineMarker=b}else E&&(_.$highlightLineMarker.start.row=E.row,_.$highlightLineMarker.end.row=E.row,_.$highlightLineMarker.start.column=E.column,_._signal("changeBackMarker"))},this.onSelectionChange=function(_){var E=this.session;if(E.$selectionMarker&&E.removeMarker(E.$selectionMarker),E.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var b=this.selection.getRange(),x=this.getSelectionStyle();E.$selectionMarker=E.addMarker(b,"ace_selection",x)}var y=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(y),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var _=this.session,E=this.getSelectionRange();if(!(E.isEmpty()||E.isMultiLine())){var b=E.start.column-1,x=E.end.column+1,y=_.getLine(E.start.row),C=y.length,B=y.substring(Math.max(b,0),Math.min(x,C));if(!(b>=0&&/^[\w\d]/.test(B)||x<=C&&/[\w\d]$/.test(B))&&(B=y.substring(E.start.column,E.end.column),!!/^[\w\d]+$/.test(B))){var T=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:B});return T}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(_){this.renderer.updateText(),this._emit("changeMode",_)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var _=this.getSelectedText();return this._signal("copy",_),_},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(_,E){var b={text:_,event:E};this.commands.exec("paste",this,b)},this.$handlePaste=function(_){typeof _=="string"&&(_={text:_}),this._signal("paste",_);var E=_.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(E);else{var b=E.split(/\r\n|\r|\n/),x=this.selection.rangeList.ranges;if(b.length>x.length||b.length<2||!b[1])return this.commands.exec("insertstring",this,E);for(var y=x.length;y--;){var C=x[y];C.isEmpty()||this.session.remove(C),this.session.insert(C.start,b[y])}}},this.execCommand=function(_,E){return this.commands.exec(_,this,E)},this.insert=function(_,E){var b=this.session,x=b.getMode(),y=this.getCursorPosition();if(this.getBehavioursEnabled()&&!E){var C=x.transformAction(b.getState(y.row),"insertion",this,b,_);C&&(_!==C.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),_=C.text)}if(_==" "&&(_=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&_.indexOf(`
|
|
`)==-1){var B=new d.fromPoints(y,y);B.end.column+=_.length,this.session.remove(B)}}else{var B=this.getSelectionRange();y=this.session.remove(B),this.clearSelection()}if(_==`
|
|
`||_==`\r
|
|
`){var I=b.getLine(y.row);if(y.column>I.search(/\S|$/)){var T=I.substr(y.column).search(/\S|$/);b.doc.removeInLine(y.row,y.column,y.column+T)}}this.clearSelection();var M=y.column,R=b.getState(y.row),I=b.getLine(y.row),H=x.checkOutdent(R,I,_);if(b.insert(y,_),C&&C.selection&&(C.selection.length==2?this.selection.setSelectionRange(new d(y.row,M+C.selection[0],y.row,M+C.selection[1])):this.selection.setSelectionRange(new d(y.row+C.selection[0],C.selection[1],y.row+C.selection[2],C.selection[3]))),b.getDocument().isNewLine(_)){var P=x.getNextLineIndent(R,I.slice(0,y.column),b.getTabString());b.insert({row:y.row+1,column:0},P)}H&&x.autoOutdent(R,b,y.row)},this.onTextInput=function(_){this.keyBinding.onTextInput(_)},this.onCommandKey=function(_,E,b){this.keyBinding.onCommandKey(_,E,b)},this.setOverwrite=function(_){this.session.setOverwrite(_)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(_){this.setOption("scrollSpeed",_)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(_){this.setOption("dragDelay",_)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(_){this.setOption("selectionStyle",_)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(_){this.setOption("highlightActiveLine",_)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(_){this.setOption("highlightGutterLine",_)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(_){this.setOption("highlightSelectedWord",_)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(_){this.renderer.setAnimatedScroll(_)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(_){this.renderer.setShowInvisibles(_)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(_){this.renderer.setDisplayIndentGuides(_)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(_){this.renderer.setShowPrintMargin(_)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(_){this.renderer.setPrintMarginColumn(_)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(_){this.setOption("readOnly",_)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(_){this.setOption("behavioursEnabled",_)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(_){this.setOption("wrapBehavioursEnabled",_)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(_){this.setOption("showFoldWidgets",_)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(_){this.setOption("fadeFoldWidgets",_)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(_){this.selection.isEmpty()&&(_=="left"?this.selection.selectLeft():this.selection.selectRight());var E=this.getSelectionRange();if(this.getBehavioursEnabled()){var b=this.session,x=b.getState(E.start.row),y=b.getMode().transformAction(x,"deletion",this,b,E);if(E.end.column===0){var C=b.getTextRange(E);if(C[C.length-1]==`
|
|
`){var B=b.getLine(E.end.row);/^\s+$/.test(B)&&(E.end.column=B.length)}}y&&(E=y)}this.session.remove(E),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var _=this.getSelectionRange();_.start.column==_.end.column&&_.start.row==_.end.row&&(_.end.column=0,_.end.row++),this.session.remove(_),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var _=this.getCursorPosition();this.insert(`
|
|
`),this.moveCursorToPosition(_)},this.transposeLetters=function(){if(!!this.selection.isEmpty()){var _=this.getCursorPosition(),E=_.column;if(E!==0){var b=this.session.getLine(_.row),x,y;E<b.length?(x=b.charAt(E)+b.charAt(E-1),y=new d(_.row,E-1,_.row,E+1)):(x=b.charAt(E-1)+b.charAt(E-2),y=new d(_.row,E-2,_.row,E)),this.session.replace(y,x),this.session.selection.moveToPosition(y.end)}}},this.toLowerCase=function(){var _=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var E=this.getSelectionRange(),b=this.session.getTextRange(E);this.session.replace(E,b.toLowerCase()),this.selection.setSelectionRange(_)},this.toUpperCase=function(){var _=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var E=this.getSelectionRange(),b=this.session.getTextRange(E);this.session.replace(E,b.toUpperCase()),this.selection.setSelectionRange(_)},this.indent=function(){var _=this.session,E=this.getSelectionRange();if(E.start.row<E.end.row){var b=this.$getSelectedRows();_.indentRows(b.first,b.last," ");return}else if(E.start.column<E.end.column){var x=_.getTextRange(E);if(!/^\s+$/.test(x)){var b=this.$getSelectedRows();_.indentRows(b.first,b.last," ");return}}var y=_.getLine(E.start.row),C=E.start,B=_.getTabSize(),T=_.documentToScreenColumn(C.row,C.column);if(this.session.getUseSoftTabs())var M=B-T%B,R=s.stringRepeat(" ",M);else{for(var M=T%B;y[E.start.column-1]==" "&&M;)E.start.column--,M--;this.selection.setSelectionRange(E),R=" "}return this.insert(R)},this.blockIndent=function(){var _=this.$getSelectedRows();this.session.indentRows(_.first,_.last," ")},this.blockOutdent=function(){var _=this.session.getSelection();this.session.outdentRows(_.getRange())},this.sortLines=function(){for(var _=this.$getSelectedRows(),E=this.session,b=[],x=_.first;x<=_.last;x++)b.push(E.getLine(x));b.sort(function(B,T){return B.toLowerCase()<T.toLowerCase()?-1:B.toLowerCase()>T.toLowerCase()?1:0});for(var y=new d(0,0,0,0),x=_.first;x<=_.last;x++){var C=E.getLine(x);y.start.row=x,y.end.row=x,y.end.column=C.length,E.replace(y,b[x-_.first])}},this.toggleCommentLines=function(){var _=this.session.getState(this.getCursorPosition().row),E=this.$getSelectedRows();this.session.getMode().toggleCommentLines(_,this.session,E.first,E.last)},this.toggleBlockComment=function(){var _=this.getCursorPosition(),E=this.session.getState(_.row),b=this.getSelectionRange();this.session.getMode().toggleBlockComment(E,this.session,b,_)},this.getNumberAt=function(_,E){var b=/[\-]?[0-9]+(?:\.[0-9]+)?/g;b.lastIndex=0;for(var x=this.session.getLine(_);b.lastIndex<E;){var y=b.exec(x);if(y.index<=E&&y.index+y[0].length>=E){var C={value:y[0],start:y.index,end:y.index+y[0].length};return C}}return null},this.modifyNumber=function(_){var E=this.selection.getCursor().row,b=this.selection.getCursor().column,x=new d(E,b-1,E,b),y=this.session.getTextRange(x);if(!isNaN(parseFloat(y))&&isFinite(y)){var C=this.getNumberAt(E,b);if(C){var B=C.value.indexOf(".")>=0?C.start+C.value.indexOf(".")+1:C.end,T=C.start+C.value.length-B,M=parseFloat(C.value);M*=Math.pow(10,T),B!==C.end&&b<B?_*=Math.pow(10,C.end-b-1):_*=Math.pow(10,C.end-b),M+=_,M/=Math.pow(10,T);var R=M.toFixed(T),I=new d(E,C.start,E,C.end);this.session.replace(I,R),this.moveCursorTo(E,Math.max(C.start+1,b+R.length-C.value.length))}}},this.removeLines=function(){var _=this.$getSelectedRows();this.session.removeFullLines(_.first,_.last),this.clearSelection()},this.duplicateSelection=function(){var _=this.selection,E=this.session,b=_.getRange(),x=_.isBackwards();if(b.isEmpty()){var y=b.start.row;E.duplicateLines(y,y)}else{var C=x?b.start:b.end,B=E.insert(C,E.getTextRange(b),!1);b.start=C,b.end=B,_.setSelectionRange(b,x)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(_,E,b){return this.session.moveText(_,E,b)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(_,E){var b,x,y=this.selection;if(!y.inMultiSelectMode||this.inVirtualSelectionMode){var C=y.toOrientedRange();b=this.$getSelectedRows(C),x=this.session.$moveLines(b.first,b.last,E?0:_),E&&_==-1&&(x=0),C.moveBy(x,0),y.fromOrientedRange(C)}else{var B=y.rangeList.ranges;y.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var T=0,M=0,R=B.length,I=0;I<R;I++){var H=I;B[I].moveBy(T,0),b=this.$getSelectedRows(B[I]);for(var P=b.first,j=b.last;++I<R;){M&&B[I].moveBy(M,0);var V=this.$getSelectedRows(B[I]);if(E&&V.first!=j)break;if(!E&&V.first>j+1)break;j=V.last}for(I--,T=this.session.$moveLines(P,j,E?0:_),E&&_==-1&&(H=I+1);H<=I;)B[H].moveBy(T,0),H++;E||(T=0),M+=T}y.fromOrientedRange(y.ranges[0]),y.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(_){return _=(_||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(_.start.row),last:this.session.getRowFoldEnd(_.end.row)}},this.onCompositionStart=function(_){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(_){this.renderer.setCompositionText(_)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(_){return _>=this.getFirstVisibleRow()&&_<=this.getLastVisibleRow()},this.isRowFullyVisible=function(_){return _>=this.renderer.getFirstFullyVisibleRow()&&_<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(_,E){var b=this.renderer,x=this.renderer.layerConfig,y=_*Math.floor(x.height/x.lineHeight);this.$blockScrolling++,E===!0?this.selection.$moveSelection(function(){this.moveCursorBy(y,0)}):E===!1&&(this.selection.moveCursorBy(y,0),this.selection.clearSelection()),this.$blockScrolling--;var C=b.scrollTop;b.scrollBy(0,y*x.lineHeight),E!=null&&b.scrollCursorIntoView(null,.5),b.animateScrolling(C)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(_){this.renderer.scrollToRow(_)},this.scrollToLine=function(_,E,b,x){this.renderer.scrollToLine(_,E,b,x)},this.centerSelection=function(){var _=this.getSelectionRange(),E={row:Math.floor(_.start.row+(_.end.row-_.start.row)/2),column:Math.floor(_.start.column+(_.end.column-_.start.column)/2)};this.renderer.alignCursor(E,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(_,E){this.selection.moveCursorTo(_,E)},this.moveCursorToPosition=function(_){this.selection.moveCursorToPosition(_)},this.jumpToMatching=function(_,E){var b=this.getCursorPosition(),x=new v(this.session,b.row,b.column),y=x.getCurrentToken(),C=y||x.stepForward();if(!!C){var B,T=!1,M={},R=b.column-C.start,I,H={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(C.value.match(/[{}()\[\]]/g)){for(;R<C.value.length&&!T;R++)if(!!H[C.value[R]])switch(I=H[C.value[R]]+"."+C.type.replace("rparen","lparen"),isNaN(M[I])&&(M[I]=0),C.value[R]){case"(":case"[":case"{":M[I]++;break;case")":case"]":case"}":M[I]--,M[I]===-1&&(B="bracket",T=!0);break}}else C&&C.type.indexOf("tag-name")!==-1&&(isNaN(M[C.value])&&(M[C.value]=0),y.value==="<"?M[C.value]++:y.value==="</"&&M[C.value]--,M[C.value]===-1&&(B="tag",T=!0));T||(y=C,C=x.stepForward(),R=0)}while(C&&!T);if(!!B){var P,j;if(B==="bracket")P=this.session.getBracketRange(b),P||(P=new d(x.getCurrentTokenRow(),x.getCurrentTokenColumn()+R-1,x.getCurrentTokenRow(),x.getCurrentTokenColumn()+R-1),j=P.start,(E||j.row===b.row&&Math.abs(j.column-b.column)<2)&&(P=this.session.getBracketRange(j)));else if(B==="tag"){if(C&&C.type.indexOf("tag-name")!==-1)var V=C.value;else return;if(P=new d(x.getCurrentTokenRow(),x.getCurrentTokenColumn()-2,x.getCurrentTokenRow(),x.getCurrentTokenColumn()-2),P.compare(b.row,b.column)===0){T=!1;do C=y,y=x.stepBackward(),y&&(y.type.indexOf("tag-close")!==-1&&P.setEnd(x.getCurrentTokenRow(),x.getCurrentTokenColumn()+1),C.value===V&&C.type.indexOf("tag-name")!==-1&&(y.value==="<"?M[V]++:y.value==="</"&&M[V]--,M[V]===0&&(T=!0)));while(y&&!T)}C&&C.type.indexOf("tag-name")&&(j=P.start,j.row==b.row&&Math.abs(j.column-b.column)<2&&(j=P.end))}j=P&&P.cursor||j,j&&(_?P&&E?this.selection.setRange(P):P&&P.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(j.row,j.column):this.selection.moveTo(j.row,j.column))}}},this.gotoLine=function(_,E,b){this.selection.clearSelection(),this.session.unfold({row:_-1,column:E||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(_-1,E||0),this.$blockScrolling-=1,this.isRowFullyVisible(_-1)||this.scrollToLine(_-1,!0,b)},this.navigateTo=function(_,E){this.selection.moveTo(_,E)},this.navigateUp=function(_){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var E=this.selection.anchor.getPosition();return this.moveCursorToPosition(E)}this.selection.clearSelection(),this.selection.moveCursorBy(-_||-1,0)},this.navigateDown=function(_){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var E=this.selection.anchor.getPosition();return this.moveCursorToPosition(E)}this.selection.clearSelection(),this.selection.moveCursorBy(_||1,0)},this.navigateLeft=function(_){if(this.selection.isEmpty())for(_=_||1;_--;)this.selection.moveCursorLeft();else{var E=this.getSelectionRange().start;this.moveCursorToPosition(E)}this.clearSelection()},this.navigateRight=function(_){if(this.selection.isEmpty())for(_=_||1;_--;)this.selection.moveCursorRight();else{var E=this.getSelectionRange().end;this.moveCursorToPosition(E)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(_,E){E&&this.$search.set(E);var b=this.$search.find(this.session),x=0;return b&&(this.$tryReplace(b,_)&&(x=1),b!==null&&(this.selection.setSelectionRange(b),this.renderer.scrollSelectionIntoView(b.start,b.end))),x},this.replaceAll=function(_,E){E&&this.$search.set(E);var b=this.$search.findAll(this.session),x=0;if(!b.length)return x;this.$blockScrolling+=1;var y=this.getSelectionRange();this.selection.moveTo(0,0);for(var C=b.length-1;C>=0;--C)this.$tryReplace(b[C],_)&&x++;return this.selection.setSelectionRange(y),this.$blockScrolling-=1,x},this.$tryReplace=function(_,E){var b=this.session.getTextRange(_);return E=this.$search.replace(b,E),E!==null?(_.end=this.session.replace(_,E),_):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(_,E,b){E||(E={}),typeof _=="string"||_ instanceof RegExp?E.needle=_:typeof _=="object"&&i.mixin(E,_);var x=this.selection.getRange();E.needle==null&&(_=this.session.getTextRange(x)||this.$search.$options.needle,_||(x=this.session.getWordRange(x.start.row,x.start.column),_=this.session.getTextRange(x)),this.$search.set({needle:_})),this.$search.set(E),E.start||this.$search.set({start:x});var y=this.$search.find(this.session);if(E.preventScroll)return y;if(y)return this.revealRange(y,b),y;E.backwards?x.start=x.end:x.end=x.start,this.selection.setRange(x)},this.findNext=function(_,E){this.find({skipCurrent:!0,backwards:!1},_,E)},this.findPrevious=function(_,E){this.find(_,{skipCurrent:!0,backwards:!0},E)},this.revealRange=function(_,E){this.$blockScrolling+=1,this.session.unfold(_),this.selection.setSelectionRange(_),this.$blockScrolling-=1;var b=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(_.start,_.end,.5),E!==!1&&this.renderer.animateScrolling(b)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(_){if(!!_){var E,b=this,x=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var y=this.$scrollAnchor;y.style.cssText="position:absolute",this.container.insertBefore(y,this.container.firstChild);var C=this.on("changeSelection",function(){x=!0}),B=this.renderer.on("beforeRender",function(){x&&(E=b.renderer.container.getBoundingClientRect())}),T=this.renderer.on("afterRender",function(){if(x&&E&&(b.isFocused()||b.searchBox&&b.searchBox.isFocused())){var M=b.renderer,R=M.$cursorLayer.$pixelPos,I=M.layerConfig,H=R.top-I.offset;R.top>=0&&H+E.top<0?x=!0:R.top<I.height&&R.top+E.top+I.lineHeight>window.innerHeight?x=!1:x=null,x!=null&&(y.style.top=H+"px",y.style.left=R.left+"px",y.style.height=I.lineHeight+"px",y.scrollIntoView(x)),x=E=null}});this.setAutoScrollEditorIntoView=function(M){M||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",C),this.renderer.off("afterRender",T),this.renderer.off("beforeRender",B))}}},this.$resetCursorStyle=function(){var _=this.$cursorStyle||"ace",E=this.renderer.$cursorLayer;!E||(E.setSmoothBlinking(/smooth/.test(_)),E.isBlinking=!this.$readOnly&&_!="wide",r.setCssClass(E.element,"ace_slim-cursors",/slim/.test(_)))}}.call(A.prototype),w.defineOptions(A.prototype,"editor",{selectionStyle:{set:function(_){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:_})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(_){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(_){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(_){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(_){this.setAutoScrollEditorIntoView(_)}},keyboardHandler:{set:function(_){this.setKeyboardHandler(_)},get:function(){return this.keybindingId},handlesSet:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),t.Editor=A});ace.define("ace/undomanager",["require","exports","module"],function(e,t,n){var i=function(){this.reset()};(function(){this.execute=function(o){var c=o.args[0];this.$doc=o.args[1],o.merge&&this.hasUndo()&&(this.dirtyCounter--,c=this.$undoStack.pop().concat(c)),this.$undoStack.push(c),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(o){var c=this.$undoStack.pop(),a=null;return c&&(a=this.$doc.undoChanges(c,o),this.$redoStack.push(c),this.dirtyCounter--),a},this.redo=function(o){var c=this.$redoStack.pop(),a=null;return c&&(a=this.$doc.redoChanges(this.$deserializeDeltas(c),o),this.$undoStack.push(c),this.dirtyCounter++),a},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return this.dirtyCounter===0},this.$serializeDeltas=function(o){return u(o,r)},this.$deserializeDeltas=function(o){return u(o,s)};function r(o){return{action:o.action,start:o.start,end:o.end,lines:o.lines.length==1?null:o.lines,text:o.lines.length==1?o.lines[0]:null}}function s(o){return{action:o.action,start:o.start,end:o.end,lines:o.lines||[o.text]}}function u(o,c){for(var a=new Array(o.length),f=0;f<o.length;f++){for(var l=o[f],h={group:l.group,deltas:new Array(l.length)},d=0;d<l.deltas.length;d++){var g=l.deltas[d];h.deltas[d]=c(g)}a[f]=h}return a}}).call(i.prototype),t.UndoManager=i});ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,t,n){var i=e("../lib/dom"),r=e("../lib/oop"),s=e("../lib/lang"),u=e("../lib/event_emitter").EventEmitter,o=function(c){this.element=i.createElement("div"),this.element.className="ace_layer ace_gutter-layer",c.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){r.implement(this,u),this.setSession=function(c){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=c,c&&c.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(c,a){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(c,a)},this.removeGutterDecoration=function(c,a){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(c,a)},this.setAnnotations=function(c){this.$annotations=[];for(var a=0;a<c.length;a++){var f=c[a],l=f.row,h=this.$annotations[l];h||(h=this.$annotations[l]={text:[]});var d=f.text;d=d?s.escapeHTML(d):f.html||"",h.text.indexOf(d)===-1&&h.text.push(d);var g=f.type;g=="error"?h.className=" ace_error":g=="warning"&&h.className!=" ace_error"?h.className=" ace_warning":g=="info"&&!h.className&&(h.className=" ace_info")}},this.$updateAnnotations=function(c){if(!!this.$annotations.length){var a=c.start.row,f=c.end.row-a;if(f!==0)if(c.action=="remove")this.$annotations.splice(a,f+1,null);else{var l=new Array(f+1);l.unshift(a,1),this.$annotations.splice.apply(this.$annotations,l)}}},this.update=function(c){for(var a=this.session,f=c.firstRow,l=Math.min(c.lastRow+c.gutterOffset,a.getLength()-1),h=a.getNextFoldLine(f),d=h?h.start.row:1/0,g=this.$showFoldWidgets&&a.foldWidgets,p=a.$breakpoints,m=a.$decorations,w=a.$firstLineNumber,v=0,A=a.gutterRenderer||this.$renderer,_=null,E=-1,b=f;;){if(b>d&&(b=h.end.row+1,h=a.getNextFoldLine(b,h),d=h?h.start.row:1/0),b>l){for(;this.$cells.length>E+1;)_=this.$cells.pop(),this.element.removeChild(_.element);break}_=this.$cells[++E],_||(_={element:null,textNode:null,foldWidget:null},_.element=i.createElement("div"),_.textNode=document.createTextNode(""),_.element.appendChild(_.textNode),this.element.appendChild(_.element),this.$cells[E]=_);var x="ace_gutter-cell ";p[b]&&(x+=p[b]),m[b]&&(x+=m[b]),this.$annotations[b]&&(x+=this.$annotations[b].className),_.element.className!=x&&(_.element.className=x);var y=a.getRowLength(b)*c.lineHeight+"px";if(y!=_.element.style.height&&(_.element.style.height=y),g){var C=g[b];C==null&&(C=g[b]=a.getFoldWidget(b))}if(C){_.foldWidget||(_.foldWidget=i.createElement("span"),_.element.appendChild(_.foldWidget));var x="ace_fold-widget ace_"+C;C=="start"&&b==d&&b<h.end.row?x+=" ace_closed":x+=" ace_open",_.foldWidget.className!=x&&(_.foldWidget.className=x);var y=c.lineHeight+"px";_.foldWidget.style.height!=y&&(_.foldWidget.style.height=y)}else _.foldWidget&&(_.element.removeChild(_.foldWidget),_.foldWidget=null);var B=v=A?A.getText(a,b):b+w;B!==_.textNode.data&&(_.textNode.data=B),b++}this.element.style.height=c.minHeight+"px",(this.$fixedWidth||a.$useWrapMode)&&(v=a.getLength()+w);var T=A?A.getWidth(a,v,c):v.toString().length*c.characterWidth,M=this.$padding||this.$computePadding();T+=M.left+M.right,T!==this.gutterWidth&&!isNaN(T)&&(this.gutterWidth=T,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",T))},this.$fixedWidth=!1,this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(c){this.$renderer=!c&&{getWidth:function(){return""},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(c){c?i.addCssClass(this.element,"ace_folding-enabled"):i.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=c,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var c=i.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(c.paddingLeft)+1||0,this.$padding.right=parseInt(c.paddingRight)||0,this.$padding},this.getRegion=function(c){var a=this.$padding||this.$computePadding(),f=this.element.getBoundingClientRect();if(c.x<a.left+f.left)return"markers";if(this.$showFoldWidgets&&c.x>f.right-a.right)return"foldWidgets"}}).call(o.prototype),t.Gutter=o});ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){var i=e("../range").Range,r=e("../lib/dom"),s=function(u){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",u.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(o){this.$padding=o},this.setSession=function(o){this.session=o},this.setMarkers=function(o){this.markers=o},this.update=function(o){if(!!o){this.config=o;var c=[];for(var a in this.markers){var f=this.markers[a];if(!f.range){f.update(c,this,this.session,o);continue}var l=f.range.clipRows(o.firstRow,o.lastRow);if(!l.isEmpty())if(l=l.toScreenRange(this.session),f.renderer){var h=this.$getTop(l.start.row,o),d=this.$padding+(this.session.$bidiHandler.isBidiRow(l.start.row)?this.session.$bidiHandler.getPosLeft(l.start.column):l.start.column*o.characterWidth);f.renderer(c,l,d,h,o)}else f.type=="fullLine"?this.drawFullLineMarker(c,l,f.clazz,o):f.type=="screenLine"?this.drawScreenLineMarker(c,l,f.clazz,o):l.isMultiLine()?f.type=="text"?this.drawTextMarker(c,l,f.clazz,o):this.drawMultiLineMarker(c,l,f.clazz,o):this.session.$bidiHandler.isBidiRow(l.start.row)?this.drawBidiSingleLineMarker(c,l,f.clazz+" ace_start ace_br15",o):this.drawSingleLineMarker(c,l,f.clazz+" ace_start ace_br15",o)}this.element.innerHTML=c.join("")}},this.$getTop=function(o,c){return(o-c.firstRowScreen)*c.lineHeight};function u(o,c,a,f){return(o?1:0)|(c?2:0)|(a?4:0)|(f?8:0)}this.drawTextMarker=function(o,c,a,f,l){for(var h=this.session,d=c.start.row,g=c.end.row,p=d,m=0,w=0,v=h.getScreenLastRowColumn(p),A=null,_=new i(p,c.start.column,p,w);p<=g;p++)_.start.row=_.end.row=p,_.start.column=p==d?c.start.column:h.getRowWrapIndent(p),_.end.column=v,m=w,w=v,v=p+1<g?h.getScreenLastRowColumn(p+1):p==g?0:c.end.column,A=a+(p==d?" ace_start":"")+" ace_br"+u(p==d||p==d+1&&c.start.column,m<w,w>v,p==g),this.session.$bidiHandler.isBidiRow(p)?this.drawBidiSingleLineMarker(o,_,A,f,p==g?0:1,l):this.drawSingleLineMarker(o,_,A,f,p==g?0:1,l)},this.drawMultiLineMarker=function(o,c,a,f,l){var h=this.$padding,d,g,p;if(l=l||"",this.session.$bidiHandler.isBidiRow(c.start.row)){var m=c.clone();m.end.row=m.start.row,m.end.column=this.session.getLine(m.start.row).length,this.drawBidiSingleLineMarker(o,m,a+" ace_br1 ace_start",f,null,l)}else d=f.lineHeight,g=this.$getTop(c.start.row,f),p=h+c.start.column*f.characterWidth,o.push("<div class='",a," ace_br1 ace_start' style='","height:",d,"px;","right:0;","top:",g,"px;","left:",p,"px;",l,"'></div>");if(this.session.$bidiHandler.isBidiRow(c.end.row)){var m=c.clone();m.start.row=m.end.row,m.start.column=0,this.drawBidiSingleLineMarker(o,m,a+" ace_br12",f,null,l)}else{var w=c.end.column*f.characterWidth;d=f.lineHeight,g=this.$getTop(c.end.row,f),o.push("<div class='",a," ace_br12' style='","height:",d,"px;","width:",w,"px;","top:",g,"px;","left:",h,"px;",l,"'></div>")}if(d=(c.end.row-c.start.row-1)*f.lineHeight,!(d<=0)){g=this.$getTop(c.start.row+1,f);var v=(c.start.column?1:0)|(c.end.column?0:8);o.push("<div class='",a,v?" ace_br"+v:"","' style='","height:",d,"px;","right:0;","top:",g,"px;","left:",h,"px;",l,"'></div>")}},this.drawSingleLineMarker=function(o,c,a,f,l,h){var d=f.lineHeight,g=(c.end.column+(l||0)-c.start.column)*f.characterWidth,p=this.$getTop(c.start.row,f),m=this.$padding+c.start.column*f.characterWidth;o.push("<div class='",a,"' style='","height:",d,"px;","width:",g,"px;","top:",p,"px;","left:",m,"px;",h||"","'></div>")},this.drawBidiSingleLineMarker=function(o,c,a,f,l,h){var d=f.lineHeight,g=this.$getTop(c.start.row,f),p=this.$padding,m=this.session.$bidiHandler.getSelections(c.start.column,c.end.column);m.forEach(function(w){o.push("<div class='",a,"' style='","height:",d,"px;","width:",w.width+(l||0),"px;","top:",g,"px;","left:",p+w.left,"px;",h||"","'></div>")})},this.drawFullLineMarker=function(o,c,a,f,l){var h=this.$getTop(c.start.row,f),d=f.lineHeight;c.start.row!=c.end.row&&(d+=this.$getTop(c.end.row,f)-h),o.push("<div class='",a,"' style='","height:",d,"px;","top:",h,"px;","left:0;right:0;",l||"","'></div>")},this.drawScreenLineMarker=function(o,c,a,f,l){var h=this.$getTop(c.start.row,f),d=f.lineHeight;o.push("<div class='",a,"' style='","height:",d,"px;","top:",h,"px;","left:0;right:0;",l||"","'></div>")}}).call(s.prototype),t.Marker=s});ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),s=e("../lib/lang");e("../lib/useragent");var u=e("../lib/event_emitter").EventEmitter,o=function(c){this.element=r.createElement("div"),this.element.className="ace_layer ace_text-layer",c.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){i.implement(this,u),this.EOF_CHAR="\xB6",this.EOL_CHAR_LF="\xAC",this.EOL_CHAR_CRLF="\xA4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2014",this.SPACE_CHAR="\xB7",this.$padding=0,this.$updateEolChar=function(){var c=this.session.doc.getNewLineCharacter()==`
|
|
`?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=c)return this.EOL_CHAR=c,!0},this.setPadding=function(c){this.$padding=c,this.element.style.padding="0 "+c+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(c){this.$fontMetrics=c,this.$fontMetrics.on("changeCharacterSize",function(a){this._signal("changeCharacterSize",a)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(c){this.session=c,c&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(c){return this.showInvisibles==c?!1:(this.showInvisibles=c,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(c){return this.displayIndentGuides==c?!1:(this.displayIndentGuides=c,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var c=this.session.getTabSize();this.tabSize=c;for(var a=this.$tabStrings=[0],f=1;f<c+1;f++)this.showInvisibles?a.push("<span class='ace_invisible ace_invisible_tab'>"+s.stringRepeat(this.TAB_CHAR,f)+"</span>"):a.push(s.stringRepeat(" ",f));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var l="ace_indent-guide",h="",d="";if(this.showInvisibles){l+=" ace_invisible",h=" ace_invisible_space",d=" ace_invisible_tab";var g=s.stringRepeat(this.SPACE_CHAR,this.tabSize),p=s.stringRepeat(this.TAB_CHAR,this.tabSize)}else var g=s.stringRepeat(" ",this.tabSize),p=g;this.$tabStrings[" "]="<span class='"+l+h+"'>"+g+"</span>",this.$tabStrings[" "]="<span class='"+l+d+"'>"+p+"</span>"}},this.updateLines=function(c,a,f){(this.config.lastRow!=c.lastRow||this.config.firstRow!=c.firstRow)&&this.scrollLines(c),this.config=c;for(var l=Math.max(a,c.firstRow),h=Math.min(f,c.lastRow),d=this.element.childNodes,g=0,p=c.firstRow;p<l;p++){var m=this.session.getFoldLine(p);if(m)if(m.containsRow(l)){l=m.start.row;break}else p=m.end.row;g++}for(var p=l,m=this.session.getNextFoldLine(p),w=m?m.start.row:1/0;p>w&&(p=m.end.row+1,m=this.session.getNextFoldLine(p,m),w=m?m.start.row:1/0),!(p>h);){var v=d[g++];if(v){var A=[];this.$renderLine(A,p,!this.$useLineGroups(),p==w?m:!1),v.style.height=c.lineHeight*this.session.getRowLength(p)+"px",v.innerHTML=A.join("")}p++}},this.scrollLines=function(c){var a=this.config;if(this.config=c,!a||a.lastRow<c.firstRow)return this.update(c);if(c.lastRow<a.firstRow)return this.update(c);var f=this.element;if(a.firstRow<c.firstRow)for(var l=this.session.getFoldedRowCount(a.firstRow,c.firstRow-1);l>0;l--)f.removeChild(f.firstChild);if(a.lastRow>c.lastRow)for(var l=this.session.getFoldedRowCount(c.lastRow+1,a.lastRow);l>0;l--)f.removeChild(f.lastChild);if(c.firstRow<a.firstRow){var h=this.$renderLinesFragment(c,c.firstRow,a.firstRow-1);f.firstChild?f.insertBefore(h,f.firstChild):f.appendChild(h)}if(c.lastRow>a.lastRow){var h=this.$renderLinesFragment(c,a.lastRow+1,c.lastRow);f.appendChild(h)}},this.$renderLinesFragment=function(c,a,f){for(var l=this.element.ownerDocument.createDocumentFragment(),h=a,d=this.session.getNextFoldLine(h),g=d?d.start.row:1/0;h>g&&(h=d.end.row+1,d=this.session.getNextFoldLine(h,d),g=d?d.start.row:1/0),!(h>f);){var p=r.createElement("div"),m=[];if(this.$renderLine(m,h,!1,h==g?d:!1),p.innerHTML=m.join(""),this.$useLineGroups())p.className="ace_line_group",l.appendChild(p),p.style.height=c.lineHeight*this.session.getRowLength(h)+"px";else for(;p.firstChild;)l.appendChild(p.firstChild);h++}return l},this.update=function(c){this.config=c;for(var a=[],f=c.firstRow,l=c.lastRow,h=f,d=this.session.getNextFoldLine(h),g=d?d.start.row:1/0;h>g&&(h=d.end.row+1,d=this.session.getNextFoldLine(h,d),g=d?d.start.row:1/0),!(h>l);)this.$useLineGroups()&&a.push("<div class='ace_line_group' style='height:",c.lineHeight*this.session.getRowLength(h),"px'>"),this.$renderLine(a,h,!1,h==g?d:!1),this.$useLineGroups()&&a.push("</div>"),h++;this.element.innerHTML=a.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(c,a,f,l){var h=this,d=/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=function(v,A,_,E,b){if(A)return h.showInvisibles?"<span class='ace_invisible ace_invisible_space'>"+s.stringRepeat(h.SPACE_CHAR,v.length)+"</span>":v;if(v=="&")return"&";if(v=="<")return"<";if(v==">")return">";if(v==" "){var x=h.session.getScreenTabSize(a+E);return a+=x-1,h.$tabStrings[x]}else if(v=="\u3000"){var y=h.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",C=h.showInvisibles?h.SPACE_CHAR:"";return a+=1,"<span class='"+y+"' style='width:"+h.config.characterWidth*2+"px'>"+C+"</span>"}else return _?"<span class='ace_invisible ace_invisible_space ace_invalid'>"+h.SPACE_CHAR+"</span>":(a+=1,"<span class='ace_cjk' style='width:"+h.config.characterWidth*2+"px'>"+v+"</span>")},p=l.replace(d,g);if(this.$textToken[f.type])c.push(p);else{var m="ace_"+f.type.replace(/\./g," ace_"),w="";f.type=="fold"&&(w=" style='width:"+f.value.length*this.config.characterWidth+"px;' "),c.push("<span class='",m,"'",w,">",p,"</span>")}return a+l.length},this.renderIndentGuide=function(c,a,f){var l=a.search(this.$indentGuideRe);return l<=0||l>=f?a:a[0]==" "?(l-=l%this.tabSize,c.push(s.stringRepeat(this.$tabStrings[" "],l/this.tabSize)),a.substr(l)):a[0]==" "?(c.push(s.stringRepeat(this.$tabStrings[" "],l)),a.substr(l)):a},this.$renderWrappedLine=function(c,a,f,l){for(var h=0,d=0,g=f[0],p=0,m=0;m<a.length;m++){var w=a[m],v=w.value;if(m==0&&this.displayIndentGuides){if(h=v.length,v=this.renderIndentGuide(c,v,g),!v)continue;h-=v.length}if(h+v.length<g)p=this.$renderToken(c,p,w,v),h+=v.length;else{for(;h+v.length>=g;)p=this.$renderToken(c,p,w,v.substring(0,g-h)),v=v.substring(g-h),h=g,l||c.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),c.push(s.stringRepeat("\xA0",f.indent)),d++,p=0,g=f[d]||Number.MAX_VALUE;v.length!=0&&(h+=v.length,p=this.$renderToken(c,p,w,v))}}},this.$renderSimpleLine=function(c,a){var f=0,l=a[0],h=l.value;this.displayIndentGuides&&(h=this.renderIndentGuide(c,h)),h&&(f=this.$renderToken(c,f,l,h));for(var d=1;d<a.length;d++)l=a[d],h=l.value,f=this.$renderToken(c,f,l,h)},this.$renderLine=function(c,a,f,l){if(!l&&l!=!1&&(l=this.session.getFoldLine(a)),l)var h=this.$getFoldLineTokens(a,l);else var h=this.session.getTokens(a);if(f||c.push("<div class='ace_line' style='height:",this.config.lineHeight*(this.$useLineGroups()?1:this.session.getRowLength(a)),"px'>"),h.length){var d=this.session.getRowSplitData(a);d&&d.length?this.$renderWrappedLine(c,h,d,f):this.$renderSimpleLine(c,h)}this.showInvisibles&&(l&&(a=l.end.row),c.push("<span class='ace_invisible ace_invisible_eol'>",a==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),f||c.push("</div>")},this.$getFoldLineTokens=function(c,a){var f=this.session,l=[];function h(g,p,m){for(var w=0,v=0;v+g[w].value.length<p;)if(v+=g[w].value.length,w++,w==g.length)return;if(v!=p){var A=g[w].value.substring(p-v);A.length>m-p&&(A=A.substring(0,m-p)),l.push({type:g[w].type,value:A}),v=p+A.length,w+=1}for(;v<m&&w<g.length;){var A=g[w].value;A.length+v>m?l.push({type:g[w].type,value:A.substring(0,m-v)}):l.push(g[w]),v+=A.length,w+=1}}var d=f.getTokens(c);return a.walk(function(g,p,m,w,v){g!=null?l.push({type:"fold",value:g}):(v&&(d=f.getTokens(p)),d.length&&h(d,w,m))},a.end.row,this.session.getLine(a.end.row).length),l},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(o.prototype),t.Text=o});ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){var i=e("../lib/dom"),r,s=function(u){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",u.appendChild(this.element),r===void 0&&(r=!("opacity"in this.element.style)),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=(r?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(u){for(var o=this.cursors,c=o.length;c--;)o[c].style.visibility=u?"":"hidden"},this.$updateOpacity=function(u){for(var o=this.cursors,c=o.length;c--;)o[c].style.opacity=u?"":"0"},this.$padding=0,this.setPadding=function(u){this.$padding=u},this.setSession=function(u){this.session=u},this.setBlinking=function(u){u!=this.isBlinking&&(this.isBlinking=u,this.restartTimer())},this.setBlinkInterval=function(u){u!=this.blinkInterval&&(this.blinkInterval=u,this.restartTimer())},this.setSmoothBlinking=function(u){u!=this.smoothBlinking&&!r&&(this.smoothBlinking=u,i.setCssClass(this.element,"ace_smooth-blinking",u),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())},this.addCursor=function(){var u=i.createElement("div");return u.className="ace_cursor",this.element.appendChild(u),this.cursors.push(u),u},this.removeCursor=function(){if(this.cursors.length>1){var u=this.cursors.pop();return u.parentNode.removeChild(u),u}},this.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var u=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&i.removeCssClass(this.element,"ace_smooth-blinking"),u(!0),!(!this.isBlinking||!this.blinkInterval||!this.isVisible)){this.smoothBlinking&&setTimeout(function(){i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var o=function(){this.timeoutId=setTimeout(function(){u(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){u(!0),o()},this.blinkInterval),o()}},this.getPixelPosition=function(u,o){if(!this.config||!this.session)return{left:0,top:0};u||(u=this.session.selection.getCursor());var c=this.session.documentToScreenPosition(u),a=this.$padding+(this.session.$bidiHandler.isBidiRow(c.row,u.row)?this.session.$bidiHandler.getPosLeft(c.column):c.column*this.config.characterWidth),f=(c.row-(o?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:f}},this.update=function(u){this.config=u;var o=this.session.$selectionMarkers,c=0,a=0;(o===void 0||o.length===0)&&(o=[{cursor:null}]);for(var c=0,f=o.length;c<f;c++){var l=this.getPixelPosition(o[c].cursor,!0);if(!((l.top>u.height+u.offset||l.top<0)&&c>1)){var h=(this.cursors[a++]||this.addCursor()).style;this.drawCursor?this.drawCursor(h,l,u,o[c],this.session):(h.left=l.left+"px",h.top=l.top+"px",h.width=u.characterWidth+"px",h.height=u.lineHeight+"px")}}for(;this.cursors.length>a;)this.removeCursor();var d=this.session.getOverwrite();this.$setOverwrite(d),this.$pixelPos=l,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(u){u!=this.overwrite&&(this.overwrite=u,u?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(s.prototype),t.Cursor=s});ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){var i=e("./lib/oop"),r=e("./lib/dom"),s=e("./lib/event"),u=e("./lib/event_emitter").EventEmitter,o=32768,c=function(l){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),l.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)};(function(){i.implement(this,u),this.setVisible=function(l){this.element.style.display=l?"":"none",this.isVisible=l,this.coeff=1}}).call(c.prototype);var a=function(l,h){c.call(this,l),this.scrollTop=0,this.scrollHeight=0,h.$scrollbarWidth=this.width=r.scrollbarWidth(l.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};i.inherits(a,c),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var l=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-l)/(this.coeff-l)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(l){this.element.style.height=l+"px"},this.setInnerHeight=this.setScrollHeight=function(l){this.scrollHeight=l,l>o?(this.coeff=o/l,l=o):this.coeff!=1&&(this.coeff=1),this.inner.style.height=l+"px"},this.setScrollTop=function(l){this.scrollTop!=l&&(this.skipEvent=!0,this.scrollTop=l,this.element.scrollTop=l*this.coeff)}}.call(a.prototype);var f=function(l,h){c.call(this,l),this.scrollLeft=0,this.height=h.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};i.inherits(f,c),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(l){this.element.style.width=l+"px"},this.setInnerWidth=function(l){this.inner.style.width=l+"px"},this.setScrollWidth=function(l){this.inner.style.width=l+"px"},this.setScrollLeft=function(l){this.scrollLeft!=l&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=l)}}.call(f.prototype),t.ScrollBar=a,t.ScrollBarV=a,t.ScrollBarH=f,t.VScrollBar=a,t.HScrollBar=f});ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){var i=e("./lib/event"),r=function(s,u){this.onRender=s,this.pending=!1,this.changes=0,this.window=u||window};(function(){this.schedule=function(s){if(this.changes=this.changes|s,!this.pending&&this.changes){this.pending=!0;var u=this;i.nextFrame(function(){u.pending=!1;for(var o;o=u.changes;)u.changes=0,u.onRender(o)},this.window)}}}).call(r.prototype),t.RenderLoop=r});ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),s=e("../lib/lang"),u=e("../lib/useragent"),o=e("../lib/event_emitter").EventEmitter,c=0,a=t.FontMetrics=function(f){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),f.appendChild(this.el),c||this.$testFractionalRect(),this.$measureNode.innerHTML=s.stringRepeat("X",c),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){i.implement(this,o),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var f=r.createElement("div");this.$setMeasureNodeStyles(f.style),f.style.width="0.2px",document.documentElement.appendChild(f);var l=f.getBoundingClientRect().width;l>0&&l<1?c=50:c=100,f.parentNode.removeChild(f)},this.$setMeasureNodeStyles=function(f,l){f.width=f.height="auto",f.left=f.top="0px",f.visibility="hidden",f.position="absolute",f.whiteSpace="pre",u.isIE<8?f["font-family"]="inherit":f.font="inherit",f.overflow=l?"hidden":"visible"},this.checkForSizeChanges=function(){var f=this.$measureSizes();if(f&&(this.$characterSize.width!==f.width||this.$characterSize.height!==f.height)){this.$measureNode.style.fontWeight="bold";var l=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=f,this.charSizes=Object.create(null),this.allowBoldFonts=l&&l.width===f.width&&l.height===f.height,this._emit("changeCharacterSize",{data:f})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var f=this;return this.$pollSizeChangesTimer=setInterval(function(){f.checkForSizeChanges()},500)},this.setPolling=function(f){f?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(){if(c===50){var f=null;try{f=this.$measureNode.getBoundingClientRect()}catch{f={width:0,height:0}}var l={height:f.height,width:f.width/c}}else var l={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/c};return l.width===0||l.height===0?null:l},this.$measureCharWidth=function(f){this.$main.innerHTML=s.stringRepeat(f,c);var l=this.$main.getBoundingClientRect();return l.width/c},this.getCharacterWidth=function(f){var l=this.charSizes[f];return l===void 0&&(l=this.charSizes[f]=this.$measureCharWidth(f)/this.$characterSize.width),l},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(a.prototype)});ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(e,t,n){var i=e("./lib/oop"),r=e("./lib/dom"),s=e("./config"),u=e("./lib/useragent"),o=e("./layer/gutter").Gutter,c=e("./layer/marker").Marker,a=e("./layer/text").Text,f=e("./layer/cursor").Cursor,l=e("./scrollbar").HScrollBar,h=e("./scrollbar").VScrollBar,d=e("./renderloop").RenderLoop,g=e("./layer/font_metrics").FontMetrics,p=e("./lib/event_emitter").EventEmitter,m=`.ace_editor {position: relative;overflow: hidden;font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: '';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_text-input-ios {position: absolute !important;top: -100000px !important;left: -100000px !important;}`;r.importCssString(m,"ace_editor.css");var w=function(v,A){var _=this;this.container=v||r.createElement("div"),this.$keepTextAreaAtCursor=!u.isOldIE,r.addCssClass(this.container,"ace_editor"),this.setTheme(A),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new o(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new c(this.content);var E=this.$textLayer=new a(this.content);this.canvas=E.element,this.$markerFront=new c(this.content),this.$cursorLayer=new f(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.addEventListener("scroll",function(b){_.$scrollAnimation||_.session.setScrollTop(b.data-_.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(b){_.$scrollAnimation||_.session.setScrollLeft(b.data-_.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new g(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(b){_.updateCharacterSize(),_.onResize(!0,_.gutterWidth,_.$size.width,_.$size.height),_._signal("changeCharacterSize",b)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new d(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),s.resetOptions(this),s._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,i.implement(this,p),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(v){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=v,v&&this.scrollMargin.top&&v.getScrollTop()<=0&&v.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(v),this.$markerBack.setSession(v),this.$markerFront.setSession(v),this.$gutterLayer.setSession(v),this.$textLayer.setSession(v),v&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(v,A,_){if(A===void 0&&(A=1/0),this.$changedLines?(this.$changedLines.firstRow>v&&(this.$changedLines.firstRow=v),this.$changedLines.lastRow<A&&(this.$changedLines.lastRow=A)):this.$changedLines={firstRow:v,lastRow:A},this.$changedLines.lastRow<this.layerConfig.firstRow)if(_)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(v){v?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(v,A,_,E){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=v?1:0;var b=this.container;E||(E=b.clientHeight||b.scrollHeight),_||(_=b.clientWidth||b.scrollWidth);var x=this.$updateCachedSize(v,A,_,E);if(!this.$size.scrollerHeight||!_&&!E)return this.resizing=0;v&&(this.$gutterLayer.$padding=null),v?this.$renderChanges(x|this.$changes,!0):this.$loop.schedule(x|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(v,A,_,E){E-=this.$extraHeight||0;var b=0,x=this.$size,y={width:x.width,height:x.height,scrollerHeight:x.scrollerHeight,scrollerWidth:x.scrollerWidth};return E&&(v||x.height!=E)&&(x.height=E,b|=this.CHANGE_SIZE,x.scrollerHeight=x.height,this.$horizScroll&&(x.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",b=b|this.CHANGE_SCROLL),_&&(v||x.width!=_)&&(b|=this.CHANGE_SIZE,x.width=_,A==null&&(A=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=A,this.scrollBarH.element.style.left=this.scroller.style.left=A+"px",x.scrollerWidth=Math.max(0,_-A-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||v)&&(b|=this.CHANGE_FULL)),x.$dirty=!_||!E,b&&this._signal("resize",y),b},this.onGutterResize=function(){var v=this.$showGutter?this.$gutter.offsetWidth:0;v!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,v,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var v=this.$size.scrollerWidth-this.$padding*2,A=Math.floor(v/this.characterWidth);return this.session.adjustWrapLimit(A,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(v){this.setOption("animatedScroll",v)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(v){this.setOption("showInvisibles",v),this.session.$bidiHandler.setShowInvisibles(v)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(v){this.setOption("displayIndentGuides",v)},this.setShowPrintMargin=function(v){this.setOption("showPrintMargin",v)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(v){this.setOption("printMarginColumn",v)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(v){return this.setOption("showGutter",v)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(v){this.setOption("fadeFoldWidgets",v)},this.setHighlightGutterLine=function(v){this.setOption("highlightGutterLine",v)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var v=this.$cursorLayer.$pixelPos,A=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var _=this.session.selection.getCursor();_.column=0,v=this.$cursorLayer.getPixelPosition(_,!0),A*=this.session.getRowLength(_.row)}this.$gutterLineHighlight.style.top=v.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=A+"px"},this.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var v=r.createElement("div");v.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",v.appendChild(this.$printMarginEl),this.content.insertBefore(v,this.content.firstChild)}var A=this.$printMarginEl.style;A.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",A.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!!this.$keepTextAreaAtCursor){var v=this.layerConfig,A=this.$cursorLayer.$pixelPos.top,_=this.$cursorLayer.$pixelPos.left;A-=v.offset;var E=this.textarea.style,b=this.lineHeight;if(A<0||A>v.height-b){E.top=E.left="0";return}var x=this.characterWidth;if(this.$composition){var y=this.textarea.value.replace(/^\x01+/,"");x*=this.session.$getStringScreenWidth(y)[0]+2,b+=2}_-=this.scrollLeft,_>this.$size.scrollerWidth-x&&(_=this.$size.scrollerWidth-x),_+=this.gutterWidth,E.height=b+"px",E.width=x+"px",E.left=Math.min(_,this.$size.scrollerWidth-x)+"px",E.top=Math.min(A,this.$size.height-b)+"px"}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},this.getLastFullyVisibleRow=function(){var v=this.layerConfig,A=v.lastRow,_=this.session.documentToScreenRow(A,0)*v.lineHeight;return _-this.session.getScrollTop()>v.height-v.lineHeight?A-1:A},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(v){this.$padding=v,this.$textLayer.setPadding(v),this.$cursorLayer.setPadding(v),this.$markerFront.setPadding(v),this.$markerBack.setPadding(v),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(v,A,_,E){var b=this.scrollMargin;b.top=v|0,b.bottom=A|0,b.right=E|0,b.left=_|0,b.v=b.top+b.bottom,b.h=b.left+b.right,b.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-b.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(v){this.setOption("hScrollBarAlwaysVisible",v)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(v){this.setOption("vScrollBarAlwaysVisible",v)},this.$updateScrollBarV=function(){var v=this.layerConfig.maxHeight,A=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(v-=(A-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>v-A&&(v=this.scrollTop+A,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(v+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(v,A){if(this.$changes&&(v|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!v&&!A){this.$changes|=v;return}if(this.$size.$dirty)return this.$changes|=v,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender"),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var _=this.layerConfig;if(v&this.CHANGE_FULL||v&this.CHANGE_SIZE||v&this.CHANGE_TEXT||v&this.CHANGE_LINES||v&this.CHANGE_SCROLL||v&this.CHANGE_H_SCROLL){if(v|=this.$computeLayerConfig(),_.firstRow!=this.layerConfig.firstRow&&_.firstRowScreen==this.layerConfig.firstRowScreen){var E=this.scrollTop+(_.firstRow-this.layerConfig.firstRow)*this.lineHeight;E>0&&(this.scrollTop=E,v=v|this.CHANGE_SCROLL,v|=this.$computeLayerConfig())}_=this.layerConfig,this.$updateScrollBarV(),v&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-_.offset+"px",this.content.style.marginTop=-_.offset+"px",this.content.style.width=_.width+2*this.$padding+"px",this.content.style.height=_.minHeight+"px"}if(v&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),v&this.CHANGE_FULL){this.$textLayer.update(_),this.$showGutter&&this.$gutterLayer.update(_),this.$markerBack.update(_),this.$markerFront.update(_),this.$cursorLayer.update(_),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this._signal("afterRender");return}if(v&this.CHANGE_SCROLL){v&this.CHANGE_TEXT||v&this.CHANGE_LINES?this.$textLayer.update(_):this.$textLayer.scrollLines(_),this.$showGutter&&this.$gutterLayer.update(_),this.$markerBack.update(_),this.$markerFront.update(_),this.$cursorLayer.update(_),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),this._signal("afterRender");return}v&this.CHANGE_TEXT?(this.$textLayer.update(_),this.$showGutter&&this.$gutterLayer.update(_)):v&this.CHANGE_LINES?(this.$updateLines()||v&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(_):(v&this.CHANGE_TEXT||v&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(_),v&this.CHANGE_CURSOR&&(this.$cursorLayer.update(_),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),v&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(_),v&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(_),this._signal("afterRender")},this.$autosize=function(){var v=this.session.getScreenLength()*this.lineHeight,A=this.$maxLines*this.lineHeight,_=Math.min(A,Math.max((this.$minLines||1)*this.lineHeight,v))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(_+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&_>this.$maxPixelHeight&&(_=this.$maxPixelHeight);var E=v>A;if(_!=this.desiredHeight||this.$size.height!=this.desiredHeight||E!=this.$vScroll){E!=this.$vScroll&&(this.$vScroll=E,this.scrollBarV.setVisible(E));var b=this.container.clientWidth;this.container.style.height=_+"px",this.$updateCachedSize(!0,this.$gutterWidth,b,_),this.desiredHeight=_,this._signal("autosize")}},this.$computeLayerConfig=function(){var v=this.session,A=this.$size,_=A.height<=2*this.lineHeight,E=this.session.getScreenLength(),b=E*this.lineHeight,x=this.$getLongestLine(),y=!_&&(this.$hScrollBarAlwaysVisible||A.scrollerWidth-x-2*this.$padding<0),C=this.$horizScroll!==y;C&&(this.$horizScroll=y,this.scrollBarH.setVisible(y));var B=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var T=this.scrollTop%this.lineHeight,M=A.scrollerHeight+this.lineHeight,R=!this.$maxLines&&this.$scrollPastEnd?(A.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;b+=R;var I=this.scrollMargin;this.session.setScrollTop(Math.max(-I.top,Math.min(this.scrollTop,b-A.scrollerHeight+I.bottom))),this.session.setScrollLeft(Math.max(-I.left,Math.min(this.scrollLeft,x+2*this.$padding-A.scrollerWidth+I.right)));var H=!_&&(this.$vScrollBarAlwaysVisible||A.scrollerHeight-b+R<0||this.scrollTop>I.top),P=B!==H;P&&(this.$vScroll=H,this.scrollBarV.setVisible(H));var j=Math.ceil(M/this.lineHeight)-1,V=Math.max(0,Math.round((this.scrollTop-T)/this.lineHeight)),K=V+j,N,k,$=this.lineHeight;V=v.screenToDocumentRow(V,0);var z=v.getFoldLine(V);z&&(V=z.start.row),N=v.documentToScreenRow(V,0),k=v.getRowLength(V)*$,K=Math.min(v.screenToDocumentRow(K,0),v.getLength()-1),M=A.scrollerHeight+v.getRowLength(K)*$+k,T=this.scrollTop-N*$;var U=0;return this.layerConfig.width!=x&&(U=this.CHANGE_H_SCROLL),(C||P)&&(U=this.$updateCachedSize(!0,this.gutterWidth,A.width,A.height),this._signal("scrollbarVisibilityChanged"),P&&(x=this.$getLongestLine())),this.layerConfig={width:x,padding:this.$padding,firstRow:V,firstRowScreen:N,lastRow:K,lineHeight:$,characterWidth:this.characterWidth,minHeight:M,maxHeight:b,offset:T,gutterOffset:$?Math.max(0,Math.ceil((T+A.height-A.scrollerHeight)/$)):0,height:this.$size.scrollerHeight},U},this.$updateLines=function(){if(!!this.$changedLines){var v=this.$changedLines.firstRow,A=this.$changedLines.lastRow;this.$changedLines=null;var _=this.layerConfig;if(!(v>_.lastRow+1)&&!(A<_.firstRow)){if(A===1/0){this.$showGutter&&this.$gutterLayer.update(_),this.$textLayer.update(_);return}return this.$textLayer.updateLines(_,v,A),!0}}},this.$getLongestLine=function(){var v=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(v+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(v*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(v,A){this.$gutterLayer.addGutterDecoration(v,A)},this.removeGutterDecoration=function(v,A){this.$gutterLayer.removeGutterDecoration(v,A)},this.updateBreakpoints=function(v){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(v){this.$gutterLayer.setAnnotations(v),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(v,A,_){this.scrollCursorIntoView(v,_),this.scrollCursorIntoView(A,_)},this.scrollCursorIntoView=function(v,A,_){if(this.$size.scrollerHeight!==0){var E=this.$cursorLayer.getPixelPosition(v),b=E.left,x=E.top,y=_&&_.top||0,C=_&&_.bottom||0,B=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;B+y>x?(A&&B+y>x+this.lineHeight&&(x-=A*this.$size.scrollerHeight),x===0&&(x=-this.scrollMargin.top),this.session.setScrollTop(x)):B+this.$size.scrollerHeight-C<x+this.lineHeight&&(A&&B+this.$size.scrollerHeight-C<x-this.lineHeight&&(x+=A*this.$size.scrollerHeight),this.session.setScrollTop(x+this.lineHeight-this.$size.scrollerHeight));var T=this.scrollLeft;T>b?(b<this.$padding+2*this.layerConfig.characterWidth&&(b=-this.scrollMargin.left),this.session.setScrollLeft(b)):T+this.$size.scrollerWidth<b+this.characterWidth?this.session.setScrollLeft(Math.round(b+this.characterWidth-this.$size.scrollerWidth)):T<=this.$padding&&b-T<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(v){this.session.setScrollTop(v*this.lineHeight)},this.alignCursor=function(v,A){typeof v=="number"&&(v={row:v,column:0});var _=this.$cursorLayer.getPixelPosition(v),E=this.$size.scrollerHeight-this.lineHeight,b=_.top-E*(A||0);return this.session.setScrollTop(b),b},this.STEPS=8,this.$calcSteps=function(v,A){var _=0,E=this.STEPS,b=[],x=function(y,C,B){return B*(Math.pow(y-1,3)+1)+C};for(_=0;_<E;++_)b.push(x(_/this.STEPS,v,A-v));return b},this.scrollToLine=function(v,A,_,E){var b=this.$cursorLayer.getPixelPosition({row:v,column:0}),x=b.top;A&&(x-=this.$size.scrollerHeight/2);var y=this.scrollTop;this.session.setScrollTop(x),_!==!1&&this.animateScrolling(y,E)},this.animateScrolling=function(v,A){var _=this.scrollTop;if(!!this.$animatedScroll){var E=this;if(v!=_){if(this.$scrollAnimation){var b=this.$scrollAnimation.steps;if(b.length&&(v=b[0],v==_))return}var x=E.$calcSteps(v,_);this.$scrollAnimation={from:v,to:_,steps:x},clearInterval(this.$timer),E.session.setScrollTop(x.shift()),E.session.$scrollTop=_,this.$timer=setInterval(function(){x.length?(E.session.setScrollTop(x.shift()),E.session.$scrollTop=_):_!=null?(E.session.$scrollTop=-1,E.session.setScrollTop(_),_=null):(E.$timer=clearInterval(E.$timer),E.$scrollAnimation=null,A&&A())},10)}}},this.scrollToY=function(v){this.scrollTop!==v&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=v)},this.scrollToX=function(v){this.scrollLeft!==v&&(this.scrollLeft=v),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(v,A){this.session.setScrollTop(A),this.session.setScrollLeft(A)},this.scrollBy=function(v,A){A&&this.session.setScrollTop(this.session.getScrollTop()+A),v&&this.session.setScrollLeft(this.session.getScrollLeft()+v)},this.isScrollableBy=function(v,A){if(A<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||A>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||v<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||v>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},this.pixelToScreenCoordinates=function(v,A){var _=this.scroller.getBoundingClientRect(),E=v+this.scrollLeft-_.left-this.$padding,b=E/this.characterWidth,x=Math.floor((A+this.scrollTop-_.top)/this.lineHeight),y=Math.round(b);return{row:x,column:y,side:b-y>0?1:-1,offsetX:E}},this.screenToTextCoordinates=function(v,A){var _=this.scroller.getBoundingClientRect(),E=v+this.scrollLeft-_.left-this.$padding,b=Math.round(E/this.characterWidth),x=(A+this.scrollTop-_.top)/this.lineHeight;return this.session.screenToDocumentPosition(x,Math.max(b,0),E)},this.textToScreenCoordinates=function(v,A){var _=this.scroller.getBoundingClientRect(),E=this.session.documentToScreenPosition(v,A),b=this.$padding+(this.session.$bidiHandler.isBidiRow(E.row,v)?this.session.$bidiHandler.getPosLeft(E.column):Math.round(E.column*this.characterWidth)),x=E.row*this.lineHeight;return{pageX:_.left+b-this.scrollLeft,pageY:_.top+x-this.scrollTop}},this.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},this.showComposition=function(v){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(v){this.$moveTextAreaToCursor()},this.hideComposition=function(){!this.$composition||(r.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(v,A){var _=this;if(this.$themeId=v,_._dispatchEvent("themeChange",{theme:v}),!v||typeof v=="string"){var E=v||this.$options.theme.initialValue;s.loadModule(["theme",E],b)}else b(v);function b(x){if(_.$themeId!=v)return A&&A();if(!x||!x.cssClass)throw new Error("couldn't load module "+v+" or it didn't call define");r.importCssString(x.cssText,x.cssClass,_.container.ownerDocument),_.theme&&r.removeCssClass(_.container,_.theme.cssClass);var y="padding"in x?x.padding:"padding"in(_.theme||{})?4:_.$padding;_.$padding&&y!=_.$padding&&_.setPadding(y),_.$theme=x.cssClass,_.theme=x,r.addCssClass(_.container,x.cssClass),r.setCssClass(_.container,"ace_dark",x.isDark),_.$size&&(_.$size.width=0,_.$updateSizeAsync()),_._dispatchEvent("themeLoaded",{theme:x}),A&&A()}},this.getTheme=function(){return this.$themeId},this.setStyle=function(v,A){r.setCssClass(this.container,v,A!==!1)},this.unsetStyle=function(v){r.removeCssClass(this.container,v)},this.setCursorStyle=function(v){this.scroller.style.cursor!=v&&(this.scroller.style.cursor=v)},this.setMouseCursor=function(v){this.scroller.style.cursor=v},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(w.prototype),s.defineOptions(w.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(v){this.$textLayer.setShowInvisibles(v)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(v){typeof v=="number"&&(this.$printMarginColumn=v),this.$showPrintMargin=!!v,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(v){this.$gutter.style.display=v?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(v){r.setCssClass(this.$gutter,"ace_fade-fold-widgets",v)},initialValue:!1},showFoldWidgets:{set:function(v){this.$gutterLayer.setShowFoldWidgets(v)},initialValue:!0},showLineNumbers:{set:function(v){this.$gutterLayer.setShowLineNumbers(v),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(v){this.$textLayer.setDisplayIndentGuides(v)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(v){if(!this.$gutterLineHighlight){this.$gutterLineHighlight=r.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",this.$gutter.appendChild(this.$gutterLineHighlight);return}this.$gutterLineHighlight.style.display=v?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(v){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(v){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(v){typeof v=="number"&&(v=v+"px"),this.container.style.fontSize=v,this.updateFontSize()},initialValue:12},fontFamily:{set:function(v){this.container.style.fontFamily=v,this.updateFontSize()}},maxLines:{set:function(v){this.updateFull()}},minLines:{set:function(v){this.updateFull()}},maxPixelHeight:{set:function(v){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(v){v=+v||0,this.$scrollPastEnd!=v&&(this.$scrollPastEnd=v,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(v){this.$gutterLayer.$fixedWidth=!!v,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(v){this.setTheme(v)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),t.VirtualRenderer=w});ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,n){var i=e("../lib/oop"),r=e("../lib/net"),s=e("../lib/event_emitter").EventEmitter,u=e("../config");function o(l,h){var d=h.src;""+r.qualifyURL(l);try{return new Blob([d],{type:"application/javascript"})}catch{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,p=new g;return p.append(d),p.getBlob("application/javascript")}}function c(l,h){var d=o(l,h),g=window.URL||window.webkitURL,p=g.createObjectURL(d);return new Worker(p)}var a=function(l,h,d,g,p){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),u.get("packaged")||!e.toUrl)g=g||u.moduleUrl(h.id,"worker");else{var m=this.$normalizePath;g=g||m(e.toUrl("ace/worker/worker.js",null,"_"));var w={};l.forEach(function(v){w[v]=m(e.toUrl(v,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}this.$worker=c(g,h),p&&this.send("importScripts",p),this.$worker.postMessage({init:!0,tlns:w,module:h.id,classname:d}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,s),this.onMessage=function(l){var h=l.data;switch(h.type){case"event":this._signal(h.name,{data:h.data});break;case"call":var d=this.callbacks[h.id];d&&(d(h.data),delete this.callbacks[h.id]);break;case"error":this.reportError(h.data);break;case"log":window.console&&console.log&&console.log.apply(console,h.data);break}},this.reportError=function(l){window.console&&console.error&&console.error(l)},this.$normalizePath=function(l){return r.qualifyURL(l)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(l,h){this.$worker.postMessage({command:l,args:h})},this.call=function(l,h,d){if(d){var g=this.callbackId++;this.callbacks[g]=d,h.push(g)}this.send(l,h)},this.emit=function(l,h){try{this.$worker.postMessage({event:l,data:{data:h.data}})}catch(d){console.error(d.stack)}},this.attachToDocument=function(l){this.$doc&&this.terminate(),this.$doc=l,this.call("setValue",[l.getValue()]),l.on("change",this.changeListener)},this.changeListener=function(l){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),l.action=="insert"?this.deltaQueue.push(l.start,l.lines):this.deltaQueue.push(l.start,l.end)},this.$sendDeltaQueue=function(){var l=this.deltaQueue;!l||(this.deltaQueue=null,l.length>50&&l.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:l}))}}).call(a.prototype);var f=function(l,h,d){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var g=null,p=!1,m=Object.create(s),w=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(A){w.messageBuffer.push(A),g&&(p?setTimeout(v):v())},this.setEmitSync=function(A){p=A};var v=function(){var A=w.messageBuffer.shift();A.command?g[A.command].apply(g,A.args):A.event&&m._signal(A.event,A.data)};m.postMessage=function(A){w.onMessage({data:A})},m.callback=function(A,_){this.postMessage({type:"call",id:_,data:A})},m.emit=function(A,_){this.postMessage({type:"event",name:A,data:_})},u.loadModule(["worker",h],function(A){for(g=new A[d](m);w.messageBuffer.length;)v()})};f.prototype=a.prototype,t.UIWorkerClient=f,t.WorkerClient=a,t.createWorker=c});ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){var i=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,s=e("./lib/oop"),u=function(o,c,a,f,l,h){var d=this;this.length=c,this.session=o,this.doc=o.getDocument(),this.mainClass=l,this.othersClass=h,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=f,this.$onCursorChange=function(){setTimeout(function(){d.onCursorChange()})},this.$pos=a;var g=o.getUndoManager().$undoStack||o.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=g.length,this.setup(),o.selection.on("changeCursor",this.$onCursorChange)};(function(){s.implement(this,r),this.setup=function(){var o=this,c=this.doc,a=this.session;this.selectionBefore=a.selection.toJSON(),a.selection.inMultiSelectMode&&a.selection.toSingleRange(),this.pos=c.createAnchor(this.$pos.row,this.$pos.column);var f=this.pos;f.$insertRight=!0,f.detach(),f.markerId=a.addMarker(new i(f.row,f.column,f.row,f.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(l){var h=c.createAnchor(l.row,l.column);h.$insertRight=!0,h.detach(),o.others.push(h)}),a.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var o=this.session,c=this;this.othersActive=!0,this.others.forEach(function(a){a.markerId=o.addMarker(new i(a.row,a.column,a.row,a.column+c.length),c.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(!!this.othersActive){this.othersActive=!1;for(var o=0;o<this.others.length;o++)this.session.removeMarker(this.others[o].markerId)}},this.onUpdate=function(o){if(this.$updating)return this.updateAnchors(o);var c=o;if(c.start.row===c.end.row&&c.start.row===this.pos.row){this.$updating=!0;var a=o.action==="insert"?c.end.column-c.start.column:c.start.column-c.end.column,f=c.start.column>=this.pos.column&&c.start.column<=this.pos.column+this.length+1,l=c.start.column-this.pos.column;if(this.updateAnchors(o),f&&(this.length+=a),f&&!this.session.$fromUndo){if(o.action==="insert")for(var h=this.others.length-1;h>=0;h--){var d=this.others[h],g={row:d.row,column:d.column+l};this.doc.insertMergedLines(g,o.lines)}else if(o.action==="remove")for(var h=this.others.length-1;h>=0;h--){var d=this.others[h],g={row:d.row,column:d.column+l};this.doc.remove(new i(g.row,g.column,g.row,g.column-a))}}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(o){this.pos.onChange(o);for(var c=this.others.length;c--;)this.others[c].onChange(o);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var o=this,c=this.session,a=function(l,h){c.removeMarker(l.markerId),l.markerId=c.addMarker(new i(l.row,l.column,l.row,l.column+o.length),h,null,!1)};a(this.pos,this.mainClass);for(var f=this.others.length;f--;)a(this.others[f],this.othersClass)}},this.onCursorChange=function(o){if(!(this.$updating||!this.session)){var c=this.session.selection.getCursor();c.row===this.pos.row&&c.column>=this.pos.column&&c.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",o)):(this.hideOtherMarkers(),this._emit("cursorLeave",o))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(this.$undoStackDepth!==-1){for(var o=this.session.getUndoManager(),c=(o.$undoStack||o.$undostack).length-this.$undoStackDepth,a=0;a<c;a++)o.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(u.prototype),t.PlaceHolder=u});ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){var i=e("../lib/event"),r=e("../lib/useragent");function s(o,c){return o.row==c.row&&o.column==c.column}function u(o){var c=o.domEvent,a=c.altKey,f=c.shiftKey,l=c.ctrlKey,h=o.getAccelKey(),d=o.getButton();if(l&&r.isMac&&(d=c.button),o.editor.inMultiSelectMode&&d==2){o.editor.textInput.onContextMenu(o.domEvent);return}if(!l&&!a&&!h){d===0&&o.editor.inMultiSelectMode&&o.editor.exitMultiSelectMode();return}if(d===0){var g=o.editor,p=g.selection,m=g.inMultiSelectMode,w=o.getDocumentPosition(),v=p.getCursor(),A=o.inSelection()||p.isEmpty()&&s(w,v),_=o.x,E=o.y,b=function(K){_=K.clientX,E=K.clientY},x=g.session,y=g.renderer.pixelToScreenCoordinates(_,E),C=y,B;if(g.$mouseHandler.$enableJumpToDef)l&&a||h&&a?B=f?"block":"add":a&&g.$blockSelectEnabled&&(B="block");else if(h&&!a){if(B="add",!m&&f)return}else a&&g.$blockSelectEnabled&&(B="block");if(B&&r.isMac&&c.ctrlKey&&g.$mouseHandler.cancelContextMenu(),B=="add"){if(!m&&A)return;if(!m){var T=p.toOrientedRange();g.addSelectionMarker(T)}var M=p.rangeList.rangeAtPoint(w);g.$blockScrolling++,g.inVirtualSelectionMode=!0,f&&(M=null,T=p.ranges[0]||T,g.removeSelectionMarker(T)),g.once("mouseup",function(){var K=p.toOrientedRange();M&&K.isEmpty()&&s(M.cursor,K.cursor)?p.substractPoint(K.cursor):(f?p.substractPoint(T.cursor):T&&(g.removeSelectionMarker(T),p.addRange(T)),p.addRange(K)),g.$blockScrolling--,g.inVirtualSelectionMode=!1})}else if(B=="block"){o.stop(),g.inVirtualSelectionMode=!0;var R,I=[],H=function(){var K=g.renderer.pixelToScreenCoordinates(_,E),N=x.screenToDocumentPosition(K.row,K.column,K.offsetX);s(C,K)&&s(N,p.lead)||(C=K,g.$blockScrolling++,g.selection.moveToPosition(N),g.renderer.scrollCursorIntoView(),g.removeSelectionMarkers(I),I=p.rectangularRangeBlock(C,y),g.$mouseHandler.$clickSelection&&I.length==1&&I[0].isEmpty()&&(I[0]=g.$mouseHandler.$clickSelection.clone()),I.forEach(g.addSelectionMarker,g),g.updateSelectionMarkers(),g.$blockScrolling--)};g.$blockScrolling++,m&&!h?p.toSingleRange():!m&&h&&(R=p.toOrientedRange(),g.addSelectionMarker(R)),f?y=x.documentToScreenPosition(p.lead):p.moveToPosition(w),g.$blockScrolling--,C={row:-1,column:-1};var P=function(K){clearInterval(V),g.removeSelectionMarkers(I),I.length||(I=[p.toOrientedRange()]),g.$blockScrolling++,R&&(g.removeSelectionMarker(R),p.toSingleRange(R));for(var N=0;N<I.length;N++)p.addRange(I[N]);g.inVirtualSelectionMode=!1,g.$mouseHandler.$clickSelection=null,g.$blockScrolling--},j=H;i.capture(g.container,b,P);var V=setInterval(function(){j()},20);return o.preventDefault()}}}t.onMouseDown=u});ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",exec:function(r){r.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",exec:function(r){r.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",exec:function(r){r.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",exec:function(r){r.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",exec:function(r){r.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",exec:function(r){r.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",exec:function(r){r.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",exec:function(r){r.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"splitIntoLines",exec:function(r){r.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"alignCursors",exec:function(r){r.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",exec:function(r){r.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(r){r.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(r){return r&&r.inMultiSelectMode}}];var i=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new i(t.multiSelectCommands)});ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,t,n){var i=e("./range_list").RangeList,r=e("./range").Range,s=e("./selection").Selection,u=e("./mouse/multi_select_handler").onMouseDown,o=e("./lib/event"),c=e("./lib/lang"),a=e("./commands/multi_select_commands");t.commands=a.defaultCommands.concat(a.multiSelectCommands);var f=e("./search").Search,l=new f;function h(v,A,_){return l.$options.wrap=!0,l.$options.needle=A,l.$options.backwards=_==-1,l.find(v)}var d=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(d.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(v,A){if(!!v){if(!this.inMultiSelectMode&&this.rangeCount===0){var _=this.toOrientedRange();if(this.rangeList.add(_),this.rangeList.add(v),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),A||this.fromOrientedRange(v);this.rangeList.removeAll(),this.rangeList.add(_),this.$onAddRange(_)}v.cursor||(v.cursor=v.end);var E=this.rangeList.add(v);return this.$onAddRange(v),E.length&&this.$onRemoveRange(E),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),A||this.fromOrientedRange(v)}},this.toSingleRange=function(v){v=v||this.ranges[0];var A=this.rangeList.removeAll();A.length&&this.$onRemoveRange(A),v&&this.fromOrientedRange(v)},this.substractPoint=function(v){var A=this.rangeList.substractPoint(v);if(A)return this.$onRemoveRange(A),A[0]},this.mergeOverlappingRanges=function(){var v=this.rangeList.merge();v.length?this.$onRemoveRange(v):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(v){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(v),this._signal("addRange",{range:v})},this.$onRemoveRange=function(v){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var A=this.rangeList.ranges.pop();v.push(A),this.rangeCount=0}for(var _=v.length;_--;){var E=this.ranges.indexOf(v[_]);this.ranges.splice(E,1)}this._signal("removeRange",{ranges:v}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),A=A||this.ranges[0],A&&!A.isEqual(this.getRange())&&this.fromOrientedRange(A)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var v=this.rangeList.ranges,A=v[v.length-1],_=r.fromPoints(v[0].start,A.end);this.toSingleRange(),this.setSelectionRange(_,A.cursor==A.start)}else{var _=this.getRange(),E=this.isBackwards(),b=_.start.row,x=_.end.row;if(b==x){if(E)var y=_.end,C=_.start;else var y=_.start,C=_.end;this.addRange(r.fromPoints(C,C)),this.addRange(r.fromPoints(y,y));return}var B=[],T=this.getLineRange(b,!0);T.start.column=_.start.column,B.push(T);for(var M=b+1;M<x;M++)B.push(this.getLineRange(M,!0));T=this.getLineRange(x,!0),T.end.column=_.end.column,B.push(T),B.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var v=this.rangeList.ranges,A=v[v.length-1],_=r.fromPoints(v[0].start,A.end);this.toSingleRange(),this.setSelectionRange(_,A.cursor==A.start)}else{var E=this.session.documentToScreenPosition(this.selectionLead),b=this.session.documentToScreenPosition(this.selectionAnchor),x=this.rectangularRangeBlock(E,b);x.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(v,A,_){var E=[],b=v.column<A.column;if(b)var x=v.column,y=A.column,C=v.offsetX,B=A.offsetX;else var x=A.column,y=v.column,C=A.offsetX,B=v.offsetX;var T=v.row<A.row;if(T)var M=v.row,R=A.row;else var M=A.row,R=v.row;x<0&&(x=0),M<0&&(M=0),M==R&&(_=!0);for(var I=M;I<=R;I++){var H=r.fromPoints(this.session.screenToDocumentPosition(I,x,C),this.session.screenToDocumentPosition(I,y,B));if(H.isEmpty()){if(P&&p(H.end,P))break;var P=H.end}H.cursor=b?H.start:H.end,E.push(H)}if(T&&E.reverse(),!_){for(var j=E.length-1;E[j].isEmpty()&&j>0;)j--;if(j>0)for(var V=0;E[V].isEmpty();)V++;for(var K=j;K>=V;K--)E[K].isEmpty()&&E.splice(K,1)}return E}}.call(s.prototype);var g=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(v){v.cursor||(v.cursor=v.end);var A=this.getSelectionStyle();return v.marker=this.session.addMarker(v,"ace_selection",A),this.session.$selectionMarkers.push(v),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,v},this.removeSelectionMarker=function(v){if(!!v.marker){this.session.removeMarker(v.marker);var A=this.session.$selectionMarkers.indexOf(v);A!=-1&&this.session.$selectionMarkers.splice(A,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(v){for(var A=this.session.$selectionMarkers,_=v.length;_--;){var E=v[_];if(!!E.marker){this.session.removeMarker(E.marker);var b=A.indexOf(E);b!=-1&&A.splice(b,1)}}this.session.selectionMarkerCount=A.length},this.$onAddRange=function(v){this.addSelectionMarker(v.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(v){this.removeSelectionMarkers(v.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(v){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(a.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(v){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(a.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(v){var A=v.command,_=v.editor;if(!!_.multiSelect){if(A.multiSelectAction)A.multiSelectAction=="forEach"?E=_.forEachSelection(A,v.args):A.multiSelectAction=="forEachLine"?E=_.forEachSelection(A,v.args,!0):A.multiSelectAction=="single"?(_.exitMultiSelectMode(),E=A.exec(_,v.args||{})):E=A.multiSelectAction(_,v.args||{});else{var E=A.exec(_,v.args||{});_.multiSelect.addRange(_.multiSelect.toOrientedRange()),_.multiSelect.mergeOverlappingRanges()}return E}},this.forEachSelection=function(v,A,_){if(!this.inVirtualSelectionMode){var E=_&&_.keepOrder,b=_==!0||_&&_.$byLines,x=this.session,y=this.selection,C=y.rangeList,B=(E?y:C).ranges,T;if(!B.length)return v.exec?v.exec(this,A||{}):v(this,A||{});var M=y._eventRegistry;y._eventRegistry={};var R=new s(x);this.inVirtualSelectionMode=!0;for(var I=B.length;I--;){if(b)for(;I>0&&B[I].start.row==B[I-1].end.row;)I--;R.fromOrientedRange(B[I]),R.index=I,this.selection=x.selection=R;var H=v.exec?v.exec(this,A||{}):v(this,A||{});!T&&H!==void 0&&(T=H),R.toOrientedRange(B[I])}R.detach(),this.selection=x.selection=y,this.inVirtualSelectionMode=!1,y._eventRegistry=M,y.mergeOverlappingRanges();var P=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),P&&P.from==P.to&&this.renderer.animateScrolling(P.from),T}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var v="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var A=this.multiSelect.rangeList.ranges,_=[],E=0;E<A.length;E++)_.push(this.session.getTextRange(A[E]));var b=this.session.getDocument().getNewLineCharacter();v=_.join(b),v.length==(_.length-1)*b.length&&(v="")}else this.selection.isEmpty()||(v=this.session.getTextRange(this.getSelectionRange()));return v},this.$checkMultiselectChange=function(v,A){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var _=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&A==this.multiSelect.anchor)return;var E=A==this.multiSelect.anchor?_.cursor==_.start?_.end:_.start:_.cursor;(E.row!=A.row||this.session.$clipPositionToDocument(E.row,E.column).column!=A.column)&&this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange())}},this.findAll=function(v,A,_){if(A=A||{},A.needle=v||A.needle,A.needle==null){var E=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();A.needle=this.session.getTextRange(E)}this.$search.set(A);var b=this.$search.findAll(this.session);if(!b.length)return 0;this.$blockScrolling+=1;var x=this.multiSelect;_||x.toSingleRange(b[0]);for(var y=b.length;y--;)x.addRange(b[y],!0);return E&&x.rangeList.rangeAtPoint(E.start)&&x.addRange(E,!0),this.$blockScrolling-=1,b.length},this.selectMoreLines=function(v,A){var _=this.selection.toOrientedRange(),E=_.cursor==_.end,b=this.session.documentToScreenPosition(_.cursor);this.selection.$desiredColumn&&(b.column=this.selection.$desiredColumn);var x=this.session.screenToDocumentPosition(b.row+v,b.column);if(_.isEmpty())var C=x;else var y=this.session.documentToScreenPosition(E?_.end:_.start),C=this.session.screenToDocumentPosition(y.row+v,y.column);if(E){var B=r.fromPoints(x,C);B.cursor=B.start}else{var B=r.fromPoints(C,x);B.cursor=B.end}if(B.desiredColumn=b.column,!this.selection.inMultiSelectMode)this.selection.addRange(_);else if(A)var T=_.cursor;this.selection.addRange(B),T&&this.selection.substractPoint(T)},this.transposeSelections=function(v){for(var A=this.session,_=A.multiSelect,E=_.ranges,b=E.length;b--;){var x=E[b];if(x.isEmpty()){var y=A.getWordRange(x.start.row,x.start.column);x.start.row=y.start.row,x.start.column=y.start.column,x.end.row=y.end.row,x.end.column=y.end.column}}_.mergeOverlappingRanges();for(var C=[],b=E.length;b--;){var x=E[b];C.unshift(A.getTextRange(x))}v<0?C.unshift(C.pop()):C.push(C.shift());for(var b=E.length;b--;){var x=E[b],y=x.clone();A.replace(x,C[b]),x.start.row=y.start.row,x.start.column=y.start.column}},this.selectMore=function(v,A,_){var E=this.session,b=E.multiSelect,x=b.toOrientedRange();if(!(x.isEmpty()&&(x=E.getWordRange(x.start.row,x.start.column),x.cursor=v==-1?x.start:x.end,this.multiSelect.addRange(x),_))){var y=E.getTextRange(x),C=h(E,y,v);C&&(C.cursor=v==-1?C.start:C.end,this.$blockScrolling+=1,this.session.unfold(C),this.multiSelect.addRange(C),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),A&&this.multiSelect.substractPoint(x.cursor)}},this.alignCursors=function(){var v=this.session,A=v.multiSelect,_=A.ranges,E=-1,b=_.filter(function(j){if(j.cursor.row==E)return!0;E=j.cursor.row});if(!_.length||b.length==_.length-1){var x=this.selection.getRange(),y=x.start.row,C=x.end.row,B=y==C;if(B){var T=this.session.getLength(),M;do M=this.session.getLine(C);while(/[=:]/.test(M)&&++C<T);do M=this.session.getLine(y);while(/[=:]/.test(M)&&--y>0);y<0&&(y=0),C>=T&&(C=T-1)}var R=this.session.removeFullLines(y,C);R=this.$reAlignText(R,B),this.session.insert({row:y,column:0},R.join(`
|
|
`)+`
|
|
`),B||(x.start.column=0,x.end.column=R[R.length-1].length),this.selection.setRange(x)}else{b.forEach(function(j){A.substractPoint(j.cursor)});var I=0,H=1/0,P=_.map(function(j){var V=j.cursor,K=v.getLine(V.row),N=K.substr(V.column).search(/\S/g);return N==-1&&(N=0),V.column>I&&(I=V.column),N<H&&(H=N),N});_.forEach(function(j,V){var K=j.cursor,N=I-K.column,k=P[V]-H;N>k?v.insert(K,c.stringRepeat(" ",N-k)):v.remove(new r(K.row,K.column,K.row,K.column-N+k)),j.start.column=j.end.column=I,j.start.row=j.end.row=K.row,j.cursor=j.end}),A.fromOrientedRange(_[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(v,A){var _=!0,E=!0,b,x,y;return v.map(function(R){var I=R.match(/(\s*)(.*?)(\s*)([=:].*)/);return I?b==null?(b=I[1].length,x=I[2].length,y=I[3].length,I):(b+x+y!=I[1].length+I[2].length+I[3].length&&(E=!1),b!=I[1].length&&(_=!1),b>I[1].length&&(b=I[1].length),x<I[2].length&&(x=I[2].length),y>I[3].length&&(y=I[3].length),I):[R]}).map(A?B:_?E?T:B:M);function C(R){return c.stringRepeat(" ",R)}function B(R){return R[2]?C(b)+R[2]+C(x-R[2].length+y)+R[4].replace(/^([=:])\s+/,"$1 "):R[0]}function T(R){return R[2]?C(b+x-R[2].length)+R[2]+C(y)+R[4].replace(/^([=:])\s+/,"$1 "):R[0]}function M(R){return R[2]?C(b)+R[2]+C(y)+R[4].replace(/^([=:])\s+/,"$1 "):R[0]}}}).call(g.prototype);function p(v,A){return v.row==A.row&&v.column==A.column}t.onSessionChange=function(v){var A=v.session;A&&!A.multiSelect&&(A.$selectionMarkers=[],A.selection.$initRangeList(),A.multiSelect=A.selection),this.multiSelect=A&&A.multiSelect;var _=v.oldSession;_&&(_.multiSelect.off("addRange",this.$onAddRange),_.multiSelect.off("removeRange",this.$onRemoveRange),_.multiSelect.off("multiSelect",this.$onMultiSelect),_.multiSelect.off("singleSelect",this.$onSingleSelect),_.multiSelect.lead.off("change",this.$checkMultiselectChange),_.multiSelect.anchor.off("change",this.$checkMultiselectChange)),A&&(A.multiSelect.on("addRange",this.$onAddRange),A.multiSelect.on("removeRange",this.$onRemoveRange),A.multiSelect.on("multiSelect",this.$onMultiSelect),A.multiSelect.on("singleSelect",this.$onSingleSelect),A.multiSelect.lead.on("change",this.$checkMultiselectChange),A.multiSelect.anchor.on("change",this.$checkMultiselectChange)),A&&this.inMultiSelectMode!=A.selection.inMultiSelectMode&&(A.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function m(v){v.$multiselectOnSessionChange||(v.$onAddRange=v.$onAddRange.bind(v),v.$onRemoveRange=v.$onRemoveRange.bind(v),v.$onMultiSelect=v.$onMultiSelect.bind(v),v.$onSingleSelect=v.$onSingleSelect.bind(v),v.$multiselectOnSessionChange=t.onSessionChange.bind(v),v.$checkMultiselectChange=v.$checkMultiselectChange.bind(v),v.$multiselectOnSessionChange(v),v.on("changeSession",v.$multiselectOnSessionChange),v.on("mousedown",u),v.commands.addCommands(a.defaultCommands),w(v))}function w(v){var A=v.textInput.getElement(),_=!1;o.addListener(A,"keydown",function(b){var x=b.keyCode==18&&!(b.ctrlKey||b.shiftKey||b.metaKey);v.$blockSelectEnabled&&x?_||(v.renderer.setMouseCursor("crosshair"),_=!0):_&&E()}),o.addListener(A,"keyup",E),o.addListener(A,"blur",E);function E(b){_&&(v.renderer.setMouseCursor(""),_=!1)}}t.MultiSelect=m,e("./config").defineOptions(g.prototype,"editor",{enableMultiselect:{set:function(v){m(this),v?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",u)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",u))},value:!0},enableBlockSelect:{set:function(v){this.$blockSelectEnabled=v},value:!0}})});ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,n){var i=e("../../range").Range,r=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(s,u,o){var c=s.getLine(o);return this.foldingStartMarker.test(c)?"start":u=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(c)?"end":""},this.getFoldWidgetRange=function(s,u,o){return null},this.indentationBlock=function(s,u,o){var c=/\S/,a=s.getLine(u),f=a.search(c);if(f!=-1){for(var l=o||a.length,h=s.getLength(),d=u,g=u;++u<h;){var p=s.getLine(u).search(c);if(p!=-1){if(p<=f)break;g=u}}if(g>d){var m=s.getLine(g).length;return new i(d,l,g,m)}}},this.openingBracketBlock=function(s,u,o,c,a){var f={row:o,column:c+1},l=s.$findClosingBracket(u,f,a);if(!!l){var h=s.foldWidgets[l.row];return h==null&&(h=s.getFoldWidget(l.row)),h=="start"&&l.row>f.row&&(l.row--,l.column=s.getLine(l.row).length),i.fromPoints(f,l)}},this.closingBracketBlock=function(s,u,o,c,a){var f={row:o,column:c},l=s.$findOpeningBracket(u,f);if(!!l)return l.column++,f.column--,i.fromPoints(l,f)}}).call(r.prototype)});ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var i=e("../lib/dom");i.importCssString(t.cssText,t.cssClass)});ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,t,n){e("./lib/oop");var i=e("./lib/dom");e("./range").Range;function r(s){this.session=s,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(s){var u;return this.lineWidgets?u=this.lineWidgets[s]&&this.lineWidgets[s].rowCount||0:u=0,!this.$useWrapMode||!this.$wrapData[s]?1+u:this.$wrapData[s].length+1+u},this.$getWidgetScreenLength=function(){var s=0;return this.lineWidgets.forEach(function(u){u&&u.rowCount&&!u.hidden&&(s+=u.rowCount)}),s},this.$onChangeEditor=function(s){this.attach(s.editor)},this.attach=function(s){s&&s.widgetManager&&s.widgetManager!=this&&s.widgetManager.detach(),this.editor!=s&&(this.detach(),this.editor=s,s&&(s.widgetManager=this,s.renderer.on("beforeRender",this.measureWidgets),s.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(s){var u=this.editor;if(!!u){this.editor=null,u.widgetManager=null,u.renderer.off("beforeRender",this.measureWidgets),u.renderer.off("afterRender",this.renderWidgets);var o=this.session.lineWidgets;o&&o.forEach(function(c){c&&c.el&&c.el.parentNode&&(c._inDocument=!1,c.el.parentNode.removeChild(c.el))})}},this.updateOnFold=function(s,u){var o=u.lineWidgets;if(!(!o||!s.action)){for(var c=s.data,a=c.start.row,f=c.end.row,l=s.action=="add",h=a+1;h<f;h++)o[h]&&(o[h].hidden=l);o[f]&&(l?o[a]?o[f].hidden=l:o[a]=o[f]:(o[a]==o[f]&&(o[a]=void 0),o[f].hidden=l))}},this.updateOnChange=function(s){var u=this.session.lineWidgets;if(!!u){var o=s.start.row,c=s.end.row-o;if(c!==0)if(s.action=="remove"){var a=u.splice(o+1,c);a.forEach(function(l){l&&this.removeLineWidget(l)},this),this.$updateRows()}else{var f=new Array(c);f.unshift(o,0),u.splice.apply(u,f),this.$updateRows()}}},this.$updateRows=function(){var s=this.session.lineWidgets;if(!!s){var u=!0;s.forEach(function(o,c){if(o)for(u=!1,o.row=c;o.$oldWidget;)o.$oldWidget.row=c,o=o.$oldWidget}),u&&(this.session.lineWidgets=null)}},this.addLineWidget=function(s){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var u=this.session.lineWidgets[s.row];u&&(s.$oldWidget=u,u.el&&u.el.parentNode&&(u.el.parentNode.removeChild(u.el),u._inDocument=!1)),this.session.lineWidgets[s.row]=s,s.session=this.session;var o=this.editor.renderer;s.html&&!s.el&&(s.el=i.createElement("div"),s.el.innerHTML=s.html),s.el&&(i.addCssClass(s.el,"ace_lineWidgetContainer"),s.el.style.position="absolute",s.el.style.zIndex=5,o.container.appendChild(s.el),s._inDocument=!0),s.coverGutter||(s.el.style.zIndex=3),s.pixelHeight==null&&(s.pixelHeight=s.el.offsetHeight),s.rowCount==null&&(s.rowCount=s.pixelHeight/o.layerConfig.lineHeight);var c=this.session.getFoldAt(s.row,0);if(s.$fold=c,c){var a=this.session.lineWidgets;s.row==c.end.row&&!a[c.start.row]?a[c.start.row]=s:s.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows(),this.renderWidgets(null,o),this.onWidgetChanged(s),s},this.removeLineWidget=function(s){if(s._inDocument=!1,s.session=null,s.el&&s.el.parentNode&&s.el.parentNode.removeChild(s.el),s.editor&&s.editor.destroy)try{s.editor.destroy()}catch{}if(this.session.lineWidgets){var u=this.session.lineWidgets[s.row];if(u==s)this.session.lineWidgets[s.row]=s.$oldWidget,s.$oldWidget&&this.onWidgetChanged(s.$oldWidget);else for(;u;){if(u.$oldWidget==s){u.$oldWidget=s.$oldWidget;break}u=u.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(s){for(var u=this.session.lineWidgets,o=u&&u[s],c=[];o;)c.push(o),o=o.$oldWidget;return c},this.onWidgetChanged=function(s){this.session._changedWidgets.push(s),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(s,u){var o=this.session._changedWidgets,c=u.layerConfig;if(!(!o||!o.length)){for(var a=1/0,f=0;f<o.length;f++){var l=o[f];if(!(!l||!l.el)&&l.session==this.session){if(!l._inDocument){if(this.session.lineWidgets[l.row]!=l)continue;l._inDocument=!0,u.container.appendChild(l.el)}l.h=l.el.offsetHeight,l.fixedWidth||(l.w=l.el.offsetWidth,l.screenWidth=Math.ceil(l.w/c.characterWidth));var h=l.h/c.lineHeight;l.coverLine&&(h-=this.session.getRowLineCount(l.row),h<0&&(h=0)),l.rowCount!=h&&(l.rowCount=h,l.row<a&&(a=l.row))}}a!=1/0&&(this.session._emit("changeFold",{data:{start:{row:a}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(s,u){var o=u.layerConfig,c=this.session.lineWidgets;if(!!c){for(var a=Math.min(this.firstRow,o.firstRow),f=Math.max(this.lastRow,o.lastRow,c.length);a>0&&!c[a];)a--;this.firstRow=o.firstRow,this.lastRow=o.lastRow,u.$cursorLayer.config=o;for(var l=a;l<=f;l++){var h=c[l];if(!(!h||!h.el)){if(h.hidden){h.el.style.top=-100-(h.pixelHeight||0)+"px";continue}h._inDocument||(h._inDocument=!0,u.container.appendChild(h.el));var d=u.$cursorLayer.getPixelPosition({row:l,column:0},!0).top;h.coverLine||(d+=o.lineHeight*this.session.getRowLineCount(h.row)),h.el.style.top=d-o.offset+"px";var g=h.coverGutter?0:u.gutterWidth;h.fixedWidth||(g-=u.scrollLeft),h.el.style.left=g+"px",h.fullWidth&&h.screenWidth&&(h.el.style.minWidth=o.width+2*o.padding+"px"),h.fixedWidth?h.el.style.right=u.scrollBar.getWidth()+"px":h.el.style.right=""}}}}}).call(r.prototype),t.LineWidgets=r});ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,n){var i=e("../line_widgets").LineWidgets,r=e("../lib/dom"),s=e("../range").Range;function u(c,a,f){for(var l=0,h=c.length-1;l<=h;){var d=l+h>>1,g=f(a,c[d]);if(g>0)l=d+1;else if(g<0)h=d-1;else return d}return-(l+1)}function o(c,a,f){var l=c.getAnnotations().sort(s.comparePoints);if(!!l.length){var h=u(l,{row:a,column:-1},s.comparePoints);h<0&&(h=-h-1),h>=l.length?h=f>0?0:l.length-1:h===0&&f<0&&(h=l.length-1);var d=l[h];if(!(!d||!f)){if(d.row===a){do d=l[h+=f];while(d&&d.row===a);if(!d)return l.slice()}var g=[];a=d.row;do g[f<0?"unshift":"push"](d),d=l[h+=f];while(d&&d.row==a);return g.length&&g}}}t.showErrorMarker=function(c,a){var f=c.session;f.widgetManager||(f.widgetManager=new i(f),f.widgetManager.attach(c));var l=c.getCursorPosition(),h=l.row,d=f.widgetManager.getWidgetsAtRow(h).filter(function(b){return b.type=="errorMarker"})[0];d?d.destroy():h-=a;var g=o(f,h,a),p;if(g){var m=g[0];l.column=(m.pos&&typeof m.column!="number"?m.pos.sc:m.column)||0,l.row=m.row,p=c.renderer.$gutterLayer.$annotations[l.row]}else{if(d)return;p={text:["Looks good!"],className:"ace_ok"}}c.session.unfold(l.row),c.selection.moveToPosition(l);var w={row:l.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},v=w.el.appendChild(r.createElement("div")),A=w.el.appendChild(r.createElement("div"));A.className="error_widget_arrow "+p.className;var _=c.renderer.$cursorLayer.getPixelPosition(l).left;A.style.left=_+c.renderer.gutterWidth-5+"px",w.el.className="error_widget_wrapper",v.className="error_widget "+p.className,v.innerHTML=p.text.join("<br>"),v.appendChild(r.createElement("div"));var E=function(b,x,y){if(x===0&&(y==="esc"||y==="return"))return w.destroy(),{command:"null"}};w.destroy=function(){c.$mouseHandler.isMousePressed||(c.keyBinding.removeKeyboardHandler(E),f.widgetManager.removeLineWidget(w),c.off("changeSelection",w.destroy),c.off("changeSession",w.destroy),c.off("mouseup",w.destroy),c.off("change",w.destroy))},c.keyBinding.addKeyboardHandler(E),c.on("changeSelection",w.destroy),c.on("changeSession",w.destroy),c.on("mouseup",w.destroy),c.on("change",w.destroy),c.session.widgetManager.addLineWidget(w),w.el.onmousedown=c.focus.bind(c),c.renderer.scrollCursorIntoView(null,.5,{bottom:w.el.offsetHeight})},r.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")});ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,n){e("./lib/fixoldbrowsers");var i=e("./lib/dom"),r=e("./lib/event"),s=e("./editor").Editor,u=e("./edit_session").EditSession,o=e("./undomanager").UndoManager,c=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.acequire=e,t.edit=function(a){if(typeof a=="string"){var f=a;if(a=document.getElementById(f),!a)throw new Error("ace.edit can't find div #"+f)}if(a&&a.env&&a.env.editor instanceof s)return a.env.editor;var l="";if(a&&/input|textarea/i.test(a.tagName)){var h=a;l=h.value,a=i.createElement("pre"),h.parentNode.replaceChild(a,h)}else a&&(l=i.getInnerText(a),a.innerHTML="");var d=t.createEditSession(l),g=new s(new c(a));g.setSession(d);var p={document:d,editor:g,onResize:g.resize.bind(g,null)};return h&&(p.textarea=h),r.addListener(window,"resize",p.onResize),g.on("destroy",function(){r.removeListener(window,"resize",p.onResize),p.editor.container.env=null}),g.container.env=g.env=p,g},t.createEditSession=function(a,f){var l=new u(a,f);return l.setUndoManager(new o),l},t.EditSession=u,t.UndoManager=o,t.version="1.2.9"});(function(){ace.acequire(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e);for(var t in e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])})})();var Y2=window.ace.acequire("ace/ace"),rc={};rc.id="ace/mode/json_worker";rc.src=`"no use strict";!function(window){function resolveModuleId(id,paths){for(var testPath=id,tail="";testPath;){var alias=paths[testPath];if("string"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\/*$/,"/")+(tail||alias.main||alias.name);if(alias===!1)return"";var i=testPath.lastIndexOf("/");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:"error",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf("!")){var chunks=moduleName.split("!");return window.normalizeModule(parentId,chunks[0])+"!"+window.normalizeModule(parentId,chunks[1])}if("."==moduleName.charAt(0)){var base=parentId.split("/").slice(0,-1).join("/");for(moduleName=(base?base+"/":"")+moduleName;-1!==moduleName.indexOf(".")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,"").replace(/\\/\\.\\//,"/").replace(/[^\\/]+\\/\\.\\.\\//,"")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error("worker.js acequire() accepts only (parentId, id) as arguments");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log("unable to load "+id);var path=resolveModuleId(id,window.acequire.tlns);return".js"!=path.slice(-3)&&(path+=".js"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,"string"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),"function"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=["require","exports","module"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case"require":return req;case"exports":return module.exports;case"module":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire("ace/lib/event_emitter").EventEmitter,oop=window.acequire("ace/lib/oop"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:"call",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:"event",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error("Unknown command:"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire("ace/lib/es5-shim"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}}(this),ace.define("ace/lib/oop",["require","exports","module"],function(acequire,exports){"use strict";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define("ace/range",["require","exports","module"],function(acequire,exports){"use strict";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){"object"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){"object"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define("ace/apply_delta",["require","exports","module"],function(acequire,exports){"use strict";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||"";switch(delta.action){case"insert":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case"remove":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(acequire,exports){"use strict";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){"object"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?"unshift":"push"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.column<point2.column;return point1.row<point2.row||point1.row==point2.row&&bColIsAfter}function $getTransformedPoint(delta,point,moveIfEqual){var deltaIsInsert="insert"==delta.action,deltaRowShift=(deltaIsInsert?1:-1)*(delta.end.row-delta.start.row),deltaColShift=(deltaIsInsert?1:-1)*(delta.end.column-delta.start.column),deltaStart=delta.start,deltaEnd=deltaIsInsert?deltaStart:delta.end;return $pointsInOrder(point,deltaStart,moveIfEqual)?{row:point.row,column:point.column}:$pointsInOrder(deltaEnd,point,!moveIfEqual)?{row:point.row+deltaRowShift,column:point.column+(point.row==deltaEnd.row?deltaColShift:0)}:{row:deltaStart.row,column:deltaStart.column}}oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(delta){if(!(delta.start.row==delta.end.row&&delta.start.row!=this.row||delta.start.row>this.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal("change",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),applyDelta=acequire("./apply_delta").applyDelta,EventEmitter=acequire("./lib/event_emitter").EventEmitter,Range=acequire("./range").Range,Anchor=acequire("./anchor").Anchor,Document=function(textOrLines){this.$lines=[""],0===textOrLines.length?this.$lines=[""]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0==="aaa".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,"\\n").split("\\n")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[1]:"\\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\\r\\n";case"unix":return"\\n";default:return this.$autoNewLine||"\\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return"\\r\\n"==text||"\\r"==text||"\\n"==text},this.getLine=function(row){return this.$lines[row]||""},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||"").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(position,["",""])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:"insert",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([""]),column=0):(lines=[""].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:"insert",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:"remove",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:"remove",lines:["",""]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert="insert"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal("change",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(""),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:"insert"==delta.action?"remove":"insert",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define("ace/lib/lang",["require","exports","module"],function(acequire,exports){"use strict";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split("").reverse().join("")},exports.stringRepeat=function(string,count){for(var result="";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,"")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,"")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&"object"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function deepCopy(obj){if("object"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}if("[object Object]"!==Object.prototype.toString.call(obj))return obj;copy={};for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^\${}()|[\\]\\/\\\\])/g,"\\\\$1")},exports.escapeHTML=function(str){return str.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},exports.getMatchOffsets=function(string,regExp){var matches=[];return string.replace(regExp,function(str){matches.push({offset:arguments[arguments.length-2],length:str.length})}),matches},exports.deferredCall=function(fcn){var timer=null,callback=function(){timer=null,fcn()},deferred=function(timeout){return deferred.cancel(),timer=setTimeout(callback,timeout||0),deferred};return deferred.schedule=deferred,deferred.call=function(){return this.cancel(),fcn(),deferred},deferred.cancel=function(){return clearTimeout(timer),timer=null,deferred},deferred.isPending=function(){return timer},deferred},exports.delayedCall=function(fcn,defaultTimeout){var timer=null,callback=function(){timer=null,fcn()},_self=function(timeout){null==timer&&(timer=setTimeout(callback,timeout||defaultTimeout))};return _self.delay=function(timeout){timer&&clearTimeout(timer),timer=setTimeout(callback,timeout||defaultTimeout)},_self.schedule=_self,_self.call=function(){this.cancel(),fcn()},_self.cancel=function(){timer&&clearTimeout(timer),timer=null},_self.isPending=function(){return timer},_self}}),ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"],function(acequire,exports){"use strict";acequire("../range").Range;var Document=acequire("../document").Document,lang=acequire("../lib/lang"),Mirror=exports.Mirror=function(sender){this.sender=sender;var doc=this.doc=new Document(""),deferredUpdate=this.deferredUpdate=lang.delayedCall(this.onUpdate.bind(this)),_self=this;sender.on("change",function(e){var data=e.data;if(data[0].start)doc.applyDeltas(data);else for(var i=0;data.length>i;i+=2){if(Array.isArray(data[i+1]))var d={action:"insert",start:data[i],lines:data[i+1]};else var d={action:"remove",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define("ace/mode/json/json_parse",["require","exports","module"],function(){"use strict";var at,ch,text,value,escapee={'"':'"',"\\\\":"\\\\","/":"/",b:"\\b",f:"\\f",n:"\\n",r:"\\r",t:" "},error=function(m){throw{name:"SyntaxError",message:m,at:at,text:text}},next=function(c){return c&&c!==ch&&error("Expected '"+c+"' instead of '"+ch+"'"),ch=text.charAt(at),at+=1,ch},number=function(){var number,string="";for("-"===ch&&(string="-",next("-"));ch>="0"&&"9">=ch;)string+=ch,next();if("."===ch)for(string+=".";next()&&ch>="0"&&"9">=ch;)string+=ch;if("e"===ch||"E"===ch)for(string+=ch,next(),("-"===ch||"+"===ch)&&(string+=ch,next());ch>="0"&&"9">=ch;)string+=ch,next();return number=+string,isNaN(number)?(error("Bad number"),void 0):number},string=function(){var hex,i,uffff,string="";if('"'===ch)for(;next();){if('"'===ch)return next(),string;if("\\\\"===ch)if(next(),"u"===ch){for(uffff=0,i=0;4>i&&(hex=parseInt(next(),16),isFinite(hex));i+=1)uffff=16*uffff+hex;string+=String.fromCharCode(uffff)}else{if("string"!=typeof escapee[ch])break;string+=escapee[ch]}else string+=ch}error("Bad string")},white=function(){for(;ch&&" ">=ch;)next()},word=function(){switch(ch){case"t":return next("t"),next("r"),next("u"),next("e"),!0;case"f":return next("f"),next("a"),next("l"),next("s"),next("e"),!1;case"n":return next("n"),next("u"),next("l"),next("l"),null}error("Unexpected '"+ch+"'")},array=function(){var array=[];if("["===ch){if(next("["),white(),"]"===ch)return next("]"),array;for(;ch;){if(array.push(value()),white(),"]"===ch)return next("]"),array;next(","),white()}}error("Bad array")},object=function(){var key,object={};if("{"===ch){if(next("{"),white(),"}"===ch)return next("}"),object;for(;ch;){if(key=string(),white(),next(":"),Object.hasOwnProperty.call(object,key)&&error('Duplicate key "'+key+'"'),object[key]=value(),white(),"}"===ch)return next("}"),object;next(","),white()}}error("Bad object")};return value=function(){switch(white(),ch){case"{":return object();case"[":return array();case'"':return string();case"-":return number();default:return ch>="0"&&"9">=ch?number():word()}},function(source,reviver){var result;return text=source,at=0,ch=" ",result=value(),white(),ch&&error("Syntax error"),"function"==typeof reviver?function walk(holder,key){var k,v,value=holder[key];if(value&&"object"==typeof value)for(k in value)Object.hasOwnProperty.call(value,k)&&(v=walk(value,k),void 0!==v?value[k]=v:delete value[k]);return reviver.call(holder,key,value)}({"":result},""):result}}),ace.define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"],function(acequire,exports){"use strict";var oop=acequire("../lib/oop"),Mirror=acequire("../worker/mirror").Mirror,parse=acequire("./json/json_parse"),JsonWorker=exports.JsonWorker=function(sender){Mirror.call(this,sender),this.setTimeout(200)};oop.inherits(JsonWorker,Mirror),function(){this.onUpdate=function(){var value=this.doc.getValue(),errors=[];try{value&&parse(value)}catch(e){var pos=this.doc.indexToPosition(e.at-1);errors.push({row:pos.row,column:pos.column,text:e.message,type:"error"})}this.sender.emit("annotate",errors)}}.call(JsonWorker.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,"sentinel",{}),"sentinel"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if("function"!=typeof target)throw new TypeError("Function.prototype.bind called on incompatible "+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,"__defineGetter__"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,"XXX"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0
|
|
}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return"[object Array]"==_toString(obj)});var boxedString=Object("a"),splitString="a"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,thisp=arguments[1],i=-1,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=[],thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError("reduce of empty array with no initial value")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError("reduceRight of empty array with no initial value")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(object,property){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if("object"!=typeof prototype)throw new TypeError("typeof prototype["+typeof prototype+"] != 'object'");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom="undefined"==typeof document||doesDefinePropertyWork(document.createElement("div"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR="Property description must be an object: ",ERR_NON_OBJECT_TARGET="Object.defineProperty called on non-object: ",ERR_ACCESSORS_NOT_SUPPORTED="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(object,property,descriptor){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if("object"!=typeof descriptor&&"function"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,"value"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,"get")&&defineGetter(object,property,descriptor.get),owns(descriptor,"set")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return"function"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name="";owns(object,name);)name+="?";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError("Object.keys called on a non-object");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws=" \\n\v\\f\\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\\u2028\\u2029\uFEFF";if(!String.prototype.trim||ws.trim()){ws="["+ws+"]";var trimBeginRegexp=RegExp("^"+ws+ws+"*"),trimEndRegexp=RegExp(ws+ws+"*$");String.prototype.trim=function(){return(this+"").replace(trimBeginRegexp,"").replace(trimEndRegexp,"")}}var toObject=function(o){if(null==o)throw new TypeError("can't convert "+o+" to object");return Object(o)}});`;ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};i.inherits(s,r),t.JsonHighlightRules=s});ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var i=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(s,u){return/^\s+$/.test(s)?/^\s*\}/.test(u):!1},this.autoOutdent=function(s,u){var o=s.getLine(u),c=o.match(/^(\s*\})/);if(!c)return 0;var a=c[1].length,f=s.findMatchingBracket({row:u,column:a});if(!f||f.row==u)return 0;var l=this.$getIndent(s.getLine(f.row));s.replace(new i(u,0,u,a-1),l)},this.$getIndent=function(s){return s.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r});ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){var i=e("../../lib/oop"),r=e("../../range").Range,s=e("./fold_mode").FoldMode,u=t.FoldMode=function(o){o&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+o.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+o.end)))};i.inherits(u,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(o,c,a){var f=o.getLine(a);if(this.singleLineBlockCommentRe.test(f)&&!this.startRegionRe.test(f)&&!this.tripleStarBlockCommentRe.test(f))return"";var l=this._getFoldWidgetBase(o,c,a);return!l&&this.startRegionRe.test(f)?"start":l},this.getFoldWidgetRange=function(o,c,a,f){var l=o.getLine(a);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(o,l,a);var g=l.match(this.foldingStartMarker);if(g){var h=g.index;if(g[1])return this.openingBracketBlock(o,g[1],a,h);var d=o.getCommentFoldRange(a,h+g[0].length,1);return d&&!d.isMultiLine()&&(f?d=this.getSectionRange(o,a):c!="all"&&(d=null)),d}if(c!=="markbegin"){var g=l.match(this.foldingStopMarker);if(g){var h=g.index+g[0].length;return g[1]?this.closingBracketBlock(o,g[1],a,h):o.getCommentFoldRange(a,h,-1)}}},this.getSectionRange=function(o,c){var a=o.getLine(c),f=a.search(/\S/),l=c,h=a.length;c=c+1;for(var d=c,g=o.getLength();++c<g;){a=o.getLine(c);var p=a.search(/\S/);if(p!==-1){if(f>p)break;var m=this.getFoldWidgetRange(o,"all",c);if(m){if(m.start.row<=l)break;if(m.isMultiLine())c=m.end.row;else if(f==p)break}d=c}}return new r(l,h,d,o.getLine(d).length)},this.getCommentRegionBlock=function(o,c,a){for(var f=c.search(/\s*$/),l=o.getLength(),h=a,d=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,g=1;++a<l;){c=o.getLine(a);var p=d.exec(c);if(!!p&&(p[1]?g--:g++,!g))break}var m=a;if(m>h)return new r(h,f,m,c.length)}}.call(u.prototype)});ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,t,n){var i=e("../lib/oop"),r=e("./text").Mode,s=e("./json_highlight_rules").JsonHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,o=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,a=e("../worker/worker_client").WorkerClient,f=function(){this.HighlightRules=s,this.$outdent=new u,this.$behaviour=new o,this.foldingRules=new c};i.inherits(f,r),function(){this.getNextLineIndent=function(l,h,d){var g=this.$getIndent(h);if(l=="start"){var p=h.match(/^.*[\{\(\[]\s*$/);p&&(g+=d)}return g},this.checkOutdent=function(l,h,d){return this.$outdent.checkOutdent(h,d)},this.autoOutdent=function(l,h,d){this.$outdent.autoOutdent(h,d)},this.createWorker=function(l){var h=new a(["ace"],rc,"JsonWorker");return h.attachToDocument(l.getDocument()),h.on("annotate",function(d){l.setAnnotations(d.data)}),h.on("terminate",function(){l.clearAnnotations()}),h},this.$id="ace/mode/json"}.call(f.prototype),t.Mode=f});ace.define("ace/mode/yaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"list.markup",regex:/^(?:-{3}|\.{3})\s*(?=#|$)/},{token:"list.markup",regex:/^\s*[\-?](?:$|\s)/},{token:"constant",regex:"!![\\w//]+"},{token:"constant.language",regex:"[&\\*][a-zA-Z0-9-_]+"},{token:["meta.tag","keyword"],regex:/^(\s*\w.*?)(:(?=\s|$))/},{token:["meta.tag","keyword"],regex:/(\w+?)(\s*:(?=\s|$))/},{token:"keyword.operator",regex:"<<\\w*:\\w*"},{token:"keyword.operator",regex:"-\\s*(?=[{])"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:/[|>][-+\d\s]*$/,onMatch:function(u,o,c,a){var f=/^\s*/.exec(a)[0];return c.length<1?c.push(this.next):c[0]="mlString",c.length<2?c.push(f.length):c[1]=f.length,this.token},next:"mlString"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)/},{token:"constant.numeric",regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:"constant.language.boolean",regex:"\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:/[^\s,:\[\]\{\}]+/}],mlString:[{token:"indent",regex:/^\s*$/},{token:"indent",regex:/^\s*/,onMatch:function(u,o,c){var a=c[1];return a>=u.length?(this.next="start",c.splice(0)):this.next="mlString",this.token},next:"mlString"},{token:"string",regex:".+"}]},this.normalizeRules()};i.inherits(s,r),t.YamlHighlightRules=s});ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var i=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(s,u){return/^\s+$/.test(s)?/^\s*\}/.test(u):!1},this.autoOutdent=function(s,u){var o=s.getLine(u),c=o.match(/^(\s*\})/);if(!c)return 0;var a=c[1].length,f=s.findMatchingBracket({row:u,column:a});if(!f||f.row==u)return 0;var l=this.$getIndent(s.getLine(f.row));s.replace(new i(u,0,u,a-1),l)},this.$getIndent=function(s){return s.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r});ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){var i=e("../../lib/oop"),r=e("./fold_mode").FoldMode,s=e("../../range").Range,u=t.FoldMode=function(){};i.inherits(u,r),function(){this.getFoldWidgetRange=function(o,c,a){var f=this.indentationBlock(o,a);if(f)return f;var l=/\S/,h=o.getLine(a),d=h.search(l);if(!(d==-1||h[d]!="#")){for(var g=h.length,p=o.getLength(),m=a,w=a;++a<p;){h=o.getLine(a);var v=h.search(l);if(v!=-1){if(h[v]!="#")break;w=a}}if(w>m){var A=o.getLine(w).length;return new s(m,g,w,A)}}},this.getFoldWidget=function(o,c,a){var f=o.getLine(a),l=f.search(/\S/),h=o.getLine(a+1),d=o.getLine(a-1),g=d.search(/\S/),p=h.search(/\S/);if(l==-1)return o.foldWidgets[a-1]=g!=-1&&g<p?"start":"","";if(g==-1){if(l==p&&f[l]=="#"&&h[l]=="#")return o.foldWidgets[a-1]="",o.foldWidgets[a+1]="","start"}else if(g==l&&f[l]=="#"&&d[l]=="#"&&o.getLine(a-2).search(/\S/)==-1)return o.foldWidgets[a-1]="start",o.foldWidgets[a+1]="","";return g!=-1&&g<l?o.foldWidgets[a-1]="start":o.foldWidgets[a-1]="",l<p?"start":""}}.call(u.prototype)});ace.define("ace/mode/yaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/yaml_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee"],function(e,t,n){var i=e("../lib/oop"),r=e("./text").Mode,s=e("./yaml_highlight_rules").YamlHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,o=e("./folding/coffee").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new u,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};i.inherits(c,r),function(){this.lineCommentStart=["#","//"],this.getNextLineIndent=function(a,f,l){var h=this.$getIndent(f);if(a=="start"){var d=f.match(/^.*[\{\(\[]\s*$/);d&&(h+=l)}return h},this.checkOutdent=function(a,f,l){return this.$outdent.checkOutdent(f,l)},this.autoOutdent=function(a,f,l){this.$outdent.autoOutdent(f,l)},this.$id="ace/mode/yaml"}.call(c.prototype),t.Mode=c});var np={exports:{}};(function(e,t){(function(i,r){e.exports=r()})(tn,function(){return function(n){var i={};function r(s){if(i[s])return i[s].exports;var u=i[s]={exports:{},id:s,loaded:!1};return n[s].call(u.exports,u,u.exports,r),u.loaded=!0,u.exports}return r.m=n,r.c=i,r.p="",r(0)}([function(n,i,r){Object.defineProperty(i,"__esModule",{value:!0});var s=r(1),u=r(3),o=r(8),c=r(15);function a(g,p,m){var w=null,v=function(B,T){m&&m(B,T),w&&w.visit(B,T)},A=typeof m=="function"?v:null,_=!1;if(p){_=typeof p.comment=="boolean"&&p.comment;var E=typeof p.attachComment=="boolean"&&p.attachComment;(_||E)&&(w=new s.CommentHandler,w.attach=E,p.comment=!0,A=v)}var b=!1;p&&typeof p.sourceType=="string"&&(b=p.sourceType==="module");var x;p&&typeof p.jsx=="boolean"&&p.jsx?x=new u.JSXParser(g,p,A):x=new o.Parser(g,p,A);var y=b?x.parseModule():x.parseScript(),C=y;return _&&w&&(C.comments=w.comments),x.config.tokens&&(C.tokens=x.tokens),x.config.tolerant&&(C.errors=x.errorHandler.errors),C}i.parse=a;function f(g,p,m){var w=p||{};return w.sourceType="module",a(g,w,m)}i.parseModule=f;function l(g,p,m){var w=p||{};return w.sourceType="script",a(g,w,m)}i.parseScript=l;function h(g,p,m){var w=new c.Tokenizer(g,p),v;v=[];try{for(;;){var A=w.getNextToken();if(!A)break;m&&(A=m(A)),v.push(A)}}catch(_){w.errorHandler.tolerate(_)}return w.errorHandler.tolerant&&(v.errors=w.errors()),v}i.tokenize=h;var d=r(2);i.Syntax=d.Syntax,i.version="4.0.1"},function(n,i,r){Object.defineProperty(i,"__esModule",{value:!0});var s=r(2),u=function(){function o(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return o.prototype.insertInnerComments=function(c,a){if(c.type===s.Syntax.BlockStatement&&c.body.length===0){for(var f=[],l=this.leading.length-1;l>=0;--l){var h=this.leading[l];a.end.offset>=h.start&&(f.unshift(h.comment),this.leading.splice(l,1),this.trailing.splice(l,1))}f.length&&(c.innerComments=f)}},o.prototype.findTrailingComments=function(c){var a=[];if(this.trailing.length>0){for(var f=this.trailing.length-1;f>=0;--f){var l=this.trailing[f];l.start>=c.end.offset&&a.unshift(l.comment)}return this.trailing.length=0,a}var h=this.stack[this.stack.length-1];if(h&&h.node.trailingComments){var d=h.node.trailingComments[0];d&&d.range[0]>=c.end.offset&&(a=h.node.trailingComments,delete h.node.trailingComments)}return a},o.prototype.findLeadingComments=function(c){for(var a=[],f;this.stack.length>0;){var l=this.stack[this.stack.length-1];if(l&&l.start>=c.start.offset)f=l.node,this.stack.pop();else break}if(f){for(var h=f.leadingComments?f.leadingComments.length:0,d=h-1;d>=0;--d){var g=f.leadingComments[d];g.range[1]<=c.start.offset&&(a.unshift(g),f.leadingComments.splice(d,1))}return f.leadingComments&&f.leadingComments.length===0&&delete f.leadingComments,a}for(var d=this.leading.length-1;d>=0;--d){var l=this.leading[d];l.start<=c.start.offset&&(a.unshift(l.comment),this.leading.splice(d,1))}return a},o.prototype.visitNode=function(c,a){if(!(c.type===s.Syntax.Program&&c.body.length>0)){this.insertInnerComments(c,a);var f=this.findTrailingComments(a),l=this.findLeadingComments(a);l.length>0&&(c.leadingComments=l),f.length>0&&(c.trailingComments=f),this.stack.push({node:c,start:a.start.offset})}},o.prototype.visitComment=function(c,a){var f=c.type[0]==="L"?"Line":"Block",l={type:f,value:c.value};if(c.range&&(l.range=c.range),c.loc&&(l.loc=c.loc),this.comments.push(l),this.attach){var h={comment:{type:f,value:c.value,range:[a.start.offset,a.end.offset]},start:a.start.offset};c.loc&&(h.comment.loc=c.loc),c.type=f,this.leading.push(h),this.trailing.push(h)}},o.prototype.visit=function(c,a){c.type==="LineComment"?this.visitComment(c,a):c.type==="BlockComment"?this.visitComment(c,a):this.attach&&this.visitNode(c,a)},o}();i.CommentHandler=u},function(n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(n,i,r){var s=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,w){m.__proto__=w}||function(m,w){for(var v in w)w.hasOwnProperty(v)&&(m[v]=w[v])};return function(m,w){p(m,w);function v(){this.constructor=m}m.prototype=w===null?Object.create(w):(v.prototype=w.prototype,new v)}}();Object.defineProperty(i,"__esModule",{value:!0});var u=r(4),o=r(5),c=r(6),a=r(7),f=r(8),l=r(13),h=r(14);l.TokenName[100]="JSXIdentifier",l.TokenName[101]="JSXText";function d(p){var m;switch(p.type){case c.JSXSyntax.JSXIdentifier:var w=p;m=w.name;break;case c.JSXSyntax.JSXNamespacedName:var v=p;m=d(v.namespace)+":"+d(v.name);break;case c.JSXSyntax.JSXMemberExpression:var A=p;m=d(A.object)+"."+d(A.property);break}return m}var g=function(p){s(m,p);function m(w,v,A){return p.call(this,w,v,A)||this}return m.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():p.prototype.parsePrimaryExpression.call(this)},m.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},m.prototype.finishJSX=function(){this.nextToken()},m.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},m.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},m.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},m.prototype.scanXHTMLEntity=function(w){for(var v="&",A=!0,_=!1,E=!1,b=!1;!this.scanner.eof()&&A&&!_;){var x=this.scanner.source[this.scanner.index];if(x===w)break;if(_=x===";",v+=x,++this.scanner.index,!_)switch(v.length){case 2:E=x==="#";break;case 3:E&&(b=x==="x",A=b||u.Character.isDecimalDigit(x.charCodeAt(0)),E=E&&!b);break;default:A=A&&!(E&&!u.Character.isDecimalDigit(x.charCodeAt(0))),A=A&&!(b&&!u.Character.isHexDigit(x.charCodeAt(0)));break}}if(A&&_&&v.length>2){var y=v.substr(1,v.length-2);E&&y.length>1?v=String.fromCharCode(parseInt(y.substr(1),10)):b&&y.length>2?v=String.fromCharCode(parseInt("0"+y.substr(1),16)):!E&&!b&&h.XHTMLEntities[y]&&(v=h.XHTMLEntities[y])}return v},m.prototype.lexJSX=function(){var w=this.scanner.source.charCodeAt(this.scanner.index);if(w===60||w===62||w===47||w===58||w===61||w===123||w===125){var v=this.scanner.source[this.scanner.index++];return{type:7,value:v,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(w===34||w===39){for(var A=this.scanner.index,_=this.scanner.source[this.scanner.index++],E="";!this.scanner.eof();){var b=this.scanner.source[this.scanner.index++];if(b===_)break;b==="&"?E+=this.scanXHTMLEntity(_):E+=b}return{type:8,value:E,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:A,end:this.scanner.index}}if(w===46){var x=this.scanner.source.charCodeAt(this.scanner.index+1),y=this.scanner.source.charCodeAt(this.scanner.index+2),v=x===46&&y===46?"...":".",A=this.scanner.index;return this.scanner.index+=v.length,{type:7,value:v,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:A,end:this.scanner.index}}if(w===96)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(u.Character.isIdentifierStart(w)&&w!==92){var A=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var b=this.scanner.source.charCodeAt(this.scanner.index);if(u.Character.isIdentifierPart(b)&&b!==92)++this.scanner.index;else if(b===45)++this.scanner.index;else break}var C=this.scanner.source.slice(A,this.scanner.index);return{type:100,value:C,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:A,end:this.scanner.index}}return this.scanner.lex()},m.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var w=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(w)),w},m.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var w=this.scanner.index,v="";!this.scanner.eof();){var A=this.scanner.source[this.scanner.index];if(A==="{"||A==="<")break;++this.scanner.index,v+=A,u.Character.isLineTerminator(A.charCodeAt(0))&&(++this.scanner.lineNumber,A==="\r"&&this.scanner.source[this.scanner.index]===`
|
|
`&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var _={type:101,value:v,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:w,end:this.scanner.index};return v.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(_)),_},m.prototype.peekJSXToken=function(){var w=this.scanner.saveState();this.scanner.scanComments();var v=this.lexJSX();return this.scanner.restoreState(w),v},m.prototype.expectJSX=function(w){var v=this.nextJSXToken();(v.type!==7||v.value!==w)&&this.throwUnexpectedToken(v)},m.prototype.matchJSX=function(w){var v=this.peekJSXToken();return v.type===7&&v.value===w},m.prototype.parseJSXIdentifier=function(){var w=this.createJSXNode(),v=this.nextJSXToken();return v.type!==100&&this.throwUnexpectedToken(v),this.finalize(w,new o.JSXIdentifier(v.value))},m.prototype.parseJSXElementName=function(){var w=this.createJSXNode(),v=this.parseJSXIdentifier();if(this.matchJSX(":")){var A=v;this.expectJSX(":");var _=this.parseJSXIdentifier();v=this.finalize(w,new o.JSXNamespacedName(A,_))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var E=v;this.expectJSX(".");var b=this.parseJSXIdentifier();v=this.finalize(w,new o.JSXMemberExpression(E,b))}return v},m.prototype.parseJSXAttributeName=function(){var w=this.createJSXNode(),v,A=this.parseJSXIdentifier();if(this.matchJSX(":")){var _=A;this.expectJSX(":");var E=this.parseJSXIdentifier();v=this.finalize(w,new o.JSXNamespacedName(_,E))}else v=A;return v},m.prototype.parseJSXStringLiteralAttribute=function(){var w=this.createJSXNode(),v=this.nextJSXToken();v.type!==8&&this.throwUnexpectedToken(v);var A=this.getTokenRaw(v);return this.finalize(w,new a.Literal(v.value,A))},m.prototype.parseJSXExpressionAttribute=function(){var w=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var v=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(w,new o.JSXExpressionContainer(v))},m.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},m.prototype.parseJSXNameValueAttribute=function(){var w=this.createJSXNode(),v=this.parseJSXAttributeName(),A=null;return this.matchJSX("=")&&(this.expectJSX("="),A=this.parseJSXAttributeValue()),this.finalize(w,new o.JSXAttribute(v,A))},m.prototype.parseJSXSpreadAttribute=function(){var w=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var v=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(w,new o.JSXSpreadAttribute(v))},m.prototype.parseJSXAttributes=function(){for(var w=[];!this.matchJSX("/")&&!this.matchJSX(">");){var v=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();w.push(v)}return w},m.prototype.parseJSXOpeningElement=function(){var w=this.createJSXNode();this.expectJSX("<");var v=this.parseJSXElementName(),A=this.parseJSXAttributes(),_=this.matchJSX("/");return _&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(w,new o.JSXOpeningElement(v,_,A))},m.prototype.parseJSXBoundaryElement=function(){var w=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var v=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(w,new o.JSXClosingElement(v))}var A=this.parseJSXElementName(),_=this.parseJSXAttributes(),E=this.matchJSX("/");return E&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(w,new o.JSXOpeningElement(A,E,_))},m.prototype.parseJSXEmptyExpression=function(){var w=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(w,new o.JSXEmptyExpression)},m.prototype.parseJSXExpressionContainer=function(){var w=this.createJSXNode();this.expectJSX("{");var v;return this.matchJSX("}")?(v=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),v=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(w,new o.JSXExpressionContainer(v))},m.prototype.parseJSXChildren=function(){for(var w=[];!this.scanner.eof();){var v=this.createJSXChildNode(),A=this.nextJSXText();if(A.start<A.end){var _=this.getTokenRaw(A),E=this.finalize(v,new o.JSXText(A.value,_));w.push(E)}if(this.scanner.source[this.scanner.index]==="{"){var b=this.parseJSXExpressionContainer();w.push(b)}else break}return w},m.prototype.parseComplexJSXElement=function(w){for(var v=[];!this.scanner.eof();){w.children=w.children.concat(this.parseJSXChildren());var A=this.createJSXChildNode(),_=this.parseJSXBoundaryElement();if(_.type===c.JSXSyntax.JSXOpeningElement){var E=_;if(E.selfClosing){var b=this.finalize(A,new o.JSXElement(E,[],null));w.children.push(b)}else v.push(w),w={node:A,opening:E,closing:null,children:[]}}if(_.type===c.JSXSyntax.JSXClosingElement){w.closing=_;var x=d(w.opening.name),y=d(w.closing.name);if(x!==y&&this.tolerateError("Expected corresponding JSX closing tag for %0",x),v.length>0){var b=this.finalize(w.node,new o.JSXElement(w.opening,w.children,w.closing));w=v[v.length-1],w.children.push(b),v.pop()}else break}}return w},m.prototype.parseJSXElement=function(){var w=this.createJSXNode(),v=this.parseJSXOpeningElement(),A=[],_=null;if(!v.selfClosing){var E=this.parseComplexJSXElement({node:w,opening:v,closing:_,children:A});A=E.children,_=E.closing}return this.finalize(w,new o.JSXElement(v,A,_))},m.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var w=this.parseJSXElement();return this.finishJSX(),w},m.prototype.isStartOfExpression=function(){return p.prototype.isStartOfExpression.call(this)||this.match("<")},m}(f.Parser);i.JSXParser=g},function(n,i){Object.defineProperty(i,"__esModule",{value:!0});var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};i.Character={fromCodePoint:function(s){return s<65536?String.fromCharCode(s):String.fromCharCode(55296+(s-65536>>10))+String.fromCharCode(56320+(s-65536&1023))},isWhiteSpace:function(s){return s===32||s===9||s===11||s===12||s===160||s>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(s)>=0},isLineTerminator:function(s){return s===10||s===13||s===8232||s===8233},isIdentifierStart:function(s){return s===36||s===95||s>=65&&s<=90||s>=97&&s<=122||s===92||s>=128&&r.NonAsciiIdentifierStart.test(i.Character.fromCodePoint(s))},isIdentifierPart:function(s){return s===36||s===95||s>=65&&s<=90||s>=97&&s<=122||s>=48&&s<=57||s===92||s>=128&&r.NonAsciiIdentifierPart.test(i.Character.fromCodePoint(s))},isDecimalDigit:function(s){return s>=48&&s<=57},isHexDigit:function(s){return s>=48&&s<=57||s>=65&&s<=70||s>=97&&s<=102},isOctalDigit:function(s){return s>=48&&s<=55}}},function(n,i,r){Object.defineProperty(i,"__esModule",{value:!0});var s=r(6),u=function(){function w(v){this.type=s.JSXSyntax.JSXClosingElement,this.name=v}return w}();i.JSXClosingElement=u;var o=function(){function w(v,A,_){this.type=s.JSXSyntax.JSXElement,this.openingElement=v,this.children=A,this.closingElement=_}return w}();i.JSXElement=o;var c=function(){function w(){this.type=s.JSXSyntax.JSXEmptyExpression}return w}();i.JSXEmptyExpression=c;var a=function(){function w(v){this.type=s.JSXSyntax.JSXExpressionContainer,this.expression=v}return w}();i.JSXExpressionContainer=a;var f=function(){function w(v){this.type=s.JSXSyntax.JSXIdentifier,this.name=v}return w}();i.JSXIdentifier=f;var l=function(){function w(v,A){this.type=s.JSXSyntax.JSXMemberExpression,this.object=v,this.property=A}return w}();i.JSXMemberExpression=l;var h=function(){function w(v,A){this.type=s.JSXSyntax.JSXAttribute,this.name=v,this.value=A}return w}();i.JSXAttribute=h;var d=function(){function w(v,A){this.type=s.JSXSyntax.JSXNamespacedName,this.namespace=v,this.name=A}return w}();i.JSXNamespacedName=d;var g=function(){function w(v,A,_){this.type=s.JSXSyntax.JSXOpeningElement,this.name=v,this.selfClosing=A,this.attributes=_}return w}();i.JSXOpeningElement=g;var p=function(){function w(v){this.type=s.JSXSyntax.JSXSpreadAttribute,this.argument=v}return w}();i.JSXSpreadAttribute=p;var m=function(){function w(v,A){this.type=s.JSXSyntax.JSXText,this.value=v,this.raw=A}return w}();i.JSXText=m},function(n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(n,i,r){Object.defineProperty(i,"__esModule",{value:!0});var s=r(2),u=function(){function Y(Z){this.type=s.Syntax.ArrayExpression,this.elements=Z}return Y}();i.ArrayExpression=u;var o=function(){function Y(Z){this.type=s.Syntax.ArrayPattern,this.elements=Z}return Y}();i.ArrayPattern=o;var c=function(){function Y(Z,ne,Le){this.type=s.Syntax.ArrowFunctionExpression,this.id=null,this.params=Z,this.body=ne,this.generator=!1,this.expression=Le,this.async=!1}return Y}();i.ArrowFunctionExpression=c;var a=function(){function Y(Z,ne,Le){this.type=s.Syntax.AssignmentExpression,this.operator=Z,this.left=ne,this.right=Le}return Y}();i.AssignmentExpression=a;var f=function(){function Y(Z,ne){this.type=s.Syntax.AssignmentPattern,this.left=Z,this.right=ne}return Y}();i.AssignmentPattern=f;var l=function(){function Y(Z,ne,Le){this.type=s.Syntax.ArrowFunctionExpression,this.id=null,this.params=Z,this.body=ne,this.generator=!1,this.expression=Le,this.async=!0}return Y}();i.AsyncArrowFunctionExpression=l;var h=function(){function Y(Z,ne,Le){this.type=s.Syntax.FunctionDeclaration,this.id=Z,this.params=ne,this.body=Le,this.generator=!1,this.expression=!1,this.async=!0}return Y}();i.AsyncFunctionDeclaration=h;var d=function(){function Y(Z,ne,Le){this.type=s.Syntax.FunctionExpression,this.id=Z,this.params=ne,this.body=Le,this.generator=!1,this.expression=!1,this.async=!0}return Y}();i.AsyncFunctionExpression=d;var g=function(){function Y(Z){this.type=s.Syntax.AwaitExpression,this.argument=Z}return Y}();i.AwaitExpression=g;var p=function(){function Y(Z,ne,Le){var It=Z==="||"||Z==="&&";this.type=It?s.Syntax.LogicalExpression:s.Syntax.BinaryExpression,this.operator=Z,this.left=ne,this.right=Le}return Y}();i.BinaryExpression=p;var m=function(){function Y(Z){this.type=s.Syntax.BlockStatement,this.body=Z}return Y}();i.BlockStatement=m;var w=function(){function Y(Z){this.type=s.Syntax.BreakStatement,this.label=Z}return Y}();i.BreakStatement=w;var v=function(){function Y(Z,ne){this.type=s.Syntax.CallExpression,this.callee=Z,this.arguments=ne}return Y}();i.CallExpression=v;var A=function(){function Y(Z,ne){this.type=s.Syntax.CatchClause,this.param=Z,this.body=ne}return Y}();i.CatchClause=A;var _=function(){function Y(Z){this.type=s.Syntax.ClassBody,this.body=Z}return Y}();i.ClassBody=_;var E=function(){function Y(Z,ne,Le){this.type=s.Syntax.ClassDeclaration,this.id=Z,this.superClass=ne,this.body=Le}return Y}();i.ClassDeclaration=E;var b=function(){function Y(Z,ne,Le){this.type=s.Syntax.ClassExpression,this.id=Z,this.superClass=ne,this.body=Le}return Y}();i.ClassExpression=b;var x=function(){function Y(Z,ne){this.type=s.Syntax.MemberExpression,this.computed=!0,this.object=Z,this.property=ne}return Y}();i.ComputedMemberExpression=x;var y=function(){function Y(Z,ne,Le){this.type=s.Syntax.ConditionalExpression,this.test=Z,this.consequent=ne,this.alternate=Le}return Y}();i.ConditionalExpression=y;var C=function(){function Y(Z){this.type=s.Syntax.ContinueStatement,this.label=Z}return Y}();i.ContinueStatement=C;var B=function(){function Y(){this.type=s.Syntax.DebuggerStatement}return Y}();i.DebuggerStatement=B;var T=function(){function Y(Z,ne){this.type=s.Syntax.ExpressionStatement,this.expression=Z,this.directive=ne}return Y}();i.Directive=T;var M=function(){function Y(Z,ne){this.type=s.Syntax.DoWhileStatement,this.body=Z,this.test=ne}return Y}();i.DoWhileStatement=M;var R=function(){function Y(){this.type=s.Syntax.EmptyStatement}return Y}();i.EmptyStatement=R;var I=function(){function Y(Z){this.type=s.Syntax.ExportAllDeclaration,this.source=Z}return Y}();i.ExportAllDeclaration=I;var H=function(){function Y(Z){this.type=s.Syntax.ExportDefaultDeclaration,this.declaration=Z}return Y}();i.ExportDefaultDeclaration=H;var P=function(){function Y(Z,ne,Le){this.type=s.Syntax.ExportNamedDeclaration,this.declaration=Z,this.specifiers=ne,this.source=Le}return Y}();i.ExportNamedDeclaration=P;var j=function(){function Y(Z,ne){this.type=s.Syntax.ExportSpecifier,this.exported=ne,this.local=Z}return Y}();i.ExportSpecifier=j;var V=function(){function Y(Z){this.type=s.Syntax.ExpressionStatement,this.expression=Z}return Y}();i.ExpressionStatement=V;var K=function(){function Y(Z,ne,Le){this.type=s.Syntax.ForInStatement,this.left=Z,this.right=ne,this.body=Le,this.each=!1}return Y}();i.ForInStatement=K;var N=function(){function Y(Z,ne,Le){this.type=s.Syntax.ForOfStatement,this.left=Z,this.right=ne,this.body=Le}return Y}();i.ForOfStatement=N;var k=function(){function Y(Z,ne,Le,It){this.type=s.Syntax.ForStatement,this.init=Z,this.test=ne,this.update=Le,this.body=It}return Y}();i.ForStatement=k;var $=function(){function Y(Z,ne,Le,It){this.type=s.Syntax.FunctionDeclaration,this.id=Z,this.params=ne,this.body=Le,this.generator=It,this.expression=!1,this.async=!1}return Y}();i.FunctionDeclaration=$;var z=function(){function Y(Z,ne,Le,It){this.type=s.Syntax.FunctionExpression,this.id=Z,this.params=ne,this.body=Le,this.generator=It,this.expression=!1,this.async=!1}return Y}();i.FunctionExpression=z;var U=function(){function Y(Z){this.type=s.Syntax.Identifier,this.name=Z}return Y}();i.Identifier=U;var G=function(){function Y(Z,ne,Le){this.type=s.Syntax.IfStatement,this.test=Z,this.consequent=ne,this.alternate=Le}return Y}();i.IfStatement=G;var Q=function(){function Y(Z,ne){this.type=s.Syntax.ImportDeclaration,this.specifiers=Z,this.source=ne}return Y}();i.ImportDeclaration=Q;var X=function(){function Y(Z){this.type=s.Syntax.ImportDefaultSpecifier,this.local=Z}return Y}();i.ImportDefaultSpecifier=X;var te=function(){function Y(Z){this.type=s.Syntax.ImportNamespaceSpecifier,this.local=Z}return Y}();i.ImportNamespaceSpecifier=te;var le=function(){function Y(Z,ne){this.type=s.Syntax.ImportSpecifier,this.local=Z,this.imported=ne}return Y}();i.ImportSpecifier=le;var ye=function(){function Y(Z,ne){this.type=s.Syntax.LabeledStatement,this.label=Z,this.body=ne}return Y}();i.LabeledStatement=ye;var ve=function(){function Y(Z,ne){this.type=s.Syntax.Literal,this.value=Z,this.raw=ne}return Y}();i.Literal=ve;var ee=function(){function Y(Z,ne){this.type=s.Syntax.MetaProperty,this.meta=Z,this.property=ne}return Y}();i.MetaProperty=ee;var ce=function(){function Y(Z,ne,Le,It,Yo){this.type=s.Syntax.MethodDefinition,this.key=Z,this.computed=ne,this.value=Le,this.kind=It,this.static=Yo}return Y}();i.MethodDefinition=ce;var he=function(){function Y(Z){this.type=s.Syntax.Program,this.body=Z,this.sourceType="module"}return Y}();i.Module=he;var je=function(){function Y(Z,ne){this.type=s.Syntax.NewExpression,this.callee=Z,this.arguments=ne}return Y}();i.NewExpression=je;var Ve=function(){function Y(Z){this.type=s.Syntax.ObjectExpression,this.properties=Z}return Y}();i.ObjectExpression=Ve;var ge=function(){function Y(Z){this.type=s.Syntax.ObjectPattern,this.properties=Z}return Y}();i.ObjectPattern=ge;var Tt=function(){function Y(Z,ne,Le,It,Yo,gg){this.type=s.Syntax.Property,this.key=ne,this.computed=Le,this.value=It,this.kind=Z,this.method=Yo,this.shorthand=gg}return Y}();i.Property=Tt;var Re=function(){function Y(Z,ne,Le,It){this.type=s.Syntax.Literal,this.value=Z,this.raw=ne,this.regex={pattern:Le,flags:It}}return Y}();i.RegexLiteral=Re;var Te=function(){function Y(Z){this.type=s.Syntax.RestElement,this.argument=Z}return Y}();i.RestElement=Te;var bt=function(){function Y(Z){this.type=s.Syntax.ReturnStatement,this.argument=Z}return Y}();i.ReturnStatement=bt;var ue=function(){function Y(Z){this.type=s.Syntax.Program,this.body=Z,this.sourceType="script"}return Y}();i.Script=ue;var Ft=function(){function Y(Z){this.type=s.Syntax.SequenceExpression,this.expressions=Z}return Y}();i.SequenceExpression=Ft;var ln=function(){function Y(Z){this.type=s.Syntax.SpreadElement,this.argument=Z}return Y}();i.SpreadElement=ln;var re=function(){function Y(Z,ne){this.type=s.Syntax.MemberExpression,this.computed=!1,this.object=Z,this.property=ne}return Y}();i.StaticMemberExpression=re;var me=function(){function Y(){this.type=s.Syntax.Super}return Y}();i.Super=me;var L=function(){function Y(Z,ne){this.type=s.Syntax.SwitchCase,this.test=Z,this.consequent=ne}return Y}();i.SwitchCase=L;var F=function(){function Y(Z,ne){this.type=s.Syntax.SwitchStatement,this.discriminant=Z,this.cases=ne}return Y}();i.SwitchStatement=F;var D=function(){function Y(Z,ne){this.type=s.Syntax.TaggedTemplateExpression,this.tag=Z,this.quasi=ne}return Y}();i.TaggedTemplateExpression=D;var O=function(){function Y(Z,ne){this.type=s.Syntax.TemplateElement,this.value=Z,this.tail=ne}return Y}();i.TemplateElement=O;var W=function(){function Y(Z,ne){this.type=s.Syntax.TemplateLiteral,this.quasis=Z,this.expressions=ne}return Y}();i.TemplateLiteral=W;var J=function(){function Y(){this.type=s.Syntax.ThisExpression}return Y}();i.ThisExpression=J;var q=function(){function Y(Z){this.type=s.Syntax.ThrowStatement,this.argument=Z}return Y}();i.ThrowStatement=q;var ke=function(){function Y(Z,ne,Le){this.type=s.Syntax.TryStatement,this.block=Z,this.handler=ne,this.finalizer=Le}return Y}();i.TryStatement=ke;var Ge=function(){function Y(Z,ne){this.type=s.Syntax.UnaryExpression,this.operator=Z,this.argument=ne,this.prefix=!0}return Y}();i.UnaryExpression=Ge;var We=function(){function Y(Z,ne,Le){this.type=s.Syntax.UpdateExpression,this.operator=Z,this.argument=ne,this.prefix=Le}return Y}();i.UpdateExpression=We;var Ze=function(){function Y(Z,ne){this.type=s.Syntax.VariableDeclaration,this.declarations=Z,this.kind=ne}return Y}();i.VariableDeclaration=Ze;var Ne=function(){function Y(Z,ne){this.type=s.Syntax.VariableDeclarator,this.id=Z,this.init=ne}return Y}();i.VariableDeclarator=Ne;var de=function(){function Y(Z,ne){this.type=s.Syntax.WhileStatement,this.test=Z,this.body=ne}return Y}();i.WhileStatement=de;var Ke=function(){function Y(Z,ne){this.type=s.Syntax.WithStatement,this.object=Z,this.body=ne}return Y}();i.WithStatement=Ke;var ui=function(){function Y(Z,ne){this.type=s.Syntax.YieldExpression,this.argument=Z,this.delegate=ne}return Y}();i.YieldExpression=ui},function(n,i,r){Object.defineProperty(i,"__esModule",{value:!0});var s=r(9),u=r(10),o=r(11),c=r(7),a=r(12),f=r(2),l=r(13),h="ArrowParameterPlaceHolder",d=function(){function g(p,m,w){m===void 0&&(m={}),this.config={range:typeof m.range=="boolean"&&m.range,loc:typeof m.loc=="boolean"&&m.loc,source:null,tokens:typeof m.tokens=="boolean"&&m.tokens,comment:typeof m.comment=="boolean"&&m.comment,tolerant:typeof m.tolerant=="boolean"&&m.tolerant},this.config.loc&&m.source&&m.source!==null&&(this.config.source=String(m.source)),this.delegate=w,this.errorHandler=new u.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new a.Scanner(p,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return g.prototype.throwError=function(p){for(var m=[],w=1;w<arguments.length;w++)m[w-1]=arguments[w];var v=Array.prototype.slice.call(arguments,1),A=p.replace(/%(\d)/g,function(x,y){return s.assert(y<v.length,"Message reference must be in range"),v[y]}),_=this.lastMarker.index,E=this.lastMarker.line,b=this.lastMarker.column+1;throw this.errorHandler.createError(_,E,b,A)},g.prototype.tolerateError=function(p){for(var m=[],w=1;w<arguments.length;w++)m[w-1]=arguments[w];var v=Array.prototype.slice.call(arguments,1),A=p.replace(/%(\d)/g,function(x,y){return s.assert(y<v.length,"Message reference must be in range"),v[y]}),_=this.lastMarker.index,E=this.scanner.lineNumber,b=this.lastMarker.column+1;this.errorHandler.tolerateError(_,E,b,A)},g.prototype.unexpectedTokenError=function(p,m){var w=m||o.Messages.UnexpectedToken,v;if(p?(m||(w=p.type===2?o.Messages.UnexpectedEOS:p.type===3?o.Messages.UnexpectedIdentifier:p.type===6?o.Messages.UnexpectedNumber:p.type===8?o.Messages.UnexpectedString:p.type===10?o.Messages.UnexpectedTemplate:o.Messages.UnexpectedToken,p.type===4&&(this.scanner.isFutureReservedWord(p.value)?w=o.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(p.value)&&(w=o.Messages.StrictReservedWord))),v=p.value):v="ILLEGAL",w=w.replace("%0",v),p&&typeof p.lineNumber=="number"){var A=p.start,_=p.lineNumber,E=this.lastMarker.index-this.lastMarker.column,b=p.start-E+1;return this.errorHandler.createError(A,_,b,w)}else{var A=this.lastMarker.index,_=this.lastMarker.line,b=this.lastMarker.column+1;return this.errorHandler.createError(A,_,b,w)}},g.prototype.throwUnexpectedToken=function(p,m){throw this.unexpectedTokenError(p,m)},g.prototype.tolerateUnexpectedToken=function(p,m){this.errorHandler.tolerate(this.unexpectedTokenError(p,m))},g.prototype.collectComments=function(){if(!this.config.comment)this.scanner.scanComments();else{var p=this.scanner.scanComments();if(p.length>0&&this.delegate)for(var m=0;m<p.length;++m){var w=p[m],v=void 0;v={type:w.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(w.slice[0],w.slice[1])},this.config.range&&(v.range=w.range),this.config.loc&&(v.loc=w.loc);var A={start:{line:w.loc.start.line,column:w.loc.start.column,offset:w.range[0]},end:{line:w.loc.end.line,column:w.loc.end.column,offset:w.range[1]}};this.delegate(v,A)}}},g.prototype.getTokenRaw=function(p){return this.scanner.source.slice(p.start,p.end)},g.prototype.convertToken=function(p){var m={type:l.TokenName[p.type],value:this.getTokenRaw(p)};if(this.config.range&&(m.range=[p.start,p.end]),this.config.loc&&(m.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),p.type===9){var w=p.pattern,v=p.flags;m.regex={pattern:w,flags:v}}return m},g.prototype.nextToken=function(){var p=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var m=this.scanner.lex();return this.hasLineTerminator=p.lineNumber!==m.lineNumber,m&&this.context.strict&&m.type===3&&this.scanner.isStrictModeReservedWord(m.value)&&(m.type=4),this.lookahead=m,this.config.tokens&&m.type!==2&&this.tokens.push(this.convertToken(m)),p},g.prototype.nextRegexToken=function(){this.collectComments();var p=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(p))),this.lookahead=p,this.nextToken(),p},g.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},g.prototype.startNode=function(p,m){m===void 0&&(m=0);var w=p.start-p.lineStart,v=p.lineNumber;return w<0&&(w+=m,v--),{index:p.start,line:v,column:w}},g.prototype.finalize=function(p,m){if(this.config.range&&(m.range=[p.index,this.lastMarker.index]),this.config.loc&&(m.loc={start:{line:p.line,column:p.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(m.loc.source=this.config.source)),this.delegate){var w={start:{line:p.line,column:p.column,offset:p.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(m,w)}return m},g.prototype.expect=function(p){var m=this.nextToken();(m.type!==7||m.value!==p)&&this.throwUnexpectedToken(m)},g.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var p=this.lookahead;p.type===7&&p.value===","?this.nextToken():p.type===7&&p.value===";"?(this.nextToken(),this.tolerateUnexpectedToken(p)):this.tolerateUnexpectedToken(p,o.Messages.UnexpectedToken)}else this.expect(",")},g.prototype.expectKeyword=function(p){var m=this.nextToken();(m.type!==4||m.value!==p)&&this.throwUnexpectedToken(m)},g.prototype.match=function(p){return this.lookahead.type===7&&this.lookahead.value===p},g.prototype.matchKeyword=function(p){return this.lookahead.type===4&&this.lookahead.value===p},g.prototype.matchContextualKeyword=function(p){return this.lookahead.type===3&&this.lookahead.value===p},g.prototype.matchAssign=function(){if(this.lookahead.type!==7)return!1;var p=this.lookahead.value;return p==="="||p==="*="||p==="**="||p==="/="||p==="%="||p==="+="||p==="-="||p==="<<="||p===">>="||p===">>>="||p==="&="||p==="^="||p==="|="},g.prototype.isolateCoverGrammar=function(p){var m=this.context.isBindingElement,w=this.context.isAssignmentTarget,v=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var A=p.call(this);return this.context.firstCoverInitializedNameError!==null&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=m,this.context.isAssignmentTarget=w,this.context.firstCoverInitializedNameError=v,A},g.prototype.inheritCoverGrammar=function(p){var m=this.context.isBindingElement,w=this.context.isAssignmentTarget,v=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var A=p.call(this);return this.context.isBindingElement=this.context.isBindingElement&&m,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&w,this.context.firstCoverInitializedNameError=v||this.context.firstCoverInitializedNameError,A},g.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type!==2&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},g.prototype.parsePrimaryExpression=function(){var p=this.createNode(),m,w,v;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&this.lookahead.value==="await"&&this.tolerateUnexpectedToken(this.lookahead),m=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(p,new c.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,w=this.nextToken(),v=this.getTokenRaw(w),m=this.finalize(p,new c.Literal(w.value,v));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,w=this.nextToken(),v=this.getTokenRaw(w),m=this.finalize(p,new c.Literal(w.value==="true",v));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,w=this.nextToken(),v=this.getTokenRaw(w),m=this.finalize(p,new c.Literal(null,v));break;case 10:m=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,m=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":m=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":m=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,w=this.nextRegexToken(),v=this.getTokenRaw(w),m=this.finalize(p,new c.RegexLiteral(w.regex,v,w.pattern,w.flags));break;default:m=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?m=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?m=this.finalize(p,new c.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?m=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),m=this.finalize(p,new c.ThisExpression)):this.matchKeyword("class")?m=this.parseClassExpression():m=this.throwUnexpectedToken(this.nextToken()));break;default:m=this.throwUnexpectedToken(this.nextToken())}return m},g.prototype.parseSpreadElement=function(){var p=this.createNode();this.expect("...");var m=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(p,new c.SpreadElement(m))},g.prototype.parseArrayInitializer=function(){var p=this.createNode(),m=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),m.push(null);else if(this.match("...")){var w=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),m.push(w)}else m.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(p,new c.ArrayExpression(m))},g.prototype.parsePropertyMethod=function(p){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var m=this.context.strict,w=this.context.allowStrictDirective;this.context.allowStrictDirective=p.simple;var v=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&p.firstRestricted&&this.tolerateUnexpectedToken(p.firstRestricted,p.message),this.context.strict&&p.stricted&&this.tolerateUnexpectedToken(p.stricted,p.message),this.context.strict=m,this.context.allowStrictDirective=w,v},g.prototype.parsePropertyMethodFunction=function(){var p=!1,m=this.createNode(),w=this.context.allowYield;this.context.allowYield=!0;var v=this.parseFormalParameters(),A=this.parsePropertyMethod(v);return this.context.allowYield=w,this.finalize(m,new c.FunctionExpression(null,v.params,A,p))},g.prototype.parsePropertyMethodAsyncFunction=function(){var p=this.createNode(),m=this.context.allowYield,w=this.context.await;this.context.allowYield=!1,this.context.await=!0;var v=this.parseFormalParameters(),A=this.parsePropertyMethod(v);return this.context.allowYield=m,this.context.await=w,this.finalize(p,new c.AsyncFunctionExpression(null,v.params,A))},g.prototype.parseObjectPropertyKey=function(){var p=this.createNode(),m=this.nextToken(),w;switch(m.type){case 8:case 6:this.context.strict&&m.octal&&this.tolerateUnexpectedToken(m,o.Messages.StrictOctalLiteral);var v=this.getTokenRaw(m);w=this.finalize(p,new c.Literal(m.value,v));break;case 3:case 1:case 5:case 4:w=this.finalize(p,new c.Identifier(m.value));break;case 7:m.value==="["?(w=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):w=this.throwUnexpectedToken(m);break;default:w=this.throwUnexpectedToken(m)}return w},g.prototype.isPropertyKey=function(p,m){return p.type===f.Syntax.Identifier&&p.name===m||p.type===f.Syntax.Literal&&p.value===m},g.prototype.parseObjectProperty=function(p){var m=this.createNode(),w=this.lookahead,v,A=null,_=null,E=!1,b=!1,x=!1,y=!1;if(w.type===3){var C=w.value;this.nextToken(),E=this.match("["),y=!this.hasLineTerminator&&C==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(","),A=y?this.parseObjectPropertyKey():this.finalize(m,new c.Identifier(C))}else this.match("*")?this.nextToken():(E=this.match("["),A=this.parseObjectPropertyKey());var B=this.qualifiedPropertyName(this.lookahead);if(w.type===3&&!y&&w.value==="get"&&B)v="get",E=this.match("["),A=this.parseObjectPropertyKey(),this.context.allowYield=!1,_=this.parseGetterMethod();else if(w.type===3&&!y&&w.value==="set"&&B)v="set",E=this.match("["),A=this.parseObjectPropertyKey(),_=this.parseSetterMethod();else if(w.type===7&&w.value==="*"&&B)v="init",E=this.match("["),A=this.parseObjectPropertyKey(),_=this.parseGeneratorMethod(),b=!0;else if(A||this.throwUnexpectedToken(this.lookahead),v="init",this.match(":")&&!y)!E&&this.isPropertyKey(A,"__proto__")&&(p.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),p.value=!0),this.nextToken(),_=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))_=y?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),b=!0;else if(w.type===3){var C=this.finalize(m,new c.Identifier(w.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),x=!0;var T=this.isolateCoverGrammar(this.parseAssignmentExpression);_=this.finalize(m,new c.AssignmentPattern(C,T))}else x=!0,_=C}else this.throwUnexpectedToken(this.nextToken());return this.finalize(m,new c.Property(v,A,E,_,b,x))},g.prototype.parseObjectInitializer=function(){var p=this.createNode();this.expect("{");for(var m=[],w={value:!1};!this.match("}");)m.push(this.parseObjectProperty(w)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(p,new c.ObjectExpression(m))},g.prototype.parseTemplateHead=function(){s.assert(this.lookahead.head,"Template literal must start with a template head");var p=this.createNode(),m=this.nextToken(),w=m.value,v=m.cooked;return this.finalize(p,new c.TemplateElement({raw:w,cooked:v},m.tail))},g.prototype.parseTemplateElement=function(){this.lookahead.type!==10&&this.throwUnexpectedToken();var p=this.createNode(),m=this.nextToken(),w=m.value,v=m.cooked;return this.finalize(p,new c.TemplateElement({raw:w,cooked:v},m.tail))},g.prototype.parseTemplateLiteral=function(){var p=this.createNode(),m=[],w=[],v=this.parseTemplateHead();for(w.push(v);!v.tail;)m.push(this.parseExpression()),v=this.parseTemplateElement(),w.push(v);return this.finalize(p,new c.TemplateLiteral(w,m))},g.prototype.reinterpretExpressionAsPattern=function(p){switch(p.type){case f.Syntax.Identifier:case f.Syntax.MemberExpression:case f.Syntax.RestElement:case f.Syntax.AssignmentPattern:break;case f.Syntax.SpreadElement:p.type=f.Syntax.RestElement,this.reinterpretExpressionAsPattern(p.argument);break;case f.Syntax.ArrayExpression:p.type=f.Syntax.ArrayPattern;for(var m=0;m<p.elements.length;m++)p.elements[m]!==null&&this.reinterpretExpressionAsPattern(p.elements[m]);break;case f.Syntax.ObjectExpression:p.type=f.Syntax.ObjectPattern;for(var m=0;m<p.properties.length;m++)this.reinterpretExpressionAsPattern(p.properties[m].value);break;case f.Syntax.AssignmentExpression:p.type=f.Syntax.AssignmentPattern,delete p.operator,this.reinterpretExpressionAsPattern(p.left);break}},g.prototype.parseGroupExpression=function(){var p;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),p={type:h,params:[],async:!1};else{var m=this.lookahead,w=[];if(this.match("..."))p=this.parseRestElement(w),this.expect(")"),this.match("=>")||this.expect("=>"),p={type:h,params:[p],async:!1};else{var v=!1;if(this.context.isBindingElement=!0,p=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var A=[];for(this.context.isAssignmentTarget=!1,A.push(p);this.lookahead.type!==2&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var _=0;_<A.length;_++)this.reinterpretExpressionAsPattern(A[_]);v=!0,p={type:h,params:A,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),A.push(this.parseRestElement(w)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(var _=0;_<A.length;_++)this.reinterpretExpressionAsPattern(A[_]);v=!0,p={type:h,params:A,async:!1}}else A.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(v)break}v||(p=this.finalize(this.startNode(m),new c.SequenceExpression(A)))}if(!v){if(this.expect(")"),this.match("=>")&&(p.type===f.Syntax.Identifier&&p.name==="yield"&&(v=!0,p={type:h,params:[p],async:!1}),!v)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),p.type===f.Syntax.SequenceExpression)for(var _=0;_<p.expressions.length;_++)this.reinterpretExpressionAsPattern(p.expressions[_]);else this.reinterpretExpressionAsPattern(p);var E=p.type===f.Syntax.SequenceExpression?p.expressions:[p];p={type:h,params:E,async:!1}}this.context.isBindingElement=!1}}}return p},g.prototype.parseArguments=function(){this.expect("(");var p=[];if(!this.match(")"))for(;;){var m=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(p.push(m),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),p},g.prototype.isIdentifierName=function(p){return p.type===3||p.type===4||p.type===1||p.type===5},g.prototype.parseIdentifierName=function(){var p=this.createNode(),m=this.nextToken();return this.isIdentifierName(m)||this.throwUnexpectedToken(m),this.finalize(p,new c.Identifier(m.value))},g.prototype.parseNewExpression=function(){var p=this.createNode(),m=this.parseIdentifierName();s.assert(m.name==="new","New expression must start with `new`");var w;if(this.match("."))if(this.nextToken(),this.lookahead.type===3&&this.context.inFunctionBody&&this.lookahead.value==="target"){var v=this.parseIdentifierName();w=new c.MetaProperty(m,v)}else this.throwUnexpectedToken(this.lookahead);else{var A=this.isolateCoverGrammar(this.parseLeftHandSideExpression),_=this.match("(")?this.parseArguments():[];w=new c.NewExpression(A,_),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(p,w)},g.prototype.parseAsyncArgument=function(){var p=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,p},g.prototype.parseAsyncArguments=function(){this.expect("(");var p=[];if(!this.match(")"))for(;;){var m=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(p.push(m),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),p},g.prototype.parseLeftHandSideExpressionAllowCall=function(){var p=this.lookahead,m=this.matchContextualKeyword("async"),w=this.context.allowIn;this.context.allowIn=!0;var v;for(this.matchKeyword("super")&&this.context.inFunctionBody?(v=this.createNode(),this.nextToken(),v=this.finalize(v,new c.Super),!this.match("(")&&!this.match(".")&&!this.match("[")&&this.throwUnexpectedToken(this.lookahead)):v=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var A=this.parseIdentifierName();v=this.finalize(this.startNode(p),new c.StaticMemberExpression(v,A))}else if(this.match("(")){var _=m&&p.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var E=_?this.parseAsyncArguments():this.parseArguments();if(v=this.finalize(this.startNode(p),new c.CallExpression(v,E)),_&&this.match("=>")){for(var b=0;b<E.length;++b)this.reinterpretExpressionAsPattern(E[b]);v={type:h,params:E,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var A=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),v=this.finalize(this.startNode(p),new c.ComputedMemberExpression(v,A))}else if(this.lookahead.type===10&&this.lookahead.head){var x=this.parseTemplateLiteral();v=this.finalize(this.startNode(p),new c.TaggedTemplateExpression(v,x))}else break;return this.context.allowIn=w,v},g.prototype.parseSuper=function(){var p=this.createNode();return this.expectKeyword("super"),!this.match("[")&&!this.match(".")&&this.throwUnexpectedToken(this.lookahead),this.finalize(p,new c.Super)},g.prototype.parseLeftHandSideExpression=function(){s.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var p=this.startNode(this.lookahead),m=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var w=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),m=this.finalize(p,new c.ComputedMemberExpression(m,w))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var w=this.parseIdentifierName();m=this.finalize(p,new c.StaticMemberExpression(m,w))}else if(this.lookahead.type===10&&this.lookahead.head){var v=this.parseTemplateLiteral();m=this.finalize(p,new c.TaggedTemplateExpression(m,v))}else break;return m},g.prototype.parseUpdateExpression=function(){var p,m=this.lookahead;if(this.match("++")||this.match("--")){var w=this.startNode(m),v=this.nextToken();p=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&p.type===f.Syntax.Identifier&&this.scanner.isRestrictedWord(p.name)&&this.tolerateError(o.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment);var A=!0;p=this.finalize(w,new c.UpdateExpression(v.value,p,A)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(p=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&this.lookahead.type===7&&(this.match("++")||this.match("--"))){this.context.strict&&p.type===f.Syntax.Identifier&&this.scanner.isRestrictedWord(p.name)&&this.tolerateError(o.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var _=this.nextToken().value,A=!1;p=this.finalize(this.startNode(m),new c.UpdateExpression(_,p,A))}return p},g.prototype.parseAwaitExpression=function(){var p=this.createNode();this.nextToken();var m=this.parseUnaryExpression();return this.finalize(p,new c.AwaitExpression(m))},g.prototype.parseUnaryExpression=function(){var p;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var m=this.startNode(this.lookahead),w=this.nextToken();p=this.inheritCoverGrammar(this.parseUnaryExpression),p=this.finalize(m,new c.UnaryExpression(w.value,p)),this.context.strict&&p.operator==="delete"&&p.argument.type===f.Syntax.Identifier&&this.tolerateError(o.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else this.context.await&&this.matchContextualKeyword("await")?p=this.parseAwaitExpression():p=this.parseUpdateExpression();return p},g.prototype.parseExponentiationExpression=function(){var p=this.lookahead,m=this.inheritCoverGrammar(this.parseUnaryExpression);if(m.type!==f.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var w=m,v=this.isolateCoverGrammar(this.parseExponentiationExpression);m=this.finalize(this.startNode(p),new c.BinaryExpression("**",w,v))}return m},g.prototype.binaryPrecedence=function(p){var m=p.value,w;return p.type===7?w=this.operatorPrecedence[m]||0:p.type===4?w=m==="instanceof"||this.context.allowIn&&m==="in"?7:0:w=0,w},g.prototype.parseBinaryExpression=function(){var p=this.lookahead,m=this.inheritCoverGrammar(this.parseExponentiationExpression),w=this.lookahead,v=this.binaryPrecedence(w);if(v>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var A=[p,this.lookahead],_=m,E=this.isolateCoverGrammar(this.parseExponentiationExpression),b=[_,w.value,E],x=[v];v=this.binaryPrecedence(this.lookahead),!(v<=0);){for(;b.length>2&&v<=x[x.length-1];){E=b.pop();var y=b.pop();x.pop(),_=b.pop(),A.pop();var C=this.startNode(A[A.length-1]);b.push(this.finalize(C,new c.BinaryExpression(y,_,E)))}b.push(this.nextToken().value),x.push(v),A.push(this.lookahead),b.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var B=b.length-1;m=b[B];for(var T=A.pop();B>1;){var M=A.pop(),R=T&&T.lineStart,C=this.startNode(M,R),y=b[B-1];m=this.finalize(C,new c.BinaryExpression(y,b[B-2],m)),B-=2,T=M}}return m},g.prototype.parseConditionalExpression=function(){var p=this.lookahead,m=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var w=this.context.allowIn;this.context.allowIn=!0;var v=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=w,this.expect(":");var A=this.isolateCoverGrammar(this.parseAssignmentExpression);m=this.finalize(this.startNode(p),new c.ConditionalExpression(m,v,A)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return m},g.prototype.checkPatternParam=function(p,m){switch(m.type){case f.Syntax.Identifier:this.validateParam(p,m,m.name);break;case f.Syntax.RestElement:this.checkPatternParam(p,m.argument);break;case f.Syntax.AssignmentPattern:this.checkPatternParam(p,m.left);break;case f.Syntax.ArrayPattern:for(var w=0;w<m.elements.length;w++)m.elements[w]!==null&&this.checkPatternParam(p,m.elements[w]);break;case f.Syntax.ObjectPattern:for(var w=0;w<m.properties.length;w++)this.checkPatternParam(p,m.properties[w].value);break}p.simple=p.simple&&m instanceof c.Identifier},g.prototype.reinterpretAsCoverFormalsList=function(p){var m=[p],w,v=!1;switch(p.type){case f.Syntax.Identifier:break;case h:m=p.params,v=p.async;break;default:return null}w={simple:!0,paramSet:{}};for(var A=0;A<m.length;++A){var _=m[A];_.type===f.Syntax.AssignmentPattern?_.right.type===f.Syntax.YieldExpression&&(_.right.argument&&this.throwUnexpectedToken(this.lookahead),_.right.type=f.Syntax.Identifier,_.right.name="yield",delete _.right.argument,delete _.right.delegate):v&&_.type===f.Syntax.Identifier&&_.name==="await"&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(w,_),m[A]=_}if(this.context.strict||!this.context.allowYield)for(var A=0;A<m.length;++A){var _=m[A];_.type===f.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(w.message===o.Messages.StrictParamDupe){var E=this.context.strict?w.stricted:w.firstRestricted;this.throwUnexpectedToken(E,w.message)}return{simple:w.simple,params:m,stricted:w.stricted,firstRestricted:w.firstRestricted,message:w.message}},g.prototype.parseAssignmentExpression=function(){var p;if(!this.context.allowYield&&this.matchKeyword("yield"))p=this.parseYieldExpression();else{var m=this.lookahead,w=m;if(p=this.parseConditionalExpression(),w.type===3&&w.lineNumber===this.lookahead.lineNumber&&w.value==="async"&&(this.lookahead.type===3||this.matchKeyword("yield"))){var v=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(v),p={type:h,params:[v],async:!0}}if(p.type===h||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var A=p.async,_=this.reinterpretAsCoverFormalsList(p);if(_){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var E=this.context.strict,b=this.context.allowStrictDirective;this.context.allowStrictDirective=_.simple;var x=this.context.allowYield,y=this.context.await;this.context.allowYield=!0,this.context.await=A;var C=this.startNode(m);this.expect("=>");var B=void 0;if(this.match("{")){var T=this.context.allowIn;this.context.allowIn=!0,B=this.parseFunctionSourceElements(),this.context.allowIn=T}else B=this.isolateCoverGrammar(this.parseAssignmentExpression);var M=B.type!==f.Syntax.BlockStatement;this.context.strict&&_.firstRestricted&&this.throwUnexpectedToken(_.firstRestricted,_.message),this.context.strict&&_.stricted&&this.tolerateUnexpectedToken(_.stricted,_.message),p=A?this.finalize(C,new c.AsyncArrowFunctionExpression(_.params,B,M)):this.finalize(C,new c.ArrowFunctionExpression(_.params,B,M)),this.context.strict=E,this.context.allowStrictDirective=b,this.context.allowYield=x,this.context.await=y}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&p.type===f.Syntax.Identifier){var R=p;this.scanner.isRestrictedWord(R.name)&&this.tolerateUnexpectedToken(w,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(R.name)&&this.tolerateUnexpectedToken(w,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(p):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),w=this.nextToken();var I=w.value,H=this.isolateCoverGrammar(this.parseAssignmentExpression);p=this.finalize(this.startNode(m),new c.AssignmentExpression(I,p,H)),this.context.firstCoverInitializedNameError=null}}return p},g.prototype.parseExpression=function(){var p=this.lookahead,m=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var w=[];for(w.push(m);this.lookahead.type!==2&&this.match(",");)this.nextToken(),w.push(this.isolateCoverGrammar(this.parseAssignmentExpression));m=this.finalize(this.startNode(p),new c.SequenceExpression(w))}return m},g.prototype.parseStatementListItem=function(){var p;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,this.lookahead.type===4)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),p=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),p=this.parseImportDeclaration();break;case"const":p=this.parseLexicalDeclaration({inFor:!1});break;case"function":p=this.parseFunctionDeclaration();break;case"class":p=this.parseClassDeclaration();break;case"let":p=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:p=this.parseStatement();break}else p=this.parseStatement();return p},g.prototype.parseBlock=function(){var p=this.createNode();this.expect("{");for(var m=[];!this.match("}");)m.push(this.parseStatementListItem());return this.expect("}"),this.finalize(p,new c.BlockStatement(m))},g.prototype.parseLexicalBinding=function(p,m){var w=this.createNode(),v=[],A=this.parsePattern(v,p);this.context.strict&&A.type===f.Syntax.Identifier&&this.scanner.isRestrictedWord(A.name)&&this.tolerateError(o.Messages.StrictVarName);var _=null;return p==="const"?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),_=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!m.inFor&&A.type!==f.Syntax.Identifier||this.match("="))&&(this.expect("="),_=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(w,new c.VariableDeclarator(A,_))},g.prototype.parseBindingList=function(p,m){for(var w=[this.parseLexicalBinding(p,m)];this.match(",");)this.nextToken(),w.push(this.parseLexicalBinding(p,m));return w},g.prototype.isLexicalDeclaration=function(){var p=this.scanner.saveState();this.scanner.scanComments();var m=this.scanner.lex();return this.scanner.restoreState(p),m.type===3||m.type===7&&m.value==="["||m.type===7&&m.value==="{"||m.type===4&&m.value==="let"||m.type===4&&m.value==="yield"},g.prototype.parseLexicalDeclaration=function(p){var m=this.createNode(),w=this.nextToken().value;s.assert(w==="let"||w==="const","Lexical declaration must be either let or const");var v=this.parseBindingList(w,p);return this.consumeSemicolon(),this.finalize(m,new c.VariableDeclaration(v,w))},g.prototype.parseBindingRestElement=function(p,m){var w=this.createNode();this.expect("...");var v=this.parsePattern(p,m);return this.finalize(w,new c.RestElement(v))},g.prototype.parseArrayPattern=function(p,m){var w=this.createNode();this.expect("[");for(var v=[];!this.match("]");)if(this.match(","))this.nextToken(),v.push(null);else{if(this.match("...")){v.push(this.parseBindingRestElement(p,m));break}else v.push(this.parsePatternWithDefault(p,m));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(w,new c.ArrayPattern(v))},g.prototype.parsePropertyPattern=function(p,m){var w=this.createNode(),v=!1,A=!1,_=!1,E,b;if(this.lookahead.type===3){var x=this.lookahead;E=this.parseVariableIdentifier();var y=this.finalize(w,new c.Identifier(x.value));if(this.match("=")){p.push(x),A=!0,this.nextToken();var C=this.parseAssignmentExpression();b=this.finalize(this.startNode(x),new c.AssignmentPattern(y,C))}else this.match(":")?(this.expect(":"),b=this.parsePatternWithDefault(p,m)):(p.push(x),A=!0,b=y)}else v=this.match("["),E=this.parseObjectPropertyKey(),this.expect(":"),b=this.parsePatternWithDefault(p,m);return this.finalize(w,new c.Property("init",E,v,b,_,A))},g.prototype.parseObjectPattern=function(p,m){var w=this.createNode(),v=[];for(this.expect("{");!this.match("}");)v.push(this.parsePropertyPattern(p,m)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(w,new c.ObjectPattern(v))},g.prototype.parsePattern=function(p,m){var w;return this.match("[")?w=this.parseArrayPattern(p,m):this.match("{")?w=this.parseObjectPattern(p,m):(this.matchKeyword("let")&&(m==="const"||m==="let")&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),p.push(this.lookahead),w=this.parseVariableIdentifier(m)),w},g.prototype.parsePatternWithDefault=function(p,m){var w=this.lookahead,v=this.parsePattern(p,m);if(this.match("=")){this.nextToken();var A=this.context.allowYield;this.context.allowYield=!0;var _=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=A,v=this.finalize(this.startNode(w),new c.AssignmentPattern(v,_))}return v},g.prototype.parseVariableIdentifier=function(p){var m=this.createNode(),w=this.nextToken();return w.type===4&&w.value==="yield"?this.context.strict?this.tolerateUnexpectedToken(w,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(w):w.type!==3?this.context.strict&&w.type===4&&this.scanner.isStrictModeReservedWord(w.value)?this.tolerateUnexpectedToken(w,o.Messages.StrictReservedWord):(this.context.strict||w.value!=="let"||p!=="var")&&this.throwUnexpectedToken(w):(this.context.isModule||this.context.await)&&w.type===3&&w.value==="await"&&this.tolerateUnexpectedToken(w),this.finalize(m,new c.Identifier(w.value))},g.prototype.parseVariableDeclaration=function(p){var m=this.createNode(),w=[],v=this.parsePattern(w,"var");this.context.strict&&v.type===f.Syntax.Identifier&&this.scanner.isRestrictedWord(v.name)&&this.tolerateError(o.Messages.StrictVarName);var A=null;return this.match("=")?(this.nextToken(),A=this.isolateCoverGrammar(this.parseAssignmentExpression)):v.type!==f.Syntax.Identifier&&!p.inFor&&this.expect("="),this.finalize(m,new c.VariableDeclarator(v,A))},g.prototype.parseVariableDeclarationList=function(p){var m={inFor:p.inFor},w=[];for(w.push(this.parseVariableDeclaration(m));this.match(",");)this.nextToken(),w.push(this.parseVariableDeclaration(m));return w},g.prototype.parseVariableStatement=function(){var p=this.createNode();this.expectKeyword("var");var m=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(p,new c.VariableDeclaration(m,"var"))},g.prototype.parseEmptyStatement=function(){var p=this.createNode();return this.expect(";"),this.finalize(p,new c.EmptyStatement)},g.prototype.parseExpressionStatement=function(){var p=this.createNode(),m=this.parseExpression();return this.consumeSemicolon(),this.finalize(p,new c.ExpressionStatement(m))},g.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},g.prototype.parseIfStatement=function(){var p=this.createNode(),m,w=null;this.expectKeyword("if"),this.expect("(");var v=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),m=this.finalize(this.createNode(),new c.EmptyStatement)):(this.expect(")"),m=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),w=this.parseIfClause())),this.finalize(p,new c.IfStatement(v,m,w))},g.prototype.parseDoWhileStatement=function(){var p=this.createNode();this.expectKeyword("do");var m=this.context.inIteration;this.context.inIteration=!0;var w=this.parseStatement();this.context.inIteration=m,this.expectKeyword("while"),this.expect("(");var v=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(p,new c.DoWhileStatement(w,v))},g.prototype.parseWhileStatement=function(){var p=this.createNode(),m;this.expectKeyword("while"),this.expect("(");var w=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),m=this.finalize(this.createNode(),new c.EmptyStatement);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,m=this.parseStatement(),this.context.inIteration=v}return this.finalize(p,new c.WhileStatement(w,m))},g.prototype.parseForStatement=function(){var p=null,m=null,w=null,v=!0,A,_,E=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){p=this.createNode(),this.nextToken();var b=this.context.allowIn;this.context.allowIn=!1;var x=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=b,x.length===1&&this.matchKeyword("in")){var y=x[0];y.init&&(y.id.type===f.Syntax.ArrayPattern||y.id.type===f.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),p=this.finalize(p,new c.VariableDeclaration(x,"var")),this.nextToken(),A=p,_=this.parseExpression(),p=null}else x.length===1&&x[0].init===null&&this.matchContextualKeyword("of")?(p=this.finalize(p,new c.VariableDeclaration(x,"var")),this.nextToken(),A=p,_=this.parseAssignmentExpression(),p=null,v=!1):(p=this.finalize(p,new c.VariableDeclaration(x,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){p=this.createNode();var C=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in")p=this.finalize(p,new c.Identifier(C)),this.nextToken(),A=p,_=this.parseExpression(),p=null;else{var b=this.context.allowIn;this.context.allowIn=!1;var x=this.parseBindingList(C,{inFor:!0});this.context.allowIn=b,x.length===1&&x[0].init===null&&this.matchKeyword("in")?(p=this.finalize(p,new c.VariableDeclaration(x,C)),this.nextToken(),A=p,_=this.parseExpression(),p=null):x.length===1&&x[0].init===null&&this.matchContextualKeyword("of")?(p=this.finalize(p,new c.VariableDeclaration(x,C)),this.nextToken(),A=p,_=this.parseAssignmentExpression(),p=null,v=!1):(this.consumeSemicolon(),p=this.finalize(p,new c.VariableDeclaration(x,C)))}}else{var B=this.lookahead,b=this.context.allowIn;if(this.context.allowIn=!1,p=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=b,this.matchKeyword("in"))(!this.context.isAssignmentTarget||p.type===f.Syntax.AssignmentExpression)&&this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(p),A=p,_=this.parseExpression(),p=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||p.type===f.Syntax.AssignmentExpression)&&this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(p),A=p,_=this.parseAssignmentExpression(),p=null,v=!1;else{if(this.match(",")){for(var T=[p];this.match(",");)this.nextToken(),T.push(this.isolateCoverGrammar(this.parseAssignmentExpression));p=this.finalize(this.startNode(B),new c.SequenceExpression(T))}this.expect(";")}}typeof A=="undefined"&&(this.match(";")||(m=this.parseExpression()),this.expect(";"),this.match(")")||(w=this.parseExpression()));var M;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),M=this.finalize(this.createNode(),new c.EmptyStatement);else{this.expect(")");var R=this.context.inIteration;this.context.inIteration=!0,M=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=R}return typeof A=="undefined"?this.finalize(E,new c.ForStatement(p,m,w,M)):v?this.finalize(E,new c.ForInStatement(A,_,M)):this.finalize(E,new c.ForOfStatement(A,_,M))},g.prototype.parseContinueStatement=function(){var p=this.createNode();this.expectKeyword("continue");var m=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var w=this.parseVariableIdentifier();m=w;var v="$"+w.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,v)||this.throwError(o.Messages.UnknownLabel,w.name)}return this.consumeSemicolon(),m===null&&!this.context.inIteration&&this.throwError(o.Messages.IllegalContinue),this.finalize(p,new c.ContinueStatement(m))},g.prototype.parseBreakStatement=function(){var p=this.createNode();this.expectKeyword("break");var m=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var w=this.parseVariableIdentifier(),v="$"+w.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,v)||this.throwError(o.Messages.UnknownLabel,w.name),m=w}return this.consumeSemicolon(),m===null&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(o.Messages.IllegalBreak),this.finalize(p,new c.BreakStatement(m))},g.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var p=this.createNode();this.expectKeyword("return");var m=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10,w=m?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(p,new c.ReturnStatement(w))},g.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var p=this.createNode(),m;this.expectKeyword("with"),this.expect("(");var w=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),m=this.finalize(this.createNode(),new c.EmptyStatement)):(this.expect(")"),m=this.parseStatement()),this.finalize(p,new c.WithStatement(w,m))},g.prototype.parseSwitchCase=function(){var p=this.createNode(),m;this.matchKeyword("default")?(this.nextToken(),m=null):(this.expectKeyword("case"),m=this.parseExpression()),this.expect(":");for(var w=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)w.push(this.parseStatementListItem());return this.finalize(p,new c.SwitchCase(m,w))},g.prototype.parseSwitchStatement=function(){var p=this.createNode();this.expectKeyword("switch"),this.expect("(");var m=this.parseExpression();this.expect(")");var w=this.context.inSwitch;this.context.inSwitch=!0;var v=[],A=!1;for(this.expect("{");!this.match("}");){var _=this.parseSwitchCase();_.test===null&&(A&&this.throwError(o.Messages.MultipleDefaultsInSwitch),A=!0),v.push(_)}return this.expect("}"),this.context.inSwitch=w,this.finalize(p,new c.SwitchStatement(m,v))},g.prototype.parseLabelledStatement=function(){var p=this.createNode(),m=this.parseExpression(),w;if(m.type===f.Syntax.Identifier&&this.match(":")){this.nextToken();var v=m,A="$"+v.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,A)&&this.throwError(o.Messages.Redeclaration,"Label",v.name),this.context.labelSet[A]=!0;var _=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),_=this.parseClassDeclaration();else if(this.matchKeyword("function")){var E=this.lookahead,b=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(E,o.Messages.StrictFunction):b.generator&&this.tolerateUnexpectedToken(E,o.Messages.GeneratorInLegacyContext),_=b}else _=this.parseStatement();delete this.context.labelSet[A],w=new c.LabeledStatement(v,_)}else this.consumeSemicolon(),w=new c.ExpressionStatement(m);return this.finalize(p,w)},g.prototype.parseThrowStatement=function(){var p=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var m=this.parseExpression();return this.consumeSemicolon(),this.finalize(p,new c.ThrowStatement(m))},g.prototype.parseCatchClause=function(){var p=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var m=[],w=this.parsePattern(m),v={},A=0;A<m.length;A++){var _="$"+m[A].value;Object.prototype.hasOwnProperty.call(v,_)&&this.tolerateError(o.Messages.DuplicateBinding,m[A].value),v[_]=!0}this.context.strict&&w.type===f.Syntax.Identifier&&this.scanner.isRestrictedWord(w.name)&&this.tolerateError(o.Messages.StrictCatchVariable),this.expect(")");var E=this.parseBlock();return this.finalize(p,new c.CatchClause(w,E))},g.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},g.prototype.parseTryStatement=function(){var p=this.createNode();this.expectKeyword("try");var m=this.parseBlock(),w=this.matchKeyword("catch")?this.parseCatchClause():null,v=this.matchKeyword("finally")?this.parseFinallyClause():null;return!w&&!v&&this.throwError(o.Messages.NoCatchOrFinally),this.finalize(p,new c.TryStatement(m,w,v))},g.prototype.parseDebuggerStatement=function(){var p=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(p,new c.DebuggerStatement)},g.prototype.parseStatement=function(){var p;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:p=this.parseExpressionStatement();break;case 7:var m=this.lookahead.value;m==="{"?p=this.parseBlock():m==="("?p=this.parseExpressionStatement():m===";"?p=this.parseEmptyStatement():p=this.parseExpressionStatement();break;case 3:p=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":p=this.parseBreakStatement();break;case"continue":p=this.parseContinueStatement();break;case"debugger":p=this.parseDebuggerStatement();break;case"do":p=this.parseDoWhileStatement();break;case"for":p=this.parseForStatement();break;case"function":p=this.parseFunctionDeclaration();break;case"if":p=this.parseIfStatement();break;case"return":p=this.parseReturnStatement();break;case"switch":p=this.parseSwitchStatement();break;case"throw":p=this.parseThrowStatement();break;case"try":p=this.parseTryStatement();break;case"var":p=this.parseVariableStatement();break;case"while":p=this.parseWhileStatement();break;case"with":p=this.parseWithStatement();break;default:p=this.parseExpressionStatement();break}break;default:p=this.throwUnexpectedToken(this.lookahead)}return p},g.prototype.parseFunctionSourceElements=function(){var p=this.createNode();this.expect("{");var m=this.parseDirectivePrologues(),w=this.context.labelSet,v=this.context.inIteration,A=this.context.inSwitch,_=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;this.lookahead.type!==2&&!this.match("}");)m.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=w,this.context.inIteration=v,this.context.inSwitch=A,this.context.inFunctionBody=_,this.finalize(p,new c.BlockStatement(m))},g.prototype.validateParam=function(p,m,w){var v="$"+w;this.context.strict?(this.scanner.isRestrictedWord(w)&&(p.stricted=m,p.message=o.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(p.paramSet,v)&&(p.stricted=m,p.message=o.Messages.StrictParamDupe)):p.firstRestricted||(this.scanner.isRestrictedWord(w)?(p.firstRestricted=m,p.message=o.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(w)?(p.firstRestricted=m,p.message=o.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(p.paramSet,v)&&(p.stricted=m,p.message=o.Messages.StrictParamDupe)),typeof Object.defineProperty=="function"?Object.defineProperty(p.paramSet,v,{value:!0,enumerable:!0,writable:!0,configurable:!0}):p.paramSet[v]=!0},g.prototype.parseRestElement=function(p){var m=this.createNode();this.expect("...");var w=this.parsePattern(p);return this.match("=")&&this.throwError(o.Messages.DefaultRestParameter),this.match(")")||this.throwError(o.Messages.ParameterAfterRestParameter),this.finalize(m,new c.RestElement(w))},g.prototype.parseFormalParameter=function(p){for(var m=[],w=this.match("...")?this.parseRestElement(m):this.parsePatternWithDefault(m),v=0;v<m.length;v++)this.validateParam(p,m[v],m[v].value);p.simple=p.simple&&w instanceof c.Identifier,p.params.push(w)},g.prototype.parseFormalParameters=function(p){var m;if(m={simple:!0,params:[],firstRestricted:p},this.expect("("),!this.match(")"))for(m.paramSet={};this.lookahead.type!==2&&(this.parseFormalParameter(m),!(this.match(")")||(this.expect(","),this.match(")")))););return this.expect(")"),{simple:m.simple,params:m.params,stricted:m.stricted,firstRestricted:m.firstRestricted,message:m.message}},g.prototype.matchAsyncFunction=function(){var p=this.matchContextualKeyword("async");if(p){var m=this.scanner.saveState();this.scanner.scanComments();var w=this.scanner.lex();this.scanner.restoreState(m),p=m.lineNumber===w.lineNumber&&w.type===4&&w.value==="function"}return p},g.prototype.parseFunctionDeclaration=function(p){var m=this.createNode(),w=this.matchContextualKeyword("async");w&&this.nextToken(),this.expectKeyword("function");var v=w?!1:this.match("*");v&&this.nextToken();var A,_=null,E=null;if(!p||!this.match("(")){var b=this.lookahead;_=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(b.value)&&this.tolerateUnexpectedToken(b,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(b.value)?(E=b,A=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(b.value)&&(E=b,A=o.Messages.StrictReservedWord)}var x=this.context.await,y=this.context.allowYield;this.context.await=w,this.context.allowYield=!v;var C=this.parseFormalParameters(E),B=C.params,T=C.stricted;E=C.firstRestricted,C.message&&(A=C.message);var M=this.context.strict,R=this.context.allowStrictDirective;this.context.allowStrictDirective=C.simple;var I=this.parseFunctionSourceElements();return this.context.strict&&E&&this.throwUnexpectedToken(E,A),this.context.strict&&T&&this.tolerateUnexpectedToken(T,A),this.context.strict=M,this.context.allowStrictDirective=R,this.context.await=x,this.context.allowYield=y,w?this.finalize(m,new c.AsyncFunctionDeclaration(_,B,I)):this.finalize(m,new c.FunctionDeclaration(_,B,I,v))},g.prototype.parseFunctionExpression=function(){var p=this.createNode(),m=this.matchContextualKeyword("async");m&&this.nextToken(),this.expectKeyword("function");var w=m?!1:this.match("*");w&&this.nextToken();var v,A=null,_,E=this.context.await,b=this.context.allowYield;if(this.context.await=m,this.context.allowYield=!w,!this.match("(")){var x=this.lookahead;A=!this.context.strict&&!w&&this.matchKeyword("yield")?this.parseIdentifierName():this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(x.value)&&this.tolerateUnexpectedToken(x,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(x.value)?(_=x,v=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(x.value)&&(_=x,v=o.Messages.StrictReservedWord)}var y=this.parseFormalParameters(_),C=y.params,B=y.stricted;_=y.firstRestricted,y.message&&(v=y.message);var T=this.context.strict,M=this.context.allowStrictDirective;this.context.allowStrictDirective=y.simple;var R=this.parseFunctionSourceElements();return this.context.strict&&_&&this.throwUnexpectedToken(_,v),this.context.strict&&B&&this.tolerateUnexpectedToken(B,v),this.context.strict=T,this.context.allowStrictDirective=M,this.context.await=E,this.context.allowYield=b,m?this.finalize(p,new c.AsyncFunctionExpression(A,C,R)):this.finalize(p,new c.FunctionExpression(A,C,R,w))},g.prototype.parseDirective=function(){var p=this.lookahead,m=this.createNode(),w=this.parseExpression(),v=w.type===f.Syntax.Literal?this.getTokenRaw(p).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(m,v?new c.Directive(w,v):new c.ExpressionStatement(w))},g.prototype.parseDirectivePrologues=function(){for(var p=null,m=[];;){var w=this.lookahead;if(w.type!==8)break;var v=this.parseDirective();m.push(v);var A=v.directive;if(typeof A!="string")break;A==="use strict"?(this.context.strict=!0,p&&this.tolerateUnexpectedToken(p,o.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(w,o.Messages.IllegalLanguageModeDirective)):!p&&w.octal&&(p=w)}return m},g.prototype.qualifiedPropertyName=function(p){switch(p.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return p.value==="["}return!1},g.prototype.parseGetterMethod=function(){var p=this.createNode(),m=!1,w=this.context.allowYield;this.context.allowYield=!m;var v=this.parseFormalParameters();v.params.length>0&&this.tolerateError(o.Messages.BadGetterArity);var A=this.parsePropertyMethod(v);return this.context.allowYield=w,this.finalize(p,new c.FunctionExpression(null,v.params,A,m))},g.prototype.parseSetterMethod=function(){var p=this.createNode(),m=!1,w=this.context.allowYield;this.context.allowYield=!m;var v=this.parseFormalParameters();v.params.length!==1?this.tolerateError(o.Messages.BadSetterArity):v.params[0]instanceof c.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var A=this.parsePropertyMethod(v);return this.context.allowYield=w,this.finalize(p,new c.FunctionExpression(null,v.params,A,m))},g.prototype.parseGeneratorMethod=function(){var p=this.createNode(),m=!0,w=this.context.allowYield;this.context.allowYield=!0;var v=this.parseFormalParameters();this.context.allowYield=!1;var A=this.parsePropertyMethod(v);return this.context.allowYield=w,this.finalize(p,new c.FunctionExpression(null,v.params,A,m))},g.prototype.isStartOfExpression=function(){var p=!0,m=this.lookahead.value;switch(this.lookahead.type){case 7:p=m==="["||m==="("||m==="{"||m==="+"||m==="-"||m==="!"||m==="~"||m==="++"||m==="--"||m==="/"||m==="/=";break;case 4:p=m==="class"||m==="delete"||m==="function"||m==="let"||m==="new"||m==="super"||m==="this"||m==="typeof"||m==="void"||m==="yield";break}return p},g.prototype.parseYieldExpression=function(){var p=this.createNode();this.expectKeyword("yield");var m=null,w=!1;if(!this.hasLineTerminator){var v=this.context.allowYield;this.context.allowYield=!1,w=this.match("*"),w?(this.nextToken(),m=this.parseAssignmentExpression()):this.isStartOfExpression()&&(m=this.parseAssignmentExpression()),this.context.allowYield=v}return this.finalize(p,new c.YieldExpression(m,w))},g.prototype.parseClassElement=function(p){var m=this.lookahead,w=this.createNode(),v="",A=null,_=null,E=!1,b=!1,x=!1,y=!1;if(this.match("*"))this.nextToken();else{E=this.match("["),A=this.parseObjectPropertyKey();var C=A;if(C.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(m=this.lookahead,x=!0,E=this.match("["),this.match("*")?this.nextToken():A=this.parseObjectPropertyKey()),m.type===3&&!this.hasLineTerminator&&m.value==="async"){var B=this.lookahead.value;B!==":"&&B!=="("&&B!=="*"&&(y=!0,m=this.lookahead,A=this.parseObjectPropertyKey(),m.type===3&&m.value==="constructor"&&this.tolerateUnexpectedToken(m,o.Messages.ConstructorIsAsync))}}var T=this.qualifiedPropertyName(this.lookahead);return m.type===3?m.value==="get"&&T?(v="get",E=this.match("["),A=this.parseObjectPropertyKey(),this.context.allowYield=!1,_=this.parseGetterMethod()):m.value==="set"&&T&&(v="set",E=this.match("["),A=this.parseObjectPropertyKey(),_=this.parseSetterMethod()):m.type===7&&m.value==="*"&&T&&(v="init",E=this.match("["),A=this.parseObjectPropertyKey(),_=this.parseGeneratorMethod(),b=!0),!v&&A&&this.match("(")&&(v="init",_=y?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),b=!0),v||this.throwUnexpectedToken(this.lookahead),v==="init"&&(v="method"),E||(x&&this.isPropertyKey(A,"prototype")&&this.throwUnexpectedToken(m,o.Messages.StaticPrototype),!x&&this.isPropertyKey(A,"constructor")&&((v!=="method"||!b||_&&_.generator)&&this.throwUnexpectedToken(m,o.Messages.ConstructorSpecialMethod),p.value?this.throwUnexpectedToken(m,o.Messages.DuplicateConstructor):p.value=!0,v="constructor")),this.finalize(w,new c.MethodDefinition(A,E,_,v,x))},g.prototype.parseClassElementList=function(){var p=[],m={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():p.push(this.parseClassElement(m));return this.expect("}"),p},g.prototype.parseClassBody=function(){var p=this.createNode(),m=this.parseClassElementList();return this.finalize(p,new c.ClassBody(m))},g.prototype.parseClassDeclaration=function(p){var m=this.createNode(),w=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var v=p&&this.lookahead.type!==3?null:this.parseVariableIdentifier(),A=null;this.matchKeyword("extends")&&(this.nextToken(),A=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var _=this.parseClassBody();return this.context.strict=w,this.finalize(m,new c.ClassDeclaration(v,A,_))},g.prototype.parseClassExpression=function(){var p=this.createNode(),m=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var w=this.lookahead.type===3?this.parseVariableIdentifier():null,v=null;this.matchKeyword("extends")&&(this.nextToken(),v=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var A=this.parseClassBody();return this.context.strict=m,this.finalize(p,new c.ClassExpression(w,v,A))},g.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var p=this.createNode(),m=this.parseDirectivePrologues();this.lookahead.type!==2;)m.push(this.parseStatementListItem());return this.finalize(p,new c.Module(m))},g.prototype.parseScript=function(){for(var p=this.createNode(),m=this.parseDirectivePrologues();this.lookahead.type!==2;)m.push(this.parseStatementListItem());return this.finalize(p,new c.Script(m))},g.prototype.parseModuleSpecifier=function(){var p=this.createNode();this.lookahead.type!==8&&this.throwError(o.Messages.InvalidModuleSpecifier);var m=this.nextToken(),w=this.getTokenRaw(m);return this.finalize(p,new c.Literal(m.value,w))},g.prototype.parseImportSpecifier=function(){var p=this.createNode(),m,w;return this.lookahead.type===3?(m=this.parseVariableIdentifier(),w=m,this.matchContextualKeyword("as")&&(this.nextToken(),w=this.parseVariableIdentifier())):(m=this.parseIdentifierName(),w=m,this.matchContextualKeyword("as")?(this.nextToken(),w=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(p,new c.ImportSpecifier(w,m))},g.prototype.parseNamedImports=function(){this.expect("{");for(var p=[];!this.match("}");)p.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),p},g.prototype.parseImportDefaultSpecifier=function(){var p=this.createNode(),m=this.parseIdentifierName();return this.finalize(p,new c.ImportDefaultSpecifier(m))},g.prototype.parseImportNamespaceSpecifier=function(){var p=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var m=this.parseIdentifierName();return this.finalize(p,new c.ImportNamespaceSpecifier(m))},g.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var p=this.createNode();this.expectKeyword("import");var m,w=[];if(this.lookahead.type===8)m=this.parseModuleSpecifier();else{if(this.match("{")?w=w.concat(this.parseNamedImports()):this.match("*")?w.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(w.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?w.push(this.parseImportNamespaceSpecifier()):this.match("{")?w=w.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var v=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(v,this.lookahead.value)}this.nextToken(),m=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(p,new c.ImportDeclaration(w,m))},g.prototype.parseExportSpecifier=function(){var p=this.createNode(),m=this.parseIdentifierName(),w=m;return this.matchContextualKeyword("as")&&(this.nextToken(),w=this.parseIdentifierName()),this.finalize(p,new c.ExportSpecifier(m,w))},g.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var p=this.createNode();this.expectKeyword("export");var m;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var w=this.parseFunctionDeclaration(!0);m=this.finalize(p,new c.ExportDefaultDeclaration(w))}else if(this.matchKeyword("class")){var w=this.parseClassDeclaration(!0);m=this.finalize(p,new c.ExportDefaultDeclaration(w))}else if(this.matchContextualKeyword("async")){var w=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();m=this.finalize(p,new c.ExportDefaultDeclaration(w))}else{this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value);var w=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),m=this.finalize(p,new c.ExportDefaultDeclaration(w))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var v=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(v,this.lookahead.value)}this.nextToken();var A=this.parseModuleSpecifier();this.consumeSemicolon(),m=this.finalize(p,new c.ExportAllDeclaration(A))}else if(this.lookahead.type===4){var w=void 0;switch(this.lookahead.value){case"let":case"const":w=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":w=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}m=this.finalize(p,new c.ExportNamedDeclaration(w,[],null))}else if(this.matchAsyncFunction()){var w=this.parseFunctionDeclaration();m=this.finalize(p,new c.ExportNamedDeclaration(w,[],null))}else{var _=[],E=null,b=!1;for(this.expect("{");!this.match("}");)b=b||this.matchKeyword("default"),_.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),E=this.parseModuleSpecifier(),this.consumeSemicolon();else if(b){var v=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(v,this.lookahead.value)}else this.consumeSemicolon();m=this.finalize(p,new c.ExportNamedDeclaration(null,_,E))}return m},g}();i.Parser=d},function(n,i){Object.defineProperty(i,"__esModule",{value:!0});function r(s,u){if(!s)throw new Error("ASSERT: "+u)}i.assert=r},function(n,i){Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function s(){this.errors=[],this.tolerant=!1}return s.prototype.recordError=function(u){this.errors.push(u)},s.prototype.tolerate=function(u){if(this.tolerant)this.recordError(u);else throw u},s.prototype.constructError=function(u,o){var c=new Error(u);try{throw c}catch(a){Object.create&&Object.defineProperty&&(c=Object.create(a),Object.defineProperty(c,"column",{value:o}))}return c},s.prototype.createError=function(u,o,c,a){var f="Line "+o+": "+a,l=this.constructError(f,c);return l.index=u,l.lineNumber=o,l.description=a,l},s.prototype.throwError=function(u,o,c,a){throw this.createError(u,o,c,a)},s.prototype.tolerateError=function(u,o,c,a){var f=this.createError(u,o,c,a);if(this.tolerant)this.recordError(f);else throw f},s}();i.ErrorHandler=r},function(n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(n,i,r){Object.defineProperty(i,"__esModule",{value:!0});var s=r(9),u=r(4),o=r(11);function c(l){return"0123456789abcdef".indexOf(l.toLowerCase())}function a(l){return"01234567".indexOf(l)}var f=function(){function l(h,d){this.source=h,this.errorHandler=d,this.trackComment=!1,this.isModule=!1,this.length=h.length,this.index=0,this.lineNumber=h.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return l.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},l.prototype.restoreState=function(h){this.index=h.index,this.lineNumber=h.lineNumber,this.lineStart=h.lineStart},l.prototype.eof=function(){return this.index>=this.length},l.prototype.throwUnexpectedToken=function(h){return h===void 0&&(h=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,h)},l.prototype.tolerateUnexpectedToken=function(h){h===void 0&&(h=o.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,h)},l.prototype.skipSingleLineComment=function(h){var d=[],g,p;for(this.trackComment&&(d=[],g=this.index-h,p={start:{line:this.lineNumber,column:this.index-this.lineStart-h},end:{}});!this.eof();){var m=this.source.charCodeAt(this.index);if(++this.index,u.Character.isLineTerminator(m)){if(this.trackComment){p.end={line:this.lineNumber,column:this.index-this.lineStart-1};var w={multiLine:!1,slice:[g+h,this.index-1],range:[g,this.index-1],loc:p};d.push(w)}return m===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,d}}if(this.trackComment){p.end={line:this.lineNumber,column:this.index-this.lineStart};var w={multiLine:!1,slice:[g+h,this.index],range:[g,this.index],loc:p};d.push(w)}return d},l.prototype.skipMultiLineComment=function(){var h=[],d,g;for(this.trackComment&&(h=[],d=this.index-2,g={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var p=this.source.charCodeAt(this.index);if(u.Character.isLineTerminator(p))p===13&&this.source.charCodeAt(this.index+1)===10&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(p===42){if(this.source.charCodeAt(this.index+1)===47){if(this.index+=2,this.trackComment){g.end={line:this.lineNumber,column:this.index-this.lineStart};var m={multiLine:!0,slice:[d+2,this.index-2],range:[d,this.index],loc:g};h.push(m)}return h}++this.index}else++this.index}if(this.trackComment){g.end={line:this.lineNumber,column:this.index-this.lineStart};var m={multiLine:!0,slice:[d+2,this.index],range:[d,this.index],loc:g};h.push(m)}return this.tolerateUnexpectedToken(),h},l.prototype.scanComments=function(){var h;this.trackComment&&(h=[]);for(var d=this.index===0;!this.eof();){var g=this.source.charCodeAt(this.index);if(u.Character.isWhiteSpace(g))++this.index;else if(u.Character.isLineTerminator(g))++this.index,g===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,d=!0;else if(g===47)if(g=this.source.charCodeAt(this.index+1),g===47){this.index+=2;var p=this.skipSingleLineComment(2);this.trackComment&&(h=h.concat(p)),d=!0}else if(g===42){this.index+=2;var p=this.skipMultiLineComment();this.trackComment&&(h=h.concat(p))}else break;else if(d&&g===45)if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var p=this.skipSingleLineComment(3);this.trackComment&&(h=h.concat(p))}else break;else if(g===60&&!this.isModule)if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var p=this.skipSingleLineComment(4);this.trackComment&&(h=h.concat(p))}else break;else break}return h},l.prototype.isFutureReservedWord=function(h){switch(h){case"enum":case"export":case"import":case"super":return!0;default:return!1}},l.prototype.isStrictModeReservedWord=function(h){switch(h){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},l.prototype.isRestrictedWord=function(h){return h==="eval"||h==="arguments"},l.prototype.isKeyword=function(h){switch(h.length){case 2:return h==="if"||h==="in"||h==="do";case 3:return h==="var"||h==="for"||h==="new"||h==="try"||h==="let";case 4:return h==="this"||h==="else"||h==="case"||h==="void"||h==="with"||h==="enum";case 5:return h==="while"||h==="break"||h==="catch"||h==="throw"||h==="const"||h==="yield"||h==="class"||h==="super";case 6:return h==="return"||h==="typeof"||h==="delete"||h==="switch"||h==="export"||h==="import";case 7:return h==="default"||h==="finally"||h==="extends";case 8:return h==="function"||h==="continue"||h==="debugger";case 10:return h==="instanceof";default:return!1}},l.prototype.codePointAt=function(h){var d=this.source.charCodeAt(h);if(d>=55296&&d<=56319){var g=this.source.charCodeAt(h+1);if(g>=56320&&g<=57343){var p=d;d=(p-55296)*1024+g-56320+65536}}return d},l.prototype.scanHexEscape=function(h){for(var d=h==="u"?4:2,g=0,p=0;p<d;++p)if(!this.eof()&&u.Character.isHexDigit(this.source.charCodeAt(this.index)))g=g*16+c(this.source[this.index++]);else return null;return String.fromCharCode(g)},l.prototype.scanUnicodeCodePointEscape=function(){var h=this.source[this.index],d=0;for(h==="}"&&this.throwUnexpectedToken();!this.eof()&&(h=this.source[this.index++],!!u.Character.isHexDigit(h.charCodeAt(0)));)d=d*16+c(h);return(d>1114111||h!=="}")&&this.throwUnexpectedToken(),u.Character.fromCodePoint(d)},l.prototype.getIdentifier=function(){for(var h=this.index++;!this.eof();){var d=this.source.charCodeAt(this.index);if(d===92)return this.index=h,this.getComplexIdentifier();if(d>=55296&&d<57343)return this.index=h,this.getComplexIdentifier();if(u.Character.isIdentifierPart(d))++this.index;else break}return this.source.slice(h,this.index)},l.prototype.getComplexIdentifier=function(){var h=this.codePointAt(this.index),d=u.Character.fromCodePoint(h);this.index+=d.length;var g;for(h===92&&(this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,g=this.scanUnicodeCodePointEscape()):(g=this.scanHexEscape("u"),(g===null||g==="\\"||!u.Character.isIdentifierStart(g.charCodeAt(0)))&&this.throwUnexpectedToken()),d=g);!this.eof()&&(h=this.codePointAt(this.index),!!u.Character.isIdentifierPart(h));)g=u.Character.fromCodePoint(h),d+=g,this.index+=g.length,h===92&&(d=d.substr(0,d.length-1),this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,g=this.scanUnicodeCodePointEscape()):(g=this.scanHexEscape("u"),(g===null||g==="\\"||!u.Character.isIdentifierPart(g.charCodeAt(0)))&&this.throwUnexpectedToken()),d+=g);return d},l.prototype.octalToDecimal=function(h){var d=h!=="0",g=a(h);return!this.eof()&&u.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(d=!0,g=g*8+a(this.source[this.index++]),"0123".indexOf(h)>=0&&!this.eof()&&u.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(g=g*8+a(this.source[this.index++]))),{code:g,octal:d}},l.prototype.scanIdentifier=function(){var h,d=this.index,g=this.source.charCodeAt(d)===92?this.getComplexIdentifier():this.getIdentifier();if(g.length===1?h=3:this.isKeyword(g)?h=4:g==="null"?h=5:g==="true"||g==="false"?h=1:h=3,h!==3&&d+g.length!==this.index){var p=this.index;this.index=d,this.tolerateUnexpectedToken(o.Messages.InvalidEscapedReservedWord),this.index=p}return{type:h,value:g,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},l.prototype.scanPunctuator=function(){var h=this.index,d=this.source[this.index];switch(d){case"(":case"{":d==="{"&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,this.source[this.index]==="."&&this.source[this.index+1]==="."&&(this.index+=2,d="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:d=this.source.substr(this.index,4),d===">>>="?this.index+=4:(d=d.substr(0,3),d==="==="||d==="!=="||d===">>>"||d==="<<="||d===">>="||d==="**="?this.index+=3:(d=d.substr(0,2),d==="&&"||d==="||"||d==="=="||d==="!="||d==="+="||d==="-="||d==="*="||d==="/="||d==="++"||d==="--"||d==="<<"||d===">>"||d==="&="||d==="|="||d==="^="||d==="%="||d==="<="||d===">="||d==="=>"||d==="**"?this.index+=2:(d=this.source[this.index],"<>=!+-*%&|^/".indexOf(d)>=0&&++this.index)))}return this.index===h&&this.throwUnexpectedToken(),{type:7,value:d,lineNumber:this.lineNumber,lineStart:this.lineStart,start:h,end:this.index}},l.prototype.scanHexLiteral=function(h){for(var d="";!this.eof()&&u.Character.isHexDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];return d.length===0&&this.throwUnexpectedToken(),u.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+d,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:h,end:this.index}},l.prototype.scanBinaryLiteral=function(h){for(var d="",g;!this.eof()&&(g=this.source[this.index],!(g!=="0"&&g!=="1"));)d+=this.source[this.index++];return d.length===0&&this.throwUnexpectedToken(),this.eof()||(g=this.source.charCodeAt(this.index),(u.Character.isIdentifierStart(g)||u.Character.isDecimalDigit(g))&&this.throwUnexpectedToken()),{type:6,value:parseInt(d,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:h,end:this.index}},l.prototype.scanOctalLiteral=function(h,d){var g="",p=!1;for(u.Character.isOctalDigit(h.charCodeAt(0))?(p=!0,g="0"+this.source[this.index++]):++this.index;!this.eof()&&u.Character.isOctalDigit(this.source.charCodeAt(this.index));)g+=this.source[this.index++];return!p&&g.length===0&&this.throwUnexpectedToken(),(u.Character.isIdentifierStart(this.source.charCodeAt(this.index))||u.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(g,8),octal:p,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},l.prototype.isImplicitOctalLiteral=function(){for(var h=this.index+1;h<this.length;++h){var d=this.source[h];if(d==="8"||d==="9")return!1;if(!u.Character.isOctalDigit(d.charCodeAt(0)))return!0}return!0},l.prototype.scanNumericLiteral=function(){var h=this.index,d=this.source[h];s.assert(u.Character.isDecimalDigit(d.charCodeAt(0))||d===".","Numeric literal must start with a decimal digit or a decimal point");var g="";if(d!=="."){if(g=this.source[this.index++],d=this.source[this.index],g==="0"){if(d==="x"||d==="X")return++this.index,this.scanHexLiteral(h);if(d==="b"||d==="B")return++this.index,this.scanBinaryLiteral(h);if(d==="o"||d==="O")return this.scanOctalLiteral(d,h);if(d&&u.Character.isOctalDigit(d.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(d,h)}for(;u.Character.isDecimalDigit(this.source.charCodeAt(this.index));)g+=this.source[this.index++];d=this.source[this.index]}if(d==="."){for(g+=this.source[this.index++];u.Character.isDecimalDigit(this.source.charCodeAt(this.index));)g+=this.source[this.index++];d=this.source[this.index]}if(d==="e"||d==="E")if(g+=this.source[this.index++],d=this.source[this.index],(d==="+"||d==="-")&&(g+=this.source[this.index++]),u.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;u.Character.isDecimalDigit(this.source.charCodeAt(this.index));)g+=this.source[this.index++];else this.throwUnexpectedToken();return u.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(g),lineNumber:this.lineNumber,lineStart:this.lineStart,start:h,end:this.index}},l.prototype.scanStringLiteral=function(){var h=this.index,d=this.source[h];s.assert(d==="'"||d==='"',"String literal must starts with a quote"),++this.index;for(var g=!1,p="";!this.eof();){var m=this.source[this.index++];if(m===d){d="";break}else if(m==="\\")if(m=this.source[this.index++],!m||!u.Character.isLineTerminator(m.charCodeAt(0)))switch(m){case"u":if(this.source[this.index]==="{")++this.index,p+=this.scanUnicodeCodePointEscape();else{var w=this.scanHexEscape(m);w===null&&this.throwUnexpectedToken(),p+=w}break;case"x":var v=this.scanHexEscape(m);v===null&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),p+=v;break;case"n":p+=`
|
|
`;break;case"r":p+="\r";break;case"t":p+=" ";break;case"b":p+="\b";break;case"f":p+="\f";break;case"v":p+="\v";break;case"8":case"9":p+=m,this.tolerateUnexpectedToken();break;default:if(m&&u.Character.isOctalDigit(m.charCodeAt(0))){var A=this.octalToDecimal(m);g=A.octal||g,p+=String.fromCharCode(A.code)}else p+=m;break}else++this.lineNumber,m==="\r"&&this.source[this.index]===`
|
|
`&&++this.index,this.lineStart=this.index;else{if(u.Character.isLineTerminator(m.charCodeAt(0)))break;p+=m}}return d!==""&&(this.index=h,this.throwUnexpectedToken()),{type:8,value:p,octal:g,lineNumber:this.lineNumber,lineStart:this.lineStart,start:h,end:this.index}},l.prototype.scanTemplate=function(){var h="",d=!1,g=this.index,p=this.source[g]==="`",m=!1,w=2;for(++this.index;!this.eof();){var v=this.source[this.index++];if(v==="`"){w=1,m=!0,d=!0;break}else if(v==="$"){if(this.source[this.index]==="{"){this.curlyStack.push("${"),++this.index,d=!0;break}h+=v}else if(v==="\\")if(v=this.source[this.index++],u.Character.isLineTerminator(v.charCodeAt(0)))++this.lineNumber,v==="\r"&&this.source[this.index]===`
|
|
`&&++this.index,this.lineStart=this.index;else switch(v){case"n":h+=`
|
|
`;break;case"r":h+="\r";break;case"t":h+=" ";break;case"u":if(this.source[this.index]==="{")++this.index,h+=this.scanUnicodeCodePointEscape();else{var A=this.index,_=this.scanHexEscape(v);_!==null?h+=_:(this.index=A,h+=v)}break;case"x":var E=this.scanHexEscape(v);E===null&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),h+=E;break;case"b":h+="\b";break;case"f":h+="\f";break;case"v":h+="\v";break;default:v==="0"?(u.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral),h+="\0"):u.Character.isOctalDigit(v.charCodeAt(0))?this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral):h+=v;break}else u.Character.isLineTerminator(v.charCodeAt(0))?(++this.lineNumber,v==="\r"&&this.source[this.index]===`
|
|
`&&++this.index,this.lineStart=this.index,h+=`
|
|
`):h+=v}return d||this.throwUnexpectedToken(),p||this.curlyStack.pop(),{type:10,value:this.source.slice(g+1,this.index-w),cooked:h,head:p,tail:m,lineNumber:this.lineNumber,lineStart:this.lineStart,start:g,end:this.index}},l.prototype.testRegExp=function(h,d){var g="\uFFFF",p=h,m=this;d.indexOf("u")>=0&&(p=p.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(w,v,A){var _=parseInt(v||A,16);return _>1114111&&m.throwUnexpectedToken(o.Messages.InvalidRegExp),_<=65535?String.fromCharCode(_):g}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g));try{RegExp(p)}catch{this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(h,d)}catch{return null}},l.prototype.scanRegExpBody=function(){var h=this.source[this.index];s.assert(h==="/","Regular expression literal must start with a slash");for(var d=this.source[this.index++],g=!1,p=!1;!this.eof();)if(h=this.source[this.index++],d+=h,h==="\\")h=this.source[this.index++],u.Character.isLineTerminator(h.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),d+=h;else if(u.Character.isLineTerminator(h.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(g)h==="]"&&(g=!1);else if(h==="/"){p=!0;break}else h==="["&&(g=!0);return p||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),d.substr(1,d.length-2)},l.prototype.scanRegExpFlags=function(){for(var h="",d="";!this.eof();){var g=this.source[this.index];if(!u.Character.isIdentifierPart(g.charCodeAt(0)))break;if(++this.index,g==="\\"&&!this.eof())if(g=this.source[this.index],g==="u"){++this.index;var p=this.index,m=this.scanHexEscape("u");if(m!==null)for(d+=m,h+="\\u";p<this.index;++p)h+=this.source[p];else this.index=p,d+="u",h+="\\u";this.tolerateUnexpectedToken()}else h+="\\",this.tolerateUnexpectedToken();else d+=g,h+=g}return d},l.prototype.scanRegExp=function(){var h=this.index,d=this.scanRegExpBody(),g=this.scanRegExpFlags(),p=this.testRegExp(d,g);return{type:9,value:"",pattern:d,flags:g,regex:p,lineNumber:this.lineNumber,lineStart:this.lineStart,start:h,end:this.index}},l.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var h=this.source.charCodeAt(this.index);return u.Character.isIdentifierStart(h)?this.scanIdentifier():h===40||h===41||h===59?this.scanPunctuator():h===39||h===34?this.scanStringLiteral():h===46?u.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():u.Character.isDecimalDigit(h)?this.scanNumericLiteral():h===96||h===125&&this.curlyStack[this.curlyStack.length-1]==="${"?this.scanTemplate():h>=55296&&h<57343&&u.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},l}();i.Scanner=f},function(n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.TokenName={},i.TokenName[1]="Boolean",i.TokenName[2]="<end>",i.TokenName[3]="Identifier",i.TokenName[4]="Keyword",i.TokenName[5]="Null",i.TokenName[6]="Numeric",i.TokenName[7]="Punctuator",i.TokenName[8]="String",i.TokenName[9]="RegularExpression",i.TokenName[10]="Template"},function(n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(n,i,r){Object.defineProperty(i,"__esModule",{value:!0});var s=r(10),u=r(12),o=r(13),c=function(){function f(){this.values=[],this.curly=this.paren=-1}return f.prototype.beforeFunctionExpression=function(l){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(l)>=0},f.prototype.isRegexStart=function(){var l=this.values[this.values.length-1],h=l!==null;switch(l){case"this":case"]":h=!1;break;case")":var d=this.values[this.paren-1];h=d==="if"||d==="while"||d==="for"||d==="with";break;case"}":if(h=!1,this.values[this.curly-3]==="function"){var g=this.values[this.curly-4];h=g?!this.beforeFunctionExpression(g):!1}else if(this.values[this.curly-4]==="function"){var g=this.values[this.curly-5];h=g?!this.beforeFunctionExpression(g):!0}break}return h},f.prototype.push=function(l){l.type===7||l.type===4?(l.value==="{"?this.curly=this.values.length:l.value==="("&&(this.paren=this.values.length),this.values.push(l.value)):this.values.push(null)},f}(),a=function(){function f(l,h){this.errorHandler=new s.ErrorHandler,this.errorHandler.tolerant=h?typeof h.tolerant=="boolean"&&h.tolerant:!1,this.scanner=new u.Scanner(l,this.errorHandler),this.scanner.trackComment=h?typeof h.comment=="boolean"&&h.comment:!1,this.trackRange=h?typeof h.range=="boolean"&&h.range:!1,this.trackLoc=h?typeof h.loc=="boolean"&&h.loc:!1,this.buffer=[],this.reader=new c}return f.prototype.errors=function(){return this.errorHandler.errors},f.prototype.getNextToken=function(){if(this.buffer.length===0){var l=this.scanner.scanComments();if(this.scanner.trackComment)for(var h=0;h<l.length;++h){var d=l[h],g=this.scanner.source.slice(d.slice[0],d.slice[1]),p={type:d.multiLine?"BlockComment":"LineComment",value:g};this.trackRange&&(p.range=d.range),this.trackLoc&&(p.loc=d.loc),this.buffer.push(p)}if(!this.scanner.eof()){var m=void 0;this.trackLoc&&(m={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var w=this.scanner.source[this.scanner.index]==="/"&&this.reader.isRegexStart(),v=w?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(v);var A={type:o.TokenName[v.type],value:this.scanner.source.slice(v.start,v.end)};if(this.trackRange&&(A.range=[v.start,v.end]),this.trackLoc&&(m.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},A.loc=m),v.type===9){var _=v.pattern,E=v.flags;A.regex={pattern:_,flags:E}}this.buffer.push(A)}}return this.buffer.shift()},f}();i.Tokenizer=a}])})})(np);var Et={},ip={},Wo={};Wo.byteLength=Q2;Wo.toByteArray=tE;Wo.fromByteArray=rE;var mn=[],Vt=[],Z2=typeof Uint8Array!="undefined"?Uint8Array:Array,Ba="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Pi=0,q2=Ba.length;Pi<q2;++Pi)mn[Pi]=Ba[Pi],Vt[Ba.charCodeAt(Pi)]=Pi;Vt["-".charCodeAt(0)]=62;Vt["_".charCodeAt(0)]=63;function rp(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var i=n===t?0:4-n%4;return[n,i]}function Q2(e){var t=rp(e),n=t[0],i=t[1];return(n+i)*3/4-i}function eE(e,t,n){return(t+n)*3/4-n}function tE(e){var t,n=rp(e),i=n[0],r=n[1],s=new Z2(eE(e,i,r)),u=0,o=r>0?i-4:i,c;for(c=0;c<o;c+=4)t=Vt[e.charCodeAt(c)]<<18|Vt[e.charCodeAt(c+1)]<<12|Vt[e.charCodeAt(c+2)]<<6|Vt[e.charCodeAt(c+3)],s[u++]=t>>16&255,s[u++]=t>>8&255,s[u++]=t&255;return r===2&&(t=Vt[e.charCodeAt(c)]<<2|Vt[e.charCodeAt(c+1)]>>4,s[u++]=t&255),r===1&&(t=Vt[e.charCodeAt(c)]<<10|Vt[e.charCodeAt(c+1)]<<4|Vt[e.charCodeAt(c+2)]>>2,s[u++]=t>>8&255,s[u++]=t&255),s}function nE(e){return mn[e>>18&63]+mn[e>>12&63]+mn[e>>6&63]+mn[e&63]}function iE(e,t,n){for(var i,r=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),r.push(nE(i));return r.join("")}function rE(e){for(var t,n=e.length,i=n%3,r=[],s=16383,u=0,o=n-i;u<o;u+=s)r.push(iE(e,u,u+s>o?o:u+s));return i===1?(t=e[n-1],r.push(mn[t>>2]+mn[t<<4&63]+"==")):i===2&&(t=(e[n-2]<<8)+e[n-1],r.push(mn[t>>10]+mn[t>>4&63]+mn[t<<2&63]+"=")),r.join("")}var sc={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */sc.read=function(e,t,n,i,r){var s,u,o=r*8-i-1,c=(1<<o)-1,a=c>>1,f=-7,l=n?r-1:0,h=n?-1:1,d=e[t+l];for(l+=h,s=d&(1<<-f)-1,d>>=-f,f+=o;f>0;s=s*256+e[t+l],l+=h,f-=8);for(u=s&(1<<-f)-1,s>>=-f,f+=i;f>0;u=u*256+e[t+l],l+=h,f-=8);if(s===0)s=1-a;else{if(s===c)return u?NaN:(d?-1:1)*(1/0);u=u+Math.pow(2,i),s=s-a}return(d?-1:1)*u*Math.pow(2,s-i)};sc.write=function(e,t,n,i,r,s){var u,o,c,a=s*8-r-1,f=(1<<a)-1,l=f>>1,h=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:s-1,g=i?1:-1,p=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,u=f):(u=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-u))<1&&(u--,c*=2),u+l>=1?t+=h/c:t+=h*Math.pow(2,1-l),t*c>=2&&(u++,c/=2),u+l>=f?(o=0,u=f):u+l>=1?(o=(t*c-1)*Math.pow(2,r),u=u+l):(o=t*Math.pow(2,l-1)*Math.pow(2,r),u=0));r>=8;e[n+d]=o&255,d+=g,o/=256,r-=8);for(u=u<<r|o,a+=r;a>0;e[n+d]=u&255,d+=g,u/=256,a-=8);e[n+d-g]|=p*128};/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
* @license MIT
|
|
*/(function(e){const t=Wo,n=sc,i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=o,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50;const r=2147483647;e.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=s(),!o.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{const L=new Uint8Array(1),F={foo:function(){return 42}};return Object.setPrototypeOf(F,Uint8Array.prototype),Object.setPrototypeOf(L,F),L.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(!!o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(!!o.isBuffer(this))return this.byteOffset}});function u(L){if(L>r)throw new RangeError('The value "'+L+'" is invalid for option "size"');const F=new Uint8Array(L);return Object.setPrototypeOf(F,o.prototype),F}function o(L,F,D){if(typeof L=="number"){if(typeof F=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return l(L)}return c(L,F,D)}o.poolSize=8192;function c(L,F,D){if(typeof L=="string")return h(L,F);if(ArrayBuffer.isView(L))return g(L);if(L==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof L);if(ue(L,ArrayBuffer)||L&&ue(L.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ue(L,SharedArrayBuffer)||L&&ue(L.buffer,SharedArrayBuffer)))return p(L,F,D);if(typeof L=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const O=L.valueOf&&L.valueOf();if(O!=null&&O!==L)return o.from(O,F,D);const W=m(L);if(W)return W;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof L[Symbol.toPrimitive]=="function")return o.from(L[Symbol.toPrimitive]("string"),F,D);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof L)}o.from=function(L,F,D){return c(L,F,D)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function a(L){if(typeof L!="number")throw new TypeError('"size" argument must be of type number');if(L<0)throw new RangeError('The value "'+L+'" is invalid for option "size"')}function f(L,F,D){return a(L),L<=0?u(L):F!==void 0?typeof D=="string"?u(L).fill(F,D):u(L).fill(F):u(L)}o.alloc=function(L,F,D){return f(L,F,D)};function l(L){return a(L),u(L<0?0:w(L)|0)}o.allocUnsafe=function(L){return l(L)},o.allocUnsafeSlow=function(L){return l(L)};function h(L,F){if((typeof F!="string"||F==="")&&(F="utf8"),!o.isEncoding(F))throw new TypeError("Unknown encoding: "+F);const D=A(L,F)|0;let O=u(D);const W=O.write(L,F);return W!==D&&(O=O.slice(0,W)),O}function d(L){const F=L.length<0?0:w(L.length)|0,D=u(F);for(let O=0;O<F;O+=1)D[O]=L[O]&255;return D}function g(L){if(ue(L,Uint8Array)){const F=new Uint8Array(L);return p(F.buffer,F.byteOffset,F.byteLength)}return d(L)}function p(L,F,D){if(F<0||L.byteLength<F)throw new RangeError('"offset" is outside of buffer bounds');if(L.byteLength<F+(D||0))throw new RangeError('"length" is outside of buffer bounds');let O;return F===void 0&&D===void 0?O=new Uint8Array(L):D===void 0?O=new Uint8Array(L,F):O=new Uint8Array(L,F,D),Object.setPrototypeOf(O,o.prototype),O}function m(L){if(o.isBuffer(L)){const F=w(L.length)|0,D=u(F);return D.length===0||L.copy(D,0,0,F),D}if(L.length!==void 0)return typeof L.length!="number"||Ft(L.length)?u(0):d(L);if(L.type==="Buffer"&&Array.isArray(L.data))return d(L.data)}function w(L){if(L>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return L|0}function v(L){return+L!=L&&(L=0),o.alloc(+L)}o.isBuffer=function(F){return F!=null&&F._isBuffer===!0&&F!==o.prototype},o.compare=function(F,D){if(ue(F,Uint8Array)&&(F=o.from(F,F.offset,F.byteLength)),ue(D,Uint8Array)&&(D=o.from(D,D.offset,D.byteLength)),!o.isBuffer(F)||!o.isBuffer(D))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(F===D)return 0;let O=F.length,W=D.length;for(let J=0,q=Math.min(O,W);J<q;++J)if(F[J]!==D[J]){O=F[J],W=D[J];break}return O<W?-1:W<O?1:0},o.isEncoding=function(F){switch(String(F).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(F,D){if(!Array.isArray(F))throw new TypeError('"list" argument must be an Array of Buffers');if(F.length===0)return o.alloc(0);let O;if(D===void 0)for(D=0,O=0;O<F.length;++O)D+=F[O].length;const W=o.allocUnsafe(D);let J=0;for(O=0;O<F.length;++O){let q=F[O];if(ue(q,Uint8Array))J+q.length>W.length?(o.isBuffer(q)||(q=o.from(q)),q.copy(W,J)):Uint8Array.prototype.set.call(W,q,J);else if(o.isBuffer(q))q.copy(W,J);else throw new TypeError('"list" argument must be an Array of Buffers');J+=q.length}return W};function A(L,F){if(o.isBuffer(L))return L.length;if(ArrayBuffer.isView(L)||ue(L,ArrayBuffer))return L.byteLength;if(typeof L!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof L);const D=L.length,O=arguments.length>2&&arguments[2]===!0;if(!O&&D===0)return 0;let W=!1;for(;;)switch(F){case"ascii":case"latin1":case"binary":return D;case"utf8":case"utf-8":return ge(L).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D*2;case"hex":return D>>>1;case"base64":return Te(L).length;default:if(W)return O?-1:ge(L).length;F=(""+F).toLowerCase(),W=!0}}o.byteLength=A;function _(L,F,D){let O=!1;if((F===void 0||F<0)&&(F=0),F>this.length||((D===void 0||D>this.length)&&(D=this.length),D<=0)||(D>>>=0,F>>>=0,D<=F))return"";for(L||(L="utf8");;)switch(L){case"hex":return K(this,F,D);case"utf8":case"utf-8":return I(this,F,D);case"ascii":return j(this,F,D);case"latin1":case"binary":return V(this,F,D);case"base64":return R(this,F,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,F,D);default:if(O)throw new TypeError("Unknown encoding: "+L);L=(L+"").toLowerCase(),O=!0}}o.prototype._isBuffer=!0;function E(L,F,D){const O=L[F];L[F]=L[D],L[D]=O}o.prototype.swap16=function(){const F=this.length;if(F%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let D=0;D<F;D+=2)E(this,D,D+1);return this},o.prototype.swap32=function(){const F=this.length;if(F%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let D=0;D<F;D+=4)E(this,D,D+3),E(this,D+1,D+2);return this},o.prototype.swap64=function(){const F=this.length;if(F%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let D=0;D<F;D+=8)E(this,D,D+7),E(this,D+1,D+6),E(this,D+2,D+5),E(this,D+3,D+4);return this},o.prototype.toString=function(){const F=this.length;return F===0?"":arguments.length===0?I(this,0,F):_.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(F){if(!o.isBuffer(F))throw new TypeError("Argument must be a Buffer");return this===F?!0:o.compare(this,F)===0},o.prototype.inspect=function(){let F="";const D=e.INSPECT_MAX_BYTES;return F=this.toString("hex",0,D).replace(/(.{2})/g,"$1 ").trim(),this.length>D&&(F+=" ... "),"<Buffer "+F+">"},i&&(o.prototype[i]=o.prototype.inspect),o.prototype.compare=function(F,D,O,W,J){if(ue(F,Uint8Array)&&(F=o.from(F,F.offset,F.byteLength)),!o.isBuffer(F))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof F);if(D===void 0&&(D=0),O===void 0&&(O=F?F.length:0),W===void 0&&(W=0),J===void 0&&(J=this.length),D<0||O>F.length||W<0||J>this.length)throw new RangeError("out of range index");if(W>=J&&D>=O)return 0;if(W>=J)return-1;if(D>=O)return 1;if(D>>>=0,O>>>=0,W>>>=0,J>>>=0,this===F)return 0;let q=J-W,ke=O-D;const Ge=Math.min(q,ke),We=this.slice(W,J),Ze=F.slice(D,O);for(let Ne=0;Ne<Ge;++Ne)if(We[Ne]!==Ze[Ne]){q=We[Ne],ke=Ze[Ne];break}return q<ke?-1:ke<q?1:0};function b(L,F,D,O,W){if(L.length===0)return-1;if(typeof D=="string"?(O=D,D=0):D>2147483647?D=2147483647:D<-2147483648&&(D=-2147483648),D=+D,Ft(D)&&(D=W?0:L.length-1),D<0&&(D=L.length+D),D>=L.length){if(W)return-1;D=L.length-1}else if(D<0)if(W)D=0;else return-1;if(typeof F=="string"&&(F=o.from(F,O)),o.isBuffer(F))return F.length===0?-1:x(L,F,D,O,W);if(typeof F=="number")return F=F&255,typeof Uint8Array.prototype.indexOf=="function"?W?Uint8Array.prototype.indexOf.call(L,F,D):Uint8Array.prototype.lastIndexOf.call(L,F,D):x(L,[F],D,O,W);throw new TypeError("val must be string, number or Buffer")}function x(L,F,D,O,W){let J=1,q=L.length,ke=F.length;if(O!==void 0&&(O=String(O).toLowerCase(),O==="ucs2"||O==="ucs-2"||O==="utf16le"||O==="utf-16le")){if(L.length<2||F.length<2)return-1;J=2,q/=2,ke/=2,D/=2}function Ge(Ze,Ne){return J===1?Ze[Ne]:Ze.readUInt16BE(Ne*J)}let We;if(W){let Ze=-1;for(We=D;We<q;We++)if(Ge(L,We)===Ge(F,Ze===-1?0:We-Ze)){if(Ze===-1&&(Ze=We),We-Ze+1===ke)return Ze*J}else Ze!==-1&&(We-=We-Ze),Ze=-1}else for(D+ke>q&&(D=q-ke),We=D;We>=0;We--){let Ze=!0;for(let Ne=0;Ne<ke;Ne++)if(Ge(L,We+Ne)!==Ge(F,Ne)){Ze=!1;break}if(Ze)return We}return-1}o.prototype.includes=function(F,D,O){return this.indexOf(F,D,O)!==-1},o.prototype.indexOf=function(F,D,O){return b(this,F,D,O,!0)},o.prototype.lastIndexOf=function(F,D,O){return b(this,F,D,O,!1)};function y(L,F,D,O){D=Number(D)||0;const W=L.length-D;O?(O=Number(O),O>W&&(O=W)):O=W;const J=F.length;O>J/2&&(O=J/2);let q;for(q=0;q<O;++q){const ke=parseInt(F.substr(q*2,2),16);if(Ft(ke))return q;L[D+q]=ke}return q}function C(L,F,D,O){return bt(ge(F,L.length-D),L,D,O)}function B(L,F,D,O){return bt(Tt(F),L,D,O)}function T(L,F,D,O){return bt(Te(F),L,D,O)}function M(L,F,D,O){return bt(Re(F,L.length-D),L,D,O)}o.prototype.write=function(F,D,O,W){if(D===void 0)W="utf8",O=this.length,D=0;else if(O===void 0&&typeof D=="string")W=D,O=this.length,D=0;else if(isFinite(D))D=D>>>0,isFinite(O)?(O=O>>>0,W===void 0&&(W="utf8")):(W=O,O=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const J=this.length-D;if((O===void 0||O>J)&&(O=J),F.length>0&&(O<0||D<0)||D>this.length)throw new RangeError("Attempt to write outside buffer bounds");W||(W="utf8");let q=!1;for(;;)switch(W){case"hex":return y(this,F,D,O);case"utf8":case"utf-8":return C(this,F,D,O);case"ascii":case"latin1":case"binary":return B(this,F,D,O);case"base64":return T(this,F,D,O);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,F,D,O);default:if(q)throw new TypeError("Unknown encoding: "+W);W=(""+W).toLowerCase(),q=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function R(L,F,D){return F===0&&D===L.length?t.fromByteArray(L):t.fromByteArray(L.slice(F,D))}function I(L,F,D){D=Math.min(L.length,D);const O=[];let W=F;for(;W<D;){const J=L[W];let q=null,ke=J>239?4:J>223?3:J>191?2:1;if(W+ke<=D){let Ge,We,Ze,Ne;switch(ke){case 1:J<128&&(q=J);break;case 2:Ge=L[W+1],(Ge&192)===128&&(Ne=(J&31)<<6|Ge&63,Ne>127&&(q=Ne));break;case 3:Ge=L[W+1],We=L[W+2],(Ge&192)===128&&(We&192)===128&&(Ne=(J&15)<<12|(Ge&63)<<6|We&63,Ne>2047&&(Ne<55296||Ne>57343)&&(q=Ne));break;case 4:Ge=L[W+1],We=L[W+2],Ze=L[W+3],(Ge&192)===128&&(We&192)===128&&(Ze&192)===128&&(Ne=(J&15)<<18|(Ge&63)<<12|(We&63)<<6|Ze&63,Ne>65535&&Ne<1114112&&(q=Ne))}}q===null?(q=65533,ke=1):q>65535&&(q-=65536,O.push(q>>>10&1023|55296),q=56320|q&1023),O.push(q),W+=ke}return P(O)}const H=4096;function P(L){const F=L.length;if(F<=H)return String.fromCharCode.apply(String,L);let D="",O=0;for(;O<F;)D+=String.fromCharCode.apply(String,L.slice(O,O+=H));return D}function j(L,F,D){let O="";D=Math.min(L.length,D);for(let W=F;W<D;++W)O+=String.fromCharCode(L[W]&127);return O}function V(L,F,D){let O="";D=Math.min(L.length,D);for(let W=F;W<D;++W)O+=String.fromCharCode(L[W]);return O}function K(L,F,D){const O=L.length;(!F||F<0)&&(F=0),(!D||D<0||D>O)&&(D=O);let W="";for(let J=F;J<D;++J)W+=ln[L[J]];return W}function N(L,F,D){const O=L.slice(F,D);let W="";for(let J=0;J<O.length-1;J+=2)W+=String.fromCharCode(O[J]+O[J+1]*256);return W}o.prototype.slice=function(F,D){const O=this.length;F=~~F,D=D===void 0?O:~~D,F<0?(F+=O,F<0&&(F=0)):F>O&&(F=O),D<0?(D+=O,D<0&&(D=0)):D>O&&(D=O),D<F&&(D=F);const W=this.subarray(F,D);return Object.setPrototypeOf(W,o.prototype),W};function k(L,F,D){if(L%1!==0||L<0)throw new RangeError("offset is not uint");if(L+F>D)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(F,D,O){F=F>>>0,D=D>>>0,O||k(F,D,this.length);let W=this[F],J=1,q=0;for(;++q<D&&(J*=256);)W+=this[F+q]*J;return W},o.prototype.readUintBE=o.prototype.readUIntBE=function(F,D,O){F=F>>>0,D=D>>>0,O||k(F,D,this.length);let W=this[F+--D],J=1;for(;D>0&&(J*=256);)W+=this[F+--D]*J;return W},o.prototype.readUint8=o.prototype.readUInt8=function(F,D){return F=F>>>0,D||k(F,1,this.length),this[F]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(F,D){return F=F>>>0,D||k(F,2,this.length),this[F]|this[F+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(F,D){return F=F>>>0,D||k(F,2,this.length),this[F]<<8|this[F+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(F,D){return F=F>>>0,D||k(F,4,this.length),(this[F]|this[F+1]<<8|this[F+2]<<16)+this[F+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(F,D){return F=F>>>0,D||k(F,4,this.length),this[F]*16777216+(this[F+1]<<16|this[F+2]<<8|this[F+3])},o.prototype.readBigUInt64LE=re(function(F){F=F>>>0,ce(F,"offset");const D=this[F],O=this[F+7];(D===void 0||O===void 0)&&he(F,this.length-8);const W=D+this[++F]*2**8+this[++F]*2**16+this[++F]*2**24,J=this[++F]+this[++F]*2**8+this[++F]*2**16+O*2**24;return BigInt(W)+(BigInt(J)<<BigInt(32))}),o.prototype.readBigUInt64BE=re(function(F){F=F>>>0,ce(F,"offset");const D=this[F],O=this[F+7];(D===void 0||O===void 0)&&he(F,this.length-8);const W=D*2**24+this[++F]*2**16+this[++F]*2**8+this[++F],J=this[++F]*2**24+this[++F]*2**16+this[++F]*2**8+O;return(BigInt(W)<<BigInt(32))+BigInt(J)}),o.prototype.readIntLE=function(F,D,O){F=F>>>0,D=D>>>0,O||k(F,D,this.length);let W=this[F],J=1,q=0;for(;++q<D&&(J*=256);)W+=this[F+q]*J;return J*=128,W>=J&&(W-=Math.pow(2,8*D)),W},o.prototype.readIntBE=function(F,D,O){F=F>>>0,D=D>>>0,O||k(F,D,this.length);let W=D,J=1,q=this[F+--W];for(;W>0&&(J*=256);)q+=this[F+--W]*J;return J*=128,q>=J&&(q-=Math.pow(2,8*D)),q},o.prototype.readInt8=function(F,D){return F=F>>>0,D||k(F,1,this.length),this[F]&128?(255-this[F]+1)*-1:this[F]},o.prototype.readInt16LE=function(F,D){F=F>>>0,D||k(F,2,this.length);const O=this[F]|this[F+1]<<8;return O&32768?O|4294901760:O},o.prototype.readInt16BE=function(F,D){F=F>>>0,D||k(F,2,this.length);const O=this[F+1]|this[F]<<8;return O&32768?O|4294901760:O},o.prototype.readInt32LE=function(F,D){return F=F>>>0,D||k(F,4,this.length),this[F]|this[F+1]<<8|this[F+2]<<16|this[F+3]<<24},o.prototype.readInt32BE=function(F,D){return F=F>>>0,D||k(F,4,this.length),this[F]<<24|this[F+1]<<16|this[F+2]<<8|this[F+3]},o.prototype.readBigInt64LE=re(function(F){F=F>>>0,ce(F,"offset");const D=this[F],O=this[F+7];(D===void 0||O===void 0)&&he(F,this.length-8);const W=this[F+4]+this[F+5]*2**8+this[F+6]*2**16+(O<<24);return(BigInt(W)<<BigInt(32))+BigInt(D+this[++F]*2**8+this[++F]*2**16+this[++F]*2**24)}),o.prototype.readBigInt64BE=re(function(F){F=F>>>0,ce(F,"offset");const D=this[F],O=this[F+7];(D===void 0||O===void 0)&&he(F,this.length-8);const W=(D<<24)+this[++F]*2**16+this[++F]*2**8+this[++F];return(BigInt(W)<<BigInt(32))+BigInt(this[++F]*2**24+this[++F]*2**16+this[++F]*2**8+O)}),o.prototype.readFloatLE=function(F,D){return F=F>>>0,D||k(F,4,this.length),n.read(this,F,!0,23,4)},o.prototype.readFloatBE=function(F,D){return F=F>>>0,D||k(F,4,this.length),n.read(this,F,!1,23,4)},o.prototype.readDoubleLE=function(F,D){return F=F>>>0,D||k(F,8,this.length),n.read(this,F,!0,52,8)},o.prototype.readDoubleBE=function(F,D){return F=F>>>0,D||k(F,8,this.length),n.read(this,F,!1,52,8)};function $(L,F,D,O,W,J){if(!o.isBuffer(L))throw new TypeError('"buffer" argument must be a Buffer instance');if(F>W||F<J)throw new RangeError('"value" argument is out of bounds');if(D+O>L.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(F,D,O,W){if(F=+F,D=D>>>0,O=O>>>0,!W){const ke=Math.pow(2,8*O)-1;$(this,F,D,O,ke,0)}let J=1,q=0;for(this[D]=F&255;++q<O&&(J*=256);)this[D+q]=F/J&255;return D+O},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(F,D,O,W){if(F=+F,D=D>>>0,O=O>>>0,!W){const ke=Math.pow(2,8*O)-1;$(this,F,D,O,ke,0)}let J=O-1,q=1;for(this[D+J]=F&255;--J>=0&&(q*=256);)this[D+J]=F/q&255;return D+O},o.prototype.writeUint8=o.prototype.writeUInt8=function(F,D,O){return F=+F,D=D>>>0,O||$(this,F,D,1,255,0),this[D]=F&255,D+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(F,D,O){return F=+F,D=D>>>0,O||$(this,F,D,2,65535,0),this[D]=F&255,this[D+1]=F>>>8,D+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(F,D,O){return F=+F,D=D>>>0,O||$(this,F,D,2,65535,0),this[D]=F>>>8,this[D+1]=F&255,D+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(F,D,O){return F=+F,D=D>>>0,O||$(this,F,D,4,4294967295,0),this[D+3]=F>>>24,this[D+2]=F>>>16,this[D+1]=F>>>8,this[D]=F&255,D+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(F,D,O){return F=+F,D=D>>>0,O||$(this,F,D,4,4294967295,0),this[D]=F>>>24,this[D+1]=F>>>16,this[D+2]=F>>>8,this[D+3]=F&255,D+4};function z(L,F,D,O,W){ee(F,O,W,L,D,7);let J=Number(F&BigInt(4294967295));L[D++]=J,J=J>>8,L[D++]=J,J=J>>8,L[D++]=J,J=J>>8,L[D++]=J;let q=Number(F>>BigInt(32)&BigInt(4294967295));return L[D++]=q,q=q>>8,L[D++]=q,q=q>>8,L[D++]=q,q=q>>8,L[D++]=q,D}function U(L,F,D,O,W){ee(F,O,W,L,D,7);let J=Number(F&BigInt(4294967295));L[D+7]=J,J=J>>8,L[D+6]=J,J=J>>8,L[D+5]=J,J=J>>8,L[D+4]=J;let q=Number(F>>BigInt(32)&BigInt(4294967295));return L[D+3]=q,q=q>>8,L[D+2]=q,q=q>>8,L[D+1]=q,q=q>>8,L[D]=q,D+8}o.prototype.writeBigUInt64LE=re(function(F,D=0){return z(this,F,D,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=re(function(F,D=0){return U(this,F,D,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(F,D,O,W){if(F=+F,D=D>>>0,!W){const Ge=Math.pow(2,8*O-1);$(this,F,D,O,Ge-1,-Ge)}let J=0,q=1,ke=0;for(this[D]=F&255;++J<O&&(q*=256);)F<0&&ke===0&&this[D+J-1]!==0&&(ke=1),this[D+J]=(F/q>>0)-ke&255;return D+O},o.prototype.writeIntBE=function(F,D,O,W){if(F=+F,D=D>>>0,!W){const Ge=Math.pow(2,8*O-1);$(this,F,D,O,Ge-1,-Ge)}let J=O-1,q=1,ke=0;for(this[D+J]=F&255;--J>=0&&(q*=256);)F<0&&ke===0&&this[D+J+1]!==0&&(ke=1),this[D+J]=(F/q>>0)-ke&255;return D+O},o.prototype.writeInt8=function(F,D,O){return F=+F,D=D>>>0,O||$(this,F,D,1,127,-128),F<0&&(F=255+F+1),this[D]=F&255,D+1},o.prototype.writeInt16LE=function(F,D,O){return F=+F,D=D>>>0,O||$(this,F,D,2,32767,-32768),this[D]=F&255,this[D+1]=F>>>8,D+2},o.prototype.writeInt16BE=function(F,D,O){return F=+F,D=D>>>0,O||$(this,F,D,2,32767,-32768),this[D]=F>>>8,this[D+1]=F&255,D+2},o.prototype.writeInt32LE=function(F,D,O){return F=+F,D=D>>>0,O||$(this,F,D,4,2147483647,-2147483648),this[D]=F&255,this[D+1]=F>>>8,this[D+2]=F>>>16,this[D+3]=F>>>24,D+4},o.prototype.writeInt32BE=function(F,D,O){return F=+F,D=D>>>0,O||$(this,F,D,4,2147483647,-2147483648),F<0&&(F=4294967295+F+1),this[D]=F>>>24,this[D+1]=F>>>16,this[D+2]=F>>>8,this[D+3]=F&255,D+4},o.prototype.writeBigInt64LE=re(function(F,D=0){return z(this,F,D,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=re(function(F,D=0){return U(this,F,D,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function G(L,F,D,O,W,J){if(D+O>L.length)throw new RangeError("Index out of range");if(D<0)throw new RangeError("Index out of range")}function Q(L,F,D,O,W){return F=+F,D=D>>>0,W||G(L,F,D,4),n.write(L,F,D,O,23,4),D+4}o.prototype.writeFloatLE=function(F,D,O){return Q(this,F,D,!0,O)},o.prototype.writeFloatBE=function(F,D,O){return Q(this,F,D,!1,O)};function X(L,F,D,O,W){return F=+F,D=D>>>0,W||G(L,F,D,8),n.write(L,F,D,O,52,8),D+8}o.prototype.writeDoubleLE=function(F,D,O){return X(this,F,D,!0,O)},o.prototype.writeDoubleBE=function(F,D,O){return X(this,F,D,!1,O)},o.prototype.copy=function(F,D,O,W){if(!o.isBuffer(F))throw new TypeError("argument should be a Buffer");if(O||(O=0),!W&&W!==0&&(W=this.length),D>=F.length&&(D=F.length),D||(D=0),W>0&&W<O&&(W=O),W===O||F.length===0||this.length===0)return 0;if(D<0)throw new RangeError("targetStart out of bounds");if(O<0||O>=this.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("sourceEnd out of bounds");W>this.length&&(W=this.length),F.length-D<W-O&&(W=F.length-D+O);const J=W-O;return this===F&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(D,O,W):Uint8Array.prototype.set.call(F,this.subarray(O,W),D),J},o.prototype.fill=function(F,D,O,W){if(typeof F=="string"){if(typeof D=="string"?(W=D,D=0,O=this.length):typeof O=="string"&&(W=O,O=this.length),W!==void 0&&typeof W!="string")throw new TypeError("encoding must be a string");if(typeof W=="string"&&!o.isEncoding(W))throw new TypeError("Unknown encoding: "+W);if(F.length===1){const q=F.charCodeAt(0);(W==="utf8"&&q<128||W==="latin1")&&(F=q)}}else typeof F=="number"?F=F&255:typeof F=="boolean"&&(F=Number(F));if(D<0||this.length<D||this.length<O)throw new RangeError("Out of range index");if(O<=D)return this;D=D>>>0,O=O===void 0?this.length:O>>>0,F||(F=0);let J;if(typeof F=="number")for(J=D;J<O;++J)this[J]=F;else{const q=o.isBuffer(F)?F:o.from(F,W),ke=q.length;if(ke===0)throw new TypeError('The value "'+F+'" is invalid for argument "value"');for(J=0;J<O-D;++J)this[J+D]=q[J%ke]}return this};const te={};function le(L,F,D){te[L]=class extends D{constructor(){super(),Object.defineProperty(this,"message",{value:F.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${L}]`,this.stack,delete this.name}get code(){return L}set code(W){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:W,writable:!0})}toString(){return`${this.name} [${L}]: ${this.message}`}}}le("ERR_BUFFER_OUT_OF_BOUNDS",function(L){return L?`${L} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),le("ERR_INVALID_ARG_TYPE",function(L,F){return`The "${L}" argument must be of type number. Received type ${typeof F}`},TypeError),le("ERR_OUT_OF_RANGE",function(L,F,D){let O=`The value of "${L}" is out of range.`,W=D;return Number.isInteger(D)&&Math.abs(D)>2**32?W=ye(String(D)):typeof D=="bigint"&&(W=String(D),(D>BigInt(2)**BigInt(32)||D<-(BigInt(2)**BigInt(32)))&&(W=ye(W)),W+="n"),O+=` It must be ${F}. Received ${W}`,O},RangeError);function ye(L){let F="",D=L.length;const O=L[0]==="-"?1:0;for(;D>=O+4;D-=3)F=`_${L.slice(D-3,D)}${F}`;return`${L.slice(0,D)}${F}`}function ve(L,F,D){ce(F,"offset"),(L[F]===void 0||L[F+D]===void 0)&&he(F,L.length-(D+1))}function ee(L,F,D,O,W,J){if(L>D||L<F){const q=typeof F=="bigint"?"n":"";let ke;throw J>3?F===0||F===BigInt(0)?ke=`>= 0${q} and < 2${q} ** ${(J+1)*8}${q}`:ke=`>= -(2${q} ** ${(J+1)*8-1}${q}) and < 2 ** ${(J+1)*8-1}${q}`:ke=`>= ${F}${q} and <= ${D}${q}`,new te.ERR_OUT_OF_RANGE("value",ke,L)}ve(O,W,J)}function ce(L,F){if(typeof L!="number")throw new te.ERR_INVALID_ARG_TYPE(F,"number",L)}function he(L,F,D){throw Math.floor(L)!==L?(ce(L,D),new te.ERR_OUT_OF_RANGE(D||"offset","an integer",L)):F<0?new te.ERR_BUFFER_OUT_OF_BOUNDS:new te.ERR_OUT_OF_RANGE(D||"offset",`>= ${D?1:0} and <= ${F}`,L)}const je=/[^+/0-9A-Za-z-_]/g;function Ve(L){if(L=L.split("=")[0],L=L.trim().replace(je,""),L.length<2)return"";for(;L.length%4!==0;)L=L+"=";return L}function ge(L,F){F=F||1/0;let D;const O=L.length;let W=null;const J=[];for(let q=0;q<O;++q){if(D=L.charCodeAt(q),D>55295&&D<57344){if(!W){if(D>56319){(F-=3)>-1&&J.push(239,191,189);continue}else if(q+1===O){(F-=3)>-1&&J.push(239,191,189);continue}W=D;continue}if(D<56320){(F-=3)>-1&&J.push(239,191,189),W=D;continue}D=(W-55296<<10|D-56320)+65536}else W&&(F-=3)>-1&&J.push(239,191,189);if(W=null,D<128){if((F-=1)<0)break;J.push(D)}else if(D<2048){if((F-=2)<0)break;J.push(D>>6|192,D&63|128)}else if(D<65536){if((F-=3)<0)break;J.push(D>>12|224,D>>6&63|128,D&63|128)}else if(D<1114112){if((F-=4)<0)break;J.push(D>>18|240,D>>12&63|128,D>>6&63|128,D&63|128)}else throw new Error("Invalid code point")}return J}function Tt(L){const F=[];for(let D=0;D<L.length;++D)F.push(L.charCodeAt(D)&255);return F}function Re(L,F){let D,O,W;const J=[];for(let q=0;q<L.length&&!((F-=2)<0);++q)D=L.charCodeAt(q),O=D>>8,W=D%256,J.push(W),J.push(O);return J}function Te(L){return t.toByteArray(Ve(L))}function bt(L,F,D,O){let W;for(W=0;W<O&&!(W+D>=F.length||W>=L.length);++W)F[W+D]=L[W];return W}function ue(L,F){return L instanceof F||L!=null&&L.constructor!=null&&L.constructor.name!=null&&L.constructor.name===F.name}function Ft(L){return L!==L}const ln=function(){const L="0123456789abcdef",F=new Array(256);for(let D=0;D<16;++D){const O=D*16;for(let W=0;W<16;++W)F[O+W]=L[D]+L[W]}return F}();function re(L){return typeof BigInt=="undefined"?me:L}function me(){throw new Error("BigInt not supported")}})(ip);function sE(e){return Array.isArray?Array.isArray(e):Vo(e)==="[object Array]"}Et.isArray=sE;function oE(e){return typeof e=="boolean"}Et.isBoolean=oE;function aE(e){return e===null}Et.isNull=aE;function lE(e){return e==null}Et.isNullOrUndefined=lE;function cE(e){return typeof e=="number"}Et.isNumber=cE;function uE(e){return typeof e=="string"}Et.isString=uE;function hE(e){return typeof e=="symbol"}Et.isSymbol=hE;function fE(e){return e===void 0}Et.isUndefined=fE;function dE(e){return Vo(e)==="[object RegExp]"}Et.isRegExp=dE;function pE(e){return typeof e=="object"&&e!==null}Et.isObject=pE;function gE(e){return Vo(e)==="[object Date]"}Et.isDate=gE;function mE(e){return Vo(e)==="[object Error]"||e instanceof Error}Et.isError=mE;function vE(e){return typeof e=="function"}Et.isFunction=vE;function wE(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}Et.isPrimitive=wE;Et.isBuffer=ip.Buffer.isBuffer;function Vo(e){return Object.prototype.toString.call(e)}const sp=32,br=7,Rh=256,Ih=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9];let we;const Oh=e=>e<1e5?e<100?e<10?0:1:e<1e4?e<1e3?2:3:4:e<1e7?e<1e6?5:6:e<1e9?e<1e8?7:8:9;function Nh(e,t){if(e===t)return 0;if(~~e===e&&~~t===t){if(e===0||t===0)return e<t?-1:1;if(e<0||t<0){if(t>=0)return-1;if(e>=0)return 1;e=-e,t=-t}const r=Oh(e),s=Oh(t);let u=0;return r<s?(e*=Ih[s-r-1],t/=10,u=-1):r>s&&(t*=Ih[r-s-1],e/=10,u=1),e===t?u:e<t?-1:1}const n=String(e),i=String(t);return n===i?0:n<i?-1:1}function _E(e){let t=0;for(;e>=sp;)t|=e&1,e>>=1;return e+t}function Ph(e,t,n,i){let r=t+1;if(r===n)return 1;if(i(e[r++],e[t])<0){for(;r<n&&i(e[r],e[r-1])<0;)r++;zh(e,t,r),zh(we,t,r)}else for(;r<n&&i(e[r],e[r-1])>=0;)r++;return r-t}function zh(e,t,n){for(n--;t<n;){const i=e[t];e[t++]=e[n],e[n--]=i}}function Uh(e,t,n,i,r){for(i===t&&i++;i<n;i++){const s=e[i],u=we[i];let o=t,c=i;for(;o<c;){const f=o+c>>>1;r(s,e[f])<0?c=f:o=f+1}let a=i-o;switch(a){case 3:e[o+3]=e[o+2],we[o+3]=we[o+2];case 2:e[o+2]=e[o+1],we[o+2]=we[o+1];case 1:e[o+1]=e[o],we[o+1]=we[o];break;default:for(;a>0;)e[o+a]=e[o+a-1],we[o+a]=we[o+a-1],a--}e[o]=s,we[o]=u}}function Ta(e,t,n,i,r,s){let u=0,o=0,c=1;if(s(e,t[n+r])>0){for(o=i-r;c<o&&s(e,t[n+r+c])>0;)u=c,c=(c<<1)+1,c<=0&&(c=o);c>o&&(c=o),u+=r,c+=r}else{for(o=r+1;c<o&&s(e,t[n+r-c])<=0;)u=c,c=(c<<1)+1,c<=0&&(c=o);c>o&&(c=o);const a=u;u=r-c,c=r-a}for(u++;u<c;){const a=u+(c-u>>>1);s(e,t[n+a])>0?u=a+1:c=a}return c}function La(e,t,n,i,r,s){let u=0,o=0,c=1;if(s(e,t[n+r])<0){for(o=r+1;c<o&&s(e,t[n+r-c])<0;)u=c,c=(c<<1)+1,c<=0&&(c=o);c>o&&(c=o);const a=u;u=r-c,c=r-a}else{for(o=i-r;c<o&&s(e,t[n+r+c])>=0;)u=c,c=(c<<1)+1,c<=0&&(c=o);c>o&&(c=o),u+=r,c+=r}for(u++;u<c;){const a=u+(c-u>>>1);s(e,t[n+a])<0?c=a:u=a+1}return c}class AE{constructor(t,n){this.array=t,this.compare=n;const{length:i}=t;this.length=i,this.minGallop=br,this.tmpStorageLength=i<2*Rh?i>>>1:Rh,this.tmp=new Array(this.tmpStorageLength),this.tmpIndex=new Array(this.tmpStorageLength),this.stackLength=i<120?5:i<1542?10:i<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength),this.stackSize=0}pushRun(t,n){this.runStart[this.stackSize]=t,this.runLength[this.stackSize]=n,this.stackSize+=1}mergeRuns(){for(;this.stackSize>1;){let t=this.stackSize-2;if(t>=1&&this.runLength[t-1]<=this.runLength[t]+this.runLength[t+1]||t>=2&&this.runLength[t-2]<=this.runLength[t]+this.runLength[t-1])this.runLength[t-1]<this.runLength[t+1]&&t--;else if(this.runLength[t]>this.runLength[t+1])break;this.mergeAt(t)}}forceMergeRuns(){for(;this.stackSize>1;){let t=this.stackSize-2;t>0&&this.runLength[t-1]<this.runLength[t+1]&&t--,this.mergeAt(t)}}mergeAt(t){const{compare:n}=this,{array:i}=this;let r=this.runStart[t],s=this.runLength[t];const u=this.runStart[t+1];let o=this.runLength[t+1];this.runLength[t]=s+o,t===this.stackSize-3&&(this.runStart[t+1]=this.runStart[t+2],this.runLength[t+1]=this.runLength[t+2]),this.stackSize--;const c=La(i[u],i,r,s,0,n);r+=c,s-=c,s!==0&&(o=Ta(i[r+s-1],i,u,o,o-1,n),o!==0&&(s<=o?this.mergeLow(r,s,u,o):this.mergeHigh(r,s,u,o)))}mergeLow(t,n,i,r){const{compare:s}=this,{array:u}=this,{tmp:o}=this,{tmpIndex:c}=this;let a=0;for(a=0;a<n;a++)o[a]=u[t+a],c[a]=we[t+a];let f=0,l=i,h=t;if(u[h]=u[l],we[h]=we[l],h++,l++,--r===0){for(a=0;a<n;a++)u[h+a]=o[f+a],we[h+a]=c[f+a];return}if(n===1){for(a=0;a<r;a++)u[h+a]=u[l+a],we[h+a]=we[l+a];u[h+r]=o[f],we[h+r]=c[f];return}let{minGallop:d}=this;for(;;){let g=0,p=0,m=!1;do if(s(u[l],o[f])<0){if(u[h]=u[l],we[h]=we[l],h++,l++,p++,g=0,--r===0){m=!0;break}}else if(u[h]=o[f],we[h]=c[f],h++,f++,g++,p=0,--n===1){m=!0;break}while((g|p)<d);if(m)break;do{if(g=La(u[l],o,f,n,0,s),g!==0){for(a=0;a<g;a++)u[h+a]=o[f+a],we[h+a]=c[f+a];if(h+=g,f+=g,n-=g,n<=1){m=!0;break}}if(u[h]=u[l],we[h]=we[l],h++,l++,--r===0){m=!0;break}if(p=Ta(o[f],u,l,r,0,s),p!==0){for(a=0;a<p;a++)u[h+a]=u[l+a],we[h+a]=we[l+a];if(h+=p,l+=p,r-=p,r===0){m=!0;break}}if(u[h]=o[f],we[h]=c[f],h++,f++,--n===1){m=!0;break}d--}while(g>=br||p>=br);if(m)break;d<0&&(d=0),d+=2}if(this.minGallop=d,d<1&&(this.minGallop=1),n===1){for(a=0;a<r;a++)u[h+a]=u[l+a],we[h+a]=we[l+a];u[h+r]=o[f],we[h+r]=c[f]}else{if(n===0)throw new Error("mergeLow preconditions were not respected");for(a=0;a<n;a++)u[h+a]=o[f+a],we[h+a]=c[f+a]}}mergeHigh(t,n,i,r){const{compare:s}=this,{array:u}=this,{tmp:o}=this,{tmpIndex:c}=this;let a=0;for(a=0;a<r;a++)o[a]=u[i+a],c[a]=we[i+a];let f=t+n-1,l=r-1,h=i+r-1,d=0,g=0;if(u[h]=u[f],we[h]=we[f],h--,f--,--n===0){for(d=h-(r-1),a=0;a<r;a++)u[d+a]=o[a],we[d+a]=c[a];return}if(r===1){for(h-=n,f-=n,g=h+1,d=f+1,a=n-1;a>=0;a--)u[g+a]=u[d+a],we[g+a]=we[d+a];u[h]=o[l],we[h]=c[l];return}let{minGallop:p}=this;for(;;){let m=0,w=0,v=!1;do if(s(o[l],u[f])<0){if(u[h]=u[f],we[h]=we[f],h--,f--,m++,w=0,--n===0){v=!0;break}}else if(u[h]=o[l],we[h]=c[l],h--,l--,w++,m=0,--r===1){v=!0;break}while((m|w)<p);if(v)break;do{if(m=n-La(o[l],u,t,n,n-1,s),m!==0){for(h-=m,f-=m,n-=m,g=h+1,d=f+1,a=m-1;a>=0;a--)u[g+a]=u[d+a],we[g+a]=we[d+a];if(n===0){v=!0;break}}if(u[h]=o[l],we[h]=c[l],h--,l--,--r===1){v=!0;break}if(w=r-Ta(u[f],o,0,r,r-1,s),w!==0){for(h-=w,l-=w,r-=w,g=h+1,d=l+1,a=0;a<w;a++)u[g+a]=o[d+a],we[g+a]=c[d+a];if(r<=1){v=!0;break}}if(u[h]=u[f],we[h]=we[f],h--,f--,--n===0){v=!0;break}p--}while(m>=br||w>=br);if(v)break;p<0&&(p=0),p+=2}if(this.minGallop=p,p<1&&(this.minGallop=1),r===1){for(h-=n,f-=n,g=h+1,d=f+1,a=n-1;a>=0;a--)u[g+a]=u[d+a],we[g+a]=we[d+a];u[h]=o[l],we[h]=c[l]}else{if(r===0)throw new Error("mergeHigh preconditions were not respected");for(d=h-(r-1),a=0;a<r;a++)u[d+a]=o[a],we[d+a]=c[a]}}}function yE(e,t,n,i){if(!Array.isArray(e))throw new TypeError(`The "array" argument must be an array. Received ${e}`);we=[];const{length:r}=e;let s=0;for(;s<r;)we[s]=s++;t?typeof t!="function"&&(i=n,n=t,t=Nh):t=Nh,n||(n=0),i||(i=r);let u=i-n;if(u<2)return we;let o=0;if(u<sp)return o=Ph(e,n,i,t),Uh(e,n,i,n+o,t),we;const c=new AE(e,t),a=_E(u);do{if(o=Ph(e,n,i,t),o<a){let f=u;f>a&&(f=a),Uh(e,n,n+f,n+o,t),o=f}c.pushRun(n,o),c.mergeRuns(),u-=o,n+=o}while(u!==0);return c.forceMergeRuns(),we}var EE={sort:yE};const bE=Object.prototype.hasOwnProperty;var xE=(e,t)=>bE.call(e,t);const oc=xE,{isObject:Hh,isArray:CE}=Et,ac="before",op="after-prop",ap="after-colon",lp="after-value",cp="after",up="before-all",hp="after-all",FE="[",SE="]",DE="{",kE="}",BE=",",TE="",LE="-",lc=[ac,op,ap,lp,cp],$E=[ac,up,hp].map(Symbol.for),fp=":",jh=void 0,as=(e,t)=>Symbol.for(e+fp+t),Go=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Cl=(e,t,n,i,r,s)=>{const u=as(r,i);if(!oc(t,u))return;const o=n===i?u:as(r,n);Go(e,o,t[u]),s&&delete t[u]},dp=(e,t,n,i,r)=>{lc.forEach(s=>{Cl(e,t,n,i,s,r)})},ME=(e,t,n)=>{t!==n&&lc.forEach(i=>{const r=as(i,n);if(!oc(e,r)){Cl(e,e,n,t,i,!0);return}const s=e[r];delete e[r],Cl(e,e,n,t,i,!0),Go(e,as(i,t),s)})},$a=(e,t)=>{$E.forEach(n=>{const i=t[n];i&&Go(e,n,i)})},RE=(e,t,n)=>(n.forEach(i=>{!oc(t,i)||(e[i]=t[i],dp(e,t,i,i))}),e);var Ko={SYMBOL_PREFIXES:lc,PREFIX_BEFORE:ac,PREFIX_AFTER_PROP:op,PREFIX_AFTER_COLON:ap,PREFIX_AFTER_VALUE:lp,PREFIX_AFTER:cp,PREFIX_BEFORE_ALL:up,PREFIX_AFTER_ALL:hp,BRACKET_OPEN:FE,BRACKET_CLOSE:SE,CURLY_BRACKET_OPEN:DE,CURLY_BRACKET_CLOSE:kE,COLON:fp,COMMA:BE,MINUS:LE,EMPTY:TE,UNDEFINED:jh,symbol:as,define:Go,copy_comments:dp,swap_comments:ME,assign_non_prop_comments:$a,assign(e,t,n){if(!Hh(e))throw new TypeError("Cannot convert undefined or null to object");if(!Hh(t))return e;if(n===jh)n=Object.keys(t),$a(e,t);else if(CE(n))n.length===0&&$a(e,t);else throw new TypeError("keys must be array or undefined");return RE(e,t,n)}};const{isArray:IE}=Et,{sort:OE}=EE,{SYMBOL_PREFIXES:NE,UNDEFINED:Wh,symbol:PE,copy_comments:zE,swap_comments:pp}=Ko,UE=e=>{const{length:t}=e;let n=0;const i=t/2;for(;n<i;n++)pp(e,n,t-n-1)},Vh=(e,t,n,i,r)=>{zE(e,t,n+i,n,r)},zi=(e,t,n,i,r,s)=>{if(r>0){let o=i;for(;o-- >0;)Vh(e,t,n+o,r,s);return}let u=0;for(;u<i;){const o=u++;Vh(e,t,n+o,r,s)}},Gh=(e,t)=>{NE.forEach(n=>{const i=PE(n,t);delete e[i]})},HE=(e,t)=>{let n=t;for(;n in e;)n=e[n];return n};class wo extends Array{splice(...t){const{length:n}=this,i=super.splice(...t);let[r,s,...u]=t;r<0&&(r+=n),arguments.length===1?s=n-r:s=Math.min(n-r,s);const{length:o}=u,c=o-s,a=r+s,f=n-a;return zi(this,this,a,f,c,!0),i}slice(...t){const{length:n}=this,i=super.slice(...t);if(!i.length)return new wo;let[r,s]=t;return s===Wh?s=n:s<0&&(s+=n),r<0?r+=n:r===Wh&&(r=0),zi(i,this,r,s-r,-r),i}unshift(...t){const{length:n}=this,i=super.unshift(...t),{length:r}=t;return r>0&&zi(this,this,0,n,r,!0),i}shift(){const t=super.shift(),{length:n}=this;return Gh(this,0),zi(this,this,1,n,-1,!0),t}reverse(){return super.reverse(),UE(this),this}pop(){const t=super.pop();return Gh(this,this.length),t}concat(...t){let{length:n}=this;const i=super.concat(...t);return t.length&&(zi(i,this,0,this.length,0),t.forEach(r=>{const s=n;n+=IE(r)?r.length:1,r instanceof wo&&zi(i,r,0,r.length,s)})),i}sort(...t){const n=OE(this,...t.slice(0,1)),i=Object.create(null);return n.forEach((r,s)=>{if(r===s)return;const u=HE(i,r);u!==s&&(i[s]=u,pp(this,s,u))}),this}}var gp={CommentArray:wo};const jE=np.exports,{CommentArray:WE}=gp,{PREFIX_BEFORE:_o,PREFIX_AFTER_PROP:VE,PREFIX_AFTER_COLON:GE,PREFIX_AFTER_VALUE:mp,PREFIX_AFTER:cc,PREFIX_BEFORE_ALL:KE,PREFIX_AFTER_ALL:XE,BRACKET_OPEN:JE,BRACKET_CLOSE:Kh,CURLY_BRACKET_OPEN:YE,CURLY_BRACKET_CLOSE:Xh,COLON:vp,COMMA:wp,MINUS:Jh,EMPTY:ZE,UNDEFINED:Xo,define:uc,assign_non_prop_comments:qE}=Ko,_p=e=>jE.tokenize(e,{comment:!0,loc:!0}),hc=[];let li=null,vn=null;const fc=[];let ci,Ap=!1,yp=!1,ls=null,cs=null,St=null,Ep,Ao=null;const bp=()=>{fc.length=hc.length=0,cs=null,ci=Xo},QE=()=>{bp(),ls.length=0,vn=li=ls=cs=St=Ao=null},dc=e=>Symbol.for(ci!==Xo?e+vp+ci:e),pc=(e,t)=>Ao?Ao(e,t):t,xp=()=>{const e=new SyntaxError(`Unexpected token ${St.value.slice(0,1)}`);throw Object.assign(e,St.loc.start),e},Cp=()=>{const e=new SyntaxError("Unexpected end of JSON input");throw Object.assign(e,cs?cs.loc.end:{line:1,column:0}),e},Gt=()=>{const e=ls[++Ep];yp=St&&e&&St.loc.end.line===e.loc.start.line||!1,cs=St,St=e},Fl=()=>(St||Cp(),St.type==="Punctuator"?St.value:St.type),Fi=e=>Fl()===e,eo=e=>{Fi(e)||xp()},gc=e=>{hc.push(li),li=e},mc=()=>{li=hc.pop()},Fp=()=>{if(!vn)return;const e=[];for(const n of vn)if(n.inline)e.push(n);else break;const{length:t}=e;!t||(t===vn.length?vn=null:vn.splice(0,t),uc(li,dc(cc),e))},Zn=e=>{!vn||(uc(li,dc(e),vn),vn=null)},wn=e=>{const t=[];for(;St&&(Fi("LineComment")||Fi("BlockComment"));){const n=tt(Ce({},St),{inline:yp});t.push(n),Gt()}if(!Ap&&!!t.length){if(e){uc(li,dc(e),t);return}vn=t}},yo=(e,t)=>{t&&fc.push(ci),ci=e},Sp=()=>{ci=fc.pop()},eb=()=>{const e={};gc(e),yo(Xo,!0);let t=!1,n;for(wn();!Fi(Xh)&&!(t&&(Zn(mp),eo(wp),Gt(),wn(),Fp(),Fi(Xh)));)t=!0,eo("String"),n=JSON.parse(St.value),yo(n),Zn(_o),Gt(),wn(VE),eo(vp),Gt(),wn(GE),e[n]=pc(n,vc()),wn();return t&&Zn(cc),Gt(),ci=void 0,t||Zn(_o),mc(),Sp(),e},tb=()=>{const e=new WE;gc(e),yo(Xo,!0);let t=!1,n=0;for(wn();!Fi(Kh)&&!(t&&(Zn(mp),eo(wp),Gt(),wn(),Fp(),Fi(Kh)));)t=!0,yo(n),Zn(_o),e[n]=pc(n,vc()),n++,wn();return t&&Zn(cc),Gt(),ci=void 0,t||Zn(_o),mc(),Sp(),e};function vc(){let e=Fl();if(e===YE)return Gt(),eb();if(e===JE)return Gt(),tb();let t=ZE;e===Jh&&(Gt(),e=Fl(),t=Jh);let n;switch(e){case"String":case"Boolean":case"Null":case"Numeric":return n=St.value,Gt(),JSON.parse(t+n)}}const nb=e=>Object(e)===e,ib=(e,t,n)=>{bp(),ls=_p(e),Ao=t,Ap=n,ls.length||Cp(),Ep=-1,Gt(),gc({}),wn(KE);let i=vc();return wn(XE),St&&xp(),!n&&i!==null&&(nb(i)||(i=new Object(i)),qE(i,li)),mc(),i=pc("",i),QE(),i};var rb={parse:ib,tokenize:_p};/*!
|
|
* repeat-string <https://github.com/jonschlinkert/repeat-string>
|
|
*
|
|
* Copyright (c) 2014-2015, Jon Schlinkert.
|
|
* Licensed under the MIT License.
|
|
*/var Cn="",Ma,sb=ob;function ob(e,t){if(typeof e!="string")throw new TypeError("expected a string");if(t===1)return e;if(t===2)return e+e;var n=e.length*t;if(Ma!==e||typeof Ma=="undefined")Ma=e,Cn="";else if(Cn.length>=n)return Cn.substr(0,n);for(;n>Cn.length&&t>1;)t&1&&(Cn+=e),t>>=1,e+=e;return Cn+=e,Cn=Cn.substr(0,n),Cn}const{isArray:wc,isObject:Dp,isFunction:Sl,isNumber:ab,isString:lb}=Et,cb=sb,{PREFIX_BEFORE_ALL:ub,PREFIX_BEFORE:kp,PREFIX_AFTER_PROP:hb,PREFIX_AFTER_COLON:fb,PREFIX_AFTER_VALUE:db,PREFIX_AFTER:_c,PREFIX_AFTER_ALL:pb,BRACKET_OPEN:gb,BRACKET_CLOSE:mb,CURLY_BRACKET_OPEN:vb,CURLY_BRACKET_CLOSE:wb,COLON:_b,COMMA:Bp,EMPTY:Ht,UNDEFINED:Ab}=Ko,Ra=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,Ac=" ",wi=`
|
|
`,Tp="null",Lp=e=>`${kp}:${e}`,yb=e=>`${hb}:${e}`,Eb=e=>`${fb}:${e}`,$p=e=>`${db}:${e}`,Mp=e=>`${_c}:${e}`,bb={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},xb=e=>(Ra.lastIndex=0,Ra.test(e)?e.replace(Ra,t=>{const n=bb[t];return typeof n=="string"?n:t}):e),Rp=e=>`"${xb(e)}"`,Cb=(e,t)=>t?`//${e}`:`/*${e}*/`,zt=(e,t,n,i)=>{const r=e[Symbol.for(t)];if(!r||!r.length)return Ht;let s=!1;const u=r.reduce((o,{inline:c,type:a,value:f})=>{const l=c?Ac:wi+n;return s=a==="LineComment",o+l+Cb(f,s)},Ht);return i||s?u+wi+n:u};let hr=null,Fs=Ht;const Fb=()=>{hr=null,Fs=Ht},us=(e,t,n)=>e?t?e+t.trim()+wi+n:e.trimRight()+wi+n:t?t.trimRight()+wi+n:Ht,Ip=(e,t,n)=>{const i=zt(t,kp,n+Fs,!0);return us(i,e,n)},Sb=(e,t)=>{const n=t+Fs,{length:i}=e;let r=Ht,s=Ht;for(let u=0;u<i;u++)u!==0&&(r+=Bp),r+=us(s,zt(e,Lp(u),n),n)||wi+n,r+=yc(u,e,n)||Tp,r+=zt(e,$p(u),n),s=zt(e,Mp(u),n);return r+=us(s,zt(e,_c,n),n),gb+Ip(r,e,t)+mb},Db=(e,t)=>{if(!e)return"null";const n=t+Fs;let i=Ht,r=Ht,s=!0;const u=wc(hr)?hr:Object.keys(e),o=c=>{const a=yc(c,e,n);if(a===Ab)return;s||(i+=Bp),s=!1,i+=us(r,zt(e,Lp(c),n),n)||wi+n,i+=Rp(c)+zt(e,yb(c),n)+_b+zt(e,Eb(c),n)+Ac+a+zt(e,$p(c),n),r=zt(e,Mp(c),n)};return u.forEach(o),i+=us(r,zt(e,_c,n),n),vb+Ip(i,e,t)+wb};function yc(e,t,n){let i=t[e];switch(Dp(i)&&Sl(i.toJSON)&&(i=i.toJSON(e)),Sl(hr)&&(i=hr.call(t,e,i)),typeof i){case"string":return Rp(i);case"number":return Number.isFinite(i)?String(i):Tp;case"boolean":case"null":return String(i);case"object":return wc(i)?Sb(i,n):Db(i,n)}}const kb=e=>lb(e)?e:ab(e)?cb(Ac,e):Ht,{toString:Bb}=Object.prototype,Tb=["[object Number]","[object String]","[object Boolean]"],Lb=e=>{if(typeof e!="object")return!1;const t=Bb.call(e);return Tb.includes(t)};var $b=(e,t,n)=>{const i=kb(n);if(!i)return JSON.stringify(e,t);!Sl(t)&&!wc(t)&&(t=null),hr=t,Fs=i;const r=Lb(e)?JSON.stringify(e):yc("",{"":e},Ht);return Fb(),Dp(e)?zt(e,ub,Ht).trimLeft()+r+zt(e,pb,Ht).trimRight():r};const{parse:Mb,tokenize:Rb}=rb,Ib=$b,{CommentArray:Ob}=gp,{assign:Nb}=Ko;var Yh={parse:Mb,stringify:Ib,tokenize:Rb,CommentArray:Ob,assign:Nb};function to(e,t){return e.schema.hook(Pb,new ae.ModelPath(e),e.data,{blockStates:t})}const Pb={base({},e,t){return t},choice({switchNode:e},t,n,i){return e.hook(this,t,n,i)},list({children:e},t,n,i){if(!Array.isArray(n))return n;const r=n.map((s,u)=>e.hook(this,t.push(u),s.node,i));for(const s of Object.getOwnPropertySymbols(n))r[s]=n[s];return r},map({children:e,config:t},n,i,r){var o,c;if(i===void 0)return;const s=((o=t.validation)==null?void 0:o.validator)==="block_state_map"?(c=r.blockStates)==null?void 0:c[ae.relativePath(n,t.validation.params.id).get()]:null,u={};Object.keys(i).forEach(a=>{var f;s&&!Object.keys((f=s.properties)!=null?f:{}).includes(a)||(u[a]=e.hook(this,n.push(a),i[a],r))});for(const a of Object.getOwnPropertySymbols(i))u[a]=i[a];return u},object({getActiveFields:e},t,n,i){if(n==null||typeof n!="object")return n;const r={},s=e(t);Object.keys(s).filter(u=>s[u].enabled(t)).forEach(u=>{const o=s[u].hook(this,t.push(u),n[u],i);o!=null&&(r[u]=o)});for(const u of Object.getOwnPropertySymbols(n))r[u]=n[u];return r}},Ia={"2_spaces":2,"4_spaces":4,tabs:" ",minified:void 0},Oa={json:{parse:Yh.parse,stringify:(e,t)=>Yh.stringify(e,null,t)+`
|
|
`},yaml:{parse:Ya.load,stringify:(e,t)=>Ya.dump(e,{flowLevel:t===void 0?0:-1,indent:typeof t=="string"?4:t})}};function zb({name:e,model:t,blockStates:n,doCopy:i,doDownload:r,doImport:s,copySuccess:u,onError:o}){const{locale:c}=rt(),[a,f]=oe(_t.getIndent()),[l,h]=oe(_t.getFormat()),[d,g]=oe(_t.getHighlighting()),p=Xe(null),m=Xe(),w=Xe(),v=Xe(),A=Xe(),_=At((y,C)=>{const B=to(y,C);return Oa[l].stringify(B,Ia[a])},[a,l]);xe(()=>{m.current=()=>{if(!(!t||!n))try{const y=_(t,n);A.current.setValue(y)}catch(y){y instanceof Error?(y.message=`Error getting JSON output: ${y.message}`,o(y)):o(`Error getting JSON output: ${Xt(y)}`),console.error(y),A.current.setValue("")}},w.current=()=>{const y=A.current.getValue();if(y.length!==0)try{const C=Oa[l].parse(y);t==null||t.reset(ae.DataModel.wrapLists(C),!1)}catch(C){C instanceof Error?(C.message=`Error importing: ${C.message}`,o(C)):o(`Error importing: ${Xt(C)}`),console.error(C)}}},[t,n,a,l,d]),xe(()=>{if(d){const y=Y2.edit("editor");y.setOptions({fontSize:14,showFoldWidgets:!1,highlightSelectedWord:!1}),y.$blockScrolling=1/0,y.on("blur",C=>w.current(C)),y.getSession().setMode("ace/mode/json"),A.current={getValue(){return y.getSession().getValue()},setValue(C){y.getSession().setValue(C)},configure(C,B){y.setOption("useSoftTabs",C!=="tabs"),y.setOption("tabSize",C==="tabs"?4:Ia[C]),y.getSession().setMode(`ace/mode/${B}`)},select(){y.selectAll()}}}else A.current={getValue(){return v.current.value},setValue(y){v.current.value=y},configure(){},select(){}}},[d]),Mo(t,()=>{m.current()}),xe(()=>{t&&m.current()},[t]),xe(()=>{A.current.configure(a,l),m.current()},[a,l,d]),xe(()=>{i&&t&&n&&navigator.clipboard.writeText(_(t,n)).then(()=>{u()})},[i]),xe(()=>{if(r&&t&&n&&p.current){const y=encodeURIComponent(_(t,n));p.current.setAttribute("href",`data:text/json;charset=utf-8,${y}`),p.current.setAttribute("download",`${e}.${l}`),p.current.click()}},[r]),xe(()=>{s&&A.current&&(A.current.setValue(""),A.current.select())},[s]);const E=y=>{_t.setIndent(y),f(y)},b=y=>{_t.setFormat(y),h(y)},x=y=>{_t.setHighlighting(y),g(y)};return S(De,null,S("div",{class:"controls source-controls"},S($t,{icon:"gear",tooltip:c("output_settings"),"data-cy":"source-controls"},Object.entries(Ia).map(([y])=>S(Ee,{label:c(`indentation.${y}`),active:a===y,onClick:()=>E(y)})),S("hr",null),Object.keys(Oa).map(y=>S(Ee,{label:c(`format.${y}`),active:l===y,onClick:()=>b(y)})),S("hr",null),S(Ee,{icon:d?"square_fill":"square",label:c("highlighting"),onClick:()=>x(!d)}))),d?S("pre",{id:"editor",class:"source"}):S("textarea",{ref:v,class:"source",spellcheck:!1,autocorrect:"off",onBlur:w.current}),S("a",{ref:p,style:"display: none;"}))}function Op(e,t){for(var n in t)e[n]=t[n];return e}function Dl(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var i in t)if(i!=="__source"&&e[i]!==t[i])return!0;return!1}function kl(e){this.props=e}function Np(e,t){function n(r){var s=this.props.ref,u=s==r.ref;return!u&&s&&(s.call?s(null):s.current=null),t?!t(this.props,r)||!u:Dl(this.props,r)}function i(r){return this.shouldComponentUpdate=n,S(e,r)}return i.displayName="Memo("+(e.displayName||e.name)+")",i.prototype.isReactComponent=!0,i.__f=!0,i}(kl.prototype=new nn).isPureReactComponent=!0,kl.prototype.shouldComponentUpdate=function(e,t){return Dl(this.props,e)||Dl(this.state,t)};var Zh=_e.__b;_e.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Zh&&Zh(e)};var Ub=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Hb(e){function t(n,i){var r=Op({},n);return delete r.ref,e(r,(i=n.ref||i)&&(typeof i!="object"||"current"in i)?i:null)}return t.$$typeof=Ub,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var qh=function(e,t){return e==null?null:rn(rn(e).map(t))},jb={map:qh,forEach:qh,count:function(e){return e?rn(e).length:0},only:function(e){var t=rn(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:rn},Wb=_e.__e;_e.__e=function(e,t,n){if(e.then){for(var i,r=t;r=r.__;)if((i=r.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Wb(e,t,n)};var Qh=_e.unmount;function no(){this.__u=0,this.t=null,this.__b=null}function Pp(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function Vb(e){var t,n,i;function r(s){if(t||(t=e()).then(function(u){n=u.default||u},function(u){i=u}),i)throw i;if(!n)throw t;return S(n,s)}return r.displayName="Lazy",r.__f=!0,r}function Br(){this.u=null,this.o=null}_e.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Qh&&Qh(e)},(no.prototype=new nn).__c=function(e,t){var n=t.__c,i=this;i.t==null&&(i.t=[]),i.t.push(n);var r=Pp(i.__v),s=!1,u=function(){s||(s=!0,n.__R=null,r?r(o):o())};n.__R=u;var o=function(){if(!--i.__u){if(i.state.__e){var a=i.state.__e;i.__v.__k[0]=function l(h,d,g){return h&&(h.__v=null,h.__k=h.__k&&h.__k.map(function(p){return l(p,d,g)}),h.__c&&h.__c.__P===d&&(h.__e&&g.insertBefore(h.__e,h.__d),h.__c.__e=!0,h.__c.__P=g)),h}(a,a.__c.__P,a.__c.__O)}var f;for(i.setState({__e:i.__b=null});f=i.t.pop();)f.forceUpdate()}},c=t.__h===!0;i.__u++||c||i.setState({__e:i.__b=i.__v.__k[0]}),e.then(u,u)},no.prototype.componentWillUnmount=function(){this.t=[]},no.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=function s(u,o,c){return u&&(u.__c&&u.__c.__H&&(u.__c.__H.__.forEach(function(a){typeof a.__c=="function"&&a.__c()}),u.__c.__H=null),(u=Op({},u)).__c!=null&&(u.__c.__P===c&&(u.__c.__P=o),u.__c=null),u.__k=u.__k&&u.__k.map(function(a){return s(a,o,c)})),u}(this.__b,n,i.__O=i.__P)}this.__b=null}var r=t.__e&&S(De,null,e.fallback);return r&&(r.__h=null),[S(De,null,t.__e?null:e.children),r]};var ef=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Gb(e){return this.getChildContext=function(){return e.context},e.children}function Kb(e){var t=this,n=e.i;t.componentWillUnmount=function(){Qi(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(i){this.childNodes.push(i),t.i.appendChild(i)},insertBefore:function(i,r){this.childNodes.push(i),t.i.appendChild(i)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),t.i.removeChild(i)}}),Qi(S(Gb,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Xb(e,t){return S(Kb,{__v:e,i:t})}(Br.prototype=new nn).__e=function(e){var t=this,n=Pp(t.__v),i=t.o.get(e);return i[0]++,function(r){var s=function(){t.props.revealOrder?(i.push(r),ef(t,e,i)):r()};n?n(s):s()}},Br.prototype.render=function(e){this.u=null,this.o=new Map;var t=rn(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},Br.prototype.componentDidUpdate=Br.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){ef(e,n,t)})};var zp=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,Jb=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Yb=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Zb(e,t,n){return t.__k==null&&(t.textContent=""),Qi(e,t),typeof n=="function"&&n(),e?e.__c:null}function qb(e,t,n){return zf(e,t),typeof n=="function"&&n(),e?e.__c:null}nn.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(nn.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var tf=_e.event;function Qb(){}function ex(){return this.cancelBubble}function tx(){return this.defaultPrevented}_e.event=function(e){return tf&&(e=tf(e)),e.persist=Qb,e.isPropagationStopped=ex,e.isDefaultPrevented=tx,e.nativeEvent=e};var Up,nf={configurable:!0,get:function(){return this.class}},rf=_e.vnode;_e.vnode=function(e){var t=e.type,n=e.props,i=n;if(typeof t=="string"){for(var r in i={},n){var s=n[r];r==="value"&&"defaultValue"in n&&s==null||(r==="defaultValue"&&"value"in n&&n.value==null?r="value":r==="download"&&s===!0?s="":/ondoubleclick/i.test(r)?r="ondblclick":/^onchange(textarea|input)/i.test(r+t)&&!Yb(n.type)?r="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(r)?r=r.toLowerCase():Jb.test(r)?r=r.replace(/[A-Z0-9]/,"-$&").toLowerCase():s===null&&(s=void 0),i[r]=s)}t=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=rn(n.children).forEach(function(u){u.props.selected=i.value.indexOf(u.props.value)!=-1})),t=="select"&&i.defaultValue!=null&&(i.value=rn(n.children).forEach(function(u){u.props.selected=i.multiple?i.defaultValue.indexOf(u.props.value)!=-1:i.defaultValue==u.props.value})),e.props=i}t&&n.class!=n.className&&(nf.enumerable="className"in n,n.className!=null&&(i.class=n.className),Object.defineProperty(i,"className",nf)),e.$$typeof=zp,rf&&rf(e)};var sf=_e.__r;_e.__r=function(e){sf&&sf(e),Up=e.__c};var nx={ReactCurrentDispatcher:{current:{readContext:function(e){return Up.__n[e.__c].props.value}}}};typeof performance=="object"&&typeof performance.now=="function"&&performance.now.bind(performance);function ix(e){return S.bind(null,e)}function Hp(e){return!!e&&e.$$typeof===zp}function rx(e){return Hp(e)?Uf.apply(null,arguments):e}function sx(e){return!!e.__k&&(Qi(null,e),!0)}function ox(e){return e&&(e.base||e.nodeType===1&&e)||null}var ax=function(e,t){return e(t)},Bl={useState:oe,useReducer:Xf,useEffect:xe,useLayoutEffect:Jf,useRef:Xe,useImperativeHandle:Ng,useMemo:Qe,useCallback:At,useContext:pr,useDebugValue:Pg,version:"16.8.0",Children:jb,render:Zb,hydrate:qb,unmountComponentAtNode:sx,createPortal:Xb,createElement:S,createContext:fr,createFactory:ix,cloneElement:rx,createRef:yg,Fragment:De,isValidElement:Hp,findDOMNode:ox,Component:nn,PureComponent:kl,memo:Np,forwardRef:Hb,unstable_batchedUpdates:ax,StrictMode:De,Suspense:no,SuspenseList:Br,lazy:Vb,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:nx};class jp extends ae.DataModel{constructor(t,n,i,r){super(t),this.mapper=n,this.getter=i,this.setter=r}map(t){return this.mapper(t)}get(t){return this.getter(t)}set(t,n,i){return this.setter(t,n,i)}}const lx=["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"],cx=["number_provider.type","score_provider.type","nbt_provider.type","int_provider.type","float_provider.type","height_provider.type"],ux=["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"],hx=["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"],fx=["function.set_nbt.tag","advancement.display.icon.nbt","text_component_object.nbt","entity.nbt","block.nbt","item.nbt"],dx=["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"],of=["noise_settings.surface_rule","noise_settings.noise.terrain_shaper"],px=["density_function.argument","density_function.argument1","density_function.argument2","density_function.input","density_function.when_in_range","density_function.when_out_of_range"],gx=e=>He.generators.find(t=>t.id===e.replace(/^\$/,"")),mx=new ae.DataModel(ae.MapNode(ae.StringNode(),ae.StringNode()),{historyMax:0});function vx({model:e,lang:t,version:n,blockStates:i}){var c;const r=new ae.ModelPath(e),[s,u,o]=e.schema.hook(Wp,r,$o(e.data),t,n,i,{});return(c=u==null?void 0:u.props)!=null&&c.children.some(a=>a)?S("div",{class:`node ${e.schema.type(r)}-node`,"data-category":e.schema.category(r)},S("div",{class:"node-header"},s,u),S("div",{class:"node-body"},o)):o}const Wp={base(){return[null,null,null]},boolean(e,t,n,i,r,s,u){return[null,S(wx,Ce({},tt(Ce({},e),{path:t,value:n,lang:i,version:r,states:s,ctx:u}))),null]},choice({choices:e,config:t,switchNode:n},i,r,s,u,o,c){const a=n.activeCase(i,!0),f=t!=null&&t.context?new ae.ModelPath(i.getModel(),new ae.Path(i.getArray(),[t.context])):i,[l,h,d]=a.node.hook(this,f,r,s,u,o,c);if(e.length===1)return[l,h,d];const g=t!=null&&t.choiceContext?new ae.Path([],[t.choiceContext]):t!=null&&t.context?new ae.Path([],[t.context]):i,p=w=>{var E;const v=(E=e.find(b=>b.type===w))!=null?E:a,A=v.node.default(),_=v.change?v.change(ae.DataModel.unwrapLists(r)):t.choiceContext==="feature"&&(A==null?void 0:A.type)==="minecraft:decorated"?A.config.feature:A;i.model.set(i,ae.DataModel.wrapLists(_))},m=S("select",{value:a.type,onChange:w=>p(w.target.value)},e.map(w=>S("option",{value:w.type},Eo(s,g.contextPush(w.type)))));return[l,S(De,null,m,h),d]},list({children:e,config:t},n,i,r,s,u,o){const{expand:c,collapse:a,isToggled:f}=Na(),[l,h]=oe(50),d=n.getContext().join(".");if(dx.includes(d)){const v=S(De,null,[...Array(t.maxLength)].map((_,E)=>S(Tr,{lang:r,path:n.modelPush(E)})),S("div",{class:"fixed-list"})),A=S(De,null,[...Array(t.maxLength)].map((_,E)=>{var x;return e.hook(this,n.modelPush(E),(x=i==null?void 0:i[E])==null?void 0:x.node,r,s,u,o)[1]}));return[v,A,null]}const g=()=>{Array.isArray(i)||(i=[]);const v=ae.DataModel.wrapLists(e.default());n.model.set(n,[{node:v,id:vi()},...i])},p=()=>{Array.isArray(i)||(i=[]);const v=ae.DataModel.wrapLists(e.default());n.model.set(n,[...i,{node:v,id:vi()}])},m=S("button",{class:"add tooltipped tip-se","aria-label":Oe(r,"add_top"),onClick:g},$e.plus_circle),w=S(De,null,i&&Array.isArray(i)&&i.map(({node:v,id:A},_)=>{if(_===l)return S("div",{class:"node node-header"},S("label",null,Oe(r,"entries_hidden",`${i.length-l}`)),S("button",{onClick:()=>h(Math.min(l+50,i.length))},Oe(r,"entries_hidden.more","50")),S("button",{onClick:()=>h(i.length)},Oe(r,"entries_hidden.all")));if(_>l)return null;const E=n.push(_).contextPush("entry"),b=e.type(E)==="object",x=f(A);if(b&&(x===!1||x===void 0&&i.length>20))return S("div",{class:"node node-header","data-category":e.category(E)},S(Tr,{lang:r,path:E,nested:!0}),S("button",{class:"toggle tooltipped tip-se","aria-label":`${Oe(r,"expand")}
|
|
${Oe(r,"expand_all","Ctrl")}`,onClick:c(A)},$e.chevron_right),S("label",null,Eo(r,E,`${_}`)),S(af,{key:A,path:E,value:v,schema:e}));const y=()=>E.set(void 0),C=()=>{const M=[...n.get()];[M[_-1],M[_]]=[M[_],M[_-1]],n.model.set(n,M)},B=()=>{const M=[...n.get()];[M[_+1],M[_]]=[M[_],M[_+1]],n.model.set(n,M)};return S(Pa,{key:A,path:E,schema:e,value:v,lang:r,version:s,states:u,actions:[{icon:"duplicate",label:"duplicate",onSelect:()=>{const M=[...n.get()];M.splice(_,0,{id:vi(),node:$o(v)}),n.model.set(n,M)}}],ctx:tt(Ce({},o),{index:(_===0?1:0)+(_===i.length-1?2:0)})},b&&S("button",{class:"toggle tooltipped tip-se","aria-label":`${Oe(r,"collapse")}
|
|
${Oe(r,"collapse_all","Ctrl")}`,onClick:a(A)},$e.chevron_down),S("button",{class:"remove tooltipped tip-se","aria-label":Oe(r,"remove"),onClick:y},$e.trashcan),i.length>1&&S("div",{class:"node-move"},S("button",{class:"move tooltipped tip-se","aria-label":Oe(r,"move_up"),onClick:C,disabled:_===0},$e.chevron_up),S("button",{class:"move tooltipped tip-se","aria-label":Oe(r,"move_down"),onClick:B,disabled:_===i.length-1},$e.chevron_down)))}),i&&i.length>0&&i.length<=l&&S("div",{class:"node node-header"},S("button",{class:"add tooltipped tip-se","aria-label":Oe(r,"add_bottom"),onClick:p},$e.plus_circle)));return[null,m,w]},map({children:e,keys:t,config:n},i,r,s,u,o,c){var v,A,_,E,b;const{expand:a,collapse:f,isToggled:l}=Na(),h=new ae.ModelPath(mx,new ae.Path([Ex(i.toString())])),d=()=>{const x=h.get();i.model.set(i.push(x),ae.DataModel.wrapLists(e.default()))},g=((v=n.validation)==null?void 0:v.validator)==="block_state_map"?o==null?void 0:o[ae.relativePath(i,n.validation.params.id).get()]:null,p=g!=null&&g.properties?ae.StringNode(null,{enum:Object.keys((A=g.properties)!=null?A:{})}):t;if(g&&i.last()==="Properties"){typeof r!="object"&&(r={});const x=Object.entries((_=g.properties)!=null?_:{}).map(([y,C])=>[y,ae.StringNode(null,{enum:C})]);return Object.entries((E=g.properties)!=null?E:{}).forEach(([y,C])=>{typeof r[y]!="string"?i.model.errors.add(i.push(y),"error.expected_string"):C.includes(r[y])||i.model.errors.add(i.push(y),"error.invalid_enum_option",r[y])}),ae.ObjectNode(Object.fromEntries(x)).hook(this,i,r,s,u,o,c)}const m=S(De,null,p.hook(this,h,(b=h.get())!=null?b:"",s,u,o,c)[1],S("button",{class:"add tooltipped tip-se","aria-label":Oe(s,"add"),onClick:d},$e.plus_circle)),w=S(De,null,typeof r=="object"&&Object.entries(r).map(([x,y])=>{var I,H,P,j;const C=i.modelPush(x),B=e.type(C)==="object",T=l(x);if(B&&(T===!1||T===void 0&&r.length>20))return S("div",{class:"node node-header","data-category":e.category(C)},S(Tr,{lang:s,path:C,nested:!0}),S("button",{class:"toggle tooltipped tip-se","aria-label":`${Oe(s,"expand")}
|
|
${Oe(s,"expand_all","Ctrl")}`,onClick:a(x)},$e.chevron_right),S("label",null,x),S(af,{key:x,path:C,value:y,schema:e}));const M=g?ae.StringNode(null,{enum:(H=(I=g.properties)==null?void 0:I[x])!=null?H:[]}):e;((P=g==null?void 0:g.properties)==null?void 0:P[x])&&typeof y=="string"&&!((j=g.properties)!=null&&j[x].includes(y))&&i.model.errors.add(C,"error.invalid_enum_option",y);const R=()=>C.set(void 0);return S(Pa,{key:x,schema:M,path:C,value:y,lang:s,version:u,states:o,ctx:c,label:x},B&&S("button",{class:"toggle tooltipped tip-se","aria-label":`${Oe(s,"collapse")}
|
|
${Oe(s,"collapse_all","Ctrl")}`,onClick:f(x)},$e.chevron_down),S("button",{class:"remove tooltipped tip-se","aria-label":Oe(s,"remove"),onClick:R},$e.trashcan))}));return[null,m,w]},number(e,t,n,i,r,s,u){return[null,S(_x,Ce({},tt(Ce({},e),{path:t,value:n,lang:i,version:r,states:s,ctx:u}))),null]},object({node:e,config:t,getActiveFields:n,getChildModelPath:i},r,s,u,o,c,a){var v;const{expand:f,collapse:l,isToggled:h}=Na();if(r.getArray().length==0&&bx(t.context,s)){const{wrapper:A,fields:_}=xx(n(r),r,s);s=A.data,n=()=>_,i=(E,b)=>new ae.ModelPath(A,new ae.Path(E.getArray(),["feature"])).push(b)}let d=null,g=null;if(e.optional())if(s===void 0){const A=()=>r.set(ae.DataModel.wrapLists(e.default()));g=S("button",{class:"collapse closed tooltipped tip-se","aria-label":Oe(u,"expand"),onClick:A},$e.plus_circle)}else{const A=()=>r.set(void 0);g=S("button",{class:"collapse open tooltipped tip-se","aria-label":Oe(u,"remove"),onClick:A},$e.trashcan)}const p=r.getContext().join(".");if(px.includes(p)||of.includes(p)){const A=h(""),_=of.includes(p)?A:!A;if(d=S(De,null,S("button",{class:"toggle tooltipped tip-se","aria-label":Oe(u,_?"collapse":"expand"),onClick:A?l(""):f("")},_?$e.chevron_down:$e.chevron_right)),!_)return[d,g,null]}const m=typeof s=="object"&&s!==null&&((v=e.default())==null?void 0:v.pools)?tt(Ce({},a),{loot:s==null?void 0:s.type}):a,w=S(De,null,typeof s=="object"&&s!==null&&!(e.optional()&&s===void 0)&&Object.entries(n(r)).filter(([A,_])=>_.enabled(r)).map(([A,_])=>{const E=i(r,A),b=E.getContext().join(".");if(cx.includes(b))return null;const[x,y,C]=_.hook(this,E,s[A],u,o,c,m),B=_.type(E)==="object"&&ux.includes(b),T=hx.includes(b);return B||T?(d=S(De,null,d,S(Tr,{lang:u,path:E}),S(Vp,{lang:u,path:E}),x),g=S(De,null,g,y),B?C:null):S(Pa,{key:A,schema:_,path:E,value:s[A],lang:u,version:o,states:c,ctx:m})}));return[d,g,w]},string(e,t,n,i,r,s,u){return[null,S(Ax,Ce({},tt(Ce({},e),{path:t,value:n,lang:i,version:r,states:s,ctx:u}))),null]}};function af({path:e,value:t}){var i,r,s,u,o;switch(e.getContext().join(".")){case"loot_table.pools.entry":return S("label",null,(r=(i=t==null?void 0:t.entries)==null?void 0:i.length)!=null?r:0," entries");case"function.set_contents.entries.entry":case"loot_pool.entries.entry":return S("label",null,(o=(s=t==null?void 0:t.name)==null?void 0:s.replace(/^minecraft:/,""))!=null?o:(u=t==null?void 0:t.type)==null?void 0:u.replace(/^minecraft:/,""))}for(const c of Object.values(t!=null?t:{}))if(typeof c=="string")return S("label",null,c.replace(/^minecraft:/,""));return null}function Na(){const[e,t]=oe(new Map),[n,i]=oe(void 0);return{expand:o=>c=>{c.ctrlKey?(t(new Map),i(!0)):t(a=>new Map(a.set(o,!0)))},collapse:o=>c=>{c.ctrlKey?(t(new Map),i(!1)):t(a=>new Map(a.set(o,!1)))},isToggled:o=>{var c;return e instanceof Map?(c=e.get(o))!=null?c:n:!1}}}function wx({path:e,node:t,value:n,lang:i}){const r=s=>{e.model.set(e,t.optional()&&n===s?void 0:s)};return S(De,null,S("button",{class:n===!1?"selected":"",onClick:()=>r(!1)},Oe(i,"false")),S("button",{class:n===!0?"selected":"",onClick:()=>r(!0)},Oe(i,"true")))}function _x({path:e,config:t,integer:n,value:i,lang:r}){var o;const s=c=>{const a=c.target.value,f=n?parseInt(a):parseFloat(a);e.model.set(e,f)},u=c=>{const a=c.target.value,f=parseInt(a.slice(1),16);e.model.set(e,f)};return S(De,null,S("input",{type:"text",value:i!=null?i:"",onBlur:s,onKeyDown:c=>{c.key==="Enter"&&s(c)}}),(t==null?void 0:t.color)&&S("input",{type:"color",value:"#"+((o=i==null?void 0:i.toString(16).padStart(6,"0"))!=null?o:"000000"),onChange:u}),["dimension.generator.seed","dimension.generator.biome_source.seed","world_settings.seed","structure_placement.salt"].includes(e.getContext().join("."))&&S("button",{onClick:()=>Pd(e.model),class:"tooltipped tip-se","aria-label":Oe(r,"generate_new_seed")},$e.sync))}function Ax({path:e,getValues:t,config:n,node:i,value:r,lang:s,version:u,states:o}){var h;const c=d=>{d.stopPropagation();const g=d.target.value;g!==r&&e.model.set(e,g.length===0?void 0:g)},a=t(),f=e.getContext().join("."),l=!xr(n)&&(n==null?void 0:n.validator)==="resource"&&typeof n.params.pool=="string"?n.params.pool:void 0;if(fx.includes(f))return S("textarea",{value:r!=null?r:"",onBlur:c});if(xr(n)&&!n.additional||lx.includes(f)){let d=new ae.Path([]);return xr(n)&&typeof n.enum=="string"?d=d.contextPush(n.enum):l?d=d.contextPush(l):xr(n)&&(d=e),S("select",{value:r!=null?r:"",onChange:c},i.optional()&&S("option",{value:""},Oe(s,"unset")),a.map(g=>S("option",{value:g},Eo(s,d.contextPush(g.replace(/^minecraft:/,""))))))}else if(!xr(n)&&(n==null?void 0:n.validator)==="block_state_key"){const d=o==null?void 0:o[ae.relativePath(e,n.params.id).get()],g=Object.keys((h=d==null?void 0:d.properties)!=null?h:{});return S("select",{value:r!=null?r:"",onChange:c},g.map(p=>S("option",null,p)))}else{const d=vi(),g=l?gx(l):void 0;return S(De,null,S("input",{value:r!=null?r:"",onBlur:c,onKeyDown:p=>{p.key==="Enter"&&c(p)},list:a.length>0?d:""}),a.length>0&&S("datalist",{id:d},a.map(p=>S("option",{value:p}))),g&&a.includes(r)&&r.startsWith("minecraft:")&&S("a",{href:`/${g.url}/?version=${u}&preset=${r.replace(/^minecraft:/,"")}`,class:"tooltipped tip-se","aria-label":Oe(s,"follow_reference")},$e.link_external))}}function yx({label:e,schema:t,path:n,value:i,lang:r,version:s,states:u,ctx:o,actions:c,children:a}){var _;const f=t.type(n),l=t.category(n),h=n.getContext().join("."),[d,g]=jl(),p=E=>{E.preventDefault(),g()},m=tt(Ce({},o),{depth:((_=o.depth)!=null?_:0)+1});delete m.index;const[w,v,A]=t.hook(Wp,n,i,r,s,u,m);return S("div",{class:`node ${f}-node`,"data-category":l},S("div",{class:"node-header",onContextMenu:p},S(Tr,{lang:r,path:n}),S(Vp,{lang:r,path:n}),a,w,S("label",null,e!=null?e:Eo(r,n,`${n.last()}`),d&&S("div",{class:"node-menu"},c==null?void 0:c.map(E=>{var b;return S("div",{key:E.label,class:"menu-item"},S(Ee,{icon:E.icon,tooltip:Oe(r,E.label),tooltipLoc:"se",onClick:()=>E.onSelect()}),S("span",null,(b=E.description)!=null?b:Oe(r,E.label)))}),S("div",{class:"menu-item"},S(Ee,{icon:"clippy",tooltip:Oe(r,"copy_context"),tooltipLoc:"se",onClick:()=>navigator.clipboard.writeText(h)}),S("span",null,h)))),v),A&&S("div",{class:"node-body"},A))}const Pa=Np(yx,(e,t)=>e.schema===t.schema&&e.lang===t.lang&&e.path.equals(t.path)&&yi(e.ctx,t.ctx)&&yi(e.value,t.value));function xr(e){return!!(e!=null&&e.enum)}function Ex(e){var t=0,n,i;for(n=0;n<e.length;n++)i=e.charCodeAt(n),t=(t<<5)-t+i,t|=0;return t}function Eo(e,t,...n){const i=t.getContext();for(let r=0;r<i.length;r+=1){const s=i.slice(r).join("."),u=Oe(e,s,...n);if(s!==u)return u}return i[i.length-1]}function Tr({lang:e,path:t,nested:n}){var s;t.model instanceof jp&&(t=t.model.map(t).withModel(t.model));const i=n?t.model.errors.getAll().filter(u=>u.path.startsWith(t)):t.model.errors.get(t,!0);if(i.length===0)return null;const r=Oe(e,i[0].error,...(s=i[0].params)!=null?s:[]);return Gp("node-error","issue_opened",r)}function Vp({lang:e,path:t}){const n=t.contextPush("help").getContext().join("."),i=Oe(e,n);return i===n?null:Gp("node-help","info",i)}const Gp=(e,t,n)=>{const[i,r]=jl();return S("div",{class:`node-icon ${e}${i?" show":""}`,onClick:r},$e[t],S("span",{class:"icon-popup"},n))};function bx(e,t){var n;return e==="feature"&&((n=t==null?void 0:t.type)==null?void 0:n.replace(/^minecraft:/,""))==="decorated"&&Di(t==null?void 0:t.config)}function xx(e,t,n){const i=[],r=Lr(n,i),s={type:e.type,config:ae.ObjectNode({decorators:ae.ListNode(Jd),feature:Yd},{context:"feature.decorated"})},u=ae.ObjectNode(s,{context:"feature"}),o=new ae.Path(["config","feature"]),c=new ae.Path(["config","decorators"]),a=t.getModel(),f=new jp(u,l=>{if(l.startsWith(o))return new ae.Path([...[...Array(i.length-1)].flatMap(()=>["config","feature"]),...l.modelArr]);if(l.startsWith(c)){if(l.modelArr.length===2)return new ae.Path([]);const h=l.modelArr[2];if(typeof h=="number")return new ae.Path([...[...Array(h)].flatMap(()=>["config","feature"]),"config","decorator",...l.modelArr.slice(3)])}return l},l=>{if(l.equals(c)){const h=[];return Lr(a.data,h),h}return a.get(f.map(l))},(l,h,d)=>{if(l.startsWith(o)){const g=[];Lr(a.data,g);const p=new ae.Path([...[...Array(g.length-1)].flatMap(()=>["config","feature"]),...l.modelArr]);return a.set(p,h,d)}else if(l.startsWith(c)){const g=l.modelArr[2];if(l.modelArr.length===2){const p=f.get(o);return a.set(new ae.Path,Tl(p,h),d)}else if(typeof g=="number")if(l.modelArr.length===3&&h===void 0){const p=f.get(o),m=[];Lr(a.data,m),m.splice(g,1);const w=Tl(p,m);return a.set(new ae.Path,w,d)}else{const p=new ae.Path([...[...Array(g)].flatMap(()=>["config","feature"]),"config","decorator",...l.modelArr.slice(3)]);return a.set(p,h,d)}}a.set(l,h,d)});return f.data={type:a.data.type,config:{decorators:i,feature:r}},f.errors=a.errors,{fields:s,wrapper:f}}function Lr(e,t){var n,i;return((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,""))!=="decorated"||!Di(e==null?void 0:e.config)?e:(t.push({id:t.length,node:e.config.decorator}),Lr((i=e.config.feature)!=null?i:"",t))}function Tl(e,t){return t.length===0?e:{type:"minecraft:decorated",config:{decorator:t.shift().node,feature:Tl(e,t)}}}function Cx({version:e,model:t,blockStates:n,onError:i}){const{lang:r}=rt();if(!t||!n||r==="none")return S(De,null);const[s]=Yf(o=>{i(`Error rendering the tree: ${o.message}`),console.error(o)});if(s)return S(De,null);const[,u]=oe(0);return Mo(t,()=>{u(o=>o+1)}),S("div",{class:"tree","data-cy":"tree"},S(vx,{model:t,lang:r,version:e,blockStates:n}))}var Fx=Object.defineProperty,Sx=Object.defineProperties,Dx=Object.getOwnPropertyDescriptors,lf=Object.getOwnPropertySymbols,kx=Object.prototype.hasOwnProperty,Bx=Object.prototype.propertyIsEnumerable,cf=(e,t,n)=>t in e?Fx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kp=(e,t)=>{for(var n in t||(t={}))kx.call(t,n)&&cf(e,n,t[n]);if(lf)for(var n of lf(t))Bx.call(t,n)&&cf(e,n,t[n]);return e};const uf="Please consider reporting this error at https://github.com/laymonage/giscus/issues/new.";function Ns(e){return`[giscus] An error occurred. Error message: "${e}".`}function hf(e){const t=document.querySelector(`meta[property='og:${e}'],meta[name='${e}']`);return t?t.content:""}function Tx(){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 Lx(e){const[t,n]=oe(""),i=function({repo:u,repoId:o,category:c="",categoryId:a="",mapping:f,term:l="",theme:h="light",reactionsEnabled:d="1",emitMetadata:g="0",inputPosition:p="bottom",lang:m="en",session:w,origin:v}){const A=new URL(location.href);A.searchParams.delete("giscus");const _=A.toString(),E={origin:v=v||_,session:w,theme:h,reactionsEnabled:d,emitMetadata:g,inputPosition:p,repo:u,repoId:o,category:c,categoryId:a,description:hf("description")};switch(f){case"url":E.term=_;break;case"title":E.term=document.title;break;case"og:title":E.term=hf("title");break;case"specific":E.term=l;break;case"number":E.number=l;break;case"pathname":default:E.term=location.pathname.length<2?"index":location.pathname.substring(1).replace(/\.\w+$/,"")}return`https://giscus.app/${m}/widget?${new URLSearchParams(E)}`}((r=Kp({},e),Sx(r,Dx({session:t}))));var r;const s=Xe(null);return xe(()=>{const u=location.href,o=new URL(u),c=localStorage.getItem("giscus-session"),a=o.searchParams.get("giscus")||"";if(a)return localStorage.setItem("giscus-session",JSON.stringify(a)),n(a),o.searchParams.delete("giscus"),void history.replaceState(void 0,document.title,o.toString());if(c)try{n(JSON.parse(c||"")||"")}catch(f){n(""),localStorage.removeItem("giscus-session"),console.warn(`${Ns(f==null?void 0:f.message)} Session has been cleared.`)}},[]),xe(Tx,[]),xe(()=>{const u=function(o,c=null){return function(a){if(a.origin!=="https://giscus.app")return;const{data:f}=a;if(typeof f!="object"||!f.giscus||(c&&f.giscus.resizeHeight&&(c.style.height=`${f.giscus.resizeHeight}px`),!f.giscus.error))return;const l=f.giscus.error;if(l.includes("Bad credentials")||l.includes("Invalid state value")){if(localStorage.getItem("giscus-session")!==null)return localStorage.removeItem("giscus-session"),o(),void console.warn(`${Ns(l)} Session has been cleared.`);console.error(`${Ns(l)} No session is stored initially. ${uf}`)}l.includes("Discussion not found")?console.warn(`[giscus] ${l}. A new discussion will be created if a comment/reaction is submitted.`):console.error(`${Ns(l)} ${uf}`)}}(()=>n(""),s.current);return window.addEventListener("message",u),()=>window.removeEventListener("message",u)},[]),Bl.createElement("div",{className:"giscus"},Bl.createElement("iframe",{className:"giscus-frame",title:"Comments",scrolling:"no",src:i,ref:s}))}function $x(e){const[t,n]=oe(!1);return xe(()=>n(!0),[]),t?Bl.createElement(Lx,Kp({},e)):null}function Ec({term:e}){const{actualTheme:t}=s0(),n=t==="light"?"-burn":"",i=`${location.protocol}//${location.host}/assets/giscus${n}.css`;return S($x,{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:i,lang:"en"})}function Xp(){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 Ar=Xp();function Mx(e){Ar=e}const Rx=/[&<>"']/,Ix=/[&<>"']/g,Ox=/[<>"']|&(?!#?\w+;)/,Nx=/[<>"']|&(?!#?\w+;)/g,Px={"&":"&","<":"<",">":">",'"':""","'":"'"},ff=e=>Px[e];function wt(e,t){if(t){if(Rx.test(e))return e.replace(Ix,ff)}else if(Ox.test(e))return e.replace(Nx,ff);return e}const zx=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Jp(e){return e.replace(zx,(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 Ux=/(^|[^\[])\^/g;function Ye(e,t){e=e.source||e,t=t||"";const n={replace:(i,r)=>(r=r.source||r,r=r.replace(Ux,"$1"),e=e.replace(i,r),n),getRegex:()=>new RegExp(e,t)};return n}const Hx=/[^\w:]/g,jx=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function df(e,t,n){if(e){let i;try{i=decodeURIComponent(Jp(n)).replace(Hx,"").toLowerCase()}catch{return null}if(i.indexOf("javascript:")===0||i.indexOf("vbscript:")===0||i.indexOf("data:")===0)return null}t&&!jx.test(n)&&(n=Kx(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const Ps={},Wx=/^[^:]+:\/*[^/]*$/,Vx=/^([^:]+:)[\s\S]*$/,Gx=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Kx(e,t){Ps[" "+e]||(Wx.test(e)?Ps[" "+e]=e+"/":Ps[" "+e]=io(e,"/",!0)),e=Ps[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(Vx,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(Gx,"$1")+t:e+t}const bo={exec:function(){}};function an(e){let t=1,n,i;for(;t<arguments.length;t++){n=arguments[t];for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}function pf(e,t){const n=e.replace(/\|/g,(s,u,o)=>{let c=!1,a=u;for(;--a>=0&&o[a]==="\\";)c=!c;return c?"|":" |"}),i=n.split(/ \|/);let r=0;if(i[0].trim()||i.shift(),i[i.length-1].trim()||i.pop(),i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;r<i.length;r++)i[r]=i[r].trim().replace(/\\\|/g,"|");return i}function io(e,t,n){const i=e.length;if(i===0)return"";let r=0;for(;r<i;){const s=e.charAt(i-r-1);if(s===t&&!n)r++;else if(s!==t&&n)r++;else break}return e.substr(0,i-r)}function Xx(e,t){if(e.indexOf(t[1])===-1)return-1;const n=e.length;let i=0,r=0;for(;r<n;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])i++;else if(e[r]===t[1]&&(i--,i<0))return r;return-1}function Yp(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function gf(e,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function mf(e,t,n,i){const r=t.href,s=t.title?wt(t.title):null,u=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){i.state.inLink=!0;const o={type:"link",raw:n,href:r,title:s,text:u,tokens:i.inlineTokens(u,[])};return i.state.inLink=!1,o}else return{type:"image",raw:n,href:r,title:s,text:wt(u)}}function Jx(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const i=n[1];return t.split(`
|
|
`).map(r=>{const s=r.match(/^\s+/);if(s===null)return r;const[u]=s;return u.length>=i.length?r.slice(i.length):r}).join(`
|
|
`)}class bc{constructor(t){this.options=t||Ar}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 i=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:io(i,`
|
|
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const i=n[0],r=Jx(i,n[3]||"");return{type:"code",raw:i,lang:n[2]?n[2].trim():n[2],text:r}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let i=n[2].trim();if(/#$/.test(i)){const s=io(i,"#");(this.options.pedantic||!s||/ $/.test(s))&&(i=s.trim())}const r={type:"heading",raw:n[0],depth:n[1].length,text:i,tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}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 i=n[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:n[0],tokens:this.lexer.blockTokens(i,[]),text:i}}}list(t){let n=this.rules.block.list.exec(t);if(n){let i,r,s,u,o,c,a,f,l,h,d,g,p=n[1].trim();const m=p.length>1,w={type:"list",raw:"",ordered:m,start:m?+p.slice(0,-1):"",loose:!1,items:[]};p=m?`\\d{1,9}\\${p.slice(-1)}`:`\\${p}`,this.options.pedantic&&(p=m?p:"[*+-]");const v=new RegExp(`^( {0,3}${p})((?: [^\\n]*)?(?:\\n|$))`);for(;t&&(g=!1,!(!(n=v.exec(t))||this.rules.block.hr.test(t)));){if(i=n[0],t=t.substring(i.length),f=n[2].split(`
|
|
`,1)[0],l=t.split(`
|
|
`,1)[0],this.options.pedantic?(u=2,d=f.trimLeft()):(u=n[2].search(/[^ ]/),u=u>4?1:u,d=f.slice(u),u+=n[1].length),c=!1,!f&&/^ *$/.test(l)&&(i+=l+`
|
|
`,t=t.substring(l.length+1),g=!0),!g){const _=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;t&&(h=t.split(`
|
|
`,1)[0],f=h,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!_.test(f));){if(f.search(/[^ ]/)>=u||!f.trim())d+=`
|
|
`+f.slice(u);else if(!c)d+=`
|
|
`+f;else break;!c&&!f.trim()&&(c=!0),i+=h+`
|
|
`,t=t.substring(h.length+1)}}w.loose||(a?w.loose=!0:/\n *\n *$/.test(i)&&(a=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d),r&&(s=r[0]!=="[ ] ",d=d.replace(/^\[[ xX]\] +/,""))),w.items.push({type:"list_item",raw:i,task:!!r,checked:s,loose:!1,text:d}),w.raw+=i}w.items[w.items.length-1].raw=i.trimRight(),w.items[w.items.length-1].text=d.trimRight(),w.raw=w.raw.trimRight();const A=w.items.length;for(o=0;o<A;o++){this.lexer.state.top=!1,w.items[o].tokens=this.lexer.blockTokens(w.items[o].text,[]);const _=w.items[o].tokens.filter(b=>b.type==="space"),E=_.every(b=>{const x=b.raw.split("");let y=0;for(const C of x)if(C===`
|
|
`&&(y+=1),y>1)return!0;return!1});!w.loose&&_.length&&E&&(w.loose=!0,w.items[o].loose=!0)}return w}}html(t){const n=this.rules.block.html.exec(t);if(n){const i={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&&(i.type="paragraph",i.text=this.options.sanitizer?this.options.sanitizer(n[0]):wt(n[0]),i.tokens=[],this.lexer.inline(i.text,i.tokens)),i}}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 i=n[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:i,raw:n[0],href:n[2],title:n[3]}}}table(t){const n=this.rules.block.table.exec(t);if(n){const i={type:"table",header:pf(n[1]).map(r=>({text:r})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]?n[3].replace(/\n[ \t]*$/,"").split(`
|
|
`):[]};if(i.header.length===i.align.length){i.raw=n[0];let r=i.align.length,s,u,o,c;for(s=0;s<r;s++)/^ *-+: *$/.test(i.align[s])?i.align[s]="right":/^ *:-+: *$/.test(i.align[s])?i.align[s]="center":/^ *:-+ *$/.test(i.align[s])?i.align[s]="left":i.align[s]=null;for(r=i.rows.length,s=0;s<r;s++)i.rows[s]=pf(i.rows[s],i.header.length).map(a=>({text:a}));for(r=i.header.length,u=0;u<r;u++)i.header[u].tokens=[],this.lexer.inlineTokens(i.header[u].text,i.header[u].tokens);for(r=i.rows.length,u=0;u<r;u++)for(c=i.rows[u],o=0;o<c.length;o++)c[o].tokens=[],this.lexer.inlineTokens(c[o].text,c[o].tokens);return i}}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n){const i={type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const i={type:"paragraph",raw:n[0],text:n[1].charAt(n[1].length-1)===`
|
|
`?n[1].slice(0,-1):n[1],tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}text(t){const n=this.rules.block.text.exec(t);if(n){const i={type:"text",raw:n[0],text:n[0],tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:wt(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):wt(n[0]):n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const i=n[2].trim();if(!this.options.pedantic&&/^</.test(i)){if(!/>$/.test(i))return;const u=io(i.slice(0,-1),"\\");if((i.length-u.length)%2===0)return}else{const u=Xx(n[2],"()");if(u>-1){const c=(n[0].indexOf("!")===0?5:4)+n[1].length+u;n[2]=n[2].substring(0,u),n[0]=n[0].substring(0,c).trim(),n[3]=""}}let r=n[2],s="";if(this.options.pedantic){const u=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);u&&(r=u[1],s=u[3])}else s=n[3]?n[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(this.options.pedantic&&!/>$/.test(i)?r=r.slice(1):r=r.slice(1,-1)),mf(n,{href:r&&r.replace(this.rules.inline._escapes,"$1"),title:s&&s.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let r=(i[2]||i[1]).replace(/\s+/g," ");if(r=n[r.toLowerCase()],!r||!r.href){const s=i[0].charAt(0);return{type:"text",raw:s,text:s}}return mf(i,r,i[0],this.lexer)}}emStrong(t,n,i=""){let r=this.rules.inline.emStrong.lDelim.exec(t);if(!r||r[3]&&i.match(/[\p{L}\p{N}]/u))return;const s=r[1]||r[2]||"";if(!s||s&&(i===""||this.rules.inline.punctuation.exec(i))){const u=r[0].length-1;let o,c,a=u,f=0;const l=r[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(l.lastIndex=0,n=n.slice(-1*t.length+u);(r=l.exec(n))!=null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(c=o.length,r[3]||r[4]){a+=c;continue}else if((r[5]||r[6])&&u%3&&!((u+c)%3)){f+=c;continue}if(a-=c,a>0)continue;if(c=Math.min(c,c+a+f),Math.min(u,c)%2){const d=t.slice(1,u+r.index+c);return{type:"em",raw:t.slice(0,u+r.index+c+1),text:d,tokens:this.lexer.inlineTokens(d,[])}}const h=t.slice(2,u+r.index+c-1);return{type:"strong",raw:t.slice(0,u+r.index+c+1),text:h,tokens:this.lexer.inlineTokens(h,[])}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let i=n[2].replace(/\n/g," ");const r=/[^ ]/.test(i),s=/^ /.test(i)&&/ $/.test(i);return r&&s&&(i=i.substring(1,i.length-1)),i=wt(i,!0),{type:"codespan",raw:n[0],text:i}}}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 i=this.rules.inline.autolink.exec(t);if(i){let r,s;return i[2]==="@"?(r=wt(this.options.mangle?n(i[1]):i[1]),s="mailto:"+r):(r=wt(i[1]),s=r),{type:"link",raw:i[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}url(t,n){let i;if(i=this.rules.inline.url.exec(t)){let r,s;if(i[2]==="@")r=wt(this.options.mangle?n(i[0]):i[0]),s="mailto:"+r;else{let u;do u=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0];while(u!==i[0]);r=wt(i[0]),i[1]==="www."?s="http://"+r:s=r}return{type:"link",raw:i[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t,n){const i=this.rules.inline.text.exec(t);if(i){let r;return this.lexer.state.inRawBlock?r=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):wt(i[0]):i[0]:r=wt(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}}}}const Ae={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:bo,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Ae._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Ae._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Ae.def=Ye(Ae.def).replace("label",Ae._label).replace("title",Ae._title).getRegex();Ae.bullet=/(?:[*+-]|\d{1,9}[.)])/;Ae.listItemStart=Ye(/^( *)(bull) */).replace("bull",Ae.bullet).getRegex();Ae.list=Ye(Ae.list).replace(/bull/g,Ae.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ae.def.source+")").getRegex();Ae._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";Ae._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;Ae.html=Ye(Ae.html,"i").replace("comment",Ae._comment).replace("tag",Ae._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Ae.paragraph=Ye(Ae._paragraph).replace("hr",Ae.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ae._tag).getRegex();Ae.blockquote=Ye(Ae.blockquote).replace("paragraph",Ae.paragraph).getRegex();Ae.normal=an({},Ae);Ae.gfm=an({},Ae.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});Ae.gfm.table=Ye(Ae.gfm.table).replace("hr",Ae.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ae._tag).getRegex();Ae.gfm.paragraph=Ye(Ae._paragraph).replace("hr",Ae.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Ae.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ae._tag).getRegex();Ae.pedantic=an({},Ae.normal,{html:Ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ae._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:bo,paragraph:Ye(Ae.normal._paragraph).replace("hr",Ae.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",Ae.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const fe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:bo,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:bo,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};fe._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";fe.punctuation=Ye(fe.punctuation).replace(/punctuation/g,fe._punctuation).getRegex();fe.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;fe.escapedEmSt=/\\\*|\\_/g;fe._comment=Ye(Ae._comment).replace("(?:-->|$)","-->").getRegex();fe.emStrong.lDelim=Ye(fe.emStrong.lDelim).replace(/punct/g,fe._punctuation).getRegex();fe.emStrong.rDelimAst=Ye(fe.emStrong.rDelimAst,"g").replace(/punct/g,fe._punctuation).getRegex();fe.emStrong.rDelimUnd=Ye(fe.emStrong.rDelimUnd,"g").replace(/punct/g,fe._punctuation).getRegex();fe._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;fe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;fe._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])?)+(?![-_])/;fe.autolink=Ye(fe.autolink).replace("scheme",fe._scheme).replace("email",fe._email).getRegex();fe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;fe.tag=Ye(fe.tag).replace("comment",fe._comment).replace("attribute",fe._attribute).getRegex();fe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;fe._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;fe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;fe.link=Ye(fe.link).replace("label",fe._label).replace("href",fe._href).replace("title",fe._title).getRegex();fe.reflink=Ye(fe.reflink).replace("label",fe._label).replace("ref",Ae._label).getRegex();fe.nolink=Ye(fe.nolink).replace("ref",Ae._label).getRegex();fe.reflinkSearch=Ye(fe.reflinkSearch,"g").replace("reflink",fe.reflink).replace("nolink",fe.nolink).getRegex();fe.normal=an({},fe);fe.pedantic=an({},fe.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",fe._label).getRegex(),reflink:Ye(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",fe._label).getRegex()});fe.gfm=an({},fe.normal,{escape:Ye(fe.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/});fe.gfm.url=Ye(fe.gfm.url,"i").replace("email",fe.gfm._extended_email).getRegex();fe.breaks=an({},fe.gfm,{br:Ye(fe.br).replace("{2,}","*").getRegex(),text:Ye(fe.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function Yx(e){return e.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function vf(e){let t="",n,i;const r=e.length;for(n=0;n<r;n++)i=e.charCodeAt(n),Math.random()>.5&&(i="x"+i.toString(16)),t+="&#"+i+";";return t}class Pn{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ar,this.options.tokenizer=this.options.tokenizer||new bc,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:Ae.normal,inline:fe.normal};this.options.pedantic?(n.block=Ae.pedantic,n.inline=fe.pedantic):this.options.gfm&&(n.block=Ae.gfm,this.options.breaks?n.inline=fe.breaks:n.inline=fe.gfm),this.tokenizer.rules=n}static get rules(){return{block:Ae,inline:fe}}static lex(t,n){return new Pn(n).lex(t)}static lexInline(t,n){return new Pn(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 i,r,s,u;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(o=>(i=o.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))){if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length),i.raw.length===1&&n.length>0?n[n.length-1].raw+=`
|
|
`:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length),r=n[n.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=`
|
|
`+i.raw,r.text+=`
|
|
`+i.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text):n.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length),r=n[n.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=`
|
|
`+i.raw,r.text+=`
|
|
`+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(s=t,this.options.extensions&&this.options.extensions.startBlock){let o=1/0;const c=t.slice(1);let a;this.options.extensions.startBlock.forEach(function(f){a=f.call({lexer:this},c),typeof a=="number"&&a>=0&&(o=Math.min(o,a))}),o<1/0&&o>=0&&(s=t.substring(0,o+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){r=n[n.length-1],u&&r.type==="paragraph"?(r.raw+=`
|
|
`+i.raw,r.text+=`
|
|
`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):n.push(i),u=s.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length),r=n[n.length-1],r&&r.type==="text"?(r.raw+=`
|
|
`+i.raw,r.text+=`
|
|
`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):n.push(i);continue}if(t){const o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,n}inline(t,n){this.inlineQueue.push({src:t,tokens:n})}inlineTokens(t,n=[]){let i,r,s,u=t,o,c,a;if(this.tokens.links){const f=Object.keys(this.tokens.links);if(f.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(u))!=null;)f.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,o.index)+"["+gf("a",o[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.blockSkip.exec(u))!=null;)u=u.slice(0,o.index)+"["+gf("a",o[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(o=this.tokenizer.rules.inline.escapedEmSt.exec(u))!=null;)u=u.slice(0,o.index)+"++"+u.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;t;)if(c||(a=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(f=>(i=f.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))){if(i=this.tokenizer.escape(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.tag(t)){t=t.substring(i.raw.length),r=n[n.length-1],r&&i.type==="text"&&r.type==="text"?(r.raw+=i.raw,r.text+=i.text):n.push(i);continue}if(i=this.tokenizer.link(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(i.raw.length),r=n[n.length-1],r&&i.type==="text"&&r.type==="text"?(r.raw+=i.raw,r.text+=i.text):n.push(i);continue}if(i=this.tokenizer.emStrong(t,u,a)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.codespan(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.br(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.del(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.autolink(t,vf)){t=t.substring(i.raw.length),n.push(i);continue}if(!this.state.inLink&&(i=this.tokenizer.url(t,vf))){t=t.substring(i.raw.length),n.push(i);continue}if(s=t,this.options.extensions&&this.options.extensions.startInline){let f=1/0;const l=t.slice(1);let h;this.options.extensions.startInline.forEach(function(d){h=d.call({lexer:this},l),typeof h=="number"&&h>=0&&(f=Math.min(f,h))}),f<1/0&&f>=0&&(s=t.substring(0,f+1))}if(i=this.tokenizer.inlineText(s,Yx)){t=t.substring(i.raw.length),i.raw.slice(-1)!=="_"&&(a=i.raw.slice(-1)),c=!0,r=n[n.length-1],r&&r.type==="text"?(r.raw+=i.raw,r.text+=i.text):n.push(i);continue}if(t){const f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return n}}class xc{constructor(t){this.options=t||Ar}code(t,n,i){const r=(n||"").match(/\S*/)[0];if(this.options.highlight){const s=this.options.highlight(t,r);s!=null&&s!==t&&(i=!0,t=s)}return t=t.replace(/\n$/,"")+`
|
|
`,r?'<pre><code class="'+this.options.langPrefix+wt(r,!0)+'">'+(i?t:wt(t,!0))+`</code></pre>
|
|
`:"<pre><code>"+(i?t:wt(t,!0))+`</code></pre>
|
|
`}blockquote(t){return`<blockquote>
|
|
`+t+`</blockquote>
|
|
`}html(t){return t}heading(t,n,i,r){return this.options.headerIds?"<h"+n+' id="'+this.options.headerPrefix+r.slug(i)+'">'+t+"</h"+n+`>
|
|
`:"<h"+n+">"+t+"</h"+n+`>
|
|
`}hr(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`}list(t,n,i){const r=n?"ol":"ul",s=n&&i!==1?' start="'+i+'"':"";return"<"+r+s+`>
|
|
`+t+"</"+r+`>
|
|
`}listitem(t){return"<li>"+t+`</li>
|
|
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(t){return"<p>"+t+`</p>
|
|
`}table(t,n){return n&&(n="<tbody>"+n+"</tbody>"),`<table>
|
|
<thead>
|
|
`+t+`</thead>
|
|
`+n+`</table>
|
|
`}tablerow(t){return`<tr>
|
|
`+t+`</tr>
|
|
`}tablecell(t,n){const i=n.header?"th":"td";return(n.align?"<"+i+' align="'+n.align+'">':"<"+i+">")+t+"</"+i+`>
|
|
`}strong(t){return"<strong>"+t+"</strong>"}em(t){return"<em>"+t+"</em>"}codespan(t){return"<code>"+t+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(t){return"<del>"+t+"</del>"}link(t,n,i){if(t=df(this.options.sanitize,this.options.baseUrl,t),t===null)return i;let r='<a href="'+wt(t)+'"';return n&&(r+=' title="'+n+'"'),r+=">"+i+"</a>",r}image(t,n,i){if(t=df(this.options.sanitize,this.options.baseUrl,t),t===null)return i;let r='<img src="'+t+'" alt="'+i+'"';return n&&(r+=' title="'+n+'"'),r+=this.options.xhtml?"/>":">",r}text(t){return t}}class Zp{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,i){return""+i}image(t,n,i){return""+i}br(){return""}}class qp{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 i=t,r=0;if(this.seen.hasOwnProperty(i)){r=this.seen[t];do r++,i=t+"-"+r;while(this.seen.hasOwnProperty(i))}return n||(this.seen[t]=r,this.seen[i]=0),i}slug(t,n={}){const i=this.serialize(t);return this.getNextSafeSlug(i,n.dryrun)}}class zn{constructor(t){this.options=t||Ar,this.options.renderer=this.options.renderer||new xc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Zp,this.slugger=new qp}static parse(t,n){return new zn(n).parse(t)}static parseInline(t,n){return new zn(n).parseInline(t)}parse(t,n=!0){let i="",r,s,u,o,c,a,f,l,h,d,g,p,m,w,v,A,_,E,b;const x=t.length;for(r=0;r<x;r++){if(d=t[r],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[d.type]&&(b=this.options.extensions.renderers[d.type].call({parser:this},d),b!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type))){i+=b||"";continue}switch(d.type){case"space":continue;case"hr":{i+=this.renderer.hr();continue}case"heading":{i+=this.renderer.heading(this.parseInline(d.tokens),d.depth,Jp(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue}case"code":{i+=this.renderer.code(d.text,d.lang,d.escaped);continue}case"table":{for(l="",f="",o=d.header.length,s=0;s<o;s++)f+=this.renderer.tablecell(this.parseInline(d.header[s].tokens),{header:!0,align:d.align[s]});for(l+=this.renderer.tablerow(f),h="",o=d.rows.length,s=0;s<o;s++){for(a=d.rows[s],f="",c=a.length,u=0;u<c;u++)f+=this.renderer.tablecell(this.parseInline(a[u].tokens),{header:!1,align:d.align[u]});h+=this.renderer.tablerow(f)}i+=this.renderer.table(l,h);continue}case"blockquote":{h=this.parse(d.tokens),i+=this.renderer.blockquote(h);continue}case"list":{for(g=d.ordered,p=d.start,m=d.loose,o=d.items.length,h="",s=0;s<o;s++)v=d.items[s],A=v.checked,_=v.task,w="",v.task&&(E=this.renderer.checkbox(A),m?v.tokens.length>0&&v.tokens[0].type==="paragraph"?(v.tokens[0].text=E+" "+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=E+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:E}):w+=E),w+=this.parse(v.tokens,m),h+=this.renderer.listitem(w,_,A);i+=this.renderer.list(h,g,p);continue}case"html":{i+=this.renderer.html(d.text);continue}case"paragraph":{i+=this.renderer.paragraph(this.parseInline(d.tokens));continue}case"text":{for(h=d.tokens?this.parseInline(d.tokens):d.text;r+1<x&&t[r+1].type==="text";)d=t[++r],h+=`
|
|
`+(d.tokens?this.parseInline(d.tokens):d.text);i+=n?this.renderer.paragraph(h):h;continue}default:{const y='Token with "'+d.type+'" type was not found.';if(this.options.silent){console.error(y);return}else throw new Error(y)}}}return i}parseInline(t,n){n=n||this.renderer;let i="",r,s,u;const o=t.length;for(r=0;r<o;r++){if(s=t[r],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]&&(u=this.options.extensions.renderers[s.type].call({parser:this},s),u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type))){i+=u||"";continue}switch(s.type){case"escape":{i+=n.text(s.text);break}case"html":{i+=n.html(s.text);break}case"link":{i+=n.link(s.href,s.title,this.parseInline(s.tokens,n));break}case"image":{i+=n.image(s.href,s.title,s.text);break}case"strong":{i+=n.strong(this.parseInline(s.tokens,n));break}case"em":{i+=n.em(this.parseInline(s.tokens,n));break}case"codespan":{i+=n.codespan(s.text);break}case"br":{i+=n.br();break}case"del":{i+=n.del(this.parseInline(s.tokens,n));break}case"text":{i+=n.text(s.text);break}default:{const c='Token with "'+s.type+'" type was not found.';if(this.options.silent){console.error(c);return}else throw new Error(c)}}}return i}}function Se(e,t,n){if(typeof e=="undefined"||e===null)throw new Error("marked(): input parameter is undefined or null");if(typeof e!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(typeof t=="function"&&(n=t,t=null),t=an({},Se.defaults,t||{}),Yp(t),n){const i=t.highlight;let r;try{r=Pn.lex(e,t)}catch(o){return n(o)}const s=function(o){let c;if(!o)try{t.walkTokens&&Se.walkTokens(r,t.walkTokens),c=zn.parse(r,t)}catch(a){o=a}return t.highlight=i,o?n(o):n(null,c)};if(!i||i.length<3||(delete t.highlight,!r.length))return s();let u=0;Se.walkTokens(r,function(o){o.type==="code"&&(u++,setTimeout(()=>{i(o.text,o.lang,function(c,a){if(c)return s(c);a!=null&&a!==o.text&&(o.text=a,o.escaped=!0),u--,u===0&&s()})},0))}),u===0&&s();return}try{const i=Pn.lex(e,t);return t.walkTokens&&Se.walkTokens(i,t.walkTokens),zn.parse(i,t)}catch(i){if(i.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,t.silent)return"<p>An error occurred:</p><pre>"+wt(i.message+"",!0)+"</pre>";throw i}}Se.options=Se.setOptions=function(e){return an(Se.defaults,e),Mx(Se.defaults),Se};Se.getDefaults=Xp;Se.defaults=Ar;Se.use=function(...e){const t=an({},...e),n=Se.defaults.extensions||{renderers:{},childTokens:{}};let i;e.forEach(r=>{if(r.extensions&&(i=!0,r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if(s.renderer){const u=n.renderers?n.renderers[s.name]:null;u?n.renderers[s.name]=function(...o){let c=s.renderer.apply(this,o);return c===!1&&(c=u.apply(this,o)),c}: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)})),r.renderer){const s=Se.defaults.renderer||new xc;for(const u in r.renderer){const o=s[u];s[u]=(...c)=>{let a=r.renderer[u].apply(s,c);return a===!1&&(a=o.apply(s,c)),a}}t.renderer=s}if(r.tokenizer){const s=Se.defaults.tokenizer||new bc;for(const u in r.tokenizer){const o=s[u];s[u]=(...c)=>{let a=r.tokenizer[u].apply(s,c);return a===!1&&(a=o.apply(s,c)),a}}t.tokenizer=s}if(r.walkTokens){const s=Se.defaults.walkTokens;t.walkTokens=function(u){r.walkTokens.call(this,u),s&&s.call(this,u)}}i&&(t.extensions=n),Se.setOptions(t)})};Se.walkTokens=function(e,t){for(const n of e)switch(t.call(Se,n),n.type){case"table":{for(const i of n.header)Se.walkTokens(i.tokens,t);for(const i of n.rows)for(const r of i)Se.walkTokens(r.tokens,t);break}case"list":{Se.walkTokens(n.items,t);break}default:Se.defaults.extensions&&Se.defaults.extensions.childTokens&&Se.defaults.extensions.childTokens[n.type]?Se.defaults.extensions.childTokens[n.type].forEach(function(i){Se.walkTokens(n[i],t)}):n.tokens&&Se.walkTokens(n.tokens,t)}};Se.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=an({},Se.defaults,t||{}),Yp(t);try{const n=Pn.lexInline(e,t);return t.walkTokens&&Se.walkTokens(n,t.walkTokens),zn.parseInline(n,t)}catch(n){if(n.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,t.silent)return"<p>An error occurred:</p><pre>"+wt(n.message+"",!0)+"</pre>";throw n}};Se.Parser=zn;Se.parser=zn.parse;Se.Renderer=xc;Se.TextRenderer=Zp;Se.Lexer=Pn;Se.lexer=Pn.lex;Se.Tokenizer=bc;Se.Slugger=qp;Se.parse=Se;zn.parse;Pn.lex;function Zx({change:e,activeTags:t,toggleTag:n}){return S("div",{class:"changelog-entry"},S("div",{class:"changelog-version"},S(wf,Ce({},e.version)),S(wf,Ce({},e.group))),S("div",{class:"changelog-tags"},e.tags.map(i=>S(Ss,{label:i,onClick:n?()=>n(i):void 0,active:t==null?void 0:t.includes(i)}))),S("div",{class:"changelog-content",dangerouslySetInnerHTML:{__html:Se(e.content)}}))}function wf({id:e,article:t}){return t===null?S("span",null,e):S("a",{href:`https://www.minecraft.net/en-us/article/${t}`,target:"_blank"},e)}function Ss({label:e,active:t,onClick:n}){const i=e==="breaking"?5:zd(e)%360;return S("div",{class:`changelog-tag${t?" active":""}${n?" clickable":""}`,style:`--tint: ${i}`,onClick:n},e==="breaking"&&$e.alert,e)}function Qp({changes:e,defaultOrder:t}){const{locale:n}=rt(),[i,r]=oe(""),[s,u]=oe([]),o=h=>{s.includes(h)?u(s.filter(d=>d!==h)):u([...s,h])},c=Qe(()=>{const h=i.split(" ").map(d=>d.trim().toLowerCase()).filter(d=>d.length>0);return h.length===0&&s.length===0?e:e==null?void 0:e.filter(d=>{if(!s.every(p=>d.tags.includes(p)))return!1;const g=d.tags.join(" ")+" "+d.content.toLowerCase();return h.every(p=>p.startsWith("!")?p.length===1||!g.includes(p.slice(1)):g.includes(p))})},[e,i,s]),[a,f]=oe(t==="desc"),l=Qe(()=>c==null?void 0:c.sort((h,d)=>a?d.order-h.order:h.order-d.order),[c,a]);return S(De,null,S("div",{class:"changelog-query"},S(Ei,{class:"btn btn-input changelog-search",list:"sound-list",placeholder:n("changelog.search"),value:i,onChange:r}),S(Ee,{icon:a?"sort_desc":"sort_asc",label:a?"Newest first":"Oldest first",onClick:()=>f(!a)})),s.length>0&&S("div",{class:"changelog-tags"},s.map(h=>S(Ss,{label:h,onClick:()=>u(s.filter(d=>d!==h))}))),S("div",{class:"changelog-list"},l===void 0?S("span",{class:"note"},n("loading")):l.length===0?S("span",{class:"note"},n("changelog.no_results")):l.map(h=>S(Zx,{change:h,activeTags:s,toggleTag:o}))))}function qx({version:e}){const{locale:t}=rt(),[n,i]=oe("changelog"),[r,s]=oe(void 0);xe(()=>{Vd().then(o=>s(o.map(c=>tt(Ce({},c),{tags:c.tags.filter(a=>a!==c.group.id)})))).catch(o=>console.error(o))},[]);const u=Qe(()=>r==null?void 0:r.filter(o=>o.version.id===e.id||o.group.id===e.id),[e.id,r]);return S(De,null,S("div",{class:"version-detail"},S("h2",null,e.name),S("div",{class:"version-info"},S(Ln,{label:t("versions.released"),value:eg(e)}),S(Ln,{label:t("versions.release_target"),value:e.release_target,link:e.id!==e.release_target?`/versions/?id=${e.release_target}`:void 0}),S(Ln,{label:t("versions.data_version"),value:e.data_version}),S(Ln,{label:t("versions.protocol_version"),value:e.protocol_version}),S(Ln,{label:t("versions.data_pack_format"),value:e.data_pack_version}),S(Ln,{label:t("versions.resource_pack_format"),value:e.resource_pack_version})),S("div",{class:"version-tabs"},S("span",{class:n==="changelog"?"selected":"",onClick:()=>i("changelog")},t("versions.technical_changes")),S("span",{class:n==="discussion"?"selected":"",onClick:()=>i("discussion")},t("versions.discussion"))),S("div",{class:"version-tab"},n==="changelog"&&S(Qp,{changes:u,defaultOrder:"asc"}),n==="discussion"&&S(Ec,{term:`version/${e.id}`}))))}function eg(e){return new Date(e.release_time).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}function Qx({version:e,link:t}){const{locale:n}=rt();return S("a",{class:"version-entry",href:t},S("span",{class:"version-id"},e.id),S(Ln,{label:n("versions.released"),value:eg(e),compact:!0}),S(Ln,{label:n("versions.data_version"),value:e.data_version,optional:!0}),S(Ln,{label:n("versions.pack_format"),value:e.data_pack_version,optional:!0}))}function eC({versions:e,link:t}){const{locale:n}=rt(),[i,r]=oe(!0),[s,u]=oe(""),o=Qe(()=>e.filter(c=>c.type==="snapshot"&&!i?!1:c.id.includes(s)),[e,i,s]);return S(De,null,S("div",{class:"versions-controls"},S(Ei,{class:"btn btn-input version-search",placeholder:n("versions.search"),value:s,onChange:u}),S(vw,{label:"Include snapshots",value:i,onChange:r})),S("div",{class:"version-list"},o.map(c=>S(Qx,{version:c,link:t==null?void 0:t(c.id)})),o.length===0&&S("span",null,n("versions.no_results"))))}function Ln({label:e,value:t,link:n,compact:i,optional:r}){return S("div",{class:`version-metadata${r?" version-metadata-hide":""}`},S("span",{class:i?"version-metadata-hide":void 0},e,": "),S("span",{class:"version-metadata-value"},t),n&&S("a",{href:n,class:"version-metadata-link"},$e.link_external))}function tC({title:e,link:t,versions:n,tags:i,activeTags:r,toggleTag:s}){const u=o=>c=>{s&&s(o),c.preventDefault(),c.stopImmediatePropagation()};return S("a",{class:"guide-card",href:t},S("span",{class:"guide-versions"},n.join(" \u2022 ")),S("h3",null,e),S("div",{class:"guide-tags"},i.sort().map(o=>S(Ss,{label:o,onClick:u(o),active:r==null?void 0:r.includes(o)}))))}const _f={system:"device_desktop",dark:"moon",light:"sun"};function nC(){const{lang:e,locale:t,changeLanguage:n}=rt(),{theme:i,changeTheme:r}=s0(),{version:s}=vr(),{title:u}=on(),o=Ud(er());return S("header",null,S("div",{class:"title"},S(Kf,{class:"home-link",href:"/","aria-label":t("home"),"data-cy":"home-link"},tg.home),S("h1",null,u),o&&S($t,{icon:"chevron_down",tooltip:t("switch_generator"),"data-cy":"generator-switcher"},He.generators.filter(c=>c.category===(o==null?void 0:o.category)&&Mt(s,c.minVersion)).map(c=>S(Ee,{label:t(c.id),active:c.id===o.id,onClick:()=>ri(Nn(c.url))})))),S("nav",null,S("ul",null,S("li",{"data-cy":"language-switcher"},S($t,{icon:"globe",tooltip:t("language")},He.languages.map(({code:c,name:a})=>S(Ee,{label:a,active:c===e,onClick:()=>n(c)})))),S("li",{"data-cy":"theme-switcher"},S($t,{icon:_f[i],tooltip:t("theme")},Object.entries(_f).map(([c,a])=>S(Ee,{icon:a,label:t(`theme.${c}`),active:c===i,onClick:()=>r(c)})))),S("li",{class:"dimmed"},S("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer",class:"tooltipped tip-sw","aria-label":t("github")},$e.mark_github)))))}const tg={home:S("svg",{width:"32",height:"28",viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S("rect",{width:"26",height:"6",rx:"3",fill:"#7CB45C"}),S("rect",{x:"8",width:"18",height:"6",rx:"3",fill:"#4BA041"}),S("rect",{y:"11",width:"32",height:"6",rx:"3",fill:"#AAA8A8"}),S("rect",{x:"11",y:"11",width:"21",height:"6",rx:"3",fill:"#91908F"}),S("rect",{x:"11",y:"22",width:"21",height:"6",rx:"3",fill:"#70B5C3"}),S("rect",{x:"17",y:"22",width:"15",height:"6",rx:"3",fill:"#4D989B"})),report:S("svg",{width:"30",height:"36",viewBox:"0 0 30 36",xmlns:"http://www.w3.org/2000/svg"},S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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:S("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},S("circle",{cx:"10",cy:"10",r:"10",fill:"#451475"}),S("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"}))};var ng={};/*!
|
|
* howler.js v2.2.3
|
|
* howlerjs.com
|
|
*
|
|
* (c) 2013-2020, James Simpson of GoldFire Studios
|
|
* goldfirestudios.com
|
|
*
|
|
* MIT License
|
|
*/(function(e){(function(){var t=function(){this.init()};t.prototype={init:function(){var l=this||n;return l._counter=1e3,l._html5AudioPool=[],l.html5PoolSize=10,l._codecs={},l._howls=[],l._muted=!1,l._volume=1,l._canPlayEvent="canplaythrough",l._navigator=typeof window!="undefined"&&window.navigator?window.navigator:null,l.masterGain=null,l.noAudio=!1,l.usingWebAudio=!0,l.autoSuspend=!0,l.ctx=null,l.autoUnlock=!0,l._setup(),l},volume:function(l){var h=this||n;if(l=parseFloat(l),h.ctx||f(),typeof l!="undefined"&&l>=0&&l<=1){if(h._volume=l,h._muted)return h;h.usingWebAudio&&h.masterGain.gain.setValueAtTime(l,n.ctx.currentTime);for(var d=0;d<h._howls.length;d++)if(!h._howls[d]._webAudio)for(var g=h._howls[d]._getSoundIds(),p=0;p<g.length;p++){var m=h._howls[d]._soundById(g[p]);m&&m._node&&(m._node.volume=m._volume*l)}return h}return h._volume},mute:function(l){var h=this||n;h.ctx||f(),h._muted=l,h.usingWebAudio&&h.masterGain.gain.setValueAtTime(l?0:h._volume,n.ctx.currentTime);for(var d=0;d<h._howls.length;d++)if(!h._howls[d]._webAudio)for(var g=h._howls[d]._getSoundIds(),p=0;p<g.length;p++){var m=h._howls[d]._soundById(g[p]);m&&m._node&&(m._node.muted=l?!0:m._muted)}return h},stop:function(){for(var l=this||n,h=0;h<l._howls.length;h++)l._howls[h].stop();return l},unload:function(){for(var l=this||n,h=l._howls.length-1;h>=0;h--)l._howls[h].unload();return l.usingWebAudio&&l.ctx&&typeof l.ctx.close!="undefined"&&(l.ctx.close(),l.ctx=null,f()),l},codecs:function(l){return(this||n)._codecs[l.replace(/^x-/,"")]},_setup:function(){var l=this||n;if(l.state=l.ctx&&l.ctx.state||"suspended",l._autoSuspend(),!l.usingWebAudio)if(typeof Audio!="undefined")try{var h=new Audio;typeof h.oncanplaythrough=="undefined"&&(l._canPlayEvent="canplay")}catch{l.noAudio=!0}else l.noAudio=!0;try{var h=new Audio;h.muted&&(l.noAudio=!0)}catch{}return l.noAudio||l._setupCodecs(),l},_setupCodecs:function(){var l=this||n,h=null;try{h=typeof Audio!="undefined"?new Audio:null}catch{return l}if(!h||typeof h.canPlayType!="function")return l;var d=h.canPlayType("audio/mpeg;").replace(/^no$/,""),g=l._navigator?l._navigator.userAgent:"",p=g.match(/OPR\/([0-6].)/g),m=p&&parseInt(p[0].split("/")[1],10)<33,w=g.indexOf("Safari")!==-1&&g.indexOf("Chrome")===-1,v=g.match(/Version\/(.*?) /),A=w&&v&&parseInt(v[1],10)<15;return l._codecs={mp3:!!(!m&&(d||h.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!d,opus:!!h.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!h.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!h.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(h.canPlayType('audio/wav; codecs="1"')||h.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!h.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!h.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(h.canPlayType("audio/x-m4a;")||h.canPlayType("audio/m4a;")||h.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(h.canPlayType("audio/x-m4b;")||h.canPlayType("audio/m4b;")||h.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(h.canPlayType("audio/x-mp4;")||h.canPlayType("audio/mp4;")||h.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!A&&h.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!A&&h.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!h.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(h.canPlayType("audio/x-flac;")||h.canPlayType("audio/flac;")).replace(/^no$/,"")},l},_unlockAudio:function(){var l=this||n;if(!(l._audioUnlocked||!l.ctx)){l._audioUnlocked=!1,l.autoUnlock=!1,!l._mobileUnloaded&&l.ctx.sampleRate!==44100&&(l._mobileUnloaded=!0,l.unload()),l._scratchBuffer=l.ctx.createBuffer(1,1,22050);var h=function(d){for(;l._html5AudioPool.length<l.html5PoolSize;)try{var g=new Audio;g._unlocked=!0,l._releaseHtml5Audio(g)}catch{l.noAudio=!0;break}for(var p=0;p<l._howls.length;p++)if(!l._howls[p]._webAudio)for(var m=l._howls[p]._getSoundIds(),w=0;w<m.length;w++){var v=l._howls[p]._soundById(m[w]);v&&v._node&&!v._node._unlocked&&(v._node._unlocked=!0,v._node.load())}l._autoResume();var A=l.ctx.createBufferSource();A.buffer=l._scratchBuffer,A.connect(l.ctx.destination),typeof A.start=="undefined"?A.noteOn(0):A.start(0),typeof l.ctx.resume=="function"&&l.ctx.resume(),A.onended=function(){A.disconnect(0),l._audioUnlocked=!0,document.removeEventListener("touchstart",h,!0),document.removeEventListener("touchend",h,!0),document.removeEventListener("click",h,!0),document.removeEventListener("keydown",h,!0);for(var _=0;_<l._howls.length;_++)l._howls[_]._emit("unlock")}};return document.addEventListener("touchstart",h,!0),document.addEventListener("touchend",h,!0),document.addEventListener("click",h,!0),document.addEventListener("keydown",h,!0),l}},_obtainHtml5Audio:function(){var l=this||n;if(l._html5AudioPool.length)return l._html5AudioPool.pop();var h=new Audio().play();return h&&typeof Promise!="undefined"&&(h instanceof Promise||typeof h.then=="function")&&h.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(l){var h=this||n;return l._unlocked&&h._html5AudioPool.push(l),h},_autoSuspend:function(){var l=this;if(!(!l.autoSuspend||!l.ctx||typeof l.ctx.suspend=="undefined"||!n.usingWebAudio)){for(var h=0;h<l._howls.length;h++)if(l._howls[h]._webAudio){for(var d=0;d<l._howls[h]._sounds.length;d++)if(!l._howls[h]._sounds[d]._paused)return l}return l._suspendTimer&&clearTimeout(l._suspendTimer),l._suspendTimer=setTimeout(function(){if(!!l.autoSuspend){l._suspendTimer=null,l.state="suspending";var g=function(){l.state="suspended",l._resumeAfterSuspend&&(delete l._resumeAfterSuspend,l._autoResume())};l.ctx.suspend().then(g,g)}},3e4),l}},_autoResume:function(){var l=this;if(!(!l.ctx||typeof l.ctx.resume=="undefined"||!n.usingWebAudio))return l.state==="running"&&l.ctx.state!=="interrupted"&&l._suspendTimer?(clearTimeout(l._suspendTimer),l._suspendTimer=null):l.state==="suspended"||l.state==="running"&&l.ctx.state==="interrupted"?(l.ctx.resume().then(function(){l.state="running";for(var h=0;h<l._howls.length;h++)l._howls[h]._emit("resume")}),l._suspendTimer&&(clearTimeout(l._suspendTimer),l._suspendTimer=null)):l.state==="suspending"&&(l._resumeAfterSuspend=!0),l}};var n=new t,i=function(l){var h=this;if(!l.src||l.src.length===0){console.error("An array of source files must be passed with any new Howl.");return}h.init(l)};i.prototype={init:function(l){var h=this;return n.ctx||f(),h._autoplay=l.autoplay||!1,h._format=typeof l.format!="string"?l.format:[l.format],h._html5=l.html5||!1,h._muted=l.mute||!1,h._loop=l.loop||!1,h._pool=l.pool||5,h._preload=typeof l.preload=="boolean"||l.preload==="metadata"?l.preload:!0,h._rate=l.rate||1,h._sprite=l.sprite||{},h._src=typeof l.src!="string"?l.src:[l.src],h._volume=l.volume!==void 0?l.volume:1,h._xhr={method:l.xhr&&l.xhr.method?l.xhr.method:"GET",headers:l.xhr&&l.xhr.headers?l.xhr.headers:null,withCredentials:l.xhr&&l.xhr.withCredentials?l.xhr.withCredentials:!1},h._duration=0,h._state="unloaded",h._sounds=[],h._endTimers={},h._queue=[],h._playLock=!1,h._onend=l.onend?[{fn:l.onend}]:[],h._onfade=l.onfade?[{fn:l.onfade}]:[],h._onload=l.onload?[{fn:l.onload}]:[],h._onloaderror=l.onloaderror?[{fn:l.onloaderror}]:[],h._onplayerror=l.onplayerror?[{fn:l.onplayerror}]:[],h._onpause=l.onpause?[{fn:l.onpause}]:[],h._onplay=l.onplay?[{fn:l.onplay}]:[],h._onstop=l.onstop?[{fn:l.onstop}]:[],h._onmute=l.onmute?[{fn:l.onmute}]:[],h._onvolume=l.onvolume?[{fn:l.onvolume}]:[],h._onrate=l.onrate?[{fn:l.onrate}]:[],h._onseek=l.onseek?[{fn:l.onseek}]:[],h._onunlock=l.onunlock?[{fn:l.onunlock}]:[],h._onresume=[],h._webAudio=n.usingWebAudio&&!h._html5,typeof n.ctx!="undefined"&&n.ctx&&n.autoUnlock&&n._unlockAudio(),n._howls.push(h),h._autoplay&&h._queue.push({event:"play",action:function(){h.play()}}),h._preload&&h._preload!=="none"&&h.load(),h},load:function(){var l=this,h=null;if(n.noAudio){l._emit("loaderror",null,"No audio support.");return}typeof l._src=="string"&&(l._src=[l._src]);for(var d=0;d<l._src.length;d++){var g,p;if(l._format&&l._format[d])g=l._format[d];else{if(p=l._src[d],typeof p!="string"){l._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}g=/^data:audio\/([^;,]+);/i.exec(p),g||(g=/\.([^.]+)$/.exec(p.split("?",1)[0])),g&&(g=g[1].toLowerCase())}if(g||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),g&&n.codecs(g)){h=l._src[d];break}}if(!h){l._emit("loaderror",null,"No codec support for selected audio sources.");return}return l._src=h,l._state="loading",window.location.protocol==="https:"&&h.slice(0,5)==="http:"&&(l._html5=!0,l._webAudio=!1),new r(l),l._webAudio&&u(l),l},play:function(l,h){var d=this,g=null;if(typeof l=="number")g=l,l=null;else{if(typeof l=="string"&&d._state==="loaded"&&!d._sprite[l])return null;if(typeof l=="undefined"&&(l="__default",!d._playLock)){for(var p=0,m=0;m<d._sounds.length;m++)d._sounds[m]._paused&&!d._sounds[m]._ended&&(p++,g=d._sounds[m]._id);p===1?l=null:g=null}}var w=g?d._soundById(g):d._inactiveSound();if(!w)return null;if(g&&!l&&(l=w._sprite||"__default"),d._state!=="loaded"){w._sprite=l,w._ended=!1;var v=w._id;return d._queue.push({event:"play",action:function(){d.play(v)}}),v}if(g&&!w._paused)return h||d._loadQueue("play"),w._id;d._webAudio&&n._autoResume();var A=Math.max(0,w._seek>0?w._seek:d._sprite[l][0]/1e3),_=Math.max(0,(d._sprite[l][0]+d._sprite[l][1])/1e3-A),E=_*1e3/Math.abs(w._rate),b=d._sprite[l][0]/1e3,x=(d._sprite[l][0]+d._sprite[l][1])/1e3;w._sprite=l,w._ended=!1;var y=function(){w._paused=!1,w._seek=A,w._start=b,w._stop=x,w._loop=!!(w._loop||d._sprite[l][2])};if(A>=x){d._ended(w);return}var C=w._node;if(d._webAudio){var B=function(){d._playLock=!1,y(),d._refreshBuffer(w);var I=w._muted||d._muted?0:w._volume;C.gain.setValueAtTime(I,n.ctx.currentTime),w._playStart=n.ctx.currentTime,typeof C.bufferSource.start=="undefined"?w._loop?C.bufferSource.noteGrainOn(0,A,86400):C.bufferSource.noteGrainOn(0,A,_):w._loop?C.bufferSource.start(0,A,86400):C.bufferSource.start(0,A,_),E!==1/0&&(d._endTimers[w._id]=setTimeout(d._ended.bind(d,w),E)),h||setTimeout(function(){d._emit("play",w._id),d._loadQueue()},0)};n.state==="running"&&n.ctx.state!=="interrupted"?B():(d._playLock=!0,d.once("resume",B),d._clearTimer(w._id))}else{var T=function(){C.currentTime=A,C.muted=w._muted||d._muted||n._muted||C.muted,C.volume=w._volume*n.volume(),C.playbackRate=w._rate;try{var I=C.play();if(I&&typeof Promise!="undefined"&&(I instanceof Promise||typeof I.then=="function")?(d._playLock=!0,y(),I.then(function(){d._playLock=!1,C._unlocked=!0,h?d._loadQueue():d._emit("play",w._id)}).catch(function(){d._playLock=!1,d._emit("playerror",w._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),w._ended=!0,w._paused=!0})):h||(d._playLock=!1,y(),d._emit("play",w._id)),C.playbackRate=w._rate,C.paused){d._emit("playerror",w._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}l!=="__default"||w._loop?d._endTimers[w._id]=setTimeout(d._ended.bind(d,w),E):(d._endTimers[w._id]=function(){d._ended(w),C.removeEventListener("ended",d._endTimers[w._id],!1)},C.addEventListener("ended",d._endTimers[w._id],!1))}catch(H){d._emit("playerror",w._id,H)}};C.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(C.src=d._src,C.load());var M=window&&window.ejecta||!C.readyState&&n._navigator.isCocoonJS;if(C.readyState>=3||M)T();else{d._playLock=!0,d._state="loading";var R=function(){d._state="loaded",T(),C.removeEventListener(n._canPlayEvent,R,!1)};C.addEventListener(n._canPlayEvent,R,!1),d._clearTimer(w._id)}}return w._id},pause:function(l){var h=this;if(h._state!=="loaded"||h._playLock)return h._queue.push({event:"pause",action:function(){h.pause(l)}}),h;for(var d=h._getSoundIds(l),g=0;g<d.length;g++){h._clearTimer(d[g]);var p=h._soundById(d[g]);if(p&&!p._paused&&(p._seek=h.seek(d[g]),p._rateSeek=0,p._paused=!0,h._stopFade(d[g]),p._node))if(h._webAudio){if(!p._node.bufferSource)continue;typeof p._node.bufferSource.stop=="undefined"?p._node.bufferSource.noteOff(0):p._node.bufferSource.stop(0),h._cleanBuffer(p._node)}else(!isNaN(p._node.duration)||p._node.duration===1/0)&&p._node.pause();arguments[1]||h._emit("pause",p?p._id:null)}return h},stop:function(l,h){var d=this;if(d._state!=="loaded"||d._playLock)return d._queue.push({event:"stop",action:function(){d.stop(l)}}),d;for(var g=d._getSoundIds(l),p=0;p<g.length;p++){d._clearTimer(g[p]);var m=d._soundById(g[p]);m&&(m._seek=m._start||0,m._rateSeek=0,m._paused=!0,m._ended=!0,d._stopFade(g[p]),m._node&&(d._webAudio?m._node.bufferSource&&(typeof m._node.bufferSource.stop=="undefined"?m._node.bufferSource.noteOff(0):m._node.bufferSource.stop(0),d._cleanBuffer(m._node)):(!isNaN(m._node.duration)||m._node.duration===1/0)&&(m._node.currentTime=m._start||0,m._node.pause(),m._node.duration===1/0&&d._clearSound(m._node))),h||d._emit("stop",m._id))}return d},mute:function(l,h){var d=this;if(d._state!=="loaded"||d._playLock)return d._queue.push({event:"mute",action:function(){d.mute(l,h)}}),d;if(typeof h=="undefined")if(typeof l=="boolean")d._muted=l;else return d._muted;for(var g=d._getSoundIds(h),p=0;p<g.length;p++){var m=d._soundById(g[p]);m&&(m._muted=l,m._interval&&d._stopFade(m._id),d._webAudio&&m._node?m._node.gain.setValueAtTime(l?0:m._volume,n.ctx.currentTime):m._node&&(m._node.muted=n._muted?!0:l),d._emit("mute",m._id))}return d},volume:function(){var l=this,h=arguments,d,g;if(h.length===0)return l._volume;if(h.length===1||h.length===2&&typeof h[1]=="undefined"){var p=l._getSoundIds(),m=p.indexOf(h[0]);m>=0?g=parseInt(h[0],10):d=parseFloat(h[0])}else h.length>=2&&(d=parseFloat(h[0]),g=parseInt(h[1],10));var w;if(typeof d!="undefined"&&d>=0&&d<=1){if(l._state!=="loaded"||l._playLock)return l._queue.push({event:"volume",action:function(){l.volume.apply(l,h)}}),l;typeof g=="undefined"&&(l._volume=d),g=l._getSoundIds(g);for(var v=0;v<g.length;v++)w=l._soundById(g[v]),w&&(w._volume=d,h[2]||l._stopFade(g[v]),l._webAudio&&w._node&&!w._muted?w._node.gain.setValueAtTime(d,n.ctx.currentTime):w._node&&!w._muted&&(w._node.volume=d*n.volume()),l._emit("volume",w._id))}else return w=g?l._soundById(g):l._sounds[0],w?w._volume:0;return l},fade:function(l,h,d,g){var p=this;if(p._state!=="loaded"||p._playLock)return p._queue.push({event:"fade",action:function(){p.fade(l,h,d,g)}}),p;l=Math.min(Math.max(0,parseFloat(l)),1),h=Math.min(Math.max(0,parseFloat(h)),1),d=parseFloat(d),p.volume(l,g);for(var m=p._getSoundIds(g),w=0;w<m.length;w++){var v=p._soundById(m[w]);if(v){if(g||p._stopFade(m[w]),p._webAudio&&!v._muted){var A=n.ctx.currentTime,_=A+d/1e3;v._volume=l,v._node.gain.setValueAtTime(l,A),v._node.gain.linearRampToValueAtTime(h,_)}p._startFadeInterval(v,l,h,d,m[w],typeof g=="undefined")}}return p},_startFadeInterval:function(l,h,d,g,p,m){var w=this,v=h,A=d-h,_=Math.abs(A/.01),E=Math.max(4,_>0?g/_:g),b=Date.now();l._fadeTo=d,l._interval=setInterval(function(){var x=(Date.now()-b)/g;b=Date.now(),v+=A*x,v=Math.round(v*100)/100,A<0?v=Math.max(d,v):v=Math.min(d,v),w._webAudio?l._volume=v:w.volume(v,l._id,!0),m&&(w._volume=v),(d<h&&v<=d||d>h&&v>=d)&&(clearInterval(l._interval),l._interval=null,l._fadeTo=null,w.volume(d,l._id),w._emit("fade",l._id))},E)},_stopFade:function(l){var h=this,d=h._soundById(l);return d&&d._interval&&(h._webAudio&&d._node.gain.cancelScheduledValues(n.ctx.currentTime),clearInterval(d._interval),d._interval=null,h.volume(d._fadeTo,l),d._fadeTo=null,h._emit("fade",l)),h},loop:function(){var l=this,h=arguments,d,g,p;if(h.length===0)return l._loop;if(h.length===1)if(typeof h[0]=="boolean")d=h[0],l._loop=d;else return p=l._soundById(parseInt(h[0],10)),p?p._loop:!1;else h.length===2&&(d=h[0],g=parseInt(h[1],10));for(var m=l._getSoundIds(g),w=0;w<m.length;w++)p=l._soundById(m[w]),p&&(p._loop=d,l._webAudio&&p._node&&p._node.bufferSource&&(p._node.bufferSource.loop=d,d&&(p._node.bufferSource.loopStart=p._start||0,p._node.bufferSource.loopEnd=p._stop,l.playing(m[w])&&(l.pause(m[w],!0),l.play(m[w],!0)))));return l},rate:function(){var l=this,h=arguments,d,g;if(h.length===0)g=l._sounds[0]._id;else if(h.length===1){var p=l._getSoundIds(),m=p.indexOf(h[0]);m>=0?g=parseInt(h[0],10):d=parseFloat(h[0])}else h.length===2&&(d=parseFloat(h[0]),g=parseInt(h[1],10));var w;if(typeof d=="number"){if(l._state!=="loaded"||l._playLock)return l._queue.push({event:"rate",action:function(){l.rate.apply(l,h)}}),l;typeof g=="undefined"&&(l._rate=d),g=l._getSoundIds(g);for(var v=0;v<g.length;v++)if(w=l._soundById(g[v]),w){l.playing(g[v])&&(w._rateSeek=l.seek(g[v]),w._playStart=l._webAudio?n.ctx.currentTime:w._playStart),w._rate=d,l._webAudio&&w._node&&w._node.bufferSource?w._node.bufferSource.playbackRate.setValueAtTime(d,n.ctx.currentTime):w._node&&(w._node.playbackRate=d);var A=l.seek(g[v]),_=(l._sprite[w._sprite][0]+l._sprite[w._sprite][1])/1e3-A,E=_*1e3/Math.abs(w._rate);(l._endTimers[g[v]]||!w._paused)&&(l._clearTimer(g[v]),l._endTimers[g[v]]=setTimeout(l._ended.bind(l,w),E)),l._emit("rate",w._id)}}else return w=l._soundById(g),w?w._rate:l._rate;return l},seek:function(){var l=this,h=arguments,d,g;if(h.length===0)l._sounds.length&&(g=l._sounds[0]._id);else if(h.length===1){var p=l._getSoundIds(),m=p.indexOf(h[0]);m>=0?g=parseInt(h[0],10):l._sounds.length&&(g=l._sounds[0]._id,d=parseFloat(h[0]))}else h.length===2&&(d=parseFloat(h[0]),g=parseInt(h[1],10));if(typeof g=="undefined")return 0;if(typeof d=="number"&&(l._state!=="loaded"||l._playLock))return l._queue.push({event:"seek",action:function(){l.seek.apply(l,h)}}),l;var w=l._soundById(g);if(w)if(typeof d=="number"&&d>=0){var v=l.playing(g);v&&l.pause(g,!0),w._seek=d,w._ended=!1,l._clearTimer(g),!l._webAudio&&w._node&&!isNaN(w._node.duration)&&(w._node.currentTime=d);var A=function(){v&&l.play(g,!0),l._emit("seek",g)};if(v&&!l._webAudio){var _=function(){l._playLock?setTimeout(_,0):A()};setTimeout(_,0)}else A()}else if(l._webAudio){var E=l.playing(g)?n.ctx.currentTime-w._playStart:0,b=w._rateSeek?w._rateSeek-w._seek:0;return w._seek+(b+E*Math.abs(w._rate))}else return w._node.currentTime;return l},playing:function(l){var h=this;if(typeof l=="number"){var d=h._soundById(l);return d?!d._paused:!1}for(var g=0;g<h._sounds.length;g++)if(!h._sounds[g]._paused)return!0;return!1},duration:function(l){var h=this,d=h._duration,g=h._soundById(l);return g&&(d=h._sprite[g._sprite][1]/1e3),d},state:function(){return this._state},unload:function(){for(var l=this,h=l._sounds,d=0;d<h.length;d++)h[d]._paused||l.stop(h[d]._id),l._webAudio||(l._clearSound(h[d]._node),h[d]._node.removeEventListener("error",h[d]._errorFn,!1),h[d]._node.removeEventListener(n._canPlayEvent,h[d]._loadFn,!1),h[d]._node.removeEventListener("ended",h[d]._endFn,!1),n._releaseHtml5Audio(h[d]._node)),delete h[d]._node,l._clearTimer(h[d]._id);var g=n._howls.indexOf(l);g>=0&&n._howls.splice(g,1);var p=!0;for(d=0;d<n._howls.length;d++)if(n._howls[d]._src===l._src||l._src.indexOf(n._howls[d]._src)>=0){p=!1;break}return s&&p&&delete s[l._src],n.noAudio=!1,l._state="unloaded",l._sounds=[],l=null,null},on:function(l,h,d,g){var p=this,m=p["_on"+l];return typeof h=="function"&&m.push(g?{id:d,fn:h,once:g}:{id:d,fn:h}),p},off:function(l,h,d){var g=this,p=g["_on"+l],m=0;if(typeof h=="number"&&(d=h,h=null),h||d)for(m=0;m<p.length;m++){var w=d===p[m].id;if(h===p[m].fn&&w||!h&&w){p.splice(m,1);break}}else if(l)g["_on"+l]=[];else{var v=Object.keys(g);for(m=0;m<v.length;m++)v[m].indexOf("_on")===0&&Array.isArray(g[v[m]])&&(g[v[m]]=[])}return g},once:function(l,h,d){var g=this;return g.on(l,h,d,1),g},_emit:function(l,h,d){for(var g=this,p=g["_on"+l],m=p.length-1;m>=0;m--)(!p[m].id||p[m].id===h||l==="load")&&(setTimeout(function(w){w.call(this,h,d)}.bind(g,p[m].fn),0),p[m].once&&g.off(l,p[m].fn,p[m].id));return g._loadQueue(l),g},_loadQueue:function(l){var h=this;if(h._queue.length>0){var d=h._queue[0];d.event===l&&(h._queue.shift(),h._loadQueue()),l||d.action()}return h},_ended:function(l){var h=this,d=l._sprite;if(!h._webAudio&&l._node&&!l._node.paused&&!l._node.ended&&l._node.currentTime<l._stop)return setTimeout(h._ended.bind(h,l),100),h;var g=!!(l._loop||h._sprite[d][2]);if(h._emit("end",l._id),!h._webAudio&&g&&h.stop(l._id,!0).play(l._id),h._webAudio&&g){h._emit("play",l._id),l._seek=l._start||0,l._rateSeek=0,l._playStart=n.ctx.currentTime;var p=(l._stop-l._start)*1e3/Math.abs(l._rate);h._endTimers[l._id]=setTimeout(h._ended.bind(h,l),p)}return h._webAudio&&!g&&(l._paused=!0,l._ended=!0,l._seek=l._start||0,l._rateSeek=0,h._clearTimer(l._id),h._cleanBuffer(l._node),n._autoSuspend()),!h._webAudio&&!g&&h.stop(l._id,!0),h},_clearTimer:function(l){var h=this;if(h._endTimers[l]){if(typeof h._endTimers[l]!="function")clearTimeout(h._endTimers[l]);else{var d=h._soundById(l);d&&d._node&&d._node.removeEventListener("ended",h._endTimers[l],!1)}delete h._endTimers[l]}return h},_soundById:function(l){for(var h=this,d=0;d<h._sounds.length;d++)if(l===h._sounds[d]._id)return h._sounds[d];return null},_inactiveSound:function(){var l=this;l._drain();for(var h=0;h<l._sounds.length;h++)if(l._sounds[h]._ended)return l._sounds[h].reset();return new r(l)},_drain:function(){var l=this,h=l._pool,d=0,g=0;if(!(l._sounds.length<h)){for(g=0;g<l._sounds.length;g++)l._sounds[g]._ended&&d++;for(g=l._sounds.length-1;g>=0;g--){if(d<=h)return;l._sounds[g]._ended&&(l._webAudio&&l._sounds[g]._node&&l._sounds[g]._node.disconnect(0),l._sounds.splice(g,1),d--)}}},_getSoundIds:function(l){var h=this;if(typeof l=="undefined"){for(var d=[],g=0;g<h._sounds.length;g++)d.push(h._sounds[g]._id);return d}else return[l]},_refreshBuffer:function(l){var h=this;return l._node.bufferSource=n.ctx.createBufferSource(),l._node.bufferSource.buffer=s[h._src],l._panner?l._node.bufferSource.connect(l._panner):l._node.bufferSource.connect(l._node),l._node.bufferSource.loop=l._loop,l._loop&&(l._node.bufferSource.loopStart=l._start||0,l._node.bufferSource.loopEnd=l._stop||0),l._node.bufferSource.playbackRate.setValueAtTime(l._rate,n.ctx.currentTime),h},_cleanBuffer:function(l){var h=this,d=n._navigator&&n._navigator.vendor.indexOf("Apple")>=0;if(n._scratchBuffer&&l.bufferSource&&(l.bufferSource.onended=null,l.bufferSource.disconnect(0),d))try{l.bufferSource.buffer=n._scratchBuffer}catch{}return l.bufferSource=null,h},_clearSound:function(l){var h=/MSIE |Trident\//.test(n._navigator&&n._navigator.userAgent);h||(l.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var r=function(l){this._parent=l,this.init()};r.prototype={init:function(){var l=this,h=l._parent;return l._muted=h._muted,l._loop=h._loop,l._volume=h._volume,l._rate=h._rate,l._seek=0,l._paused=!0,l._ended=!0,l._sprite="__default",l._id=++n._counter,h._sounds.push(l),l.create(),l},create:function(){var l=this,h=l._parent,d=n._muted||l._muted||l._parent._muted?0:l._volume;return h._webAudio?(l._node=typeof n.ctx.createGain=="undefined"?n.ctx.createGainNode():n.ctx.createGain(),l._node.gain.setValueAtTime(d,n.ctx.currentTime),l._node.paused=!0,l._node.connect(n.masterGain)):n.noAudio||(l._node=n._obtainHtml5Audio(),l._errorFn=l._errorListener.bind(l),l._node.addEventListener("error",l._errorFn,!1),l._loadFn=l._loadListener.bind(l),l._node.addEventListener(n._canPlayEvent,l._loadFn,!1),l._endFn=l._endListener.bind(l),l._node.addEventListener("ended",l._endFn,!1),l._node.src=h._src,l._node.preload=h._preload===!0?"auto":h._preload,l._node.volume=d*n.volume(),l._node.load()),l},reset:function(){var l=this,h=l._parent;return l._muted=h._muted,l._loop=h._loop,l._volume=h._volume,l._rate=h._rate,l._seek=0,l._rateSeek=0,l._paused=!0,l._ended=!0,l._sprite="__default",l._id=++n._counter,l},_errorListener:function(){var l=this;l._parent._emit("loaderror",l._id,l._node.error?l._node.error.code:0),l._node.removeEventListener("error",l._errorFn,!1)},_loadListener:function(){var l=this,h=l._parent;h._duration=Math.ceil(l._node.duration*10)/10,Object.keys(h._sprite).length===0&&(h._sprite={__default:[0,h._duration*1e3]}),h._state!=="loaded"&&(h._state="loaded",h._emit("load"),h._loadQueue()),l._node.removeEventListener(n._canPlayEvent,l._loadFn,!1)},_endListener:function(){var l=this,h=l._parent;h._duration===1/0&&(h._duration=Math.ceil(l._node.duration*10)/10,h._sprite.__default[1]===1/0&&(h._sprite.__default[1]=h._duration*1e3),h._ended(l)),l._node.removeEventListener("ended",l._endFn,!1)}};var s={},u=function(l){var h=l._src;if(s[h]){l._duration=s[h].duration,a(l);return}if(/^data:[^;]+;base64,/.test(h)){for(var d=atob(h.split(",")[1]),g=new Uint8Array(d.length),p=0;p<d.length;++p)g[p]=d.charCodeAt(p);c(g.buffer,l)}else{var m=new XMLHttpRequest;m.open(l._xhr.method,h,!0),m.withCredentials=l._xhr.withCredentials,m.responseType="arraybuffer",l._xhr.headers&&Object.keys(l._xhr.headers).forEach(function(w){m.setRequestHeader(w,l._xhr.headers[w])}),m.onload=function(){var w=(m.status+"")[0];if(w!=="0"&&w!=="2"&&w!=="3"){l._emit("loaderror",null,"Failed loading audio file with status: "+m.status+".");return}c(m.response,l)},m.onerror=function(){l._webAudio&&(l._html5=!0,l._webAudio=!1,l._sounds=[],delete s[h],l.load())},o(m)}},o=function(l){try{l.send()}catch{l.onerror()}},c=function(l,h){var d=function(){h._emit("loaderror",null,"Decoding audio data failed.")},g=function(p){p&&h._sounds.length>0?(s[h._src]=p,a(h,p)):d()};typeof Promise!="undefined"&&n.ctx.decodeAudioData.length===1?n.ctx.decodeAudioData(l).then(g).catch(d):n.ctx.decodeAudioData(l,g,d)},a=function(l,h){h&&!l._duration&&(l._duration=h.duration),Object.keys(l._sprite).length===0&&(l._sprite={__default:[0,l._duration*1e3]}),l._state!=="loaded"&&(l._state="loaded",l._emit("load"),l._loadQueue())},f=function(){if(!!n.usingWebAudio){try{typeof AudioContext!="undefined"?n.ctx=new AudioContext:typeof webkitAudioContext!="undefined"?n.ctx=new webkitAudioContext:n.usingWebAudio=!1}catch{n.usingWebAudio=!1}n.ctx||(n.usingWebAudio=!1);var l=/iP(hone|od|ad)/.test(n._navigator&&n._navigator.platform),h=n._navigator&&n._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),d=h?parseInt(h[1],10):null;if(l&&d&&d<9){var g=/safari/.test(n._navigator&&n._navigator.userAgent.toLowerCase());n._navigator&&!g&&(n.usingWebAudio=!1)}n.usingWebAudio&&(n.masterGain=typeof n.ctx.createGain=="undefined"?n.ctx.createGainNode():n.ctx.createGain(),n.masterGain.gain.setValueAtTime(n._muted?0:n._volume,n.ctx.currentTime),n.masterGain.connect(n.ctx.destination)),n._setup()}};e.Howler=n,e.Howl=i,typeof tn!="undefined"?(tn.HowlerGlobal=t,tn.Howler=n,tn.Howl=i,tn.Sound=r):typeof window!="undefined"&&(window.HowlerGlobal=t,window.Howler=n,window.Howl=i,window.Sound=r)})();/*!
|
|
* Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
|
|
*
|
|
* howler.js v2.2.3
|
|
* howlerjs.com
|
|
*
|
|
* (c) 2013-2020, James Simpson of GoldFire Studios
|
|
* goldfirestudios.com
|
|
*
|
|
* MIT License
|
|
*/(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(n){var i=this;if(!i.ctx||!i.ctx.listener)return i;for(var r=i._howls.length-1;r>=0;r--)i._howls[r].stereo(n);return i},HowlerGlobal.prototype.pos=function(n,i,r){var s=this;if(!s.ctx||!s.ctx.listener)return s;if(i=typeof i!="number"?s._pos[1]:i,r=typeof r!="number"?s._pos[2]:r,typeof n=="number")s._pos=[n,i,r],typeof s.ctx.listener.positionX!="undefined"?(s.ctx.listener.positionX.setTargetAtTime(s._pos[0],Howler.ctx.currentTime,.1),s.ctx.listener.positionY.setTargetAtTime(s._pos[1],Howler.ctx.currentTime,.1),s.ctx.listener.positionZ.setTargetAtTime(s._pos[2],Howler.ctx.currentTime,.1)):s.ctx.listener.setPosition(s._pos[0],s._pos[1],s._pos[2]);else return s._pos;return s},HowlerGlobal.prototype.orientation=function(n,i,r,s,u,o){var c=this;if(!c.ctx||!c.ctx.listener)return c;var a=c._orientation;if(i=typeof i!="number"?a[1]:i,r=typeof r!="number"?a[2]:r,s=typeof s!="number"?a[3]:s,u=typeof u!="number"?a[4]:u,o=typeof o!="number"?a[5]:o,typeof n=="number")c._orientation=[n,i,r,s,u,o],typeof c.ctx.listener.forwardX!="undefined"?(c.ctx.listener.forwardX.setTargetAtTime(n,Howler.ctx.currentTime,.1),c.ctx.listener.forwardY.setTargetAtTime(i,Howler.ctx.currentTime,.1),c.ctx.listener.forwardZ.setTargetAtTime(r,Howler.ctx.currentTime,.1),c.ctx.listener.upX.setTargetAtTime(s,Howler.ctx.currentTime,.1),c.ctx.listener.upY.setTargetAtTime(u,Howler.ctx.currentTime,.1),c.ctx.listener.upZ.setTargetAtTime(o,Howler.ctx.currentTime,.1)):c.ctx.listener.setOrientation(n,i,r,s,u,o);else return a;return c},Howl.prototype.init=function(n){return function(i){var r=this;return r._orientation=i.orientation||[1,0,0],r._stereo=i.stereo||null,r._pos=i.pos||null,r._pannerAttr={coneInnerAngle:typeof i.coneInnerAngle!="undefined"?i.coneInnerAngle:360,coneOuterAngle:typeof i.coneOuterAngle!="undefined"?i.coneOuterAngle:360,coneOuterGain:typeof i.coneOuterGain!="undefined"?i.coneOuterGain:0,distanceModel:typeof i.distanceModel!="undefined"?i.distanceModel:"inverse",maxDistance:typeof i.maxDistance!="undefined"?i.maxDistance:1e4,panningModel:typeof i.panningModel!="undefined"?i.panningModel:"HRTF",refDistance:typeof i.refDistance!="undefined"?i.refDistance:1,rolloffFactor:typeof i.rolloffFactor!="undefined"?i.rolloffFactor:1},r._onstereo=i.onstereo?[{fn:i.onstereo}]:[],r._onpos=i.onpos?[{fn:i.onpos}]:[],r._onorientation=i.onorientation?[{fn:i.onorientation}]:[],n.call(this,i)}}(Howl.prototype.init),Howl.prototype.stereo=function(n,i){var r=this;if(!r._webAudio)return r;if(r._state!=="loaded")return r._queue.push({event:"stereo",action:function(){r.stereo(n,i)}}),r;var s=typeof Howler.ctx.createStereoPanner=="undefined"?"spatial":"stereo";if(typeof i=="undefined")if(typeof n=="number")r._stereo=n,r._pos=[n,0,0];else return r._stereo;for(var u=r._getSoundIds(i),o=0;o<u.length;o++){var c=r._soundById(u[o]);if(c)if(typeof n=="number")c._stereo=n,c._pos=[n,0,0],c._node&&(c._pannerAttr.panningModel="equalpower",(!c._panner||!c._panner.pan)&&t(c,s),s==="spatial"?typeof c._panner.positionX!="undefined"?(c._panner.positionX.setValueAtTime(n,Howler.ctx.currentTime),c._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),c._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):c._panner.setPosition(n,0,0):c._panner.pan.setValueAtTime(n,Howler.ctx.currentTime)),r._emit("stereo",c._id);else return c._stereo}return r},Howl.prototype.pos=function(n,i,r,s){var u=this;if(!u._webAudio)return u;if(u._state!=="loaded")return u._queue.push({event:"pos",action:function(){u.pos(n,i,r,s)}}),u;if(i=typeof i!="number"?0:i,r=typeof r!="number"?-.5:r,typeof s=="undefined")if(typeof n=="number")u._pos=[n,i,r];else return u._pos;for(var o=u._getSoundIds(s),c=0;c<o.length;c++){var a=u._soundById(o[c]);if(a)if(typeof n=="number")a._pos=[n,i,r],a._node&&((!a._panner||a._panner.pan)&&t(a,"spatial"),typeof a._panner.positionX!="undefined"?(a._panner.positionX.setValueAtTime(n,Howler.ctx.currentTime),a._panner.positionY.setValueAtTime(i,Howler.ctx.currentTime),a._panner.positionZ.setValueAtTime(r,Howler.ctx.currentTime)):a._panner.setPosition(n,i,r)),u._emit("pos",a._id);else return a._pos}return u},Howl.prototype.orientation=function(n,i,r,s){var u=this;if(!u._webAudio)return u;if(u._state!=="loaded")return u._queue.push({event:"orientation",action:function(){u.orientation(n,i,r,s)}}),u;if(i=typeof i!="number"?u._orientation[1]:i,r=typeof r!="number"?u._orientation[2]:r,typeof s=="undefined")if(typeof n=="number")u._orientation=[n,i,r];else return u._orientation;for(var o=u._getSoundIds(s),c=0;c<o.length;c++){var a=u._soundById(o[c]);if(a)if(typeof n=="number")a._orientation=[n,i,r],a._node&&(a._panner||(a._pos||(a._pos=u._pos||[0,0,-.5]),t(a,"spatial")),typeof a._panner.orientationX!="undefined"?(a._panner.orientationX.setValueAtTime(n,Howler.ctx.currentTime),a._panner.orientationY.setValueAtTime(i,Howler.ctx.currentTime),a._panner.orientationZ.setValueAtTime(r,Howler.ctx.currentTime)):a._panner.setOrientation(n,i,r)),u._emit("orientation",a._id);else return a._orientation}return u},Howl.prototype.pannerAttr=function(){var n=this,i=arguments,r,s,u;if(!n._webAudio)return n;if(i.length===0)return n._pannerAttr;if(i.length===1)if(typeof i[0]=="object")r=i[0],typeof s=="undefined"&&(r.pannerAttr||(r.pannerAttr={coneInnerAngle:r.coneInnerAngle,coneOuterAngle:r.coneOuterAngle,coneOuterGain:r.coneOuterGain,distanceModel:r.distanceModel,maxDistance:r.maxDistance,refDistance:r.refDistance,rolloffFactor:r.rolloffFactor,panningModel:r.panningModel}),n._pannerAttr={coneInnerAngle:typeof r.pannerAttr.coneInnerAngle!="undefined"?r.pannerAttr.coneInnerAngle:n._coneInnerAngle,coneOuterAngle:typeof r.pannerAttr.coneOuterAngle!="undefined"?r.pannerAttr.coneOuterAngle:n._coneOuterAngle,coneOuterGain:typeof r.pannerAttr.coneOuterGain!="undefined"?r.pannerAttr.coneOuterGain:n._coneOuterGain,distanceModel:typeof r.pannerAttr.distanceModel!="undefined"?r.pannerAttr.distanceModel:n._distanceModel,maxDistance:typeof r.pannerAttr.maxDistance!="undefined"?r.pannerAttr.maxDistance:n._maxDistance,refDistance:typeof r.pannerAttr.refDistance!="undefined"?r.pannerAttr.refDistance:n._refDistance,rolloffFactor:typeof r.pannerAttr.rolloffFactor!="undefined"?r.pannerAttr.rolloffFactor:n._rolloffFactor,panningModel:typeof r.pannerAttr.panningModel!="undefined"?r.pannerAttr.panningModel:n._panningModel});else return u=n._soundById(parseInt(i[0],10)),u?u._pannerAttr:n._pannerAttr;else i.length===2&&(r=i[0],s=parseInt(i[1],10));for(var o=n._getSoundIds(s),c=0;c<o.length;c++)if(u=n._soundById(o[c]),u){var a=u._pannerAttr;a={coneInnerAngle:typeof r.coneInnerAngle!="undefined"?r.coneInnerAngle:a.coneInnerAngle,coneOuterAngle:typeof r.coneOuterAngle!="undefined"?r.coneOuterAngle:a.coneOuterAngle,coneOuterGain:typeof r.coneOuterGain!="undefined"?r.coneOuterGain:a.coneOuterGain,distanceModel:typeof r.distanceModel!="undefined"?r.distanceModel:a.distanceModel,maxDistance:typeof r.maxDistance!="undefined"?r.maxDistance:a.maxDistance,refDistance:typeof r.refDistance!="undefined"?r.refDistance:a.refDistance,rolloffFactor:typeof r.rolloffFactor!="undefined"?r.rolloffFactor:a.rolloffFactor,panningModel:typeof r.panningModel!="undefined"?r.panningModel:a.panningModel};var f=u._panner;f?(f.coneInnerAngle=a.coneInnerAngle,f.coneOuterAngle=a.coneOuterAngle,f.coneOuterGain=a.coneOuterGain,f.distanceModel=a.distanceModel,f.maxDistance=a.maxDistance,f.refDistance=a.refDistance,f.rolloffFactor=a.rolloffFactor,f.panningModel=a.panningModel):(u._pos||(u._pos=n._pos||[0,0,-.5]),t(u,"spatial"))}return n},Sound.prototype.init=function(n){return function(){var i=this,r=i._parent;i._orientation=r._orientation,i._stereo=r._stereo,i._pos=r._pos,i._pannerAttr=r._pannerAttr,n.call(this),i._stereo?r.stereo(i._stereo):i._pos&&r.pos(i._pos[0],i._pos[1],i._pos[2],i._id)}}(Sound.prototype.init),Sound.prototype.reset=function(n){return function(){var i=this,r=i._parent;return i._orientation=r._orientation,i._stereo=r._stereo,i._pos=r._pos,i._pannerAttr=r._pannerAttr,i._stereo?r.stereo(i._stereo):i._pos?r.pos(i._pos[0],i._pos[1],i._pos[2],i._id):i._panner&&(i._panner.disconnect(0),i._panner=void 0,r._refreshBuffer(i)),n.call(this)}}(Sound.prototype.reset);var t=function(n,i){i=i||"spatial",i==="spatial"?(n._panner=Howler.ctx.createPanner(),n._panner.coneInnerAngle=n._pannerAttr.coneInnerAngle,n._panner.coneOuterAngle=n._pannerAttr.coneOuterAngle,n._panner.coneOuterGain=n._pannerAttr.coneOuterGain,n._panner.distanceModel=n._pannerAttr.distanceModel,n._panner.maxDistance=n._pannerAttr.maxDistance,n._panner.refDistance=n._pannerAttr.refDistance,n._panner.rolloffFactor=n._pannerAttr.rolloffFactor,n._panner.panningModel=n._pannerAttr.panningModel,typeof n._panner.positionX!="undefined"?(n._panner.positionX.setValueAtTime(n._pos[0],Howler.ctx.currentTime),n._panner.positionY.setValueAtTime(n._pos[1],Howler.ctx.currentTime),n._panner.positionZ.setValueAtTime(n._pos[2],Howler.ctx.currentTime)):n._panner.setPosition(n._pos[0],n._pos[1],n._pos[2]),typeof n._panner.orientationX!="undefined"?(n._panner.orientationX.setValueAtTime(n._orientation[0],Howler.ctx.currentTime),n._panner.orientationY.setValueAtTime(n._orientation[1],Howler.ctx.currentTime),n._panner.orientationZ.setValueAtTime(n._orientation[2],Howler.ctx.currentTime)):n._panner.setOrientation(n._orientation[0],n._orientation[1],n._orientation[2])):(n._panner=Howler.ctx.createStereoPanner(),n._panner.pan.setValueAtTime(n._stereo,Howler.ctx.currentTime)),n._panner.connect(n._node),n._paused||n._parent.pause(n._id,!0).play(n._id,!0)}})()})(ng);function iC({sounds:e,sound:t,delay:n,pitch:i,volume:r,onEdit:s,onDelete:u,delayedPlay:o}){const{locale:c}=rt(),{version:a}=vr(),[f,l]=oe(!0),[h,d]=oe(!1),[g,p]=oe(!1),m=Xe([]),w=`playsound minecraft:${t} master @s ~ ~ ~ ${r} ${i}`;xe(()=>{var C,B,T;const y=e[t];p(((B=(C=y==null?void 0:y.sounds)==null?void 0:C.length)!=null?B:0)===0),m.current.forEach(M=>M.stop()),m.current=((T=y==null?void 0:y.sounds)!=null?T:[]).map(M=>{const R=typeof M=="string"?M:M.name,I=Sw(a,R),H=new ng.Howl({src:[I],format:["ogg"],volume:r,rate:i});H.on("end",()=>{d(!1)});const P=()=>{f&&m.current.every(j=>j.state()==="loaded")&&l(!1)};return H.state()==="loaded"?setTimeout(()=>P()):H.on("load",()=>{P()}),H}),l(!0)},[t,e]),xe(()=>{m.current.forEach(y=>y.rate(i))},[i]),xe(()=>{m.current.forEach(y=>y.volume(r))},[r]);const v=()=>{if(f||g)return;A();const y=Math.floor(Math.random()*m.current.length);m.current[y].play(),d(!0)},A=()=>{m.current.forEach(y=>y.stop())};xe(()=>{o&&setTimeout(()=>v(),n*50)},[o]),xe(()=>()=>A(),[]);const[_,E]=oe(!1),b=Xe(void 0),x=()=>{navigator.clipboard.writeText(w),E(!0),b.current!==void 0&&clearTimeout(b.current),b.current=setTimeout(()=>{E(!1)},2e3)};return S("div",{class:`sound-config${f?" loading":h?" playing":""}${g?" invalid":""}`},S(Ee,{class:"play",icon:g?"alert":f?"sync":"play",label:c("sounds.play"),onClick:v,tooltip:c(g?"sounds.unknown_sound":f?"sounds.loading_sound":"sounds.play_sound"),tooltipLoc:"se"}),S(Ei,{class:"btn btn-input sound",list:"sound-list",spellcheck:!1,value:t,onChange:y=>s({sound:y})}),S("label",{class:"delay-label"},c("sounds.delay"),": "),S(ww,{class:"btn btn-input delay",min:0,value:n,onChange:y=>s({delay:y})}),S("label",{class:"pitch-label"},c("sounds.pitch"),": "),S(gu,{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:y=>s({pitch:y})}),S("label",{class:"volume-label"},c("sounds.volume"),": "),S(gu,{class:"volume tooltipped tip-s",min:0,max:1,step:.01,"aria-label":r.toFixed(2),style:`--x: ${r*100}%`,value:r,onChange:y=>s({volume:y})}),S(Ee,{class:`copy${_?" active":""}`,icon:_?"check":"terminal",label:c("copy"),tooltip:c(_?"copied":"sounds.copy_command"),onClick:x}),S(Ee,{class:"remove",icon:"trashcan",tooltip:c("sounds.remove_sound"),onClick:()=>{u(),A()}}))}function jt({title:e,desc:t,link:n,icon:i,children:r}){const s=S(De,null,S("div",{class:"tool-head"},i&&tg[i],S("div",null,S("h3",null,e),S("p",null,t))),r&&S("div",{class:"tool-body"},r));return n?S("a",{class:"tool-card",href:n},s):S("div",{class:"tool-card"},s)}const Af="/";function ig({entries:e,onSelect:t,indent:n}){const i=Qe(()=>{var a;const c={};for(const f of e){const l=f.indexOf(Af);if(l>=0){const h=f.slice(0,l);((a=c[h])!=null?a:c[h]=[]).push(f.slice(l+1))}}return Object.entries(c)},e),r=Qe(()=>e.filter(c=>!c.includes(Af)),e),[s,u]=oe(new Set),o=c=>{s.has(c)?s.delete(c):s.add(c),u(new Set(s))};return S("div",{class:"tree-view",style:`--indent: ${n!=null?n:0};`},i.map(([c,a])=>S("div",null,S(yf,{icon:s.has(c)?"chevron_right":"chevron_down",key:c,label:c,onClick:()=>o(c)}),!s.has(c)&&S(ig,{entries:a,onSelect:f=>t(`${c}/${f}`),indent:(n!=null?n:0)+1}))),r.map(c=>S(yf,{icon:"file",key:c,label:c,onClick:()=>t(c)})))}function yf({icon:e,label:t,onClick:n}){return S("div",{class:"entry",onClick:n},$e[e],t)}function Ef({category:e}){const{locale:t}=rt();return on(t("title.generator_category",t(e))),S("main",null,S("div",{class:"category"},He.generators.filter(n=>n.category===e).map(n=>S(jt,{title:t(n.id),link:Nn(n.url)}))))}function rC({}){const{locale:e}=rt(),[t,n]=oe(null);on(e("title.changelog"));const[i,r]=oe([]);return xe(()=>{Vd().then(s=>r(s)).catch(s=>{console.error(s),n(s)})},[]),S("main",null,S(ps,{type:"text",id:"changelog"}),t&&S(Xi,{error:t,onDismiss:()=>n(null)}),S("div",{class:"changelog"},S(Qp,{changes:i,defaultOrder:"desc"})))}function sC({}){var Ne;const{locale:e}=rt(),{version:t,changeVersion:n,changeTargetVersion:i}=vr(),{project:r,file:s,updateFile:u,openFile:o,closeFile:c}=i0(),[a,f]=oe(null),[l,h]=Yf();if(l)return l.message=`Something went wrong rendering the generator: ${l.message}`,S("main",null,S(Xi,{error:l,onDismiss:h}));const d=Ud(er());if(!d)return S("main",null,S(Xi,{error:`Cannot find generator "${er()}"`}));const g=Qe(()=>He.versions.filter(de=>Mt(de.id,d.minVersion,d.maxVersion)).map(de=>de.id).reverse(),[d.minVersion,d.maxVersion]);on(e("title.generator",e(d.id)),g),Mt(t,d.minVersion)||f(`The minimum version for this generator is ${d.minVersion}`),Mt(t,void 0,d.maxVersion)||f(`This generator is not available in versions above ${d.maxVersion}`);const[p,m]=Gr("preset"),[w,v]=Gr(Za),A=Xe(!1);xe(()=>{x&&p?le(p).then(de=>{A.current=!0,x.reset(ae.DataModel.wrapLists(de),!1),v(void 0)}):x&&w&&Au(w).then(de=>_(x,de))},[p,w]);const _=(de,Ke)=>{if(Ke.version&&Ke.version!==t&&n(Ke.version,!1),Ke.type&&Ke.type!==d.id){const ui=He.generators.find(Y=>Y.id===Ke.type);ui&&ri(`${Nn(ui.url)}?${Za}=${Ke.id}`)}Ke.show_preview&&!q&&(ke(!0),Te(!1)),de.reset(ae.DataModel.wrapLists(Ke.data),!1)},E=Qe(()=>_t.getBackup(d.id),[d.id]),b=()=>{E!==void 0&&(x==null||x.reset(ae.DataModel.wrapLists(E),!1))},[x,y]=oe(null),[C,B]=oe(null);xe(()=>{f(null),y(null),Rw(t).then(de=>B(de)),$w(t,d.id).then(async de=>{if(lt.setGenerator(d.id),p){const Ke=await le(p);de.reset(ae.DataModel.wrapLists(Ke),!1)}else if(w){const Ke=await Au(w);_(de,Ke)}y(de)}).catch(de=>{console.error(de),f(de)})},[t,d.id]);const[T,M]=oe(!1);Mo(x,()=>{A.current||(m(void 0,!0),v(void 0,!0)),A.current=!1,_t.setBackup(d.id,ae.DataModel.unwrapLists(x==null?void 0:x.data)),f(null),M(!0)},[d.id,m,v]);const[R,I]=oe(""),[H,P]=Cr(),[j,V]=Cr(),K=()=>{if(R!==(s==null?void 0:s.id)&&R&&x&&C){const de=to(x,C);u(d.id,s==null?void 0:s.id,{id:R,data:de})?P():(V(),s&&I(s==null?void 0:s.id))}else s&&I(s==null?void 0:s.id)},N=()=>{s&&u(d.id,s.id,{})};xe(()=>{s&&I(s.id)},[s]),xe(()=>{var de;x&&(I((de=s==null?void 0:s.id)!=null?de:""),s&&d.id===s.type&&x.reset(ae.DataModel.wrapLists(s.data)),M(!1))},[s,x]);const k=()=>{lt.generatorEvent("reset"),x==null||x.reset(ae.DataModel.wrapLists(x.schema.default()),!0)},$=de=>{de.stopPropagation(),lt.generatorEvent("undo","Menu"),x==null||x.undo()},z=de=>{de.stopPropagation(),lt.generatorEvent("redo","Menu"),x==null||x.redo()},U=de=>{de.ctrlKey&&de.key==="z"?(lt.generatorEvent("undo","Hotkey"),x==null||x.undo()):de.ctrlKey&&de.key==="y"&&(lt.generatorEvent("redo","Hotkey"),x==null||x.redo())},G=de=>{if(de.ctrlKey&&de.key==="s"&&(de.preventDefault(),x&&C&&s)){lt.generatorEvent("save","Hotkey");const Ke=to(x,C);u(d.id,s==null?void 0:s.id,{id:s==null?void 0:s.id,data:Ke}),M(!1),P()}};xe(()=>(document.addEventListener("keyup",U),document.addEventListener("keydown",G),()=>{document.removeEventListener("keyup",U),document.removeEventListener("keydown",G)}),[x,C,s]);const[Q,X]=oe([]);xe(()=>{Mw(t).then(de=>{X(de.get(d.id).map(Ke=>Ke.slice(10)))}).catch(de=>{console.error(de),f(de)})},[t,d.id]);const te=de=>{lt.generatorEvent("load-preset",de),v(void 0,!0),i(t,!0),m(de)},le=async de=>{var Ke,ui,Y;try{const Z=await Kd(t,(Ke=d.path)!=null?Ke:d.id,de),ne=x==null?void 0:x.get(new ae.Path(["generator","seed"]));return((ui=Z==null?void 0:Z.generator)==null?void 0:ui.seed)!==void 0&&ne!==void 0&&(Z.generator.seed=ne,((Y=Z.generator.biome_source)==null?void 0:Y.seed)!==void 0&&(Z.generator.biome_source.seed=ne)),Z}catch{f(`Cannot load preset ${de} in ${t}`),m(void 0,!0)}},ye=de=>{v(void 0,!0),n(de)},[ve,ee]=oe(void 0),[ce,he]=oe(!1),[je,Ve]=Cr({cooldown:3e3}),ge=()=>{if(ce){he(!1);return}if(p)ee(`${location.origin}/${d.url}/?version=${t}&preset=${p}`),he(!0),Tt();else if(x&&C){const de=to(x,C);yi(de,x.schema.default())?(ee(`${location.origin}/${d.url}/?version=${t}`),he(!0)):Ow(d.id,t,de,q).then(Ke=>{ee(Ke),he(!0)}).catch(Ke=>{Ke instanceof Error&&f(Ke)})}},Tt=()=>{navigator.clipboard.writeText(ve!=null?ve:""),Ve()};xe(()=>{je||(ee(void 0),he(!1))},[je]);const[Re,Te]=oe(window.innerWidth>820),[bt,ue]=oe(0),[Ft,ln]=oe(0),[re,me]=oe(0),L=()=>{lt.generatorEvent("copy"),ue(bt+1)},F=()=>{lt.generatorEvent("download"),ln(Ft+1)},D=()=>{lt.generatorEvent("import"),Te(!0),me(re+1)},O=()=>{lt.generatorEvent("toggle-output",Re?"hidden":"visible"),Te(!Re),ue(0),ln(0),me(0)},[W,J]=Cr(),[q,ke]=oe(!1),Ge=X2.includes(d.id)&&!(d.id==="worldgen/configured_feature"&&Mt(t,"1.18"));q&&!Ge&&ke(!1);let We=2;Ge&&(We+=1),Re&&(We+=2);const Ze=()=>{lt.generatorEvent("toggle-preview",q?"hidden":"visible"),ke(!q),!q&&Re&&Te(!1)};return S(De,null,S("main",{class:q?"has-preview":""},S(ps,{id:"data-pack-generator",type:"text"}),S("div",{class:"controls"},S("div",{class:`project-controls ${s&&"has-file"}`},S("div",{class:"btn-row"},S($t,{icon:"repo",label:r.name,relative:!1},S(Ee,{icon:"arrow_left",label:e("project.go_to"),onClick:()=>ri("/project")}),s&&S(Ee,{icon:"file",label:e("project.new_file"),onClick:c}),E!==void 0&&S(Ee,{icon:"history",label:e("restore_backup"),onClick:b}),S(mu,{searchPlaceholder:e(r.name==="Drafts"?"project.search_drafts":"project.search"),noResults:e("project.no_files"),values:r.files.filter(de=>de.type===d.id).map(de=>de.id),onSelect:de=>o(d.id,de)})),S(Ei,{class:"btn btn-input",placeholder:e("project.unsaved_file"),value:R,onChange:I,onEnter:K,onBlur:K}),s&&S(Ee,{icon:"trashcan",tooltip:e("project.delete_file"),onClick:N})),T?S("div",{class:"status-icon"},$e.dot_fill):H?S("div",{class:"status-icon active"},$e.check):j&&S("div",{class:"status-icon danger"},$e.x)),S("div",{class:"generator-controls"},S(Ee,{icon:"upload",label:e("import"),onClick:D}),S($t,{icon:"archive",label:e("presets"),relative:!1},S(mu,{searchPlaceholder:e("search"),noResults:e("no_presets"),values:Q,onSelect:te})),S($t,{icon:"tag",label:t,tooltip:e("switch_version"),"data-cy":"version-switcher"},g.map(de=>S(Ee,{label:de,active:de===t,onClick:()=>ye(de)}))),S($t,{icon:"kebab_horizontal",tooltip:e("more")},S(Ee,{icon:"history",label:e("reset"),onClick:k}),S(Ee,{icon:"arrow_left",label:e("undo"),onClick:$}),S(Ee,{icon:"arrow_right",label:e("redo"),onClick:z})))),a&&S(Xi,{error:a,onDismiss:()=>f(null)}),S(Cx,{model:x,version:t,blockStates:C,onError:f})),S("div",{class:"popup-actions",style:`--offset: -${8+We*50}px;`},S("div",{class:`popup-action action-preview${Ge?" shown":""} tooltipped tip-nw`,"aria-label":e(q?"hide_preview":"show_preview"),onClick:Ze},q?$e.x_circle:$e.play),S("div",{class:"popup-action action-share shown tooltipped tip-nw","aria-label":e("share"),onClick:ge},$e.link),S("div",{class:`popup-action action-download${Re?" shown":""} tooltipped tip-nw`,"aria-label":e("download"),onClick:F},$e.download),S("div",{class:`popup-action action-copy${Re?" shown":""}${W?" active":""} tooltipped tip-nw`,"aria-label":e(W?"copied":"copy"),onClick:L},W?$e.check:$e.clippy),S("div",{class:"popup-action action-code shown tooltipped tip-nw","aria-label":e(Re?"hide_output":"show_output"),onClick:O},Re?$e.chevron_right:$e.code)),S("div",{class:`popup-preview${q?" shown":""}`},S(J2,{model:x,version:t,id:d.id,shown:q,onError:f})),S("div",{class:`popup-source${Re?" shown":""}`},S(zb,{model:x,blockStates:C,doCopy:bt,doDownload:Ft,doImport:re,name:(Ne=d.schema)!=null?Ne:"data",copySuccess:J,onError:f})),S("div",{class:`popup-share${ce?" shown":""}`},S(Ei,{value:ve,readonly:!0}),S(Ee,{icon:je?"check":"clippy",onClick:Tt,tooltip:e(je?"copied":"copy_share"),tooltipLoc:"nw",active:je,showTooltip:je})))}var Cc={exports:{}};function Fc(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)&&Fc(n)}),e}Cc.exports=Fc;Cc.exports.default=Fc;var oC=Cc.exports;class bf{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function rg(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function qn(e,...t){const n=Object.create(null);for(const i in e)n[i]=e[i];return t.forEach(function(i){for(const r in i)n[r]=i[r]}),n}const aC="</span>",xf=e=>!!e.kind,lC=(e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((i,r)=>`${i}${"_".repeat(r+1)}`)].join(" ")}return`${t}${e}`};class cC{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=rg(t)}openNode(t){if(!xf(t))return;let n=t.kind;t.sublanguage?n=`language-${n}`:n=lC(n,{prefix:this.classPrefix}),this.span(n)}closeNode(t){!xf(t)||(this.buffer+=aC)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}class Sc{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(i=>this._walk(t,i)),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=>{Sc._collapse(n)})))}}class uC extends Sc{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 i=t.root;i.kind=n,i.sublanguage=!0,this.add(i)}toHTML(){return new cC(this,this.options).value()}finalize(){return!0}}function hs(e){return e?typeof e=="string"?e:e.source:null}function sg(e){return Bi("(?=",e,")")}function hC(e){return Bi("(?:",e,")*")}function fC(e){return Bi("(?:",e,")?")}function Bi(...e){return e.map(n=>hs(n)).join("")}function dC(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Dc(...e){const t=dC(e);return"("+(t.capture?"":"?:")+e.map(i=>hs(i)).join("|")+")"}function og(e){return new RegExp(e.toString()+"|").exec("").length-1}function pC(e,t){const n=e&&e.exec(t);return n&&n.index===0}const gC=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function kc(e,{joinWith:t}){let n=0;return e.map(i=>{n+=1;const r=n;let s=hs(i),u="";for(;s.length>0;){const o=gC.exec(s);if(!o){u+=s;break}u+=s.substring(0,o.index),s=s.substring(o.index+o[0].length),o[0][0]==="\\"&&o[1]?u+="\\"+String(Number(o[1])+r):(u+=o[0],o[0]==="("&&n++)}return u}).map(i=>`(${i})`).join(t)}const mC=/\b\B/,ag="[a-zA-Z]\\w*",Bc="[a-zA-Z_]\\w*",lg="\\b\\d+(\\.\\d+)?",cg="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",ug="\\b(0b[01]+)",vC="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",wC=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=Bi(t,/.*\b/,e.binary,/\b.*/)),qn({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,i)=>{n.index!==0&&i.ignoreMatch()}},e)},fs={begin:"\\\\[\\s\\S]",relevance:0},_C={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[fs]},AC={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[fs]},yC={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/},Jo=function(e,t,n={}){const i=qn({scope:"comment",begin:e,end:t,contains:[]},n);i.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 r=Dc("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 i.contains.push({begin:Bi(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},EC=Jo("//","$"),bC=Jo("/\\*","\\*/"),xC=Jo("#","$"),CC={scope:"number",begin:lg,relevance:0},FC={scope:"number",begin:cg,relevance:0},SC={scope:"number",begin:ug,relevance:0},DC={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[fs,{begin:/\[/,end:/\]/,relevance:0,contains:[fs]}]}]},kC={scope:"title",begin:ag,relevance:0},BC={scope:"title",begin:Bc,relevance:0},TC={begin:"\\.\\s*"+Bc,relevance:0},LC=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 zs=Object.freeze({__proto__:null,MATCH_NOTHING_RE:mC,IDENT_RE:ag,UNDERSCORE_IDENT_RE:Bc,NUMBER_RE:lg,C_NUMBER_RE:cg,BINARY_NUMBER_RE:ug,RE_STARTERS_RE:vC,SHEBANG:wC,BACKSLASH_ESCAPE:fs,APOS_STRING_MODE:_C,QUOTE_STRING_MODE:AC,PHRASAL_WORDS_MODE:yC,COMMENT:Jo,C_LINE_COMMENT_MODE:EC,C_BLOCK_COMMENT_MODE:bC,HASH_COMMENT_MODE:xC,NUMBER_MODE:CC,C_NUMBER_MODE:FC,BINARY_NUMBER_MODE:SC,REGEXP_MODE:DC,TITLE_MODE:kC,UNDERSCORE_TITLE_MODE:BC,METHOD_GUARD:TC,END_SAME_AS_BEGIN:LC});function $C(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function MC(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function RC(e,t){!t||!e.beginKeywords||(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=$C,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function IC(e,t){!Array.isArray(e.illegal)||(e.illegal=Dc(...e.illegal))}function OC(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 NC(e,t){e.relevance===void 0&&(e.relevance=1)}const PC=(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(i=>{delete e[i]}),e.keywords=n.keywords,e.begin=Bi(n.beforeMatch,sg(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},zC=["of","and","for","in","not","or","if","then","parent","list","value"],UC="keyword";function hg(e,t,n=UC){const i=Object.create(null);return typeof e=="string"?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach(function(s){Object.assign(i,hg(e[s],t,s))}),i;function r(s,u){t&&(u=u.map(o=>o.toLowerCase())),u.forEach(function(o){const c=o.split("|");i[c[0]]=[s,HC(c[0],c[1])]})}}function HC(e,t){return t?Number(t):jC(e)?0:1}function jC(e){return zC.includes(e.toLowerCase())}const Cf={},_i=e=>{console.error(e)},Ff=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Ui=(e,t)=>{Cf[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Cf[`${e}/${t}`]=!0)},xo=new Error;function fg(e,t,{key:n}){let i=0;const r=e[n],s={},u={};for(let o=1;o<=t.length;o++)u[o+i]=r[o],s[o+i]=!0,i+=og(t[o-1]);e[n]=u,e[n]._emit=s,e[n]._multi=!0}function WC(e){if(!!Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw _i("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),xo;if(typeof e.beginScope!="object"||e.beginScope===null)throw _i("beginScope must be object"),xo;fg(e,e.begin,{key:"beginScope"}),e.begin=kc(e.begin,{joinWith:""})}}function VC(e){if(!!Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw _i("skip, excludeEnd, returnEnd not compatible with endScope: {}"),xo;if(typeof e.endScope!="object"||e.endScope===null)throw _i("endScope must be object"),xo;fg(e,e.end,{key:"endScope"}),e.end=kc(e.end,{joinWith:""})}}function GC(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function KC(e){GC(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),WC(e),VC(e)}function XC(e){function t(u,o){return new RegExp(hs(u),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(o?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,c){c.position=this.position++,this.matchIndexes[this.matchAt]=c,this.regexes.push([c,o]),this.matchAt+=og(o)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const o=this.regexes.map(c=>c[1]);this.matcherRe=t(kc(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;const c=this.matcherRe.exec(o);if(!c)return null;const a=c.findIndex((l,h)=>h>0&&l!==void 0),f=this.matchIndexes[a];return c.splice(0,a),Object.assign(c,f)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];const c=new n;return this.rules.slice(o).forEach(([a,f])=>c.addRule(a,f)),c.compile(),this.multiRegexes[o]=c,c}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,c){this.rules.push([o,c]),c.type==="begin"&&this.count++}exec(o){const c=this.getMatcher(this.regexIndex);c.lastIndex=this.lastIndex;let a=c.exec(o);if(this.resumingScanAtSamePosition()&&!(a&&a.index===this.lastIndex)){const f=this.getMatcher(0);f.lastIndex=this.lastIndex+1,a=f.exec(o)}return a&&(this.regexIndex+=a.position+1,this.regexIndex===this.count&&this.considerAll()),a}}function r(u){const o=new i;return u.contains.forEach(c=>o.addRule(c.begin,{rule:c,type:"begin"})),u.terminatorEnd&&o.addRule(u.terminatorEnd,{type:"end"}),u.illegal&&o.addRule(u.illegal,{type:"illegal"}),o}function s(u,o){const c=u;if(u.isCompiled)return c;[MC,OC,KC,PC].forEach(f=>f(u,o)),e.compilerExtensions.forEach(f=>f(u,o)),u.__beforeBegin=null,[RC,IC,NC].forEach(f=>f(u,o)),u.isCompiled=!0;let a=null;return typeof u.keywords=="object"&&u.keywords.$pattern&&(u.keywords=Object.assign({},u.keywords),a=u.keywords.$pattern,delete u.keywords.$pattern),a=a||/\w+/,u.keywords&&(u.keywords=hg(u.keywords,e.case_insensitive)),c.keywordPatternRe=t(a,!0),o&&(u.begin||(u.begin=/\B|\b/),c.beginRe=t(c.begin),!u.end&&!u.endsWithParent&&(u.end=/\B|\b/),u.end&&(c.endRe=t(c.end)),c.terminatorEnd=hs(c.end)||"",u.endsWithParent&&o.terminatorEnd&&(c.terminatorEnd+=(u.end?"|":"")+o.terminatorEnd)),u.illegal&&(c.illegalRe=t(u.illegal)),u.contains||(u.contains=[]),u.contains=[].concat(...u.contains.map(function(f){return JC(f==="self"?u:f)})),u.contains.forEach(function(f){s(f,c)}),u.starts&&s(u.starts,o),c.matcher=r(c),c}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=qn(e.classNameAliases||{}),s(e)}function dg(e){return e?e.endsWithParent||dg(e.starts):!1}function JC(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return qn(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:dg(e)?qn(e,{starts:e.starts?qn(e.starts):null}):Object.isFrozen(e)?qn(e):e}var YC="11.5.1";class ZC extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const za=rg,Sf=qn,Df=Symbol("nomatch"),qC=7,QC=function(e){const t=Object.create(null),n=Object.create(null),i=[];let r=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",u={disableAutodetect:!0,name:"Plain text",contains:[]};let o={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:uC};function c(P){return o.noHighlightRe.test(P)}function a(P){let j=P.className+" ";j+=P.parentNode?P.parentNode.className:"";const V=o.languageDetectRe.exec(j);if(V){const K=C(V[1]);return K||(Ff(s.replace("{}",V[1])),Ff("Falling back to no-highlight mode for this block.",P)),K?V[1]:"no-highlight"}return j.split(/\s+/).find(K=>c(K)||C(K))}function f(P,j,V){let K="",N="";typeof j=="object"?(K=P,V=j.ignoreIllegals,N=j.language):(Ui("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ui("10.7.0",`Please use highlight(code, options) instead.
|
|
https://github.com/highlightjs/highlight.js/issues/2277`),N=P,K=j),V===void 0&&(V=!0);const k={code:K,language:N};I("before:highlight",k);const $=k.result?k.result:l(k.language,k.code,V);return $.code=k.code,I("after:highlight",$),$}function l(P,j,V,K){const N=Object.create(null);function k(re,me){return re.keywords[me]}function $(){if(!ge.keywords){Re.addText(Te);return}let re=0;ge.keywordPatternRe.lastIndex=0;let me=ge.keywordPatternRe.exec(Te),L="";for(;me;){L+=Te.substring(re,me.index);const F=he.case_insensitive?me[0].toLowerCase():me[0],D=k(ge,F);if(D){const[O,W]=D;if(Re.addText(L),L="",N[F]=(N[F]||0)+1,N[F]<=qC&&(bt+=W),O.startsWith("_"))L+=me[0];else{const J=he.classNameAliases[O]||O;Re.addKeyword(me[0],J)}}else L+=me[0];re=ge.keywordPatternRe.lastIndex,me=ge.keywordPatternRe.exec(Te)}L+=Te.substr(re),Re.addText(L)}function z(){if(Te==="")return;let re=null;if(typeof ge.subLanguage=="string"){if(!t[ge.subLanguage]){Re.addText(Te);return}re=l(ge.subLanguage,Te,!0,Tt[ge.subLanguage]),Tt[ge.subLanguage]=re._top}else re=d(Te,ge.subLanguage.length?ge.subLanguage:null);ge.relevance>0&&(bt+=re.relevance),Re.addSublanguage(re._emitter,re.language)}function U(){ge.subLanguage!=null?z():$(),Te=""}function G(re,me){let L=1;const F=me.length-1;for(;L<=F;){if(!re._emit[L]){L++;continue}const D=he.classNameAliases[re[L]]||re[L],O=me[L];D?Re.addKeyword(O,D):(Te=O,$(),Te=""),L++}}function Q(re,me){return re.scope&&typeof re.scope=="string"&&Re.openNode(he.classNameAliases[re.scope]||re.scope),re.beginScope&&(re.beginScope._wrap?(Re.addKeyword(Te,he.classNameAliases[re.beginScope._wrap]||re.beginScope._wrap),Te=""):re.beginScope._multi&&(G(re.beginScope,me),Te="")),ge=Object.create(re,{parent:{value:ge}}),ge}function X(re,me,L){let F=pC(re.endRe,L);if(F){if(re["on:end"]){const D=new bf(re);re["on:end"](me,D),D.isMatchIgnored&&(F=!1)}if(F){for(;re.endsParent&&re.parent;)re=re.parent;return re}}if(re.endsWithParent)return X(re.parent,me,L)}function te(re){return ge.matcher.regexIndex===0?(Te+=re[0],1):(ln=!0,0)}function le(re){const me=re[0],L=re.rule,F=new bf(L),D=[L.__beforeBegin,L["on:begin"]];for(const O of D)if(!!O&&(O(re,F),F.isMatchIgnored))return te(me);return L.skip?Te+=me:(L.excludeBegin&&(Te+=me),U(),!L.returnBegin&&!L.excludeBegin&&(Te=me)),Q(L,re),L.returnBegin?0:me.length}function ye(re){const me=re[0],L=j.substr(re.index),F=X(ge,re,L);if(!F)return Df;const D=ge;ge.endScope&&ge.endScope._wrap?(U(),Re.addKeyword(me,ge.endScope._wrap)):ge.endScope&&ge.endScope._multi?(U(),G(ge.endScope,re)):D.skip?Te+=me:(D.returnEnd||D.excludeEnd||(Te+=me),U(),D.excludeEnd&&(Te=me));do ge.scope&&Re.closeNode(),!ge.skip&&!ge.subLanguage&&(bt+=ge.relevance),ge=ge.parent;while(ge!==F.parent);return F.starts&&Q(F.starts,re),D.returnEnd?0:me.length}function ve(){const re=[];for(let me=ge;me!==he;me=me.parent)me.scope&&re.unshift(me.scope);re.forEach(me=>Re.openNode(me))}let ee={};function ce(re,me){const L=me&&me[0];if(Te+=re,L==null)return U(),0;if(ee.type==="begin"&&me.type==="end"&&ee.index===me.index&&L===""){if(Te+=j.slice(me.index,me.index+1),!r){const F=new Error(`0 width match regex (${P})`);throw F.languageName=P,F.badRule=ee.rule,F}return 1}if(ee=me,me.type==="begin")return le(me);if(me.type==="illegal"&&!V){const F=new Error('Illegal lexeme "'+L+'" for mode "'+(ge.scope||"<unnamed>")+'"');throw F.mode=ge,F}else if(me.type==="end"){const F=ye(me);if(F!==Df)return F}if(me.type==="illegal"&&L==="")return 1;if(Ft>1e5&&Ft>me.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Te+=L,L.length}const he=C(P);if(!he)throw _i(s.replace("{}",P)),new Error('Unknown language: "'+P+'"');const je=XC(he);let Ve="",ge=K||je;const Tt={},Re=new o.__emitter(o);ve();let Te="",bt=0,ue=0,Ft=0,ln=!1;try{for(ge.matcher.considerAll();;){Ft++,ln?ln=!1:ge.matcher.considerAll(),ge.matcher.lastIndex=ue;const re=ge.matcher.exec(j);if(!re)break;const me=j.substring(ue,re.index),L=ce(me,re);ue=re.index+L}return ce(j.substr(ue)),Re.closeAllNodes(),Re.finalize(),Ve=Re.toHTML(),{language:P,value:Ve,relevance:bt,illegal:!1,_emitter:Re,_top:ge}}catch(re){if(re.message&&re.message.includes("Illegal"))return{language:P,value:za(j),illegal:!0,relevance:0,_illegalBy:{message:re.message,index:ue,context:j.slice(ue-100,ue+100),mode:re.mode,resultSoFar:Ve},_emitter:Re};if(r)return{language:P,value:za(j),illegal:!1,relevance:0,errorRaised:re,_emitter:Re,_top:ge};throw re}}function h(P){const j={value:za(P),illegal:!1,relevance:0,_top:u,_emitter:new o.__emitter(o)};return j._emitter.addText(P),j}function d(P,j){j=j||o.languages||Object.keys(t);const V=h(P),K=j.filter(C).filter(T).map(U=>l(U,P,!1));K.unshift(V);const N=K.sort((U,G)=>{if(U.relevance!==G.relevance)return G.relevance-U.relevance;if(U.language&&G.language){if(C(U.language).supersetOf===G.language)return 1;if(C(G.language).supersetOf===U.language)return-1}return 0}),[k,$]=N,z=k;return z.secondBest=$,z}function g(P,j,V){const K=j&&n[j]||V;P.classList.add("hljs"),P.classList.add(`language-${K}`)}function p(P){let j=null;const V=a(P);if(c(V))return;if(I("before:highlightElement",{el:P,language:V}),P.children.length>0&&(o.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(P)),o.throwUnescapedHTML))throw new ZC("One of your code blocks includes unescaped HTML.",P.innerHTML);j=P;const K=j.textContent,N=V?f(K,{language:V,ignoreIllegals:!0}):d(K);P.innerHTML=N.value,g(P,V,N.language),P.result={language:N.language,re:N.relevance,relevance:N.relevance},N.secondBest&&(P.secondBest={language:N.secondBest.language,relevance:N.secondBest.relevance}),I("after:highlightElement",{el:P,result:N,text:K})}function m(P){o=Sf(o,P)}const w=()=>{_(),Ui("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function v(){_(),Ui("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let A=!1;function _(){if(document.readyState==="loading"){A=!0;return}document.querySelectorAll(o.cssSelector).forEach(p)}function E(){A&&_()}typeof window!="undefined"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",E,!1);function b(P,j){let V=null;try{V=j(e)}catch(K){if(_i("Language definition for '{}' could not be registered.".replace("{}",P)),r)_i(K);else throw K;V=u}V.name||(V.name=P),t[P]=V,V.rawDefinition=j.bind(null,e),V.aliases&&B(V.aliases,{languageName:P})}function x(P){delete t[P];for(const j of Object.keys(n))n[j]===P&&delete n[j]}function y(){return Object.keys(t)}function C(P){return P=(P||"").toLowerCase(),t[P]||t[n[P]]}function B(P,{languageName:j}){typeof P=="string"&&(P=[P]),P.forEach(V=>{n[V.toLowerCase()]=j})}function T(P){const j=C(P);return j&&!j.disableAutodetect}function M(P){P["before:highlightBlock"]&&!P["before:highlightElement"]&&(P["before:highlightElement"]=j=>{P["before:highlightBlock"](Object.assign({block:j.el},j))}),P["after:highlightBlock"]&&!P["after:highlightElement"]&&(P["after:highlightElement"]=j=>{P["after:highlightBlock"](Object.assign({block:j.el},j))})}function R(P){M(P),i.push(P)}function I(P,j){const V=P;i.forEach(function(K){K[V]&&K[V](j)})}function H(P){return Ui("10.7.0","highlightBlock will be removed entirely in v12.0"),Ui("10.7.0","Please use highlightElement now."),p(P)}Object.assign(e,{highlight:f,highlightAuto:d,highlightAll:_,highlightElement:p,highlightBlock:H,configure:m,initHighlighting:w,initHighlightingOnLoad:v,registerLanguage:b,unregisterLanguage:x,listLanguages:y,getLanguage:C,registerAliases:B,autoDetection:T,inherit:Sf,addPlugin:R}),e.debugMode=function(){r=!1},e.safeMode=function(){r=!0},e.versionString=YC,e.regex={concat:Bi,lookahead:sg,either:Dc,optional:fC,anyNumberOfTimes:hC};for(const P in zs)typeof zs[P]=="object"&&oC(zs[P]);return Object.assign(e,zs),e};var ds=QC({}),eF=ds;ds.HighlightJS=ds;ds.default=ds;var pg=eF;function tF(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},i={beginKeywords:["true","false","null"].join(" ")};return{name:"JSON",contains:[t,n,e.QUOTE_STRING_MODE,i,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}const nF='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M6.368 1.01a.75.75 0 01.623.859L6.57 4.5h3.98l.46-2.868a.75.75 0 011.48.237L12.07 4.5h2.18a.75.75 0 010 1.5h-2.42l-.64 4h2.56a.75.75 0 010 1.5h-2.8l-.46 2.869a.75.75 0 01-1.48-.237l.42-2.632H5.45l-.46 2.869a.75.75 0 01-1.48-.237l.42-2.632H1.75a.75.75 0 010-1.5h2.42l.64-4H2.25a.75.75 0 010-1.5h2.8l.46-2.868a.75.75 0 01.858-.622zM9.67 10l.64-4H6.33l-.64 4h3.98z"></path></svg>';pg.registerLanguage("json",tF);Se.use({highlight:(e,t)=>{if(t!=="")return pg.highlight(e,{language:t}).value}});function iF({id:e}){const{locale:t}=rt(),{version:n,changeVersion:i}=vr(),{changeTitle:r}=on(),[s,u]=oe(void 0),o=Qe(()=>{if(!s)return;const E=hw(s);return r(E==null?void 0:E.title,E==null?void 0:E.versions),E},[s]),c=Qe(()=>{var b;const E=He.versions.map(x=>x.id);return(b=o==null?void 0:o.versions)==null?void 0:b.sort((x,y)=>E.indexOf(y)-E.indexOf(x))},[o==null?void 0:o.versions]),a=Qe(()=>!c||c.includes(n)?n:c[0],[n,o==null?void 0:o.versions]),f=Qe(()=>{if(!s)return;const E=s.substring(s.indexOf("---",3)+3);return fw(E,a)},[a,s]),l=Qe(()=>{if(!!f)return Se.use({renderer:{link(E,b,x){if(E===null)return x;const y=b?` title="${b}"`:"",C=E!=null&&E.match(/^https?:\/\//)?' target="_blank"':"";return`<a href="${E}"${y}${C}>${x}</a>`},heading(E,b,x,y){const C=y.slug(x),B=`<span id="guide-${C}" href="?version=${n}#${C}">${nF}</span>`;return`<h${b}>${B}${E}</h${b}>`}}}),Se(f,{version:"1.19"})},[f]),[h,d]=mw(),g=At(()=>{if(!l)return;const E=document.querySelector(`[id=guide-${h.slice(1)}]`);if(E){const b=E.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:b-68,behavior:"smooth"})}},[l,h]);xe(()=>{g()},[l===void 0,h]);const p=At(E=>{if(!(E.target instanceof HTMLSpanElement))return;const b="#"+E.target.id.replace(/^guide-/,"");i(n,!1,!0),d(b),b===h&&g()},[g,h,n]);xe(()=>{(async()=>{const b=await(await fetch(`../../guides/${e}.md`)).text();u(b)})()},[e]);const[m,w]=Cr(),v=At(()=>{const E=`${location.origin}/guides/${e}/?version=${n}`;navigator.clipboard.writeText(E),w()},[e,n]),A=E=>{ri(`/guides/?tags=${E}`)},[_]=oe(window.innerWidth>600);return S("main",null,S("div",{class:"guide"},S("div",{class:"navigation"},S("a",{class:"btn btn-link",href:"/guides/"},$e.arrow_left,t("guides.all")),S(Ee,{icon:m?"check":"link",label:t("share"),onClick:v,active:m,tooltip:t(m?"copied":"copy_share"),class:"guide-share"}),c&&S($t,{icon:"tag",label:a,tooltip:t("switch_version")},c.map(E=>S(Ee,{label:E,active:E===a,onClick:()=>i(E)})))),(o==null?void 0:o.tags)&&o.tags.length>0&&S("div",{class:"guide-tags"},o.tags.map(E=>S(Ss,{label:E,active:!0,onClick:()=>A(E)}))),l&&S(De,null,S(ps,{id:"guide",type:_?"image":"text"}),S("div",{class:"guide-content",dangerouslySetInnerHTML:{__html:l},onClick:p}),S(Ec,null))))}const rF="tags",Ua="|";function sF({}){const{locale:e}=rt(),{version:t,changeVersion:n}=vr();on(e("title.guides"));const[i,r]=oe(""),[s,u]=Gr(rF),o=Qe(()=>{var d;return(d=s==null?void 0:s.split(Ua))!=null?d:[]},[s]),c=d=>{o.includes(d)?u(o.filter(g=>g!==d).join(Ua)):u([...o,d].sort().join(Ua))},[a,f]=oe(!1),l=Qe(()=>a===!1?[{id:"adding-custom-structures",title:"Adding custom structures",versions:["1.18.2","1.19"],tags:["worldgen","structures"]}]:[{id:"adding-custom-structures",title:"Adding custom structures",versions:["1.18.2","1.19"],tags:["worldgen","structures"]}].filter(d=>{var g;return(g=d.versions)==null?void 0:g.includes(t)}),[t,a]),h=Qe(()=>{const d=i.split(" ").map(g=>g.trim().toLowerCase()).filter(g=>g.length>0);return l.filter(g=>{var m;if(!o.every(w=>{var v;return(v=g.tags)==null?void 0:v.includes(w)}))return!1;const p=((m=g.tags)==null?void 0:m.join(" "))+" "+g.title.toLowerCase();return d.every(w=>w.startsWith("!")?w.length===1||!p.includes(w.slice(1)):p.includes(w))})},[l,i,s]);return S("main",null,S("div",{class:"guides"},S("div",{class:"changelog-query"},S(Ei,{class:"btn btn-input changelog-search",placeholder:e("guides.search"),value:i,onChange:r}),S($t,{icon:"tag",label:a?t:e("any_version"),tooltip:e("switch_version")},S(Ee,{label:e("any_version"),active:!a,onClick:()=>f(!a)}),He.versions.slice().reverse().map(d=>S(Ee,{label:d.id,active:a&&d.id===t,onClick:()=>{n(d.id),f(!0)}})))),o.length>0&&S("div",{class:"changelog-tags"},o.map(d=>S(Ss,{label:d,onClick:()=>c(d)}))),l.length===0?S(De,null,S("span",{class:"note"},e("guides.no_results.version"))):h.length===0?S(De,null,S("span",{class:"note"},e("guides.no_results.query"))):h.map(d=>{var g,p;return S(tC,{title:d.title,link:`/guides/${d.id}/`,tags:(g=d.tags)!=null?g:[],versions:(p=d.versions)!=null?p:[],activeTags:o,toggleTag:c})})))}function oF({}){const{locale:e}=rt();return on(e("title.home")),S("main",null,S("div",{class:"home"},S(jt,{title:"Data packs"},He.generators.filter(t=>!t.category).map(t=>S(jt,{title:e(t.id),link:Nn(t.url)})),S(jt,{title:e("worldgen"),link:"/worldgen/"})),S(jt,{title:"Resource packs"},He.generators.filter(t=>t.category==="assets").map(t=>S(jt,{title:e(t.id),link:Nn(t.url)}))),S(jt,{title:"Report Inspector",icon:"report",link:"https://misode.github.io/report/",desc:"Analyse your performance reports"}),S(jt,{title:"Minecraft Sounds",icon:"sounds",link:"/sounds/",desc:"Browse through and mix all the vanilla sounds"}),S(jt,{title:"Data Pack Upgrader",link:"https://misode.github.io/upgrader/",desc:"Convert your data packs from 1.16 to 1.17 to 1.18"}),S(jt,{title:"Technical Changelog",link:"/changelog/"}),S(jt,{title:"Minecraft Versions",link:"/versions/"}),S(jt,{title:"Data Pack Guides",link:"/guides/"}),S(Ec,null)))}function aF({}){const{locale:e}=rt(),{project:t,openFile:n}=i0();on(e("title.project",t.name));const i=Qe(()=>t.files.map(Ww),t.files),r=s=>{const[,u,o,...c]=s.split("/");n(o,`${u}:${c}`)};return S("main",null,S(ps,{id:"data-pack-project",type:"text"}),S("div",{class:"project"},S("h2",null,t.name),S("div",{class:"file-view"},S(ig,{entries:i,onSelect:r}))))}function lF({}){const{locale:e}=rt(),{version:t,changeVersion:n}=vr(),[i,r]=oe(null);on(e("title.sounds"));const[s,u]=oe({}),o=Object.keys(s!=null?s:{});xe(()=>{Fw(t).then(u).catch(_=>{console.error(_),r(_)})},[t]);const[c,a]=oe(""),[f,l]=oe([]),h=()=>{l([{id:vi(),sound:c,delay:0,pitch:1,volume:1},...f])},d=_=>E=>{l(f.map(b=>b.id===_?Ce(Ce({},b),E):b))},g=_=>()=>{l(f.filter(E=>E.id!==_))},[p,m]=oe(0),w=()=>{m(p+1)},v=Xe(null),A=()=>{const _=f.some(b=>b.delay>0),E=f.sort((b,x)=>b.delay-x.delay).map(b=>`${_?`execute if score @s delay matches ${b.delay} run `:""}playsound minecraft:${b.sound} master @s ~ ~ ~ ${b.volume} ${b.pitch}`).join(`
|
|
`);v.current.setAttribute("href","data:text/plain;charset=utf-8,"+E+"%0A"),v.current.setAttribute("download","sounds.mcfunction"),v.current.click()};return S("main",null,i&&S(Xi,{error:i,onDismiss:()=>r(null)}),o.length>0&&S(De,null,S("div",{class:"controls sounds-controls"},S("div",{class:"sound-search-group"},S(Ei,{class:"btn btn-input sound-search",list:"sound-list",placeholder:e("sounds.search"),value:c,onChange:a,onEnter:h}),S(Ee,{icon:"plus",tooltip:e("sounds.add_sound"),class:"add-sound",onClick:h})),f.length>1&&S(Ee,{icon:"play",label:e("sounds.play_all"),class:"play-all-sounds",onClick:w}),S("div",{class:"spacer"}),S(Ee,{icon:"download",label:e("download"),tooltip:e("sounds.download_function"),class:"download-sounds",onClick:A}),S($t,{icon:"tag",label:t,tooltip:e("switch_version")},He.versions.slice().reverse().map(_=>S(Ee,{label:_.id,active:_.id===t,onClick:()=>n(_.id)})))),S("div",{class:"sounds"},f.map(_=>S(iC,tt(Ce({key:_.id},_),{sounds:s,delayedPlay:p,onEdit:d(_.id),onDelete:g(_.id)})))),S("a",{ref:v,style:"display: none;"})),S("datalist",{id:"sound-list"},o.map(_=>S("option",{key:_,value:_}))))}function cF({}){const{locale:e}=rt(),[t,n]=oe(null);on(e("title.versions"));const[i,r]=oe([]);xe(()=>{Dw().then(a=>r(a)).catch(a=>{console.error(a),n(a)})},[]);const[s]=Gr("id"),u=i.find(a=>a.id===s);on(u?u.name:"Versions Explorer",u?[]:void 0);const o=u&&kf(i,u,-1),c=u&&kf(i,u,1);return S("main",null,S(ps,{type:"text",id:"versions"}),t&&S(Xi,{error:t,onDismiss:()=>n(null)}),S("div",{class:"versions"},s?S(De,null,S("div",{class:"navigation"},S("a",{class:"btn btn-link",href:"/versions/"},$e.three_bars,e("versions.all")),S("a",Ce({class:"btn btn-link"},c?{href:`/versions/?id=${c.id}`}:{disabled:!0}),$e.arrow_left,e("versions.previous")),S("a",Ce({class:"btn btn-link"},o?{href:`/versions/?id=${o.id}`}:{disabled:!0}),e("versions.next"),$e.arrow_right)),u?S(qx,{version:u}):S("div",{class:"version-detail"},S("h2",null,s),S("div",{class:"version-info"},S("p",null,"This version does not exist. Only versions since 1.14 are tracked, or it may be too recent.")))):S(eC,{versions:i,link:a=>`/versions/?id=${a}`})))}function kf(e,t,n){const r=e.findIndex(s=>s.id===t.id)+n;if(!(r<0||r>=e.length))return e[r]}function uF(){return S(De,null,S(nC,null),S(In,{onChange:t=>{window.dispatchEvent(new CustomEvent("replacestate")),setTimeout(()=>lt.pageview(Nn(t.url)))}},S(oF,{path:"/"}),S(Ef,{path:"/worldgen",category:"worldgen"}),S(Ef,{path:"/assets",category:"assets"}),S(lF,{path:"/sounds"}),S(rC,{path:"/changelog"}),S(cF,{path:"/versions"}),S(aF,{path:"/project"}),S(sF,{path:"/guides/"}),S(iF,{path:"/guides/:id"}),S(sC,{default:!0})))}function hF(){return S(Hw,null,S(Vw,null,S(Jw,null,S(Kw,null,S(jw,null,S(uF,null))))))}Qi(S(hF,null),document.body);export{tn as c,ae as l};
|
|
//# sourceMappingURL=index.36354f76.js.map
|