diff --git a/assets/FileSaver.min-ff83db48.js b/assets/FileSaver.min-33758e75.js similarity index 97% rename from assets/FileSaver.min-ff83db48.js rename to assets/FileSaver.min-33758e75.js index 7a65f15..8eeee3a 100644 --- a/assets/FileSaver.min-ff83db48.js +++ b/assets/FileSaver.min-33758e75.js @@ -1 +1 @@ -import{g as O,c as d}from"./index-08b47763.js";function A(u,v){for(var l=0;lr[c]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}var E={exports:{}};(function(u,v){(function(l,r){r()})(d,function(){function l(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function r(e,t,i){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){p(o.response,t,i)},o.onerror=function(){console.error("could not download file")},o.send()}function c(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function s(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof d=="object"&&d.global===d?d:void 0,y=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),p=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!y?function(e,t,i){var o=a.URL||a.webkitURL,n=document.createElement("a");t=t||e.name||"download",n.download=t,n.rel="noopener",typeof e=="string"?(n.href=e,n.origin===location.origin?s(n):c(n.href)?r(e,t,i):s(n,n.target="_blank")):(n.href=o.createObjectURL(e),setTimeout(function(){o.revokeObjectURL(n.href)},4e4),setTimeout(function(){s(n)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,i){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(l(e,i),t);else if(c(e))r(e,t,i);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){s(o)})}}:function(e,t,i,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return r(e,t,i);var n=e.type==="application/octet-stream",g=/constructor/i.test(a.HTMLElement)||a.safari,b=/CriOS\/[\d]+/.test(navigator.userAgent);if((b||n&&g||y)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var f=m.result;f=b?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=f:location=f,o=null},m.readAsDataURL(e)}else{var j=a.URL||a.webkitURL,w=j.createObjectURL(e);o?o.location=w:location.href=w,o=null,setTimeout(function(){j.revokeObjectURL(w)},4e4)}});a.saveAs=p.saveAs=p,u.exports=p})})(E);var h=E.exports;const L=O(h),S=A({__proto__:null,default:L},[h]);export{S as F}; +import{g as O,c as d}from"./index-c2d21eb6.js";function A(u,v){for(var l=0;lr[c]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}var E={exports:{}};(function(u,v){(function(l,r){r()})(d,function(){function l(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function r(e,t,i){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){p(o.response,t,i)},o.onerror=function(){console.error("could not download file")},o.send()}function c(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function s(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof d=="object"&&d.global===d?d:void 0,y=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),p=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!y?function(e,t,i){var o=a.URL||a.webkitURL,n=document.createElement("a");t=t||e.name||"download",n.download=t,n.rel="noopener",typeof e=="string"?(n.href=e,n.origin===location.origin?s(n):c(n.href)?r(e,t,i):s(n,n.target="_blank")):(n.href=o.createObjectURL(e),setTimeout(function(){o.revokeObjectURL(n.href)},4e4),setTimeout(function(){s(n)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,i){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(l(e,i),t);else if(c(e))r(e,t,i);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){s(o)})}}:function(e,t,i,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return r(e,t,i);var n=e.type==="application/octet-stream",g=/constructor/i.test(a.HTMLElement)||a.safari,b=/CriOS\/[\d]+/.test(navigator.userAgent);if((b||n&&g||y)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var f=m.result;f=b?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=f:location=f,o=null},m.readAsDataURL(e)}else{var j=a.URL||a.webkitURL,w=j.createObjectURL(e);o?o.location=w:location.href=w,o=null,setTimeout(function(){j.revokeObjectURL(w)},4e4)}});a.saveAs=p.saveAs=p,u.exports=p})})(E);var h=E.exports;const L=O(h),S=A({__proto__:null,default:L},[h]);export{S as F}; diff --git a/assets/index-08b47763.js b/assets/index-c2d21eb6.js similarity index 55% rename from assets/index-08b47763.js rename to assets/index-c2d21eb6.js index 7bc2eba..78121a0 100644 --- a/assets/index-08b47763.js +++ b/assets/index-c2d21eb6.js @@ -1,59 +1,59 @@ -var wx=Object.defineProperty;var yx=(n,e,t)=>e in n?wx(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var xh=(n,e,t)=>(yx(n,typeof e!="symbol"?e+"":e,t),t);import*as vx from"https://cdn.jsdelivr.net/npm/minizinc/dist/minizinc.mjs";import*as Px from"https://cdn.jsdelivr.net/npm/minizinc@edge/dist/minizinc.mjs";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.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 l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function t(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=t(r);fetch(r.href,s)}})();function We(){}const dd=n=>n;function kx(n,e){for(const t in e)n[t]=e[t];return n}function Mb(n){return n()}function fm(){return Object.create(null)}function ii(n){n.forEach(Mb)}function Ic(n){return typeof n=="function"}function Ui(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let $f;function cm(n,e){return n===e?!0:($f||($f=document.createElement("a")),$f.href=e,n===$f.href)}function _x(n){return Object.keys(n).length===0}function an(n,e,t,i){if(n){const r=Db(n,e,t,i);return n[0](r)}}function Db(n,e,t,i){return n[1]&&i?kx(t.ctx.slice(),n[1](i(e))):t.ctx}function fn(n,e,t,i){if(n[2]&&i){const r=n[2](i(t));if(e.dirty===void 0)return r;if(typeof r=="object"){const s=[],l=Math.max(e.dirty.length,r.length);for(let o=0;o32){const e=[],t=n.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),pd=zb?n=>requestAnimationFrame(n):We;const _l=new Set;function Nb(n){_l.forEach(e=>{e.c(n)||(_l.delete(e),e.f())}),_l.size!==0&&pd(Nb)}function Lb(n){let e;return _l.size===0&&pd(Nb),{promise:new Promise(t=>{_l.add(e={c:n,f:t})}),abort(){_l.delete(e)}}}const Wx=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function v(n,e){n.appendChild(e)}function Bb(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function xx(n){const e=_("style");return e.textContent="/* empty */",Cx(Bb(n),e),e.sheet}function Cx(n,e){return v(n.head||n,e),e.sheet}function V(n,e,t){n.insertBefore(e,t||null)}function Y(n){n.parentNode&&n.parentNode.removeChild(n)}function Pi(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function jb(n){return function(e){return e.preventDefault(),n.call(this,e)}}function y(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Do(n){return n===""?null:+n}function Xx(n){return Array.from(n.childNodes)}function He(n,e){e=""+e,n.data!==e&&(n.data=e)}function vi(n,e){n.value=e??""}function hm(n,e,t,i){t==null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function Ul(n,e,t){for(let i=0;ie.__value)}function ae(n,e,t){n.classList.toggle(e,!!t)}function Fb(n,e,{bubbles:t=!1,cancelable:i=!1}={}){return new CustomEvent(n,{detail:e,bubbles:t,cancelable:i})}const sc=new Map;let lc=0;function Zx(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function Rx(n,e){const t={stylesheet:xx(e),rules:{}};return sc.set(n,t),t}function hO(n,e,t,i,r,s,l,o=0){const f=16.666/i;let u=`{ +var wx=Object.defineProperty;var yx=(n,e,t)=>e in n?wx(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Xh=(n,e,t)=>(yx(n,typeof e!="symbol"?e+"":e,t),t);import*as vx from"https://cdn.jsdelivr.net/npm/minizinc/dist/minizinc.mjs";import*as Px from"https://cdn.jsdelivr.net/npm/minizinc@edge/dist/minizinc.mjs";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.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 l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function t(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=t(r);fetch(r.href,s)}})();function We(){}const gd=n=>n;function kx(n,e){for(const t in e)n[t]=e[t];return n}function Db(n){return n()}function cm(){return Object.create(null)}function ti(n){n.forEach(Db)}function Lc(n){return typeof n=="function"}function Ri(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let wf;function um(n,e){return n===e?!0:(wf||(wf=document.createElement("a")),wf.href=e,n===wf.href)}function _x(n){return Object.keys(n).length===0}function ln(n,e,t,i){if(n){const r=zb(n,e,t,i);return n[0](r)}}function zb(n,e,t,i){return n[1]&&i?kx(t.ctx.slice(),n[1](i(e))):t.ctx}function on(n,e,t,i){if(n[2]&&i){const r=n[2](i(t));if(e.dirty===void 0)return r;if(typeof r=="object"){const s=[],l=Math.max(e.dirty.length,r.length);for(let o=0;o32){const e=[],t=n.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),md=Ib?n=>requestAnimationFrame(n):We;const Wl=new Set;function Lb(n){Wl.forEach(e=>{e.c(n)||(Wl.delete(e),e.f())}),Wl.size!==0&&md(Lb)}function Bb(n){let e;return Wl.size===0&&md(Lb),{promise:new Promise(t=>{Wl.add(e={c:n,f:t})}),abort(){Wl.delete(e)}}}const Wx=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function v(n,e){n.appendChild(e)}function jb(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function xx(n){const e=_("style");return e.textContent="/* empty */",Cx(jb(n),e),e.sheet}function Cx(n,e){return v(n.head||n,e),e.sheet}function V(n,e,t){n.insertBefore(e,t||null)}function Y(n){n.parentNode&&n.parentNode.removeChild(n)}function vi(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function Fb(n){return function(e){return e.preventDefault(),n.call(this,e)}}function y(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function zo(n){return n===""?null:+n}function Xx(n){return Array.from(n.childNodes)}function Je(n,e){e=""+e,n.data!==e&&(n.data=e)}function yi(n,e){n.value=e??""}function Om(n,e,t,i){t==null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function Yl(n,e,t){for(let i=0;ie.__value)}function ae(n,e,t){n.classList.toggle(e,!!t)}function Gb(n,e,{bubbles:t=!1,cancelable:i=!1}={}){return new CustomEvent(n,{detail:e,bubbles:t,cancelable:i})}const oc=new Map;let ac=0;function Zx(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function Rx(n,e){const t={stylesheet:xx(e),rules:{}};return oc.set(n,t),t}function dO(n,e,t,i,r,s,l,o=0){const f=16.666/i;let u=`{ `;for(let $=0;$<=1;$+=f){const P=e+(t-e)*s($);u+=$*100+`%{${l(P,1-P)}} `}const h=u+`100% {${l(t,1-t)}} -}`,O=`__svelte_${Zx(h)}_${o}`,p=Bb(n),{stylesheet:g,rules:b}=sc.get(p)||Rx(p,n);b[O]||(b[O]=!0,g.insertRule(`@keyframes ${O} ${h}`,g.cssRules.length));const Q=n.style.animation||"";return n.style.animation=`${Q?`${Q}, `:""}${O} ${i}ms linear ${r}ms 1 both`,lc+=1,O}function Gb(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?s=>s.indexOf(e)<0:s=>s.indexOf("__svelte")===-1),r=t.length-i.length;r&&(n.style.animation=i.join(", "),lc-=r,lc||Ax())}function Ax(){pd(()=>{lc||(sc.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&Y(e)}),sc.clear())})}function Ux(n,e,t,i){if(!e)return We;const r=n.getBoundingClientRect();if(e.left===r.left&&e.right===r.right&&e.top===r.top&&e.bottom===r.bottom)return We;const{delay:s=0,duration:l=300,easing:o=dd,start:f=Ib()+s,end:u=f+l,tick:h=We,css:O}=t(n,{from:e,to:r},i);let p=!0,g=!1,b;function Q(){O&&(b=hO(n,0,1,l,s,o,O)),s||(g=!0)}function $(){O&&Gb(n,b),p=!1}return Lb(P=>{if(!g&&P>=f&&(g=!0),g&&P>=u&&(h(1,0),$()),!p)return!1;if(g){const x=P-f,A=0+1*o(x/l);h(A,1-A)}return!0}),Q(),h(0,1),$}function Yx(n){const e=getComputedStyle(n);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:i}=e,r=n.getBoundingClientRect();n.style.position="absolute",n.style.width=t,n.style.height=i,Vx(n,r)}}function Vx(n,e){const t=n.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const i=getComputedStyle(n),r=i.transform==="none"?"":i.transform;n.style.transform=`${r} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let zo;function Ro(n){zo=n}function Hb(){if(!zo)throw new Error("Function called outside component initialization");return zo}function Nc(n){Hb().$$.on_mount.push(n)}function Bn(){const n=Hb();return(e,t,{cancelable:i=!1}={})=>{const r=n.$$.callbacks[e];if(r){const s=Fb(e,t,{cancelable:i});return r.slice().forEach(l=>{l.call(n,s)}),!s.defaultPrevented}return!0}}function dm(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const bl=[],Dt=[];let xl=[];const OO=[],Kb=Promise.resolve();let dO=!1;function Jb(){dO||(dO=!0,Kb.then(e$))}function lr(){return Jb(),Kb}function ar(n){xl.push(n)}function Ao(n){OO.push(n)}const Ch=new Set;let ml=0;function e$(){if(ml!==0)return;const n=zo;do{try{for(;mln.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),xl=e}let So;function Mx(){return So||(So=Promise.resolve(),So.then(()=>{So=null})),So}function Xh(n,e,t){n.dispatchEvent(Fb(`${e?"intro":"outro"}${t}`))}const Lf=new Set;let zr;function nt(){zr={r:0,c:[],p:zr}}function rt(){zr.r||ii(zr.c),zr=zr.p}function D(n,e){n&&n.i&&(Lf.delete(n),n.i(e))}function F(n,e,t,i){if(n&&n.o){if(Lf.has(n))return;Lf.add(n),zr.c.push(()=>{Lf.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const Dx={duration:0};function wl(n,e,t,i){let s=e(n,t,{direction:"both"}),l=i?0:1,o=null,f=null,u=null,h;function O(){u&&Gb(n,u)}function p(b,Q){const $=b.b-l;return Q*=Math.abs($),{a:l,b:b.b,d:$,duration:Q,start:b.start,end:b.start+Q,group:b.group}}function g(b){const{delay:Q=0,duration:$=300,easing:P=dd,tick:x=We,css:A}=s||Dx,C={start:Ib()+Q,b};b||(C.group=zr,zr.r+=1),"inert"in n&&(b?h!==void 0&&(n.inert=h):(h=n.inert,n.inert=!0)),o||f?f=C:(A&&(O(),u=hO(n,l,b,$,Q,P,A)),b&&x(0,1),o=p(C,$),ar(()=>Xh(n,b,"start")),Lb(X=>{if(f&&X>f.start&&(o=p(f,$),f=null,Xh(n,o.b,"start"),A&&(O(),u=hO(n,l,o.b,o.duration,0,P,s.css))),o){if(X>=o.end)x(l=o.b,1-l),Xh(n,o.b,"end"),f||(o.b?O():--o.group.r||ii(o.group.c)),o=null;else if(X>=o.start){const Z=X-o.start;l=o.a+o.d*P(Z/o.duration),x(l,1-l)}}return!!(o||f)}))}return{run(b){Ic(s)?Mx().then(()=>{s=s({direction:b?"in":"out"}),g(b)}):g(b)},end(){O(),o=f=null}}}function st(n){return(n==null?void 0:n.length)!==void 0?n:Array.from(n)}function zx(n,e){F(n,1,1,()=>{e.delete(n.key)})}function Ix(n,e){n.f(),zx(n,e)}function Nx(n,e,t,i,r,s,l,o,f,u,h,O){let p=n.length,g=s.length,b=p;const Q={};for(;b--;)Q[n[b].key]=b;const $=[],P=new Map,x=new Map,A=[];for(b=g;b--;){const I=O(r,s,b),q=t(I);let N=l.get(q);N?i&&A.push(()=>N.p(I,e)):(N=u(q,I),N.c()),P.set(q,$[b]=N),q in Q&&x.set(q,Math.abs(b-Q[q]))}const C=new Set,X=new Set;function Z(I){D(I,1),I.m(o,h),l.set(I.key,I),h=I.first,g--}for(;p&&g;){const I=$[g-1],q=n[p-1],N=I.key,z=q.key;I===q?(h=I.first,p--,g--):P.has(z)?!l.has(N)||C.has(N)?Z(I):X.has(z)?p--:x.get(N)>x.get(z)?(X.add(N),Z(I)):(C.add(z),p--):(f(q,l),p--)}for(;p--;){const I=n[p];P.has(I.key)||f(I,l)}for(;g;)Z($[g-1]);return ii(A),$}function Uo(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function ze(n){n&&n.c()}function qe(n,e,t){const{fragment:i,after_update:r}=n.$$;i&&i.m(e,t),ar(()=>{const s=n.$$.on_mount.map(Mb).filter(Ic);n.$$.on_destroy?n.$$.on_destroy.push(...s):ii(s),n.$$.on_mount=[]}),r.forEach(ar)}function Ee(n,e){const t=n.$$;t.fragment!==null&&(Ex(t.after_update),ii(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Lx(n,e){n.$$.dirty[0]===-1&&(bl.push(n),Jb(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const b=g.length?g[0]:p;return u.ctx&&r(u.ctx[O],u.ctx[O]=b)&&(!u.skip_bound&&u.bound[O]&&u.bound[O](b),h&&Lx(n,O)),p}):[],u.update(),h=!0,ii(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const O=Xx(e.target);u.fragment&&u.fragment.l(O),O.forEach(Y)}else u.fragment&&u.fragment.c();e.intro&&D(n.$$.fragment),qe(n,e.target,e.anchor),e$()}Ro(f)}class Vi{constructor(){xh(this,"$$");xh(this,"$$set")}$destroy(){Ee(this,1),this.$destroy=We}$on(e,t){if(!Ic(t))return We;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const r=i.indexOf(t);r!==-1&&i.splice(r,1)}}$set(e){this.$$set&&!_x(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Bx="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Bx);const jx="modulepreload",Fx=function(n,e){return new URL(n,e).href},pm={},gm=function(e,t,i){if(!t||t.length===0)return e();const r=document.getElementsByTagName("link");return Promise.all(t.map(s=>{if(s=Fx(s,i),s in pm)return;pm[s]=!0;const l=s.endsWith(".css"),o=l?'[rel="stylesheet"]':"";if(!!i)for(let h=r.length-1;h>=0;h--){const O=r[h];if(O.href===s&&(!l||O.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${o}`))return;const u=document.createElement("link");if(u.rel=l?"stylesheet":jx,l||(u.as="script",u.crossOrigin=""),u.href=s,document.head.appendChild(u),l)return new Promise((h,O)=>{u.addEventListener("load",h),u.addEventListener("error",()=>O(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e()).catch(s=>{const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s})};class mt{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),$r.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let i=[];return this.decompose(e,t,i,0),$r.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new Yo(this),s=new Yo(e);for(let l=t,o=t;;){if(r.next(l),s.next(l),l=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(o+=r.value.length,r.done||o>=i)return!0}}iter(e=1){return new Yo(this,e)}iterRange(e,t=this.length){return new t$(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new i$(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?mt.empty:e.length<=32?new ai(e):$r.from(ai.split(e,[]))}}class ai extends mt{constructor(e,t=Gx(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let s=0;;s++){let l=this.text[s],o=r+l.length;if((t?i:o)>=e)return new Hx(r,o,i,l);r=o+1,i++}}decompose(e,t,i,r){let s=e<=0&&t>=this.length?this:new ai(mm(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let l=i.pop(),o=Bf(s.text,l.text.slice(),0,s.length);if(o.length<=32)i.push(new ai(o,l.length+s.length));else{let f=o.length>>1;i.push(new ai(o.slice(0,f)),new ai(o.slice(f)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof ai))return super.replace(e,t,i);let r=Bf(this.text,Bf(i.text,mm(this.text,0,e)),t),s=this.length+i.length-(t-e);return r.length<=32?new ai(r,s):$r.from(ai.split(r,[]),s)}sliceString(e,t=this.length,i=` -`){let r="";for(let s=0,l=0;s<=t&&le&&l&&(r+=i),es&&(r+=o.slice(Math.max(0,e-s),t-s)),s=f+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(t.push(new ai(i,r)),i=[],r=-1);return r>-1&&t.push(new ai(i,r)),t}}class $r extends mt{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,r){for(let s=0;;s++){let l=this.children[s],o=r+l.length,f=i+l.lines-1;if((t?f:o)>=e)return l.lineInner(e,t,i,r);r=o+1,i=f+1}}decompose(e,t,i,r){for(let s=0,l=0;l<=t&&s=l){let u=r&((l<=e?1:0)|(f>=t?2:0));l>=e&&f<=t&&!u?i.push(o):o.decompose(e-l,t-l,i,u)}l=f+1}}replace(e,t,i){if(i.lines=s&&t<=o){let f=l.replace(e-s,t-s,i),u=this.lines-l.lines+f.lines;if(f.lines>5-1&&f.lines>u>>5+1){let h=this.children.slice();return h[r]=f,new $r(h,this.length-(t-e)+i.length)}return super.replace(s,o,f)}s=o+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=` -`){let r="";for(let s=0,l=0;se&&s&&(r+=i),el&&(r+=o.sliceString(e-l,t-l,i)),l=f+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof $r))return 0;let i=0,[r,s,l,o]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,s+=t){if(r==l||s==o)return i;let f=this.children[r],u=e.children[s];if(f!=u)return i+f.scanIdentical(u,t);i+=f.length+1}}static from(e,t=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let g of e)i+=g.lines;if(i<32){let g=[];for(let b of e)b.flatten(g);return new ai(g,t)}let r=Math.max(32,i>>5),s=r<<1,l=r>>1,o=[],f=0,u=-1,h=[];function O(g){let b;if(g.lines>s&&g instanceof $r)for(let Q of g.children)O(Q);else g.lines>l&&(f>l||!f)?(p(),o.push(g)):g instanceof ai&&f&&(b=h[h.length-1])instanceof ai&&g.lines+b.lines<=32?(f+=g.lines,u+=g.length+1,h[h.length-1]=new ai(b.text.concat(g.text),b.length+1+g.length)):(f+g.lines>r&&p(),f+=g.lines,u+=g.length+1,h.push(g))}function p(){f!=0&&(o.push(h.length==1?h[0]:$r.from(h,u)),u=-1,f=h.length=0)}for(let g of e)O(g);return p(),o.length==1?o[0]:new $r(o,t)}}mt.empty=new ai([""],0);function Gx(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Bf(n,e,t=0,i=1e9){for(let r=0,s=0,l=!0;s=t&&(f>i&&(o=o.slice(0,i-r)),r0?1:(e instanceof ai?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],l=s>>1,o=r instanceof ai?r.text.length:r.children.length;if(l==(t>0?o:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=` -`,this;e--}else if(r instanceof ai){let f=r.text[l+(t<0?-1:0)];if(this.offsets[i]+=t,f.length>Math.max(0,e))return this.value=e==0?f:t>0?f.slice(e):f.slice(0,f.length-e),this;e-=f.length}else{let f=r.children[l+(t<0?-1:0)];e>f.length?(e-=f.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(f),this.offsets.push(t>0?1:(f instanceof ai?f.text.length:f.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class t${constructor(e,t,i){this.value="",this.done=!1,this.cursor=new Yo(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=i?r:t<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class i${constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:r}=this.inner.next(e);return t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(mt.prototype[Symbol.iterator]=function(){return this.iter()},Yo.prototype[Symbol.iterator]=t$.prototype[Symbol.iterator]=i$.prototype[Symbol.iterator]=function(){return this});class Hx{constructor(e,t,i,r){this.from=e,this.to=t,this.number=i,this.text=r}get length(){return this.to-this.from}}let Cl="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;nn)return Cl[e-1]<=n;return!1}function Sm(n){return n>=127462&&n<=127487}const bm=8205;function Bi(n,e,t=!0,i=!0){return(t?n$:Jx)(n,e,i)}function n$(n,e,t){if(e==n.length)return e;e&&r$(n.charCodeAt(e))&&s$(n.charCodeAt(e-1))&&e--;let i=Zi(n,e);for(e+=Pn(i);e=0&&Sm(Zi(n,l));)s++,l-=2;if(s%2==0)break;e+=2}else break}return e}function Jx(n,e,t){for(;e>0;){let i=n$(n,e-2,t);if(i=56320&&n<57344}function s$(n){return n>=55296&&n<56320}function Zi(n,e){let t=n.charCodeAt(e);if(!s$(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return r$(i)?(t-55296<<10)+(i-56320)+65536:t}function gd(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Pn(n){return n<65536?1:2}const pO=/\r\n?|\n/;var Ai=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(Ai||(Ai={}));class Pr{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return s+(e-r);s+=o}else{if(i!=Ai.Simple&&u>=e&&(i==Ai.TrackDel&&re||i==Ai.TrackBefore&&re))return null;if(u>e||u==e&&t<0&&!o)return e==r||t<0?s:s+f;s+=f}r=u}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,t=e){for(let i=0,r=0;i=0&&r<=t&&o>=e)return rt?"cover":!0;r=o}return!1}toString(){let e="";for(let t=0;t=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Pr(e)}static create(e){return new Pr(e)}}class Si extends Pr{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return gO(this,(t,i,r,s,l)=>e=e.replace(r,r+(i-t),l),!1),e}mapDesc(e,t=!1){return mO(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let r=0,s=0;r=0){t[r]=o,t[r+1]=l;let f=r>>1;for(;i.length0&&ms(i,t,s.text),s.forward(h),o+=h}let u=e[l++];for(;o>1].toJSON()))}return e}static of(e,t,i){let r=[],s=[],l=0,o=null;function f(h=!1){if(!h&&!r.length)return;lp||O<0||p>t)throw new RangeError(`Invalid change range ${O} to ${p} (in doc of length ${t})`);let b=g?typeof g=="string"?mt.of(g.split(i||pO)):g:mt.empty,Q=b.length;if(O==p&&Q==0)return;Ol&&Ni(r,O-l,-1),Ni(r,p-O,Q),ms(s,r,b),l=p}}return u(e),f(!o),o}static empty(e){return new Si(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let r=0;ro&&typeof l!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;i.length=0&&t<=0&&t==n[r+1]?n[r]+=e:e==0&&n[r]==0?n[r+1]+=t:i?(n[r]+=e,n[r+1]+=t):n.push(e,t)}function ms(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i>1])),!(t||l==n.sections.length||n.sections[l+1]<0);)o=n.sections[l++],f=n.sections[l++];e(r,u,s,h,O),r=u,s=h}}}function mO(n,e,t,i=!1){let r=[],s=i?[]:null,l=new Io(n),o=new Io(e);for(let f=-1;;)if(l.ins==-1&&o.ins==-1){let u=Math.min(l.len,o.len);Ni(r,u,-1),l.forward(u),o.forward(u)}else if(o.ins>=0&&(l.ins<0||f==l.i||l.off==0&&(o.len=0&&f=0){let u=0,h=l.len;for(;h;)if(o.ins==-1){let O=Math.min(h,o.len);u+=O,h-=O,o.forward(O)}else if(o.ins==0&&o.lenf||l.ins>=0&&l.len>f)&&(o||i.length>u),s.forward2(f),l.forward(f)}}}}class Io{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?mt.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?mt.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class js{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&16?this.to:this.from}get head(){return this.flags&16?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&4?-1:this.flags&8?1:0}get bidiLevel(){let e=this.flags&3;return e==3?null:e}get goalColumn(){let e=this.flags>>5;return e==33554431?void 0:e}map(e,t=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new js(i,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return J.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return J.range(this.anchor,i)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return J.range(e.anchor,e.head)}static create(e,t,i){return new js(e,t,i)}}class J{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:J.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;te.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new J(e.ranges.map(t=>js.fromJSON(t)),e.main)}static single(e,t=e){return new J([J.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;re?4:0)|s)}static normalized(e,t=0){let i=e[t];e.sort((r,s)=>r.from-s.from),t=e.indexOf(i);for(let r=1;rs.head?J.range(f,o):J.range(o,f))}}return new J(e,t)}}function o$(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let md=0;class ye{constructor(e,t,i,r,s){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=r,this.id=md++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}static define(e={}){return new ye(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Sd),!!e.static,e.enables)}of(e){return new jf([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new jf(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new jf(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function Sd(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class jf{constructor(e,t,i,r){this.dependencies=e,this.facet=t,this.type=i,this.value=r,this.id=md++}dynamicSlot(e){var t;let i=this.value,r=this.facet.compareInput,s=this.id,l=e[s]>>1,o=this.type==2,f=!1,u=!1,h=[];for(let O of this.dependencies)O=="doc"?f=!0:O=="selection"?u=!0:((t=e[O.id])!==null&&t!==void 0?t:1)&1||h.push(e[O.id]);return{create(O){return O.values[l]=i(O),1},update(O,p){if(f&&p.docChanged||u&&(p.docChanged||p.selection)||SO(O,h)){let g=i(O);if(o?!$m(g,O.values[l],r):!r(g,O.values[l]))return O.values[l]=g,1}return 0},reconfigure:(O,p)=>{let g,b=p.config.address[s];if(b!=null){let Q=ac(p,b);if(this.dependencies.every($=>$ instanceof ye?p.facet($)===O.facet($):$ instanceof $i?p.field($,!1)==O.field($,!1):!0)||(o?$m(g=i(O),Q,r):r(g=i(O),Q)))return O.values[l]=Q,0}else g=i(O);return O.values[l]=g,1}}}}function $m(n,e,t){if(n.length!=e.length)return!1;for(let i=0;in[f.id]),r=t.map(f=>f.type),s=i.filter(f=>!(f&1)),l=n[e.id]>>1;function o(f){let u=[];for(let h=0;hi===r),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Qm).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,r)=>{let s=i.values[t],l=this.updateF(s,r);return this.compareF(s,l)?0:(i.values[t]=l,1)},reconfigure:(i,r)=>r.config.address[this.id]!=null?(i.values[t]=r.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,Qm.of({field:this,create:e})]}get extension(){return this}}const Ns={lowest:4,low:3,default:2,high:1,highest:0};function bo(n){return e=>new a$(e,n)}const el={highest:bo(Ns.highest),high:bo(Ns.high),default:bo(Ns.default),low:bo(Ns.low),lowest:bo(Ns.lowest)};class a${constructor(e,t){this.inner=e,this.prec=t}}class Nl{of(e){return new bO(this,e)}reconfigure(e){return Nl.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class bO{constructor(e,t){this.compartment=e,this.inner=t}}class oc{constructor(e,t,i,r,s,l){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=l,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,i){let r=[],s=Object.create(null),l=new Map;for(let p of t3(e,t,l))p instanceof $i?r.push(p):(s[p.facet.id]||(s[p.facet.id]=[])).push(p);let o=Object.create(null),f=[],u=[];for(let p of r)o[p.id]=u.length<<1,u.push(g=>p.slot(g));let h=i==null?void 0:i.config.facets;for(let p in s){let g=s[p],b=g[0].facet,Q=h&&h[p]||[];if(g.every($=>$.type==0))if(o[b.id]=f.length<<1|1,Sd(Q,g))f.push(i.facet(b));else{let $=b.combine(g.map(P=>P.value));f.push(i&&b.compare($,i.facet(b))?i.facet(b):$)}else{for(let $ of g)$.type==0?(o[$.id]=f.length<<1|1,f.push($.value)):(o[$.id]=u.length<<1,u.push(P=>$.dynamicSlot(P)));o[b.id]=u.length<<1,u.push($=>e3($,b,g))}}let O=u.map(p=>p(o));return new oc(e,l,O,o,f,s)}}function t3(n,e,t){let i=[[],[],[],[],[]],r=new Map;function s(l,o){let f=r.get(l);if(f!=null){if(f<=o)return;let u=i[f].indexOf(l);u>-1&&i[f].splice(u,1),l instanceof bO&&t.delete(l.compartment)}if(r.set(l,o),Array.isArray(l))for(let u of l)s(u,o);else if(l instanceof bO){if(t.has(l.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(l.compartment)||l.inner;t.set(l.compartment,u),s(u,o)}else if(l instanceof a$)s(l.inner,l.prec);else if(l instanceof $i)i[o].push(l),l.provides&&s(l.provides,o);else if(l instanceof jf)i[o].push(l),l.facet.extensions&&s(l.facet.extensions,Ns.default);else{let u=l.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${l}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(u,o)}}return s(n,Ns.default),i.reduce((l,o)=>l.concat(o))}function Vo(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let r=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|r}function ac(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const f$=ye.define(),c$=ye.define({combine:n=>n.some(e=>e),static:!0}),u$=ye.define({combine:n=>n.length?n[0]:void 0,static:!0}),h$=ye.define(),O$=ye.define(),d$=ye.define(),p$=ye.define({combine:n=>n.length?n[0]:!1});class jr{constructor(e,t){this.type=e,this.value=t}static define(){return new i3}}class i3{of(e){return new jr(this,e)}}class n3{constructor(e){this.map=e}of(e){return new Ie(this,e)}}class Ie{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new Ie(this.type,t)}is(e){return this.type==e}static define(e={}){return new n3(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(t);s&&i.push(s)}return i}}Ie.reconfigure=Ie.define();Ie.appendConfig=Ie.define();class bi{constructor(e,t,i,r,s,l){this.startState=e,this.changes=t,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=l,this._doc=null,this._state=null,i&&o$(i,t.newLength),s.some(o=>o.type==bi.time)||(this.annotations=s.concat(bi.time.of(Date.now())))}static create(e,t,i,r,s,l){return new bi(e,t,i,r,s,l)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(bi.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}bi.time=jr.define();bi.userEvent=jr.define();bi.addToHistory=jr.define();bi.remote=jr.define();function r3(n,e){let t=[];for(let i=0,r=0;;){let s,l;if(i=n[i]))s=n[i++],l=n[i++];else if(r=0;r--){let s=i[r](n);s instanceof bi?n=s:Array.isArray(s)&&s.length==1&&s[0]instanceof bi?n=s[0]:n=m$(e,Xl(s),!1)}return n}function l3(n){let e=n.startState,t=e.facet(d$),i=n;for(let r=t.length-1;r>=0;r--){let s=t[r](n);s&&Object.keys(s).length&&(i=g$(i,$O(e,s,n.changes.newLength),!0))}return i==n?n:bi.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const o3=[];function Xl(n){return n==null?o3:Array.isArray(n)?n:[n]}var zt=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(zt||(zt={}));const a3=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let QO;try{QO=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function f3(n){if(QO)return QO.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||a3.test(t)))return!0}return!1}function c3(n){return e=>{if(!/\S/.test(e))return zt.Space;if(f3(e))return zt.Word;for(let t=0;t-1)return zt.Word;return zt.Other}}class ct{constructor(e,t,i,r,s,l){this.config=e,this.doc=t,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,l&&(l._state=this);for(let o=0;or.set(f,o)),t=null),r.set(l.value.compartment,l.value.extension)):l.is(Ie.reconfigure)?(t=null,i=l.value):l.is(Ie.appendConfig)&&(t=null,i=Xl(i).concat(l.value));let s;t?s=e.startState.values.slice():(t=oc.resolve(i,r,this),s=new ct(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(o,f)=>f.reconfigure(o,this),null).values),new ct(t,e.newDoc,e.newSelection,s,(l,o)=>o.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:J.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),r=this.changes(i.changes),s=[i.range],l=Xl(i.effects);for(let o=1;ol.spec.fromJSON(o,f)))}}return ct.create({doc:e.doc,selection:J.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=oc.resolve(e.extensions||[],new Map),i=e.doc instanceof mt?e.doc:mt.of((e.doc||"").split(t.staticFacet(ct.lineSeparator)||pO)),r=e.selection?e.selection instanceof J?e.selection:J.single(e.selection.anchor,e.selection.head):J.single(0);return o$(r,i.length),t.staticFacet(c$)||(r=r.asSingle()),new ct(t,i,r,t.dynamicSlots.map(()=>null),(s,l)=>l.create(s),null)}get tabSize(){return this.facet(ct.tabSize)}get lineBreak(){return this.facet(ct.lineSeparator)||` -`}get readOnly(){return this.facet(p$)}phrase(e,...t){for(let i of this.facet(ct.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let s=+(r||1);return!s||s>t.length?i:t[s-1]})),e}languageDataAt(e,t,i=-1){let r=[];for(let s of this.facet(f$))for(let l of s(this,t,i))Object.prototype.hasOwnProperty.call(l,e)&&r.push(l[e]);return r}charCategorizer(e){return c3(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:r}=this.doc.lineAt(e),s=this.charCategorizer(e),l=e-i,o=e-i;for(;l>0;){let f=Bi(t,l,!1);if(s(t.slice(f,l))!=zt.Word)break;l=f}for(;on.length?n[0]:4});ct.lineSeparator=u$;ct.readOnly=p$;ct.phrases=ye.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(r=>n[r]==e[r])}});ct.languageData=f$;ct.changeFilter=h$;ct.transactionFilter=O$;ct.transactionExtender=d$;Nl.reconfigure=Ie.define();function _r(n,e,t={}){let i={};for(let r of n)for(let s of Object.keys(r)){let l=r[s],o=i[s];if(o===void 0)i[s]=l;else if(!(o===l||l===void 0))if(Object.hasOwnProperty.call(t,s))i[s]=t[s](o,l);else throw new Error("Config merge conflict for field "+s)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class Hs{eq(e){return this==e}range(e,t=e){return wO.create(e,t,this)}}Hs.prototype.startSide=Hs.prototype.endSide=0;Hs.prototype.point=!1;Hs.prototype.mapMode=Ai.TrackDel;let wO=class S${constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new S$(e,t,i)}};function yO(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class bd{constructor(e,t,i,r){this.from=e,this.to=t,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,r=0){let s=i?this.to:this.from;for(let l=r,o=s.length;;){if(l==o)return l;let f=l+o>>1,u=s[f]-e||(i?this.value[f].endSide:this.value[f].startSide)-t;if(f==l)return u>=0?l:o;u>=0?o=f:l=f+1}}between(e,t,i,r){for(let s=this.findIndex(t,-1e9,!0),l=this.findIndex(i,1e9,!1,s);sg||p==g&&u.startSide>0&&u.endSide<=0)continue;(g-p||u.endSide-u.startSide)<0||(l<0&&(l=p),u.point&&(o=Math.max(o,g-p)),i.push(u),r.push(p-l),s.push(g-l))}return{mapped:i.length?new bd(r,s,i,o):null,pos:l}}}class Qt{constructor(e,t,i,r){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=r}static create(e,t,i,r){return new Qt(e,t,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:r=0,filterTo:s=this.length}=e,l=e.filter;if(t.length==0&&!l)return this;if(i&&(t=t.slice().sort(yO)),this.isEmpty)return t.length?Qt.of(t):this;let o=new b$(this,null,-1).goto(0),f=0,u=[],h=new ws;for(;o.value||f=0){let O=t[f++];h.addInner(O.from,O.to,O.value)||u.push(O)}else o.rangeIndex==1&&o.chunkIndexthis.chunkEnd(o.chunkIndex)||so.to||s=s&&e<=s+l.length&&l.between(s,e-s,t-s,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return No.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return No.from(e).goto(t)}static compare(e,t,i,r,s=-1){let l=e.filter(O=>O.maxPoint>0||!O.isEmpty&&O.maxPoint>=s),o=t.filter(O=>O.maxPoint>0||!O.isEmpty&&O.maxPoint>=s),f=wm(l,o,i),u=new $o(l,f,s),h=new $o(o,f,s);i.iterGaps((O,p,g)=>ym(u,O,h,p,g,r)),i.empty&&i.length==0&&ym(u,0,h,0,0,r)}static eq(e,t,i=0,r){r==null&&(r=1e9-1);let s=e.filter(h=>!h.isEmpty&&t.indexOf(h)<0),l=t.filter(h=>!h.isEmpty&&e.indexOf(h)<0);if(s.length!=l.length)return!1;if(!s.length)return!0;let o=wm(s,l),f=new $o(s,o,0).goto(i),u=new $o(l,o,0).goto(i);for(;;){if(f.to!=u.to||!vO(f.active,u.active)||f.point&&(!u.point||!f.point.eq(u.point)))return!1;if(f.to>r)return!0;f.next(),u.next()}}static spans(e,t,i,r,s=-1){let l=new $o(e,null,s).goto(t),o=t,f=l.openStart;for(;;){let u=Math.min(l.to,i);if(l.point){let h=l.activeForPoint(l.to),O=l.pointFromo&&(r.span(o,u,l.active,f),f=l.openEnd(u));if(l.to>i)return f+(l.point&&l.to>i?1:0);o=l.to,l.next()}}static of(e,t=!1){let i=new ws;for(let r of e instanceof wO?[e]:t?u3(e):e)i.add(r.from,r.to,r.value);return i.finish()}}Qt.empty=new Qt([],[],null,-1);function u3(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(yO);e=i}return n}Qt.empty.nextLayer=Qt.empty;class ws{constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}finishChunk(e){this.chunks.push(new bd(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}add(e,t,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new ws)).add(e,t,i)}addInner(e,t,i){let r=e-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(Qt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=Qt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function wm(n,e,t){let i=new Map;for(let s of n)for(let l=0;l=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&r.push(new b$(l,t,i,s));return r.length==1?r[0]:new No(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let i=this.heap.length>>1;i>=0;i--)Th(this.heap,i);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let i=this.heap.length>>1;i>=0;i--)Th(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Th(this.heap,0)}}}function Th(n,e){for(let t=n[e];;){let i=(e<<1)+1;if(i>=n.length)break;let r=n[i];if(i+1=0&&(r=n[i+1],i++),t.compare(r)<0)break;n[i]=t,n[e]=r,e=i}}class $o{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=No.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Qf(this.active,e),Qf(this.activeTo,e),Qf(this.activeRank,e),this.minActive=vm(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:r,rank:s}=this.cursor;for(;t-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&Qf(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(i),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&i[r]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function ym(n,e,t,i,r,s){n.goto(e),t.goto(i);let l=i+r,o=i,f=i-e;for(;;){let u=n.to+f-t.to||n.endSide-t.endSide,h=u<0?n.to+f:t.to,O=Math.min(h,l);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&vO(n.activeForPoint(n.to+f),t.activeForPoint(t.to))||s.comparePoint(o,O,n.point,t.point):O>o&&!vO(n.active,t.active)&&s.compareRange(o,O,n.active,t.active),h>l)break;o=h,u<=0&&n.next(),u>=0&&t.next()}}function vO(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;i--)n[i+1]=n[i];n[e]=t}function vm(n,e){let t=-1,i=1e9;for(let r=0;r=e)return r;if(r==n.length)break;s+=n.charCodeAt(r)==9?t-s%t:1,r=Bi(n,r)}return i===!0?-1:n.length}const kO="ͼ",Pm=typeof Symbol>"u"?"__"+kO:Symbol.for(kO),_O=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),km=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class ys{constructor(e,t){this.rules=[];let{finish:i}=t||{};function r(l){return/^@/.test(l)?[l]:l.split(/,\s*/)}function s(l,o,f,u){let h=[],O=/^@(\w+)\b/.exec(l[0]),p=O&&O[1]=="keyframes";if(O&&o==null)return f.push(l[0]+";");for(let g in o){let b=o[g];if(/&/.test(g))s(g.split(/,\s*/).map(Q=>l.map($=>Q.replace(/&/,$))).reduce((Q,$)=>Q.concat($)),b,f);else if(b&&typeof b=="object"){if(!O)throw new RangeError("The value of a property ("+g+") should be a primitive value.");s(r(g),b,h,p)}else b!=null&&h.push(g.replace(/_.*/,"").replace(/[A-Z]/g,Q=>"-"+Q.toLowerCase())+": "+b+";")}(h.length||p)&&f.push((i&&!O&&!u?l.map(i):l).join(", ")+" {"+h.join(" ")+"}")}for(let l in e)s(r(l),e[l],this.rules)}getRules(){return this.rules.join(` -`)}static newName(){let e=km[Pm]||1;return km[Pm]=e+1,kO+e.toString(36)}static mount(e,t,i){let r=e[_O],s=i&&i.nonce;r?s&&r.setNonce(s):r=new h3(e,s),r.mount(Array.isArray(t)?t:[t])}}let _m=new Map;class h3{constructor(e,t){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let s=_m.get(i);if(s)return e.adoptedStyleSheets=[s.sheet,...e.adoptedStyleSheets],e[_O]=s;this.sheet=new r.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],_m.set(i,this)}else{this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);let s=e.head||e;s.insertBefore(this.styleTag,s.firstChild)}this.modules=[],e[_O]=this}mount(e){let t=this.sheet,i=0,r=0;for(let s=0;s-1&&(this.modules.splice(o,1),r--,o=-1),o==-1){if(this.modules.splice(r++,0,l),t)for(let f=0;f",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Wm=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),O3=typeof navigator<"u"&&/Mac/.test(navigator.platform),d3=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),p3=O3||Wm&&+Wm[1]<57;for(var Ri=0;Ri<10;Ri++)vs[48+Ri]=vs[96+Ri]=String(Ri);for(var Ri=1;Ri<=24;Ri++)vs[Ri+111]="F"+Ri;for(var Ri=65;Ri<=90;Ri++)vs[Ri]=String.fromCharCode(Ri+32),Lo[Ri]=String.fromCharCode(Ri);for(var Zh in vs)Lo.hasOwnProperty(Zh)||(Lo[Zh]=vs[Zh]);function g3(n){var e=p3&&(n.ctrlKey||n.altKey||n.metaKey)||d3&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Lo:vs)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function fc(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function WO(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function m3(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Ff(n,e){if(!e.anchorNode)return!1;try{return WO(n,e.anchorNode)}catch{return!1}}function Bo(n){return n.nodeType==3?Ks(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function cc(n,e,t,i){return t?xm(n,e,t,i,-1)||xm(n,e,t,i,1):!1}function uc(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function xm(n,e,t,i,r){for(;;){if(n==t&&e==i)return!0;if(e==(r<0?0:Ps(n))){if(n.nodeName=="DIV")return!1;let s=n.parentNode;if(!s||s.nodeType!=1)return!1;e=uc(n)+(r<0?0:1),n=s}else if(n.nodeType==1){if(n=n.childNodes[e+(r<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=r<0?Ps(n):0}else return!1}}function Ps(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function $d(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function S3(n){return{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function b3(n,e,t,i,r,s,l,o){let f=n.ownerDocument,u=f.defaultView||window;for(let h=n,O=!1;h&&!O;)if(h.nodeType==1){let p,g=h==f.body,b=1,Q=1;if(g)p=S3(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(h).position)&&(O=!0),h.scrollHeight<=h.clientHeight&&h.scrollWidth<=h.clientWidth){h=h.assignedSlot||h.parentNode;continue}let x=h.getBoundingClientRect();b=x.width/h.offsetWidth,Q=x.height/h.offsetHeight,p={left:x.left,right:x.left+h.clientWidth*b,top:x.top,bottom:x.top+h.clientHeight*Q}}let $=0,P=0;if(r=="nearest")e.top0&&e.bottom>p.bottom+P&&(P=e.bottom-p.bottom+P+l)):e.bottom>p.bottom&&(P=e.bottom-p.bottom+l,t<0&&e.top-P0&&e.right>p.right+$&&($=e.right-p.right+$+s)):e.right>p.right&&($=e.right-p.right+s,t<0&&e.leftt.clientHeight||t.scrollWidth>t.clientWidth)return t;t=t.assignedSlot||t.parentNode}else if(t.nodeType==11)t=t.host;else break;return null}class Q3{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:i}=e;this.set(t,Math.min(e.anchorOffset,t?Ps(t):0),i,Math.min(e.focusOffset,i?Ps(i):0))}set(e,t,i,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=r}}let Sl=null;function $$(n){if(n.setActive)return n.setActive();if(Sl)return n.focus(Sl);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(Sl==null?{get preventScroll(){return Sl={preventScroll:!0},!0}}:void 0),!Sl){Sl=!1;for(let t=0;tMath.max(1,n.scrollHeight-n.clientHeight-4)}class Li{constructor(e,t,i=!0){this.node=e,this.offset=t,this.precise=i}static before(e,t){return new Li(e.parentNode,uc(e),t)}static after(e,t){return new Li(e.parentNode,uc(e)+1,t)}}const Qd=[];class Ut{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let i of this.children){if(i==e)return t;t+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(this.flags&2){let i=this.dom,r=null,s;for(let l of this.children){if(l.flags&7){if(!l.dom&&(s=r?r.nextSibling:i.firstChild)){let o=Ut.get(s);(!o||!o.parent&&o.canReuseDOM(l))&&l.reuseDOM(s)}l.sync(e,t),l.flags&=-8}if(s=r?r.nextSibling:i.firstChild,t&&!t.written&&t.node==i&&s!=l.dom&&(t.written=!0),l.dom.parentNode==i)for(;s&&s!=l.dom;)s=Xm(s);else i.insertBefore(l.dom,s);r=l.dom}for(s=r?r.nextSibling:i.firstChild,s&&t&&t.node==i&&(t.written=!0);s;)s=Xm(s)}else if(this.flags&1)for(let i of this.children)i.flags&7&&(i.sync(e,t),i.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let i;if(e==this.dom)i=this.dom.childNodes[t];else{let r=Ps(e)==0?0:t==0?-1:1;for(;;){let s=e.parentNode;if(s==this.dom)break;r==0&&s.firstChild!=s.lastChild&&(e==s.firstChild?r=-1:r=1),e=s}r<0?i=e:i=e.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!Ut.get(i);)i=i.nextSibling;if(!i)return this.length;for(let r=0,s=0;;r++){let l=this.children[r];if(l.dom==i)return s;s+=l.length+l.breakAfter}}domBoundsAround(e,t,i=0){let r=-1,s=-1,l=-1,o=-1;for(let f=0,u=i,h=i;ft)return O.domBoundsAround(e,t,u);if(p>=e&&r==-1&&(r=f,s=u),u>t&&O.dom.parentNode==this.dom){l=f,o=h;break}h=p,u=p+O.breakAfter}return{from:s,to:o<0?i+this.length:o,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:l=0?this.children[l].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,i=Qd){this.markDirty();for(let r=e;rthis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function v$(n,e,t,i,r,s,l,o,f){let{children:u}=n,h=u.length?u[e]:null,O=s.length?s[s.length-1]:null,p=O?O.breakAfter:l;if(!(e==i&&h&&!l&&!p&&s.length<2&&h.merge(t,r,s.length?O:null,t==0,o,f))){if(i0&&(!l&&s.length&&h.merge(t,h.length,s[0],!1,o,0)?h.breakAfter=s.shift().breakAfter:(t2);var Pe={mac:Rm||/Mac/.test(kn.platform),windows:/Win/.test(kn.platform),linux:/Linux|X11/.test(kn.platform),ie:Lc,ie_version:k$?xO.documentMode||6:XO?+XO[1]:CO?+CO[1]:0,gecko:Tm,gecko_version:Tm?+(/Firefox\/(\d+)/.exec(kn.userAgent)||[0,0])[1]:0,chrome:!!Rh,chrome_version:Rh?+Rh[1]:0,ios:Rm,android:/Android\b/.test(kn.userAgent),webkit:Zm,safari:_$,webkit_version:Zm?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:xO.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const v3=256;class Nr extends Ut{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,i){return this.flags&8||i&&(!(i instanceof Nr)||this.length-(t-e)+i.length>v3||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new Nr(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new Li(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return P3(this.dom,e,t)}}class Lr extends Ut{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let r of t)r.setParent(this)}setAttrs(e){if(Q$(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,i,r,s,l){return i&&(!(i instanceof Lr&&i.mark.eq(this.mark))||e&&s<=0||te&&t.push(i=e&&(r=s),i=f,s++}let l=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new Lr(this.mark,t,l)}domAtPos(e){return W$(this,e)}coordsAt(e,t){return C$(this,e,t)}}function P3(n,e,t){let i=n.nodeValue.length;e>i&&(e=i);let r=e,s=e,l=0;e==0&&t<0||e==i&&t>=0?Pe.chrome||Pe.gecko||(e?(r--,l=1):s=0)?0:o.length-1];return Pe.safari&&!l&&f.width==0&&(f=Array.prototype.find.call(o,u=>u.width)||f),l?$d(f,l<0):f||null}class Ss extends Ut{static create(e,t,i){return new Ss(e,t,i)}constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}split(e){let t=Ss.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,t,i,r,s,l){return i&&(!(i instanceof Ss)||!this.widget.compare(i.widget)||e>0&&s<=0||t0)?Li.before(this.dom):Li.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;let r=this.dom.getClientRects(),s=null;if(!r.length)return null;let l=this.side?this.side<0:e>0;for(let o=l?r.length-1:0;s=r[o],!(e>0?o==0:o==r.length-1||s.top0?Li.before(this.dom):Li.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return mt.empty}get isHidden(){return!0}}Nr.prototype.children=Ss.prototype.children=Yl.prototype.children=Qd;function W$(n,e){let t=n.dom,{children:i}=n,r=0;for(let s=0;rs&&e0;s--){let l=i[s-1];if(l.dom.parentNode==t)return l.domAtPos(l.length)}for(let s=r;s0&&e instanceof Lr&&r.length&&(i=r[r.length-1])instanceof Lr&&i.mark.eq(e.mark)?x$(i,e.children[0],t-1):(r.push(e),e.setParent(n)),n.length+=e.length}function C$(n,e,t){let i=null,r=-1,s=null,l=-1;function o(u,h){for(let O=0,p=0;O=h&&(g.children.length?o(g,h-p):(!s||s.isHidden&&t>0)&&(b>h||p==b&&g.getSide()>0)?(s=g,l=h-p):(p-1?1:0)!=r.length-(t&&r.indexOf(t)>-1?1:0))return!1;for(let s of i)if(s!=t&&(r.indexOf(s)==-1||n[s]!==e[s]))return!1;return!0}function ZO(n,e,t){let i=!1;if(e)for(let r in e)t&&r in t||(i=!0,r=="style"?n.style.cssText="":n.removeAttribute(r));if(t)for(let r in t)e&&e[r]==t[r]||(i=!0,r=="style"?n.style.cssText=t[r]:n.setAttribute(r,t[r]));return i}function _3(n){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new ks(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:s,end:l}=X$(e,t);i=(s?t?-3e8:-1:5e8)-1,r=(l?t?2e8:1:-6e8)+1}return new ks(e,i,r,t,e.widget||null,!0)}static line(e){return new oa(e)}static set(e,t=!1){return Qt.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Re.none=Qt.empty;class la extends Re{constructor(e){let{start:t,end:i}=X$(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,i;return this==e||e instanceof la&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&wd(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}la.prototype.point=!1;class oa extends Re{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof oa&&this.spec.class==e.spec.class&&wd(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}oa.prototype.mapMode=Ai.TrackBefore;oa.prototype.point=!0;class ks extends Re{constructor(e,t,i,r,s,l){super(t,i,s,e),this.block=r,this.isReplace=l,this.mapMode=r?t<=0?Ai.TrackBefore:Ai.TrackAfter:Ai.TrackDel}get type(){return this.startSide=5||this.widget.lineBreaks>0)}eq(e){return e instanceof ks&&W3(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}ks.prototype.point=!0;function X$(n,e=!1){let{inclusiveStart:t,inclusiveEnd:i}=n;return t==null&&(t=n.inclusive),i==null&&(i=n.inclusive),{start:t??e,end:i??e}}function W3(n,e){return n==e||!!(n&&e&&n.compare(e))}function RO(n,e,t,i=0){let r=t.length-1;r>=0&&t[r]+i>=n?t[r]=Math.max(t[r],e):t.push(n,e)}class Ti extends Ut{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,i,r,s,l){if(i){if(!(i instanceof Ti))return!1;this.dom||i.transferDOM(this)}return r&&this.setDeco(i?i.attrs:null),P$(this,e,t,i?i.children:[],s,l),!0}split(e){let t=new Ti;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i,off:r}=this.childPos(e);r&&(t.append(this.children[i].split(r),0),this.children[i].merge(r,this.children[i].length,null,!1,0,0),i++);for(let s=i;s0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){wd(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){x$(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=TO(t,this.attrs||{})),i&&(this.attrs=TO({class:i},this.attrs||{}))}domAtPos(e){return W$(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var i;this.dom?this.flags&4&&(Q$(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(ZO(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let r=this.dom.lastChild;for(;r&&Ut.get(r)instanceof Lr;)r=r.lastChild;if(!r||!this.length||r.nodeName!="BR"&&((i=Ut.get(r))===null||i===void 0?void 0:i.isEditable)==!1&&(!Pe.ios||!this.children.some(s=>s instanceof Nr))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let i of this.children){if(!(i instanceof Nr)||/[^ -~]/.test(i.text))return null;let r=Bo(i.dom);if(r.length!=1)return null;e+=r[0].width,t=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let i=C$(this,e,t);if(!this.children.length&&i&&this.parent){let{heightOracle:r}=this.parent.view.viewState,s=i.bottom-i.top;if(Math.abs(s-r.lineHeight)<2&&r.textHeight=t){if(s instanceof Ti)return s;if(l>t)break}r=l+s.breakAfter}return null}}class Gs extends Ut{constructor(e,t,i){super(),this.widget=e,this.length=t,this.type=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,r,s,l){return i&&(!(i instanceof Gs)||!this.widget.compare(i.widget)||e>0&&s<=0||t0;){if(this.textOff==this.text.length){let{value:s,lineBreak:l,done:o}=this.cursor.next(this.skip);if(this.skip=0,o)throw new Error("Ran out of text content when drawing inline views");if(l){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=s,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-i)),this.getLine().append(yf(new Nr(this.text.slice(this.textOff,this.textOff+r)),t),i),this.atCursorPos=!0,this.textOff+=r,e-=r,i=0}}span(e,t,i,r){this.buildText(t-e,i,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,i,r,s,l){if(this.disallowBlockEffectsFor[l]&&i instanceof ks){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let o=t-e;if(i instanceof ks)if(i.block){let{type:f}=i;f==Ht.WidgetAfter&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Gs(i.widget||new Um("div"),o,f))}else{let f=Ss.create(i.widget||new Um("span"),o,o?0:i.startSide),u=this.atCursorPos&&!f.isEditable&&s<=r.length&&(e0),h=!f.isEditable&&(er.length||i.startSide<=0),O=this.getLine();this.pendingBuffer==2&&!u&&!f.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),u&&(O.append(yf(new Yl(1),r),s),s=r.length+Math.max(0,s-r.length)),O.append(yf(f,r),s),this.atCursorPos=h,this.pendingBuffer=h?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);o&&(this.textOff+o<=this.text.length?this.textOff+=o:(this.skip+=o-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=s)}static build(e,t,i,r,s){let l=new qo(e,t,i,s);return l.openEnd=Qt.spans(r,t,i,l),l.openStart<0&&(l.openStart=l.openEnd),l.finish(l.openEnd),l}}function yf(n,e){for(let t of e)n=new Lr(t,[n],n.length);return n}class Um extends Cs{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const T$=ye.define(),Z$=ye.define(),R$=ye.define(),A$=ye.define(),AO=ye.define(),U$=ye.define(),Y$=ye.define(),V$=ye.define({combine:n=>n.some(e=>e)}),q$=ye.define({combine:n=>n.some(e=>e)});class hc{constructor(e,t="nearest",i="nearest",r=5,s=5){this.range=e,this.y=t,this.x=i,this.yMargin=r,this.xMargin=s}map(e){return e.empty?this:new hc(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const Ym=Ie.define({map:(n,e)=>n.map(e)});function Wn(n,e,t){let i=n.facet(A$);i.length?i[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const Bc=ye.define({combine:n=>n.length?n[0]:!0});let x3=0;const Wo=ye.define();class pi{constructor(e,t,i,r){this.id=e,this.create=t,this.domEventHandlers=i,this.extension=r(this)}static define(e,t){const{eventHandlers:i,provide:r,decorations:s}=t||{};return new pi(x3++,e,i,l=>{let o=[Wo.of(l)];return s&&o.push(jo.of(f=>{let u=f.plugin(l);return u?s(u):Re.none})),r&&o.push(r(l)),o})}static fromClass(e,t){return pi.define(i=>new e(i),t)}}class Ah{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(i){if(Wn(t.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Wn(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(i){Wn(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const E$=ye.define(),yd=ye.define(),jo=ye.define(),vd=ye.define(),M$=ye.define();function Vm(n,e,t){let i=n.state.facet(M$);if(!i.length)return i;let r=i.map(l=>l instanceof Function?l(n):l),s=[];return Qt.spans(r,e,t,{point(){},span(l,o,f,u){let h=s;for(let O=f.length-1;O>=0;O--,u--){let p=f[O].spec.bidiIsolate,g;if(p!=null)if(u>0&&h.length&&(g=h[h.length-1]).to==l&&g.direction==p)g.to=o,h=g.inner;else{let b={from:l,to:o,direction:p,inner:[]};h.push(b),h=b.inner}}}}),s}const D$=ye.define();function z$(n){let e=0,t=0,i=0,r=0;for(let s of n.state.facet(D$)){let l=s(n);l&&(l.left!=null&&(e=Math.max(e,l.left)),l.right!=null&&(t=Math.max(t,l.right)),l.top!=null&&(i=Math.max(i,l.top)),l.bottom!=null&&(r=Math.max(r,l.bottom)))}return{left:e,right:t,top:i,bottom:r}}const xo=ye.define();class In{constructor(e,t,i,r){this.fromA=e,this.toA=t,this.fromB=i,this.toB=r}join(e){return new In(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>i.toA)){if(r.toAh)break;s+=2}if(!f)return i;new In(f.fromA,f.toA,f.fromB,f.toB).addToSet(i),l=f.toA,o=f.toB}}}class Oc{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=Si.empty(this.startState.doc.length);for(let s of i)this.changes=this.changes.compose(s.changes);let r=[];this.changes.iterChangedRanges((s,l,o,f)=>r.push(new In(s,l,o,f))),this.changedRanges=r}static create(e,t,i){return new Oc(e,t,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var Ft=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(Ft||(Ft={}));const Fo=Ft.LTR,I$=Ft.RTL;function N$(n){let e=[];for(let t=0;t=t){if(o.level==i)return l;(s<0||(r!=0?r<0?o.fromt:e[s].level>o.level))&&(s=l)}}if(s<0)throw new RangeError("Index out of range");return s}}function L$(n,e){if(n.length!=e.length)return!1;for(let t=0;t=0;Q-=3)if(dr[Q+1]==-g){let $=dr[Q+2],P=$&2?r:$&4?$&1?s:r:0;P&&(kt[O]=kt[dr[Q]]=P),o=Q;break}}else{if(dr.length==189)break;dr[o++]=O,dr[o++]=p,dr[o++]=f}else if((b=kt[O])==2||b==1){let Q=b==r;f=Q?0:1;for(let $=o-3;$>=0;$-=3){let P=dr[$+2];if(P&2)break;if(Q)dr[$+2]|=2;else{if(P&4)break;dr[$+2]|=4}}}}}function U3(n,e,t,i){for(let r=0,s=i;r<=t.length;r++){let l=r?t[r-1].to:n,o=rf;)b==$&&(b=t[--Q].from,$=Q?t[Q-1].to:n),kt[--b]=g;f=h}else s=u,f++}}}function YO(n,e,t,i,r,s,l){let o=i%2?2:1;if(i%2==r%2)for(let f=e,u=0;ff&&l.push(new bs(f,Q.from,g));let $=Q.direction==Fo!=!(g%2);VO(n,$?i+1:i,r,Q.inner,Q.from,Q.to,l),f=Q.to}b=Q.to}else{if(b==t||(h?kt[b]!=o:kt[b]==o))break;b++}p?YO(n,f,b,i+1,r,p,l):fe;){let h=!0,O=!1;if(!u||f>s[u-1].to){let Q=kt[f-1];Q!=o&&(h=!1,O=Q==16)}let p=!h&&o==1?[]:null,g=h?i:i+1,b=f;e:for(;;)if(u&&b==s[u-1].to){if(O)break e;let Q=s[--u];if(!h)for(let $=Q.from,P=u;;){if($==e)break e;if(P&&s[P-1].to==$)$=s[--P].from;else{if(kt[$-1]==o)break e;break}}if(p)p.push(Q);else{Q.tokt.length;)kt[kt.length]=256;let i=[],r=e==Fo?0:1;return VO(n,r,r,t,0,n.length,i),i}function B$(n){return[new bs(0,n,0)]}let j$="";function V3(n,e,t,i,r){var s;let l=i.head-n.from,o=-1;if(l==0){if(!r||!n.length)return null;e[0].level!=t&&(l=e[0].side(!1,t),o=0)}else if(l==n.length){if(r)return null;let p=e[e.length-1];p.level!=t&&(l=p.side(!0,t),o=e.length-1)}o<0&&(o=bs.find(e,l,(s=i.bidiLevel)!==null&&s!==void 0?s:-1,i.assoc));let f=e[o];l==f.side(r,t)&&(f=e[o+=r?1:-1],l=f.side(!r,t));let u=r==(f.dir==t),h=Bi(n.text,l,u);if(j$=n.text.slice(Math.min(l,h),Math.max(l,h)),h!=f.side(r,t))return J.cursor(h+n.from,u?-1:1,f.level);let O=o==(r?e.length-1:0)?null:e[o+(r?1:-1)];return!O&&f.level!=t?J.cursor(r?n.to:n.from,r?-1:1,t):O&&O.level0&&i.length&&(i.every(({fromA:u,toA:h})=>hthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let r=-1;this.view.inputState.composing>=0&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?r=this.domChanged.newSel.head:!N3(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let s=r>-1?E3(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:h}=this.hasComposition;i=new In(u,h,e.changes.mapPos(u,-1),e.changes.mapPos(h,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(Pe.ie||Pe.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let l=this.decorations,o=this.updateDeco(),f=z3(l,o,e.changes);return i=In.extendWithRanges(i,f),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,i);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let l=Pe.chrome||Pe.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,l),this.flags&=-8,l&&(l.written||r.selectionRange.focusNode!=l.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(l=>l.flags&=-9);let s=[];if(this.view.viewport.from||this.view.viewport.to=0?r[l]:null;if(!o)break;let{fromA:f,toA:u,fromB:h,toB:O}=o,p,g,b,Q;if(i&&i.range.fromBh){let C=qo.build(this.view.state.doc,h,i.range.fromB,this.decorations,this.dynamicDecorationMap),X=qo.build(this.view.state.doc,i.range.toB,O,this.decorations,this.dynamicDecorationMap);g=C.breakAtStart,b=C.openStart,Q=X.openEnd;let Z=this.compositionView(i);X.breakAtStart?Z.breakAfter=1:X.content.length&&Z.merge(Z.length,Z.length,X.content[0],!1,X.openStart,0)&&(Z.breakAfter=X.content[0].breakAfter,X.content.shift()),C.content.length&&Z.merge(0,0,C.content[C.content.length-1],!0,0,C.openEnd)&&C.content.pop(),p=C.content.concat(Z).concat(X.content)}else({content:p,breakAtStart:g,openStart:b,openEnd:Q}=qo.build(this.view.state.doc,h,O,this.decorations,this.dynamicDecorationMap));let{i:$,off:P}=s.findPos(u,1),{i:x,off:A}=s.findPos(f,-1);v$(this,x,A,$,P,p,g,b,Q)}i&&this.fixCompositionDOM(i)}compositionView(e){let t=new Nr(e.text.nodeValue);t.flags|=8;for(let{deco:r}of e.marks)t=new Lr(r,[t],t.length);let i=new Ti;return i.append(t,0),i}fixCompositionDOM(e){let t=(s,l)=>{l.flags|=8|(l.children.some(f=>f.flags&7)?1:0),this.markedForComposition.add(l);let o=Ut.get(s);o&&o!=l&&(o.dom=null),l.setDOM(s)},i=this.childPos(e.range.fromB,1),r=this.children[i.i];t(e.line,r);for(let s=e.marks.length-1;s>=-1;s--)i=r.childPos(i.off,1),r=r.children[i.i],t(s>=0?e.marks[s].node:e.text,r)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,r=i==this.dom,s=!r&&Ff(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(r||t||s))return;let l=this.forceSelection;this.forceSelection=!1;let o=this.view.state.selection.main,f=this.moveToLine(this.domAtPos(o.anchor)),u=o.empty?f:this.moveToLine(this.domAtPos(o.head));if(Pe.gecko&&o.empty&&!this.hasComposition&&q3(f)){let O=document.createTextNode("");this.view.observer.ignore(()=>f.node.insertBefore(O,f.node.childNodes[f.offset]||null)),f=u=new Li(O,0),l=!0}let h=this.view.observer.selectionRange;(l||!h.focusNode||!cc(f.node,f.offset,h.anchorNode,h.anchorOffset)||!cc(u.node,u.offset,h.focusNode,h.focusOffset))&&(this.view.observer.ignore(()=>{Pe.android&&Pe.chrome&&this.dom.contains(h.focusNode)&&I3(h.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let O=fc(this.view.root);if(O)if(o.empty){if(Pe.gecko){let p=M3(f.node,f.offset);if(p&&p!=3){let g=G$(f.node,f.offset,p==1?1:-1);g&&(f=new Li(g.node,g.offset))}}O.collapse(f.node,f.offset),o.bidiLevel!=null&&O.caretBidiLevel!==void 0&&(O.caretBidiLevel=o.bidiLevel)}else if(O.extend){O.collapse(f.node,f.offset);try{O.extend(u.node,u.offset)}catch{}}else{let p=document.createRange();o.anchor>o.head&&([f,u]=[u,f]),p.setEnd(u.node,u.offset),p.setStart(f.node,f.offset),O.removeAllRanges(),O.addRange(p)}s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(f,u)),this.impreciseAnchor=f.precise?null:new Li(h.anchorNode,h.anchorOffset),this.impreciseHead=u.precise?null:new Li(h.focusNode,h.focusOffset)}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,i=fc(e.root),{anchorNode:r,anchorOffset:s}=e.observer.selectionRange;if(!i||!t.empty||!t.assoc||!i.modify)return;let l=Ti.find(this,t.head);if(!l)return;let o=l.posAtStart;if(t.head==o||t.head==o+l.length)return;let f=this.coordsAt(t.head,-1),u=this.coordsAt(t.head,1);if(!f||!u||f.bottom>u.top)return;let h=this.domAtPos(t.head+t.assoc);i.collapse(h.node,h.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let O=e.observer.selectionRange;e.docView.posFromDOM(O.anchorNode,O.anchorOffset)!=t.from&&i.collapse(r,s)}moveToLine(e){let t=this.dom,i;if(e.node!=t)return e;for(let r=e.offset;!i&&r=0;r--){let s=Ut.get(t.childNodes[r]);s instanceof Ti&&(i=s.domAtPos(s.length))}return i?new Li(i.node,i.offset,!0):e}nearest(e){for(let t=e;t;){let i=Ut.get(t);if(i&&i.rootView==this)return i;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;tl||e==l&&s.type!=Ht.WidgetBefore&&s.type!=Ht.WidgetAfter&&(!r||t==2||this.children[r-1].breakAfter||this.children[r-1].type==Ht.WidgetBefore&&t>-2))return s.coordsAt(e-l,t);i=l}}coordsForChar(e){let{i:t,off:i}=this.childPos(e,1),r=this.children[t];if(!(r instanceof Ti))return null;for(;r.children.length;){let{i:o,off:f}=r.childPos(i,1);for(;;o++){if(o==r.children.length)return null;if((r=r.children[o]).length)break}i=f}if(!(r instanceof Nr))return null;let s=Bi(r.text,i);if(s==i)return null;let l=Ks(r.dom,i,s).getClientRects();return!l.length||l[0].top>=l[0].bottom?null:l[0]}measureVisibleLineHeights(e){let t=[],{from:i,to:r}=e,s=this.view.contentDOM.clientWidth,l=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,f=this.view.textDirection==Ft.LTR;for(let u=0,h=0;hr)break;if(u>=i){let g=O.dom.getBoundingClientRect();if(t.push(g.height),l){let b=O.dom.lastChild,Q=b?Bo(b):[];if(Q.length){let $=Q[Q.length-1],P=f?$.right-g.left:g.right-$.left;P>o&&(o=P,this.minWidth=s,this.minWidthFrom=u,this.minWidthTo=p)}}}u=p+O.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?Ft.RTL:Ft.LTR}measureTextSize(){for(let s of this.children)if(s instanceof Ti){let l=s.measureTextSize();if(l)return l}let e=document.createElement("div"),t,i,r;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=Bo(e.firstChild)[0];t=e.getBoundingClientRect().height,i=s?s.width/27:7,r=s?s.height:t,e.remove()}),{lineHeight:t,charWidth:i,textHeight:r}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new y$(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,r=0;;r++){let s=r==t.viewports.length?null:t.viewports[r],l=s?s.from-1:this.length;if(l>i){let o=(t.lineBlockAt(l).bottom-t.lineBlockAt(i).top)/this.view.scaleY;e.push(Re.replace({widget:new Em(o),block:!0,inclusive:!0,isBlockGap:!0}).range(i,l))}if(!s)break;i=s.to+1}return Re.set(e)}updateDeco(){let e=this.view.state.facet(jo).map((t,i)=>(this.dynamicDecorationMap[i]=typeof t=="function")?t(this.view):t);for(let t=e.length;tt.anchor?-1:1),r;if(!i)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let s=z$(this.view),l={left:i.left-s.left,top:i.top-s.top,right:i.right+s.right,bottom:i.bottom+s.bottom};b3(this.view.scrollDOM,l,t.head0)i=i.childNodes[r-1],r=Ps(i);else break}if(t>=0)for(let i=n,r=e;;){if(i.nodeType==3)return{node:i,offset:r};if(i.nodeType==1&&r=0)i=i.childNodes[r],r=0;else break}return null}function M3(n,e){return n.nodeType!=1?0:(e&&n.childNodes[e-1].contentEditable=="false"?1:0)|(e{ie.from&&(t=!0)}),t}function L3(n,e,t=1){let i=n.charCategorizer(e),r=n.doc.lineAt(e),s=e-r.from;if(r.length==0)return J.cursor(e);s==0?t=1:s==r.length&&(t=-1);let l=s,o=s;t<0?l=Bi(r.text,s,!1):o=Bi(r.text,s);let f=i(r.text.slice(l,o));for(;l>0;){let u=Bi(r.text,l,!1);if(i(r.text.slice(u,l))!=f)break;l=u}for(;on?e.left-n:Math.max(0,n-e.right)}function j3(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function Uh(n,e){return n.tope.top+1}function Mm(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function qO(n,e,t){let i,r,s,l,o=!1,f,u,h,O;for(let b=n.firstChild;b;b=b.nextSibling){let Q=Bo(b);for(let $=0;$A||l==A&&s>x){i=b,r=P,s=x,l=A;let C=A?t0?$0)}x==0?t>P.bottom&&(!h||h.bottomP.top)&&(u=b,O=P):h&&Uh(h,P)?h=Dm(h,P.bottom):O&&Uh(O,P)&&(O=Mm(O,P.top))}}if(h&&h.bottom>=t?(i=f,r=h):O&&O.top<=t&&(i=u,r=O),!i)return{node:n,offset:0};let p=Math.max(r.left,Math.min(r.right,e));if(i.nodeType==3)return zm(i,p,t);if(o&&i.contentEditable!="false")return qO(i,p,t);let g=Array.prototype.indexOf.call(n.childNodes,i)+(e>=(r.left+r.right)/2?1:0);return{node:n,offset:g}}function zm(n,e,t){let i=n.nodeValue.length,r=-1,s=1e9,l=0;for(let o=0;ot?h.top-t:t-h.bottom)-1;if(h.left-1<=e&&h.right+1>=e&&O=(h.left+h.right)/2,g=p;if((Pe.chrome||Pe.gecko)&&Ks(n,o).getBoundingClientRect().left==h.right&&(g=!p),O<=0)return{node:n,offset:o+(g?1:0)};r=o+(g?1:0),s=O}}}return{node:n,offset:r>-1?r:l>0?n.nodeValue.length:0}}function H$(n,e,t,i=-1){var r,s;let l=n.contentDOM.getBoundingClientRect(),o=l.top+n.viewState.paddingTop,f,{docHeight:u}=n.viewState,{x:h,y:O}=e,p=O-o;if(p<0)return 0;if(p>u)return n.state.doc.length;for(let C=n.viewState.heightOracle.textHeight/2,X=!1;f=n.elementAtHeight(p),f.type!=Ht.Text;)for(;p=i>0?f.bottom+C:f.top-C,!(p>=0&&p<=u);){if(X)return t?null:0;X=!0,i=-i}O=o+p;let g=f.from;if(gn.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:Im(n,l,f,h,O);let b=n.dom.ownerDocument,Q=n.root.elementFromPoint?n.root:b,$=Q.elementFromPoint(h,O);$&&!n.contentDOM.contains($)&&($=null),$||(h=Math.max(l.left+1,Math.min(l.right-1,h)),$=Q.elementFromPoint(h,O),$&&!n.contentDOM.contains($)&&($=null));let P,x=-1;if($&&((r=n.docView.nearest($))===null||r===void 0?void 0:r.isEditable)!=!1){if(b.caretPositionFromPoint){let C=b.caretPositionFromPoint(h,O);C&&({offsetNode:P,offset:x}=C)}else if(b.caretRangeFromPoint){let C=b.caretRangeFromPoint(h,O);C&&({startContainer:P,startOffset:x}=C,(!n.contentDOM.contains(P)||Pe.safari&&F3(P,x,h)||Pe.chrome&&G3(P,x,h))&&(P=void 0))}}if(!P||!n.docView.dom.contains(P)){let C=Ti.find(n.docView,g);if(!C)return p>f.top+f.height/2?f.to:f.from;({node:P,offset:x}=qO(C.dom,h,O))}let A=n.docView.nearest(P);if(!A)return null;if(A.isWidget&&((s=A.dom)===null||s===void 0?void 0:s.nodeType)==1){let C=A.dom.getBoundingClientRect();return e.yn.defaultLineHeight*1.5){let o=n.viewState.heightOracle.textHeight,f=Math.floor((r-t.top-(n.defaultLineHeight-o)*.5)/o);s+=f*n.viewState.heightOracle.lineLength}let l=n.state.sliceDoc(t.from,t.to);return t.from+PO(l,s,n.state.tabSize)}function F3(n,e,t){let i;if(n.nodeType!=3||e!=(i=n.nodeValue.length))return!1;for(let r=n.nextSibling;r;r=r.nextSibling)if(r.nodeType!=1||r.nodeName!="BR")return!1;return Ks(n,i-1,i).getBoundingClientRect().left>t}function G3(n,e,t){if(e!=0)return!1;for(let r=n;;){let s=r.parentNode;if(!s||s.nodeType!=1||s.firstChild!=r)return!1;if(s.classList.contains("cm-line"))break;r=s}let i=n.nodeType==1?n.getBoundingClientRect():Ks(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-i.left>5}function EO(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let i of t.type)if(i.to>e||i.to==e&&(i.to==t.to||i.type==Ht.Text))return i}return t}function H3(n,e,t,i){let r=EO(n,e.head),s=!i||r.type!=Ht.Text||!(n.lineWrapping||r.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(s){let l=n.dom.getBoundingClientRect(),o=n.textDirectionAt(r.from),f=n.posAtCoords({x:t==(o==Ft.LTR)?l.right-1:l.left+1,y:(s.top+s.bottom)/2});if(f!=null)return J.cursor(f,t?-1:1)}return J.cursor(t?r.to:r.from,t?-1:1)}function Nm(n,e,t,i){let r=n.state.doc.lineAt(e.head),s=n.bidiSpans(r),l=n.textDirectionAt(r.from);for(let o=e,f=null;;){let u=V3(r,s,l,o,t),h=j$;if(!u){if(r.number==(t?n.state.doc.lines:1))return o;h=` -`,r=n.state.doc.line(r.number+(t?1:-1)),s=n.bidiSpans(r),u=J.cursor(t?r.from:r.to)}if(f){if(!f(h))return o}else{if(!i)return u;f=i(h)}o=u}}function K3(n,e,t){let i=n.state.charCategorizer(e),r=i(t);return s=>{let l=i(s);return r==zt.Space&&(r=l),r==l}}function J3(n,e,t,i){let r=e.head,s=t?1:-1;if(r==(t?n.state.doc.length:0))return J.cursor(r,e.assoc);let l=e.goalColumn,o,f=n.contentDOM.getBoundingClientRect(),u=n.coordsAtPos(r),h=n.documentTop;if(u)l==null&&(l=u.left-f.left),o=s<0?u.top:u.bottom;else{let g=n.viewState.lineBlockAt(r);l==null&&(l=Math.min(f.right-f.left,n.defaultCharacterWidth*(r-g.from))),o=(s<0?g.top:g.bottom)+h}let O=f.left+l,p=i??n.viewState.heightOracle.textHeight>>1;for(let g=0;;g+=10){let b=o+(p+g)*s,Q=H$(n,{x:O,y:b},!1,s);if(bf.bottom||(s<0?Qr))return J.cursor(Q,e.assoc,void 0,l)}}function Gf(n,e,t){for(;;){let i=0;for(let r of n)r.between(e-1,e+1,(s,l,o)=>{if(e>s&&er(n)),t.from,e.head>t.from?-1:1);return i==t.from?t:J.cursor(i,i{this.ignoreDuringComposition(r)||r.type=="keydown"&&this.keydown(e,r)||(this.mustFlushObserver(r)&&e.observer.forceFlush(),this.runCustomHandlers(r.type,e,r)?r.preventDefault():i(e,r))};for(let i in di){let r=di[i];e.contentDOM.addEventListener(i,s=>{Lm(e,s)&&t(r,s)},MO[i]),this.registeredEvents.push(i)}e.scrollDOM.addEventListener("mousedown",i=>{if(i.target==e.scrollDOM&&i.clientY>e.contentDOM.getBoundingClientRect().bottom&&(t(di.mousedown,i),!i.defaultPrevented&&i.button==2)){let r=e.contentDOM.style.minHeight;e.contentDOM.style.minHeight="100%",setTimeout(()=>e.contentDOM.style.minHeight=r,200)}}),e.scrollDOM.addEventListener("drop",i=>{i.target==e.scrollDOM&&i.clientY>e.contentDOM.getBoundingClientRect().bottom&&t(di.drop,i)}),Pe.chrome&&Pe.chrome_version==102&&e.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=e.hasFocus,Pe.safari&&e.contentDOM.addEventListener("input",()=>null),Pe.gecko&&d5(e.contentDOM.ownerDocument)}ensureHandlers(e,t){var i;let r;this.customHandlers=[];for(let s of t)if(r=(i=s.update(e).spec)===null||i===void 0?void 0:i.domEventHandlers){this.customHandlers.push({plugin:s.value,handlers:r});for(let l in r)this.registeredEvents.indexOf(l)<0&&l!="scroll"&&(this.registeredEvents.push(l),e.contentDOM.addEventListener(l,o=>{Lm(e,o)&&this.runCustomHandlers(l,e,o)&&o.preventDefault()}))}}runCustomHandlers(e,t,i){for(let r of this.customHandlers){let s=r.handlers[e];if(s)try{if(s.call(r.plugin,i,t)||i.defaultPrevented)return!0}catch(l){Wn(t.state,l)}}return!1}runScrollHandlers(e,t){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let i of this.customHandlers){let r=i.handlers.scroll;if(r)try{r.call(i.plugin,t,e)}catch(s){Wn(e.state,s)}}}keydown(e,t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),t.keyCode==9&&Date.now()r.keyCode==t.keyCode))&&!t.ctrlKey||t5.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(this.pendingIOSKey=i||t,setTimeout(()=>this.flushIOSKey(e),250),!0):!1}flushIOSKey(e){let t=this.pendingIOSKey;return t?(this.pendingIOSKey=void 0,Tl(e.contentDOM,t.key,t.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:Pe.safari&&!Pe.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}mustFlushObserver(e){return e.type=="keydown"&&e.keyCode!=229}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const K$=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],t5="dthko",J$=[16,17,18,20,91,92,224,225],vf=6;function Pf(n){return Math.max(0,n)*.7+8}function i5(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class n5{constructor(e,t,i,r){this.view=e,this.startEvent=t,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=$3(e.contentDOM),this.atoms=e.state.facet(vd).map(l=>l(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(ct.allowMultipleSelections)&&r5(e,t),this.dragging=l5(e,t)&&nQ(t)==1?null:!1}start(e){this.dragging===!1&&(e.preventDefault(),this.select(e))}move(e){var t;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&i5(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let i=0,r=0,s=((t=this.scrollParent)===null||t===void 0?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},l=z$(this.view);e.clientX-l.left<=s.left+vf?i=-Pf(s.left-e.clientX):e.clientX+l.right>=s.right-vf&&(i=Pf(e.clientX-s.right)),e.clientY-l.top<=s.top+vf?r=-Pf(s.top-e.clientY):e.clientY+l.bottom>=s.bottom-vf&&(r=Pf(e.clientY-s.bottom)),this.setScrollSpeed(i,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let i=0;ithis.select(this.lastEvent),20)}}function r5(n,e){let t=n.state.facet(T$);return t.length?t[0](e):Pe.mac?e.metaKey:e.ctrlKey}function s5(n,e){let t=n.state.facet(Z$);return t.length?t[0](e):Pe.mac?!e.altKey:!e.ctrlKey}function l5(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let i=fc(n.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let s=0;s=e.clientX&&l.top<=e.clientY&&l.bottom>=e.clientY)return!0}return!1}function Lm(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,i;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(i=Ut.get(t))&&i.ignoreEvent(e))return!1;return!0}const di=Object.create(null),MO=Object.create(null),eQ=Pe.ie&&Pe.ie_version<15||Pe.ios&&Pe.webkit_version<604;function o5(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),tQ(n,t.value)},50)}function tQ(n,e){let{state:t}=n,i,r=1,s=t.toText(e),l=s.lines==t.selection.ranges.length;if(DO!=null&&t.selection.ranges.every(f=>f.empty)&&DO==s.toString()){let f=-1;i=t.changeByRange(u=>{let h=t.doc.lineAt(u.from);if(h.from==f)return{range:u};f=h.from;let O=t.toText((l?s.line(r++).text:e)+t.lineBreak);return{changes:{from:h.from,insert:O},range:J.cursor(u.from+O.length)}})}else l?i=t.changeByRange(f=>{let u=s.line(r++);return{changes:{from:f.from,to:f.to,insert:u.text},range:J.cursor(f.from+u.length)}}):i=t.replaceSelection(s);n.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}di.keydown=(n,e)=>{n.inputState.setSelectionOrigin("select"),e.keyCode==27&&(n.inputState.lastEscPress=Date.now())};di.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};di.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};MO.touchstart=MO.touchmove={passive:!0};di.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return;let t=null;for(let i of n.state.facet(R$))if(t=i(n,e),t)break;if(!t&&e.button==0&&(t=c5(n,e)),t){let i=!n.hasFocus;n.inputState.startMouseSelection(new n5(n,e,t,i)),i&&n.observer.ignore(()=>$$(n.contentDOM)),n.inputState.mouseSelection&&n.inputState.mouseSelection.start(e)}};function Bm(n,e,t,i){if(i==1)return J.cursor(e,t);if(i==2)return L3(n.state,e,t);{let r=Ti.find(n.docView,e),s=n.state.doc.lineAt(r?r.posAtEnd:e),l=r?r.posAtStart:s.from,o=r?r.posAtEnd:s.to;return on>=e.top&&n<=e.bottom,jm=(n,e,t)=>iQ(e,t)&&n>=t.left&&n<=t.right;function a5(n,e,t,i){let r=Ti.find(n.docView,e);if(!r)return 1;let s=e-r.posAtStart;if(s==0)return 1;if(s==r.length)return-1;let l=r.coordsAt(s,-1);if(l&&jm(t,i,l))return-1;let o=r.coordsAt(s,1);return o&&jm(t,i,o)?1:l&&iQ(i,l)?-1:1}function Fm(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:a5(n,t,e.clientX,e.clientY)}}const f5=Pe.ie&&Pe.ie_version<=11;let Gm=null,Hm=0,Km=0;function nQ(n){if(!f5)return n.detail;let e=Gm,t=Km;return Gm=n,Km=Date.now(),Hm=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(Hm+1)%3:1}function c5(n,e){let t=Fm(n,e),i=nQ(e),r=n.state.selection;return{update(s){s.docChanged&&(t.pos=s.changes.mapPos(t.pos),r=r.map(s.changes))},get(s,l,o){let f=Fm(n,s),u,h=Bm(n,f.pos,f.bias,i);if(t.pos!=f.pos&&!l){let O=Bm(n,t.pos,t.bias,i),p=Math.min(O.from,h.from),g=Math.max(O.to,h.to);h=p1&&(u=u5(r,f.pos))?u:o?r.addRange(h):J.create([h])}}}function u5(n,e){for(let t=0;t=e)return J.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}di.dragstart=(n,e)=>{let{selection:{main:t}}=n.state,{mouseSelection:i}=n.inputState;i&&(i.dragging=t),e.dataTransfer&&(e.dataTransfer.setData("Text",n.state.sliceDoc(t.from,t.to)),e.dataTransfer.effectAllowed="copyMove")};function Jm(n,e,t,i){if(!t)return;let r=n.posAtCoords({x:e.clientX,y:e.clientY},!1);e.preventDefault();let{mouseSelection:s}=n.inputState,l=i&&s&&s.dragging&&s5(n,e)?{from:s.dragging.from,to:s.dragging.to}:null,o={from:r,insert:t},f=n.state.changes(l?[l,o]:o);n.focus(),n.dispatch({changes:f,selection:{anchor:f.mapPos(r,-1),head:f.mapPos(r,1)},userEvent:l?"move.drop":"input.drop"})}di.drop=(n,e)=>{if(!e.dataTransfer)return;if(n.state.readOnly)return e.preventDefault();let t=e.dataTransfer.files;if(t&&t.length){e.preventDefault();let i=Array(t.length),r=0,s=()=>{++r==t.length&&Jm(n,e,i.filter(l=>l!=null).join(n.state.lineBreak),!1)};for(let l=0;l{/[\x00-\x08\x0e-\x1f]{2}/.test(o.result)||(i[l]=o.result),s()},o.readAsText(t[l])}}else Jm(n,e,e.dataTransfer.getData("Text"),!0)};di.paste=(n,e)=>{if(n.state.readOnly)return e.preventDefault();n.observer.flush();let t=eQ?null:e.clipboardData;t?(tQ(n,t.getData("text/plain")||t.getData("text/uri-text")),e.preventDefault()):o5(n)};function h5(n,e){let t=n.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),n.focus()},50)}function O5(n){let e=[],t=[],i=!1;for(let r of n.selection.ranges)r.empty||(e.push(n.sliceDoc(r.from,r.to)),t.push(r));if(!e.length){let r=-1;for(let{from:s}of n.selection.ranges){let l=n.doc.lineAt(s);l.number>r&&(e.push(l.text),t.push({from:l.from,to:Math.min(n.doc.length,l.to+1)})),r=l.number}i=!0}return{text:e.join(n.lineBreak),ranges:t,linewise:i}}let DO=null;di.copy=di.cut=(n,e)=>{let{text:t,ranges:i,linewise:r}=O5(n.state);if(!t&&!r)return;DO=r?t:null;let s=eQ?null:e.clipboardData;s?(e.preventDefault(),s.clearData(),s.setData("text/plain",t)):h5(n,t),e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"})};const rQ=jr.define();function sQ(n,e){let t=[];for(let i of n.facet(Y$)){let r=i(n,e);r&&t.push(r)}return t?n.update({effects:t,annotations:rQ.of(!0)}):null}function lQ(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=sQ(n.state,e);t?n.dispatch(t):n.update([])}},10)}di.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),lQ(n)};di.blur=n=>{n.observer.clearSelectionRange(),lQ(n)};di.compositionstart=di.compositionupdate=n=>{n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0)};di.compositionend=n=>{n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,Pe.chrome&&Pe.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50)};di.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};di.beforeinput=(n,e)=>{var t;let i;if(Pe.chrome&&Pe.android&&(i=K$.find(r=>r.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let r=((t=window.visualViewport)===null||t===void 0?void 0:t.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>r+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}};const e1=new Set;function d5(n){e1.has(n)||(e1.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const t1=["pre-wrap","normal","pre-line","break-spaces"];class p5{constructor(e){this.lineWrapping=e,this.doc=mt.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return t1.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i-1,f=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=i,this.textHeight=r,this.lineLength=s,f){this.heightSamples={};for(let u=0;u0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>Hf&&(e.heightChanged=!0),this.height=t)}replace(e,t,i){return Ki.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,r){let s=this,l=i.doc;for(let o=r.length-1;o>=0;o--){let{fromA:f,toA:u,fromB:h,toB:O}=r[o],p=s.lineAt(f,Rt.ByPosNoHeight,i.setDoc(t),0,0),g=p.to>=u?p:s.lineAt(u,Rt.ByPosNoHeight,i,0,0);for(O+=g.to-u,u=g.to;o>0&&p.from<=r[o-1].toA;)f=r[o-1].fromA,h=r[o-1].fromB,o--,fs*2){let o=e[t-1];o.break?e.splice(--t,1,o.left,null,o.right):e.splice(--t,1,o.left,o.right),i+=1+o.break,r-=o.size}else if(s>r*2){let o=e[i];o.break?e.splice(i,1,o.left,null,o.right):e.splice(i,1,o.left,o.right),i+=2+o.break,s-=o.size}else break;else if(r=s&&l(this.blockAt(0,i,r,s))}updateHeight(e,t=0,i=!1,r){return r&&r.from<=t&&r.more&&this.setHeight(e,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class vn extends oQ{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,i,r){return new Qr(r,this.length,i,this.height,this.breaks)}replace(e,t,i){let r=i[0];return i.length==1&&(r instanceof vn||r instanceof Xi&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof Xi?r=new vn(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):Ki.of(i)}updateHeight(e,t=0,i=!1,r){return r&&r.from<=t&&r.more?this.setHeight(e,r.heights[r.index++]):(i||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Xi extends Ki{constructor(e){super(e,0)}heightMetrics(e,t){let i=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,s=r-i+1,l,o=0;if(e.lineWrapping){let f=Math.min(this.height,e.lineHeight*s);l=f/s,this.length>s+1&&(o=(this.height-f)/(this.length-s-1))}else l=this.height/s;return{firstLine:i,lastLine:r,perLine:l,perChar:o}}blockAt(e,t,i,r){let{firstLine:s,lastLine:l,perLine:o,perChar:f}=this.heightMetrics(t,r);if(t.lineWrapping){let u=r+Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length),h=t.doc.lineAt(u),O=o+h.length*f,p=Math.max(i,e-O/2);return new Qr(h.from,h.length,p,O,0)}else{let u=Math.max(0,Math.min(l-s,Math.floor((e-i)/o))),{from:h,length:O}=t.doc.line(s+u);return new Qr(h,O,i+o*u,o,0)}}lineAt(e,t,i,r,s){if(t==Rt.ByHeight)return this.blockAt(e,i,r,s);if(t==Rt.ByPosNoHeight){let{from:g,to:b}=i.doc.lineAt(e);return new Qr(g,b-g,0,0,0)}let{firstLine:l,perLine:o,perChar:f}=this.heightMetrics(i,s),u=i.doc.lineAt(e),h=o+u.length*f,O=u.number-l,p=r+o*O+f*(u.from-s-O);return new Qr(u.from,u.length,Math.max(r,Math.min(p,r+this.height-h)),h,0)}forEachLine(e,t,i,r,s,l){e=Math.max(e,s),t=Math.min(t,s+this.length);let{firstLine:o,perLine:f,perChar:u}=this.heightMetrics(i,s);for(let h=e,O=r;h<=t;){let p=i.doc.lineAt(h);if(h==e){let b=p.number-o;O+=f*b+u*(e-s-b)}let g=f+u*p.length;l(new Qr(p.from,p.length,O,g,0)),O+=g,h=p.to+1}}replace(e,t,i){let r=this.length-t;if(r>0){let s=i[i.length-1];s instanceof Xi?i[i.length-1]=new Xi(s.length+r):i.push(null,new Xi(r-1))}if(e>0){let s=i[0];s instanceof Xi?i[0]=new Xi(e+s.length):i.unshift(new Xi(e-1),null)}return Ki.of(i)}decomposeLeft(e,t){t.push(new Xi(e-1),null)}decomposeRight(e,t){t.push(null,new Xi(this.length-e-1))}updateHeight(e,t=0,i=!1,r){let s=t+this.length;if(r&&r.from<=t+this.length&&r.more){let l=[],o=Math.max(t,r.from),f=-1;for(r.from>t&&l.push(new Xi(r.from-t-1).updateHeight(e,t));o<=s&&r.more;){let h=e.doc.lineAt(o).length;l.length&&l.push(null);let O=r.heights[r.index++];f==-1?f=O:Math.abs(O-f)>=Hf&&(f=-2);let p=new vn(h,O);p.outdated=!1,l.push(p),o+=h+1}o<=s&&l.push(null,new Xi(s-o).updateHeight(e,o));let u=Ki.of(l);return(f<0||Math.abs(u.height-this.height)>=Hf||Math.abs(f-this.heightMetrics(e,t).perLine)>=Hf)&&(e.heightChanged=!0),u}else(i||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class m5 extends Ki{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,t,i,r){let s=i+this.left.height;return eo))return u;let h=t==Rt.ByPosNoHeight?Rt.ByPosNoHeight:Rt.ByPos;return f?u.join(this.right.lineAt(o,h,i,l,o)):this.left.lineAt(o,h,i,r,s).join(u)}forEachLine(e,t,i,r,s,l){let o=r+this.left.height,f=s+this.left.length+this.break;if(this.break)e=f&&this.right.forEachLine(e,t,i,o,f,l);else{let u=this.lineAt(f,Rt.ByPos,i,r,s);e=e&&u.from<=t&&l(u),t>u.to&&this.right.forEachLine(u.to+1,t,i,o,f,l)}}replace(e,t,i){let r=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,i));let s=[];e>0&&this.decomposeLeft(e,s);let l=s.length;for(let o of i)s.push(o);if(e>0&&i1(s,l-1),t=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e2*t.size||t.size>2*e.size?Ki.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,r){let{left:s,right:l}=this,o=t+s.length+this.break,f=null;return r&&r.from<=t+s.length&&r.more?f=s=s.updateHeight(e,t,i,r):s.updateHeight(e,t,i),r&&r.from<=o+l.length&&r.more?f=l=l.updateHeight(e,o,i,r):l.updateHeight(e,o,i),f?this.balanced(s,l):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function i1(n,e){let t,i;n[e]==null&&(t=n[e-1])instanceof Xi&&(i=n[e+1])instanceof Xi&&n.splice(e-1,3,new Xi(t.length+1+i.length))}const S5=5;class Pd{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let i=Math.min(t,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof vn?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new vn(i-this.pos,-1)),this.writtenTo=i,t>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e=S5)&&this.addLineDeco(r,s,l)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new vn(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new Xi(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof vn)return e;let t=new vn(0,-1);return this.nodes.push(t),t}addBlock(e){var t;this.enterLine();let i=(t=e.deco)===null||t===void 0?void 0:t.type;i==Ht.WidgetAfter&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,i!=Ht.WidgetBefore&&(this.covering=e)}addLineDeco(e,t,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+i}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof vn)&&!this.isCovered?this.nodes.push(new vn(0,-1)):(this.writtenToh.clientHeight||h.scrollWidth>h.clientWidth)&&O.overflow!="visible"){let p=h.getBoundingClientRect();s=Math.max(s,p.left),l=Math.min(l,p.right),o=Math.max(o,p.top),f=u==n.parentNode?p.bottom:Math.min(f,p.bottom)}u=O.position=="absolute"||O.position=="fixed"?h.offsetParent:h.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:s-t.left,right:Math.max(s,l)-t.left,top:o-(t.top+e),bottom:Math.max(o,f)-(t.top+e)}}function w5(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Vh{constructor(e,t,i){this.from=e,this.to=t,this.size=i}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new p5(t),this.stateDeco=e.facet(jo).filter(i=>typeof i!="function"),this.heightMap=Ki.empty().applyChanges(this.stateDeco,mt.empty,this.heightOracle.setDoc(e.doc),[new In(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Re.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let r=i?t.head:t.anchor;if(!e.some(({from:s,to:l})=>r>=s&&r<=l)){let{from:s,to:l}=this.lineBlockAt(r);e.push(new kf(s,l))}}this.viewports=e.sort((i,r)=>i.from-r.from),this.scaler=this.heightMap.height<=7e6?r1:new k5(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:Co(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(jo).filter(h=>typeof h!="function");let r=e.changedRanges,s=In.extendWithRanges(r,b5(i,this.stateDeco,e?e.changes:Si.empty(this.state.doc.length))),l=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),this.heightMap.height!=l&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let f=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headf.to)||!this.viewportIsAppropriate(f))&&(f=this.getViewport(0,t));let u=!e.changes.empty||e.flags&2||f.from!=this.viewport.from||f.to!=this.viewport.to;this.viewport=f,this.updateForViewport(),u&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(q$)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,i=window.getComputedStyle(t),r=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?Ft.RTL:Ft.LTR;let l=this.heightOracle.mustRefreshForWrapping(s),o=t.getBoundingClientRect(),f=l||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let u=0,h=0;if(o.width&&o.height){let C=o.width/t.offsetWidth,X=o.height/t.offsetHeight;C>.995&&C<1.005&&(C=1),X>.995&&X<1.005&&(X=1),(this.scaleX!=C||this.scaleY!=X)&&(this.scaleX=C,this.scaleY=X,u|=8,l=f=!0)}let O=(parseInt(i.paddingTop)||0)*this.scaleY,p=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=O||this.paddingBottom!=p)&&(this.paddingTop=O,this.paddingBottom=p,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(f=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8);let g=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=g&&(this.scrollAnchorHeight=-1,this.scrollTop=g),this.scrolledToBottom=w$(e.scrollDOM);let b=(this.printing?w5:Q5)(t,this.paddingTop),Q=b.top-this.pixelViewport.top,$=b.bottom-this.pixelViewport.bottom;this.pixelViewport=b;let P=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(P!=this.inView&&(this.inView=P,P&&(f=!0)),!this.inView&&!this.scrollTarget)return 0;let x=o.width;if((this.contentDOMWidth!=x||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),f){let C=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(C)&&(l=!0),l||r.lineWrapping&&Math.abs(x-this.contentDOMWidth)>r.charWidth){let{lineHeight:X,charWidth:Z,textHeight:I}=e.docView.measureTextSize();l=X>0&&r.refresh(s,X,Z,I,x/Z,C),l&&(e.docView.minWidth=0,u|=8)}Q>0&&$>0?h=Math.max(Q,$):Q<0&&$<0&&(h=Math.min(Q,$)),r.heightChanged=!1;for(let X of this.viewports){let Z=X.from==this.viewport.from?C:e.docView.measureVisibleLineHeights(X);this.heightMap=(l?Ki.empty().applyChanges(this.stateDeco,mt.empty,this.heightOracle,[new In(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,l,new g5(X.from,Z))}r.heightChanged&&(u|=2)}let A=!this.viewportIsAppropriate(this.viewport,h)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return A&&(this.viewport=this.getViewport(h,this.scrollTarget)),this.updateForViewport(),(u&2||A)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(l?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,s=this.heightOracle,{visibleTop:l,visibleBottom:o}=this,f=new kf(r.lineAt(l-i*1e3,Rt.ByHeight,s,0,0).from,r.lineAt(o+(1-i)*1e3,Rt.ByHeight,s,0,0).to);if(t){let{head:u}=t.range;if(uf.to){let h=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),O=r.lineAt(u,Rt.ByPos,s,0,0),p;t.y=="center"?p=(O.top+O.bottom)/2-h/2:t.y=="start"||t.y=="nearest"&&u=o+Math.max(10,Math.min(i,250)))&&r>l-2*1e3&&s>1,l=r<<1;if(this.defaultTextDirection!=Ft.LTR&&!i)return[];let o=[],f=(u,h,O,p)=>{if(h-uu&&$$.from>=O.from&&$.to<=O.to&&Math.abs($.from-u)$.fromP));if(!Q){if(h$.from<=h&&$.to>=h)){let $=t.moveToLineBoundary(J.cursor(h),!1,!0).head;$>u&&(h=$)}Q=new Vh(u,h,this.gapSize(O,u,h,p))}o.push(Q)};for(let u of this.viewportLines){if(u.lengthu.from&&f(u.from,p,u,h),gt.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];Qt.spans(e,this.viewport.from,this.viewport.to,{span(r,s){t.push({from:r,to:s})},point(){}},20);let i=t.length!=this.visibleRanges.length||this.visibleRanges.some((r,s)=>r.from!=t[s].from||r.to!=t[s].to);return this.visibleRanges=t,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Co(this.heightMap.lineAt(e,Rt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return Co(this.heightMap.lineAt(this.scaler.fromDOM(e),Rt.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Co(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class kf{constructor(e,t){this.from=e,this.to=t}}function v5(n,e,t){let i=[],r=n,s=0;return Qt.spans(t,n,e,{span(){},point(l,o){l>r&&(i.push({from:r,to:l}),s+=l-r),r=o}},20),r=1)return e[e.length-1].to;let i=Math.floor(n*t);for(let r=0;;r++){let{from:s,to:l}=e[r],o=l-s;if(i<=o)return s+i;i-=o}}function Wf(n,e){let t=0;for(let{from:i,to:r}of n.ranges){if(e<=r){t+=e-i;break}t+=r-i}return t/n.total}function P5(n,e){for(let t of n)if(e(t))return t}const r1={toDOM(n){return n},fromDOM(n){return n},scale:1};class k5{constructor(e,t,i){let r=0,s=0,l=0;this.viewports=i.map(({from:o,to:f})=>{let u=t.lineAt(o,Rt.ByPos,e,0,0).top,h=t.lineAt(f,Rt.ByPos,e,0,0).bottom;return r+=h-u,{from:o,to:f,top:u,bottom:h,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let o of this.viewports)o.domTop=l+(o.top-s)*this.scale,l=o.domBottom=o.domTop+(o.bottom-o.top),s=o.bottom}toDOM(e){for(let t=0,i=0,r=0;;t++){let s=tCo(r,e)):n._content)}const xf=ye.define({combine:n=>n.join(" ")}),zO=ye.define({combine:n=>n.indexOf(!0)>-1}),IO=ys.newName(),aQ=ys.newName(),fQ=ys.newName(),cQ={"&light":"."+aQ,"&dark":"."+fQ};function NO(n,e,t){return new ys(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return n;if(!t||!t[r])throw new RangeError(`Unsupported selector: ${r}`);return t[r]}):n+" "+i}})}const _5=NO("."+IO,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},cQ),Xo="￿";class W5{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(ct.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Xo}readRange(e,t){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r);let s=this.text.length;this.readNode(r);let l=r.nextSibling;if(l==t)break;let o=Ut.get(r),f=Ut.get(l);(o&&f?o.breakAfter:(o?o.breakAfter:s1(r))||s1(l)&&(r.nodeName!="BR"||r.cmIgnore)&&this.text.length>s)&&this.lineBreak(),r=l}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,l=1,o;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,i),l=this.lineSeparator.length):(o=r.exec(t))&&(s=o.index,l=o[0].length),this.append(t.slice(i,s<0?t.length:s)),s<0)break;if(this.lineBreak(),l>1)for(let f of this.points)f.node==e&&f.pos>this.text.length&&(f.pos-=l-1);i=s+l}}readNode(e){if(e.cmIgnore)return;let t=Ut.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+Math.min(t,i.offset))}}function s1(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}class l1{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class x5{constructor(e,t,i,r){this.typeOver=r,this.bounds=null,this.text="";let{impreciseHead:s,impreciseAnchor:l}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,i,0))){let o=s||l?[]:T5(e),f=new W5(o,e.state);f.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=f.text,this.newSel=Z5(o,this.bounds.from)}else{let o=e.observer.selectionRange,f=s&&s.node==o.focusNode&&s.offset==o.focusOffset||!WO(e.contentDOM,o.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(o.focusNode,o.focusOffset),u=l&&l.node==o.anchorNode&&l.offset==o.anchorOffset||!WO(e.contentDOM,o.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(o.anchorNode,o.anchorOffset);this.newSel=J.single(u,f)}}}function uQ(n,e){let t,{newSel:i}=e,r=n.state.selection.main,s=n.inputState.lastKeyTime>Date.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:l,to:o}=e.bounds,f=r.from,u=null;(s===8||Pe.android&&e.text.length=r.from&&t.to<=r.to&&(t.from!=r.from||t.to!=r.to)&&r.to-r.from-(t.to-t.from)<=4?t={from:r.from,to:r.to,insert:n.state.doc.slice(r.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,r.to))}:(Pe.mac||Pe.android)&&t&&t.from==t.to&&t.from==r.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(i&&t.insert.length==2&&(i=J.single(i.main.anchor-1,i.main.head-1)),t={from:r.from,to:r.to,insert:mt.of([" "])}):Pe.chrome&&t&&t.from==t.to&&t.from==r.head&&t.insert.toString()==` - `&&n.lineWrapping&&(i&&(i=J.single(i.main.anchor-1,i.main.head-1)),t={from:r.from,to:r.to,insert:mt.of([" "])}),t){if(Pe.ios&&n.inputState.flushIOSKey(n)||Pe.android&&(t.from==r.from&&t.to==r.to&&t.insert.length==1&&t.insert.lines==2&&Tl(n.contentDOM,"Enter",13)||(t.from==r.from-1&&t.to==r.to&&t.insert.length==0||s==8&&t.insert.lengthr.head)&&Tl(n.contentDOM,"Backspace",8)||t.from==r.from&&t.to==r.to+1&&t.insert.length==0&&Tl(n.contentDOM,"Delete",46)))return!0;let l=t.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let o,f=()=>o||(o=C5(n,t,i));return n.state.facet(U$).some(u=>u(n,t.from,t.to,l,f))||n.dispatch(f()),!0}else if(i&&!i.main.eq(r)){let l=!1,o="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(l=!0),o=n.inputState.lastSelectionOrigin),n.dispatch({selection:i,scrollIntoView:l,userEvent:o}),!0}else return!1}function C5(n,e,t){let i,r=n.state,s=r.selection.main;if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let o=s.frome.to?r.sliceDoc(e.to,s.to):"";i=r.replaceSelection(n.state.toText(o+e.insert.sliceString(0,void 0,n.state.lineBreak)+f))}else{let o=r.changes(e),f=t&&t.main.to<=o.newLength?t.main:void 0;if(r.selection.ranges.length>1&&n.inputState.composing>=0&&e.to<=s.to&&e.to>=s.to-10){let u=n.state.sliceDoc(e.from,e.to),h,O=t&&F$(n,t.main.head);if(O){let b=e.insert.length-(e.to-e.from);h={from:O.from,to:O.to-b}}else h=n.state.doc.lineAt(s.head);let p=s.to-e.to,g=s.to-s.from;i=r.changeByRange(b=>{if(b.from==s.from&&b.to==s.to)return{changes:o,range:f||b.map(o)};let Q=b.to-p,$=Q-u.length;if(b.to-b.from!=g||n.state.sliceDoc($,Q)!=u||b.to>=h.from&&b.from<=h.to)return{range:b};let P=r.changes({from:$,to:Q,insert:e.insert}),x=b.to-s.to;return{changes:P,range:f?J.range(Math.max(0,f.anchor+x),Math.max(0,f.head+x)):b.map(P)}})}else i={changes:o,selection:f&&r.selection.replaceRange(f)}}let l="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,l+=".compose",n.inputState.compositionFirstChange&&(l+=".start",n.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:l,scrollIntoView:!0})}function X5(n,e,t,i){let r=Math.min(n.length,e.length),s=0;for(;s0&&o>0&&n.charCodeAt(l-1)==e.charCodeAt(o-1);)l--,o--;if(i=="end"){let f=Math.max(0,s-Math.min(l,o));t-=l+f-s}if(l=l?s-t:0;s-=f,o=s+(o-l),l=s}else if(o=o?s-t:0;s-=f,l=s+(l-o),o=s}return{from:s,toA:l,toB:o}}function T5(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:r,focusOffset:s}=n.observer.selectionRange;return t&&(e.push(new l1(t,i)),(r!=t||s!=i)&&e.push(new l1(r,s))),e}function Z5(n,e){if(n.length==0)return null;let t=n[0].pos,i=n.length==2?n[1].pos:t;return t>-1&&i>-1?J.single(t+e,i+e):null}const R5={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},qh=Pe.ie&&Pe.ie_version<=11;class A5{constructor(e){this.view=e,this.active=!1,this.selectionRange=new Q3,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let i of t)this.queue.push(i);(Pe.ie&&Pe.ie_version<=11||Pe.ios&&e.composing)&&t.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),qh&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)this.view.requestMeasure()),this.resizeContent.observe(e.contentDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runScrollHandlers(this.view,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,i)=>t!=e[i]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(Bc)?i.root.activeElement!=this.dom:!Ff(i.dom,r))return;let s=r.anchorNode&&i.docView.nearest(r.anchorNode);if(s&&s.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Pe.ie&&Pe.ie_version<=11||Pe.android&&Pe.chrome)&&!i.state.selection.main.empty&&r.focusNode&&cc(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Pe.safari&&e.root.nodeType==11&&m3(this.dom.ownerDocument)==this.dom&&U5(this.view)||fc(e.root);if(!t||this.selectionRange.eq(t))return!1;let i=Ff(this.dom,t);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Tl(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,i=-1,r=!1;for(let s of e){let l=this.readMutation(s);l&&(l.typeOver&&(r=!0),t==-1?{from:t,to:i}=l:(t=Math.min(l.from,t),i=Math.max(l.to,i)))}return{from:t,to:i,typeOver:r}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),r=this.selectionChanged&&Ff(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new x5(this.view,e,t,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return!1;let i=this.view.state,r=uQ(this.view,t);return this.view.state==i&&this.view.update([]),r}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let i=o1(t,e.previousSibling||e.target.previousSibling,-1),r=o1(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,i,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect(),(r=this.resizeContent)===null||r===void 0||r.disconnect();for(let s of this.scrollTargets)s.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function o1(n,e,t){for(;e;){let i=Ut.get(e);if(i&&i.parent==n)return i;let r=e.parentNode;e=r!=n.dom?r:t>0?e.nextSibling:e.previousSibling}return null}function U5(n){let e=null;function t(f){f.preventDefault(),f.stopImmediatePropagation(),e=f.getTargetRanges()[0]}if(n.contentDOM.addEventListener("beforeinput",t,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",t,!0),!e)return null;let i=e.startContainer,r=e.startOffset,s=e.endContainer,l=e.endOffset,o=n.docView.domAtPos(n.state.selection.main.anchor);return cc(o.node,o.offset,s,l)&&([i,r,s,l]=[s,l,i,r]),{anchorNode:i,anchorOffset:r,focusNode:s,focusOffset:l}}class me{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(i=>i.forEach(r=>t(r,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||w3(e.parent)||document,this.viewState=new n1(e.state||ct.create(e)),this.plugins=this.state.facet(Wo).map(i=>new Ah(i));for(let i of this.plugins)i.update(this);this.observer=new A5(this),this.inputState=new e5(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new qm(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}dispatch(...e){let t=e.length==1&&e[0]instanceof bi?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,r,s=this.state;for(let p of e){if(p.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=p.state}if(this.destroyed){this.viewState.state=s;return}let l=this.hasFocus,o=0,f=null;e.some(p=>p.annotation(rQ))?(this.inputState.notifiedFocused=l,o=1):l!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=l,f=sQ(s,l),f||(o=1));let u=this.observer.delayedAndroidKey,h=null;if(u?(this.observer.clearDelayedAndroidKey(),h=this.observer.readChange(),(h&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(h=null)):this.observer.clear(),s.facet(ct.phrases)!=this.state.facet(ct.phrases))return this.setState(s);r=Oc.create(this,s,e),r.flags|=o;let O=this.viewState.scrollTarget;try{this.updateState=2;for(let p of e){if(O&&(O=O.map(p.changes)),p.scrollIntoView){let{main:g}=p.state.selection;O=new hc(g.empty?g:J.cursor(g.head,g.head>g.anchor?-1:1))}for(let g of p.effects)g.is(Ym)&&(O=g.value)}this.viewState.update(r,O),this.bidiCache=dc.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),t=this.docView.update(r),this.state.facet(xo)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(p=>p.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(xf)!=r.state.facet(xf)&&(this.viewState.mustMeasureContent=!0),(t||i||O||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!r.empty)for(let p of this.state.facet(AO))p(r);(f||h)&&Promise.resolve().then(()=>{f&&this.state==f.startState&&this.dispatch(f),h&&!uQ(this,h)&&u.force&&Tl(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new n1(e),this.plugins=e.facet(Wo).map(i=>new Ah(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView=new qm(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Wo),i=e.state.facet(Wo);if(t!=i){let r=[];for(let s of i){let l=t.indexOf(s);if(l<0)r.push(new Ah(s));else{let o=this.plugins[l];o.mustUpdate=e,r.push(o)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=r,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,i=this.scrollDOM,r=i.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:l}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(l=-1),this.viewState.scrollAnchorHeight=-1;try{for(let o=0;;o++){if(l<0)if(w$(i))s=-1,l=this.viewState.heightMap.height;else{let g=this.viewState.scrollAnchorAt(r);s=g.from,l=g.top}this.updateState=1;let f=this.viewState.measure(this);if(!f&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(o>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];f&4||([this.measureRequests,u]=[u,this.measureRequests]);let h=u.map(g=>{try{return g.read(this)}catch(b){return Wn(this.state,b),a1}}),O=Oc.create(this,this.state,[]),p=!1;O.flags|=f,t?t.flags|=f:t=O,this.updateState=2,O.empty||(this.updatePlugins(O),this.inputState.update(O),this.updateAttrs(),p=this.docView.update(O));for(let g=0;g1||b<-1){r=r+b,i.scrollTop=r/this.scaleY,l=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let o of this.state.facet(AO))o(t)}get themeClasses(){return IO+" "+(this.state.facet(zO)?fQ:aQ)+" "+this.state.facet(xf)}updateAttrs(){let e=f1(this,E$,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Bc)?"true":"false",class:"cm-content",style:`${Pe.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),f1(this,yd,t);let i=this.observer.ignore(()=>{let r=ZO(this.contentDOM,this.contentAttrs,t),s=ZO(this.dom,this.editorAttrs,e);return r||s});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let r of i.effects)if(r.is(me.announce)){t&&(this.announceDOM.textContent=""),t=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(xo);let e=this.state.facet(me.cspNonce);ys.mount(this.root,this.styleModules.concat(_5).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;ti.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return Yh(this,e,Nm(this,e,t,i))}moveByGroup(e,t){return Yh(this,e,Nm(this,e,t,i=>K3(this,e.head,i)))}moveToLineBoundary(e,t,i=!0){return H3(this,e,t,i)}moveVertically(e,t,i){return Yh(this,e,J3(this,e,t,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),H$(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.docView.coordsAt(e,t);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(e),s=this.bidiSpans(r),l=s[bs.find(s,e-r.from,-1,t)];return $d(i,l.dir==Ft.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(V$)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Y5)return B$(e.length);let t=this.textDirectionAt(e.from),i;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t&&(s.fresh||L$(s.isolates,i=Vm(this,e.from,e.to))))return s.order;i||(i=Vm(this,e.from,e.to));let r=Y3(e.text,t,i);return this.bidiCache.push(new dc(e.from,e.to,t,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Pe.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{$$(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Ym.of(new hc(typeof e=="number"?J.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}static domEventHandlers(e){return pi.define(()=>({}),{eventHandlers:e})}static theme(e,t){let i=ys.newName(),r=[xf.of(i),xo.of(NO(`.${i}`,e))];return t&&t.dark&&r.push(zO.of(!0)),r}static baseTheme(e){return el.lowest(xo.of(NO("."+IO,e,cQ)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),r=i&&Ut.get(i)||Ut.get(e);return((t=r==null?void 0:r.rootView)===null||t===void 0?void 0:t.view)||null}}me.styleModule=xo;me.inputHandler=U$;me.focusChangeEffect=Y$;me.perLineTextDirection=V$;me.exceptionSink=A$;me.updateListener=AO;me.editable=Bc;me.mouseSelectionStyle=R$;me.dragMovesSelection=Z$;me.clickAddsSelectionRange=T$;me.decorations=jo;me.atomicRanges=vd;me.bidiIsolatedRanges=M$;me.scrollMargins=D$;me.darkTheme=zO;me.cspNonce=ye.define({combine:n=>n.length?n[0]:""});me.contentAttributes=yd;me.editorAttributes=E$;me.lineWrapping=me.contentAttributes.of({class:"cm-lineWrapping"});me.announce=Ie.define();const Y5=4096,a1={};class dc{constructor(e,t,i,r,s,l){this.from=e,this.to=t,this.dir=i,this.isolates=r,this.fresh=s,this.order=l}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:Ft.LTR;for(let s=Math.max(0,e.length-10);s=0;r--){let s=i[r],l=typeof s=="function"?s(n):s;l&&TO(l,t)}return t}const V5=Pe.mac?"mac":Pe.windows?"win":Pe.linux?"linux":"key";function q5(n,e){const t=n.split(/-(?!$)/);let i=t[t.length-1];i=="Space"&&(i=" ");let r,s,l,o;for(let f=0;fi.concat(r),[]))),t}function M5(n,e,t){return OQ(hQ(n.state),e,n,t)}let gs=null;const D5=4e3;function z5(n,e=V5){let t=Object.create(null),i=Object.create(null),r=(l,o)=>{let f=i[l];if(f==null)i[l]=o;else if(f!=o)throw new Error("Key binding "+l+" is used both as a regular binding and as a multi-stroke prefix")},s=(l,o,f,u,h)=>{var O,p;let g=t[l]||(t[l]=Object.create(null)),b=o.split(/ (?!$)/).map(P=>q5(P,e));for(let P=1;P{let C=gs={view:A,prefix:x,scope:l};return setTimeout(()=>{gs==C&&(gs=null)},D5),!0}]})}let Q=b.join(" ");r(Q,!1);let $=g[Q]||(g[Q]={preventDefault:!1,stopPropagation:!1,run:((p=(O=g._any)===null||O===void 0?void 0:O.run)===null||p===void 0?void 0:p.slice())||[]});f&&$.run.push(f),u&&($.preventDefault=!0),h&&($.stopPropagation=!0)};for(let l of n){let o=l.scope?l.scope.split(" "):["editor"];if(l.any)for(let u of o){let h=t[u]||(t[u]=Object.create(null));h._any||(h._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let O in h)h[O].run.push(l.any)}let f=l[e]||l.key;if(f)for(let u of o)s(u,f,l.run,l.preventDefault,l.stopPropagation),l.shift&&s(u,"Shift-"+f,l.shift,l.preventDefault,l.stopPropagation)}return t}function OQ(n,e,t,i){let r=g3(e),s=Zi(r,0),l=Pn(s)==r.length&&r!=" ",o="",f=!1,u=!1,h=!1;gs&&gs.view==t&&gs.scope==i&&(o=gs.prefix+" ",J$.indexOf(e.keyCode)<0&&(u=!0,gs=null));let O=new Set,p=$=>{if($){for(let P of $.run)if(!O.has(P)&&(O.add(P),P(t,e)))return $.stopPropagation&&(h=!0),!0;$.preventDefault&&($.stopPropagation&&(h=!0),u=!0)}return!1},g=n[i],b,Q;return g&&(p(g[o+Cf(r,e,!l)])?f=!0:l&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Pe.windows&&e.ctrlKey&&e.altKey)&&(b=vs[e.keyCode])&&b!=r?(p(g[o+Cf(b,e,!0)])||e.shiftKey&&(Q=Lo[e.keyCode])!=r&&Q!=b&&p(g[o+Cf(Q,e,!1)]))&&(f=!0):l&&e.shiftKey&&p(g[o+Cf(r,e,!0)])&&(f=!0),!f&&p(g._any)&&(f=!0)),u&&(f=!0),f&&h&&e.stopPropagation(),f}class fa{constructor(e,t,i,r,s){this.className=e,this.left=t,this.top=i,this.width=r,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let s=dQ(e);return[new fa(t,r.left-s.left,r.top-s.top,null,r.bottom-r.top)]}else return I5(e,t,i)}}function dQ(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==Ft.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function u1(n,e,t){let i=J.cursor(e);return{from:Math.max(t.from,n.moveToLineBoundary(i,!1,!0).from),to:Math.min(t.to,n.moveToLineBoundary(i,!0,!0).from),type:Ht.Text}}function I5(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let i=Math.max(t.from,n.viewport.from),r=Math.min(t.to,n.viewport.to),s=n.textDirection==Ft.LTR,l=n.contentDOM,o=l.getBoundingClientRect(),f=dQ(n),u=l.querySelector(".cm-line"),h=u&&window.getComputedStyle(u),O=o.left+(h?parseInt(h.paddingLeft)+Math.min(0,parseInt(h.textIndent)):0),p=o.right-(h?parseInt(h.paddingRight):0),g=EO(n,i),b=EO(n,r),Q=g.type==Ht.Text?g:null,$=b.type==Ht.Text?b:null;if(Q&&(n.lineWrapping||g.widgetLineBreaks)&&(Q=u1(n,i,Q)),$&&(n.lineWrapping||b.widgetLineBreaks)&&($=u1(n,r,$)),Q&&$&&Q.from==$.from)return x(A(t.from,t.to,Q));{let X=Q?A(t.from,null,Q):C(g,!1),Z=$?A(null,t.to,$):C(b,!0),I=[];return(Q||g).to<($||b).from-(Q&&$?1:0)||g.widgetLineBreaks>1&&X.bottom+n.defaultLineHeight/2ue&&Se.from<$e)for(let Te=Math.max(Se.from,ue),pe=Math.min(Se.to,$e);;){let fe=n.state.doc.lineAt(Te);for(let Ae of n.bidiSpans(fe)){let xe=Ae.from+fe.from,Ce=Ae.to+fe.from;if(xe>=pe)break;Ce>Te&&ie(Math.max(xe,Te),X==null&&xe<=ue,Math.min(Ce,pe),Z==null&&Ce>=$e,Ae.dir)}if(Te=fe.to+1,Te>=pe)break}return z.length==0&&ie(ue,X==null,$e,Z==null,n.textDirection),{top:q,bottom:N,horizontal:z}}function C(X,Z){let I=o.top+(Z?X.top:X.bottom);return{top:I,bottom:I,horizontal:[]}}}function N5(n,e){return n.constructor==e.constructor&&n.eq(e)}class L5{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Kf)!=e.state.facet(Kf)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}setOrder(e){let t=0,i=e.facet(Kf);for(;t!N5(t,this.drawn[i]))){let t=this.dom.firstChild,i=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[i].constructor&&r.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(r.draw(),t);for(;t;){let r=t.nextSibling;t.remove(),t=r}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Kf=ye.define();function pQ(n){return[pi.define(e=>new L5(e,n)),Kf.of(n)]}const gQ=!Pe.ios,Go=ye.define({combine(n){return _r(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function B5(n={}){return[Go.of(n),j5,F5,G5,q$.of(!0)]}function mQ(n){return n.startState.facet(Go)!=n.state.facet(Go)}const j5=pQ({above:!0,markers(n){let{state:e}=n,t=e.facet(Go),i=[];for(let r of e.selection.ranges){let s=r==e.selection.main;if(r.empty?!s||gQ:t.drawRangeCursor){let l=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",o=r.empty?r:J.cursor(r.head,r.head>r.anchor?-1:1);for(let f of fa.forRange(n,l,o))i.push(f)}}return i},update(n,e){n.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=mQ(n);return t&&h1(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){h1(e.state,n)},class:"cm-cursorLayer"});function h1(n,e){e.style.animationDuration=n.facet(Go).cursorBlinkRate+"ms"}const F5=pQ({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:fa.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||mQ(n)},class:"cm-selectionLayer"}),SQ={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};gQ&&(SQ[".cm-line"].caretColor="transparent !important");const G5=el.highest(me.theme(SQ)),bQ=Ie.define({map(n,e){return n==null?null:e.mapPos(n)}}),To=$i.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,i)=>i.is(bQ)?i.value:t,n)}}),H5=pi.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(To);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(To)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field(To),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let i=n.scrollDOM.getBoundingClientRect();return{left:t.left-i.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-i.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(To)!=n&&this.view.dispatch({effects:bQ.of(n)})}},{eventHandlers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function K5(){return[To,H5]}function O1(n,e,t,i,r){e.lastIndex=0;for(let s=n.iterRange(t,i),l=t,o;!s.next().done;l+=s.value.length)if(!s.lineBreak)for(;o=e.exec(s.value);)r(l+o.index,o)}function J5(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let i=[];for(let{from:r,to:s}of t)r=Math.max(n.state.doc.lineAt(r).from,r-e),s=Math.min(n.state.doc.lineAt(s).to,s+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=s:i.push({from:r,to:s});return i}class e4{constructor(e){const{regexp:t,decoration:i,decorate:r,boundary:s,maxLength:l=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,r)this.addMatch=(o,f,u,h)=>r(h,u,u+o[0].length,o,f);else if(typeof i=="function")this.addMatch=(o,f,u,h)=>{let O=i(o,f,u);O&&h(u,u+o[0].length,O)};else if(i)this.addMatch=(o,f,u,h)=>h(u,u+o[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=l}createDeco(e){let t=new ws,i=t.add.bind(t);for(let{from:r,to:s}of J5(e,this.maxLength))O1(e.state.doc,this.regexp,r,s,(l,o)=>this.addMatch(o,e,l,i));return t.finish()}updateDeco(e,t){let i=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((s,l,o,f)=>{f>e.view.viewport.from&&o1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),i,r):t}updateRange(e,t,i,r){for(let s of e.visibleRanges){let l=Math.max(s.from,i),o=Math.min(s.to,r);if(o>l){let f=e.state.doc.lineAt(l),u=f.tof.from;l--)if(this.boundary.test(f.text[l-1-f.from])){h=l;break}for(;op.push(P.range(Q,$));if(f==u)for(this.regexp.lastIndex=h-f.from;(g=this.regexp.exec(f.text))&&g.indexthis.addMatch($,e,Q,b));t=t.update({filterFrom:h,filterTo:O,filter:(Q,$)=>QO,add:p})}}return t}}const LO=/x/.unicode!=null?"gu":"g",t4=new RegExp(`[\0-\b ---Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,LO),i4={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Eh=null;function n4(){var n;if(Eh==null&&typeof document<"u"&&document.body){let e=document.body.style;Eh=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Eh||!1}const Jf=ye.define({combine(n){let e=_r(n,{render:null,specialChars:t4,addSpecialChars:null});return(e.replaceTabs=!n4())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,LO)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,LO)),e}});function r4(n={}){return[Jf.of(n),s4()]}let d1=null;function s4(){return d1||(d1=pi.fromClass(class{constructor(n){this.view=n,this.decorations=Re.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Jf)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new e4({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:r}=t.state,s=Zi(e[0],0);if(s==9){let l=r.lineAt(i),o=t.state.tabSize,f=sa(l.text,o,i-l.from);return Re.replace({widget:new f4((o-f%o)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=Re.replace({widget:new a4(n,s)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Jf);n.startState.facet(Jf)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const l4="•";function o4(n){return n>=32?l4:n==10?"␤":String.fromCharCode(9216+n)}class a4 extends Cs{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=o4(this.code),i=e.state.phrase("Control character")+" "+(i4[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,t);if(r)return r;let s=document.createElement("span");return s.textContent=t,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class f4 extends Cs{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function c4(){return h4}const u4=Re.line({class:"cm-activeLine"}),h4=pi.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let i of n.state.selection.ranges){let r=n.lineBlockAt(i.head);r.from>e&&(t.push(u4.range(r.from)),e=r.from)}return Re.set(t)}},{decorations:n=>n.decorations}),BO=2e3;function O4(n,e,t){let i=Math.min(e.line,t.line),r=Math.max(e.line,t.line),s=[];if(e.off>BO||t.off>BO||e.col<0||t.col<0){let l=Math.min(e.off,t.off),o=Math.max(e.off,t.off);for(let f=i;f<=r;f++){let u=n.doc.line(f);u.length<=o&&s.push(J.range(u.from+l,u.to+o))}}else{let l=Math.min(e.col,t.col),o=Math.max(e.col,t.col);for(let f=i;f<=r;f++){let u=n.doc.line(f),h=PO(u.text,l,n.tabSize,!0);if(h<0)s.push(J.cursor(u.to));else{let O=PO(u.text,o,n.tabSize);s.push(J.range(u.from+h,u.from+O))}}}return s}function d4(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function p1(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),r=t-i.from,s=r>BO?-1:r==i.length?d4(n,e.clientX):sa(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:s,off:r}}function p4(n,e){let t=p1(n,e),i=n.state.selection;return t?{update(r){if(r.docChanged){let s=r.changes.mapPos(r.startState.doc.line(t.line).from),l=r.state.doc.lineAt(s);t={line:l.number,col:t.col,off:Math.min(t.off,l.length)},i=i.map(r.changes)}},get(r,s,l){let o=p1(n,r);if(!o)return i;let f=O4(n.state,t,o);return f.length?l?J.create(f.concat(i.ranges)):J.create(f):i}}:null}function g4(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return me.mouseSelectionStyle.of((t,i)=>e(i)?p4(t,i):null)}const m4={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},S4={style:"cursor: crosshair"};function b4(n={}){let[e,t]=m4[n.key||"Alt"],i=pi.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventHandlers:{keydown(r){this.set(r.keyCode==e||t(r))},keyup(r){(r.keyCode==e||!t(r))&&this.set(!1)},mousemove(r){this.set(t(r))}}});return[i,me.contentAttributes.of(r=>{var s;return!((s=r.plugin(i))===null||s===void 0)&&s.isDown?S4:null})]}const Xf="-10000px";class $Q{constructor(e,t,i){this.facet=t,this.createTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(r=>r),this.tooltipViews=this.tooltips.map(i)}update(e){var t;let i=e.state.facet(this.facet),r=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let s=[];for(let l=0;l{var e,t,i;return{position:Pe.ios?"absolute":((e=n.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(r=>r.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((i=n.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||$4}}}),g1=new WeakMap,QQ=pi.fromClass(class{constructor(n){this.view=n,this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(Mh);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new $Q(n,kd,t=>this.createTooltip(t)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n);e&&this.observeIntersection();let t=e||n.geometryChanged,i=n.state.facet(Mh);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;t=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n){let e=n.create(this.view);if(e.dom.classList.add("cm-tooltip"),n.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",e.dom.appendChild(t)}return e.dom.style.position=this.position,e.dom.style.top=Xf,this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var n,e;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),(n=t.destroy)===null||n===void 0||n.call(t);(e=this.intersectionObserver)===null||e===void 0||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect(),e=1,t=1,i=!1;if(this.position=="fixed"){let r=this.manager.tooltipViews;i=r.length>0&&r[0].dom.offsetParent!=this.container.ownerDocument.body}if(i||this.position=="absolute")if(this.parent){let r=this.parent.getBoundingClientRect();r.width&&r.height&&(e=r.width/this.parent.offsetWidth,t=r.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((r,s)=>{let l=this.manager.tooltipViews[s];return l.getCoords?l.getCoords(r.pos):this.view.coordsAtPos(r.pos)}),size:this.manager.tooltipViews.map(({dom:r})=>r.getBoundingClientRect()),space:this.view.state.facet(Mh).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:i}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let o of this.manager.tooltipViews)o.dom.style.position="absolute"}let{editor:t,space:i,scaleX:r,scaleY:s}=n,l=[];for(let o=0;o=Math.min(t.bottom,i.bottom)||O.rightMath.min(t.right,i.right)+.1){h.style.top=Xf;continue}let g=f.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,b=g?7:0,Q=p.right-p.left,$=(e=g1.get(u))!==null&&e!==void 0?e:p.bottom-p.top,P=u.offset||w4,x=this.view.textDirection==Ft.LTR,A=p.width>i.right-i.left?x?i.left:i.right-p.width:x?Math.min(O.left-(g?14:0)+P.x,i.right-Q):Math.max(i.left,O.left-Q+(g?14:0)-P.x),C=!!f.above;!f.strictSide&&(C?O.top-(p.bottom-p.top)-P.yi.bottom)&&C==i.bottom-O.bottom>O.top-i.top&&(C=!C);let X=(C?O.top-i.top:i.bottom-O.bottom)-b;if(X<$&&u.resize!==!1){if(XA&&q.topZ&&(Z=C?q.top-$-2-b:q.bottom+b+2);if(this.position=="absolute"?(h.style.top=(Z-n.parent.top)/s+"px",h.style.left=(A-n.parent.left)/r+"px"):(h.style.top=Z/s+"px",h.style.left=A/r+"px"),g){let q=O.left+(x?P.x:-P.x)-(A+14-7);g.style.left=q/r+"px"}u.overlap!==!0&&l.push({left:A,top:Z,right:I,bottom:Z+$}),h.classList.toggle("cm-tooltip-above",C),h.classList.toggle("cm-tooltip-below",!C),u.positioned&&u.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=Xf}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),Q4=me.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),w4={x:0,y:0},kd=ye.define({enables:[QQ,Q4]}),pc=ye.define();class _d{static create(e){return new _d(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new $Q(e,pc,t=>this.createHostedView(t))}createHostedView(e){let t=e.create(this.view);return t.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(t.dom),this.mounted&&t.mount&&t.mount(this.view),t}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}}const y4=kd.compute([pc],n=>{let e=n.facet(pc).filter(t=>t);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.filter(t=>t.end!=null).map(t=>t.end)),create:_d.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class v4{constructor(e,t,i,r,s){this.view=e,this.source=t,this.field=i,this.setHover=r,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let e=Date.now()-this.lastMove.time;eo.bottom||t.xo.right+e.defaultCharacterWidth)return;let f=e.bidiSpans(e.state.doc.lineAt(r)).find(h=>h.from<=r&&h.to>=r),u=f&&f.dir==Ft.RTL?-1:1;s=t.x{this.pending==o&&(this.pending=null,f&&e.dispatch({effects:this.setHover.of(f)}))},f=>Wn(e.state,f,"hover tooltip"))}else l&&e.dispatch({effects:this.setHover.of(l)})}mousemove(e){var t;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let i=this.active;if(i&&!m1(this.lastMove.target)||this.pending){let{pos:r}=i||this.pending,s=(t=i==null?void 0:i.end)!==null&&t!==void 0?t:r;(r==s?this.view.posAtCoords(this.lastMove)!=r:!P4(this.view,r,s,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!m1(e.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function m1(n){for(let e=n;e;e=e.parentNode)if(e.nodeType==1&&e.classList.contains("cm-tooltip"))return!0;return!1}function P4(n,e,t,i,r,s){let l=n.scrollDOM.getBoundingClientRect(),o=n.documentTop+n.documentPadding.top+n.contentHeight;if(l.left>i||l.rightr||Math.min(l.bottom,o)=e&&f<=t}function k4(n,e={}){let t=Ie.define(),i=$i.define({create(){return null},update(r,s){if(r&&(e.hideOnChange&&(s.docChanged||s.selection)||e.hideOn&&e.hideOn(s,r)))return null;if(r&&s.docChanged){let l=s.changes.mapPos(r.pos,-1,Ai.TrackDel);if(l==null)return null;let o=Object.assign(Object.create(null),r);o.pos=l,r.end!=null&&(o.end=s.changes.mapPos(r.end)),r=o}for(let l of s.effects)l.is(t)&&(r=l.value),l.is(W4)&&(r=null);return r},provide:r=>pc.from(r)});return[i,pi.define(r=>new v4(r,n,i,t,e.hoverTime||300)),y4]}function _4(n,e){let t=n.plugin(QQ);if(!t)return null;let i=t.manager.tooltips.indexOf(e);return i<0?null:t.manager.tooltipViews[i]}const W4=Ie.define(),S1=ye.define({combine(n){let e,t;for(let i of n)e=e||i.topContainer,t=t||i.bottomContainer;return{topContainer:e,bottomContainer:t}}});function Ho(n,e){let t=n.plugin(wQ),i=t?t.specs.indexOf(e):-1;return i>-1?t.panels[i]:null}const wQ=pi.fromClass(class{constructor(n){this.input=n.state.facet(Ko),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(S1);this.top=new Tf(n,!0,e.topContainer),this.bottom=new Tf(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(S1);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Tf(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Tf(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(Ko);if(t!=this.input){let i=t.filter(f=>f),r=[],s=[],l=[],o=[];for(let f of i){let u=this.specs.indexOf(f),h;u<0?(h=f(n.view),o.push(h)):(h=this.panels[u],h.update&&h.update(n)),r.push(h),(h.top?s:l).push(h)}this.specs=i,this.panels=r,this.top.sync(s),this.bottom.sync(l);for(let f of o)f.dom.classList.add("cm-panel"),f.mount&&f.mount()}else for(let i of this.panels)i.update&&i.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>me.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class Tf{constructor(e,t,i){this.view=e,this.top=t,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=b1(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=b1(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function b1(n){let e=n.nextSibling;return n.remove(),e}const Ko=ye.define({enables:wQ});class Br extends Hs{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Br.prototype.elementClass="";Br.prototype.toDOM=void 0;Br.prototype.mapMode=Ai.TrackBefore;Br.prototype.startSide=Br.prototype.endSide=-1;Br.prototype.point=!0;const ec=ye.define(),x4={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Qt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Eo=ye.define();function C4(n){return[yQ(),Eo.of(Object.assign(Object.assign({},x4),n))]}const jO=ye.define({combine:n=>n.some(e=>e)});function yQ(n){let e=[X4];return n&&n.fixed===!1&&e.push(jO.of(!0)),e}const X4=pi.fromClass(class{constructor(n){this.view=n,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(Eo).map(e=>new Q1(n,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!n.state.facet(jO),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,i=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(i<(t.to-t.from)*.8)}n.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(jO)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&this.dom.remove();let t=Qt.iter(this.view.state.facet(ec),this.view.viewport.from),i=[],r=this.gutters.map(s=>new T4(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(s.type)){let l=!0;for(let o of s.type)if(o.type==Ht.Text&&l){FO(t,i,o.from);for(let f of r)f.line(this.view,o,i);l=!1}else if(o.widget)for(let f of r)f.widget(this.view,o)}else if(s.type==Ht.Text){FO(t,i,s.from);for(let l of r)l.line(this.view,s,i)}else if(s.widget)for(let l of r)l.widget(this.view,s);for(let s of r)s.finish();n&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(n){let e=n.startState.facet(Eo),t=n.state.facet(Eo),i=n.docChanged||n.heightChanged||n.viewportChanged||!Qt.eq(n.startState.facet(ec),n.state.facet(ec),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let r of this.gutters)r.update(n)&&(i=!0);else{i=!0;let r=[];for(let s of t){let l=e.indexOf(s);l<0?r.push(new Q1(this.view,s)):(this.gutters[l].update(n),r.push(this.gutters[l]))}for(let s of this.gutters)s.dom.remove(),r.indexOf(s)<0&&s.destroy();for(let s of r)this.dom.appendChild(s.dom);this.gutters=r}return i}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove()}},{provide:n=>me.scrollMargins.of(e=>{let t=e.plugin(n);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==Ft.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function $1(n){return Array.isArray(n)?n:[n]}function FO(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class T4{constructor(e,t,i){this.gutter=e,this.height=i,this.i=0,this.cursor=Qt.iter(e.markers,t.from)}addElement(e,t,i){let{gutter:r}=this,s=t.top-this.height;if(this.i==r.elements.length){let l=new vQ(e,t.height,s,i);r.elements.push(l),r.dom.appendChild(l.dom)}else r.elements[this.i].update(e,t.height,s,i);this.height=t.bottom,this.i++}line(e,t,i){let r=[];FO(this.cursor,r,t.from),i.length&&(r=r.concat(i));let s=this.gutter.config.lineMarker(e,t,r);s&&r.unshift(s);let l=this.gutter;r.length==0&&!l.config.renderEmptyElements||this.addElement(e,t,r)}widget(e,t){let i=this.gutter.config.widgetMarker(e,t.widget,t);i&&this.addElement(e,t,[i])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Q1{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in t.domEventHandlers)this.dom.addEventListener(i,r=>{let s=r.target,l;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let f=s.getBoundingClientRect();l=(f.top+f.bottom)/2}else l=r.clientY;let o=e.lineBlockAtHeight(l-e.documentTop);t.domEventHandlers[i](e,o,r)&&r.preventDefault()});this.markers=$1(t.markers(e)),t.initialSpacer&&(this.spacer=new vQ(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=$1(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!Qt.eq(this.markers,t,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class vQ{constructor(e,t,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,i,r)}update(e,t,i,r){this.height!=t&&(this.height=t,this.dom.style.height=t/e.scaleY+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i/e.scaleY+"px":""),Z4(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let i="cm-gutterElement",r=this.dom.firstChild;for(let s=0,l=0;;){let o=l,f=ss(o,f,u)||l(o,f,u):l}return i}})}});class Dh extends Br{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function zh(n,e){return n.state.facet(yl).formatNumber(e,n.state)}const A4=Eo.compute([yl],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(R4)},lineMarker(e,t,i){return i.some(r=>r.toDOM)?null:new Dh(zh(e,e.state.doc.lineAt(t.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(yl)!=e.state.facet(yl),initialSpacer(e){return new Dh(zh(e,w1(e.state.doc.lines)))},updateSpacer(e,t){let i=zh(t.view,w1(t.view.state.doc.lines));return i==e.number?e:new Dh(i)},domEventHandlers:n.facet(yl).domEventHandlers}));function U4(n={}){return[yl.of(n),yQ(),A4]}function w1(n){let e=9;for(;e{let e=[],t=-1;for(let i of n.selection.ranges){let r=n.doc.lineAt(i.head).from;r>t&&(t=r,e.push(Y4.range(r)))}return Qt.of(e)});function q4(){return V4}function E4(n){let e;return{c(){e=_("div"),y(e,"class","mzn-editor svelte-1fycn7h")},m(t,i){V(t,e,i),n[7](e)},p:We,i:We,o:We,d(t){t&&Y(e),n[7](null)}}}function M4(n,e,t){let{state:i}=e,r,s;Nc(()=>{t(6,s=new me({parent:r})),s.focus()});function l(){return s||null}function o(){return s?s.state:null}async function f(O){s&&(await lr(),s.dispatch({selection:{anchor:O}}))}function u(){s.focus()}function h(O){Dt[O?"unshift":"push"](()=>{r=O,t(0,r)})}return n.$$set=O=>{"state"in O&&t(1,i=O.state)},n.$$.update=()=>{n.$$.dirty&66&&s&&i&&s.state!==i&&s.setState(i)},[r,i,l,o,f,u,s,h]}class D4 extends Vi{constructor(e){super(),Yi(this,e,M4,E4,Ui,{state:1,getView:2,getState:3,setCursor:4,focus:5})}get getView(){return this.$$.ctx[2]}get getState(){return this.$$.ctx[3]}get setCursor(){return this.$$.ctx[4]}get focus(){return this.$$.ctx[5]}}var qn=typeof window<"u"?window:null,Wd=qn===null,Jo=Wd?void 0:qn.document,tr="addEventListener",ir="removeEventListener",Ih="getBoundingClientRect",Qo="_a",nr="_b",Mr="_c",Zf="horizontal",rr=function(){return!1},z4=Wd?"calc":["","-webkit-","-moz-","-o-"].filter(function(n){var e=Jo.createElement("div");return e.style.cssText="width:"+n+"calc(9px)",!!e.style.length}).shift()+"calc",PQ=function(n){return typeof n=="string"||n instanceof String},y1=function(n){if(PQ(n)){var e=Jo.querySelector(n);if(!e)throw new Error("Selector "+n+" did not match a DOM element");return e}return n},Ii=function(n,e,t){var i=n[e];return i!==void 0?i:t},Rf=function(n,e,t,i){if(e){if(i==="end")return 0;if(i==="center")return n/2}else if(t){if(i==="start")return 0;if(i==="center")return n/2}return n},I4=function(n,e){var t=Jo.createElement("div");return t.className="gutter gutter-"+e,t},N4=function(n,e,t){var i={};return PQ(e)?i[n]=e:i[n]=z4+"("+e+"% - "+t+"px)",i},L4=function(n,e){var t;return t={},t[n]=e+"px",t},B4=function(n,e){if(e===void 0&&(e={}),Wd)return{};var t=n,i,r,s,l,o,f;Array.from&&(t=Array.from(t));var u=y1(t[0]),h=u.parentNode,O=getComputedStyle?getComputedStyle(h):null,p=O?O.flexDirection:null,g=Ii(e,"sizes")||t.map(function(){return 100/t.length}),b=Ii(e,"minSize",100),Q=Array.isArray(b)?b:t.map(function(){return b}),$=Ii(e,"maxSize",1/0),P=Array.isArray($)?$:t.map(function(){return $}),x=Ii(e,"expandToMin",!1),A=Ii(e,"gutterSize",10),C=Ii(e,"gutterAlign","center"),X=Ii(e,"snapOffset",30),Z=Array.isArray(X)?X:t.map(function(){return X}),I=Ii(e,"dragInterval",1),q=Ii(e,"direction",Zf),N=Ii(e,"cursor",q===Zf?"col-resize":"row-resize"),z=Ii(e,"gutter",I4),ie=Ii(e,"elementStyle",N4),ue=Ii(e,"gutterStyle",L4);q===Zf?(i="width",r="clientX",s="left",l="right",o="clientWidth"):q==="vertical"&&(i="height",r="clientY",s="top",l="bottom",o="clientHeight");function $e(K,H,le,se){var Ke=ie(i,H,le,se);Object.keys(Ke).forEach(function(Fe){K.style[Fe]=Ke[Fe]})}function Se(K,H,le){var se=ue(i,H,le);Object.keys(se).forEach(function(Ke){K.style[Ke]=se[Ke]})}function Te(){return f.map(function(K){return K.size})}function pe(K){return"touches"in K?K.touches[0][r]:K[r]}function fe(K){var H=f[this.a],le=f[this.b],se=H.size+le.size;H.size=K/this.size*se,le.size=se-K/this.size*se,$e(H.element,H.size,this[nr],H.i),$e(le.element,le.size,this[Mr],le.i)}function Ae(K){var H,le=f[this.a],se=f[this.b];this.dragging&&(H=pe(K)-this.start+(this[nr]-this.dragOffset),I>1&&(H=Math.round(H/I)*I),H<=le.minSize+le.snapOffset+this[nr]?H=le.minSize+this[nr]:H>=this.size-(se.minSize+se.snapOffset+this[Mr])&&(H=this.size-(se.minSize+this[Mr])),H>=le.maxSize-le.snapOffset+this[nr]?H=le.maxSize+this[nr]:H<=this.size-(se.maxSize-se.snapOffset+this[Mr])&&(H=this.size-(se.maxSize+this[Mr])),fe.call(this,H),Ii(e,"onDrag",rr)(Te()))}function xe(){var K=f[this.a].element,H=f[this.b].element,le=K[Ih](),se=H[Ih]();this.size=le[i]+se[i]+this[nr]+this[Mr],this.start=le[s],this.end=le[l]}function Ce(K){if(!getComputedStyle)return null;var H=getComputedStyle(K);if(!H)return null;var le=K[o];return le===0?null:(q===Zf?le-=parseFloat(H.paddingLeft)+parseFloat(H.paddingRight):le-=parseFloat(H.paddingTop)+parseFloat(H.paddingBottom),le)}function Me(K){var H=Ce(h);if(H===null||Q.reduce(function(Fe,ut){return Fe+ut},0)>H)return K;var le=0,se=[],Ke=K.map(function(Fe,ut){var ht=H*Fe/100,ci=Rf(A,ut===0,ut===K.length-1,C),Xe=Q[ut]+ci;return ht0&&se[ut]-le>0){var ci=Math.min(le,se[ut]-le);le-=ci,ht=Fe-ci}return ht/H*100})}function yt(){var K=this,H=f[K.a].element,le=f[K.b].element;K.dragging&&Ii(e,"onDragEnd",rr)(Te()),K.dragging=!1,qn[ir]("mouseup",K.stop),qn[ir]("touchend",K.stop),qn[ir]("touchcancel",K.stop),qn[ir]("mousemove",K.move),qn[ir]("touchmove",K.move),K.stop=null,K.move=null,H[ir]("selectstart",rr),H[ir]("dragstart",rr),le[ir]("selectstart",rr),le[ir]("dragstart",rr),H.style.userSelect="",H.style.webkitUserSelect="",H.style.MozUserSelect="",H.style.pointerEvents="",le.style.userSelect="",le.style.webkitUserSelect="",le.style.MozUserSelect="",le.style.pointerEvents="",K.gutter.style.cursor="",K.parent.style.cursor="",Jo.body.style.cursor=""}function ni(K){if(!("button"in K&&K.button!==0)){var H=this,le=f[H.a].element,se=f[H.b].element;H.dragging||Ii(e,"onDragStart",rr)(Te()),K.preventDefault(),H.dragging=!0,H.move=Ae.bind(H),H.stop=yt.bind(H),qn[tr]("mouseup",H.stop),qn[tr]("touchend",H.stop),qn[tr]("touchcancel",H.stop),qn[tr]("mousemove",H.move),qn[tr]("touchmove",H.move),le[tr]("selectstart",rr),le[tr]("dragstart",rr),se[tr]("selectstart",rr),se[tr]("dragstart",rr),le.style.userSelect="none",le.style.webkitUserSelect="none",le.style.MozUserSelect="none",le.style.pointerEvents="none",se.style.userSelect="none",se.style.webkitUserSelect="none",se.style.MozUserSelect="none",se.style.pointerEvents="none",H.gutter.style.cursor=N,H.parent.style.cursor=N,Jo.body.style.cursor=N,xe.call(H),H.dragOffset=pe(K)-H.end}}g=Me(g);var xt=[];f=t.map(function(K,H){var le={element:y1(K),size:g[H],minSize:Q[H],maxSize:P[H],snapOffset:Z[H],i:H},se;if(H>0&&(se={a:H-1,b:H,dragging:!1,direction:q,parent:h},se[nr]=Rf(A,H-1===0,!1,C),se[Mr]=Rf(A,!1,H===t.length-1,C),p==="row-reverse"||p==="column-reverse")){var Ke=se.a;se.a=se.b,se.b=Ke}if(H>0){var Fe=z(H,q,le.element);Se(Fe,A,H),se[Qo]=ni.bind(se),Fe[tr]("mousedown",se[Qo]),Fe[tr]("touchstart",se[Qo]),h.insertBefore(Fe,le.element),se.gutter=Fe}return $e(le.element,le.size,Rf(A,H===0,H===t.length-1,C),H),H>0&&xt.push(se),le});function It(K){var H=K.i===xt.length,le=H?xt[K.i-1]:xt[K.i];xe.call(le);var se=H?le.size-K.minSize-le[Mr]:K.minSize+le[nr];fe.call(le,se)}f.forEach(function(K){var H=K.element[Ih]()[i];H0){var Ke=xt[se-1],Fe=f[Ke.a],ut=f[Ke.b];Fe.size=H[se-1],ut.size=le,$e(Fe.element,Fe.size,Ke[nr],Fe.i),$e(ut.element,ut.size,Ke[Mr],ut.i)}})}function ve(K,H){xt.forEach(function(le){if(H!==!0?le.parent.removeChild(le.gutter):(le.gutter[ir]("mousedown",le[Qo]),le.gutter[ir]("touchstart",le[Qo])),K!==!0){var se=ie(i,le.a.size,le[nr]);Object.keys(se).forEach(function(Ke){f[le.a].element.style[Ke]="",f[le.b].element.style[Ke]=""})}})}return{setSizes:Nt,getSizes:Te,collapse:function(H){It(f[H])},destroy:ve,parent:h,pairs:xt}};const j4=n=>({}),v1=n=>({}),F4=n=>({}),P1=n=>({});function G4(n){let e,t,i,r,s;const l=n[6].panelA,o=an(l,n,n[5],P1),f=n[6].panelB,u=an(f,n,n[5],v1);return{c(){e=_("div"),t=_("div"),o&&o.c(),i=L(),r=_("div"),u&&u.c(),y(t,"class","split-panel svelte-e8t4e8"),ae(t,"no-splitter",n[1]!=="all"),ae(t,"is-hidden",!Af("a",n[1])),y(r,"class","split-panel svelte-e8t4e8"),ae(r,"no-splitter",n[1]!=="all"),ae(r,"is-hidden",!Af("b",n[1])),y(e,"class","split svelte-e8t4e8"),ae(e,"horizontal",n[0]==="horizontal")},m(h,O){V(h,e,O),v(e,t),o&&o.m(t,null),n[7](t),v(e,i),v(e,r),u&&u.m(r,null),n[8](r),s=!0},p(h,[O]){o&&o.p&&(!s||O&32)&&cn(o,l,h,h[5],s?fn(l,h[5],O,F4):un(h[5]),P1),(!s||O&2)&&ae(t,"no-splitter",h[1]!=="all"),(!s||O&2)&&ae(t,"is-hidden",!Af("a",h[1])),u&&u.p&&(!s||O&32)&&cn(u,f,h,h[5],s?fn(f,h[5],O,j4):un(h[5]),v1),(!s||O&2)&&ae(r,"no-splitter",h[1]!=="all"),(!s||O&2)&&ae(r,"is-hidden",!Af("b",h[1])),(!s||O&1)&&ae(e,"horizontal",h[0]==="horizontal")},i(h){s||(D(o,h),D(u,h),s=!0)},o(h){F(o,h),F(u,h),s=!1},d(h){h&&Y(e),o&&o.d(h),n[7](null),u&&u.d(h),n[8](null)}}}function Af(n,e){return e==="all"||e===n}function H4(n,e,t){let{$$slots:i={},$$scope:r}=e,{direction:s="horizontal"}=e,{split:l=50}=e,{showPanels:o="all"}=e,f,u,h=null;function O($,P){p(),P==="all"&&f&&u&&(h=B4([f,u],{direction:$,minSize:0,sizes:[l,100-l],onDragEnd(x){t(4,l=x[0])}}))}function p(){h&&(h.destroy(),h=null)}function g($){h&&h.getSizes()[0]!==$&&h.setSizes([$,100-$])}Nc(()=>(O(s,o),p));function b($){Dt[$?"unshift":"push"](()=>{f=$,t(2,f)})}function Q($){Dt[$?"unshift":"push"](()=>{u=$,t(3,u)})}return n.$$set=$=>{"direction"in $&&t(0,s=$.direction),"split"in $&&t(4,l=$.split),"showPanels"in $&&t(1,o=$.showPanels),"$$scope"in $&&t(5,r=$.$$scope)},n.$$.update=()=>{n.$$.dirty&3&&O(s,o),n.$$.dirty&16&&g(l)},[s,o,f,u,l,r,i,b,Q]}class K4 extends Vi{constructor(e){super(),Yi(this,e,H4,G4,Ui,{direction:0,split:4,showPanels:1})}}const Uf=parseFloat;function GO(n,e=";"){let t;if(Array.isArray(n))t=n.filter(i=>i);else{t=[];for(const i in n)n[i]&&t.push(`${i}:${n[i]}`)}return t.join(e)}function J4(n,e,t,i){let r,s;const l="1em";let o,f,u,h="-.125em";const O="visible";return i&&(u="center",s="1.25em"),t&&(r=t),e&&(e=="lg"?(f="1.33333em",o=".75em",h="-.225em"):e=="xs"?f=".75em":e=="sm"?f=".875em":f=e.replace("x","em")),GO([GO({float:r,width:s,height:l,"line-height":o,"font-size":f,"text-align":u,"vertical-align":h,"transform-origin":"center",overflow:O}),n])}function eC(n,e,t,i,r,s=1,l="",o=""){let f=1,u=1;return r&&(r=="horizontal"?f=-1:r=="vertical"?u=-1:f=u=-1),GO([`translate(${Uf(e)*s}${l},${Uf(t)*s}${l})`,`scale(${f*Uf(n)},${u*Uf(n)})`,i&&`rotate(${i}${o})`]," ")}function k1(n){let e,t,i,r,s,l,o,f;function u(p,g){return typeof p[10][4]=="string"?iC:tC}let h=u(n),O=h(n);return{c(){e=Wl("svg"),t=Wl("g"),i=Wl("g"),O.c(),y(i,"transform",n[12]),y(t,"transform",r="translate("+n[10][0]/2+" "+n[10][1]/2+")"),y(t,"transform-origin",s=n[10][0]/4+" 0"),y(e,"id",l=n[1]||void 0),y(e,"class",o="svelte-fa "+n[0]+" svelte-1cj2gr0"),y(e,"style",n[11]),y(e,"viewBox",f="0 0 "+n[10][0]+" "+n[10][1]),y(e,"aria-hidden","true"),y(e,"role","img"),y(e,"xmlns","http://www.w3.org/2000/svg"),ae(e,"pulse",n[4]),ae(e,"spin",n[3])},m(p,g){V(p,e,g),v(e,t),v(t,i),O.m(i,null)},p(p,g){h===(h=u(p))&&O?O.p(p,g):(O.d(1),O=h(p),O&&(O.c(),O.m(i,null))),g&4096&&y(i,"transform",p[12]),g&1024&&r!==(r="translate("+p[10][0]/2+" "+p[10][1]/2+")")&&y(t,"transform",r),g&1024&&s!==(s=p[10][0]/4+" 0")&&y(t,"transform-origin",s),g&2&&l!==(l=p[1]||void 0)&&y(e,"id",l),g&1&&o!==(o="svelte-fa "+p[0]+" svelte-1cj2gr0")&&y(e,"class",o),g&2048&&y(e,"style",p[11]),g&1024&&f!==(f="0 0 "+p[10][0]+" "+p[10][1])&&y(e,"viewBox",f),g&17&&ae(e,"pulse",p[4]),g&9&&ae(e,"spin",p[3])},d(p){p&&Y(e),O.d()}}}function tC(n){let e,t,i,r,s,l,o,f,u,h;return{c(){e=Wl("path"),l=Wl("path"),y(e,"d",t=n[10][4][0]),y(e,"fill",i=n[6]||n[2]||"currentColor"),y(e,"fill-opacity",r=n[9]!=!1?n[7]:n[8]),y(e,"transform",s="translate("+n[10][0]/-2+" "+n[10][1]/-2+")"),y(l,"d",o=n[10][4][1]),y(l,"fill",f=n[5]||n[2]||"currentColor"),y(l,"fill-opacity",u=n[9]!=!1?n[8]:n[7]),y(l,"transform",h="translate("+n[10][0]/-2+" "+n[10][1]/-2+")")},m(O,p){V(O,e,p),V(O,l,p)},p(O,p){p&1024&&t!==(t=O[10][4][0])&&y(e,"d",t),p&68&&i!==(i=O[6]||O[2]||"currentColor")&&y(e,"fill",i),p&896&&r!==(r=O[9]!=!1?O[7]:O[8])&&y(e,"fill-opacity",r),p&1024&&s!==(s="translate("+O[10][0]/-2+" "+O[10][1]/-2+")")&&y(e,"transform",s),p&1024&&o!==(o=O[10][4][1])&&y(l,"d",o),p&36&&f!==(f=O[5]||O[2]||"currentColor")&&y(l,"fill",f),p&896&&u!==(u=O[9]!=!1?O[8]:O[7])&&y(l,"fill-opacity",u),p&1024&&h!==(h="translate("+O[10][0]/-2+" "+O[10][1]/-2+")")&&y(l,"transform",h)},d(O){O&&(Y(e),Y(l))}}}function iC(n){let e,t,i,r;return{c(){e=Wl("path"),y(e,"d",t=n[10][4]),y(e,"fill",i=n[2]||n[5]||"currentColor"),y(e,"transform",r="translate("+n[10][0]/-2+" "+n[10][1]/-2+")")},m(s,l){V(s,e,l)},p(s,l){l&1024&&t!==(t=s[10][4])&&y(e,"d",t),l&36&&i!==(i=s[2]||s[5]||"currentColor")&&y(e,"fill",i),l&1024&&r!==(r="translate("+s[10][0]/-2+" "+s[10][1]/-2+")")&&y(e,"transform",r)},d(s){s&&Y(e)}}}function nC(n){let e,t=n[10][4]&&k1(n);return{c(){t&&t.c(),e=fi()},m(i,r){t&&t.m(i,r),V(i,e,r)},p(i,[r]){i[10][4]?t?t.p(i,r):(t=k1(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:We,o:We,d(i){i&&Y(e),t&&t.d(i)}}}function rC(n,e,t){let{class:i=""}=e,{id:r=""}=e,{style:s=""}=e,{icon:l}=e,{size:o=""}=e,{color:f=""}=e,{fw:u=!1}=e,{pull:h=""}=e,{scale:O=1}=e,{translateX:p=0}=e,{translateY:g=0}=e,{rotate:b=""}=e,{flip:Q=!1}=e,{spin:$=!1}=e,{pulse:P=!1}=e,{primaryColor:x=""}=e,{secondaryColor:A=""}=e,{primaryOpacity:C=1}=e,{secondaryOpacity:X=.4}=e,{swapOpacity:Z=!1}=e,I,q,N;return n.$$set=z=>{"class"in z&&t(0,i=z.class),"id"in z&&t(1,r=z.id),"style"in z&&t(13,s=z.style),"icon"in z&&t(14,l=z.icon),"size"in z&&t(15,o=z.size),"color"in z&&t(2,f=z.color),"fw"in z&&t(16,u=z.fw),"pull"in z&&t(17,h=z.pull),"scale"in z&&t(18,O=z.scale),"translateX"in z&&t(19,p=z.translateX),"translateY"in z&&t(20,g=z.translateY),"rotate"in z&&t(21,b=z.rotate),"flip"in z&&t(22,Q=z.flip),"spin"in z&&t(3,$=z.spin),"pulse"in z&&t(4,P=z.pulse),"primaryColor"in z&&t(5,x=z.primaryColor),"secondaryColor"in z&&t(6,A=z.secondaryColor),"primaryOpacity"in z&&t(7,C=z.primaryOpacity),"secondaryOpacity"in z&&t(8,X=z.secondaryOpacity),"swapOpacity"in z&&t(9,Z=z.swapOpacity)},n.$$.update=()=>{n.$$.dirty&16384&&t(10,I=l&&l.icon||[0,0,"",[],""]),n.$$.dirty&237568&&t(11,q=J4(s,o,h,u)),n.$$.dirty&8126464&&t(12,N=eC(O,p,g,b,Q,512))},[i,r,f,$,P,x,A,C,X,Z,I,q,N,s,l,o,u,h,O,p,g,b,Q]}class sC extends Vi{constructor(e){super(),Yi(this,e,rC,nC,Ui,{class:0,id:1,style:13,icon:14,size:15,color:2,fw:16,pull:17,scale:18,translateX:19,translateY:20,rotate:21,flip:22,spin:3,pulse:4,primaryColor:5,secondaryColor:6,primaryOpacity:7,secondaryOpacity:8,swapOpacity:9})}}const _t=sC;var HO={prefix:"fas",iconName:"lock",icon:[448,512,[128274],"f023","M144 144v48H304V144c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192V144C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64H80z"]},kQ={prefix:"fas",iconName:"share-nodes",icon:[448,512,["share-alt"],"f1e0","M352 224c53 0 96-43 96-96s-43-96-96-96s-96 43-96 96c0 4 .2 8 .7 11.9l-94.1 47C145.4 170.2 121.9 160 96 160c-53 0-96 43-96 96s43 96 96 96c25.9 0 49.4-10.2 66.6-26.9l94.1 47c-.5 3.9-.7 7.8-.7 11.9c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-25.9 0-49.4 10.2-66.6 26.9l-94.1-47c.5-3.9 .7-7.8 .7-11.9s-.2-8-.7-11.9l94.1-47C302.6 213.8 326.1 224 352 224z"]},_1={prefix:"fas",iconName:"eye-slash",icon:[640,512,[],"f070","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z"]},lC={prefix:"fas",iconName:"shuffle",icon:[512,512,[128256,"random"],"f074","M403.8 34.4c12-5 25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6V160H352c-10.1 0-19.6 4.7-25.6 12.8L284 229.3 244 176l31.2-41.6C293.3 110.2 321.8 96 352 96h32V64c0-12.9 7.8-24.6 19.8-29.6zM164 282.7L204 336l-31.2 41.6C154.7 401.8 126.2 416 96 416H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H96c10.1 0 19.6-4.7 25.6-12.8L164 282.7zm274.6 188c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6V416H352c-30.2 0-58.7-14.2-76.8-38.4L121.6 172.8c-6-8.1-15.5-12.8-25.6-12.8H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H96c30.2 0 58.7 14.2 76.8 38.4L326.4 339.2c6 8.1 15.5 12.8 25.6 12.8h32V320c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64z"]},oC={prefix:"fas",iconName:"clipboard",icon:[384,512,[128203],"f328","M192 0c-41.8 0-77.4 26.7-90.5 64H64C28.7 64 0 92.7 0 128V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V128c0-35.3-28.7-64-64-64H282.5C269.4 26.7 233.8 0 192 0zm0 64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM112 192H272c8.8 0 16 7.2 16 16s-7.2 16-16 16H112c-8.8 0-16-7.2-16-16s7.2-16 16-16z"]},_Q={prefix:"fas",iconName:"arrow-up-right-from-square",icon:[512,512,["external-link"],"f08e","M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32h82.7L201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3V192c0 17.7 14.3 32 32 32s32-14.3 32-32V32c0-17.7-14.3-32-32-32H320zM80 32C35.8 32 0 67.8 0 112V432c0 44.2 35.8 80 80 80H400c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32V432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H192c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z"]},W1={prefix:"fas",iconName:"lock-open",icon:[576,512,[],"f3c1","M352 144c0-44.2 35.8-80 80-80s80 35.8 80 80v48c0 17.7 14.3 32 32 32s32-14.3 32-32V144C576 64.5 511.5 0 432 0S288 64.5 288 144v48H64c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V256c0-35.3-28.7-64-64-64H352V144z"]},aC={prefix:"fas",iconName:"forward-fast",icon:[512,512,[9197,"fast-forward"],"f050","M18.4 445c11.2 5.3 24.5 3.6 34.1-4.4L224 297.7V416c0 12.4 7.2 23.7 18.4 29s24.5 3.6 34.1-4.4L448 297.7V416c0 17.7 14.3 32 32 32s32-14.3 32-32V96c0-17.7-14.3-32-32-32s-32 14.3-32 32V214.3L276.5 71.4c-9.5-7.9-22.8-9.7-34.1-4.4S224 83.6 224 96V214.3L52.5 71.4c-9.5-7.9-22.8-9.7-34.1-4.4S0 83.6 0 96V416c0 12.4 7.2 23.7 18.4 29z"]},x1={prefix:"fas",iconName:"eye",icon:[576,512,[128065],"f06e","M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"]},WQ={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"]},fC={prefix:"fas",iconName:"gear",icon:[512,512,[9881,"cog"],"f013","M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"]},xQ=fC,cC={prefix:"fas",iconName:"folder-tree",icon:[576,512,[],"f802","M64 32C64 14.3 49.7 0 32 0S0 14.3 0 32v96V384c0 35.3 28.7 64 64 64H256V384H64V160H256V96H64V32zM288 192c0 17.7 14.3 32 32 32H544c17.7 0 32-14.3 32-32V64c0-17.7-14.3-32-32-32H445.3c-8.5 0-16.6-3.4-22.6-9.4L409.4 9.4c-6-6-14.1-9.4-22.6-9.4H320c-17.7 0-32 14.3-32 32V192zm0 288c0 17.7 14.3 32 32 32H544c17.7 0 32-14.3 32-32V352c0-17.7-14.3-32-32-32H445.3c-8.5 0-16.6-3.4-22.6-9.4l-13.3-13.3c-6-6-14.1-9.4-22.6-9.4H320c-17.7 0-32 14.3-32 32V480z"]},uC={prefix:"fas",iconName:"download",icon:[512,512,[],"f019","M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V274.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7V32zM64 352c-35.3 0-64 28.7-64 64v32c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V416c0-35.3-28.7-64-64-64H346.5l-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352H64zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"]},hC={prefix:"fas",iconName:"stop",icon:[384,512,[9209],"f04d","M0 128C0 92.7 28.7 64 64 64H320c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z"]},OC={prefix:"fas",iconName:"angle-down",icon:[448,512,[8964],"f107","M201.4 342.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 274.7 86.6 137.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},dC={prefix:"fas",iconName:"eraser",icon:[576,512,[],"f12d","M290.7 57.4L57.4 290.7c-25 25-25 65.5 0 90.5l80 80c12 12 28.3 18.7 45.3 18.7H288h9.4H512c17.7 0 32-14.3 32-32s-14.3-32-32-32H387.9L518.6 285.3c25-25 25-65.5 0-90.5L381.3 57.4c-25-25-65.5-25-90.5 0zM297.4 416H288l-105.4 0-80-80L227.3 211.3 364.7 348.7 297.4 416z"]},pC={prefix:"fas",iconName:"play",icon:[384,512,[9654],"f04b","M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80V432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"]},CQ={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"]},XQ={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},gC={prefix:"fas",iconName:"hammer",icon:[576,512,[128296],"f6e3","M413.5 237.5c-28.2 4.8-58.2-3.6-80-25.4l-38.1-38.1C280.4 159 272 138.8 272 117.6V105.5L192.3 62c-5.3-2.9-8.6-8.6-8.3-14.7s3.9-11.5 9.5-14l47.2-21C259.1 4.2 279 0 299.2 0h18.1c36.7 0 72 14 98.7 39.1l44.6 42c24.2 22.8 33.2 55.7 26.6 86L503 183l8-8c9.4-9.4 24.6-9.4 33.9 0l24 24c9.4 9.4 9.4 24.6 0 33.9l-88 88c-9.4 9.4-24.6 9.4-33.9 0l-24-24c-9.4-9.4-9.4-24.6 0-33.9l8-8-17.5-17.5zM27.4 377.1L260.9 182.6c3.5 4.9 7.5 9.6 11.8 14l38.1 38.1c6 6 12.4 11.2 19.2 15.7L134.9 484.6c-14.5 17.4-36 27.4-58.6 27.4C34.1 512 0 477.8 0 435.7c0-22.6 10.1-44.1 27.4-58.6z"]},TQ={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"]};function mC(n){let e,t,i,r,s,l,o,f,u=n[0]&&!n[3]&&C1(n);return{c(){e=_("span"),t=be(n[1]),i=be(n[2]),r=L(),u&&u.c(),s=fi(),y(e,"class","filename svelte-1ul6ap")},m(h,O){V(h,e,O),v(e,t),v(e,i),V(h,r,O),u&&u.m(h,O),V(h,s,O),l=!0,o||(f=oe(e,"click",n[8]),o=!0)},p(h,O){(!l||O&2)&&He(t,h[1]),(!l||O&4)&&He(i,h[2]),h[0]&&!h[3]?u?(u.p(h,O),O&9&&D(u,1)):(u=C1(h),u.c(),D(u,1),u.m(s.parentNode,s)):u&&(nt(),F(u,1,1,()=>{u=null}),rt())},i(h){l||(D(u),l=!0)},o(h){F(u),l=!1},d(h){h&&(Y(e),Y(r),Y(s)),u&&u.d(h),o=!1,f()}}}function SC(n){let e,t,i,r,s;return{c(){e=_("input"),i=be(n[2]),y(e,"size",t=n[4].length||n[1].length),y(e,"placeholder",n[1])},m(l,o){V(l,e,o),n[11](e),vi(e,n[4]),V(l,i,o),r||(s=[oe(e,"input",n[12]),oe(e,"blur",n[10]),oe(e,"keyup",n[9])],r=!0)},p(l,o){o&18&&t!==(t=l[4].length||l[1].length)&&y(e,"size",t),o&2&&y(e,"placeholder",l[1]),o&16&&e.value!==l[4]&&vi(e,l[4]),o&4&&He(i,l[2])},i:We,o:We,d(l){l&&(Y(e),Y(i)),n[11](null),r=!1,ii(s)}}}function C1(n){let e,t,i,r,s;return t=new _t({props:{icon:XQ}}),{c(){e=_("span"),ze(t.$$.fragment),y(e,"class","close-tab svelte-1ul6ap")},m(l,o){V(l,e,o),qe(t,e,null),i=!0,r||(s=oe(e,"click",n[13]),r=!0)},p:We,i(l){i||(D(t.$$.fragment,l),i=!0)},o(l){F(t.$$.fragment,l),i=!1},d(l){l&&Y(e),Ee(t),r=!1,s()}}}function bC(n){let e,t,i,r,s,l;const o=[SC,mC],f=[];function u(h,O){return h[5]?0:1}return t=u(n),i=f[t]=o[t](n),{c(){e=_("a"),i.c(),y(e,"class","filename-link svelte-1ul6ap"),ae(e,"active",n[0]),ae(e,"readonly",n[3])},m(h,O){V(h,e,O),f[t].m(e,null),r=!0,s||(l=oe(e,"click",n[14]),s=!0)},p(h,[O]){let p=t;t=u(h),t===p?f[t].p(h,O):(nt(),F(f[p],1,1,()=>{f[p]=null}),rt(),i=f[t],i?i.p(h,O):(i=f[t]=o[t](h),i.c()),D(i,1),i.m(e,null)),(!r||O&1)&&ae(e,"active",h[0]),(!r||O&8)&&ae(e,"readonly",h[3])},i(h){r||(D(i),r=!0)},o(h){F(i),r=!1},d(h){h&&Y(e),f[t].d(),s=!1,l()}}}function $C(n,e,t){let{active:i=!1}=e,{name:r="Untitled"}=e,{suffix:s=".mzn"}=e,{readonly:l=!1}=e;const o=Bn();let f=!1,u,h="";async function O(){!i||l||(t(5,f=!0),t(4,h=r),await lr(),u.focus())}function p(x){x.key==="Enter"?(x.preventDefault(),g()):x.key==="Escape"&&t(5,f=!1)}function g(){t(5,f=!1),h.length>0&&o("rename",{name:h,suffix:s})}function b(x){Dt[x?"unshift":"push"](()=>{u=x,t(6,u)})}function Q(){h=this.value,t(4,h)}const $=()=>o("close"),P=()=>{f||o("click")};return n.$$set=x=>{"active"in x&&t(0,i=x.active),"name"in x&&t(1,r=x.name),"suffix"in x&&t(2,s=x.suffix),"readonly"in x&&t(3,l=x.readonly)},n.$$.update=()=>{n.$$.dirty&16&&/[\/\\\.]/.test(h)&&t(4,h=h.replaceAll(/[\/\\\.]/g,""))},[i,r,s,l,h,f,u,o,O,p,g,b,Q,$,P]}class QC extends Vi{constructor(e){super(),Yi(this,e,$C,bC,Ui,{active:0,name:1,suffix:2,readonly:3})}}function ZQ(n){const e=n-1;return e*e*e+1}function wC(n,{from:e,to:t},i={}){const r=getComputedStyle(n),s=r.transform==="none"?"":r.transform,[l,o]=r.transformOrigin.split(" ").map(parseFloat),f=e.left+e.width*l/t.width-(t.left+l),u=e.top+e.height*o/t.height-(t.top+o),{delay:h=0,duration:O=g=>Math.sqrt(g)*120,easing:p=ZQ}=i;return{delay:h,duration:Ic(O)?O(Math.sqrt(f*f+u*u)):O,easing:p,css:(g,b)=>{const Q=b*f,$=b*u,P=g+b*e.width/t.width,x=g+b*e.height/t.height;return`transform: ${s} translate(${Q}px, ${$}px) scale(${P}, ${x});`}}}function X1(n,e,t){const i=n.slice();return i[19]=e[t],i}function T1(n,e){let t,i,r,s=We,l,o,f;function u(){return e[11](e[19])}function h(...b){return e[12](e[19],...b)}function O(...b){return e[13](e[19],...b)}i=new QC({props:{name:e[19].stem,suffix:e[19].suffix,active:e[0]===e[19].index,readonly:e[1]||e[19].readonlyTab}}),i.$on("click",u),i.$on("rename",h),i.$on("close",O);function p(...b){return e[14](e[19],...b)}function g(...b){return e[15](e[19],...b)}return{key:n,first:null,c(){t=_("li"),ze(i.$$.fragment),y(t,"draggable",!0),ae(t,"is-active",e[0]===e[19].index),this.first=t},m(b,Q){V(b,t,Q),qe(i,t,null),l=!0,o||(f=[oe(t,"dragstart",p),oe(t,"dragover",e[7]),oe(t,"drop",g)],o=!0)},p(b,Q){e=b;const $={};Q&4&&($.name=e[19].stem),Q&4&&($.suffix=e[19].suffix),Q&5&&($.active=e[0]===e[19].index),Q&6&&($.readonly=e[1]||e[19].readonlyTab),i.$set($),(!l||Q&5)&&ae(t,"is-active",e[0]===e[19].index)},r(){r=t.getBoundingClientRect()},f(){Yx(t),s()},a(){s(),s=Ux(t,r,wC,{duration:200})},i(b){l||(D(i.$$.fragment,b),l=!0)},o(b){F(i.$$.fragment,b),l=!1},d(b){b&&Y(t),Ee(i),o=!1,ii(f)}}}function Z1(n){let e,t,i,r,s,l,o,f,u,h,O,p;return r=new _t({props:{icon:CQ}}),u=new _t({props:{icon:cC}}),{c(){e=_("li"),t=_("a"),i=_("span"),ze(r.$$.fragment),s=L(),l=_("li"),o=_("button"),f=_("span"),ze(u.$$.fragment),y(i,"class","icon add-icon svelte-7ub6h4"),y(t,"title","Add new file"),y(f,"class","icon"),y(o,"class","button is-small"),y(o,"title","Manage files"),y(l,"class","right svelte-7ub6h4")},m(g,b){V(g,e,b),v(e,t),v(t,i),qe(r,i,null),V(g,s,b),V(g,l,b),v(l,o),v(o,f),qe(u,f,null),h=!0,O||(p=[oe(t,"click",n[16]),oe(o,"click",n[17])],O=!0)},p:We,i(g){h||(D(r.$$.fragment,g),D(u.$$.fragment,g),h=!0)},o(g){F(r.$$.fragment,g),F(u.$$.fragment,g),h=!1},d(g){g&&(Y(e),Y(s),Y(l)),Ee(r),Ee(u),O=!1,ii(p)}}}function yC(n){let e,t,i=[],r=new Map,s,l,o=st(n[2]);const f=h=>h[19].name;for(let h=0;h{u=null}),rt()):u?(u.p(h,O),O&2&&D(u,1)):(u=Z1(h),u.c(),D(u,1),u.m(t,null))},i(h){if(!l){for(let O=0;Of(Z.index),$=(Z,I)=>u(I,Z.index),P=(Z,I)=>b(Z.index),x=(Z,I)=>O(I,Z.index),A=(Z,I)=>g(I,Z.index),C=()=>o("newFile"),X=()=>o("manageFiles");return n.$$set=Z=>{"files"in Z&&t(10,r=Z.files),"currentIndex"in Z&&t(0,s=Z.currentIndex),"readonly"in Z&&t(1,l=Z.readonly)},n.$$.update=()=>{n.$$.dirty&1024&&t(2,i=r.map((Z,I)=>{const q=Z.name.endsWith(".mzc.mzn")?Z.name.length-8:Z.name.lastIndexOf(".");return{...Z,stem:Z.name.substring(0,q),suffix:Z.name.substring(q),index:I}}).filter(Z=>!Z.hidden))},[s,l,i,o,f,u,O,p,g,b,r,Q,$,P,x,A,C,X]}class PC extends Vi{constructor(e){super(),Yi(this,e,vC,yC,Ui,{files:10,currentIndex:0,readonly:1})}}function R1(n,{delay:e=0,duration:t=400,easing:i=dd}={}){const r=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:s=>`opacity: ${s*r}`}}function gc(n,{delay:e=0,duration:t=400,easing:i=ZQ,x:r=0,y:s=0,opacity:l=0}={}){const o=getComputedStyle(n),f=+o.opacity,u=o.transform==="none"?"":o.transform,h=f*(1-l),[O,p]=um(r),[g,b]=um(s);return{delay:e,duration:t,easing:i,css:(Q,$)=>` +}`,O=`__svelte_${Zx(h)}_${o}`,p=jb(n),{stylesheet:g,rules:b}=oc.get(p)||Rx(p,n);b[O]||(b[O]=!0,g.insertRule(`@keyframes ${O} ${h}`,g.cssRules.length));const Q=n.style.animation||"";return n.style.animation=`${Q?`${Q}, `:""}${O} ${i}ms linear ${r}ms 1 both`,ac+=1,O}function Hb(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?s=>s.indexOf(e)<0:s=>s.indexOf("__svelte")===-1),r=t.length-i.length;r&&(n.style.animation=i.join(", "),ac-=r,ac||Ax())}function Ax(){md(()=>{ac||(oc.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&Y(e)}),oc.clear())})}function Ux(n,e,t,i){if(!e)return We;const r=n.getBoundingClientRect();if(e.left===r.left&&e.right===r.right&&e.top===r.top&&e.bottom===r.bottom)return We;const{delay:s=0,duration:l=300,easing:o=gd,start:f=Nb()+s,end:u=f+l,tick:h=We,css:O}=t(n,{from:e,to:r},i);let p=!0,g=!1,b;function Q(){O&&(b=dO(n,0,1,l,s,o,O)),s||(g=!0)}function $(){O&&Hb(n,b),p=!1}return Bb(P=>{if(!g&&P>=f&&(g=!0),g&&P>=u&&(h(1,0),$()),!p)return!1;if(g){const x=P-f,A=0+1*o(x/l);h(A,1-A)}return!0}),Q(),h(0,1),$}function Yx(n){const e=getComputedStyle(n);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:i}=e,r=n.getBoundingClientRect();n.style.position="absolute",n.style.width=t,n.style.height=i,Vx(n,r)}}function Vx(n,e){const t=n.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const i=getComputedStyle(n),r=i.transform==="none"?"":i.transform;n.style.transform=`${r} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let Io;function Ao(n){Io=n}function Kb(){if(!Io)throw new Error("Function called outside component initialization");return Io}function Bc(n){Kb().$$.on_mount.push(n)}function Ln(){const n=Kb();return(e,t,{cancelable:i=!1}={})=>{const r=n.$$.callbacks[e];if(r){const s=Gb(e,t,{cancelable:i});return r.slice().forEach(l=>{l.call(n,s)}),!s.defaultPrevented}return!0}}function pm(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const $l=[],Dt=[];let Cl=[];const pO=[],Jb=Promise.resolve();let gO=!1;function e$(){gO||(gO=!0,Jb.then(t$))}function rr(){return e$(),Jb}function lr(n){Cl.push(n)}function Uo(n){pO.push(n)}const Th=new Set;let Sl=0;function t$(){if(Sl!==0)return;const n=Io;do{try{for(;Sl<$l.length;){const e=$l[Sl];Sl++,Ao(e),qx(e.$$)}}catch(e){throw $l.length=0,Sl=0,e}for(Ao(null),$l.length=0,Sl=0;Dt.length;)Dt.pop()();for(let e=0;en.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),Cl=e}let bo;function Mx(){return bo||(bo=Promise.resolve(),bo.then(()=>{bo=null})),bo}function Zh(n,e,t){n.dispatchEvent(Gb(`${e?"intro":"outro"}${t}`))}const jf=new Set;let Nr;function nt(){Nr={r:0,c:[],p:Nr}}function rt(){Nr.r||ti(Nr.c),Nr=Nr.p}function D(n,e){n&&n.i&&(jf.delete(n),n.i(e))}function F(n,e,t,i){if(n&&n.o){if(jf.has(n))return;jf.add(n),Nr.c.push(()=>{jf.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const Dx={duration:0};function yl(n,e,t,i){let s=e(n,t,{direction:"both"}),l=i?0:1,o=null,f=null,u=null,h;function O(){u&&Hb(n,u)}function p(b,Q){const $=b.b-l;return Q*=Math.abs($),{a:l,b:b.b,d:$,duration:Q,start:b.start,end:b.start+Q,group:b.group}}function g(b){const{delay:Q=0,duration:$=300,easing:P=gd,tick:x=We,css:A}=s||Dx,C={start:Nb()+Q,b};b||(C.group=Nr,Nr.r+=1),"inert"in n&&(b?h!==void 0&&(n.inert=h):(h=n.inert,n.inert=!0)),o||f?f=C:(A&&(O(),u=dO(n,l,b,$,Q,P,A)),b&&x(0,1),o=p(C,$),lr(()=>Zh(n,b,"start")),Bb(X=>{if(f&&X>f.start&&(o=p(f,$),f=null,Zh(n,o.b,"start"),A&&(O(),u=dO(n,l,o.b,o.duration,0,P,s.css))),o){if(X>=o.end)x(l=o.b,1-l),Zh(n,o.b,"end"),f||(o.b?O():--o.group.r||ti(o.group.c)),o=null;else if(X>=o.start){const Z=X-o.start;l=o.a+o.d*P(Z/o.duration),x(l,1-l)}}return!!(o||f)}))}return{run(b){Lc(s)?Mx().then(()=>{s=s({direction:b?"in":"out"}),g(b)}):g(b)},end(){O(),o=f=null}}}function ot(n){return(n==null?void 0:n.length)!==void 0?n:Array.from(n)}function zx(n,e){F(n,1,1,()=>{e.delete(n.key)})}function Ix(n,e){n.f(),zx(n,e)}function Nx(n,e,t,i,r,s,l,o,f,u,h,O){let p=n.length,g=s.length,b=p;const Q={};for(;b--;)Q[n[b].key]=b;const $=[],P=new Map,x=new Map,A=[];for(b=g;b--;){const I=O(r,s,b),q=t(I);let L=l.get(q);L?i&&A.push(()=>L.p(I,e)):(L=u(q,I),L.c()),P.set(q,$[b]=L),q in Q&&x.set(q,Math.abs(b-Q[q]))}const C=new Set,X=new Set;function Z(I){D(I,1),I.m(o,h),l.set(I.key,I),h=I.first,g--}for(;p&&g;){const I=$[g-1],q=n[p-1],L=I.key,z=q.key;I===q?(h=I.first,p--,g--):P.has(z)?!l.has(L)||C.has(L)?Z(I):X.has(z)?p--:x.get(L)>x.get(z)?(X.add(L),Z(I)):(C.add(z),p--):(f(q,l),p--)}for(;p--;){const I=n[p];P.has(I.key)||f(I,l)}for(;g;)Z($[g-1]);return ti(A),$}function Yo(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function De(n){n&&n.c()}function Ve(n,e,t){const{fragment:i,after_update:r}=n.$$;i&&i.m(e,t),lr(()=>{const s=n.$$.on_mount.map(Db).filter(Lc);n.$$.on_destroy?n.$$.on_destroy.push(...s):ti(s),n.$$.on_mount=[]}),r.forEach(lr)}function qe(n,e){const t=n.$$;t.fragment!==null&&(Ex(t.after_update),ti(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Lx(n,e){n.$$.dirty[0]===-1&&($l.push(n),e$(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const b=g.length?g[0]:p;return u.ctx&&r(u.ctx[O],u.ctx[O]=b)&&(!u.skip_bound&&u.bound[O]&&u.bound[O](b),h&&Lx(n,O)),p}):[],u.update(),h=!0,ti(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const O=Xx(e.target);u.fragment&&u.fragment.l(O),O.forEach(Y)}else u.fragment&&u.fragment.c();e.intro&&D(n.$$.fragment),Ve(n,e.target,e.anchor),t$()}Ao(f)}class Ui{constructor(){Xh(this,"$$");Xh(this,"$$set")}$destroy(){qe(this,1),this.$destroy=We}$on(e,t){if(!Lc(t))return We;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const r=i.indexOf(t);r!==-1&&i.splice(r,1)}}$set(e){this.$$set&&!_x(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Bx="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Bx);const jx="modulepreload",Fx=function(n,e){return new URL(n,e).href},gm={},mm=function(e,t,i){if(!t||t.length===0)return e();const r=document.getElementsByTagName("link");return Promise.all(t.map(s=>{if(s=Fx(s,i),s in gm)return;gm[s]=!0;const l=s.endsWith(".css"),o=l?'[rel="stylesheet"]':"";if(!!i)for(let h=r.length-1;h>=0;h--){const O=r[h];if(O.href===s&&(!l||O.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${o}`))return;const u=document.createElement("link");if(u.rel=l?"stylesheet":jx,l||(u.as="script",u.crossOrigin=""),u.href=s,document.head.appendChild(u),l)return new Promise((h,O)=>{u.addEventListener("load",h),u.addEventListener("error",()=>O(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e()).catch(s=>{const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s})};class St{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),Qr.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let i=[];return this.decompose(e,t,i,0),Qr.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new Vo(this),s=new Vo(e);for(let l=t,o=t;;){if(r.next(l),s.next(l),l=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(o+=r.value.length,r.done||o>=i)return!0}}iter(e=1){return new Vo(this,e)}iterRange(e,t=this.length){return new i$(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new n$(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?St.empty:e.length<=32?new ai(e):Qr.from(ai.split(e,[]))}}class ai extends St{constructor(e,t=Gx(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let s=0;;s++){let l=this.text[s],o=r+l.length;if((t?i:o)>=e)return new Hx(r,o,i,l);r=o+1,i++}}decompose(e,t,i,r){let s=e<=0&&t>=this.length?this:new ai(Sm(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let l=i.pop(),o=Ff(s.text,l.text.slice(),0,s.length);if(o.length<=32)i.push(new ai(o,l.length+s.length));else{let f=o.length>>1;i.push(new ai(o.slice(0,f)),new ai(o.slice(f)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof ai))return super.replace(e,t,i);let r=Ff(this.text,Ff(i.text,Sm(this.text,0,e)),t),s=this.length+i.length-(t-e);return r.length<=32?new ai(r,s):Qr.from(ai.split(r,[]),s)}sliceString(e,t=this.length,i=` +`){let r="";for(let s=0,l=0;s<=t&&le&&l&&(r+=i),es&&(r+=o.slice(Math.max(0,e-s),t-s)),s=f+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(t.push(new ai(i,r)),i=[],r=-1);return r>-1&&t.push(new ai(i,r)),t}}class Qr extends St{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,r){for(let s=0;;s++){let l=this.children[s],o=r+l.length,f=i+l.lines-1;if((t?f:o)>=e)return l.lineInner(e,t,i,r);r=o+1,i=f+1}}decompose(e,t,i,r){for(let s=0,l=0;l<=t&&s=l){let u=r&((l<=e?1:0)|(f>=t?2:0));l>=e&&f<=t&&!u?i.push(o):o.decompose(e-l,t-l,i,u)}l=f+1}}replace(e,t,i){if(i.lines=s&&t<=o){let f=l.replace(e-s,t-s,i),u=this.lines-l.lines+f.lines;if(f.lines>5-1&&f.lines>u>>5+1){let h=this.children.slice();return h[r]=f,new Qr(h,this.length-(t-e)+i.length)}return super.replace(s,o,f)}s=o+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=` +`){let r="";for(let s=0,l=0;se&&s&&(r+=i),el&&(r+=o.sliceString(e-l,t-l,i)),l=f+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Qr))return 0;let i=0,[r,s,l,o]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,s+=t){if(r==l||s==o)return i;let f=this.children[r],u=e.children[s];if(f!=u)return i+f.scanIdentical(u,t);i+=f.length+1}}static from(e,t=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let g of e)i+=g.lines;if(i<32){let g=[];for(let b of e)b.flatten(g);return new ai(g,t)}let r=Math.max(32,i>>5),s=r<<1,l=r>>1,o=[],f=0,u=-1,h=[];function O(g){let b;if(g.lines>s&&g instanceof Qr)for(let Q of g.children)O(Q);else g.lines>l&&(f>l||!f)?(p(),o.push(g)):g instanceof ai&&f&&(b=h[h.length-1])instanceof ai&&g.lines+b.lines<=32?(f+=g.lines,u+=g.length+1,h[h.length-1]=new ai(b.text.concat(g.text),b.length+1+g.length)):(f+g.lines>r&&p(),f+=g.lines,u+=g.length+1,h.push(g))}function p(){f!=0&&(o.push(h.length==1?h[0]:Qr.from(h,u)),u=-1,f=h.length=0)}for(let g of e)O(g);return p(),o.length==1?o[0]:new Qr(o,t)}}St.empty=new ai([""],0);function Gx(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Ff(n,e,t=0,i=1e9){for(let r=0,s=0,l=!0;s=t&&(f>i&&(o=o.slice(0,i-r)),r0?1:(e instanceof ai?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],l=s>>1,o=r instanceof ai?r.text.length:r.children.length;if(l==(t>0?o:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(r instanceof ai){let f=r.text[l+(t<0?-1:0)];if(this.offsets[i]+=t,f.length>Math.max(0,e))return this.value=e==0?f:t>0?f.slice(e):f.slice(0,f.length-e),this;e-=f.length}else{let f=r.children[l+(t<0?-1:0)];e>f.length?(e-=f.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(f),this.offsets.push(t>0?1:(f instanceof ai?f.text.length:f.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class i${constructor(e,t,i){this.value="",this.done=!1,this.cursor=new Vo(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=i?r:t<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class n${constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:r}=this.inner.next(e);return t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(St.prototype[Symbol.iterator]=function(){return this.iter()},Vo.prototype[Symbol.iterator]=i$.prototype[Symbol.iterator]=n$.prototype[Symbol.iterator]=function(){return this});class Hx{constructor(e,t,i,r){this.from=e,this.to=t,this.number=i,this.text=r}get length(){return this.to-this.from}}let Xl="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;nn)return Xl[e-1]<=n;return!1}function bm(n){return n>=127462&&n<=127487}const $m=8205;function Li(n,e,t=!0,i=!0){return(t?r$:Jx)(n,e,i)}function r$(n,e,t){if(e==n.length)return e;e&&s$(n.charCodeAt(e))&&l$(n.charCodeAt(e-1))&&e--;let i=Xi(n,e);for(e+=yn(i);e=0&&bm(Xi(n,l));)s++,l-=2;if(s%2==0)break;e+=2}else break}return e}function Jx(n,e,t){for(;e>0;){let i=r$(n,e-2,t);if(i=56320&&n<57344}function l$(n){return n>=55296&&n<56320}function Xi(n,e){let t=n.charCodeAt(e);if(!l$(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return s$(i)?(t-55296<<10)+(i-56320)+65536:t}function Sd(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function yn(n){return n<65536?1:2}const mO=/\r\n?|\n/;var Zi=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(Zi||(Zi={}));class kr{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return s+(e-r);s+=o}else{if(i!=Zi.Simple&&u>=e&&(i==Zi.TrackDel&&re||i==Zi.TrackBefore&&re))return null;if(u>e||u==e&&t<0&&!o)return e==r||t<0?s:s+f;s+=f}r=u}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,t=e){for(let i=0,r=0;i=0&&r<=t&&o>=e)return rt?"cover":!0;r=o}return!1}toString(){let e="";for(let t=0;t=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new kr(e)}static create(e){return new kr(e)}}class bi extends kr{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return SO(this,(t,i,r,s,l)=>e=e.replace(r,r+(i-t),l),!1),e}mapDesc(e,t=!1){return bO(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let r=0,s=0;r=0){t[r]=o,t[r+1]=l;let f=r>>1;for(;i.length0&&ms(i,t,s.text),s.forward(h),o+=h}let u=e[l++];for(;o>1].toJSON()))}return e}static of(e,t,i){let r=[],s=[],l=0,o=null;function f(h=!1){if(!h&&!r.length)return;lp||O<0||p>t)throw new RangeError(`Invalid change range ${O} to ${p} (in doc of length ${t})`);let b=g?typeof g=="string"?St.of(g.split(i||mO)):g:St.empty,Q=b.length;if(O==p&&Q==0)return;Ol&&Ii(r,O-l,-1),Ii(r,p-O,Q),ms(s,r,b),l=p}}return u(e),f(!o),o}static empty(e){return new bi(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let r=0;ro&&typeof l!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;i.length=0&&t<=0&&t==n[r+1]?n[r]+=e:e==0&&n[r]==0?n[r+1]+=t:i?(n[r]+=e,n[r+1]+=t):n.push(e,t)}function ms(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i>1])),!(t||l==n.sections.length||n.sections[l+1]<0);)o=n.sections[l++],f=n.sections[l++];e(r,u,s,h,O),r=u,s=h}}}function bO(n,e,t,i=!1){let r=[],s=i?[]:null,l=new No(n),o=new No(e);for(let f=-1;;)if(l.ins==-1&&o.ins==-1){let u=Math.min(l.len,o.len);Ii(r,u,-1),l.forward(u),o.forward(u)}else if(o.ins>=0&&(l.ins<0||f==l.i||l.off==0&&(o.len=0&&f=0){let u=0,h=l.len;for(;h;)if(o.ins==-1){let O=Math.min(h,o.len);u+=O,h-=O,o.forward(O)}else if(o.ins==0&&o.lenf||l.ins>=0&&l.len>f)&&(o||i.length>u),s.forward2(f),l.forward(f)}}}}class No{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?St.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?St.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Fs{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&16?this.to:this.from}get head(){return this.flags&16?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&4?-1:this.flags&8?1:0}get bidiLevel(){let e=this.flags&3;return e==3?null:e}get goalColumn(){let e=this.flags>>5;return e==33554431?void 0:e}map(e,t=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new Fs(i,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return K.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return K.range(this.anchor,i)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return K.range(e.anchor,e.head)}static create(e,t,i){return new Fs(e,t,i)}}class K{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:K.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;te.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new K(e.ranges.map(t=>Fs.fromJSON(t)),e.main)}static single(e,t=e){return new K([K.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;re?4:0)|s)}static normalized(e,t=0){let i=e[t];e.sort((r,s)=>r.from-s.from),t=e.indexOf(i);for(let r=1;rs.head?K.range(f,o):K.range(o,f))}}return new K(e,t)}}function a$(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let bd=0;class ye{constructor(e,t,i,r,s){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=r,this.id=bd++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}static define(e={}){return new ye(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:$d),!!e.static,e.enables)}of(e){return new Gf([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Gf(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Gf(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function $d(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class Gf{constructor(e,t,i,r){this.dependencies=e,this.facet=t,this.type=i,this.value=r,this.id=bd++}dynamicSlot(e){var t;let i=this.value,r=this.facet.compareInput,s=this.id,l=e[s]>>1,o=this.type==2,f=!1,u=!1,h=[];for(let O of this.dependencies)O=="doc"?f=!0:O=="selection"?u=!0:((t=e[O.id])!==null&&t!==void 0?t:1)&1||h.push(e[O.id]);return{create(O){return O.values[l]=i(O),1},update(O,p){if(f&&p.docChanged||u&&(p.docChanged||p.selection)||$O(O,h)){let g=i(O);if(o?!Qm(g,O.values[l],r):!r(g,O.values[l]))return O.values[l]=g,1}return 0},reconfigure:(O,p)=>{let g,b=p.config.address[s];if(b!=null){let Q=cc(p,b);if(this.dependencies.every($=>$ instanceof ye?p.facet($)===O.facet($):$ instanceof Qi?p.field($,!1)==O.field($,!1):!0)||(o?Qm(g=i(O),Q,r):r(g=i(O),Q)))return O.values[l]=Q,0}else g=i(O);return O.values[l]=g,1}}}}function Qm(n,e,t){if(n.length!=e.length)return!1;for(let i=0;in[f.id]),r=t.map(f=>f.type),s=i.filter(f=>!(f&1)),l=n[e.id]>>1;function o(f){let u=[];for(let h=0;hi===r),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(wm).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,r)=>{let s=i.values[t],l=this.updateF(s,r);return this.compareF(s,l)?0:(i.values[t]=l,1)},reconfigure:(i,r)=>r.config.address[this.id]!=null?(i.values[t]=r.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,wm.of({field:this,create:e})]}get extension(){return this}}const Ls={lowest:4,low:3,default:2,high:1,highest:0};function $o(n){return e=>new f$(e,n)}const tl={highest:$o(Ls.highest),high:$o(Ls.high),default:$o(Ls.default),low:$o(Ls.low),lowest:$o(Ls.lowest)};class f${constructor(e,t){this.inner=e,this.prec=t}}class Ll{of(e){return new QO(this,e)}reconfigure(e){return Ll.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class QO{constructor(e,t){this.compartment=e,this.inner=t}}class fc{constructor(e,t,i,r,s,l){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=l,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,i){let r=[],s=Object.create(null),l=new Map;for(let p of t4(e,t,l))p instanceof Qi?r.push(p):(s[p.facet.id]||(s[p.facet.id]=[])).push(p);let o=Object.create(null),f=[],u=[];for(let p of r)o[p.id]=u.length<<1,u.push(g=>p.slot(g));let h=i==null?void 0:i.config.facets;for(let p in s){let g=s[p],b=g[0].facet,Q=h&&h[p]||[];if(g.every($=>$.type==0))if(o[b.id]=f.length<<1|1,$d(Q,g))f.push(i.facet(b));else{let $=b.combine(g.map(P=>P.value));f.push(i&&b.compare($,i.facet(b))?i.facet(b):$)}else{for(let $ of g)$.type==0?(o[$.id]=f.length<<1|1,f.push($.value)):(o[$.id]=u.length<<1,u.push(P=>$.dynamicSlot(P)));o[b.id]=u.length<<1,u.push($=>e4($,b,g))}}let O=u.map(p=>p(o));return new fc(e,l,O,o,f,s)}}function t4(n,e,t){let i=[[],[],[],[],[]],r=new Map;function s(l,o){let f=r.get(l);if(f!=null){if(f<=o)return;let u=i[f].indexOf(l);u>-1&&i[f].splice(u,1),l instanceof QO&&t.delete(l.compartment)}if(r.set(l,o),Array.isArray(l))for(let u of l)s(u,o);else if(l instanceof QO){if(t.has(l.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(l.compartment)||l.inner;t.set(l.compartment,u),s(u,o)}else if(l instanceof f$)s(l.inner,l.prec);else if(l instanceof Qi)i[o].push(l),l.provides&&s(l.provides,o);else if(l instanceof Gf)i[o].push(l),l.facet.extensions&&s(l.facet.extensions,Ls.default);else{let u=l.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${l}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(u,o)}}return s(n,Ls.default),i.reduce((l,o)=>l.concat(o))}function qo(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let r=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|r}function cc(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const c$=ye.define(),u$=ye.define({combine:n=>n.some(e=>e),static:!0}),h$=ye.define({combine:n=>n.length?n[0]:void 0,static:!0}),O$=ye.define(),d$=ye.define(),p$=ye.define(),g$=ye.define({combine:n=>n.length?n[0]:!1});class Gr{constructor(e,t){this.type=e,this.value=t}static define(){return new i4}}class i4{of(e){return new Gr(this,e)}}class n4{constructor(e){this.map=e}of(e){return new Ie(this,e)}}class Ie{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new Ie(this.type,t)}is(e){return this.type==e}static define(e={}){return new n4(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(t);s&&i.push(s)}return i}}Ie.reconfigure=Ie.define();Ie.appendConfig=Ie.define();class $i{constructor(e,t,i,r,s,l){this.startState=e,this.changes=t,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=l,this._doc=null,this._state=null,i&&a$(i,t.newLength),s.some(o=>o.type==$i.time)||(this.annotations=s.concat($i.time.of(Date.now())))}static create(e,t,i,r,s,l){return new $i(e,t,i,r,s,l)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation($i.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}$i.time=Gr.define();$i.userEvent=Gr.define();$i.addToHistory=Gr.define();$i.remote=Gr.define();function r4(n,e){let t=[];for(let i=0,r=0;;){let s,l;if(i=n[i]))s=n[i++],l=n[i++];else if(r=0;r--){let s=i[r](n);s instanceof $i?n=s:Array.isArray(s)&&s.length==1&&s[0]instanceof $i?n=s[0]:n=S$(e,Tl(s),!1)}return n}function l4(n){let e=n.startState,t=e.facet(p$),i=n;for(let r=t.length-1;r>=0;r--){let s=t[r](n);s&&Object.keys(s).length&&(i=m$(i,wO(e,s,n.changes.newLength),!0))}return i==n?n:$i.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const o4=[];function Tl(n){return n==null?o4:Array.isArray(n)?n:[n]}var zt=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(zt||(zt={}));const a4=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let yO;try{yO=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function f4(n){if(yO)return yO.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||a4.test(t)))return!0}return!1}function c4(n){return e=>{if(!/\S/.test(e))return zt.Space;if(f4(e))return zt.Word;for(let t=0;t-1)return zt.Word;return zt.Other}}class ut{constructor(e,t,i,r,s,l){this.config=e,this.doc=t,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,l&&(l._state=this);for(let o=0;or.set(f,o)),t=null),r.set(l.value.compartment,l.value.extension)):l.is(Ie.reconfigure)?(t=null,i=l.value):l.is(Ie.appendConfig)&&(t=null,i=Tl(i).concat(l.value));let s;t?s=e.startState.values.slice():(t=fc.resolve(i,r,this),s=new ut(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(o,f)=>f.reconfigure(o,this),null).values),new ut(t,e.newDoc,e.newSelection,s,(l,o)=>o.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:K.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),r=this.changes(i.changes),s=[i.range],l=Tl(i.effects);for(let o=1;ol.spec.fromJSON(o,f)))}}return ut.create({doc:e.doc,selection:K.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=fc.resolve(e.extensions||[],new Map),i=e.doc instanceof St?e.doc:St.of((e.doc||"").split(t.staticFacet(ut.lineSeparator)||mO)),r=e.selection?e.selection instanceof K?e.selection:K.single(e.selection.anchor,e.selection.head):K.single(0);return a$(r,i.length),t.staticFacet(u$)||(r=r.asSingle()),new ut(t,i,r,t.dynamicSlots.map(()=>null),(s,l)=>l.create(s),null)}get tabSize(){return this.facet(ut.tabSize)}get lineBreak(){return this.facet(ut.lineSeparator)||` +`}get readOnly(){return this.facet(g$)}phrase(e,...t){for(let i of this.facet(ut.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let s=+(r||1);return!s||s>t.length?i:t[s-1]})),e}languageDataAt(e,t,i=-1){let r=[];for(let s of this.facet(c$))for(let l of s(this,t,i))Object.prototype.hasOwnProperty.call(l,e)&&r.push(l[e]);return r}charCategorizer(e){return c4(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:r}=this.doc.lineAt(e),s=this.charCategorizer(e),l=e-i,o=e-i;for(;l>0;){let f=Li(t,l,!1);if(s(t.slice(f,l))!=zt.Word)break;l=f}for(;on.length?n[0]:4});ut.lineSeparator=h$;ut.readOnly=g$;ut.phrases=ye.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(r=>n[r]==e[r])}});ut.languageData=c$;ut.changeFilter=O$;ut.transactionFilter=d$;ut.transactionExtender=p$;Ll.reconfigure=Ie.define();function Wr(n,e,t={}){let i={};for(let r of n)for(let s of Object.keys(r)){let l=r[s],o=i[s];if(o===void 0)i[s]=l;else if(!(o===l||l===void 0))if(Object.hasOwnProperty.call(t,s))i[s]=t[s](o,l);else throw new Error("Config merge conflict for field "+s)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class Ks{eq(e){return this==e}range(e,t=e){return vO.create(e,t,this)}}Ks.prototype.startSide=Ks.prototype.endSide=0;Ks.prototype.point=!1;Ks.prototype.mapMode=Zi.TrackDel;let vO=class b${constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new b$(e,t,i)}};function PO(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class Qd{constructor(e,t,i,r){this.from=e,this.to=t,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,r=0){let s=i?this.to:this.from;for(let l=r,o=s.length;;){if(l==o)return l;let f=l+o>>1,u=s[f]-e||(i?this.value[f].endSide:this.value[f].startSide)-t;if(f==l)return u>=0?l:o;u>=0?o=f:l=f+1}}between(e,t,i,r){for(let s=this.findIndex(t,-1e9,!0),l=this.findIndex(i,1e9,!1,s);sg||p==g&&u.startSide>0&&u.endSide<=0)continue;(g-p||u.endSide-u.startSide)<0||(l<0&&(l=p),u.point&&(o=Math.max(o,g-p)),i.push(u),r.push(p-l),s.push(g-l))}return{mapped:i.length?new Qd(r,s,i,o):null,pos:l}}}class Qt{constructor(e,t,i,r){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=r}static create(e,t,i,r){return new Qt(e,t,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:r=0,filterTo:s=this.length}=e,l=e.filter;if(t.length==0&&!l)return this;if(i&&(t=t.slice().sort(PO)),this.isEmpty)return t.length?Qt.of(t):this;let o=new $$(this,null,-1).goto(0),f=0,u=[],h=new ws;for(;o.value||f=0){let O=t[f++];h.addInner(O.from,O.to,O.value)||u.push(O)}else o.rangeIndex==1&&o.chunkIndexthis.chunkEnd(o.chunkIndex)||so.to||s=s&&e<=s+l.length&&l.between(s,e-s,t-s,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return Lo.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Lo.from(e).goto(t)}static compare(e,t,i,r,s=-1){let l=e.filter(O=>O.maxPoint>0||!O.isEmpty&&O.maxPoint>=s),o=t.filter(O=>O.maxPoint>0||!O.isEmpty&&O.maxPoint>=s),f=ym(l,o,i),u=new Qo(l,f,s),h=new Qo(o,f,s);i.iterGaps((O,p,g)=>vm(u,O,h,p,g,r)),i.empty&&i.length==0&&vm(u,0,h,0,0,r)}static eq(e,t,i=0,r){r==null&&(r=1e9-1);let s=e.filter(h=>!h.isEmpty&&t.indexOf(h)<0),l=t.filter(h=>!h.isEmpty&&e.indexOf(h)<0);if(s.length!=l.length)return!1;if(!s.length)return!0;let o=ym(s,l),f=new Qo(s,o,0).goto(i),u=new Qo(l,o,0).goto(i);for(;;){if(f.to!=u.to||!kO(f.active,u.active)||f.point&&(!u.point||!f.point.eq(u.point)))return!1;if(f.to>r)return!0;f.next(),u.next()}}static spans(e,t,i,r,s=-1){let l=new Qo(e,null,s).goto(t),o=t,f=l.openStart;for(;;){let u=Math.min(l.to,i);if(l.point){let h=l.activeForPoint(l.to),O=l.pointFromo&&(r.span(o,u,l.active,f),f=l.openEnd(u));if(l.to>i)return f+(l.point&&l.to>i?1:0);o=l.to,l.next()}}static of(e,t=!1){let i=new ws;for(let r of e instanceof vO?[e]:t?u4(e):e)i.add(r.from,r.to,r.value);return i.finish()}}Qt.empty=new Qt([],[],null,-1);function u4(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(PO);e=i}return n}Qt.empty.nextLayer=Qt.empty;class ws{constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}finishChunk(e){this.chunks.push(new Qd(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}add(e,t,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new ws)).add(e,t,i)}addInner(e,t,i){let r=e-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(Qt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=Qt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function ym(n,e,t){let i=new Map;for(let s of n)for(let l=0;l=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&r.push(new $$(l,t,i,s));return r.length==1?r[0]:new Lo(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let i=this.heap.length>>1;i>=0;i--)Rh(this.heap,i);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let i=this.heap.length>>1;i>=0;i--)Rh(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Rh(this.heap,0)}}}function Rh(n,e){for(let t=n[e];;){let i=(e<<1)+1;if(i>=n.length)break;let r=n[i];if(i+1=0&&(r=n[i+1],i++),t.compare(r)<0)break;n[i]=t,n[e]=r,e=i}}class Qo{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Lo.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){yf(this.active,e),yf(this.activeTo,e),yf(this.activeRank,e),this.minActive=Pm(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:r,rank:s}=this.cursor;for(;t-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&yf(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(i),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&i[r]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function vm(n,e,t,i,r,s){n.goto(e),t.goto(i);let l=i+r,o=i,f=i-e;for(;;){let u=n.to+f-t.to||n.endSide-t.endSide,h=u<0?n.to+f:t.to,O=Math.min(h,l);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&kO(n.activeForPoint(n.to+f),t.activeForPoint(t.to))||s.comparePoint(o,O,n.point,t.point):O>o&&!kO(n.active,t.active)&&s.compareRange(o,O,n.active,t.active),h>l)break;o=h,u<=0&&n.next(),u>=0&&t.next()}}function kO(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;i--)n[i+1]=n[i];n[e]=t}function Pm(n,e){let t=-1,i=1e9;for(let r=0;r=e)return r;if(r==n.length)break;s+=n.charCodeAt(r)==9?t-s%t:1,r=Li(n,r)}return i===!0?-1:n.length}const WO="ͼ",km=typeof Symbol>"u"?"__"+WO:Symbol.for(WO),xO=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),_m=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class ys{constructor(e,t){this.rules=[];let{finish:i}=t||{};function r(l){return/^@/.test(l)?[l]:l.split(/,\s*/)}function s(l,o,f,u){let h=[],O=/^@(\w+)\b/.exec(l[0]),p=O&&O[1]=="keyframes";if(O&&o==null)return f.push(l[0]+";");for(let g in o){let b=o[g];if(/&/.test(g))s(g.split(/,\s*/).map(Q=>l.map($=>Q.replace(/&/,$))).reduce((Q,$)=>Q.concat($)),b,f);else if(b&&typeof b=="object"){if(!O)throw new RangeError("The value of a property ("+g+") should be a primitive value.");s(r(g),b,h,p)}else b!=null&&h.push(g.replace(/_.*/,"").replace(/[A-Z]/g,Q=>"-"+Q.toLowerCase())+": "+b+";")}(h.length||p)&&f.push((i&&!O&&!u?l.map(i):l).join(", ")+" {"+h.join(" ")+"}")}for(let l in e)s(r(l),e[l],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=_m[km]||1;return _m[km]=e+1,WO+e.toString(36)}static mount(e,t,i){let r=e[xO],s=i&&i.nonce;r?s&&r.setNonce(s):r=new h4(e,s),r.mount(Array.isArray(t)?t:[t])}}let Wm=new Map;class h4{constructor(e,t){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let s=Wm.get(i);if(s)return e.adoptedStyleSheets=[s.sheet,...e.adoptedStyleSheets],e[xO]=s;this.sheet=new r.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],Wm.set(i,this)}else{this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);let s=e.head||e;s.insertBefore(this.styleTag,s.firstChild)}this.modules=[],e[xO]=this}mount(e){let t=this.sheet,i=0,r=0;for(let s=0;s-1&&(this.modules.splice(o,1),r--,o=-1),o==-1){if(this.modules.splice(r++,0,l),t)for(let f=0;f",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},xm=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),O4=typeof navigator<"u"&&/Mac/.test(navigator.platform),d4=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),p4=O4||xm&&+xm[1]<57;for(var Ti=0;Ti<10;Ti++)vs[48+Ti]=vs[96+Ti]=String(Ti);for(var Ti=1;Ti<=24;Ti++)vs[Ti+111]="F"+Ti;for(var Ti=65;Ti<=90;Ti++)vs[Ti]=String.fromCharCode(Ti+32),Bo[Ti]=String.fromCharCode(Ti);for(var Ah in vs)Bo.hasOwnProperty(Ah)||(Bo[Ah]=vs[Ah]);function g4(n){var e=p4&&(n.ctrlKey||n.altKey||n.metaKey)||d4&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Bo:vs)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function uc(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function CO(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function m4(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Hf(n,e){if(!e.anchorNode)return!1;try{return CO(n,e.anchorNode)}catch{return!1}}function jo(n){return n.nodeType==3?Js(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function hc(n,e,t,i){return t?Cm(n,e,t,i,-1)||Cm(n,e,t,i,1):!1}function Oc(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Cm(n,e,t,i,r){for(;;){if(n==t&&e==i)return!0;if(e==(r<0?0:Ps(n))){if(n.nodeName=="DIV")return!1;let s=n.parentNode;if(!s||s.nodeType!=1)return!1;e=Oc(n)+(r<0?0:1),n=s}else if(n.nodeType==1){if(n=n.childNodes[e+(r<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=r<0?Ps(n):0}else return!1}}function Ps(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function wd(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function S4(n){return{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function b4(n,e,t,i,r,s,l,o){let f=n.ownerDocument,u=f.defaultView||window;for(let h=n,O=!1;h&&!O;)if(h.nodeType==1){let p,g=h==f.body,b=1,Q=1;if(g)p=S4(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(h).position)&&(O=!0),h.scrollHeight<=h.clientHeight&&h.scrollWidth<=h.clientWidth){h=h.assignedSlot||h.parentNode;continue}let x=h.getBoundingClientRect();b=x.width/h.offsetWidth,Q=x.height/h.offsetHeight,p={left:x.left,right:x.left+h.clientWidth*b,top:x.top,bottom:x.top+h.clientHeight*Q}}let $=0,P=0;if(r=="nearest")e.top0&&e.bottom>p.bottom+P&&(P=e.bottom-p.bottom+P+l)):e.bottom>p.bottom&&(P=e.bottom-p.bottom+l,t<0&&e.top-P0&&e.right>p.right+$&&($=e.right-p.right+$+s)):e.right>p.right&&($=e.right-p.right+s,t<0&&e.leftt.clientHeight||t.scrollWidth>t.clientWidth)return t;t=t.assignedSlot||t.parentNode}else if(t.nodeType==11)t=t.host;else break;return null}class Q4{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:i}=e;this.set(t,Math.min(e.anchorOffset,t?Ps(t):0),i,Math.min(e.focusOffset,i?Ps(i):0))}set(e,t,i,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=r}}let bl=null;function Q$(n){if(n.setActive)return n.setActive();if(bl)return n.focus(bl);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(bl==null?{get preventScroll(){return bl={preventScroll:!0},!0}}:void 0),!bl){bl=!1;for(let t=0;tMath.max(1,n.scrollHeight-n.clientHeight-4)}class Ni{constructor(e,t,i=!0){this.node=e,this.offset=t,this.precise=i}static before(e,t){return new Ni(e.parentNode,Oc(e),t)}static after(e,t){return new Ni(e.parentNode,Oc(e)+1,t)}}const yd=[];class Yt{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let i of this.children){if(i==e)return t;t+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(this.flags&2){let i=this.dom,r=null,s;for(let l of this.children){if(l.flags&7){if(!l.dom&&(s=r?r.nextSibling:i.firstChild)){let o=Yt.get(s);(!o||!o.parent&&o.canReuseDOM(l))&&l.reuseDOM(s)}l.sync(e,t),l.flags&=-8}if(s=r?r.nextSibling:i.firstChild,t&&!t.written&&t.node==i&&s!=l.dom&&(t.written=!0),l.dom.parentNode==i)for(;s&&s!=l.dom;)s=Tm(s);else i.insertBefore(l.dom,s);r=l.dom}for(s=r?r.nextSibling:i.firstChild,s&&t&&t.node==i&&(t.written=!0);s;)s=Tm(s)}else if(this.flags&1)for(let i of this.children)i.flags&7&&(i.sync(e,t),i.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let i;if(e==this.dom)i=this.dom.childNodes[t];else{let r=Ps(e)==0?0:t==0?-1:1;for(;;){let s=e.parentNode;if(s==this.dom)break;r==0&&s.firstChild!=s.lastChild&&(e==s.firstChild?r=-1:r=1),e=s}r<0?i=e:i=e.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!Yt.get(i);)i=i.nextSibling;if(!i)return this.length;for(let r=0,s=0;;r++){let l=this.children[r];if(l.dom==i)return s;s+=l.length+l.breakAfter}}domBoundsAround(e,t,i=0){let r=-1,s=-1,l=-1,o=-1;for(let f=0,u=i,h=i;ft)return O.domBoundsAround(e,t,u);if(p>=e&&r==-1&&(r=f,s=u),u>t&&O.dom.parentNode==this.dom){l=f,o=h;break}h=p,u=p+O.breakAfter}return{from:s,to:o<0?i+this.length:o,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:l=0?this.children[l].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,i=yd){this.markDirty();for(let r=e;rthis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function P$(n,e,t,i,r,s,l,o,f){let{children:u}=n,h=u.length?u[e]:null,O=s.length?s[s.length-1]:null,p=O?O.breakAfter:l;if(!(e==i&&h&&!l&&!p&&s.length<2&&h.merge(t,r,s.length?O:null,t==0,o,f))){if(i0&&(!l&&s.length&&h.merge(t,h.length,s[0],!1,o,0)?h.breakAfter=s.shift().breakAfter:(t2);var Pe={mac:Am||/Mac/.test(vn.platform),windows:/Win/.test(vn.platform),linux:/Linux|X11/.test(vn.platform),ie:jc,ie_version:_$?XO.documentMode||6:ZO?+ZO[1]:TO?+TO[1]:0,gecko:Zm,gecko_version:Zm?+(/Firefox\/(\d+)/.exec(vn.userAgent)||[0,0])[1]:0,chrome:!!Uh,chrome_version:Uh?+Uh[1]:0,ios:Am,android:/Android\b/.test(vn.userAgent),webkit:Rm,safari:W$,webkit_version:Rm?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:XO.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const v4=256;class Br extends Yt{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,i){return this.flags&8||i&&(!(i instanceof Br)||this.length-(t-e)+i.length>v4||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new Br(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new Ni(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return P4(this.dom,e,t)}}class jr extends Yt{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let r of t)r.setParent(this)}setAttrs(e){if(w$(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,i,r,s,l){return i&&(!(i instanceof jr&&i.mark.eq(this.mark))||e&&s<=0||te&&t.push(i=e&&(r=s),i=f,s++}let l=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new jr(this.mark,t,l)}domAtPos(e){return x$(this,e)}coordsAt(e,t){return X$(this,e,t)}}function P4(n,e,t){let i=n.nodeValue.length;e>i&&(e=i);let r=e,s=e,l=0;e==0&&t<0||e==i&&t>=0?Pe.chrome||Pe.gecko||(e?(r--,l=1):s=0)?0:o.length-1];return Pe.safari&&!l&&f.width==0&&(f=Array.prototype.find.call(o,u=>u.width)||f),l?wd(f,l<0):f||null}class Ss extends Yt{static create(e,t,i){return new Ss(e,t,i)}constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}split(e){let t=Ss.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,t,i,r,s,l){return i&&(!(i instanceof Ss)||!this.widget.compare(i.widget)||e>0&&s<=0||t0)?Ni.before(this.dom):Ni.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;let r=this.dom.getClientRects(),s=null;if(!r.length)return null;let l=this.side?this.side<0:e>0;for(let o=l?r.length-1:0;s=r[o],!(e>0?o==0:o==r.length-1||s.top0?Ni.before(this.dom):Ni.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return St.empty}get isHidden(){return!0}}Br.prototype.children=Ss.prototype.children=Vl.prototype.children=yd;function x$(n,e){let t=n.dom,{children:i}=n,r=0;for(let s=0;rs&&e0;s--){let l=i[s-1];if(l.dom.parentNode==t)return l.domAtPos(l.length)}for(let s=r;s0&&e instanceof jr&&r.length&&(i=r[r.length-1])instanceof jr&&i.mark.eq(e.mark)?C$(i,e.children[0],t-1):(r.push(e),e.setParent(n)),n.length+=e.length}function X$(n,e,t){let i=null,r=-1,s=null,l=-1;function o(u,h){for(let O=0,p=0;O=h&&(g.children.length?o(g,h-p):(!s||s.isHidden&&t>0)&&(b>h||p==b&&g.getSide()>0)?(s=g,l=h-p):(p-1?1:0)!=r.length-(t&&r.indexOf(t)>-1?1:0))return!1;for(let s of i)if(s!=t&&(r.indexOf(s)==-1||n[s]!==e[s]))return!1;return!0}function AO(n,e,t){let i=!1;if(e)for(let r in e)t&&r in t||(i=!0,r=="style"?n.style.cssText="":n.removeAttribute(r));if(t)for(let r in t)e&&e[r]==t[r]||(i=!0,r=="style"?n.style.cssText=t[r]:n.setAttribute(r,t[r]));return i}function _4(n){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new ks(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:s,end:l}=T$(e,t);i=(s?t?-3e8:-1:5e8)-1,r=(l?t?2e8:1:-6e8)+1}return new ks(e,i,r,t,e.widget||null,!0)}static line(e){return new aa(e)}static set(e,t=!1){return Qt.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ze.none=Qt.empty;class oa extends Ze{constructor(e){let{start:t,end:i}=T$(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,i;return this==e||e instanceof oa&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&vd(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}oa.prototype.point=!1;class aa extends Ze{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof aa&&this.spec.class==e.spec.class&&vd(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}aa.prototype.mapMode=Zi.TrackBefore;aa.prototype.point=!0;class ks extends Ze{constructor(e,t,i,r,s,l){super(t,i,s,e),this.block=r,this.isReplace=l,this.mapMode=r?t<=0?Zi.TrackBefore:Zi.TrackAfter:Zi.TrackDel}get type(){return this.startSide=5||this.widget.lineBreaks>0)}eq(e){return e instanceof ks&&W4(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}ks.prototype.point=!0;function T$(n,e=!1){let{inclusiveStart:t,inclusiveEnd:i}=n;return t==null&&(t=n.inclusive),i==null&&(i=n.inclusive),{start:t??e,end:i??e}}function W4(n,e){return n==e||!!(n&&e&&n.compare(e))}function UO(n,e,t,i=0){let r=t.length-1;r>=0&&t[r]+i>=n?t[r]=Math.max(t[r],e):t.push(n,e)}class Ci extends Yt{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,i,r,s,l){if(i){if(!(i instanceof Ci))return!1;this.dom||i.transferDOM(this)}return r&&this.setDeco(i?i.attrs:null),k$(this,e,t,i?i.children:[],s,l),!0}split(e){let t=new Ci;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i,off:r}=this.childPos(e);r&&(t.append(this.children[i].split(r),0),this.children[i].merge(r,this.children[i].length,null,!1,0,0),i++);for(let s=i;s0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){vd(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){C$(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=RO(t,this.attrs||{})),i&&(this.attrs=RO({class:i},this.attrs||{}))}domAtPos(e){return x$(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var i;this.dom?this.flags&4&&(w$(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(AO(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let r=this.dom.lastChild;for(;r&&Yt.get(r)instanceof jr;)r=r.lastChild;if(!r||!this.length||r.nodeName!="BR"&&((i=Yt.get(r))===null||i===void 0?void 0:i.isEditable)==!1&&(!Pe.ios||!this.children.some(s=>s instanceof Br))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let i of this.children){if(!(i instanceof Br)||/[^ -~]/.test(i.text))return null;let r=jo(i.dom);if(r.length!=1)return null;e+=r[0].width,t=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let i=X$(this,e,t);if(!this.children.length&&i&&this.parent){let{heightOracle:r}=this.parent.view.viewState,s=i.bottom-i.top;if(Math.abs(s-r.lineHeight)<2&&r.textHeight=t){if(s instanceof Ci)return s;if(l>t)break}r=l+s.breakAfter}return null}}class Hs extends Yt{constructor(e,t,i){super(),this.widget=e,this.length=t,this.type=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,r,s,l){return i&&(!(i instanceof Hs)||!this.widget.compare(i.widget)||e>0&&s<=0||t0;){if(this.textOff==this.text.length){let{value:s,lineBreak:l,done:o}=this.cursor.next(this.skip);if(this.skip=0,o)throw new Error("Ran out of text content when drawing inline views");if(l){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=s,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-i)),this.getLine().append(Pf(new Br(this.text.slice(this.textOff,this.textOff+r)),t),i),this.atCursorPos=!0,this.textOff+=r,e-=r,i=0}}span(e,t,i,r){this.buildText(t-e,i,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,i,r,s,l){if(this.disallowBlockEffectsFor[l]&&i instanceof ks){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let o=t-e;if(i instanceof ks)if(i.block){let{type:f}=i;f==Kt.WidgetAfter&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Hs(i.widget||new Ym("div"),o,f))}else{let f=Ss.create(i.widget||new Ym("span"),o,o?0:i.startSide),u=this.atCursorPos&&!f.isEditable&&s<=r.length&&(e0),h=!f.isEditable&&(er.length||i.startSide<=0),O=this.getLine();this.pendingBuffer==2&&!u&&!f.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),u&&(O.append(Pf(new Vl(1),r),s),s=r.length+Math.max(0,s-r.length)),O.append(Pf(f,r),s),this.atCursorPos=h,this.pendingBuffer=h?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);o&&(this.textOff+o<=this.text.length?this.textOff+=o:(this.skip+=o-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=s)}static build(e,t,i,r,s){let l=new Eo(e,t,i,s);return l.openEnd=Qt.spans(r,t,i,l),l.openStart<0&&(l.openStart=l.openEnd),l.finish(l.openEnd),l}}function Pf(n,e){for(let t of e)n=new jr(t,[n],n.length);return n}class Ym extends Cs{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const Z$=ye.define(),R$=ye.define(),A$=ye.define(),U$=ye.define(),YO=ye.define(),Y$=ye.define(),V$=ye.define(),q$=ye.define({combine:n=>n.some(e=>e)}),E$=ye.define({combine:n=>n.some(e=>e)});class dc{constructor(e,t="nearest",i="nearest",r=5,s=5){this.range=e,this.y=t,this.x=i,this.yMargin=r,this.xMargin=s}map(e){return e.empty?this:new dc(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const Vm=Ie.define({map:(n,e)=>n.map(e)});function kn(n,e,t){let i=n.facet(U$);i.length?i[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const Fc=ye.define({combine:n=>n.length?n[0]:!0});let x4=0;const xo=ye.define();class hi{constructor(e,t,i,r){this.id=e,this.create=t,this.domEventHandlers=i,this.extension=r(this)}static define(e,t){const{eventHandlers:i,provide:r,decorations:s}=t||{};return new hi(x4++,e,i,l=>{let o=[xo.of(l)];return s&&o.push(Fo.of(f=>{let u=f.plugin(l);return u?s(u):Ze.none})),r&&o.push(r(l)),o})}static fromClass(e,t){return hi.define(i=>new e(i),t)}}class Yh{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(i){if(kn(t.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){kn(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(i){kn(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const M$=ye.define(),Pd=ye.define(),Fo=ye.define(),kd=ye.define(),D$=ye.define();function qm(n,e,t){let i=n.state.facet(D$);if(!i.length)return i;let r=i.map(l=>l instanceof Function?l(n):l),s=[];return Qt.spans(r,e,t,{point(){},span(l,o,f,u){let h=s;for(let O=f.length-1;O>=0;O--,u--){let p=f[O].spec.bidiIsolate,g;if(p!=null)if(u>0&&h.length&&(g=h[h.length-1]).to==l&&g.direction==p)g.to=o,h=g.inner;else{let b={from:l,to:o,direction:p,inner:[]};h.push(b),h=b.inner}}}}),s}const z$=ye.define();function I$(n){let e=0,t=0,i=0,r=0;for(let s of n.state.facet(z$)){let l=s(n);l&&(l.left!=null&&(e=Math.max(e,l.left)),l.right!=null&&(t=Math.max(t,l.right)),l.top!=null&&(i=Math.max(i,l.top)),l.bottom!=null&&(r=Math.max(r,l.bottom)))}return{left:e,right:t,top:i,bottom:r}}const Co=ye.define();class zn{constructor(e,t,i,r){this.fromA=e,this.toA=t,this.fromB=i,this.toB=r}join(e){return new zn(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>i.toA)){if(r.toAh)break;s+=2}if(!f)return i;new zn(f.fromA,f.toA,f.fromB,f.toB).addToSet(i),l=f.toA,o=f.toB}}}class pc{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=bi.empty(this.startState.doc.length);for(let s of i)this.changes=this.changes.compose(s.changes);let r=[];this.changes.iterChangedRanges((s,l,o,f)=>r.push(new zn(s,l,o,f))),this.changedRanges=r}static create(e,t,i){return new pc(e,t,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var Gt=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(Gt||(Gt={}));const Go=Gt.LTR,N$=Gt.RTL;function L$(n){let e=[];for(let t=0;t=t){if(o.level==i)return l;(s<0||(r!=0?r<0?o.fromt:e[s].level>o.level))&&(s=l)}}if(s<0)throw new RangeError("Index out of range");return s}}function B$(n,e){if(n.length!=e.length)return!1;for(let t=0;t=0;Q-=3)if(pr[Q+1]==-g){let $=pr[Q+2],P=$&2?r:$&4?$&1?s:r:0;P&&(xt[O]=xt[pr[Q]]=P),o=Q;break}}else{if(pr.length==189)break;pr[o++]=O,pr[o++]=p,pr[o++]=f}else if((b=xt[O])==2||b==1){let Q=b==r;f=Q?0:1;for(let $=o-3;$>=0;$-=3){let P=pr[$+2];if(P&2)break;if(Q)pr[$+2]|=2;else{if(P&4)break;pr[$+2]|=4}}}}}function U4(n,e,t,i){for(let r=0,s=i;r<=t.length;r++){let l=r?t[r-1].to:n,o=rf;)b==$&&(b=t[--Q].from,$=Q?t[Q-1].to:n),xt[--b]=g;f=h}else s=u,f++}}}function qO(n,e,t,i,r,s,l){let o=i%2?2:1;if(i%2==r%2)for(let f=e,u=0;ff&&l.push(new bs(f,Q.from,g));let $=Q.direction==Go!=!(g%2);EO(n,$?i+1:i,r,Q.inner,Q.from,Q.to,l),f=Q.to}b=Q.to}else{if(b==t||(h?xt[b]!=o:xt[b]==o))break;b++}p?qO(n,f,b,i+1,r,p,l):fe;){let h=!0,O=!1;if(!u||f>s[u-1].to){let Q=xt[f-1];Q!=o&&(h=!1,O=Q==16)}let p=!h&&o==1?[]:null,g=h?i:i+1,b=f;e:for(;;)if(u&&b==s[u-1].to){if(O)break e;let Q=s[--u];if(!h)for(let $=Q.from,P=u;;){if($==e)break e;if(P&&s[P-1].to==$)$=s[--P].from;else{if(xt[$-1]==o)break e;break}}if(p)p.push(Q);else{Q.toxt.length;)xt[xt.length]=256;let i=[],r=e==Go?0:1;return EO(n,r,r,t,0,n.length,i),i}function j$(n){return[new bs(0,n,0)]}let F$="";function V4(n,e,t,i,r){var s;let l=i.head-n.from,o=-1;if(l==0){if(!r||!n.length)return null;e[0].level!=t&&(l=e[0].side(!1,t),o=0)}else if(l==n.length){if(r)return null;let p=e[e.length-1];p.level!=t&&(l=p.side(!0,t),o=e.length-1)}o<0&&(o=bs.find(e,l,(s=i.bidiLevel)!==null&&s!==void 0?s:-1,i.assoc));let f=e[o];l==f.side(r,t)&&(f=e[o+=r?1:-1],l=f.side(!r,t));let u=r==(f.dir==t),h=Li(n.text,l,u);if(F$=n.text.slice(Math.min(l,h),Math.max(l,h)),h!=f.side(r,t))return K.cursor(h+n.from,u?-1:1,f.level);let O=o==(r?e.length-1:0)?null:e[o+(r?1:-1)];return!O&&f.level!=t?K.cursor(r?n.to:n.from,r?-1:1,t):O&&O.level0&&i.length&&(i.every(({fromA:u,toA:h})=>hthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let r=-1;this.view.inputState.composing>=0&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?r=this.domChanged.newSel.head:!N4(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let s=r>-1?E4(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:h}=this.hasComposition;i=new zn(u,h,e.changes.mapPos(u,-1),e.changes.mapPos(h,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(Pe.ie||Pe.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let l=this.decorations,o=this.updateDeco(),f=z4(l,o,e.changes);return i=zn.extendWithRanges(i,f),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,i);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let l=Pe.chrome||Pe.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,l),this.flags&=-8,l&&(l.written||r.selectionRange.focusNode!=l.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(l=>l.flags&=-9);let s=[];if(this.view.viewport.from||this.view.viewport.to=0?r[l]:null;if(!o)break;let{fromA:f,toA:u,fromB:h,toB:O}=o,p,g,b,Q;if(i&&i.range.fromBh){let C=Eo.build(this.view.state.doc,h,i.range.fromB,this.decorations,this.dynamicDecorationMap),X=Eo.build(this.view.state.doc,i.range.toB,O,this.decorations,this.dynamicDecorationMap);g=C.breakAtStart,b=C.openStart,Q=X.openEnd;let Z=this.compositionView(i);X.breakAtStart?Z.breakAfter=1:X.content.length&&Z.merge(Z.length,Z.length,X.content[0],!1,X.openStart,0)&&(Z.breakAfter=X.content[0].breakAfter,X.content.shift()),C.content.length&&Z.merge(0,0,C.content[C.content.length-1],!0,0,C.openEnd)&&C.content.pop(),p=C.content.concat(Z).concat(X.content)}else({content:p,breakAtStart:g,openStart:b,openEnd:Q}=Eo.build(this.view.state.doc,h,O,this.decorations,this.dynamicDecorationMap));let{i:$,off:P}=s.findPos(u,1),{i:x,off:A}=s.findPos(f,-1);P$(this,x,A,$,P,p,g,b,Q)}i&&this.fixCompositionDOM(i)}compositionView(e){let t=new Br(e.text.nodeValue);t.flags|=8;for(let{deco:r}of e.marks)t=new jr(r,[t],t.length);let i=new Ci;return i.append(t,0),i}fixCompositionDOM(e){let t=(s,l)=>{l.flags|=8|(l.children.some(f=>f.flags&7)?1:0),this.markedForComposition.add(l);let o=Yt.get(s);o&&o!=l&&(o.dom=null),l.setDOM(s)},i=this.childPos(e.range.fromB,1),r=this.children[i.i];t(e.line,r);for(let s=e.marks.length-1;s>=-1;s--)i=r.childPos(i.off,1),r=r.children[i.i],t(s>=0?e.marks[s].node:e.text,r)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,r=i==this.dom,s=!r&&Hf(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(r||t||s))return;let l=this.forceSelection;this.forceSelection=!1;let o=this.view.state.selection.main,f=this.moveToLine(this.domAtPos(o.anchor)),u=o.empty?f:this.moveToLine(this.domAtPos(o.head));if(Pe.gecko&&o.empty&&!this.hasComposition&&q4(f)){let O=document.createTextNode("");this.view.observer.ignore(()=>f.node.insertBefore(O,f.node.childNodes[f.offset]||null)),f=u=new Ni(O,0),l=!0}let h=this.view.observer.selectionRange;(l||!h.focusNode||!hc(f.node,f.offset,h.anchorNode,h.anchorOffset)||!hc(u.node,u.offset,h.focusNode,h.focusOffset))&&(this.view.observer.ignore(()=>{Pe.android&&Pe.chrome&&this.dom.contains(h.focusNode)&&I4(h.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let O=uc(this.view.root);if(O)if(o.empty){if(Pe.gecko){let p=M4(f.node,f.offset);if(p&&p!=3){let g=H$(f.node,f.offset,p==1?1:-1);g&&(f=new Ni(g.node,g.offset))}}O.collapse(f.node,f.offset),o.bidiLevel!=null&&O.caretBidiLevel!==void 0&&(O.caretBidiLevel=o.bidiLevel)}else if(O.extend){O.collapse(f.node,f.offset);try{O.extend(u.node,u.offset)}catch{}}else{let p=document.createRange();o.anchor>o.head&&([f,u]=[u,f]),p.setEnd(u.node,u.offset),p.setStart(f.node,f.offset),O.removeAllRanges(),O.addRange(p)}s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(f,u)),this.impreciseAnchor=f.precise?null:new Ni(h.anchorNode,h.anchorOffset),this.impreciseHead=u.precise?null:new Ni(h.focusNode,h.focusOffset)}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,i=uc(e.root),{anchorNode:r,anchorOffset:s}=e.observer.selectionRange;if(!i||!t.empty||!t.assoc||!i.modify)return;let l=Ci.find(this,t.head);if(!l)return;let o=l.posAtStart;if(t.head==o||t.head==o+l.length)return;let f=this.coordsAt(t.head,-1),u=this.coordsAt(t.head,1);if(!f||!u||f.bottom>u.top)return;let h=this.domAtPos(t.head+t.assoc);i.collapse(h.node,h.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let O=e.observer.selectionRange;e.docView.posFromDOM(O.anchorNode,O.anchorOffset)!=t.from&&i.collapse(r,s)}moveToLine(e){let t=this.dom,i;if(e.node!=t)return e;for(let r=e.offset;!i&&r=0;r--){let s=Yt.get(t.childNodes[r]);s instanceof Ci&&(i=s.domAtPos(s.length))}return i?new Ni(i.node,i.offset,!0):e}nearest(e){for(let t=e;t;){let i=Yt.get(t);if(i&&i.rootView==this)return i;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;tl||e==l&&s.type!=Kt.WidgetBefore&&s.type!=Kt.WidgetAfter&&(!r||t==2||this.children[r-1].breakAfter||this.children[r-1].type==Kt.WidgetBefore&&t>-2))return s.coordsAt(e-l,t);i=l}}coordsForChar(e){let{i:t,off:i}=this.childPos(e,1),r=this.children[t];if(!(r instanceof Ci))return null;for(;r.children.length;){let{i:o,off:f}=r.childPos(i,1);for(;;o++){if(o==r.children.length)return null;if((r=r.children[o]).length)break}i=f}if(!(r instanceof Br))return null;let s=Li(r.text,i);if(s==i)return null;let l=Js(r.dom,i,s).getClientRects();return!l.length||l[0].top>=l[0].bottom?null:l[0]}measureVisibleLineHeights(e){let t=[],{from:i,to:r}=e,s=this.view.contentDOM.clientWidth,l=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,f=this.view.textDirection==Gt.LTR;for(let u=0,h=0;hr)break;if(u>=i){let g=O.dom.getBoundingClientRect();if(t.push(g.height),l){let b=O.dom.lastChild,Q=b?jo(b):[];if(Q.length){let $=Q[Q.length-1],P=f?$.right-g.left:g.right-$.left;P>o&&(o=P,this.minWidth=s,this.minWidthFrom=u,this.minWidthTo=p)}}}u=p+O.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?Gt.RTL:Gt.LTR}measureTextSize(){for(let s of this.children)if(s instanceof Ci){let l=s.measureTextSize();if(l)return l}let e=document.createElement("div"),t,i,r;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=jo(e.firstChild)[0];t=e.getBoundingClientRect().height,i=s?s.width/27:7,r=s?s.height:t,e.remove()}),{lineHeight:t,charWidth:i,textHeight:r}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new v$(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,r=0;;r++){let s=r==t.viewports.length?null:t.viewports[r],l=s?s.from-1:this.length;if(l>i){let o=(t.lineBlockAt(l).bottom-t.lineBlockAt(i).top)/this.view.scaleY;e.push(Ze.replace({widget:new Mm(o),block:!0,inclusive:!0,isBlockGap:!0}).range(i,l))}if(!s)break;i=s.to+1}return Ze.set(e)}updateDeco(){let e=this.view.state.facet(Fo).map((t,i)=>(this.dynamicDecorationMap[i]=typeof t=="function")?t(this.view):t);for(let t=e.length;tt.anchor?-1:1),r;if(!i)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let s=I$(this.view),l={left:i.left-s.left,top:i.top-s.top,right:i.right+s.right,bottom:i.bottom+s.bottom};b4(this.view.scrollDOM,l,t.head0)i=i.childNodes[r-1],r=Ps(i);else break}if(t>=0)for(let i=n,r=e;;){if(i.nodeType==3)return{node:i,offset:r};if(i.nodeType==1&&r=0)i=i.childNodes[r],r=0;else break}return null}function M4(n,e){return n.nodeType!=1?0:(e&&n.childNodes[e-1].contentEditable=="false"?1:0)|(e{ie.from&&(t=!0)}),t}function L4(n,e,t=1){let i=n.charCategorizer(e),r=n.doc.lineAt(e),s=e-r.from;if(r.length==0)return K.cursor(e);s==0?t=1:s==r.length&&(t=-1);let l=s,o=s;t<0?l=Li(r.text,s,!1):o=Li(r.text,s);let f=i(r.text.slice(l,o));for(;l>0;){let u=Li(r.text,l,!1);if(i(r.text.slice(u,l))!=f)break;l=u}for(;on?e.left-n:Math.max(0,n-e.right)}function j4(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function Vh(n,e){return n.tope.top+1}function Dm(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function MO(n,e,t){let i,r,s,l,o=!1,f,u,h,O;for(let b=n.firstChild;b;b=b.nextSibling){let Q=jo(b);for(let $=0;$A||l==A&&s>x){i=b,r=P,s=x,l=A;let C=A?t0?$0)}x==0?t>P.bottom&&(!h||h.bottomP.top)&&(u=b,O=P):h&&Vh(h,P)?h=zm(h,P.bottom):O&&Vh(O,P)&&(O=Dm(O,P.top))}}if(h&&h.bottom>=t?(i=f,r=h):O&&O.top<=t&&(i=u,r=O),!i)return{node:n,offset:0};let p=Math.max(r.left,Math.min(r.right,e));if(i.nodeType==3)return Im(i,p,t);if(o&&i.contentEditable!="false")return MO(i,p,t);let g=Array.prototype.indexOf.call(n.childNodes,i)+(e>=(r.left+r.right)/2?1:0);return{node:n,offset:g}}function Im(n,e,t){let i=n.nodeValue.length,r=-1,s=1e9,l=0;for(let o=0;ot?h.top-t:t-h.bottom)-1;if(h.left-1<=e&&h.right+1>=e&&O=(h.left+h.right)/2,g=p;if((Pe.chrome||Pe.gecko)&&Js(n,o).getBoundingClientRect().left==h.right&&(g=!p),O<=0)return{node:n,offset:o+(g?1:0)};r=o+(g?1:0),s=O}}}return{node:n,offset:r>-1?r:l>0?n.nodeValue.length:0}}function K$(n,e,t,i=-1){var r,s;let l=n.contentDOM.getBoundingClientRect(),o=l.top+n.viewState.paddingTop,f,{docHeight:u}=n.viewState,{x:h,y:O}=e,p=O-o;if(p<0)return 0;if(p>u)return n.state.doc.length;for(let C=n.viewState.heightOracle.textHeight/2,X=!1;f=n.elementAtHeight(p),f.type!=Kt.Text;)for(;p=i>0?f.bottom+C:f.top-C,!(p>=0&&p<=u);){if(X)return t?null:0;X=!0,i=-i}O=o+p;let g=f.from;if(gn.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:Nm(n,l,f,h,O);let b=n.dom.ownerDocument,Q=n.root.elementFromPoint?n.root:b,$=Q.elementFromPoint(h,O);$&&!n.contentDOM.contains($)&&($=null),$||(h=Math.max(l.left+1,Math.min(l.right-1,h)),$=Q.elementFromPoint(h,O),$&&!n.contentDOM.contains($)&&($=null));let P,x=-1;if($&&((r=n.docView.nearest($))===null||r===void 0?void 0:r.isEditable)!=!1){if(b.caretPositionFromPoint){let C=b.caretPositionFromPoint(h,O);C&&({offsetNode:P,offset:x}=C)}else if(b.caretRangeFromPoint){let C=b.caretRangeFromPoint(h,O);C&&({startContainer:P,startOffset:x}=C,(!n.contentDOM.contains(P)||Pe.safari&&F4(P,x,h)||Pe.chrome&&G4(P,x,h))&&(P=void 0))}}if(!P||!n.docView.dom.contains(P)){let C=Ci.find(n.docView,g);if(!C)return p>f.top+f.height/2?f.to:f.from;({node:P,offset:x}=MO(C.dom,h,O))}let A=n.docView.nearest(P);if(!A)return null;if(A.isWidget&&((s=A.dom)===null||s===void 0?void 0:s.nodeType)==1){let C=A.dom.getBoundingClientRect();return e.yn.defaultLineHeight*1.5){let o=n.viewState.heightOracle.textHeight,f=Math.floor((r-t.top-(n.defaultLineHeight-o)*.5)/o);s+=f*n.viewState.heightOracle.lineLength}let l=n.state.sliceDoc(t.from,t.to);return t.from+_O(l,s,n.state.tabSize)}function F4(n,e,t){let i;if(n.nodeType!=3||e!=(i=n.nodeValue.length))return!1;for(let r=n.nextSibling;r;r=r.nextSibling)if(r.nodeType!=1||r.nodeName!="BR")return!1;return Js(n,i-1,i).getBoundingClientRect().left>t}function G4(n,e,t){if(e!=0)return!1;for(let r=n;;){let s=r.parentNode;if(!s||s.nodeType!=1||s.firstChild!=r)return!1;if(s.classList.contains("cm-line"))break;r=s}let i=n.nodeType==1?n.getBoundingClientRect():Js(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-i.left>5}function DO(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let i of t.type)if(i.to>e||i.to==e&&(i.to==t.to||i.type==Kt.Text))return i}return t}function H4(n,e,t,i){let r=DO(n,e.head),s=!i||r.type!=Kt.Text||!(n.lineWrapping||r.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(s){let l=n.dom.getBoundingClientRect(),o=n.textDirectionAt(r.from),f=n.posAtCoords({x:t==(o==Gt.LTR)?l.right-1:l.left+1,y:(s.top+s.bottom)/2});if(f!=null)return K.cursor(f,t?-1:1)}return K.cursor(t?r.to:r.from,t?-1:1)}function Lm(n,e,t,i){let r=n.state.doc.lineAt(e.head),s=n.bidiSpans(r),l=n.textDirectionAt(r.from);for(let o=e,f=null;;){let u=V4(r,s,l,o,t),h=F$;if(!u){if(r.number==(t?n.state.doc.lines:1))return o;h=` +`,r=n.state.doc.line(r.number+(t?1:-1)),s=n.bidiSpans(r),u=K.cursor(t?r.from:r.to)}if(f){if(!f(h))return o}else{if(!i)return u;f=i(h)}o=u}}function K4(n,e,t){let i=n.state.charCategorizer(e),r=i(t);return s=>{let l=i(s);return r==zt.Space&&(r=l),r==l}}function J4(n,e,t,i){let r=e.head,s=t?1:-1;if(r==(t?n.state.doc.length:0))return K.cursor(r,e.assoc);let l=e.goalColumn,o,f=n.contentDOM.getBoundingClientRect(),u=n.coordsAtPos(r),h=n.documentTop;if(u)l==null&&(l=u.left-f.left),o=s<0?u.top:u.bottom;else{let g=n.viewState.lineBlockAt(r);l==null&&(l=Math.min(f.right-f.left,n.defaultCharacterWidth*(r-g.from))),o=(s<0?g.top:g.bottom)+h}let O=f.left+l,p=i??n.viewState.heightOracle.textHeight>>1;for(let g=0;;g+=10){let b=o+(p+g)*s,Q=K$(n,{x:O,y:b},!1,s);if(bf.bottom||(s<0?Qr))return K.cursor(Q,e.assoc,void 0,l)}}function Kf(n,e,t){for(;;){let i=0;for(let r of n)r.between(e-1,e+1,(s,l,o)=>{if(e>s&&er(n)),t.from,e.head>t.from?-1:1);return i==t.from?t:K.cursor(i,i{this.ignoreDuringComposition(r)||r.type=="keydown"&&this.keydown(e,r)||(this.mustFlushObserver(r)&&e.observer.forceFlush(),this.runCustomHandlers(r.type,e,r)?r.preventDefault():i(e,r))};for(let i in ui){let r=ui[i];e.contentDOM.addEventListener(i,s=>{Bm(e,s)&&t(r,s)},zO[i]),this.registeredEvents.push(i)}e.scrollDOM.addEventListener("mousedown",i=>{if(i.target==e.scrollDOM&&i.clientY>e.contentDOM.getBoundingClientRect().bottom&&(t(ui.mousedown,i),!i.defaultPrevented&&i.button==2)){let r=e.contentDOM.style.minHeight;e.contentDOM.style.minHeight="100%",setTimeout(()=>e.contentDOM.style.minHeight=r,200)}}),e.scrollDOM.addEventListener("drop",i=>{i.target==e.scrollDOM&&i.clientY>e.contentDOM.getBoundingClientRect().bottom&&t(ui.drop,i)}),Pe.chrome&&Pe.chrome_version==102&&e.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=e.hasFocus,Pe.safari&&e.contentDOM.addEventListener("input",()=>null),Pe.gecko&&d3(e.contentDOM.ownerDocument)}ensureHandlers(e,t){var i;let r;this.customHandlers=[];for(let s of t)if(r=(i=s.update(e).spec)===null||i===void 0?void 0:i.domEventHandlers){this.customHandlers.push({plugin:s.value,handlers:r});for(let l in r)this.registeredEvents.indexOf(l)<0&&l!="scroll"&&(this.registeredEvents.push(l),e.contentDOM.addEventListener(l,o=>{Bm(e,o)&&this.runCustomHandlers(l,e,o)&&o.preventDefault()}))}}runCustomHandlers(e,t,i){for(let r of this.customHandlers){let s=r.handlers[e];if(s)try{if(s.call(r.plugin,i,t)||i.defaultPrevented)return!0}catch(l){kn(t.state,l)}}return!1}runScrollHandlers(e,t){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let i of this.customHandlers){let r=i.handlers.scroll;if(r)try{r.call(i.plugin,t,e)}catch(s){kn(e.state,s)}}}keydown(e,t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),t.keyCode==9&&Date.now()r.keyCode==t.keyCode))&&!t.ctrlKey||t3.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(this.pendingIOSKey=i||t,setTimeout(()=>this.flushIOSKey(e),250),!0):!1}flushIOSKey(e){let t=this.pendingIOSKey;return t?(this.pendingIOSKey=void 0,Zl(e.contentDOM,t.key,t.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:Pe.safari&&!Pe.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}mustFlushObserver(e){return e.type=="keydown"&&e.keyCode!=229}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const J$=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],t3="dthko",eQ=[16,17,18,20,91,92,224,225],kf=6;function _f(n){return Math.max(0,n)*.7+8}function i3(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class n3{constructor(e,t,i,r){this.view=e,this.startEvent=t,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=$4(e.contentDOM),this.atoms=e.state.facet(kd).map(l=>l(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(ut.allowMultipleSelections)&&r3(e,t),this.dragging=l3(e,t)&&rQ(t)==1?null:!1}start(e){this.dragging===!1&&(e.preventDefault(),this.select(e))}move(e){var t;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&i3(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let i=0,r=0,s=((t=this.scrollParent)===null||t===void 0?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},l=I$(this.view);e.clientX-l.left<=s.left+kf?i=-_f(s.left-e.clientX):e.clientX+l.right>=s.right-kf&&(i=_f(e.clientX-s.right)),e.clientY-l.top<=s.top+kf?r=-_f(s.top-e.clientY):e.clientY+l.bottom>=s.bottom-kf&&(r=_f(e.clientY-s.bottom)),this.setScrollSpeed(i,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let i=0;ithis.select(this.lastEvent),20)}}function r3(n,e){let t=n.state.facet(Z$);return t.length?t[0](e):Pe.mac?e.metaKey:e.ctrlKey}function s3(n,e){let t=n.state.facet(R$);return t.length?t[0](e):Pe.mac?!e.altKey:!e.ctrlKey}function l3(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let i=uc(n.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let s=0;s=e.clientX&&l.top<=e.clientY&&l.bottom>=e.clientY)return!0}return!1}function Bm(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,i;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(i=Yt.get(t))&&i.ignoreEvent(e))return!1;return!0}const ui=Object.create(null),zO=Object.create(null),tQ=Pe.ie&&Pe.ie_version<15||Pe.ios&&Pe.webkit_version<604;function o3(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),iQ(n,t.value)},50)}function iQ(n,e){let{state:t}=n,i,r=1,s=t.toText(e),l=s.lines==t.selection.ranges.length;if(IO!=null&&t.selection.ranges.every(f=>f.empty)&&IO==s.toString()){let f=-1;i=t.changeByRange(u=>{let h=t.doc.lineAt(u.from);if(h.from==f)return{range:u};f=h.from;let O=t.toText((l?s.line(r++).text:e)+t.lineBreak);return{changes:{from:h.from,insert:O},range:K.cursor(u.from+O.length)}})}else l?i=t.changeByRange(f=>{let u=s.line(r++);return{changes:{from:f.from,to:f.to,insert:u.text},range:K.cursor(f.from+u.length)}}):i=t.replaceSelection(s);n.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}ui.keydown=(n,e)=>{n.inputState.setSelectionOrigin("select"),e.keyCode==27&&(n.inputState.lastEscPress=Date.now())};ui.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};ui.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};zO.touchstart=zO.touchmove={passive:!0};ui.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return;let t=null;for(let i of n.state.facet(A$))if(t=i(n,e),t)break;if(!t&&e.button==0&&(t=c3(n,e)),t){let i=!n.hasFocus;n.inputState.startMouseSelection(new n3(n,e,t,i)),i&&n.observer.ignore(()=>Q$(n.contentDOM)),n.inputState.mouseSelection&&n.inputState.mouseSelection.start(e)}};function jm(n,e,t,i){if(i==1)return K.cursor(e,t);if(i==2)return L4(n.state,e,t);{let r=Ci.find(n.docView,e),s=n.state.doc.lineAt(r?r.posAtEnd:e),l=r?r.posAtStart:s.from,o=r?r.posAtEnd:s.to;return on>=e.top&&n<=e.bottom,Fm=(n,e,t)=>nQ(e,t)&&n>=t.left&&n<=t.right;function a3(n,e,t,i){let r=Ci.find(n.docView,e);if(!r)return 1;let s=e-r.posAtStart;if(s==0)return 1;if(s==r.length)return-1;let l=r.coordsAt(s,-1);if(l&&Fm(t,i,l))return-1;let o=r.coordsAt(s,1);return o&&Fm(t,i,o)?1:l&&nQ(i,l)?-1:1}function Gm(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:a3(n,t,e.clientX,e.clientY)}}const f3=Pe.ie&&Pe.ie_version<=11;let Hm=null,Km=0,Jm=0;function rQ(n){if(!f3)return n.detail;let e=Hm,t=Jm;return Hm=n,Jm=Date.now(),Km=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(Km+1)%3:1}function c3(n,e){let t=Gm(n,e),i=rQ(e),r=n.state.selection;return{update(s){s.docChanged&&(t.pos=s.changes.mapPos(t.pos),r=r.map(s.changes))},get(s,l,o){let f=Gm(n,s),u,h=jm(n,f.pos,f.bias,i);if(t.pos!=f.pos&&!l){let O=jm(n,t.pos,t.bias,i),p=Math.min(O.from,h.from),g=Math.max(O.to,h.to);h=p1&&(u=u3(r,f.pos))?u:o?r.addRange(h):K.create([h])}}}function u3(n,e){for(let t=0;t=e)return K.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}ui.dragstart=(n,e)=>{let{selection:{main:t}}=n.state,{mouseSelection:i}=n.inputState;i&&(i.dragging=t),e.dataTransfer&&(e.dataTransfer.setData("Text",n.state.sliceDoc(t.from,t.to)),e.dataTransfer.effectAllowed="copyMove")};function e1(n,e,t,i){if(!t)return;let r=n.posAtCoords({x:e.clientX,y:e.clientY},!1);e.preventDefault();let{mouseSelection:s}=n.inputState,l=i&&s&&s.dragging&&s3(n,e)?{from:s.dragging.from,to:s.dragging.to}:null,o={from:r,insert:t},f=n.state.changes(l?[l,o]:o);n.focus(),n.dispatch({changes:f,selection:{anchor:f.mapPos(r,-1),head:f.mapPos(r,1)},userEvent:l?"move.drop":"input.drop"})}ui.drop=(n,e)=>{if(!e.dataTransfer)return;if(n.state.readOnly)return e.preventDefault();let t=e.dataTransfer.files;if(t&&t.length){e.preventDefault();let i=Array(t.length),r=0,s=()=>{++r==t.length&&e1(n,e,i.filter(l=>l!=null).join(n.state.lineBreak),!1)};for(let l=0;l{/[\x00-\x08\x0e-\x1f]{2}/.test(o.result)||(i[l]=o.result),s()},o.readAsText(t[l])}}else e1(n,e,e.dataTransfer.getData("Text"),!0)};ui.paste=(n,e)=>{if(n.state.readOnly)return e.preventDefault();n.observer.flush();let t=tQ?null:e.clipboardData;t?(iQ(n,t.getData("text/plain")||t.getData("text/uri-text")),e.preventDefault()):o3(n)};function h3(n,e){let t=n.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),n.focus()},50)}function O3(n){let e=[],t=[],i=!1;for(let r of n.selection.ranges)r.empty||(e.push(n.sliceDoc(r.from,r.to)),t.push(r));if(!e.length){let r=-1;for(let{from:s}of n.selection.ranges){let l=n.doc.lineAt(s);l.number>r&&(e.push(l.text),t.push({from:l.from,to:Math.min(n.doc.length,l.to+1)})),r=l.number}i=!0}return{text:e.join(n.lineBreak),ranges:t,linewise:i}}let IO=null;ui.copy=ui.cut=(n,e)=>{let{text:t,ranges:i,linewise:r}=O3(n.state);if(!t&&!r)return;IO=r?t:null;let s=tQ?null:e.clipboardData;s?(e.preventDefault(),s.clearData(),s.setData("text/plain",t)):h3(n,t),e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"})};const sQ=Gr.define();function lQ(n,e){let t=[];for(let i of n.facet(V$)){let r=i(n,e);r&&t.push(r)}return t?n.update({effects:t,annotations:sQ.of(!0)}):null}function oQ(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=lQ(n.state,e);t?n.dispatch(t):n.update([])}},10)}ui.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),oQ(n)};ui.blur=n=>{n.observer.clearSelectionRange(),oQ(n)};ui.compositionstart=ui.compositionupdate=n=>{n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0)};ui.compositionend=n=>{n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,Pe.chrome&&Pe.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50)};ui.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};ui.beforeinput=(n,e)=>{var t;let i;if(Pe.chrome&&Pe.android&&(i=J$.find(r=>r.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let r=((t=window.visualViewport)===null||t===void 0?void 0:t.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>r+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}};const t1=new Set;function d3(n){t1.has(n)||(t1.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const i1=["pre-wrap","normal","pre-line","break-spaces"];class p3{constructor(e){this.lineWrapping=e,this.doc=St.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return i1.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i-1,f=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=i,this.textHeight=r,this.lineLength=s,f){this.heightSamples={};for(let u=0;u0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>Jf&&(e.heightChanged=!0),this.height=t)}replace(e,t,i){return Ki.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,r){let s=this,l=i.doc;for(let o=r.length-1;o>=0;o--){let{fromA:f,toA:u,fromB:h,toB:O}=r[o],p=s.lineAt(f,At.ByPosNoHeight,i.setDoc(t),0,0),g=p.to>=u?p:s.lineAt(u,At.ByPosNoHeight,i,0,0);for(O+=g.to-u,u=g.to;o>0&&p.from<=r[o-1].toA;)f=r[o-1].fromA,h=r[o-1].fromB,o--,fs*2){let o=e[t-1];o.break?e.splice(--t,1,o.left,null,o.right):e.splice(--t,1,o.left,o.right),i+=1+o.break,r-=o.size}else if(s>r*2){let o=e[i];o.break?e.splice(i,1,o.left,null,o.right):e.splice(i,1,o.left,o.right),i+=2+o.break,s-=o.size}else break;else if(r=s&&l(this.blockAt(0,i,r,s))}updateHeight(e,t=0,i=!1,r){return r&&r.from<=t&&r.more&&this.setHeight(e,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class wn extends aQ{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,i,r){return new wr(r,this.length,i,this.height,this.breaks)}replace(e,t,i){let r=i[0];return i.length==1&&(r instanceof wn||r instanceof xi&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof xi?r=new wn(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):Ki.of(i)}updateHeight(e,t=0,i=!1,r){return r&&r.from<=t&&r.more?this.setHeight(e,r.heights[r.index++]):(i||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class xi extends Ki{constructor(e){super(e,0)}heightMetrics(e,t){let i=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,s=r-i+1,l,o=0;if(e.lineWrapping){let f=Math.min(this.height,e.lineHeight*s);l=f/s,this.length>s+1&&(o=(this.height-f)/(this.length-s-1))}else l=this.height/s;return{firstLine:i,lastLine:r,perLine:l,perChar:o}}blockAt(e,t,i,r){let{firstLine:s,lastLine:l,perLine:o,perChar:f}=this.heightMetrics(t,r);if(t.lineWrapping){let u=r+Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length),h=t.doc.lineAt(u),O=o+h.length*f,p=Math.max(i,e-O/2);return new wr(h.from,h.length,p,O,0)}else{let u=Math.max(0,Math.min(l-s,Math.floor((e-i)/o))),{from:h,length:O}=t.doc.line(s+u);return new wr(h,O,i+o*u,o,0)}}lineAt(e,t,i,r,s){if(t==At.ByHeight)return this.blockAt(e,i,r,s);if(t==At.ByPosNoHeight){let{from:g,to:b}=i.doc.lineAt(e);return new wr(g,b-g,0,0,0)}let{firstLine:l,perLine:o,perChar:f}=this.heightMetrics(i,s),u=i.doc.lineAt(e),h=o+u.length*f,O=u.number-l,p=r+o*O+f*(u.from-s-O);return new wr(u.from,u.length,Math.max(r,Math.min(p,r+this.height-h)),h,0)}forEachLine(e,t,i,r,s,l){e=Math.max(e,s),t=Math.min(t,s+this.length);let{firstLine:o,perLine:f,perChar:u}=this.heightMetrics(i,s);for(let h=e,O=r;h<=t;){let p=i.doc.lineAt(h);if(h==e){let b=p.number-o;O+=f*b+u*(e-s-b)}let g=f+u*p.length;l(new wr(p.from,p.length,O,g,0)),O+=g,h=p.to+1}}replace(e,t,i){let r=this.length-t;if(r>0){let s=i[i.length-1];s instanceof xi?i[i.length-1]=new xi(s.length+r):i.push(null,new xi(r-1))}if(e>0){let s=i[0];s instanceof xi?i[0]=new xi(e+s.length):i.unshift(new xi(e-1),null)}return Ki.of(i)}decomposeLeft(e,t){t.push(new xi(e-1),null)}decomposeRight(e,t){t.push(null,new xi(this.length-e-1))}updateHeight(e,t=0,i=!1,r){let s=t+this.length;if(r&&r.from<=t+this.length&&r.more){let l=[],o=Math.max(t,r.from),f=-1;for(r.from>t&&l.push(new xi(r.from-t-1).updateHeight(e,t));o<=s&&r.more;){let h=e.doc.lineAt(o).length;l.length&&l.push(null);let O=r.heights[r.index++];f==-1?f=O:Math.abs(O-f)>=Jf&&(f=-2);let p=new wn(h,O);p.outdated=!1,l.push(p),o+=h+1}o<=s&&l.push(null,new xi(s-o).updateHeight(e,o));let u=Ki.of(l);return(f<0||Math.abs(u.height-this.height)>=Jf||Math.abs(f-this.heightMetrics(e,t).perLine)>=Jf)&&(e.heightChanged=!0),u}else(i||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class m3 extends Ki{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,t,i,r){let s=i+this.left.height;return eo))return u;let h=t==At.ByPosNoHeight?At.ByPosNoHeight:At.ByPos;return f?u.join(this.right.lineAt(o,h,i,l,o)):this.left.lineAt(o,h,i,r,s).join(u)}forEachLine(e,t,i,r,s,l){let o=r+this.left.height,f=s+this.left.length+this.break;if(this.break)e=f&&this.right.forEachLine(e,t,i,o,f,l);else{let u=this.lineAt(f,At.ByPos,i,r,s);e=e&&u.from<=t&&l(u),t>u.to&&this.right.forEachLine(u.to+1,t,i,o,f,l)}}replace(e,t,i){let r=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,i));let s=[];e>0&&this.decomposeLeft(e,s);let l=s.length;for(let o of i)s.push(o);if(e>0&&n1(s,l-1),t=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e2*t.size||t.size>2*e.size?Ki.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,r){let{left:s,right:l}=this,o=t+s.length+this.break,f=null;return r&&r.from<=t+s.length&&r.more?f=s=s.updateHeight(e,t,i,r):s.updateHeight(e,t,i),r&&r.from<=o+l.length&&r.more?f=l=l.updateHeight(e,o,i,r):l.updateHeight(e,o,i),f?this.balanced(s,l):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function n1(n,e){let t,i;n[e]==null&&(t=n[e-1])instanceof xi&&(i=n[e+1])instanceof xi&&n.splice(e-1,3,new xi(t.length+1+i.length))}const S3=5;class _d{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let i=Math.min(t,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof wn?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new wn(i-this.pos,-1)),this.writtenTo=i,t>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e=S3)&&this.addLineDeco(r,s,l)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new wn(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new xi(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof wn)return e;let t=new wn(0,-1);return this.nodes.push(t),t}addBlock(e){var t;this.enterLine();let i=(t=e.deco)===null||t===void 0?void 0:t.type;i==Kt.WidgetAfter&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,i!=Kt.WidgetBefore&&(this.covering=e)}addLineDeco(e,t,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+i}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof wn)&&!this.isCovered?this.nodes.push(new wn(0,-1)):(this.writtenToh.clientHeight||h.scrollWidth>h.clientWidth)&&O.overflow!="visible"){let p=h.getBoundingClientRect();s=Math.max(s,p.left),l=Math.min(l,p.right),o=Math.max(o,p.top),f=u==n.parentNode?p.bottom:Math.min(f,p.bottom)}u=O.position=="absolute"||O.position=="fixed"?h.offsetParent:h.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:s-t.left,right:Math.max(s,l)-t.left,top:o-(t.top+e),bottom:Math.max(o,f)-(t.top+e)}}function w3(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Eh{constructor(e,t,i){this.from=e,this.to=t,this.size=i}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new p3(t),this.stateDeco=e.facet(Fo).filter(i=>typeof i!="function"),this.heightMap=Ki.empty().applyChanges(this.stateDeco,St.empty,this.heightOracle.setDoc(e.doc),[new zn(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ze.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let r=i?t.head:t.anchor;if(!e.some(({from:s,to:l})=>r>=s&&r<=l)){let{from:s,to:l}=this.lineBlockAt(r);e.push(new Wf(s,l))}}this.viewports=e.sort((i,r)=>i.from-r.from),this.scaler=this.heightMap.height<=7e6?s1:new k3(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:Xo(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Fo).filter(h=>typeof h!="function");let r=e.changedRanges,s=zn.extendWithRanges(r,b3(i,this.stateDeco,e?e.changes:bi.empty(this.state.doc.length))),l=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),this.heightMap.height!=l&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let f=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headf.to)||!this.viewportIsAppropriate(f))&&(f=this.getViewport(0,t));let u=!e.changes.empty||e.flags&2||f.from!=this.viewport.from||f.to!=this.viewport.to;this.viewport=f,this.updateForViewport(),u&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(E$)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,i=window.getComputedStyle(t),r=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?Gt.RTL:Gt.LTR;let l=this.heightOracle.mustRefreshForWrapping(s),o=t.getBoundingClientRect(),f=l||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let u=0,h=0;if(o.width&&o.height){let C=o.width/t.offsetWidth,X=o.height/t.offsetHeight;C>.995&&C<1.005&&(C=1),X>.995&&X<1.005&&(X=1),(this.scaleX!=C||this.scaleY!=X)&&(this.scaleX=C,this.scaleY=X,u|=8,l=f=!0)}let O=(parseInt(i.paddingTop)||0)*this.scaleY,p=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=O||this.paddingBottom!=p)&&(this.paddingTop=O,this.paddingBottom=p,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(f=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8);let g=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=g&&(this.scrollAnchorHeight=-1,this.scrollTop=g),this.scrolledToBottom=y$(e.scrollDOM);let b=(this.printing?w3:Q3)(t,this.paddingTop),Q=b.top-this.pixelViewport.top,$=b.bottom-this.pixelViewport.bottom;this.pixelViewport=b;let P=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(P!=this.inView&&(this.inView=P,P&&(f=!0)),!this.inView&&!this.scrollTarget)return 0;let x=o.width;if((this.contentDOMWidth!=x||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),f){let C=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(C)&&(l=!0),l||r.lineWrapping&&Math.abs(x-this.contentDOMWidth)>r.charWidth){let{lineHeight:X,charWidth:Z,textHeight:I}=e.docView.measureTextSize();l=X>0&&r.refresh(s,X,Z,I,x/Z,C),l&&(e.docView.minWidth=0,u|=8)}Q>0&&$>0?h=Math.max(Q,$):Q<0&&$<0&&(h=Math.min(Q,$)),r.heightChanged=!1;for(let X of this.viewports){let Z=X.from==this.viewport.from?C:e.docView.measureVisibleLineHeights(X);this.heightMap=(l?Ki.empty().applyChanges(this.stateDeco,St.empty,this.heightOracle,[new zn(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,l,new g3(X.from,Z))}r.heightChanged&&(u|=2)}let A=!this.viewportIsAppropriate(this.viewport,h)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return A&&(this.viewport=this.getViewport(h,this.scrollTarget)),this.updateForViewport(),(u&2||A)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(l?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,s=this.heightOracle,{visibleTop:l,visibleBottom:o}=this,f=new Wf(r.lineAt(l-i*1e3,At.ByHeight,s,0,0).from,r.lineAt(o+(1-i)*1e3,At.ByHeight,s,0,0).to);if(t){let{head:u}=t.range;if(uf.to){let h=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),O=r.lineAt(u,At.ByPos,s,0,0),p;t.y=="center"?p=(O.top+O.bottom)/2-h/2:t.y=="start"||t.y=="nearest"&&u=o+Math.max(10,Math.min(i,250)))&&r>l-2*1e3&&s>1,l=r<<1;if(this.defaultTextDirection!=Gt.LTR&&!i)return[];let o=[],f=(u,h,O,p)=>{if(h-uu&&$$.from>=O.from&&$.to<=O.to&&Math.abs($.from-u)$.fromP));if(!Q){if(h$.from<=h&&$.to>=h)){let $=t.moveToLineBoundary(K.cursor(h),!1,!0).head;$>u&&(h=$)}Q=new Eh(u,h,this.gapSize(O,u,h,p))}o.push(Q)};for(let u of this.viewportLines){if(u.lengthu.from&&f(u.from,p,u,h),gt.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];Qt.spans(e,this.viewport.from,this.viewport.to,{span(r,s){t.push({from:r,to:s})},point(){}},20);let i=t.length!=this.visibleRanges.length||this.visibleRanges.some((r,s)=>r.from!=t[s].from||r.to!=t[s].to);return this.visibleRanges=t,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Xo(this.heightMap.lineAt(e,At.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return Xo(this.heightMap.lineAt(this.scaler.fromDOM(e),At.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Xo(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Wf{constructor(e,t){this.from=e,this.to=t}}function v3(n,e,t){let i=[],r=n,s=0;return Qt.spans(t,n,e,{span(){},point(l,o){l>r&&(i.push({from:r,to:l}),s+=l-r),r=o}},20),r=1)return e[e.length-1].to;let i=Math.floor(n*t);for(let r=0;;r++){let{from:s,to:l}=e[r],o=l-s;if(i<=o)return s+i;i-=o}}function Cf(n,e){let t=0;for(let{from:i,to:r}of n.ranges){if(e<=r){t+=e-i;break}t+=r-i}return t/n.total}function P3(n,e){for(let t of n)if(e(t))return t}const s1={toDOM(n){return n},fromDOM(n){return n},scale:1};class k3{constructor(e,t,i){let r=0,s=0,l=0;this.viewports=i.map(({from:o,to:f})=>{let u=t.lineAt(o,At.ByPos,e,0,0).top,h=t.lineAt(f,At.ByPos,e,0,0).bottom;return r+=h-u,{from:o,to:f,top:u,bottom:h,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let o of this.viewports)o.domTop=l+(o.top-s)*this.scale,l=o.domBottom=o.domTop+(o.bottom-o.top),s=o.bottom}toDOM(e){for(let t=0,i=0,r=0;;t++){let s=tXo(r,e)):n._content)}const Xf=ye.define({combine:n=>n.join(" ")}),NO=ye.define({combine:n=>n.indexOf(!0)>-1}),LO=ys.newName(),fQ=ys.newName(),cQ=ys.newName(),uQ={"&light":"."+fQ,"&dark":"."+cQ};function BO(n,e,t){return new ys(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return n;if(!t||!t[r])throw new RangeError(`Unsupported selector: ${r}`);return t[r]}):n+" "+i}})}const _3=BO("."+LO,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},uQ),To="￿";class W3{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(ut.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=To}readRange(e,t){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r);let s=this.text.length;this.readNode(r);let l=r.nextSibling;if(l==t)break;let o=Yt.get(r),f=Yt.get(l);(o&&f?o.breakAfter:(o?o.breakAfter:l1(r))||l1(l)&&(r.nodeName!="BR"||r.cmIgnore)&&this.text.length>s)&&this.lineBreak(),r=l}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,l=1,o;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,i),l=this.lineSeparator.length):(o=r.exec(t))&&(s=o.index,l=o[0].length),this.append(t.slice(i,s<0?t.length:s)),s<0)break;if(this.lineBreak(),l>1)for(let f of this.points)f.node==e&&f.pos>this.text.length&&(f.pos-=l-1);i=s+l}}readNode(e){if(e.cmIgnore)return;let t=Yt.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+Math.min(t,i.offset))}}function l1(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}class o1{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class x3{constructor(e,t,i,r){this.typeOver=r,this.bounds=null,this.text="";let{impreciseHead:s,impreciseAnchor:l}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,i,0))){let o=s||l?[]:T3(e),f=new W3(o,e.state);f.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=f.text,this.newSel=Z3(o,this.bounds.from)}else{let o=e.observer.selectionRange,f=s&&s.node==o.focusNode&&s.offset==o.focusOffset||!CO(e.contentDOM,o.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(o.focusNode,o.focusOffset),u=l&&l.node==o.anchorNode&&l.offset==o.anchorOffset||!CO(e.contentDOM,o.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(o.anchorNode,o.anchorOffset);this.newSel=K.single(u,f)}}}function hQ(n,e){let t,{newSel:i}=e,r=n.state.selection.main,s=n.inputState.lastKeyTime>Date.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:l,to:o}=e.bounds,f=r.from,u=null;(s===8||Pe.android&&e.text.length=r.from&&t.to<=r.to&&(t.from!=r.from||t.to!=r.to)&&r.to-r.from-(t.to-t.from)<=4?t={from:r.from,to:r.to,insert:n.state.doc.slice(r.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,r.to))}:(Pe.mac||Pe.android)&&t&&t.from==t.to&&t.from==r.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(i&&t.insert.length==2&&(i=K.single(i.main.anchor-1,i.main.head-1)),t={from:r.from,to:r.to,insert:St.of([" "])}):Pe.chrome&&t&&t.from==t.to&&t.from==r.head&&t.insert.toString()==` + `&&n.lineWrapping&&(i&&(i=K.single(i.main.anchor-1,i.main.head-1)),t={from:r.from,to:r.to,insert:St.of([" "])}),t){if(Pe.ios&&n.inputState.flushIOSKey(n)||Pe.android&&(t.from==r.from&&t.to==r.to&&t.insert.length==1&&t.insert.lines==2&&Zl(n.contentDOM,"Enter",13)||(t.from==r.from-1&&t.to==r.to&&t.insert.length==0||s==8&&t.insert.lengthr.head)&&Zl(n.contentDOM,"Backspace",8)||t.from==r.from&&t.to==r.to+1&&t.insert.length==0&&Zl(n.contentDOM,"Delete",46)))return!0;let l=t.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let o,f=()=>o||(o=C3(n,t,i));return n.state.facet(Y$).some(u=>u(n,t.from,t.to,l,f))||n.dispatch(f()),!0}else if(i&&!i.main.eq(r)){let l=!1,o="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(l=!0),o=n.inputState.lastSelectionOrigin),n.dispatch({selection:i,scrollIntoView:l,userEvent:o}),!0}else return!1}function C3(n,e,t){let i,r=n.state,s=r.selection.main;if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let o=s.frome.to?r.sliceDoc(e.to,s.to):"";i=r.replaceSelection(n.state.toText(o+e.insert.sliceString(0,void 0,n.state.lineBreak)+f))}else{let o=r.changes(e),f=t&&t.main.to<=o.newLength?t.main:void 0;if(r.selection.ranges.length>1&&n.inputState.composing>=0&&e.to<=s.to&&e.to>=s.to-10){let u=n.state.sliceDoc(e.from,e.to),h,O=t&&G$(n,t.main.head);if(O){let b=e.insert.length-(e.to-e.from);h={from:O.from,to:O.to-b}}else h=n.state.doc.lineAt(s.head);let p=s.to-e.to,g=s.to-s.from;i=r.changeByRange(b=>{if(b.from==s.from&&b.to==s.to)return{changes:o,range:f||b.map(o)};let Q=b.to-p,$=Q-u.length;if(b.to-b.from!=g||n.state.sliceDoc($,Q)!=u||b.to>=h.from&&b.from<=h.to)return{range:b};let P=r.changes({from:$,to:Q,insert:e.insert}),x=b.to-s.to;return{changes:P,range:f?K.range(Math.max(0,f.anchor+x),Math.max(0,f.head+x)):b.map(P)}})}else i={changes:o,selection:f&&r.selection.replaceRange(f)}}let l="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,l+=".compose",n.inputState.compositionFirstChange&&(l+=".start",n.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:l,scrollIntoView:!0})}function X3(n,e,t,i){let r=Math.min(n.length,e.length),s=0;for(;s0&&o>0&&n.charCodeAt(l-1)==e.charCodeAt(o-1);)l--,o--;if(i=="end"){let f=Math.max(0,s-Math.min(l,o));t-=l+f-s}if(l=l?s-t:0;s-=f,o=s+(o-l),l=s}else if(o=o?s-t:0;s-=f,l=s+(l-o),o=s}return{from:s,toA:l,toB:o}}function T3(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:r,focusOffset:s}=n.observer.selectionRange;return t&&(e.push(new o1(t,i)),(r!=t||s!=i)&&e.push(new o1(r,s))),e}function Z3(n,e){if(n.length==0)return null;let t=n[0].pos,i=n.length==2?n[1].pos:t;return t>-1&&i>-1?K.single(t+e,i+e):null}const R3={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Mh=Pe.ie&&Pe.ie_version<=11;class A3{constructor(e){this.view=e,this.active=!1,this.selectionRange=new Q4,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let i of t)this.queue.push(i);(Pe.ie&&Pe.ie_version<=11||Pe.ios&&e.composing)&&t.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),Mh&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)this.view.requestMeasure()),this.resizeContent.observe(e.contentDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runScrollHandlers(this.view,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,i)=>t!=e[i]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(Fc)?i.root.activeElement!=this.dom:!Hf(i.dom,r))return;let s=r.anchorNode&&i.docView.nearest(r.anchorNode);if(s&&s.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Pe.ie&&Pe.ie_version<=11||Pe.android&&Pe.chrome)&&!i.state.selection.main.empty&&r.focusNode&&hc(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Pe.safari&&e.root.nodeType==11&&m4(this.dom.ownerDocument)==this.dom&&U3(this.view)||uc(e.root);if(!t||this.selectionRange.eq(t))return!1;let i=Hf(this.dom,t);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Zl(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,i=-1,r=!1;for(let s of e){let l=this.readMutation(s);l&&(l.typeOver&&(r=!0),t==-1?{from:t,to:i}=l:(t=Math.min(l.from,t),i=Math.max(l.to,i)))}return{from:t,to:i,typeOver:r}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),r=this.selectionChanged&&Hf(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new x3(this.view,e,t,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return!1;let i=this.view.state,r=hQ(this.view,t);return this.view.state==i&&this.view.update([]),r}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let i=a1(t,e.previousSibling||e.target.previousSibling,-1),r=a1(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,i,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect(),(r=this.resizeContent)===null||r===void 0||r.disconnect();for(let s of this.scrollTargets)s.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function a1(n,e,t){for(;e;){let i=Yt.get(e);if(i&&i.parent==n)return i;let r=e.parentNode;e=r!=n.dom?r:t>0?e.nextSibling:e.previousSibling}return null}function U3(n){let e=null;function t(f){f.preventDefault(),f.stopImmediatePropagation(),e=f.getTargetRanges()[0]}if(n.contentDOM.addEventListener("beforeinput",t,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",t,!0),!e)return null;let i=e.startContainer,r=e.startOffset,s=e.endContainer,l=e.endOffset,o=n.docView.domAtPos(n.state.selection.main.anchor);return hc(o.node,o.offset,s,l)&&([i,r,s,l]=[s,l,i,r]),{anchorNode:i,anchorOffset:r,focusNode:s,focusOffset:l}}class me{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(i=>i.forEach(r=>t(r,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||w4(e.parent)||document,this.viewState=new r1(e.state||ut.create(e)),this.plugins=this.state.facet(xo).map(i=>new Yh(i));for(let i of this.plugins)i.update(this);this.observer=new A3(this),this.inputState=new e3(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new Em(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}dispatch(...e){let t=e.length==1&&e[0]instanceof $i?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,r,s=this.state;for(let p of e){if(p.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=p.state}if(this.destroyed){this.viewState.state=s;return}let l=this.hasFocus,o=0,f=null;e.some(p=>p.annotation(sQ))?(this.inputState.notifiedFocused=l,o=1):l!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=l,f=lQ(s,l),f||(o=1));let u=this.observer.delayedAndroidKey,h=null;if(u?(this.observer.clearDelayedAndroidKey(),h=this.observer.readChange(),(h&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(h=null)):this.observer.clear(),s.facet(ut.phrases)!=this.state.facet(ut.phrases))return this.setState(s);r=pc.create(this,s,e),r.flags|=o;let O=this.viewState.scrollTarget;try{this.updateState=2;for(let p of e){if(O&&(O=O.map(p.changes)),p.scrollIntoView){let{main:g}=p.state.selection;O=new dc(g.empty?g:K.cursor(g.head,g.head>g.anchor?-1:1))}for(let g of p.effects)g.is(Vm)&&(O=g.value)}this.viewState.update(r,O),this.bidiCache=gc.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),t=this.docView.update(r),this.state.facet(Co)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(p=>p.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(Xf)!=r.state.facet(Xf)&&(this.viewState.mustMeasureContent=!0),(t||i||O||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!r.empty)for(let p of this.state.facet(YO))p(r);(f||h)&&Promise.resolve().then(()=>{f&&this.state==f.startState&&this.dispatch(f),h&&!hQ(this,h)&&u.force&&Zl(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new r1(e),this.plugins=e.facet(xo).map(i=>new Yh(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView=new Em(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(xo),i=e.state.facet(xo);if(t!=i){let r=[];for(let s of i){let l=t.indexOf(s);if(l<0)r.push(new Yh(s));else{let o=this.plugins[l];o.mustUpdate=e,r.push(o)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=r,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,i=this.scrollDOM,r=i.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:l}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(l=-1),this.viewState.scrollAnchorHeight=-1;try{for(let o=0;;o++){if(l<0)if(y$(i))s=-1,l=this.viewState.heightMap.height;else{let g=this.viewState.scrollAnchorAt(r);s=g.from,l=g.top}this.updateState=1;let f=this.viewState.measure(this);if(!f&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(o>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];f&4||([this.measureRequests,u]=[u,this.measureRequests]);let h=u.map(g=>{try{return g.read(this)}catch(b){return kn(this.state,b),f1}}),O=pc.create(this,this.state,[]),p=!1;O.flags|=f,t?t.flags|=f:t=O,this.updateState=2,O.empty||(this.updatePlugins(O),this.inputState.update(O),this.updateAttrs(),p=this.docView.update(O));for(let g=0;g1||b<-1){r=r+b,i.scrollTop=r/this.scaleY,l=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let o of this.state.facet(YO))o(t)}get themeClasses(){return LO+" "+(this.state.facet(NO)?cQ:fQ)+" "+this.state.facet(Xf)}updateAttrs(){let e=c1(this,M$,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Fc)?"true":"false",class:"cm-content",style:`${Pe.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),c1(this,Pd,t);let i=this.observer.ignore(()=>{let r=AO(this.contentDOM,this.contentAttrs,t),s=AO(this.dom,this.editorAttrs,e);return r||s});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let r of i.effects)if(r.is(me.announce)){t&&(this.announceDOM.textContent=""),t=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(Co);let e=this.state.facet(me.cspNonce);ys.mount(this.root,this.styleModules.concat(_3).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;ti.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return qh(this,e,Lm(this,e,t,i))}moveByGroup(e,t){return qh(this,e,Lm(this,e,t,i=>K4(this,e.head,i)))}moveToLineBoundary(e,t,i=!0){return H4(this,e,t,i)}moveVertically(e,t,i){return qh(this,e,J4(this,e,t,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),K$(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.docView.coordsAt(e,t);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(e),s=this.bidiSpans(r),l=s[bs.find(s,e-r.from,-1,t)];return wd(i,l.dir==Gt.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(q$)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Y3)return j$(e.length);let t=this.textDirectionAt(e.from),i;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t&&(s.fresh||B$(s.isolates,i=qm(this,e.from,e.to))))return s.order;i||(i=qm(this,e.from,e.to));let r=Y4(e.text,t,i);return this.bidiCache.push(new gc(e.from,e.to,t,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Pe.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Q$(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Vm.of(new dc(typeof e=="number"?K.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}static domEventHandlers(e){return hi.define(()=>({}),{eventHandlers:e})}static theme(e,t){let i=ys.newName(),r=[Xf.of(i),Co.of(BO(`.${i}`,e))];return t&&t.dark&&r.push(NO.of(!0)),r}static baseTheme(e){return tl.lowest(Co.of(BO("."+LO,e,uQ)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),r=i&&Yt.get(i)||Yt.get(e);return((t=r==null?void 0:r.rootView)===null||t===void 0?void 0:t.view)||null}}me.styleModule=Co;me.inputHandler=Y$;me.focusChangeEffect=V$;me.perLineTextDirection=q$;me.exceptionSink=U$;me.updateListener=YO;me.editable=Fc;me.mouseSelectionStyle=A$;me.dragMovesSelection=R$;me.clickAddsSelectionRange=Z$;me.decorations=Fo;me.atomicRanges=kd;me.bidiIsolatedRanges=D$;me.scrollMargins=z$;me.darkTheme=NO;me.cspNonce=ye.define({combine:n=>n.length?n[0]:""});me.contentAttributes=Pd;me.editorAttributes=M$;me.lineWrapping=me.contentAttributes.of({class:"cm-lineWrapping"});me.announce=Ie.define();const Y3=4096,f1={};class gc{constructor(e,t,i,r,s,l){this.from=e,this.to=t,this.dir=i,this.isolates=r,this.fresh=s,this.order=l}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:Gt.LTR;for(let s=Math.max(0,e.length-10);s=0;r--){let s=i[r],l=typeof s=="function"?s(n):s;l&&RO(l,t)}return t}const V3=Pe.mac?"mac":Pe.windows?"win":Pe.linux?"linux":"key";function q3(n,e){const t=n.split(/-(?!$)/);let i=t[t.length-1];i=="Space"&&(i=" ");let r,s,l,o;for(let f=0;fi.concat(r),[]))),t}function M3(n,e,t){return dQ(OQ(n.state),e,n,t)}let gs=null;const D3=4e3;function z3(n,e=V3){let t=Object.create(null),i=Object.create(null),r=(l,o)=>{let f=i[l];if(f==null)i[l]=o;else if(f!=o)throw new Error("Key binding "+l+" is used both as a regular binding and as a multi-stroke prefix")},s=(l,o,f,u,h)=>{var O,p;let g=t[l]||(t[l]=Object.create(null)),b=o.split(/ (?!$)/).map(P=>q3(P,e));for(let P=1;P{let C=gs={view:A,prefix:x,scope:l};return setTimeout(()=>{gs==C&&(gs=null)},D3),!0}]})}let Q=b.join(" ");r(Q,!1);let $=g[Q]||(g[Q]={preventDefault:!1,stopPropagation:!1,run:((p=(O=g._any)===null||O===void 0?void 0:O.run)===null||p===void 0?void 0:p.slice())||[]});f&&$.run.push(f),u&&($.preventDefault=!0),h&&($.stopPropagation=!0)};for(let l of n){let o=l.scope?l.scope.split(" "):["editor"];if(l.any)for(let u of o){let h=t[u]||(t[u]=Object.create(null));h._any||(h._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let O in h)h[O].run.push(l.any)}let f=l[e]||l.key;if(f)for(let u of o)s(u,f,l.run,l.preventDefault,l.stopPropagation),l.shift&&s(u,"Shift-"+f,l.shift,l.preventDefault,l.stopPropagation)}return t}function dQ(n,e,t,i){let r=g4(e),s=Xi(r,0),l=yn(s)==r.length&&r!=" ",o="",f=!1,u=!1,h=!1;gs&&gs.view==t&&gs.scope==i&&(o=gs.prefix+" ",eQ.indexOf(e.keyCode)<0&&(u=!0,gs=null));let O=new Set,p=$=>{if($){for(let P of $.run)if(!O.has(P)&&(O.add(P),P(t,e)))return $.stopPropagation&&(h=!0),!0;$.preventDefault&&($.stopPropagation&&(h=!0),u=!0)}return!1},g=n[i],b,Q;return g&&(p(g[o+Tf(r,e,!l)])?f=!0:l&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Pe.windows&&e.ctrlKey&&e.altKey)&&(b=vs[e.keyCode])&&b!=r?(p(g[o+Tf(b,e,!0)])||e.shiftKey&&(Q=Bo[e.keyCode])!=r&&Q!=b&&p(g[o+Tf(Q,e,!1)]))&&(f=!0):l&&e.shiftKey&&p(g[o+Tf(r,e,!0)])&&(f=!0),!f&&p(g._any)&&(f=!0)),u&&(f=!0),f&&h&&e.stopPropagation(),f}class ca{constructor(e,t,i,r,s){this.className=e,this.left=t,this.top=i,this.width=r,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let s=pQ(e);return[new ca(t,r.left-s.left,r.top-s.top,null,r.bottom-r.top)]}else return I3(e,t,i)}}function pQ(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==Gt.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function h1(n,e,t){let i=K.cursor(e);return{from:Math.max(t.from,n.moveToLineBoundary(i,!1,!0).from),to:Math.min(t.to,n.moveToLineBoundary(i,!0,!0).from),type:Kt.Text}}function I3(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let i=Math.max(t.from,n.viewport.from),r=Math.min(t.to,n.viewport.to),s=n.textDirection==Gt.LTR,l=n.contentDOM,o=l.getBoundingClientRect(),f=pQ(n),u=l.querySelector(".cm-line"),h=u&&window.getComputedStyle(u),O=o.left+(h?parseInt(h.paddingLeft)+Math.min(0,parseInt(h.textIndent)):0),p=o.right-(h?parseInt(h.paddingRight):0),g=DO(n,i),b=DO(n,r),Q=g.type==Kt.Text?g:null,$=b.type==Kt.Text?b:null;if(Q&&(n.lineWrapping||g.widgetLineBreaks)&&(Q=h1(n,i,Q)),$&&(n.lineWrapping||b.widgetLineBreaks)&&($=h1(n,r,$)),Q&&$&&Q.from==$.from)return x(A(t.from,t.to,Q));{let X=Q?A(t.from,null,Q):C(g,!1),Z=$?A(null,t.to,$):C(b,!0),I=[];return(Q||g).to<($||b).from-(Q&&$?1:0)||g.widgetLineBreaks>1&&X.bottom+n.defaultLineHeight/2ue&&Se.from<$e)for(let Xe=Math.max(Se.from,ue),de=Math.min(Se.to,$e);;){let ce=n.state.doc.lineAt(Xe);for(let Re of n.bidiSpans(ce)){let xe=Re.from+ce.from,Ce=Re.to+ce.from;if(xe>=de)break;Ce>Xe&&te(Math.max(xe,Xe),X==null&&xe<=ue,Math.min(Ce,de),Z==null&&Ce>=$e,Re.dir)}if(Xe=ce.to+1,Xe>=de)break}return z.length==0&&te(ue,X==null,$e,Z==null,n.textDirection),{top:q,bottom:L,horizontal:z}}function C(X,Z){let I=o.top+(Z?X.top:X.bottom);return{top:I,bottom:I,horizontal:[]}}}function N3(n,e){return n.constructor==e.constructor&&n.eq(e)}class L3{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(ec)!=e.state.facet(ec)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}setOrder(e){let t=0,i=e.facet(ec);for(;t!N3(t,this.drawn[i]))){let t=this.dom.firstChild,i=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[i].constructor&&r.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(r.draw(),t);for(;t;){let r=t.nextSibling;t.remove(),t=r}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const ec=ye.define();function gQ(n){return[hi.define(e=>new L3(e,n)),ec.of(n)]}const mQ=!Pe.ios,Ho=ye.define({combine(n){return Wr(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function B3(n={}){return[Ho.of(n),j3,F3,G3,E$.of(!0)]}function SQ(n){return n.startState.facet(Ho)!=n.state.facet(Ho)}const j3=gQ({above:!0,markers(n){let{state:e}=n,t=e.facet(Ho),i=[];for(let r of e.selection.ranges){let s=r==e.selection.main;if(r.empty?!s||mQ:t.drawRangeCursor){let l=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",o=r.empty?r:K.cursor(r.head,r.head>r.anchor?-1:1);for(let f of ca.forRange(n,l,o))i.push(f)}}return i},update(n,e){n.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=SQ(n);return t&&O1(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){O1(e.state,n)},class:"cm-cursorLayer"});function O1(n,e){e.style.animationDuration=n.facet(Ho).cursorBlinkRate+"ms"}const F3=gQ({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:ca.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||SQ(n)},class:"cm-selectionLayer"}),bQ={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};mQ&&(bQ[".cm-line"].caretColor="transparent !important");const G3=tl.highest(me.theme(bQ)),$Q=Ie.define({map(n,e){return n==null?null:e.mapPos(n)}}),Zo=Qi.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,i)=>i.is($Q)?i.value:t,n)}}),H3=hi.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(Zo);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(Zo)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field(Zo),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let i=n.scrollDOM.getBoundingClientRect();return{left:t.left-i.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-i.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(Zo)!=n&&this.view.dispatch({effects:$Q.of(n)})}},{eventHandlers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function K3(){return[Zo,H3]}function d1(n,e,t,i,r){e.lastIndex=0;for(let s=n.iterRange(t,i),l=t,o;!s.next().done;l+=s.value.length)if(!s.lineBreak)for(;o=e.exec(s.value);)r(l+o.index,o)}function J3(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let i=[];for(let{from:r,to:s}of t)r=Math.max(n.state.doc.lineAt(r).from,r-e),s=Math.min(n.state.doc.lineAt(s).to,s+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=s:i.push({from:r,to:s});return i}class e5{constructor(e){const{regexp:t,decoration:i,decorate:r,boundary:s,maxLength:l=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,r)this.addMatch=(o,f,u,h)=>r(h,u,u+o[0].length,o,f);else if(typeof i=="function")this.addMatch=(o,f,u,h)=>{let O=i(o,f,u);O&&h(u,u+o[0].length,O)};else if(i)this.addMatch=(o,f,u,h)=>h(u,u+o[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=l}createDeco(e){let t=new ws,i=t.add.bind(t);for(let{from:r,to:s}of J3(e,this.maxLength))d1(e.state.doc,this.regexp,r,s,(l,o)=>this.addMatch(o,e,l,i));return t.finish()}updateDeco(e,t){let i=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((s,l,o,f)=>{f>e.view.viewport.from&&o1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),i,r):t}updateRange(e,t,i,r){for(let s of e.visibleRanges){let l=Math.max(s.from,i),o=Math.min(s.to,r);if(o>l){let f=e.state.doc.lineAt(l),u=f.tof.from;l--)if(this.boundary.test(f.text[l-1-f.from])){h=l;break}for(;op.push(P.range(Q,$));if(f==u)for(this.regexp.lastIndex=h-f.from;(g=this.regexp.exec(f.text))&&g.indexthis.addMatch($,e,Q,b));t=t.update({filterFrom:h,filterTo:O,filter:(Q,$)=>QO,add:p})}}return t}}const jO=/x/.unicode!=null?"gu":"g",t5=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,jO),i5={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Dh=null;function n5(){var n;if(Dh==null&&typeof document<"u"&&document.body){let e=document.body.style;Dh=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Dh||!1}const tc=ye.define({combine(n){let e=Wr(n,{render:null,specialChars:t5,addSpecialChars:null});return(e.replaceTabs=!n5())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,jO)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,jO)),e}});function r5(n={}){return[tc.of(n),s5()]}let p1=null;function s5(){return p1||(p1=hi.fromClass(class{constructor(n){this.view=n,this.decorations=Ze.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(tc)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new e5({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:r}=t.state,s=Xi(e[0],0);if(s==9){let l=r.lineAt(i),o=t.state.tabSize,f=la(l.text,o,i-l.from);return Ze.replace({widget:new f5((o-f%o)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=Ze.replace({widget:new a5(n,s)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(tc);n.startState.facet(tc)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const l5="•";function o5(n){return n>=32?l5:n==10?"␤":String.fromCharCode(9216+n)}class a5 extends Cs{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=o5(this.code),i=e.state.phrase("Control character")+" "+(i5[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,t);if(r)return r;let s=document.createElement("span");return s.textContent=t,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class f5 extends Cs{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function c5(){return h5}const u5=Ze.line({class:"cm-activeLine"}),h5=hi.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let i of n.state.selection.ranges){let r=n.lineBlockAt(i.head);r.from>e&&(t.push(u5.range(r.from)),e=r.from)}return Ze.set(t)}},{decorations:n=>n.decorations}),FO=2e3;function O5(n,e,t){let i=Math.min(e.line,t.line),r=Math.max(e.line,t.line),s=[];if(e.off>FO||t.off>FO||e.col<0||t.col<0){let l=Math.min(e.off,t.off),o=Math.max(e.off,t.off);for(let f=i;f<=r;f++){let u=n.doc.line(f);u.length<=o&&s.push(K.range(u.from+l,u.to+o))}}else{let l=Math.min(e.col,t.col),o=Math.max(e.col,t.col);for(let f=i;f<=r;f++){let u=n.doc.line(f),h=_O(u.text,l,n.tabSize,!0);if(h<0)s.push(K.cursor(u.to));else{let O=_O(u.text,o,n.tabSize);s.push(K.range(u.from+h,u.from+O))}}}return s}function d5(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function g1(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),r=t-i.from,s=r>FO?-1:r==i.length?d5(n,e.clientX):la(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:s,off:r}}function p5(n,e){let t=g1(n,e),i=n.state.selection;return t?{update(r){if(r.docChanged){let s=r.changes.mapPos(r.startState.doc.line(t.line).from),l=r.state.doc.lineAt(s);t={line:l.number,col:t.col,off:Math.min(t.off,l.length)},i=i.map(r.changes)}},get(r,s,l){let o=g1(n,r);if(!o)return i;let f=O5(n.state,t,o);return f.length?l?K.create(f.concat(i.ranges)):K.create(f):i}}:null}function g5(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return me.mouseSelectionStyle.of((t,i)=>e(i)?p5(t,i):null)}const m5={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},S5={style:"cursor: crosshair"};function b5(n={}){let[e,t]=m5[n.key||"Alt"],i=hi.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventHandlers:{keydown(r){this.set(r.keyCode==e||t(r))},keyup(r){(r.keyCode==e||!t(r))&&this.set(!1)},mousemove(r){this.set(t(r))}}});return[i,me.contentAttributes.of(r=>{var s;return!((s=r.plugin(i))===null||s===void 0)&&s.isDown?S5:null})]}const Zf="-10000px";class QQ{constructor(e,t,i){this.facet=t,this.createTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(r=>r),this.tooltipViews=this.tooltips.map(i)}update(e){var t;let i=e.state.facet(this.facet),r=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let s=[];for(let l=0;l{var e,t,i;return{position:Pe.ios?"absolute":((e=n.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(r=>r.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((i=n.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||$5}}}),m1=new WeakMap,wQ=hi.fromClass(class{constructor(n){this.view=n,this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(zh);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new QQ(n,Wd,t=>this.createTooltip(t)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n);e&&this.observeIntersection();let t=e||n.geometryChanged,i=n.state.facet(zh);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;t=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n){let e=n.create(this.view);if(e.dom.classList.add("cm-tooltip"),n.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",e.dom.appendChild(t)}return e.dom.style.position=this.position,e.dom.style.top=Zf,this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var n,e;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),(n=t.destroy)===null||n===void 0||n.call(t);(e=this.intersectionObserver)===null||e===void 0||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect(),e=1,t=1,i=!1;if(this.position=="fixed"){let r=this.manager.tooltipViews;i=r.length>0&&r[0].dom.offsetParent!=this.container.ownerDocument.body}if(i||this.position=="absolute")if(this.parent){let r=this.parent.getBoundingClientRect();r.width&&r.height&&(e=r.width/this.parent.offsetWidth,t=r.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((r,s)=>{let l=this.manager.tooltipViews[s];return l.getCoords?l.getCoords(r.pos):this.view.coordsAtPos(r.pos)}),size:this.manager.tooltipViews.map(({dom:r})=>r.getBoundingClientRect()),space:this.view.state.facet(zh).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:i}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let o of this.manager.tooltipViews)o.dom.style.position="absolute"}let{editor:t,space:i,scaleX:r,scaleY:s}=n,l=[];for(let o=0;o=Math.min(t.bottom,i.bottom)||O.rightMath.min(t.right,i.right)+.1){h.style.top=Zf;continue}let g=f.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,b=g?7:0,Q=p.right-p.left,$=(e=m1.get(u))!==null&&e!==void 0?e:p.bottom-p.top,P=u.offset||w5,x=this.view.textDirection==Gt.LTR,A=p.width>i.right-i.left?x?i.left:i.right-p.width:x?Math.min(O.left-(g?14:0)+P.x,i.right-Q):Math.max(i.left,O.left-Q+(g?14:0)-P.x),C=!!f.above;!f.strictSide&&(C?O.top-(p.bottom-p.top)-P.yi.bottom)&&C==i.bottom-O.bottom>O.top-i.top&&(C=!C);let X=(C?O.top-i.top:i.bottom-O.bottom)-b;if(X<$&&u.resize!==!1){if(XA&&q.topZ&&(Z=C?q.top-$-2-b:q.bottom+b+2);if(this.position=="absolute"?(h.style.top=(Z-n.parent.top)/s+"px",h.style.left=(A-n.parent.left)/r+"px"):(h.style.top=Z/s+"px",h.style.left=A/r+"px"),g){let q=O.left+(x?P.x:-P.x)-(A+14-7);g.style.left=q/r+"px"}u.overlap!==!0&&l.push({left:A,top:Z,right:I,bottom:Z+$}),h.classList.toggle("cm-tooltip-above",C),h.classList.toggle("cm-tooltip-below",!C),u.positioned&&u.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=Zf}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),Q5=me.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),w5={x:0,y:0},Wd=ye.define({enables:[wQ,Q5]}),mc=ye.define();class xd{static create(e){return new xd(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new QQ(e,mc,t=>this.createHostedView(t))}createHostedView(e){let t=e.create(this.view);return t.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(t.dom),this.mounted&&t.mount&&t.mount(this.view),t}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}}const y5=Wd.compute([mc],n=>{let e=n.facet(mc).filter(t=>t);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.filter(t=>t.end!=null).map(t=>t.end)),create:xd.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class v5{constructor(e,t,i,r,s){this.view=e,this.source=t,this.field=i,this.setHover=r,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let e=Date.now()-this.lastMove.time;eo.bottom||t.xo.right+e.defaultCharacterWidth)return;let f=e.bidiSpans(e.state.doc.lineAt(r)).find(h=>h.from<=r&&h.to>=r),u=f&&f.dir==Gt.RTL?-1:1;s=t.x{this.pending==o&&(this.pending=null,f&&e.dispatch({effects:this.setHover.of(f)}))},f=>kn(e.state,f,"hover tooltip"))}else l&&e.dispatch({effects:this.setHover.of(l)})}mousemove(e){var t;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let i=this.active;if(i&&!S1(this.lastMove.target)||this.pending){let{pos:r}=i||this.pending,s=(t=i==null?void 0:i.end)!==null&&t!==void 0?t:r;(r==s?this.view.posAtCoords(this.lastMove)!=r:!P5(this.view,r,s,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!S1(e.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function S1(n){for(let e=n;e;e=e.parentNode)if(e.nodeType==1&&e.classList.contains("cm-tooltip"))return!0;return!1}function P5(n,e,t,i,r,s){let l=n.scrollDOM.getBoundingClientRect(),o=n.documentTop+n.documentPadding.top+n.contentHeight;if(l.left>i||l.rightr||Math.min(l.bottom,o)=e&&f<=t}function k5(n,e={}){let t=Ie.define(),i=Qi.define({create(){return null},update(r,s){if(r&&(e.hideOnChange&&(s.docChanged||s.selection)||e.hideOn&&e.hideOn(s,r)))return null;if(r&&s.docChanged){let l=s.changes.mapPos(r.pos,-1,Zi.TrackDel);if(l==null)return null;let o=Object.assign(Object.create(null),r);o.pos=l,r.end!=null&&(o.end=s.changes.mapPos(r.end)),r=o}for(let l of s.effects)l.is(t)&&(r=l.value),l.is(W5)&&(r=null);return r},provide:r=>mc.from(r)});return[i,hi.define(r=>new v5(r,n,i,t,e.hoverTime||300)),y5]}function _5(n,e){let t=n.plugin(wQ);if(!t)return null;let i=t.manager.tooltips.indexOf(e);return i<0?null:t.manager.tooltipViews[i]}const W5=Ie.define(),b1=ye.define({combine(n){let e,t;for(let i of n)e=e||i.topContainer,t=t||i.bottomContainer;return{topContainer:e,bottomContainer:t}}});function Ko(n,e){let t=n.plugin(yQ),i=t?t.specs.indexOf(e):-1;return i>-1?t.panels[i]:null}const yQ=hi.fromClass(class{constructor(n){this.input=n.state.facet(Jo),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(b1);this.top=new Rf(n,!0,e.topContainer),this.bottom=new Rf(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(b1);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Rf(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Rf(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(Jo);if(t!=this.input){let i=t.filter(f=>f),r=[],s=[],l=[],o=[];for(let f of i){let u=this.specs.indexOf(f),h;u<0?(h=f(n.view),o.push(h)):(h=this.panels[u],h.update&&h.update(n)),r.push(h),(h.top?s:l).push(h)}this.specs=i,this.panels=r,this.top.sync(s),this.bottom.sync(l);for(let f of o)f.dom.classList.add("cm-panel"),f.mount&&f.mount()}else for(let i of this.panels)i.update&&i.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>me.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class Rf{constructor(e,t,i){this.view=e,this.top=t,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=$1(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=$1(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function $1(n){let e=n.nextSibling;return n.remove(),e}const Jo=ye.define({enables:yQ});class Fr extends Ks{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Fr.prototype.elementClass="";Fr.prototype.toDOM=void 0;Fr.prototype.mapMode=Zi.TrackBefore;Fr.prototype.startSide=Fr.prototype.endSide=-1;Fr.prototype.point=!0;const ic=ye.define(),x5={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Qt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Mo=ye.define();function C5(n){return[vQ(),Mo.of(Object.assign(Object.assign({},x5),n))]}const GO=ye.define({combine:n=>n.some(e=>e)});function vQ(n){let e=[X5];return n&&n.fixed===!1&&e.push(GO.of(!0)),e}const X5=hi.fromClass(class{constructor(n){this.view=n,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(Mo).map(e=>new w1(n,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!n.state.facet(GO),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,i=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(i<(t.to-t.from)*.8)}n.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(GO)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&this.dom.remove();let t=Qt.iter(this.view.state.facet(ic),this.view.viewport.from),i=[],r=this.gutters.map(s=>new T5(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(s.type)){let l=!0;for(let o of s.type)if(o.type==Kt.Text&&l){HO(t,i,o.from);for(let f of r)f.line(this.view,o,i);l=!1}else if(o.widget)for(let f of r)f.widget(this.view,o)}else if(s.type==Kt.Text){HO(t,i,s.from);for(let l of r)l.line(this.view,s,i)}else if(s.widget)for(let l of r)l.widget(this.view,s);for(let s of r)s.finish();n&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(n){let e=n.startState.facet(Mo),t=n.state.facet(Mo),i=n.docChanged||n.heightChanged||n.viewportChanged||!Qt.eq(n.startState.facet(ic),n.state.facet(ic),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let r of this.gutters)r.update(n)&&(i=!0);else{i=!0;let r=[];for(let s of t){let l=e.indexOf(s);l<0?r.push(new w1(this.view,s)):(this.gutters[l].update(n),r.push(this.gutters[l]))}for(let s of this.gutters)s.dom.remove(),r.indexOf(s)<0&&s.destroy();for(let s of r)this.dom.appendChild(s.dom);this.gutters=r}return i}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove()}},{provide:n=>me.scrollMargins.of(e=>{let t=e.plugin(n);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==Gt.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function Q1(n){return Array.isArray(n)?n:[n]}function HO(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class T5{constructor(e,t,i){this.gutter=e,this.height=i,this.i=0,this.cursor=Qt.iter(e.markers,t.from)}addElement(e,t,i){let{gutter:r}=this,s=t.top-this.height;if(this.i==r.elements.length){let l=new PQ(e,t.height,s,i);r.elements.push(l),r.dom.appendChild(l.dom)}else r.elements[this.i].update(e,t.height,s,i);this.height=t.bottom,this.i++}line(e,t,i){let r=[];HO(this.cursor,r,t.from),i.length&&(r=r.concat(i));let s=this.gutter.config.lineMarker(e,t,r);s&&r.unshift(s);let l=this.gutter;r.length==0&&!l.config.renderEmptyElements||this.addElement(e,t,r)}widget(e,t){let i=this.gutter.config.widgetMarker(e,t.widget,t);i&&this.addElement(e,t,[i])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class w1{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in t.domEventHandlers)this.dom.addEventListener(i,r=>{let s=r.target,l;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let f=s.getBoundingClientRect();l=(f.top+f.bottom)/2}else l=r.clientY;let o=e.lineBlockAtHeight(l-e.documentTop);t.domEventHandlers[i](e,o,r)&&r.preventDefault()});this.markers=Q1(t.markers(e)),t.initialSpacer&&(this.spacer=new PQ(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=Q1(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!Qt.eq(this.markers,t,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class PQ{constructor(e,t,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,i,r)}update(e,t,i,r){this.height!=t&&(this.height=t,this.dom.style.height=t/e.scaleY+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i/e.scaleY+"px":""),Z5(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let i="cm-gutterElement",r=this.dom.firstChild;for(let s=0,l=0;;){let o=l,f=ss(o,f,u)||l(o,f,u):l}return i}})}});class Ih extends Fr{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Nh(n,e){return n.state.facet(vl).formatNumber(e,n.state)}const A5=Mo.compute([vl],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(R5)},lineMarker(e,t,i){return i.some(r=>r.toDOM)?null:new Ih(Nh(e,e.state.doc.lineAt(t.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(vl)!=e.state.facet(vl),initialSpacer(e){return new Ih(Nh(e,y1(e.state.doc.lines)))},updateSpacer(e,t){let i=Nh(t.view,y1(t.view.state.doc.lines));return i==e.number?e:new Ih(i)},domEventHandlers:n.facet(vl).domEventHandlers}));function U5(n={}){return[vl.of(n),vQ(),A5]}function y1(n){let e=9;for(;e{let e=[],t=-1;for(let i of n.selection.ranges){let r=n.doc.lineAt(i.head).from;r>t&&(t=r,e.push(Y5.range(r)))}return Qt.of(e)});function q5(){return V5}function E5(n){let e;return{c(){e=_("div"),y(e,"class","mzn-editor svelte-1fycn7h")},m(t,i){V(t,e,i),n[7](e)},p:We,i:We,o:We,d(t){t&&Y(e),n[7](null)}}}function M5(n,e,t){let{state:i}=e,r,s;Bc(()=>{t(6,s=new me({parent:r}))});function l(){return s||null}function o(){return s?s.state:null}async function f(O){s&&(await rr(),s.dispatch({selection:{anchor:O}}))}function u(){s.focus()}function h(O){Dt[O?"unshift":"push"](()=>{r=O,t(0,r)})}return n.$$set=O=>{"state"in O&&t(1,i=O.state)},n.$$.update=()=>{n.$$.dirty&66&&s&&i&&s.state!==i&&s.setState(i)},[r,i,l,o,f,u,s,h]}class D5 extends Ui{constructor(e){super(),Ai(this,e,M5,E5,Ri,{state:1,getView:2,getState:3,setCursor:4,focus:5})}get getView(){return this.$$.ctx[2]}get getState(){return this.$$.ctx[3]}get setCursor(){return this.$$.ctx[4]}get focus(){return this.$$.ctx[5]}}var Vn=typeof window<"u"?window:null,Cd=Vn===null,ea=Cd?void 0:Vn.document,Jn="addEventListener",er="removeEventListener",Lh="getBoundingClientRect",wo="_a",tr="_b",zr="_c",Af="horizontal",ir=function(){return!1},z5=Cd?"calc":["","-webkit-","-moz-","-o-"].filter(function(n){var e=ea.createElement("div");return e.style.cssText="width:"+n+"calc(9px)",!!e.style.length}).shift()+"calc",kQ=function(n){return typeof n=="string"||n instanceof String},v1=function(n){if(kQ(n)){var e=ea.querySelector(n);if(!e)throw new Error("Selector "+n+" did not match a DOM element");return e}return n},zi=function(n,e,t){var i=n[e];return i!==void 0?i:t},Uf=function(n,e,t,i){if(e){if(i==="end")return 0;if(i==="center")return n/2}else if(t){if(i==="start")return 0;if(i==="center")return n/2}return n},I5=function(n,e){var t=ea.createElement("div");return t.className="gutter gutter-"+e,t},N5=function(n,e,t){var i={};return kQ(e)?i[n]=e:i[n]=z5+"("+e+"% - "+t+"px)",i},L5=function(n,e){var t;return t={},t[n]=e+"px",t},B5=function(n,e){if(e===void 0&&(e={}),Cd)return{};var t=n,i,r,s,l,o,f;Array.from&&(t=Array.from(t));var u=v1(t[0]),h=u.parentNode,O=getComputedStyle?getComputedStyle(h):null,p=O?O.flexDirection:null,g=zi(e,"sizes")||t.map(function(){return 100/t.length}),b=zi(e,"minSize",100),Q=Array.isArray(b)?b:t.map(function(){return b}),$=zi(e,"maxSize",1/0),P=Array.isArray($)?$:t.map(function(){return $}),x=zi(e,"expandToMin",!1),A=zi(e,"gutterSize",10),C=zi(e,"gutterAlign","center"),X=zi(e,"snapOffset",30),Z=Array.isArray(X)?X:t.map(function(){return X}),I=zi(e,"dragInterval",1),q=zi(e,"direction",Af),L=zi(e,"cursor",q===Af?"col-resize":"row-resize"),z=zi(e,"gutter",I5),te=zi(e,"elementStyle",N5),ue=zi(e,"gutterStyle",L5);q===Af?(i="width",r="clientX",s="left",l="right",o="clientWidth"):q==="vertical"&&(i="height",r="clientY",s="top",l="bottom",o="clientHeight");function $e(ie,G,le,fe){var ze=te(i,G,le,fe);Object.keys(ze).forEach(function(Ne){ie.style[Ne]=ze[Ne]})}function Se(ie,G,le){var fe=ue(i,G,le);Object.keys(fe).forEach(function(ze){ie.style[ze]=fe[ze]})}function Xe(){return f.map(function(ie){return ie.size})}function de(ie){return"touches"in ie?ie.touches[0][r]:ie[r]}function ce(ie){var G=f[this.a],le=f[this.b],fe=G.size+le.size;G.size=ie/this.size*fe,le.size=fe-ie/this.size*fe,$e(G.element,G.size,this[tr],G.i),$e(le.element,le.size,this[zr],le.i)}function Re(ie){var G,le=f[this.a],fe=f[this.b];this.dragging&&(G=de(ie)-this.start+(this[tr]-this.dragOffset),I>1&&(G=Math.round(G/I)*I),G<=le.minSize+le.snapOffset+this[tr]?G=le.minSize+this[tr]:G>=this.size-(fe.minSize+fe.snapOffset+this[zr])&&(G=this.size-(fe.minSize+this[zr])),G>=le.maxSize-le.snapOffset+this[tr]?G=le.maxSize+this[tr]:G<=this.size-(fe.maxSize-fe.snapOffset+this[zr])&&(G=this.size-(fe.maxSize+this[zr])),ce.call(this,G),zi(e,"onDrag",ir)(Xe()))}function xe(){var ie=f[this.a].element,G=f[this.b].element,le=ie[Lh](),fe=G[Lh]();this.size=le[i]+fe[i]+this[tr]+this[zr],this.start=le[s],this.end=le[l]}function Ce(ie){if(!getComputedStyle)return null;var G=getComputedStyle(ie);if(!G)return null;var le=ie[o];return le===0?null:(q===Af?le-=parseFloat(G.paddingLeft)+parseFloat(G.paddingRight):le-=parseFloat(G.paddingTop)+parseFloat(G.paddingBottom),le)}function Ee(ie){var G=Ce(h);if(G===null||Q.reduce(function(Ne,st){return Ne+st},0)>G)return ie;var le=0,fe=[],ze=ie.map(function(Ne,st){var pt=G*Ne/100,ni=Uf(A,st===0,st===ie.length-1,C),gt=Q[st]+ni;return pt0&&fe[st]-le>0){var ni=Math.min(le,fe[st]-le);le-=ni,pt=Ne-ni}return pt/G*100})}function Pt(){var ie=this,G=f[ie.a].element,le=f[ie.b].element;ie.dragging&&zi(e,"onDragEnd",ir)(Xe()),ie.dragging=!1,Vn[er]("mouseup",ie.stop),Vn[er]("touchend",ie.stop),Vn[er]("touchcancel",ie.stop),Vn[er]("mousemove",ie.move),Vn[er]("touchmove",ie.move),ie.stop=null,ie.move=null,G[er]("selectstart",ir),G[er]("dragstart",ir),le[er]("selectstart",ir),le[er]("dragstart",ir),G.style.userSelect="",G.style.webkitUserSelect="",G.style.MozUserSelect="",G.style.pointerEvents="",le.style.userSelect="",le.style.webkitUserSelect="",le.style.MozUserSelect="",le.style.pointerEvents="",ie.gutter.style.cursor="",ie.parent.style.cursor="",ea.body.style.cursor=""}function ii(ie){if(!("button"in ie&&ie.button!==0)){var G=this,le=f[G.a].element,fe=f[G.b].element;G.dragging||zi(e,"onDragStart",ir)(Xe()),ie.preventDefault(),G.dragging=!0,G.move=Re.bind(G),G.stop=Pt.bind(G),Vn[Jn]("mouseup",G.stop),Vn[Jn]("touchend",G.stop),Vn[Jn]("touchcancel",G.stop),Vn[Jn]("mousemove",G.move),Vn[Jn]("touchmove",G.move),le[Jn]("selectstart",ir),le[Jn]("dragstart",ir),fe[Jn]("selectstart",ir),fe[Jn]("dragstart",ir),le.style.userSelect="none",le.style.webkitUserSelect="none",le.style.MozUserSelect="none",le.style.pointerEvents="none",fe.style.userSelect="none",fe.style.webkitUserSelect="none",fe.style.MozUserSelect="none",fe.style.pointerEvents="none",G.gutter.style.cursor=L,G.parent.style.cursor=L,ea.body.style.cursor=L,xe.call(G),G.dragOffset=de(ie)-G.end}}g=Ee(g);var Tt=[];f=t.map(function(ie,G){var le={element:v1(ie),size:g[G],minSize:Q[G],maxSize:P[G],snapOffset:Z[G],i:G},fe;if(G>0&&(fe={a:G-1,b:G,dragging:!1,direction:q,parent:h},fe[tr]=Uf(A,G-1===0,!1,C),fe[zr]=Uf(A,!1,G===t.length-1,C),p==="row-reverse"||p==="column-reverse")){var ze=fe.a;fe.a=fe.b,fe.b=ze}if(G>0){var Ne=z(G,q,le.element);Se(Ne,A,G),fe[wo]=ii.bind(fe),Ne[Jn]("mousedown",fe[wo]),Ne[Jn]("touchstart",fe[wo]),h.insertBefore(Ne,le.element),fe.gutter=Ne}return $e(le.element,le.size,Uf(A,G===0,G===t.length-1,C),G),G>0&&Tt.push(fe),le});function It(ie){var G=ie.i===Tt.length,le=G?Tt[ie.i-1]:Tt[ie.i];xe.call(le);var fe=G?le.size-ie.minSize-le[zr]:ie.minSize+le[tr];ce.call(le,fe)}f.forEach(function(ie){var G=ie.element[Lh]()[i];G0){var ze=Tt[fe-1],Ne=f[ze.a],st=f[ze.b];Ne.size=G[fe-1],st.size=le,$e(Ne.element,Ne.size,ze[tr],Ne.i),$e(st.element,st.size,ze[zr],st.i)}})}function ve(ie,G){Tt.forEach(function(le){if(G!==!0?le.parent.removeChild(le.gutter):(le.gutter[er]("mousedown",le[wo]),le.gutter[er]("touchstart",le[wo])),ie!==!0){var fe=te(i,le.a.size,le[tr]);Object.keys(fe).forEach(function(ze){f[le.a].element.style[ze]="",f[le.b].element.style[ze]=""})}})}return{setSizes:Nt,getSizes:Xe,collapse:function(G){It(f[G])},destroy:ve,parent:h,pairs:Tt}};const j5=n=>({}),P1=n=>({}),F5=n=>({}),k1=n=>({});function G5(n){let e,t,i,r,s;const l=n[6].panelA,o=ln(l,n,n[5],k1),f=n[6].panelB,u=ln(f,n,n[5],P1);return{c(){e=_("div"),t=_("div"),o&&o.c(),i=B(),r=_("div"),u&&u.c(),y(t,"class","split-panel svelte-e8t4e8"),ae(t,"no-splitter",n[1]!=="all"),ae(t,"is-hidden",!Yf("a",n[1])),y(r,"class","split-panel svelte-e8t4e8"),ae(r,"no-splitter",n[1]!=="all"),ae(r,"is-hidden",!Yf("b",n[1])),y(e,"class","split svelte-e8t4e8"),ae(e,"horizontal",n[0]==="horizontal")},m(h,O){V(h,e,O),v(e,t),o&&o.m(t,null),n[7](t),v(e,i),v(e,r),u&&u.m(r,null),n[8](r),s=!0},p(h,[O]){o&&o.p&&(!s||O&32)&&an(o,l,h,h[5],s?on(l,h[5],O,F5):fn(h[5]),k1),(!s||O&2)&&ae(t,"no-splitter",h[1]!=="all"),(!s||O&2)&&ae(t,"is-hidden",!Yf("a",h[1])),u&&u.p&&(!s||O&32)&&an(u,f,h,h[5],s?on(f,h[5],O,j5):fn(h[5]),P1),(!s||O&2)&&ae(r,"no-splitter",h[1]!=="all"),(!s||O&2)&&ae(r,"is-hidden",!Yf("b",h[1])),(!s||O&1)&&ae(e,"horizontal",h[0]==="horizontal")},i(h){s||(D(o,h),D(u,h),s=!0)},o(h){F(o,h),F(u,h),s=!1},d(h){h&&Y(e),o&&o.d(h),n[7](null),u&&u.d(h),n[8](null)}}}function Yf(n,e){return e==="all"||e===n}function H5(n,e,t){let{$$slots:i={},$$scope:r}=e,{direction:s="horizontal"}=e,{split:l=50}=e,{showPanels:o="all"}=e,f,u,h=null;function O($,P){p(),P==="all"&&f&&u&&(h=B5([f,u],{direction:$,minSize:0,sizes:[l,100-l],onDragEnd(x){t(4,l=x[0])}}))}function p(){h&&(h.destroy(),h=null)}function g($){h&&h.getSizes()[0]!==$&&h.setSizes([$,100-$])}Bc(()=>(O(s,o),p));function b($){Dt[$?"unshift":"push"](()=>{f=$,t(2,f)})}function Q($){Dt[$?"unshift":"push"](()=>{u=$,t(3,u)})}return n.$$set=$=>{"direction"in $&&t(0,s=$.direction),"split"in $&&t(4,l=$.split),"showPanels"in $&&t(1,o=$.showPanels),"$$scope"in $&&t(5,r=$.$$scope)},n.$$.update=()=>{n.$$.dirty&3&&O(s,o),n.$$.dirty&16&&g(l)},[s,o,f,u,l,r,i,b,Q]}class K5 extends Ui{constructor(e){super(),Ai(this,e,H5,G5,Ri,{direction:0,split:4,showPanels:1})}}const Vf=parseFloat;function KO(n,e=";"){let t;if(Array.isArray(n))t=n.filter(i=>i);else{t=[];for(const i in n)n[i]&&t.push(`${i}:${n[i]}`)}return t.join(e)}function J5(n,e,t,i){let r,s;const l="1em";let o,f,u,h="-.125em";const O="visible";return i&&(u="center",s="1.25em"),t&&(r=t),e&&(e=="lg"?(f="1.33333em",o=".75em",h="-.225em"):e=="xs"?f=".75em":e=="sm"?f=".875em":f=e.replace("x","em")),KO([KO({float:r,width:s,height:l,"line-height":o,"font-size":f,"text-align":u,"vertical-align":h,"transform-origin":"center",overflow:O}),n])}function eC(n,e,t,i,r,s=1,l="",o=""){let f=1,u=1;return r&&(r=="horizontal"?f=-1:r=="vertical"?u=-1:f=u=-1),KO([`translate(${Vf(e)*s}${l},${Vf(t)*s}${l})`,`scale(${f*Vf(n)},${u*Vf(n)})`,i&&`rotate(${i}${o})`]," ")}function _1(n){let e,t,i,r,s,l,o,f;function u(p,g){return typeof p[10][4]=="string"?iC:tC}let h=u(n),O=h(n);return{c(){e=xl("svg"),t=xl("g"),i=xl("g"),O.c(),y(i,"transform",n[12]),y(t,"transform",r="translate("+n[10][0]/2+" "+n[10][1]/2+")"),y(t,"transform-origin",s=n[10][0]/4+" 0"),y(e,"id",l=n[1]||void 0),y(e,"class",o="svelte-fa "+n[0]+" svelte-1cj2gr0"),y(e,"style",n[11]),y(e,"viewBox",f="0 0 "+n[10][0]+" "+n[10][1]),y(e,"aria-hidden","true"),y(e,"role","img"),y(e,"xmlns","http://www.w3.org/2000/svg"),ae(e,"pulse",n[4]),ae(e,"spin",n[3])},m(p,g){V(p,e,g),v(e,t),v(t,i),O.m(i,null)},p(p,g){h===(h=u(p))&&O?O.p(p,g):(O.d(1),O=h(p),O&&(O.c(),O.m(i,null))),g&4096&&y(i,"transform",p[12]),g&1024&&r!==(r="translate("+p[10][0]/2+" "+p[10][1]/2+")")&&y(t,"transform",r),g&1024&&s!==(s=p[10][0]/4+" 0")&&y(t,"transform-origin",s),g&2&&l!==(l=p[1]||void 0)&&y(e,"id",l),g&1&&o!==(o="svelte-fa "+p[0]+" svelte-1cj2gr0")&&y(e,"class",o),g&2048&&y(e,"style",p[11]),g&1024&&f!==(f="0 0 "+p[10][0]+" "+p[10][1])&&y(e,"viewBox",f),g&17&&ae(e,"pulse",p[4]),g&9&&ae(e,"spin",p[3])},d(p){p&&Y(e),O.d()}}}function tC(n){let e,t,i,r,s,l,o,f,u,h;return{c(){e=xl("path"),l=xl("path"),y(e,"d",t=n[10][4][0]),y(e,"fill",i=n[6]||n[2]||"currentColor"),y(e,"fill-opacity",r=n[9]!=!1?n[7]:n[8]),y(e,"transform",s="translate("+n[10][0]/-2+" "+n[10][1]/-2+")"),y(l,"d",o=n[10][4][1]),y(l,"fill",f=n[5]||n[2]||"currentColor"),y(l,"fill-opacity",u=n[9]!=!1?n[8]:n[7]),y(l,"transform",h="translate("+n[10][0]/-2+" "+n[10][1]/-2+")")},m(O,p){V(O,e,p),V(O,l,p)},p(O,p){p&1024&&t!==(t=O[10][4][0])&&y(e,"d",t),p&68&&i!==(i=O[6]||O[2]||"currentColor")&&y(e,"fill",i),p&896&&r!==(r=O[9]!=!1?O[7]:O[8])&&y(e,"fill-opacity",r),p&1024&&s!==(s="translate("+O[10][0]/-2+" "+O[10][1]/-2+")")&&y(e,"transform",s),p&1024&&o!==(o=O[10][4][1])&&y(l,"d",o),p&36&&f!==(f=O[5]||O[2]||"currentColor")&&y(l,"fill",f),p&896&&u!==(u=O[9]!=!1?O[8]:O[7])&&y(l,"fill-opacity",u),p&1024&&h!==(h="translate("+O[10][0]/-2+" "+O[10][1]/-2+")")&&y(l,"transform",h)},d(O){O&&(Y(e),Y(l))}}}function iC(n){let e,t,i,r;return{c(){e=xl("path"),y(e,"d",t=n[10][4]),y(e,"fill",i=n[2]||n[5]||"currentColor"),y(e,"transform",r="translate("+n[10][0]/-2+" "+n[10][1]/-2+")")},m(s,l){V(s,e,l)},p(s,l){l&1024&&t!==(t=s[10][4])&&y(e,"d",t),l&36&&i!==(i=s[2]||s[5]||"currentColor")&&y(e,"fill",i),l&1024&&r!==(r="translate("+s[10][0]/-2+" "+s[10][1]/-2+")")&&y(e,"transform",r)},d(s){s&&Y(e)}}}function nC(n){let e,t=n[10][4]&&_1(n);return{c(){t&&t.c(),e=fi()},m(i,r){t&&t.m(i,r),V(i,e,r)},p(i,[r]){i[10][4]?t?t.p(i,r):(t=_1(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:We,o:We,d(i){i&&Y(e),t&&t.d(i)}}}function rC(n,e,t){let{class:i=""}=e,{id:r=""}=e,{style:s=""}=e,{icon:l}=e,{size:o=""}=e,{color:f=""}=e,{fw:u=!1}=e,{pull:h=""}=e,{scale:O=1}=e,{translateX:p=0}=e,{translateY:g=0}=e,{rotate:b=""}=e,{flip:Q=!1}=e,{spin:$=!1}=e,{pulse:P=!1}=e,{primaryColor:x=""}=e,{secondaryColor:A=""}=e,{primaryOpacity:C=1}=e,{secondaryOpacity:X=.4}=e,{swapOpacity:Z=!1}=e,I,q,L;return n.$$set=z=>{"class"in z&&t(0,i=z.class),"id"in z&&t(1,r=z.id),"style"in z&&t(13,s=z.style),"icon"in z&&t(14,l=z.icon),"size"in z&&t(15,o=z.size),"color"in z&&t(2,f=z.color),"fw"in z&&t(16,u=z.fw),"pull"in z&&t(17,h=z.pull),"scale"in z&&t(18,O=z.scale),"translateX"in z&&t(19,p=z.translateX),"translateY"in z&&t(20,g=z.translateY),"rotate"in z&&t(21,b=z.rotate),"flip"in z&&t(22,Q=z.flip),"spin"in z&&t(3,$=z.spin),"pulse"in z&&t(4,P=z.pulse),"primaryColor"in z&&t(5,x=z.primaryColor),"secondaryColor"in z&&t(6,A=z.secondaryColor),"primaryOpacity"in z&&t(7,C=z.primaryOpacity),"secondaryOpacity"in z&&t(8,X=z.secondaryOpacity),"swapOpacity"in z&&t(9,Z=z.swapOpacity)},n.$$.update=()=>{n.$$.dirty&16384&&t(10,I=l&&l.icon||[0,0,"",[],""]),n.$$.dirty&237568&&t(11,q=J5(s,o,h,u)),n.$$.dirty&8126464&&t(12,L=eC(O,p,g,b,Q,512))},[i,r,f,$,P,x,A,C,X,Z,I,q,L,s,l,o,u,h,O,p,g,b,Q]}class sC extends Ui{constructor(e){super(),Ai(this,e,rC,nC,Ri,{class:0,id:1,style:13,icon:14,size:15,color:2,fw:16,pull:17,scale:18,translateX:19,translateY:20,rotate:21,flip:22,spin:3,pulse:4,primaryColor:5,secondaryColor:6,primaryOpacity:7,secondaryOpacity:8,swapOpacity:9})}}const Ct=sC;var JO={prefix:"fas",iconName:"lock",icon:[448,512,[128274],"f023","M144 144v48H304V144c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192V144C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64H80z"]},_Q={prefix:"fas",iconName:"share-nodes",icon:[448,512,["share-alt"],"f1e0","M352 224c53 0 96-43 96-96s-43-96-96-96s-96 43-96 96c0 4 .2 8 .7 11.9l-94.1 47C145.4 170.2 121.9 160 96 160c-53 0-96 43-96 96s43 96 96 96c25.9 0 49.4-10.2 66.6-26.9l94.1 47c-.5 3.9-.7 7.8-.7 11.9c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-25.9 0-49.4 10.2-66.6 26.9l-94.1-47c.5-3.9 .7-7.8 .7-11.9s-.2-8-.7-11.9l94.1-47C302.6 213.8 326.1 224 352 224z"]},W1={prefix:"fas",iconName:"eye-slash",icon:[640,512,[],"f070","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z"]},lC={prefix:"fas",iconName:"shuffle",icon:[512,512,[128256,"random"],"f074","M403.8 34.4c12-5 25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6V160H352c-10.1 0-19.6 4.7-25.6 12.8L284 229.3 244 176l31.2-41.6C293.3 110.2 321.8 96 352 96h32V64c0-12.9 7.8-24.6 19.8-29.6zM164 282.7L204 336l-31.2 41.6C154.7 401.8 126.2 416 96 416H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H96c10.1 0 19.6-4.7 25.6-12.8L164 282.7zm274.6 188c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6V416H352c-30.2 0-58.7-14.2-76.8-38.4L121.6 172.8c-6-8.1-15.5-12.8-25.6-12.8H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H96c30.2 0 58.7 14.2 76.8 38.4L326.4 339.2c6 8.1 15.5 12.8 25.6 12.8h32V320c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64z"]},oC={prefix:"fas",iconName:"clipboard",icon:[384,512,[128203],"f328","M192 0c-41.8 0-77.4 26.7-90.5 64H64C28.7 64 0 92.7 0 128V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V128c0-35.3-28.7-64-64-64H282.5C269.4 26.7 233.8 0 192 0zm0 64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM112 192H272c8.8 0 16 7.2 16 16s-7.2 16-16 16H112c-8.8 0-16-7.2-16-16s7.2-16 16-16z"]},WQ={prefix:"fas",iconName:"arrow-up-right-from-square",icon:[512,512,["external-link"],"f08e","M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32h82.7L201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3V192c0 17.7 14.3 32 32 32s32-14.3 32-32V32c0-17.7-14.3-32-32-32H320zM80 32C35.8 32 0 67.8 0 112V432c0 44.2 35.8 80 80 80H400c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32V432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H192c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z"]},x1={prefix:"fas",iconName:"lock-open",icon:[576,512,[],"f3c1","M352 144c0-44.2 35.8-80 80-80s80 35.8 80 80v48c0 17.7 14.3 32 32 32s32-14.3 32-32V144C576 64.5 511.5 0 432 0S288 64.5 288 144v48H64c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V256c0-35.3-28.7-64-64-64H352V144z"]},aC={prefix:"fas",iconName:"forward-fast",icon:[512,512,[9197,"fast-forward"],"f050","M18.4 445c11.2 5.3 24.5 3.6 34.1-4.4L224 297.7V416c0 12.4 7.2 23.7 18.4 29s24.5 3.6 34.1-4.4L448 297.7V416c0 17.7 14.3 32 32 32s32-14.3 32-32V96c0-17.7-14.3-32-32-32s-32 14.3-32 32V214.3L276.5 71.4c-9.5-7.9-22.8-9.7-34.1-4.4S224 83.6 224 96V214.3L52.5 71.4c-9.5-7.9-22.8-9.7-34.1-4.4S0 83.6 0 96V416c0 12.4 7.2 23.7 18.4 29z"]},C1={prefix:"fas",iconName:"eye",icon:[576,512,[128065],"f06e","M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"]},xQ={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"]},fC={prefix:"fas",iconName:"gear",icon:[512,512,[9881,"cog"],"f013","M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"]},CQ=fC,cC={prefix:"fas",iconName:"folder-tree",icon:[576,512,[],"f802","M64 32C64 14.3 49.7 0 32 0S0 14.3 0 32v96V384c0 35.3 28.7 64 64 64H256V384H64V160H256V96H64V32zM288 192c0 17.7 14.3 32 32 32H544c17.7 0 32-14.3 32-32V64c0-17.7-14.3-32-32-32H445.3c-8.5 0-16.6-3.4-22.6-9.4L409.4 9.4c-6-6-14.1-9.4-22.6-9.4H320c-17.7 0-32 14.3-32 32V192zm0 288c0 17.7 14.3 32 32 32H544c17.7 0 32-14.3 32-32V352c0-17.7-14.3-32-32-32H445.3c-8.5 0-16.6-3.4-22.6-9.4l-13.3-13.3c-6-6-14.1-9.4-22.6-9.4H320c-17.7 0-32 14.3-32 32V480z"]},uC={prefix:"fas",iconName:"download",icon:[512,512,[],"f019","M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V274.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7V32zM64 352c-35.3 0-64 28.7-64 64v32c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V416c0-35.3-28.7-64-64-64H346.5l-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352H64zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"]},hC={prefix:"fas",iconName:"stop",icon:[384,512,[9209],"f04d","M0 128C0 92.7 28.7 64 64 64H320c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z"]},OC={prefix:"fas",iconName:"angle-down",icon:[448,512,[8964],"f107","M201.4 342.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 274.7 86.6 137.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},dC={prefix:"fas",iconName:"eraser",icon:[576,512,[],"f12d","M290.7 57.4L57.4 290.7c-25 25-25 65.5 0 90.5l80 80c12 12 28.3 18.7 45.3 18.7H288h9.4H512c17.7 0 32-14.3 32-32s-14.3-32-32-32H387.9L518.6 285.3c25-25 25-65.5 0-90.5L381.3 57.4c-25-25-65.5-25-90.5 0zM297.4 416H288l-105.4 0-80-80L227.3 211.3 364.7 348.7 297.4 416z"]},pC={prefix:"fas",iconName:"play",icon:[384,512,[9654],"f04b","M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80V432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"]},XQ={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"]},TQ={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},gC={prefix:"fas",iconName:"hammer",icon:[576,512,[128296],"f6e3","M413.5 237.5c-28.2 4.8-58.2-3.6-80-25.4l-38.1-38.1C280.4 159 272 138.8 272 117.6V105.5L192.3 62c-5.3-2.9-8.6-8.6-8.3-14.7s3.9-11.5 9.5-14l47.2-21C259.1 4.2 279 0 299.2 0h18.1c36.7 0 72 14 98.7 39.1l44.6 42c24.2 22.8 33.2 55.7 26.6 86L503 183l8-8c9.4-9.4 24.6-9.4 33.9 0l24 24c9.4 9.4 9.4 24.6 0 33.9l-88 88c-9.4 9.4-24.6 9.4-33.9 0l-24-24c-9.4-9.4-9.4-24.6 0-33.9l8-8-17.5-17.5zM27.4 377.1L260.9 182.6c3.5 4.9 7.5 9.6 11.8 14l38.1 38.1c6 6 12.4 11.2 19.2 15.7L134.9 484.6c-14.5 17.4-36 27.4-58.6 27.4C34.1 512 0 477.8 0 435.7c0-22.6 10.1-44.1 27.4-58.6z"]},ZQ={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"]};function mC(n){let e,t,i,r,s,l,o,f,u=n[0]&&!n[3]&&X1(n);return{c(){e=_("span"),t=be(n[1]),i=be(n[2]),r=B(),u&&u.c(),s=fi(),y(e,"class","filename svelte-1ul6ap")},m(h,O){V(h,e,O),v(e,t),v(e,i),V(h,r,O),u&&u.m(h,O),V(h,s,O),l=!0,o||(f=oe(e,"click",n[8]),o=!0)},p(h,O){(!l||O&2)&&Je(t,h[1]),(!l||O&4)&&Je(i,h[2]),h[0]&&!h[3]?u?(u.p(h,O),O&9&&D(u,1)):(u=X1(h),u.c(),D(u,1),u.m(s.parentNode,s)):u&&(nt(),F(u,1,1,()=>{u=null}),rt())},i(h){l||(D(u),l=!0)},o(h){F(u),l=!1},d(h){h&&(Y(e),Y(r),Y(s)),u&&u.d(h),o=!1,f()}}}function SC(n){let e,t,i,r,s;return{c(){e=_("input"),i=be(n[2]),y(e,"size",t=n[4].length||n[1].length),y(e,"placeholder",n[1])},m(l,o){V(l,e,o),n[11](e),yi(e,n[4]),V(l,i,o),r||(s=[oe(e,"input",n[12]),oe(e,"blur",n[10]),oe(e,"keyup",n[9])],r=!0)},p(l,o){o&18&&t!==(t=l[4].length||l[1].length)&&y(e,"size",t),o&2&&y(e,"placeholder",l[1]),o&16&&e.value!==l[4]&&yi(e,l[4]),o&4&&Je(i,l[2])},i:We,o:We,d(l){l&&(Y(e),Y(i)),n[11](null),r=!1,ti(s)}}}function X1(n){let e,t,i,r,s;return t=new Ct({props:{icon:TQ}}),{c(){e=_("span"),De(t.$$.fragment),y(e,"class","close-tab svelte-1ul6ap")},m(l,o){V(l,e,o),Ve(t,e,null),i=!0,r||(s=oe(e,"click",n[13]),r=!0)},p:We,i(l){i||(D(t.$$.fragment,l),i=!0)},o(l){F(t.$$.fragment,l),i=!1},d(l){l&&Y(e),qe(t),r=!1,s()}}}function bC(n){let e,t,i,r,s,l;const o=[SC,mC],f=[];function u(h,O){return h[5]?0:1}return t=u(n),i=f[t]=o[t](n),{c(){e=_("a"),i.c(),y(e,"class","filename-link svelte-1ul6ap"),ae(e,"active",n[0]),ae(e,"readonly",n[3])},m(h,O){V(h,e,O),f[t].m(e,null),r=!0,s||(l=oe(e,"click",n[14]),s=!0)},p(h,[O]){let p=t;t=u(h),t===p?f[t].p(h,O):(nt(),F(f[p],1,1,()=>{f[p]=null}),rt(),i=f[t],i?i.p(h,O):(i=f[t]=o[t](h),i.c()),D(i,1),i.m(e,null)),(!r||O&1)&&ae(e,"active",h[0]),(!r||O&8)&&ae(e,"readonly",h[3])},i(h){r||(D(i),r=!0)},o(h){F(i),r=!1},d(h){h&&Y(e),f[t].d(),s=!1,l()}}}function $C(n,e,t){let{active:i=!1}=e,{name:r="Untitled"}=e,{suffix:s=".mzn"}=e,{readonly:l=!1}=e;const o=Ln();let f=!1,u,h="";async function O(){!i||l||(t(5,f=!0),t(4,h=r),await rr(),u.focus())}function p(x){x.key==="Enter"?(x.preventDefault(),g()):x.key==="Escape"&&t(5,f=!1)}function g(){t(5,f=!1),h.length>0&&o("rename",{name:h,suffix:s})}function b(x){Dt[x?"unshift":"push"](()=>{u=x,t(6,u)})}function Q(){h=this.value,t(4,h)}const $=()=>o("close"),P=()=>{f||o("click")};return n.$$set=x=>{"active"in x&&t(0,i=x.active),"name"in x&&t(1,r=x.name),"suffix"in x&&t(2,s=x.suffix),"readonly"in x&&t(3,l=x.readonly)},n.$$.update=()=>{n.$$.dirty&16&&/[\/\\\.]/.test(h)&&t(4,h=h.replaceAll(/[\/\\\.]/g,""))},[i,r,s,l,h,f,u,o,O,p,g,b,Q,$,P]}class QC extends Ui{constructor(e){super(),Ai(this,e,$C,bC,Ri,{active:0,name:1,suffix:2,readonly:3})}}function RQ(n){const e=n-1;return e*e*e+1}function wC(n,{from:e,to:t},i={}){const r=getComputedStyle(n),s=r.transform==="none"?"":r.transform,[l,o]=r.transformOrigin.split(" ").map(parseFloat),f=e.left+e.width*l/t.width-(t.left+l),u=e.top+e.height*o/t.height-(t.top+o),{delay:h=0,duration:O=g=>Math.sqrt(g)*120,easing:p=RQ}=i;return{delay:h,duration:Lc(O)?O(Math.sqrt(f*f+u*u)):O,easing:p,css:(g,b)=>{const Q=b*f,$=b*u,P=g+b*e.width/t.width,x=g+b*e.height/t.height;return`transform: ${s} translate(${Q}px, ${$}px) scale(${P}, ${x});`}}}function T1(n,e,t){const i=n.slice();return i[19]=e[t],i}function Z1(n,e){let t,i,r,s=We,l,o,f;function u(){return e[11](e[19])}function h(...b){return e[12](e[19],...b)}function O(...b){return e[13](e[19],...b)}i=new QC({props:{name:e[19].stem,suffix:e[19].suffix,active:e[0]===e[19].index,readonly:e[1]||e[19].readonlyTab}}),i.$on("click",u),i.$on("rename",h),i.$on("close",O);function p(...b){return e[14](e[19],...b)}function g(...b){return e[15](e[19],...b)}return{key:n,first:null,c(){t=_("li"),De(i.$$.fragment),y(t,"draggable",!0),ae(t,"is-active",e[0]===e[19].index),this.first=t},m(b,Q){V(b,t,Q),Ve(i,t,null),l=!0,o||(f=[oe(t,"dragstart",p),oe(t,"dragover",e[7]),oe(t,"drop",g)],o=!0)},p(b,Q){e=b;const $={};Q&4&&($.name=e[19].stem),Q&4&&($.suffix=e[19].suffix),Q&5&&($.active=e[0]===e[19].index),Q&6&&($.readonly=e[1]||e[19].readonlyTab),i.$set($),(!l||Q&5)&&ae(t,"is-active",e[0]===e[19].index)},r(){r=t.getBoundingClientRect()},f(){Yx(t),s()},a(){s(),s=Ux(t,r,wC,{duration:200})},i(b){l||(D(i.$$.fragment,b),l=!0)},o(b){F(i.$$.fragment,b),l=!1},d(b){b&&Y(t),qe(i),o=!1,ti(f)}}}function R1(n){let e,t,i,r,s,l,o,f,u,h,O,p;return r=new Ct({props:{icon:XQ}}),u=new Ct({props:{icon:cC}}),{c(){e=_("li"),t=_("a"),i=_("span"),De(r.$$.fragment),s=B(),l=_("li"),o=_("button"),f=_("span"),De(u.$$.fragment),y(i,"class","icon add-icon svelte-7ub6h4"),y(t,"title","Add new file"),y(f,"class","icon"),y(o,"class","button is-small"),y(o,"title","Manage files"),y(l,"class","right svelte-7ub6h4")},m(g,b){V(g,e,b),v(e,t),v(t,i),Ve(r,i,null),V(g,s,b),V(g,l,b),v(l,o),v(o,f),Ve(u,f,null),h=!0,O||(p=[oe(t,"click",n[16]),oe(o,"click",n[17])],O=!0)},p:We,i(g){h||(D(r.$$.fragment,g),D(u.$$.fragment,g),h=!0)},o(g){F(r.$$.fragment,g),F(u.$$.fragment,g),h=!1},d(g){g&&(Y(e),Y(s),Y(l)),qe(r),qe(u),O=!1,ti(p)}}}function yC(n){let e,t,i=[],r=new Map,s,l,o=ot(n[2]);const f=h=>h[19].name;for(let h=0;h{u=null}),rt()):u?(u.p(h,O),O&2&&D(u,1)):(u=R1(h),u.c(),D(u,1),u.m(t,null))},i(h){if(!l){for(let O=0;Of(Z.index),$=(Z,I)=>u(I,Z.index),P=(Z,I)=>b(Z.index),x=(Z,I)=>O(I,Z.index),A=(Z,I)=>g(I,Z.index),C=()=>o("newFile"),X=()=>o("manageFiles");return n.$$set=Z=>{"files"in Z&&t(10,r=Z.files),"currentIndex"in Z&&t(0,s=Z.currentIndex),"readonly"in Z&&t(1,l=Z.readonly)},n.$$.update=()=>{n.$$.dirty&1024&&t(2,i=r.map((Z,I)=>{const q=Z.name.endsWith(".mzc.mzn")?Z.name.length-8:Z.name.lastIndexOf(".");return{...Z,stem:Z.name.substring(0,q),suffix:Z.name.substring(q),index:I}}).filter(Z=>!Z.hidden))},[s,l,i,o,f,u,O,p,g,b,r,Q,$,P,x,A,C,X]}class PC extends Ui{constructor(e){super(),Ai(this,e,vC,yC,Ri,{files:10,currentIndex:0,readonly:1})}}function A1(n,{delay:e=0,duration:t=400,easing:i=gd}={}){const r=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:s=>`opacity: ${s*r}`}}function Sc(n,{delay:e=0,duration:t=400,easing:i=RQ,x:r=0,y:s=0,opacity:l=0}={}){const o=getComputedStyle(n),f=+o.opacity,u=o.transform==="none"?"":o.transform,h=f*(1-l),[O,p]=hm(r),[g,b]=hm(s);return{delay:e,duration:t,easing:i,css:(Q,$)=>` transform: ${u} translate(${(1-Q)*O}${p}, ${(1-Q)*g}${b}); - opacity: ${f-h*$}`}}const kC=n=>({}),A1=n=>({});function U1(n){let e,t,i,r,s,l,o,f,u,h,O,p,g,b,Q,$,P,x;const A=n[6].default,C=an(A,n,n[5],null),X=n[6].footer,Z=an(X,n,n[5],A1),I=Z||_C(n);return{c(){e=_("form"),t=_("div"),i=L(),r=_("div"),s=_("header"),l=_("p"),o=be(n[0]),f=L(),u=_("button"),h=L(),O=_("section"),C&&C.c(),p=L(),g=_("footer"),I&&I.c(),y(t,"class","modal-background"),y(l,"class","modal-card-title"),y(u,"type","button"),y(u,"class","delete"),y(u,"aria-label","close"),y(s,"class","modal-card-head"),y(O,"class","modal-card-body"),y(g,"class","modal-card-foot"),y(r,"class","modal-card"),y(e,"tabindex","0"),y(e,"class","modal is-active")},m(q,N){V(q,e,N),v(e,t),v(e,i),v(e,r),v(r,s),v(s,l),v(l,o),v(s,f),v(s,u),v(r,h),v(r,O),C&&C.m(O,null),v(r,p),v(r,g),I&&I.m(g,null),n[7](e),$=!0,P||(x=[oe(t,"click",n[4]),oe(u,"click",n[4]),oe(e,"submit",jb(n[8]))],P=!0)},p(q,N){(!$||N&1)&&He(o,q[0]),C&&C.p&&(!$||N&32)&&cn(C,A,q,q[5],$?fn(A,q[5],N,null):un(q[5]),null),Z&&Z.p&&(!$||N&32)&&cn(Z,X,q,q[5],$?fn(X,q[5],N,kC):un(q[5]),A1)},i(q){$||(D(C,q),D(I,q),q&&ar(()=>{$&&(b||(b=wl(r,gc,{y:-200,duration:200},!0)),b.run(1))}),q&&ar(()=>{$&&(Q||(Q=wl(e,R1,{duration:200},!0)),Q.run(1))}),$=!0)},o(q){F(C,q),F(I,q),q&&(b||(b=wl(r,gc,{y:-200,duration:200},!1)),b.run(0)),q&&(Q||(Q=wl(e,R1,{duration:200},!1)),Q.run(0)),$=!1},d(q){q&&Y(e),C&&C.d(q),I&&I.d(q),q&&b&&b.end(),n[7](null),q&&Q&&Q.end(),P=!1,ii(x)}}}function _C(n){let e,t,i;return{c(){e=_("button"),e.textContent="Cancel",y(e,"class","button")},m(r,s){V(r,e,s),t||(i=oe(e,"click",n[4]),t=!0)},p:We,d(r){r&&Y(e),t=!1,i()}}}function WC(n){let e,t,i=n[1]&&U1(n);return{c(){i&&i.c(),e=fi()},m(r,s){i&&i.m(r,s),V(r,e,s),t=!0},p(r,[s]){r[1]?i?(i.p(r,s),s&2&&D(i,1)):(i=U1(r),i.c(),D(i,1),i.m(e.parentNode,e)):i&&(nt(),F(i,1,1,()=>{i=null}),rt())},i(r){t||(D(i),t=!0)},o(r){F(i),t=!1},d(r){r&&Y(e),i&&i.d(r)}}}function xC(n,e,t){let{$$slots:i={},$$scope:r}=e,{title:s}=e,{active:l=!1}=e;const o=Bn();let f;async function u(g){g&&(await lr(),f&&f.focus(),o("activate"))}function h(){o("cancel")}function O(g){Dt[g?"unshift":"push"](()=>{f=g,t(2,f)})}const p=()=>o("submit");return n.$$set=g=>{"title"in g&&t(0,s=g.title),"active"in g&&t(1,l=g.active),"$$scope"in g&&t(5,r=g.$$scope)},n.$$.update=()=>{n.$$.dirty&2&&u(l)},[s,l,f,o,h,r,i,O,p]}class Vl extends Vi{constructor(e){super(),Yi(this,e,xC,WC,Ui,{title:0,active:1})}}const RQ=1024;let CC=0;class Dn{constructor(e,t){this.from=e,this.to=t}}class et{constructor(e={}){this.id=CC++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Ji.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}et.closedBy=new et({deserialize:n=>n.split(" ")});et.openedBy=new et({deserialize:n=>n.split(" ")});et.group=new et({deserialize:n=>n.split(" ")});et.contextHash=new et({perNode:!0});et.lookAhead=new et({perNode:!0});et.mounted=new et({perNode:!0});class XC{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}}const TC=Object.create(null);class Ji{constructor(e,t,i,r=0){this.name=e,this.props=t,this.id=i,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):TC,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new Ji(e.name||"",t,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(et.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let r of i.split(" "))t[r]=e[i];return i=>{for(let r=i.prop(et.group),s=-1;s<(r?r.length:0);s++){let l=t[s<0?i.name:r[s]];if(l)return l}}}}Ji.none=new Ji("",Object.create(null),0,8);class xd{constructor(e){this.types=e;for(let t=0;t=r&&(l.type.isAnonymous||t(l)!==!1)){if(l.firstChild())continue;o=!0}for(;o&&i&&!l.type.isAnonymous&&i(l),!l.nextSibling();){if(!l.parent())return;o=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Td(Ji.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,r)=>new Gt(this.type,t,i,r,this.propValues),e.makeTree||((t,i,r)=>new Gt(Ji.none,t,i,r)))}static build(e){return RC(e)}}Gt.empty=new Gt(Ji.none,[],[],0);class Cd{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Cd(this.buffer,this.index)}}class tl{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return Ji.none}toString(){let e=[];for(let t=0;t0));f=l[f+3]);return o}slice(e,t,i){let r=this.buffer,s=new Uint16Array(t-e),l=0;for(let o=e,f=0;o=e&&te;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function UQ(n,e){let t=n.childBefore(e);for(;t;){let i=t.lastChild;if(!i||i.to!=t.to)break;i.type.isError&&i.from==i.to?(n=t,t=i.prevSibling):t=i}return n}function ql(n,e,t,i){for(var r;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?o.length:-1;e!=u;e+=t){let h=o[e],O=f[e]+l.from;if(AQ(r,i,O,O+h.length)){if(h instanceof tl){if(s&At.ExcludeBuffers)continue;let p=h.findChild(0,h.buffer.length,t,i-O,r);if(p>-1)return new wr(new ZC(l,h,e,O),null,p)}else if(s&At.IncludeAnonymous||!h.type.isAnonymous||Xd(h)){let p;if(!(s&At.IgnoreMounts)&&h.props&&(p=h.prop(et.mounted))&&!p.overlay)return new Nn(p.tree,O,e,l);let g=new Nn(h,O,e,l);return s&At.IncludeAnonymous||!g.type.isAnonymous?g:g.nextChild(t<0?h.children.length-1:0,t,i,r)}}}if(s&At.IncludeAnonymous||!l.type.isAnonymous||(l.index>=0?e=l.index+t:e=t<0?-1:l._parent._tree.children.length,l=l._parent,!l))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let r;if(!(i&At.IgnoreOverlays)&&(r=this._tree.prop(et.mounted))&&r.overlay){let s=e-this.from;for(let{from:l,to:o}of r.overlay)if((t>0?l<=s:l=s:o>s))return new Nn(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}cursor(e=0){return new ea(this,e)}get tree(){return this._tree}toTree(){return this._tree}resolve(e,t=0){return ql(this,e,t,!1)}resolveInner(e,t=0){return ql(this,e,t,!0)}enterUnfinishedNodesBefore(e){return UQ(this,e)}getChild(e,t=null,i=null){let r=mc(this,e,t,i);return r.length?r[0]:null}getChildren(e,t=null,i=null){return mc(this,e,t,i)}toString(){return this._tree.toString()}get node(){return this}matchContext(e){return Sc(this,e)}}function mc(n,e,t,i){let r=n.cursor(),s=[];if(!r.firstChild())return s;if(t!=null){for(;!r.type.is(t);)if(!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function Sc(n,e,t=e.length-1){for(let i=n.parent;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class ZC{constructor(e,t,i,r){this.parent=e,this.buffer=t,this.index=i,this.start=r}}class wr{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,i);return s<0?null:new wr(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&At.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new wr(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new wr(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new wr(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}cursor(e=0){return new ea(this,e)}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let l=i.buffer[this.index+1];e.push(i.slice(r,s,l)),t.push(0)}return new Gt(this.type,e,t,this.to-this.from)}resolve(e,t=0){return ql(this,e,t,!1)}resolveInner(e,t=0){return ql(this,e,t,!0)}enterUnfinishedNodesBefore(e){return UQ(this,e)}toString(){return this.context.buffer.childString(this.index)}getChild(e,t=null,i=null){let r=mc(this,e,t,i);return r.length?r[0]:null}getChildren(e,t=null,i=null){return mc(this,e,t,i)}get node(){return this}matchContext(e){return Sc(this,e)}}class ea{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Nn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof Nn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&At.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&At.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&At.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:r}=this;if(r){if(e>0){if(this.index-1)for(let s=t+e,l=e<0?-1:i._tree.children.length;s!=l;s+=e){let o=i._tree.children[s];if(this.mode&At.IncludeAnonymous||o instanceof tl||!o.type.isAnonymous||Xd(o))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let l=e;l;l=l._parent)if(l.index==r){if(r==this.index)return l;t=l,i=s+1;break e}r=this.stack[--s]}for(let r=i;r=0;s--){if(s<0)return Sc(this.node,e,r);let l=i[t.buffer[this.stack[s]]];if(!l.isAnonymous){if(e[r]&&e[r]!=l.name)return!1;r--}}return!0}}function Xd(n){return n.children.some(e=>e instanceof tl||!e.type.isAnonymous||Xd(e))}function RC(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:r=RQ,reused:s=[],minRepeatType:l=i.types.length}=n,o=Array.isArray(t)?new Cd(t,t.length):t,f=i.types,u=0,h=0;function O(C,X,Z,I,q){let{id:N,start:z,end:ie,size:ue}=o,$e=h;for(;ue<0;)if(o.next(),ue==-1){let Ae=s[N];Z.push(Ae),I.push(z-C);return}else if(ue==-3){u=N;return}else if(ue==-4){h=N;return}else throw new RangeError(`Unrecognized record size: ${ue}`);let Se=f[N],Te,pe,fe=z-C;if(ie-z<=r&&(pe=Q(o.pos-X,q))){let Ae=new Uint16Array(pe.size-pe.skip),xe=o.pos-pe.size,Ce=Ae.length;for(;o.pos>xe;)Ce=$(pe.start,Ae,Ce);Te=new tl(Ae,ie-pe.start,i),fe=pe.start-C}else{let Ae=o.pos-ue;o.next();let xe=[],Ce=[],Me=N>=l?N:-1,yt=0,ni=ie;for(;o.pos>Ae;)Me>=0&&o.id==Me&&o.size>=0?(o.end<=ni-r&&(g(xe,Ce,z,yt,o.end,ni,Me,$e),yt=xe.length,ni=o.end),o.next()):O(z,Ae,xe,Ce,Me);if(Me>=0&&yt>0&&yt-1&&yt>0){let xt=p(Se);Te=Td(Se,xe,Ce,0,xe.length,0,ie-z,xt,xt)}else Te=b(Se,xe,Ce,ie-z,$e-ie)}Z.push(Te),I.push(fe)}function p(C){return(X,Z,I)=>{let q=0,N=X.length-1,z,ie;if(N>=0&&(z=X[N])instanceof Gt){if(!N&&z.type==C&&z.length==I)return z;(ie=z.prop(et.lookAhead))&&(q=Z[N]+z.length+ie)}return b(C,X,Z,I,q)}}function g(C,X,Z,I,q,N,z,ie){let ue=[],$e=[];for(;C.length>I;)ue.push(C.pop()),$e.push(X.pop()+Z-q);C.push(b(i.types[z],ue,$e,N-q,ie-N)),X.push(q-Z)}function b(C,X,Z,I,q=0,N){if(u){let z=[et.contextHash,u];N=N?[z].concat(N):[z]}if(q>25){let z=[et.lookAhead,q];N=N?[z].concat(N):[z]}return new Gt(C,X,Z,I,N)}function Q(C,X){let Z=o.fork(),I=0,q=0,N=0,z=Z.end-r,ie={size:0,start:0,skip:0};e:for(let ue=Z.pos-C;Z.pos>ue;){let $e=Z.size;if(Z.id==X&&$e>=0){ie.size=I,ie.start=q,ie.skip=N,N+=4,I+=4,Z.next();continue}let Se=Z.pos-$e;if($e<0||Se=l?4:0,pe=Z.start;for(Z.next();Z.pos>Se;){if(Z.size<0)if(Z.size==-3)Te+=4;else break e;else Z.id>=l&&(Te+=4);Z.next()}q=pe,I+=$e,N+=Te}return(X<0||I==C)&&(ie.size=I,ie.start=q,ie.skip=N),ie.size>4?ie:void 0}function $(C,X,Z){let{id:I,start:q,end:N,size:z}=o;if(o.next(),z>=0&&I4){let ue=o.pos-(z-4);for(;o.pos>ue;)Z=$(C,X,Z)}X[--Z]=ie,X[--Z]=N-C,X[--Z]=q-C,X[--Z]=I}else z==-3?u=I:z==-4&&(h=I);return Z}let P=[],x=[];for(;o.pos>0;)O(n.start||0,n.bufferStart||0,P,x,-1);let A=(e=n.length)!==null&&e!==void 0?e:P.length?x[0]+P[0].length:0;return new Gt(f[n.topID],P.reverse(),x.reverse(),A)}const V1=new WeakMap;function tc(n,e){if(!n.isAnonymous||e instanceof tl||e.type!=n)return 1;let t=V1.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof Gt)){t=1;break}t+=tc(n,i)}V1.set(e,t)}return t}function Td(n,e,t,i,r,s,l,o,f){let u=0;for(let b=i;b=h)break;Z+=I}if(A==C+1){if(Z>h){let I=b[C];g(I.children,I.positions,0,I.children.length,Q[C]+x);continue}O.push(b[C])}else{let I=Q[A-1]+b[A-1].length-X;O.push(Td(n,b,Q,C,A,X,I,null,f))}p.push(X+x-s)}}return g(e,t,i,r,0),(o||f)(O,p,l)}class YQ{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof wr?this.setBuffer(e.context.buffer,e.index,t):e instanceof Nn&&this.map.set(e.tree,t)}get(e){return e instanceof wr?this.getBuffer(e.context.buffer,e.index):e instanceof Nn?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Ir{constructor(e,t,i,r,s=!1,l=!1){this.from=e,this.to=t,this.tree=i,this.offset=r,this.open=(s?1:0)|(l?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let r=[new Ir(0,e.length,e,0,!1,i)];for(let s of t)s.to>e.length&&r.push(s);return r}static applyChanges(e,t,i=128){if(!t.length)return e;let r=[],s=1,l=e.length?e[0]:null;for(let o=0,f=0,u=0;;o++){let h=o=i)for(;l&&l.from=p.from||O<=p.to||u){let g=Math.max(p.from,f)-u,b=Math.min(p.to,O)-u;p=g>=b?null:new Ir(g,b,p.tree,p.offset+u,o>0,!!h)}if(p&&r.push(p),l.to>O)break;l=snew Dn(r.from,r.to)):[new Dn(0,0)]:[new Dn(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let r=this.startParse(e,t,i);for(;;){let s=r.advance();if(s)return s}}}class AC{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function UC(n){return(e,t,i,r)=>new VC(e,n,t,i,r)}class q1{constructor(e,t,i,r,s){this.parser=e,this.parse=t,this.overlay=i,this.target=r,this.ranges=s}}class YC{constructor(e,t,i,r,s,l,o){this.parser=e,this.predicate=t,this.mounts=i,this.index=r,this.start=s,this.target=l,this.prev=o,this.depth=0,this.ranges=[]}}const KO=new et({perNode:!0});class VC{constructor(e,t,i,r,s){this.nest=t,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new Gt(i.type,i.children,i.positions,i.length,i.propValues.concat([[KO,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[et.mounted.id]=new XC(t,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;th.frag.from<=r.from&&h.frag.to>=r.to&&h.mount.overlay);if(u)for(let h of u.mount.overlay){let O=h.from+u.pos,p=h.to+u.pos;O>=r.from&&p<=r.to&&!t.ranges.some(g=>g.fromO)&&t.ranges.push({from:O,to:p})}}o=!1}else if(i&&(l=qC(i.ranges,r.from,r.to)))o=l!=2;else if(!r.type.isAnonymous&&r.fromnew Dn(O.from-r.from,O.to-r.from)):null,r.tree,h)),s.overlay?h.length&&(i={ranges:h,depth:0,prev:i}):o=!1}}else t&&(f=t.predicate(r))&&(f===!0&&(f=new Dn(r.from,r.to)),f.fromnew Dn(h.from-t.start,h.to-t.start)),t.target,u)),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function qC(n,e,t){for(let i of n){if(i.from>=t)break;if(i.to>e)return i.from<=e&&i.to>=t?2:1}return 0}function E1(n,e,t,i,r,s){if(e=e.to);i++);let l=r.children[i],o=l.buffer;function f(u,h,O,p,g){let b=u;for(;o[b+2]+s<=e.from;)b=o[b+3];let Q=[],$=[];E1(l,u,b,Q,$,p);let P=o[b+1],x=o[b+2],A=P+s==e.from&&x+s==e.to&&o[b]==e.type.id;return Q.push(A?e.toTree():f(b+4,o[b+3],l.set.types[o[b]],P,x-P)),$.push(P-p),E1(l,o[b+3],h,Q,$,p),new Gt(O,Q,$,g)}r.children[i]=f(0,o.length,Ji.none,0,l.length);for(let u=0;u<=t;u++)n.childAfter(e.from)}class M1{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(At.IncludeAnonymous|At.IgnoreMounts)}moveTo(e){let{cursor:t}=this,i=e-this.offset;for(;!this.done&&t.from=e&&t.enter(i,1,At.IgnoreOverlays|At.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof Gt)t=t.children[0];else break}return!1}}let MC=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(t=i.tree.prop(KO))!==null&&t!==void 0?t:i.to,this.inner=new M1(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(KO))!==null&&e!==void 0?e:t.to,this.inner=new M1(t.tree,-t.offset)}}findMounts(e,t){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let l=(i=s.tree)===null||i===void 0?void 0:i.prop(et.mounted);if(l&&l.parser==t)for(let o=this.fragI;o=s.to)break;f.tree==this.curFrag.tree&&r.push({frag:f,pos:s.from-f.offset,mount:l})}}}return r}};function D1(n,e){let t=null,i=e;for(let r=1,s=0;r=o)break;f.to<=l||(t||(i=t=e.slice()),f.fromo&&t.splice(s+1,0,new Dn(o,f.to))):f.to>o?t[s--]=new Dn(o,f.to):t.splice(s--,1))}}return i}function DC(n,e,t,i){let r=0,s=0,l=!1,o=!1,f=-1e9,u=[];for(;;){let h=r==n.length?1e9:l?n[r].to:n[r].from,O=s==e.length?1e9:o?e[s].to:e[s].from;if(l!=o){let p=Math.max(f,t),g=Math.min(h,O,i);pnew Dn(p.from+i,p.to+i)),O=DC(e,h,f,u);for(let p=0,g=f;;p++){let b=p==O.length,Q=b?u:O[p].from;if(Q>g&&t.push(new Ir(g,Q,r.tree,-l,s.from>=g||s.openStart,s.to<=Q||s.openEnd)),b)break;g=O[p].to}}else t.push(new Ir(f,u,r.tree,-l,s.from>=l||s.openStart,s.to<=o||s.openEnd))}return t}class bc{constructor(e,t,i,r,s,l,o,f,u,h=0,O){this.p=e,this.stack=t,this.state=i,this.reducePos=r,this.pos=s,this.score=l,this.buffer=o,this.bufferBase=f,this.curContext=u,this.lookAhead=h,this.parent=O}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,i=0){let r=e.parser.context;return new bc(e,[],t,i,i,0,[],0,r?new I1(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let i=e>>19,r=e&65535,{parser:s}=this.p,l=s.dynamicPrecedence(r);if(l&&(this.score+=l),i==0){this.pushState(s.getGoto(this.state,r,!0),this.reducePos),r=2e3&&!(!((t=this.p.parser.nodeSet.types[r])===null||t===void 0)&&t.isAnonymous)&&(f==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizeo;)this.stack.pop();this.reduceContext(r,f)}storeNode(e,t,i,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&l.buffer[o-4]==0&&l.buffer[o-1]>-1){if(t==i)return;if(l.buffer[o-2]>=t){l.buffer[o-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(e,t,i,r);else{let l=this.buffer.length;if(l>0&&this.buffer[l-4]!=0)for(;l>0&&this.buffer[l-2]>i;)this.buffer[l]=this.buffer[l-4],this.buffer[l+1]=this.buffer[l-3],this.buffer[l+2]=this.buffer[l-2],this.buffer[l+3]=this.buffer[l-1],l-=4,r>4&&(r-=4);this.buffer[l]=e,this.buffer[l+1]=t,this.buffer[l+2]=i,this.buffer[l+3]=r}}shift(e,t,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,r,4);else{let s=e,{parser:l}=this.p;(r>this.pos||t<=l.maxNode)&&(this.pos=r,l.stateFlag(s,1)||(this.reducePos=r)),this.pushState(s,i),this.shiftContext(t,i),t<=l.maxNode&&this.buffer.push(t,i,r,4)}}apply(e,t,i,r){e&65536?this.reduce(e):this.shift(e,t,i,r)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let i=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new bc(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new zC(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(i==0)return!1;if(!(i&65536))return!0;t.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let r=[];for(let s=0,l;sf&1&&o==l)||r.push(t[s],l)}t=r}let i=[];for(let r=0;r>19,r=t&65535,s=this.stack.length-i*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let l=this.findForcedReduction();if(l==null)return!1;t=l}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],i=(r,s)=>{if(!t.includes(r))return t.push(r),e.allActions(r,l=>{if(!(l&393216))if(l&65536){let o=(l>>19)-s;if(o>1){let f=l&65535,u=this.stack.length-o*3;if(u>=0&&e.getGoto(this.stack[u],f,!1)>=0)return o<<19|65536|f}}else{let o=i(l,s+1);if(o!=null)return o}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class I1{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class zC{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}class $c{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new $c(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new $c(this.stack,this.pos,this.index)}}function Zo(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let i=0,r=0;i=92&&l--,l>=34&&l--;let f=l-32;if(f>=46&&(f-=46,o=!0),s+=f,o)break;s*=46}t?t[r++]=s:t=new e(s)}return t}class ic{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const N1=new ic;class IC{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=N1,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let i=this.range,r=this.rangeIndex,s=this.pos+e;for(;si.to:s>=i.to;){if(r==this.ranges.length-1)return null;let l=this.ranges[++r];s+=l.from-i.to,i=l}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,i,r;if(t>=0&&t=this.chunk2Pos&&io.to&&(this.chunk2=this.chunk2.slice(0,o.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=N1,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let i="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return i}}class Zl{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:i}=t.p;qQ(this.data,e,t,this.id,i.data,i.tokenPrecTable)}}Zl.prototype.contextual=Zl.prototype.fallback=Zl.prototype.extend=!1;class JO{constructor(e,t,i){this.precTable=t,this.elseToken=i,this.data=typeof e=="string"?Zo(e):e}token(e,t){let i=e.pos,r=0;for(;;){let s=e.next<0,l=e.resolveOffset(1,1);if(qQ(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,l==null)break;e.reset(l,e.token)}r&&(e.reset(i,e.token),e.acceptToken(this.elseToken,r))}}JO.prototype.contextual=Zl.prototype.fallback=Zl.prototype.extend=!1;class Wr{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function qQ(n,e,t,i,r,s){let l=0,o=1<0){let b=n[g];if(f.allows(b)&&(e.token.value==-1||e.token.value==b||NC(b,e.token.value,r,s))){e.acceptToken(b);break}}let h=e.next,O=0,p=n[l+2];if(e.next<0&&p>O&&n[u+p*3-3]==65535){l=n[u+p*3-1];continue e}for(;O>1,b=u+g+(g<<1),Q=n[b],$=n[b+1]||65536;if(h=$)O=g+1;else{l=n[b+2],e.advance();continue e}}break}}function L1(n,e,t){for(let i=e,r;(r=n[i])!=65535;i++)if(r==t)return i-e;return-1}function NC(n,e,t,i){let r=L1(t,i,e);return r<0||L1(t,i,n)e)&&!i.type.isError)return t<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(n.length,Math.max(i.from+1,e+25));if(t<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return t<0?0:n.length}}class LC{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?B1(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?B1(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=l,null;if(s instanceof Gt){if(l==e){if(l=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(l),this.index.push(0))}else this.index[t]++,this.nextStart=l+s.length}}}class BC{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new ic)}getActions(e){let t=0,i=null,{parser:r}=e.p,{tokenizers:s}=r,l=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,f=0;for(let u=0;uO.end+25&&(f=Math.max(O.lookAhead,f)),O.value!=0)){let p=t;if(O.extended>-1&&(t=this.addActions(e,O.extended,O.end,t)),t=this.addActions(e,O.value,O.end,t),!h.extend&&(i=O,t>p))break}}for(;this.actions.length>t;)this.actions.pop();return f&&e.setLookAhead(f),!i&&e.pos==this.stream.end&&(i=new ic,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new ic,{pos:i,p:r}=e;return t.start=i,t.end=Math.min(i+1,r.stream.end),t.value=i==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,i){let r=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(r,e),i),e.value>-1){let{parser:s}=i.p;for(let l=0;l=0&&i.p.parser.dialect.allows(o>>1)){o&1?e.extended=o>>1:e.value=o>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,i,r){for(let s=0;se.bufferLength*4?new LC(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,i=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[l]=e;for(;l.forceReduce()&&l.stack.length&&l.stack[l.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let l=0;lt)i.push(o);else{if(this.advanceStack(o,i,e))continue;{r||(r=[],s=[]),r.push(o);let f=this.tokens.getMainToken(o);s.push(f.value,f.end)}}break}}if(!i.length){let l=r&&GC(r);if(l)return Qn&&console.log("Finish with "+this.stackID(l)),this.stackToTree(l);if(this.parser.strict)throw Qn&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&r){let l=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,i);if(l)return Qn&&console.log("Force-finish "+this.stackID(l)),this.stackToTree(l.forceAll())}if(this.recovering){let l=this.recovering==1?1:this.recovering*3;if(i.length>l)for(i.sort((o,f)=>f.score-o.score);i.length>l;)i.pop();i.some(o=>o.reducePos>t)&&this.recovering--}else if(i.length>1){e:for(let l=0;l500&&u.buffer.length>500)if((o.score-u.score||o.buffer.length-u.buffer.length)>0)i.splice(f--,1);else{i.splice(l--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let l=1;l ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,h=u?e.curContext.hash:0;for(let O=this.fragments.nodeAt(r);O;){let p=this.parser.nodeSet.types[O.type.id]==O.type?s.getGoto(e.state,O.type.id):-1;if(p>-1&&O.length&&(!u||(O.prop(et.contextHash)||0)==h))return e.useNode(O,p),Qn&&console.log(l+this.stackID(e)+` (via reuse of ${s.getName(O.type.id)})`),!0;if(!(O instanceof Gt)||O.children.length==0||O.positions[0]>0)break;let g=O.children[0];if(g instanceof Gt&&O.positions[0]==0)O=g;else break}}let o=s.stateSlot(e.state,4);if(o>0)return e.reduce(o),Qn&&console.log(l+this.stackID(e)+` (via always-reduce ${s.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let f=this.tokens.getActions(e);for(let u=0;ur?t.push(b):i.push(b)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return j1(e,t),!0}}runRecovery(e,t,i){let r=null,s=!1;for(let l=0;l ":"";if(o.deadEnd&&(s||(s=!0,o.restart(),Qn&&console.log(h+this.stackID(o)+" (restarted)"),this.advanceFully(o,i))))continue;let O=o.split(),p=h;for(let g=0;O.forceReduce()&&g<10&&(Qn&&console.log(p+this.stackID(O)+" (via force-reduce)"),!this.advanceFully(O,i));g++)Qn&&(p=this.stackID(O)+" -> ");for(let g of o.recoverByInsert(f))Qn&&console.log(h+this.stackID(g)+" (via recover-insert)"),this.advanceFully(g,i);this.stream.end>o.pos?(u==o.pos&&(u++,f=0),o.recoverByDelete(f,u),Qn&&console.log(h+this.stackID(o)+` (via recover-delete ${this.parser.getName(f)})`),j1(o,i)):(!r||r.scoren;class EQ{constructor(e){this.start=e.start,this.shift=e.shift||Lh,this.reduce=e.reduce||Lh,this.reuse=e.reuse||Lh,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class _s extends VQ{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let o=0;oe.topRules[o][1]),r=[];for(let o=0;o=0)s(h,f,o[u++]);else{let O=o[u+-h];for(let p=-h;p>0;p--)s(o[u++],f,O);u++}}}this.nodeSet=new xd(t.map((o,f)=>Ji.define({name:f>=this.minRepeatTerm?void 0:o,id:f,props:r[f],top:i.indexOf(f)>-1,error:f==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(f)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=RQ;let l=Zo(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let o=0;otypeof o=="number"?new Zl(l,o):o),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,i){let r=new jC(this,e,t,i);for(let s of this.wrappers)r=s(r,e,t,i);return r}getGoto(e,t,i=!1){let r=this.goto;if(t>=r[0])return-1;for(let s=r[t+1];;){let l=r[s++],o=l&1,f=r[s++];if(o&&i)return f;for(let u=s+(l>>1);s0}validAction(e,t){return!!this.allActions(e,i=>i==t?!0:null)}allActions(e,t){let i=this.stateSlot(e,4),r=i?t(i):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=Dr(this.data,s+2);else break;r=t(Dr(this.data,s+1))}return r}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=Dr(this.data,i+2);else break;if(!(this.data[i+2]&1)){let r=this.data[i+1];t.some((s,l)=>l&1&&s==r)||t.push(this.data[i],r)}}return t}configure(e){let t=Object.assign(Object.create(_s.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(s=>s.from==i);return r?r.to:i})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((i,r)=>{let s=e.specializers.find(o=>o.from==i.external);if(!s)return i;let l=Object.assign(Object.assign({},i),{external:s.to});return t.specializers[r]=F1(l),l})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map(()=>!1);if(e)for(let s of e.split(" ")){let l=t.indexOf(s);l>=0&&(i[l]=!0)}let r=null;for(let s=0;si)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scoren.external(t,i)<<1|e}return n.get}const HC={__proto__:null,annotation:12,array:20,var:24,par:26,opt:28,ann:32,bool:34,float:36,int:38,string:40,_:50,true:62,false:64,infinity:68,"∅":74,in:92,where:94,if:98,then:100,elseif:102,else:104,endif:106,xor:110,subset:112,superset:114,union:116,diff:118,symdiff:120,intersect:122,div:124,mod:126,default:128,let:132,constraint:140,not:144,"¬":146,any:170,of:172,set:176,tuple:180,record:184,op:190,enum:198,function:202,solve:206,satisfy:208,maximize:210,minimize:212,include:216,output:220,predicate:224,test:226,type:230},KC=_s.deserialize({version:14,states:"!0jQ]QPOOOOQO'#F]'#F]O&XQPO'#CvO&`QPO'#CxOOQO'#C}'#C}O&gQPO'#DSO&nOQO'#DTO$kQPO'#DWOOQO'#Fc'#FcO*}QPO'#CgO+eQPO'#DrO$kQPO'#DuO$kQPO'#DuO/qQPO'#FbOOQO'#Fb'#FbOOQO'#Cg'#CgOOQO'#F`'#F`OOQO'#F['#F[Q/xQPO'#EtQ]QPOOOOQO'#Ck'#CkOOQO'#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S&u%V&wQ'T%aQ(U&jQ([&oQ)X(ZQ)_(bQ)t)UU)v)Y)x*[Q)|)`R*Y)u!^XOcu#O#U#V#W#X#Y$u$x%V%a&j&l&o&q&w(X(Z(`(b)U)W)Y)^)`)u)x*[Q{QQ!QRQ!UTQ!]VQ!sZU!t[$d'jQ!{hQ!|iW#Qkl$|$}Q#bxQ#i|Q#r!SQ#x!VQ#z!XQ$T!`Q$U!aQ$V!bQ$W!cQ$X!dQ$Y!eQ$Z!fQ$[!gQ$]!hS$^!i!pQ$_!jQ$`!kQ$a!lQ$b!mQ$c!nS$h!q+RQ$j!uQ$q!xQ$s!}S$y#T&kQ%]#_Q%^#`S%b#f'X^%c#g%d'U'W'd(n(uU%g#k%j'ZQ%l#nQ%v#}Q%w$PQ&U$kQ&^$oQ&_$rQ&a$sQ&h$wQ&y%WQ&{%YQ&|%ZQ'Q%_Q'`%oU'i%}'l(wQ'n&QQ'o&RQ'v&YQ(P&`Q(Q&bQ(R&cQ(h&zQ(k'PQ(l'RQ(m'SQ(y'sQ)S'|Q)T(OQ)e(iQ)m(xQ)o(zQ)p(|Q)q)RQ*Q)fQ*R)gQ*U)nQ*X)rQ*`*PQ*b*VQ*e*oQ*f*pQ*g*qQ*h*rQ*i*sQ*j*tQ*k*uQ*l*vS*m*d*wQ*n*xQ+S*{Q+T+ZQ+U*|Q+V*}Q+W+OQ+X+PR+Y+Q",nodeNames:"⚠ LineComment BlockComment SourceFile Annotation Identifier Keyword QuotedIdentifier Parameter ArrayType Keyword TypeBase Keyword Keyword Keyword PrimitiveType Keyword Keyword Keyword Keyword Keyword TypeInstId TypeInstEnumId Absent Anonymous Keyword ArrayLiteral2d ArrayLiteral2dRow ArrayLiteral ArrayLiteralMember BooleanLiteral Keyword Keyword Infinity Keyword Number EmptySet Keyword SetLiteral StringLiteral Interpolation TupleLiteral RecordLiteral RecordMember ArrayComprehension Generator Keyword Keyword IfThenElse Keyword Keyword Keyword Keyword Keyword InfixOperator Keyword Keyword Keyword Keyword Keyword Keyword Keyword Keyword Keyword Keyword LetExpression Keyword LetItems Declaration Constraint Keyword PrefixOperator Keyword Keyword PostfixOperator SetComprehension Call Application GeneratorCall GeneratorCallGenerators ParenthesisedExpression IndexedAccess TupleAccess Number RecordAccess Keyword Keyword SetType Keyword TupleType Keyword RecordType Keyword RecordTypeField OperationType Keyword AnyType Assignment Enumeration Keyword FunctionItem Keyword Goal Keyword Keyword Keyword Keyword Include Keyword Output Keyword Predicate Keyword Keyword TypeAlias Keyword",maxTerm:210,skippedNodes:[0,1,2],repeatNodeCount:19,tokenData:"!8_~R!oOX&SXY&qYZ'nZ]&S]^&q^p&Spq&qqr(Prs)Xsu&Suv)^vw&Swx*lxy,ryz-]z{-v{|.a|}/k}!O0U!O!P1`!P!Q3Z!Q!R9g!R![@|![!]Bz!]!^DU!^!_Do!_!`Is!`!aJ}!a!c&S!c!}LX!}#OM[#O#PNf#P#Q!#p#Q#R!$Z#R#SLX#S#T&S#T#oLX#o#p!$t#p#q!%_#q#r!&f#r#s!'P#s%#t&S%#t%#u!.O%#u%#v&S%#v%#w!.i%#w%%W&S%%W%%X!/S%%X%%Y&S%%Y%%Z!/m%%Z%%[&S%%[%%]!0W%%]%&b&S%&b%&c!0q%&c%&p&S%&p%&q!1[%&q%&x&S%&x%&y!1u%&y%'R&S%'R%'S!2`%'S%'T!2y%'T%'U!3d%'U%'V!3}%'V%(^&S%(^%(_!4h%(_%(b&S%(b%(c!5R%(c%(d!5l%(d%)U&S%)U%)V!6V%)V%)W!6p%)W%*]&S%*]%*^!7Z%*^%Gc&S%Gc%Gd!7t%Gd;'S&S;'S;=`&k<%lO&SQ&XU$bQOY&SZr&Ss#O&S#P;'S&S;'S;=`&k<%lO&SQ&nP;=`<%l&SV&x[$bQ#}TOX&SXY&qYZ'nZ]&S]^&q^p&Spq&qqr&Ss#O&S#P;'S&S;'S;=`&k<%lO&ST'sS#}TXY'nYZ'n]^'npq'nR(UW$bQOY&SZr&Ss!_&S!_!`(n!`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nP$bQOY&SZr&Ss#O&S#P;'S&S;'S;=`&k<%lO&SR!/tU$kP$bQOY&SZr&Ss#O&S#P;'S&S;'S;=`&k<%lO&SR!0_U$hP$bQOY&SZr&Ss#O&S#P;'S&S;'S;=`&k<%lO&SR!0xU%OP$bQOY&SZr&Ss#O&S#P;'S&S;'S;=`&k<%lO&SR!1cU%UP$bQOY&SZr&Ss#O&S#P;'S&S;'S;=`&k<%lO&SR!1|U$^P$bQOY&SZr&Ss#O&S#P;'S&S;'S;=`&k<%lO&SR!2gU$sP$bQOY&SZr&Ss#O&S#P;'S&S;'S;=`&k<%lO&SR!3QU$pP$bQOY&SZr&Ss#O&S#P;'S&S;'S;=`&k<%lO&SR!3kU%VP$bQOY&SZr&Ss#O&S#P;'S&S;'S;=`&k<%lO&SR!4UU%TP$bQOY&SZr&Ss#O&S#P;'S&S;'S;=`&k<%lO&SR!4oU$wP$bQOY&SZr&Ss#O&S#P;'S&S;'S;=`&k<%lO&SR!5YU$zP$bQOY&SZr&Ss#O&S#P;'S&S;'S;=`&k<%lO&SR!5sU$}P$bQOY&SZr&Ss#O&S#P;'S&S;'S;=`&k<%lO&SR!6^U%PP$bQOY&SZr&Ss#O&S#P;'S&S;'S;=`&k<%lO&SR!6wU%QP$bQOY&SZr&Ss#O&S#P;'S&S;'S;=`&k<%lO&SR!7bU$qP$bQOY&SZr&Ss#O&S#P;'S&S;'S;=`&k<%lO&SR!7{U$gP$bQOY&SZr&Ss#O&S#P;'S&S;'S;=`&k<%lO&S",tokenizers:[0,1,2],topRules:{SourceFile:[0,3]},specialized:[{term:5,get:n=>HC[n]||-1}],tokenPrec:0});let JC=0;class br{constructor(e,t,i){this.set=e,this.base=t,this.modified=i,this.id=JC++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let t=new br([],null,[]);if(t.set.push(t),e)for(let i of e.set)t.set.push(i);return t}static defineModifier(){let e=new Qc;return t=>t.modified.indexOf(e)>-1?t:Qc.get(t.base||t,t.modified.concat(e).sort((i,r)=>i.id-r.id))}}let eX=0;class Qc{constructor(){this.instances=[],this.id=eX++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(o=>o.base==e&&tX(t,o.modified));if(i)return i;let r=[],s=new br(r,e,t);for(let o of t)o.instances.push(s);let l=iX(t);for(let o of e.set)if(!o.modified.length)for(let f of l)r.push(Qc.get(o,f));return s}}function tX(n,e){return n.length==e.length&&n.every((t,i)=>t==e[i])}function iX(n){let e=[[]];for(let t=0;ti.length-t.length)}function Ll(n){let e=Object.create(null);for(let t in n){let i=n[t];Array.isArray(i)||(i=[i]);for(let r of t.split(" "))if(r){let s=[],l=2,o=r;for(let O=0;;){if(o=="..."&&O>0&&O+3==r.length){l=1;break}let p=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!p)throw new RangeError("Invalid path: "+r);if(s.push(p[0]=="*"?"":p[0][0]=='"'?JSON.parse(p[0]):p[0]),O+=p[0].length,O==r.length)break;let g=r[O++];if(O==r.length&&g=="!"){l=0;break}if(g!="/")throw new RangeError("Invalid path: "+r);o=r.slice(O)}let f=s.length-1,u=s[f];if(!u)throw new RangeError("Invalid path: "+r);let h=new wc(i,l,f>0?s.slice(0,f):null);e[u]=h.sort(e[u])}}return MQ.add(e)}const MQ=new et;class wc{constructor(e,t,i,r){this.tags=e,this.mode=t,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let l=r;for(let o of s)for(let f of o.set){let u=t[f.id];if(u){l=l?l+" "+u:u;break}}return l},scope:i}}function nX(n,e){let t=null;for(let i of n){let r=i.style(e);r&&(t=t?t+" "+r:r)}return t}function rX(n,e,t,i=0,r=n.length){let s=new sX(i,Array.isArray(e)?e:[e],t);s.highlightRange(n.cursor(),i,r,"",s.highlighters),s.flush(r)}class sX{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,r,s){let{type:l,from:o,to:f}=e;if(o>=i||f<=t)return;l.isTop&&(s=this.highlighters.filter(g=>!g.scope||g.scope(l)));let u=r,h=lX(e)||wc.empty,O=nX(s,h.tags);if(O&&(u&&(u+=" "),u+=O,h.mode==1&&(r+=(r?" ":"")+O)),this.startSpan(Math.max(t,o),u),h.opaque)return;let p=e.tree&&e.tree.prop(et.mounted);if(p&&p.overlay){let g=e.node.enter(p.overlay[0].from+o,1),b=this.highlighters.filter($=>!$.scope||$.scope(p.tree.type)),Q=e.firstChild();for(let $=0,P=o;;$++){let x=$=A||!e.nextSibling())););if(!x||A>i)break;P=x.to+o,P>t&&(this.highlightRange(g.cursor(),Math.max(t,x.from+o),Math.min(i,P),"",b),this.startSpan(Math.min(i,P),u))}Q&&e.parent()}else if(e.firstChild()){p&&(r="");do if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,r,s),this.startSpan(Math.min(i,e.to),u)}while(e.nextSibling());e.parent()}}}function lX(n){let e=n.type.prop(MQ);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const de=br.define,Vf=de(),ds=de(),G1=de(ds),H1=de(ds),ps=de(),qf=de(ps),Bh=de(ps),mr=de(),Is=de(mr),pr=de(),gr=de(),ed=de(),wo=de(ed),Ef=de(),S={comment:Vf,lineComment:de(Vf),blockComment:de(Vf),docComment:de(Vf),name:ds,variableName:de(ds),typeName:G1,tagName:de(G1),propertyName:H1,attributeName:de(H1),className:de(ds),labelName:de(ds),namespace:de(ds),macroName:de(ds),literal:ps,string:qf,docString:de(qf),character:de(qf),attributeValue:de(qf),number:Bh,integer:de(Bh),float:de(Bh),bool:de(ps),regexp:de(ps),escape:de(ps),color:de(ps),url:de(ps),keyword:pr,self:de(pr),null:de(pr),atom:de(pr),unit:de(pr),modifier:de(pr),operatorKeyword:de(pr),controlKeyword:de(pr),definitionKeyword:de(pr),moduleKeyword:de(pr),operator:gr,derefOperator:de(gr),arithmeticOperator:de(gr),logicOperator:de(gr),bitwiseOperator:de(gr),compareOperator:de(gr),updateOperator:de(gr),definitionOperator:de(gr),typeOperator:de(gr),controlOperator:de(gr),punctuation:ed,separator:de(ed),bracket:wo,angleBracket:de(wo),squareBracket:de(wo),paren:de(wo),brace:de(wo),content:mr,heading:Is,heading1:de(Is),heading2:de(Is),heading3:de(Is),heading4:de(Is),heading5:de(Is),heading6:de(Is),contentSeparator:de(mr),list:de(mr),quote:de(mr),emphasis:de(mr),strong:de(mr),link:de(mr),monospace:de(mr),strikethrough:de(mr),inserted:de(),deleted:de(),changed:de(),invalid:de(),meta:Ef,documentMeta:de(Ef),annotation:de(Ef),processingInstruction:de(Ef),definition:br.defineModifier(),constant:br.defineModifier(),function:br.defineModifier(),standard:br.defineModifier(),local:br.defineModifier(),special:br.defineModifier()};DQ([{tag:S.link,class:"tok-link"},{tag:S.heading,class:"tok-heading"},{tag:S.emphasis,class:"tok-emphasis"},{tag:S.strong,class:"tok-strong"},{tag:S.keyword,class:"tok-keyword"},{tag:S.atom,class:"tok-atom"},{tag:S.bool,class:"tok-bool"},{tag:S.url,class:"tok-url"},{tag:S.labelName,class:"tok-labelName"},{tag:S.inserted,class:"tok-inserted"},{tag:S.deleted,class:"tok-deleted"},{tag:S.literal,class:"tok-literal"},{tag:S.string,class:"tok-string"},{tag:S.number,class:"tok-number"},{tag:[S.regexp,S.escape,S.special(S.string)],class:"tok-string2"},{tag:S.variableName,class:"tok-variableName"},{tag:S.local(S.variableName),class:"tok-variableName tok-local"},{tag:S.definition(S.variableName),class:"tok-variableName tok-definition"},{tag:S.special(S.variableName),class:"tok-variableName2"},{tag:S.definition(S.propertyName),class:"tok-propertyName tok-definition"},{tag:S.typeName,class:"tok-typeName"},{tag:S.namespace,class:"tok-namespace"},{tag:S.className,class:"tok-className"},{tag:S.macroName,class:"tok-macroName"},{tag:S.propertyName,class:"tok-propertyName"},{tag:S.operator,class:"tok-operator"},{tag:S.comment,class:"tok-comment"},{tag:S.meta,class:"tok-meta"},{tag:S.invalid,class:"tok-invalid"},{tag:S.punctuation,class:"tok-punctuation"}]);var jh;const vl=new et;function zQ(n){return ye.define({combine:n?e=>e.concat(n):void 0})}const Zd=new et;class or{constructor(e,t,i=[],r=""){this.data=e,this.name=r,ct.prototype.hasOwnProperty("tree")||Object.defineProperty(ct.prototype,"tree",{get(){return ti(this)}}),this.parser=t,this.extension=[xs.of(this),ct.languageData.of((s,l,o)=>{let f=K1(s,l,o),u=f.type.prop(vl);if(!u)return[];let h=s.facet(u),O=f.type.prop(Zd);if(O){let p=f.resolve(l-f.from,o);for(let g of O)if(g.test(p,s)){let b=s.facet(g.facet);return g.type=="replace"?b:b.concat(h)}}return h})].concat(i)}isActiveAt(e,t,i=-1){return K1(e,t,i).type.prop(vl)==this.data}findRegions(e){let t=e.facet(xs);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],r=(s,l)=>{if(s.prop(vl)==this.data){i.push({from:l,to:l+s.length});return}let o=s.prop(et.mounted);if(o){if(o.tree.prop(vl)==this.data){if(o.overlay)for(let f of o.overlay)i.push({from:f.from+l,to:f.to+l});else i.push({from:l,to:l+s.length});return}else if(o.overlay){let f=i.length;if(r(o.tree,o.overlay[0].from+l),i.length>f)return}}for(let f=0;fi.isTop?t:void 0)]}),e.name)}configure(e,t){return new Ws(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function ti(n){let e=n.field(or.state,!1);return e?e.tree:Gt.empty}class oX{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let yo=null;class yc{constructor(e,t,i=[],r,s,l,o,f){this.parser=e,this.state=t,this.fragments=i,this.tree=r,this.treeLen=s,this.viewport=l,this.skipped=o,this.scheduleOn=f,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new yc(e,t,[],Gt.empty,0,i,[],null)}startParse(){return this.parser.startParse(new oX(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Gt.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Ir.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=yo;yo=this;try{return e()}finally{yo=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=J1(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:r,treeLen:s,viewport:l,skipped:o}=this;if(this.takeTree(),!e.empty){let f=[];if(e.iterChangedRanges((u,h,O,p)=>f.push({fromA:u,toA:h,fromB:O,toB:p})),i=Ir.applyChanges(i,f),r=Gt.empty,s=0,l={from:e.mapPos(l.from,-1),to:e.mapPos(l.to,1)},this.skipped.length){o=[];for(let u of this.skipped){let h=e.mapPos(u.from,1),O=e.mapPos(u.to,-1);he.from&&(this.fragments=J1(this.fragments,r,s),this.skipped.splice(i--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends VQ{createParse(t,i,r){let s=r[0].from,l=r[r.length-1].to;return{parsedPos:s,advance(){let f=yo;if(f){for(let u of r)f.tempSkipped.push(u);e&&(f.scheduleOn=f.scheduleOn?Promise.all([f.scheduleOn,e]):e)}return this.parsedPos=l,new Gt(Ji.none,[],[],l-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return yo}}function J1(n,e,t){return Ir.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class El{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new El(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=yc.create(e.facet(xs).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new El(i)}}or.state=$i.define({create:El.init,update(n,e){for(let t of e.effects)if(t.is(or.setState))return t.value;return e.startState.facet(xs)!=e.state.facet(xs)?El.init(e.state):n.apply(e)}});let IQ=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(IQ=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const Fh=typeof navigator<"u"&&(!((jh=navigator.scheduling)===null||jh===void 0)&&jh.isInputPending)?()=>navigator.scheduling.isInputPending():null,aX=pi.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(or.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(or.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=IQ(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndr+1e3,f=s.context.work(()=>Fh&&Fh()||Date.now()>l,r+(o?0:1e5));this.chunkBudget-=Date.now()-t,(f||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:or.setState.of(new El(s.context))})),this.chunkBudget>0&&!(f&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Wn(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),xs=ye.define({combine(n){return n.length?n[0]:null},enables:n=>[or.state,aX,me.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class ca{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const fX=ye.define(),jc=ye.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function vc(n){let e=n.facet(jc);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function ta(n,e){let t="",i=n.tabSize,r=n.facet(jc)[0];if(r==" "){for(;e>=i;)t+=" ",e-=i;r=" "}for(let s=0;s=i.from&&r<=i.to?s&&r==e?{text:"",from:e}:(t<0?r-1&&(s+=l-this.countColumn(i,i.search(/\S|$/))),s}countColumn(e,t=e.length){return sa(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:r}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let l=s(r);if(l>-1)return l}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Bl=new et;function cX(n,e,t){return NQ(e.resolveInner(t).enterUnfinishedNodesBefore(t),t,n)}function uX(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function hX(n){let e=n.type.prop(Bl);if(e)return e;let t=n.firstChild,i;if(t&&(i=t.type.prop(et.closedBy))){let r=n.lastChild,s=r&&i.indexOf(r.name)>-1;return l=>LQ(l,!0,1,void 0,s&&!uX(l)?r.from:void 0)}return n.parent==null?OX:null}function NQ(n,e,t){for(;n;n=n.parent){let i=hX(n);if(i)return i(Ad.create(t,e,n))}return null}function OX(){return 0}class Ad extends Fc{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.node=i}static create(e,t,i){return new Ad(e,t,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(t.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(dX(i,e))break;t=this.state.doc.lineAt(i.from)}return this.lineIndent(t.from)}continue(){let e=this.node.parent;return e?NQ(e,this.pos,this.base):0}}function dX(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function pX(n){let e=n.node,t=e.childAfter(e.from),i=e.lastChild;if(!t)return null;let r=n.options.simulateBreak,s=n.state.doc.lineAt(t.from),l=r==null||r<=s.from?s.to:Math.min(s.to,r);for(let o=t.to;;){let f=e.childAfter(o);if(!f||f==i)return null;if(!f.type.isSkipped)return f.fromLQ(i,e,t,n)}function LQ(n,e,t,i,r){let s=n.textAfter,l=s.match(/^\s*/)[0].length,o=i&&s.slice(l,l+i.length)==i||r==n.pos+l,f=e?pX(n):null;return f?o?n.column(f.from):n.column(f.to):n.baseIndent+(o?0:n.unit*t)}const gX=n=>n.baseIndent;function Rl({except:n,units:e=1}={}){return t=>{let i=n&&n.test(t.textAfter);return t.baseIndent+(i?0:e*t.unit)}}const mX=200;function SX(){return ct.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:i}=n.newSelection.main,r=t.lineAt(i);if(i>r.from+mX)return n;let s=t.sliceString(r.from,i);if(!e.some(u=>u.test(s)))return n;let{state:l}=n,o=-1,f=[];for(let{head:u}of l.selection.ranges){let h=l.doc.lineAt(u);if(h.from==o)continue;o=h.from;let O=Rd(l,h.from);if(O==null)continue;let p=/^\s*/.exec(h.text)[0],g=ta(l,O);p!=g&&f.push({from:h.from,to:h.from+p.length,insert:g})}return f.length?[n,{changes:f,sequential:!0}]:n})}const bX=ye.define(),jl=new et;function Sr(n){let e=n.firstChild,t=n.lastChild;return e&&e.tot)continue;if(s&&l.from=e&&f.to>t&&(s=f)}}return s}function QX(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function Pc(n,e,t){for(let i of n.facet(bX)){let r=i(n,e,t);if(r)return r}return $X(n,e,t)}function BQ(n,e){let t=e.mapPos(n.from,1),i=e.mapPos(n.to,-1);return t>=i?void 0:{from:t,to:i}}const Gc=Ie.define({map:BQ}),ua=Ie.define({map:BQ});function jQ(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(i=>i.from<=t&&i.to>=t)||e.push(n.lineBlockAt(t));return e}const Js=$i.define({create(){return Re.none},update(n,e){n=n.map(e.changes);for(let t of e.effects)t.is(Gc)&&!wX(n,t.value.from,t.value.to)?n=n.update({add:[e0.range(t.value.from,t.value.to)]}):t.is(ua)&&(n=n.update({filter:(i,r)=>t.value.from!=i||t.value.to!=r,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:i}=e.selection.main;n.between(i,i,(r,s)=>{ri&&(t=!0)}),t&&(n=n.update({filterFrom:i,filterTo:i,filter:(r,s)=>s<=i||r>=i}))}return n},provide:n=>me.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(i,r)=>{t.push(i,r)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t{(!r||r.from>s)&&(r={from:s,to:l})}),r}function wX(n,e,t){let i=!1;return n.between(e,e,(r,s)=>{r==e&&s==t&&(i=!0)}),i}function FQ(n,e){return n.field(Js,!1)?e:e.concat(Ie.appendConfig.of(KQ()))}const yX=n=>{for(let e of jQ(n)){let t=Pc(n.state,e.from,e.to);if(t)return n.dispatch({effects:FQ(n.state,[Gc.of(t),GQ(n,t)])}),!0}return!1},vX=n=>{if(!n.state.field(Js,!1))return!1;let e=[];for(let t of jQ(n)){let i=kc(n.state,t.from,t.to);i&&e.push(ua.of(i),GQ(n,i,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function GQ(n,e,t=!0){let i=n.state.doc.lineAt(e.from).number,r=n.state.doc.lineAt(e.to).number;return me.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${i} ${n.state.phrase("to")} ${r}.`)}const PX=n=>{let{state:e}=n,t=[];for(let i=0;i{let e=n.state.field(Js,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(i,r)=>{t.push(ua.of({from:i,to:r}))}),n.dispatch({effects:t}),!0},_X=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:yX},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:vX},{key:"Ctrl-Alt-[",run:PX},{key:"Ctrl-Alt-]",run:kX}],WX={placeholderDOM:null,placeholderText:"…"},HQ=ye.define({combine(n){return _r(n,WX)}});function KQ(n){let e=[Js,XX];return n&&e.push(HQ.of(n)),e}const e0=Re.replace({widget:new class extends Cs{toDOM(n){let{state:e}=n,t=e.facet(HQ),i=s=>{let l=n.lineBlockAt(n.posAtDOM(s.target)),o=kc(n.state,l.from,l.to);o&&n.dispatch({effects:ua.of(o)}),s.preventDefault()};if(t.placeholderDOM)return t.placeholderDOM(n,i);let r=document.createElement("span");return r.textContent=t.placeholderText,r.setAttribute("aria-label",e.phrase("folded code")),r.title=e.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=i,r}}}),xX={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Gh extends Br{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function CX(n={}){let e=Object.assign(Object.assign({},xX),n),t=new Gh(e,!0),i=new Gh(e,!1),r=pi.fromClass(class{constructor(l){this.from=l.viewport.from,this.markers=this.buildMarkers(l)}update(l){(l.docChanged||l.viewportChanged||l.startState.facet(xs)!=l.state.facet(xs)||l.startState.field(Js,!1)!=l.state.field(Js,!1)||ti(l.startState)!=ti(l.state)||e.foldingChanged(l))&&(this.markers=this.buildMarkers(l.view))}buildMarkers(l){let o=new ws;for(let f of l.viewportLineBlocks){let u=kc(l.state,f.from,f.to)?i:Pc(l.state,f.from,f.to)?t:null;u&&o.add(f.from,f.from,u)}return o.finish()}}),{domEventHandlers:s}=e;return[r,C4({class:"cm-foldGutter",markers(l){var o;return((o=l.plugin(r))===null||o===void 0?void 0:o.markers)||Qt.empty},initialSpacer(){return new Gh(e,!1)},domEventHandlers:Object.assign(Object.assign({},s),{click:(l,o,f)=>{if(s.click&&s.click(l,o,f))return!0;let u=kc(l.state,o.from,o.to);if(u)return l.dispatch({effects:ua.of(u)}),!0;let h=Pc(l.state,o.from,o.to);return h?(l.dispatch({effects:Gc.of(h)}),!0):!1}})}),KQ()]}const XX=me.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class ha{constructor(e,t){this.specs=e;let i;function r(o){let f=ys.newName();return(i||(i=Object.create(null)))["."+f]=o,f}const s=typeof t.all=="string"?t.all:t.all?r(t.all):void 0,l=t.scope;this.scope=l instanceof or?o=>o.prop(vl)==l.data:l?o=>o==l:void 0,this.style=DQ(e.map(o=>({tag:o.tag,class:o.class||r(Object.assign({},o,{tag:null}))})),{all:s}).style,this.module=i?new ys(i):null,this.themeType=t.themeType}static define(e,t){return new ha(e,t||{})}}const td=ye.define(),JQ=ye.define({combine(n){return n.length?[n[0]]:null}});function Hh(n){let e=n.facet(td);return e.length?e:n.facet(JQ)}function ew(n,e){let t=[ZX],i;return n instanceof ha&&(n.module&&t.push(me.styleModule.of(n.module)),i=n.themeType),e!=null&&e.fallback?t.push(JQ.of(n)):i?t.push(td.computeN([me.darkTheme],r=>r.facet(me.darkTheme)==(i=="dark")?[n]:[])):t.push(td.of(n)),t}class TX{constructor(e){this.markCache=Object.create(null),this.tree=ti(e.state),this.decorations=this.buildDeco(e,Hh(e.state))}update(e){let t=ti(e.state),i=Hh(e.state),r=i!=Hh(e.startState);t.length{i.add(l,o,this.markCache[f]||(this.markCache[f]=Re.mark({class:f})))},r,s);return i.finish()}}const ZX=el.high(pi.fromClass(TX,{decorations:n=>n.decorations})),RX=ha.define([{tag:S.meta,color:"#404740"},{tag:S.link,textDecoration:"underline"},{tag:S.heading,textDecoration:"underline",fontWeight:"bold"},{tag:S.emphasis,fontStyle:"italic"},{tag:S.strong,fontWeight:"bold"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.keyword,color:"#708"},{tag:[S.atom,S.bool,S.url,S.contentSeparator,S.labelName],color:"#219"},{tag:[S.literal,S.inserted],color:"#164"},{tag:[S.string,S.deleted],color:"#a11"},{tag:[S.regexp,S.escape,S.special(S.string)],color:"#e40"},{tag:S.definition(S.variableName),color:"#00f"},{tag:S.local(S.variableName),color:"#30a"},{tag:[S.typeName,S.namespace],color:"#085"},{tag:S.className,color:"#167"},{tag:[S.special(S.variableName),S.macroName],color:"#256"},{tag:S.definition(S.propertyName),color:"#00c"},{tag:S.comment,color:"#940"},{tag:S.invalid,color:"#f00"}]),AX=me.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),tw=1e4,iw="()[]{}",nw=ye.define({combine(n){return _r(n,{afterCursor:!0,brackets:iw,maxScanDistance:tw,renderMatch:VX})}}),UX=Re.mark({class:"cm-matchingBracket"}),YX=Re.mark({class:"cm-nonmatchingBracket"});function VX(n){let e=[],t=n.matched?UX:YX;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const qX=$i.define({create(){return Re.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],i=e.state.facet(nw);for(let r of e.state.selection.ranges){if(!r.empty)continue;let s=yr(e.state,r.head,-1,i)||r.head>0&&yr(e.state,r.head-1,1,i)||i.afterCursor&&(yr(e.state,r.head,1,i)||r.headme.decorations.from(n)}),EX=[qX,AX];function MX(n={}){return[nw.of(n),EX]}const rw=new et;function id(n,e,t){let i=n.prop(e<0?et.openedBy:et.closedBy);if(i)return i;if(n.name.length==1){let r=t.indexOf(n.name);if(r>-1&&r%2==(e<0?1:0))return[t[r+e]]}return null}function nd(n){let e=n.type.prop(rw);return e?e(n.node):n}function yr(n,e,t,i={}){let r=i.maxScanDistance||tw,s=i.brackets||iw,l=ti(n),o=l.resolveInner(e,t);for(let f=o;f;f=f.parent){let u=id(f.type,t,s);if(u&&f.from0?e>=h.from&&eh.from&&e<=h.to))return DX(n,e,t,f,h,u,s)}}return zX(n,e,t,l,o.type,r,s)}function DX(n,e,t,i,r,s,l){let o=i.parent,f={from:r.from,to:r.to},u=0,h=o==null?void 0:o.cursor();if(h&&(t<0?h.childBefore(i.from):h.childAfter(i.to)))do if(t<0?h.to<=i.from:h.from>=i.to){if(u==0&&s.indexOf(h.type.name)>-1&&h.from0)return null;let u={from:t<0?e-1:e,to:t>0?e+1:e},h=n.doc.iterRange(e,t>0?n.doc.length:0),O=0;for(let p=0;!h.next().done&&p<=s;){let g=h.value;t<0&&(p+=g.length);let b=e+p*t;for(let Q=t>0?0:g.length-1,$=t>0?g.length:-1;Q!=$;Q+=t){let P=l.indexOf(g[Q]);if(!(P<0||i.resolveInner(b+Q,1).type!=r))if(P%2==0==t>0)O++;else{if(O==1)return{start:u,end:{from:b+Q,to:b+Q+1},matched:P>>1==f>>1};O--}}t>0&&(p+=g.length)}return h.done?{start:u,matched:!1}:null}const IX=Object.create(null),t0=[Ji.none],i0=[],NX=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])NX[n]=LX(IX,e);function Kh(n,e){i0.indexOf(n)>-1||(i0.push(n),console.warn(e))}function LX(n,e){let t=null;for(let s of e.split(".")){let l=n[s]||S[s];l?typeof l=="function"?t?t=l(t):Kh(s,`Modifier ${s} used at start of tag`):t?Kh(s,`Tag ${s} used as modifier`):t=l:Kh(s,`Unknown highlighting tag ${s}`)}if(!t)return 0;let i=e.replace(/ /g,"_"),r=Ji.define({id:t0.length,name:i,props:[Ll({[i]:t})]});return t0.push(r),r.id}const BX=n=>{let e=Yd(n.state);return e.line?jX(n):e.block?GX(n):!1};function Ud(n,e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let r=n(e,t);return r?(i(t.update(r)),!0):!1}}const jX=Ud(JX,0),FX=Ud(sw,0),GX=Ud((n,e)=>sw(n,e,KX(e)),0);function Yd(n,e=n.selection.main.head){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const vo=50;function HX(n,{open:e,close:t},i,r){let s=n.sliceDoc(i-vo,i),l=n.sliceDoc(r,r+vo),o=/\s*$/.exec(s)[0].length,f=/^\s*/.exec(l)[0].length,u=s.length-o;if(s.slice(u-e.length,u)==e&&l.slice(f,f+t.length)==t)return{open:{pos:i-o,margin:o&&1},close:{pos:r+f,margin:f&&1}};let h,O;r-i<=2*vo?h=O=n.sliceDoc(i,r):(h=n.sliceDoc(i,i+vo),O=n.sliceDoc(r-vo,r));let p=/^\s*/.exec(h)[0].length,g=/\s*$/.exec(O)[0].length,b=O.length-g-t.length;return h.slice(p,p+e.length)==e&&O.slice(b,b+t.length)==t?{open:{pos:i+p+e.length,margin:/\s/.test(h.charAt(p+e.length))?1:0},close:{pos:r-g-t.length,margin:/\s/.test(O.charAt(b-1))?1:0}}:null}function KX(n){let e=[];for(let t of n.selection.ranges){let i=n.doc.lineAt(t.from),r=t.to<=i.to?i:n.doc.lineAt(t.to),s=e.length-1;s>=0&&e[s].to>i.from?e[s].to=r.to:e.push({from:i.from,to:r.to})}return e}function sw(n,e,t=e.selection.ranges){let i=t.map(s=>Yd(e,s.from).block);if(!i.every(s=>s))return null;let r=t.map((s,l)=>HX(e,i[l],s.from,s.to));if(n!=2&&!r.every(s=>s))return{changes:e.changes(t.map((s,l)=>r[l]?[]:[{from:s.from,insert:i[l].open+" "},{from:s.to,insert:" "+i[l].close}]))};if(n!=1&&r.some(s=>s)){let s=[];for(let l=0,o;lr&&(s==l||l>h.from)){r=h.from;let O=Yd(e,u).line;if(!O)continue;let p=/^\s*/.exec(h.text)[0].length,g=p==h.length,b=h.text.slice(p,p+O.length)==O?p:-1;ps.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:o,token:f,indent:u,empty:h,single:O}of i)(O||!h)&&s.push({from:o.from+u,insert:f+" "});let l=e.changes(s);return{changes:l,selection:e.selection.map(l,1)}}else if(n!=1&&i.some(s=>s.comment>=0)){let s=[];for(let{line:l,comment:o,token:f}of i)if(o>=0){let u=l.from+o,h=u+f.length;l.text[h-l.from]==" "&&h++,s.push({from:u,to:h})}return{changes:s}}return null}const rd=jr.define(),eT=jr.define(),tT=ye.define(),lw=ye.define({combine(n){return _r(n,{minDepth:100,newGroupDelay:500},{minDepth:Math.max,newGroupDelay:Math.min})}});function iT(n){let e=0;return n.iterChangedRanges((t,i)=>e=i),e}const ow=$i.define({create(){return vr.empty},update(n,e){let t=e.state.facet(lw),i=e.annotation(rd);if(i){let f=e.docChanged?J.single(iT(e.changes)):void 0,u=On.fromTransaction(e,f),h=i.side,O=h==0?n.undone:n.done;return u?O=_c(O,O.length,t.minDepth,u):O=cw(O,e.startState.selection),new vr(h==0?i.rest:O,h==0?O:i.rest)}let r=e.annotation(eT);if((r=="full"||r=="before")&&(n=n.isolate()),e.annotation(bi.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let s=On.fromTransaction(e),l=e.annotation(bi.time),o=e.annotation(bi.userEvent);return s?n=n.addChanges(s,l,o,t.newGroupDelay,t.minDepth):e.selection&&(n=n.addSelection(e.startState.selection,l,o,t.newGroupDelay)),(r=="full"||r=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new vr(n.done.map(On.fromJSON),n.undone.map(On.fromJSON))}});function nT(n={}){return[ow,lw.of(n),me.domEventHandlers({beforeinput(e,t){let i=e.inputType=="historyUndo"?aw:e.inputType=="historyRedo"?sd:null;return i?(e.preventDefault(),i(t)):!1}})]}function Hc(n,e){return function({state:t,dispatch:i}){if(!e&&t.readOnly)return!1;let r=t.field(ow,!1);if(!r)return!1;let s=r.pop(n,t,e);return s?(i(s),!0):!1}}const aw=Hc(0,!1),sd=Hc(1,!1),rT=Hc(0,!0),sT=Hc(1,!0);class On{constructor(e,t,i,r,s){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=r,this.selectionsAfter=s}setSelAfter(e){return new On(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new On(e.changes&&Si.fromJSON(e.changes),[],e.mapped&&Pr.fromJSON(e.mapped),e.startSelection&&J.fromJSON(e.startSelection),e.selectionsAfter.map(J.fromJSON))}static fromTransaction(e,t){let i=zn;for(let r of e.startState.facet(tT)){let s=r(e);s.length&&(i=i.concat(s))}return!i.length&&e.changes.empty?null:new On(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,zn)}static selection(e){return new On(void 0,zn,void 0,void 0,e)}}function _c(n,e,t,i){let r=e+1>t+20?e-t-1:0,s=n.slice(r,e);return s.push(i),s}function lT(n,e){let t=[],i=!1;return n.iterChangedRanges((r,s)=>t.push(r,s)),e.iterChangedRanges((r,s,l,o)=>{for(let f=0;f=u&&l<=h&&(i=!0)}}),i}function oT(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,i)=>t.empty!=e.ranges[i].empty).length===0}function fw(n,e){return n.length?e.length?n.concat(e):n:e}const zn=[],aT=200;function cw(n,e){if(n.length){let t=n[n.length-1],i=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-aT));return i.length&&i[i.length-1].eq(e)?n:(i.push(e),_c(n,n.length-1,1e9,t.setSelAfter(i)))}else return[On.selection([e])]}function fT(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function Jh(n,e){if(!n.length)return n;let t=n.length,i=zn;for(;t;){let r=cT(n[t-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let s=n.slice(0,t);return s[t-1]=r,s}else e=r.mapped,t--,i=r.selectionsAfter}return i.length?[On.selection(i)]:zn}function cT(n,e,t){let i=fw(n.selectionsAfter.length?n.selectionsAfter.map(o=>o.map(e)):zn,t);if(!n.changes)return On.selection(i);let r=n.changes.map(e),s=e.mapDesc(n.changes,!0),l=n.mapped?n.mapped.composeDesc(s):s;return new On(r,Ie.mapEffects(n.effects,e),l,n.startSelection.map(s),i)}const uT=/^(input\.type|delete)($|\.)/;class vr{constructor(e,t,i=0,r=void 0){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new vr(this.done,this.undone):this}addChanges(e,t,i,r,s){let l=this.done,o=l[l.length-1];return o&&o.changes&&!o.changes.empty&&e.changes&&(!i||uT.test(i))&&(!o.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):Kc(t,e))}function ji(n){return n.textDirectionAt(n.state.selection.main.head)==Ft.LTR}const hw=n=>uw(n,!ji(n)),Ow=n=>uw(n,ji(n));function dw(n,e){return fr(n,t=>t.empty?n.moveByGroup(t,e):Kc(t,e))}const OT=n=>dw(n,!ji(n)),dT=n=>dw(n,ji(n));function pT(n,e,t){if(e.type.prop(t))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Jc(n,e,t){let i=ti(n).resolveInner(e.head),r=t?et.closedBy:et.openedBy;for(let f=e.head;;){let u=t?i.childAfter(f):i.childBefore(f);if(!u)break;pT(n,u,r)?i=u:f=t?u.to:u.from}let s=i.type.prop(r),l,o;return s&&(l=t?yr(n,i.from,1):yr(n,i.to,-1))&&l.matched?o=t?l.end.to:l.end.from:o=t?i.to:i.from,J.cursor(o,t?-1:1)}const gT=n=>fr(n,e=>Jc(n.state,e,!ji(n))),mT=n=>fr(n,e=>Jc(n.state,e,ji(n)));function pw(n,e){return fr(n,t=>{if(!t.empty)return Kc(t,e);let i=n.moveVertically(t,e);return i.head!=t.head?i:n.moveToLineBoundary(t,e)})}const gw=n=>pw(n,!1),mw=n=>pw(n,!0);function Sw(n){return Math.max(n.defaultLineHeight,Math.min(n.dom.clientHeight,innerHeight)-5)}function bw(n,e){let{state:t}=n,i=Fl(t.selection,o=>o.empty?n.moveVertically(o,e,Sw(n)):Kc(o,e));if(i.eq(t.selection))return!1;let r=n.coordsAtPos(t.selection.main.head),s=n.scrollDOM.getBoundingClientRect(),l;return r&&r.top>s.top&&r.bottombw(n,!1),ld=n=>bw(n,!0);function Xs(n,e,t){let i=n.lineBlockAt(e.head),r=n.moveToLineBoundary(e,t);if(r.head==e.head&&r.head!=(t?i.to:i.from)&&(r=n.moveToLineBoundary(e,t,!1)),!t&&r.head==i.from&&i.length){let s=/^\s*/.exec(n.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;s&&e.head!=i.from+s&&(r=J.cursor(i.from+s))}return r}const ST=n=>fr(n,e=>Xs(n,e,!0)),bT=n=>fr(n,e=>Xs(n,e,!1)),$T=n=>fr(n,e=>Xs(n,e,!ji(n))),QT=n=>fr(n,e=>Xs(n,e,ji(n))),wT=n=>fr(n,e=>J.cursor(n.lineBlockAt(e.head).from,1)),yT=n=>fr(n,e=>J.cursor(n.lineBlockAt(e.head).to,-1));function vT(n,e,t){let i=!1,r=Fl(n.selection,s=>{let l=yr(n,s.head,-1)||yr(n,s.head,1)||s.head>0&&yr(n,s.head-1,1)||s.headvT(n,e,!1);function jn(n,e){let t=Fl(n.state.selection,i=>{let r=e(i);return J.range(i.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(xr(n.state,t)),!0)}function $w(n,e){return jn(n,t=>n.moveByChar(t,e))}const Qw=n=>$w(n,!ji(n)),ww=n=>$w(n,ji(n));function yw(n,e){return jn(n,t=>n.moveByGroup(t,e))}const kT=n=>yw(n,!ji(n)),_T=n=>yw(n,ji(n)),WT=n=>jn(n,e=>Jc(n.state,e,!ji(n))),xT=n=>jn(n,e=>Jc(n.state,e,ji(n)));function vw(n,e){return jn(n,t=>n.moveVertically(t,e))}const Pw=n=>vw(n,!1),kw=n=>vw(n,!0);function _w(n,e){return jn(n,t=>n.moveVertically(t,e,Sw(n)))}const r0=n=>_w(n,!1),s0=n=>_w(n,!0),CT=n=>jn(n,e=>Xs(n,e,!0)),XT=n=>jn(n,e=>Xs(n,e,!1)),TT=n=>jn(n,e=>Xs(n,e,!ji(n))),ZT=n=>jn(n,e=>Xs(n,e,ji(n))),RT=n=>jn(n,e=>J.cursor(n.lineBlockAt(e.head).from)),AT=n=>jn(n,e=>J.cursor(n.lineBlockAt(e.head).to)),l0=({state:n,dispatch:e})=>(e(xr(n,{anchor:0})),!0),o0=({state:n,dispatch:e})=>(e(xr(n,{anchor:n.doc.length})),!0),a0=({state:n,dispatch:e})=>(e(xr(n,{anchor:n.selection.main.anchor,head:0})),!0),f0=({state:n,dispatch:e})=>(e(xr(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),UT=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),YT=({state:n,dispatch:e})=>{let t=tu(n).map(({from:i,to:r})=>J.range(i,Math.min(r+1,n.doc.length)));return e(n.update({selection:J.create(t),userEvent:"select"})),!0},VT=({state:n,dispatch:e})=>{let t=Fl(n.selection,i=>{var r;let s=ti(n).resolveInner(i.head,1);for(;!(s.from=i.to||s.to>i.to&&s.from<=i.from||!(!((r=s.parent)===null||r===void 0)&&r.parent));)s=s.parent;return J.range(s.to,s.from)});return e(xr(n,t)),!0},qT=({state:n,dispatch:e})=>{let t=n.selection,i=null;return t.ranges.length>1?i=J.create([t.main]):t.main.empty||(i=J.create([J.cursor(t.main.head)])),i?(e(xr(n,i)),!0):!1};function eu(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:i}=n,r=i.changeByRange(s=>{let{from:l,to:o}=s;if(l==o){let f=e(l);fl&&(t="delete.forward",f=Mf(n,f,!0)),l=Math.min(l,f),o=Math.max(o,f)}else l=Mf(n,l,!1),o=Mf(n,o,!0);return l==o?{range:s}:{changes:{from:l,to:o},range:J.cursor(l)}});return r.changes.empty?!1:(n.dispatch(i.update(r,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?me.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function Mf(n,e,t){if(n instanceof me)for(let i of n.state.facet(me.atomicRanges).map(r=>r(n)))i.between(e,e,(r,s)=>{re&&(e=t?s:r)});return e}const Ww=(n,e)=>eu(n,t=>{let{state:i}=n,r=i.doc.lineAt(t),s,l;if(!e&&t>r.from&&tWw(n,!1),xw=n=>Ww(n,!0),Cw=(n,e)=>eu(n,t=>{let i=t,{state:r}=n,s=r.doc.lineAt(i),l=r.charCategorizer(i);for(let o=null;;){if(i==(e?s.to:s.from)){i==t&&s.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let f=Bi(s.text,i-s.from,e)+s.from,u=s.text.slice(Math.min(i,f)-s.from,Math.max(i,f)-s.from),h=l(u);if(o!=null&&h!=o)break;(u!=" "||i!=t)&&(o=h),i=f}return i}),Xw=n=>Cw(n,!1),ET=n=>Cw(n,!0),Tw=n=>eu(n,e=>{let t=n.lineBlockAt(e).to;return eeu(n,e=>{let t=n.lineBlockAt(e).from;return e>t?t:Math.max(0,e-1)}),DT=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:mt.of(["",""])},range:J.cursor(i.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},zT=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>{if(!i.empty||i.from==0||i.from==n.doc.length)return{range:i};let r=i.from,s=n.doc.lineAt(r),l=r==s.from?r-1:Bi(s.text,r-s.from,!1)+s.from,o=r==s.to?r+1:Bi(s.text,r-s.from,!0)+s.from;return{changes:{from:l,to:o,insert:n.doc.slice(r,o).append(n.doc.slice(l,r))},range:J.cursor(o)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function tu(n){let e=[],t=-1;for(let i of n.selection.ranges){let r=n.doc.lineAt(i.from),s=n.doc.lineAt(i.to);if(!i.empty&&i.to==s.from&&(s=n.doc.lineAt(i.to-1)),t>=r.number){let l=e[e.length-1];l.to=s.to,l.ranges.push(i)}else e.push({from:r.from,to:s.to,ranges:[i]});t=s.number+1}return e}function Zw(n,e,t){if(n.readOnly)return!1;let i=[],r=[];for(let s of tu(n)){if(t?s.to==n.doc.length:s.from==0)continue;let l=n.doc.lineAt(t?s.to+1:s.from-1),o=l.length+1;if(t){i.push({from:s.to,to:l.to},{from:s.from,insert:l.text+n.lineBreak});for(let f of s.ranges)r.push(J.range(Math.min(n.doc.length,f.anchor+o),Math.min(n.doc.length,f.head+o)))}else{i.push({from:l.from,to:s.from},{from:s.to,insert:n.lineBreak+l.text});for(let f of s.ranges)r.push(J.range(f.anchor-o,f.head-o))}}return i.length?(e(n.update({changes:i,scrollIntoView:!0,selection:J.create(r,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const IT=({state:n,dispatch:e})=>Zw(n,e,!1),NT=({state:n,dispatch:e})=>Zw(n,e,!0);function Rw(n,e,t){if(n.readOnly)return!1;let i=[];for(let r of tu(n))t?i.push({from:r.from,insert:n.doc.slice(r.from,r.to)+n.lineBreak}):i.push({from:r.to,insert:n.lineBreak+n.doc.slice(r.from,r.to)});return e(n.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const LT=({state:n,dispatch:e})=>Rw(n,e,!1),BT=({state:n,dispatch:e})=>Rw(n,e,!0),jT=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(tu(e).map(({from:r,to:s})=>(r>0?r--:sn.moveVertically(r,!0)).map(t);return n.dispatch({changes:t,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function FT(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=ti(n).resolveInner(e),i=t.childBefore(e),r=t.childAfter(e),s;return i&&r&&i.to<=e&&r.from>=e&&(s=i.type.prop(et.closedBy))&&s.indexOf(r.name)>-1&&n.doc.lineAt(i.to).from==n.doc.lineAt(r.from).from?{from:i.to,to:r.from}:null}const GT=Aw(!1),HT=Aw(!0);function Aw(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:s,to:l}=r,o=e.doc.lineAt(s),f=!n&&s==l&&FT(e,s);n&&(s=l=(l<=o.to?o:e.doc.lineAt(l)).to);let u=new Fc(e,{simulateBreak:s,simulateDoubleBreak:!!f}),h=Rd(u,s);for(h==null&&(h=/^\s*/.exec(e.doc.lineAt(s).text)[0].length);lo.from&&s{let r=[];for(let l=i.from;l<=i.to;){let o=n.doc.lineAt(l);o.number>t&&(i.empty||i.to>o.from)&&(e(o,r,i),t=o.number),l=o.to+1}let s=n.changes(r);return{changes:r,range:J.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}})}const KT=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),i=new Fc(n,{overrideIndentation:s=>{let l=t[s];return l??-1}}),r=Vd(n,(s,l,o)=>{let f=Rd(i,s.from);if(f==null)return;/\S/.test(s.text)||(f=0);let u=/^\s*/.exec(s.text)[0],h=ta(n,f);(u!=h||o.fromn.readOnly?!1:(e(n.update(Vd(n,(t,i)=>{i.push({from:t.from,insert:n.facet(jc)})}),{userEvent:"input.indent"})),!0),Yw=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(Vd(n,(t,i)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let s=sa(r,n.tabSize),l=0,o=ta(n,Math.max(0,s-vc(n)));for(;l({mac:n.key,run:n.run,shift:n.shift}))),tZ=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:gT,shift:WT},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:mT,shift:xT},{key:"Alt-ArrowUp",run:IT},{key:"Shift-Alt-ArrowUp",run:LT},{key:"Alt-ArrowDown",run:NT},{key:"Shift-Alt-ArrowDown",run:BT},{key:"Escape",run:qT},{key:"Mod-Enter",run:HT},{key:"Alt-l",mac:"Ctrl-l",run:YT},{key:"Mod-i",run:VT,preventDefault:!0},{key:"Mod-[",run:Yw},{key:"Mod-]",run:Uw},{key:"Mod-Alt-\\",run:KT},{key:"Shift-Mod-k",run:jT},{key:"Shift-Mod-\\",run:PT},{key:"Mod-/",run:BX},{key:"Alt-A",run:FX}].concat(eZ),iZ={key:"Tab",run:Uw,shift:Yw};function Wt(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var r=t[i];typeof r=="string"?n.setAttribute(i,r):r!=null&&(n[i]=r)}e++}for(;en.normalize("NFKD"):n=>n;class Ml{constructor(e,t,i=0,r=e.length,s,l){this.test=l,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=s?o=>s(c0(o)):c0,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Zi(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=gd(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=Pn(e);let r=this.normalize(t);for(let s=0,l=i;;s++){let o=r.charCodeAt(s),f=this.match(o,l);if(f)return this.value=f,this;if(s==r.length-1)break;l==i&&sthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let i=this.curLineStart+t.index,r=i+t[0].length;if(this.matchPos=Wc(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,t)))return this.value={from:i,to:r,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||r.to<=t){let o=new Al(t,e.sliceString(t,i));return eO.set(e,o),o}if(r.from==t&&r.to==i)return r;let{text:s,from:l}=r;return l>t&&(s=e.sliceString(t,l)+s,l=t),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let i=this.flat.from+t.index,r=i+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,t)))return this.value={from:i,to:r,match:t},this.matchPos=Wc(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Al.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(Ew.prototype[Symbol.iterator]=Mw.prototype[Symbol.iterator]=function(){return this});function nZ(n){try{return new RegExp(n,qd),!0}catch{return!1}}function Wc(n,e){if(e>=n.length)return e;let t=n.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function ad(n){let e=Wt("input",{class:"cm-textfield",name:"line"}),t=Wt("form",{class:"cm-gotoLine",onkeydown:r=>{r.keyCode==27?(r.preventDefault(),n.dispatch({effects:xc.of(!1)}),n.focus()):r.keyCode==13&&(r.preventDefault(),i())},onsubmit:r=>{r.preventDefault(),i()}},Wt("label",n.state.phrase("Go to line"),": ",e)," ",Wt("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function i(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!r)return;let{state:s}=n,l=s.doc.lineAt(s.selection.main.head),[,o,f,u,h]=r,O=u?+u.slice(1):0,p=f?+f:l.number;if(f&&h){let b=p/100;o&&(b=b*(o=="-"?-1:1)+l.number/s.doc.lines),p=Math.round(s.doc.lines*b)}else f&&o&&(p=p*(o=="-"?-1:1)+l.number);let g=s.doc.line(Math.max(1,Math.min(s.doc.lines,p)));n.dispatch({effects:xc.of(!1),selection:J.cursor(g.from+Math.max(0,Math.min(O,g.length))),scrollIntoView:!0}),n.focus()}return{dom:t}}const xc=Ie.define(),u0=$i.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(xc)&&(n=t.value);return n},provide:n=>Ko.from(n,e=>e?ad:null)}),rZ=n=>{let e=Ho(n,ad);if(!e){let t=[xc.of(!0)];n.state.field(u0,!1)==null&&t.push(Ie.appendConfig.of([u0,sZ])),n.dispatch({effects:t}),e=Ho(n,ad)}return e&&e.dom.querySelector("input").focus(),!0},sZ=me.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),lZ={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Dw=ye.define({combine(n){return _r(n,lZ,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function oZ(n){let e=[hZ,uZ];return n&&e.push(Dw.of(n)),e}const aZ=Re.mark({class:"cm-selectionMatch"}),fZ=Re.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function h0(n,e,t,i){return(t==0||n(e.sliceDoc(t-1,t))!=zt.Word)&&(i==e.doc.length||n(e.sliceDoc(i,i+1))!=zt.Word)}function cZ(n,e,t,i){return n(e.sliceDoc(t,t+1))==zt.Word&&n(e.sliceDoc(i-1,i))==zt.Word}const uZ=pi.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(Dw),{state:t}=n,i=t.selection;if(i.ranges.length>1)return Re.none;let r=i.main,s,l=null;if(r.empty){if(!e.highlightWordAroundCursor)return Re.none;let f=t.wordAt(r.head);if(!f)return Re.none;l=t.charCategorizer(r.head),s=t.sliceDoc(f.from,f.to)}else{let f=r.to-r.from;if(f200)return Re.none;if(e.wholeWords){if(s=t.sliceDoc(r.from,r.to),l=t.charCategorizer(r.head),!(h0(l,t,r.from,r.to)&&cZ(l,t,r.from,r.to)))return Re.none}else if(s=t.sliceDoc(r.from,r.to).trim(),!s)return Re.none}let o=[];for(let f of n.visibleRanges){let u=new Ml(t.doc,s,f.from,f.to);for(;!u.next().done;){let{from:h,to:O}=u.value;if((!l||h0(l,t,h,O))&&(r.empty&&h<=r.from&&O>=r.to?o.push(fZ.range(h,O)):(h>=r.to||O<=r.from)&&o.push(aZ.range(h,O)),o.length>e.maxMatches))return Re.none}}return Re.set(o)}},{decorations:n=>n.decorations}),hZ=me.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),OZ=({state:n,dispatch:e})=>{let{selection:t}=n,i=J.create(t.ranges.map(r=>n.wordAt(r.head)||J.cursor(r.head)),t.mainIndex);return i.eq(t)?!1:(e(n.update({selection:i})),!0)};function dZ(n,e){let{main:t,ranges:i}=n.selection,r=n.wordAt(t.head),s=r&&r.from==t.from&&r.to==t.to;for(let l=!1,o=new Ml(n.doc,e,i[i.length-1].to);;)if(o.next(),o.done){if(l)return null;o=new Ml(n.doc,e,0,Math.max(0,i[i.length-1].from-1)),l=!0}else{if(l&&i.some(f=>f.from==o.value.from))continue;if(s){let f=n.wordAt(o.value.from);if(!f||f.from!=o.value.from||f.to!=o.value.to)continue}return o.value}}const pZ=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(s=>s.from===s.to))return OZ({state:n,dispatch:e});let i=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(s=>n.sliceDoc(s.from,s.to)!=i))return!1;let r=dZ(n,i);return r?(e(n.update({selection:n.selection.addRange(J.range(r.from,r.to),!1),effects:me.scrollIntoView(r.to)})),!0):!1},Ed=ye.define({combine(n){return _r(n,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:e=>new _Z(e)})}});class zw{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||nZ(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,i)=>i=="n"?` -`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new bZ(this):new mZ(this)}getCursor(e,t=0,i){let r=e.doc?e:ct.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?Ql(this,r,t,i):$l(this,r,t,i)}}class Iw{constructor(e){this.spec=e}}function $l(n,e,t,i){return new Ml(e.doc,n.unquoted,t,i,n.caseSensitive?void 0:r=>r.toLowerCase(),n.wholeWord?gZ(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function gZ(n,e){return(t,i,r,s)=>((s>t||s+r.length=t)return null;r.push(i.value)}return r}highlight(e,t,i,r){let s=$l(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}function Ql(n,e,t,i){return new Ew(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?SZ(e.charCategorizer(e.selection.main.head)):void 0},t,i)}function Cc(n,e){return n.slice(Bi(n,e,!1),e)}function Xc(n,e){return n.slice(e,Bi(n,e))}function SZ(n){return(e,t,i)=>!i[0].length||(n(Cc(i.input,i.index))!=zt.Word||n(Xc(i.input,i.index))!=zt.Word)&&(n(Xc(i.input,i.index+i[0].length))!=zt.Word||n(Cc(i.input,i.index+i[0].length))!=zt.Word)}class bZ extends Iw{nextMatch(e,t,i){let r=Ql(this.spec,e,i,e.doc.length).next();return r.done&&(r=Ql(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,i){for(let r=1;;r++){let s=Math.max(t,i-r*1e4),l=Ql(this.spec,e,s,i),o=null;for(;!l.next().done;)o=l.value;if(o&&(s==t||o.from>s+10))return o;if(s==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(t,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=t)return null;r.push(i.value)}return r}highlight(e,t,i,r){let s=Ql(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}const ia=Ie.define(),Md=Ie.define(),$s=$i.define({create(n){return new tO(fd(n).create(),null)},update(n,e){for(let t of e.effects)t.is(ia)?n=new tO(t.value.create(),n.panel):t.is(Md)&&(n=new tO(n.query,t.value?Dd:null));return n},provide:n=>Ko.from(n,e=>e.panel)});class tO{constructor(e,t){this.query=e,this.panel=t}}const $Z=Re.mark({class:"cm-searchMatch"}),QZ=Re.mark({class:"cm-searchMatch cm-searchMatch-selected"}),wZ=pi.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field($s))}update(n){let e=n.state.field($s);(e!=n.startState.field($s)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return Re.none;let{view:t}=this,i=new ws;for(let r=0,s=t.visibleRanges,l=s.length;rs[r+1].from-2*250;)f=s[++r].to;n.highlight(t.state,o,f,(u,h)=>{let O=t.state.selection.ranges.some(p=>p.from==u&&p.to==h);i.add(u,h,O?QZ:$Z)})}return i.finish()}},{decorations:n=>n.decorations});function Oa(n){return e=>{let t=e.state.field($s,!1);return t&&t.query.spec.valid?n(e,t):Nw(e)}}const Tc=Oa((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state,t,t);return i?(n.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:zd(n,i),userEvent:"select.search"}),!0):!1}),Zc=Oa((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,r=e.prevMatch(t,i,i);return r?(n.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:zd(n,r),userEvent:"select.search"}),!0):!1}),yZ=Oa((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:J.create(t.map(i=>J.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),vZ=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:i,to:r}=t.main,s=[],l=0;for(let o=new Ml(n.doc,n.sliceDoc(i,r));!o.next().done;){if(s.length>1e3)return!1;o.value.from==i&&(l=s.length),s.push(J.range(o.value.from,o.value.to))}return e(n.update({selection:J.create(s,l),userEvent:"select.search.matches"})),!0},O0=Oa((n,{query:e})=>{let{state:t}=n,{from:i,to:r}=t.selection.main;if(t.readOnly)return!1;let s=e.nextMatch(t,i,i);if(!s)return!1;let l=[],o,f,u=[];if(s.from==i&&s.to==r&&(f=t.toText(e.getReplacement(s)),l.push({from:s.from,to:s.to,insert:f}),s=e.nextMatch(t,s.from,s.to),u.push(me.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(i).number)+"."))),s){let h=l.length==0||l[0].from>=s.to?0:s.to-s.from-f.length;o={anchor:s.from-h,head:s.to-h},u.push(zd(n,s))}return n.dispatch({changes:l,selection:o,scrollIntoView:!!o,effects:u,userEvent:"input.replace"}),!0}),PZ=Oa((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(r=>{let{from:s,to:l}=r;return{from:s,to:l,insert:e.getReplacement(r)}});if(!t.length)return!1;let i=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:me.announce.of(i),userEvent:"input.replace.all"}),!0});function Dd(n){return n.state.facet(Ed).createPanel(n)}function fd(n,e){var t,i,r,s;let l=n.selection.main,o=l.empty||l.to>l.from+100?"":n.sliceDoc(l.from,l.to);if(e&&!o)return e;let f=n.facet(Ed);return new zw({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:f.literal)?o:o.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:f.caseSensitive,literal:(r=e==null?void 0:e.literal)!==null&&r!==void 0?r:f.literal,wholeWord:(s=e==null?void 0:e.wholeWord)!==null&&s!==void 0?s:f.wholeWord})}const Nw=n=>{let e=n.state.field($s,!1);if(e&&e.panel){let t=Ho(n,Dd);if(!t)return!1;let i=t.dom.querySelector("[main-field]");if(i&&i!=n.root.activeElement){let r=fd(n.state,e.query.spec);r.valid&&n.dispatch({effects:ia.of(r)}),i.focus(),i.select()}}else n.dispatch({effects:[Md.of(!0),e?ia.of(fd(n.state,e.query.spec)):Ie.appendConfig.of(xZ)]});return!0},Lw=n=>{let e=n.state.field($s,!1);if(!e||!e.panel)return!1;let t=Ho(n,Dd);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:Md.of(!1)}),!0},kZ=[{key:"Mod-f",run:Nw,scope:"editor search-panel"},{key:"F3",run:Tc,shift:Zc,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Tc,shift:Zc,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Lw,scope:"editor search-panel"},{key:"Mod-Shift-l",run:vZ},{key:"Alt-g",run:rZ},{key:"Mod-d",run:pZ,preventDefault:!0}];class _Z{constructor(e){this.view=e;let t=this.query=e.state.field($s).query.spec;this.commit=this.commit.bind(this),this.searchField=Wt("input",{value:t.search,placeholder:wn(e,"Find"),"aria-label":wn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Wt("input",{value:t.replace,placeholder:wn(e,"Replace"),"aria-label":wn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Wt("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Wt("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Wt("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function i(r,s,l){return Wt("button",{class:"cm-button",name:r,onclick:s,type:"button"},l)}this.dom=Wt("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>Tc(e),[wn(e,"next")]),i("prev",()=>Zc(e),[wn(e,"previous")]),i("select",()=>yZ(e),[wn(e,"all")]),Wt("label",null,[this.caseField,wn(e,"match case")]),Wt("label",null,[this.reField,wn(e,"regexp")]),Wt("label",null,[this.wordField,wn(e,"by word")]),...e.state.readOnly?[]:[Wt("br"),this.replaceField,i("replace",()=>O0(e),[wn(e,"replace")]),i("replaceAll",()=>PZ(e),[wn(e,"replace all")])],Wt("button",{name:"close",onclick:()=>Lw(e),"aria-label":wn(e,"close"),type:"button"},["×"])])}commit(){let e=new zw({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:ia.of(e)}))}keydown(e){M5(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Zc:Tc)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),O0(this.view))}update(e){for(let t of e.transactions)for(let i of t.effects)i.is(ia)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Ed).top}}function wn(n,e){return n.state.phrase(e)}const Df=30,zf=/[\s\.,:;?!]/;function zd(n,{from:e,to:t}){let i=n.state.doc.lineAt(e),r=n.state.doc.lineAt(t).to,s=Math.max(i.from,e-Df),l=Math.min(r,t+Df),o=n.state.sliceDoc(s,l);if(s!=i.from){for(let f=0;fo.length-Df;f--)if(!zf.test(o[f-1])&&zf.test(o[f])){o=o.slice(0,f);break}}return me.announce.of(`${n.state.phrase("current match")}. ${o} ${n.state.phrase("on line")} ${i.number}.`)}const WZ=me.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),xZ=[$s,el.lowest(wZ),WZ];class Bw{constructor(e,t,i){this.state=e,this.pos=t,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let t=ti(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),i=Math.max(t.from,this.pos-250),r=t.text.slice(i-t.from,this.pos-t.from),s=r.search(Fw(e,!1));return s<0?null:{from:i+s,to:this.pos,text:r.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,t){e=="abort"&&this.abortListeners&&this.abortListeners.push(t)}}function d0(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function CZ(n){let e=Object.create(null),t=Object.create(null);for(let{label:r}of n){e[r[0]]=!0;for(let s=1;stypeof r=="string"?{label:r}:r),[t,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:CZ(e);return r=>{let s=r.matchBefore(i);return s||r.explicit?{from:s?s.from:r.pos,options:e,validFor:t}:null}}function XZ(n,e){return t=>{for(let i=ti(t.state).resolveInner(t.pos,-1);i;i=i.parent)if(n.indexOf(i.name)>-1)return null;return e(t)}}class p0{constructor(e,t,i){this.completion=e,this.source=t,this.match=i}}function Qs(n){return n.selection.main.head}function Fw(n,e){var t;let{source:i}=n,r=e&&i[0]!="^",s=i[i.length-1]!="$";return!r&&!s?n:new RegExp(`${r?"^":""}(?:${i})${s?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const TZ=jr.define();function ZZ(n,e,t,i){return Object.assign(Object.assign({},n.changeByRange(r=>{if(r==n.selection.main)return{changes:{from:t,to:i,insert:e},range:J.cursor(t+e.length)};let s=i-t;return!r.empty||s&&n.sliceDoc(r.from-s,r.from)!=n.sliceDoc(t,i)?{range:r}:{changes:{from:r.from-s,to:r.from,insert:e},range:J.cursor(r.from-s+e.length)}})),{userEvent:"input.complete"})}function Gw(n,e){const t=e.completion.apply||e.completion.label;let i=e.source;typeof t=="string"?n.dispatch(Object.assign(Object.assign({},ZZ(n.state,t,i.from,i.to)),{annotations:TZ.of(e.completion)})):t(n,e.completion,i.from,i.to)}const g0=new WeakMap;function RZ(n){if(!Array.isArray(n))return n;let e=g0.get(n);return e||g0.set(n,e=jw(n)),e}class AZ{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let t=0;t=48&&X<=57||X>=97&&X<=122?2:X>=65&&X<=90?1:0:(Z=gd(X))!=Z.toLowerCase()?1:Z!=Z.toUpperCase()?2:0;(!x||I==1&&$||C==0&&I!=0)&&(t[O]==X||i[O]==X&&(p=!0)?l[O++]=x:l.length&&(P=!1)),C=I,x+=Pn(X)}return O==f&&l[0]==0&&P?this.result(-100+(p?-200:0),l,e):g==f&&b==0?[-200-e.length,0,Q]:o>-1?[-700-e.length,o,o+this.pattern.length]:g==f?[-200+-700-e.length,b,Q]:O==f?this.result(-100+(p?-200:0)+-700+(P?0:-1100),l,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,i){let r=[e-i.length],s=1;for(let l of t){let o=l+(this.astral?Pn(Zi(i,l)):1);s>1&&r[s-1]==l?r[s-1]=o:(r[s++]=l,r[s++]=o)}return r}}const Ln=ye.define({combine(n){return _r(n,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>i=>m0(e(i),t(i)),optionClass:(e,t)=>i=>m0(e(i),t(i)),addToOptions:(e,t)=>e.concat(t)})}});function m0(n,e){return n?e?n+" "+e:n:e}function UZ(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),t.type&&i.classList.add(...t.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(t,i,r){let s=document.createElement("span");s.className="cm-completionLabel";let{label:l}=t,o=0;for(let f=1;fo&&s.appendChild(document.createTextNode(l.slice(o,u)));let O=s.appendChild(document.createElement("span"));O.appendChild(document.createTextNode(l.slice(u,h))),O.className="cm-completionMatchedText",o=h}return ot.position-i.position).map(t=>t.render)}function S0(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let r=Math.floor(e/t);return{from:r*t,to:(r+1)*t}}let i=Math.floor((n-e)/t);return{from:n-(i+1)*t,to:n-i*t}}class YZ{constructor(e,t){this.view=e,this.stateField=t,this.info=null,this.placeInfo={read:()=>this.measureInfo(),write:o=>this.positionInfo(o),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:r,selected:s}=i.open,l=e.state.facet(Ln);this.optionContent=UZ(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=S0(r.length,s,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",o=>{for(let f=o.target,u;f&&f!=this.dom;f=f.parentNode)if(f.nodeName=="LI"&&(u=/-(\d+)$/.exec(f.id))&&+u[1]{this.info&&this.view.requestMeasure(this.placeInfo)})}mount(){this.updateSel()}update(e){var t,i,r;let s=e.state.field(this.stateField),l=e.startState.field(this.stateField);this.updateTooltipClass(e.state),s!=l&&(this.updateSel(),((t=s.open)===null||t===void 0?void 0:t.disabled)!=((i=l.open)===null||i===void 0?void 0:i.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(!((r=s.open)===null||r===void 0)&&r.disabled)))}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of t.split(" "))i&&this.dom.classList.add(i);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfo)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=S0(t.options.length,t.selected,this.view.state.facet(Ln).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t.options,e.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfo)})),this.updateSelectedOption(t.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:i}=t.options[t.selected],{info:r}=i;if(!r)return;let s=typeof r=="string"?document.createTextNode(r):r(i);if(!s)return;"then"in s?s.then(l=>{l&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(l)}).catch(l=>Wn(this.view.state,l,"completion info")):this.addInfoPane(s)}}addInfoPane(e){let t=this.info=document.createElement("div");t.className="cm-tooltip cm-completionInfo",t.appendChild(e),this.dom.appendChild(t),this.view.requestMeasure(this.placeInfo)}updateSelectedOption(e){let t=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),t=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return t&&qZ(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),s=this.space;if(!s){let b=this.dom.ownerDocument.defaultView||window;s={left:0,top:0,right:b.innerWidth,bottom:b.innerHeight}}if(r.top>Math.min(s.bottom,t.bottom)-10||r.bottom=i.height||b>t.top?h=r.bottom-t.top+"px":O=t.bottom-r.top+"px"}return{top:h,bottom:O,maxWidth:u,class:f?l?"left-narrow":"right-narrow":o?"left":"right"}}positionInfo(e){this.info&&(e?(this.info.style.top=e.top,this.info.style.bottom=e.bottom,this.info.style.maxWidth=e.maxWidth,this.info.className="cm-tooltip cm-completionInfo cm-completionInfo-"+e.class):this.info.style.top="-1e6px")}createListBox(e,t,i){const r=document.createElement("ul");r.id=t,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions"));for(let s=i.from;snew YZ(e,n)}function qZ(n,e){let t=n.getBoundingClientRect(),i=e.getBoundingClientRect();i.topt.bottom&&(n.scrollTop+=i.bottom-t.bottom)}function b0(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function EZ(n,e){let t=[],i=0;for(let o of n)if(o.hasResult())if(o.result.filter===!1){let f=o.result.getMatch;for(let u of o.result.options){let h=[1e9-i++];if(f)for(let O of f(u))h.push(O);t.push(new p0(u,o,h))}}else{let f=new AZ(e.sliceDoc(o.from,o.to)),u;for(let h of o.result.options)(u=f.match(h.label))&&(h.boost!=null&&(u[0]+=h.boost),t.push(new p0(h,o,u)))}let r=[],s=null,l=e.facet(Ln).compareCompletions;for(let o of t.sort((f,u)=>u.match[0]-f.match[0]||l(f.completion,u.completion)))!s||s.label!=o.completion.label||s.detail!=o.completion.detail||s.type!=null&&o.completion.type!=null&&s.type!=o.completion.type||s.apply!=o.completion.apply?r.push(o):b0(o.completion)>b0(s)&&(r[r.length-1]=o),s=o.completion;return r}class Pl{constructor(e,t,i,r,s,l){this.options=e,this.attrs=t,this.tooltip=i,this.timestamp=r,this.selected=s,this.disabled=l}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Pl(this.options,$0(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,i,r,s){let l=EZ(e,t);if(!l.length)return r&&e.some(f=>f.state==1)?new Pl(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let o=t.facet(Ln).selectOnOpen?0:-1;if(r&&r.selected!=o&&r.selected!=-1){let f=r.options[r.selected].completion;for(let u=0;uu.hasResult()?Math.min(f,u.from):f,1e8),create:VZ(Mn),above:s.aboveCursor},r?r.timestamp:Date.now(),o,!1)}map(e){return new Pl(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Rc{constructor(e,t,i){this.active=e,this.id=t,this.open=i}static start(){return new Rc(zZ,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,i=t.facet(Ln),s=(i.override||t.languageDataAt("autocomplete",Qs(t)).map(RZ)).map(o=>(this.active.find(u=>u.source==o)||new hn(o,this.active.some(u=>u.state!=0)?1:0)).update(e,i));s.length==this.active.length&&s.every((o,f)=>o==this.active[f])&&(s=this.active);let l=this.open;l&&e.docChanged&&(l=l.map(e.changes)),e.selection||s.some(o=>o.hasResult()&&e.changes.touchesRange(o.from,o.to))||!MZ(s,this.active)?l=Pl.build(s,t,this.id,l,i):l&&l.disabled&&!s.some(o=>o.state==1)&&(l=null),!l&&s.every(o=>o.state!=1)&&s.some(o=>o.hasResult())&&(s=s.map(o=>o.hasResult()?new hn(o.source,0):o));for(let o of e.effects)o.is(Kw)&&(l=l&&l.setSelected(o.value,this.id));return s==this.active&&l==this.open?this:new Rc(s,this.id,l)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:DZ}}function MZ(n,e){if(n==e)return!0;for(let t=0,i=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const zZ=[];function cd(n){return n.isUserEvent("input.type")?"input":n.isUserEvent("delete.backward")?"delete":null}class hn{constructor(e,t,i=-1){this.source=e,this.state=t,this.explicitPos=i}hasResult(){return!1}update(e,t){let i=cd(e),r=this;i?r=r.handleUserEvent(e,i,t):e.docChanged?r=r.handleChange(e):e.selection&&r.state!=0&&(r=new hn(r.source,0));for(let s of e.effects)if(s.is(Id))r=new hn(r.source,1,s.value?Qs(e.state):-1);else if(s.is(Ac))r=new hn(r.source,0);else if(s.is(Hw))for(let l of s.value)l.source==r.source&&(r=l);return r}handleUserEvent(e,t,i){return t=="delete"||!i.activateOnTyping?this.map(e.changes):new hn(this.source,1)}handleChange(e){return e.changes.touchesRange(Qs(e.startState))?new hn(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new hn(this.source,this.state,e.mapPos(this.explicitPos))}}class Mo extends hn{constructor(e,t,i,r,s){super(e,2,t),this.result=i,this.from=r,this.to=s}hasResult(){return!0}handleUserEvent(e,t,i){var r;let s=e.changes.mapPos(this.from),l=e.changes.mapPos(this.to,1),o=Qs(e.state);if((this.explicitPos<0?o<=s:ol||t=="delete"&&Qs(e.startState)==this.from)return new hn(this.source,t=="input"&&i.activateOnTyping?1:0);let f=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),u;return IZ(this.result.validFor,e.state,s,l)?new Mo(this.source,f,this.result,s,l):this.result.update&&(u=this.result.update(this.result,s,l,new Bw(e.state,o,f>=0)))?new Mo(this.source,f,u,u.from,(r=u.to)!==null&&r!==void 0?r:Qs(e.state)):new hn(this.source,1,f)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new hn(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new Mo(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}function IZ(n,e,t,i){if(!n)return!1;let r=e.sliceDoc(t,i);return typeof n=="function"?n(r,t,i,e):Fw(n,!0).test(r)}const Id=Ie.define(),Ac=Ie.define(),Hw=Ie.define({map(n,e){return n.map(t=>t.map(e))}}),Kw=Ie.define(),Mn=$i.define({create(){return Rc.start()},update(n,e){return n.update(e)},provide:n=>[kd.from(n,e=>e.tooltip),me.contentAttributes.from(n,e=>e.attrs)]});function If(n,e="option"){return t=>{let i=t.state.field(Mn,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+r*(n?1:-1):n?0:l-1;return o<0?o=e=="page"?0:l-1:o>=l&&(o=e=="page"?l-1:0),t.dispatch({effects:Kw.of(o)}),!0}}const NZ=n=>{let e=n.state.field(Mn,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||Date.now()-e.open.timestampn.state.field(Mn,!1)?(n.dispatch({effects:Id.of(!0)}),!0):!1,BZ=n=>{let e=n.state.field(Mn,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:Ac.of(null)}),!0)};class jZ{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const Q0=50,FZ=50,GZ=1e3,HZ=pi.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of n.state.field(Mn).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(Mn);if(!n.selectionSet&&!n.docChanged&&n.startState.field(Mn)==e)return;let t=n.transactions.some(i=>(i.selection||i.docChanged)&&!cd(i));for(let i=0;iFZ&&Date.now()-r.time>GZ){for(let s of r.context.abortListeners)try{s()}catch(l){Wn(this.view.state,l)}r.context.abortListeners=null,this.running.splice(i--,1)}else r.updates.push(...n.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some(i=>i.state==1&&!this.running.some(r=>r.active.source==i.source))?setTimeout(()=>this.startUpdate(),Q0):-1,this.composing!=0)for(let i of n.transactions)cd(i)=="input"?this.composing=2:this.composing==2&&i.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:n}=this.view,e=n.field(Mn);for(let t of e.active)t.state==1&&!this.running.some(i=>i.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=Qs(e),i=new Bw(e,t,n.explicitPos==t),r=new jZ(n,i);this.running.push(r),Promise.resolve(n.source(i)).then(s=>{r.context.aborted||(r.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:Ac.of(null)}),Wn(this.view.state,s)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),Q0))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(Ln);for(let i=0;il.source==r.active.source);if(s&&s.state==1)if(r.done==null){let l=new hn(r.active.source,0);for(let o of r.updates)l=l.update(o,t);l.state!=1&&e.push(l)}else this.startQuery(s)}e.length&&this.view.dispatch({effects:Hw.of(e)})}},{eventHandlers:{blur(){let n=this.view.state.field(Mn,!1);n&&n.tooltip&&this.view.state.facet(Ln).closeOnBlur&&this.view.dispatch({effects:Ac.of(null)})},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Id.of(!1)}),20),this.composing=0}}}),Jw=me.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class KZ{constructor(e,t,i,r){this.field=e,this.line=t,this.from=i,this.to=r}}class Nd{constructor(e,t,i){this.field=e,this.from=t,this.to=i}map(e){let t=e.mapPos(this.from,-1,Ai.TrackDel),i=e.mapPos(this.to,1,Ai.TrackDel);return t==null||i==null?null:new Nd(this.field,t,i)}}class Ld{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let i=[],r=[t],s=e.doc.lineAt(t),l=/^\s*/.exec(s.text)[0];for(let f of this.lines){if(i.length){let u=l,h=/^\t*/.exec(f)[0].length;for(let O=0;Onew Nd(f.field,r[f.line]+f.from,r[f.line]+f.to));return{text:i,ranges:o}}static parse(e){let t=[],i=[],r=[],s;for(let l of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(l);){let o=s[1]?+s[1]:null,f=s[2]||s[3]||"",u=-1;for(let h=0;h=u&&O.field++}r.push(new KZ(u,i.length,s.index,s.index+f.length)),l=l.slice(0,s.index)+f+l.slice(s.index+s[0].length)}for(let o;o=/\\([{}])/.exec(l);){l=l.slice(0,o.index)+o[1]+l.slice(o.index+o[0].length);for(let f of r)f.line==i.length&&f.from>o.index&&(f.from--,f.to--)}i.push(l)}return new Ld(i,r)}}let JZ=Re.widget({widget:new class extends Cs{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),eR=Re.mark({class:"cm-snippetField"});class Gl{constructor(e,t){this.ranges=e,this.active=t,this.deco=Re.set(e.map(i=>(i.from==i.to?JZ:eR).range(i.from,i.to)))}map(e){let t=[];for(let i of this.ranges){let r=i.map(e);if(!r)return null;t.push(r)}return new Gl(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(i=>i.field==this.active&&i.from<=t.from&&i.to>=t.to))}}const da=Ie.define({map(n,e){return n&&n.map(e)}}),tR=Ie.define(),na=$i.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(da))return t.value;if(t.is(tR)&&n)return new Gl(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>me.decorations.from(n,e=>e?e.deco:Re.none)});function Bd(n,e){return J.create(n.filter(t=>t.field==e).map(t=>J.range(t.from,t.to)))}function iR(n){let e=Ld.parse(n);return(t,i,r,s)=>{let{text:l,ranges:o}=e.instantiate(t.state,r),f={changes:{from:r,to:s,insert:mt.of(l)},scrollIntoView:!0};if(o.length&&(f.selection=Bd(o,0)),o.length>1){let u=new Gl(o,0),h=f.effects=[da.of(u)];t.state.field(na,!1)===void 0&&h.push(Ie.appendConfig.of([na,oR,aR,Jw]))}t.dispatch(t.state.update(f))}}function ey(n){return({state:e,dispatch:t})=>{let i=e.field(na,!1);if(!i||n<0&&i.active==0)return!1;let r=i.active+n,s=n>0&&!i.ranges.some(l=>l.field==r+n);return t(e.update({selection:Bd(i.ranges,r),effects:da.of(s?null:new Gl(i.ranges,r))})),!0}}const nR=({state:n,dispatch:e})=>n.field(na,!1)?(e(n.update({effects:da.of(null)})),!0):!1,rR=ey(1),sR=ey(-1),lR=[{key:"Tab",run:rR,shift:sR},{key:"Escape",run:nR}],w0=ye.define({combine(n){return n.length?n[0]:lR}}),oR=el.highest(aa.compute([w0],n=>n.facet(w0)));function sr(n,e){return Object.assign(Object.assign({},e),{apply:iR(n)})}const aR=me.domEventHandlers({mousedown(n,e){let t=e.state.field(na,!1),i;if(!t||(i=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let r=t.ranges.find(s=>s.from<=i&&s.to>=i);return!r||r.field==t.active?!1:(e.dispatch({selection:Bd(t.ranges,r.field),effects:da.of(t.ranges.some(s=>s.field>r.field)?new Gl(t.ranges,r.field):null)}),!0)}}),ra={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Fs=Ie.define({map(n,e){let t=e.mapPos(n,-1,Ai.TrackAfter);return t??void 0}}),jd=Ie.define({map(n,e){return e.mapPos(n)}}),Fd=new class extends Hs{};Fd.startSide=1;Fd.endSide=-1;const ty=$i.define({create(){return Qt.empty},update(n,e){if(e.selection){let t=e.state.doc.lineAt(e.selection.main.head).from,i=e.startState.doc.lineAt(e.startState.selection.main.head).from;t!=e.changes.mapPos(i,-1)&&(n=Qt.empty)}n=n.map(e.changes);for(let t of e.effects)t.is(Fs)?n=n.update({add:[Fd.range(t.value,t.value+1)]}):t.is(jd)&&(n=n.update({filter:i=>i!=t.value}));return n}});function fR(){return[uR,ty]}const iO="()[]{}<>";function iy(n){for(let e=0;e{if((cR?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let r=n.state.selection.main;if(i.length>2||i.length==2&&Pn(Zi(i,0))==1||e!=r.from||t!=r.to)return!1;let s=dR(n.state,i);return s?(n.dispatch(s),!0):!1}),hR=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let i=ny(n,n.selection.main.head).brackets||ra.brackets,r=null,s=n.changeByRange(l=>{if(l.empty){let o=pR(n.doc,l.head);for(let f of i)if(f==o&&iu(n.doc,l.head)==iy(Zi(f,0)))return{changes:{from:l.head-f.length,to:l.head+f.length},range:J.cursor(l.head-f.length)}}return{range:r=l}});return r||e(n.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},OR=[{key:"Backspace",run:hR}];function dR(n,e){let t=ny(n,n.selection.main.head),i=t.brackets||ra.brackets;for(let r of i){let s=iy(Zi(r,0));if(e==r)return s==r?SR(n,r,i.indexOf(r+r+r)>-1,t):gR(n,r,s,t.before||ra.before);if(e==s&&ry(n,n.selection.main.from))return mR(n,r,s)}return null}function ry(n,e){let t=!1;return n.field(ty).between(0,n.doc.length,i=>{i==e&&(t=!0)}),t}function iu(n,e){let t=n.sliceString(e,e+2);return t.slice(0,Pn(Zi(t,0)))}function pR(n,e){let t=n.sliceString(e-2,e);return Pn(Zi(t,0))==t.length?t:t.slice(1)}function gR(n,e,t,i){let r=null,s=n.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:t,from:l.to}],effects:Fs.of(l.to+e.length),range:J.range(l.anchor+e.length,l.head+e.length)};let o=iu(n.doc,l.head);return!o||/\s/.test(o)||i.indexOf(o)>-1?{changes:{insert:e+t,from:l.head},effects:Fs.of(l.head+e.length),range:J.cursor(l.head+e.length)}:{range:r=l}});return r?null:n.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function mR(n,e,t){let i=null,r=n.selection.ranges.map(s=>s.empty&&iu(n.doc,s.head)==t?J.cursor(s.head+t.length):i=s);return i?null:n.update({selection:J.create(r,n.selection.mainIndex),scrollIntoView:!0,effects:n.selection.ranges.map(({from:s})=>jd.of(s))})}function SR(n,e,t,i){let r=i.stringPrefixes||ra.stringPrefixes,s=null,l=n.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:e,from:o.to}],effects:Fs.of(o.to+e.length),range:J.range(o.anchor+e.length,o.head+e.length)};let f=o.head,u=iu(n.doc,f),h;if(u==e){if(y0(n,f))return{changes:{insert:e+e,from:f},effects:Fs.of(f+e.length),range:J.cursor(f+e.length)};if(ry(n,f)){let O=t&&n.sliceDoc(f,f+e.length*3)==e+e+e;return{range:J.cursor(f+e.length*(O?3:1)),effects:jd.of(f)}}}else{if(t&&n.sliceDoc(f-2*e.length,f)==e+e&&(h=v0(n,f-2*e.length,r))>-1&&y0(n,h))return{changes:{insert:e+e+e+e,from:f},effects:Fs.of(f+e.length),range:J.cursor(f+e.length)};if(n.charCategorizer(f)(u)!=zt.Word&&v0(n,f,r)>-1&&!bR(n,f,e,r))return{changes:{insert:e+e,from:f},effects:Fs.of(f+e.length),range:J.cursor(f+e.length)}}return{range:s=o}});return s?null:n.update(l,{scrollIntoView:!0,userEvent:"input.type"})}function y0(n,e){let t=ti(n).resolveInner(e+1);return t.parent&&t.from==e}function bR(n,e,t,i){let r=ti(n).resolveInner(e,-1),s=i.reduce((l,o)=>Math.max(l,o.length),0);for(let l=0;l<5;l++){let o=n.sliceDoc(r.from,Math.min(r.to,r.from+t.length+s)),f=o.indexOf(t);if(!f||f>-1&&i.indexOf(o.slice(0,f))>-1){let h=r.firstChild;for(;h&&h.from==r.from&&h.to-h.from>t.length+f;){if(n.sliceDoc(h.to-t.length,h.to)==t)return!1;h=h.firstChild}return!0}let u=r.to==e&&r.parent;if(!u)break;r=u}return!1}function v0(n,e,t){let i=n.charCategorizer(e);if(i(n.sliceDoc(e-1,e))!=zt.Word)return e;for(let r of t){let s=e-r.length;if(n.sliceDoc(s,e)==r&&i(n.sliceDoc(s-1,s))!=zt.Word)return s}return-1}function $R(n={}){return[Mn,Ln.of(n),HZ,QR,Jw]}const sy=[{key:"Ctrl-Space",run:LZ},{key:"Escape",run:BZ},{key:"ArrowDown",run:If(!0)},{key:"ArrowUp",run:If(!1)},{key:"PageDown",run:If(!0,"page")},{key:"PageUp",run:If(!1,"page")},{key:"Enter",run:NZ}],QR=el.highest(aa.computeN([Ln],n=>n.facet(Ln).defaultKeymap?[sy]:[]));class wR{constructor(e,t,i){this.from=e,this.to=t,this.diagnostic=i}}class Ls{constructor(e,t,i){this.diagnostics=e,this.panel=t,this.selected=i}static init(e,t,i){let r=e,s=i.facet(kl).markerFilter;s&&(r=s(r));let l=Re.set(r.map(o=>o.from==o.to||o.from==o.to-1&&i.doc.lineAt(o.from).to==o.from?Re.widget({widget:new TR(o),diagnostic:o}).range(o.from):Re.mark({attributes:{class:"cm-lintRange cm-lintRange-"+o.severity},diagnostic:o}).range(o.from,o.to)),!0);return new Ls(l,t,Dl(l))}}function Dl(n,e=null,t=0){let i=null;return n.between(t,1e9,(r,s,{spec:l})=>{if(!(e&&l.diagnostic!=e))return i=new wR(r,s,l.diagnostic),!1}),i}function yR(n,e){return!!(n.effects.some(t=>t.is(Gd))||n.changes.touchesRange(e.pos))}function ly(n,e){return n.field(_n,!1)?e:e.concat(Ie.appendConfig.of([_n,me.decorations.compute([_n],t=>{let{selected:i,panel:r}=t.field(_n);return!i||!r||i.from==i.to?Re.none:Re.set([PR.range(i.from,i.to)])}),k4(kR,{hideOn:yR}),RR]))}function vR(n,e){return{effects:ly(n,[Gd.of(e)])}}const Gd=Ie.define(),Hd=Ie.define(),oy=Ie.define(),_n=$i.define({create(){return new Ls(Re.none,null,null)},update(n,e){if(e.docChanged){let t=n.diagnostics.map(e.changes),i=null;if(n.selected){let r=e.changes.mapPos(n.selected.from,1);i=Dl(t,n.selected.diagnostic,r)||Dl(t,null,r)}n=new Ls(t,n.panel,i)}for(let t of e.effects)t.is(Gd)?n=Ls.init(t.value,n.panel,e.state):t.is(Hd)?n=new Ls(n.diagnostics,t.value?nu.open:null,n.selected):t.is(oy)&&(n=new Ls(n.diagnostics,n.panel,t.value));return n},provide:n=>[Ko.from(n,e=>e.panel),me.decorations.from(n,e=>e.diagnostics)]}),PR=Re.mark({class:"cm-lintRange cm-lintRange-active"});function kR(n,e,t){let{diagnostics:i}=n.state.field(_n),r=[],s=2e8,l=0;i.between(e-(t<0?1:0),e+(t>0?1:0),(f,u,{spec:h})=>{e>=f&&e<=u&&(f==u||(e>f||t>0)&&(efy(n,t,!1)))}const WR=n=>{let e=n.state.field(_n,!1);(!e||!e.panel)&&n.dispatch({effects:ly(n.state,[Hd.of(!0)])});let t=Ho(n,nu.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},P0=n=>{let e=n.state.field(_n,!1);return!e||!e.panel?!1:(n.dispatch({effects:Hd.of(!1)}),!0)},xR=n=>{let e=n.state.field(_n,!1);if(!e)return!1;let t=n.state.selection.main,i=e.diagnostics.iter(t.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==t.from&&i.to==t.to)?!1:(n.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},CR=[{key:"Mod-Shift-m",run:WR,preventDefault:!0},{key:"F8",run:xR}],XR=pi.fromClass(class{constructor(n){this.view=n,this.timeout=-1,this.set=!0;let{delay:e}=n.state.facet(kl);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){let n=Date.now();if(nPromise.resolve(i(this.view)))).then(i=>{let r=i.reduce((s,l)=>s.concat(l));this.view.state.doc==e.doc&&this.view.dispatch(vR(this.view.state,r))},i=>{Wn(this.view.state,i)})}}update(n){let e=n.state.facet(kl);(n.docChanged||e!=n.startState.facet(kl))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),kl=ye.define({combine(n){return Object.assign({sources:n.map(e=>e.source)},_r(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null}))},enables:XR});function ay(n){let e=[];if(n)e:for(let{name:t}of n){for(let i=0;is.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function fy(n,e,t){var i;let r=t?ay(e.actions):[];return Wt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Wt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(i=e.actions)===null||i===void 0?void 0:i.map((s,l)=>{let o=O=>{O.preventDefault();let p=Dl(n.state.field(_n).diagnostics,e);p&&s.apply(n,p.from,p.to)},{name:f}=s,u=r[l]?f.indexOf(r[l]):-1,h=u<0?f:[f.slice(0,u),Wt("u",f.slice(u,u+1)),f.slice(u+1)];return Wt("button",{type:"button",class:"cm-diagnosticAction",onclick:o,onmousedown:o,"aria-label":` Action: ${f}${u<0?"":` (access key "${r[l]})"`}.`},h)}),e.source&&Wt("div",{class:"cm-diagnosticSource"},e.source))}class TR extends Cs{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Wt("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class k0{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=fy(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class nu{constructor(e){this.view=e,this.items=[];let t=r=>{if(r.keyCode==27)P0(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],l=ay(s.actions);for(let o=0;o{for(let s=0;sP0(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(_n).selected;if(!e)return-1;for(let t=0;t{let u=-1,h;for(let O=i;Oi&&(this.items.splice(i,u-i),r=!0)),t&&h.diagnostic==t.diagnostic?h.dom.hasAttribute("aria-selected")||(h.dom.setAttribute("aria-selected","true"),s=h):h.dom.hasAttribute("aria-selected")&&h.dom.removeAttribute("aria-selected"),i++});i({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:l,panel:o})=>{l.topo.bottom&&(this.list.scrollTop+=l.bottom-o.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)t();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(_n),i=Dl(t.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:oy.of(i)})}static open(e){return new nu(e)}}function ZR(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(n)}')`}function nO(n){return ZR(``,'width="6" height="3"')}const RR=me.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:nO("#d11")},".cm-lintRange-warning":{backgroundImage:nO("orange")},".cm-lintRange-info":{backgroundImage:nO("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),AR=(()=>[U4(),q4(),r4(),nT(),CX(),B5(),K5(),ct.allowMultipleSelections.of(!0),SX(),ew(RX,{fallback:!0}),MX(),fR(),$R(),g4(),b4(),c4(),oZ(),aa.of([...OR,...tZ,...kZ,...hT,..._X,...sy,...CR])])(),ki=({variant:n,settings:e,styles:t})=>{const i=me.theme({"&":{backgroundColor:e.background,color:e.foreground},".cm-content":{caretColor:e.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:e.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:e.selection},".cm-activeLine":{backgroundColor:e.lineHighlight},".cm-gutters":{backgroundColor:e.gutterBackground,color:e.gutterForeground},".cm-activeLineGutter":{backgroundColor:e.lineHighlight}},{dark:n==="dark"}),r=ha.define(t);return[i,ew(r)]};ki({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:S.comment,color:"#404080"},{tag:[S.string,S.regexp],color:"#999999"},{tag:S.number,color:"#7090B0"},{tag:[S.bool,S.null],color:"#8080A0"},{tag:[S.punctuation,S.derefOperator],color:"#805080"},{tag:S.keyword,color:"#60B0FF"},{tag:S.definitionKeyword,color:"#B0FFF0"},{tag:S.moduleKeyword,color:"#60B0FF"},{tag:S.operator,color:"#A0A0FF"},{tag:[S.variableName,S.self],color:"#008080"},{tag:S.operatorKeyword,color:"#A0A0FF"},{tag:S.controlKeyword,color:"#80A0FF"},{tag:S.className,color:"#70E080"},{tag:[S.function(S.propertyName),S.propertyName],color:"#50A0A0"},{tag:S.tagName,color:"#009090"},{tag:S.modifier,color:"#B0FFF0"},{tag:[S.squareBracket,S.attributeName],color:"#D0D0FF"}]});ki({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:S.comment,color:"#787b8099"},{tag:S.string,color:"#86b300"},{tag:S.regexp,color:"#4cbf99"},{tag:[S.number,S.bool,S.null],color:"#ffaa33"},{tag:S.variableName,color:"#5c6166"},{tag:[S.definitionKeyword,S.modifier],color:"#fa8d3e"},{tag:[S.keyword,S.special(S.brace)],color:"#fa8d3e"},{tag:S.operator,color:"#ed9366"},{tag:S.separator,color:"#5c6166b3"},{tag:S.punctuation,color:"#5c6166"},{tag:[S.definition(S.propertyName),S.function(S.variableName)],color:"#f2ae49"},{tag:[S.className,S.definition(S.typeName)],color:"#22a4e6"},{tag:[S.tagName,S.typeName,S.self,S.labelName],color:"#55b4d4"},{tag:S.angleBracket,color:"#55b4d480"},{tag:S.attributeName,color:"#f2ae49"}]});ki({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:S.comment,color:"#6E6E6E"},{tag:[S.string,S.regexp,S.special(S.brace)],color:"#5C81B3"},{tag:S.number,color:"#C1E1B8"},{tag:S.bool,color:"#53667D"},{tag:[S.definitionKeyword,S.modifier,S.function(S.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[S.keyword,S.moduleKeyword,S.operatorKeyword,S.operator],color:"#697A8E",fontWeight:"bold"},{tag:[S.variableName,S.attributeName],color:"#708E67"},{tag:[S.function(S.variableName),S.definition(S.propertyName),S.derefOperator],color:"#fff"},{tag:S.tagName,color:"#A3D295"}]});ki({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:S.comment,color:"#666666"},{tag:[S.string,S.special(S.brace)],color:"#54BE0D"},{tag:S.regexp,color:"#E9C062"},{tag:S.number,color:"#CF6A4C"},{tag:[S.keyword,S.operator],color:"#5EA6EA"},{tag:S.variableName,color:"#7587A6"},{tag:[S.definitionKeyword,S.modifier],color:"#F9EE98"},{tag:[S.propertyName,S.function(S.variableName)],color:"#937121"},{tag:[S.typeName,S.angleBracket,S.tagName],color:"#9B859D"}]});ki({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:S.comment,color:"#6B4E32"},{tag:[S.keyword,S.operator,S.derefOperator],color:"#EF5D32"},{tag:S.className,color:"#EFAC32",fontWeight:"bold"},{tag:[S.typeName,S.propertyName,S.function(S.variableName),S.definition(S.variableName)],color:"#EFAC32"},{tag:S.definition(S.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:S.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[S.number,S.bool],color:"#6C99BB"},{tag:[S.variableName,S.self],color:"#7DAF9C"},{tag:[S.string,S.special(S.brace),S.regexp],color:"#D9D762"},{tag:[S.angleBracket,S.tagName,S.attributeName],color:"#EFCB43"}]});ki({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:S.comment,color:"#404040"},{tag:[S.string,S.special(S.brace),S.regexp],color:"#00D8FF"},{tag:S.number,color:"#E62286"},{tag:[S.variableName,S.attributeName,S.self],color:"#E62286",fontWeight:"bold"},{tag:S.function(S.variableName),color:"#fff",fontWeight:"bold"}]});ki({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:S.comment,color:"#BCC8BA"},{tag:[S.string,S.special(S.brace),S.regexp],color:"#5D90CD"},{tag:[S.number,S.bool,S.null],color:"#46A609"},{tag:S.keyword,color:"#AF956F"},{tag:[S.definitionKeyword,S.modifier],color:"#C52727"},{tag:[S.angleBracket,S.tagName,S.attributeName],color:"#606060"},{tag:S.self,color:"#000"}]});ki({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:S.comment,color:"#0088FF"},{tag:S.string,color:"#3AD900"},{tag:S.regexp,color:"#80FFC2"},{tag:[S.number,S.bool,S.null],color:"#FF628C"},{tag:[S.definitionKeyword,S.modifier],color:"#FFEE80"},{tag:S.variableName,color:"#CCCCCC"},{tag:S.self,color:"#FF80E1"},{tag:[S.className,S.definition(S.propertyName),S.function(S.variableName),S.definition(S.typeName),S.labelName],color:"#FFDD00"},{tag:[S.keyword,S.operator],color:"#FF9D00"},{tag:[S.propertyName,S.typeName],color:"#80FFBB"},{tag:S.special(S.brace),color:"#EDEF7D"},{tag:S.attributeName,color:"#9EFFFF"},{tag:S.derefOperator,color:"#fff"}]});ki({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:S.comment,color:"#AEAEAE"},{tag:[S.string,S.special(S.brace),S.regexp],color:"#8DFF8E"},{tag:[S.className,S.definition(S.propertyName),S.function(S.variableName),S.function(S.definition(S.variableName)),S.definition(S.typeName)],color:"#A3EBFF"},{tag:[S.number,S.bool,S.null],color:"#62E9BD"},{tag:[S.keyword,S.operator],color:"#2BF1DC"},{tag:[S.definitionKeyword,S.modifier],color:"#F8FBB1"},{tag:[S.variableName,S.self],color:"#B683CA"},{tag:[S.angleBracket,S.tagName,S.typeName,S.propertyName],color:"#60A4F1"},{tag:S.derefOperator,color:"#E0E0E0"},{tag:S.attributeName,color:"#7BACCA"}]});ki({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:S.comment,color:"#6272a4"},{tag:[S.string,S.special(S.brace)],color:"#f1fa8c"},{tag:[S.number,S.self,S.bool,S.null],color:"#bd93f9"},{tag:[S.keyword,S.operator],color:"#ff79c6"},{tag:[S.definitionKeyword,S.typeName],color:"#8be9fd"},{tag:S.definition(S.typeName),color:"#f8f8f2"},{tag:[S.className,S.definition(S.propertyName),S.function(S.variableName),S.attributeName],color:"#50fa7b"}]});ki({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:S.comment,color:"#AAAAAA"},{tag:[S.keyword,S.operator,S.typeName,S.tagName,S.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[S.attributeName,S.definition(S.propertyName)],color:"#4F9FD0"},{tag:[S.className,S.string,S.special(S.brace)],color:"#CF4F5F"},{tag:S.number,color:"#CF4F5F",fontWeight:"bold"},{tag:S.variableName,fontWeight:"bold"}]});ki({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:S.comment,color:"#9995b7"},{tag:S.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[S.definitionKeyword,S.modifier],color:"#ff5792"},{tag:[S.className,S.tagName,S.definition(S.typeName)],color:"#0094f0"},{tag:[S.number,S.bool,S.null,S.special(S.brace)],color:"#5842ff"},{tag:[S.definition(S.propertyName),S.function(S.variableName)],color:"#0095a8"},{tag:S.typeName,color:"#b3694d"},{tag:[S.propertyName,S.variableName],color:"#fa8900"},{tag:S.operator,color:"#ff5792"},{tag:S.self,color:"#e64100"},{tag:[S.string,S.regexp],color:"#00b368"},{tag:[S.paren,S.bracket],color:"#0431fa"},{tag:S.labelName,color:"#00bdd6"},{tag:S.attributeName,color:"#e64100"},{tag:S.angleBracket,color:"#9995b7"}]});ki({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:S.comment,color:"#9893a5"},{tag:[S.bool,S.null],color:"#286983"},{tag:S.number,color:"#d7827e"},{tag:S.className,color:"#d7827e"},{tag:[S.angleBracket,S.tagName,S.typeName],color:"#56949f"},{tag:S.attributeName,color:"#907aa9"},{tag:S.punctuation,color:"#797593"},{tag:[S.keyword,S.modifier],color:"#286983"},{tag:[S.string,S.regexp],color:"#ea9d34"},{tag:S.variableName,color:"#d7827e"}]});ki({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:S.comment,color:"#CFCFCF"},{tag:[S.number,S.bool,S.null],color:"#E66C29"},{tag:[S.className,S.definition(S.propertyName),S.function(S.variableName),S.labelName,S.definition(S.typeName)],color:"#2EB43B"},{tag:S.keyword,color:"#D8B229"},{tag:S.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[S.definitionKeyword,S.modifier],color:"#925A47"},{tag:S.string,color:"#704D3D"},{tag:S.typeName,color:"#2F8996"},{tag:[S.variableName,S.propertyName],color:"#77ACB0"},{tag:S.self,color:"#77ACB0",fontWeight:"bold"},{tag:S.regexp,color:"#E3965E"},{tag:[S.tagName,S.angleBracket],color:"#BAA827"},{tag:S.attributeName,color:"#B06520"},{tag:S.derefOperator,color:"#000"}]});ki({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:S.comment,color:"#93A1A1"},{tag:S.string,color:"#2AA198"},{tag:S.regexp,color:"#D30102"},{tag:S.number,color:"#D33682"},{tag:S.variableName,color:"#268BD2"},{tag:[S.keyword,S.operator,S.punctuation],color:"#859900"},{tag:[S.definitionKeyword,S.modifier],color:"#073642",fontWeight:"bold"},{tag:[S.className,S.self,S.definition(S.propertyName)],color:"#268BD2"},{tag:S.function(S.variableName),color:"#268BD2"},{tag:[S.bool,S.null],color:"#B58900"},{tag:S.tagName,color:"#268BD2",fontWeight:"bold"},{tag:S.angleBracket,color:"#93A1A1"},{tag:S.attributeName,color:"#93A1A1"},{tag:S.typeName,color:"#859900"}]});ki({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:S.comment,color:"#8E908C"},{tag:[S.variableName,S.self,S.propertyName,S.attributeName,S.regexp],color:"#C82829"},{tag:[S.number,S.bool,S.null],color:"#F5871F"},{tag:[S.className,S.typeName,S.definition(S.typeName)],color:"#C99E00"},{tag:[S.string,S.special(S.brace)],color:"#718C00"},{tag:S.operator,color:"#3E999F"},{tag:[S.definition(S.propertyName),S.function(S.variableName)],color:"#4271AE"},{tag:S.keyword,color:"#8959A8"},{tag:S.derefOperator,color:"#4D4D4C"}]});const UR=Ll({String:S.string,Number:S.number,"True False":S.bool,PropertyName:S.propertyName,Null:S.null,",":S.separator,"[ ]":S.squareBracket,"{ }":S.brace}),YR=_s.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[UR],skippedNodes:[0],repeatNodeCount:2,tokenData:"(p~RaXY!WYZ!W]^!Wpq!Wrs!]|}$i}!O$n!Q!R$w!R![&V![!]&h!}#O&m#P#Q&r#Y#Z&w#b#c'f#h#i'}#o#p(f#q#r(k~!]Oc~~!`Upq!]qr!]rs!rs#O!]#O#P!w#P~!]~!wOe~~!zXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#g~#jR!Q![#s!c!i#s#T#Z#s~#vR!Q![$P!c!i$P#T#Z$P~$SR!Q![$]!c!i$]#T#Z$]~$`R!Q![!]!c!i!]#T#Z!]~$nOh~~$qQ!Q!R$w!R![&V~$|RT~!O!P%V!g!h%k#X#Y%k~%YP!Q![%]~%bRT~!Q![%]!g!h%k#X#Y%k~%nR{|%w}!O%w!Q![%}~%zP!Q![%}~&SPT~!Q![%}~&[ST~!O!P%V!Q![&V!g!h%k#X#Y%k~&mOg~~&rO]~~&wO[~~&zP#T#U&}~'QP#`#a'T~'WP#g#h'Z~'^P#X#Y'a~'fOR~~'iP#i#j'l~'oP#`#a'r~'uP#`#a'x~'}OS~~(QP#f#g(T~(WP#i#j(Z~(^P#X#Y(a~(fOQ~~(kOW~~(pOV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),VR=Ws.define({name:"json",parser:YR.configure({props:[Bl.add({Object:Rl({except:/^\s*\}/}),Array:Rl({except:/^\s*\]/})}),jl.add({"Object Array":Sr})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function qR(){return new ca(VR)}const ER=54,MR=1,DR=55,zR=2,IR=56,NR=3,_0=4,LR=5,Uc=6,cy=7,uy=8,hy=9,Oy=10,BR=11,jR=12,FR=13,rO=57,GR=14,W0=58,dy=20,HR=22,py=23,KR=24,ud=26,gy=27,JR=28,eA=31,tA=34,iA=36,nA=37,rA=0,sA=1,lA={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},oA={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},x0={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function aA(n){return n==45||n==46||n==58||n>=65&&n<=90||n==95||n>=97&&n<=122||n>=161}function my(n){return n==9||n==10||n==13||n==32}let C0=null,X0=null,T0=0;function hd(n,e){let t=n.pos+e;if(T0==t&&X0==n)return C0;let i=n.peek(e);for(;my(i);)i=n.peek(++e);let r="";for(;aA(i);)r+=String.fromCharCode(i),i=n.peek(++e);return X0=n,T0=t,C0=r?r.toLowerCase():i==fA||i==cA?void 0:null}const Sy=60,Yc=62,Kd=47,fA=63,cA=33,uA=45;function Z0(n,e){this.name=n,this.parent=e,this.hash=e?e.hash:0;for(let t=0;t-1?new Z0(hd(i,1)||"",n):n},reduce(n,e){return e==dy&&n?n.parent:n},reuse(n,e,t,i){let r=e.type.id;return r==Uc||r==iA?new Z0(hd(i,1)||"",n):n},hash(n){return n?n.hash:0},strict:!1}),dA=new Wr((n,e)=>{if(n.next!=Sy){n.next<0&&e.context&&n.acceptToken(rO);return}n.advance();let t=n.next==Kd;t&&n.advance();let i=hd(n,0);if(i===void 0)return;if(!i)return n.acceptToken(t?GR:Uc);let r=e.context?e.context.name:null;if(t){if(i==r)return n.acceptToken(BR);if(r&&oA[r])return n.acceptToken(rO,-2);if(e.dialectEnabled(rA))return n.acceptToken(jR);for(let s=e.context;s;s=s.parent)if(s.name==i)return;n.acceptToken(FR)}else{if(i=="script")return n.acceptToken(cy);if(i=="style")return n.acceptToken(uy);if(i=="textarea")return n.acceptToken(hy);if(lA.hasOwnProperty(i))return n.acceptToken(Oy);r&&x0[r]&&x0[r][i]?n.acceptToken(rO,-1):n.acceptToken(Uc)}},{contextual:!0}),pA=new Wr(n=>{for(let e=0,t=0;;t++){if(n.next<0){t&&n.acceptToken(W0);break}if(n.next==uA)e++;else if(n.next==Yc&&e>=2){t>3&&n.acceptToken(W0,-2);break}else e=0;n.advance()}});function gA(n){for(;n;n=n.parent)if(n.name=="svg"||n.name=="math")return!0;return!1}const mA=new Wr((n,e)=>{if(n.next==Kd&&n.peek(1)==Yc){let t=e.dialectEnabled(sA)||gA(e.context);n.acceptToken(t?LR:_0,2)}else n.next==Yc&&n.acceptToken(_0,1)});function Jd(n,e,t){let i=2+n.length;return new Wr(r=>{for(let s=0,l=0,o=0;;o++){if(r.next<0){o&&r.acceptToken(e);break}if(s==0&&r.next==Sy||s==1&&r.next==Kd||s>=2&&sl?r.acceptToken(e,-l):r.acceptToken(t,-(l-2));break}else if((r.next==10||r.next==13)&&o){r.acceptToken(e,1);break}else s=l=0;r.advance()}})}const SA=Jd("script",ER,MR),bA=Jd("style",DR,zR),$A=Jd("textarea",IR,NR),QA=Ll({"Text RawText":S.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":S.angleBracket,TagName:S.tagName,"MismatchedCloseTag/TagName":[S.tagName,S.invalid],AttributeName:S.attributeName,"AttributeValue UnquotedAttributeValue":S.attributeValue,Is:S.definitionOperator,"EntityReference CharacterReference":S.character,Comment:S.blockComment,ProcessingInst:S.processingInstruction,DoctypeDecl:S.documentMeta}),wA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Tag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:OA,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[QA],skippedNodes:[0],repeatNodeCount:9,tokenData:"#%g!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q$q!Q![-_![!]!!O!]!^-_!^!_!&W!_!`#$o!`!a&X!a!c-_!c!}!!O!}#R-_#R#S!!O#S#T3V#T#o!!O#o#s-_#s$f$q$f%W-_%W%o!!O%o%p-_%p&a!!O&a&b-_&b1p!!O1p4U-_4U4d!!O4d4e-_4e$IS!!O$IS$I`-_$I`$Ib!!O$Ib$Kh-_$Kh%#t!!O%#t&/x-_&/x&Et!!O&Et&FV-_&FV;'S!!O;'S;:j!&Q;:j;=`4s<%l?&r-_?&r?Ah!!O?Ah?BY$q?BY?Mn!!O?MnO$q!Z$|c`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT`POv'kw!^'k!_;'S'k;'S;=`(P<%lO'k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"")}return t}function R0(n,e){let t=n.getChild(HR);return t?e.read(t.from,t.to):" "}function sO(n,e,t){let i;for(let r of t)if(!r.attrs||r.attrs(i||(i=by(n.node.parent.firstChild,e))))return{parser:r.parser};return null}function $y(n=[],e=[]){let t=[],i=[],r=[],s=[];for(let o of n)(o.tag=="script"?t:o.tag=="style"?i:o.tag=="textarea"?r:s).push(o);let l=e.length?Object.create(null):null;for(let o of e)(l[o.name]||(l[o.name]=[])).push(o);return UC((o,f)=>{let u=o.type.id;if(u==JR)return sO(o,f,t);if(u==eA)return sO(o,f,i);if(u==tA)return sO(o,f,r);if(u==dy&&s.length){let h=o.node,O=h.firstChild,p=O&&R0(O,f),g;if(p){for(let b of s)if(b.tag==p&&(!b.attrs||b.attrs(g||(g=by(h,f))))){let Q=h.lastChild;return{parser:b.parser,overlay:[{from:O.to,to:Q.type.id==nA?Q.from:h.to}]}}}}if(l&&u==py){let h=o.node,O;if(O=h.firstChild){let p=l[f.read(O.from,O.to)];if(p)for(let g of p){if(g.tagName&&g.tagName!=R0(h.parent,f))continue;let b=h.lastChild;if(b.type.id==ud){let Q=b.from+1,$=b.lastChild,P=b.to-($&&$.isError?0:1);if(P>Q)return{parser:g.parser,overlay:[{from:Q,to:P}]}}else if(b.type.id==gy)return{parser:g.parser,overlay:[{from:b.from,to:b.to}]}}}}return null})}const yA=95,A0=1,vA=96,PA=97,U0=2,Qy=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],kA=58,_A=40,wy=95,WA=91,nc=45,xA=46,CA=35,XA=37;function Vc(n){return n>=65&&n<=90||n>=97&&n<=122||n>=161}function TA(n){return n>=48&&n<=57}const ZA=new Wr((n,e)=>{for(let t=!1,i=0,r=0;;r++){let{next:s}=n;if(Vc(s)||s==nc||s==wy||t&&TA(s))!t&&(s!=nc||r>0)&&(t=!0),i===r&&s==nc&&i++,n.advance();else{t&&n.acceptToken(s==_A?vA:i==2&&e.canShift(U0)?U0:PA);break}}}),RA=new Wr(n=>{if(Qy.includes(n.peek(-1))){let{next:e}=n;(Vc(e)||e==wy||e==CA||e==xA||e==WA||e==kA||e==nc)&&n.acceptToken(yA)}}),AA=new Wr(n=>{if(!Qy.includes(n.peek(-1))){let{next:e}=n;if(e==XA&&(n.advance(),n.acceptToken(A0)),Vc(e)){do n.advance();while(Vc(n.next));n.acceptToken(A0)}}}),UA=Ll({"AtKeyword import charset namespace keyframes media supports":S.definitionKeyword,"from to selector":S.keyword,NamespaceName:S.namespace,KeyframeName:S.labelName,KeyframeRangeName:S.operatorKeyword,TagName:S.tagName,ClassName:S.className,PseudoClassName:S.constant(S.className),IdName:S.labelName,"FeatureName PropertyName":S.propertyName,AttributeName:S.attributeName,NumberLiteral:S.number,KeywordQuery:S.keyword,UnaryQueryOp:S.operatorKeyword,"CallTag ValueName":S.atom,VariableName:S.variableName,Callee:S.operatorKeyword,Unit:S.unit,"UniversalSelector NestingSelector":S.definitionOperator,MatchOp:S.compareOperator,"ChildOp SiblingOp, LogicOp":S.logicOperator,BinOp:S.arithmeticOperator,Important:S.modifier,Comment:S.blockComment,ColorLiteral:S.color,"ParenthesizedContent StringLiteral":S.string,":":S.punctuation,"PseudoOp #":S.derefOperator,"; ,":S.separator,"( )":S.paren,"[ ]":S.squareBracket,"{ }":S.brace}),YA={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},VA={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},qA={__proto__:null,not:128,only:128},EA=_s.deserialize({version:14,states:"8`QYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ee'#EeO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#D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<%lO@}~CcSoWR~Oy%^z;'S%^;'S;=`%o<%lO%^~CrP;=`<%l@}^Cz[#]UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^XDuU]POy%^z![%^![!]EX!];'S%^;'S;=`%o<%lO%^XE`S^PoWOy%^z;'S%^;'S;=`%o<%lO%^_EqS!WVOy%^z;'S%^;'S;=`%o<%lO%^YFSSzQOy%^z;'S%^;'S;=`%o<%lO%^XFeU|POy%^z!`%^!`!aFw!a;'S%^;'S;=`%o<%lO%^XGOS|PoWOy%^z;'S%^;'S;=`%o<%lO%^XG_WOy%^z!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHO[!YPoWOy%^z}%^}!OGw!O!Q%^!Q![Gw![!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHySxPOy%^z;'S%^;'S;=`%o<%lO%^^I[SvUOy%^z;'S%^;'S;=`%o<%lO%^XIkUOy%^z#b%^#b#cI}#c;'S%^;'S;=`%o<%lO%^XJSUoWOy%^z#W%^#W#XJf#X;'S%^;'S;=`%o<%lO%^XJmS!`PoWOy%^z;'S%^;'S;=`%o<%lO%^XJ|UOy%^z#f%^#f#gJf#g;'S%^;'S;=`%o<%lO%^ZKeS!RROy%^z;'S%^;'S;=`%o<%lO%^_KvS!QVOy%^z;'S%^;'S;=`%o<%lO%^ZLXU!PPOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^WLnP;=`<%l$}",tokenizers:[RA,AA,ZA,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:96,get:n=>YA[n]||-1},{term:56,get:n=>VA[n]||-1},{term:97,get:n=>qA[n]||-1}],tokenPrec:1142});let lO=null;function oO(){if(!lO&&typeof document=="object"&&document.body){let{style:n}=document.body,e=[],t=new Set;for(let i in n)i!="cssText"&&i!="cssFloat"&&typeof n[i]=="string"&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),t.has(i)||(e.push(i),t.add(i)));lO=e.sort().map(i=>({type:"property",label:i}))}return lO||[]}const Y0=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(n=>({type:"class",label:n})),V0=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(n=>({type:"keyword",label:n})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(n=>({type:"constant",label:n}))),MA=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(n=>({type:"type",label:n})),hs=/^(\w[\w-]*|-\w[\w-]*|)$/,DA=/^-(-[\w-]*)?$/;function zA(n,e){var t;if((n.name=="("||n.type.isError)&&(n=n.parent||n),n.name!="ArgList")return!1;let i=(t=n.parent)===null||t===void 0?void 0:t.firstChild;return(i==null?void 0:i.name)!="Callee"?!1:e.sliceString(i.from,i.to)=="var"}const q0=new YQ,IA=["Declaration"];function NA(n){for(let e=n;;){if(e.type.isTop)return e;if(!(e=e.parent))return n}}function yy(n,e,t){if(e.to-e.from>4096){let i=q0.get(e);if(i)return i;let r=[],s=new Set,l=e.cursor(At.IncludeAnonymous);if(l.firstChild())do for(let o of yy(n,l.node,t))s.has(o.label)||(s.add(o.label),r.push(o));while(l.nextSibling());return q0.set(e,r),r}else{let i=[],r=new Set;return e.cursor().iterate(s=>{var l;if(t(s)&&s.matchContext(IA)&&((l=s.node.nextSibling)===null||l===void 0?void 0:l.name)==":"){let o=n.sliceString(s.from,s.to);r.has(o)||(r.add(o),i.push({label:o,type:"variable"}))}}),i}}const LA=n=>e=>{let{state:t,pos:i}=e,r=ti(t).resolveInner(i,-1),s=r.type.isError&&r.from==r.to-1&&t.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(s||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:oO(),validFor:hs};if(r.name=="ValueName")return{from:r.from,options:V0,validFor:hs};if(r.name=="PseudoClassName")return{from:r.from,options:Y0,validFor:hs};if(n(r)||(e.explicit||s)&&zA(r,t.doc))return{from:n(r)||s?r.from:i,options:yy(t.doc,NA(r),n),validFor:DA};if(r.name=="TagName"){for(let{parent:f}=r;f;f=f.parent)if(f.name=="Block")return{from:r.from,options:oO(),validFor:hs};return{from:r.from,options:MA,validFor:hs}}if(!e.explicit)return null;let l=r.resolve(i),o=l.childBefore(i);return o&&o.name==":"&&l.name=="PseudoClassSelector"?{from:i,options:Y0,validFor:hs}:o&&o.name==":"&&l.name=="Declaration"||l.name=="ArgList"?{from:i,options:V0,validFor:hs}:l.name=="Block"||l.name=="Styles"?{from:i,options:oO(),validFor:hs}:null},BA=LA(n=>n.name=="VariableName"),qc=Ws.define({name:"css",parser:EA.configure({props:[Bl.add({Declaration:Rl()}),jl.add({Block:Sr})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function jA(){return new ca(qc,qc.data.of({autocomplete:BA}))}const E0=302,M0=1,FA=2,D0=303,GA=305,HA=306,KA=3,JA=4,e9=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],vy=125,t9=59,z0=47,i9=42,n9=43,r9=45,s9=new EQ({start:!1,shift(n,e){return e==KA||e==JA||e==GA?n:e==HA},strict:!1}),l9=new Wr((n,e)=>{let{next:t}=n;(t==vy||t==-1||e.context)&&e.canShift(D0)&&n.acceptToken(D0)},{contextual:!0,fallback:!0}),o9=new Wr((n,e)=>{let{next:t}=n,i;e9.indexOf(t)>-1||t==z0&&((i=n.peek(1))==z0||i==i9)||t!=vy&&t!=t9&&t!=-1&&!e.context&&e.canShift(E0)&&n.acceptToken(E0)},{contextual:!0}),a9=new Wr((n,e)=>{let{next:t}=n;if((t==n9||t==r9)&&(n.advance(),t==n.next)){n.advance();let i=!e.context&&e.canShift(M0);n.acceptToken(i?M0:FA)}},{contextual:!0}),f9=Ll({"get set async static":S.modifier,"for while do if else switch try catch finally return throw break continue default case":S.controlKeyword,"in of await yield void typeof delete instanceof":S.operatorKeyword,"let var const function class extends":S.definitionKeyword,"import export from":S.moduleKeyword,"with debugger as new":S.keyword,TemplateString:S.special(S.string),super:S.atom,BooleanLiteral:S.bool,this:S.self,null:S.null,Star:S.modifier,VariableName:S.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":S.function(S.variableName),VariableDefinition:S.definition(S.variableName),Label:S.labelName,PropertyName:S.propertyName,PrivatePropertyName:S.special(S.propertyName),"CallExpression/MemberExpression/PropertyName":S.function(S.propertyName),"FunctionDeclaration/VariableDefinition":S.function(S.definition(S.variableName)),"ClassDeclaration/VariableDefinition":S.definition(S.className),PropertyDefinition:S.definition(S.propertyName),PrivatePropertyDefinition:S.definition(S.special(S.propertyName)),UpdateOp:S.updateOperator,LineComment:S.lineComment,BlockComment:S.blockComment,Number:S.number,String:S.string,Escape:S.escape,ArithOp:S.arithmeticOperator,LogicOp:S.logicOperator,BitOp:S.bitwiseOperator,CompareOp:S.compareOperator,RegExp:S.regexp,Equals:S.definitionOperator,Arrow:S.function(S.punctuation),": Spread":S.punctuation,"( )":S.paren,"[ ]":S.squareBracket,"{ }":S.brace,"InterpolationStart InterpolationEnd":S.special(S.brace),".":S.derefOperator,", ;":S.separator,"@":S.meta,TypeName:S.typeName,TypeDefinition:S.definition(S.typeName),"type enum interface implements namespace module declare":S.definitionKeyword,"abstract global Privacy readonly override":S.modifier,"is keyof unique infer":S.operatorKeyword,JSXAttributeValue:S.attributeValue,JSXText:S.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":S.angleBracket,"JSXIdentifier JSXNameSpacedName":S.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":S.attributeName,"JSXBuiltin/JSXIdentifier":S.standard(S.tagName)}),c9={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:221,private:221,protected:221,readonly:223,instanceof:242,satisfies:245,in:246,const:248,import:280,keyof:335,unique:339,infer:345,is:381,abstract:401,implements:403,type:405,let:408,var:410,interface:417,enum:421,namespace:427,module:429,declare:433,global:437,for:456,of:465,while:468,with:472,do:476,if:480,else:482,switch:486,case:492,try:498,catch:502,finally:506,return:510,throw:514,break:518,continue:522,debugger:526},u9={__proto__:null,async:117,get:119,set:121,declare:181,public:183,private:183,protected:183,static:185,abstract:187,override:189,readonly:195,accessor:197,new:385},h9={__proto__:null,"<":137},O9=_s.deserialize({version:14,states:"$6[O`QUOOO%QQUOOO'TQWOOP(bOSOOO*pQ(CjO'#CfO*wOpO'#CgO+VO!bO'#CgO+eO07`O'#DZO-vQUO'#DaO.WQUO'#DlO%QQUO'#DvO0[QUO'#EOOOQ(CY'#EW'#EWO0uQSO'#ETOOQO'#Ei'#EiOOQO'#Ib'#IbO0}QSO'#GkO1YQSO'#EhO1_QSO'#EhO3aQ(CjO'#JcO6QQ(CjO'#JdO6nQSO'#FWO6sQ#tO'#FoOOQ(CY'#F`'#F`O7OO&jO'#F`O7^Q,UO'#FvO8tQSO'#FuOOQ(CY'#Jd'#JdOOQ(CW'#Jc'#JcOOQQ'#KO'#KOO8yQSO'#IOO9OQ(C[O'#IPOOQQ'#JP'#JPOOQQ'#IT'#ITQ`QUOOO%QQUO'#DnO9WQUO'#DzO%QQUO'#D|O9_QSO'#GkO9dQ,UO'#ClO9rQSO'#EgO9}QSO'#ErO:SQ,UO'#F_O:qQSO'#GkO:vQSO'#GoO;RQSO'#GoO;aQSO'#GrO;aQSO'#GsO;aQSO'#GuO9_QSO'#GxOQQSO'#HnO>VQ(C]O'#HtO%QQUO'#HvO>bQ(C]O'#HxO>mQ(C]O'#HzO9OQ(C[O'#H|O>xQ(CjO'#CfO?zQWO'#DfQOQSOOO@bQSO'#EPO9dQ,UO'#EgO@mQSO'#EgO@xQ`O'#F_OOQQ'#Cd'#CdOOQ(CW'#Dk'#DkOOQ(CW'#Jg'#JgO%QQUO'#JgOOQO'#Jk'#JkOO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#OR;Q;^R#WWR&{!cY!qQ'Q,}0u4pS&w!c,uQ']!oS'g!r!uS'i!v4rS,r&x'PS-^'^'_Q-`'`Q1{,{R2Z-_R(k#tR(n#uQ!dQT,|'Q,}]!nQ!o'Q,}0u4pQ#l]R'Z9mT#gZ%ZS#fZ%ZU%y|},ZU(W#d#e#hS-r(X(YQ-v(ZQ0h+hQ2`-sU2a-t-u-wS5v2b2cR7u5w`#YW#S#V%v't'}+e-mt#cZ|}#d#e#h%Z(X(Y(Z+h-s-t-u-w2b2c5wQ1_,ZQ1r,oQ5e1jQ7m5fT:x&y+fT#]W%vS#[W%vS'u#S'}S'z#V+eS,t&y+fT-h't-mT'O!c%wQ$hfR)j$mT)_$h)`R3Z.kT*O$u*QR*W$xQ/}*zQ2e.OQ4s0wQ5{2iQ7X4vQ7x5zQ8e7WQ8w7wQ9W8gQ9`8yQ9e9XR9h9alpOXr!X#`%]&d&f&g&i,],b1b1eQ&^!TR,Q&ZV%z|},ZR0q+qR,P&XQ%szR+c%tR+X%nT&b!U&eT&c!U&eT1d,b1e",nodeNames:"⚠ ArithOp ArithOp LineComment BlockComment Script ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:364,context:s9,nodeProps:[["group",-26,6,14,16,62,199,203,206,207,209,212,215,225,227,233,235,237,239,242,248,254,256,258,260,262,264,265,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,103,104,113,114,131,134,136,137,138,139,141,142,162,163,165,"Expression",-23,24,26,30,34,36,38,166,168,170,171,173,174,175,177,178,179,181,182,183,193,195,197,198,"Type",-3,84,96,102,"ClassItem"],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tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(T~~",141,326),new JO("j~RQYZXz{^~^O'q~~aP!P!Qd~iO'r~~",25,308)],topRules:{Script:[0,5],SingleExpression:[1,266],SingleClassItem:[2,267]},dialects:{jsx:12686,ts:12688},dynamicPrecedences:{76:1,78:1,163:1,191:1},specialized:[{term:312,get:n=>c9[n]||-1},{term:328,get:n=>u9[n]||-1},{term:67,get:n=>h9[n]||-1}],tokenPrec:12712}),d9=[sr("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),sr("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),sr("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),sr("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),sr("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),sr(`try { + opacity: ${f-h*$}`}}const kC=n=>({}),U1=n=>({});function Y1(n){let e,t,i,r,s,l,o,f,u,h,O,p,g,b,Q,$,P,x;const A=n[6].default,C=ln(A,n,n[5],null),X=n[6].footer,Z=ln(X,n,n[5],U1),I=Z||_C(n);return{c(){e=_("form"),t=_("div"),i=B(),r=_("div"),s=_("header"),l=_("p"),o=be(n[0]),f=B(),u=_("button"),h=B(),O=_("section"),C&&C.c(),p=B(),g=_("footer"),I&&I.c(),y(t,"class","modal-background"),y(l,"class","modal-card-title"),y(u,"type","button"),y(u,"class","delete"),y(u,"aria-label","close"),y(s,"class","modal-card-head"),y(O,"class","modal-card-body"),y(g,"class","modal-card-foot"),y(r,"class","modal-card"),y(e,"tabindex","0"),y(e,"class","modal is-active")},m(q,L){V(q,e,L),v(e,t),v(e,i),v(e,r),v(r,s),v(s,l),v(l,o),v(s,f),v(s,u),v(r,h),v(r,O),C&&C.m(O,null),v(r,p),v(r,g),I&&I.m(g,null),n[7](e),$=!0,P||(x=[oe(t,"click",n[4]),oe(u,"click",n[4]),oe(e,"submit",Fb(n[8]))],P=!0)},p(q,L){(!$||L&1)&&Je(o,q[0]),C&&C.p&&(!$||L&32)&&an(C,A,q,q[5],$?on(A,q[5],L,null):fn(q[5]),null),Z&&Z.p&&(!$||L&32)&&an(Z,X,q,q[5],$?on(X,q[5],L,kC):fn(q[5]),U1)},i(q){$||(D(C,q),D(I,q),q&&lr(()=>{$&&(b||(b=yl(r,Sc,{y:-200,duration:200},!0)),b.run(1))}),q&&lr(()=>{$&&(Q||(Q=yl(e,A1,{duration:200},!0)),Q.run(1))}),$=!0)},o(q){F(C,q),F(I,q),q&&(b||(b=yl(r,Sc,{y:-200,duration:200},!1)),b.run(0)),q&&(Q||(Q=yl(e,A1,{duration:200},!1)),Q.run(0)),$=!1},d(q){q&&Y(e),C&&C.d(q),I&&I.d(q),q&&b&&b.end(),n[7](null),q&&Q&&Q.end(),P=!1,ti(x)}}}function _C(n){let e,t,i;return{c(){e=_("button"),e.textContent="Cancel",y(e,"class","button")},m(r,s){V(r,e,s),t||(i=oe(e,"click",n[4]),t=!0)},p:We,d(r){r&&Y(e),t=!1,i()}}}function WC(n){let e,t,i=n[1]&&Y1(n);return{c(){i&&i.c(),e=fi()},m(r,s){i&&i.m(r,s),V(r,e,s),t=!0},p(r,[s]){r[1]?i?(i.p(r,s),s&2&&D(i,1)):(i=Y1(r),i.c(),D(i,1),i.m(e.parentNode,e)):i&&(nt(),F(i,1,1,()=>{i=null}),rt())},i(r){t||(D(i),t=!0)},o(r){F(i),t=!1},d(r){r&&Y(e),i&&i.d(r)}}}function xC(n,e,t){let{$$slots:i={},$$scope:r}=e,{title:s}=e,{active:l=!1}=e;const o=Ln();let f;async function u(g){g&&(await rr(),f&&f.focus(),o("activate"))}function h(){o("cancel")}function O(g){Dt[g?"unshift":"push"](()=>{f=g,t(2,f)})}const p=()=>o("submit");return n.$$set=g=>{"title"in g&&t(0,s=g.title),"active"in g&&t(1,l=g.active),"$$scope"in g&&t(5,r=g.$$scope)},n.$$.update=()=>{n.$$.dirty&2&&u(l)},[s,l,f,o,h,r,i,O,p]}class ql extends Ui{constructor(e){super(),Ai(this,e,xC,WC,Ri,{title:0,active:1})}}const AQ=1024;let CC=0;class Mn{constructor(e,t){this.from=e,this.to=t}}class tt{constructor(e={}){this.id=CC++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Ji.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}tt.closedBy=new tt({deserialize:n=>n.split(" ")});tt.openedBy=new tt({deserialize:n=>n.split(" ")});tt.group=new tt({deserialize:n=>n.split(" ")});tt.contextHash=new tt({perNode:!0});tt.lookAhead=new tt({perNode:!0});tt.mounted=new tt({perNode:!0});class XC{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}}const TC=Object.create(null);class Ji{constructor(e,t,i,r=0){this.name=e,this.props=t,this.id=i,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):TC,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new Ji(e.name||"",t,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(tt.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let r of i.split(" "))t[r]=e[i];return i=>{for(let r=i.prop(tt.group),s=-1;s<(r?r.length:0);s++){let l=t[s<0?i.name:r[s]];if(l)return l}}}}Ji.none=new Ji("",Object.create(null),0,8);class Xd{constructor(e){this.types=e;for(let t=0;t=r&&(l.type.isAnonymous||t(l)!==!1)){if(l.firstChild())continue;o=!0}for(;o&&i&&!l.type.isAnonymous&&i(l),!l.nextSibling();){if(!l.parent())return;o=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Rd(Ji.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,r)=>new Ht(this.type,t,i,r,this.propValues),e.makeTree||((t,i,r)=>new Ht(Ji.none,t,i,r)))}static build(e){return RC(e)}}Ht.empty=new Ht(Ji.none,[],[],0);class Td{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Td(this.buffer,this.index)}}class il{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return Ji.none}toString(){let e=[];for(let t=0;t0));f=l[f+3]);return o}slice(e,t,i){let r=this.buffer,s=new Uint16Array(t-e),l=0;for(let o=e,f=0;o=e&&te;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function YQ(n,e){let t=n.childBefore(e);for(;t;){let i=t.lastChild;if(!i||i.to!=t.to)break;i.type.isError&&i.from==i.to?(n=t,t=i.prevSibling):t=i}return n}function El(n,e,t,i){for(var r;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?o.length:-1;e!=u;e+=t){let h=o[e],O=f[e]+l.from;if(UQ(r,i,O,O+h.length)){if(h instanceof il){if(s&Ut.ExcludeBuffers)continue;let p=h.findChild(0,h.buffer.length,t,i-O,r);if(p>-1)return new yr(new ZC(l,h,e,O),null,p)}else if(s&Ut.IncludeAnonymous||!h.type.isAnonymous||Zd(h)){let p;if(!(s&Ut.IgnoreMounts)&&h.props&&(p=h.prop(tt.mounted))&&!p.overlay)return new In(p.tree,O,e,l);let g=new In(h,O,e,l);return s&Ut.IncludeAnonymous||!g.type.isAnonymous?g:g.nextChild(t<0?h.children.length-1:0,t,i,r)}}}if(s&Ut.IncludeAnonymous||!l.type.isAnonymous||(l.index>=0?e=l.index+t:e=t<0?-1:l._parent._tree.children.length,l=l._parent,!l))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let r;if(!(i&Ut.IgnoreOverlays)&&(r=this._tree.prop(tt.mounted))&&r.overlay){let s=e-this.from;for(let{from:l,to:o}of r.overlay)if((t>0?l<=s:l=s:o>s))return new In(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}cursor(e=0){return new ta(this,e)}get tree(){return this._tree}toTree(){return this._tree}resolve(e,t=0){return El(this,e,t,!1)}resolveInner(e,t=0){return El(this,e,t,!0)}enterUnfinishedNodesBefore(e){return YQ(this,e)}getChild(e,t=null,i=null){let r=bc(this,e,t,i);return r.length?r[0]:null}getChildren(e,t=null,i=null){return bc(this,e,t,i)}toString(){return this._tree.toString()}get node(){return this}matchContext(e){return $c(this,e)}}function bc(n,e,t,i){let r=n.cursor(),s=[];if(!r.firstChild())return s;if(t!=null){for(;!r.type.is(t);)if(!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function $c(n,e,t=e.length-1){for(let i=n.parent;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class ZC{constructor(e,t,i,r){this.parent=e,this.buffer=t,this.index=i,this.start=r}}class yr{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,i);return s<0?null:new yr(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&Ut.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new yr(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new yr(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new yr(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}cursor(e=0){return new ta(this,e)}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let l=i.buffer[this.index+1];e.push(i.slice(r,s,l)),t.push(0)}return new Ht(this.type,e,t,this.to-this.from)}resolve(e,t=0){return El(this,e,t,!1)}resolveInner(e,t=0){return El(this,e,t,!0)}enterUnfinishedNodesBefore(e){return YQ(this,e)}toString(){return this.context.buffer.childString(this.index)}getChild(e,t=null,i=null){let r=bc(this,e,t,i);return r.length?r[0]:null}getChildren(e,t=null,i=null){return bc(this,e,t,i)}get node(){return this}matchContext(e){return $c(this,e)}}class ta{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof In)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof In?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&Ut.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Ut.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Ut.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:r}=this;if(r){if(e>0){if(this.index-1)for(let s=t+e,l=e<0?-1:i._tree.children.length;s!=l;s+=e){let o=i._tree.children[s];if(this.mode&Ut.IncludeAnonymous||o instanceof il||!o.type.isAnonymous||Zd(o))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let l=e;l;l=l._parent)if(l.index==r){if(r==this.index)return l;t=l,i=s+1;break e}r=this.stack[--s]}for(let r=i;r=0;s--){if(s<0)return $c(this.node,e,r);let l=i[t.buffer[this.stack[s]]];if(!l.isAnonymous){if(e[r]&&e[r]!=l.name)return!1;r--}}return!0}}function Zd(n){return n.children.some(e=>e instanceof il||!e.type.isAnonymous||Zd(e))}function RC(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:r=AQ,reused:s=[],minRepeatType:l=i.types.length}=n,o=Array.isArray(t)?new Td(t,t.length):t,f=i.types,u=0,h=0;function O(C,X,Z,I,q){let{id:L,start:z,end:te,size:ue}=o,$e=h;for(;ue<0;)if(o.next(),ue==-1){let Re=s[L];Z.push(Re),I.push(z-C);return}else if(ue==-3){u=L;return}else if(ue==-4){h=L;return}else throw new RangeError(`Unrecognized record size: ${ue}`);let Se=f[L],Xe,de,ce=z-C;if(te-z<=r&&(de=Q(o.pos-X,q))){let Re=new Uint16Array(de.size-de.skip),xe=o.pos-de.size,Ce=Re.length;for(;o.pos>xe;)Ce=$(de.start,Re,Ce);Xe=new il(Re,te-de.start,i),ce=de.start-C}else{let Re=o.pos-ue;o.next();let xe=[],Ce=[],Ee=L>=l?L:-1,Pt=0,ii=te;for(;o.pos>Re;)Ee>=0&&o.id==Ee&&o.size>=0?(o.end<=ii-r&&(g(xe,Ce,z,Pt,o.end,ii,Ee,$e),Pt=xe.length,ii=o.end),o.next()):O(z,Re,xe,Ce,Ee);if(Ee>=0&&Pt>0&&Pt-1&&Pt>0){let Tt=p(Se);Xe=Rd(Se,xe,Ce,0,xe.length,0,te-z,Tt,Tt)}else Xe=b(Se,xe,Ce,te-z,$e-te)}Z.push(Xe),I.push(ce)}function p(C){return(X,Z,I)=>{let q=0,L=X.length-1,z,te;if(L>=0&&(z=X[L])instanceof Ht){if(!L&&z.type==C&&z.length==I)return z;(te=z.prop(tt.lookAhead))&&(q=Z[L]+z.length+te)}return b(C,X,Z,I,q)}}function g(C,X,Z,I,q,L,z,te){let ue=[],$e=[];for(;C.length>I;)ue.push(C.pop()),$e.push(X.pop()+Z-q);C.push(b(i.types[z],ue,$e,L-q,te-L)),X.push(q-Z)}function b(C,X,Z,I,q=0,L){if(u){let z=[tt.contextHash,u];L=L?[z].concat(L):[z]}if(q>25){let z=[tt.lookAhead,q];L=L?[z].concat(L):[z]}return new Ht(C,X,Z,I,L)}function Q(C,X){let Z=o.fork(),I=0,q=0,L=0,z=Z.end-r,te={size:0,start:0,skip:0};e:for(let ue=Z.pos-C;Z.pos>ue;){let $e=Z.size;if(Z.id==X&&$e>=0){te.size=I,te.start=q,te.skip=L,L+=4,I+=4,Z.next();continue}let Se=Z.pos-$e;if($e<0||Se=l?4:0,de=Z.start;for(Z.next();Z.pos>Se;){if(Z.size<0)if(Z.size==-3)Xe+=4;else break e;else Z.id>=l&&(Xe+=4);Z.next()}q=de,I+=$e,L+=Xe}return(X<0||I==C)&&(te.size=I,te.start=q,te.skip=L),te.size>4?te:void 0}function $(C,X,Z){let{id:I,start:q,end:L,size:z}=o;if(o.next(),z>=0&&I4){let ue=o.pos-(z-4);for(;o.pos>ue;)Z=$(C,X,Z)}X[--Z]=te,X[--Z]=L-C,X[--Z]=q-C,X[--Z]=I}else z==-3?u=I:z==-4&&(h=I);return Z}let P=[],x=[];for(;o.pos>0;)O(n.start||0,n.bufferStart||0,P,x,-1);let A=(e=n.length)!==null&&e!==void 0?e:P.length?x[0]+P[0].length:0;return new Ht(f[n.topID],P.reverse(),x.reverse(),A)}const q1=new WeakMap;function nc(n,e){if(!n.isAnonymous||e instanceof il||e.type!=n)return 1;let t=q1.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof Ht)){t=1;break}t+=nc(n,i)}q1.set(e,t)}return t}function Rd(n,e,t,i,r,s,l,o,f){let u=0;for(let b=i;b=h)break;Z+=I}if(A==C+1){if(Z>h){let I=b[C];g(I.children,I.positions,0,I.children.length,Q[C]+x);continue}O.push(b[C])}else{let I=Q[A-1]+b[A-1].length-X;O.push(Rd(n,b,Q,C,A,X,I,null,f))}p.push(X+x-s)}}return g(e,t,i,r,0),(o||f)(O,p,l)}class VQ{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof yr?this.setBuffer(e.context.buffer,e.index,t):e instanceof In&&this.map.set(e.tree,t)}get(e){return e instanceof yr?this.getBuffer(e.context.buffer,e.index):e instanceof In?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Lr{constructor(e,t,i,r,s=!1,l=!1){this.from=e,this.to=t,this.tree=i,this.offset=r,this.open=(s?1:0)|(l?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let r=[new Lr(0,e.length,e,0,!1,i)];for(let s of t)s.to>e.length&&r.push(s);return r}static applyChanges(e,t,i=128){if(!t.length)return e;let r=[],s=1,l=e.length?e[0]:null;for(let o=0,f=0,u=0;;o++){let h=o=i)for(;l&&l.from=p.from||O<=p.to||u){let g=Math.max(p.from,f)-u,b=Math.min(p.to,O)-u;p=g>=b?null:new Lr(g,b,p.tree,p.offset+u,o>0,!!h)}if(p&&r.push(p),l.to>O)break;l=snew Mn(r.from,r.to)):[new Mn(0,0)]:[new Mn(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let r=this.startParse(e,t,i);for(;;){let s=r.advance();if(s)return s}}}class AC{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function UC(n){return(e,t,i,r)=>new VC(e,n,t,i,r)}class E1{constructor(e,t,i,r,s){this.parser=e,this.parse=t,this.overlay=i,this.target=r,this.ranges=s}}class YC{constructor(e,t,i,r,s,l,o){this.parser=e,this.predicate=t,this.mounts=i,this.index=r,this.start=s,this.target=l,this.prev=o,this.depth=0,this.ranges=[]}}const ed=new tt({perNode:!0});class VC{constructor(e,t,i,r,s){this.nest=t,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new Ht(i.type,i.children,i.positions,i.length,i.propValues.concat([[ed,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[tt.mounted.id]=new XC(t,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;th.frag.from<=r.from&&h.frag.to>=r.to&&h.mount.overlay);if(u)for(let h of u.mount.overlay){let O=h.from+u.pos,p=h.to+u.pos;O>=r.from&&p<=r.to&&!t.ranges.some(g=>g.fromO)&&t.ranges.push({from:O,to:p})}}o=!1}else if(i&&(l=qC(i.ranges,r.from,r.to)))o=l!=2;else if(!r.type.isAnonymous&&r.fromnew Mn(O.from-r.from,O.to-r.from)):null,r.tree,h)),s.overlay?h.length&&(i={ranges:h,depth:0,prev:i}):o=!1}}else t&&(f=t.predicate(r))&&(f===!0&&(f=new Mn(r.from,r.to)),f.fromnew Mn(h.from-t.start,h.to-t.start)),t.target,u)),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function qC(n,e,t){for(let i of n){if(i.from>=t)break;if(i.to>e)return i.from<=e&&i.to>=t?2:1}return 0}function M1(n,e,t,i,r,s){if(e=e.to);i++);let l=r.children[i],o=l.buffer;function f(u,h,O,p,g){let b=u;for(;o[b+2]+s<=e.from;)b=o[b+3];let Q=[],$=[];M1(l,u,b,Q,$,p);let P=o[b+1],x=o[b+2],A=P+s==e.from&&x+s==e.to&&o[b]==e.type.id;return Q.push(A?e.toTree():f(b+4,o[b+3],l.set.types[o[b]],P,x-P)),$.push(P-p),M1(l,o[b+3],h,Q,$,p),new Ht(O,Q,$,g)}r.children[i]=f(0,o.length,Ji.none,0,l.length);for(let u=0;u<=t;u++)n.childAfter(e.from)}class D1{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(Ut.IncludeAnonymous|Ut.IgnoreMounts)}moveTo(e){let{cursor:t}=this,i=e-this.offset;for(;!this.done&&t.from=e&&t.enter(i,1,Ut.IgnoreOverlays|Ut.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof Ht)t=t.children[0];else break}return!1}}let MC=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(t=i.tree.prop(ed))!==null&&t!==void 0?t:i.to,this.inner=new D1(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(ed))!==null&&e!==void 0?e:t.to,this.inner=new D1(t.tree,-t.offset)}}findMounts(e,t){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let l=(i=s.tree)===null||i===void 0?void 0:i.prop(tt.mounted);if(l&&l.parser==t)for(let o=this.fragI;o=s.to)break;f.tree==this.curFrag.tree&&r.push({frag:f,pos:s.from-f.offset,mount:l})}}}return r}};function z1(n,e){let t=null,i=e;for(let r=1,s=0;r=o)break;f.to<=l||(t||(i=t=e.slice()),f.fromo&&t.splice(s+1,0,new Mn(o,f.to))):f.to>o?t[s--]=new Mn(o,f.to):t.splice(s--,1))}}return i}function DC(n,e,t,i){let r=0,s=0,l=!1,o=!1,f=-1e9,u=[];for(;;){let h=r==n.length?1e9:l?n[r].to:n[r].from,O=s==e.length?1e9:o?e[s].to:e[s].from;if(l!=o){let p=Math.max(f,t),g=Math.min(h,O,i);pnew Mn(p.from+i,p.to+i)),O=DC(e,h,f,u);for(let p=0,g=f;;p++){let b=p==O.length,Q=b?u:O[p].from;if(Q>g&&t.push(new Lr(g,Q,r.tree,-l,s.from>=g||s.openStart,s.to<=Q||s.openEnd)),b)break;g=O[p].to}}else t.push(new Lr(f,u,r.tree,-l,s.from>=l||s.openStart,s.to<=o||s.openEnd))}return t}class Qc{constructor(e,t,i,r,s,l,o,f,u,h=0,O){this.p=e,this.stack=t,this.state=i,this.reducePos=r,this.pos=s,this.score=l,this.buffer=o,this.bufferBase=f,this.curContext=u,this.lookAhead=h,this.parent=O}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,i=0){let r=e.parser.context;return new Qc(e,[],t,i,i,0,[],0,r?new N1(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let i=e>>19,r=e&65535,{parser:s}=this.p,l=s.dynamicPrecedence(r);if(l&&(this.score+=l),i==0){this.pushState(s.getGoto(this.state,r,!0),this.reducePos),r=2e3&&!(!((t=this.p.parser.nodeSet.types[r])===null||t===void 0)&&t.isAnonymous)&&(f==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizeo;)this.stack.pop();this.reduceContext(r,f)}storeNode(e,t,i,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&l.buffer[o-4]==0&&l.buffer[o-1]>-1){if(t==i)return;if(l.buffer[o-2]>=t){l.buffer[o-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(e,t,i,r);else{let l=this.buffer.length;if(l>0&&this.buffer[l-4]!=0)for(;l>0&&this.buffer[l-2]>i;)this.buffer[l]=this.buffer[l-4],this.buffer[l+1]=this.buffer[l-3],this.buffer[l+2]=this.buffer[l-2],this.buffer[l+3]=this.buffer[l-1],l-=4,r>4&&(r-=4);this.buffer[l]=e,this.buffer[l+1]=t,this.buffer[l+2]=i,this.buffer[l+3]=r}}shift(e,t,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,r,4);else{let s=e,{parser:l}=this.p;(r>this.pos||t<=l.maxNode)&&(this.pos=r,l.stateFlag(s,1)||(this.reducePos=r)),this.pushState(s,i),this.shiftContext(t,i),t<=l.maxNode&&this.buffer.push(t,i,r,4)}}apply(e,t,i,r){e&65536?this.reduce(e):this.shift(e,t,i,r)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let i=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new Qc(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new zC(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(i==0)return!1;if(!(i&65536))return!0;t.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let r=[];for(let s=0,l;sf&1&&o==l)||r.push(t[s],l)}t=r}let i=[];for(let r=0;r>19,r=t&65535,s=this.stack.length-i*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let l=this.findForcedReduction();if(l==null)return!1;t=l}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],i=(r,s)=>{if(!t.includes(r))return t.push(r),e.allActions(r,l=>{if(!(l&393216))if(l&65536){let o=(l>>19)-s;if(o>1){let f=l&65535,u=this.stack.length-o*3;if(u>=0&&e.getGoto(this.stack[u],f,!1)>=0)return o<<19|65536|f}}else{let o=i(l,s+1);if(o!=null)return o}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class N1{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class zC{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}class wc{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new wc(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new wc(this.stack,this.pos,this.index)}}function Ro(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let i=0,r=0;i=92&&l--,l>=34&&l--;let f=l-32;if(f>=46&&(f-=46,o=!0),s+=f,o)break;s*=46}t?t[r++]=s:t=new e(s)}return t}class rc{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const L1=new rc;class IC{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=L1,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let i=this.range,r=this.rangeIndex,s=this.pos+e;for(;si.to:s>=i.to;){if(r==this.ranges.length-1)return null;let l=this.ranges[++r];s+=l.from-i.to,i=l}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,i,r;if(t>=0&&t=this.chunk2Pos&&io.to&&(this.chunk2=this.chunk2.slice(0,o.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=L1,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let i="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return i}}class Rl{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:i}=t.p;EQ(this.data,e,t,this.id,i.data,i.tokenPrecTable)}}Rl.prototype.contextual=Rl.prototype.fallback=Rl.prototype.extend=!1;class td{constructor(e,t,i){this.precTable=t,this.elseToken=i,this.data=typeof e=="string"?Ro(e):e}token(e,t){let i=e.pos,r=0;for(;;){let s=e.next<0,l=e.resolveOffset(1,1);if(EQ(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,l==null)break;e.reset(l,e.token)}r&&(e.reset(i,e.token),e.acceptToken(this.elseToken,r))}}td.prototype.contextual=Rl.prototype.fallback=Rl.prototype.extend=!1;class xr{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function EQ(n,e,t,i,r,s){let l=0,o=1<0){let b=n[g];if(f.allows(b)&&(e.token.value==-1||e.token.value==b||NC(b,e.token.value,r,s))){e.acceptToken(b);break}}let h=e.next,O=0,p=n[l+2];if(e.next<0&&p>O&&n[u+p*3-3]==65535){l=n[u+p*3-1];continue e}for(;O>1,b=u+g+(g<<1),Q=n[b],$=n[b+1]||65536;if(h=$)O=g+1;else{l=n[b+2],e.advance();continue e}}break}}function B1(n,e,t){for(let i=e,r;(r=n[i])!=65535;i++)if(r==t)return i-e;return-1}function NC(n,e,t,i){let r=B1(t,i,e);return r<0||B1(t,i,n)e)&&!i.type.isError)return t<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(n.length,Math.max(i.from+1,e+25));if(t<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return t<0?0:n.length}}class LC{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?j1(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?j1(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=l,null;if(s instanceof Ht){if(l==e){if(l=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(l),this.index.push(0))}else this.index[t]++,this.nextStart=l+s.length}}}class BC{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new rc)}getActions(e){let t=0,i=null,{parser:r}=e.p,{tokenizers:s}=r,l=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,f=0;for(let u=0;uO.end+25&&(f=Math.max(O.lookAhead,f)),O.value!=0)){let p=t;if(O.extended>-1&&(t=this.addActions(e,O.extended,O.end,t)),t=this.addActions(e,O.value,O.end,t),!h.extend&&(i=O,t>p))break}}for(;this.actions.length>t;)this.actions.pop();return f&&e.setLookAhead(f),!i&&e.pos==this.stream.end&&(i=new rc,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new rc,{pos:i,p:r}=e;return t.start=i,t.end=Math.min(i+1,r.stream.end),t.value=i==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,i){let r=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(r,e),i),e.value>-1){let{parser:s}=i.p;for(let l=0;l=0&&i.p.parser.dialect.allows(o>>1)){o&1?e.extended=o>>1:e.value=o>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,i,r){for(let s=0;se.bufferLength*4?new LC(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,i=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[l]=e;for(;l.forceReduce()&&l.stack.length&&l.stack[l.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let l=0;lt)i.push(o);else{if(this.advanceStack(o,i,e))continue;{r||(r=[],s=[]),r.push(o);let f=this.tokens.getMainToken(o);s.push(f.value,f.end)}}break}}if(!i.length){let l=r&&GC(r);if(l)return bn&&console.log("Finish with "+this.stackID(l)),this.stackToTree(l);if(this.parser.strict)throw bn&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&r){let l=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,i);if(l)return bn&&console.log("Force-finish "+this.stackID(l)),this.stackToTree(l.forceAll())}if(this.recovering){let l=this.recovering==1?1:this.recovering*3;if(i.length>l)for(i.sort((o,f)=>f.score-o.score);i.length>l;)i.pop();i.some(o=>o.reducePos>t)&&this.recovering--}else if(i.length>1){e:for(let l=0;l500&&u.buffer.length>500)if((o.score-u.score||o.buffer.length-u.buffer.length)>0)i.splice(f--,1);else{i.splice(l--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let l=1;l ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,h=u?e.curContext.hash:0;for(let O=this.fragments.nodeAt(r);O;){let p=this.parser.nodeSet.types[O.type.id]==O.type?s.getGoto(e.state,O.type.id):-1;if(p>-1&&O.length&&(!u||(O.prop(tt.contextHash)||0)==h))return e.useNode(O,p),bn&&console.log(l+this.stackID(e)+` (via reuse of ${s.getName(O.type.id)})`),!0;if(!(O instanceof Ht)||O.children.length==0||O.positions[0]>0)break;let g=O.children[0];if(g instanceof Ht&&O.positions[0]==0)O=g;else break}}let o=s.stateSlot(e.state,4);if(o>0)return e.reduce(o),bn&&console.log(l+this.stackID(e)+` (via always-reduce ${s.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let f=this.tokens.getActions(e);for(let u=0;ur?t.push(b):i.push(b)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return F1(e,t),!0}}runRecovery(e,t,i){let r=null,s=!1;for(let l=0;l ":"";if(o.deadEnd&&(s||(s=!0,o.restart(),bn&&console.log(h+this.stackID(o)+" (restarted)"),this.advanceFully(o,i))))continue;let O=o.split(),p=h;for(let g=0;O.forceReduce()&&g<10&&(bn&&console.log(p+this.stackID(O)+" (via force-reduce)"),!this.advanceFully(O,i));g++)bn&&(p=this.stackID(O)+" -> ");for(let g of o.recoverByInsert(f))bn&&console.log(h+this.stackID(g)+" (via recover-insert)"),this.advanceFully(g,i);this.stream.end>o.pos?(u==o.pos&&(u++,f=0),o.recoverByDelete(f,u),bn&&console.log(h+this.stackID(o)+` (via recover-delete ${this.parser.getName(f)})`),F1(o,i)):(!r||r.scoren;class MQ{constructor(e){this.start=e.start,this.shift=e.shift||jh,this.reduce=e.reduce||jh,this.reuse=e.reuse||jh,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class _s extends qQ{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let o=0;oe.topRules[o][1]),r=[];for(let o=0;o=0)s(h,f,o[u++]);else{let O=o[u+-h];for(let p=-h;p>0;p--)s(o[u++],f,O);u++}}}this.nodeSet=new Xd(t.map((o,f)=>Ji.define({name:f>=this.minRepeatTerm?void 0:o,id:f,props:r[f],top:i.indexOf(f)>-1,error:f==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(f)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=AQ;let l=Ro(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let o=0;otypeof o=="number"?new Rl(l,o):o),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,i){let r=new jC(this,e,t,i);for(let s of this.wrappers)r=s(r,e,t,i);return r}getGoto(e,t,i=!1){let r=this.goto;if(t>=r[0])return-1;for(let s=r[t+1];;){let l=r[s++],o=l&1,f=r[s++];if(o&&i)return f;for(let u=s+(l>>1);s0}validAction(e,t){return!!this.allActions(e,i=>i==t?!0:null)}allActions(e,t){let i=this.stateSlot(e,4),r=i?t(i):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=Ir(this.data,s+2);else break;r=t(Ir(this.data,s+1))}return r}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=Ir(this.data,i+2);else break;if(!(this.data[i+2]&1)){let r=this.data[i+1];t.some((s,l)=>l&1&&s==r)||t.push(this.data[i],r)}}return t}configure(e){let t=Object.assign(Object.create(_s.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(s=>s.from==i);return r?r.to:i})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((i,r)=>{let s=e.specializers.find(o=>o.from==i.external);if(!s)return i;let l=Object.assign(Object.assign({},i),{external:s.to});return t.specializers[r]=G1(l),l})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map(()=>!1);if(e)for(let s of e.split(" ")){let l=t.indexOf(s);l>=0&&(i[l]=!0)}let r=null;for(let s=0;si)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scoren.external(t,i)<<1|e}return n.get}const HC={__proto__:null,annotation:12,array:20,var:24,par:26,opt:28,ann:32,bool:34,float:36,int:38,string:40,_:50,true:62,false:64,infinity:68,"∅":74,in:92,where:94,if:98,then:100,elseif:102,else:104,endif:106,xor:110,subset:112,superset:114,union:116,diff:118,symdiff:120,intersect:122,div:124,mod:126,default:128,let:132,constraint:140,not:144,"¬":146,any:170,of:172,set:176,tuple:180,record:184,op:190,enum:198,function:202,solve:206,satisfy:208,maximize:210,minimize:212,include:216,output:220,predicate:224,test:226,type:230},KC=_s.deserialize({version:14,states:"!0jQ]QPOOOOQO'#F]'#F]O&XQPO'#CvO&`QPO'#CxOOQO'#C}'#C}O&g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Keyword ArrayLiteral2d ArrayLiteral2dRow ArrayLiteral ArrayLiteralMember BooleanLiteral Keyword Keyword Infinity Keyword Number EmptySet Keyword SetLiteral StringLiteral Interpolation TupleLiteral RecordLiteral RecordMember ArrayComprehension Generator Keyword Keyword IfThenElse Keyword Keyword Keyword Keyword Keyword InfixOperator Keyword Keyword Keyword Keyword Keyword Keyword Keyword Keyword Keyword Keyword LetExpression Keyword LetItems Declaration Constraint Keyword PrefixOperator Keyword Keyword PostfixOperator SetComprehension Call Application GeneratorCall GeneratorCallGenerators ParenthesisedExpression IndexedAccess TupleAccess Number RecordAccess Keyword Keyword SetType Keyword TupleType Keyword RecordType Keyword RecordTypeField OperationType Keyword AnyType Assignment Enumeration Keyword FunctionItem Keyword Goal Keyword Keyword Keyword Keyword Include Keyword Output Keyword Predicate Keyword Keyword TypeAlias Keyword",maxTerm:210,skippedNodes:[0,1,2],repeatNodeCount:19,tokenData:"!8_~R!oOX&SXY&qYZ'nZ]&S]^&q^p&Spq&qqr(Prs)Xsu&Suv)^vw&Swx*lxy,ryz-]z{-v{|.a|}/k}!O0U!O!P1`!P!Q3Z!Q!R9g!R![@|![!]Bz!]!^DU!^!_Do!_!`Is!`!aJ}!a!c&S!c!}LX!}#OM[#O#PNf#P#Q!#p#Q#R!$Z#R#SLX#S#T&S#T#oLX#o#p!$t#p#q!%_#q#r!&f#r#s!'P#s%#t&S%#t%#u!.O%#u%#v&S%#v%#w!.i%#w%%W&S%%W%%X!/S%%X%%Y&S%%Y%%Z!/m%%Z%%[&S%%[%%]!0W%%]%&b&S%&b%&c!0q%&c%&p&S%&p%&q!1[%&q%&x&S%&x%&y!1u%&y%'R&S%'R%'S!2`%'S%'T!2y%'T%'U!3d%'U%'V!3}%'V%(^&S%(^%(_!4h%(_%(b&S%(b%(c!5R%(c%(d!5l%(d%)U&S%)U%)V!6V%)V%)W!6p%)W%*]&S%*]%*^!7Z%*^%Gc&S%Gc%Gd!7t%Gd;'S&S;'S;=`&k<%lO&SQ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;class $r{constructor(e,t,i){this.set=e,this.base=t,this.modified=i,this.id=JC++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let t=new $r([],null,[]);if(t.set.push(t),e)for(let i of e.set)t.set.push(i);return t}static defineModifier(){let e=new yc;return t=>t.modified.indexOf(e)>-1?t:yc.get(t.base||t,t.modified.concat(e).sort((i,r)=>i.id-r.id))}}let eX=0;class yc{constructor(){this.instances=[],this.id=eX++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(o=>o.base==e&&tX(t,o.modified));if(i)return i;let r=[],s=new $r(r,e,t);for(let o of t)o.instances.push(s);let l=iX(t);for(let o of e.set)if(!o.modified.length)for(let f of l)r.push(yc.get(o,f));return s}}function tX(n,e){return n.length==e.length&&n.every((t,i)=>t==e[i])}function iX(n){let e=[[]];for(let t=0;ti.length-t.length)}function Bl(n){let e=Object.create(null);for(let t in n){let i=n[t];Array.isArray(i)||(i=[i]);for(let r of t.split(" "))if(r){let s=[],l=2,o=r;for(let O=0;;){if(o=="..."&&O>0&&O+3==r.length){l=1;break}let p=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!p)throw new RangeError("Invalid path: "+r);if(s.push(p[0]=="*"?"":p[0][0]=='"'?JSON.parse(p[0]):p[0]),O+=p[0].length,O==r.length)break;let g=r[O++];if(O==r.length&&g=="!"){l=0;break}if(g!="/")throw new RangeError("Invalid path: "+r);o=r.slice(O)}let f=s.length-1,u=s[f];if(!u)throw new RangeError("Invalid path: "+r);let h=new vc(i,l,f>0?s.slice(0,f):null);e[u]=h.sort(e[u])}}return DQ.add(e)}const DQ=new tt;class vc{constructor(e,t,i,r){this.tags=e,this.mode=t,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let l=r;for(let o of s)for(let f of o.set){let u=t[f.id];if(u){l=l?l+" "+u:u;break}}return l},scope:i}}function nX(n,e){let t=null;for(let i of n){let r=i.style(e);r&&(t=t?t+" "+r:r)}return t}function rX(n,e,t,i=0,r=n.length){let s=new sX(i,Array.isArray(e)?e:[e],t);s.highlightRange(n.cursor(),i,r,"",s.highlighters),s.flush(r)}class sX{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,r,s){let{type:l,from:o,to:f}=e;if(o>=i||f<=t)return;l.isTop&&(s=this.highlighters.filter(g=>!g.scope||g.scope(l)));let u=r,h=lX(e)||vc.empty,O=nX(s,h.tags);if(O&&(u&&(u+=" "),u+=O,h.mode==1&&(r+=(r?" ":"")+O)),this.startSpan(Math.max(t,o),u),h.opaque)return;let p=e.tree&&e.tree.prop(tt.mounted);if(p&&p.overlay){let g=e.node.enter(p.overlay[0].from+o,1),b=this.highlighters.filter($=>!$.scope||$.scope(p.tree.type)),Q=e.firstChild();for(let $=0,P=o;;$++){let x=$=A||!e.nextSibling())););if(!x||A>i)break;P=x.to+o,P>t&&(this.highlightRange(g.cursor(),Math.max(t,x.from+o),Math.min(i,P),"",b),this.startSpan(Math.min(i,P),u))}Q&&e.parent()}else if(e.firstChild()){p&&(r="");do if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,r,s),this.startSpan(Math.min(i,e.to),u)}while(e.nextSibling());e.parent()}}}function lX(n){let e=n.type.prop(DQ);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const Oe=$r.define,Ef=Oe(),ds=Oe(),H1=Oe(ds),K1=Oe(ds),ps=Oe(),Mf=Oe(ps),Fh=Oe(ps),Sr=Oe(),Ns=Oe(Sr),gr=Oe(),mr=Oe(),id=Oe(),yo=Oe(id),Df=Oe(),S={comment:Ef,lineComment:Oe(Ef),blockComment:Oe(Ef),docComment:Oe(Ef),name:ds,variableName:Oe(ds),typeName:H1,tagName:Oe(H1),propertyName:K1,attributeName:Oe(K1),className:Oe(ds),labelName:Oe(ds),namespace:Oe(ds),macroName:Oe(ds),literal:ps,string:Mf,docString:Oe(Mf),character:Oe(Mf),attributeValue:Oe(Mf),number:Fh,integer:Oe(Fh),float:Oe(Fh),bool:Oe(ps),regexp:Oe(ps),escape:Oe(ps),color:Oe(ps),url:Oe(ps),keyword:gr,self:Oe(gr),null:Oe(gr),atom:Oe(gr),unit:Oe(gr),modifier:Oe(gr),operatorKeyword:Oe(gr),controlKeyword:Oe(gr),definitionKeyword:Oe(gr),moduleKeyword:Oe(gr),operator:mr,derefOperator:Oe(mr),arithmeticOperator:Oe(mr),logicOperator:Oe(mr),bitwiseOperator:Oe(mr),compareOperator:Oe(mr),updateOperator:Oe(mr),definitionOperator:Oe(mr),typeOperator:Oe(mr),controlOperator:Oe(mr),punctuation:id,separator:Oe(id),bracket:yo,angleBracket:Oe(yo),squareBracket:Oe(yo),paren:Oe(yo),brace:Oe(yo),content:Sr,heading:Ns,heading1:Oe(Ns),heading2:Oe(Ns),heading3:Oe(Ns),heading4:Oe(Ns),heading5:Oe(Ns),heading6:Oe(Ns),contentSeparator:Oe(Sr),list:Oe(Sr),quote:Oe(Sr),emphasis:Oe(Sr),strong:Oe(Sr),link:Oe(Sr),monospace:Oe(Sr),strikethrough:Oe(Sr),inserted:Oe(),deleted:Oe(),changed:Oe(),invalid:Oe(),meta:Df,documentMeta:Oe(Df),annotation:Oe(Df),processingInstruction:Oe(Df),definition:$r.defineModifier(),constant:$r.defineModifier(),function:$r.defineModifier(),standard:$r.defineModifier(),local:$r.defineModifier(),special:$r.defineModifier()};zQ([{tag:S.link,class:"tok-link"},{tag:S.heading,class:"tok-heading"},{tag:S.emphasis,class:"tok-emphasis"},{tag:S.strong,class:"tok-strong"},{tag:S.keyword,class:"tok-keyword"},{tag:S.atom,class:"tok-atom"},{tag:S.bool,class:"tok-bool"},{tag:S.url,class:"tok-url"},{tag:S.labelName,class:"tok-labelName"},{tag:S.inserted,class:"tok-inserted"},{tag:S.deleted,class:"tok-deleted"},{tag:S.literal,class:"tok-literal"},{tag:S.string,class:"tok-string"},{tag:S.number,class:"tok-number"},{tag:[S.regexp,S.escape,S.special(S.string)],class:"tok-string2"},{tag:S.variableName,class:"tok-variableName"},{tag:S.local(S.variableName),class:"tok-variableName tok-local"},{tag:S.definition(S.variableName),class:"tok-variableName tok-definition"},{tag:S.special(S.variableName),class:"tok-variableName2"},{tag:S.definition(S.propertyName),class:"tok-propertyName tok-definition"},{tag:S.typeName,class:"tok-typeName"},{tag:S.namespace,class:"tok-namespace"},{tag:S.className,class:"tok-className"},{tag:S.macroName,class:"tok-macroName"},{tag:S.propertyName,class:"tok-propertyName"},{tag:S.operator,class:"tok-operator"},{tag:S.comment,class:"tok-comment"},{tag:S.meta,class:"tok-meta"},{tag:S.invalid,class:"tok-invalid"},{tag:S.punctuation,class:"tok-punctuation"}]);var Gh;const Pl=new tt;function IQ(n){return ye.define({combine:n?e=>e.concat(n):void 0})}const Ad=new tt;class sr{constructor(e,t,i=[],r=""){this.data=e,this.name=r,ut.prototype.hasOwnProperty("tree")||Object.defineProperty(ut.prototype,"tree",{get(){return ei(this)}}),this.parser=t,this.extension=[xs.of(this),ut.languageData.of((s,l,o)=>{let f=J1(s,l,o),u=f.type.prop(Pl);if(!u)return[];let h=s.facet(u),O=f.type.prop(Ad);if(O){let p=f.resolve(l-f.from,o);for(let g of O)if(g.test(p,s)){let b=s.facet(g.facet);return g.type=="replace"?b:b.concat(h)}}return h})].concat(i)}isActiveAt(e,t,i=-1){return J1(e,t,i).type.prop(Pl)==this.data}findRegions(e){let t=e.facet(xs);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],r=(s,l)=>{if(s.prop(Pl)==this.data){i.push({from:l,to:l+s.length});return}let o=s.prop(tt.mounted);if(o){if(o.tree.prop(Pl)==this.data){if(o.overlay)for(let f of o.overlay)i.push({from:f.from+l,to:f.to+l});else i.push({from:l,to:l+s.length});return}else if(o.overlay){let f=i.length;if(r(o.tree,o.overlay[0].from+l),i.length>f)return}}for(let f=0;fi.isTop?t:void 0)]}),e.name)}configure(e,t){return new Ws(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function ei(n){let e=n.field(sr.state,!1);return e?e.tree:Ht.empty}class oX{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let vo=null;class Pc{constructor(e,t,i=[],r,s,l,o,f){this.parser=e,this.state=t,this.fragments=i,this.tree=r,this.treeLen=s,this.viewport=l,this.skipped=o,this.scheduleOn=f,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new Pc(e,t,[],Ht.empty,0,i,[],null)}startParse(){return this.parser.startParse(new oX(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Ht.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Lr.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=vo;vo=this;try{return e()}finally{vo=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=e0(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:r,treeLen:s,viewport:l,skipped:o}=this;if(this.takeTree(),!e.empty){let f=[];if(e.iterChangedRanges((u,h,O,p)=>f.push({fromA:u,toA:h,fromB:O,toB:p})),i=Lr.applyChanges(i,f),r=Ht.empty,s=0,l={from:e.mapPos(l.from,-1),to:e.mapPos(l.to,1)},this.skipped.length){o=[];for(let u of this.skipped){let h=e.mapPos(u.from,1),O=e.mapPos(u.to,-1);he.from&&(this.fragments=e0(this.fragments,r,s),this.skipped.splice(i--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends qQ{createParse(t,i,r){let s=r[0].from,l=r[r.length-1].to;return{parsedPos:s,advance(){let f=vo;if(f){for(let u of r)f.tempSkipped.push(u);e&&(f.scheduleOn=f.scheduleOn?Promise.all([f.scheduleOn,e]):e)}return this.parsedPos=l,new Ht(Ji.none,[],[],l-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return vo}}function e0(n,e,t){return Lr.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class Ml{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new Ml(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=Pc.create(e.facet(xs).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new Ml(i)}}sr.state=Qi.define({create:Ml.init,update(n,e){for(let t of e.effects)if(t.is(sr.setState))return t.value;return e.startState.facet(xs)!=e.state.facet(xs)?Ml.init(e.state):n.apply(e)}});let NQ=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(NQ=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const Hh=typeof navigator<"u"&&(!((Gh=navigator.scheduling)===null||Gh===void 0)&&Gh.isInputPending)?()=>navigator.scheduling.isInputPending():null,aX=hi.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(sr.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(sr.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=NQ(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndr+1e3,f=s.context.work(()=>Hh&&Hh()||Date.now()>l,r+(o?0:1e5));this.chunkBudget-=Date.now()-t,(f||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:sr.setState.of(new Ml(s.context))})),this.chunkBudget>0&&!(f&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>kn(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),xs=ye.define({combine(n){return n.length?n[0]:null},enables:n=>[sr.state,aX,me.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class ua{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const fX=ye.define(),Gc=ye.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function kc(n){let e=n.facet(Gc);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function ia(n,e){let t="",i=n.tabSize,r=n.facet(Gc)[0];if(r==" "){for(;e>=i;)t+=" ",e-=i;r=" "}for(let s=0;s=i.from&&r<=i.to?s&&r==e?{text:"",from:e}:(t<0?r-1&&(s+=l-this.countColumn(i,i.search(/\S|$/))),s}countColumn(e,t=e.length){return la(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:r}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let l=s(r);if(l>-1)return l}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const jl=new tt;function cX(n,e,t){return LQ(e.resolveInner(t).enterUnfinishedNodesBefore(t),t,n)}function uX(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function hX(n){let e=n.type.prop(jl);if(e)return e;let t=n.firstChild,i;if(t&&(i=t.type.prop(tt.closedBy))){let r=n.lastChild,s=r&&i.indexOf(r.name)>-1;return l=>BQ(l,!0,1,void 0,s&&!uX(l)?r.from:void 0)}return n.parent==null?OX:null}function LQ(n,e,t){for(;n;n=n.parent){let i=hX(n);if(i)return i(Yd.create(t,e,n))}return null}function OX(){return 0}class Yd extends Hc{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.node=i}static create(e,t,i){return new Yd(e,t,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(t.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(dX(i,e))break;t=this.state.doc.lineAt(i.from)}return this.lineIndent(t.from)}continue(){let e=this.node.parent;return e?LQ(e,this.pos,this.base):0}}function dX(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function pX(n){let e=n.node,t=e.childAfter(e.from),i=e.lastChild;if(!t)return null;let r=n.options.simulateBreak,s=n.state.doc.lineAt(t.from),l=r==null||r<=s.from?s.to:Math.min(s.to,r);for(let o=t.to;;){let f=e.childAfter(o);if(!f||f==i)return null;if(!f.type.isSkipped)return f.fromBQ(i,e,t,n)}function BQ(n,e,t,i,r){let s=n.textAfter,l=s.match(/^\s*/)[0].length,o=i&&s.slice(l,l+i.length)==i||r==n.pos+l,f=e?pX(n):null;return f?o?n.column(f.from):n.column(f.to):n.baseIndent+(o?0:n.unit*t)}const gX=n=>n.baseIndent;function Al({except:n,units:e=1}={}){return t=>{let i=n&&n.test(t.textAfter);return t.baseIndent+(i?0:e*t.unit)}}const mX=200;function SX(){return ut.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:i}=n.newSelection.main,r=t.lineAt(i);if(i>r.from+mX)return n;let s=t.sliceString(r.from,i);if(!e.some(u=>u.test(s)))return n;let{state:l}=n,o=-1,f=[];for(let{head:u}of l.selection.ranges){let h=l.doc.lineAt(u);if(h.from==o)continue;o=h.from;let O=Ud(l,h.from);if(O==null)continue;let p=/^\s*/.exec(h.text)[0],g=ia(l,O);p!=g&&f.push({from:h.from,to:h.from+p.length,insert:g})}return f.length?[n,{changes:f,sequential:!0}]:n})}const bX=ye.define(),Fl=new tt;function br(n){let e=n.firstChild,t=n.lastChild;return e&&e.tot)continue;if(s&&l.from=e&&f.to>t&&(s=f)}}return s}function QX(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function _c(n,e,t){for(let i of n.facet(bX)){let r=i(n,e,t);if(r)return r}return $X(n,e,t)}function jQ(n,e){let t=e.mapPos(n.from,1),i=e.mapPos(n.to,-1);return t>=i?void 0:{from:t,to:i}}const Kc=Ie.define({map:jQ}),ha=Ie.define({map:jQ});function FQ(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(i=>i.from<=t&&i.to>=t)||e.push(n.lineBlockAt(t));return e}const el=Qi.define({create(){return Ze.none},update(n,e){n=n.map(e.changes);for(let t of e.effects)t.is(Kc)&&!wX(n,t.value.from,t.value.to)?n=n.update({add:[t0.range(t.value.from,t.value.to)]}):t.is(ha)&&(n=n.update({filter:(i,r)=>t.value.from!=i||t.value.to!=r,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:i}=e.selection.main;n.between(i,i,(r,s)=>{ri&&(t=!0)}),t&&(n=n.update({filterFrom:i,filterTo:i,filter:(r,s)=>s<=i||r>=i}))}return n},provide:n=>me.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(i,r)=>{t.push(i,r)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t{(!r||r.from>s)&&(r={from:s,to:l})}),r}function wX(n,e,t){let i=!1;return n.between(e,e,(r,s)=>{r==e&&s==t&&(i=!0)}),i}function GQ(n,e){return n.field(el,!1)?e:e.concat(Ie.appendConfig.of(JQ()))}const yX=n=>{for(let e of FQ(n)){let t=_c(n.state,e.from,e.to);if(t)return n.dispatch({effects:GQ(n.state,[Kc.of(t),HQ(n,t)])}),!0}return!1},vX=n=>{if(!n.state.field(el,!1))return!1;let e=[];for(let t of FQ(n)){let i=Wc(n.state,t.from,t.to);i&&e.push(ha.of(i),HQ(n,i,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function HQ(n,e,t=!0){let i=n.state.doc.lineAt(e.from).number,r=n.state.doc.lineAt(e.to).number;return me.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${i} ${n.state.phrase("to")} ${r}.`)}const PX=n=>{let{state:e}=n,t=[];for(let i=0;i{let e=n.state.field(el,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(i,r)=>{t.push(ha.of({from:i,to:r}))}),n.dispatch({effects:t}),!0},_X=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:yX},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:vX},{key:"Ctrl-Alt-[",run:PX},{key:"Ctrl-Alt-]",run:kX}],WX={placeholderDOM:null,placeholderText:"…"},KQ=ye.define({combine(n){return Wr(n,WX)}});function JQ(n){let e=[el,XX];return n&&e.push(KQ.of(n)),e}const t0=Ze.replace({widget:new class extends Cs{toDOM(n){let{state:e}=n,t=e.facet(KQ),i=s=>{let l=n.lineBlockAt(n.posAtDOM(s.target)),o=Wc(n.state,l.from,l.to);o&&n.dispatch({effects:ha.of(o)}),s.preventDefault()};if(t.placeholderDOM)return t.placeholderDOM(n,i);let r=document.createElement("span");return r.textContent=t.placeholderText,r.setAttribute("aria-label",e.phrase("folded code")),r.title=e.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=i,r}}}),xX={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Kh extends Fr{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function CX(n={}){let e=Object.assign(Object.assign({},xX),n),t=new Kh(e,!0),i=new Kh(e,!1),r=hi.fromClass(class{constructor(l){this.from=l.viewport.from,this.markers=this.buildMarkers(l)}update(l){(l.docChanged||l.viewportChanged||l.startState.facet(xs)!=l.state.facet(xs)||l.startState.field(el,!1)!=l.state.field(el,!1)||ei(l.startState)!=ei(l.state)||e.foldingChanged(l))&&(this.markers=this.buildMarkers(l.view))}buildMarkers(l){let o=new ws;for(let f of l.viewportLineBlocks){let u=Wc(l.state,f.from,f.to)?i:_c(l.state,f.from,f.to)?t:null;u&&o.add(f.from,f.from,u)}return o.finish()}}),{domEventHandlers:s}=e;return[r,C5({class:"cm-foldGutter",markers(l){var o;return((o=l.plugin(r))===null||o===void 0?void 0:o.markers)||Qt.empty},initialSpacer(){return new Kh(e,!1)},domEventHandlers:Object.assign(Object.assign({},s),{click:(l,o,f)=>{if(s.click&&s.click(l,o,f))return!0;let u=Wc(l.state,o.from,o.to);if(u)return l.dispatch({effects:ha.of(u)}),!0;let h=_c(l.state,o.from,o.to);return h?(l.dispatch({effects:Kc.of(h)}),!0):!1}})}),JQ()]}const XX=me.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Oa{constructor(e,t){this.specs=e;let i;function r(o){let f=ys.newName();return(i||(i=Object.create(null)))["."+f]=o,f}const s=typeof t.all=="string"?t.all:t.all?r(t.all):void 0,l=t.scope;this.scope=l instanceof sr?o=>o.prop(Pl)==l.data:l?o=>o==l:void 0,this.style=zQ(e.map(o=>({tag:o.tag,class:o.class||r(Object.assign({},o,{tag:null}))})),{all:s}).style,this.module=i?new ys(i):null,this.themeType=t.themeType}static define(e,t){return new Oa(e,t||{})}}const nd=ye.define(),ew=ye.define({combine(n){return n.length?[n[0]]:null}});function Jh(n){let e=n.facet(nd);return e.length?e:n.facet(ew)}function tw(n,e){let t=[ZX],i;return n instanceof Oa&&(n.module&&t.push(me.styleModule.of(n.module)),i=n.themeType),e!=null&&e.fallback?t.push(ew.of(n)):i?t.push(nd.computeN([me.darkTheme],r=>r.facet(me.darkTheme)==(i=="dark")?[n]:[])):t.push(nd.of(n)),t}class TX{constructor(e){this.markCache=Object.create(null),this.tree=ei(e.state),this.decorations=this.buildDeco(e,Jh(e.state))}update(e){let t=ei(e.state),i=Jh(e.state),r=i!=Jh(e.startState);t.length{i.add(l,o,this.markCache[f]||(this.markCache[f]=Ze.mark({class:f})))},r,s);return i.finish()}}const ZX=tl.high(hi.fromClass(TX,{decorations:n=>n.decorations})),RX=Oa.define([{tag:S.meta,color:"#404740"},{tag:S.link,textDecoration:"underline"},{tag:S.heading,textDecoration:"underline",fontWeight:"bold"},{tag:S.emphasis,fontStyle:"italic"},{tag:S.strong,fontWeight:"bold"},{tag:S.strikethrough,textDecoration:"line-through"},{tag:S.keyword,color:"#708"},{tag:[S.atom,S.bool,S.url,S.contentSeparator,S.labelName],color:"#219"},{tag:[S.literal,S.inserted],color:"#164"},{tag:[S.string,S.deleted],color:"#a11"},{tag:[S.regexp,S.escape,S.special(S.string)],color:"#e40"},{tag:S.definition(S.variableName),color:"#00f"},{tag:S.local(S.variableName),color:"#30a"},{tag:[S.typeName,S.namespace],color:"#085"},{tag:S.className,color:"#167"},{tag:[S.special(S.variableName),S.macroName],color:"#256"},{tag:S.definition(S.propertyName),color:"#00c"},{tag:S.comment,color:"#940"},{tag:S.invalid,color:"#f00"}]),AX=me.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),iw=1e4,nw="()[]{}",rw=ye.define({combine(n){return Wr(n,{afterCursor:!0,brackets:nw,maxScanDistance:iw,renderMatch:VX})}}),UX=Ze.mark({class:"cm-matchingBracket"}),YX=Ze.mark({class:"cm-nonmatchingBracket"});function VX(n){let e=[],t=n.matched?UX:YX;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const qX=Qi.define({create(){return Ze.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],i=e.state.facet(rw);for(let r of e.state.selection.ranges){if(!r.empty)continue;let s=vr(e.state,r.head,-1,i)||r.head>0&&vr(e.state,r.head-1,1,i)||i.afterCursor&&(vr(e.state,r.head,1,i)||r.headme.decorations.from(n)}),EX=[qX,AX];function MX(n={}){return[rw.of(n),EX]}const sw=new tt;function rd(n,e,t){let i=n.prop(e<0?tt.openedBy:tt.closedBy);if(i)return i;if(n.name.length==1){let r=t.indexOf(n.name);if(r>-1&&r%2==(e<0?1:0))return[t[r+e]]}return null}function sd(n){let e=n.type.prop(sw);return e?e(n.node):n}function vr(n,e,t,i={}){let r=i.maxScanDistance||iw,s=i.brackets||nw,l=ei(n),o=l.resolveInner(e,t);for(let f=o;f;f=f.parent){let u=rd(f.type,t,s);if(u&&f.from0?e>=h.from&&eh.from&&e<=h.to))return DX(n,e,t,f,h,u,s)}}return zX(n,e,t,l,o.type,r,s)}function DX(n,e,t,i,r,s,l){let o=i.parent,f={from:r.from,to:r.to},u=0,h=o==null?void 0:o.cursor();if(h&&(t<0?h.childBefore(i.from):h.childAfter(i.to)))do if(t<0?h.to<=i.from:h.from>=i.to){if(u==0&&s.indexOf(h.type.name)>-1&&h.from0)return null;let u={from:t<0?e-1:e,to:t>0?e+1:e},h=n.doc.iterRange(e,t>0?n.doc.length:0),O=0;for(let p=0;!h.next().done&&p<=s;){let g=h.value;t<0&&(p+=g.length);let b=e+p*t;for(let Q=t>0?0:g.length-1,$=t>0?g.length:-1;Q!=$;Q+=t){let P=l.indexOf(g[Q]);if(!(P<0||i.resolveInner(b+Q,1).type!=r))if(P%2==0==t>0)O++;else{if(O==1)return{start:u,end:{from:b+Q,to:b+Q+1},matched:P>>1==f>>1};O--}}t>0&&(p+=g.length)}return h.done?{start:u,matched:!1}:null}const IX=Object.create(null),i0=[Ji.none],n0=[],NX=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])NX[n]=LX(IX,e);function eO(n,e){n0.indexOf(n)>-1||(n0.push(n),console.warn(e))}function LX(n,e){let t=null;for(let s of e.split(".")){let l=n[s]||S[s];l?typeof l=="function"?t?t=l(t):eO(s,`Modifier ${s} used at start of tag`):t?eO(s,`Tag ${s} used as modifier`):t=l:eO(s,`Unknown highlighting tag ${s}`)}if(!t)return 0;let i=e.replace(/ /g,"_"),r=Ji.define({id:i0.length,name:i,props:[Bl({[i]:t})]});return i0.push(r),r.id}const BX=n=>{let e=qd(n.state);return e.line?jX(n):e.block?GX(n):!1};function Vd(n,e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let r=n(e,t);return r?(i(t.update(r)),!0):!1}}const jX=Vd(JX,0),FX=Vd(lw,0),GX=Vd((n,e)=>lw(n,e,KX(e)),0);function qd(n,e=n.selection.main.head){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const Po=50;function HX(n,{open:e,close:t},i,r){let s=n.sliceDoc(i-Po,i),l=n.sliceDoc(r,r+Po),o=/\s*$/.exec(s)[0].length,f=/^\s*/.exec(l)[0].length,u=s.length-o;if(s.slice(u-e.length,u)==e&&l.slice(f,f+t.length)==t)return{open:{pos:i-o,margin:o&&1},close:{pos:r+f,margin:f&&1}};let h,O;r-i<=2*Po?h=O=n.sliceDoc(i,r):(h=n.sliceDoc(i,i+Po),O=n.sliceDoc(r-Po,r));let p=/^\s*/.exec(h)[0].length,g=/\s*$/.exec(O)[0].length,b=O.length-g-t.length;return h.slice(p,p+e.length)==e&&O.slice(b,b+t.length)==t?{open:{pos:i+p+e.length,margin:/\s/.test(h.charAt(p+e.length))?1:0},close:{pos:r-g-t.length,margin:/\s/.test(O.charAt(b-1))?1:0}}:null}function KX(n){let e=[];for(let t of n.selection.ranges){let i=n.doc.lineAt(t.from),r=t.to<=i.to?i:n.doc.lineAt(t.to),s=e.length-1;s>=0&&e[s].to>i.from?e[s].to=r.to:e.push({from:i.from,to:r.to})}return e}function lw(n,e,t=e.selection.ranges){let i=t.map(s=>qd(e,s.from).block);if(!i.every(s=>s))return null;let r=t.map((s,l)=>HX(e,i[l],s.from,s.to));if(n!=2&&!r.every(s=>s))return{changes:e.changes(t.map((s,l)=>r[l]?[]:[{from:s.from,insert:i[l].open+" "},{from:s.to,insert:" "+i[l].close}]))};if(n!=1&&r.some(s=>s)){let s=[];for(let l=0,o;lr&&(s==l||l>h.from)){r=h.from;let O=qd(e,u).line;if(!O)continue;let p=/^\s*/.exec(h.text)[0].length,g=p==h.length,b=h.text.slice(p,p+O.length)==O?p:-1;ps.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:o,token:f,indent:u,empty:h,single:O}of i)(O||!h)&&s.push({from:o.from+u,insert:f+" "});let l=e.changes(s);return{changes:l,selection:e.selection.map(l,1)}}else if(n!=1&&i.some(s=>s.comment>=0)){let s=[];for(let{line:l,comment:o,token:f}of i)if(o>=0){let u=l.from+o,h=u+f.length;l.text[h-l.from]==" "&&h++,s.push({from:u,to:h})}return{changes:s}}return null}const ld=Gr.define(),eT=Gr.define(),tT=ye.define(),ow=ye.define({combine(n){return Wr(n,{minDepth:100,newGroupDelay:500},{minDepth:Math.max,newGroupDelay:Math.min})}});function iT(n){let e=0;return n.iterChangedRanges((t,i)=>e=i),e}const aw=Qi.define({create(){return Pr.empty},update(n,e){let t=e.state.facet(ow),i=e.annotation(ld);if(i){let f=e.docChanged?K.single(iT(e.changes)):void 0,u=un.fromTransaction(e,f),h=i.side,O=h==0?n.undone:n.done;return u?O=xc(O,O.length,t.minDepth,u):O=uw(O,e.startState.selection),new Pr(h==0?i.rest:O,h==0?O:i.rest)}let r=e.annotation(eT);if((r=="full"||r=="before")&&(n=n.isolate()),e.annotation($i.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let s=un.fromTransaction(e),l=e.annotation($i.time),o=e.annotation($i.userEvent);return s?n=n.addChanges(s,l,o,t.newGroupDelay,t.minDepth):e.selection&&(n=n.addSelection(e.startState.selection,l,o,t.newGroupDelay)),(r=="full"||r=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new Pr(n.done.map(un.fromJSON),n.undone.map(un.fromJSON))}});function nT(n={}){return[aw,ow.of(n),me.domEventHandlers({beforeinput(e,t){let i=e.inputType=="historyUndo"?fw:e.inputType=="historyRedo"?od:null;return i?(e.preventDefault(),i(t)):!1}})]}function Jc(n,e){return function({state:t,dispatch:i}){if(!e&&t.readOnly)return!1;let r=t.field(aw,!1);if(!r)return!1;let s=r.pop(n,t,e);return s?(i(s),!0):!1}}const fw=Jc(0,!1),od=Jc(1,!1),rT=Jc(0,!0),sT=Jc(1,!0);class un{constructor(e,t,i,r,s){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=r,this.selectionsAfter=s}setSelAfter(e){return new un(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new un(e.changes&&bi.fromJSON(e.changes),[],e.mapped&&kr.fromJSON(e.mapped),e.startSelection&&K.fromJSON(e.startSelection),e.selectionsAfter.map(K.fromJSON))}static fromTransaction(e,t){let i=Dn;for(let r of e.startState.facet(tT)){let s=r(e);s.length&&(i=i.concat(s))}return!i.length&&e.changes.empty?null:new un(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,Dn)}static selection(e){return new un(void 0,Dn,void 0,void 0,e)}}function xc(n,e,t,i){let r=e+1>t+20?e-t-1:0,s=n.slice(r,e);return s.push(i),s}function lT(n,e){let t=[],i=!1;return n.iterChangedRanges((r,s)=>t.push(r,s)),e.iterChangedRanges((r,s,l,o)=>{for(let f=0;f=u&&l<=h&&(i=!0)}}),i}function oT(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,i)=>t.empty!=e.ranges[i].empty).length===0}function cw(n,e){return n.length?e.length?n.concat(e):n:e}const Dn=[],aT=200;function uw(n,e){if(n.length){let t=n[n.length-1],i=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-aT));return i.length&&i[i.length-1].eq(e)?n:(i.push(e),xc(n,n.length-1,1e9,t.setSelAfter(i)))}else return[un.selection([e])]}function fT(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function tO(n,e){if(!n.length)return n;let t=n.length,i=Dn;for(;t;){let r=cT(n[t-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let s=n.slice(0,t);return s[t-1]=r,s}else e=r.mapped,t--,i=r.selectionsAfter}return i.length?[un.selection(i)]:Dn}function cT(n,e,t){let i=cw(n.selectionsAfter.length?n.selectionsAfter.map(o=>o.map(e)):Dn,t);if(!n.changes)return un.selection(i);let r=n.changes.map(e),s=e.mapDesc(n.changes,!0),l=n.mapped?n.mapped.composeDesc(s):s;return new un(r,Ie.mapEffects(n.effects,e),l,n.startSelection.map(s),i)}const uT=/^(input\.type|delete)($|\.)/;class Pr{constructor(e,t,i=0,r=void 0){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new Pr(this.done,this.undone):this}addChanges(e,t,i,r,s){let l=this.done,o=l[l.length-1];return o&&o.changes&&!o.changes.empty&&e.changes&&(!i||uT.test(i))&&(!o.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):eu(t,e))}function Bi(n){return n.textDirectionAt(n.state.selection.main.head)==Gt.LTR}const Ow=n=>hw(n,!Bi(n)),dw=n=>hw(n,Bi(n));function pw(n,e){return or(n,t=>t.empty?n.moveByGroup(t,e):eu(t,e))}const OT=n=>pw(n,!Bi(n)),dT=n=>pw(n,Bi(n));function pT(n,e,t){if(e.type.prop(t))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function tu(n,e,t){let i=ei(n).resolveInner(e.head),r=t?tt.closedBy:tt.openedBy;for(let f=e.head;;){let u=t?i.childAfter(f):i.childBefore(f);if(!u)break;pT(n,u,r)?i=u:f=t?u.to:u.from}let s=i.type.prop(r),l,o;return s&&(l=t?vr(n,i.from,1):vr(n,i.to,-1))&&l.matched?o=t?l.end.to:l.end.from:o=t?i.to:i.from,K.cursor(o,t?-1:1)}const gT=n=>or(n,e=>tu(n.state,e,!Bi(n))),mT=n=>or(n,e=>tu(n.state,e,Bi(n)));function gw(n,e){return or(n,t=>{if(!t.empty)return eu(t,e);let i=n.moveVertically(t,e);return i.head!=t.head?i:n.moveToLineBoundary(t,e)})}const mw=n=>gw(n,!1),Sw=n=>gw(n,!0);function bw(n){return Math.max(n.defaultLineHeight,Math.min(n.dom.clientHeight,innerHeight)-5)}function $w(n,e){let{state:t}=n,i=Gl(t.selection,o=>o.empty?n.moveVertically(o,e,bw(n)):eu(o,e));if(i.eq(t.selection))return!1;let r=n.coordsAtPos(t.selection.main.head),s=n.scrollDOM.getBoundingClientRect(),l;return r&&r.top>s.top&&r.bottom$w(n,!1),ad=n=>$w(n,!0);function Xs(n,e,t){let i=n.lineBlockAt(e.head),r=n.moveToLineBoundary(e,t);if(r.head==e.head&&r.head!=(t?i.to:i.from)&&(r=n.moveToLineBoundary(e,t,!1)),!t&&r.head==i.from&&i.length){let s=/^\s*/.exec(n.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;s&&e.head!=i.from+s&&(r=K.cursor(i.from+s))}return r}const ST=n=>or(n,e=>Xs(n,e,!0)),bT=n=>or(n,e=>Xs(n,e,!1)),$T=n=>or(n,e=>Xs(n,e,!Bi(n))),QT=n=>or(n,e=>Xs(n,e,Bi(n))),wT=n=>or(n,e=>K.cursor(n.lineBlockAt(e.head).from,1)),yT=n=>or(n,e=>K.cursor(n.lineBlockAt(e.head).to,-1));function vT(n,e,t){let i=!1,r=Gl(n.selection,s=>{let l=vr(n,s.head,-1)||vr(n,s.head,1)||s.head>0&&vr(n,s.head-1,1)||s.headvT(n,e,!1);function Bn(n,e){let t=Gl(n.state.selection,i=>{let r=e(i);return K.range(i.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Cr(n.state,t)),!0)}function Qw(n,e){return Bn(n,t=>n.moveByChar(t,e))}const ww=n=>Qw(n,!Bi(n)),yw=n=>Qw(n,Bi(n));function vw(n,e){return Bn(n,t=>n.moveByGroup(t,e))}const kT=n=>vw(n,!Bi(n)),_T=n=>vw(n,Bi(n)),WT=n=>Bn(n,e=>tu(n.state,e,!Bi(n))),xT=n=>Bn(n,e=>tu(n.state,e,Bi(n)));function Pw(n,e){return Bn(n,t=>n.moveVertically(t,e))}const kw=n=>Pw(n,!1),_w=n=>Pw(n,!0);function Ww(n,e){return Bn(n,t=>n.moveVertically(t,e,bw(n)))}const s0=n=>Ww(n,!1),l0=n=>Ww(n,!0),CT=n=>Bn(n,e=>Xs(n,e,!0)),XT=n=>Bn(n,e=>Xs(n,e,!1)),TT=n=>Bn(n,e=>Xs(n,e,!Bi(n))),ZT=n=>Bn(n,e=>Xs(n,e,Bi(n))),RT=n=>Bn(n,e=>K.cursor(n.lineBlockAt(e.head).from)),AT=n=>Bn(n,e=>K.cursor(n.lineBlockAt(e.head).to)),o0=({state:n,dispatch:e})=>(e(Cr(n,{anchor:0})),!0),a0=({state:n,dispatch:e})=>(e(Cr(n,{anchor:n.doc.length})),!0),f0=({state:n,dispatch:e})=>(e(Cr(n,{anchor:n.selection.main.anchor,head:0})),!0),c0=({state:n,dispatch:e})=>(e(Cr(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),UT=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),YT=({state:n,dispatch:e})=>{let t=nu(n).map(({from:i,to:r})=>K.range(i,Math.min(r+1,n.doc.length)));return e(n.update({selection:K.create(t),userEvent:"select"})),!0},VT=({state:n,dispatch:e})=>{let t=Gl(n.selection,i=>{var r;let s=ei(n).resolveInner(i.head,1);for(;!(s.from=i.to||s.to>i.to&&s.from<=i.from||!(!((r=s.parent)===null||r===void 0)&&r.parent));)s=s.parent;return K.range(s.to,s.from)});return e(Cr(n,t)),!0},qT=({state:n,dispatch:e})=>{let t=n.selection,i=null;return t.ranges.length>1?i=K.create([t.main]):t.main.empty||(i=K.create([K.cursor(t.main.head)])),i?(e(Cr(n,i)),!0):!1};function iu(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:i}=n,r=i.changeByRange(s=>{let{from:l,to:o}=s;if(l==o){let f=e(l);fl&&(t="delete.forward",f=zf(n,f,!0)),l=Math.min(l,f),o=Math.max(o,f)}else l=zf(n,l,!1),o=zf(n,o,!0);return l==o?{range:s}:{changes:{from:l,to:o},range:K.cursor(l)}});return r.changes.empty?!1:(n.dispatch(i.update(r,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?me.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function zf(n,e,t){if(n instanceof me)for(let i of n.state.facet(me.atomicRanges).map(r=>r(n)))i.between(e,e,(r,s)=>{re&&(e=t?s:r)});return e}const xw=(n,e)=>iu(n,t=>{let{state:i}=n,r=i.doc.lineAt(t),s,l;if(!e&&t>r.from&&txw(n,!1),Cw=n=>xw(n,!0),Xw=(n,e)=>iu(n,t=>{let i=t,{state:r}=n,s=r.doc.lineAt(i),l=r.charCategorizer(i);for(let o=null;;){if(i==(e?s.to:s.from)){i==t&&s.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let f=Li(s.text,i-s.from,e)+s.from,u=s.text.slice(Math.min(i,f)-s.from,Math.max(i,f)-s.from),h=l(u);if(o!=null&&h!=o)break;(u!=" "||i!=t)&&(o=h),i=f}return i}),Tw=n=>Xw(n,!1),ET=n=>Xw(n,!0),Zw=n=>iu(n,e=>{let t=n.lineBlockAt(e).to;return eiu(n,e=>{let t=n.lineBlockAt(e).from;return e>t?t:Math.max(0,e-1)}),DT=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:St.of(["",""])},range:K.cursor(i.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},zT=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>{if(!i.empty||i.from==0||i.from==n.doc.length)return{range:i};let r=i.from,s=n.doc.lineAt(r),l=r==s.from?r-1:Li(s.text,r-s.from,!1)+s.from,o=r==s.to?r+1:Li(s.text,r-s.from,!0)+s.from;return{changes:{from:l,to:o,insert:n.doc.slice(r,o).append(n.doc.slice(l,r))},range:K.cursor(o)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function nu(n){let e=[],t=-1;for(let i of n.selection.ranges){let r=n.doc.lineAt(i.from),s=n.doc.lineAt(i.to);if(!i.empty&&i.to==s.from&&(s=n.doc.lineAt(i.to-1)),t>=r.number){let l=e[e.length-1];l.to=s.to,l.ranges.push(i)}else e.push({from:r.from,to:s.to,ranges:[i]});t=s.number+1}return e}function Rw(n,e,t){if(n.readOnly)return!1;let i=[],r=[];for(let s of nu(n)){if(t?s.to==n.doc.length:s.from==0)continue;let l=n.doc.lineAt(t?s.to+1:s.from-1),o=l.length+1;if(t){i.push({from:s.to,to:l.to},{from:s.from,insert:l.text+n.lineBreak});for(let f of s.ranges)r.push(K.range(Math.min(n.doc.length,f.anchor+o),Math.min(n.doc.length,f.head+o)))}else{i.push({from:l.from,to:s.from},{from:s.to,insert:n.lineBreak+l.text});for(let f of s.ranges)r.push(K.range(f.anchor-o,f.head-o))}}return i.length?(e(n.update({changes:i,scrollIntoView:!0,selection:K.create(r,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const IT=({state:n,dispatch:e})=>Rw(n,e,!1),NT=({state:n,dispatch:e})=>Rw(n,e,!0);function Aw(n,e,t){if(n.readOnly)return!1;let i=[];for(let r of nu(n))t?i.push({from:r.from,insert:n.doc.slice(r.from,r.to)+n.lineBreak}):i.push({from:r.to,insert:n.lineBreak+n.doc.slice(r.from,r.to)});return e(n.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const LT=({state:n,dispatch:e})=>Aw(n,e,!1),BT=({state:n,dispatch:e})=>Aw(n,e,!0),jT=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(nu(e).map(({from:r,to:s})=>(r>0?r--:sn.moveVertically(r,!0)).map(t);return n.dispatch({changes:t,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function FT(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=ei(n).resolveInner(e),i=t.childBefore(e),r=t.childAfter(e),s;return i&&r&&i.to<=e&&r.from>=e&&(s=i.type.prop(tt.closedBy))&&s.indexOf(r.name)>-1&&n.doc.lineAt(i.to).from==n.doc.lineAt(r.from).from?{from:i.to,to:r.from}:null}const GT=Uw(!1),HT=Uw(!0);function Uw(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:s,to:l}=r,o=e.doc.lineAt(s),f=!n&&s==l&&FT(e,s);n&&(s=l=(l<=o.to?o:e.doc.lineAt(l)).to);let u=new Hc(e,{simulateBreak:s,simulateDoubleBreak:!!f}),h=Ud(u,s);for(h==null&&(h=/^\s*/.exec(e.doc.lineAt(s).text)[0].length);lo.from&&s{let r=[];for(let l=i.from;l<=i.to;){let o=n.doc.lineAt(l);o.number>t&&(i.empty||i.to>o.from)&&(e(o,r,i),t=o.number),l=o.to+1}let s=n.changes(r);return{changes:r,range:K.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}})}const KT=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),i=new Hc(n,{overrideIndentation:s=>{let l=t[s];return l??-1}}),r=Ed(n,(s,l,o)=>{let f=Ud(i,s.from);if(f==null)return;/\S/.test(s.text)||(f=0);let u=/^\s*/.exec(s.text)[0],h=ia(n,f);(u!=h||o.fromn.readOnly?!1:(e(n.update(Ed(n,(t,i)=>{i.push({from:t.from,insert:n.facet(Gc)})}),{userEvent:"input.indent"})),!0),Vw=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(Ed(n,(t,i)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let s=la(r,n.tabSize),l=0,o=ia(n,Math.max(0,s-kc(n)));for(;l({mac:n.key,run:n.run,shift:n.shift}))),tZ=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:gT,shift:WT},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:mT,shift:xT},{key:"Alt-ArrowUp",run:IT},{key:"Shift-Alt-ArrowUp",run:LT},{key:"Alt-ArrowDown",run:NT},{key:"Shift-Alt-ArrowDown",run:BT},{key:"Escape",run:qT},{key:"Mod-Enter",run:HT},{key:"Alt-l",mac:"Ctrl-l",run:YT},{key:"Mod-i",run:VT,preventDefault:!0},{key:"Mod-[",run:Vw},{key:"Mod-]",run:Yw},{key:"Mod-Alt-\\",run:KT},{key:"Shift-Mod-k",run:jT},{key:"Shift-Mod-\\",run:PT},{key:"Mod-/",run:BX},{key:"Alt-A",run:FX}].concat(eZ),iZ={key:"Tab",run:Yw,shift:Vw};function Xt(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var r=t[i];typeof r=="string"?n.setAttribute(i,r):r!=null&&(n[i]=r)}e++}for(;en.normalize("NFKD"):n=>n;class Dl{constructor(e,t,i=0,r=e.length,s,l){this.test=l,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=s?o=>s(u0(o)):u0,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Xi(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=Sd(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=yn(e);let r=this.normalize(t);for(let s=0,l=i;;s++){let o=r.charCodeAt(s),f=this.match(o,l);if(f)return this.value=f,this;if(s==r.length-1)break;l==i&&sthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let i=this.curLineStart+t.index,r=i+t[0].length;if(this.matchPos=Cc(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,t)))return this.value={from:i,to:r,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||r.to<=t){let o=new Ul(t,e.sliceString(t,i));return iO.set(e,o),o}if(r.from==t&&r.to==i)return r;let{text:s,from:l}=r;return l>t&&(s=e.sliceString(t,l)+s,l=t),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let i=this.flat.from+t.index,r=i+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,t)))return this.value={from:i,to:r,match:t},this.matchPos=Cc(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Ul.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(Mw.prototype[Symbol.iterator]=Dw.prototype[Symbol.iterator]=function(){return this});function nZ(n){try{return new RegExp(n,Md),!0}catch{return!1}}function Cc(n,e){if(e>=n.length)return e;let t=n.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function cd(n){let e=Xt("input",{class:"cm-textfield",name:"line"}),t=Xt("form",{class:"cm-gotoLine",onkeydown:r=>{r.keyCode==27?(r.preventDefault(),n.dispatch({effects:Xc.of(!1)}),n.focus()):r.keyCode==13&&(r.preventDefault(),i())},onsubmit:r=>{r.preventDefault(),i()}},Xt("label",n.state.phrase("Go to line"),": ",e)," ",Xt("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function i(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!r)return;let{state:s}=n,l=s.doc.lineAt(s.selection.main.head),[,o,f,u,h]=r,O=u?+u.slice(1):0,p=f?+f:l.number;if(f&&h){let b=p/100;o&&(b=b*(o=="-"?-1:1)+l.number/s.doc.lines),p=Math.round(s.doc.lines*b)}else f&&o&&(p=p*(o=="-"?-1:1)+l.number);let g=s.doc.line(Math.max(1,Math.min(s.doc.lines,p)));n.dispatch({effects:Xc.of(!1),selection:K.cursor(g.from+Math.max(0,Math.min(O,g.length))),scrollIntoView:!0}),n.focus()}return{dom:t}}const Xc=Ie.define(),h0=Qi.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(Xc)&&(n=t.value);return n},provide:n=>Jo.from(n,e=>e?cd:null)}),rZ=n=>{let e=Ko(n,cd);if(!e){let t=[Xc.of(!0)];n.state.field(h0,!1)==null&&t.push(Ie.appendConfig.of([h0,sZ])),n.dispatch({effects:t}),e=Ko(n,cd)}return e&&e.dom.querySelector("input").focus(),!0},sZ=me.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),lZ={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},zw=ye.define({combine(n){return Wr(n,lZ,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function oZ(n){let e=[hZ,uZ];return n&&e.push(zw.of(n)),e}const aZ=Ze.mark({class:"cm-selectionMatch"}),fZ=Ze.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function O0(n,e,t,i){return(t==0||n(e.sliceDoc(t-1,t))!=zt.Word)&&(i==e.doc.length||n(e.sliceDoc(i,i+1))!=zt.Word)}function cZ(n,e,t,i){return n(e.sliceDoc(t,t+1))==zt.Word&&n(e.sliceDoc(i-1,i))==zt.Word}const uZ=hi.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(zw),{state:t}=n,i=t.selection;if(i.ranges.length>1)return Ze.none;let r=i.main,s,l=null;if(r.empty){if(!e.highlightWordAroundCursor)return Ze.none;let f=t.wordAt(r.head);if(!f)return Ze.none;l=t.charCategorizer(r.head),s=t.sliceDoc(f.from,f.to)}else{let f=r.to-r.from;if(f200)return Ze.none;if(e.wholeWords){if(s=t.sliceDoc(r.from,r.to),l=t.charCategorizer(r.head),!(O0(l,t,r.from,r.to)&&cZ(l,t,r.from,r.to)))return Ze.none}else if(s=t.sliceDoc(r.from,r.to).trim(),!s)return Ze.none}let o=[];for(let f of n.visibleRanges){let u=new Dl(t.doc,s,f.from,f.to);for(;!u.next().done;){let{from:h,to:O}=u.value;if((!l||O0(l,t,h,O))&&(r.empty&&h<=r.from&&O>=r.to?o.push(fZ.range(h,O)):(h>=r.to||O<=r.from)&&o.push(aZ.range(h,O)),o.length>e.maxMatches))return Ze.none}}return Ze.set(o)}},{decorations:n=>n.decorations}),hZ=me.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),OZ=({state:n,dispatch:e})=>{let{selection:t}=n,i=K.create(t.ranges.map(r=>n.wordAt(r.head)||K.cursor(r.head)),t.mainIndex);return i.eq(t)?!1:(e(n.update({selection:i})),!0)};function dZ(n,e){let{main:t,ranges:i}=n.selection,r=n.wordAt(t.head),s=r&&r.from==t.from&&r.to==t.to;for(let l=!1,o=new Dl(n.doc,e,i[i.length-1].to);;)if(o.next(),o.done){if(l)return null;o=new Dl(n.doc,e,0,Math.max(0,i[i.length-1].from-1)),l=!0}else{if(l&&i.some(f=>f.from==o.value.from))continue;if(s){let f=n.wordAt(o.value.from);if(!f||f.from!=o.value.from||f.to!=o.value.to)continue}return o.value}}const pZ=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(s=>s.from===s.to))return OZ({state:n,dispatch:e});let i=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(s=>n.sliceDoc(s.from,s.to)!=i))return!1;let r=dZ(n,i);return r?(e(n.update({selection:n.selection.addRange(K.range(r.from,r.to),!1),effects:me.scrollIntoView(r.to)})),!0):!1},Dd=ye.define({combine(n){return Wr(n,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:e=>new _Z(e)})}});class Iw{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||nZ(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,i)=>i=="n"?` +`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new bZ(this):new mZ(this)}getCursor(e,t=0,i){let r=e.doc?e:ut.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?wl(this,r,t,i):Ql(this,r,t,i)}}class Nw{constructor(e){this.spec=e}}function Ql(n,e,t,i){return new Dl(e.doc,n.unquoted,t,i,n.caseSensitive?void 0:r=>r.toLowerCase(),n.wholeWord?gZ(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function gZ(n,e){return(t,i,r,s)=>((s>t||s+r.length=t)return null;r.push(i.value)}return r}highlight(e,t,i,r){let s=Ql(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}function wl(n,e,t,i){return new Mw(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?SZ(e.charCategorizer(e.selection.main.head)):void 0},t,i)}function Tc(n,e){return n.slice(Li(n,e,!1),e)}function Zc(n,e){return n.slice(e,Li(n,e))}function SZ(n){return(e,t,i)=>!i[0].length||(n(Tc(i.input,i.index))!=zt.Word||n(Zc(i.input,i.index))!=zt.Word)&&(n(Zc(i.input,i.index+i[0].length))!=zt.Word||n(Tc(i.input,i.index+i[0].length))!=zt.Word)}class bZ extends Nw{nextMatch(e,t,i){let r=wl(this.spec,e,i,e.doc.length).next();return r.done&&(r=wl(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,i){for(let r=1;;r++){let s=Math.max(t,i-r*1e4),l=wl(this.spec,e,s,i),o=null;for(;!l.next().done;)o=l.value;if(o&&(s==t||o.from>s+10))return o;if(s==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(t,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=t)return null;r.push(i.value)}return r}highlight(e,t,i,r){let s=wl(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}const na=Ie.define(),zd=Ie.define(),$s=Qi.define({create(n){return new nO(ud(n).create(),null)},update(n,e){for(let t of e.effects)t.is(na)?n=new nO(t.value.create(),n.panel):t.is(zd)&&(n=new nO(n.query,t.value?Id:null));return n},provide:n=>Jo.from(n,e=>e.panel)});class nO{constructor(e,t){this.query=e,this.panel=t}}const $Z=Ze.mark({class:"cm-searchMatch"}),QZ=Ze.mark({class:"cm-searchMatch cm-searchMatch-selected"}),wZ=hi.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field($s))}update(n){let e=n.state.field($s);(e!=n.startState.field($s)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return Ze.none;let{view:t}=this,i=new ws;for(let r=0,s=t.visibleRanges,l=s.length;rs[r+1].from-2*250;)f=s[++r].to;n.highlight(t.state,o,f,(u,h)=>{let O=t.state.selection.ranges.some(p=>p.from==u&&p.to==h);i.add(u,h,O?QZ:$Z)})}return i.finish()}},{decorations:n=>n.decorations});function da(n){return e=>{let t=e.state.field($s,!1);return t&&t.query.spec.valid?n(e,t):Lw(e)}}const Rc=da((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state,t,t);return i?(n.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:Nd(n,i),userEvent:"select.search"}),!0):!1}),Ac=da((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,r=e.prevMatch(t,i,i);return r?(n.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:Nd(n,r),userEvent:"select.search"}),!0):!1}),yZ=da((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:K.create(t.map(i=>K.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),vZ=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:i,to:r}=t.main,s=[],l=0;for(let o=new Dl(n.doc,n.sliceDoc(i,r));!o.next().done;){if(s.length>1e3)return!1;o.value.from==i&&(l=s.length),s.push(K.range(o.value.from,o.value.to))}return e(n.update({selection:K.create(s,l),userEvent:"select.search.matches"})),!0},d0=da((n,{query:e})=>{let{state:t}=n,{from:i,to:r}=t.selection.main;if(t.readOnly)return!1;let s=e.nextMatch(t,i,i);if(!s)return!1;let l=[],o,f,u=[];if(s.from==i&&s.to==r&&(f=t.toText(e.getReplacement(s)),l.push({from:s.from,to:s.to,insert:f}),s=e.nextMatch(t,s.from,s.to),u.push(me.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(i).number)+"."))),s){let h=l.length==0||l[0].from>=s.to?0:s.to-s.from-f.length;o={anchor:s.from-h,head:s.to-h},u.push(Nd(n,s))}return n.dispatch({changes:l,selection:o,scrollIntoView:!!o,effects:u,userEvent:"input.replace"}),!0}),PZ=da((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(r=>{let{from:s,to:l}=r;return{from:s,to:l,insert:e.getReplacement(r)}});if(!t.length)return!1;let i=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:me.announce.of(i),userEvent:"input.replace.all"}),!0});function Id(n){return n.state.facet(Dd).createPanel(n)}function ud(n,e){var t,i,r,s;let l=n.selection.main,o=l.empty||l.to>l.from+100?"":n.sliceDoc(l.from,l.to);if(e&&!o)return e;let f=n.facet(Dd);return new Iw({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:f.literal)?o:o.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:f.caseSensitive,literal:(r=e==null?void 0:e.literal)!==null&&r!==void 0?r:f.literal,wholeWord:(s=e==null?void 0:e.wholeWord)!==null&&s!==void 0?s:f.wholeWord})}const Lw=n=>{let e=n.state.field($s,!1);if(e&&e.panel){let t=Ko(n,Id);if(!t)return!1;let i=t.dom.querySelector("[main-field]");if(i&&i!=n.root.activeElement){let r=ud(n.state,e.query.spec);r.valid&&n.dispatch({effects:na.of(r)}),i.focus(),i.select()}}else n.dispatch({effects:[zd.of(!0),e?na.of(ud(n.state,e.query.spec)):Ie.appendConfig.of(xZ)]});return!0},Bw=n=>{let e=n.state.field($s,!1);if(!e||!e.panel)return!1;let t=Ko(n,Id);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:zd.of(!1)}),!0},kZ=[{key:"Mod-f",run:Lw,scope:"editor search-panel"},{key:"F3",run:Rc,shift:Ac,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Rc,shift:Ac,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Bw,scope:"editor search-panel"},{key:"Mod-Shift-l",run:vZ},{key:"Alt-g",run:rZ},{key:"Mod-d",run:pZ,preventDefault:!0}];class _Z{constructor(e){this.view=e;let t=this.query=e.state.field($s).query.spec;this.commit=this.commit.bind(this),this.searchField=Xt("input",{value:t.search,placeholder:$n(e,"Find"),"aria-label":$n(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Xt("input",{value:t.replace,placeholder:$n(e,"Replace"),"aria-label":$n(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Xt("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Xt("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Xt("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function i(r,s,l){return Xt("button",{class:"cm-button",name:r,onclick:s,type:"button"},l)}this.dom=Xt("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>Rc(e),[$n(e,"next")]),i("prev",()=>Ac(e),[$n(e,"previous")]),i("select",()=>yZ(e),[$n(e,"all")]),Xt("label",null,[this.caseField,$n(e,"match case")]),Xt("label",null,[this.reField,$n(e,"regexp")]),Xt("label",null,[this.wordField,$n(e,"by word")]),...e.state.readOnly?[]:[Xt("br"),this.replaceField,i("replace",()=>d0(e),[$n(e,"replace")]),i("replaceAll",()=>PZ(e),[$n(e,"replace all")])],Xt("button",{name:"close",onclick:()=>Bw(e),"aria-label":$n(e,"close"),type:"button"},["×"])])}commit(){let e=new Iw({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:na.of(e)}))}keydown(e){M3(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Ac:Rc)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),d0(this.view))}update(e){for(let t of e.transactions)for(let i of t.effects)i.is(na)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Dd).top}}function $n(n,e){return n.state.phrase(e)}const If=30,Nf=/[\s\.,:;?!]/;function Nd(n,{from:e,to:t}){let i=n.state.doc.lineAt(e),r=n.state.doc.lineAt(t).to,s=Math.max(i.from,e-If),l=Math.min(r,t+If),o=n.state.sliceDoc(s,l);if(s!=i.from){for(let f=0;fo.length-If;f--)if(!Nf.test(o[f-1])&&Nf.test(o[f])){o=o.slice(0,f);break}}return me.announce.of(`${n.state.phrase("current match")}. ${o} ${n.state.phrase("on line")} ${i.number}.`)}const WZ=me.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),xZ=[$s,tl.lowest(wZ),WZ];class jw{constructor(e,t,i){this.state=e,this.pos=t,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let t=ei(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),i=Math.max(t.from,this.pos-250),r=t.text.slice(i-t.from,this.pos-t.from),s=r.search(Gw(e,!1));return s<0?null:{from:i+s,to:this.pos,text:r.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,t){e=="abort"&&this.abortListeners&&this.abortListeners.push(t)}}function p0(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function CZ(n){let e=Object.create(null),t=Object.create(null);for(let{label:r}of n){e[r[0]]=!0;for(let s=1;stypeof r=="string"?{label:r}:r),[t,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:CZ(e);return r=>{let s=r.matchBefore(i);return s||r.explicit?{from:s?s.from:r.pos,options:e,validFor:t}:null}}function XZ(n,e){return t=>{for(let i=ei(t.state).resolveInner(t.pos,-1);i;i=i.parent)if(n.indexOf(i.name)>-1)return null;return e(t)}}class g0{constructor(e,t,i){this.completion=e,this.source=t,this.match=i}}function Qs(n){return n.selection.main.head}function Gw(n,e){var t;let{source:i}=n,r=e&&i[0]!="^",s=i[i.length-1]!="$";return!r&&!s?n:new RegExp(`${r?"^":""}(?:${i})${s?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const TZ=Gr.define();function ZZ(n,e,t,i){return Object.assign(Object.assign({},n.changeByRange(r=>{if(r==n.selection.main)return{changes:{from:t,to:i,insert:e},range:K.cursor(t+e.length)};let s=i-t;return!r.empty||s&&n.sliceDoc(r.from-s,r.from)!=n.sliceDoc(t,i)?{range:r}:{changes:{from:r.from-s,to:r.from,insert:e},range:K.cursor(r.from-s+e.length)}})),{userEvent:"input.complete"})}function Hw(n,e){const t=e.completion.apply||e.completion.label;let i=e.source;typeof t=="string"?n.dispatch(Object.assign(Object.assign({},ZZ(n.state,t,i.from,i.to)),{annotations:TZ.of(e.completion)})):t(n,e.completion,i.from,i.to)}const m0=new WeakMap;function RZ(n){if(!Array.isArray(n))return n;let e=m0.get(n);return e||m0.set(n,e=Fw(n)),e}class AZ{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let t=0;t=48&&X<=57||X>=97&&X<=122?2:X>=65&&X<=90?1:0:(Z=Sd(X))!=Z.toLowerCase()?1:Z!=Z.toUpperCase()?2:0;(!x||I==1&&$||C==0&&I!=0)&&(t[O]==X||i[O]==X&&(p=!0)?l[O++]=x:l.length&&(P=!1)),C=I,x+=yn(X)}return O==f&&l[0]==0&&P?this.result(-100+(p?-200:0),l,e):g==f&&b==0?[-200-e.length,0,Q]:o>-1?[-700-e.length,o,o+this.pattern.length]:g==f?[-200+-700-e.length,b,Q]:O==f?this.result(-100+(p?-200:0)+-700+(P?0:-1100),l,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,i){let r=[e-i.length],s=1;for(let l of t){let o=l+(this.astral?yn(Xi(i,l)):1);s>1&&r[s-1]==l?r[s-1]=o:(r[s++]=l,r[s++]=o)}return r}}const Nn=ye.define({combine(n){return Wr(n,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>i=>S0(e(i),t(i)),optionClass:(e,t)=>i=>S0(e(i),t(i)),addToOptions:(e,t)=>e.concat(t)})}});function S0(n,e){return n?e?n+" "+e:n:e}function UZ(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),t.type&&i.classList.add(...t.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(t,i,r){let s=document.createElement("span");s.className="cm-completionLabel";let{label:l}=t,o=0;for(let f=1;fo&&s.appendChild(document.createTextNode(l.slice(o,u)));let O=s.appendChild(document.createElement("span"));O.appendChild(document.createTextNode(l.slice(u,h))),O.className="cm-completionMatchedText",o=h}return ot.position-i.position).map(t=>t.render)}function b0(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let r=Math.floor(e/t);return{from:r*t,to:(r+1)*t}}let i=Math.floor((n-e)/t);return{from:n-(i+1)*t,to:n-i*t}}class YZ{constructor(e,t){this.view=e,this.stateField=t,this.info=null,this.placeInfo={read:()=>this.measureInfo(),write:o=>this.positionInfo(o),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:r,selected:s}=i.open,l=e.state.facet(Nn);this.optionContent=UZ(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=b0(r.length,s,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",o=>{for(let f=o.target,u;f&&f!=this.dom;f=f.parentNode)if(f.nodeName=="LI"&&(u=/-(\d+)$/.exec(f.id))&&+u[1]{this.info&&this.view.requestMeasure(this.placeInfo)})}mount(){this.updateSel()}update(e){var t,i,r;let s=e.state.field(this.stateField),l=e.startState.field(this.stateField);this.updateTooltipClass(e.state),s!=l&&(this.updateSel(),((t=s.open)===null||t===void 0?void 0:t.disabled)!=((i=l.open)===null||i===void 0?void 0:i.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(!((r=s.open)===null||r===void 0)&&r.disabled)))}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of t.split(" "))i&&this.dom.classList.add(i);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfo)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=b0(t.options.length,t.selected,this.view.state.facet(Nn).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t.options,e.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfo)})),this.updateSelectedOption(t.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:i}=t.options[t.selected],{info:r}=i;if(!r)return;let s=typeof r=="string"?document.createTextNode(r):r(i);if(!s)return;"then"in s?s.then(l=>{l&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(l)}).catch(l=>kn(this.view.state,l,"completion info")):this.addInfoPane(s)}}addInfoPane(e){let t=this.info=document.createElement("div");t.className="cm-tooltip cm-completionInfo",t.appendChild(e),this.dom.appendChild(t),this.view.requestMeasure(this.placeInfo)}updateSelectedOption(e){let t=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),t=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return t&&qZ(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),s=this.space;if(!s){let b=this.dom.ownerDocument.defaultView||window;s={left:0,top:0,right:b.innerWidth,bottom:b.innerHeight}}if(r.top>Math.min(s.bottom,t.bottom)-10||r.bottom=i.height||b>t.top?h=r.bottom-t.top+"px":O=t.bottom-r.top+"px"}return{top:h,bottom:O,maxWidth:u,class:f?l?"left-narrow":"right-narrow":o?"left":"right"}}positionInfo(e){this.info&&(e?(this.info.style.top=e.top,this.info.style.bottom=e.bottom,this.info.style.maxWidth=e.maxWidth,this.info.className="cm-tooltip cm-completionInfo cm-completionInfo-"+e.class):this.info.style.top="-1e6px")}createListBox(e,t,i){const r=document.createElement("ul");r.id=t,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions"));for(let s=i.from;snew YZ(e,n)}function qZ(n,e){let t=n.getBoundingClientRect(),i=e.getBoundingClientRect();i.topt.bottom&&(n.scrollTop+=i.bottom-t.bottom)}function $0(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function EZ(n,e){let t=[],i=0;for(let o of n)if(o.hasResult())if(o.result.filter===!1){let f=o.result.getMatch;for(let u of o.result.options){let h=[1e9-i++];if(f)for(let O of f(u))h.push(O);t.push(new g0(u,o,h))}}else{let f=new AZ(e.sliceDoc(o.from,o.to)),u;for(let h of o.result.options)(u=f.match(h.label))&&(h.boost!=null&&(u[0]+=h.boost),t.push(new g0(h,o,u)))}let r=[],s=null,l=e.facet(Nn).compareCompletions;for(let o of t.sort((f,u)=>u.match[0]-f.match[0]||l(f.completion,u.completion)))!s||s.label!=o.completion.label||s.detail!=o.completion.detail||s.type!=null&&o.completion.type!=null&&s.type!=o.completion.type||s.apply!=o.completion.apply?r.push(o):$0(o.completion)>$0(s)&&(r[r.length-1]=o),s=o.completion;return r}class kl{constructor(e,t,i,r,s,l){this.options=e,this.attrs=t,this.tooltip=i,this.timestamp=r,this.selected=s,this.disabled=l}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new kl(this.options,Q0(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,i,r,s){let l=EZ(e,t);if(!l.length)return r&&e.some(f=>f.state==1)?new kl(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let o=t.facet(Nn).selectOnOpen?0:-1;if(r&&r.selected!=o&&r.selected!=-1){let f=r.options[r.selected].completion;for(let u=0;uu.hasResult()?Math.min(f,u.from):f,1e8),create:VZ(En),above:s.aboveCursor},r?r.timestamp:Date.now(),o,!1)}map(e){return new kl(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Uc{constructor(e,t,i){this.active=e,this.id=t,this.open=i}static start(){return new Uc(zZ,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,i=t.facet(Nn),s=(i.override||t.languageDataAt("autocomplete",Qs(t)).map(RZ)).map(o=>(this.active.find(u=>u.source==o)||new cn(o,this.active.some(u=>u.state!=0)?1:0)).update(e,i));s.length==this.active.length&&s.every((o,f)=>o==this.active[f])&&(s=this.active);let l=this.open;l&&e.docChanged&&(l=l.map(e.changes)),e.selection||s.some(o=>o.hasResult()&&e.changes.touchesRange(o.from,o.to))||!MZ(s,this.active)?l=kl.build(s,t,this.id,l,i):l&&l.disabled&&!s.some(o=>o.state==1)&&(l=null),!l&&s.every(o=>o.state!=1)&&s.some(o=>o.hasResult())&&(s=s.map(o=>o.hasResult()?new cn(o.source,0):o));for(let o of e.effects)o.is(Jw)&&(l=l&&l.setSelected(o.value,this.id));return s==this.active&&l==this.open?this:new Uc(s,this.id,l)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:DZ}}function MZ(n,e){if(n==e)return!0;for(let t=0,i=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const zZ=[];function hd(n){return n.isUserEvent("input.type")?"input":n.isUserEvent("delete.backward")?"delete":null}class cn{constructor(e,t,i=-1){this.source=e,this.state=t,this.explicitPos=i}hasResult(){return!1}update(e,t){let i=hd(e),r=this;i?r=r.handleUserEvent(e,i,t):e.docChanged?r=r.handleChange(e):e.selection&&r.state!=0&&(r=new cn(r.source,0));for(let s of e.effects)if(s.is(Ld))r=new cn(r.source,1,s.value?Qs(e.state):-1);else if(s.is(Yc))r=new cn(r.source,0);else if(s.is(Kw))for(let l of s.value)l.source==r.source&&(r=l);return r}handleUserEvent(e,t,i){return t=="delete"||!i.activateOnTyping?this.map(e.changes):new cn(this.source,1)}handleChange(e){return e.changes.touchesRange(Qs(e.startState))?new cn(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new cn(this.source,this.state,e.mapPos(this.explicitPos))}}class Do extends cn{constructor(e,t,i,r,s){super(e,2,t),this.result=i,this.from=r,this.to=s}hasResult(){return!0}handleUserEvent(e,t,i){var r;let s=e.changes.mapPos(this.from),l=e.changes.mapPos(this.to,1),o=Qs(e.state);if((this.explicitPos<0?o<=s:ol||t=="delete"&&Qs(e.startState)==this.from)return new cn(this.source,t=="input"&&i.activateOnTyping?1:0);let f=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),u;return IZ(this.result.validFor,e.state,s,l)?new Do(this.source,f,this.result,s,l):this.result.update&&(u=this.result.update(this.result,s,l,new jw(e.state,o,f>=0)))?new Do(this.source,f,u,u.from,(r=u.to)!==null&&r!==void 0?r:Qs(e.state)):new cn(this.source,1,f)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new cn(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new Do(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}function IZ(n,e,t,i){if(!n)return!1;let r=e.sliceDoc(t,i);return typeof n=="function"?n(r,t,i,e):Gw(n,!0).test(r)}const Ld=Ie.define(),Yc=Ie.define(),Kw=Ie.define({map(n,e){return n.map(t=>t.map(e))}}),Jw=Ie.define(),En=Qi.define({create(){return Uc.start()},update(n,e){return n.update(e)},provide:n=>[Wd.from(n,e=>e.tooltip),me.contentAttributes.from(n,e=>e.attrs)]});function Lf(n,e="option"){return t=>{let i=t.state.field(En,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+r*(n?1:-1):n?0:l-1;return o<0?o=e=="page"?0:l-1:o>=l&&(o=e=="page"?l-1:0),t.dispatch({effects:Jw.of(o)}),!0}}const NZ=n=>{let e=n.state.field(En,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||Date.now()-e.open.timestampn.state.field(En,!1)?(n.dispatch({effects:Ld.of(!0)}),!0):!1,BZ=n=>{let e=n.state.field(En,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:Yc.of(null)}),!0)};class jZ{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const w0=50,FZ=50,GZ=1e3,HZ=hi.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of n.state.field(En).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(En);if(!n.selectionSet&&!n.docChanged&&n.startState.field(En)==e)return;let t=n.transactions.some(i=>(i.selection||i.docChanged)&&!hd(i));for(let i=0;iFZ&&Date.now()-r.time>GZ){for(let s of r.context.abortListeners)try{s()}catch(l){kn(this.view.state,l)}r.context.abortListeners=null,this.running.splice(i--,1)}else r.updates.push(...n.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some(i=>i.state==1&&!this.running.some(r=>r.active.source==i.source))?setTimeout(()=>this.startUpdate(),w0):-1,this.composing!=0)for(let i of n.transactions)hd(i)=="input"?this.composing=2:this.composing==2&&i.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:n}=this.view,e=n.field(En);for(let t of e.active)t.state==1&&!this.running.some(i=>i.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=Qs(e),i=new jw(e,t,n.explicitPos==t),r=new jZ(n,i);this.running.push(r),Promise.resolve(n.source(i)).then(s=>{r.context.aborted||(r.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:Yc.of(null)}),kn(this.view.state,s)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),w0))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(Nn);for(let i=0;il.source==r.active.source);if(s&&s.state==1)if(r.done==null){let l=new cn(r.active.source,0);for(let o of r.updates)l=l.update(o,t);l.state!=1&&e.push(l)}else this.startQuery(s)}e.length&&this.view.dispatch({effects:Kw.of(e)})}},{eventHandlers:{blur(){let n=this.view.state.field(En,!1);n&&n.tooltip&&this.view.state.facet(Nn).closeOnBlur&&this.view.dispatch({effects:Yc.of(null)})},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Ld.of(!1)}),20),this.composing=0}}}),ey=me.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class KZ{constructor(e,t,i,r){this.field=e,this.line=t,this.from=i,this.to=r}}class Bd{constructor(e,t,i){this.field=e,this.from=t,this.to=i}map(e){let t=e.mapPos(this.from,-1,Zi.TrackDel),i=e.mapPos(this.to,1,Zi.TrackDel);return t==null||i==null?null:new Bd(this.field,t,i)}}class jd{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let i=[],r=[t],s=e.doc.lineAt(t),l=/^\s*/.exec(s.text)[0];for(let f of this.lines){if(i.length){let u=l,h=/^\t*/.exec(f)[0].length;for(let O=0;Onew Bd(f.field,r[f.line]+f.from,r[f.line]+f.to));return{text:i,ranges:o}}static parse(e){let t=[],i=[],r=[],s;for(let l of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(l);){let o=s[1]?+s[1]:null,f=s[2]||s[3]||"",u=-1;for(let h=0;h=u&&O.field++}r.push(new KZ(u,i.length,s.index,s.index+f.length)),l=l.slice(0,s.index)+f+l.slice(s.index+s[0].length)}for(let o;o=/\\([{}])/.exec(l);){l=l.slice(0,o.index)+o[1]+l.slice(o.index+o[0].length);for(let f of r)f.line==i.length&&f.from>o.index&&(f.from--,f.to--)}i.push(l)}return new jd(i,r)}}let JZ=Ze.widget({widget:new class extends Cs{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),eR=Ze.mark({class:"cm-snippetField"});class Hl{constructor(e,t){this.ranges=e,this.active=t,this.deco=Ze.set(e.map(i=>(i.from==i.to?JZ:eR).range(i.from,i.to)))}map(e){let t=[];for(let i of this.ranges){let r=i.map(e);if(!r)return null;t.push(r)}return new Hl(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(i=>i.field==this.active&&i.from<=t.from&&i.to>=t.to))}}const pa=Ie.define({map(n,e){return n&&n.map(e)}}),tR=Ie.define(),ra=Qi.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(pa))return t.value;if(t.is(tR)&&n)return new Hl(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>me.decorations.from(n,e=>e?e.deco:Ze.none)});function Fd(n,e){return K.create(n.filter(t=>t.field==e).map(t=>K.range(t.from,t.to)))}function iR(n){let e=jd.parse(n);return(t,i,r,s)=>{let{text:l,ranges:o}=e.instantiate(t.state,r),f={changes:{from:r,to:s,insert:St.of(l)},scrollIntoView:!0};if(o.length&&(f.selection=Fd(o,0)),o.length>1){let u=new Hl(o,0),h=f.effects=[pa.of(u)];t.state.field(ra,!1)===void 0&&h.push(Ie.appendConfig.of([ra,oR,aR,ey]))}t.dispatch(t.state.update(f))}}function ty(n){return({state:e,dispatch:t})=>{let i=e.field(ra,!1);if(!i||n<0&&i.active==0)return!1;let r=i.active+n,s=n>0&&!i.ranges.some(l=>l.field==r+n);return t(e.update({selection:Fd(i.ranges,r),effects:pa.of(s?null:new Hl(i.ranges,r))})),!0}}const nR=({state:n,dispatch:e})=>n.field(ra,!1)?(e(n.update({effects:pa.of(null)})),!0):!1,rR=ty(1),sR=ty(-1),lR=[{key:"Tab",run:rR,shift:sR},{key:"Escape",run:nR}],y0=ye.define({combine(n){return n.length?n[0]:lR}}),oR=tl.highest(fa.compute([y0],n=>n.facet(y0)));function nr(n,e){return Object.assign(Object.assign({},e),{apply:iR(n)})}const aR=me.domEventHandlers({mousedown(n,e){let t=e.state.field(ra,!1),i;if(!t||(i=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let r=t.ranges.find(s=>s.from<=i&&s.to>=i);return!r||r.field==t.active?!1:(e.dispatch({selection:Fd(t.ranges,r.field),effects:pa.of(t.ranges.some(s=>s.field>r.field)?new Hl(t.ranges,r.field):null)}),!0)}}),sa={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Gs=Ie.define({map(n,e){let t=e.mapPos(n,-1,Zi.TrackAfter);return t??void 0}}),Gd=Ie.define({map(n,e){return e.mapPos(n)}}),Hd=new class extends Ks{};Hd.startSide=1;Hd.endSide=-1;const iy=Qi.define({create(){return Qt.empty},update(n,e){if(e.selection){let t=e.state.doc.lineAt(e.selection.main.head).from,i=e.startState.doc.lineAt(e.startState.selection.main.head).from;t!=e.changes.mapPos(i,-1)&&(n=Qt.empty)}n=n.map(e.changes);for(let t of e.effects)t.is(Gs)?n=n.update({add:[Hd.range(t.value,t.value+1)]}):t.is(Gd)&&(n=n.update({filter:i=>i!=t.value}));return n}});function fR(){return[uR,iy]}const rO="()[]{}<>";function ny(n){for(let e=0;e{if((cR?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let r=n.state.selection.main;if(i.length>2||i.length==2&&yn(Xi(i,0))==1||e!=r.from||t!=r.to)return!1;let s=dR(n.state,i);return s?(n.dispatch(s),!0):!1}),hR=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let i=ry(n,n.selection.main.head).brackets||sa.brackets,r=null,s=n.changeByRange(l=>{if(l.empty){let o=pR(n.doc,l.head);for(let f of i)if(f==o&&ru(n.doc,l.head)==ny(Xi(f,0)))return{changes:{from:l.head-f.length,to:l.head+f.length},range:K.cursor(l.head-f.length)}}return{range:r=l}});return r||e(n.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},OR=[{key:"Backspace",run:hR}];function dR(n,e){let t=ry(n,n.selection.main.head),i=t.brackets||sa.brackets;for(let r of i){let s=ny(Xi(r,0));if(e==r)return s==r?SR(n,r,i.indexOf(r+r+r)>-1,t):gR(n,r,s,t.before||sa.before);if(e==s&&sy(n,n.selection.main.from))return mR(n,r,s)}return null}function sy(n,e){let t=!1;return n.field(iy).between(0,n.doc.length,i=>{i==e&&(t=!0)}),t}function ru(n,e){let t=n.sliceString(e,e+2);return t.slice(0,yn(Xi(t,0)))}function pR(n,e){let t=n.sliceString(e-2,e);return yn(Xi(t,0))==t.length?t:t.slice(1)}function gR(n,e,t,i){let r=null,s=n.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:t,from:l.to}],effects:Gs.of(l.to+e.length),range:K.range(l.anchor+e.length,l.head+e.length)};let o=ru(n.doc,l.head);return!o||/\s/.test(o)||i.indexOf(o)>-1?{changes:{insert:e+t,from:l.head},effects:Gs.of(l.head+e.length),range:K.cursor(l.head+e.length)}:{range:r=l}});return r?null:n.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function mR(n,e,t){let i=null,r=n.selection.ranges.map(s=>s.empty&&ru(n.doc,s.head)==t?K.cursor(s.head+t.length):i=s);return i?null:n.update({selection:K.create(r,n.selection.mainIndex),scrollIntoView:!0,effects:n.selection.ranges.map(({from:s})=>Gd.of(s))})}function SR(n,e,t,i){let r=i.stringPrefixes||sa.stringPrefixes,s=null,l=n.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:e,from:o.to}],effects:Gs.of(o.to+e.length),range:K.range(o.anchor+e.length,o.head+e.length)};let f=o.head,u=ru(n.doc,f),h;if(u==e){if(v0(n,f))return{changes:{insert:e+e,from:f},effects:Gs.of(f+e.length),range:K.cursor(f+e.length)};if(sy(n,f)){let O=t&&n.sliceDoc(f,f+e.length*3)==e+e+e;return{range:K.cursor(f+e.length*(O?3:1)),effects:Gd.of(f)}}}else{if(t&&n.sliceDoc(f-2*e.length,f)==e+e&&(h=P0(n,f-2*e.length,r))>-1&&v0(n,h))return{changes:{insert:e+e+e+e,from:f},effects:Gs.of(f+e.length),range:K.cursor(f+e.length)};if(n.charCategorizer(f)(u)!=zt.Word&&P0(n,f,r)>-1&&!bR(n,f,e,r))return{changes:{insert:e+e,from:f},effects:Gs.of(f+e.length),range:K.cursor(f+e.length)}}return{range:s=o}});return s?null:n.update(l,{scrollIntoView:!0,userEvent:"input.type"})}function v0(n,e){let t=ei(n).resolveInner(e+1);return t.parent&&t.from==e}function bR(n,e,t,i){let r=ei(n).resolveInner(e,-1),s=i.reduce((l,o)=>Math.max(l,o.length),0);for(let l=0;l<5;l++){let o=n.sliceDoc(r.from,Math.min(r.to,r.from+t.length+s)),f=o.indexOf(t);if(!f||f>-1&&i.indexOf(o.slice(0,f))>-1){let h=r.firstChild;for(;h&&h.from==r.from&&h.to-h.from>t.length+f;){if(n.sliceDoc(h.to-t.length,h.to)==t)return!1;h=h.firstChild}return!0}let u=r.to==e&&r.parent;if(!u)break;r=u}return!1}function P0(n,e,t){let i=n.charCategorizer(e);if(i(n.sliceDoc(e-1,e))!=zt.Word)return e;for(let r of t){let s=e-r.length;if(n.sliceDoc(s,e)==r&&i(n.sliceDoc(s-1,s))!=zt.Word)return s}return-1}function $R(n={}){return[En,Nn.of(n),HZ,QR,ey]}const ly=[{key:"Ctrl-Space",run:LZ},{key:"Escape",run:BZ},{key:"ArrowDown",run:Lf(!0)},{key:"ArrowUp",run:Lf(!1)},{key:"PageDown",run:Lf(!0,"page")},{key:"PageUp",run:Lf(!1,"page")},{key:"Enter",run:NZ}],QR=tl.highest(fa.computeN([Nn],n=>n.facet(Nn).defaultKeymap?[ly]:[]));class wR{constructor(e,t,i){this.from=e,this.to=t,this.diagnostic=i}}class Bs{constructor(e,t,i){this.diagnostics=e,this.panel=t,this.selected=i}static init(e,t,i){let r=e,s=i.facet(_l).markerFilter;s&&(r=s(r));let l=Ze.set(r.map(o=>o.from==o.to||o.from==o.to-1&&i.doc.lineAt(o.from).to==o.from?Ze.widget({widget:new TR(o),diagnostic:o}).range(o.from):Ze.mark({attributes:{class:"cm-lintRange cm-lintRange-"+o.severity},diagnostic:o}).range(o.from,o.to)),!0);return new Bs(l,t,zl(l))}}function zl(n,e=null,t=0){let i=null;return n.between(t,1e9,(r,s,{spec:l})=>{if(!(e&&l.diagnostic!=e))return i=new wR(r,s,l.diagnostic),!1}),i}function yR(n,e){return!!(n.effects.some(t=>t.is(Kd))||n.changes.touchesRange(e.pos))}function oy(n,e){return n.field(Pn,!1)?e:e.concat(Ie.appendConfig.of([Pn,me.decorations.compute([Pn],t=>{let{selected:i,panel:r}=t.field(Pn);return!i||!r||i.from==i.to?Ze.none:Ze.set([PR.range(i.from,i.to)])}),k5(kR,{hideOn:yR}),RR]))}function vR(n,e){return{effects:oy(n,[Kd.of(e)])}}const Kd=Ie.define(),Jd=Ie.define(),ay=Ie.define(),Pn=Qi.define({create(){return new Bs(Ze.none,null,null)},update(n,e){if(e.docChanged){let t=n.diagnostics.map(e.changes),i=null;if(n.selected){let r=e.changes.mapPos(n.selected.from,1);i=zl(t,n.selected.diagnostic,r)||zl(t,null,r)}n=new Bs(t,n.panel,i)}for(let t of e.effects)t.is(Kd)?n=Bs.init(t.value,n.panel,e.state):t.is(Jd)?n=new Bs(n.diagnostics,t.value?su.open:null,n.selected):t.is(ay)&&(n=new Bs(n.diagnostics,n.panel,t.value));return n},provide:n=>[Jo.from(n,e=>e.panel),me.decorations.from(n,e=>e.diagnostics)]}),PR=Ze.mark({class:"cm-lintRange cm-lintRange-active"});function kR(n,e,t){let{diagnostics:i}=n.state.field(Pn),r=[],s=2e8,l=0;i.between(e-(t<0?1:0),e+(t>0?1:0),(f,u,{spec:h})=>{e>=f&&e<=u&&(f==u||(e>f||t>0)&&(ecy(n,t,!1)))}const WR=n=>{let e=n.state.field(Pn,!1);(!e||!e.panel)&&n.dispatch({effects:oy(n.state,[Jd.of(!0)])});let t=Ko(n,su.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},k0=n=>{let e=n.state.field(Pn,!1);return!e||!e.panel?!1:(n.dispatch({effects:Jd.of(!1)}),!0)},xR=n=>{let e=n.state.field(Pn,!1);if(!e)return!1;let t=n.state.selection.main,i=e.diagnostics.iter(t.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==t.from&&i.to==t.to)?!1:(n.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},CR=[{key:"Mod-Shift-m",run:WR,preventDefault:!0},{key:"F8",run:xR}],XR=hi.fromClass(class{constructor(n){this.view=n,this.timeout=-1,this.set=!0;let{delay:e}=n.state.facet(_l);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){let n=Date.now();if(nPromise.resolve(i(this.view)))).then(i=>{let r=i.reduce((s,l)=>s.concat(l));this.view.state.doc==e.doc&&this.view.dispatch(vR(this.view.state,r))},i=>{kn(this.view.state,i)})}}update(n){let e=n.state.facet(_l);(n.docChanged||e!=n.startState.facet(_l))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),_l=ye.define({combine(n){return Object.assign({sources:n.map(e=>e.source)},Wr(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null}))},enables:XR});function fy(n){let e=[];if(n)e:for(let{name:t}of n){for(let i=0;is.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function cy(n,e,t){var i;let r=t?fy(e.actions):[];return Xt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Xt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(i=e.actions)===null||i===void 0?void 0:i.map((s,l)=>{let o=O=>{O.preventDefault();let p=zl(n.state.field(Pn).diagnostics,e);p&&s.apply(n,p.from,p.to)},{name:f}=s,u=r[l]?f.indexOf(r[l]):-1,h=u<0?f:[f.slice(0,u),Xt("u",f.slice(u,u+1)),f.slice(u+1)];return Xt("button",{type:"button",class:"cm-diagnosticAction",onclick:o,onmousedown:o,"aria-label":` Action: ${f}${u<0?"":` (access key "${r[l]})"`}.`},h)}),e.source&&Xt("div",{class:"cm-diagnosticSource"},e.source))}class TR extends Cs{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Xt("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class _0{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=cy(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class su{constructor(e){this.view=e,this.items=[];let t=r=>{if(r.keyCode==27)k0(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],l=fy(s.actions);for(let o=0;o{for(let s=0;sk0(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Pn).selected;if(!e)return-1;for(let t=0;t{let u=-1,h;for(let O=i;Oi&&(this.items.splice(i,u-i),r=!0)),t&&h.diagnostic==t.diagnostic?h.dom.hasAttribute("aria-selected")||(h.dom.setAttribute("aria-selected","true"),s=h):h.dom.hasAttribute("aria-selected")&&h.dom.removeAttribute("aria-selected"),i++});i({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:l,panel:o})=>{l.topo.bottom&&(this.list.scrollTop+=l.bottom-o.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)t();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Pn),i=zl(t.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:ay.of(i)})}static open(e){return new su(e)}}function ZR(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(n)}')`}function sO(n){return ZR(``,'width="6" height="3"')}const RR=me.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:sO("#d11")},".cm-lintRange-warning":{backgroundImage:sO("orange")},".cm-lintRange-info":{backgroundImage:sO("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),AR=(()=>[U5(),q5(),r5(),nT(),CX(),B3(),K3(),ut.allowMultipleSelections.of(!0),SX(),tw(RX,{fallback:!0}),MX(),fR(),$R(),g5(),b5(),c5(),oZ(),fa.of([...OR,...tZ,...kZ,...hT,..._X,...ly,...CR])])(),Pi=({variant:n,settings:e,styles:t})=>{const i=me.theme({"&":{backgroundColor:e.background,color:e.foreground},".cm-content":{caretColor:e.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:e.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:e.selection},".cm-activeLine":{backgroundColor:e.lineHighlight},".cm-gutters":{backgroundColor:e.gutterBackground,color:e.gutterForeground},".cm-activeLineGutter":{backgroundColor:e.lineHighlight}},{dark:n==="dark"}),r=Oa.define(t);return[i,tw(r)]};Pi({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:S.comment,color:"#404080"},{tag:[S.string,S.regexp],color:"#999999"},{tag:S.number,color:"#7090B0"},{tag:[S.bool,S.null],color:"#8080A0"},{tag:[S.punctuation,S.derefOperator],color:"#805080"},{tag:S.keyword,color:"#60B0FF"},{tag:S.definitionKeyword,color:"#B0FFF0"},{tag:S.moduleKeyword,color:"#60B0FF"},{tag:S.operator,color:"#A0A0FF"},{tag:[S.variableName,S.self],color:"#008080"},{tag:S.operatorKeyword,color:"#A0A0FF"},{tag:S.controlKeyword,color:"#80A0FF"},{tag:S.className,color:"#70E080"},{tag:[S.function(S.propertyName),S.propertyName],color:"#50A0A0"},{tag:S.tagName,color:"#009090"},{tag:S.modifier,color:"#B0FFF0"},{tag:[S.squareBracket,S.attributeName],color:"#D0D0FF"}]});Pi({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:S.comment,color:"#787b8099"},{tag:S.string,color:"#86b300"},{tag:S.regexp,color:"#4cbf99"},{tag:[S.number,S.bool,S.null],color:"#ffaa33"},{tag:S.variableName,color:"#5c6166"},{tag:[S.definitionKeyword,S.modifier],color:"#fa8d3e"},{tag:[S.keyword,S.special(S.brace)],color:"#fa8d3e"},{tag:S.operator,color:"#ed9366"},{tag:S.separator,color:"#5c6166b3"},{tag:S.punctuation,color:"#5c6166"},{tag:[S.definition(S.propertyName),S.function(S.variableName)],color:"#f2ae49"},{tag:[S.className,S.definition(S.typeName)],color:"#22a4e6"},{tag:[S.tagName,S.typeName,S.self,S.labelName],color:"#55b4d4"},{tag:S.angleBracket,color:"#55b4d480"},{tag:S.attributeName,color:"#f2ae49"}]});Pi({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:S.comment,color:"#6E6E6E"},{tag:[S.string,S.regexp,S.special(S.brace)],color:"#5C81B3"},{tag:S.number,color:"#C1E1B8"},{tag:S.bool,color:"#53667D"},{tag:[S.definitionKeyword,S.modifier,S.function(S.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[S.keyword,S.moduleKeyword,S.operatorKeyword,S.operator],color:"#697A8E",fontWeight:"bold"},{tag:[S.variableName,S.attributeName],color:"#708E67"},{tag:[S.function(S.variableName),S.definition(S.propertyName),S.derefOperator],color:"#fff"},{tag:S.tagName,color:"#A3D295"}]});Pi({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:S.comment,color:"#666666"},{tag:[S.string,S.special(S.brace)],color:"#54BE0D"},{tag:S.regexp,color:"#E9C062"},{tag:S.number,color:"#CF6A4C"},{tag:[S.keyword,S.operator],color:"#5EA6EA"},{tag:S.variableName,color:"#7587A6"},{tag:[S.definitionKeyword,S.modifier],color:"#F9EE98"},{tag:[S.propertyName,S.function(S.variableName)],color:"#937121"},{tag:[S.typeName,S.angleBracket,S.tagName],color:"#9B859D"}]});Pi({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:S.comment,color:"#6B4E32"},{tag:[S.keyword,S.operator,S.derefOperator],color:"#EF5D32"},{tag:S.className,color:"#EFAC32",fontWeight:"bold"},{tag:[S.typeName,S.propertyName,S.function(S.variableName),S.definition(S.variableName)],color:"#EFAC32"},{tag:S.definition(S.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:S.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[S.number,S.bool],color:"#6C99BB"},{tag:[S.variableName,S.self],color:"#7DAF9C"},{tag:[S.string,S.special(S.brace),S.regexp],color:"#D9D762"},{tag:[S.angleBracket,S.tagName,S.attributeName],color:"#EFCB43"}]});Pi({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:S.comment,color:"#404040"},{tag:[S.string,S.special(S.brace),S.regexp],color:"#00D8FF"},{tag:S.number,color:"#E62286"},{tag:[S.variableName,S.attributeName,S.self],color:"#E62286",fontWeight:"bold"},{tag:S.function(S.variableName),color:"#fff",fontWeight:"bold"}]});Pi({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:S.comment,color:"#BCC8BA"},{tag:[S.string,S.special(S.brace),S.regexp],color:"#5D90CD"},{tag:[S.number,S.bool,S.null],color:"#46A609"},{tag:S.keyword,color:"#AF956F"},{tag:[S.definitionKeyword,S.modifier],color:"#C52727"},{tag:[S.angleBracket,S.tagName,S.attributeName],color:"#606060"},{tag:S.self,color:"#000"}]});Pi({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:S.comment,color:"#0088FF"},{tag:S.string,color:"#3AD900"},{tag:S.regexp,color:"#80FFC2"},{tag:[S.number,S.bool,S.null],color:"#FF628C"},{tag:[S.definitionKeyword,S.modifier],color:"#FFEE80"},{tag:S.variableName,color:"#CCCCCC"},{tag:S.self,color:"#FF80E1"},{tag:[S.className,S.definition(S.propertyName),S.function(S.variableName),S.definition(S.typeName),S.labelName],color:"#FFDD00"},{tag:[S.keyword,S.operator],color:"#FF9D00"},{tag:[S.propertyName,S.typeName],color:"#80FFBB"},{tag:S.special(S.brace),color:"#EDEF7D"},{tag:S.attributeName,color:"#9EFFFF"},{tag:S.derefOperator,color:"#fff"}]});Pi({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:S.comment,color:"#AEAEAE"},{tag:[S.string,S.special(S.brace),S.regexp],color:"#8DFF8E"},{tag:[S.className,S.definition(S.propertyName),S.function(S.variableName),S.function(S.definition(S.variableName)),S.definition(S.typeName)],color:"#A3EBFF"},{tag:[S.number,S.bool,S.null],color:"#62E9BD"},{tag:[S.keyword,S.operator],color:"#2BF1DC"},{tag:[S.definitionKeyword,S.modifier],color:"#F8FBB1"},{tag:[S.variableName,S.self],color:"#B683CA"},{tag:[S.angleBracket,S.tagName,S.typeName,S.propertyName],color:"#60A4F1"},{tag:S.derefOperator,color:"#E0E0E0"},{tag:S.attributeName,color:"#7BACCA"}]});Pi({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:S.comment,color:"#6272a4"},{tag:[S.string,S.special(S.brace)],color:"#f1fa8c"},{tag:[S.number,S.self,S.bool,S.null],color:"#bd93f9"},{tag:[S.keyword,S.operator],color:"#ff79c6"},{tag:[S.definitionKeyword,S.typeName],color:"#8be9fd"},{tag:S.definition(S.typeName),color:"#f8f8f2"},{tag:[S.className,S.definition(S.propertyName),S.function(S.variableName),S.attributeName],color:"#50fa7b"}]});Pi({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:S.comment,color:"#AAAAAA"},{tag:[S.keyword,S.operator,S.typeName,S.tagName,S.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[S.attributeName,S.definition(S.propertyName)],color:"#4F9FD0"},{tag:[S.className,S.string,S.special(S.brace)],color:"#CF4F5F"},{tag:S.number,color:"#CF4F5F",fontWeight:"bold"},{tag:S.variableName,fontWeight:"bold"}]});Pi({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:S.comment,color:"#9995b7"},{tag:S.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[S.definitionKeyword,S.modifier],color:"#ff5792"},{tag:[S.className,S.tagName,S.definition(S.typeName)],color:"#0094f0"},{tag:[S.number,S.bool,S.null,S.special(S.brace)],color:"#5842ff"},{tag:[S.definition(S.propertyName),S.function(S.variableName)],color:"#0095a8"},{tag:S.typeName,color:"#b3694d"},{tag:[S.propertyName,S.variableName],color:"#fa8900"},{tag:S.operator,color:"#ff5792"},{tag:S.self,color:"#e64100"},{tag:[S.string,S.regexp],color:"#00b368"},{tag:[S.paren,S.bracket],color:"#0431fa"},{tag:S.labelName,color:"#00bdd6"},{tag:S.attributeName,color:"#e64100"},{tag:S.angleBracket,color:"#9995b7"}]});Pi({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:S.comment,color:"#9893a5"},{tag:[S.bool,S.null],color:"#286983"},{tag:S.number,color:"#d7827e"},{tag:S.className,color:"#d7827e"},{tag:[S.angleBracket,S.tagName,S.typeName],color:"#56949f"},{tag:S.attributeName,color:"#907aa9"},{tag:S.punctuation,color:"#797593"},{tag:[S.keyword,S.modifier],color:"#286983"},{tag:[S.string,S.regexp],color:"#ea9d34"},{tag:S.variableName,color:"#d7827e"}]});Pi({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:S.comment,color:"#CFCFCF"},{tag:[S.number,S.bool,S.null],color:"#E66C29"},{tag:[S.className,S.definition(S.propertyName),S.function(S.variableName),S.labelName,S.definition(S.typeName)],color:"#2EB43B"},{tag:S.keyword,color:"#D8B229"},{tag:S.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[S.definitionKeyword,S.modifier],color:"#925A47"},{tag:S.string,color:"#704D3D"},{tag:S.typeName,color:"#2F8996"},{tag:[S.variableName,S.propertyName],color:"#77ACB0"},{tag:S.self,color:"#77ACB0",fontWeight:"bold"},{tag:S.regexp,color:"#E3965E"},{tag:[S.tagName,S.angleBracket],color:"#BAA827"},{tag:S.attributeName,color:"#B06520"},{tag:S.derefOperator,color:"#000"}]});Pi({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:S.comment,color:"#93A1A1"},{tag:S.string,color:"#2AA198"},{tag:S.regexp,color:"#D30102"},{tag:S.number,color:"#D33682"},{tag:S.variableName,color:"#268BD2"},{tag:[S.keyword,S.operator,S.punctuation],color:"#859900"},{tag:[S.definitionKeyword,S.modifier],color:"#073642",fontWeight:"bold"},{tag:[S.className,S.self,S.definition(S.propertyName)],color:"#268BD2"},{tag:S.function(S.variableName),color:"#268BD2"},{tag:[S.bool,S.null],color:"#B58900"},{tag:S.tagName,color:"#268BD2",fontWeight:"bold"},{tag:S.angleBracket,color:"#93A1A1"},{tag:S.attributeName,color:"#93A1A1"},{tag:S.typeName,color:"#859900"}]});Pi({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:S.comment,color:"#8E908C"},{tag:[S.variableName,S.self,S.propertyName,S.attributeName,S.regexp],color:"#C82829"},{tag:[S.number,S.bool,S.null],color:"#F5871F"},{tag:[S.className,S.typeName,S.definition(S.typeName)],color:"#C99E00"},{tag:[S.string,S.special(S.brace)],color:"#718C00"},{tag:S.operator,color:"#3E999F"},{tag:[S.definition(S.propertyName),S.function(S.variableName)],color:"#4271AE"},{tag:S.keyword,color:"#8959A8"},{tag:S.derefOperator,color:"#4D4D4C"}]});const UR=Bl({String:S.string,Number:S.number,"True False":S.bool,PropertyName:S.propertyName,Null:S.null,",":S.separator,"[ ]":S.squareBracket,"{ }":S.brace}),YR=_s.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[UR],skippedNodes:[0],repeatNodeCount:2,tokenData:"(p~RaXY!WYZ!W]^!Wpq!Wrs!]|}$i}!O$n!Q!R$w!R![&V![!]&h!}#O&m#P#Q&r#Y#Z&w#b#c'f#h#i'}#o#p(f#q#r(k~!]Oc~~!`Upq!]qr!]rs!rs#O!]#O#P!w#P~!]~!wOe~~!zXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#g~#jR!Q![#s!c!i#s#T#Z#s~#vR!Q![$P!c!i$P#T#Z$P~$SR!Q![$]!c!i$]#T#Z$]~$`R!Q![!]!c!i!]#T#Z!]~$nOh~~$qQ!Q!R$w!R![&V~$|RT~!O!P%V!g!h%k#X#Y%k~%YP!Q![%]~%bRT~!Q![%]!g!h%k#X#Y%k~%nR{|%w}!O%w!Q![%}~%zP!Q![%}~&SPT~!Q![%}~&[ST~!O!P%V!Q![&V!g!h%k#X#Y%k~&mOg~~&rO]~~&wO[~~&zP#T#U&}~'QP#`#a'T~'WP#g#h'Z~'^P#X#Y'a~'fOR~~'iP#i#j'l~'oP#`#a'r~'uP#`#a'x~'}OS~~(QP#f#g(T~(WP#i#j(Z~(^P#X#Y(a~(fOQ~~(kOW~~(pOV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),VR=Ws.define({name:"json",parser:YR.configure({props:[jl.add({Object:Al({except:/^\s*\}/}),Array:Al({except:/^\s*\]/})}),Fl.add({"Object Array":br})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function qR(){return new ua(VR)}const ER=54,MR=1,DR=55,zR=2,IR=56,NR=3,W0=4,LR=5,Vc=6,uy=7,hy=8,Oy=9,dy=10,BR=11,jR=12,FR=13,lO=57,GR=14,x0=58,py=20,HR=22,gy=23,KR=24,Od=26,my=27,JR=28,eA=31,tA=34,iA=36,nA=37,rA=0,sA=1,lA={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},oA={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},C0={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function aA(n){return n==45||n==46||n==58||n>=65&&n<=90||n==95||n>=97&&n<=122||n>=161}function Sy(n){return n==9||n==10||n==13||n==32}let X0=null,T0=null,Z0=0;function dd(n,e){let t=n.pos+e;if(Z0==t&&T0==n)return X0;let i=n.peek(e);for(;Sy(i);)i=n.peek(++e);let r="";for(;aA(i);)r+=String.fromCharCode(i),i=n.peek(++e);return T0=n,Z0=t,X0=r?r.toLowerCase():i==fA||i==cA?void 0:null}const by=60,qc=62,ep=47,fA=63,cA=33,uA=45;function R0(n,e){this.name=n,this.parent=e,this.hash=e?e.hash:0;for(let t=0;t-1?new R0(dd(i,1)||"",n):n},reduce(n,e){return e==py&&n?n.parent:n},reuse(n,e,t,i){let r=e.type.id;return r==Vc||r==iA?new R0(dd(i,1)||"",n):n},hash(n){return n?n.hash:0},strict:!1}),dA=new xr((n,e)=>{if(n.next!=by){n.next<0&&e.context&&n.acceptToken(lO);return}n.advance();let t=n.next==ep;t&&n.advance();let i=dd(n,0);if(i===void 0)return;if(!i)return n.acceptToken(t?GR:Vc);let r=e.context?e.context.name:null;if(t){if(i==r)return n.acceptToken(BR);if(r&&oA[r])return n.acceptToken(lO,-2);if(e.dialectEnabled(rA))return n.acceptToken(jR);for(let s=e.context;s;s=s.parent)if(s.name==i)return;n.acceptToken(FR)}else{if(i=="script")return n.acceptToken(uy);if(i=="style")return n.acceptToken(hy);if(i=="textarea")return n.acceptToken(Oy);if(lA.hasOwnProperty(i))return n.acceptToken(dy);r&&C0[r]&&C0[r][i]?n.acceptToken(lO,-1):n.acceptToken(Vc)}},{contextual:!0}),pA=new xr(n=>{for(let e=0,t=0;;t++){if(n.next<0){t&&n.acceptToken(x0);break}if(n.next==uA)e++;else if(n.next==qc&&e>=2){t>3&&n.acceptToken(x0,-2);break}else e=0;n.advance()}});function gA(n){for(;n;n=n.parent)if(n.name=="svg"||n.name=="math")return!0;return!1}const mA=new xr((n,e)=>{if(n.next==ep&&n.peek(1)==qc){let t=e.dialectEnabled(sA)||gA(e.context);n.acceptToken(t?LR:W0,2)}else n.next==qc&&n.acceptToken(W0,1)});function tp(n,e,t){let i=2+n.length;return new xr(r=>{for(let s=0,l=0,o=0;;o++){if(r.next<0){o&&r.acceptToken(e);break}if(s==0&&r.next==by||s==1&&r.next==ep||s>=2&&sl?r.acceptToken(e,-l):r.acceptToken(t,-(l-2));break}else if((r.next==10||r.next==13)&&o){r.acceptToken(e,1);break}else s=l=0;r.advance()}})}const SA=tp("script",ER,MR),bA=tp("style",DR,zR),$A=tp("textarea",IR,NR),QA=Bl({"Text RawText":S.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":S.angleBracket,TagName:S.tagName,"MismatchedCloseTag/TagName":[S.tagName,S.invalid],AttributeName:S.attributeName,"AttributeValue UnquotedAttributeValue":S.attributeValue,Is:S.definitionOperator,"EntityReference CharacterReference":S.character,Comment:S.blockComment,ProcessingInst:S.processingInstruction,DoctypeDecl:S.documentMeta}),wA=_s.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO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O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:OA,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[QA],skippedNodes:[0],repeatNodeCount:9,tokenData:"#%g!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q$q!Q![-_![!]!!O!]!^-_!^!_!&W!_!`#$o!`!a&X!a!c-_!c!}!!O!}#R-_#R#S!!O#S#T3V#T#o!!O#o#s-_#s$f$q$f%W-_%W%o!!O%o%p-_%p&a!!O&a&b-_&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qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!`!G_!`!a!Mm!a#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!V#$lP;=`<%l!Ey!V#$zXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[SA,bA,$A,mA,dA,pA,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:485},tokenPrec:487});function $y(n,e){let t=Object.create(null);for(let i of n.getChildren(gy)){let r=i.getChild(KR),s=i.getChild(Od)||i.getChild(my);r&&(t[e.read(r.from,r.to)]=s?s.type.id==Od?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return t}function A0(n,e){let t=n.getChild(HR);return t?e.read(t.from,t.to):" "}function oO(n,e,t){let i;for(let r of t)if(!r.attrs||r.attrs(i||(i=$y(n.node.parent.firstChild,e))))return{parser:r.parser};return null}function Qy(n=[],e=[]){let t=[],i=[],r=[],s=[];for(let o of n)(o.tag=="script"?t:o.tag=="style"?i:o.tag=="textarea"?r:s).push(o);let l=e.length?Object.create(null):null;for(let o of e)(l[o.name]||(l[o.name]=[])).push(o);return UC((o,f)=>{let u=o.type.id;if(u==JR)return oO(o,f,t);if(u==eA)return oO(o,f,i);if(u==tA)return oO(o,f,r);if(u==py&&s.length){let h=o.node,O=h.firstChild,p=O&&A0(O,f),g;if(p){for(let b of s)if(b.tag==p&&(!b.attrs||b.attrs(g||(g=$y(h,f))))){let Q=h.lastChild;return{parser:b.parser,overlay:[{from:O.to,to:Q.type.id==nA?Q.from:h.to}]}}}}if(l&&u==gy){let h=o.node,O;if(O=h.firstChild){let p=l[f.read(O.from,O.to)];if(p)for(let g of p){if(g.tagName&&g.tagName!=A0(h.parent,f))continue;let b=h.lastChild;if(b.type.id==Od){let Q=b.from+1,$=b.lastChild,P=b.to-($&&$.isError?0:1);if(P>Q)return{parser:g.parser,overlay:[{from:Q,to:P}]}}else if(b.type.id==my)return{parser:g.parser,overlay:[{from:b.from,to:b.to}]}}}}return null})}const yA=95,U0=1,vA=96,PA=97,Y0=2,wy=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],kA=58,_A=40,yy=95,WA=91,sc=45,xA=46,CA=35,XA=37;function Ec(n){return n>=65&&n<=90||n>=97&&n<=122||n>=161}function TA(n){return n>=48&&n<=57}const ZA=new xr((n,e)=>{for(let t=!1,i=0,r=0;;r++){let{next:s}=n;if(Ec(s)||s==sc||s==yy||t&&TA(s))!t&&(s!=sc||r>0)&&(t=!0),i===r&&s==sc&&i++,n.advance();else{t&&n.acceptToken(s==_A?vA:i==2&&e.canShift(Y0)?Y0:PA);break}}}),RA=new xr(n=>{if(wy.includes(n.peek(-1))){let{next:e}=n;(Ec(e)||e==yy||e==CA||e==xA||e==WA||e==kA||e==sc)&&n.acceptToken(yA)}}),AA=new xr(n=>{if(!wy.includes(n.peek(-1))){let{next:e}=n;if(e==XA&&(n.advance(),n.acceptToken(U0)),Ec(e)){do n.advance();while(Ec(n.next));n.acceptToken(U0)}}}),UA=Bl({"AtKeyword import charset namespace keyframes media supports":S.definitionKeyword,"from to selector":S.keyword,NamespaceName:S.namespace,KeyframeName:S.labelName,KeyframeRangeName:S.operatorKeyword,TagName:S.tagName,ClassName:S.className,PseudoClassName:S.constant(S.className),IdName:S.labelName,"FeatureName PropertyName":S.propertyName,AttributeName:S.attributeName,NumberLiteral:S.number,KeywordQuery:S.keyword,UnaryQueryOp:S.operatorKeyword,"CallTag ValueName":S.atom,VariableName:S.variableName,Callee:S.operatorKeyword,Unit:S.unit,"UniversalSelector NestingSelector":S.definitionOperator,MatchOp:S.compareOperator,"ChildOp SiblingOp, LogicOp":S.logicOperator,BinOp:S.arithmeticOperator,Important:S.modifier,Comment:S.blockComment,ColorLiteral:S.color,"ParenthesizedContent StringLiteral":S.string,":":S.punctuation,"PseudoOp #":S.derefOperator,"; ,":S.separator,"( )":S.paren,"[ ]":S.squareBracket,"{ }":S.brace}),YA={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},VA={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},qA={__proto__:null,not:128,only:128},EA=_s.deserialize({version:14,states:"8`QYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ee'#EeO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&WQ[O'#EPO&fQ[O'#EROOQS'#Ed'#EdOOQS'#ET'#ETQYQ[OOO&mQXO'#CdO'bQWO'#DaO'gQWO'#EkO'rQ[O'#EkQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'|Q[O'#EWO(hQWO,58{O(pQ[O,59SO$lQ[O,59kO$qQ[O,59oO'|Q[O,59sO'|Q[O,59uO'|Q[O,59vO({Q[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)SQWO,59SO)XQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)^Q`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)fQvO'#CsO*sQtO,5:POOQO'#Cx'#CxO)XQWO'#CwO+XQWO'#CyOOQS'#Eh'#EhOOQO'#Dh'#DhO+^Q[O'#DoO+lQWO'#ElO&WQ[O'#DmO+zQWO'#DpOOQO'#Em'#EmO(kQWO,5:^O,PQpO,5:`OOQS'#Dx'#DxO,XQWO,5:bO,^Q[O,5:bOOQO'#D{'#D{O,fQWO,5:eO,kQWO,5:kO,sQWO,5:mOOQS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^;'S;=`%o<%lO%^XJmS!`PoWOy%^z;'S%^;'S;=`%o<%lO%^XJ|UOy%^z#f%^#f#gJf#g;'S%^;'S;=`%o<%lO%^ZKeS!RROy%^z;'S%^;'S;=`%o<%lO%^_KvS!QVOy%^z;'S%^;'S;=`%o<%lO%^ZLXU!PPOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^WLnP;=`<%l$}",tokenizers:[RA,AA,ZA,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:96,get:n=>YA[n]||-1},{term:56,get:n=>VA[n]||-1},{term:97,get:n=>qA[n]||-1}],tokenPrec:1142});let aO=null;function fO(){if(!aO&&typeof document=="object"&&document.body){let{style:n}=document.body,e=[],t=new Set;for(let i in n)i!="cssText"&&i!="cssFloat"&&typeof n[i]=="string"&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),t.has(i)||(e.push(i),t.add(i)));aO=e.sort().map(i=>({type:"property",label:i}))}return aO||[]}const V0=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(n=>({type:"class",label:n})),q0=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(n=>({type:"keyword",label:n})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(n=>({type:"constant",label:n}))),MA=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(n=>({type:"type",label:n})),hs=/^(\w[\w-]*|-\w[\w-]*|)$/,DA=/^-(-[\w-]*)?$/;function zA(n,e){var t;if((n.name=="("||n.type.isError)&&(n=n.parent||n),n.name!="ArgList")return!1;let i=(t=n.parent)===null||t===void 0?void 0:t.firstChild;return(i==null?void 0:i.name)!="Callee"?!1:e.sliceString(i.from,i.to)=="var"}const E0=new VQ,IA=["Declaration"];function NA(n){for(let e=n;;){if(e.type.isTop)return e;if(!(e=e.parent))return n}}function vy(n,e,t){if(e.to-e.from>4096){let i=E0.get(e);if(i)return i;let r=[],s=new Set,l=e.cursor(Ut.IncludeAnonymous);if(l.firstChild())do for(let o of vy(n,l.node,t))s.has(o.label)||(s.add(o.label),r.push(o));while(l.nextSibling());return E0.set(e,r),r}else{let i=[],r=new Set;return e.cursor().iterate(s=>{var l;if(t(s)&&s.matchContext(IA)&&((l=s.node.nextSibling)===null||l===void 0?void 0:l.name)==":"){let o=n.sliceString(s.from,s.to);r.has(o)||(r.add(o),i.push({label:o,type:"variable"}))}}),i}}const LA=n=>e=>{let{state:t,pos:i}=e,r=ei(t).resolveInner(i,-1),s=r.type.isError&&r.from==r.to-1&&t.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(s||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:fO(),validFor:hs};if(r.name=="ValueName")return{from:r.from,options:q0,validFor:hs};if(r.name=="PseudoClassName")return{from:r.from,options:V0,validFor:hs};if(n(r)||(e.explicit||s)&&zA(r,t.doc))return{from:n(r)||s?r.from:i,options:vy(t.doc,NA(r),n),validFor:DA};if(r.name=="TagName"){for(let{parent:f}=r;f;f=f.parent)if(f.name=="Block")return{from:r.from,options:fO(),validFor:hs};return{from:r.from,options:MA,validFor:hs}}if(!e.explicit)return null;let l=r.resolve(i),o=l.childBefore(i);return o&&o.name==":"&&l.name=="PseudoClassSelector"?{from:i,options:V0,validFor:hs}:o&&o.name==":"&&l.name=="Declaration"||l.name=="ArgList"?{from:i,options:q0,validFor:hs}:l.name=="Block"||l.name=="Styles"?{from:i,options:fO(),validFor:hs}:null},BA=LA(n=>n.name=="VariableName"),Mc=Ws.define({name:"css",parser:EA.configure({props:[jl.add({Declaration:Al()}),Fl.add({Block:br})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function jA(){return new ua(Mc,Mc.data.of({autocomplete:BA}))}const M0=302,D0=1,FA=2,z0=303,GA=305,HA=306,KA=3,JA=4,e9=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Py=125,t9=59,I0=47,i9=42,n9=43,r9=45,s9=new MQ({start:!1,shift(n,e){return e==KA||e==JA||e==GA?n:e==HA},strict:!1}),l9=new xr((n,e)=>{let{next:t}=n;(t==Py||t==-1||e.context)&&e.canShift(z0)&&n.acceptToken(z0)},{contextual:!0,fallback:!0}),o9=new xr((n,e)=>{let{next:t}=n,i;e9.indexOf(t)>-1||t==I0&&((i=n.peek(1))==I0||i==i9)||t!=Py&&t!=t9&&t!=-1&&!e.context&&e.canShift(M0)&&n.acceptToken(M0)},{contextual:!0}),a9=new xr((n,e)=>{let{next:t}=n;if((t==n9||t==r9)&&(n.advance(),t==n.next)){n.advance();let i=!e.context&&e.canShift(D0);n.acceptToken(i?D0:FA)}},{contextual:!0}),f9=Bl({"get set async static":S.modifier,"for while do if else switch try catch finally return throw break continue default case":S.controlKeyword,"in of await yield void typeof delete instanceof":S.operatorKeyword,"let var const function class extends":S.definitionKeyword,"import export from":S.moduleKeyword,"with debugger as new":S.keyword,TemplateString:S.special(S.string),super:S.atom,BooleanLiteral:S.bool,this:S.self,null:S.null,Star:S.modifier,VariableName:S.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":S.function(S.variableName),VariableDefinition:S.definition(S.variableName),Label:S.labelName,PropertyName:S.propertyName,PrivatePropertyName:S.special(S.propertyName),"CallExpression/MemberExpression/PropertyName":S.function(S.propertyName),"FunctionDeclaration/VariableDefinition":S.function(S.definition(S.variableName)),"ClassDeclaration/VariableDefinition":S.definition(S.className),PropertyDefinition:S.definition(S.propertyName),PrivatePropertyDefinition:S.definition(S.special(S.propertyName)),UpdateOp:S.updateOperator,LineComment:S.lineComment,BlockComment:S.blockComment,Number:S.number,String:S.string,Escape:S.escape,ArithOp:S.arithmeticOperator,LogicOp:S.logicOperator,BitOp:S.bitwiseOperator,CompareOp:S.compareOperator,RegExp:S.regexp,Equals:S.definitionOperator,Arrow:S.function(S.punctuation),": Spread":S.punctuation,"( )":S.paren,"[ ]":S.squareBracket,"{ }":S.brace,"InterpolationStart InterpolationEnd":S.special(S.brace),".":S.derefOperator,", ;":S.separator,"@":S.meta,TypeName:S.typeName,TypeDefinition:S.definition(S.typeName),"type enum interface implements namespace module declare":S.definitionKeyword,"abstract global Privacy readonly override":S.modifier,"is keyof unique infer":S.operatorKeyword,JSXAttributeValue:S.attributeValue,JSXText:S.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":S.angleBracket,"JSXIdentifier JSXNameSpacedName":S.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":S.attributeName,"JSXBuiltin/JSXIdentifier":S.standard(S.tagName)}),c9={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:221,private:221,protected:221,readonly:223,instanceof:242,satisfies:245,in:246,const:248,import:280,keyof:335,unique:339,infer:345,is:381,abstract:401,implements:403,type:405,let:408,var:410,interface:417,enum:421,namespace:427,module:429,declare:433,global:437,for:456,of:465,while:468,with:472,do:476,if:480,else:482,switch:486,case:492,try:498,catch:502,finally:506,return:510,throw:514,break:518,continue:522,debugger:526},u9={__proto__:null,async:117,get:119,set:121,declare:181,public:183,private:183,protected:183,static:185,abstract:187,override:189,readonly:195,accessor:197,new:385},h9={__proto__:null,"<":137},O9=_s.deserialize({version:14,states:"$6[O`QUOOO%QQUOOO'TQWOOP(bOSOOO*pQ(CjO'#CfO*wOpO'#CgO+VO!bO'#CgO+eO07`O'#DZO-vQUO'#DaO.WQUO'#DlO%QQUO'#DvO0[QUO'#EOOOQ(CY'#EW'#EWO0uQSO'#ETOOQO'#Ei'#EiOOQO'#Ib'#IbO0}QSO'#GkO1YQSO'#EhO1_QSO'#EhO3aQ(CjO'#JcO6QQ(CjO'#JdO6nQSO'#FWO6sQ#tO'#FoOOQ(CY'#F`'#F`O7OO&jO'#F`O7^Q,UO'#FvO8tQSO'#FuOOQ(CY'#Jd'#JdOOQ(CW'#Jc'#JcOOQQ'#KO'#KOO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ape from ; default FunctionDeclaration async function VariableDefinition > TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:364,context:s9,nodeProps:[["group",-26,6,14,16,62,199,203,206,207,209,212,215,225,227,233,235,237,239,242,248,254,256,258,260,262,264,265,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,103,104,113,114,131,134,136,137,138,139,141,142,162,163,165,"Expression",-23,24,26,30,34,36,38,166,168,170,171,173,174,175,177,178,179,181,182,183,193,195,197,198,"Type",-3,84,96,102,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",143,"JSXStartTag",155,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",144,"JSXSelfCloseEndTag JSXEndTag",160,"JSXEndTag"]],propSources:[f9],skippedNodes:[0,3,4,268],repeatNodeCount:33,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(n%d_$d&j'wp'z!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&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$d&j'wp'z!b'n(;d(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[o9,a9,2,3,4,5,6,7,8,9,10,11,12,13,l9,new td("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(T~~",141,326),new td("j~RQYZXz{^~^O'q~~aP!P!Qd~iO'r~~",25,308)],topRules:{Script:[0,5],SingleExpression:[1,266],SingleClassItem:[2,267]},dialects:{jsx:12686,ts:12688},dynamicPrecedences:{76:1,78:1,163:1,191:1},specialized:[{term:312,get:n=>c9[n]||-1},{term:328,get:n=>u9[n]||-1},{term:67,get:n=>h9[n]||-1}],tokenPrec:12712}),d9=[nr("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),nr("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),nr("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),nr("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),nr("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),nr(`try { \${} } catch (\${error}) { \${} -}`,{label:"try",detail:"/ catch block",type:"keyword"}),sr("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),sr(`if (\${}) { +}`,{label:"try",detail:"/ catch block",type:"keyword"}),nr("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),nr(`if (\${}) { \${} } else { \${} -}`,{label:"if",detail:"/ else block",type:"keyword"}),sr(`class \${name} { +}`,{label:"if",detail:"/ else block",type:"keyword"}),nr(`class \${name} { constructor(\${params}) { \${} } -}`,{label:"class",detail:"definition",type:"keyword"}),sr('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),sr('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],I0=new YQ,Py=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Po(n){return(e,t)=>{let i=e.node.getChild("VariableDefinition");return i&&t(i,n),!0}}const p9=["FunctionDeclaration"],g9={FunctionDeclaration:Po("function"),ClassDeclaration:Po("class"),ClassExpression:()=>!0,EnumDeclaration:Po("constant"),TypeAliasDeclaration:Po("type"),NamespaceDeclaration:Po("namespace"),VariableDefinition(n,e){n.matchContext(p9)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function ky(n,e){let t=I0.get(e);if(t)return t;let i=[],r=!0;function s(l,o){let f=n.sliceString(l.from,l.to);i.push({label:f,type:o})}return e.cursor(At.IncludeAnonymous).iterate(l=>{if(r)r=!1;else if(l.name){let o=g9[l.name];if(o&&o(l,s)||Py.has(l.name))return!1}else if(l.to-l.from>8192){for(let o of ky(n,l.node))i.push(o);return!1}}),I0.set(e,i),i}const N0=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,_y=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function m9(n){let e=ti(n.state).resolveInner(n.pos,-1);if(_y.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&N0.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let i=[];for(let r=e;r;r=r.parent)Py.has(r.name)&&(i=i.concat(ky(n.state.doc,r)));return{options:i,from:t?e.from:n.pos,validFor:N0}}const kr=Ws.define({name:"javascript",parser:O9.configure({props:[Bl.add({IfStatement:Rl({except:/^\s*({|else\b)/}),TryStatement:Rl({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:gX,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:i?1:2)*n.unit},Block:Os({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":Rl({except:/^{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),jl.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Sr,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Wy={test:n=>/^JSX/.test(n.name),facet:zQ({commentTokens:{block:{open:"{/*",close:"*/}"}}})},xy=kr.configure({dialect:"ts"},"typescript"),Cy=kr.configure({dialect:"jsx",props:[Zd.add(n=>n.isTop?[Wy]:void 0)]}),Xy=kr.configure({dialect:"jsx ts",props:[Zd.add(n=>n.isTop?[Wy]:void 0)]},"typescript"),S9="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(n=>({label:n,type:"keyword"}));function b9(n={}){let e=n.jsx?n.typescript?Xy:Cy:n.typescript?xy:kr;return new ca(e,[kr.data.of({autocomplete:XZ(_y,jw(d9.concat(S9)))}),kr.data.of({autocomplete:m9}),n.jsx?y9:[]])}function $9(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function L0(n,e,t=n.length){for(let i=e==null?void 0:e.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return n.sliceString(i.from,Math.min(i.to,t));return""}function Q9(n){return n&&(n.name=="JSXEndTag"||n.name=="JSXSelfCloseEndTag")}const w9=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),y9=me.inputHandler.of((n,e,t,i)=>{if((w9?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||i!=">"&&i!="/"||!kr.isActiveAt(n.state,e,-1))return!1;let{state:r}=n,s=r.changeByRange(l=>{var o;let{head:f}=l,u=ti(r).resolveInner(f,-1),h;if(u.name=="JSXStartTag"&&(u=u.parent),!(u.name=="JSXAttributeValue"&&u.to>f)){if(i==">"&&u.name=="JSXFragmentTag")return{range:J.cursor(f+1),changes:{from:f,insert:">"}};if(i=="/"&&u.name=="JSXFragmentTag"){let O=u.parent,p=O==null?void 0:O.parent;if(O.from==f-1&&((o=p.lastChild)===null||o===void 0?void 0:o.name)!="JSXEndTag"&&(h=L0(r.doc,p==null?void 0:p.firstChild,f))){let g=`/${h}>`;return{range:J.cursor(f+g.length),changes:{from:f,insert:g}}}}else if(i==">"){let O=$9(u);if(O&&!Q9(O.lastChild)&&r.sliceDoc(f,f+2)!="`}}}}return{range:l}});return s.changes.empty?!1:(n.dispatch(s,{userEvent:"input.type",scrollIntoView:!0}),!0)}),ko=["_blank","_self","_top","_parent"],aO=["ascii","utf-8","utf-16","latin1","latin1"],fO=["get","post","put","delete"],cO=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],yn=["true","false"],_e={},v9={a:{attrs:{href:null,ping:null,type:null,media:null,target:ko,hreflang:null}},abbr:_e,address:_e,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:_e,aside:_e,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:_e,base:{attrs:{href:null,target:ko}},bdi:_e,bdo:_e,blockquote:{attrs:{cite:null}},body:_e,br:_e,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:cO,formmethod:fO,formnovalidate:["novalidate"],formtarget:ko,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:_e,center:_e,cite:_e,code:_e,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:_e,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:_e,div:_e,dl:_e,dt:_e,em:_e,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:_e,figure:_e,footer:_e,form:{attrs:{action:null,name:null,"accept-charset":aO,autocomplete:["on","off"],enctype:cO,method:fO,novalidate:["novalidate"],target:ko}},h1:_e,h2:_e,h3:_e,h4:_e,h5:_e,h6:_e,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:_e,hgroup:_e,hr:_e,html:{attrs:{manifest:null}},i:_e,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:cO,formmethod:fO,formnovalidate:["novalidate"],formtarget:ko,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:_e,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:_e,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:_e,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:aO,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:_e,noscript:_e,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:_e,param:{attrs:{name:null,value:null}},pre:_e,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:_e,rt:_e,ruby:_e,samp:_e,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:aO}},section:_e,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:_e,source:{attrs:{src:null,type:null,media:null}},span:_e,strong:_e,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:_e,summary:_e,sup:_e,table:_e,tbody:_e,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:_e,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:_e,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:_e,time:{attrs:{datetime:null}},title:_e,tr:_e,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:_e,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:_e},Ty={accesskey:null,class:null,contenteditable:yn,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:yn,autocorrect:yn,autocapitalize:yn,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":yn,"aria-autocomplete":["inline","list","both","none"],"aria-busy":yn,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":yn,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":yn,"aria-hidden":yn,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":yn,"aria-multiselectable":yn,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":yn,"aria-relevant":null,"aria-required":yn,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Zy="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(n=>"on"+n);for(let n of Zy)Ty[n]=null;class Ec{constructor(e,t){this.tags=Object.assign(Object.assign({},v9),e),this.globalAttrs=Object.assign(Object.assign({},Ty),t),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Ec.default=new Ec;function zl(n,e,t=n.length){if(!e)return"";let i=e.firstChild,r=i&&i.getChild("TagName");return r?n.sliceString(r.from,Math.min(r.to,t)):""}function Il(n,e=!1){for(;n;n=n.parent)if(n.name=="Element")if(e)e=!1;else return n;return null}function Ry(n,e,t){let i=t.tags[zl(n,Il(e))];return(i==null?void 0:i.children)||t.allTags}function ep(n,e){let t=[];for(let i=Il(e);i&&!i.type.isTop;i=Il(i.parent)){let r=zl(n,i);if(r&&i.lastChild.name=="CloseTag")break;r&&t.indexOf(r)<0&&(e.name=="EndTag"||e.from>=i.firstChild.to)&&t.push(r)}return t}const Ay=/^[:\-\.\w\u00b7-\uffff]*$/;function B0(n,e,t,i,r){let s=/\s*>/.test(n.sliceDoc(r,r+5))?"":">",l=Il(t,!0);return{from:i,to:r,options:Ry(n.doc,l,e).map(o=>({label:o,type:"type"})).concat(ep(n.doc,t).map((o,f)=>({label:"/"+o,apply:"/"+o+s,type:"type",boost:99-f}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function j0(n,e,t,i){let r=/\s*>/.test(n.sliceDoc(i,i+5))?"":">";return{from:t,to:i,options:ep(n.doc,e).map((s,l)=>({label:s,apply:s+r,type:"type",boost:99-l})),validFor:Ay}}function P9(n,e,t,i){let r=[],s=0;for(let l of Ry(n.doc,t,e))r.push({label:"<"+l,type:"type"});for(let l of ep(n.doc,t))r.push({label:"",type:"type",boost:99-s++});return{from:i,to:i,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function k9(n,e,t,i,r){let s=Il(t),l=s?e.tags[zl(n.doc,s)]:null,o=l&&l.attrs?Object.keys(l.attrs):[],f=l&&l.globalAttrs===!1?o:o.length?o.concat(e.globalAttrNames):e.globalAttrNames;return{from:i,to:r,options:f.map(u=>({label:u,type:"property"})),validFor:Ay}}function _9(n,e,t,i,r){var s;let l=(s=t.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),o=[],f;if(l){let u=n.sliceDoc(l.from,l.to),h=e.globalAttrs[u];if(!h){let O=Il(t),p=O?e.tags[zl(n.doc,O)]:null;h=(p==null?void 0:p.attrs)&&p.attrs[u]}if(h){let O=n.sliceDoc(i,r).toLowerCase(),p='"',g='"';/^['"]/.test(O)?(f=O[0]=='"'?/^[^"]*$/:/^[^']*$/,p="",g=n.sliceDoc(r,r+1)==O[0]?"":O[0],O=O.slice(1),i++):f=/^[^\s<>='"]*$/;for(let b of h)o.push({label:b,apply:p+b+g,type:"constant"})}}return{from:i,to:r,options:o,validFor:f}}function W9(n,e){let{state:t,pos:i}=e,r=ti(t).resolveInner(i,-1),s=r.resolve(i);for(let l=i,o;s==r&&(o=r.childBefore(l));){let f=o.lastChild;if(!f||!f.type.isError||f.fromW9(i,r)}const C9=kr.parser.configure({top:"SingleExpression"}),Uy=[{tag:"script",attrs:n=>n.type=="text/typescript"||n.lang=="ts",parser:xy.parser},{tag:"script",attrs:n=>n.type=="text/babel"||n.type=="text/jsx",parser:Cy.parser},{tag:"script",attrs:n=>n.type=="text/typescript-jsx",parser:Xy.parser},{tag:"script",attrs:n=>n.type=="importmap"||n.type=="speculationrules",parser:C9},{tag:"script",attrs(n){return!n.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(n.type)},parser:kr.parser},{tag:"style",attrs(n){return(!n.lang||n.lang=="css")&&(!n.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(n.type))},parser:qc.parser}],Yy=[{name:"style",parser:qc.parser.configure({top:"Styles"})}].concat(Zy.map(n=>({name:n,parser:kr.parser}))),Vy=Ws.define({name:"html",parser:wA.configure({props:[Bl.add({Element(n){let e=/^(\s*)(<\/)?/.exec(n.textAfter);return n.node.to<=n.pos+e[0].length?n.continue():n.lineIndent(n.node.from)+(e[2]?0:n.unit)},"OpenTag CloseTag SelfClosingTag"(n){return n.column(n.node.from)+n.unit},Document(n){if(n.pos+/\s*/.exec(n.textAfter)[0].lengthn.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),rc=Vy.configure({wrap:$y(Uy,Yy)});function X9(n={}){let e="",t;n.matchClosingTags===!1&&(e="noMatch"),n.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(n.nestedLanguages&&n.nestedLanguages.length||n.nestedAttributes&&n.nestedAttributes.length)&&(t=$y((n.nestedLanguages||[]).concat(Uy),(n.nestedAttributes||[]).concat(Yy)));let i=t?Vy.configure({wrap:t,dialect:e}):e?rc.configure({dialect:e}):rc;return new ca(i,[rc.data.of({autocomplete:x9(n)}),n.autoCloseTags!==!1?T9:[],b9().support,jA().support])}const F0=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),T9=me.inputHandler.of((n,e,t,i,r)=>{if(n.composing||n.state.readOnly||e!=t||i!=">"&&i!="/"||!rc.isActiveAt(n.state,e,-1))return!1;let s=r(),{state:l}=s,o=l.changeByRange(f=>{var u,h,O;let p=l.doc.sliceString(f.from-1,f.to)==i,{head:g}=f,b=ti(l).resolveInner(g-1,-1),Q;if((b.name=="TagName"||b.name=="StartTag")&&(b=b.parent),p&&i==">"&&b.name=="OpenTag"){if(((h=(u=b.parent)===null||u===void 0?void 0:u.lastChild)===null||h===void 0?void 0:h.name)!="CloseTag"&&(Q=zl(l.doc,b.parent,g))&&!F0.has(Q)){let $=g+(l.doc.sliceString(g,g+1)===">"?1:0),P=``;return{range:f,changes:{from:g,to:$,insert:P}}}}else if(p&&i=="/"&&b.name=="IncompleteCloseTag"){let $=b.parent;if(b.from==g-2&&((O=$.lastChild)===null||O===void 0?void 0:O.name)!="CloseTag"&&(Q=zl(l.doc,$,g))&&!F0.has(Q)){let P=g+(l.doc.sliceString(g,g+1)===">"?1:0),x=`${Q}>`;return{range:J.cursor(g+x.length,-1),changes:{from:g,to:P,insert:x}}}}return{range:f}});return o.changes.empty?!1:(n.dispatch([s,l.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});var _o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function T6(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Mc={exports:{}};/** +}`,{label:"class",detail:"definition",type:"keyword"}),nr('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),nr('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],N0=new VQ,ky=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function ko(n){return(e,t)=>{let i=e.node.getChild("VariableDefinition");return i&&t(i,n),!0}}const p9=["FunctionDeclaration"],g9={FunctionDeclaration:ko("function"),ClassDeclaration:ko("class"),ClassExpression:()=>!0,EnumDeclaration:ko("constant"),TypeAliasDeclaration:ko("type"),NamespaceDeclaration:ko("namespace"),VariableDefinition(n,e){n.matchContext(p9)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function _y(n,e){let t=N0.get(e);if(t)return t;let i=[],r=!0;function s(l,o){let f=n.sliceString(l.from,l.to);i.push({label:f,type:o})}return e.cursor(Ut.IncludeAnonymous).iterate(l=>{if(r)r=!1;else if(l.name){let o=g9[l.name];if(o&&o(l,s)||ky.has(l.name))return!1}else if(l.to-l.from>8192){for(let o of _y(n,l.node))i.push(o);return!1}}),N0.set(e,i),i}const L0=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Wy=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function m9(n){let e=ei(n.state).resolveInner(n.pos,-1);if(Wy.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&L0.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let i=[];for(let r=e;r;r=r.parent)ky.has(r.name)&&(i=i.concat(_y(n.state.doc,r)));return{options:i,from:t?e.from:n.pos,validFor:L0}}const _r=Ws.define({name:"javascript",parser:O9.configure({props:[jl.add({IfStatement:Al({except:/^\s*({|else\b)/}),TryStatement:Al({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:gX,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:i?1:2)*n.unit},Block:Os({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":Al({except:/^{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),Fl.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":br,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),xy={test:n=>/^JSX/.test(n.name),facet:IQ({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Cy=_r.configure({dialect:"ts"},"typescript"),Xy=_r.configure({dialect:"jsx",props:[Ad.add(n=>n.isTop?[xy]:void 0)]}),Ty=_r.configure({dialect:"jsx ts",props:[Ad.add(n=>n.isTop?[xy]:void 0)]},"typescript"),S9="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(n=>({label:n,type:"keyword"}));function b9(n={}){let e=n.jsx?n.typescript?Ty:Xy:n.typescript?Cy:_r;return new ua(e,[_r.data.of({autocomplete:XZ(Wy,Fw(d9.concat(S9)))}),_r.data.of({autocomplete:m9}),n.jsx?y9:[]])}function $9(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function B0(n,e,t=n.length){for(let i=e==null?void 0:e.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return n.sliceString(i.from,Math.min(i.to,t));return""}function Q9(n){return n&&(n.name=="JSXEndTag"||n.name=="JSXSelfCloseEndTag")}const w9=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),y9=me.inputHandler.of((n,e,t,i)=>{if((w9?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||i!=">"&&i!="/"||!_r.isActiveAt(n.state,e,-1))return!1;let{state:r}=n,s=r.changeByRange(l=>{var o;let{head:f}=l,u=ei(r).resolveInner(f,-1),h;if(u.name=="JSXStartTag"&&(u=u.parent),!(u.name=="JSXAttributeValue"&&u.to>f)){if(i==">"&&u.name=="JSXFragmentTag")return{range:K.cursor(f+1),changes:{from:f,insert:">"}};if(i=="/"&&u.name=="JSXFragmentTag"){let O=u.parent,p=O==null?void 0:O.parent;if(O.from==f-1&&((o=p.lastChild)===null||o===void 0?void 0:o.name)!="JSXEndTag"&&(h=B0(r.doc,p==null?void 0:p.firstChild,f))){let g=`/${h}>`;return{range:K.cursor(f+g.length),changes:{from:f,insert:g}}}}else if(i==">"){let O=$9(u);if(O&&!Q9(O.lastChild)&&r.sliceDoc(f,f+2)!="`}}}}return{range:l}});return s.changes.empty?!1:(n.dispatch(s,{userEvent:"input.type",scrollIntoView:!0}),!0)}),_o=["_blank","_self","_top","_parent"],cO=["ascii","utf-8","utf-16","latin1","latin1"],uO=["get","post","put","delete"],hO=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Qn=["true","false"],_e={},v9={a:{attrs:{href:null,ping:null,type:null,media:null,target:_o,hreflang:null}},abbr:_e,address:_e,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:_e,aside:_e,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:_e,base:{attrs:{href:null,target:_o}},bdi:_e,bdo:_e,blockquote:{attrs:{cite:null}},body:_e,br:_e,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:hO,formmethod:uO,formnovalidate:["novalidate"],formtarget:_o,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:_e,center:_e,cite:_e,code:_e,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:_e,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:_e,div:_e,dl:_e,dt:_e,em:_e,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:_e,figure:_e,footer:_e,form:{attrs:{action:null,name:null,"accept-charset":cO,autocomplete:["on","off"],enctype:hO,method:uO,novalidate:["novalidate"],target:_o}},h1:_e,h2:_e,h3:_e,h4:_e,h5:_e,h6:_e,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:_e,hgroup:_e,hr:_e,html:{attrs:{manifest:null}},i:_e,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:hO,formmethod:uO,formnovalidate:["novalidate"],formtarget:_o,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:_e,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:_e,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:_e,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:cO,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:_e,noscript:_e,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:_e,param:{attrs:{name:null,value:null}},pre:_e,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:_e,rt:_e,ruby:_e,samp:_e,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:cO}},section:_e,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:_e,source:{attrs:{src:null,type:null,media:null}},span:_e,strong:_e,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:_e,summary:_e,sup:_e,table:_e,tbody:_e,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:_e,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:_e,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:_e,time:{attrs:{datetime:null}},title:_e,tr:_e,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:_e,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:_e},Zy={accesskey:null,class:null,contenteditable:Qn,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Qn,autocorrect:Qn,autocapitalize:Qn,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Qn,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Qn,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Qn,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Qn,"aria-hidden":Qn,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Qn,"aria-multiselectable":Qn,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Qn,"aria-relevant":null,"aria-required":Qn,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Ry="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(n=>"on"+n);for(let n of Ry)Zy[n]=null;class Dc{constructor(e,t){this.tags=Object.assign(Object.assign({},v9),e),this.globalAttrs=Object.assign(Object.assign({},Zy),t),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Dc.default=new Dc;function Il(n,e,t=n.length){if(!e)return"";let i=e.firstChild,r=i&&i.getChild("TagName");return r?n.sliceString(r.from,Math.min(r.to,t)):""}function Nl(n,e=!1){for(;n;n=n.parent)if(n.name=="Element")if(e)e=!1;else return n;return null}function Ay(n,e,t){let i=t.tags[Il(n,Nl(e))];return(i==null?void 0:i.children)||t.allTags}function ip(n,e){let t=[];for(let i=Nl(e);i&&!i.type.isTop;i=Nl(i.parent)){let r=Il(n,i);if(r&&i.lastChild.name=="CloseTag")break;r&&t.indexOf(r)<0&&(e.name=="EndTag"||e.from>=i.firstChild.to)&&t.push(r)}return t}const Uy=/^[:\-\.\w\u00b7-\uffff]*$/;function j0(n,e,t,i,r){let s=/\s*>/.test(n.sliceDoc(r,r+5))?"":">",l=Nl(t,!0);return{from:i,to:r,options:Ay(n.doc,l,e).map(o=>({label:o,type:"type"})).concat(ip(n.doc,t).map((o,f)=>({label:"/"+o,apply:"/"+o+s,type:"type",boost:99-f}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function F0(n,e,t,i){let r=/\s*>/.test(n.sliceDoc(i,i+5))?"":">";return{from:t,to:i,options:ip(n.doc,e).map((s,l)=>({label:s,apply:s+r,type:"type",boost:99-l})),validFor:Uy}}function P9(n,e,t,i){let r=[],s=0;for(let l of Ay(n.doc,t,e))r.push({label:"<"+l,type:"type"});for(let l of ip(n.doc,t))r.push({label:"",type:"type",boost:99-s++});return{from:i,to:i,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function k9(n,e,t,i,r){let s=Nl(t),l=s?e.tags[Il(n.doc,s)]:null,o=l&&l.attrs?Object.keys(l.attrs):[],f=l&&l.globalAttrs===!1?o:o.length?o.concat(e.globalAttrNames):e.globalAttrNames;return{from:i,to:r,options:f.map(u=>({label:u,type:"property"})),validFor:Uy}}function _9(n,e,t,i,r){var s;let l=(s=t.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),o=[],f;if(l){let u=n.sliceDoc(l.from,l.to),h=e.globalAttrs[u];if(!h){let O=Nl(t),p=O?e.tags[Il(n.doc,O)]:null;h=(p==null?void 0:p.attrs)&&p.attrs[u]}if(h){let O=n.sliceDoc(i,r).toLowerCase(),p='"',g='"';/^['"]/.test(O)?(f=O[0]=='"'?/^[^"]*$/:/^[^']*$/,p="",g=n.sliceDoc(r,r+1)==O[0]?"":O[0],O=O.slice(1),i++):f=/^[^\s<>='"]*$/;for(let b of h)o.push({label:b,apply:p+b+g,type:"constant"})}}return{from:i,to:r,options:o,validFor:f}}function W9(n,e){let{state:t,pos:i}=e,r=ei(t).resolveInner(i,-1),s=r.resolve(i);for(let l=i,o;s==r&&(o=r.childBefore(l));){let f=o.lastChild;if(!f||!f.type.isError||f.fromW9(i,r)}const C9=_r.parser.configure({top:"SingleExpression"}),Yy=[{tag:"script",attrs:n=>n.type=="text/typescript"||n.lang=="ts",parser:Cy.parser},{tag:"script",attrs:n=>n.type=="text/babel"||n.type=="text/jsx",parser:Xy.parser},{tag:"script",attrs:n=>n.type=="text/typescript-jsx",parser:Ty.parser},{tag:"script",attrs:n=>n.type=="importmap"||n.type=="speculationrules",parser:C9},{tag:"script",attrs(n){return!n.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(n.type)},parser:_r.parser},{tag:"style",attrs(n){return(!n.lang||n.lang=="css")&&(!n.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(n.type))},parser:Mc.parser}],Vy=[{name:"style",parser:Mc.parser.configure({top:"Styles"})}].concat(Ry.map(n=>({name:n,parser:_r.parser}))),qy=Ws.define({name:"html",parser:wA.configure({props:[jl.add({Element(n){let e=/^(\s*)(<\/)?/.exec(n.textAfter);return n.node.to<=n.pos+e[0].length?n.continue():n.lineIndent(n.node.from)+(e[2]?0:n.unit)},"OpenTag CloseTag SelfClosingTag"(n){return n.column(n.node.from)+n.unit},Document(n){if(n.pos+/\s*/.exec(n.textAfter)[0].lengthn.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),lc=qy.configure({wrap:Qy(Yy,Vy)});function X9(n={}){let e="",t;n.matchClosingTags===!1&&(e="noMatch"),n.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(n.nestedLanguages&&n.nestedLanguages.length||n.nestedAttributes&&n.nestedAttributes.length)&&(t=Qy((n.nestedLanguages||[]).concat(Yy),(n.nestedAttributes||[]).concat(Vy)));let i=t?qy.configure({wrap:t,dialect:e}):e?lc.configure({dialect:e}):lc;return new ua(i,[lc.data.of({autocomplete:x9(n)}),n.autoCloseTags!==!1?T9:[],b9().support,jA().support])}const G0=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),T9=me.inputHandler.of((n,e,t,i,r)=>{if(n.composing||n.state.readOnly||e!=t||i!=">"&&i!="/"||!lc.isActiveAt(n.state,e,-1))return!1;let s=r(),{state:l}=s,o=l.changeByRange(f=>{var u,h,O;let p=l.doc.sliceString(f.from-1,f.to)==i,{head:g}=f,b=ei(l).resolveInner(g-1,-1),Q;if((b.name=="TagName"||b.name=="StartTag")&&(b=b.parent),p&&i==">"&&b.name=="OpenTag"){if(((h=(u=b.parent)===null||u===void 0?void 0:u.lastChild)===null||h===void 0?void 0:h.name)!="CloseTag"&&(Q=Il(l.doc,b.parent,g))&&!G0.has(Q)){let $=g+(l.doc.sliceString(g,g+1)===">"?1:0),P=``;return{range:f,changes:{from:g,to:$,insert:P}}}}else if(p&&i=="/"&&b.name=="IncompleteCloseTag"){let $=b.parent;if(b.from==g-2&&((O=$.lastChild)===null||O===void 0?void 0:O.name)!="CloseTag"&&(Q=Il(l.doc,$,g))&&!G0.has(Q)){let P=g+(l.doc.sliceString(g,g+1)===">"?1:0),x=`${Q}>`;return{range:K.cursor(g+x.length,-1),changes:{from:g,to:P,insert:x}}}}return{range:f}});return o.changes.empty?!1:(n.dispatch([s,l.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});var Wo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function T6(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var zc={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */Mc.exports;(function(n,e){(function(){var t,i="4.17.21",r=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",o="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",O=1,p=2,g=4,b=1,Q=2,$=1,P=2,x=4,A=8,C=16,X=32,Z=64,I=128,q=256,N=512,z=30,ie="...",ue=800,$e=16,Se=1,Te=2,pe=3,fe=1/0,Ae=9007199254740991,xe=17976931348623157e292,Ce=0/0,Me=4294967295,yt=Me-1,ni=Me>>>1,xt=[["ary",I],["bind",$],["bindKey",P],["curry",A],["curryRight",C],["flip",N],["partial",X],["partialRight",Z],["rearg",q]],It="[object Arguments]",Nt="[object Array]",ve="[object AsyncFunction]",K="[object Boolean]",H="[object Date]",le="[object DOMException]",se="[object Error]",Ke="[object Function]",Fe="[object GeneratorFunction]",ut="[object Map]",ht="[object Number]",ci="[object Null]",Xe="[object Object]",Qe="[object Promise]",Kt="[object Proxy]",Ot="[object RegExp]",De="[object Set]",bt="[object String]",lt="[object Symbol]",tt="[object Undefined]",dt="[object WeakMap]",vt="[object WeakSet]",en="[object ArrayBuffer]",ri="[object DataView]",pt="[object Float32Array]",ui="[object Float64Array]",Fn="[object Int8Array]",Ct="[object Int16Array]",Fr="[object Int32Array]",Yt="[object Uint8Array]",Xt="[object Uint8ClampedArray]",_i="[object Uint16Array]",Qi="[object Uint32Array]",hi=/\b__p \+= '';/g,Ts=/\b(__p \+=) '' \+/g,qi=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Vt=/&(?:amp|lt|gt|quot|#39);/g,Cr=/[&<>"']/g,Ei=RegExp(Vt.source),dn=RegExp(Cr.source),Mi=/<%-([\s\S]+?)%>/g,Jt=/<%([\s\S]+?)%>/g,Tt=/<%=([\s\S]+?)%>/g,Lt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gr=/^\w*$/,wi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ne=/[\\^$.*+?()[\]{}|]/g,Bt=RegExp(Ne.source),Zt=/^\s+/,qt=/\s/,Et=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Hr=/\{\n\/\* \[wrapped with (.+)\] \*/,Oi=/,? & /,Gn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Kr=/[()=,{}\[\]\/\s]/,Jr=/\\(\\)?/g,B=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Oe=/\w*$/,es=/^[-+]0x[0-9a-f]+$/i,xn=/^0b[01]+$/i,ts=/^\[object .+?Constructor\]$/,Zs=/^0o[0-7]+$/i,il=/^(?:0|[1-9]\d*)$/,Xr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,cr=/($^)/,Wi=/['\n\r\u2028\u2029\\]/g,tn="\\ud800-\\udfff",Rs="\\u0300-\\u036f",pa="\\ufe20-\\ufe2f",ru="\\u20d0-\\u20ff",ga=Rs+pa+ru,ma="\\u2700-\\u27bf",Sa="a-z\\xdf-\\xf6\\xf8-\\xff",su="\\xac\\xb1\\xd7\\xf7",lu="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ou="\\u2000-\\u206f",au=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ba="A-Z\\xc0-\\xd6\\xd8-\\xde",$a="\\ufe0e\\ufe0f",Qa=su+lu+ou+au,Hl="['’]",fu="["+tn+"]",wa="["+Qa+"]",nl="["+ga+"]",ya="\\d+",cu="["+ma+"]",va="["+Sa+"]",Pa="[^"+tn+Qa+ya+ma+Sa+ba+"]",Kl="\\ud83c[\\udffb-\\udfff]",uu="(?:"+nl+"|"+Kl+")",ka="[^"+tn+"]",Jl="(?:\\ud83c[\\udde6-\\uddff]){2}",eo="[\\ud800-\\udbff][\\udc00-\\udfff]",is="["+ba+"]",_a="\\u200d",Wa="(?:"+va+"|"+Pa+")",hu="(?:"+is+"|"+Pa+")",xa="(?:"+Hl+"(?:d|ll|m|re|s|t|ve))?",Ca="(?:"+Hl+"(?:D|LL|M|RE|S|T|VE))?",Xa=uu+"?",Ta="["+$a+"]?",Ou="(?:"+_a+"(?:"+[ka,Jl,eo].join("|")+")"+Ta+Xa+")*",du="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",pu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Za=Ta+Xa+Ou,gu="(?:"+[cu,Jl,eo].join("|")+")"+Za,mu="(?:"+[ka+nl+"?",nl,Jl,eo,fu].join("|")+")",Su=RegExp(Hl,"g"),bu=RegExp(nl,"g"),to=RegExp(Kl+"(?="+Kl+")|"+mu+Za,"g"),$u=RegExp([is+"?"+va+"+"+xa+"(?="+[wa,is,"$"].join("|")+")",hu+"+"+Ca+"(?="+[wa,is+Wa,"$"].join("|")+")",is+"?"+Wa+"+"+xa,is+"+"+Ca,pu,du,ya,gu].join("|"),"g"),Qu=RegExp("["+_a+tn+ga+$a+"]"),wu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,R=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],he=-1,re={};re[pt]=re[ui]=re[Fn]=re[Ct]=re[Fr]=re[Yt]=re[Xt]=re[_i]=re[Qi]=!0,re[It]=re[Nt]=re[en]=re[K]=re[ri]=re[H]=re[se]=re[Ke]=re[ut]=re[ht]=re[Xe]=re[Ot]=re[De]=re[bt]=re[dt]=!1;var ce={};ce[It]=ce[Nt]=ce[en]=ce[ri]=ce[K]=ce[H]=ce[pt]=ce[ui]=ce[Fn]=ce[Ct]=ce[Fr]=ce[ut]=ce[ht]=ce[Xe]=ce[Ot]=ce[De]=ce[bt]=ce[lt]=ce[Yt]=ce[Xt]=ce[_i]=ce[Qi]=!0,ce[se]=ce[Ke]=ce[dt]=!1;var Ue={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Be={"&":"&","<":"<",">":">",'"':""","'":"'"},ot={"&":"&","<":"<",">":">",""":'"',"'":"'"},nn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},si=parseFloat,yu=parseInt,ip=typeof _o=="object"&&_o&&_o.Object===Object&&_o,Iy=typeof self=="object"&&self&&self.Object===Object&&self,xi=ip||Iy||Function("return this")(),vu=e&&!e.nodeType&&e,As=vu&&!0&&n&&!n.nodeType&&n,np=As&&As.exports===vu,Pu=np&&ip.process,Cn=function(){try{var E=As&&As.require&&As.require("util").types;return E||Pu&&Pu.binding&&Pu.binding("util")}catch{}}(),rp=Cn&&Cn.isArrayBuffer,sp=Cn&&Cn.isDate,lp=Cn&&Cn.isMap,op=Cn&&Cn.isRegExp,ap=Cn&&Cn.isSet,fp=Cn&&Cn.isTypedArray;function pn(E,G,j){switch(j.length){case 0:return E.call(G);case 1:return E.call(G,j[0]);case 2:return E.call(G,j[0],j[1]);case 3:return E.call(G,j[0],j[1],j[2])}return E.apply(G,j)}function Ny(E,G,j,we){for(var Le=-1,St=E==null?0:E.length;++Le-1}function ku(E,G,j){for(var we=-1,Le=E==null?0:E.length;++we-1;);return j}function mp(E,G){for(var j=E.length;j--&&rl(G,E[j],0)>-1;);return j}function ev(E,G){for(var j=E.length,we=0;j--;)E[j]===G&&++we;return we}var tv=Cu(Ue),iv=Cu(Be);function nv(E){return"\\"+nn[E]}function rv(E,G){return E==null?t:E[G]}function sl(E){return Qu.test(E)}function sv(E){return wu.test(E)}function lv(E){for(var G,j=[];!(G=E.next()).done;)j.push(G.value);return j}function Ru(E){var G=-1,j=Array(E.size);return E.forEach(function(we,Le){j[++G]=[Le,we]}),j}function Sp(E,G){return function(j){return E(G(j))}}function ss(E,G){for(var j=-1,we=E.length,Le=0,St=[];++j-1}function Bv(a,c){var d=this.__data__,m=Ha(d,a);return m<0?(++this.size,d.push([a,c])):d[m][1]=c,this}Tr.prototype.clear=zv,Tr.prototype.delete=Iv,Tr.prototype.get=Nv,Tr.prototype.has=Lv,Tr.prototype.set=Bv;function Zr(a){var c=-1,d=a==null?0:a.length;for(this.clear();++c=c?a:c)),a}function Rn(a,c,d,m,w,W){var T,U=c&O,M=c&p,ee=c&g;if(d&&(T=w?d(a,m,w,W):d(a)),T!==t)return T;if(!jt(a))return a;var te=je(a);if(te){if(T=HP(a),!U)return rn(a,T)}else{var ne=zi(a),ge=ne==Ke||ne==Fe;if(us(a))return eg(a,U);if(ne==Xe||ne==It||ge&&!w){if(T=M||ge?{}:bg(a),!U)return M?EP(a,fP(T,a)):qP(a,Cp(T,a))}else{if(!ce[ne])return w?a:{};T=KP(a,ne,U)}}W||(W=new Kn);var ke=W.get(a);if(ke)return ke;W.set(a,T),jg(a)?a.forEach(function(Ve){T.add(Rn(Ve,c,d,Ve,a,W))}):Lg(a)&&a.forEach(function(Ve,at){T.set(at,Rn(Ve,c,d,at,a,W))});var Ye=ee?M?lh:sh:M?ln:yi,Je=te?t:Ye(a);return Xn(Je||a,function(Ve,at){Je&&(at=Ve,Ve=a[at]),ao(T,at,Rn(Ve,c,d,at,a,W))}),T}function cP(a){var c=yi(a);return function(d){return Xp(d,a,c)}}function Xp(a,c,d){var m=d.length;if(a==null)return!m;for(a=Pt(a);m--;){var w=d[m],W=c[w],T=a[w];if(T===t&&!(w in a)||!W(T))return!1}return!0}function Tp(a,c,d){if(typeof a!="function")throw new Tn(l);return go(function(){a.apply(t,d)},c)}function fo(a,c,d,m){var w=-1,W=Ra,T=!0,U=a.length,M=[],ee=c.length;if(!U)return M;d&&(c=Mt(c,gn(d))),m?(W=ku,T=!1):c.length>=r&&(W=io,T=!1,c=new Vs(c));e:for(;++ww?0:w+d),m=m===t||m>w?w:Ge(m),m<0&&(m+=w),m=d>m?0:Gg(m);d0&&d(U)?c>1?Ci(U,c-1,d,m,w):rs(w,U):m||(w[w.length]=U)}return w}var Mu=lg(),Ap=lg(!0);function ur(a,c){return a&&Mu(a,c,yi)}function Du(a,c){return a&&Ap(a,c,yi)}function Ja(a,c){return ns(c,function(d){return Vr(a[d])})}function Es(a,c){c=fs(c,a);for(var d=0,m=c.length;a!=null&&dc}function OP(a,c){return a!=null&&wt.call(a,c)}function dP(a,c){return a!=null&&c in Pt(a)}function pP(a,c,d){return a>=Di(c,d)&&a=120&&te.length>=120)?new Vs(T&&te):t}te=a[0];var ne=-1,ge=U[0];e:for(;++ne-1;)U!==a&&Ia.call(U,M,1),Ia.call(a,M,1);return a}function Lp(a,c){for(var d=a?c.length:0,m=d-1;d--;){var w=c[d];if(d==m||w!==W){var W=w;Yr(w)?Ia.call(a,w,1):Ku(a,w)}}return a}function Fu(a,c){return a+Ba(kp()*(c-a+1))}function WP(a,c,d,m){for(var w=-1,W=mi(La((c-a)/(d||1)),0),T=j(W);W--;)T[m?W:++w]=a,a+=d;return T}function Gu(a,c){var d="";if(!a||c<1||c>Ae)return d;do c%2&&(d+=a),c=Ba(c/2),c&&(a+=a);while(c);return d}function it(a,c){return Oh(wg(a,c,on),a+"")}function xP(a){return xp(gl(a))}function CP(a,c){var d=gl(a);return uf(d,qs(c,0,d.length))}function ho(a,c,d,m){if(!jt(a))return a;c=fs(c,a);for(var w=-1,W=c.length,T=W-1,U=a;U!=null&&++ww?0:w+c),d=d>w?w:d,d<0&&(d+=w),w=c>d?0:d-c>>>0,c>>>=0;for(var W=j(w);++m>>1,T=a[W];T!==null&&!Sn(T)&&(d?T<=c:T=r){var ee=c?null:IP(a);if(ee)return Ua(ee);T=!1,w=io,M=new Vs}else M=c?[]:U;e:for(;++m=m?a:An(a,c,d)}var Jp=Qv||function(a){return xi.clearTimeout(a)};function eg(a,c){if(c)return a.slice();var d=a.length,m=Qp?Qp(d):new a.constructor(d);return a.copy(m),m}function ih(a){var c=new a.constructor(a.byteLength);return new Da(c).set(new Da(a)),c}function AP(a,c){var d=c?ih(a.buffer):a.buffer;return new a.constructor(d,a.byteOffset,a.byteLength)}function UP(a){var c=new a.constructor(a.source,Oe.exec(a));return c.lastIndex=a.lastIndex,c}function YP(a){return oo?Pt(oo.call(a)):{}}function tg(a,c){var d=c?ih(a.buffer):a.buffer;return new a.constructor(d,a.byteOffset,a.length)}function ig(a,c){if(a!==c){var d=a!==t,m=a===null,w=a===a,W=Sn(a),T=c!==t,U=c===null,M=c===c,ee=Sn(c);if(!U&&!ee&&!W&&a>c||W&&T&&M&&!U&&!ee||m&&T&&M||!d&&M||!w)return 1;if(!m&&!W&&!ee&&a=U)return M;var ee=d[m];return M*(ee=="desc"?-1:1)}}return a.index-c.index}function ng(a,c,d,m){for(var w=-1,W=a.length,T=d.length,U=-1,M=c.length,ee=mi(W-T,0),te=j(M+ee),ne=!m;++U1?d[w-1]:t,T=w>2?d[2]:t;for(W=a.length>3&&typeof W=="function"?(w--,W):t,T&&Gi(d[0],d[1],T)&&(W=w<3?t:W,w=1),c=Pt(c);++m-1?w[W?c[T]:T]:t}}function fg(a){return Ur(function(c){var d=c.length,m=d,w=Zn.prototype.thru;for(a&&c.reverse();m--;){var W=c[m];if(typeof W!="function")throw new Tn(l);if(w&&!T&&ff(W)=="wrapper")var T=new Zn([],!0)}for(m=T?m:d;++m1&>.reverse(),te&&MU))return!1;var ee=W.get(a),te=W.get(c);if(ee&&te)return ee==c&&te==a;var ne=-1,ge=!0,ke=d&Q?new Vs:t;for(W.set(a,c),W.set(c,a);++ne1?"& ":"")+c[m],c=c.join(d>2?", ":" "),a.replace(Et,`{ + */zc.exports;(function(n,e){(function(){var t,i="4.17.21",r=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",o="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",O=1,p=2,g=4,b=1,Q=2,$=1,P=2,x=4,A=8,C=16,X=32,Z=64,I=128,q=256,L=512,z=30,te="...",ue=800,$e=16,Se=1,Xe=2,de=3,ce=1/0,Re=9007199254740991,xe=17976931348623157e292,Ce=0/0,Ee=4294967295,Pt=Ee-1,ii=Ee>>>1,Tt=[["ary",I],["bind",$],["bindKey",P],["curry",A],["curryRight",C],["flip",L],["partial",X],["partialRight",Z],["rearg",q]],It="[object Arguments]",Nt="[object Array]",ve="[object AsyncFunction]",ie="[object Boolean]",G="[object Date]",le="[object DOMException]",fe="[object Error]",ze="[object Function]",Ne="[object GeneratorFunction]",st="[object Map]",pt="[object Number]",ni="[object Null]",gt="[object Object]",wt="[object Promise]",ge="[object Proxy]",mt="[object RegExp]",Me="[object Set]",ht="[object String]",ft="[object Symbol]",Be="[object Undefined]",Ot="[object WeakMap]",yt="[object WeakSet]",hn="[object ArrayBuffer]",en="[object DataView]",Oi="[object Float32Array]",je="[object Float64Array]",jn="[object Int8Array]",ki="[object Int16Array]",di="[object Int32Array]",ci="[object Uint8Array]",kt="[object Uint8ClampedArray]",ar="[object Uint16Array]",Zt="[object Uint32Array]",pi=/\b__p \+= '';/g,Xr=/\b(__p \+=) '' \+/g,ji=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Vt=/&(?:amp|lt|gt|quot|#39);/g,Tr=/[&<>"']/g,Yi=RegExp(Vt.source),Hr=RegExp(Tr.source),ri=/<%-([\s\S]+?)%>/g,Lt=/<%([\s\S]+?)%>/g,Bt=/<%=([\s\S]+?)%>/g,qt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kr=/^\w*$/,Vi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_t=/[\\^$.*+?()[\]{}|]/g,Fe=RegExp(_t.source),Rt=/^\s+/,jt=/\s/,Et=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Zr=/\{\n\/\* \[wrapped with (.+)\] \*/,qi=/,? & /,fr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,_n=/[()=,{}\[\]\/\s]/,Ts=/\\(\\)?/g,N=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,Jr=/^[-+]0x[0-9a-f]+$/i,cr=/^0b[01]+$/i,ur=/^\[object .+?Constructor\]$/,es=/^0o[0-7]+$/i,nl=/^(?:0|[1-9]\d*)$/,Zs=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wn=/($^)/,ts=/['\n\r\u2028\u2029\\]/g,gi="\\ud800-\\udfff",Rs="\\u0300-\\u036f",As="\\ufe20-\\ufe2f",ga="\\u20d0-\\u20ff",ma=Rs+As+ga,Sa="\\u2700-\\u27bf",ba="a-z\\xdf-\\xf6\\xf8-\\xff",lu="\\xac\\xb1\\xd7\\xf7",ou="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",au="\\u2000-\\u206f",fu=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",$a="A-Z\\xc0-\\xd6\\xd8-\\xde",Qa="\\ufe0e\\ufe0f",wa=lu+ou+au+fu,Kl="['’]",cu="["+gi+"]",ya="["+wa+"]",rl="["+ma+"]",va="\\d+",uu="["+Sa+"]",Pa="["+ba+"]",ka="[^"+gi+wa+va+Sa+ba+$a+"]",Jl="\\ud83c[\\udffb-\\udfff]",hu="(?:"+rl+"|"+Jl+")",_a="[^"+gi+"]",eo="(?:\\ud83c[\\udde6-\\uddff]){2}",to="[\\ud800-\\udbff][\\udc00-\\udfff]",is="["+$a+"]",Wa="\\u200d",xa="(?:"+Pa+"|"+ka+")",Ou="(?:"+is+"|"+ka+")",Ca="(?:"+Kl+"(?:d|ll|m|re|s|t|ve))?",Xa="(?:"+Kl+"(?:D|LL|M|RE|S|T|VE))?",Ta=hu+"?",Za="["+Qa+"]?",du="(?:"+Wa+"(?:"+[_a,eo,to].join("|")+")"+Za+Ta+")*",pu="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ra=Za+Ta+du,mu="(?:"+[uu,eo,to].join("|")+")"+Ra,Su="(?:"+[_a+rl+"?",rl,eo,to,cu].join("|")+")",bu=RegExp(Kl,"g"),$u=RegExp(rl,"g"),io=RegExp(Jl+"(?="+Jl+")|"+Su+Ra,"g"),Qu=RegExp([is+"?"+Pa+"+"+Ca+"(?="+[ya,is,"$"].join("|")+")",Ou+"+"+Xa+"(?="+[ya,is+xa,"$"].join("|")+")",is+"?"+xa+"+"+Ca,is+"+"+Xa,gu,pu,va,mu].join("|"),"g"),wu=RegExp("["+Wa+gi+ma+Qa+"]"),yu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vu=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],R=-1,re={};re[Oi]=re[je]=re[jn]=re[ki]=re[di]=re[ci]=re[kt]=re[ar]=re[Zt]=!0,re[It]=re[Nt]=re[hn]=re[ie]=re[en]=re[G]=re[fe]=re[ze]=re[st]=re[pt]=re[gt]=re[mt]=re[Me]=re[ht]=re[Ot]=!1;var se={};se[It]=se[Nt]=se[hn]=se[en]=se[ie]=se[G]=se[Oi]=se[je]=se[jn]=se[ki]=se[di]=se[st]=se[pt]=se[gt]=se[mt]=se[Me]=se[ht]=se[ft]=se[ci]=se[kt]=se[ar]=se[Zt]=!0,se[fe]=se[ze]=se[Ot]=!1;var we={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă: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at,si=parseInt,Aa=typeof Wo=="object"&&Wo&&Wo.Object===Object&&Wo,Pu=typeof self=="object"&&self&&self.Object===Object&&self,_i=Aa||Pu||Function("return this")(),ku=e&&!e.nodeType&&e,Us=ku&&!0&&n&&!n.nodeType&&n,rp=Us&&Us.exports===ku,_u=rp&&Aa.process,xn=function(){try{var E=Us&&Us.require&&Us.require("util").types;return E||_u&&_u.binding&&_u.binding("util")}catch{}}(),sp=xn&&xn.isArrayBuffer,lp=xn&&xn.isDate,op=xn&&xn.isMap,ap=xn&&xn.isRegExp,fp=xn&&xn.isSet,cp=xn&&xn.isTypedArray;function On(E,H,j){switch(j.length){case 0:return E.call(H);case 1:return E.call(H,j[0]);case 2:return E.call(H,j[0],j[1]);case 3:return E.call(H,j[0],j[1],j[2])}return E.apply(H,j)}function Ny(E,H,j,Qe){for(var Le=-1,bt=E==null?0:E.length;++Le-1}function Wu(E,H,j){for(var Qe=-1,Le=E==null?0:E.length;++Qe-1;);return j}function Sp(E,H){for(var j=E.length;j--&&sl(H,E[j],0)>-1;);return j}function ev(E,H){for(var j=E.length,Qe=0;j--;)E[j]===H&&++Qe;return Qe}var tv=Tu(we),iv=Tu(Ae);function nv(E){return"\\"+lt[E]}function rv(E,H){return E==null?t:E[H]}function ll(E){return wu.test(E)}function sv(E){return yu.test(E)}function lv(E){for(var H,j=[];!(H=E.next()).done;)j.push(H.value);return j}function Uu(E){var H=-1,j=Array(E.size);return E.forEach(function(Qe,Le){j[++H]=[Le,Qe]}),j}function bp(E,H){return function(j){return E(H(j))}}function ss(E,H){for(var j=-1,Qe=E.length,Le=0,bt=[];++j-1}function Bv(a,c){var d=this.__data__,m=Ja(d,a);return m<0?(++this.size,d.push([a,c])):d[m][1]=c,this}Rr.prototype.clear=zv,Rr.prototype.delete=Iv,Rr.prototype.get=Nv,Rr.prototype.has=Lv,Rr.prototype.set=Bv;function Ar(a){var c=-1,d=a==null?0:a.length;for(this.clear();++c=c?a:c)),a}function Zn(a,c,d,m,w,W){var T,U=c&O,M=c&p,J=c&g;if(d&&(T=w?d(a,m,w,W):d(a)),T!==t)return T;if(!Ft(a))return a;var ee=Ge(a);if(ee){if(T=HP(a),!U)return tn(a,T)}else{var ne=Di(a),pe=ne==ze||ne==Ne;if(us(a))return tg(a,U);if(ne==gt||ne==It||pe&&!w){if(T=M||pe?{}:$g(a),!U)return M?EP(a,fP(T,a)):qP(a,Xp(T,a))}else{if(!se[ne])return w?a:{};T=KP(a,ne,U)}}W||(W=new Gn);var ke=W.get(a);if(ke)return ke;W.set(a,T),Fg(a)?a.forEach(function(Ye){T.add(Zn(Ye,c,d,Ye,a,W))}):Bg(a)&&a.forEach(function(Ye,at){T.set(at,Zn(Ye,c,d,at,a,W))});var Ue=J?M?ah:oh:M?rn:wi,et=ee?t:Ue(a);return Cn(et||a,function(Ye,at){et&&(at=Ye,Ye=a[at]),fo(T,at,Zn(Ye,c,d,at,a,W))}),T}function cP(a){var c=wi(a);return function(d){return Tp(d,a,c)}}function Tp(a,c,d){var m=d.length;if(a==null)return!m;for(a=Wt(a);m--;){var w=d[m],W=c[w],T=a[w];if(T===t&&!(w in a)||!W(T))return!1}return!0}function Zp(a,c,d){if(typeof a!="function")throw new Xn(l);return mo(function(){a.apply(t,d)},c)}function co(a,c,d,m){var w=-1,W=Ua,T=!0,U=a.length,M=[],J=c.length;if(!U)return M;d&&(c=Mt(c,dn(d))),m?(W=Wu,T=!1):c.length>=r&&(W=no,T=!1,c=new qs(c));e:for(;++ww?0:w+d),m=m===t||m>w?w:Ke(m),m<0&&(m+=w),m=d>m?0:Hg(m);d0&&d(U)?c>1?Wi(U,c-1,d,m,w):rs(w,U):m||(w[w.length]=U)}return w}var zu=og(),Up=og(!0);function hr(a,c){return a&&zu(a,c,wi)}function Iu(a,c){return a&&Up(a,c,wi)}function tf(a,c){return ns(c,function(d){return Er(a[d])})}function Ms(a,c){c=fs(c,a);for(var d=0,m=c.length;a!=null&&dc}function OP(a,c){return a!=null&&vt.call(a,c)}function dP(a,c){return a!=null&&c in Wt(a)}function pP(a,c,d){return a>=Mi(c,d)&&a=120&&ee.length>=120)?new qs(T&&ee):t}ee=a[0];var ne=-1,pe=U[0];e:for(;++ne-1;)U!==a&&La.call(U,M,1),La.call(a,M,1);return a}function Bp(a,c){for(var d=a?c.length:0,m=d-1;d--;){var w=c[d];if(d==m||w!==W){var W=w;qr(w)?La.call(a,w,1):eh(a,w)}}return a}function Hu(a,c){return a+Fa(_p()*(c-a+1))}function WP(a,c,d,m){for(var w=-1,W=Si(ja((c-a)/(d||1)),0),T=j(W);W--;)T[m?W:++w]=a,a+=d;return T}function Ku(a,c){var d="";if(!a||c<1||c>Re)return d;do c%2&&(d+=a),c=Fa(c/2),c&&(a+=a);while(c);return d}function it(a,c){return ph(yg(a,c,sn),a+"")}function xP(a){return Cp(ml(a))}function CP(a,c){var d=ml(a);return Of(d,Es(c,0,d.length))}function Oo(a,c,d,m){if(!Ft(a))return a;c=fs(c,a);for(var w=-1,W=c.length,T=W-1,U=a;U!=null&&++ww?0:w+c),d=d>w?w:d,d<0&&(d+=w),w=c>d?0:d-c>>>0,c>>>=0;for(var W=j(w);++m>>1,T=a[W];T!==null&&!gn(T)&&(d?T<=c:T=r){var J=c?null:IP(a);if(J)return Va(J);T=!1,w=no,M=new qs}else M=c?[]:U;e:for(;++m=m?a:Rn(a,c,d)}var eg=Qv||function(a){return _i.clearTimeout(a)};function tg(a,c){if(c)return a.slice();var d=a.length,m=wp?wp(d):new a.constructor(d);return a.copy(m),m}function rh(a){var c=new a.constructor(a.byteLength);return new Ia(c).set(new Ia(a)),c}function AP(a,c){var d=c?rh(a.buffer):a.buffer;return new a.constructor(d,a.byteOffset,a.byteLength)}function UP(a){var c=new a.constructor(a.source,he.exec(a));return c.lastIndex=a.lastIndex,c}function YP(a){return ao?Wt(ao.call(a)):{}}function ig(a,c){var d=c?rh(a.buffer):a.buffer;return new a.constructor(d,a.byteOffset,a.length)}function ng(a,c){if(a!==c){var d=a!==t,m=a===null,w=a===a,W=gn(a),T=c!==t,U=c===null,M=c===c,J=gn(c);if(!U&&!J&&!W&&a>c||W&&T&&M&&!U&&!J||m&&T&&M||!d&&M||!w)return 1;if(!m&&!W&&!J&&a=U)return M;var J=d[m];return M*(J=="desc"?-1:1)}}return a.index-c.index}function rg(a,c,d,m){for(var w=-1,W=a.length,T=d.length,U=-1,M=c.length,J=Si(W-T,0),ee=j(M+J),ne=!m;++U1?d[w-1]:t,T=w>2?d[2]:t;for(W=a.length>3&&typeof W=="function"?(w--,W):t,T&&Gi(d[0],d[1],T)&&(W=w<3?t:W,w=1),c=Wt(c);++m-1?w[W?c[T]:T]:t}}function cg(a){return Vr(function(c){var d=c.length,m=d,w=Tn.prototype.thru;for(a&&c.reverse();m--;){var W=c[m];if(typeof W!="function")throw new Xn(l);if(w&&!T&&uf(W)=="wrapper")var T=new Tn([],!0)}for(m=T?m:d;++m1&&dt.reverse(),ee&&MU))return!1;var J=W.get(a),ee=W.get(c);if(J&&ee)return J==c&&ee==a;var ne=-1,pe=!0,ke=d&Q?new qs:t;for(W.set(a,c),W.set(c,a);++ne1?"& ":"")+c[m],c=c.join(d>2?", ":" "),a.replace(Et,`{ /* [wrapped with `+c+`] */ -`)}function e2(a){return je(a)||zs(a)||!!(vp&&a&&a[vp])}function Yr(a,c){var d=typeof a;return c=c??Ae,!!c&&(d=="number"||d!="symbol"&&il.test(a))&&a>-1&&a%1==0&&a0){if(++c>=ue)return arguments[0]}else c=0;return a.apply(t,arguments)}}function uf(a,c){var d=-1,m=a.length,w=m-1;for(c=c===t?m:c;++d1?a[c-1]:t;return d=typeof d=="function"?(a.pop(),d):t,Rg(a,d)});function Ag(a){var c=k(a);return c.__chain__=!0,c}function uk(a,c){return c(a),a}function hf(a,c){return c(a)}var hk=Ur(function(a){var c=a.length,d=c?a[0]:0,m=this.__wrapped__,w=function(W){return Eu(W,a)};return c>1||this.__actions__.length||!(m instanceof ft)||!Yr(d)?this.thru(w):(m=m.slice(d,+d+(c?1:0)),m.__actions__.push({func:hf,args:[w],thisArg:t}),new Zn(m,this.__chain__).thru(function(W){return c&&!W.length&&W.push(t),W}))});function Ok(){return Ag(this)}function dk(){return new Zn(this.value(),this.__chain__)}function pk(){this.__values__===t&&(this.__values__=Fg(this.value()));var a=this.__index__>=this.__values__.length,c=a?t:this.__values__[this.__index__++];return{done:a,value:c}}function gk(){return this}function mk(a){for(var c,d=this;d instanceof Ga;){var m=Wg(d);m.__index__=0,m.__values__=t,c?w.__wrapped__=m:c=m;var w=m;d=d.__wrapped__}return w.__wrapped__=a,c}function Sk(){var a=this.__wrapped__;if(a instanceof ft){var c=a;return this.__actions__.length&&(c=new ft(this)),c=c.reverse(),c.__actions__.push({func:hf,args:[dh],thisArg:t}),new Zn(c,this.__chain__)}return this.thru(dh)}function bk(){return Hp(this.__wrapped__,this.__actions__)}var $k=rf(function(a,c,d){wt.call(a,d)?++a[d]:Rr(a,d,1)});function Qk(a,c,d){var m=je(a)?cp:uP;return d&&Gi(a,c,d)&&(c=t),m(a,Ze(c,3))}function wk(a,c){var d=je(a)?ns:Rp;return d(a,Ze(c,3))}var yk=ag(xg),vk=ag(Cg);function Pk(a,c){return Ci(Of(a,c),1)}function kk(a,c){return Ci(Of(a,c),fe)}function _k(a,c,d){return d=d===t?1:Ge(d),Ci(Of(a,c),d)}function Ug(a,c){var d=je(a)?Xn:os;return d(a,Ze(c,3))}function Yg(a,c){var d=je(a)?Ly:Zp;return d(a,Ze(c,3))}var Wk=rf(function(a,c,d){wt.call(a,d)?a[d].push(c):Rr(a,d,[c])});function xk(a,c,d,m){a=sn(a)?a:gl(a),d=d&&!m?Ge(d):0;var w=a.length;return d<0&&(d=mi(w+d,0)),Sf(a)?d<=w&&a.indexOf(c,d)>-1:!!w&&rl(a,c,d)>-1}var Ck=it(function(a,c,d){var m=-1,w=typeof c=="function",W=sn(a)?j(a.length):[];return os(a,function(T){W[++m]=w?pn(c,T,d):co(T,c,d)}),W}),Xk=rf(function(a,c,d){Rr(a,d,c)});function Of(a,c){var d=je(a)?Mt:Ep;return d(a,Ze(c,3))}function Tk(a,c,d,m){return a==null?[]:(je(c)||(c=c==null?[]:[c]),d=m?t:d,je(d)||(d=d==null?[]:[d]),Ip(a,c,d))}var Zk=rf(function(a,c,d){a[d?0:1].push(c)},function(){return[[],[]]});function Rk(a,c,d){var m=je(a)?_u:dp,w=arguments.length<3;return m(a,Ze(c,4),d,w,os)}function Ak(a,c,d){var m=je(a)?By:dp,w=arguments.length<3;return m(a,Ze(c,4),d,w,Zp)}function Uk(a,c){var d=je(a)?ns:Rp;return d(a,gf(Ze(c,3)))}function Yk(a){var c=je(a)?xp:xP;return c(a)}function Vk(a,c,d){(d?Gi(a,c,d):c===t)?c=1:c=Ge(c);var m=je(a)?lP:CP;return m(a,c)}function qk(a){var c=je(a)?oP:TP;return c(a)}function Ek(a){if(a==null)return 0;if(sn(a))return Sf(a)?ll(a):a.length;var c=zi(a);return c==ut||c==De?a.size:Lu(a).length}function Mk(a,c,d){var m=je(a)?Wu:ZP;return d&&Gi(a,c,d)&&(c=t),m(a,Ze(c,3))}var Dk=it(function(a,c){if(a==null)return[];var d=c.length;return d>1&&Gi(a,c[0],c[1])?c=[]:d>2&&Gi(c[0],c[1],c[2])&&(c=[c[0]]),Ip(a,Ci(c,1),[])}),df=wv||function(){return xi.Date.now()};function zk(a,c){if(typeof c!="function")throw new Tn(l);return a=Ge(a),function(){if(--a<1)return c.apply(this,arguments)}}function Vg(a,c,d){return c=d?t:c,c=a&&c==null?a.length:c,Ar(a,I,t,t,t,t,c)}function qg(a,c){var d;if(typeof c!="function")throw new Tn(l);return a=Ge(a),function(){return--a>0&&(d=c.apply(this,arguments)),a<=1&&(c=t),d}}var gh=it(function(a,c,d){var m=$;if(d.length){var w=ss(d,dl(gh));m|=X}return Ar(a,m,c,d,w)}),Eg=it(function(a,c,d){var m=$|P;if(d.length){var w=ss(d,dl(Eg));m|=X}return Ar(c,m,a,d,w)});function Mg(a,c,d){c=d?t:c;var m=Ar(a,A,t,t,t,t,t,c);return m.placeholder=Mg.placeholder,m}function Dg(a,c,d){c=d?t:c;var m=Ar(a,C,t,t,t,t,t,c);return m.placeholder=Dg.placeholder,m}function zg(a,c,d){var m,w,W,T,U,M,ee=0,te=!1,ne=!1,ge=!0;if(typeof a!="function")throw new Tn(l);c=Yn(c)||0,jt(d)&&(te=!!d.leading,ne="maxWait"in d,W=ne?mi(Yn(d.maxWait)||0,c):W,ge="trailing"in d?!!d.trailing:ge);function ke(oi){var er=m,Er=w;return m=w=t,ee=oi,T=a.apply(Er,er),T}function Ye(oi){return ee=oi,U=go(at,c),te?ke(oi):T}function Je(oi){var er=oi-M,Er=oi-ee,am=c-er;return ne?Di(am,W-Er):am}function Ve(oi){var er=oi-M,Er=oi-ee;return M===t||er>=c||er<0||ne&&Er>=W}function at(){var oi=df();if(Ve(oi))return gt(oi);U=go(at,Je(oi))}function gt(oi){return U=t,ge&&m?ke(oi):(m=w=t,T)}function bn(){U!==t&&Jp(U),ee=0,m=M=w=U=t}function Hi(){return U===t?T:gt(df())}function $n(){var oi=df(),er=Ve(oi);if(m=arguments,w=this,M=oi,er){if(U===t)return Ye(M);if(ne)return Jp(U),U=go(at,c),ke(M)}return U===t&&(U=go(at,c)),T}return $n.cancel=bn,$n.flush=Hi,$n}var Ik=it(function(a,c){return Tp(a,1,c)}),Nk=it(function(a,c,d){return Tp(a,Yn(c)||0,d)});function Lk(a){return Ar(a,N)}function pf(a,c){if(typeof a!="function"||c!=null&&typeof c!="function")throw new Tn(l);var d=function(){var m=arguments,w=c?c.apply(this,m):m[0],W=d.cache;if(W.has(w))return W.get(w);var T=a.apply(this,m);return d.cache=W.set(w,T)||W,T};return d.cache=new(pf.Cache||Zr),d}pf.Cache=Zr;function gf(a){if(typeof a!="function")throw new Tn(l);return function(){var c=arguments;switch(c.length){case 0:return!a.call(this);case 1:return!a.call(this,c[0]);case 2:return!a.call(this,c[0],c[1]);case 3:return!a.call(this,c[0],c[1],c[2])}return!a.apply(this,c)}}function Bk(a){return qg(2,a)}var jk=RP(function(a,c){c=c.length==1&&je(c[0])?Mt(c[0],gn(Ze())):Mt(Ci(c,1),gn(Ze()));var d=c.length;return it(function(m){for(var w=-1,W=Di(m.length,d);++w=c}),zs=Yp(function(){return arguments}())?Yp:function(a){return ei(a)&&wt.call(a,"callee")&&!yp.call(a,"callee")},je=j.isArray,f_=rp?gn(rp):mP;function sn(a){return a!=null&&mf(a.length)&&!Vr(a)}function li(a){return ei(a)&&sn(a)}function c_(a){return a===!0||a===!1||ei(a)&&Fi(a)==K}var us=vv||Wh,u_=sp?gn(sp):SP;function h_(a){return ei(a)&&a.nodeType===1&&!mo(a)}function O_(a){if(a==null)return!0;if(sn(a)&&(je(a)||typeof a=="string"||typeof a.splice=="function"||us(a)||pl(a)||zs(a)))return!a.length;var c=zi(a);if(c==ut||c==De)return!a.size;if(po(a))return!Lu(a).length;for(var d in a)if(wt.call(a,d))return!1;return!0}function d_(a,c){return uo(a,c)}function p_(a,c,d){d=typeof d=="function"?d:t;var m=d?d(a,c):t;return m===t?uo(a,c,t,d):!!m}function Sh(a){if(!ei(a))return!1;var c=Fi(a);return c==se||c==le||typeof a.message=="string"&&typeof a.name=="string"&&!mo(a)}function g_(a){return typeof a=="number"&&Pp(a)}function Vr(a){if(!jt(a))return!1;var c=Fi(a);return c==Ke||c==Fe||c==ve||c==Kt}function Ng(a){return typeof a=="number"&&a==Ge(a)}function mf(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=Ae}function jt(a){var c=typeof a;return a!=null&&(c=="object"||c=="function")}function ei(a){return a!=null&&typeof a=="object"}var Lg=lp?gn(lp):$P;function m_(a,c){return a===c||Nu(a,c,ah(c))}function S_(a,c,d){return d=typeof d=="function"?d:t,Nu(a,c,ah(c),d)}function b_(a){return Bg(a)&&a!=+a}function $_(a){if(n2(a))throw new Le(s);return Vp(a)}function Q_(a){return a===null}function w_(a){return a==null}function Bg(a){return typeof a=="number"||ei(a)&&Fi(a)==ht}function mo(a){if(!ei(a)||Fi(a)!=Xe)return!1;var c=za(a);if(c===null)return!0;var d=wt.call(c,"constructor")&&c.constructor;return typeof d=="function"&&d instanceof d&&qa.call(d)==Sv}var bh=op?gn(op):QP;function y_(a){return Ng(a)&&a>=-Ae&&a<=Ae}var jg=ap?gn(ap):wP;function Sf(a){return typeof a=="string"||!je(a)&&ei(a)&&Fi(a)==bt}function Sn(a){return typeof a=="symbol"||ei(a)&&Fi(a)==lt}var pl=fp?gn(fp):yP;function v_(a){return a===t}function P_(a){return ei(a)&&zi(a)==dt}function k_(a){return ei(a)&&Fi(a)==vt}var __=af(Bu),W_=af(function(a,c){return a<=c});function Fg(a){if(!a)return[];if(sn(a))return Sf(a)?Hn(a):rn(a);if(no&&a[no])return lv(a[no]());var c=zi(a),d=c==ut?Ru:c==De?Ua:gl;return d(a)}function qr(a){if(!a)return a===0?a:0;if(a=Yn(a),a===fe||a===-fe){var c=a<0?-1:1;return c*xe}return a===a?a:0}function Ge(a){var c=qr(a),d=c%1;return c===c?d?c-d:c:0}function Gg(a){return a?qs(Ge(a),0,Me):0}function Yn(a){if(typeof a=="number")return a;if(Sn(a))return Ce;if(jt(a)){var c=typeof a.valueOf=="function"?a.valueOf():a;a=jt(c)?c+"":c}if(typeof a!="string")return a===0?a:+a;a=pp(a);var d=xn.test(a);return d||Zs.test(a)?yu(a.slice(2),d?2:8):es.test(a)?Ce:+a}function Hg(a){return hr(a,ln(a))}function x_(a){return a?qs(Ge(a),-Ae,Ae):a===0?a:0}function $t(a){return a==null?"":mn(a)}var C_=hl(function(a,c){if(po(c)||sn(c)){hr(c,yi(c),a);return}for(var d in c)wt.call(c,d)&&ao(a,d,c[d])}),Kg=hl(function(a,c){hr(c,ln(c),a)}),bf=hl(function(a,c,d,m){hr(c,ln(c),a,m)}),X_=hl(function(a,c,d,m){hr(c,yi(c),a,m)}),T_=Ur(Eu);function Z_(a,c){var d=ul(a);return c==null?d:Cp(d,c)}var R_=it(function(a,c){a=Pt(a);var d=-1,m=c.length,w=m>2?c[2]:t;for(w&&Gi(c[0],c[1],w)&&(m=1);++d1),W}),hr(a,lh(a),d),m&&(d=Rn(d,O|p|g,NP));for(var w=c.length;w--;)Ku(d,c[w]);return d});function K_(a,c){return em(a,gf(Ze(c)))}var J_=Ur(function(a,c){return a==null?{}:kP(a,c)});function em(a,c){if(a==null)return{};var d=Mt(lh(a),function(m){return[m]});return c=Ze(c),Np(a,d,function(m,w){return c(m,w[0])})}function eW(a,c,d){c=fs(c,a);var m=-1,w=c.length;for(w||(w=1,a=t);++mc){var m=a;a=c,c=m}if(d||a%1||c%1){var w=kp();return Di(a+w*(c-a+si("1e-"+((w+"").length-1))),c)}return Fu(a,c)}var uW=Ol(function(a,c,d){return c=c.toLowerCase(),a+(d?nm(c):c)});function nm(a){return wh($t(a).toLowerCase())}function rm(a){return a=$t(a),a&&a.replace(Xr,tv).replace(bu,"")}function hW(a,c,d){a=$t(a),c=mn(c);var m=a.length;d=d===t?m:qs(Ge(d),0,m);var w=d;return d-=c.length,d>=0&&a.slice(d,w)==c}function OW(a){return a=$t(a),a&&dn.test(a)?a.replace(Cr,iv):a}function dW(a){return a=$t(a),a&&Bt.test(a)?a.replace(Ne,"\\$&"):a}var pW=Ol(function(a,c,d){return a+(d?"-":"")+c.toLowerCase()}),gW=Ol(function(a,c,d){return a+(d?" ":"")+c.toLowerCase()}),mW=og("toLowerCase");function SW(a,c,d){a=$t(a),c=Ge(c);var m=c?ll(a):0;if(!c||m>=c)return a;var w=(c-m)/2;return of(Ba(w),d)+a+of(La(w),d)}function bW(a,c,d){a=$t(a),c=Ge(c);var m=c?ll(a):0;return c&&m>>0,d?(a=$t(a),a&&(typeof c=="string"||c!=null&&!bh(c))&&(c=mn(c),!c&&sl(a))?cs(Hn(a),0,d):a.split(c,d)):[]}var kW=Ol(function(a,c,d){return a+(d?" ":"")+wh(c)});function _W(a,c,d){return a=$t(a),d=d==null?0:qs(Ge(d),0,a.length),c=mn(c),a.slice(d,d+c.length)==c}function WW(a,c,d){var m=k.templateSettings;d&&Gi(a,c,d)&&(c=t),a=$t(a),c=bf({},c,m,dg);var w=bf({},c.imports,m.imports,dg),W=yi(w),T=Zu(w,W),U,M,ee=0,te=c.interpolate||cr,ne="__p += '",ge=Au((c.escape||cr).source+"|"+te.source+"|"+(te===Tt?B:cr).source+"|"+(c.evaluate||cr).source+"|$","g"),ke="//# sourceURL="+(wt.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++he+"]")+` -`;a.replace(ge,function(Ve,at,gt,bn,Hi,$n){return gt||(gt=bn),ne+=a.slice(ee,$n).replace(Wi,nv),at&&(U=!0,ne+=`' + +`)}function e2(a){return Ge(a)||Is(a)||!!(Pp&&a&&a[Pp])}function qr(a,c){var d=typeof a;return c=c??Re,!!c&&(d=="number"||d!="symbol"&&nl.test(a))&&a>-1&&a%1==0&&a0){if(++c>=ue)return arguments[0]}else c=0;return a.apply(t,arguments)}}function Of(a,c){var d=-1,m=a.length,w=m-1;for(c=c===t?m:c;++d1?a[c-1]:t;return d=typeof d=="function"?(a.pop(),d):t,Ag(a,d)});function Ug(a){var c=k(a);return c.__chain__=!0,c}function uk(a,c){return c(a),a}function df(a,c){return c(a)}var hk=Vr(function(a){var c=a.length,d=c?a[0]:0,m=this.__wrapped__,w=function(W){return Du(W,a)};return c>1||this.__actions__.length||!(m instanceof ct)||!qr(d)?this.thru(w):(m=m.slice(d,+d+(c?1:0)),m.__actions__.push({func:df,args:[w],thisArg:t}),new Tn(m,this.__chain__).thru(function(W){return c&&!W.length&&W.push(t),W}))});function Ok(){return Ug(this)}function dk(){return new Tn(this.value(),this.__chain__)}function pk(){this.__values__===t&&(this.__values__=Gg(this.value()));var a=this.__index__>=this.__values__.length,c=a?t:this.__values__[this.__index__++];return{done:a,value:c}}function gk(){return this}function mk(a){for(var c,d=this;d instanceof Ka;){var m=xg(d);m.__index__=0,m.__values__=t,c?w.__wrapped__=m:c=m;var w=m;d=d.__wrapped__}return w.__wrapped__=a,c}function Sk(){var a=this.__wrapped__;if(a instanceof ct){var c=a;return this.__actions__.length&&(c=new ct(this)),c=c.reverse(),c.__actions__.push({func:df,args:[gh],thisArg:t}),new Tn(c,this.__chain__)}return this.thru(gh)}function bk(){return Kp(this.__wrapped__,this.__actions__)}var $k=lf(function(a,c,d){vt.call(a,d)?++a[d]:Ur(a,d,1)});function Qk(a,c,d){var m=Ge(a)?up:uP;return d&&Gi(a,c,d)&&(c=t),m(a,Te(c,3))}function wk(a,c){var d=Ge(a)?ns:Ap;return d(a,Te(c,3))}var yk=fg(Cg),vk=fg(Xg);function Pk(a,c){return Wi(pf(a,c),1)}function kk(a,c){return Wi(pf(a,c),ce)}function _k(a,c,d){return d=d===t?1:Ke(d),Wi(pf(a,c),d)}function Yg(a,c){var d=Ge(a)?Cn:os;return d(a,Te(c,3))}function Vg(a,c){var d=Ge(a)?Ly:Rp;return d(a,Te(c,3))}var Wk=lf(function(a,c,d){vt.call(a,d)?a[d].push(c):Ur(a,d,[c])});function xk(a,c,d,m){a=nn(a)?a:ml(a),d=d&&!m?Ke(d):0;var w=a.length;return d<0&&(d=Si(w+d,0)),$f(a)?d<=w&&a.indexOf(c,d)>-1:!!w&&sl(a,c,d)>-1}var Ck=it(function(a,c,d){var m=-1,w=typeof c=="function",W=nn(a)?j(a.length):[];return os(a,function(T){W[++m]=w?On(c,T,d):uo(T,c,d)}),W}),Xk=lf(function(a,c,d){Ur(a,d,c)});function pf(a,c){var d=Ge(a)?Mt:Mp;return d(a,Te(c,3))}function Tk(a,c,d,m){return a==null?[]:(Ge(c)||(c=c==null?[]:[c]),d=m?t:d,Ge(d)||(d=d==null?[]:[d]),Np(a,c,d))}var Zk=lf(function(a,c,d){a[d?0:1].push(c)},function(){return[[],[]]});function Rk(a,c,d){var m=Ge(a)?xu:pp,w=arguments.length<3;return m(a,Te(c,4),d,w,os)}function Ak(a,c,d){var m=Ge(a)?By:pp,w=arguments.length<3;return m(a,Te(c,4),d,w,Rp)}function Uk(a,c){var d=Ge(a)?ns:Ap;return d(a,Sf(Te(c,3)))}function Yk(a){var c=Ge(a)?Cp:xP;return c(a)}function Vk(a,c,d){(d?Gi(a,c,d):c===t)?c=1:c=Ke(c);var m=Ge(a)?lP:CP;return m(a,c)}function qk(a){var c=Ge(a)?oP:TP;return c(a)}function Ek(a){if(a==null)return 0;if(nn(a))return $f(a)?ol(a):a.length;var c=Di(a);return c==st||c==Me?a.size:ju(a).length}function Mk(a,c,d){var m=Ge(a)?Cu:ZP;return d&&Gi(a,c,d)&&(c=t),m(a,Te(c,3))}var Dk=it(function(a,c){if(a==null)return[];var d=c.length;return d>1&&Gi(a,c[0],c[1])?c=[]:d>2&&Gi(c[0],c[1],c[2])&&(c=[c[0]]),Np(a,Wi(c,1),[])}),gf=wv||function(){return _i.Date.now()};function zk(a,c){if(typeof c!="function")throw new Xn(l);return a=Ke(a),function(){if(--a<1)return c.apply(this,arguments)}}function qg(a,c,d){return c=d?t:c,c=a&&c==null?a.length:c,Yr(a,I,t,t,t,t,c)}function Eg(a,c){var d;if(typeof c!="function")throw new Xn(l);return a=Ke(a),function(){return--a>0&&(d=c.apply(this,arguments)),a<=1&&(c=t),d}}var Sh=it(function(a,c,d){var m=$;if(d.length){var w=ss(d,pl(Sh));m|=X}return Yr(a,m,c,d,w)}),Mg=it(function(a,c,d){var m=$|P;if(d.length){var w=ss(d,pl(Mg));m|=X}return Yr(c,m,a,d,w)});function Dg(a,c,d){c=d?t:c;var m=Yr(a,A,t,t,t,t,t,c);return m.placeholder=Dg.placeholder,m}function zg(a,c,d){c=d?t:c;var m=Yr(a,C,t,t,t,t,t,c);return m.placeholder=zg.placeholder,m}function Ig(a,c,d){var m,w,W,T,U,M,J=0,ee=!1,ne=!1,pe=!0;if(typeof a!="function")throw new Xn(l);c=Un(c)||0,Ft(d)&&(ee=!!d.leading,ne="maxWait"in d,W=ne?Si(Un(d.maxWait)||0,c):W,pe="trailing"in d?!!d.trailing:pe);function ke(oi){var Kn=m,Dr=w;return m=w=t,J=oi,T=a.apply(Dr,Kn),T}function Ue(oi){return J=oi,U=mo(at,c),ee?ke(oi):T}function et(oi){var Kn=oi-M,Dr=oi-J,fm=c-Kn;return ne?Mi(fm,W-Dr):fm}function Ye(oi){var Kn=oi-M,Dr=oi-J;return M===t||Kn>=c||Kn<0||ne&&Dr>=W}function at(){var oi=gf();if(Ye(oi))return dt(oi);U=mo(at,et(oi))}function dt(oi){return U=t,pe&&m?ke(oi):(m=w=t,T)}function mn(){U!==t&&eg(U),J=0,m=M=w=U=t}function Hi(){return U===t?T:dt(gf())}function Sn(){var oi=gf(),Kn=Ye(oi);if(m=arguments,w=this,M=oi,Kn){if(U===t)return Ue(M);if(ne)return eg(U),U=mo(at,c),ke(M)}return U===t&&(U=mo(at,c)),T}return Sn.cancel=mn,Sn.flush=Hi,Sn}var Ik=it(function(a,c){return Zp(a,1,c)}),Nk=it(function(a,c,d){return Zp(a,Un(c)||0,d)});function Lk(a){return Yr(a,L)}function mf(a,c){if(typeof a!="function"||c!=null&&typeof c!="function")throw new Xn(l);var d=function(){var m=arguments,w=c?c.apply(this,m):m[0],W=d.cache;if(W.has(w))return W.get(w);var T=a.apply(this,m);return d.cache=W.set(w,T)||W,T};return d.cache=new(mf.Cache||Ar),d}mf.Cache=Ar;function Sf(a){if(typeof a!="function")throw new Xn(l);return function(){var c=arguments;switch(c.length){case 0:return!a.call(this);case 1:return!a.call(this,c[0]);case 2:return!a.call(this,c[0],c[1]);case 3:return!a.call(this,c[0],c[1],c[2])}return!a.apply(this,c)}}function Bk(a){return Eg(2,a)}var jk=RP(function(a,c){c=c.length==1&&Ge(c[0])?Mt(c[0],dn(Te())):Mt(Wi(c,1),dn(Te()));var d=c.length;return it(function(m){for(var w=-1,W=Mi(m.length,d);++w=c}),Is=Vp(function(){return arguments}())?Vp:function(a){return Jt(a)&&vt.call(a,"callee")&&!vp.call(a,"callee")},Ge=j.isArray,f_=sp?dn(sp):mP;function nn(a){return a!=null&&bf(a.length)&&!Er(a)}function li(a){return Jt(a)&&nn(a)}function c_(a){return a===!0||a===!1||Jt(a)&&Fi(a)==ie}var us=vv||Ch,u_=lp?dn(lp):SP;function h_(a){return Jt(a)&&a.nodeType===1&&!So(a)}function O_(a){if(a==null)return!0;if(nn(a)&&(Ge(a)||typeof a=="string"||typeof a.splice=="function"||us(a)||gl(a)||Is(a)))return!a.length;var c=Di(a);if(c==st||c==Me)return!a.size;if(go(a))return!ju(a).length;for(var d in a)if(vt.call(a,d))return!1;return!0}function d_(a,c){return ho(a,c)}function p_(a,c,d){d=typeof d=="function"?d:t;var m=d?d(a,c):t;return m===t?ho(a,c,t,d):!!m}function $h(a){if(!Jt(a))return!1;var c=Fi(a);return c==fe||c==le||typeof a.message=="string"&&typeof a.name=="string"&&!So(a)}function g_(a){return typeof a=="number"&&kp(a)}function Er(a){if(!Ft(a))return!1;var c=Fi(a);return c==ze||c==Ne||c==ve||c==ge}function Lg(a){return typeof a=="number"&&a==Ke(a)}function bf(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=Re}function Ft(a){var c=typeof a;return a!=null&&(c=="object"||c=="function")}function Jt(a){return a!=null&&typeof a=="object"}var Bg=op?dn(op):$P;function m_(a,c){return a===c||Bu(a,c,ch(c))}function S_(a,c,d){return d=typeof d=="function"?d:t,Bu(a,c,ch(c),d)}function b_(a){return jg(a)&&a!=+a}function $_(a){if(n2(a))throw new Le(s);return qp(a)}function Q_(a){return a===null}function w_(a){return a==null}function jg(a){return typeof a=="number"||Jt(a)&&Fi(a)==pt}function So(a){if(!Jt(a)||Fi(a)!=gt)return!1;var c=Na(a);if(c===null)return!0;var d=vt.call(c,"constructor")&&c.constructor;return typeof d=="function"&&d instanceof d&&Ma.call(d)==Sv}var Qh=ap?dn(ap):QP;function y_(a){return Lg(a)&&a>=-Re&&a<=Re}var Fg=fp?dn(fp):wP;function $f(a){return typeof a=="string"||!Ge(a)&&Jt(a)&&Fi(a)==ht}function gn(a){return typeof a=="symbol"||Jt(a)&&Fi(a)==ft}var gl=cp?dn(cp):yP;function v_(a){return a===t}function P_(a){return Jt(a)&&Di(a)==Ot}function k_(a){return Jt(a)&&Fi(a)==yt}var __=cf(Fu),W_=cf(function(a,c){return a<=c});function Gg(a){if(!a)return[];if(nn(a))return $f(a)?Fn(a):tn(a);if(ro&&a[ro])return lv(a[ro]());var c=Di(a),d=c==st?Uu:c==Me?Va:ml;return d(a)}function Mr(a){if(!a)return a===0?a:0;if(a=Un(a),a===ce||a===-ce){var c=a<0?-1:1;return c*xe}return a===a?a:0}function Ke(a){var c=Mr(a),d=c%1;return c===c?d?c-d:c:0}function Hg(a){return a?Es(Ke(a),0,Ee):0}function Un(a){if(typeof a=="number")return a;if(gn(a))return Ce;if(Ft(a)){var c=typeof a.valueOf=="function"?a.valueOf():a;a=Ft(c)?c+"":c}if(typeof a!="string")return a===0?a:+a;a=gp(a);var d=cr.test(a);return d||es.test(a)?si(a.slice(2),d?2:8):Jr.test(a)?Ce:+a}function Kg(a){return Or(a,rn(a))}function x_(a){return a?Es(Ke(a),-Re,Re):a===0?a:0}function $t(a){return a==null?"":pn(a)}var C_=Ol(function(a,c){if(go(c)||nn(c)){Or(c,wi(c),a);return}for(var d in c)vt.call(c,d)&&fo(a,d,c[d])}),Jg=Ol(function(a,c){Or(c,rn(c),a)}),Qf=Ol(function(a,c,d,m){Or(c,rn(c),a,m)}),X_=Ol(function(a,c,d,m){Or(c,wi(c),a,m)}),T_=Vr(Du);function Z_(a,c){var d=hl(a);return c==null?d:Xp(d,c)}var R_=it(function(a,c){a=Wt(a);var d=-1,m=c.length,w=m>2?c[2]:t;for(w&&Gi(c[0],c[1],w)&&(m=1);++d1),W}),Or(a,ah(a),d),m&&(d=Zn(d,O|p|g,NP));for(var w=c.length;w--;)eh(d,c[w]);return d});function K_(a,c){return tm(a,Sf(Te(c)))}var J_=Vr(function(a,c){return a==null?{}:kP(a,c)});function tm(a,c){if(a==null)return{};var d=Mt(ah(a),function(m){return[m]});return c=Te(c),Lp(a,d,function(m,w){return c(m,w[0])})}function eW(a,c,d){c=fs(c,a);var m=-1,w=c.length;for(w||(w=1,a=t);++mc){var m=a;a=c,c=m}if(d||a%1||c%1){var w=_p();return Mi(a+w*(c-a+Ei("1e-"+((w+"").length-1))),c)}return Hu(a,c)}var uW=dl(function(a,c,d){return c=c.toLowerCase(),a+(d?rm(c):c)});function rm(a){return vh($t(a).toLowerCase())}function sm(a){return a=$t(a),a&&a.replace(Zs,tv).replace($u,"")}function hW(a,c,d){a=$t(a),c=pn(c);var m=a.length;d=d===t?m:Es(Ke(d),0,m);var w=d;return d-=c.length,d>=0&&a.slice(d,w)==c}function OW(a){return a=$t(a),a&&Hr.test(a)?a.replace(Tr,iv):a}function dW(a){return a=$t(a),a&&Fe.test(a)?a.replace(_t,"\\$&"):a}var pW=dl(function(a,c,d){return a+(d?"-":"")+c.toLowerCase()}),gW=dl(function(a,c,d){return a+(d?" ":"")+c.toLowerCase()}),mW=ag("toLowerCase");function SW(a,c,d){a=$t(a),c=Ke(c);var m=c?ol(a):0;if(!c||m>=c)return a;var w=(c-m)/2;return ff(Fa(w),d)+a+ff(ja(w),d)}function bW(a,c,d){a=$t(a),c=Ke(c);var m=c?ol(a):0;return c&&m>>0,d?(a=$t(a),a&&(typeof c=="string"||c!=null&&!Qh(c))&&(c=pn(c),!c&&ll(a))?cs(Fn(a),0,d):a.split(c,d)):[]}var kW=dl(function(a,c,d){return a+(d?" ":"")+vh(c)});function _W(a,c,d){return a=$t(a),d=d==null?0:Es(Ke(d),0,a.length),c=pn(c),a.slice(d,d+c.length)==c}function WW(a,c,d){var m=k.templateSettings;d&&Gi(a,c,d)&&(c=t),a=$t(a),c=Qf({},c,m,pg);var w=Qf({},c.imports,m.imports,pg),W=wi(w),T=Au(w,W),U,M,J=0,ee=c.interpolate||Wn,ne="__p += '",pe=Yu((c.escape||Wn).source+"|"+ee.source+"|"+(ee===Bt?N:Wn).source+"|"+(c.evaluate||Wn).source+"|$","g"),ke="//# sourceURL="+(vt.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++R+"]")+` +`;a.replace(pe,function(Ye,at,dt,mn,Hi,Sn){return dt||(dt=mn),ne+=a.slice(J,Sn).replace(ts,nv),at&&(U=!0,ne+=`' + __e(`+at+`) + '`),Hi&&(M=!0,ne+=`'; `+Hi+`; -__p += '`),gt&&(ne+=`' + -((__t = (`+gt+`)) == null ? '' : __t) + -'`),ee=$n+Ve.length,Ve}),ne+=`'; -`;var Ye=wt.call(c,"variable")&&c.variable;if(!Ye)ne=`with (obj) { +__p += '`),dt&&(ne+=`' + +((__t = (`+dt+`)) == null ? '' : __t) + +'`),J=Sn+Ye.length,Ye}),ne+=`'; +`;var Ue=vt.call(c,"variable")&&c.variable;if(!Ue)ne=`with (obj) { `+ne+` } -`;else if(Kr.test(Ye))throw new Le(o);ne=(M?ne.replace(hi,""):ne).replace(Ts,"$1").replace(qi,"$1;"),ne="function("+(Ye||"obj")+`) { -`+(Ye?"":`obj || (obj = {}); +`;else if(_n.test(Ue))throw new Le(o);ne=(M?ne.replace(pi,""):ne).replace(Xr,"$1").replace(ji,"$1;"),ne="function("+(Ue||"obj")+`) { +`+(Ue?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(U?", __e = _.escape":"")+(M?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+ne+`return __p -}`;var Je=lm(function(){return St(W,ke+"return "+ne).apply(t,T)});if(Je.source=ne,Sh(Je))throw Je;return Je}function xW(a){return $t(a).toLowerCase()}function CW(a){return $t(a).toUpperCase()}function XW(a,c,d){if(a=$t(a),a&&(d||c===t))return pp(a);if(!a||!(c=mn(c)))return a;var m=Hn(a),w=Hn(c),W=gp(m,w),T=mp(m,w)+1;return cs(m,W,T).join("")}function TW(a,c,d){if(a=$t(a),a&&(d||c===t))return a.slice(0,bp(a)+1);if(!a||!(c=mn(c)))return a;var m=Hn(a),w=mp(m,Hn(c))+1;return cs(m,0,w).join("")}function ZW(a,c,d){if(a=$t(a),a&&(d||c===t))return a.replace(Zt,"");if(!a||!(c=mn(c)))return a;var m=Hn(a),w=gp(m,Hn(c));return cs(m,w).join("")}function RW(a,c){var d=z,m=ie;if(jt(c)){var w="separator"in c?c.separator:w;d="length"in c?Ge(c.length):d,m="omission"in c?mn(c.omission):m}a=$t(a);var W=a.length;if(sl(a)){var T=Hn(a);W=T.length}if(d>=W)return a;var U=d-ll(m);if(U<1)return m;var M=T?cs(T,0,U).join(""):a.slice(0,U);if(w===t)return M+m;if(T&&(U+=M.length-U),bh(w)){if(a.slice(U).search(w)){var ee,te=M;for(w.global||(w=Au(w.source,$t(Oe.exec(w))+"g")),w.lastIndex=0;ee=w.exec(te);)var ne=ee.index;M=M.slice(0,ne===t?U:ne)}}else if(a.indexOf(mn(w),U)!=U){var ge=M.lastIndexOf(w);ge>-1&&(M=M.slice(0,ge))}return M+m}function AW(a){return a=$t(a),a&&Ei.test(a)?a.replace(Vt,cv):a}var UW=Ol(function(a,c,d){return a+(d?" ":"")+c.toUpperCase()}),wh=og("toUpperCase");function sm(a,c,d){return a=$t(a),c=d?t:c,c===t?sv(a)?Ov(a):Gy(a):a.match(c)||[]}var lm=it(function(a,c){try{return pn(a,t,c)}catch(d){return Sh(d)?d:new Le(d)}}),YW=Ur(function(a,c){return Xn(c,function(d){d=Or(d),Rr(a,d,gh(a[d],a))}),a});function VW(a){var c=a==null?0:a.length,d=Ze();return a=c?Mt(a,function(m){if(typeof m[1]!="function")throw new Tn(l);return[d(m[0]),m[1]]}):[],it(function(m){for(var w=-1;++wAe)return[];var d=Me,m=Di(a,Me);c=Ze(c),a-=Me;for(var w=Tu(m,c);++d0||c<0)?new ft(d):(a<0?d=d.takeRight(-a):a&&(d=d.drop(a)),c!==t&&(c=Ge(c),d=c<0?d.dropRight(-c):d.take(c-a)),d)},ft.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},ft.prototype.toArray=function(){return this.take(Me)},ur(ft.prototype,function(a,c){var d=/^(?:filter|find|map|reject)|While$/.test(c),m=/^(?:head|last)$/.test(c),w=k[m?"take"+(c=="last"?"Right":""):c],W=m||/^find/.test(c);w&&(k.prototype[c]=function(){var T=this.__wrapped__,U=m?[1]:arguments,M=T instanceof ft,ee=U[0],te=M||je(T),ne=function(at){var gt=w.apply(k,rs([at],U));return m&&ge?gt[0]:gt};te&&d&&typeof ee=="function"&&ee.length!=1&&(M=te=!1);var ge=this.__chain__,ke=!!this.__actions__.length,Ye=W&&!ge,Je=M&&!ke;if(!W&&te){T=Je?T:new ft(this);var Ve=a.apply(T,U);return Ve.__actions__.push({func:hf,args:[ne],thisArg:t}),new Zn(Ve,ge)}return Ye&&Je?a.apply(this,U):(Ve=this.thru(ne),Ye?m?Ve.value()[0]:Ve.value():Ve)})}),Xn(["pop","push","shift","sort","splice","unshift"],function(a){var c=Ya[a],d=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",m=/^(?:pop|shift)$/.test(a);k.prototype[a]=function(){var w=arguments;if(m&&!this.__chain__){var W=this.value();return c.apply(je(W)?W:[],w)}return this[d](function(T){return c.apply(je(T)?T:[],w)})}}),ur(ft.prototype,function(a,c){var d=k[c];if(d){var m=d.name+"";wt.call(cl,m)||(cl[m]=[]),cl[m].push({name:c,func:d})}}),cl[sf(t,P).name]=[{name:"wrapper",func:t}],ft.prototype.clone=Av,ft.prototype.reverse=Uv,ft.prototype.value=Yv,k.prototype.at=hk,k.prototype.chain=Ok,k.prototype.commit=dk,k.prototype.next=pk,k.prototype.plant=mk,k.prototype.reverse=Sk,k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=bk,k.prototype.first=k.prototype.head,no&&(k.prototype[no]=gk),k},ol=dv();As?((As.exports=ol)._=ol,vu._=ol):xi._=ol}).call(_o)})(Mc,Mc.exports);var Z9=Mc.exports;const R9=Ws.define({parser:KC.configure({props:[Bl.add({ParenthesisedExpression:Os({closing:")",align:!1}),Application:Os({closing:")",align:!1}),GeneratorCallGenerators:Os({closing:")",align:!1}),LetItems:Os({closing:"}",align:!1}),ArrayLiteral:Os({closing:"]",align:!1}),ArrayLiteral2d:Os({closing:"|]",align:!1}),SetLiteral:Os({closing:"}",align:!1})}),jl.add({ParenthesisedExpression:Sr,Application:Sr,GeneratorCallGenerators:Sr,LetItems:Sr,ArrayLiteral:Sr,ArrayLiteral2d:Sr,SetLiteral:Sr}),Ll({Keyword:S.keyword,"Identifier QuotedIdentifier":S.variableName,"Call/Identifier Call/QuotedIdentifier GeneratorCall/Identifier GeneratorCall/QuotedIdentifier":S.name,Absent:S.null,Anonymous:S.null,BooleanLiteral:S.bool,Number:S.number,Infinity:S.number,StringLiteral:S.string,LineComment:S.comment,BlockComment:S.comment,"( )":S.paren,"{ }":S.paren,"[ ]":S.paren})]}),languageData:{commentTokens:{line:"%"}}});function G0(){return new ca(R9)}const qy=ki({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#999",lineHighlight:"#90909020"},styles:[{tag:S.comment,color:"slategray"},{tag:S.string,color:"#690"},{tag:[S.number,S.bool,S.null],color:"#905"},{tag:S.variableName,color:"#000000"},{tag:S.name,color:"#07a"},{tag:[S.keyword],color:"#07a"}]}),Ey=ki({variant:"dark",settings:{background:"#222",foreground:"#F6F6F6",caret:"#EEE",selection:"#036dd626",gutterBackground:"#333",gutterForeground:"#999",lineHighlight:"#90909020"},styles:[{tag:S.comment,color:"slategray"},{tag:S.string,color:"#e09177"},{tag:[S.number,S.bool,S.null],color:"#a9e07e"},{tag:S.variableName,color:"#FFFFFF"},{tag:S.name,color:"#e6cf77"},{tag:[S.keyword],color:"#54a2e3"}]}),tp=new Nl,Bs=new Nl,A9=Bs.reconfigure(me.editable.of(!1)),U9=Bs.reconfigure(me.editable.of(!0)),Y9=tp.reconfigure(qy),V9=tp.reconfigure(Ey);function Nf(n,e,t,i=!1){const r=[AR,aa.of([iZ]),tp.of(t?Ey:qy),me.theme({"&":{height:"100%"},"&.cm-editor.cm-focused":{outline:"none"},".cm-content, .cm-gutter":{minHeight:"100%"},"&.cm-focused .cm-selectionBackground":{backgroundColor:"#036dd638"}})];return n===".json"||n===".mpc"?[...r,Bs.of(me.editable.of(!i)),qR()]:n===".mzc"?[...r,Bs.of(me.editable.of(!1))]:n===".dzn"?[...r,Bs.of(me.editable.of(!i)),G0()]:n===".html"?[...r,Bs.of(me.editable.of(!i)),X9()]:[...r,Bs.of(me.editable.of(!i)),G0(),me.updateListener.of(Z9.debounce(e,250))]}function H0(n,e,t){const i=n.slice();return i[4]=e[t],i}function K0(n,e,t){const i=n.slice();return i[7]=e[t],i}function J0(n,e,t){const i=n.slice();return i[10]=e[t],i[12]=t,i}function q9(n){let e,t,i=Dc(n[0].location)+"",r,s,l,o,f,u,h;return{c(){e=_("pre"),t=_("a"),r=be(i),l=be(":"),o=L(),f=_("br"),y(t,"class",s="mzn-link mzn-"+n[0].type+" svelte-w513p9"),y(e,"class","svelte-w513p9")},m(O,p){V(O,e,p),v(e,t),v(t,r),v(e,l),V(O,o,p),V(O,f,p),u||(h=oe(t,"click",n[3]),u=!0)},p(O,p){p&1&&i!==(i=Dc(O[0].location)+"")&&He(r,i),p&1&&s!==(s="mzn-link mzn-"+O[0].type+" svelte-w513p9")&&y(t,"class",s)},d(O){O&&(Y(e),Y(o),Y(f)),u=!1,h()}}}function E9(n){let e,t=st(n[0].stack),i=[];for(let r=0;rr("goto",{location:o.location}),l=()=>r("goto",{location:i.location});return n.$$set=o=>{"msg"in o&&t(0,i=o.msg)},[i,r,s,l]}class My extends Vi{constructor(e){super(),Yi(this,e,L9,N9,Ui,{msg:0})}}function lS(n,e,t){const i=n.slice();return i[40]=e[t],i}function oS(n,e,t){const i=n.slice();return i[43]=e[t],i}function aS(n,e,t){const i=n.slice();return i[52]=e[t],i}function fS(n,e,t){const i=n.slice();return i[49]=e[t],i}function cS(n,e,t){const i=n.slice();return i[46]=e[t],i}const B9=n=>({}),uS=n=>({});function hS(n,e,t){const i=n.slice();return i[46]=e[t],i}function OS(n){let e,t,i,r,s,l,o,f,u,h,O,p,g;function b(q,N){return q[13].length===0?F9:j9}let Q=b(n),$=Q(n),P=st(n[14]),x=[];for(let q=0;q{o=null}),rt()),u[2]?f?(f.p(u,h),h[0]&4&&D(f,1)):(f=wS(u),f.c(),D(f,1),f.m(e,null)):f&&(nt(),F(f,1,1,()=>{f=null}),rt())},i(u){r||(D(l,u),D(o),D(f),r=!0)},o(u){F(l,u),F(o),F(f),r=!1},d(u){u&&Y(e),l&&l.d(u),o&&o.d(),f&&f.d()}}}function QS(n){let e,t,i,r,s,l,o;return r=new _t({props:{icon:dC}}),{c(){e=_("p"),t=_("button"),i=_("span"),ze(r.$$.fragment),y(i,"class","icon"),y(t,"class","button is-small"),y(t,"title","Clear output on each run"),ae(t,"is-primary",n[0]),ae(t,"is-light",!n[0]),y(e,"class","control")},m(f,u){V(f,e,u),v(e,t),v(t,i),qe(r,i,null),s=!0,l||(o=oe(t,"click",n[33]),l=!0)},p(f,u){(!s||u[0]&1)&&ae(t,"is-primary",f[0]),(!s||u[0]&1)&&ae(t,"is-light",!f[0])},i(f){s||(D(r.$$.fragment,f),s=!0)},o(f){F(r.$$.fragment,f),s=!1},d(f){f&&Y(e),Ee(r),l=!1,o()}}}function wS(n){let e,t,i,r,s,l,o;return r=new _t({props:{icon:WQ}}),{c(){e=_("p"),t=_("button"),i=_("span"),ze(r.$$.fragment),y(i,"class","icon"),y(t,"class","button is-small is-danger"),y(t,"title","Clear output"),y(e,"class","control")},m(f,u){V(f,e,u),v(e,t),v(t,i),qe(r,i,null),s=!0,l||(o=oe(t,"click",n[34]),l=!0)},p:We,i(f){s||(D(r.$$.fragment,f),s=!0)},o(f){F(r.$$.fragment,f),s=!1},d(f){f&&Y(e),Ee(r),l=!1,o()}}}function G9(n){let e;return{c(){e=be("Running")},m(t,i){V(t,e,i)},d(t){t&&Y(e)}}}function H9(n){let e;return{c(){e=be("Compiling")},m(t,i){V(t,e,i)},d(t){t&&Y(e)}}}function K9(n){let e,t,i,r=zc(n[43].runTime)+"",s,l,o=n[43].code&&yS(n);return{c(){o&&o.c(),e=L(),t=_("pre"),i=be("Finished in "),s=be(r),l=be("."),y(t,"class","mzn-runtime")},m(f,u){o&&o.m(f,u),V(f,e,u),V(f,t,u),v(t,i),v(t,s),v(t,l)},p(f,u){f[43].code?o?o.p(f,u):(o=yS(f),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),u[0]&2&&r!==(r=zc(f[43].runTime)+"")&&He(s,r)},i:We,o:We,d(f){f&&(Y(e),Y(t)),o&&o.d(f)}}}function J9(n){let e,t,i=(n[43].type==="error"&&n[12]||n[43].type==="warning"&&n[11])&&vS(n);return{c(){i&&i.c(),e=fi()},m(r,s){i&&i.m(r,s),V(r,e,s),t=!0},p(r,s){r[43].type==="error"&&r[12]||r[43].type==="warning"&&r[11]?i?(i.p(r,s),s[0]&6146&&D(i,1)):(i=vS(r),i.c(),D(i,1),i.m(e.parentNode,e)):i&&(nt(),F(i,1,1,()=>{i=null}),rt())},i(r){t||(D(i),t=!0)},o(r){F(i),t=!1},d(r){r&&Y(e),i&&i.d(r)}}}function e8(n){let e,t=n[23][n[43].status]+"",i,r,s;return{c(){e=_("pre"),i=be(t),r=L(),s=_("br")},m(l,o){V(l,e,o),v(e,i),V(l,r,o),V(l,s,o)},p(l,o){o[0]&2&&t!==(t=l[23][l[43].status]+"")&&He(i,t)},i:We,o:We,d(l){l&&(Y(e),Y(r),Y(s))}}}function t8(n){let e,t,i;return{c(){e=_("pre"),e.textContent="Stopped.",t=L(),i=_("br"),y(e,"class","mzn-runtime")},m(r,s){V(r,e,s),V(r,t,s),V(r,i,s)},p:We,i:We,o:We,d(r){r&&(Y(e),Y(t),Y(i))}}}function i8(n){let e,t=n[8]&&PS(n);return{c(){t&&t.c(),e=fi()},m(i,r){t&&t.m(i,r),V(i,e,r)},p(i,r){i[8]?t?t.p(i,r):(t=PS(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:We,o:We,d(i){i&&Y(e),t&&t.d(i)}}}function n8(n){let e,t=n[9]&&_S(n);return{c(){t&&t.c(),e=fi()},m(i,r){t&&t.m(i,r),V(i,e,r)},p(i,r){i[9]?t?t.p(i,r):(t=_S(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:We,o:We,d(i){i&&Y(e),t&&t.d(i)}}}function r8(n){let e,t=n[43].comment+"",i;return{c(){e=_("pre"),i=be(t),y(e,"class","mzn-comment")},m(r,s){V(r,e,s),v(e,i)},p(r,s){s[0]&2&&t!==(t=r[43].comment+"")&&He(i,t)},i:We,o:We,d(r){r&&Y(e)}}}function s8(n){let e=n[13].indexOf(n[43].section)===-1&&!n[43].section.startsWith("mzn_vis_"),t,i=e&&WS(n);return{c(){i&&i.c(),t=fi()},m(r,s){i&&i.m(r,s),V(r,t,s)},p(r,s){s[0]&8194&&(e=r[13].indexOf(r[43].section)===-1&&!r[43].section.startsWith("mzn_vis_")),e?i?i.p(r,s):(i=WS(r),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},i:We,o:We,d(r){r&&Y(t),i&&i.d(r)}}}function l8(n){let e,t=n[10]&&xS(n);return{c(){t&&t.c(),e=fi()},m(i,r){t&&t.m(i,r),V(i,e,r)},p(i,r){i[10]?t?t.p(i,r):(t=xS(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:We,o:We,d(i){i&&Y(e),t&&t.d(i)}}}function o8(n){let e,t,i,r,s,l,o,f=st(US(n[43],n[13])),u=[];for(let O=0;OF(u[O],1,1,()=>{u[O]=null});return{c(){e=_("span"),t=_("pre"),t.textContent="% Solution checker report:",i=L(),r=_("br"),s=L();for(let O=0;O%%%mzn-stat-end',i=L(),r=_("br")},m(o,f){for(let u=0;u{i=null}),rt())},i(r){t||(D(i),t=!0)},o(r){F(i),t=!1},d(r){r&&Y(e),i&&i.d(r)}}}function h8(n){let e,t=n[49].message+"",i;return{c(){e=_("pre"),i=be(t)},m(r,s){V(r,e,s),v(e,i)},p(r,s){s[0]&8194&&t!==(t=r[49].message+"")&&He(i,t)},i:We,o:We,d(r){r&&Y(e)}}}function CS(n){let e,t;return e=new My({props:{msg:n[49]}}),e.$on("goto",n[35]),{c(){ze(e.$$.fragment)},m(i,r){qe(e,i,r),t=!0},p(i,r){const s={};r[0]&8194&&(s.msg=i[49]),e.$set(s)},i(i){t||(D(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){Ee(e,i)}}}function XS(n){let e,t,i,r;const s=[h8,u8],l=[];function o(f,u){return f[49].type==="text"?0:f[49].type==="error"||f[49].type==="warning"?1:-1}return~(e=o(n))&&(t=l[e]=s[e](n)),{c(){t&&t.c(),i=fi()},m(f,u){~e&&l[e].m(f,u),V(f,i,u),r=!0},p(f,u){let h=e;e=o(f),e===h?~e&&l[e].p(f,u):(t&&(nt(),F(l[h],1,1,()=>{l[h]=null}),rt()),~e?(t=l[e],t?t.p(f,u):(t=l[e]=s[e](f),t.c()),D(t,1),t.m(i.parentNode,i)):t=null)},i(f){r||(D(t),r=!0)},o(f){F(t),r=!1},d(f){f&&Y(i),~e&&l[e].d(f)}}}function TS(n){let e;function t(s,l){if(typeof s[43].output[s[46]]!="string")return d8;if(s[46]!=="raw")return O8}let i=t(n),r=i&&i(n);return{c(){r&&r.c(),e=fi()},m(s,l){r&&r.m(s,l),V(s,e,l)},p(s,l){i===(i=t(s))&&r?r.p(s,l):(r&&r.d(1),r=i&&i(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&Y(e),r&&r.d(s)}}}function O8(n){let e,t=n[43].output[n[46]]+"",i;return{c(){e=_("pre"),i=be(t)},m(r,s){V(r,e,s),v(e,i)},p(r,s){s[0]&2&&t!==(t=r[43].output[r[46]]+"")&&He(i,t)},d(r){r&&Y(e)}}}function d8(n){let e,t=JSON.stringify(n[43].output[n[46]],null,2)+"",i,r,s;return{c(){e=_("pre"),i=be(t),r=L(),s=_("br")},m(l,o){V(l,e,o),v(e,i),V(l,r,o),V(l,s,o)},p(l,o){o[0]&2&&t!==(t=JSON.stringify(l[43].output[l[46]],null,2)+"")&&He(i,t)},d(l){l&&(Y(e),Y(r),Y(s))}}}function ZS(n){let e=n[13].indexOf(n[46])===-1&&!n[46].startsWith("mzn_vis_"),t,i=e&&TS(n);return{c(){i&&i.c(),t=fi()},m(r,s){i&&i.m(r,s),V(r,t,s)},p(r,s){s[0]&8194&&(e=r[13].indexOf(r[46])===-1&&!r[46].startsWith("mzn_vis_")),e?i?i.p(r,s):(i=TS(r),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(r){r&&Y(t),i&&i.d(r)}}}function RS(n){let e,t,i,r;const s=[a8,o8,l8,s8,r8,n8,i8,t8,e8,J9,K9],l=[];function o(f,u){return f[43].type==="solution"?0:f[43].type==="checker"?1:f[43].type==="time"?2:f[43].type==="trace"?3:f[43].type==="comment"?4:f[43].type==="stderr"?5:f[43].type==="statistics"?6:f[43].type==="cancel"?7:f[43].type==="status"?8:f[43].type==="error"||f[43].type==="warning"?9:f[43].type==="exit"?10:-1}return~(e=o(n))&&(t=l[e]=s[e](n)),{c(){t&&t.c(),i=fi()},m(f,u){~e&&l[e].m(f,u),V(f,i,u),r=!0},p(f,u){let h=e;e=o(f),e===h?~e&&l[e].p(f,u):(t&&(nt(),F(l[h],1,1,()=>{l[h]=null}),rt()),~e?(t=l[e],t?t.p(f,u):(t=l[e]=s[e](f),t.c()),D(t,1),t.m(i.parentNode,i)):t=null)},i(f){r||(D(t),r=!0)},o(f){F(t),r=!1},d(f){f&&Y(i),~e&&l[e].d(f)}}}function AS(n){let e,t,i,r=n[40].files.join(", ")+"",s,l,o,f,u;function h($,P){return $[40].isCompile?H9:G9}let O=h(n),p=O(n),g=st(n[40].output),b=[];for(let $=0;$F(b[$],1,1,()=>{b[$]=null});return{c(){e=_("details"),t=_("summary"),p.c(),i=L(),s=be(r),l=L(),o=_("div");for(let $=0;$F(O[g],1,1,()=>{O[g]=null});return{c(){e=_("div"),t=_("div"),f&&f.c(),i=L(),u&&u.c(),r=L(),s=_("div"),l=_("div");for(let g=0;g{u=null}),rt()),(!o||b[0]&48)&&ae(t,"is-empty",!g[4]&&!g[5]),(!o||b[0]&64)&&ae(t,"is-tab",g[6]),b[0]&8404738){h=st(g[1]);let Q;for(Q=0;Q0&&(s+=`${e}h `),(e>0||t>0)&&(s+=`${t}m `),(e>0||t>0||i>0)&&(s+=`${i}s `),e==0&&t==0&&(i>0&&(s+=" "),s+=`${r}msec`),s.trimEnd()}function US(n,e){const t=[];let i=[];const r=()=>{if(i.length>0){const s=i.join("").split(` +}`;var et=om(function(){return bt(W,ke+"return "+ne).apply(t,T)});if(et.source=ne,$h(et))throw et;return et}function xW(a){return $t(a).toLowerCase()}function CW(a){return $t(a).toUpperCase()}function XW(a,c,d){if(a=$t(a),a&&(d||c===t))return gp(a);if(!a||!(c=pn(c)))return a;var m=Fn(a),w=Fn(c),W=mp(m,w),T=Sp(m,w)+1;return cs(m,W,T).join("")}function TW(a,c,d){if(a=$t(a),a&&(d||c===t))return a.slice(0,$p(a)+1);if(!a||!(c=pn(c)))return a;var m=Fn(a),w=Sp(m,Fn(c))+1;return cs(m,0,w).join("")}function ZW(a,c,d){if(a=$t(a),a&&(d||c===t))return a.replace(Rt,"");if(!a||!(c=pn(c)))return a;var m=Fn(a),w=mp(m,Fn(c));return cs(m,w).join("")}function RW(a,c){var d=z,m=te;if(Ft(c)){var w="separator"in c?c.separator:w;d="length"in c?Ke(c.length):d,m="omission"in c?pn(c.omission):m}a=$t(a);var W=a.length;if(ll(a)){var T=Fn(a);W=T.length}if(d>=W)return a;var U=d-ol(m);if(U<1)return m;var M=T?cs(T,0,U).join(""):a.slice(0,U);if(w===t)return M+m;if(T&&(U+=M.length-U),Qh(w)){if(a.slice(U).search(w)){var J,ee=M;for(w.global||(w=Yu(w.source,$t(he.exec(w))+"g")),w.lastIndex=0;J=w.exec(ee);)var ne=J.index;M=M.slice(0,ne===t?U:ne)}}else if(a.indexOf(pn(w),U)!=U){var pe=M.lastIndexOf(w);pe>-1&&(M=M.slice(0,pe))}return M+m}function AW(a){return a=$t(a),a&&Yi.test(a)?a.replace(Vt,cv):a}var UW=dl(function(a,c,d){return a+(d?" ":"")+c.toUpperCase()}),vh=ag("toUpperCase");function lm(a,c,d){return a=$t(a),c=d?t:c,c===t?sv(a)?Ov(a):Gy(a):a.match(c)||[]}var om=it(function(a,c){try{return On(a,t,c)}catch(d){return $h(d)?d:new Le(d)}}),YW=Vr(function(a,c){return Cn(c,function(d){d=dr(d),Ur(a,d,Sh(a[d],a))}),a});function VW(a){var c=a==null?0:a.length,d=Te();return a=c?Mt(a,function(m){if(typeof m[1]!="function")throw new Xn(l);return[d(m[0]),m[1]]}):[],it(function(m){for(var w=-1;++wRe)return[];var d=Ee,m=Mi(a,Ee);c=Te(c),a-=Ee;for(var w=Ru(m,c);++d0||c<0)?new ct(d):(a<0?d=d.takeRight(-a):a&&(d=d.drop(a)),c!==t&&(c=Ke(c),d=c<0?d.dropRight(-c):d.take(c-a)),d)},ct.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},ct.prototype.toArray=function(){return this.take(Ee)},hr(ct.prototype,function(a,c){var d=/^(?:filter|find|map|reject)|While$/.test(c),m=/^(?:head|last)$/.test(c),w=k[m?"take"+(c=="last"?"Right":""):c],W=m||/^find/.test(c);w&&(k.prototype[c]=function(){var T=this.__wrapped__,U=m?[1]:arguments,M=T instanceof ct,J=U[0],ee=M||Ge(T),ne=function(at){var dt=w.apply(k,rs([at],U));return m&&pe?dt[0]:dt};ee&&d&&typeof J=="function"&&J.length!=1&&(M=ee=!1);var pe=this.__chain__,ke=!!this.__actions__.length,Ue=W&&!pe,et=M&&!ke;if(!W&&ee){T=et?T:new ct(this);var Ye=a.apply(T,U);return Ye.__actions__.push({func:df,args:[ne],thisArg:t}),new Tn(Ye,pe)}return Ue&&et?a.apply(this,U):(Ye=this.thru(ne),Ue?m?Ye.value()[0]:Ye.value():Ye)})}),Cn(["pop","push","shift","sort","splice","unshift"],function(a){var c=qa[a],d=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",m=/^(?:pop|shift)$/.test(a);k.prototype[a]=function(){var w=arguments;if(m&&!this.__chain__){var W=this.value();return c.apply(Ge(W)?W:[],w)}return this[d](function(T){return c.apply(Ge(T)?T:[],w)})}}),hr(ct.prototype,function(a,c){var d=k[c];if(d){var m=d.name+"";vt.call(ul,m)||(ul[m]=[]),ul[m].push({name:c,func:d})}}),ul[of(t,P).name]=[{name:"wrapper",func:t}],ct.prototype.clone=Av,ct.prototype.reverse=Uv,ct.prototype.value=Yv,k.prototype.at=hk,k.prototype.chain=Ok,k.prototype.commit=dk,k.prototype.next=pk,k.prototype.plant=mk,k.prototype.reverse=Sk,k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=bk,k.prototype.first=k.prototype.head,ro&&(k.prototype[ro]=gk),k},al=dv();Us?((Us.exports=al)._=al,ku._=al):_i._=al}).call(Wo)})(zc,zc.exports);var Z9=zc.exports;const R9=Ws.define({parser:KC.configure({props:[jl.add({ParenthesisedExpression:Os({closing:")",align:!1}),Application:Os({closing:")",align:!1}),GeneratorCallGenerators:Os({closing:")",align:!1}),LetItems:Os({closing:"}",align:!1}),ArrayLiteral:Os({closing:"]",align:!1}),ArrayLiteral2d:Os({closing:"|]",align:!1}),SetLiteral:Os({closing:"}",align:!1})}),Fl.add({ParenthesisedExpression:br,Application:br,GeneratorCallGenerators:br,LetItems:br,ArrayLiteral:br,ArrayLiteral2d:br,SetLiteral:br}),Bl({Keyword:S.keyword,"Identifier QuotedIdentifier":S.variableName,"Call/Identifier Call/QuotedIdentifier GeneratorCall/Identifier GeneratorCall/QuotedIdentifier":S.name,Absent:S.null,Anonymous:S.null,BooleanLiteral:S.bool,Number:S.number,Infinity:S.number,StringLiteral:S.string,LineComment:S.comment,BlockComment:S.comment,"( )":S.paren,"{ }":S.paren,"[ ]":S.paren})]}),languageData:{commentTokens:{line:"%"}}});function H0(){return new ua(R9)}const Ey=Pi({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#999",lineHighlight:"#90909020"},styles:[{tag:S.comment,color:"slategray"},{tag:S.string,color:"#690"},{tag:[S.number,S.bool,S.null],color:"#905"},{tag:S.variableName,color:"#000000"},{tag:S.name,color:"#07a"},{tag:[S.keyword],color:"#07a"}]}),My=Pi({variant:"dark",settings:{background:"#222",foreground:"#F6F6F6",caret:"#EEE",selection:"#036dd626",gutterBackground:"#333",gutterForeground:"#999",lineHighlight:"#90909020"},styles:[{tag:S.comment,color:"slategray"},{tag:S.string,color:"#e09177"},{tag:[S.number,S.bool,S.null],color:"#a9e07e"},{tag:S.variableName,color:"#FFFFFF"},{tag:S.name,color:"#e6cf77"},{tag:[S.keyword],color:"#54a2e3"}]}),np=new Ll,js=new Ll,A9=js.reconfigure(me.editable.of(!1)),U9=js.reconfigure(me.editable.of(!0)),Y9=np.reconfigure(Ey),V9=np.reconfigure(My);function Bf(n,e,t,i=!1){const r=[AR,fa.of([iZ]),np.of(t?My:Ey),me.theme({"&":{height:"100%"},"&.cm-editor.cm-focused":{outline:"none"},".cm-content, .cm-gutter":{minHeight:"100%"},"&.cm-focused .cm-selectionBackground":{backgroundColor:"#036dd638"}})];return n===".json"||n===".mpc"?[...r,js.of(me.editable.of(!i)),qR()]:n===".mzc"?[...r,js.of(me.editable.of(!1))]:n===".dzn"?[...r,js.of(me.editable.of(!i)),H0()]:n===".html"?[...r,js.of(me.editable.of(!i)),X9()]:[...r,js.of(me.editable.of(!i)),H0(),me.updateListener.of(Z9.debounce(e,250))]}function K0(n,e,t){const i=n.slice();return i[4]=e[t],i}function J0(n,e,t){const i=n.slice();return i[7]=e[t],i}function eS(n,e,t){const i=n.slice();return i[10]=e[t],i[12]=t,i}function q9(n){let e,t,i=Ic(n[0].location)+"",r,s,l,o,f,u,h;return{c(){e=_("pre"),t=_("a"),r=be(i),l=be(":"),o=B(),f=_("br"),y(t,"class",s="mzn-link mzn-"+n[0].type+" svelte-w513p9"),y(e,"class","svelte-w513p9")},m(O,p){V(O,e,p),v(e,t),v(t,r),v(e,l),V(O,o,p),V(O,f,p),u||(h=oe(t,"click",n[3]),u=!0)},p(O,p){p&1&&i!==(i=Ic(O[0].location)+"")&&Je(r,i),p&1&&s!==(s="mzn-link mzn-"+O[0].type+" svelte-w513p9")&&y(t,"class",s)},d(O){O&&(Y(e),Y(o),Y(f)),u=!1,h()}}}function E9(n){let e,t=ot(n[0].stack),i=[];for(let r=0;rr("goto",{location:o.location}),l=()=>r("goto",{location:i.location});return n.$$set=o=>{"msg"in o&&t(0,i=o.msg)},[i,r,s,l]}class Dy extends Ui{constructor(e){super(),Ai(this,e,L9,N9,Ri,{msg:0})}}function oS(n,e,t){const i=n.slice();return i[40]=e[t],i}function aS(n,e,t){const i=n.slice();return i[43]=e[t],i}function fS(n,e,t){const i=n.slice();return i[52]=e[t],i}function cS(n,e,t){const i=n.slice();return i[49]=e[t],i}function uS(n,e,t){const i=n.slice();return i[46]=e[t],i}const B9=n=>({}),hS=n=>({});function OS(n,e,t){const i=n.slice();return i[46]=e[t],i}function dS(n){let e,t,i,r,s,l,o,f,u,h,O,p,g;function b(q,L){return q[13].length===0?F9:j9}let Q=b(n),$=Q(n),P=ot(n[14]),x=[];for(let q=0;q{o=null}),rt()),u[2]?f?(f.p(u,h),h[0]&4&&D(f,1)):(f=yS(u),f.c(),D(f,1),f.m(e,null)):f&&(nt(),F(f,1,1,()=>{f=null}),rt())},i(u){r||(D(l,u),D(o),D(f),r=!0)},o(u){F(l,u),F(o),F(f),r=!1},d(u){u&&Y(e),l&&l.d(u),o&&o.d(),f&&f.d()}}}function wS(n){let e,t,i,r,s,l,o;return r=new Ct({props:{icon:dC}}),{c(){e=_("p"),t=_("button"),i=_("span"),De(r.$$.fragment),y(i,"class","icon"),y(t,"class","button is-small"),y(t,"title","Clear output on each run"),ae(t,"is-primary",n[0]),ae(t,"is-light",!n[0]),y(e,"class","control")},m(f,u){V(f,e,u),v(e,t),v(t,i),Ve(r,i,null),s=!0,l||(o=oe(t,"click",n[33]),l=!0)},p(f,u){(!s||u[0]&1)&&ae(t,"is-primary",f[0]),(!s||u[0]&1)&&ae(t,"is-light",!f[0])},i(f){s||(D(r.$$.fragment,f),s=!0)},o(f){F(r.$$.fragment,f),s=!1},d(f){f&&Y(e),qe(r),l=!1,o()}}}function yS(n){let e,t,i,r,s,l,o;return r=new Ct({props:{icon:xQ}}),{c(){e=_("p"),t=_("button"),i=_("span"),De(r.$$.fragment),y(i,"class","icon"),y(t,"class","button is-small is-danger"),y(t,"title","Clear output"),y(e,"class","control")},m(f,u){V(f,e,u),v(e,t),v(t,i),Ve(r,i,null),s=!0,l||(o=oe(t,"click",n[34]),l=!0)},p:We,i(f){s||(D(r.$$.fragment,f),s=!0)},o(f){F(r.$$.fragment,f),s=!1},d(f){f&&Y(e),qe(r),l=!1,o()}}}function G9(n){let e;return{c(){e=be("Running")},m(t,i){V(t,e,i)},d(t){t&&Y(e)}}}function H9(n){let e;return{c(){e=be("Compiling")},m(t,i){V(t,e,i)},d(t){t&&Y(e)}}}function K9(n){let e,t,i,r=Nc(n[43].runTime)+"",s,l,o=n[43].code&&vS(n);return{c(){o&&o.c(),e=B(),t=_("pre"),i=be("Finished in "),s=be(r),l=be("."),y(t,"class","mzn-runtime")},m(f,u){o&&o.m(f,u),V(f,e,u),V(f,t,u),v(t,i),v(t,s),v(t,l)},p(f,u){f[43].code?o?o.p(f,u):(o=vS(f),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),u[0]&2&&r!==(r=Nc(f[43].runTime)+"")&&Je(s,r)},i:We,o:We,d(f){f&&(Y(e),Y(t)),o&&o.d(f)}}}function J9(n){let e,t,i=(n[43].type==="error"&&n[12]||n[43].type==="warning"&&n[11])&&PS(n);return{c(){i&&i.c(),e=fi()},m(r,s){i&&i.m(r,s),V(r,e,s),t=!0},p(r,s){r[43].type==="error"&&r[12]||r[43].type==="warning"&&r[11]?i?(i.p(r,s),s[0]&6146&&D(i,1)):(i=PS(r),i.c(),D(i,1),i.m(e.parentNode,e)):i&&(nt(),F(i,1,1,()=>{i=null}),rt())},i(r){t||(D(i),t=!0)},o(r){F(i),t=!1},d(r){r&&Y(e),i&&i.d(r)}}}function e8(n){let e,t=n[23][n[43].status]+"",i,r,s;return{c(){e=_("pre"),i=be(t),r=B(),s=_("br")},m(l,o){V(l,e,o),v(e,i),V(l,r,o),V(l,s,o)},p(l,o){o[0]&2&&t!==(t=l[23][l[43].status]+"")&&Je(i,t)},i:We,o:We,d(l){l&&(Y(e),Y(r),Y(s))}}}function t8(n){let e,t,i;return{c(){e=_("pre"),e.textContent="Stopped.",t=B(),i=_("br"),y(e,"class","mzn-runtime")},m(r,s){V(r,e,s),V(r,t,s),V(r,i,s)},p:We,i:We,o:We,d(r){r&&(Y(e),Y(t),Y(i))}}}function i8(n){let e,t=n[8]&&kS(n);return{c(){t&&t.c(),e=fi()},m(i,r){t&&t.m(i,r),V(i,e,r)},p(i,r){i[8]?t?t.p(i,r):(t=kS(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:We,o:We,d(i){i&&Y(e),t&&t.d(i)}}}function n8(n){let e,t=n[9]&&WS(n);return{c(){t&&t.c(),e=fi()},m(i,r){t&&t.m(i,r),V(i,e,r)},p(i,r){i[9]?t?t.p(i,r):(t=WS(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:We,o:We,d(i){i&&Y(e),t&&t.d(i)}}}function r8(n){let e,t=n[43].comment+"",i;return{c(){e=_("pre"),i=be(t),y(e,"class","mzn-comment")},m(r,s){V(r,e,s),v(e,i)},p(r,s){s[0]&2&&t!==(t=r[43].comment+"")&&Je(i,t)},i:We,o:We,d(r){r&&Y(e)}}}function s8(n){let e=n[13].indexOf(n[43].section)===-1&&!n[43].section.startsWith("mzn_vis_"),t,i=e&&xS(n);return{c(){i&&i.c(),t=fi()},m(r,s){i&&i.m(r,s),V(r,t,s)},p(r,s){s[0]&8194&&(e=r[13].indexOf(r[43].section)===-1&&!r[43].section.startsWith("mzn_vis_")),e?i?i.p(r,s):(i=xS(r),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},i:We,o:We,d(r){r&&Y(t),i&&i.d(r)}}}function l8(n){let e,t=n[10]&&CS(n);return{c(){t&&t.c(),e=fi()},m(i,r){t&&t.m(i,r),V(i,e,r)},p(i,r){i[10]?t?t.p(i,r):(t=CS(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:We,o:We,d(i){i&&Y(e),t&&t.d(i)}}}function o8(n){let e,t,i,r,s,l,o,f=ot(YS(n[43],n[13])),u=[];for(let O=0;OF(u[O],1,1,()=>{u[O]=null});return{c(){e=_("span"),t=_("pre"),t.textContent="% Solution checker report:",i=B(),r=_("br"),s=B();for(let O=0;O%%%mzn-stat-end',i=B(),r=_("br")},m(o,f){for(let u=0;u{i=null}),rt())},i(r){t||(D(i),t=!0)},o(r){F(i),t=!1},d(r){r&&Y(e),i&&i.d(r)}}}function h8(n){let e,t=n[49].message+"",i;return{c(){e=_("pre"),i=be(t)},m(r,s){V(r,e,s),v(e,i)},p(r,s){s[0]&8194&&t!==(t=r[49].message+"")&&Je(i,t)},i:We,o:We,d(r){r&&Y(e)}}}function XS(n){let e,t;return e=new Dy({props:{msg:n[49]}}),e.$on("goto",n[35]),{c(){De(e.$$.fragment)},m(i,r){Ve(e,i,r),t=!0},p(i,r){const s={};r[0]&8194&&(s.msg=i[49]),e.$set(s)},i(i){t||(D(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){qe(e,i)}}}function TS(n){let e,t,i,r;const s=[h8,u8],l=[];function o(f,u){return f[49].type==="text"?0:f[49].type==="error"||f[49].type==="warning"?1:-1}return~(e=o(n))&&(t=l[e]=s[e](n)),{c(){t&&t.c(),i=fi()},m(f,u){~e&&l[e].m(f,u),V(f,i,u),r=!0},p(f,u){let h=e;e=o(f),e===h?~e&&l[e].p(f,u):(t&&(nt(),F(l[h],1,1,()=>{l[h]=null}),rt()),~e?(t=l[e],t?t.p(f,u):(t=l[e]=s[e](f),t.c()),D(t,1),t.m(i.parentNode,i)):t=null)},i(f){r||(D(t),r=!0)},o(f){F(t),r=!1},d(f){f&&Y(i),~e&&l[e].d(f)}}}function ZS(n){let e;function t(s,l){if(typeof s[43].output[s[46]]!="string")return d8;if(s[46]!=="raw")return O8}let i=t(n),r=i&&i(n);return{c(){r&&r.c(),e=fi()},m(s,l){r&&r.m(s,l),V(s,e,l)},p(s,l){i===(i=t(s))&&r?r.p(s,l):(r&&r.d(1),r=i&&i(s),r&&(r.c(),r.m(e.parentNode,e)))},d(s){s&&Y(e),r&&r.d(s)}}}function O8(n){let e,t=n[43].output[n[46]]+"",i;return{c(){e=_("pre"),i=be(t)},m(r,s){V(r,e,s),v(e,i)},p(r,s){s[0]&2&&t!==(t=r[43].output[r[46]]+"")&&Je(i,t)},d(r){r&&Y(e)}}}function d8(n){let e,t=JSON.stringify(n[43].output[n[46]],null,2)+"",i,r,s;return{c(){e=_("pre"),i=be(t),r=B(),s=_("br")},m(l,o){V(l,e,o),v(e,i),V(l,r,o),V(l,s,o)},p(l,o){o[0]&2&&t!==(t=JSON.stringify(l[43].output[l[46]],null,2)+"")&&Je(i,t)},d(l){l&&(Y(e),Y(r),Y(s))}}}function RS(n){let e=n[13].indexOf(n[46])===-1&&!n[46].startsWith("mzn_vis_"),t,i=e&&ZS(n);return{c(){i&&i.c(),t=fi()},m(r,s){i&&i.m(r,s),V(r,t,s)},p(r,s){s[0]&8194&&(e=r[13].indexOf(r[46])===-1&&!r[46].startsWith("mzn_vis_")),e?i?i.p(r,s):(i=ZS(r),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(r){r&&Y(t),i&&i.d(r)}}}function AS(n){let e,t,i,r;const s=[a8,o8,l8,s8,r8,n8,i8,t8,e8,J9,K9],l=[];function o(f,u){return f[43].type==="solution"?0:f[43].type==="checker"?1:f[43].type==="time"?2:f[43].type==="trace"?3:f[43].type==="comment"?4:f[43].type==="stderr"?5:f[43].type==="statistics"?6:f[43].type==="cancel"?7:f[43].type==="status"?8:f[43].type==="error"||f[43].type==="warning"?9:f[43].type==="exit"?10:-1}return~(e=o(n))&&(t=l[e]=s[e](n)),{c(){t&&t.c(),i=fi()},m(f,u){~e&&l[e].m(f,u),V(f,i,u),r=!0},p(f,u){let h=e;e=o(f),e===h?~e&&l[e].p(f,u):(t&&(nt(),F(l[h],1,1,()=>{l[h]=null}),rt()),~e?(t=l[e],t?t.p(f,u):(t=l[e]=s[e](f),t.c()),D(t,1),t.m(i.parentNode,i)):t=null)},i(f){r||(D(t),r=!0)},o(f){F(t),r=!1},d(f){f&&Y(i),~e&&l[e].d(f)}}}function US(n){let e,t,i,r=n[40].files.join(", ")+"",s,l,o,f,u;function h($,P){return $[40].isCompile?H9:G9}let O=h(n),p=O(n),g=ot(n[40].output),b=[];for(let $=0;$F(b[$],1,1,()=>{b[$]=null});return{c(){e=_("details"),t=_("summary"),p.c(),i=B(),s=be(r),l=B(),o=_("div");for(let $=0;$F(O[g],1,1,()=>{O[g]=null});return{c(){e=_("div"),t=_("div"),f&&f.c(),i=B(),u&&u.c(),r=B(),s=_("div"),l=_("div");for(let g=0;g{u=null}),rt()),(!o||b[0]&48)&&ae(t,"is-empty",!g[4]&&!g[5]),(!o||b[0]&64)&&ae(t,"is-tab",g[6]),b[0]&8404738){h=ot(g[1]);let Q;for(Q=0;Q0&&(s+=`${e}h `),(e>0||t>0)&&(s+=`${t}m `),(e>0||t>0||i>0)&&(s+=`${i}s `),e==0&&t==0&&(i>0&&(s+=" "),s+=`${r}msec`),s.trimEnd()}function YS(n,e){const t=[];let i=[];const r=()=>{if(i.length>0){const s=i.join("").split(` `);s[s.length-1]===""&&s.splice(s.length-1,1),t.push({type:"text",message:s.map(l=>`% ${l}`).join(` -`)}),i=[]}};if(n.messages){for(const s of n.messages)if(s.type==="solution")for(const l of s.sections)e.indexOf(l)===-1&&l!=="raw"&&i.push(n.output[l]);else s.type==="trace"?e.indexOf(s.section)===-1&&s.section!=="raw"&&i.push(s.message):(r(),t.push(s));r()}else{for(const s of n.sections)e.indexOf(s)===-1&&s!=="raw"&&i.push(n.output[s]);r()}return t}function g8(n,e,t){let i,r,s,l,o,f,{$$slots:u={},$$scope:h}=e;const O=Bn();let{output:p}=e,{autoClearOutput:g=!1}=e,{showClearOutput:b=!0}=e,{showAutoClearOutput:Q=!0}=e,{showSectionToggles:$=!0}=e,{showRightControls:P=!0}=e,{isTab:x=!1}=e,A,C=!0,X=!0,Z=!0,I=!0,q=!0;function N(ve){const K=ve.flatMap(se=>se.output),H=new Set([...K.filter(se=>se.type==="solution"||se.type==="checker").flatMap(se=>se.sections.filter(Ke=>se.output[Ke].length>0)),...K.filter(se=>se.type==="trace").map(se=>se.section)].filter(se=>se!=="raw"&&!se.startsWith("mzn_vis_"))),le=[...H.values()];return le.sort(),t(13,ue=ue.filter(se=>H.has(se))),le}function z(ve){ue.indexOf(ve)===-1?t(13,ue=[...ue,ve]):t(13,ue=ue.filter(K=>K!==ve))}function ie(){ue.length===0?t(13,ue=[...f]):t(13,ue=[])}let ue=[];const $e={ALL_SOLUTIONS:"==========",OPTIMAL_SOLUTION:"==========",UNSATISFIABLE:"=====UNSATISFIABLE=====",UNSAT_OR_UNBOUNDED:"=====UNSATorUNBOUNDED=====",UNBOUNDED:"=====UNBOUNDED=====",UNKNOWN:"=====UNKNOWN=====",ERROR:"=====ERROR====="};async function Se(ve){A&&(await lr(),A.scrollTo(0,A.scrollHeight))}const Te=()=>ie(),pe=ve=>z(ve),fe=()=>t(8,C=!C),Ae=()=>t(9,X=!X),xe=()=>t(10,Z=!Z),Ce=()=>t(11,I=!I),Me=()=>t(12,q=!q),yt=()=>t(0,g=!g),ni=()=>O("clear");function xt(ve){dm.call(this,n,ve)}function It(ve){dm.call(this,n,ve)}function Nt(ve){Dt[ve?"unshift":"push"](()=>{A=ve,t(7,A)})}return n.$$set=ve=>{"output"in ve&&t(1,p=ve.output),"autoClearOutput"in ve&&t(0,g=ve.autoClearOutput),"showClearOutput"in ve&&t(2,b=ve.showClearOutput),"showAutoClearOutput"in ve&&t(3,Q=ve.showAutoClearOutput),"showSectionToggles"in ve&&t(4,$=ve.showSectionToggles),"showRightControls"in ve&&t(5,P=ve.showRightControls),"isTab"in ve&&t(6,x=ve.isTab),"$$scope"in ve&&t(24,h=ve.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&2&&t(19,i=p.some(ve=>ve.output.some(K=>K.type==="statistics"))),n.$$.dirty[0]&2&&t(18,r=p.some(ve=>ve.output.some(K=>K.type==="stderr"))),n.$$.dirty[0]&2&&t(17,s=p.some(ve=>ve.output.some(K=>K.type==="time"))),n.$$.dirty[0]&2&&t(16,l=p.some(ve=>ve.output.some(K=>K.type==="warning"||K.type==="checker"&&K.messages&&K.messages.some(H=>H.type==="warning")))),n.$$.dirty[0]&2&&t(15,o=p.some(ve=>ve.output.some(K=>K.type==="error"||K.type==="checker"&&K.messages&&K.messages.some(H=>H.type==="error")))),n.$$.dirty[0]&2&&t(14,f=N(p)),n.$$.dirty[0]&2&&Se()},[g,p,b,Q,$,P,x,A,C,X,Z,I,q,ue,f,o,l,s,r,i,O,z,ie,$e,h,u,Te,pe,fe,Ae,xe,Ce,Me,yt,ni,xt,It,Nt]}class m8 extends Vi{constructor(e){super(),Yi(this,e,g8,p8,Ui,{output:1,autoClearOutput:0,showClearOutput:2,showAutoClearOutput:3,showSectionToggles:4,showRightControls:5,isTab:6},null,[-1,-1])}}const S8=`const MiniZincIDE = (() => { +`)}),i=[]}};if(n.messages){for(const s of n.messages)if(s.type==="solution")for(const l of s.sections)e.indexOf(l)===-1&&l!=="raw"&&i.push(n.output[l]);else s.type==="trace"?e.indexOf(s.section)===-1&&s.section!=="raw"&&i.push(s.message):(r(),t.push(s));r()}else{for(const s of n.sections)e.indexOf(s)===-1&&s!=="raw"&&i.push(n.output[s]);r()}return t}function g8(n,e,t){let i,r,s,l,o,f,{$$slots:u={},$$scope:h}=e;const O=Ln();let{output:p}=e,{autoClearOutput:g=!1}=e,{showClearOutput:b=!0}=e,{showAutoClearOutput:Q=!0}=e,{showSectionToggles:$=!0}=e,{showRightControls:P=!0}=e,{isTab:x=!1}=e,A,C=!0,X=!0,Z=!0,I=!0,q=!0;function L(ve){const ie=ve.flatMap(fe=>fe.output),G=new Set([...ie.filter(fe=>fe.type==="solution"||fe.type==="checker").flatMap(fe=>fe.sections.filter(ze=>fe.output[ze].length>0)),...ie.filter(fe=>fe.type==="trace").map(fe=>fe.section)].filter(fe=>fe!=="raw"&&!fe.startsWith("mzn_vis_"))),le=[...G.values()];return le.sort(),t(13,ue=ue.filter(fe=>G.has(fe))),le}function z(ve){ue.indexOf(ve)===-1?t(13,ue=[...ue,ve]):t(13,ue=ue.filter(ie=>ie!==ve))}function te(){ue.length===0?t(13,ue=[...f]):t(13,ue=[])}let ue=[];const $e={ALL_SOLUTIONS:"==========",OPTIMAL_SOLUTION:"==========",UNSATISFIABLE:"=====UNSATISFIABLE=====",UNSAT_OR_UNBOUNDED:"=====UNSATorUNBOUNDED=====",UNBOUNDED:"=====UNBOUNDED=====",UNKNOWN:"=====UNKNOWN=====",ERROR:"=====ERROR====="};async function Se(ve){A&&(await rr(),A.scrollTo(0,A.scrollHeight))}const Xe=()=>te(),de=ve=>z(ve),ce=()=>t(8,C=!C),Re=()=>t(9,X=!X),xe=()=>t(10,Z=!Z),Ce=()=>t(11,I=!I),Ee=()=>t(12,q=!q),Pt=()=>t(0,g=!g),ii=()=>O("clear");function Tt(ve){pm.call(this,n,ve)}function It(ve){pm.call(this,n,ve)}function Nt(ve){Dt[ve?"unshift":"push"](()=>{A=ve,t(7,A)})}return n.$$set=ve=>{"output"in ve&&t(1,p=ve.output),"autoClearOutput"in ve&&t(0,g=ve.autoClearOutput),"showClearOutput"in ve&&t(2,b=ve.showClearOutput),"showAutoClearOutput"in ve&&t(3,Q=ve.showAutoClearOutput),"showSectionToggles"in ve&&t(4,$=ve.showSectionToggles),"showRightControls"in ve&&t(5,P=ve.showRightControls),"isTab"in ve&&t(6,x=ve.isTab),"$$scope"in ve&&t(24,h=ve.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&2&&t(19,i=p.some(ve=>ve.output.some(ie=>ie.type==="statistics"))),n.$$.dirty[0]&2&&t(18,r=p.some(ve=>ve.output.some(ie=>ie.type==="stderr"))),n.$$.dirty[0]&2&&t(17,s=p.some(ve=>ve.output.some(ie=>ie.type==="time"))),n.$$.dirty[0]&2&&t(16,l=p.some(ve=>ve.output.some(ie=>ie.type==="warning"||ie.type==="checker"&&ie.messages&&ie.messages.some(G=>G.type==="warning")))),n.$$.dirty[0]&2&&t(15,o=p.some(ve=>ve.output.some(ie=>ie.type==="error"||ie.type==="checker"&&ie.messages&&ie.messages.some(G=>G.type==="error")))),n.$$.dirty[0]&2&&t(14,f=L(p)),n.$$.dirty[0]&2&&Se()},[g,p,b,Q,$,P,x,A,C,X,Z,I,q,ue,f,o,l,s,r,i,O,z,te,$e,h,u,Xe,de,ce,Re,xe,Ce,Ee,Pt,ii,Tt,It,Nt]}class m8 extends Ui{constructor(e){super(),Ai(this,e,g8,p8,Ri,{output:1,autoClearOutput:0,showClearOutput:2,showAutoClearOutput:3,showSectionToggles:4,showRightControls:5,isTab:6},null,[-1,-1])}}const S8=`const MiniZincIDE = (() => { const callbacks = {}; const responses = []; const freeSlots = []; @@ -194,7 +194,7 @@ function print() { __p += __j.call(arguments, '') } getFinishTime, }; })(); -`;function YS(n,e,t){const i=n.slice();return i[23]=e[t],i[24]=e,i[25]=t,i}function VS(n){let e,t,i,r,s,l,o,f,u,h,O,p,g,b,Q,$,P,x,A;return $=new _t({props:{icon:aC}}),{c(){e=_("div"),t=_("div"),t.innerHTML="Solution:",i=L(),r=_("div"),s=_("input"),o=L(),f=_("div"),u=_("input"),O=L(),p=_("div"),g=_("p"),b=_("button"),Q=_("span"),ze($.$$.fragment),y(t,"class","solution-label svelte-152bhkz"),y(s,"class","input is-small"),y(s,"type","number"),y(s,"min",l=n[2]>0?1:0),y(s,"max",n[2]),y(u,"type","range"),y(u,"min",h=n[2]>0?1:0),y(u,"max",n[2]),y(u,"class","svelte-152bhkz"),y(f,"class","solution-slider svelte-152bhkz"),y(Q,"class","icon"),y(b,"class","button is-small"),y(b,"title","Follow latest solution"),ae(b,"is-primary",n[0]),ae(b,"is-light",!n[0]),y(g,"class","control"),y(p,"class","field has-addons svelte-152bhkz"),y(e,"class","top svelte-152bhkz")},m(C,X){V(C,e,X),v(e,t),v(e,i),v(e,r),v(r,s),vi(s,n[1]),v(e,o),v(e,f),v(f,u),vi(u,n[1]),v(e,O),v(e,p),v(p,g),v(g,b),v(b,Q),qe($,Q,null),P=!0,x||(A=[oe(s,"input",n[12]),oe(u,"change",n[13]),oe(u,"input",n[13]),oe(b,"click",n[14])],x=!0)},p(C,X){(!P||X&4&&l!==(l=C[2]>0?1:0))&&y(s,"min",l),(!P||X&4)&&y(s,"max",C[2]),X&2&&Do(s.value)!==C[1]&&vi(s,C[1]),(!P||X&4&&h!==(h=C[2]>0?1:0))&&y(u,"min",h),(!P||X&4)&&y(u,"max",C[2]),X&2&&vi(u,C[1]),(!P||X&1)&&ae(b,"is-primary",C[0]),(!P||X&1)&&ae(b,"is-light",!C[0])},i(C){P||(D($.$$.fragment,C),P=!0)},o(C){F($.$$.fragment,C),P=!1},d(C){C&&Y(e),Ee($),x=!1,ii(A)}}}function qS(n){let e,t,i=n[24],r=n[25],s,l;const o=()=>n[15](e,i,r),f=()=>n[15](null,i,r);function u(...h){return n[16](n[23],...h)}return{c(){e=_("iframe"),y(e,"class","vis-window svelte-152bhkz"),cm(e.src,t=n[23].url)||y(e,"src",t),y(e,"title","Visualisation")},m(h,O){V(h,e,O),o(),s||(l=oe(e,"load",u),s=!0)},p(h,O){n=h,O&8&&!cm(e.src,t=n[23].url)&&y(e,"src",t),(i!==n[24]||r!==n[25])&&(f(),i=n[24],r=n[25],o())},d(h){h&&Y(e),f(),s=!1,l()}}}function b8(n){let e,t,i,r,s,l,o,f=n[2]>0&&VS(n),u=st(n[3]),h=[];for(let O=0;O0?f?(f.p(O,p),p&4&&D(f,1)):(f=VS(O),f.c(),D(f,1),f.m(e,t)):f&&(nt(),F(f,1,1,()=>{f=null}),rt()),p&8){u=st(O[3]);let g;for(g=0;g{$e=Ce});Se.then(Ce=>{Ce.contentWindow.postMessage({event:"init",payload:ue},"*")});const Te=s.reduce((Ce,Me)=>({...Ce,[Me.name]:Me.state.doc.toString()}),{}),pe=[],fe=new DOMParser().parseFromString(ie,"text/html");for(const Ce of fe.getElementsByTagName("script")){const Me=Ce.getAttribute("src");if(Me==="/minizinc-ide.js")Ce.src=$8;else if(Me in Te&&Me.endsWith(".js")){const yt=URL.createObjectURL(new Blob([Te[Me]],{type:"text/javascript; charset=utf-8"}));Ce.src=yt,pe.push(yt)}}for(const Ce of fe.getElementsByTagName("link")){const Me=Ce.getAttribute("href");if(Me in Te&&Me.endsWith(".css")){const yt=URL.createObjectURL(new Blob([Te[Me]],{type:"text/css; charset=utf-8"}));Ce.href=yt,pe.push(yt)}}const Ae=new XMLSerializer().serializeToString(fe.doctype)+fe.documentElement.outerHTML,xe=URL.createObjectURL(new Blob([Ae],{type:"text/html; charset=utf-8"}));t(3,O=[...O,{key:z,url:xe,extraUrls:pe,makeReady:$e,ready:Se,solutions:[],element:null}])}function $(z,ie){for(const ue in z){const $e=O.find(Te=>Te.key===ue);if(!$e){console.error(`Did not find visualisation for ${ue}`);continue}const Se={time:ie,data:z[ue]};$e.solutions.push(Se),Vn({event:"solution",payload:Se},$e)}t(2,h++,h)}function P(z,ie){p={status:z,time:ie};for(let ue=0;ue$e.element.contentWindow===z.source);switch(ie.event){case"rebroadcast":for(const Se of O)Vn(ie.message,Se);ie.message.event==="goToSolution"&&(l=ie.message.payload===-1,t(0,o=ie.message.payload===-1),f=ie.message.payload+1,t(1,u=ie.message.payload+1));break;case"solve":r("solve",{modelFile:ie.modelFile,dataFiles:ie.dataFiles,options:ie.options});break;case"getNumSolutions":Vn({event:"response",id:ie.id,payload:ue.solutions.length},ue);break;case"getSolution":const $e=ie.index<0?ie.index+ue.solutions.length:ie.index;if($e<0||$e>=ue.solutions.length)Vn({event:"error",id:ie.id,message:"Solution index out of range"},ue);else{Vn({event:"response",id:ie.id,payload:ue.solutions[ie.index===-1?ue.solutions.length-1:ie.index]},ue);break}case"getAllSolutions":Vn({event:"response",id:ie.id,payload:ue.solutions},ue);break;case"getStatus":Vn({event:"response",id:ie.id,payload:p},ue);break;case"getFinishTime":Vn({event:"response",id:ie.id,payload:g},ue);break}}function C(z,ie,ue){if(o&&f===u&&(f=h,t(1,u=h)),o!==l){l=o;for(const $e of O)Vn({event:"goToSolution",payload:o?-1:u-1},$e)}if(f!==u){f=u,l=!1,t(0,o=!1);for(const $e of O)Vn({event:"goToSolution",payload:u-1},$e)}}function X(){u=Do(this.value),t(1,u)}function Z(){u=Do(this.value),t(1,u)}const I=()=>t(0,o=!o);function q(z,ie,ue){Dt[z?"unshift":"push"](()=>{ie[ue].element=z,t(3,O)})}const N=(z,ie)=>z.makeReady(ie.target);return n.$$set=z=>{"files"in z&&t(6,s=z.files)},n.$$.update=()=>{n.$$.dirty&8&&t(4,i=Math.ceil(Math.sqrt(O.length))),n.$$.dirty&7&&C()},[o,u,h,O,i,A,s,b,Q,$,P,x,X,Z,I,q,N]}class w8 extends Vi{constructor(e){super(),Yi(this,e,Q8,b8,Ui,{files:6,reset:7,addVisualisation:8,addSolution:9,status:10,finish:11})}get reset(){return this.$$.ctx[7]}get addVisualisation(){return this.$$.ctx[8]}get addSolution(){return this.$$.ctx[9]}get status(){return this.$$.ctx[10]}get finish(){return this.$$.ctx[11]}}function y8(n){let e,t,i,r,s,l,o,f,u,h,O,p,g,b,Q,$,P,x,A,C,X,Z,I,q,N,z,ie,ue,$e,Se,Te,pe;return{c(){e=_("aside"),t=_("p"),t.textContent="Model",i=L(),r=_("ul"),s=_("li"),l=_("button"),l.textContent="Model file (.mzn)",o=L(),f=_("li"),u=_("button"),u.textContent="Solution checker model (.mzc.mzn)",h=L(),O=_("p"),O.textContent="Data",p=L(),g=_("ul"),b=_("li"),Q=_("button"),Q.textContent="Data file (.dzn)",$=L(),P=_("li"),x=_("button"),x.textContent="JSON data file (.json)",A=L(),C=_("p"),C.textContent="Visualisation",X=L(),Z=_("ul"),I=_("li"),q=_("button"),q.textContent="Custom visualisation (.html)",N=L(),z=_("p"),z.textContent="Import",ie=L(),ue=_("ul"),$e=_("li"),Se=_("button"),Se.textContent="Upload file(s)",y(t,"class","menu-label"),y(l,"type","button"),y(l,"class","button is-text svelte-1kj2hj8"),y(u,"type","button"),y(u,"class","button is-text svelte-1kj2hj8"),y(r,"class","menu-list svelte-1kj2hj8"),y(O,"class","menu-label"),y(Q,"type","button"),y(Q,"class","button is-text svelte-1kj2hj8"),y(x,"type","button"),y(x,"class","button is-text svelte-1kj2hj8"),y(g,"class","menu-list svelte-1kj2hj8"),y(C,"class","menu-label"),y(q,"type","button"),y(q,"class","button is-text svelte-1kj2hj8"),y(Z,"class","menu-list svelte-1kj2hj8"),y(z,"class","menu-label"),y(Se,"type","button"),y(Se,"class","button is-text svelte-1kj2hj8"),y(ue,"class","menu-list svelte-1kj2hj8"),y(e,"class","menu")},m(fe,Ae){V(fe,e,Ae),v(e,t),v(e,i),v(e,r),v(r,s),v(s,l),n[7](l),v(r,o),v(r,f),v(f,u),v(e,h),v(e,O),v(e,p),v(e,g),v(g,b),v(b,Q),v(g,$),v(g,P),v(P,x),v(e,A),v(e,C),v(e,X),v(e,Z),v(Z,I),v(I,q),v(e,N),v(e,z),v(e,ie),v(e,ue),v(ue,$e),v($e,Se),Te||(pe=[oe(l,"click",n[8]),oe(u,"click",n[9]),oe(Q,"click",n[10]),oe(x,"click",n[11]),oe(q,"click",n[12]),oe(Se,"click",n[13])],Te=!0)},p:We,d(fe){fe&&Y(e),n[7](null),Te=!1,ii(pe)}}}function v8(n){let e,t,i,r,s,l;return e=new Vl({props:{active:n[0],title:"Create new file",$$slots:{default:[y8]},$$scope:{ctx:n}}}),e.$on("activate",n[5]),e.$on("cancel",n[14]),{c(){ze(e.$$.fragment),t=L(),i=_("input"),y(i,"class","is-hidden svelte-1kj2hj8"),y(i,"type","file"),i.multiple=!0,y(i,"accept",".mzn,.mzc,.dzn,.json,.html")},m(o,f){qe(e,o,f),V(o,t,f),V(o,i,f),n[15](i),r=!0,s||(l=[oe(i,"change",n[16]),oe(i,"change",n[6])],s=!0)},p(o,[f]){const u={};f&1&&(u.active=o[0]),f&131082&&(u.$$scope={dirty:f,ctx:o}),e.$set(u)},i(o){r||(D(e.$$.fragment,o),r=!0)},o(o){F(e.$$.fragment,o),r=!1},d(o){o&&(Y(t),Y(i)),Ee(e,o),n[15](null),s=!1,ii(l)}}}function P8(n,e,t){let{active:i=!1}=e;const r=Bn();let s,l,o;async function f(){await lr(),o&&o.focus()}async function u(){const C=[];for(const Z of l)C.push(new Promise((I,q)=>{const N=new FileReader;N.onload=()=>{I({name:Z.name,contents:N.result})},N.onerror=z=>q(z),N.readAsText(Z)}));const X=await Promise.all(C);r("open",{files:X})}function h(C){Dt[C?"unshift":"push"](()=>{o=C,t(3,o)})}const O=()=>r("new",{type:".mzn"}),p=()=>r("new",{type:".mzc.mzn"}),g=()=>r("new",{type:".dzn"}),b=()=>r("new",{type:".json"}),Q=()=>r("new",{type:".html"}),$=()=>s.click(),P=()=>r("cancel");function x(C){Dt[C?"unshift":"push"](()=>{s=C,t(1,s)})}function A(){l=this.files,t(2,l)}return n.$$set=C=>{"active"in C&&t(0,i=C.active)},[i,s,l,o,r,f,u,h,O,p,g,b,Q,$,P,x,A]}class k8 extends Vi{constructor(e){super(),Yi(this,e,P8,v8,Ui,{active:0})}}function ES(n,e,t){const i=n.slice();return i[14]=e[t],i}function MS(n,e,t){const i=n.slice();return i[17]=e[t].file,i[18]=e[t].index,i}function _8(n){let e,t,i,r,s,l,o;i=new _t({props:{icon:n[17].readOnly?HO:W1}});function f(){return n[11](n[18],n[17])}return{c(){e=_("button"),t=_("span"),ze(i.$$.fragment),y(t,"class","icon"),y(e,"class","button is-small"),y(e,"title",r="Click to "+(n[17].readOnly?"unlock":"lock")+" this file for editing"),y(e,"type","button"),ae(e,"is-primary",!n[17].readOnly),ae(e,"is-light",n[17].readOnly)},m(u,h){V(u,e,h),v(e,t),qe(i,t,null),s=!0,l||(o=oe(e,"click",f),l=!0)},p(u,h){n=u;const O={};h&2&&(O.icon=n[17].readOnly?HO:W1),i.$set(O),(!s||h&2&&r!==(r="Click to "+(n[17].readOnly?"unlock":"lock")+" this file for editing"))&&y(e,"title",r),(!s||h&2)&&ae(e,"is-primary",!n[17].readOnly),(!s||h&2)&&ae(e,"is-light",n[17].readOnly)},i(u){s||(D(i.$$.fragment,u),s=!0)},o(u){F(i.$$.fragment,u),s=!1},d(u){u&&Y(e),Ee(i),l=!1,o()}}}function W8(n){let e,t,i,r;return i=new _t({props:{icon:HO}}),{c(){e=_("button"),t=_("span"),ze(i.$$.fragment),y(t,"class","icon"),y(e,"class","button is-small is-light"),y(e,"title","Compiled checkers are read only"),y(e,"type","button"),e.disabled=!0},m(s,l){V(s,e,l),v(e,t),qe(i,t,null),r=!0},p:We,i(s){r||(D(i.$$.fragment,s),r=!0)},o(s){F(i.$$.fragment,s),r=!1},d(s){s&&Y(e),Ee(i)}}}function DS(n){let e,t,i=n[17].name+"",r,s,l,o,f,u,h,O,p,g,b,Q,$,P,x,A,C,X,Z,I,q,N,z;p=new _t({props:{icon:n[17].hidden?_1:x1}});function ie(){return n[10](n[18],n[17])}const ue=[W8,_8],$e=[];function Se(pe,fe){return fe&2&&($=null),$==null&&($=!!pe[17].name.endsWith(".mzc")),$?0:1}P=Se(n,-1),x=$e[P]=ue[P](n),I=new _t({props:{icon:WQ}});function Te(){return n[12](n[18])}return{c(){e=_("tr"),t=_("td"),r=be(i),s=L(),l=_("td"),o=_("div"),f=_("div"),u=_("p"),h=_("button"),O=_("span"),ze(p.$$.fragment),b=L(),Q=_("p"),x.c(),A=L(),C=_("p"),X=_("button"),Z=_("span"),ze(I.$$.fragment),y(O,"class","icon"),y(h,"class","button is-small"),y(h,"title",g="Click to "+(n[17].hidden?"show":"hide")+" this file"),y(h,"type","button"),ae(h,"is-primary",!n[17].hidden),ae(h,"is-light",n[17].hidden),y(u,"class","control"),y(Q,"class","control"),y(Z,"class","icon"),y(X,"class","button is-small is-danger"),y(X,"title","Delete this file"),y(X,"type","button"),y(C,"class","control"),y(f,"class","field is-grouped"),y(o,"class","tool-buttons svelte-1bgv9sn")},m(pe,fe){V(pe,e,fe),v(e,t),v(t,r),v(e,s),v(e,l),v(l,o),v(o,f),v(f,u),v(u,h),v(h,O),qe(p,O,null),v(f,b),v(f,Q),$e[P].m(Q,null),v(f,A),v(f,C),v(C,X),v(X,Z),qe(I,Z,null),q=!0,N||(z=[oe(h,"click",ie),oe(X,"click",Te)],N=!0)},p(pe,fe){n=pe,(!q||fe&2)&&i!==(i=n[17].name+"")&&He(r,i);const Ae={};fe&2&&(Ae.icon=n[17].hidden?_1:x1),p.$set(Ae),(!q||fe&2&&g!==(g="Click to "+(n[17].hidden?"show":"hide")+" this file"))&&y(h,"title",g),(!q||fe&2)&&ae(h,"is-primary",!n[17].hidden),(!q||fe&2)&&ae(h,"is-light",n[17].hidden);let xe=P;P=Se(n,fe),P===xe?$e[P].p(n,fe):(nt(),F($e[xe],1,1,()=>{$e[xe]=null}),rt(),x=$e[P],x?x.p(n,fe):(x=$e[P]=ue[P](n),x.c()),D(x,1),x.m(Q,null))},i(pe){q||(D(p.$$.fragment,pe),D(x),D(I.$$.fragment,pe),q=!0)},o(pe){F(p.$$.fragment,pe),F(x),F(I.$$.fragment,pe),q=!1},d(pe){pe&&Y(e),Ee(p),$e[P].d(),Ee(I),N=!1,ii(z)}}}function zS(n){let e,t=n[14].label+"",i,r,s,l,o=st(n[14].files),f=[];for(let h=0;hF(f[h],1,1,()=>{f[h]=null});return{c(){e=_("p"),i=be(t),r=L(),s=_("table");for(let h=0;hF(p[b],1,1,()=>{p[b]=null});return s=new _t({props:{icon:CQ}}),{c(){for(let b=0;bAccept',y(e,"slot","footer")},m(t,i){V(t,e,i)},p:We,d(t){t&&Y(e)}}}function X8(n){let e,t;return e=new Vl({props:{active:n[0],title:"Manage files",$$slots:{footer:[C8],default:[x8]},$$scope:{ctx:n}}}),e.$on("submit",n[3]),e.$on("cancel",n[3]),{c(){ze(e.$$.fragment)},m(i,r){qe(e,i,r),t=!0},p(i,[r]){const s={};r&1&&(s.active=i[0]),r&2097154&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){t||(D(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){Ee(e,i)}}}function T8(n,e,t){let i,r,s,l,o,f,{active:u=!1}=e,{files:h=[]}=e;const O=Bn();function p(){O("close")}const g=(P,x)=>O("modifyFile",{index:P,options:{hidden:!x.hidden}}),b=(P,x)=>O("modifyFile",{index:P,options:{readOnly:!x.readOnly}}),Q=P=>O("delete",{index:P}),$=()=>O("newFile");return n.$$set=P=>{"active"in P&&t(0,u=P.active),"files"in P&&t(4,h=P.files)},n.$$.update=()=>{n.$$.dirty&16&&t(9,i=h.map((P,x)=>({file:P,index:x}))),n.$$.dirty&512&&t(8,r=i.filter(P=>P.file.name.endsWith(".mzn")&&!P.file.name.endsWith(".mzc.mzn")).sort((P,x)=>P.file.name.localeCompare(x.file.name))),n.$$.dirty&512&&t(7,s=i.filter(P=>P.file.name.endsWith(".dzn")||P.file.name.endsWith(".json")).sort((P,x)=>P.file.name.localeCompare(x.file.name))),n.$$.dirty&512&&t(6,l=i.filter(P=>P.file.name.endsWith(".mzc")||P.file.name.endsWith(".mzc.mzn")).sort((P,x)=>P.file.name.localeCompare(x.file.name))),n.$$.dirty&512&&t(5,o=i.filter(P=>!P.file.name.endsWith(".mzn")&&!P.file.name.endsWith(".mzc")&&!P.file.name.endsWith(".dzn")&&!P.file.name.endsWith(".json")).sort((P,x)=>P.file.name.localeCompare(x.file.name))),n.$$.dirty&480&&t(1,f=[{label:"Model files",files:r},{label:"Data files",files:s},{label:"Solution checkers",files:l},{label:"Other files",files:o}].filter(P=>P.files.length>0))},[u,f,O,p,h,o,l,s,r,i,g,b,Q,$]}class Z8 extends Vi{constructor(e){super(),Yi(this,e,T8,X8,Ui,{active:0,files:4})}}function IS(n,e,t){const i=n.slice();return i[9]=e[t],i}function NS(n){let e,t=n[9]+"",i,r;return{c(){e=_("option"),i=be(t),e.__value=r=n[9],vi(e,e.__value),y(e,"class","svelte-1x5266v")},m(s,l){V(s,e,l),v(e,i)},p(s,l){l&1&&t!==(t=s[9]+"")&&He(i,t),l&1&&r!==(r=s[9])&&(e.__value=r,vi(e,e.__value))},d(s){s&&Y(e)}}}function R8(n){let e,t,i,r,s,l=st(n[0]),o=[];for(let f=0;fn[6].call(t)),y(e,"class","select is-fullwidth is-multiple svelte-1x5266v")},m(f,u){V(f,e,u),v(e,t);for(let h=0;h0&&t(2,l=p[0])}function f(){i("accept",{modelFile:l})}const u=()=>i("cancel");function h(){l=uO(this),t(2,l),t(0,r)}const O=()=>i("cancel");return n.$$set=p=>{"modelFiles"in p&&t(0,r=p.modelFiles),"active"in p&&t(1,s=p.active)},n.$$.update=()=>{n.$$.dirty&1&&o(r)},[r,s,l,i,f,u,h,O]}class V8 extends Vi{constructor(e){super(),Yi(this,e,Y8,U8,Ui,{modelFiles:0,active:1})}}function LS(n,e,t){const i=n.slice();return i[25]=e[t],i[26]=e,i[27]=t,i}function BS(n,e,t){const i=n.slice();return i[22]=e[t],i}function jS(n){let e,t,i,r,s,l,o,f,u;return{c(){e=_("div"),t=_("ul"),i=_("li"),r=_("a"),r.textContent="Enter parameters",s=L(),l=_("li"),o=_("a"),o.textContent="Select data file",ae(i,"is-active",!n[2]),ae(l,"is-active",n[2]),y(e,"class","tabs")},m(h,O){V(h,e,O),v(e,t),v(t,i),v(i,r),v(t,s),v(t,l),v(l,o),f||(u=[oe(r,"click",n[13]),oe(o,"click",n[14])],f=!0)},p(h,O){O&4&&ae(i,"is-active",!h[2]),O&4&&ae(l,"is-active",h[2])},d(h){h&&Y(e),f=!1,ii(u)}}}function q8(n){let e,t=st(n[5]),i=[];for(let r=0;rn[16].call(t)),y(e,"class","select is-fullwidth is-multiple")},m(f,u){V(f,e,u),v(e,t);for(let h=0;hN[z]===void 0?{name:z,value:""}:{name:z,value:N[z]}))}function Q(){r?s("accept",{dataFiles:h}):s("accept",{parameters:O.reduce((N,z)=>({...N,[z.name]:z.value}),{})})}const $=()=>s("cancel"),P=()=>t(2,u=!1),x=()=>t(2,u=!0);function A(N){Dt[N?"unshift":"push"](()=>{p=N,t(6,p)})}function C(){h=Tx(this),t(4,h),t(1,f)}function X(N){Dt[N?"unshift":"push"](()=>{p=N,t(6,p)})}function Z(N,z){N[z].value=this.value,t(5,O)}function I(N,z){N[z].value=this.value,t(5,O)}const q=()=>s("cancel");return n.$$set=N=>{"active"in N&&t(0,l=N.active),"parameters"in N&&t(11,o=N.parameters),"dataFiles"in N&&t(1,f=N.dataFiles)},n.$$.update=()=>{n.$$.dirty&2048&&b(o),n.$$.dirty&2&&t(3,i=f.length>0),n.$$.dirty&12&&t(7,r=i&&u)},[l,f,u,i,h,O,p,r,s,g,Q,o,$,P,x,A,C,X,Z,I,q]}class B8 extends Vi{constructor(e){super(),Yi(this,e,L8,N8,Ui,{active:0,parameters:11,dataFiles:1})}}function HS(n){let e,t,i,r,s,l,o,f,u,h,O,p,g,b,Q,$,P,x,A=En(n[1],"-a"),C,X=En(n[1],"-f"),Z,I,q,N,z,ie,ue,$e,Se,Te=En(n[1],"-v"),pe,fe,Ae,xe,Ce,Me,yt,ni=En(n[1],"-s"),xt,It,Nt,ve,K,H,le,se,Ke,Fe,ut,ht,ci,Xe,Qe,Kt;r=new _t({props:{icon:XQ}});let Ot=A&&KS(n),De=X&&JS(n),bt=Te&&eb(n),lt=ni&&tb(n);return{c(){e=_("div"),t=_("button"),i=_("span"),ze(r.$$.fragment),s=L(),l=_("h5"),l.textContent="Solving options",o=L(),f=_("form"),u=_("div"),h=_("p"),O=_("input"),p=L(),g=_("label"),g.textContent="Time limit (s)",b=L(),Q=_("p"),$=_("input"),x=L(),Ot&&Ot.c(),C=L(),De&&De.c(),Z=L(),I=_("h5"),I.textContent="Output options",q=L(),N=_("div"),z=_("p"),ie=_("input"),ue=L(),$e=_("label"),$e.textContent="Verbose compilation",Se=L(),bt&&bt.c(),pe=L(),fe=_("div"),Ae=_("p"),xe=_("input"),Ce=L(),Me=_("label"),Me.textContent="Compilation statistics",yt=L(),lt&<.c(),xt=L(),It=_("div"),Nt=_("p"),ve=_("input"),K=L(),H=_("label"),H.textContent="Timing information",le=L(),se=_("div"),Ke=_("p"),Ke.innerHTML='',Fe=L(),ut=_("p"),ht=_("button"),ht.textContent="Reset to defaults",y(i,"class","icon"),y(t,"class","button is-text is-small exit-button svelte-1uq9463"),y(l,"class","title is-5"),y(O,"id","enable-timelimit"),y(O,"type","checkbox"),y(O,"class","svelte-1uq9463"),y(g,"for","enable-timelimit"),y(g,"class","svelte-1uq9463"),y(h,"class","control checkbox-control svelte-1uq9463"),y($,"class","input is-fullwidth"),y($,"type","number"),y($,"step","1"),y($,"min",0),$.disabled=P=!n[3],y(Q,"class","control is-expanded"),y(u,"class","field is-grouped"),y(I,"class","title is-5"),y(ie,"id","enable-verbose-compile"),y(ie,"type","checkbox"),y(ie,"class","svelte-1uq9463"),y($e,"for","enable-verbose-compile"),y($e,"class","svelte-1uq9463"),y(z,"class","control checkbox-control svelte-1uq9463"),y(N,"class","field"),y(xe,"id","enable-compilation-satistics"),y(xe,"type","checkbox"),y(xe,"class","svelte-1uq9463"),y(Me,"for","enable-compilation-satistics"),y(Me,"class","svelte-1uq9463"),y(Ae,"class","control checkbox-control svelte-1uq9463"),y(fe,"class","field"),y(ve,"id","enable-timing-information"),y(ve,"type","checkbox"),y(ve,"class","svelte-1uq9463"),y(H,"for","enable-timing-information"),y(H,"class","svelte-1uq9463"),y(Nt,"class","control checkbox-control svelte-1uq9463"),y(It,"class","field"),y(Ke,"class","control"),y(ht,"type","button"),y(ht,"class","button is-danger"),y(ut,"class","control"),y(se,"class","field is-grouped bottom-buttons svelte-1uq9463"),y(e,"class","config-window svelte-1uq9463")},m(tt,dt){V(tt,e,dt),v(e,t),v(t,i),qe(r,i,null),v(e,s),v(e,l),v(e,o),v(e,f),v(f,u),v(u,h),v(h,O),O.checked=n[3],v(h,p),v(h,g),v(u,b),v(u,Q),v(Q,$),vi($,n[2]),v(f,x),Ot&&Ot.m(f,null),v(f,C),De&&De.m(f,null),v(f,Z),v(f,I),v(f,q),v(f,N),v(N,z),v(z,ie),ie.checked=n[5],v(z,ue),v(z,$e),v(f,Se),bt&&bt.m(f,null),v(f,pe),v(f,fe),v(fe,Ae),v(Ae,xe),xe.checked=n[7],v(Ae,Ce),v(Ae,Me),v(f,yt),lt&<.m(f,null),v(f,xt),v(f,It),v(It,Nt),v(Nt,ve),ve.checked=n[9],v(Nt,K),v(Nt,H),v(f,le),v(f,se),v(se,Ke),v(se,Fe),v(se,ut),v(ut,ht),Xe=!0,Qe||(Kt=[oe(t,"click",n[17]),oe(O,"change",n[18]),oe($,"input",n[19]),oe(ie,"change",n[22]),oe(xe,"change",n[24]),oe(ve,"change",n[26]),oe(ht,"click",n[12]),oe(f,"submit",jb(n[27]))],Qe=!0)},p(tt,dt){dt&8&&(O.checked=tt[3]),(!Xe||dt&8&&P!==(P=!tt[3]))&&($.disabled=P),dt&4&&Do($.value)!==tt[2]&&vi($,tt[2]),dt&2&&(A=En(tt[1],"-a")),A?Ot?Ot.p(tt,dt):(Ot=KS(tt),Ot.c(),Ot.m(f,C)):Ot&&(Ot.d(1),Ot=null),dt&2&&(X=En(tt[1],"-f")),X?De?De.p(tt,dt):(De=JS(tt),De.c(),De.m(f,Z)):De&&(De.d(1),De=null),dt&32&&(ie.checked=tt[5]),dt&2&&(Te=En(tt[1],"-v")),Te?bt?bt.p(tt,dt):(bt=eb(tt),bt.c(),bt.m(f,pe)):bt&&(bt.d(1),bt=null),dt&128&&(xe.checked=tt[7]),dt&2&&(ni=En(tt[1],"-s")),ni?lt?lt.p(tt,dt):(lt=tb(tt),lt.c(),lt.m(f,xt)):lt&&(lt.d(1),lt=null),dt&512&&(ve.checked=tt[9])},i(tt){Xe||(D(r.$$.fragment,tt),tt&&ar(()=>{Xe&&(ci||(ci=wl(e,gc,{x:100,duration:200},!0)),ci.run(1))}),Xe=!0)},o(tt){F(r.$$.fragment,tt),tt&&(ci||(ci=wl(e,gc,{x:100,duration:200},!1)),ci.run(0)),Xe=!1},d(tt){tt&&Y(e),Ee(r),Ot&&Ot.d(),De&&De.d(),bt&&bt.d(),lt&<.d(),tt&&ci&&ci.end(),Qe=!1,ii(Kt)}}}function KS(n){let e,t,i,r,s,l,o;return{c(){e=_("div"),t=_("p"),i=_("input"),r=L(),s=_("label"),s.textContent="All solutions (for satisfication problems)",y(i,"id","enable-all-solutions"),y(i,"type","checkbox"),y(i,"class","svelte-1uq9463"),y(s,"for","enable-all-solutions"),y(s,"class","svelte-1uq9463"),y(t,"class","control checkbox-control svelte-1uq9463"),y(e,"class","field")},m(f,u){V(f,e,u),v(e,t),v(t,i),i.checked=n[4],v(t,r),v(t,s),l||(o=oe(i,"change",n[20]),l=!0)},p(f,u){u&16&&(i.checked=f[4])},d(f){f&&Y(e),l=!1,o()}}}function JS(n){let e,t,i,r,s,l,o;return{c(){e=_("div"),t=_("p"),i=_("input"),r=L(),s=_("label"),s.textContent="Free search",y(i,"id","enable-free-search"),y(i,"type","checkbox"),y(i,"class","svelte-1uq9463"),y(s,"for","enable-free-search"),y(s,"class","svelte-1uq9463"),y(t,"class","control checkbox-control svelte-1uq9463"),y(e,"class","field")},m(f,u){V(f,e,u),v(e,t),v(t,i),i.checked=n[10],v(t,r),v(t,s),l||(o=oe(i,"change",n[21]),l=!0)},p(f,u){u&1024&&(i.checked=f[10])},d(f){f&&Y(e),l=!1,o()}}}function eb(n){let e,t,i,r,s,l,o;return{c(){e=_("div"),t=_("p"),i=_("input"),r=L(),s=_("label"),s.textContent="Verbose solving",y(i,"id","enable-verbose-solve"),y(i,"type","checkbox"),y(i,"class","svelte-1uq9463"),y(s,"for","enable-verbose-solve"),y(s,"class","svelte-1uq9463"),y(t,"class","control checkbox-control svelte-1uq9463"),y(e,"class","field")},m(f,u){V(f,e,u),v(e,t),v(t,i),i.checked=n[6],v(t,r),v(t,s),l||(o=oe(i,"change",n[23]),l=!0)},p(f,u){u&64&&(i.checked=f[6])},d(f){f&&Y(e),l=!1,o()}}}function tb(n){let e,t,i,r,s,l,o;return{c(){e=_("div"),t=_("p"),i=_("input"),r=L(),s=_("label"),s.textContent="Solving statistics",y(i,"id","enable-solving-satistics"),y(i,"type","checkbox"),y(i,"class","svelte-1uq9463"),y(s,"for","enable-solving-satistics"),y(s,"class","svelte-1uq9463"),y(t,"class","control checkbox-control svelte-1uq9463"),y(e,"class","field")},m(f,u){V(f,e,u),v(e,t),v(t,i),i.checked=n[8],v(t,r),v(t,s),l||(o=oe(i,"change",n[25]),l=!0)},p(f,u){u&256&&(i.checked=f[8])},d(f){f&&Y(e),l=!1,o()}}}function j8(n){let e,t,i=n[0]&&HS(n);return{c(){i&&i.c(),e=fi()},m(r,s){i&&i.m(r,s),V(r,e,s),t=!0},p(r,[s]){r[0]?i?(i.p(r,s),s&1&&D(i,1)):(i=HS(r),i.c(),D(i,1),i.m(e.parentNode,e)):i&&(nt(),F(i,1,1,()=>{i=null}),rt())},i(r){t||(D(i),t=!0)},o(r){F(i),t=!1},d(r){r&&Y(e),i&&i.d(r)}}}function En(n,e){return n.indexOf(e)!==-1}function F8(n,e,t){const i=Bn();let{active:r}=e,{stdFlags:s=[]}=e,l=!1,o=1,f=!1,u=!1,h=!1,O=!1,p=!1,g=!1,b=!1;function Q(pe){const fe=pe*1e3;fe!==Math.floor(fe)&&t(2,o=Math.floor(fe)/1e3)}function $(){t(3,l=!1),t(2,o=1),t(4,f=!1),t(5,u=!1),t(6,h=!1),t(7,O=!1),t(8,p=!1),t(9,g=!1),t(10,b=!1)}function P(pe){t(3,l=pe.enableTimeLimit),t(2,o=pe.timeLimit),t(4,f=pe.allSolutions),t(5,u=pe.verboseCompilation),t(6,h=pe.verboseSolving),t(7,O=pe.compilerStatistics),t(8,p=pe.solvingStatistics),t(9,g=pe.outputTime),t(10,b=pe.freeSearch)}function x(){return{enableTimeLimit:l,timeLimit:o,allSolutions:f,verboseCompilation:u,verboseSolving:h,compilerStatistics:O,solvingStatistics:p,outputTime:g,freeSearch:b}}function A(pe){const fe={solver:pe};return l&&o>0&&(fe["time-limit"]=o*1e3),f&&En(s,"-a")&&(fe["all-satisfaction"]=!0),u&&(fe["verbose-compilation"]=!0),h&&En(s,"-v")&&(fe["verbose-solving"]=!0),O&&(fe["compiler-statistics"]=!0),p&&En(s,"-s")&&(fe["solver-statistics"]=!0),g&&(fe["output-time"]=!0),b&&En(s,"-f")&&(fe["free-search"]=!0),fe}function C(pe){const fe={solver:pe};return u&&(fe["verbose-compilation"]=!0),O&&(fe["compiler-statistics"]=!0),fe}const X=()=>i("close");function Z(){l=this.checked,t(3,l)}function I(){o=Do(this.value),t(2,o)}function q(){f=this.checked,t(4,f)}function N(){b=this.checked,t(10,b)}function z(){u=this.checked,t(5,u)}function ie(){h=this.checked,t(6,h)}function ue(){O=this.checked,t(7,O)}function $e(){p=this.checked,t(8,p)}function Se(){g=this.checked,t(9,g)}const Te=()=>i("close");return n.$$set=pe=>{"active"in pe&&t(0,r=pe.active),"stdFlags"in pe&&t(1,s=pe.stdFlags)},n.$$.update=()=>{n.$$.dirty&4&&Q(o)},[r,s,o,l,f,u,h,O,p,g,b,i,$,P,x,A,C,X,Z,I,q,N,z,ie,ue,$e,Se,Te]}class G8 extends Vi{constructor(e){super(),Yi(this,e,F8,j8,Ui,{active:0,stdFlags:1,load:13,save:14,getSolvingConfiguration:15,getCompilationConfiguration:16})}get load(){return this.$$.ctx[13]}get save(){return this.$$.ctx[14]}get getSolvingConfiguration(){return this.$$.ctx[15]}get getCompilationConfiguration(){return this.$$.ctx[16]}}function ib(n,e,t){const i=n.slice();return i[13]=e[t],i}const H8=n=>({item:n&2}),nb=n=>({item:n[13]}),K8=n=>({item:n&4}),rb=n=>({item:n[2]});function sb(n){let e;const t=n[8].selected,i=an(t,n,n[7],rb),r=i||J8(n);return{c(){r&&r.c()},m(s,l){r&&r.m(s,l),e=!0},p(s,l){i?i.p&&(!e||l&132)&&cn(i,t,s,s[7],e?fn(t,s[7],l,K8):un(s[7]),rb):r&&r.p&&(!e||l&4)&&r.p(s,e?l:-1)},i(s){e||(D(r,s),e=!0)},o(s){F(r,s),e=!1},d(s){r&&r.d(s)}}}function J8(n){let e=n[2].label+"",t;return{c(){t=be(e)},m(i,r){V(i,t,r)},p(i,r){r&4&&e!==(e=i[2].label+"")&&He(t,e)},d(i){i&&Y(t)}}}function e6(n){let e=n[13].label+"",t;return{c(){t=be(e)},m(i,r){V(i,t,r)},p(i,r){r&2&&e!==(e=i[13].label+"")&&He(t,e)},d(i){i&&Y(t)}}}function lb(n){let e,t,i,r,s;const l=n[8].item,o=an(l,n,n[7],nb),f=o||e6(n);function u(){return n[10](n[13])}return{c(){e=_("a"),f&&f.c(),t=L(),y(e,"href","javascript:void(0);"),y(e,"class","dropdown-item"),ae(e,"is-active",n[2]===n[13])},m(h,O){V(h,e,O),f&&f.m(e,null),v(e,t),i=!0,r||(s=oe(e,"click",u),r=!0)},p(h,O){n=h,o?o.p&&(!i||O&130)&&cn(o,l,n,n[7],i?fn(l,n[7],O,H8):un(n[7]),nb):f&&f.p&&(!i||O&2)&&f.p(n,i?O:-1),(!i||O&6)&&ae(e,"is-active",n[2]===n[13])},i(h){i||(D(f,h),i=!0)},o(h){F(f,h),i=!1},d(h){h&&Y(e),f&&f.d(h),r=!1,s()}}}function t6(n){let e,t,i,r,s,l,o,f,u,h,O,p,g,b,Q=n[2]&&sb(n);f=new _t({props:{icon:OC}});let $=st(n[1]),P=[];for(let A=0;A<$.length;A+=1)P[A]=lb(ib(n,$,A));const x=A=>F(P[A],1,1,()=>{P[A]=null});return{c(){e=L(),t=_("div"),i=_("div"),r=_("button"),s=_("span"),Q&&Q.c(),l=L(),o=_("span"),ze(f.$$.fragment),u=L(),h=_("div"),O=_("div");for(let A=0;A{Q=null}),rt()),(!p||C&8)&&(r.disabled=A[3]),C&166){$=st(A[1]);let X;for(X=0;X<$.length;X+=1){const Z=ib(A,$,X);P[X]?(P[X].p(Z,C),D(P[X],1)):(P[X]=lb(Z),P[X].c(),D(P[X],1),P[X].m(O,null))}for(nt(),X=$.length;Xt(0,f=!f),b=$=>O($);function Q($){Dt[$?"unshift":"push"](()=>{h=$,t(4,h)})}return n.$$set=$=>{"items"in $&&t(1,l=$.items),"currentItem"in $&&t(2,o=$.currentItem),"active"in $&&t(0,f=$.active),"disabled"in $&&t(3,u=$.disabled),"$$scope"in $&&t(7,r=$.$$scope)},[f,l,o,u,h,O,p,r,i,g,b,Q]}class n6 extends Vi{constructor(e){super(),Yi(this,e,i6,t6,Ui,{items:1,currentItem:2,active:0,disabled:3})}}const Dy=Ie.define({map:(n,e)=>({from:e.mapPos(n.from),to:e.mapPos(n.to),msg:n.msg,type:n.type})}),zy=Ie.define(),ob=$i.define({create(){return Re.none},update(n,e){n=n.map(e.changes);for(const t of e.effects)t.is(zy)&&(n=Re.none),t.is(Dy)&&(n=n.update({add:[Re.mark({class:`cm-mzn-underline-${t.value.type}`,attributes:{title:t.value.msg}}).range(t.value.from,t.value.to)]}));return n},provide:n=>me.decorations.from(n)});function Od(n,e,t){let i,r=1,s=1;for(i=0;i=n&&s>=e)return i;s++,t[i]===` -`&&(r++,s=1)}return i}function r6(n,e,t){const i=e.map(r=>Dy.of({from:Od(r.location.firstLine,r.location.firstColumn,n),to:Od(r.location.lastLine,r.location.lastColumn,n)+1,msg:`${r.type==="error"?"Error":"Warning"}: ${r.what}: ${r.message}`,type:r.type}));t.state.field(ob,!1)||i.push(Ie.appendConfig.of([ob])),t.dispatch({effects:[zy.of(null),...i]})}const s6=n=>({}),ab=n=>({}),l6=n=>({}),fb=n=>({}),o6=n=>({}),cb=n=>({}),a6=n=>({}),ub=n=>({});function hb(n,e,t){const i=n.slice();return i[151]=e[t],i[153]=t,i}const f6=n=>({}),Ob=n=>({});function db(n,e,t){const i=n.slice();return i[151]=e[t],i[153]=t,i}const c6=n=>({}),pb=n=>({}),u6=n=>({}),gb=n=>({});function h6(n){let e,t,i,r,s,l,o,f,u;return s=new _t({props:{icon:pC}}),{c(){e=_("button"),t=_("span"),t.textContent="Run",i=L(),r=_("span"),ze(s.$$.fragment),y(r,"class","icon"),y(e,"class","button is-primary"),y(e,"title","Run the current file"),e.disabled=l=!n[50]},m(h,O){V(h,e,O),v(e,t),v(e,i),v(e,r),qe(s,r,null),o=!0,f||(u=oe(e,"click",n[61]),f=!0)},p(h,O){(!o||O[1]&524288&&l!==(l=!h[50]))&&(e.disabled=l)},i(h){o||(D(s.$$.fragment,h),o=!0)},o(h){F(s.$$.fragment,h),o=!1},d(h){h&&Y(e),Ee(s),f=!1,u()}}}function O6(n){let e,t,i,r,s,l,o,f;return s=new _t({props:{icon:hC}}),{c(){e=_("button"),t=_("span"),t.textContent="Stop",i=L(),r=_("span"),ze(s.$$.fragment),y(r,"class","icon"),y(e,"class","button is-danger"),y(e,"title","Cancel solving")},m(u,h){V(u,e,h),v(e,t),v(e,i),v(e,r),qe(s,r,null),l=!0,o||(f=oe(e,"click",n[63]),o=!0)},p:We,i(u){l||(D(s.$$.fragment,u),l=!0)},o(u){F(s.$$.fragment,u),l=!1},d(u){u&&Y(e),Ee(s),o=!1,f()}}}function mb(n){let e,t,i,r,s,l;return{c(){e=_("div"),t=_("button"),i=_("span"),i.textContent="Compile",y(t,"class","button"),y(t,"title","Compile the current file and show the resultant FlatZinc"),t.disabled=r=n[47]||!n[49],y(e,"class","control is-hidden-mobile")},m(o,f){V(o,e,f),v(e,t),v(t,i),s||(l=oe(t,"click",n[62]),s=!0)},p(o,f){f[1]&327680&&r!==(r=o[47]||!o[49])&&(t.disabled=r)},d(o){o&&Y(e),s=!1,l()}}}function Sb(n){let e,t,i;return t=new n6({props:{items:n[52],currentItem:n[0]?n[19].edge:n[19].latest,disabled:n[47],$$slots:{item:[d6,({item:r})=>({155:r}),({item:r})=>[0,0,0,0,0,r?1:0]]},$$scope:{ctx:n}}}),t.$on("selectItem",n[70]),{c(){e=_("div"),ze(t.$$.fragment),y(e,"class","control is-hidden-mobile")},m(r,s){V(r,e,s),qe(t,e,null),i=!0},p(r,s){const l={};s[1]&2097152&&(l.items=r[52]),s[0]&524289&&(l.currentItem=r[0]?r[19].edge:r[19].latest),s[1]&65536&&(l.disabled=r[47]),s[4]&512|s[5]&1&&(l.$$scope={dirty:s,ctx:r}),t.$set(l)},i(r){i||(D(t.$$.fragment,r),i=!0)},o(r){F(t.$$.fragment,r),i=!1},d(r){r&&Y(e),Ee(t)}}}function d6(n){let e,t=n[155].label+"",i,r,s=n[155].detail+"",l,o;return{c(){e=_("span"),i=be(t),r=be(" ("),l=be(s),o=be(")"),y(e,"slot","item")},m(f,u){V(f,e,u),v(e,i),v(e,r),v(e,l),v(e,o)},p(f,u){u[5]&1&&t!==(t=f[155].label+"")&&He(i,t),u[5]&1&&s!==(s=f[155].detail+"")&&He(l,s)},d(f){f&&Y(e)}}}function bb(n){let e,t,i,r,s,l=st(n[24]),o=[];for(let f=0;fn[89].call(i)),y(t,"class","select is-fullwidth"),y(e,"class","control is-expanded is-hidden-tablet")},m(f,u){V(f,e,u),v(e,t),v(t,i);for(let h=0;hSolver:',r=L(),s=_("div"),l=_("div"),o=_("select");for(let Q=0;Qn[90].call(o)),y(l,"class","select is-fullwidth"),y(s,"class","control is-expanded"),y(t,"class","field has-addons"),y(e,"class","navbar-item is-hidden-mobile")},m(Q,$){V(Q,e,$),v(e,t),v(t,i),v(t,r),v(t,s),v(s,l),v(l,o);for(let P=0;P{b=null}),rt())},i(Q){u||(D(b),u=!0)},o(Q){F(b),u=!1},d(Q){Q&&Y(e),Pi(g,Q),b&&b.d(),h=!1,O()}}}function wb(n){let e,t=n[151].name+"",i,r,s=n[151].version+"",l,o;return{c(){e=_("option"),i=be(t),r=L(),l=be(s),o=L(),e.__value=n[153],vi(e,e.__value)},m(f,u){V(f,e,u),v(e,i),v(e,r),v(e,l),v(e,o)},p(f,u){u[0]&16777216&&t!==(t=f[151].name+"")&&He(i,t),u[0]&16777216&&s!==(s=f[151].version+"")&&He(l,s)},d(f){f&&Y(e)}}}function yb(n){let e,t,i,r,s,l,o;return r=new _t({props:{icon:xQ}}),{c(){e=_("div"),t=_("button"),i=_("span"),ze(r.$$.fragment),y(i,"class","icon"),y(t,"class","button is-primary"),y(e,"class","control")},m(f,u){V(f,e,u),v(e,t),v(t,i),qe(r,i,null),s=!0,l||(o=oe(t,"click",n[53]),l=!0)},p:We,i(f){s||(D(r.$$.fragment,f),s=!0)},o(f){F(r.$$.fragment,f),s=!1},d(f){f&&Y(e),Ee(r),l=!1,o()}}}function vb(n){let e,t,i,r,s,l,o,f;return r=new _t({props:{icon:kQ}}),{c(){e=_("div"),t=_("button"),i=_("span"),ze(r.$$.fragment),y(i,"class","icon"),y(t,"class","button is-primary"),y(t,"title","Share"),t.disabled=s=n[18]!==0,y(e,"class","control")},m(u,h){V(u,e,h),v(e,t),v(t,i),qe(r,i,null),l=!0,o||(f=oe(t,"click",n[92]),o=!0)},p(u,h){(!l||h[0]&262144&&s!==(s=u[18]!==0))&&(t.disabled=s)},i(u){l||(D(r.$$.fragment,u),l=!0)},o(u){F(r.$$.fragment,u),l=!1},d(u){u&&Y(e),Ee(r),o=!1,f()}}}function Pb(n){let e,t,i,r,s,l,o,f;return r=new _t({props:{icon:uC}}),{c(){e=_("div"),t=_("button"),i=_("span"),ze(r.$$.fragment),y(i,"class","icon"),y(t,"class","button"),y(t,"title","Download project"),t.disabled=s=n[37]||n[18]!==0,y(e,"class","control")},m(u,h){V(u,e,h),v(e,t),v(t,i),qe(r,i,null),l=!0,o||(f=oe(t,"click",n[93]),o=!0)},p(u,h){(!l||h[0]&262144|h[1]&64&&s!==(s=u[37]||u[18]!==0))&&(t.disabled=s)},i(u){l||(D(r.$$.fragment,u),l=!0)},o(u){F(r.$$.fragment,u),l=!1},d(u){u&&Y(e),Ee(r),o=!1,f()}}}function kb(n){let e,t,i,r,s,l,o,f;return r=new _t({props:{icon:_Q}}),{c(){e=_("div"),t=_("button"),i=_("span"),ze(r.$$.fragment),y(i,"class","icon"),y(t,"class","button is-primary"),y(t,"title","Open in playground"),t.disabled=s=n[18]!==0,y(e,"class","control")},m(u,h){V(u,e,h),v(e,t),v(t,i),qe(r,i,null),l=!0,o||(f=oe(t,"click",n[67]),o=!0)},p(u,h){(!l||h[0]&262144&&s!==(s=u[18]!==0))&&(t.disabled=s)},i(u){l||(D(r.$$.fragment,u),l=!0)},o(u){F(r.$$.fragment,u),l=!1},d(u){u&&Y(e),Ee(r),o=!1,f()}}}function _b(n){let e,t,i,r,s,l,o,f;return i=new _t({props:{icon:gC}}),{c(){e=_("a"),t=_("span"),ze(i.$$.fragment),r=L(),s=_("span"),s.textContent="Compile current file",y(t,"class","icon svelte-1llogi3"),y(e,"class","navbar-item is-hidden-tablet mobile-menu-item svelte-1llogi3"),y(e,"href","javascript:void(0);")},m(u,h){V(u,e,h),v(e,t),qe(i,t,null),v(e,r),v(e,s),l=!0,o||(f=oe(e,"click",n[94]),o=!0)},p:We,i(u){l||(D(i.$$.fragment,u),l=!0)},o(u){F(i.$$.fragment,u),l=!1},d(u){u&&Y(e),Ee(i),o=!1,f()}}}function Wb(n){let e,t,i,r,s,l,o,f;return i=new _t({props:{icon:xQ}}),{c(){e=_("a"),t=_("span"),ze(i.$$.fragment),r=L(),s=_("span"),s.textContent="Solver configuration",y(t,"class","icon svelte-1llogi3"),y(e,"class","navbar-item is-hidden-tablet mobile-menu-item svelte-1llogi3"),y(e,"href","javascript:void(0);")},m(u,h){V(u,e,h),v(e,t),qe(i,t,null),v(e,r),v(e,s),l=!0,o||(f=oe(e,"click",n[95]),o=!0)},p:We,i(u){l||(D(i.$$.fragment,u),l=!0)},o(u){F(i.$$.fragment,u),l=!1},d(u){u&&Y(e),Ee(i),o=!1,f()}}}function xb(n){let e,t,i,r,s,l,o=n[0]?"latest":"edge",f,u,h,O,p;return i=new _t({props:{icon:lC}}),{c(){e=_("a"),t=_("span"),ze(i.$$.fragment),r=L(),s=_("span"),l=be("Switch to the "),f=be(o),u=be(" version of MiniZinc"),y(t,"class","icon svelte-1llogi3"),y(e,"class","navbar-item is-hidden-tablet mobile-menu-item svelte-1llogi3"),y(e,"href","javascript:void(0);")},m(g,b){V(g,e,b),v(e,t),qe(i,t,null),v(e,r),v(e,s),v(s,l),v(s,f),v(s,u),h=!0,O||(p=oe(e,"click",n[96]),O=!0)},p(g,b){(!h||b[0]&1)&&o!==(o=g[0]?"latest":"edge")&&He(f,o)},i(g){h||(D(i.$$.fragment,g),h=!0)},o(g){F(i.$$.fragment,g),h=!1},d(g){g&&Y(e),Ee(i),O=!1,p()}}}function Cb(n){let e,t,i,r,s,l,o,f;return i=new _t({props:{icon:kQ}}),{c(){e=_("a"),t=_("span"),ze(i.$$.fragment),r=L(),s=_("span"),s.textContent="Share this project",y(t,"class","icon svelte-1llogi3"),y(e,"class","navbar-item is-hidden-tablet mobile-menu-item svelte-1llogi3"),y(e,"href","javascript:void(0);")},m(u,h){V(u,e,h),v(e,t),qe(i,t,null),v(e,r),v(e,s),l=!0,o||(f=oe(e,"click",n[97]),o=!0)},p:We,i(u){l||(D(i.$$.fragment,u),l=!0)},o(u){F(i.$$.fragment,u),l=!1},d(u){u&&Y(e),Ee(i),o=!1,f()}}}function Xb(n){let e,t,i,r,s,l,o,f;return i=new _t({props:{icon:_Q}}),{c(){e=_("a"),t=_("span"),ze(i.$$.fragment),r=L(),s=_("span"),s.textContent="Open in MiniZinc Playground",y(t,"class","icon svelte-1llogi3"),y(e,"class","navbar-item is-hidden-tablet mobile-menu-item svelte-1llogi3"),y(e,"href","javascript:void(0);")},m(u,h){V(u,e,h),v(e,t),qe(i,t,null),v(e,r),v(e,s),l=!0,o||(f=oe(e,"click",n[98]),o=!0)},p:We,i(u){l||(D(i.$$.fragment,u),l=!0)},o(u){F(i.$$.fragment,u),l=!1},d(u){u&&Y(e),Ee(i),o=!1,f()}}}function Tb(n){let e,t,i;return t=new PC({props:{files:n[20],currentIndex:n[21],readonly:!n[7]}}),t.$on("selectTab",n[106]),t.$on("reorder",n[107]),t.$on("newFile",n[108]),t.$on("rename",n[57]),t.$on("close",n[109]),t.$on("manageFiles",n[110]),{c(){e=_("div"),ze(t.$$.fragment),y(e,"class","top svelte-1llogi3")},m(r,s){V(r,e,s),qe(t,e,null),i=!0},p(r,s){const l={};s[0]&1048576&&(l.files=r[20]),s[0]&2097152&&(l.currentIndex=r[21]),s[0]&128&&(l.readonly=!r[7]),t.$set(l)},i(r){i||(D(t.$$.fragment,r),i=!0)},o(r){F(t.$$.fragment,r),i=!1},d(r){r&&Y(e),Ee(t)}}}function Zb(n){let e,t,i={state:n[51]};return e=new D4({props:i}),n[111](e),{c(){ze(e.$$.fragment)},m(r,s){qe(e,r,s),t=!0},p(r,s){const l={};s[1]&1048576&&(l.state=r[51]),e.$set(l)},i(r){t||(D(e.$$.fragment,r),t=!0)},o(r){F(e.$$.fragment,r),t=!1},d(r){n[111](null),Ee(e,r)}}}function p6(n){let e,t,i,r,s=n[6]&&Tb(n),l=n[51]&&Zb(n);return{c(){e=_("div"),s&&s.c(),t=L(),i=_("div"),l&&l.c(),y(i,"class","grow svelte-1llogi3"),y(e,"class","panel stack svelte-1llogi3"),y(e,"slot","panelA")},m(o,f){V(o,e,f),s&&s.m(e,null),v(e,t),v(e,i),l&&l.m(i,null),r=!0},p(o,f){o[6]?s?(s.p(o,f),f[0]&64&&D(s,1)):(s=Tb(o),s.c(),D(s,1),s.m(e,t)):s&&(nt(),F(s,1,1,()=>{s=null}),rt()),o[51]?l?(l.p(o,f),f[1]&1048576&&D(l,1)):(l=Zb(o),l.c(),D(l,1),l.m(i,null)):l&&(nt(),F(l,1,1,()=>{l=null}),rt())},i(o){r||(D(s),D(l),r=!0)},o(o){F(s),F(l),r=!1},d(o){o&&Y(e),s&&s.d(),l&&l.d()}}}function Rb(n){let e,t,i,r,s,l,o,f,u,h,O,p,g=n[13]&&Ab(n);return{c(){e=_("div"),t=_("div"),i=_("ul"),r=_("li"),s=_("a"),s.textContent="Output",l=L(),o=_("li"),f=_("a"),f.textContent="Visualisation",u=L(),g&&g.c(),y(s,"href","javascript:void(0);"),ae(r,"is-active",!n[43]),y(f,"href","javascript:void(0);"),ae(o,"is-active",n[43]),y(t,"class","tabs is-boxed"),y(e,"class","top svelte-1llogi3")},m(b,Q){V(b,e,Q),v(e,t),v(t,i),v(i,r),v(r,s),v(i,l),v(i,o),v(o,f),v(i,u),g&&g.m(i,null),h=!0,O||(p=[oe(s,"click",n[99]),oe(f,"click",n[100])],O=!0)},p(b,Q){(!h||Q[1]&4096)&&ae(r,"is-active",!b[43]),(!h||Q[1]&4096)&&ae(o,"is-active",b[43]),b[13]?g?(g.p(b,Q),Q[0]&8192&&D(g,1)):(g=Ab(b),g.c(),D(g,1),g.m(i,null)):g&&(nt(),F(g,1,1,()=>{g=null}),rt())},i(b){h||(D(g),h=!0)},o(b){F(g),h=!1},d(b){b&&Y(e),g&&g.d(),O=!1,ii(p)}}}function Ab(n){let e,t,i,r,s,l,o;return r=new _t({props:{icon:TQ}}),{c(){e=_("li"),t=_("button"),i=_("span"),ze(r.$$.fragment),y(i,"class","icon"),y(t,"class","button is-small"),y(t,"title","Switch orientation"),y(e,"class","tab-end svelte-1llogi3")},m(f,u){V(f,e,u),v(e,t),v(t,i),qe(r,i,null),s=!0,l||(o=oe(t,"click",n[69]),l=!0)},p:We,i(f){s||(D(r.$$.fragment,f),s=!0)},o(f){F(r.$$.fragment,f),s=!1},d(f){f&&Y(e),Ee(r),l=!1,o()}}}function Ub(n){let e,t,i,r,s,l;return i=new _t({props:{icon:TQ}}),{c(){e=_("button"),t=_("span"),ze(i.$$.fragment),y(t,"class","icon"),y(e,"class","button is-small"),y(e,"title","Switch orientation")},m(o,f){V(o,e,f),v(e,t),qe(i,t,null),r=!0,s||(l=oe(e,"click",n[69]),s=!0)},p:We,i(o){r||(D(i.$$.fragment,o),r=!0)},o(o){F(i.$$.fragment,o),r=!1},d(o){o&&Y(e),Ee(i),s=!1,l()}}}function g6(n){let e,t,i=n[13]&&!n[42]&&Ub(n);return{c(){e=_("p"),i&&i.c(),y(e,"class","control"),y(e,"slot","before-right-controls")},m(r,s){V(r,e,s),i&&i.m(e,null),t=!0},p(r,s){r[13]&&!r[42]?i?(i.p(r,s),s[0]&8192|s[1]&2048&&D(i,1)):(i=Ub(r),i.c(),D(i,1),i.m(e,null)):i&&(nt(),F(i,1,1,()=>{i=null}),rt())},i(r){t||(D(i),t=!0)},o(r){F(i),t=!1},d(r){r&&Y(e),i&&i.d()}}}function m6(n){let e,t,i,r,s,l,o,f,u,h,O=n[42]&&Rb(n),p={files:n[20]};s=new w8({props:p}),n[101](s),s.$on("solve",n[102]);function g(Q){n[103](Q)}let b={output:n[33],showClearOutput:n[14],showAutoClearOutput:n[15],showSectionToggles:n[16],showRightControls:n[17],isTab:n[42],$$slots:{"before-right-controls":[g6]},$$scope:{ctx:n}};return n[1]!==void 0&&(b.autoClearOutput=n[1]),f=new m8({props:b}),Dt.push(()=>Uo(f,"autoClearOutput",g)),f.$on("clear",n[104]),f.$on("goto",n[105]),{c(){e=_("div"),O&&O.c(),t=L(),i=_("div"),r=_("div"),ze(s.$$.fragment),l=L(),o=_("div"),ze(f.$$.fragment),y(r,"class","tab-window svelte-1llogi3"),ae(r,"visible",n[43]),y(o,"class","tab-window svelte-1llogi3"),ae(o,"visible",!n[42]||!n[43]),y(i,"class","grow svelte-1llogi3"),y(e,"class","panel stack svelte-1llogi3"),y(e,"slot","panelB")},m(Q,$){V(Q,e,$),O&&O.m(e,null),v(e,t),v(e,i),v(i,r),qe(s,r,null),v(i,l),v(i,o),qe(f,o,null),h=!0},p(Q,$){Q[42]?O?(O.p(Q,$),$[1]&2048&&D(O,1)):(O=Rb(Q),O.c(),D(O,1),O.m(e,t)):O&&(nt(),F(O,1,1,()=>{O=null}),rt());const P={};$[0]&1048576&&(P.files=Q[20]),s.$set(P),(!h||$[1]&4096)&&ae(r,"visible",Q[43]);const x={};$[1]&4&&(x.output=Q[33]),$[0]&16384&&(x.showClearOutput=Q[14]),$[0]&32768&&(x.showAutoClearOutput=Q[15]),$[0]&65536&&(x.showSectionToggles=Q[16]),$[0]&131072&&(x.showRightControls=Q[17]),$[1]&2048&&(x.isTab=Q[42]),$[0]&8192|$[1]&2048|$[4]&512&&(x.$$scope={dirty:$,ctx:Q}),!u&&$[0]&2&&(u=!0,x.autoClearOutput=Q[1],Ao(()=>u=!1)),f.$set(x),(!h||$[1]&6144)&&ae(o,"visible",!Q[42]||!Q[43])},i(Q){h||(D(O),D(s.$$.fragment,Q),D(f.$$.fragment,Q),h=!0)},o(Q){F(O),F(s.$$.fragment,Q),F(f.$$.fragment,Q),h=!1},d(Q){Q&&Y(e),O&&O.d(),n[101](null),Ee(s),Ee(f)}}}function S6(n){let e,t,i,r=n[20][n[29]].name+"",s,l,o,f;return{c(){e=_("p"),t=be("Are you sure you wish to delete "),i=_("code"),s=be(r),l=be("?"),o=L(),f=_("p"),f.textContent="This cannot be undone."},m(u,h){V(u,e,h),v(e,t),v(e,i),v(i,s),v(e,l),V(u,o,h),V(u,f,h)},p(u,h){h[0]&537919488&&r!==(r=u[20][u[29]].name+"")&&He(s,r)},d(u){u&&(Y(e),Y(o),Y(f))}}}function b6(n){let e,t,i,r,s,l;return{c(){e=_("div"),t=_("button"),t.textContent="Delete",i=L(),r=_("button"),r.textContent="Cancel",y(t,"class","button is-danger"),y(r,"type","button"),y(r,"class","button"),y(e,"slot","footer")},m(o,f){V(o,e,f),v(e,t),v(e,i),v(e,r),s||(l=[oe(t,"click",n[122]),oe(r,"click",n[123])],s=!0)},p:We,d(o){o&&Y(e),s=!1,ii(l)}}}function $6(n){let e,t,i,r,s,l,o,f,u,h,O;return f=new _t({props:{icon:oC}}),{c(){e=_("div"),t=_("p"),i=_("input"),r=L(),s=_("p"),l=_("button"),o=_("span"),ze(f.$$.fragment),y(i,"class","input"),y(i,"type","text"),i.value=n[39],i.readOnly=!0,y(t,"class","control is-expanded"),y(o,"class","icon"),y(l,"type","button"),y(l,"class","button"),ae(l,"is-primary",!n[40]),ae(l,"is-success",n[40]),y(s,"class","control"),y(e,"class","field has-addons")},m(p,g){V(p,e,g),v(e,t),v(t,i),n[130](i),v(e,r),v(e,s),v(s,l),v(l,o),qe(f,o,null),u=!0,h||(O=[oe(i,"click",n[131]),oe(l,"click",n[66])],h=!0)},p(p,g){(!u||g[1]&256&&i.value!==p[39])&&(i.value=p[39]),(!u||g[1]&512)&&ae(l,"is-primary",!p[40]),(!u||g[1]&512)&&ae(l,"is-success",p[40])},i(p){u||(D(f.$$.fragment,p),u=!0)},o(p){F(f.$$.fragment,p),u=!1},d(p){p&&Y(e),n[130](null),Ee(f),h=!1,ii(O)}}}function Q6(n){let e,t,i,r;return{c(){e=_("div"),t=_("button"),t.textContent="Done",y(t,"class","button is-primary"),y(e,"slot","footer")},m(s,l){V(s,e,l),v(e,t),i||(r=oe(t,"click",n[129]),i=!0)},p:We,d(s){s&&Y(e),i=!1,r()}}}function w6(n){let e,t,i,r,s,l,o,f,u,h,O,p,g,b,Q,$,P,x,A,C,X,Z,I,q,N,z,ie,ue,$e,Se,Te,pe,fe,Ae,xe,Ce,Me,yt,ni,xt,It,Nt,ve,K,H,le,se,Ke,Fe,ut,ht,ci,Xe,Qe,Kt,Ot,De,bt,lt,tt,dt,vt,en,ri;const pt=n[88]["navbar-before-run-buttons"],ui=an(pt,n,n[133],gb),Fn=[O6,h6],Ct=[];function Fr(B,Oe){return B[47]?0:1}h=Fr(n),O=Ct[h]=Fn[h](n);let Yt=n[8]&&mb(n),Xt=n[4]&&Sb(n);const _i=n[88]["navbar-run-buttons"],Qi=an(_i,n,n[133],pb);let hi=n[5]&&n[24].length>0&&bb(n);const Ts=n[88]["navbar-after-run-buttons"],qi=an(Ts,n,n[133],Ob);let Vt=n[5]&&n[24].length>0&&Qb(n);const Cr=n[88]["navbar-after-solver-selector"],Ei=an(Cr,n,n[133],ub),dn=n[88]["navbar-before-share-buttons"],Mi=an(dn,n,n[133],cb);let Jt=n[10]&&vb(n),Tt=n[11]&&Pb(n),Lt=n[12]&&kb(n);const Gr=n[88]["navbar-share-buttons"],wi=an(Gr,n,n[133],fb);let Ne=n[8]&&!n[47]&&n[49]&&_b(n),Bt=n[9]&&n[5]&&n[24].length>0&&Wb(n),Zt=n[4]&&!n[47]&&xb(n),qt=n[10]&&n[18]===0&&Cb(n),Et=n[12]&&n[18]===0&&Xb(n);const Hr=n[88]["navbar-after-share-buttons"],Oi=an(Hr,n,n[133],ab);function Gn(B){n[112](B)}let Kr={direction:n[2],showPanels:n[48],$$slots:{panelB:[m6],panelA:[p6]},$$scope:{ctx:n}};n[3]!==void 0&&(Kr.split=n[3]),le=new K4({props:Kr}),Dt.push(()=>Uo(le,"split",Gn));let Jr={active:n[35],stdFlags:n[45]};return Fe=new G8({props:Jr}),n[113](Fe),Fe.$on("close",n[114]),ht=new Z8({props:{active:n[30],files:n[20]}}),ht.$on("close",n[115]),ht.$on("delete",n[116]),ht.$on("modifyFile",n[117]),ht.$on("newFile",n[118]),Xe=new k8({props:{active:n[28]}}),Xe.$on("cancel",n[119]),Xe.$on("new",n[120]),Xe.$on("open",n[121]),Kt=new Vl({props:{active:n[29]!==null,title:"Delete file",$$slots:{footer:[b6],default:[S6]},$$scope:{ctx:n}}}),Kt.$on("cancel",n[124]),De=new V8({props:{active:n[31],modelFiles:n[44]}}),De.$on("accept",n[125]),De.$on("cancel",n[126]),lt=new B8({props:{active:n[32],dataFiles:n[46],parameters:n[34]}}),lt.$on("accept",n[127]),lt.$on("cancel",n[128]),dt=new Vl({props:{active:n[39],title:"Share this project",$$slots:{footer:[Q6],default:[$6]},$$scope:{ctx:n}}}),dt.$on("cancel",n[132]),{c(){e=_("div"),t=_("div"),i=_("div"),r=_("nav"),s=_("div"),ui&&ui.c(),l=L(),o=_("div"),f=_("div"),u=_("div"),O.c(),p=L(),Yt&&Yt.c(),g=L(),Xt&&Xt.c(),b=L(),Qi&&Qi.c(),Q=L(),hi&&hi.c(),$=L(),qi&&qi.c(),P=L(),Vt&&Vt.c(),x=L(),Ei&&Ei.c(),A=L(),C=_("a"),X=_("span"),Z=L(),I=_("span"),q=L(),N=_("span"),z=L(),ie=_("div"),ue=_("div"),$e=L(),Se=_("div"),Mi&&Mi.c(),Te=L(),pe=_("div"),fe=_("div"),Jt&&Jt.c(),Ae=L(),Tt&&Tt.c(),xe=L(),Lt&&Lt.c(),Ce=L(),wi&&wi.c(),Me=L(),Ne&&Ne.c(),yt=L(),Bt&&Bt.c(),ni=L(),Zt&&Zt.c(),xt=L(),qt&&qt.c(),It=L(),Et&&Et.c(),Nt=L(),Oi&&Oi.c(),ve=L(),K=_("div"),H=_("div"),ze(le.$$.fragment),Ke=L(),ze(Fe.$$.fragment),ut=L(),ze(ht.$$.fragment),ci=L(),ze(Xe.$$.fragment),Qe=L(),ze(Kt.$$.fragment),Ot=L(),ze(De.$$.fragment),bt=L(),ze(lt.$$.fragment),tt=L(),ze(dt.$$.fragment),y(u,"class","control"),y(f,"class","field has-addons navbar-run-buttons svelte-1llogi3"),y(o,"class","navbar-item is-expanded"),y(X,"aria-hidden","true"),y(I,"aria-hidden","true"),y(N,"aria-hidden","true"),y(C,"role","button"),y(C,"class","navbar-burger"),y(C,"aria-label","menu"),y(C,"aria-expanded",n[26]),ae(C,"is-active",n[26]),y(s,"class","navbar-brand"),y(ue,"class","navbar-start is-hidden-tablet"),y(fe,"class","field has-addons"),y(pe,"class","navbar-item is-hidden-mobile"),y(Se,"class","navbar-end"),y(ie,"class","navbar-menu"),ae(ie,"is-active",n[26]),y(r,"class","navbar"),y(i,"class","top svelte-1llogi3"),y(H,"class","left svelte-1llogi3"),y(K,"class","grow main-panel svelte-1llogi3"),y(t,"class","stack svelte-1llogi3"),y(e,"class","mzn-playground svelte-1llogi3"),ae(e,"is-dark",n[23])},m(B,Oe){V(B,e,Oe),v(e,t),v(t,i),v(i,r),v(r,s),ui&&ui.m(s,null),v(s,l),v(s,o),v(o,f),v(f,u),Ct[h].m(u,null),v(f,p),Yt&&Yt.m(f,null),v(f,g),Xt&&Xt.m(f,null),v(f,b),Qi&&Qi.m(f,null),v(f,Q),hi&&hi.m(f,null),v(s,$),qi&&qi.m(s,null),v(s,P),Vt&&Vt.m(s,null),v(s,x),Ei&&Ei.m(s,null),v(s,A),v(s,C),v(C,X),v(C,Z),v(C,I),v(C,q),v(C,N),v(r,z),v(r,ie),v(ie,ue),v(ie,$e),v(ie,Se),Mi&&Mi.m(Se,null),v(Se,Te),v(Se,pe),v(pe,fe),Jt&&Jt.m(fe,null),v(fe,Ae),Tt&&Tt.m(fe,null),v(fe,xe),Lt&&Lt.m(fe,null),v(fe,Ce),wi&&wi.m(fe,null),v(Se,Me),Ne&&Ne.m(Se,null),v(Se,yt),Bt&&Bt.m(Se,null),v(Se,ni),Zt&&Zt.m(Se,null),v(Se,xt),qt&&qt.m(Se,null),v(Se,It),Et&&Et.m(Se,null),v(Se,Nt),Oi&&Oi.m(Se,null),v(t,ve),v(t,K),v(K,H),qe(le,H,null),v(K,Ke),qe(Fe,K,null),v(e,ut),qe(ht,e,null),v(e,ci),qe(Xe,e,null),v(e,Qe),qe(Kt,e,null),v(e,Ot),qe(De,e,null),v(e,bt),qe(lt,e,null),v(e,tt),qe(dt,e,null),vt=!0,en||(ri=oe(C,"click",n[91]),en=!0)},p(B,Oe){ui&&ui.p&&(!vt||Oe[4]&512)&&cn(ui,pt,B,B[133],vt?fn(pt,B[133],Oe,u6):un(B[133]),gb);let es=h;h=Fr(B),h===es?Ct[h].p(B,Oe):(nt(),F(Ct[es],1,1,()=>{Ct[es]=null}),rt(),O=Ct[h],O?O.p(B,Oe):(O=Ct[h]=Fn[h](B),O.c()),D(O,1),O.m(u,null)),B[8]?Yt?Yt.p(B,Oe):(Yt=mb(B),Yt.c(),Yt.m(f,g)):Yt&&(Yt.d(1),Yt=null),B[4]?Xt?(Xt.p(B,Oe),Oe[0]&16&&D(Xt,1)):(Xt=Sb(B),Xt.c(),D(Xt,1),Xt.m(f,b)):Xt&&(nt(),F(Xt,1,1,()=>{Xt=null}),rt()),Qi&&Qi.p&&(!vt||Oe[4]&512)&&cn(Qi,_i,B,B[133],vt?fn(_i,B[133],Oe,c6):un(B[133]),pb),B[5]&&B[24].length>0?hi?hi.p(B,Oe):(hi=bb(B),hi.c(),hi.m(f,null)):hi&&(hi.d(1),hi=null),qi&&qi.p&&(!vt||Oe[4]&512)&&cn(qi,Ts,B,B[133],vt?fn(Ts,B[133],Oe,f6):un(B[133]),Ob),B[5]&&B[24].length>0?Vt?(Vt.p(B,Oe),Oe[0]&16777248&&D(Vt,1)):(Vt=Qb(B),Vt.c(),D(Vt,1),Vt.m(s,x)):Vt&&(nt(),F(Vt,1,1,()=>{Vt=null}),rt()),Ei&&Ei.p&&(!vt||Oe[4]&512)&&cn(Ei,Cr,B,B[133],vt?fn(Cr,B[133],Oe,a6):un(B[133]),ub),(!vt||Oe[0]&67108864)&&y(C,"aria-expanded",B[26]),(!vt||Oe[0]&67108864)&&ae(C,"is-active",B[26]),Mi&&Mi.p&&(!vt||Oe[4]&512)&&cn(Mi,dn,B,B[133],vt?fn(dn,B[133],Oe,o6):un(B[133]),cb),B[10]?Jt?(Jt.p(B,Oe),Oe[0]&1024&&D(Jt,1)):(Jt=vb(B),Jt.c(),D(Jt,1),Jt.m(fe,Ae)):Jt&&(nt(),F(Jt,1,1,()=>{Jt=null}),rt()),B[11]?Tt?(Tt.p(B,Oe),Oe[0]&2048&&D(Tt,1)):(Tt=Pb(B),Tt.c(),D(Tt,1),Tt.m(fe,xe)):Tt&&(nt(),F(Tt,1,1,()=>{Tt=null}),rt()),B[12]?Lt?(Lt.p(B,Oe),Oe[0]&4096&&D(Lt,1)):(Lt=kb(B),Lt.c(),D(Lt,1),Lt.m(fe,Ce)):Lt&&(nt(),F(Lt,1,1,()=>{Lt=null}),rt()),wi&&wi.p&&(!vt||Oe[4]&512)&&cn(wi,Gr,B,B[133],vt?fn(Gr,B[133],Oe,l6):un(B[133]),fb),B[8]&&!B[47]&&B[49]?Ne?(Ne.p(B,Oe),Oe[0]&256|Oe[1]&327680&&D(Ne,1)):(Ne=_b(B),Ne.c(),D(Ne,1),Ne.m(Se,yt)):Ne&&(nt(),F(Ne,1,1,()=>{Ne=null}),rt()),B[9]&&B[5]&&B[24].length>0?Bt?(Bt.p(B,Oe),Oe[0]&16777760&&D(Bt,1)):(Bt=Wb(B),Bt.c(),D(Bt,1),Bt.m(Se,ni)):Bt&&(nt(),F(Bt,1,1,()=>{Bt=null}),rt()),B[4]&&!B[47]?Zt?(Zt.p(B,Oe),Oe[0]&16|Oe[1]&65536&&D(Zt,1)):(Zt=xb(B),Zt.c(),D(Zt,1),Zt.m(Se,xt)):Zt&&(nt(),F(Zt,1,1,()=>{Zt=null}),rt()),B[10]&&B[18]===0?qt?(qt.p(B,Oe),Oe[0]&263168&&D(qt,1)):(qt=Cb(B),qt.c(),D(qt,1),qt.m(Se,It)):qt&&(nt(),F(qt,1,1,()=>{qt=null}),rt()),B[12]&&B[18]===0?Et?(Et.p(B,Oe),Oe[0]&266240&&D(Et,1)):(Et=Xb(B),Et.c(),D(Et,1),Et.m(Se,Nt)):Et&&(nt(),F(Et,1,1,()=>{Et=null}),rt()),Oi&&Oi.p&&(!vt||Oe[4]&512)&&cn(Oi,Hr,B,B[133],vt?fn(Hr,B[133],Oe,s6):un(B[133]),ab),(!vt||Oe[0]&67108864)&&ae(ie,"is-active",B[26]);const xn={};Oe[0]&4&&(xn.direction=B[2]),Oe[1]&131072&&(xn.showPanels=B[48]),Oe[0]&1916002498|Oe[1]&1055748|Oe[4]&512&&(xn.$$scope={dirty:Oe,ctx:B}),!se&&Oe[0]&8&&(se=!0,xn.split=B[3],Ao(()=>se=!1)),le.$set(xn);const ts={};Oe[1]&16&&(ts.active=B[35]),Oe[1]&16384&&(ts.stdFlags=B[45]),Fe.$set(ts);const Zs={};Oe[0]&1073741824&&(Zs.active=B[30]),Oe[0]&1048576&&(Zs.files=B[20]),ht.$set(Zs);const il={};Oe[0]&268435456&&(il.active=B[28]),Xe.$set(il);const Xr={};Oe[0]&536870912&&(Xr.active=B[29]!==null),Oe[0]&537919488|Oe[4]&512&&(Xr.$$scope={dirty:Oe,ctx:B}),Kt.$set(Xr);const cr={};Oe[1]&1&&(cr.active=B[31]),Oe[1]&8192&&(cr.modelFiles=B[44]),De.$set(cr);const Wi={};Oe[1]&2&&(Wi.active=B[32]),Oe[1]&32768&&(Wi.dataFiles=B[46]),Oe[1]&8&&(Wi.parameters=B[34]),lt.$set(Wi);const tn={};Oe[1]&256&&(tn.active=B[39]),Oe[1]&896|Oe[4]&512&&(tn.$$scope={dirty:Oe,ctx:B}),dt.$set(tn),(!vt||Oe[0]&8388608)&&ae(e,"is-dark",B[23])},i(B){vt||(D(ui,B),D(O),D(Xt),D(Qi,B),D(qi,B),D(Vt),D(Ei,B),D(Mi,B),D(Jt),D(Tt),D(Lt),D(wi,B),D(Ne),D(Bt),D(Zt),D(qt),D(Et),D(Oi,B),D(le.$$.fragment,B),D(Fe.$$.fragment,B),D(ht.$$.fragment,B),D(Xe.$$.fragment,B),D(Kt.$$.fragment,B),D(De.$$.fragment,B),D(lt.$$.fragment,B),D(dt.$$.fragment,B),vt=!0)},o(B){F(ui,B),F(O),F(Xt),F(Qi,B),F(qi,B),F(Vt),F(Ei,B),F(Mi,B),F(Jt),F(Tt),F(Lt),F(wi,B),F(Ne),F(Bt),F(Zt),F(qt),F(Et),F(Oi,B),F(le.$$.fragment,B),F(Fe.$$.fragment,B),F(ht.$$.fragment,B),F(Xe.$$.fragment,B),F(Kt.$$.fragment,B),F(De.$$.fragment,B),F(lt.$$.fragment,B),F(dt.$$.fragment,B),vt=!1},d(B){B&&Y(e),ui&&ui.d(B),Ct[h].d(),Yt&&Yt.d(),Xt&&Xt.d(),Qi&&Qi.d(B),hi&&hi.d(),qi&&qi.d(B),Vt&&Vt.d(),Ei&&Ei.d(B),Mi&&Mi.d(B),Jt&&Jt.d(),Tt&&Tt.d(),Lt&&Lt.d(),wi&&wi.d(B),Ne&&Ne.d(),Bt&&Bt.d(),Zt&&Zt.d(),qt&&qt.d(),Et&&Et.d(),Oi&&Oi.d(B),Ee(le),n[113](null),Ee(Fe),Ee(ht),Ee(Xe),Ee(Kt),Ee(De),Ee(lt),Ee(dt),en=!1,ri()}}}function Yb(n,e){n.effects=n.effects?[...n.effects,e]:[e]}function y6(n,e,t){let i,r,s,l,o,f,u,h,O,p,g,b,Q,$,P,x,A,{$$slots:C={},$$scope:X}=e,{showVersionSwitcher:Z=!0}=e,{showSolverDropdown:I=!0}=e,{edgeMiniZinc:q=!1}=e,{autoClearOutput:N=!1}=e,{showTabs:z=!0}=e,{canEditTabs:ie=!0}=e,{compilationEnabled:ue=!0}=e,{project:$e}=e,{enabledSolvers:Se=null}=e,{canEditSolverSettings:Te=!0}=e,{showShareButton:pe=!0}=e,{showDownloadButton:fe=!0}=e,{externalPlaygroundURL:Ae=null}=e,{splitterDirection:xe="vertical"}=e,{splitterSize:Ce=75}=e,{canSwitchOrientation:Me=!0}=e,{showClearOutput:yt=!0}=e,{showAutoClearOutput:ni=!0}=e,{showOutputSectionToggles:xt=!0}=e,{showOutputRightControls:It=!0}=e,{theme:Nt="auto"}=e,{hideOutputOnStartup:ve=!0}=e,K=0,H=[],le,se,Ke={latest:{label:"Latest",detail:"stable"},edge:{label:"Edge",detail:"development"}};function Fe(R){const he=q?Px:vx;if(se!==he){t(18,K++,K);const re=le;le=new Promise(async(ce,Ue)=>{re&&await re,se&&se.shutdown(),se=he,se.shutdown(),await se.init();const[Be]=/version \d+\.\d+\.\d+(?:, build .*)?$/m.exec(await se.version()),ot=q?"edge":"latest";t(19,Ke={...Ke,[ot]:{...Ke[ot],detail:Be}}),t(79,H=await se.solvers()),await lr(),t(18,K--,K),ce()})}return le}const ut=new Promise((R,he)=>{Nc(()=>{Fe(),R();const re=window.matchMedia("(prefers-color-scheme: dark)"),ce=()=>{t(82,Xr=window.matchMedia("(prefers-color-scheme: dark)").matches)};return ce(),re.addEventListener("change",ce),()=>re.removeEventListener("change",ce)})});async function ht(R){t(0,q=R.minizincVersion==="edge"),await ut,t(20,Qe=[]),hi(R.files),t(21,Ot=R.tab||0),R.solverId&&(await Fe(),t(22,Ct=$.findIndex(he=>he.id===R.solverId))),R.solverConfig&&De.load(R.solverConfig)}function ci(){return Qe.length>0}let Xe,Qe=[],Kt=!1,Ot=0,De,bt=!1,lt=null,tt=!1,dt=!1,vt=null,en=!1,ri=[],pt=null,ui=[],Fn={},Ct=-1;async function Fr(R,he){if(await Fe(),Ct<0||Ct>=$.length){const re=$.findIndex(ce=>ce.extraInfo&&ce.extraInfo.isDefault);re!==-1&&t(22,Ct=re)}}let Yt=!1;function Xt(){t(35,Yt=!Yt)}async function _i(R){for(Xe&&Ot=0&&Qe[R].hidden;)R--;R===-1&&(R=Qe.findIndex(he=>!he.hidden)),t(21,Ot=R),await lr(),Xe&&h&&(Xe.focus(),h.scrollTop!==void 0&&Xe.getView().requestMeasure({read(he){he.scrollDOM.scrollTo(h.scrollLeft,h.scrollTop)}}))}function Qi(R){let he=`Untitled${R}`,re=2;for(;Qe.find(ce=>ce.name===he);)he=`Untitled-${re++}${R}`;t(20,Qe=[...Qe,{name:he,state:ct.create({extensions:Nf(R,xn,A)})}]),_i(Qe.length-1),t(28,bt=!1)}function hi(R){let he=[];for(const re of R){const ce=re.name.endsWith(".mzc.mzn")?re.name.length-8:re.name.lastIndexOf("."),Ue=re.name.substring(0,ce).replaceAll(/[\/\\\.]/g,""),Be=re.name.substring(ce);let ot=`${Ue}${Be}`,nn=2;for(;Qe.find(yu=>yu.name===ot);)ot=`${Ue}-${nn++}${Be}`;const si=Nf(Be,xn,A,re.readOnly);he.push({...re,hidden:re.hidden||Be===".mzc",name:ot,state:ct.create({doc:re.contents,extensions:si,selection:{anchor:re.anchor||0}})})}t(20,Qe=[...Qe,...he]),_i(Qe.length-1),t(28,bt=!1)}function Ts(R){const{index:he,name:re,suffix:ce}=R.detail;let Ue=re,Be=2;for(;Qe.some(ot=>ot===Ue+ce);)Ue=`${re}-${Be++}`;h&&t(84,h.state=Xe.getState(),h),t(20,Qe=[...Qe.slice(0,he),{...Qe[he],name:re+ce},...Qe.slice(he+1)])}function qi(R){const he=r===1&&!Qe[R].hidden;t(20,Qe=[...Qe.slice(0,R),...Qe.slice(R+1),...he?[{name:"Untitled.mzn",state:ct.create({extensions:Nf(".mzn",xn,A)})}]:[]]),Ot>=Qe.length?_i(Qe.length-1):_i(Ot),t(29,lt=null)}function Vt(R,he){h&&t(84,h.state=Xe.getState(),h);const re={...Qe[R],...he};"readOnly"in he&&Yb(re,he.readOnly?A9:U9),t(20,Qe=[...Qe.slice(0,R),re,...Qe.slice(R+1)]),_i(Ot)}function Cr(R,he){let re;R0){await lr();const he=Xe.getView();he&&he.state===R.state&&(he.dispatch({effects:R.effects}),R.effects=[])}}let dn=null;async function Mi(R){t(18,K++,K),t(84,h.state=Xe.getState(),h);let he=O?h:null;if(!he){if(b.length===0)return t(18,K--,K),!1;if(b.length===1)he=Qe.find(Ue=>Ue.name===b[0]);else try{const Ue=await new Promise((Be,ot)=>{t(36,dn=Be),t(31,dt=!0)});if(!Ue)return t(18,K--,K),!1;he=Qe.find(Be=>Be.name===Ue.modelFile)}finally{t(31,dt=!1)}}const re=new se.Model,ce=[he.name];if(R){const Ue=he.name.substring(0,he.name.length-4),Be=Qe.find(ot=>ot.name===`${Ue}.mzc`||ot.name===`${Ue}.mzc.mzn`);Be&&ce.push(Be.name)}he!==h&&ce.push(h.name);for(const Ue of Qe)re.addFile(Ue.name,Ue.state.doc.toString(),ce.indexOf(Ue.name)!==-1);try{const{input:Ue}=await re.interface({options:De.getCompilationConfiguration(P.id)});if(Object.keys(Ue).length>0){const Be={};for(const ot in Ue)Be[ot]=Fn[ot];t(34,Fn=Be),p&&ui.indexOf(h.name)===-1&&(ui=[...ui,h.name]);try{const ot=await new Promise((nn,si)=>{t(36,dn=nn),t(32,vt=!0)});if(!ot)return t(18,K--,K),!1;if(ot.parameters){let nn="";for(const si in ot.parameters)ot.parameters[si].trim().length>0&&(nn+=`${si} = ${ot.parameters[si]}; -`);re.addDznString(nn),t(34,Fn=ot.parameters)}else{for(const nn of ot.dataFiles)ce.indexOf(nn)===-1&&(re.addFile(nn),ce.push(nn));ui=ot.dataFiles}}finally{t(32,vt=!1)}}}catch(Ue){console.error(Ue)}return t(18,K--,K),{model:re,fileList:ce}}async function Jt(){if(g){const Ue=new se.Model;Ue.addFile(h.name,h.state.doc.toString());const Be=[h.name],ot=De.getSolvingConfiguration(P.id);await Tt(Ue,Be,ot);return}const R=await Mi(!0);if(!R)return;const{model:he,fileList:re}=R,ce=De.getSolvingConfiguration(P.id);await Tt(he,re,ce)}async function Tt(R,he,re){t(80,en=!0);const ce=Date.now();N&&t(33,ri=[]),t(33,ri=[...ri,{files:he,output:[]}]),t(81,pt=R.solve({options:re,jsonOutput:!1})),Bt(),pt.on("error",Ne),pt.on("warning",Ne),pt.on("solution",Ue=>Ne(Ue,Date.now()-ce)),pt.on("status",Ue=>Ne(Ue,Date.now()-ce)),pt.on("statistics",Ne),pt.on("trace",Ue=>Ne(Ue,Date.now()-ce)),pt.on("statistics",Ne),pt.on("comment",Ne),pt.on("time",Ne),pt.on("checker",Ne),pt.on("stderr",Ne);try{await pt,Ne({type:"exit",code:0,runTime:Date.now()-ce})}catch(Ue){Ne({type:"exit",code:Ue.code,runTime:Date.now()-ce})}t(81,pt=null)}async function Lt(){t(80,en=!0);const R=await Mi(!0);if(!R)return;Bt();const{model:he,fileList:re}=R,ce=re[0],Ue=Date.now();N&&t(33,ri=[]),t(33,ri=[...ri,{files:re,isCompile:!0,output:[]}]),t(81,pt=he.compile({options:De.getCompilationConfiguration(P.id)})),pt.on("error",Ne),pt.on("warning",Ne),pt.on("statistics",Ne),pt.on("trace",Ne),pt.on("statistics",Ne),pt.on("stderr",Ne);try{const Be=await pt;t(20,Qe=[...Qe,{name:`${ce.substring(0,ce.indexOf("."))}.fzn`,state:ct.create({extensions:Nf(".fzn",xn,A),doc:Be})}]),_i(Qe.length-1),Ne({type:"exit",code:0,runTime:Date.now()-Ue})}catch(Be){Ne({type:"exit",code:Be.code,runTime:Date.now()-Ue})}t(81,pt=null)}function Gr(){Ne({type:"cancel"}),pt.cancel()}let wi=null;function Ne(R,he){wi?wi.then(()=>{wi=Zt(R,he)}):wi=Zt(R,he),ri[ri.length-1].output.push(R),t(33,ri)}function Bt(){Wi&&Wi.reset(),t(42,tn=!1),t(43,Rs=!1)}async function Zt(R,he){if(R.type==="trace"&&R.section.startsWith("mzn_vis_")){tn||(t(42,tn=!0),t(43,Rs=!0)),await lr();const re=Qe.find(Ue=>Ue.name===R.message.url);let ce=null;if(re)ce=re.state.doc.toString();else try{ce=await se.readStdlibFileContents(R.message.url)}catch(Ue){console.error(Ue);return}if(ce===null){console.error(`Failed to get visualisation file ${R.message.url}`);return}Wi.addVisualisation(R.section,ce,R.message.userData);return}if(tn){for(;!Wi;)await lr();switch(R.type){case"solution":Wi.addSolution(R.sections.filter(re=>re.startsWith("mzn_vis_")).reduce((re,ce)=>({...re,[ce]:R.output[ce]}),{}),"time"in R?R.time:he);break;case"status":Wi.status(R.status,"time"in R?R.time:he);break;case"exit":Wi.status("time"in R?R.time:he);break}}}function qt(){return h&&t(84,h.state=Xe.getState(),h),{files:Qe.map(R=>({name:R.name,contents:R.state.doc.toString(),...R.hidden?{hidden:!0}:{},...R.readOnly?{readOnly:!0}:{}})),tab:Ot,solverId:P.id,solverConfig:De.save(),minizincVersion:q?"edge":"latest"}}let Et=!1;async function Hr(){t(37,Et=!0);try{const R=(await gm(()=>import("./jszip.min-8713ca20.js").then(si=>si.j),[],import.meta.url)).default,he=(await gm(()=>import("./FileSaver.min-ff83db48.js").then(si=>si.F),[],import.meta.url)).default,re=qt(),ce=Qe.map(si=>si.name),Ue=Qe.filter(si=>!si.hidden).map(si=>si.name);let Be=P.id;Be==="org.minizinc.gecode_presolver"?Be="org.gecode.gecode":Be==="org.minizinc.chuffed"&&(Be="org.chuffed.chuffed");const ot=new R;for(const si of re.files)ot.file(si.name,si.contents);ot.file("Project.mzp",JSON.stringify({version:105,projectFiles:ce,openFiles:Ue,openTab:re.tab,selectedBuiltinConfigId:Be,selectedBuiltinConfigVersion:"default"}));const nn=await ot.generateAsync({type:"blob"});he.saveAs(nn,"Project.zip")}catch(R){console.error(R)}finally{t(37,Et=!1)}}let Oi,Gn=null,Kr=!1;function Jr(R){const he=qt(),re=new URL(R);return re.hash=`#project=${encodeURIComponent(JSON.stringify(he))}`,t(40,Kr=!1),re.toString()}function B(){Oi.select(),Oi.setSelectionRange(0,Gn.length),navigator.clipboard.writeText(Gn),t(40,Kr=!0)}function Oe(){Ae&&window.open(Jr(Ae),"_blank").focus()}let es=null;async function xn(R){const he=R.view;if(!(K!==0||!P||!h||!h.name.endsWith(".mzn")))try{const re=he.state.doc.toString();if(re===es)return;es=re;const ce=new se.Model;for(const ot of Qe)ce.addFile(ot.name,ot.state.doc.toString(),!1);const Ue=ce.addString(re),Be=await ce.check({options:De.getCompilationConfiguration(P.id)});if(he.state.doc.toString()!==re)return;r6(re,Be.filter(ot=>ot.location.filename===Ue),he)}catch(re){console.error(re)}}function ts(R){const he=Qe.findIndex(re=>re.name===R.filename);if(he!==-1){_i(he);const re=Qe[he].state.doc.toString(),ce=Od(R.firstLine,R.firstColumn,re);Xe.focus(),Xe.setCursor(ce)}}function Zs(){xe==="horizontal"?t(2,xe="vertical"):t(2,xe="horizontal")}function il(R){t(0,q=R.detail.item===Ke.edge)}let Xr=!1;function cr(R){h&&t(84,h.state=Xe.getState(),h),Qe.forEach(he=>Yb(he,R?V9:Y9)),Ei(h)}let Wi,tn=!1,Rs=!1;function pa(R){pt&&Gr();const he=[R.modelFile],re=R.modelFile.substring(0,R.modelFile.length-4),ce=Qe.find(Be=>Be.name===`${re}.mzc`||Be.name===`${re}.mzc.mzn`);if(ce&&he.push(ce.name),R.dataFiles)for(const Be of R.dataFiles)he.push(Be);const Ue=new se.Model;for(const Be of Qe)Ue.addFile(Be.name,Be.state.doc.toString(),he.indexOf(Be.name)!==-1);Tt(Ue,he,R.options||De.getSolvingConfiguration(P.id))}function ru(){Ct=uO(this),t(22,Ct)}function ga(){Ct=uO(this),t(22,Ct)}const ma=()=>{t(26,Kt=!Kt),t(35,Yt=!1)},Sa=()=>t(39,Gn=Jr(window.location.href)),su=()=>Hr(),lu=()=>{Lt(),t(26,Kt=!1)},ou=()=>{Xt(),t(26,Kt=!1)},au=()=>{t(0,q=!q),t(26,Kt=!1)},ba=()=>{t(39,Gn=Jr(window.location.href)),t(26,Kt=!1)},$a=()=>{Oe(),t(26,Kt=!1)},Qa=()=>{t(43,Rs=!1)},Hl=()=>{t(43,Rs=!0)};function fu(R){Dt[R?"unshift":"push"](()=>{Wi=R,t(41,Wi)})}const wa=R=>pa(R.detail);function nl(R){N=R,t(1,N)}const ya=()=>t(33,ri=[]),cu=R=>ts(R.detail.location),va=R=>_i(R.detail.index),Pa=R=>Cr(R.detail.src,R.detail.dest),Kl=()=>t(28,bt=!0),uu=R=>t(29,lt=R.detail.index),ka=()=>t(30,tt=!0);function Jl(R){Dt[R?"unshift":"push"](()=>{Xe=R,t(25,Xe)})}function eo(R){Ce=R,t(3,Ce)}function is(R){Dt[R?"unshift":"push"](()=>{De=R,t(27,De)})}const _a=()=>t(35,Yt=!1),Wa=()=>t(30,tt=!1),hu=R=>t(29,lt=R.detail.index),xa=R=>Vt(R.detail.index,R.detail.options),Ca=()=>t(28,bt=!0),Xa=()=>t(28,bt=!1),Ta=R=>Qi(R.detail.type),Ou=R=>hi(R.detail.files),du=()=>qi(lt),pu=()=>t(29,lt=null),Za=()=>t(29,lt=null),gu=R=>dn(R.detail),mu=()=>dn(!1),Su=R=>dn(R.detail),bu=()=>dn(!1),to=()=>t(39,Gn=null);function $u(R){Dt[R?"unshift":"push"](()=>{Oi=R,t(38,Oi)})}const Qu=()=>Oi.select(),wu=()=>t(39,Gn=null);return n.$$set=R=>{"showVersionSwitcher"in R&&t(4,Z=R.showVersionSwitcher),"showSolverDropdown"in R&&t(5,I=R.showSolverDropdown),"edgeMiniZinc"in R&&t(0,q=R.edgeMiniZinc),"autoClearOutput"in R&&t(1,N=R.autoClearOutput),"showTabs"in R&&t(6,z=R.showTabs),"canEditTabs"in R&&t(7,ie=R.canEditTabs),"compilationEnabled"in R&&t(8,ue=R.compilationEnabled),"project"in R&&t(72,$e=R.project),"enabledSolvers"in R&&t(73,Se=R.enabledSolvers),"canEditSolverSettings"in R&&t(9,Te=R.canEditSolverSettings),"showShareButton"in R&&t(10,pe=R.showShareButton),"showDownloadButton"in R&&t(11,fe=R.showDownloadButton),"externalPlaygroundURL"in R&&t(12,Ae=R.externalPlaygroundURL),"splitterDirection"in R&&t(2,xe=R.splitterDirection),"splitterSize"in R&&t(3,Ce=R.splitterSize),"canSwitchOrientation"in R&&t(13,Me=R.canSwitchOrientation),"showClearOutput"in R&&t(14,yt=R.showClearOutput),"showAutoClearOutput"in R&&t(15,ni=R.showAutoClearOutput),"showOutputSectionToggles"in R&&t(16,xt=R.showOutputSectionToggles),"showOutputRightControls"in R&&t(17,It=R.showOutputRightControls),"theme"in R&&t(74,Nt=R.theme),"hideOutputOnStartup"in R&&t(75,ve=R.hideOutputOnStartup),"$$scope"in R&&t(133,X=R.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&524288&&t(52,i=[Ke.latest,Ke.edge]),n.$$.dirty[0]&1&&Fe(),n.$$.dirty[2]&1024&&ht($e),n.$$.dirty[0]&1048576&&(r=Qe.filter(R=>!R.hidden).length),n.$$.dirty[0]&3145728&&t(84,h=OtSe.indexOf(R.id)!==-1):H),n.$$.dirty[0]&20971520&&t(83,P=Ct>=0&&Ct<$.length?$[Ct]:null),n.$$.dirty[2]&4194304&&t(87,O=h&&h.name.endsWith(".mzn")&&!h.name.endsWith(".mzc.mzn")),n.$$.dirty[2]&4194304&&t(86,p=h&&(h.name.endsWith(".dzn")||h.name.endsWith(".json"))),n.$$.dirty[2]&4194304&&t(85,g=h&&h.name.endsWith(".fzn")),n.$$.dirty[0]&262144|n.$$.dirty[2]&60817408&&t(50,l=K===0&&P&&(O||p||g)),n.$$.dirty[0]&262144|n.$$.dirty[2]&52428800&&t(49,o=K===0&&P&&(O||p)),n.$$.dirty[2]&270336&&t(48,f=!ve||en?"all":"a"),n.$$.dirty[2]&524288&&t(47,u=pt!==null),n.$$.dirty[0]&1048576&&t(44,b=Qe.filter(R=>R.name.endsWith(".mzn")&&!R.name.endsWith(".mzc.mzn")).map(R=>R.name)),n.$$.dirty[0]&1048576&&t(46,Q=Qe.filter(R=>R.name.endsWith(".dzn")||R.name.endsWith(".json")).map(R=>R.name)),n.$$.dirty[0]&20971520&&Fr(),n.$$.dirty[2]&2097152&&t(45,x=P?P.stdFlags:[]),n.$$.dirty[2]&4194304&&Ei(h),n.$$.dirty[2]&1052672&&t(23,A={dark:!0,light:!1,auto:Xr}[Nt]),n.$$.dirty[0]&8388608&&cr(A)},[q,N,xe,Ce,Z,I,z,ie,ue,Te,pe,fe,Ae,Me,yt,ni,xt,It,K,Ke,Qe,Ot,Ct,A,$,Xe,Kt,De,bt,lt,tt,dt,vt,ri,Fn,Yt,dn,Et,Oi,Gn,Kr,Wi,tn,Rs,b,x,Q,u,f,o,l,s,i,Xt,_i,Qi,hi,Ts,qi,Vt,Cr,Jt,Lt,Gr,Hr,Jr,B,Oe,ts,Zs,il,pa,$e,Se,Nt,ve,ht,ci,qt,H,en,pt,Xr,P,h,g,p,O,C,ru,ga,ma,Sa,su,lu,ou,au,ba,$a,Qa,Hl,fu,wa,nl,ya,cu,va,Pa,Kl,uu,ka,Jl,eo,is,_a,Wa,hu,xa,Ca,Xa,Ta,Ou,du,pu,Za,gu,mu,Su,bu,to,$u,Qu,wu,X]}class v6 extends Vi{constructor(e){super(),Yi(this,e,y6,w6,Ui,{showVersionSwitcher:4,showSolverDropdown:5,edgeMiniZinc:0,autoClearOutput:1,showTabs:6,canEditTabs:7,compilationEnabled:8,project:72,enabledSolvers:73,canEditSolverSettings:9,showShareButton:10,showDownloadButton:11,externalPlaygroundURL:12,splitterDirection:2,splitterSize:3,canSwitchOrientation:13,showClearOutput:14,showAutoClearOutput:15,showOutputSectionToggles:16,showOutputRightControls:17,theme:74,hideOutputOnStartup:75,loadProject:76,hasFiles:77,getProject:78},null,[-1,-1,-1,-1,-1,-1])}get loadProject(){return this.$$.ctx[76]}get hasFiles(){return this.$$.ctx[77]}get getProject(){return this.$$.ctx[78]}}const{window:Vb}=Wx;function P6(n){let e,t,i,r,s,l,o,f;function u(g){n[6](g)}function h(g){n[7](g)}function O(g){n[8](g)}let p={project:n[1]};return n[2].autoClearOutput!==void 0&&(p.autoClearOutput=n[2].autoClearOutput),n[2].splitterDirection!==void 0&&(p.splitterDirection=n[2].splitterDirection),n[2].splitterSize!==void 0&&(p.splitterSize=n[2].splitterSize),t=new v6({props:p}),n[5](t),Dt.push(()=>Uo(t,"autoClearOutput",u)),Dt.push(()=>Uo(t,"splitterDirection",h)),Dt.push(()=>Uo(t,"splitterSize",O)),{c(){e=_("div"),ze(t.$$.fragment),y(e,"class","playground-app svelte-tuc1wl")},m(g,b){V(g,e,b),qe(t,e,null),l=!0,o||(f=[oe(Vb,"beforeunload",n[4]),oe(Vb,"hashchange",n[3])],o=!0)},p(g,[b]){const Q={};b&2&&(Q.project=g[1]),!i&&b&4&&(i=!0,Q.autoClearOutput=g[2].autoClearOutput,Ao(()=>i=!1)),!r&&b&4&&(r=!0,Q.splitterDirection=g[2].splitterDirection,Ao(()=>r=!1)),!s&&b&4&&(s=!0,Q.splitterSize=g[2].splitterSize,Ao(()=>s=!1)),t.$set(Q)},i(g){l||(D(t.$$.fragment,g),l=!0)},o(g){F(t.$$.fragment,g),l=!1},d(g){g&&Y(e),n[5](null),Ee(t),o=!1,ii(f)}}}const qb=`% Use this editor as a MiniZinc scratch book -`,Eb="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";function k6(n,e,t){let i,r={files:[]},s={autoClearOutput:!1,splitterDirection:"vertical",splitterSize:75,sessions:{}};try{const Q=localStorage.getItem("mznPlayground");Q&&Q.length>0&&(s={...s,...JSON.parse(Q)})}catch(Q){console.error(Q)}let l;function o(){if(Object.keys(s.sessions).length>=5){const x=Object.keys(s.sessions).map(A=>({key:A,value:s.sessions[A]}));x.sort((A,C)=>C.value.timestamp-A.value.timestamp),t(2,s.sessions=x.slice(0,5-1).reduce((A,C)=>({...A,[C.key]:C.value}),{}),s)}const $=()=>Array(6).fill(0).map(()=>Eb[Math.floor(Math.random()*Eb.length)]).join("");let P=$();for(;P in s.sessions;)P=$();return P}function f(Q){return Q.solverId||(Q.solver===0?Q.solverId="org.minizinc.gecode_presolver":r.solver===1&&(Q.solverId="org.minizinc.mip.coin-bc")),Q}function u(){if(l&&i.hasFiles()){const $=i.getProject();t(2,s.sessions[l]=$,s)}if(window.location.hash.startsWith("#project="))try{const $=decodeURIComponent(window.location.hash.substring(9));t(1,r=f(JSON.parse($))),l=o(),window.history.replaceState(void 0,void 0,`#session=${l}`);return}catch($){console.error($)}if(window.location.hash.startsWith("#code="))try{const $=decodeURIComponent(window.location.hash.substring(6));t(1,r={files:[{name:"Playground.mzn",contents:$,anchor:$.length}]}),l=o(),window.history.replaceState(void 0,void 0,`#session=${l}`)}catch($){console.error($)}window.location.hash.startsWith("#session=")||window.history.replaceState(void 0,void 0,`#session=${o()}`);const Q=window.location.hash.substring(9);if(Q!==l&&s.sessions&&s.sessions[Q])try{t(1,r=f(s.sessions[Q])),l=Q}catch($){console.error($)}r.files.length===0&&t(1,r={files:[{name:"Playground.mzn",contents:qb,anchor:qb.length}]}),l=Q}Nc(()=>u());function h(){const Q=i.getProject();t(2,s.sessions[l]={...Q,timestamp:Date.now()},s),localStorage.setItem("mznPlayground",JSON.stringify(s))}function O(Q){Dt[Q?"unshift":"push"](()=>{i=Q,t(0,i)})}function p(Q){n.$$.not_equal(s.autoClearOutput,Q)&&(s.autoClearOutput=Q,t(2,s))}function g(Q){n.$$.not_equal(s.splitterDirection,Q)&&(s.splitterDirection=Q,t(2,s))}function b(Q){n.$$.not_equal(s.splitterSize,Q)&&(s.splitterSize=Q,t(2,s))}return[i,r,s,u,h,O,p,g,b]}class _6 extends Vi{constructor(e){super(),Yi(this,e,k6,P6,Ui,{})}}new _6({target:document.getElementById("app")});export{_o as c,T6 as g}; +`;function VS(n,e,t){const i=n.slice();return i[23]=e[t],i[24]=e,i[25]=t,i}function qS(n){let e,t,i,r,s,l,o,f,u,h,O,p,g,b,Q,$,P,x,A;return $=new Ct({props:{icon:aC}}),{c(){e=_("div"),t=_("div"),t.innerHTML="Solution:",i=B(),r=_("div"),s=_("input"),o=B(),f=_("div"),u=_("input"),O=B(),p=_("div"),g=_("p"),b=_("button"),Q=_("span"),De($.$$.fragment),y(t,"class","solution-label svelte-152bhkz"),y(s,"class","input is-small"),y(s,"type","number"),y(s,"min",l=n[2]>0?1:0),y(s,"max",n[2]),y(u,"type","range"),y(u,"min",h=n[2]>0?1:0),y(u,"max",n[2]),y(u,"class","svelte-152bhkz"),y(f,"class","solution-slider svelte-152bhkz"),y(Q,"class","icon"),y(b,"class","button is-small"),y(b,"title","Follow latest solution"),ae(b,"is-primary",n[0]),ae(b,"is-light",!n[0]),y(g,"class","control"),y(p,"class","field has-addons svelte-152bhkz"),y(e,"class","top svelte-152bhkz")},m(C,X){V(C,e,X),v(e,t),v(e,i),v(e,r),v(r,s),yi(s,n[1]),v(e,o),v(e,f),v(f,u),yi(u,n[1]),v(e,O),v(e,p),v(p,g),v(g,b),v(b,Q),Ve($,Q,null),P=!0,x||(A=[oe(s,"input",n[12]),oe(u,"change",n[13]),oe(u,"input",n[13]),oe(b,"click",n[14])],x=!0)},p(C,X){(!P||X&4&&l!==(l=C[2]>0?1:0))&&y(s,"min",l),(!P||X&4)&&y(s,"max",C[2]),X&2&&zo(s.value)!==C[1]&&yi(s,C[1]),(!P||X&4&&h!==(h=C[2]>0?1:0))&&y(u,"min",h),(!P||X&4)&&y(u,"max",C[2]),X&2&&yi(u,C[1]),(!P||X&1)&&ae(b,"is-primary",C[0]),(!P||X&1)&&ae(b,"is-light",!C[0])},i(C){P||(D($.$$.fragment,C),P=!0)},o(C){F($.$$.fragment,C),P=!1},d(C){C&&Y(e),qe($),x=!1,ti(A)}}}function ES(n){let e,t,i=n[24],r=n[25],s,l;const o=()=>n[15](e,i,r),f=()=>n[15](null,i,r);function u(...h){return n[16](n[23],...h)}return{c(){e=_("iframe"),y(e,"class","vis-window svelte-152bhkz"),um(e.src,t=n[23].url)||y(e,"src",t),y(e,"title","Visualisation")},m(h,O){V(h,e,O),o(),s||(l=oe(e,"load",u),s=!0)},p(h,O){n=h,O&8&&!um(e.src,t=n[23].url)&&y(e,"src",t),(i!==n[24]||r!==n[25])&&(f(),i=n[24],r=n[25],o())},d(h){h&&Y(e),f(),s=!1,l()}}}function b8(n){let e,t,i,r,s,l,o,f=n[2]>0&&qS(n),u=ot(n[3]),h=[];for(let O=0;O0?f?(f.p(O,p),p&4&&D(f,1)):(f=qS(O),f.c(),D(f,1),f.m(e,t)):f&&(nt(),F(f,1,1,()=>{f=null}),rt()),p&8){u=ot(O[3]);let g;for(g=0;g{$e=Ce});Se.then(Ce=>{Ce.contentWindow.postMessage({event:"init",payload:ue},"*")});const Xe=s.reduce((Ce,Ee)=>({...Ce,[Ee.name]:Ee.state.doc.toString()}),{}),de=[],ce=new DOMParser().parseFromString(te,"text/html");for(const Ce of ce.getElementsByTagName("script")){const Ee=Ce.getAttribute("src");if(Ee==="/minizinc-ide.js")Ce.src=$8;else if(Ee in Xe&&Ee.endsWith(".js")){const Pt=URL.createObjectURL(new Blob([Xe[Ee]],{type:"text/javascript; charset=utf-8"}));Ce.src=Pt,de.push(Pt)}}for(const Ce of ce.getElementsByTagName("link")){const Ee=Ce.getAttribute("href");if(Ee in Xe&&Ee.endsWith(".css")){const Pt=URL.createObjectURL(new Blob([Xe[Ee]],{type:"text/css; charset=utf-8"}));Ce.href=Pt,de.push(Pt)}}const Re=new XMLSerializer().serializeToString(ce.doctype)+ce.documentElement.outerHTML,xe=URL.createObjectURL(new Blob([Re],{type:"text/html; charset=utf-8"}));t(3,O=[...O,{key:z,url:xe,extraUrls:de,makeReady:$e,ready:Se,solutions:[],element:null}])}function $(z,te){for(const ue in z){const $e=O.find(Xe=>Xe.key===ue);if(!$e){console.error(`Did not find visualisation for ${ue}`);continue}const Se={time:te,data:z[ue]};$e.solutions.push(Se),Yn({event:"solution",payload:Se},$e)}t(2,h++,h)}function P(z,te){p={status:z,time:te};for(let ue=0;ue$e.element.contentWindow===z.source);switch(te.event){case"rebroadcast":for(const Se of O)Yn(te.message,Se);te.message.event==="goToSolution"&&(l=te.message.payload===-1,t(0,o=te.message.payload===-1),f=te.message.payload+1,t(1,u=te.message.payload+1));break;case"solve":r("solve",{modelFile:te.modelFile,dataFiles:te.dataFiles,options:te.options});break;case"getNumSolutions":Yn({event:"response",id:te.id,payload:ue.solutions.length},ue);break;case"getSolution":const $e=te.index<0?te.index+ue.solutions.length:te.index;if($e<0||$e>=ue.solutions.length)Yn({event:"error",id:te.id,message:"Solution index out of range"},ue);else{Yn({event:"response",id:te.id,payload:ue.solutions[te.index===-1?ue.solutions.length-1:te.index]},ue);break}case"getAllSolutions":Yn({event:"response",id:te.id,payload:ue.solutions},ue);break;case"getStatus":Yn({event:"response",id:te.id,payload:p},ue);break;case"getFinishTime":Yn({event:"response",id:te.id,payload:g},ue);break}}function C(z,te,ue){if(o&&f===u&&(f=h,t(1,u=h)),o!==l){l=o;for(const $e of O)Yn({event:"goToSolution",payload:o?-1:u-1},$e)}if(f!==u){f=u,l=!1,t(0,o=!1);for(const $e of O)Yn({event:"goToSolution",payload:u-1},$e)}}function X(){u=zo(this.value),t(1,u)}function Z(){u=zo(this.value),t(1,u)}const I=()=>t(0,o=!o);function q(z,te,ue){Dt[z?"unshift":"push"](()=>{te[ue].element=z,t(3,O)})}const L=(z,te)=>z.makeReady(te.target);return n.$$set=z=>{"files"in z&&t(6,s=z.files)},n.$$.update=()=>{n.$$.dirty&8&&t(4,i=Math.ceil(Math.sqrt(O.length))),n.$$.dirty&7&&C()},[o,u,h,O,i,A,s,b,Q,$,P,x,X,Z,I,q,L]}class w8 extends Ui{constructor(e){super(),Ai(this,e,Q8,b8,Ri,{files:6,reset:7,addVisualisation:8,addSolution:9,status:10,finish:11})}get reset(){return this.$$.ctx[7]}get addVisualisation(){return this.$$.ctx[8]}get addSolution(){return this.$$.ctx[9]}get status(){return this.$$.ctx[10]}get finish(){return this.$$.ctx[11]}}function y8(n){let e,t,i,r,s,l,o,f,u,h,O,p,g,b,Q,$,P,x,A,C,X,Z,I,q,L,z,te,ue,$e,Se,Xe,de;return{c(){e=_("aside"),t=_("p"),t.textContent="Model",i=B(),r=_("ul"),s=_("li"),l=_("button"),l.textContent="Model file (.mzn)",o=B(),f=_("li"),u=_("button"),u.textContent="Solution checker model (.mzc.mzn)",h=B(),O=_("p"),O.textContent="Data",p=B(),g=_("ul"),b=_("li"),Q=_("button"),Q.textContent="Data file (.dzn)",$=B(),P=_("li"),x=_("button"),x.textContent="JSON data file (.json)",A=B(),C=_("p"),C.textContent="Visualisation",X=B(),Z=_("ul"),I=_("li"),q=_("button"),q.textContent="Custom visualisation (.html)",L=B(),z=_("p"),z.textContent="Import",te=B(),ue=_("ul"),$e=_("li"),Se=_("button"),Se.textContent="Upload file(s)",y(t,"class","menu-label"),y(l,"type","button"),y(l,"class","button is-text svelte-1kj2hj8"),y(u,"type","button"),y(u,"class","button is-text svelte-1kj2hj8"),y(r,"class","menu-list svelte-1kj2hj8"),y(O,"class","menu-label"),y(Q,"type","button"),y(Q,"class","button is-text svelte-1kj2hj8"),y(x,"type","button"),y(x,"class","button is-text svelte-1kj2hj8"),y(g,"class","menu-list svelte-1kj2hj8"),y(C,"class","menu-label"),y(q,"type","button"),y(q,"class","button is-text svelte-1kj2hj8"),y(Z,"class","menu-list svelte-1kj2hj8"),y(z,"class","menu-label"),y(Se,"type","button"),y(Se,"class","button is-text svelte-1kj2hj8"),y(ue,"class","menu-list svelte-1kj2hj8"),y(e,"class","menu")},m(ce,Re){V(ce,e,Re),v(e,t),v(e,i),v(e,r),v(r,s),v(s,l),n[7](l),v(r,o),v(r,f),v(f,u),v(e,h),v(e,O),v(e,p),v(e,g),v(g,b),v(b,Q),v(g,$),v(g,P),v(P,x),v(e,A),v(e,C),v(e,X),v(e,Z),v(Z,I),v(I,q),v(e,L),v(e,z),v(e,te),v(e,ue),v(ue,$e),v($e,Se),Xe||(de=[oe(l,"click",n[8]),oe(u,"click",n[9]),oe(Q,"click",n[10]),oe(x,"click",n[11]),oe(q,"click",n[12]),oe(Se,"click",n[13])],Xe=!0)},p:We,d(ce){ce&&Y(e),n[7](null),Xe=!1,ti(de)}}}function v8(n){let e,t,i,r,s,l;return e=new ql({props:{active:n[0],title:"Create new file",$$slots:{default:[y8]},$$scope:{ctx:n}}}),e.$on("activate",n[5]),e.$on("cancel",n[14]),{c(){De(e.$$.fragment),t=B(),i=_("input"),y(i,"class","is-hidden svelte-1kj2hj8"),y(i,"type","file"),i.multiple=!0,y(i,"accept",".mzn,.mzc,.dzn,.json,.html")},m(o,f){Ve(e,o,f),V(o,t,f),V(o,i,f),n[15](i),r=!0,s||(l=[oe(i,"change",n[16]),oe(i,"change",n[6])],s=!0)},p(o,[f]){const u={};f&1&&(u.active=o[0]),f&131082&&(u.$$scope={dirty:f,ctx:o}),e.$set(u)},i(o){r||(D(e.$$.fragment,o),r=!0)},o(o){F(e.$$.fragment,o),r=!1},d(o){o&&(Y(t),Y(i)),qe(e,o),n[15](null),s=!1,ti(l)}}}function P8(n,e,t){let{active:i=!1}=e;const r=Ln();let s,l,o;async function f(){await rr(),o&&o.focus()}async function u(){const C=[];for(const Z of l)C.push(new Promise((I,q)=>{const L=new FileReader;L.onload=()=>{I({name:Z.name,contents:L.result})},L.onerror=z=>q(z),L.readAsText(Z)}));const X=await Promise.all(C);r("open",{files:X})}function h(C){Dt[C?"unshift":"push"](()=>{o=C,t(3,o)})}const O=()=>r("new",{type:".mzn"}),p=()=>r("new",{type:".mzc.mzn"}),g=()=>r("new",{type:".dzn"}),b=()=>r("new",{type:".json"}),Q=()=>r("new",{type:".html"}),$=()=>s.click(),P=()=>r("cancel");function x(C){Dt[C?"unshift":"push"](()=>{s=C,t(1,s)})}function A(){l=this.files,t(2,l)}return n.$$set=C=>{"active"in C&&t(0,i=C.active)},[i,s,l,o,r,f,u,h,O,p,g,b,Q,$,P,x,A]}class k8 extends Ui{constructor(e){super(),Ai(this,e,P8,v8,Ri,{active:0})}}function MS(n,e,t){const i=n.slice();return i[14]=e[t],i}function DS(n,e,t){const i=n.slice();return i[17]=e[t].file,i[18]=e[t].index,i}function _8(n){let e,t,i,r,s,l,o;i=new Ct({props:{icon:n[17].readOnly?JO:x1}});function f(){return n[11](n[18],n[17])}return{c(){e=_("button"),t=_("span"),De(i.$$.fragment),y(t,"class","icon"),y(e,"class","button is-small"),y(e,"title",r="Click to "+(n[17].readOnly?"unlock":"lock")+" this file for editing"),y(e,"type","button"),ae(e,"is-primary",!n[17].readOnly),ae(e,"is-light",n[17].readOnly)},m(u,h){V(u,e,h),v(e,t),Ve(i,t,null),s=!0,l||(o=oe(e,"click",f),l=!0)},p(u,h){n=u;const O={};h&2&&(O.icon=n[17].readOnly?JO:x1),i.$set(O),(!s||h&2&&r!==(r="Click to "+(n[17].readOnly?"unlock":"lock")+" this file for editing"))&&y(e,"title",r),(!s||h&2)&&ae(e,"is-primary",!n[17].readOnly),(!s||h&2)&&ae(e,"is-light",n[17].readOnly)},i(u){s||(D(i.$$.fragment,u),s=!0)},o(u){F(i.$$.fragment,u),s=!1},d(u){u&&Y(e),qe(i),l=!1,o()}}}function W8(n){let e,t,i,r;return i=new Ct({props:{icon:JO}}),{c(){e=_("button"),t=_("span"),De(i.$$.fragment),y(t,"class","icon"),y(e,"class","button is-small is-light"),y(e,"title","Compiled checkers are read only"),y(e,"type","button"),e.disabled=!0},m(s,l){V(s,e,l),v(e,t),Ve(i,t,null),r=!0},p:We,i(s){r||(D(i.$$.fragment,s),r=!0)},o(s){F(i.$$.fragment,s),r=!1},d(s){s&&Y(e),qe(i)}}}function zS(n){let e,t,i=n[17].name+"",r,s,l,o,f,u,h,O,p,g,b,Q,$,P,x,A,C,X,Z,I,q,L,z;p=new Ct({props:{icon:n[17].hidden?W1:C1}});function te(){return n[10](n[18],n[17])}const ue=[W8,_8],$e=[];function Se(de,ce){return ce&2&&($=null),$==null&&($=!!de[17].name.endsWith(".mzc")),$?0:1}P=Se(n,-1),x=$e[P]=ue[P](n),I=new Ct({props:{icon:xQ}});function Xe(){return n[12](n[18])}return{c(){e=_("tr"),t=_("td"),r=be(i),s=B(),l=_("td"),o=_("div"),f=_("div"),u=_("p"),h=_("button"),O=_("span"),De(p.$$.fragment),b=B(),Q=_("p"),x.c(),A=B(),C=_("p"),X=_("button"),Z=_("span"),De(I.$$.fragment),y(O,"class","icon"),y(h,"class","button is-small"),y(h,"title",g="Click to "+(n[17].hidden?"show":"hide")+" this file"),y(h,"type","button"),ae(h,"is-primary",!n[17].hidden),ae(h,"is-light",n[17].hidden),y(u,"class","control"),y(Q,"class","control"),y(Z,"class","icon"),y(X,"class","button is-small is-danger"),y(X,"title","Delete this file"),y(X,"type","button"),y(C,"class","control"),y(f,"class","field is-grouped"),y(o,"class","tool-buttons svelte-1bgv9sn")},m(de,ce){V(de,e,ce),v(e,t),v(t,r),v(e,s),v(e,l),v(l,o),v(o,f),v(f,u),v(u,h),v(h,O),Ve(p,O,null),v(f,b),v(f,Q),$e[P].m(Q,null),v(f,A),v(f,C),v(C,X),v(X,Z),Ve(I,Z,null),q=!0,L||(z=[oe(h,"click",te),oe(X,"click",Xe)],L=!0)},p(de,ce){n=de,(!q||ce&2)&&i!==(i=n[17].name+"")&&Je(r,i);const Re={};ce&2&&(Re.icon=n[17].hidden?W1:C1),p.$set(Re),(!q||ce&2&&g!==(g="Click to "+(n[17].hidden?"show":"hide")+" this file"))&&y(h,"title",g),(!q||ce&2)&&ae(h,"is-primary",!n[17].hidden),(!q||ce&2)&&ae(h,"is-light",n[17].hidden);let xe=P;P=Se(n,ce),P===xe?$e[P].p(n,ce):(nt(),F($e[xe],1,1,()=>{$e[xe]=null}),rt(),x=$e[P],x?x.p(n,ce):(x=$e[P]=ue[P](n),x.c()),D(x,1),x.m(Q,null))},i(de){q||(D(p.$$.fragment,de),D(x),D(I.$$.fragment,de),q=!0)},o(de){F(p.$$.fragment,de),F(x),F(I.$$.fragment,de),q=!1},d(de){de&&Y(e),qe(p),$e[P].d(),qe(I),L=!1,ti(z)}}}function IS(n){let e,t=n[14].label+"",i,r,s,l,o=ot(n[14].files),f=[];for(let h=0;hF(f[h],1,1,()=>{f[h]=null});return{c(){e=_("p"),i=be(t),r=B(),s=_("table");for(let h=0;hF(p[b],1,1,()=>{p[b]=null});return s=new Ct({props:{icon:XQ}}),{c(){for(let b=0;bAccept',y(e,"slot","footer")},m(t,i){V(t,e,i)},p:We,d(t){t&&Y(e)}}}function X8(n){let e,t;return e=new ql({props:{active:n[0],title:"Manage files",$$slots:{footer:[C8],default:[x8]},$$scope:{ctx:n}}}),e.$on("submit",n[3]),e.$on("cancel",n[3]),{c(){De(e.$$.fragment)},m(i,r){Ve(e,i,r),t=!0},p(i,[r]){const s={};r&1&&(s.active=i[0]),r&2097154&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){t||(D(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){qe(e,i)}}}function T8(n,e,t){let i,r,s,l,o,f,{active:u=!1}=e,{files:h=[]}=e;const O=Ln();function p(){O("close")}const g=(P,x)=>O("modifyFile",{index:P,options:{hidden:!x.hidden}}),b=(P,x)=>O("modifyFile",{index:P,options:{readOnly:!x.readOnly}}),Q=P=>O("delete",{index:P}),$=()=>O("newFile");return n.$$set=P=>{"active"in P&&t(0,u=P.active),"files"in P&&t(4,h=P.files)},n.$$.update=()=>{n.$$.dirty&16&&t(9,i=h.map((P,x)=>({file:P,index:x}))),n.$$.dirty&512&&t(8,r=i.filter(P=>P.file.name.endsWith(".mzn")&&!P.file.name.endsWith(".mzc.mzn")).sort((P,x)=>P.file.name.localeCompare(x.file.name))),n.$$.dirty&512&&t(7,s=i.filter(P=>P.file.name.endsWith(".dzn")||P.file.name.endsWith(".json")).sort((P,x)=>P.file.name.localeCompare(x.file.name))),n.$$.dirty&512&&t(6,l=i.filter(P=>P.file.name.endsWith(".mzc")||P.file.name.endsWith(".mzc.mzn")).sort((P,x)=>P.file.name.localeCompare(x.file.name))),n.$$.dirty&512&&t(5,o=i.filter(P=>!P.file.name.endsWith(".mzn")&&!P.file.name.endsWith(".mzc")&&!P.file.name.endsWith(".dzn")&&!P.file.name.endsWith(".json")).sort((P,x)=>P.file.name.localeCompare(x.file.name))),n.$$.dirty&480&&t(1,f=[{label:"Model files",files:r},{label:"Data files",files:s},{label:"Solution checkers",files:l},{label:"Other files",files:o}].filter(P=>P.files.length>0))},[u,f,O,p,h,o,l,s,r,i,g,b,Q,$]}class Z8 extends Ui{constructor(e){super(),Ai(this,e,T8,X8,Ri,{active:0,files:4})}}function NS(n,e,t){const i=n.slice();return i[9]=e[t],i}function LS(n){let e,t=n[9]+"",i,r;return{c(){e=_("option"),i=be(t),e.__value=r=n[9],yi(e,e.__value),y(e,"class","svelte-1x5266v")},m(s,l){V(s,e,l),v(e,i)},p(s,l){l&1&&t!==(t=s[9]+"")&&Je(i,t),l&1&&r!==(r=s[9])&&(e.__value=r,yi(e,e.__value))},d(s){s&&Y(e)}}}function R8(n){let e,t,i,r,s,l=ot(n[0]),o=[];for(let f=0;fn[6].call(t)),y(e,"class","select is-fullwidth is-multiple svelte-1x5266v")},m(f,u){V(f,e,u),v(e,t);for(let h=0;h0&&t(2,l=p[0])}function f(){i("accept",{modelFile:l})}const u=()=>i("cancel");function h(){l=OO(this),t(2,l),t(0,r)}const O=()=>i("cancel");return n.$$set=p=>{"modelFiles"in p&&t(0,r=p.modelFiles),"active"in p&&t(1,s=p.active)},n.$$.update=()=>{n.$$.dirty&1&&o(r)},[r,s,l,i,f,u,h,O]}class V8 extends Ui{constructor(e){super(),Ai(this,e,Y8,U8,Ri,{modelFiles:0,active:1})}}function BS(n,e,t){const i=n.slice();return i[25]=e[t],i[26]=e,i[27]=t,i}function jS(n,e,t){const i=n.slice();return i[22]=e[t],i}function FS(n){let e,t,i,r,s,l,o,f,u;return{c(){e=_("div"),t=_("ul"),i=_("li"),r=_("a"),r.textContent="Enter parameters",s=B(),l=_("li"),o=_("a"),o.textContent="Select data file",ae(i,"is-active",!n[2]),ae(l,"is-active",n[2]),y(e,"class","tabs")},m(h,O){V(h,e,O),v(e,t),v(t,i),v(i,r),v(t,s),v(t,l),v(l,o),f||(u=[oe(r,"click",n[13]),oe(o,"click",n[14])],f=!0)},p(h,O){O&4&&ae(i,"is-active",!h[2]),O&4&&ae(l,"is-active",h[2])},d(h){h&&Y(e),f=!1,ti(u)}}}function q8(n){let e,t=ot(n[5]),i=[];for(let r=0;rn[16].call(t)),y(e,"class","select is-fullwidth is-multiple")},m(f,u){V(f,e,u),v(e,t);for(let h=0;hL[z]===void 0?{name:z,value:""}:{name:z,value:L[z]}))}function Q(){r?s("accept",{dataFiles:h}):s("accept",{parameters:O.reduce((L,z)=>({...L,[z.name]:z.value}),{})})}const $=()=>s("cancel"),P=()=>t(2,u=!1),x=()=>t(2,u=!0);function A(L){Dt[L?"unshift":"push"](()=>{p=L,t(6,p)})}function C(){h=Tx(this),t(4,h),t(1,f)}function X(L){Dt[L?"unshift":"push"](()=>{p=L,t(6,p)})}function Z(L,z){L[z].value=this.value,t(5,O)}function I(L,z){L[z].value=this.value,t(5,O)}const q=()=>s("cancel");return n.$$set=L=>{"active"in L&&t(0,l=L.active),"parameters"in L&&t(11,o=L.parameters),"dataFiles"in L&&t(1,f=L.dataFiles)},n.$$.update=()=>{n.$$.dirty&2048&&b(o),n.$$.dirty&2&&t(3,i=f.length>0),n.$$.dirty&12&&t(7,r=i&&u)},[l,f,u,i,h,O,p,r,s,g,Q,o,$,P,x,A,C,X,Z,I,q]}class B8 extends Ui{constructor(e){super(),Ai(this,e,L8,N8,Ri,{active:0,parameters:11,dataFiles:1})}}function KS(n){let e,t,i,r,s,l,o,f,u,h,O,p,g,b,Q,$,P,x,A=qn(n[1],"-a"),C,X=qn(n[1],"-f"),Z,I,q,L,z,te,ue,$e,Se,Xe=qn(n[1],"-v"),de,ce,Re,xe,Ce,Ee,Pt,ii=qn(n[1],"-s"),Tt,It,Nt,ve,ie,G,le,fe,ze,Ne,st,pt,ni,gt,wt,ge;r=new Ct({props:{icon:TQ}});let mt=A&&JS(n),Me=X&&eb(n),ht=Xe&&tb(n),ft=ii&&ib(n);return{c(){e=_("div"),t=_("button"),i=_("span"),De(r.$$.fragment),s=B(),l=_("h5"),l.textContent="Solving options",o=B(),f=_("form"),u=_("div"),h=_("p"),O=_("input"),p=B(),g=_("label"),g.textContent="Time limit (s)",b=B(),Q=_("p"),$=_("input"),x=B(),mt&&mt.c(),C=B(),Me&&Me.c(),Z=B(),I=_("h5"),I.textContent="Output options",q=B(),L=_("div"),z=_("p"),te=_("input"),ue=B(),$e=_("label"),$e.textContent="Verbose compilation",Se=B(),ht&&ht.c(),de=B(),ce=_("div"),Re=_("p"),xe=_("input"),Ce=B(),Ee=_("label"),Ee.textContent="Compilation statistics",Pt=B(),ft&&ft.c(),Tt=B(),It=_("div"),Nt=_("p"),ve=_("input"),ie=B(),G=_("label"),G.textContent="Timing information",le=B(),fe=_("div"),ze=_("p"),ze.innerHTML='',Ne=B(),st=_("p"),pt=_("button"),pt.textContent="Reset to defaults",y(i,"class","icon"),y(t,"class","button is-text is-small exit-button svelte-1uq9463"),y(l,"class","title is-5"),y(O,"id","enable-timelimit"),y(O,"type","checkbox"),y(O,"class","svelte-1uq9463"),y(g,"for","enable-timelimit"),y(g,"class","svelte-1uq9463"),y(h,"class","control checkbox-control svelte-1uq9463"),y($,"class","input is-fullwidth"),y($,"type","number"),y($,"step","1"),y($,"min",0),$.disabled=P=!n[3],y(Q,"class","control is-expanded"),y(u,"class","field is-grouped"),y(I,"class","title is-5"),y(te,"id","enable-verbose-compile"),y(te,"type","checkbox"),y(te,"class","svelte-1uq9463"),y($e,"for","enable-verbose-compile"),y($e,"class","svelte-1uq9463"),y(z,"class","control checkbox-control svelte-1uq9463"),y(L,"class","field"),y(xe,"id","enable-compilation-satistics"),y(xe,"type","checkbox"),y(xe,"class","svelte-1uq9463"),y(Ee,"for","enable-compilation-satistics"),y(Ee,"class","svelte-1uq9463"),y(Re,"class","control checkbox-control svelte-1uq9463"),y(ce,"class","field"),y(ve,"id","enable-timing-information"),y(ve,"type","checkbox"),y(ve,"class","svelte-1uq9463"),y(G,"for","enable-timing-information"),y(G,"class","svelte-1uq9463"),y(Nt,"class","control checkbox-control svelte-1uq9463"),y(It,"class","field"),y(ze,"class","control"),y(pt,"type","button"),y(pt,"class","button is-danger"),y(st,"class","control"),y(fe,"class","field is-grouped bottom-buttons svelte-1uq9463"),y(e,"class","config-window svelte-1uq9463")},m(Be,Ot){V(Be,e,Ot),v(e,t),v(t,i),Ve(r,i,null),v(e,s),v(e,l),v(e,o),v(e,f),v(f,u),v(u,h),v(h,O),O.checked=n[3],v(h,p),v(h,g),v(u,b),v(u,Q),v(Q,$),yi($,n[2]),v(f,x),mt&&mt.m(f,null),v(f,C),Me&&Me.m(f,null),v(f,Z),v(f,I),v(f,q),v(f,L),v(L,z),v(z,te),te.checked=n[5],v(z,ue),v(z,$e),v(f,Se),ht&&ht.m(f,null),v(f,de),v(f,ce),v(ce,Re),v(Re,xe),xe.checked=n[7],v(Re,Ce),v(Re,Ee),v(f,Pt),ft&&ft.m(f,null),v(f,Tt),v(f,It),v(It,Nt),v(Nt,ve),ve.checked=n[9],v(Nt,ie),v(Nt,G),v(f,le),v(f,fe),v(fe,ze),v(fe,Ne),v(fe,st),v(st,pt),gt=!0,wt||(ge=[oe(t,"click",n[17]),oe(O,"change",n[18]),oe($,"input",n[19]),oe(te,"change",n[22]),oe(xe,"change",n[24]),oe(ve,"change",n[26]),oe(pt,"click",n[12]),oe(f,"submit",Fb(n[27]))],wt=!0)},p(Be,Ot){Ot&8&&(O.checked=Be[3]),(!gt||Ot&8&&P!==(P=!Be[3]))&&($.disabled=P),Ot&4&&zo($.value)!==Be[2]&&yi($,Be[2]),Ot&2&&(A=qn(Be[1],"-a")),A?mt?mt.p(Be,Ot):(mt=JS(Be),mt.c(),mt.m(f,C)):mt&&(mt.d(1),mt=null),Ot&2&&(X=qn(Be[1],"-f")),X?Me?Me.p(Be,Ot):(Me=eb(Be),Me.c(),Me.m(f,Z)):Me&&(Me.d(1),Me=null),Ot&32&&(te.checked=Be[5]),Ot&2&&(Xe=qn(Be[1],"-v")),Xe?ht?ht.p(Be,Ot):(ht=tb(Be),ht.c(),ht.m(f,de)):ht&&(ht.d(1),ht=null),Ot&128&&(xe.checked=Be[7]),Ot&2&&(ii=qn(Be[1],"-s")),ii?ft?ft.p(Be,Ot):(ft=ib(Be),ft.c(),ft.m(f,Tt)):ft&&(ft.d(1),ft=null),Ot&512&&(ve.checked=Be[9])},i(Be){gt||(D(r.$$.fragment,Be),Be&&lr(()=>{gt&&(ni||(ni=yl(e,Sc,{x:100,duration:200},!0)),ni.run(1))}),gt=!0)},o(Be){F(r.$$.fragment,Be),Be&&(ni||(ni=yl(e,Sc,{x:100,duration:200},!1)),ni.run(0)),gt=!1},d(Be){Be&&Y(e),qe(r),mt&&mt.d(),Me&&Me.d(),ht&&ht.d(),ft&&ft.d(),Be&&ni&&ni.end(),wt=!1,ti(ge)}}}function JS(n){let e,t,i,r,s,l,o;return{c(){e=_("div"),t=_("p"),i=_("input"),r=B(),s=_("label"),s.textContent="All solutions (for satisfication problems)",y(i,"id","enable-all-solutions"),y(i,"type","checkbox"),y(i,"class","svelte-1uq9463"),y(s,"for","enable-all-solutions"),y(s,"class","svelte-1uq9463"),y(t,"class","control checkbox-control svelte-1uq9463"),y(e,"class","field")},m(f,u){V(f,e,u),v(e,t),v(t,i),i.checked=n[4],v(t,r),v(t,s),l||(o=oe(i,"change",n[20]),l=!0)},p(f,u){u&16&&(i.checked=f[4])},d(f){f&&Y(e),l=!1,o()}}}function eb(n){let e,t,i,r,s,l,o;return{c(){e=_("div"),t=_("p"),i=_("input"),r=B(),s=_("label"),s.textContent="Free search",y(i,"id","enable-free-search"),y(i,"type","checkbox"),y(i,"class","svelte-1uq9463"),y(s,"for","enable-free-search"),y(s,"class","svelte-1uq9463"),y(t,"class","control checkbox-control svelte-1uq9463"),y(e,"class","field")},m(f,u){V(f,e,u),v(e,t),v(t,i),i.checked=n[10],v(t,r),v(t,s),l||(o=oe(i,"change",n[21]),l=!0)},p(f,u){u&1024&&(i.checked=f[10])},d(f){f&&Y(e),l=!1,o()}}}function tb(n){let e,t,i,r,s,l,o;return{c(){e=_("div"),t=_("p"),i=_("input"),r=B(),s=_("label"),s.textContent="Verbose solving",y(i,"id","enable-verbose-solve"),y(i,"type","checkbox"),y(i,"class","svelte-1uq9463"),y(s,"for","enable-verbose-solve"),y(s,"class","svelte-1uq9463"),y(t,"class","control checkbox-control svelte-1uq9463"),y(e,"class","field")},m(f,u){V(f,e,u),v(e,t),v(t,i),i.checked=n[6],v(t,r),v(t,s),l||(o=oe(i,"change",n[23]),l=!0)},p(f,u){u&64&&(i.checked=f[6])},d(f){f&&Y(e),l=!1,o()}}}function ib(n){let e,t,i,r,s,l,o;return{c(){e=_("div"),t=_("p"),i=_("input"),r=B(),s=_("label"),s.textContent="Solving statistics",y(i,"id","enable-solving-satistics"),y(i,"type","checkbox"),y(i,"class","svelte-1uq9463"),y(s,"for","enable-solving-satistics"),y(s,"class","svelte-1uq9463"),y(t,"class","control checkbox-control svelte-1uq9463"),y(e,"class","field")},m(f,u){V(f,e,u),v(e,t),v(t,i),i.checked=n[8],v(t,r),v(t,s),l||(o=oe(i,"change",n[25]),l=!0)},p(f,u){u&256&&(i.checked=f[8])},d(f){f&&Y(e),l=!1,o()}}}function j8(n){let e,t,i=n[0]&&KS(n);return{c(){i&&i.c(),e=fi()},m(r,s){i&&i.m(r,s),V(r,e,s),t=!0},p(r,[s]){r[0]?i?(i.p(r,s),s&1&&D(i,1)):(i=KS(r),i.c(),D(i,1),i.m(e.parentNode,e)):i&&(nt(),F(i,1,1,()=>{i=null}),rt())},i(r){t||(D(i),t=!0)},o(r){F(i),t=!1},d(r){r&&Y(e),i&&i.d(r)}}}function qn(n,e){return n.indexOf(e)!==-1}function F8(n,e,t){const i=Ln();let{active:r}=e,{stdFlags:s=[]}=e,l=!1,o=1,f=!1,u=!1,h=!1,O=!1,p=!1,g=!1,b=!1;function Q(de){const ce=de*1e3;ce!==Math.floor(ce)&&t(2,o=Math.floor(ce)/1e3)}function $(){t(3,l=!1),t(2,o=1),t(4,f=!1),t(5,u=!1),t(6,h=!1),t(7,O=!1),t(8,p=!1),t(9,g=!1),t(10,b=!1)}function P(de){t(3,l=de.enableTimeLimit),t(2,o=de.timeLimit),t(4,f=de.allSolutions),t(5,u=de.verboseCompilation),t(6,h=de.verboseSolving),t(7,O=de.compilerStatistics),t(8,p=de.solvingStatistics),t(9,g=de.outputTime),t(10,b=de.freeSearch)}function x(){return{enableTimeLimit:l,timeLimit:o,allSolutions:f,verboseCompilation:u,verboseSolving:h,compilerStatistics:O,solvingStatistics:p,outputTime:g,freeSearch:b}}function A(de){const ce={solver:de};return l&&o>0&&(ce["time-limit"]=o*1e3),f&&qn(s,"-a")&&(ce["all-satisfaction"]=!0),u&&(ce["verbose-compilation"]=!0),h&&qn(s,"-v")&&(ce["verbose-solving"]=!0),O&&(ce["compiler-statistics"]=!0),p&&qn(s,"-s")&&(ce["solver-statistics"]=!0),g&&(ce["output-time"]=!0),b&&qn(s,"-f")&&(ce["free-search"]=!0),ce}function C(de){const ce={solver:de};return u&&(ce["verbose-compilation"]=!0),O&&(ce["compiler-statistics"]=!0),ce}const X=()=>i("close");function Z(){l=this.checked,t(3,l)}function I(){o=zo(this.value),t(2,o)}function q(){f=this.checked,t(4,f)}function L(){b=this.checked,t(10,b)}function z(){u=this.checked,t(5,u)}function te(){h=this.checked,t(6,h)}function ue(){O=this.checked,t(7,O)}function $e(){p=this.checked,t(8,p)}function Se(){g=this.checked,t(9,g)}const Xe=()=>i("close");return n.$$set=de=>{"active"in de&&t(0,r=de.active),"stdFlags"in de&&t(1,s=de.stdFlags)},n.$$.update=()=>{n.$$.dirty&4&&Q(o)},[r,s,o,l,f,u,h,O,p,g,b,i,$,P,x,A,C,X,Z,I,q,L,z,te,ue,$e,Se,Xe]}class G8 extends Ui{constructor(e){super(),Ai(this,e,F8,j8,Ri,{active:0,stdFlags:1,load:13,save:14,getSolvingConfiguration:15,getCompilationConfiguration:16})}get load(){return this.$$.ctx[13]}get save(){return this.$$.ctx[14]}get getSolvingConfiguration(){return this.$$.ctx[15]}get getCompilationConfiguration(){return this.$$.ctx[16]}}function nb(n,e,t){const i=n.slice();return i[13]=e[t],i}const H8=n=>({item:n&2}),rb=n=>({item:n[13]}),K8=n=>({item:n&4}),sb=n=>({item:n[2]});function lb(n){let e;const t=n[8].selected,i=ln(t,n,n[7],sb),r=i||J8(n);return{c(){r&&r.c()},m(s,l){r&&r.m(s,l),e=!0},p(s,l){i?i.p&&(!e||l&132)&&an(i,t,s,s[7],e?on(t,s[7],l,K8):fn(s[7]),sb):r&&r.p&&(!e||l&4)&&r.p(s,e?l:-1)},i(s){e||(D(r,s),e=!0)},o(s){F(r,s),e=!1},d(s){r&&r.d(s)}}}function J8(n){let e=n[2].label+"",t;return{c(){t=be(e)},m(i,r){V(i,t,r)},p(i,r){r&4&&e!==(e=i[2].label+"")&&Je(t,e)},d(i){i&&Y(t)}}}function e6(n){let e=n[13].label+"",t;return{c(){t=be(e)},m(i,r){V(i,t,r)},p(i,r){r&2&&e!==(e=i[13].label+"")&&Je(t,e)},d(i){i&&Y(t)}}}function ob(n){let e,t,i,r,s;const l=n[8].item,o=ln(l,n,n[7],rb),f=o||e6(n);function u(){return n[10](n[13])}return{c(){e=_("a"),f&&f.c(),t=B(),y(e,"href","javascript:void(0);"),y(e,"class","dropdown-item"),ae(e,"is-active",n[2]===n[13])},m(h,O){V(h,e,O),f&&f.m(e,null),v(e,t),i=!0,r||(s=oe(e,"click",u),r=!0)},p(h,O){n=h,o?o.p&&(!i||O&130)&&an(o,l,n,n[7],i?on(l,n[7],O,H8):fn(n[7]),rb):f&&f.p&&(!i||O&2)&&f.p(n,i?O:-1),(!i||O&6)&&ae(e,"is-active",n[2]===n[13])},i(h){i||(D(f,h),i=!0)},o(h){F(f,h),i=!1},d(h){h&&Y(e),f&&f.d(h),r=!1,s()}}}function t6(n){let e,t,i,r,s,l,o,f,u,h,O,p,g,b,Q=n[2]&&lb(n);f=new Ct({props:{icon:OC}});let $=ot(n[1]),P=[];for(let A=0;A<$.length;A+=1)P[A]=ob(nb(n,$,A));const x=A=>F(P[A],1,1,()=>{P[A]=null});return{c(){e=B(),t=_("div"),i=_("div"),r=_("button"),s=_("span"),Q&&Q.c(),l=B(),o=_("span"),De(f.$$.fragment),u=B(),h=_("div"),O=_("div");for(let A=0;A{Q=null}),rt()),(!p||C&8)&&(r.disabled=A[3]),C&166){$=ot(A[1]);let X;for(X=0;X<$.length;X+=1){const Z=nb(A,$,X);P[X]?(P[X].p(Z,C),D(P[X],1)):(P[X]=ob(Z),P[X].c(),D(P[X],1),P[X].m(O,null))}for(nt(),X=$.length;Xt(0,f=!f),b=$=>O($);function Q($){Dt[$?"unshift":"push"](()=>{h=$,t(4,h)})}return n.$$set=$=>{"items"in $&&t(1,l=$.items),"currentItem"in $&&t(2,o=$.currentItem),"active"in $&&t(0,f=$.active),"disabled"in $&&t(3,u=$.disabled),"$$scope"in $&&t(7,r=$.$$scope)},[f,l,o,u,h,O,p,r,i,g,b,Q]}class n6 extends Ui{constructor(e){super(),Ai(this,e,i6,t6,Ri,{items:1,currentItem:2,active:0,disabled:3})}}const zy=Ie.define({map:(n,e)=>({from:e.mapPos(n.from),to:e.mapPos(n.to),msg:n.msg,type:n.type})}),Iy=Ie.define(),ab=Qi.define({create(){return Ze.none},update(n,e){n=n.map(e.changes);for(const t of e.effects)t.is(Iy)&&(n=Ze.none),t.is(zy)&&(n=n.update({add:[Ze.mark({class:`cm-mzn-underline-${t.value.type}`,attributes:{title:t.value.msg}}).range(t.value.from,t.value.to)]}));return n},provide:n=>me.decorations.from(n)});function pd(n,e,t){let i,r=1,s=1;for(i=0;i=n&&s>=e)return i;s++,t[i]===` +`&&(r++,s=1)}return i}function r6(n,e,t){const i=e.map(r=>zy.of({from:pd(r.location.firstLine,r.location.firstColumn,n),to:pd(r.location.lastLine,r.location.lastColumn,n)+1,msg:`${r.type==="error"?"Error":"Warning"}: ${r.what}: ${r.message}`,type:r.type}));t.state.field(ab,!1)||i.push(Ie.appendConfig.of([ab])),t.dispatch({effects:[Iy.of(null),...i]})}const s6=n=>({}),fb=n=>({}),l6=n=>({}),cb=n=>({}),o6=n=>({}),ub=n=>({}),a6=n=>({}),hb=n=>({});function Ob(n,e,t){const i=n.slice();return i[152]=e[t],i[154]=t,i}const f6=n=>({}),db=n=>({});function pb(n,e,t){const i=n.slice();return i[152]=e[t],i[154]=t,i}const c6=n=>({}),gb=n=>({}),u6=n=>({}),mb=n=>({});function h6(n){let e,t,i,r,s,l,o,f,u;return s=new Ct({props:{icon:pC}}),{c(){e=_("button"),t=_("span"),t.textContent="Run",i=B(),r=_("span"),De(s.$$.fragment),y(r,"class","icon"),y(e,"class","button is-primary"),y(e,"title","Run the current file"),e.disabled=l=!n[50]},m(h,O){V(h,e,O),v(e,t),v(e,i),v(e,r),Ve(s,r,null),o=!0,f||(u=oe(e,"click",n[61]),f=!0)},p(h,O){(!o||O[1]&524288&&l!==(l=!h[50]))&&(e.disabled=l)},i(h){o||(D(s.$$.fragment,h),o=!0)},o(h){F(s.$$.fragment,h),o=!1},d(h){h&&Y(e),qe(s),f=!1,u()}}}function O6(n){let e,t,i,r,s,l,o,f;return s=new Ct({props:{icon:hC}}),{c(){e=_("button"),t=_("span"),t.textContent="Stop",i=B(),r=_("span"),De(s.$$.fragment),y(r,"class","icon"),y(e,"class","button is-danger"),y(e,"title","Cancel solving")},m(u,h){V(u,e,h),v(e,t),v(e,i),v(e,r),Ve(s,r,null),l=!0,o||(f=oe(e,"click",n[63]),o=!0)},p:We,i(u){l||(D(s.$$.fragment,u),l=!0)},o(u){F(s.$$.fragment,u),l=!1},d(u){u&&Y(e),qe(s),o=!1,f()}}}function Sb(n){let e,t,i,r,s,l;return{c(){e=_("div"),t=_("button"),i=_("span"),i.textContent="Compile",y(t,"class","button"),y(t,"title","Compile the current file and show the resultant FlatZinc"),t.disabled=r=n[47]||!n[49],y(e,"class","control is-hidden-mobile")},m(o,f){V(o,e,f),v(e,t),v(t,i),s||(l=oe(t,"click",n[62]),s=!0)},p(o,f){f[1]&327680&&r!==(r=o[47]||!o[49])&&(t.disabled=r)},d(o){o&&Y(e),s=!1,l()}}}function bb(n){let e,t,i;return t=new n6({props:{items:n[52],currentItem:n[0]?n[19].edge:n[19].latest,disabled:n[47],$$slots:{item:[d6,({item:r})=>({156:r}),({item:r})=>[0,0,0,0,0,r?2:0]]},$$scope:{ctx:n}}}),t.$on("selectItem",n[70]),{c(){e=_("div"),De(t.$$.fragment),y(e,"class","control is-hidden-mobile")},m(r,s){V(r,e,s),Ve(t,e,null),i=!0},p(r,s){const l={};s[1]&2097152&&(l.items=r[52]),s[0]&524289&&(l.currentItem=r[0]?r[19].edge:r[19].latest),s[1]&65536&&(l.disabled=r[47]),s[4]&1024|s[5]&2&&(l.$$scope={dirty:s,ctx:r}),t.$set(l)},i(r){i||(D(t.$$.fragment,r),i=!0)},o(r){F(t.$$.fragment,r),i=!1},d(r){r&&Y(e),qe(t)}}}function d6(n){let e,t=n[156].label+"",i,r,s=n[156].detail+"",l,o;return{c(){e=_("span"),i=be(t),r=be(" ("),l=be(s),o=be(")"),y(e,"slot","item")},m(f,u){V(f,e,u),v(e,i),v(e,r),v(e,l),v(e,o)},p(f,u){u[5]&2&&t!==(t=f[156].label+"")&&Je(i,t),u[5]&2&&s!==(s=f[156].detail+"")&&Je(l,s)},d(f){f&&Y(e)}}}function $b(n){let e,t,i,r,s,l=ot(n[24]),o=[];for(let f=0;fn[90].call(i)),y(t,"class","select is-fullwidth"),y(e,"class","control is-expanded is-hidden-tablet")},m(f,u){V(f,e,u),v(e,t),v(t,i);for(let h=0;hSolver:',r=B(),s=_("div"),l=_("div"),o=_("select");for(let Q=0;Qn[91].call(o)),y(l,"class","select is-fullwidth"),y(s,"class","control is-expanded"),y(t,"class","field has-addons"),y(e,"class","navbar-item is-hidden-mobile")},m(Q,$){V(Q,e,$),v(e,t),v(t,i),v(t,r),v(t,s),v(s,l),v(l,o);for(let P=0;P{b=null}),rt())},i(Q){u||(D(b),u=!0)},o(Q){F(b),u=!1},d(Q){Q&&Y(e),vi(g,Q),b&&b.d(),h=!1,O()}}}function yb(n){let e,t=n[152].name+"",i,r,s=n[152].version+"",l,o;return{c(){e=_("option"),i=be(t),r=B(),l=be(s),o=B(),e.__value=n[154],yi(e,e.__value)},m(f,u){V(f,e,u),v(e,i),v(e,r),v(e,l),v(e,o)},p(f,u){u[0]&16777216&&t!==(t=f[152].name+"")&&Je(i,t),u[0]&16777216&&s!==(s=f[152].version+"")&&Je(l,s)},d(f){f&&Y(e)}}}function vb(n){let e,t,i,r,s,l,o;return r=new Ct({props:{icon:CQ}}),{c(){e=_("div"),t=_("button"),i=_("span"),De(r.$$.fragment),y(i,"class","icon"),y(t,"class","button is-primary"),y(e,"class","control")},m(f,u){V(f,e,u),v(e,t),v(t,i),Ve(r,i,null),s=!0,l||(o=oe(t,"click",n[53]),l=!0)},p:We,i(f){s||(D(r.$$.fragment,f),s=!0)},o(f){F(r.$$.fragment,f),s=!1},d(f){f&&Y(e),qe(r),l=!1,o()}}}function Pb(n){let e,t,i,r,s,l,o,f;return r=new Ct({props:{icon:_Q}}),{c(){e=_("div"),t=_("button"),i=_("span"),De(r.$$.fragment),y(i,"class","icon"),y(t,"class","button is-primary"),y(t,"title","Share"),t.disabled=s=n[18]!==0,y(e,"class","control")},m(u,h){V(u,e,h),v(e,t),v(t,i),Ve(r,i,null),l=!0,o||(f=oe(t,"click",n[93]),o=!0)},p(u,h){(!l||h[0]&262144&&s!==(s=u[18]!==0))&&(t.disabled=s)},i(u){l||(D(r.$$.fragment,u),l=!0)},o(u){F(r.$$.fragment,u),l=!1},d(u){u&&Y(e),qe(r),o=!1,f()}}}function kb(n){let e,t,i,r,s,l,o,f;return r=new Ct({props:{icon:uC}}),{c(){e=_("div"),t=_("button"),i=_("span"),De(r.$$.fragment),y(i,"class","icon"),y(t,"class","button"),y(t,"title","Download project"),t.disabled=s=n[37]||n[18]!==0,y(e,"class","control")},m(u,h){V(u,e,h),v(e,t),v(t,i),Ve(r,i,null),l=!0,o||(f=oe(t,"click",n[94]),o=!0)},p(u,h){(!l||h[0]&262144|h[1]&64&&s!==(s=u[37]||u[18]!==0))&&(t.disabled=s)},i(u){l||(D(r.$$.fragment,u),l=!0)},o(u){F(r.$$.fragment,u),l=!1},d(u){u&&Y(e),qe(r),o=!1,f()}}}function _b(n){let e,t,i,r,s,l,o,f;return r=new Ct({props:{icon:WQ}}),{c(){e=_("div"),t=_("button"),i=_("span"),De(r.$$.fragment),y(i,"class","icon"),y(t,"class","button is-primary"),y(t,"title","Open in playground"),t.disabled=s=n[18]!==0,y(e,"class","control")},m(u,h){V(u,e,h),v(e,t),v(t,i),Ve(r,i,null),l=!0,o||(f=oe(t,"click",n[67]),o=!0)},p(u,h){(!l||h[0]&262144&&s!==(s=u[18]!==0))&&(t.disabled=s)},i(u){l||(D(r.$$.fragment,u),l=!0)},o(u){F(r.$$.fragment,u),l=!1},d(u){u&&Y(e),qe(r),o=!1,f()}}}function Wb(n){let e,t,i,r,s,l,o,f;return i=new Ct({props:{icon:gC}}),{c(){e=_("a"),t=_("span"),De(i.$$.fragment),r=B(),s=_("span"),s.textContent="Compile current file",y(t,"class","icon svelte-1llogi3"),y(e,"class","navbar-item is-hidden-tablet mobile-menu-item svelte-1llogi3"),y(e,"href","javascript:void(0);")},m(u,h){V(u,e,h),v(e,t),Ve(i,t,null),v(e,r),v(e,s),l=!0,o||(f=oe(e,"click",n[95]),o=!0)},p:We,i(u){l||(D(i.$$.fragment,u),l=!0)},o(u){F(i.$$.fragment,u),l=!1},d(u){u&&Y(e),qe(i),o=!1,f()}}}function xb(n){let e,t,i,r,s,l,o,f;return i=new Ct({props:{icon:CQ}}),{c(){e=_("a"),t=_("span"),De(i.$$.fragment),r=B(),s=_("span"),s.textContent="Solver configuration",y(t,"class","icon svelte-1llogi3"),y(e,"class","navbar-item is-hidden-tablet mobile-menu-item svelte-1llogi3"),y(e,"href","javascript:void(0);")},m(u,h){V(u,e,h),v(e,t),Ve(i,t,null),v(e,r),v(e,s),l=!0,o||(f=oe(e,"click",n[96]),o=!0)},p:We,i(u){l||(D(i.$$.fragment,u),l=!0)},o(u){F(i.$$.fragment,u),l=!1},d(u){u&&Y(e),qe(i),o=!1,f()}}}function Cb(n){let e,t,i,r,s,l,o=n[0]?"latest":"edge",f,u,h,O,p;return i=new Ct({props:{icon:lC}}),{c(){e=_("a"),t=_("span"),De(i.$$.fragment),r=B(),s=_("span"),l=be("Switch to the "),f=be(o),u=be(" version of MiniZinc"),y(t,"class","icon svelte-1llogi3"),y(e,"class","navbar-item is-hidden-tablet mobile-menu-item svelte-1llogi3"),y(e,"href","javascript:void(0);")},m(g,b){V(g,e,b),v(e,t),Ve(i,t,null),v(e,r),v(e,s),v(s,l),v(s,f),v(s,u),h=!0,O||(p=oe(e,"click",n[97]),O=!0)},p(g,b){(!h||b[0]&1)&&o!==(o=g[0]?"latest":"edge")&&Je(f,o)},i(g){h||(D(i.$$.fragment,g),h=!0)},o(g){F(i.$$.fragment,g),h=!1},d(g){g&&Y(e),qe(i),O=!1,p()}}}function Xb(n){let e,t,i,r,s,l,o,f;return i=new Ct({props:{icon:_Q}}),{c(){e=_("a"),t=_("span"),De(i.$$.fragment),r=B(),s=_("span"),s.textContent="Share this project",y(t,"class","icon svelte-1llogi3"),y(e,"class","navbar-item is-hidden-tablet mobile-menu-item svelte-1llogi3"),y(e,"href","javascript:void(0);")},m(u,h){V(u,e,h),v(e,t),Ve(i,t,null),v(e,r),v(e,s),l=!0,o||(f=oe(e,"click",n[98]),o=!0)},p:We,i(u){l||(D(i.$$.fragment,u),l=!0)},o(u){F(i.$$.fragment,u),l=!1},d(u){u&&Y(e),qe(i),o=!1,f()}}}function Tb(n){let e,t,i,r,s,l,o,f;return i=new Ct({props:{icon:WQ}}),{c(){e=_("a"),t=_("span"),De(i.$$.fragment),r=B(),s=_("span"),s.textContent="Open in MiniZinc Playground",y(t,"class","icon svelte-1llogi3"),y(e,"class","navbar-item is-hidden-tablet mobile-menu-item svelte-1llogi3"),y(e,"href","javascript:void(0);")},m(u,h){V(u,e,h),v(e,t),Ve(i,t,null),v(e,r),v(e,s),l=!0,o||(f=oe(e,"click",n[99]),o=!0)},p:We,i(u){l||(D(i.$$.fragment,u),l=!0)},o(u){F(i.$$.fragment,u),l=!1},d(u){u&&Y(e),qe(i),o=!1,f()}}}function Zb(n){let e,t,i;return t=new PC({props:{files:n[20],currentIndex:n[21],readonly:!n[7]}}),t.$on("selectTab",n[107]),t.$on("reorder",n[108]),t.$on("newFile",n[109]),t.$on("rename",n[57]),t.$on("close",n[110]),t.$on("manageFiles",n[111]),{c(){e=_("div"),De(t.$$.fragment),y(e,"class","top svelte-1llogi3")},m(r,s){V(r,e,s),Ve(t,e,null),i=!0},p(r,s){const l={};s[0]&1048576&&(l.files=r[20]),s[0]&2097152&&(l.currentIndex=r[21]),s[0]&128&&(l.readonly=!r[7]),t.$set(l)},i(r){i||(D(t.$$.fragment,r),i=!0)},o(r){F(t.$$.fragment,r),i=!1},d(r){r&&Y(e),qe(t)}}}function Rb(n){let e,t,i={state:n[51]};return e=new D5({props:i}),n[112](e),{c(){De(e.$$.fragment)},m(r,s){Ve(e,r,s),t=!0},p(r,s){const l={};s[1]&1048576&&(l.state=r[51]),e.$set(l)},i(r){t||(D(e.$$.fragment,r),t=!0)},o(r){F(e.$$.fragment,r),t=!1},d(r){n[112](null),qe(e,r)}}}function p6(n){let e,t,i,r,s=n[6]&&Zb(n),l=n[51]&&Rb(n);return{c(){e=_("div"),s&&s.c(),t=B(),i=_("div"),l&&l.c(),y(i,"class","grow svelte-1llogi3"),y(e,"class","panel stack svelte-1llogi3"),y(e,"slot","panelA")},m(o,f){V(o,e,f),s&&s.m(e,null),v(e,t),v(e,i),l&&l.m(i,null),r=!0},p(o,f){o[6]?s?(s.p(o,f),f[0]&64&&D(s,1)):(s=Zb(o),s.c(),D(s,1),s.m(e,t)):s&&(nt(),F(s,1,1,()=>{s=null}),rt()),o[51]?l?(l.p(o,f),f[1]&1048576&&D(l,1)):(l=Rb(o),l.c(),D(l,1),l.m(i,null)):l&&(nt(),F(l,1,1,()=>{l=null}),rt())},i(o){r||(D(s),D(l),r=!0)},o(o){F(s),F(l),r=!1},d(o){o&&Y(e),s&&s.d(),l&&l.d()}}}function Ab(n){let e,t,i,r,s,l,o,f,u,h,O,p,g=n[13]&&Ub(n);return{c(){e=_("div"),t=_("div"),i=_("ul"),r=_("li"),s=_("a"),s.textContent="Output",l=B(),o=_("li"),f=_("a"),f.textContent="Visualisation",u=B(),g&&g.c(),y(s,"href","javascript:void(0);"),ae(r,"is-active",!n[43]),y(f,"href","javascript:void(0);"),ae(o,"is-active",n[43]),y(t,"class","tabs is-boxed"),y(e,"class","top svelte-1llogi3")},m(b,Q){V(b,e,Q),v(e,t),v(t,i),v(i,r),v(r,s),v(i,l),v(i,o),v(o,f),v(i,u),g&&g.m(i,null),h=!0,O||(p=[oe(s,"click",n[100]),oe(f,"click",n[101])],O=!0)},p(b,Q){(!h||Q[1]&4096)&&ae(r,"is-active",!b[43]),(!h||Q[1]&4096)&&ae(o,"is-active",b[43]),b[13]?g?(g.p(b,Q),Q[0]&8192&&D(g,1)):(g=Ub(b),g.c(),D(g,1),g.m(i,null)):g&&(nt(),F(g,1,1,()=>{g=null}),rt())},i(b){h||(D(g),h=!0)},o(b){F(g),h=!1},d(b){b&&Y(e),g&&g.d(),O=!1,ti(p)}}}function Ub(n){let e,t,i,r,s,l,o;return r=new Ct({props:{icon:ZQ}}),{c(){e=_("li"),t=_("button"),i=_("span"),De(r.$$.fragment),y(i,"class","icon"),y(t,"class","button is-small"),y(t,"title","Switch orientation"),y(e,"class","tab-end svelte-1llogi3")},m(f,u){V(f,e,u),v(e,t),v(t,i),Ve(r,i,null),s=!0,l||(o=oe(t,"click",n[69]),l=!0)},p:We,i(f){s||(D(r.$$.fragment,f),s=!0)},o(f){F(r.$$.fragment,f),s=!1},d(f){f&&Y(e),qe(r),l=!1,o()}}}function Yb(n){let e,t,i,r,s,l;return i=new Ct({props:{icon:ZQ}}),{c(){e=_("button"),t=_("span"),De(i.$$.fragment),y(t,"class","icon"),y(e,"class","button is-small"),y(e,"title","Switch orientation")},m(o,f){V(o,e,f),v(e,t),Ve(i,t,null),r=!0,s||(l=oe(e,"click",n[69]),s=!0)},p:We,i(o){r||(D(i.$$.fragment,o),r=!0)},o(o){F(i.$$.fragment,o),r=!1},d(o){o&&Y(e),qe(i),s=!1,l()}}}function g6(n){let e,t,i=n[13]&&!n[42]&&Yb(n);return{c(){e=_("p"),i&&i.c(),y(e,"class","control"),y(e,"slot","before-right-controls")},m(r,s){V(r,e,s),i&&i.m(e,null),t=!0},p(r,s){r[13]&&!r[42]?i?(i.p(r,s),s[0]&8192|s[1]&2048&&D(i,1)):(i=Yb(r),i.c(),D(i,1),i.m(e,null)):i&&(nt(),F(i,1,1,()=>{i=null}),rt())},i(r){t||(D(i),t=!0)},o(r){F(i),t=!1},d(r){r&&Y(e),i&&i.d()}}}function m6(n){let e,t,i,r,s,l,o,f,u,h,O=n[42]&&Ab(n),p={files:n[20]};s=new w8({props:p}),n[102](s),s.$on("solve",n[103]);function g(Q){n[104](Q)}let b={output:n[33],showClearOutput:n[14],showAutoClearOutput:n[15],showSectionToggles:n[16],showRightControls:n[17],isTab:n[42],$$slots:{"before-right-controls":[g6]},$$scope:{ctx:n}};return n[1]!==void 0&&(b.autoClearOutput=n[1]),f=new m8({props:b}),Dt.push(()=>Yo(f,"autoClearOutput",g)),f.$on("clear",n[105]),f.$on("goto",n[106]),{c(){e=_("div"),O&&O.c(),t=B(),i=_("div"),r=_("div"),De(s.$$.fragment),l=B(),o=_("div"),De(f.$$.fragment),y(r,"class","tab-window svelte-1llogi3"),ae(r,"visible",n[43]),y(o,"class","tab-window svelte-1llogi3"),ae(o,"visible",!n[42]||!n[43]),y(i,"class","grow svelte-1llogi3"),y(e,"class","panel stack svelte-1llogi3"),y(e,"slot","panelB")},m(Q,$){V(Q,e,$),O&&O.m(e,null),v(e,t),v(e,i),v(i,r),Ve(s,r,null),v(i,l),v(i,o),Ve(f,o,null),h=!0},p(Q,$){Q[42]?O?(O.p(Q,$),$[1]&2048&&D(O,1)):(O=Ab(Q),O.c(),D(O,1),O.m(e,t)):O&&(nt(),F(O,1,1,()=>{O=null}),rt());const P={};$[0]&1048576&&(P.files=Q[20]),s.$set(P),(!h||$[1]&4096)&&ae(r,"visible",Q[43]);const x={};$[1]&4&&(x.output=Q[33]),$[0]&16384&&(x.showClearOutput=Q[14]),$[0]&32768&&(x.showAutoClearOutput=Q[15]),$[0]&65536&&(x.showSectionToggles=Q[16]),$[0]&131072&&(x.showRightControls=Q[17]),$[1]&2048&&(x.isTab=Q[42]),$[0]&8192|$[1]&2048|$[4]&1024&&(x.$$scope={dirty:$,ctx:Q}),!u&&$[0]&2&&(u=!0,x.autoClearOutput=Q[1],Uo(()=>u=!1)),f.$set(x),(!h||$[1]&6144)&&ae(o,"visible",!Q[42]||!Q[43])},i(Q){h||(D(O),D(s.$$.fragment,Q),D(f.$$.fragment,Q),h=!0)},o(Q){F(O),F(s.$$.fragment,Q),F(f.$$.fragment,Q),h=!1},d(Q){Q&&Y(e),O&&O.d(),n[102](null),qe(s),qe(f)}}}function S6(n){let e,t,i,r=n[20][n[29]].name+"",s,l,o,f;return{c(){e=_("p"),t=be("Are you sure you wish to delete "),i=_("code"),s=be(r),l=be("?"),o=B(),f=_("p"),f.textContent="This cannot be undone."},m(u,h){V(u,e,h),v(e,t),v(e,i),v(i,s),v(e,l),V(u,o,h),V(u,f,h)},p(u,h){h[0]&537919488&&r!==(r=u[20][u[29]].name+"")&&Je(s,r)},d(u){u&&(Y(e),Y(o),Y(f))}}}function b6(n){let e,t,i,r,s,l;return{c(){e=_("div"),t=_("button"),t.textContent="Delete",i=B(),r=_("button"),r.textContent="Cancel",y(t,"class","button is-danger"),y(r,"type","button"),y(r,"class","button"),y(e,"slot","footer")},m(o,f){V(o,e,f),v(e,t),v(e,i),v(e,r),s||(l=[oe(t,"click",n[123]),oe(r,"click",n[124])],s=!0)},p:We,d(o){o&&Y(e),s=!1,ti(l)}}}function $6(n){let e,t,i,r,s,l,o,f,u,h,O;return f=new Ct({props:{icon:oC}}),{c(){e=_("div"),t=_("p"),i=_("input"),r=B(),s=_("p"),l=_("button"),o=_("span"),De(f.$$.fragment),y(i,"class","input"),y(i,"type","text"),i.value=n[39],i.readOnly=!0,y(t,"class","control is-expanded"),y(o,"class","icon"),y(l,"type","button"),y(l,"class","button"),ae(l,"is-primary",!n[40]),ae(l,"is-success",n[40]),y(s,"class","control"),y(e,"class","field has-addons")},m(p,g){V(p,e,g),v(e,t),v(t,i),n[131](i),v(e,r),v(e,s),v(s,l),v(l,o),Ve(f,o,null),u=!0,h||(O=[oe(i,"click",n[132]),oe(l,"click",n[66])],h=!0)},p(p,g){(!u||g[1]&256&&i.value!==p[39])&&(i.value=p[39]),(!u||g[1]&512)&&ae(l,"is-primary",!p[40]),(!u||g[1]&512)&&ae(l,"is-success",p[40])},i(p){u||(D(f.$$.fragment,p),u=!0)},o(p){F(f.$$.fragment,p),u=!1},d(p){p&&Y(e),n[131](null),qe(f),h=!1,ti(O)}}}function Q6(n){let e,t,i,r;return{c(){e=_("div"),t=_("button"),t.textContent="Done",y(t,"class","button is-primary"),y(e,"slot","footer")},m(s,l){V(s,e,l),v(e,t),i||(r=oe(t,"click",n[130]),i=!0)},p:We,d(s){s&&Y(e),i=!1,r()}}}function w6(n){let e,t,i,r,s,l,o,f,u,h,O,p,g,b,Q,$,P,x,A,C,X,Z,I,q,L,z,te,ue,$e,Se,Xe,de,ce,Re,xe,Ce,Ee,Pt,ii,Tt,It,Nt,ve,ie,G,le,fe,ze,Ne,st,pt,ni,gt,wt,ge,mt,Me,ht,ft,Be,Ot,yt,hn,en;const Oi=n[89]["navbar-before-run-buttons"],je=ln(Oi,n,n[134],mb),jn=[O6,h6],ki=[];function di(N,he){return N[47]?0:1}h=di(n),O=ki[h]=jn[h](n);let ci=n[8]&&Sb(n),kt=n[4]&&bb(n);const ar=n[89]["navbar-run-buttons"],Zt=ln(ar,n,n[134],gb);let pi=n[5]&&n[24].length>0&&$b(n);const Xr=n[89]["navbar-after-run-buttons"],ji=ln(Xr,n,n[134],db);let Vt=n[5]&&n[24].length>0&&wb(n);const Tr=n[89]["navbar-after-solver-selector"],Yi=ln(Tr,n,n[134],hb),Hr=n[89]["navbar-before-share-buttons"],ri=ln(Hr,n,n[134],ub);let Lt=n[10]&&Pb(n),Bt=n[11]&&kb(n),qt=n[12]&&_b(n);const Kr=n[89]["navbar-share-buttons"],Vi=ln(Kr,n,n[134],cb);let _t=n[8]&&!n[47]&&n[49]&&Wb(n),Fe=n[9]&&n[5]&&n[24].length>0&&xb(n),Rt=n[4]&&!n[47]&&Cb(n),jt=n[10]&&n[18]===0&&Xb(n),Et=n[12]&&n[18]===0&&Tb(n);const Zr=n[89]["navbar-after-share-buttons"],qi=ln(Zr,n,n[134],fb);function fr(N){n[113](N)}let _n={direction:n[2],showPanels:n[48],$$slots:{panelB:[m6],panelA:[p6]},$$scope:{ctx:n}};n[3]!==void 0&&(_n.split=n[3]),le=new K5({props:_n}),Dt.push(()=>Yo(le,"split",fr));let Ts={active:n[35],stdFlags:n[45]};return Ne=new G8({props:Ts}),n[114](Ne),Ne.$on("close",n[115]),pt=new Z8({props:{active:n[30],files:n[20]}}),pt.$on("close",n[116]),pt.$on("delete",n[117]),pt.$on("modifyFile",n[118]),pt.$on("newFile",n[119]),gt=new k8({props:{active:n[28]}}),gt.$on("cancel",n[120]),gt.$on("new",n[121]),gt.$on("open",n[122]),ge=new ql({props:{active:n[29]!==null,title:"Delete file",$$slots:{footer:[b6],default:[S6]},$$scope:{ctx:n}}}),ge.$on("cancel",n[125]),Me=new V8({props:{active:n[31],modelFiles:n[44]}}),Me.$on("accept",n[126]),Me.$on("cancel",n[127]),ft=new B8({props:{active:n[32],dataFiles:n[46],parameters:n[34]}}),ft.$on("accept",n[128]),ft.$on("cancel",n[129]),Ot=new ql({props:{active:n[39],title:"Share this project",$$slots:{footer:[Q6],default:[$6]},$$scope:{ctx:n}}}),Ot.$on("cancel",n[133]),{c(){e=_("div"),t=_("div"),i=_("div"),r=_("nav"),s=_("div"),je&&je.c(),l=B(),o=_("div"),f=_("div"),u=_("div"),O.c(),p=B(),ci&&ci.c(),g=B(),kt&&kt.c(),b=B(),Zt&&Zt.c(),Q=B(),pi&&pi.c(),$=B(),ji&&ji.c(),P=B(),Vt&&Vt.c(),x=B(),Yi&&Yi.c(),A=B(),C=_("a"),X=_("span"),Z=B(),I=_("span"),q=B(),L=_("span"),z=B(),te=_("div"),ue=_("div"),$e=B(),Se=_("div"),ri&&ri.c(),Xe=B(),de=_("div"),ce=_("div"),Lt&&Lt.c(),Re=B(),Bt&&Bt.c(),xe=B(),qt&&qt.c(),Ce=B(),Vi&&Vi.c(),Ee=B(),_t&&_t.c(),Pt=B(),Fe&&Fe.c(),ii=B(),Rt&&Rt.c(),Tt=B(),jt&&jt.c(),It=B(),Et&&Et.c(),Nt=B(),qi&&qi.c(),ve=B(),ie=_("div"),G=_("div"),De(le.$$.fragment),ze=B(),De(Ne.$$.fragment),st=B(),De(pt.$$.fragment),ni=B(),De(gt.$$.fragment),wt=B(),De(ge.$$.fragment),mt=B(),De(Me.$$.fragment),ht=B(),De(ft.$$.fragment),Be=B(),De(Ot.$$.fragment),y(u,"class","control"),y(f,"class","field navbar-run-buttons svelte-1llogi3"),ae(f,"has-addons",n[8]||n[4]||n[5]),y(o,"class","navbar-item is-expanded"),y(X,"aria-hidden","true"),y(I,"aria-hidden","true"),y(L,"aria-hidden","true"),y(C,"role","button"),y(C,"class","navbar-burger"),y(C,"aria-label","menu"),y(C,"aria-expanded",n[26]),ae(C,"is-active",n[26]),y(s,"class","navbar-brand"),y(ue,"class","navbar-start is-hidden-tablet"),y(ce,"class","field has-addons"),y(de,"class","navbar-item is-hidden-mobile"),y(Se,"class","navbar-end"),y(te,"class","navbar-menu"),ae(te,"is-active",n[26]),y(r,"class","navbar"),y(i,"class","top svelte-1llogi3"),y(G,"class","left svelte-1llogi3"),y(ie,"class","grow main-panel svelte-1llogi3"),y(t,"class","stack svelte-1llogi3"),y(e,"class","mzn-playground svelte-1llogi3"),ae(e,"is-dark",n[23])},m(N,he){V(N,e,he),v(e,t),v(t,i),v(i,r),v(r,s),je&&je.m(s,null),v(s,l),v(s,o),v(o,f),v(f,u),ki[h].m(u,null),v(f,p),ci&&ci.m(f,null),v(f,g),kt&&kt.m(f,null),v(f,b),Zt&&Zt.m(f,null),v(f,Q),pi&&pi.m(f,null),v(s,$),ji&&ji.m(s,null),v(s,P),Vt&&Vt.m(s,null),v(s,x),Yi&&Yi.m(s,null),v(s,A),v(s,C),v(C,X),v(C,Z),v(C,I),v(C,q),v(C,L),v(r,z),v(r,te),v(te,ue),v(te,$e),v(te,Se),ri&&ri.m(Se,null),v(Se,Xe),v(Se,de),v(de,ce),Lt&&Lt.m(ce,null),v(ce,Re),Bt&&Bt.m(ce,null),v(ce,xe),qt&&qt.m(ce,null),v(ce,Ce),Vi&&Vi.m(ce,null),v(Se,Ee),_t&&_t.m(Se,null),v(Se,Pt),Fe&&Fe.m(Se,null),v(Se,ii),Rt&&Rt.m(Se,null),v(Se,Tt),jt&&jt.m(Se,null),v(Se,It),Et&&Et.m(Se,null),v(Se,Nt),qi&&qi.m(Se,null),v(t,ve),v(t,ie),v(ie,G),Ve(le,G,null),v(ie,ze),Ve(Ne,ie,null),v(e,st),Ve(pt,e,null),v(e,ni),Ve(gt,e,null),v(e,wt),Ve(ge,e,null),v(e,mt),Ve(Me,e,null),v(e,ht),Ve(ft,e,null),v(e,Be),Ve(Ot,e,null),yt=!0,hn||(en=oe(C,"click",n[92]),hn=!0)},p(N,he){je&&je.p&&(!yt||he[4]&1024)&&an(je,Oi,N,N[134],yt?on(Oi,N[134],he,u6):fn(N[134]),mb);let Jr=h;h=di(N),h===Jr?ki[h].p(N,he):(nt(),F(ki[Jr],1,1,()=>{ki[Jr]=null}),rt(),O=ki[h],O?O.p(N,he):(O=ki[h]=jn[h](N),O.c()),D(O,1),O.m(u,null)),N[8]?ci?ci.p(N,he):(ci=Sb(N),ci.c(),ci.m(f,g)):ci&&(ci.d(1),ci=null),N[4]?kt?(kt.p(N,he),he[0]&16&&D(kt,1)):(kt=bb(N),kt.c(),D(kt,1),kt.m(f,b)):kt&&(nt(),F(kt,1,1,()=>{kt=null}),rt()),Zt&&Zt.p&&(!yt||he[4]&1024)&&an(Zt,ar,N,N[134],yt?on(ar,N[134],he,c6):fn(N[134]),gb),N[5]&&N[24].length>0?pi?pi.p(N,he):(pi=$b(N),pi.c(),pi.m(f,null)):pi&&(pi.d(1),pi=null),(!yt||he[0]&304)&&ae(f,"has-addons",N[8]||N[4]||N[5]),ji&&ji.p&&(!yt||he[4]&1024)&&an(ji,Xr,N,N[134],yt?on(Xr,N[134],he,f6):fn(N[134]),db),N[5]&&N[24].length>0?Vt?(Vt.p(N,he),he[0]&16777248&&D(Vt,1)):(Vt=wb(N),Vt.c(),D(Vt,1),Vt.m(s,x)):Vt&&(nt(),F(Vt,1,1,()=>{Vt=null}),rt()),Yi&&Yi.p&&(!yt||he[4]&1024)&&an(Yi,Tr,N,N[134],yt?on(Tr,N[134],he,a6):fn(N[134]),hb),(!yt||he[0]&67108864)&&y(C,"aria-expanded",N[26]),(!yt||he[0]&67108864)&&ae(C,"is-active",N[26]),ri&&ri.p&&(!yt||he[4]&1024)&&an(ri,Hr,N,N[134],yt?on(Hr,N[134],he,o6):fn(N[134]),ub),N[10]?Lt?(Lt.p(N,he),he[0]&1024&&D(Lt,1)):(Lt=Pb(N),Lt.c(),D(Lt,1),Lt.m(ce,Re)):Lt&&(nt(),F(Lt,1,1,()=>{Lt=null}),rt()),N[11]?Bt?(Bt.p(N,he),he[0]&2048&&D(Bt,1)):(Bt=kb(N),Bt.c(),D(Bt,1),Bt.m(ce,xe)):Bt&&(nt(),F(Bt,1,1,()=>{Bt=null}),rt()),N[12]?qt?(qt.p(N,he),he[0]&4096&&D(qt,1)):(qt=_b(N),qt.c(),D(qt,1),qt.m(ce,Ce)):qt&&(nt(),F(qt,1,1,()=>{qt=null}),rt()),Vi&&Vi.p&&(!yt||he[4]&1024)&&an(Vi,Kr,N,N[134],yt?on(Kr,N[134],he,l6):fn(N[134]),cb),N[8]&&!N[47]&&N[49]?_t?(_t.p(N,he),he[0]&256|he[1]&327680&&D(_t,1)):(_t=Wb(N),_t.c(),D(_t,1),_t.m(Se,Pt)):_t&&(nt(),F(_t,1,1,()=>{_t=null}),rt()),N[9]&&N[5]&&N[24].length>0?Fe?(Fe.p(N,he),he[0]&16777760&&D(Fe,1)):(Fe=xb(N),Fe.c(),D(Fe,1),Fe.m(Se,ii)):Fe&&(nt(),F(Fe,1,1,()=>{Fe=null}),rt()),N[4]&&!N[47]?Rt?(Rt.p(N,he),he[0]&16|he[1]&65536&&D(Rt,1)):(Rt=Cb(N),Rt.c(),D(Rt,1),Rt.m(Se,Tt)):Rt&&(nt(),F(Rt,1,1,()=>{Rt=null}),rt()),N[10]&&N[18]===0?jt?(jt.p(N,he),he[0]&263168&&D(jt,1)):(jt=Xb(N),jt.c(),D(jt,1),jt.m(Se,It)):jt&&(nt(),F(jt,1,1,()=>{jt=null}),rt()),N[12]&&N[18]===0?Et?(Et.p(N,he),he[0]&266240&&D(Et,1)):(Et=Tb(N),Et.c(),D(Et,1),Et.m(Se,Nt)):Et&&(nt(),F(Et,1,1,()=>{Et=null}),rt()),qi&&qi.p&&(!yt||he[4]&1024)&&an(qi,Zr,N,N[134],yt?on(Zr,N[134],he,s6):fn(N[134]),fb),(!yt||he[0]&67108864)&&ae(te,"is-active",N[26]);const cr={};he[0]&4&&(cr.direction=N[2]),he[1]&131072&&(cr.showPanels=N[48]),he[0]&1916002498|he[1]&1055748|he[4]&1024&&(cr.$$scope={dirty:he,ctx:N}),!fe&&he[0]&8&&(fe=!0,cr.split=N[3],Uo(()=>fe=!1)),le.$set(cr);const ur={};he[1]&16&&(ur.active=N[35]),he[1]&16384&&(ur.stdFlags=N[45]),Ne.$set(ur);const es={};he[0]&1073741824&&(es.active=N[30]),he[0]&1048576&&(es.files=N[20]),pt.$set(es);const nl={};he[0]&268435456&&(nl.active=N[28]),gt.$set(nl);const Zs={};he[0]&536870912&&(Zs.active=N[29]!==null),he[0]&537919488|he[4]&1024&&(Zs.$$scope={dirty:he,ctx:N}),ge.$set(Zs);const Wn={};he[1]&1&&(Wn.active=N[31]),he[1]&8192&&(Wn.modelFiles=N[44]),Me.$set(Wn);const ts={};he[1]&2&&(ts.active=N[32]),he[1]&32768&&(ts.dataFiles=N[46]),he[1]&8&&(ts.parameters=N[34]),ft.$set(ts);const gi={};he[1]&256&&(gi.active=N[39]),he[1]&896|he[4]&1024&&(gi.$$scope={dirty:he,ctx:N}),Ot.$set(gi),(!yt||he[0]&8388608)&&ae(e,"is-dark",N[23])},i(N){yt||(D(je,N),D(O),D(kt),D(Zt,N),D(ji,N),D(Vt),D(Yi,N),D(ri,N),D(Lt),D(Bt),D(qt),D(Vi,N),D(_t),D(Fe),D(Rt),D(jt),D(Et),D(qi,N),D(le.$$.fragment,N),D(Ne.$$.fragment,N),D(pt.$$.fragment,N),D(gt.$$.fragment,N),D(ge.$$.fragment,N),D(Me.$$.fragment,N),D(ft.$$.fragment,N),D(Ot.$$.fragment,N),yt=!0)},o(N){F(je,N),F(O),F(kt),F(Zt,N),F(ji,N),F(Vt),F(Yi,N),F(ri,N),F(Lt),F(Bt),F(qt),F(Vi,N),F(_t),F(Fe),F(Rt),F(jt),F(Et),F(qi,N),F(le.$$.fragment,N),F(Ne.$$.fragment,N),F(pt.$$.fragment,N),F(gt.$$.fragment,N),F(ge.$$.fragment,N),F(Me.$$.fragment,N),F(ft.$$.fragment,N),F(Ot.$$.fragment,N),yt=!1},d(N){N&&Y(e),je&&je.d(N),ki[h].d(),ci&&ci.d(),kt&&kt.d(),Zt&&Zt.d(N),pi&&pi.d(),ji&&ji.d(N),Vt&&Vt.d(),Yi&&Yi.d(N),ri&&ri.d(N),Lt&&Lt.d(),Bt&&Bt.d(),qt&&qt.d(),Vi&&Vi.d(N),_t&&_t.d(),Fe&&Fe.d(),Rt&&Rt.d(),jt&&jt.d(),Et&&Et.d(),qi&&qi.d(N),qe(le),n[114](null),qe(Ne),qe(pt),qe(gt),qe(ge),qe(Me),qe(ft),qe(Ot),hn=!1,en()}}}function Vb(n,e){n.effects=n.effects?[...n.effects,e]:[e]}function y6(n,e,t){let i,r,s,l,o,f,u,h,O,p,g,b,Q,$,P,x,A,{$$slots:C={},$$scope:X}=e,{showVersionSwitcher:Z=!0}=e,{showSolverDropdown:I=!0}=e,{edgeMiniZinc:q=!1}=e,{autoClearOutput:L=!1}=e,{showTabs:z=!0}=e,{canEditTabs:te=!0}=e,{compilationEnabled:ue=!0}=e,{project:$e}=e,{enabledSolvers:Se=null}=e,{canEditSolverSettings:Xe=!0}=e,{showShareButton:de=!0}=e,{showDownloadButton:ce=!0}=e,{externalPlaygroundURL:Re=null}=e,{splitterDirection:xe="vertical"}=e,{splitterSize:Ce=75}=e,{canSwitchOrientation:Ee=!0}=e,{showClearOutput:Pt=!0}=e,{showAutoClearOutput:ii=!0}=e,{showOutputSectionToggles:Tt=!0}=e,{showOutputRightControls:It=!0}=e,{theme:Nt="auto"}=e,{hideOutputOnStartup:ve=!0}=e,{autoFocus:ie=!0}=e,G=0,le=[],fe,ze,Ne={latest:{label:"Latest",detail:"stable"},edge:{label:"Edge",detail:"development"}};function st(R){const re=q?Px:vx;if(ze!==re){t(18,G++,G);const se=fe;fe=new Promise(async(we,Ae)=>{se&&await se,ze&&ze.shutdown(),ze=re,ze.shutdown(),await ze.init();const[He]=/version \d+\.\d+\.\d+(?:, build .*)?$/m.exec(await ze.version()),lt=q?"edge":"latest";t(19,Ne={...Ne,[lt]:{...Ne[lt],detail:He}}),t(80,le=await ze.solvers()),await rr(),t(18,G--,G),we()})}return fe}const pt=new Promise((R,re)=>{Bc(()=>{st(),R();const se=window.matchMedia("(prefers-color-scheme: dark)"),we=()=>{t(83,Wn=window.matchMedia("(prefers-color-scheme: dark)").matches)};return we(),se.addEventListener("change",we),()=>se.removeEventListener("change",we)})});async function ni(R){t(0,q=R.minizincVersion==="edge"),await pt,t(20,ge=[]),Xr(R.files,ie),t(21,Me=R.tab||0),R.solverId&&(await st(),t(22,di=$.findIndex(re=>re.id===R.solverId))),R.solverConfig&&ht.load(R.solverConfig)}function gt(){return ge.length>0}let wt,ge=[],mt=!1,Me=0,ht,ft=!1,Be=null,Ot=!1,yt=!1,hn=null,en=!1,Oi=[],je=null,jn=[],ki={},di=-1;async function ci(R,re){if(await st(),di<0||di>=$.length){const se=$.findIndex(we=>we.extraInfo&&we.extraInfo.isDefault);se!==-1&&t(22,di=se)}}let kt=!1;function ar(){t(35,kt=!kt)}async function Zt(R,re=!0){for(wt&&Me=0&&ge[R].hidden;)R--;R===-1&&(R=ge.findIndex(se=>!se.hidden)),t(21,Me=R),await rr(),wt&&h&&(re&&wt.focus(),h.scrollTop!==void 0&&wt.getView().requestMeasure({read(se){se.scrollDOM.scrollTo(h.scrollLeft,h.scrollTop)}}))}function pi(R){let re=`Untitled${R}`,se=2;for(;ge.find(we=>we.name===re);)re=`Untitled-${se++}${R}`;t(20,ge=[...ge,{name:re,state:ut.create({extensions:Bf(R,ur,A)})}]),Zt(ge.length-1),t(28,ft=!1)}function Xr(R,re=!0){let se=[];for(const we of R){const Ae=we.name.endsWith(".mzc.mzn")?we.name.length-8:we.name.lastIndexOf("."),He=we.name.substring(0,Ae).replaceAll(/[\/\\\.]/g,""),lt=we.name.substring(Ae);let Ei=`${He}${lt}`,si=2;for(;ge.find(Pu=>Pu.name===Ei);)Ei=`${He}-${si++}${lt}`;const Aa=Bf(lt,ur,A,we.readOnly);se.push({...we,hidden:we.hidden||lt===".mzc",name:Ei,state:ut.create({doc:we.contents,extensions:Aa,selection:{anchor:we.anchor||0}})})}t(20,ge=[...ge,...se]),Zt(ge.length-1,re),t(28,ft=!1)}function ji(R){const{index:re,name:se,suffix:we}=R.detail;let Ae=se,He=2;for(;ge.some(lt=>lt===Ae+we);)Ae=`${se}-${He++}`;h&&t(85,h.state=wt.getState(),h),t(20,ge=[...ge.slice(0,re),{...ge[re],name:se+we},...ge.slice(re+1)])}function Vt(R){const re=r===1&&!ge[R].hidden;t(20,ge=[...ge.slice(0,R),...ge.slice(R+1),...re?[{name:"Untitled.mzn",state:ut.create({extensions:Bf(".mzn",ur,A)})}]:[]]),Me>=ge.length?Zt(ge.length-1):Zt(Me),t(29,Be=null)}function Tr(R,re){h&&t(85,h.state=wt.getState(),h);const se={...ge[R],...re};"readOnly"in re&&Vb(se,re.readOnly?A9:U9),t(20,ge=[...ge.slice(0,R),se,...ge.slice(R+1)]),Zt(Me)}function Yi(R,re){let se;R0){await rr();const re=wt.getView();re&&re.state===R.state&&(re.dispatch({effects:R.effects}),R.effects=[])}}let ri=null;async function Lt(R){t(18,G++,G),t(85,h.state=wt.getState(),h);let re=O?h:null;if(!re){if(b.length===0)return t(18,G--,G),!1;if(b.length===1)re=ge.find(Ae=>Ae.name===b[0]);else try{const Ae=await new Promise((He,lt)=>{t(36,ri=He),t(31,yt=!0)});if(!Ae)return t(18,G--,G),!1;re=ge.find(He=>He.name===Ae.modelFile)}finally{t(31,yt=!1)}}const se=new ze.Model,we=[re.name];if(R){const Ae=re.name.substring(0,re.name.length-4),He=ge.find(lt=>lt.name===`${Ae}.mzc`||lt.name===`${Ae}.mzc.mzn`);He&&we.push(He.name)}re!==h&&we.push(h.name);for(const Ae of ge)se.addFile(Ae.name,Ae.state.doc.toString(),we.indexOf(Ae.name)!==-1);try{const{input:Ae}=await se.interface({options:ht.getCompilationConfiguration(P.id)});if(Object.keys(Ae).length>0){const He={};for(const lt in Ae)He[lt]=ki[lt];t(34,ki=He),p&&jn.indexOf(h.name)===-1&&(jn=[...jn,h.name]);try{const lt=await new Promise((Ei,si)=>{t(36,ri=Ei),t(32,hn=!0)});if(!lt)return t(18,G--,G),!1;if(lt.parameters){let Ei="";for(const si in lt.parameters)lt.parameters[si].trim().length>0&&(Ei+=`${si} = ${lt.parameters[si]}; +`);se.addDznString(Ei),t(34,ki=lt.parameters)}else{for(const Ei of lt.dataFiles)we.indexOf(Ei)===-1&&(se.addFile(Ei),we.push(Ei));jn=lt.dataFiles}}finally{t(32,hn=!1)}}}catch(Ae){console.error(Ae)}return t(18,G--,G),{model:se,fileList:we}}async function Bt(){if(g){const Ae=new ze.Model;Ae.addFile(h.name,h.state.doc.toString());const He=[h.name],lt=ht.getSolvingConfiguration(P.id);await qt(Ae,He,lt);return}const R=await Lt(!0);if(!R)return;const{model:re,fileList:se}=R,we=ht.getSolvingConfiguration(P.id);await qt(re,se,we)}async function qt(R,re,se){t(81,en=!0);const we=Date.now();L&&t(33,Oi=[]),t(33,Oi=[...Oi,{files:re,output:[]}]),t(82,je=R.solve({options:se,jsonOutput:!1})),Rt(),je.on("error",Fe),je.on("warning",Fe),je.on("solution",Ae=>Fe(Ae,Date.now()-we)),je.on("status",Ae=>Fe(Ae,Date.now()-we)),je.on("statistics",Fe),je.on("trace",Ae=>Fe(Ae,Date.now()-we)),je.on("statistics",Fe),je.on("comment",Fe),je.on("time",Fe),je.on("checker",Fe),je.on("stderr",Fe);try{await je,Fe({type:"exit",code:0,runTime:Date.now()-we})}catch(Ae){Fe({type:"exit",code:Ae.code,runTime:Date.now()-we})}t(82,je=null)}async function Kr(){t(81,en=!0);const R=await Lt(!0);if(!R)return;Rt();const{model:re,fileList:se}=R,we=se[0],Ae=Date.now();L&&t(33,Oi=[]),t(33,Oi=[...Oi,{files:se,isCompile:!0,output:[]}]),t(82,je=re.compile({options:ht.getCompilationConfiguration(P.id)})),je.on("error",Fe),je.on("warning",Fe),je.on("statistics",Fe),je.on("trace",Fe),je.on("statistics",Fe),je.on("stderr",Fe);try{const He=await je;t(20,ge=[...ge,{name:`${we.substring(0,we.indexOf("."))}.fzn`,state:ut.create({extensions:Bf(".fzn",ur,A),doc:He})}]),Zt(ge.length-1),Fe({type:"exit",code:0,runTime:Date.now()-Ae})}catch(He){Fe({type:"exit",code:He.code,runTime:Date.now()-Ae})}t(82,je=null)}function Vi(){Fe({type:"cancel"}),je.cancel()}let _t=null;function Fe(R,re){_t?_t.then(()=>{_t=jt(R,re)}):_t=jt(R,re),Oi[Oi.length-1].output.push(R),t(33,Oi)}function Rt(){gi&&gi.reset(),t(42,Rs=!1),t(43,As=!1)}async function jt(R,re){if(R.type==="trace"&&R.section.startsWith("mzn_vis_")){Rs||(t(42,Rs=!0),t(43,As=!0)),await rr();const se=ge.find(Ae=>Ae.name===R.message.url);let we=null;if(se)we=se.state.doc.toString();else try{we=await ze.readStdlibFileContents(R.message.url)}catch(Ae){console.error(Ae);return}if(we===null){console.error(`Failed to get visualisation file ${R.message.url}`);return}gi.addVisualisation(R.section,we,R.message.userData);return}if(Rs){for(;!gi;)await rr();switch(R.type){case"solution":gi.addSolution(R.sections.filter(se=>se.startsWith("mzn_vis_")).reduce((se,we)=>({...se,[we]:R.output[we]}),{}),"time"in R?R.time:re);break;case"status":gi.status(R.status,"time"in R?R.time:re);break;case"exit":gi.status("time"in R?R.time:re);break}}}function Et(){return h&&t(85,h.state=wt.getState(),h),{files:ge.map(R=>({name:R.name,contents:R.state.doc.toString(),...R.hidden?{hidden:!0}:{},...R.readOnly?{readOnly:!0}:{}})),tab:Me,solverId:P.id,solverConfig:ht.save(),minizincVersion:q?"edge":"latest"}}let Zr=!1;async function qi(){t(37,Zr=!0);try{const R=(await mm(()=>import("./jszip.min-99cacbe3.js").then(si=>si.j),[],import.meta.url)).default,re=(await mm(()=>import("./FileSaver.min-33758e75.js").then(si=>si.F),[],import.meta.url)).default,se=Et(),we=ge.map(si=>si.name),Ae=ge.filter(si=>!si.hidden).map(si=>si.name);let He=P.id;He==="org.minizinc.gecode_presolver"?He="org.gecode.gecode":He==="org.minizinc.chuffed"&&(He="org.chuffed.chuffed");const lt=new R;for(const si of se.files)lt.file(si.name,si.contents);lt.file("Project.mzp",JSON.stringify({version:105,projectFiles:we,openFiles:Ae,openTab:se.tab,selectedBuiltinConfigId:He,selectedBuiltinConfigVersion:"default"}));const Ei=await lt.generateAsync({type:"blob"});re.saveAs(Ei,"Project.zip")}catch(R){console.error(R)}finally{t(37,Zr=!1)}}let fr,_n=null,Ts=!1;function N(R){const re=Et(),se=new URL(R);return se.hash=`#project=${encodeURIComponent(JSON.stringify(re))}`,t(40,Ts=!1),se.toString()}function he(){fr.select(),fr.setSelectionRange(0,_n.length),navigator.clipboard.writeText(_n),t(40,Ts=!0)}function Jr(){Re&&window.open(N(Re),"_blank").focus()}let cr=null;async function ur(R){const re=R.view;if(!(G!==0||!P||!h||!h.name.endsWith(".mzn")))try{const se=re.state.doc.toString();if(se===cr)return;cr=se;const we=new ze.Model;for(const lt of ge)we.addFile(lt.name,lt.state.doc.toString(),!1);const Ae=we.addString(se),He=await we.check({options:ht.getCompilationConfiguration(P.id)});if(re.state.doc.toString()!==se)return;r6(se,He.filter(lt=>lt.location.filename===Ae),re)}catch(se){console.error(se)}}function es(R){const re=ge.findIndex(se=>se.name===R.filename);if(re!==-1){Zt(re);const se=ge[re].state.doc.toString(),we=pd(R.firstLine,R.firstColumn,se);wt.focus(),wt.setCursor(we)}}function nl(){xe==="horizontal"?t(2,xe="vertical"):t(2,xe="horizontal")}function Zs(R){t(0,q=R.detail.item===Ne.edge)}let Wn=!1;function ts(R){h&&t(85,h.state=wt.getState(),h),ge.forEach(re=>Vb(re,R?V9:Y9)),Hr(h)}let gi,Rs=!1,As=!1;function ga(R){je&&Vi();const re=[R.modelFile],se=R.modelFile.substring(0,R.modelFile.length-4),we=ge.find(He=>He.name===`${se}.mzc`||He.name===`${se}.mzc.mzn`);if(we&&re.push(we.name),R.dataFiles)for(const He of R.dataFiles)re.push(He);const Ae=new ze.Model;for(const He of ge)Ae.addFile(He.name,He.state.doc.toString(),re.indexOf(He.name)!==-1);qt(Ae,re,R.options||ht.getSolvingConfiguration(P.id))}function ma(){di=OO(this),t(22,di)}function Sa(){di=OO(this),t(22,di)}const ba=()=>{t(26,mt=!mt),t(35,kt=!1)},lu=()=>t(39,_n=N(window.location.href)),ou=()=>qi(),au=()=>{Kr(),t(26,mt=!1)},fu=()=>{ar(),t(26,mt=!1)},$a=()=>{t(0,q=!q),t(26,mt=!1)},Qa=()=>{t(39,_n=N(window.location.href)),t(26,mt=!1)},wa=()=>{Jr(),t(26,mt=!1)},Kl=()=>{t(43,As=!1)},cu=()=>{t(43,As=!0)};function ya(R){Dt[R?"unshift":"push"](()=>{gi=R,t(41,gi)})}const rl=R=>ga(R.detail);function va(R){L=R,t(1,L)}const uu=()=>t(33,Oi=[]),Pa=R=>es(R.detail.location),ka=R=>Zt(R.detail.index),Jl=R=>Yi(R.detail.src,R.detail.dest),hu=()=>t(28,ft=!0),_a=R=>t(29,Be=R.detail.index),eo=()=>t(30,Ot=!0);function to(R){Dt[R?"unshift":"push"](()=>{wt=R,t(25,wt)})}function is(R){Ce=R,t(3,Ce)}function Wa(R){Dt[R?"unshift":"push"](()=>{ht=R,t(27,ht)})}const xa=()=>t(35,kt=!1),Ou=()=>t(30,Ot=!1),Ca=R=>t(29,Be=R.detail.index),Xa=R=>Tr(R.detail.index,R.detail.options),Ta=()=>t(28,ft=!0),Za=()=>t(28,ft=!1),du=R=>pi(R.detail.type),pu=R=>Xr(R.detail.files),gu=()=>Vt(Be),Ra=()=>t(29,Be=null),mu=()=>t(29,Be=null),Su=R=>ri(R.detail),bu=()=>ri(!1),$u=R=>ri(R.detail),io=()=>ri(!1),Qu=()=>t(39,_n=null);function wu(R){Dt[R?"unshift":"push"](()=>{fr=R,t(38,fr)})}const yu=()=>fr.select(),vu=()=>t(39,_n=null);return n.$$set=R=>{"showVersionSwitcher"in R&&t(4,Z=R.showVersionSwitcher),"showSolverDropdown"in R&&t(5,I=R.showSolverDropdown),"edgeMiniZinc"in R&&t(0,q=R.edgeMiniZinc),"autoClearOutput"in R&&t(1,L=R.autoClearOutput),"showTabs"in R&&t(6,z=R.showTabs),"canEditTabs"in R&&t(7,te=R.canEditTabs),"compilationEnabled"in R&&t(8,ue=R.compilationEnabled),"project"in R&&t(72,$e=R.project),"enabledSolvers"in R&&t(73,Se=R.enabledSolvers),"canEditSolverSettings"in R&&t(9,Xe=R.canEditSolverSettings),"showShareButton"in R&&t(10,de=R.showShareButton),"showDownloadButton"in R&&t(11,ce=R.showDownloadButton),"externalPlaygroundURL"in R&&t(12,Re=R.externalPlaygroundURL),"splitterDirection"in R&&t(2,xe=R.splitterDirection),"splitterSize"in R&&t(3,Ce=R.splitterSize),"canSwitchOrientation"in R&&t(13,Ee=R.canSwitchOrientation),"showClearOutput"in R&&t(14,Pt=R.showClearOutput),"showAutoClearOutput"in R&&t(15,ii=R.showAutoClearOutput),"showOutputSectionToggles"in R&&t(16,Tt=R.showOutputSectionToggles),"showOutputRightControls"in R&&t(17,It=R.showOutputRightControls),"theme"in R&&t(74,Nt=R.theme),"hideOutputOnStartup"in R&&t(75,ve=R.hideOutputOnStartup),"autoFocus"in R&&t(76,ie=R.autoFocus),"$$scope"in R&&t(134,X=R.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&524288&&t(52,i=[Ne.latest,Ne.edge]),n.$$.dirty[0]&1&&st(),n.$$.dirty[2]&1024&&ni($e),n.$$.dirty[0]&1048576&&(r=ge.filter(R=>!R.hidden).length),n.$$.dirty[0]&3145728&&t(85,h=MeSe.indexOf(R.id)!==-1):le),n.$$.dirty[0]&20971520&&t(84,P=di>=0&&di<$.length?$[di]:null),n.$$.dirty[2]&8388608&&t(88,O=h&&h.name.endsWith(".mzn")&&!h.name.endsWith(".mzc.mzn")),n.$$.dirty[2]&8388608&&t(87,p=h&&(h.name.endsWith(".dzn")||h.name.endsWith(".json"))),n.$$.dirty[2]&8388608&&t(86,g=h&&h.name.endsWith(".fzn")),n.$$.dirty[0]&262144|n.$$.dirty[2]&121634816&&t(50,l=G===0&&P&&(O||p||g)),n.$$.dirty[0]&262144|n.$$.dirty[2]&104857600&&t(49,o=G===0&&P&&(O||p)),n.$$.dirty[2]&532480&&t(48,f=!ve||en?"all":"a"),n.$$.dirty[2]&1048576&&t(47,u=je!==null),n.$$.dirty[0]&1048576&&t(44,b=ge.filter(R=>R.name.endsWith(".mzn")&&!R.name.endsWith(".mzc.mzn")).map(R=>R.name)),n.$$.dirty[0]&1048576&&t(46,Q=ge.filter(R=>R.name.endsWith(".dzn")||R.name.endsWith(".json")).map(R=>R.name)),n.$$.dirty[0]&20971520&&ci(),n.$$.dirty[2]&4194304&&t(45,x=P?P.stdFlags:[]),n.$$.dirty[2]&8388608&&Hr(h),n.$$.dirty[2]&2101248&&t(23,A={dark:!0,light:!1,auto:Wn}[Nt]),n.$$.dirty[0]&8388608&&ts(A)},[q,L,xe,Ce,Z,I,z,te,ue,Xe,de,ce,Re,Ee,Pt,ii,Tt,It,G,Ne,ge,Me,di,A,$,wt,mt,ht,ft,Be,Ot,yt,hn,Oi,ki,kt,ri,Zr,fr,_n,Ts,gi,Rs,As,b,x,Q,u,f,o,l,s,i,ar,Zt,pi,Xr,ji,Vt,Tr,Yi,Bt,Kr,Vi,qi,N,he,Jr,es,nl,Zs,ga,$e,Se,Nt,ve,ie,ni,gt,Et,le,en,je,Wn,P,h,g,p,O,C,ma,Sa,ba,lu,ou,au,fu,$a,Qa,wa,Kl,cu,ya,rl,va,uu,Pa,ka,Jl,hu,_a,eo,to,is,Wa,xa,Ou,Ca,Xa,Ta,Za,du,pu,gu,Ra,mu,Su,bu,$u,io,Qu,wu,yu,vu,X]}class v6 extends Ui{constructor(e){super(),Ai(this,e,y6,w6,Ri,{showVersionSwitcher:4,showSolverDropdown:5,edgeMiniZinc:0,autoClearOutput:1,showTabs:6,canEditTabs:7,compilationEnabled:8,project:72,enabledSolvers:73,canEditSolverSettings:9,showShareButton:10,showDownloadButton:11,externalPlaygroundURL:12,splitterDirection:2,splitterSize:3,canSwitchOrientation:13,showClearOutput:14,showAutoClearOutput:15,showOutputSectionToggles:16,showOutputRightControls:17,theme:74,hideOutputOnStartup:75,autoFocus:76,loadProject:77,hasFiles:78,getProject:79},null,[-1,-1,-1,-1,-1,-1])}get loadProject(){return this.$$.ctx[77]}get hasFiles(){return this.$$.ctx[78]}get getProject(){return this.$$.ctx[79]}}const{window:qb}=Wx;function P6(n){let e,t,i,r,s,l,o,f;function u(g){n[6](g)}function h(g){n[7](g)}function O(g){n[8](g)}let p={project:n[1]};return n[2].autoClearOutput!==void 0&&(p.autoClearOutput=n[2].autoClearOutput),n[2].splitterDirection!==void 0&&(p.splitterDirection=n[2].splitterDirection),n[2].splitterSize!==void 0&&(p.splitterSize=n[2].splitterSize),t=new v6({props:p}),n[5](t),Dt.push(()=>Yo(t,"autoClearOutput",u)),Dt.push(()=>Yo(t,"splitterDirection",h)),Dt.push(()=>Yo(t,"splitterSize",O)),{c(){e=_("div"),De(t.$$.fragment),y(e,"class","playground-app svelte-tuc1wl")},m(g,b){V(g,e,b),Ve(t,e,null),l=!0,o||(f=[oe(qb,"beforeunload",n[4]),oe(qb,"hashchange",n[3])],o=!0)},p(g,[b]){const Q={};b&2&&(Q.project=g[1]),!i&&b&4&&(i=!0,Q.autoClearOutput=g[2].autoClearOutput,Uo(()=>i=!1)),!r&&b&4&&(r=!0,Q.splitterDirection=g[2].splitterDirection,Uo(()=>r=!1)),!s&&b&4&&(s=!0,Q.splitterSize=g[2].splitterSize,Uo(()=>s=!1)),t.$set(Q)},i(g){l||(D(t.$$.fragment,g),l=!0)},o(g){F(t.$$.fragment,g),l=!1},d(g){g&&Y(e),n[5](null),qe(t),o=!1,ti(f)}}}const Eb=`% Use this editor as a MiniZinc scratch book +`,Mb="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";function k6(n,e,t){let i,r={files:[]},s={autoClearOutput:!1,splitterDirection:"vertical",splitterSize:75,sessions:{}};try{const Q=localStorage.getItem("mznPlayground");Q&&Q.length>0&&(s={...s,...JSON.parse(Q)})}catch(Q){console.error(Q)}let l;function o(){if(Object.keys(s.sessions).length>=5){const x=Object.keys(s.sessions).map(A=>({key:A,value:s.sessions[A]}));x.sort((A,C)=>C.value.timestamp-A.value.timestamp),t(2,s.sessions=x.slice(0,5-1).reduce((A,C)=>({...A,[C.key]:C.value}),{}),s)}const $=()=>Array(6).fill(0).map(()=>Mb[Math.floor(Math.random()*Mb.length)]).join("");let P=$();for(;P in s.sessions;)P=$();return P}function f(Q){return Q.solverId||(Q.solver===0?Q.solverId="org.minizinc.gecode_presolver":r.solver===1&&(Q.solverId="org.minizinc.mip.coin-bc")),Q}function u(){if(l&&i.hasFiles()){const $=i.getProject();t(2,s.sessions[l]=$,s)}if(window.location.hash.startsWith("#project="))try{const $=decodeURIComponent(window.location.hash.substring(9));t(1,r=f(JSON.parse($))),l=o(),window.history.replaceState(void 0,void 0,`#session=${l}`);return}catch($){console.error($)}if(window.location.hash.startsWith("#code="))try{const $=decodeURIComponent(window.location.hash.substring(6));t(1,r={files:[{name:"Playground.mzn",contents:$,anchor:$.length}]}),l=o(),window.history.replaceState(void 0,void 0,`#session=${l}`)}catch($){console.error($)}window.location.hash.startsWith("#session=")||window.history.replaceState(void 0,void 0,`#session=${o()}`);const Q=window.location.hash.substring(9);if(Q!==l&&s.sessions&&s.sessions[Q])try{t(1,r=f(s.sessions[Q])),l=Q}catch($){console.error($)}r.files.length===0&&t(1,r={files:[{name:"Playground.mzn",contents:Eb,anchor:Eb.length}]}),l=Q}Bc(()=>u());function h(){const Q=i.getProject();t(2,s.sessions[l]={...Q,timestamp:Date.now()},s),localStorage.setItem("mznPlayground",JSON.stringify(s))}function O(Q){Dt[Q?"unshift":"push"](()=>{i=Q,t(0,i)})}function p(Q){n.$$.not_equal(s.autoClearOutput,Q)&&(s.autoClearOutput=Q,t(2,s))}function g(Q){n.$$.not_equal(s.splitterDirection,Q)&&(s.splitterDirection=Q,t(2,s))}function b(Q){n.$$.not_equal(s.splitterSize,Q)&&(s.splitterSize=Q,t(2,s))}return[i,r,s,u,h,O,p,g,b]}class _6 extends Ui{constructor(e){super(),Ai(this,e,k6,P6,Ri,{})}}new _6({target:document.getElementById("app")});export{Wo as c,T6 as g}; diff --git a/assets/jszip.min-8713ca20.js b/assets/jszip.min-99cacbe3.js similarity index 99% rename from assets/jszip.min-8713ca20.js rename to assets/jszip.min-99cacbe3.js index eda009e..189a837 100644 --- a/assets/jszip.min-8713ca20.js +++ b/assets/jszip.min-99cacbe3.js @@ -1,4 +1,4 @@ -import{g as Ot,c as vt}from"./index-08b47763.js";function Bt(ct,wt){for(var _=0;_N[w]})}}}return Object.freeze(Object.defineProperty(ct,Symbol.toStringTag,{value:"Module"}))}function yt(ct){throw new Error('Could not dynamically require "'+ct+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var zt={exports:{}};/*! +import{g as Ot,c as vt}from"./index-c2d21eb6.js";function Bt(ct,wt){for(var _=0;_N[w]})}}}return Object.freeze(Object.defineProperty(ct,Symbol.toStringTag,{value:"Module"}))}function yt(ct){throw new Error('Could not dynamically require "'+ct+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var zt={exports:{}};/*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files diff --git a/index.html b/index.html index 964f662..0ebff64 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ MiniZinc Playground - +