@vitejs/devtools-vite 0.0.0-alpha.18 → 0.0.0-alpha.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/index.d.mts +112 -9
  2. package/dist/index.mjs +107 -102
  3. package/dist/nitro.json +1 -1
  4. package/dist/public/200.html +1 -1
  5. package/dist/public/404.html +1 -1
  6. package/dist/public/_nuxt/{7Xmy2J8w.js → 07wnyZKd.js} +1 -1
  7. package/dist/public/_nuxt/{BKyQoL6o.js → B60rA_aW.js} +1 -1
  8. package/dist/public/_nuxt/{BMA1s1VI.js → B67x4GCP.js} +1 -1
  9. package/dist/public/_nuxt/{qjx43ao6.js → B8MMDSYB.js} +1 -1
  10. package/dist/public/_nuxt/{C3jmS5U3.js → BLS3T3KA.js} +1 -1
  11. package/dist/public/_nuxt/{DMWw7fde.js → BMsX1CNy.js} +1 -1
  12. package/dist/public/_nuxt/{Bexkoyc0.js → BOkXdHom.js} +1 -1
  13. package/dist/public/_nuxt/{BC_PfwI9.js → BOwnK8_Y.js} +1 -1
  14. package/dist/public/_nuxt/{Brb1aI-2.js → BYgsyBgs.js} +1 -1
  15. package/dist/public/_nuxt/{CuCopH82.js → BZp_Rqiq.js} +1 -1
  16. package/dist/public/_nuxt/{CiEs9bP4.js → Bax2Xuss.js} +1 -1
  17. package/dist/public/_nuxt/{C6Dt55Q_.js → BfzWwsgH.js} +1 -1
  18. package/dist/public/_nuxt/{DC_Jmw0F.js → Bgr0OgUi.js} +1 -1
  19. package/dist/public/_nuxt/{C2OwekHB.js → BrGG6h5U.js} +1 -1
  20. package/dist/public/_nuxt/{B3PvEETZ.js → Bt0_xjwR.js} +1 -1
  21. package/dist/public/_nuxt/{w-XmH5Bg.js → C-y-Odbu.js} +1 -1
  22. package/dist/public/_nuxt/{CEjOBQvu.js → C3ZA0X0n.js} +1 -1
  23. package/dist/public/_nuxt/{Cuw21ZGH.js → C9D_b0Ie.js} +1 -1
  24. package/dist/public/_nuxt/CbraBRjp.js +33 -0
  25. package/dist/public/_nuxt/{DPbvd5Yn.js → CquGjqBi.js} +1 -1
  26. package/dist/public/_nuxt/{CbwMXojR.js → CvbH1QZS.js} +1 -1
  27. package/dist/public/_nuxt/CwJmFVn8.js +1 -0
  28. package/dist/public/_nuxt/CyjCHwlN.js +1 -0
  29. package/dist/public/_nuxt/{D4hayKlJ.js → DFnm02Ud.js} +1 -1
  30. package/dist/public/_nuxt/{D4jWsLoz.js → DGvZD3jQ.js} +1 -1
  31. package/dist/public/_nuxt/{HdutzUjM.js → DQp_1U8q.js} +1 -1
  32. package/dist/public/_nuxt/{BZWmKTD9.js → DabxYzqu.js} +1 -1
  33. package/dist/public/_nuxt/DilC1n1-.js +6 -0
  34. package/dist/public/_nuxt/{IRC0Jirb.js → DtmncGDc.js} +1 -1
  35. package/dist/public/_nuxt/{BZtNaBML.js → DyBWaXpL.js} +1 -1
  36. package/dist/public/_nuxt/{CPoVdMeM.js → PBmE2B7U.js} +1 -1
  37. package/dist/public/_nuxt/{B9OSaO_y.js → Q3kWpZ_f.js} +1 -1
  38. package/dist/public/_nuxt/{Cs8a9RWb.js → SUptJs8y.js} +1 -1
  39. package/dist/public/_nuxt/builds/latest.json +1 -1
  40. package/dist/public/_nuxt/builds/meta/9de1cd1a-93a8-4fbf-8efa-effa9e85ee82.json +1 -0
  41. package/dist/public/_nuxt/{entry.CsYdxLia.css → entry.Dp3ya9sb.css} +1 -1
  42. package/dist/public/_nuxt/error-404.CrzVG6qf.css +1 -0
  43. package/dist/public/_nuxt/error-500.UTTFHdkP.css +1 -0
  44. package/dist/public/_nuxt/{BmVkH5Zk.js → jTMXHbZw.js} +1 -1
  45. package/dist/public/_nuxt/{DIDN4Ni9.js → p1Do6sW6.js} +1 -1
  46. package/dist/public/index.html +1 -1
  47. package/package.json +8 -7
  48. package/dist/public/_nuxt/BUo-D9gX.js +0 -6
  49. package/dist/public/_nuxt/DYWgomYl.js +0 -1
  50. package/dist/public/_nuxt/builds/meta/2a08e48f-ceea-4c2d-9171-63b36d85d409.json +0 -1
  51. package/dist/public/_nuxt/ebWyu6T_.js +0 -33
  52. package/dist/public/_nuxt/error-404.l69urhXw.css +0 -1
  53. package/dist/public/_nuxt/error-500.C1nOm2YL.css +0 -1
  54. package/dist/public/_nuxt/xNC6DpAO.js +0 -1
@@ -0,0 +1,33 @@
1
+ import{At as e,C as t,Ct as n,Dt as r,Ft as i,G as a,Ht as o,It as s,Jt as c,Lt as l,Mt as u,Nt as d,Qt as f,Rt as p,St as m,Tt as h,Vt as g,W as _,Wt as v,Xt as y,_ as b,_t as x,a as S,b as C,bt as w,c as T,ct as E,dt as D,en as O,ft as k,ht as A,in as j,it as M,kt as N,l as ee,lt as P,m as te,mt as F,n as ne,nt as I,o as L,ot as R,p as z,pt as B,qt as re,r as V,rn as H,rt as ie,st as U,tn as W,u as ae,ut as G,vt as oe,w as se,wt as K,x as ce,xt as le,y as ue,yt as de,zt as fe}from"./DilC1n1-.js";import{t as pe}from"./C-y-Odbu.js";import{n as me,r as he}from"./DQtLZa7C.js";import{a as ge,c as _e,s as ve}from"./C9D_b0Ie.js";import{n as ye}from"./Q3kWpZ_f.js";import{r as be,t as xe}from"./jTMXHbZw.js";import{t as Se}from"./DabxYzqu.js";import"./DnpfwSMy.js";import{t as Ce}from"./Bt0_xjwR.js";import{n as q,t as we}from"./DyBWaXpL.js";import{t as J}from"./SUptJs8y.js";import{n as Te,r as Ee,t as Y}from"./DtmncGDc.js";import{t as De}from"./B8MMDSYB.js";import{n as Oe,r as ke,t as Ae}from"./Bgr0OgUi.js";import{t as je}from"./PBmE2B7U.js";import{n as Me,r as Ne}from"./BOwnK8_Y.js";import{t as Pe}from"./BrGG6h5U.js";import{c as Fe,i as Ie,n as Le,o as Re,r as ze,s as Be,t as Ve}from"./DQp_1U8q.js";import{t as He}from"./B60rA_aW.js";import{t as Ue}from"./BfzWwsgH.js";import{t as We}from"./BZp_Rqiq.js";var Ge=Object.create,Ke=Object.defineProperty,qe=Object.getOwnPropertyDescriptor,Je=Object.getOwnPropertyNames,Ye=Object.getPrototypeOf,Xe=Object.prototype.hasOwnProperty,Ze=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Qe=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Je(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Xe.call(e,s)&&s!==n&&Ke(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=qe(t,s))||r.enumerable});return e},$e=(e,t,n)=>(n=e==null?{}:Ge(Ye(e)),Qe(t||!e||!e.__esModule?Ke(n,`default`,{value:e,enumerable:!0}):n,e)),et={border:`r y base rounded-r-xl`,flex:`~ col gap-1`,p1:``,"of-y-auto":``,"max-h-96vh":``,relative:``,"bg-glass":``,class:`fixed left-0 top-1/2 -translate-y-1/2`},tt=F({__name:`SideNav`,setup(e){let t=R(()=>[...we.value,{title:`Toggle dark mode`,icon:`i-ph-sun-duotone dark:i-ph-moon-duotone`,action:ne}]);return(e,n)=>{let r=u(`tooltip`);return h(),G(`div`,null,[U(`div`,et,[(h(!0),G(M,null,N(t.value,e=>o((h(),E(d(e.to?O(pe):`button`),w({key:e.title,ref_for:!0},e.to?{to:e.to}:{},{title:e.title,"rounded-full":``,p2:``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,flex:`~ items-center justify-center`,"exact-active-class":`text-primary op100!`,onClick:t=>e.action?.()}),{default:g(()=>[U(`div`,{class:W(e.icon),"text-lg":``},null,2)]),_:2},1040,[`title`,`onClick`])),[[r,{placement:`right`,content:e.title}]])),128))])])}}}),nt=Object.assign(tt,{__name:`PanelSideNav`}),rt={},it={"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,hover:`bg-active op100`,op50:``,title:`Close`};function X(e,t){return h(),G(`button`,it,[...t[0]||=[U(`div`,{"i-ph-x":``},null,-1)]])}var at=Object.assign(t(rt,[[`render`,X]]),{__name:`DisplayCloseButton`}),ot=new WeakMap,st={mounted(e,t){let n=!t.modifiers.bubble,r;if(typeof t.value==`function`)r=S(e,t.value,{capture:n});else{let[i,a]=t.value;r=S(e,i,Object.assign({capture:n},a))}ot.set(e,r)},unmounted(e){let t=ot.get(e);t&&typeof t==`function`?t():t?.stop(),ot.delete(e)}};function ct(){let e=!1,t=y(!1);return(n,r)=>{if(t.value=r.value,e)return;e=!0;let i=te(n,r.value);p(t,e=>i.value=e)}}ct();var lt={__name:`splitpanes`,props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1}},emits:[`ready`,`resize`,`resized`,`pane-click`,`pane-maximize`,`pane-add`,`pane-remove`,`splitter-click`,`splitter-dblclick`],setup(e,{emit:t}){let i=t,a=e,o=s(),l=c([]),u=R(()=>l.value.reduce((e,t)=>(e[~~t.id]=t)&&e,{})),f=R(()=>l.value.length),g=c(null),_=c(!1),v=c({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),y=c({splitter:null,timeoutId:null}),b=R(()=>({[`splitpanes splitpanes--${a.horizontal?`horizontal`:`vertical`}`]:!0,"splitpanes--dragging":v.value.dragging})),S=()=>{document.addEventListener(`mousemove`,T,{passive:!1}),document.addEventListener(`mouseup`,D),`ontouchstart`in window&&(document.addEventListener(`touchmove`,T,{passive:!1}),document.addEventListener(`touchend`,D))},C=()=>{document.removeEventListener(`mousemove`,T,{passive:!1}),document.removeEventListener(`mouseup`,D),`ontouchstart`in window&&(document.removeEventListener(`touchmove`,T,{passive:!1}),document.removeEventListener(`touchend`,D))},w=(e,t)=>{let n=e.target.closest(`.splitpanes__splitter`);if(n){let{left:t,top:r}=n.getBoundingClientRect(),{clientX:i,clientY:o}=`ontouchstart`in window&&e.touches?e.touches[0]:e;v.value.cursorOffset=a.horizontal?o-r:i-t}S(),v.value.mouseDown=!0,v.value.activeSplitter=t},T=e=>{v.value.mouseDown&&(e.preventDefault(),v.value.dragging=!0,requestAnimationFrame(()=>{N(j(e)),oe(`resize`,{event:e},!0)}))},D=e=>{v.value.dragging&&(window.getSelection().removeAllRanges(),oe(`resized`,{event:e},!0)),v.value.mouseDown=!1,v.value.activeSplitter=null,setTimeout(()=>{v.value.dragging=!1,C()},100)},O=(e,t)=>{`ontouchstart`in window&&(e.preventDefault(),y.value.splitter===t?(clearTimeout(y.value.timeoutId),y.value.timeoutId=null,k(e,t),y.value.splitter=null):(y.value.splitter=t,y.value.timeoutId=setTimeout(()=>y.value.splitter=null,500))),v.value.dragging||oe(`splitter-click`,{event:e,index:t},!0)},k=(e,t)=>{if(oe(`splitter-dblclick`,{event:e,index:t},!0),a.maximizePanes){let n=0;l.value=l.value.map((e,r)=>(e.size=r===t?e.max:e.min,r!==t&&(n+=e.min),e)),l.value[t].size-=n,oe(`pane-maximize`,{event:e,index:t,pane:l.value[t]}),oe(`resized`,{event:e,index:t},!0)}},A=(e,t)=>{oe(`pane-click`,{event:e,index:u.value[t].index,pane:u.value[t]})},j=e=>{let t=g.value.getBoundingClientRect(),{clientX:n,clientY:r}=`ontouchstart`in window&&e.touches?e.touches[0]:e;return{x:n-(a.horizontal?0:v.value.cursorOffset)-t.left,y:r-(a.horizontal?v.value.cursorOffset:0)-t.top}},M=e=>{e=e[a.horizontal?`y`:`x`];let t=g.value[a.horizontal?`clientHeight`:`clientWidth`];return a.rtl&&!a.horizontal&&(e=t-e),e*100/t},N=e=>{let t=v.value.activeSplitter,n={prevPanesSize:P(t),nextPanesSize:te(t),prevReachedMinPanes:0,nextReachedMinPanes:0},r=0+(a.pushOtherPanes?0:n.prevPanesSize),i=100-(a.pushOtherPanes?0:n.nextPanesSize),o=Math.max(Math.min(M(e),i),r),s=[t,t+1],c=l.value[s[0]]||null,u=l.value[s[1]]||null,d=c.max<100&&o>=c.max+n.prevPanesSize,f=u.max<100&&o<=100-(u.max+te(t+1));if(d||f){d?(c.size=c.max,u.size=Math.max(100-c.max-n.prevPanesSize-n.nextPanesSize,0)):(c.size=Math.max(100-u.max-n.prevPanesSize-te(t+1),0),u.size=u.max);return}if(a.pushOtherPanes){let e=ee(n,o);if(!e)return;({sums:n,panesToResize:s}=e),c=l.value[s[0]]||null,u=l.value[s[1]]||null}c!==null&&(c.size=Math.min(Math.max(o-n.prevPanesSize-n.prevReachedMinPanes,c.min),c.max)),u!==null&&(u.size=Math.min(Math.max(100-o-n.nextPanesSize-n.nextReachedMinPanes,u.min),u.max))},ee=(e,t)=>{let n=v.value.activeSplitter,r=[n,n+1];return t<e.prevPanesSize+l.value[r[0]].min&&(r[0]=F(n).index,e.prevReachedMinPanes=0,r[0]<n&&l.value.forEach((t,i)=>{i>r[0]&&i<=n&&(t.size=t.min,e.prevReachedMinPanes+=t.min)}),e.prevPanesSize=P(r[0]),r[0]===void 0)?(e.prevReachedMinPanes=0,l.value[0].size=l.value[0].min,l.value.forEach((t,r)=>{r>0&&r<=n&&(t.size=t.min,e.prevReachedMinPanes+=t.min)}),l.value[r[1]].size=100-e.prevReachedMinPanes-l.value[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-l.value[r[1]].min&&(r[1]=ne(n).index,e.nextReachedMinPanes=0,r[1]>n+1&&l.value.forEach((t,i)=>{i>n&&i<r[1]&&(t.size=t.min,e.nextReachedMinPanes+=t.min)}),e.nextPanesSize=te(r[1]-1),r[1]===void 0)?(e.nextReachedMinPanes=0,l.value.forEach((t,r)=>{r<f.value-1&&r>=n+1&&(t.size=t.min,e.nextReachedMinPanes+=t.min)}),l.value[r[0]].size=100-e.prevPanesSize-te(r[0]-1),null):{sums:e,panesToResize:r}},P=e=>l.value.reduce((t,n,r)=>t+(r<e?n.size:0),0),te=e=>l.value.reduce((t,n,r)=>t+(r>e+1?n.size:0),0),F=e=>[...l.value].reverse().find(t=>t.index<e&&t.size>t.min)||{},ne=e=>l.value.find(t=>t.index>e+1&&t.size>t.min)||{},I=()=>{let e=Array.from(g.value?.children||[]);for(let t of e){let e=t.classList.contains(`splitpanes__pane`),n=t.classList.contains(`splitpanes__splitter`);!e&&!n&&(t.remove(),console.warn(`Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.`))}},L=(e,t,n=!1)=>{let r=e-1,i=document.createElement(`div`);i.classList.add(`splitpanes__splitter`),n||(i.onmousedown=e=>w(e,r),typeof window<`u`&&`ontouchstart`in window&&(i.ontouchstart=e=>w(e,r)),i.onclick=e=>O(e,r+1)),i.ondblclick=e=>k(e,r+1),t.parentNode.insertBefore(i,t)},z=e=>{e.onmousedown=void 0,e.onclick=void 0,e.ondblclick=void 0,e.remove()},B=()=>{let e=Array.from(g.value?.children||[]);for(let t of e)t.className.includes(`splitpanes__splitter`)&&z(t);let t=0;for(let n of e)n.className.includes(`splitpanes__pane`)&&(!t&&a.firstSplitter?L(t,n,!0):t&&L(t,n),t++)},re=({uid:e,...t})=>{let n=u.value[e];for(let[e,r]of Object.entries(t))n[e]=r},V=e=>{let t=-1;Array.from(g.value?.children||[]).some(n=>(n.className.includes(`splitpanes__pane`)&&t++,n.isSameNode(e.el))),l.value.splice(t,0,{...e,index:t}),l.value.forEach((e,t)=>e.index=t),_.value&&le(()=>{B(),ie({addedPane:l.value[t]}),oe(`pane-add`,{pane:l.value[t]})})},H=e=>{let t=l.value.findIndex(t=>t.id===e);l.value[t].el=null;let n=l.value.splice(t,1)[0];l.value.forEach((e,t)=>e.index=t),le(()=>{B(),oe(`pane-remove`,{pane:n}),ie({removedPane:{...n}})})},ie=(e={})=>{!e.addedPane&&!e.removedPane?W():l.value.some(e=>e.givenSize!==null||e.min||e.max<100)?ae(e):U(),_.value&&oe(`resized`)},U=()=>{let e=100/f.value,t=0,n=[],r=[];for(let i of l.value)i.size=Math.max(Math.min(e,i.max),i.min),t-=i.size,i.size>=i.max&&n.push(i.id),i.size<=i.min&&r.push(i.id);t>.1&&G(t,n,r)},W=()=>{let e=100,t=[],n=[],r=0;for(let i of l.value)e-=i.size,i.givenSize!==null&&r++,i.size>=i.max&&t.push(i.id),i.size<=i.min&&n.push(i.id);let i=100;if(e>.1){for(let t of l.value)t.givenSize===null&&(t.size=Math.max(Math.min(e/(f.value-r),t.max),t.min)),i-=t.size;i>.1&&G(i,t,n)}},ae=({addedPane:e,removedPane:t}={})=>{let n=100/f.value,r=0,i=[],a=[];(e?.givenSize??null)!==null&&(n=(100-e.givenSize)/(f.value-1));for(let e of l.value)r-=e.size,e.size>=e.max&&i.push(e.id),e.size<=e.min&&a.push(e.id);if(!(Math.abs(r)<.1)){for(let t of l.value)e?.givenSize!==null&&e?.id===t.id||(t.size=Math.max(Math.min(n,t.max),t.min)),r-=t.size,t.size>=t.max&&i.push(t.id),t.size<=t.min&&a.push(t.id);r>.1&&G(r,i,a)}},G=(e,t,n)=>{let r;r=e>0?e/(f.value-t.length):e/(f.value-n.length),l.value.forEach((i,a)=>{if(e>0&&!t.includes(i.id)){let t=Math.max(Math.min(i.size+r,i.max),i.min),n=t-i.size;e-=n,i.size=t}else if(!n.includes(i.id)){let t=Math.max(Math.min(i.size+r,i.max),i.min),n=t-i.size;e-=n,i.size=t}}),Math.abs(e)>.1&&le(()=>{_.value&&console.warn(`Splitpanes: Could not resize panes correctly due to their constraints.`)})},oe=(e,t=void 0,n=!1)=>{let r=t?.index??v.value.activeSplitter??null;i(e,{...t,...r!==null&&{index:r},...n&&r!==null&&{prevPane:l.value[r-(a.firstSplitter?1:0)],nextPane:l.value[r+(a.firstSplitter?0:1)]},panes:l.value.map(e=>({min:e.min,max:e.max,size:e.size}))})};p(()=>a.firstSplitter,()=>B()),n(()=>{I(),B(),ie(),oe(`ready`),_.value=!0}),m(()=>_.value=!1);let se=()=>x(`div`,{ref:g,class:b.value},o.default?.call(o));return r(`panes`,l),r(`indexedPanes`,u),r(`horizontal`,R(()=>a.horizontal)),r(`requestUpdate`,re),r(`onPaneAdd`,V),r(`onPaneRemove`,H),r(`onPaneClick`,A),(e,t)=>(h(),E(d(se)))}},ut={__name:`pane`,props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(t){let r=t,i=oe(`requestUpdate`),a=oe(`onPaneAdd`),o=oe(`horizontal`),s=oe(`onPaneRemove`),l=oe(`onPaneClick`),u=A()?.uid,d=oe(`indexedPanes`),f=R(()=>d.value[u]),g=c(null),_=R(()=>{let e=isNaN(r.size)||r.size===void 0?0:parseFloat(r.size);return Math.max(Math.min(e,y.value),v.value)}),v=R(()=>{let e=parseFloat(r.minSize);return isNaN(e)?0:e}),y=R(()=>{let e=parseFloat(r.maxSize);return isNaN(e)?100:e}),b=R(()=>`${o.value?`height`:`width`}: ${f.value?.size}%`);return p(()=>_.value,e=>i({uid:u,size:e})),p(()=>v.value,e=>i({uid:u,min:e})),p(()=>y.value,e=>i({uid:u,max:e})),n(()=>{a({id:u,el:g.value,min:v.value,max:y.value,givenSize:r.size===void 0?null:_.value,size:_.value})}),m(()=>s(u)),(t,n)=>(h(),G(`div`,{ref_key:`paneEl`,ref:g,class:`splitpanes__pane`,onClick:n[0]||=e=>O(l)(e,t._.uid),style:H(b.value)},[e(t.$slots,`default`)],4))}},dt=[`title`],Z=F({__name:`IconButton`,props:{title:{},classIcon:{},active:{type:Boolean}},setup(t){let n=t;return(t,r)=>(h(),G(`button`,{"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,class:W(n.active?`bg-active op90 text-green-400`:``),hover:`bg-active op100`,op50:``,title:n.title},[e(t.$slots,`default`,{},()=>[U(`div`,{class:W(n.classIcon)},null,2)])],10,dt))}}),Q=Object.assign(Z,{__name:`DisplayIconButton`}),ft=Ze(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n||=self,n.CodeMirror=r())})(e,(function(){var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),a=/Edge\/(\d+)/.exec(e),o=r||i||a,s=o&&(r?document.documentMode||6:+(a||i)[1]),c=!a&&/WebKit\//.test(e),l=c&&/Qt\/\d+\.\d+/.test(e),u=!a&&/Chrome\/(\d+)/.exec(e),d=u&&+u[1],f=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),m=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),g=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),_=/Android/.test(e),v=g||_||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),x=/win/i.test(t),S=f&&e.match(/Version\/(\d*\.\d*)/);S&&=Number(S[1]),S&&S>=15&&(f=!1,c=!0);var C=y&&(l||f&&(S==null||S<12.11)),w=n||o&&s>=9;function T(e){return RegExp(`(^|\\s)`+e+`(?:$|\\s)\\s*`)}var E=function(e,t){var n=e.className,r=T(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:``)}};function D(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function O(e,t){return D(e).appendChild(t)}function k(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t==`string`)i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function A(e,t,n,r){var i=k(e,t,n,r);return i.setAttribute(`role`,`presentation`),i}var j=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd(`character`,n),r.moveStart(`character`,t),r};function M(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function N(e){var t=e.ownerDocument||e,n;try{n=e.activeElement}catch{n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function ee(e,t){var n=e.className;T(t).test(n)||(e.className+=(n?` `:``)+t)}function P(e,t){for(var n=e.split(` `),r=0;r<n.length;r++)n[r]&&!T(n[r]).test(t)&&(t+=` `+n[r]);return t}var te=function(e){e.select()};g?te=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&(te=function(e){try{e.select()}catch{}});function F(e){return e.display.wrapper.ownerDocument}function ne(e){return I(e.display.wrapper)}function I(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function L(e){return F(e).defaultView}function R(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function z(e,t,n){for(var r in t||={},e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function B(e,t,n,r,i){t??(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=r||0,o=i||0;;){var s=e.indexOf(` `,a);if(s<0||s>=t)return o+(t-a);o+=s-a,o+=n-o%n,a=s+1}}var re=function(){this.id=null,this.f=null,this.time=0,this.handler=R(this.onTimeout,this)};re.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},re.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function V(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var H=50,ie={toString:function(){return`CodeMirror.Pass`}},U={scroll:!1},W={origin:`*mouse`},ae={origin:`+move`};function G(e,t,n){for(var r=0,i=0;;){var a=e.indexOf(` `,r);a==-1&&(a=e.length);var o=a-r;if(a==e.length||i+o>=t)return r+Math.min(o,t-i);if(i+=a-r,i+=n-i%n,r=a+1,i>=t)return r}}var oe=[``];function se(e){for(;oe.length<=e;)oe.push(K(oe)+` `);return oe[e]}function K(e){return e[e.length-1]}function ce(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function le(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function ue(){}function de(e,t){var n;return Object.create?n=Object.create(e):(ue.prototype=e,n=new ue),t&&z(t,n),n}var fe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function pe(e){return/\w/.test(e)||e>`€`&&(e.toUpperCase()!=e.toLowerCase()||fe.test(e))}function me(e,t){return t?t.source.indexOf(`\\w`)>-1&&pe(e)?!0:t.test(e):pe(e)}function he(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ge=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function _e(e){return e.charCodeAt(0)>=768&&ge.test(e)}function ve(e,t,n){for(;(n<0?t>0:t<e.length)&&_e(e.charAt(t));)t+=n;return t}function ye(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}function be(e,t,n,r){if(!e)return r(t,n,`ltr`,0);for(var i=!1,a=0;a<e.length;++a){var o=e[a];(o.from<n&&o.to>t||t==n&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,n),o.level==1?`rtl`:`ltr`,a),i=!0)}i||r(t,n,`ltr`)}var xe=null;function Se(e,t,n){var r;xe=null;for(var i=0;i<e.length;++i){var a=e[i];if(a.from<t&&a.to>t)return i;a.to==t&&(a.from!=a.to&&n==`before`?r=i:xe=i),a.from==t&&(a.from!=a.to&&n!=`before`?r=i:xe=i)}return r??xe}var Ce=(function(){var e=`bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN`,t=`nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111`;function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?`R`:1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?`r`:8192<=n&&n<=8203?`w`:n==8204?`b`:`L`}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function c(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var l=t==`ltr`?`L`:`R`;if(e.length==0||t==`ltr`&&!r.test(e))return!1;for(var u=e.length,d=[],f=0;f<u;++f)d.push(n(e.charCodeAt(f)));for(var p=0,m=l;p<u;++p){var h=d[p];h==`m`?d[p]=m:m=h}for(var g=0,_=l;g<u;++g){var v=d[g];v==`1`&&_==`r`?d[g]=`n`:a.test(v)&&(_=v,v==`r`&&(d[g]=`R`))}for(var y=1,b=d[0];y<u-1;++y){var x=d[y];x==`+`&&b==`1`&&d[y+1]==`1`?d[y]=`1`:x==`,`&&b==d[y+1]&&(b==`1`||b==`n`)&&(d[y]=b),b=x}for(var S=0;S<u;++S){var C=d[S];if(C==`,`)d[S]=`N`;else if(C==`%`){var w=void 0;for(w=S+1;w<u&&d[w]==`%`;++w);for(var T=S&&d[S-1]==`!`||w<u&&d[w]==`1`?`1`:`N`,E=S;E<w;++E)d[E]=T;S=w-1}}for(var D=0,O=l;D<u;++D){var k=d[D];O==`L`&&k==`1`?d[D]=`L`:a.test(k)&&(O=k)}for(var A=0;A<u;++A)if(i.test(d[A])){var j=void 0;for(j=A+1;j<u&&i.test(d[j]);++j);for(var M=(A?d[A-1]:l)==`L`,N=M==((j<u?d[j]:l)==`L`)?M?`L`:`R`:l,ee=A;ee<j;++ee)d[ee]=N;A=j-1}for(var P=[],te,F=0;F<u;)if(o.test(d[F])){var ne=F;for(++F;F<u&&o.test(d[F]);++F);P.push(new c(0,ne,F))}else{var I=F,L=P.length,R=t==`rtl`?1:0;for(++F;F<u&&d[F]!=`L`;++F);for(var z=I;z<F;)if(s.test(d[z])){I<z&&(P.splice(L,0,new c(1,I,z)),L+=R);var B=z;for(++z;z<F&&s.test(d[z]);++z);P.splice(L,0,new c(2,B,z)),L+=R,I=z}else ++z;I<F&&P.splice(L,0,new c(1,I,F))}return t==`ltr`&&(P[0].level==1&&(te=e.match(/^\s+/))&&(P[0].from=te[0].length,P.unshift(new c(0,0,te[0].length))),K(P).level==1&&(te=e.match(/\s+$/))&&(K(P).to-=te[0].length,P.push(new c(0,u-te[0].length,u)))),t==`rtl`?P.reverse():P}})();function q(e,t){var n=e.order;return n??=e.order=Ce(e.text,t),n}var we=[],J=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent(`on`+t,n);else{var r=e._handlers||={};r[t]=(r[t]||we).concat(n)}};function Te(e,t){return e._handlers&&e._handlers[t]||we}function Ee(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent(`on`+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var a=V(i,n);a>-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function Y(e,t){var n=Te(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function De(e,t,n){return typeof t==`string`&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Y(e,n||t.type,e,t),Ne(t)||t.codemirrorIgnore}function Oe(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)V(n,t[r])==-1&&n.push(t[r])}function ke(e,t){return Te(e,t).length>0}function Ae(e){e.prototype.on=function(e,t){J(this,e,t)},e.prototype.off=function(e,t){Ee(this,e,t)}}function je(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Me(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ne(e){return e.defaultPrevented==null?e.returnValue==0:e.defaultPrevented}function Pe(e){je(e),Me(e)}function Fe(e){return e.target||e.srcElement}function Ie(e){var t=e.which;return t??(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),y&&e.ctrlKey&&t==1&&(t=3),t}var Le=function(){if(o&&s<9)return!1;var e=k(`div`);return`draggable`in e||`dragDrop`in e}(),Re;function ze(e){if(Re==null){var t=k(`span`,`​`);O(e,k(`span`,[t,document.createTextNode(`x`)])),e.firstChild.offsetHeight!=0&&(Re=t.offsetWidth<=1&&t.offsetHeight>2&&!(o&&s<8))}var n=Re?k(`span`,`​`):k(`span`,`\xA0`,null,`display: inline-block; width: 1px; margin-right: -1px`);return n.setAttribute(`cm-text`,``),n}var Be;function Ve(e){if(Be!=null)return Be;var t=O(e,document.createTextNode(`AخA`)),n=j(t,0,1).getBoundingClientRect(),r=j(t,1,2).getBoundingClientRect();return D(e),!n||n.left==n.right?!1:Be=r.right-n.right<3}var He=`
2
+
3
+ b`.split(/\n/).length==3?function(e){return e.split(/\r\n?|\n/)}:function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
4
+ `,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)==`\r`?i-1:i),o=a.indexOf(`\r`);o==-1?(n.push(a),t=i+1):(n.push(a.slice(0,o)),t+=o+1)}return n},Ue=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints(`StartToEnd`,t)!=0},We=(function(){var e=k(`div`);return`oncopy`in e?!0:(e.setAttribute(`oncopy`,`return;`),typeof e.oncopy==`function`)})(),Ge=null;function Ke(e){if(Ge!=null)return Ge;var t=O(e,k(`span`,`x`)),n=t.getBoundingClientRect(),r=j(t,0,1).getBoundingClientRect();return Ge=Math.abs(n.left-r.left)>1}var qe={},Je={};function Ye(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),qe[e]=t}function Xe(e,t){Je[e]=t}function Ze(e){if(typeof e==`string`&&Je.hasOwnProperty(e))e=Je[e];else if(e&&typeof e.name==`string`&&Je.hasOwnProperty(e.name)){var t=Je[e.name];typeof t==`string`&&(t={name:t}),e=de(t,e),e.name=t.name}else if(typeof e==`string`&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ze(`application/xml`);else if(typeof e==`string`&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ze(`application/json`);return typeof e==`string`?{name:e}:e||{name:`null`}}function Qe(e,t){t=Ze(t);var n=qe[t.name];if(!n)return Qe(e,`text/plain`);var r=n(e,t);if($e.hasOwnProperty(t.name)){var i=$e[t.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r[`_`+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r}var $e={};function et(e,t){z(t,$e.hasOwnProperty(e)?$e[e]:$e[e]={})}function tt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function nt(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function rt(e,t,n){return e.startState?e.startState(t,n):!0}var it=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};it.prototype.eol=function(){return this.pos>=this.string.length},it.prototype.sol=function(){return this.pos==this.lineStart},it.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},it.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},it.prototype.eat=function(e){var t=this.string.charAt(this.pos);if(typeof e==`string`?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},it.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},it.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},it.prototype.skipToEnd=function(){this.pos=this.string.length},it.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},it.prototype.backUp=function(e){this.pos-=e},it.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=B(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?B(this.string,this.lineStart,this.tabSize):0)},it.prototype.indentation=function(){return B(this.string,null,this.tabSize)-(this.lineStart?B(this.string,this.lineStart,this.tabSize):0)},it.prototype.match=function(e,t,n){if(typeof e==`string`){var r=function(e){return n?e.toLowerCase():e};if(r(this.string.substr(this.pos,e.length))==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&t!==!1&&(this.pos+=i[0].length),i)}},it.prototype.current=function(){return this.string.slice(this.start,this.pos)},it.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},it.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},it.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function X(e,t){if(t-=e.first,t<0||t>=e.size)throw Error(`There is no line `+(t+e.first)+` in the document.`);for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t<a){n=i;break}t-=a}return n.lines[t]}function at(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var a=e.text;i==n.line&&(a=a.slice(0,n.ch)),i==t.line&&(a=a.slice(t.ch)),r.push(a),++i}),r}function ot(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function st(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function ct(e){if(e.parent==null)return null;for(var t=e.parent,n=V(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function lt(e,t){var n=e.first;outer:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],a=i.height;if(t<a){e=i;continue outer}t-=a,n+=i.chunkSize()}return n}while(!e.lines);for(var o=0;o<e.lines.length;++o){var s=e.lines[o].height;if(t<s)break;t-=s}return n+o}function ut(e,t){return t>=e.first&&t<e.first+e.size}function dt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Z(e,t,n){if(n===void 0&&(n=null),!(this instanceof Z))return new Z(e,t,n);this.line=e,this.ch=t,this.sticky=n}function Q(e,t){return e.line-t.line||e.ch-t.ch}function ft(e,t){return e.sticky==t.sticky&&Q(e,t)==0}function pt(e){return Z(e.line,e.ch)}function mt(e,t){return Q(e,t)<0?t:e}function ht(e,t){return Q(e,t)<0?e:t}function gt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function $(e,t){if(t.line<e.first)return Z(e.first,0);var n=e.first+e.size-1;return t.line>n?Z(n,X(e,n).text.length):_t(t,X(e,t.line).text.length)}function _t(e,t){var n=e.ch;return n==null||n>t?Z(e.line,t):n<0?Z(e.line,0):e}function vt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=$(e,t[r]);return n}var yt=function(e,t){this.state=e,this.lookAhead=t},bt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};bt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},bt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,``),size:this.baseTokens[this.baseTokenPos]-e}},bt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},bt.fromSaved=function(e,t,n){return t instanceof yt?new bt(e,tt(e.mode,t.state),n,t.lookAhead):new bt(e,tt(e.mode,t),n)},bt.prototype.save=function(e){var t=e===!1?this.state:tt(this.doc.mode,this.state);return this.maxLookAhead>0?new yt(t,this.maxLookAhead):t};function xt(e,t,n,r){var i=[e.state.modeGen],a={};At(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},a,r);for(var o=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],c=1,l=0;n.state=!0,At(e,t.text,s.mode,n,function(e,t){for(var n=c;l<e;){var r=i[c];r>e&&i.splice(c,1,e,i[c+1],r),c+=2,l=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,c-n,e,`overlay `+t),c=n+2;else for(;n<c;n+=2){var a=i[n+1];i[n+1]=(a?a+` `:``)+`overlay `+t}},a),n.state=o,n.baseTokens=null,n.baseTokenPos=1},c=0;c<e.state.overlays.length;++c)s(c);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function St(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Ct(e,ct(t)),i=t.text.length>e.options.maxHighlightLength&&tt(e.doc.mode,r.state),a=xt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&=null,n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ct(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new bt(r,!0,t);var a=jt(e,t,n),o=a>r.first&&X(r,a-1).stateAfter,s=o?bt.fromSaved(r,o,a):new bt(r,rt(r.mode),a);return r.iter(a,t,function(n){wt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?s.save():null,s.nextLine()}),n&&(r.modeFrontier=s.line),s}function wt(e,t,n,r){var i=e.doc.mode,a=new it(t,e.options.tabSize,n);for(a.start=a.pos=r||0,t==``&&Tt(i,n.state);!a.eol();)Et(i,a,n.state),a.start=a.pos}function Tt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=nt(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function Et(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=nt(e,n).mode);var a=e.token(t,n);if(t.pos>t.start)return a}throw Error(`Mode `+e.name+` failed to advance stream.`)}var Dt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Ot(e,t,n,r){var i=e.doc,a=i.mode,o;t=$(i,t);var s=X(i,t.line),c=Ct(e,t.line,n),l=new it(s.text,e.options.tabSize,c),u;for(r&&(u=[]);(r||l.pos<t.ch)&&!l.eol();)l.start=l.pos,o=Et(a,l,c.state),r&&u.push(new Dt(l,o,tt(i.mode,c.state)));return r?u:new Dt(l,o,c.state)}function kt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?`bgClass`:`textClass`;t[r]==null?t[r]=n[2]:RegExp(`(?:^|\\s)`+n[2]+`(?:$|\\s)`).test(t[r])||(t[r]+=` `+n[2])}return e}function At(e,t,n,r,i,a,o){var s=n.flattenSpans;s??=e.options.flattenSpans;var c=0,l=null,u=new it(t,e.options.tabSize,r),d,f=e.options.addModeClass&&[null];for(t==``&&kt(Tt(n,r.state),a);!u.eol();){if(u.pos>e.options.maxHighlightLength?(s=!1,o&&wt(e,t,r,u.pos),u.pos=t.length,d=null):d=kt(Et(n,u,r.state,f),a),f){var p=f[0].name;p&&(d=`m-`+(d?p+` `+d:p))}if(!s||l!=d){for(;c<u.start;)c=Math.min(u.start,c+5e3),i(c,l);l=d}u.start=u.pos}for(;c<u.pos;){var m=Math.min(u.pos,c+5e3);i(m,l),c=m}}function jt(e,t,n){for(var r,i,a=e.doc,o=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=a.first)return a.first;var c=X(a,s-1),l=c.stateAfter;if(l&&(!n||s+(l instanceof yt?l.lookAhead:0)<=a.modeFrontier))return s;var u=B(c.text,null,e.options.tabSize);(i==null||r>u)&&(i=s-1,r=u)}return i}function Mt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=X(e,r).stateAfter;if(i&&(!(i instanceof yt)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var Nt=!1,Pt=!1;function Ft(){Nt=!0}function It(){Pt=!0}function Lt(e,t,n){this.marker=e,this.from=t,this.to=n}function Rt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function zt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||=[]).push(e[r]);return n}function Bt(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||=new WeakSet);r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function Vt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker;if(a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t)||a.from==t&&o.type==`bookmark`&&(!n||!a.marker.insertLeft)){var s=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);(r||=[]).push(new Lt(o,a.from,s?null:a.to))}}return r}function Ht(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker;if(a.to==null||(o.inclusiveRight?a.to>=t:a.to>t)||a.from==t&&o.type==`bookmark`&&(!n||a.marker.insertLeft)){var s=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);(r||=[]).push(new Lt(o,s?null:a.from-t,a.to==null?null:a.to-t))}}return r}function Ut(e,t){if(t.full)return null;var n=ut(e,t.from.line)&&X(e,t.from.line).markedSpans,r=ut(e,t.to.line)&&X(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,a=t.to.ch,o=Q(t.from,t.to)==0,s=Vt(n,i,o),c=Ht(r,a,o),l=t.text.length==1,u=K(t.text).length+(l?i:0);if(s)for(var d=0;d<s.length;++d){var f=s[d];if(f.to==null){var p=Rt(c,f.marker);p?l&&(f.to=p.to==null?null:p.to+u):f.to=i}}if(c)for(var m=0;m<c.length;++m){var h=c[m];h.to!=null&&(h.to+=u),h.from==null?Rt(s,h.marker)||(h.from=u,l&&(s||=[]).push(h)):(h.from+=u,l&&(s||=[]).push(h))}s&&=Wt(s),c&&c!=s&&(c=Wt(c));var g=[s];if(!l){var _=t.text.length-2,v;if(_>0&&s)for(var y=0;y<s.length;++y)s[y].to??(v||=[]).push(new Lt(s[y].marker,null,null));for(var b=0;b<_;++b)g.push(v);g.push(c)}return g}function Wt(e){for(var t=0;t<e.length;++t){var n=e[t];n.from!=null&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Gt(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;n.readOnly&&(!r||V(r,n)==-1)&&(r||=[]).push(n)}}),!r)return null;for(var i=[{from:t,to:n}],a=0;a<r.length;++a)for(var o=r[a],s=o.find(0),c=0;c<i.length;++c){var l=i[c];if(!(Q(l.to,s.from)<0||Q(l.from,s.to)>0)){var u=[c,1],d=Q(l.from,s.from),f=Q(l.to,s.to);(d<0||!o.inclusiveLeft&&!d)&&u.push({from:l.from,to:s.from}),(f>0||!o.inclusiveRight&&!f)&&u.push({from:s.to,to:l.to}),i.splice.apply(i,u),c+=u.length-3}}return i}function Kt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function qt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Jt(e){return e.inclusiveLeft?-1:0}function Yt(e){return e.inclusiveRight?1:0}function Xt(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),i=t.find(),a=Q(r.from,i.from)||Jt(e)-Jt(t);return a?-a:Q(r.to,i.to)||Yt(e)-Yt(t)||t.id-e.id}function Zt(e,t){var n=Pt&&e.markedSpans,r;if(n)for(var i=void 0,a=0;a<n.length;++a)i=n[a],i.marker.collapsed&&(t?i.from:i.to)==null&&(!r||Xt(r,i.marker)<0)&&(r=i.marker);return r}function Qt(e){return Zt(e,!0)}function $t(e){return Zt(e,!1)}function en(e,t){var n=Pt&&e.markedSpans,r;if(n)for(var i=0;i<n.length;++i){var a=n[i];a.marker.collapsed&&(a.from==null||a.from<t)&&(a.to==null||a.to>t)&&(!r||Xt(r,a.marker)<0)&&(r=a.marker)}return r}function tn(e,t,n,r,i){var a=X(e,t),o=Pt&&a.markedSpans;if(o)for(var s=0;s<o.length;++s){var c=o[s];if(c.marker.collapsed){var l=c.marker.find(0),u=Q(l.from,n)||Jt(c.marker)-Jt(i),d=Q(l.to,r)||Yt(c.marker)-Yt(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?Q(l.to,n)>=0:Q(l.to,n)>0)||u>=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?Q(l.from,r)<=0:Q(l.from,r)<0)))return!0}}}function nn(e){for(var t;t=Qt(e);)e=t.find(-1,!0).line;return e}function rn(e){for(var t;t=$t(e);)e=t.find(1,!0).line;return e}function an(e){for(var t,n;t=$t(e);)e=t.find(1,!0).line,(n||=[]).push(e);return n}function on(e,t){var n=X(e,t),r=nn(n);return n==r?t:ct(r)}function sn(e,t){if(t>e.lastLine())return t;var n=X(e,t),r;if(!cn(e,n))return t;for(;r=$t(n);)n=r.find(1,!0).line;return ct(n)+1}function cn(e,t){var n=Pt&&t.markedSpans;if(n){for(var r=void 0,i=0;i<n.length;++i)if(r=n[i],r.marker.collapsed&&(r.from==null||!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&ln(e,t,r)))return!0}}function ln(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return ln(e,r.line,Rt(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,a=0;a<t.markedSpans.length;++a)if(i=t.markedSpans[a],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(i.to==null||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&ln(e,t,i))return!0}function un(e){e=nn(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var a=n.parent;a;n=a,a=n.parent)for(var o=0;o<a.children.length;++o){var s=a.children[o];if(s==n)break;t+=s.height}return t}function dn(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=Qt(r);){var i=n.find(0,!0);r=i.from.line,t+=i.from.ch-i.to.ch}for(r=e;n=$t(r);){var a=n.find(0,!0);t-=r.text.length-a.from.ch,r=a.to.line,t+=r.text.length-a.to.ch}return t}function fn(e){var t=e.display,n=e.doc;t.maxLine=X(n,n.first),t.maxLineLength=dn(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=dn(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var pn=function(e,t,n){this.text=e,qt(this,t),this.height=n?n(this):1};pn.prototype.lineNo=function(){return ct(this)},Ae(pn);function mn(e,t,n,r){e.text=t,e.stateAfter&&=null,e.styles&&=null,e.order!=null&&(e.order=null),Kt(e),qt(e,n);var i=r?r(e):1;i!=e.height&&st(e,i)}function hn(e){e.parent=null,Kt(e)}var gn={},_n={};function vn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?_n:gn;return n[e]||(n[e]=e.replace(/\S+/g,`cm-$&`))}function yn(e,t){var n=A(`span`,null,null,c?`padding-right: .1px`:null),r={pre:A(`pre`,[n],`CodeMirror-line`),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption(`lineWrapping`)};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;r.pos=0,r.addToken=xn,Ve(e.display.measure)&&(o=q(a,e.doc.direction))&&(r.addToken=Cn(r.addToken,o)),r.map=[],Tn(a,r,St(e,a,t!=e.display.externalMeasured&&ct(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=P(a.styleClasses.bgClass,r.bgClass||``)),a.styleClasses.textClass&&(r.textClass=P(a.styleClasses.textClass,r.textClass||``))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(ze(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(c){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(`.cm-tab`))&&(r.content.className=`cm-tab-wrap-hack`)}return Y(e,`renderLine`,e,t.line,r.pre),r.pre.className&&(r.textClass=P(r.pre.className,r.textClass||``)),r}function bn(e){var t=k(`span`,`•`,`cm-invalidchar`);return t.title=`\\u`+e.charCodeAt(0).toString(16),t.setAttribute(`aria-label`,t.title),t}function xn(e,t,n,r,i,a,c){if(t){var l=e.splitSpaces?Sn(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1,f;if(!u.test(t))e.col+=t.length,f=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,f),o&&s<9&&(d=!0),e.pos+=t.length;else{f=document.createDocumentFragment();for(var p=0;;){u.lastIndex=p;var m=u.exec(t),h=m?m.index-p:t.length-p;if(h){var g=document.createTextNode(l.slice(p,p+h));o&&s<9?f.appendChild(k(`span`,[g])):f.appendChild(g),e.map.push(e.pos,e.pos+h,g),e.col+=h,e.pos+=h}if(!m)break;p+=h+1;var _=void 0;if(m[0]==` `){var v=e.cm.options.tabSize,y=v-e.col%v;_=f.appendChild(k(`span`,se(y),`cm-tab`)),_.setAttribute(`role`,`presentation`),_.setAttribute(`cm-text`,` `),e.col+=y}else m[0]==`\r`||m[0]==`
5
+ `?(_=f.appendChild(k(`span`,m[0]==`\r`?`␍`:`␤`,`cm-invalidchar`)),_.setAttribute(`cm-text`,m[0]),e.col+=1):(_=e.cm.options.specialCharPlaceholder(m[0]),_.setAttribute(`cm-text`,m[0]),o&&s<9?f.appendChild(k(`span`,[_])):f.appendChild(_),e.col+=1);e.map.push(e.pos,e.pos+1,_),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,n||r||i||d||a||c){var b=n||``;r&&(b+=r),i&&(b+=i);var x=k(`span`,[f],b,a);if(c)for(var S in c)c.hasOwnProperty(S)&&S!=`style`&&S!=`class`&&x.setAttribute(S,c[S]);return e.content.appendChild(x)}e.content.appendChild(f)}}function Sn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r=``,i=0;i<e.length;i++){var a=e.charAt(i);a==` `&&n&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(a=`\xA0`),r+=a,n=a==` `}return r}function Cn(e,t){return function(n,r,i,a,o,s,c){i=i?i+` cm-force-border`:`cm-force-border`;for(var l=n.pos,u=l+r.length;;){for(var d=void 0,f=0;f<t.length&&(d=t[f],!(d.to>l&&d.from<=l));f++);if(d.to>=u)return e(n,r,i,a,o,s,c);e(n,r.slice(0,d.to-l),i,a,null,s,c),a=null,r=r.slice(d.to-l),l=d.to}}}function wn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||=e.content.appendChild(document.createElement(`span`)),i.setAttribute(`cm-marker`,n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Tn(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(!r){for(var o=1;o<n.length;o+=2)t.addToken(t,i.slice(a,a=n[o]),vn(n[o+1],t.cm.options));return}for(var s=i.length,c=0,l=1,u=``,d,f,p=0,m,h,g,_,v;;){if(p==c){m=h=g=f=``,v=null,_=null,p=1/0;for(var y=[],b=void 0,x=0;x<r.length;++x){var S=r[x],C=S.marker;if(C.type==`bookmark`&&S.from==c&&C.widgetNode)y.push(C);else if(S.from<=c&&(S.to==null||S.to>c||C.collapsed&&S.to==c&&S.from==c)){if(S.to!=null&&S.to!=c&&p>S.to&&(p=S.to,h=``),C.className&&(m+=` `+C.className),C.css&&(f=(f?f+`;`:``)+C.css),C.startStyle&&S.from==c&&(g+=` `+C.startStyle),C.endStyle&&S.to==p&&(b||=[]).push(C.endStyle,S.to),C.title&&((v||={}).title=C.title),C.attributes)for(var w in C.attributes)(v||={})[w]=C.attributes[w];C.collapsed&&(!_||Xt(_.marker,C)<0)&&(_=S)}else S.from>c&&p>S.from&&(p=S.from)}if(b)for(var T=0;T<b.length;T+=2)b[T+1]==p&&(h+=` `+b[T]);if(!_||_.from==c)for(var E=0;E<y.length;++E)wn(t,0,y[E]);if(_&&(_.from||0)==c){if(wn(t,(_.to==null?s+1:_.to)-c,_.marker,_.from==null),_.to==null)return;_.to==c&&(_=!1)}}if(c>=s)break;for(var D=Math.min(s,p);;){if(u){var O=c+u.length;if(!_){var k=O>D?u.slice(0,D-c):u;t.addToken(t,k,d?d+m:m,g,c+k.length==p?h:``,f,v)}if(O>=D){u=u.slice(D-c),c=D;break}c=O,g=``}u=i.slice(a,a=n[l++]),d=vn(n[l++],t.cm.options)}}}function En(e,t,n){this.line=t,this.rest=an(t),this.size=this.rest?ct(K(this.rest))-n+1:1,this.node=this.text=null,this.hidden=cn(e,t)}function Dn(e,t,n){for(var r=[],i,a=t;a<n;a=i){var o=new En(e.doc,X(e.doc,a),a);i=a+o.size,r.push(o)}return r}var On=null;function kn(e){On?On.ops.push(e):e.ownsGroup=On={ops:[e],delayedCallbacks:[]}}function An(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function jn(e,t){var n=e.ownsGroup;if(n)try{An(n)}finally{On=null,t(n)}}var Mn=null;function Nn(e,t){var n=Te(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;On?i=On.delayedCallbacks:Mn?i=Mn:(i=Mn=[],setTimeout(Pn,0));for(var a=function(e){i.push(function(){return n[e].apply(null,r)})},o=0;o<n.length;++o)a(o)}}function Pn(){var e=Mn;Mn=null;for(var t=0;t<e.length;++t)e[t]()}function Fn(e,t,n,r){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];a==`text`?zn(e,t):a==`gutter`?Vn(e,t,n,r):a==`class`?Bn(e,t):a==`widget`&&Hn(e,t,r)}t.changes=null}function In(e){return e.node==e.text&&(e.node=k(`div`,null,null,`position: relative`),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),o&&s<8&&(e.node.style.zIndex=2)),e.node}function Ln(e,t){var n=t.bgClass?t.bgClass+` `+(t.line.bgClass||``):t.line.bgClass;if(n&&(n+=` CodeMirror-linebackground`),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=In(t);t.background=r.insertBefore(k(`div`,null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Rn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):yn(e,t)}function zn(e,t){var n=t.text.className,r=Rn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Bn(e,t)):n&&(t.text.className=n)}function Bn(e,t){Ln(e,t),t.line.wrapClass?In(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className=``);var n=t.textClass?t.textClass+` `+(t.line.textClass||``):t.line.textClass;t.text.className=n||``}function Vn(e,t,n,r){if(t.gutter&&=(t.node.removeChild(t.gutter),null),t.gutterBackground&&=(t.node.removeChild(t.gutterBackground),null),t.line.gutterClass){var i=In(t);t.gutterBackground=k(`div`,null,`CodeMirror-gutter-background `+t.line.gutterClass,`left: `+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+`px; width: `+r.gutterTotalWidth+`px`),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var o=In(t),s=t.gutter=k(`div`,null,`CodeMirror-gutter-wrapper`,`left: `+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+`px`);if(s.setAttribute(`aria-hidden`,`true`),e.display.input.setUneditable(s),o.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=` `+t.line.gutterClass),e.options.lineNumbers&&(!a||!a[`CodeMirror-linenumbers`])&&(t.lineNumber=s.appendChild(k(`div`,dt(e.options,n),`CodeMirror-linenumber CodeMirror-gutter-elt`,`left: `+r.gutterLeft[`CodeMirror-linenumbers`]+`px; width: `+e.display.lineNumInnerWidth+`px`))),a)for(var c=0;c<e.display.gutterSpecs.length;++c){var l=e.display.gutterSpecs[c].className,u=a.hasOwnProperty(l)&&a[l];u&&s.appendChild(k(`div`,[u],`CodeMirror-gutter-elt`,`left: `+r.gutterLeft[l]+`px; width: `+r.gutterWidth[l]+`px`))}}}function Hn(e,t,n){t.alignable&&=null;for(var r=T(`CodeMirror-linewidget`),i=t.node.firstChild,a=void 0;i;i=a)a=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Wn(e,t,n)}function Un(e,t,n,r){var i=Rn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Bn(e,t),Vn(e,t,n,r),Wn(e,t,r),t.node}function Wn(e,t,n){if(Gn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Gn(e,t.rest[r],t,n,!1)}function Gn(e,t,n,r,i){if(t.widgets)for(var a=In(n),o=0,s=t.widgets;o<s.length;++o){var c=s[o],l=k(`div`,[c.node],`CodeMirror-linewidget`+(c.className?` `+c.className:``));c.handleMouseEvents||l.setAttribute(`cm-ignore-events`,`true`),Kn(c,l,n,r),e.display.input.setUneditable(l),i&&c.above?a.insertBefore(l,n.gutter||n.text):a.appendChild(l),Nn(c,`redraw`)}}function Kn(e,t,n,r){if(e.noHScroll){(n.alignable||=[]).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+`px`,e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+`px`),t.style.width=i+`px`}e.coverGutter&&(t.style.zIndex=5,t.style.position=`relative`,e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+`px`))}function qn(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!M(document.body,e.node)){var n=`position: relative;`;e.coverGutter&&(n+=`margin-left: -`+t.display.gutters.offsetWidth+`px;`),e.noHScroll&&(n+=`width: `+t.display.wrapper.clientWidth+`px;`),O(t.display.measure,k(`div`,[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Jn(e,t){for(var n=Fe(t);n!=e.wrapper;n=n.parentNode)if(!n||n.nodeType==1&&n.getAttribute(`cm-ignore-events`)==`true`||n.parentNode==e.sizer&&n!=e.mover)return!0}function Yn(e){return e.lineSpace.offsetTop}function Xn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Zn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=O(e.measure,k(`pre`,`x`,`CodeMirror-line-like`)),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return!isNaN(r.left)&&!isNaN(r.right)&&(e.cachedPaddingH=r),r}function Qn(e){return H-e.display.nativeBarWidth}function $n(e){return e.display.scroller.clientWidth-Qn(e)-e.display.barWidth}function er(e){return e.display.scroller.clientHeight-Qn(e)-e.display.barHeight}function tr(e,t,n){var r=e.options.lineWrapping,i=r&&$n(e);if(!t.measure.heights||r&&t.measure.width!=i){var a=t.measure.heights=[];if(r){t.measure.width=i;for(var o=t.text.firstChild.getClientRects(),s=0;s<o.length-1;s++){var c=o[s],l=o[s+1];Math.abs(c.bottom-l.bottom)>2&&a.push((c.bottom+l.top)/2-n.top)}}a.push(n.bottom-n.top)}}function nr(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(ct(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function rr(e,t){t=nn(t);var n=ct(t),r=e.display.externalMeasured=new En(e.doc,t,n);r.lineN=n;var i=r.built=yn(e,r);return r.text=i.pre,O(e.display.lineMeasure,i.pre),r}function ir(e,t,n,r){return sr(e,or(e,t),n,r)}function ar(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Br(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function or(e,t){var n=ct(t),r=ar(e,n);r&&!r.text?r=null:r&&r.changes&&(Fn(e,r,n,Fr(e)),e.curOp.forceUpdate=!0),r||=rr(e,t);var i=nr(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function sr(e,t,n,r,i){t.before&&(n=-1);var a=n+(r||``),o;return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||=t.view.text.getBoundingClientRect(),t.hasHeights||=(tr(e,t.view,t.rect),!0),o=dr(e,t,n,r),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var cr={left:0,right:0,top:0,bottom:0};function lr(e,t,n){for(var r,i,a,o,s,c,l=0;l<e.length;l+=3)if(s=e[l],c=e[l+1],t<s?(i=0,a=1,o=`left`):t<c?(i=t-s,a=i+1):(l==e.length-3||t==c&&e[l+3]>t)&&(a=c-s,i=a-1,t>=c&&(o=`right`)),i!=null){if(r=e[l+2],s==c&&n==(r.insertLeft?`left`:`right`)&&(o=n),n==`left`&&i==0)for(;l&&e[l-2]==e[l-3]&&e[l-1].insertLeft;)r=e[(l-=3)+2],o=`left`;if(n==`right`&&i==c-s)for(;l<e.length-3&&e[l+3]==e[l+4]&&!e[l+5].insertLeft;)r=e[(l+=3)+2],o=`right`;break}return{node:r,start:i,end:a,collapse:o,coverStart:s,coverEnd:c}}function ur(e,t){var n=cr;if(t==`left`)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function dr(e,t,n,r){var i=lr(t.map,n,r),a=i.node,c=i.start,l=i.end,u=i.collapse,d;if(a.nodeType==3){for(var f=0;f<4;f++){for(;c&&_e(t.line.text.charAt(i.coverStart+c));)--c;for(;i.coverStart+l<i.coverEnd&&_e(t.line.text.charAt(i.coverStart+l));)++l;if(d=o&&s<9&&c==0&&l==i.coverEnd-i.coverStart?a.parentNode.getBoundingClientRect():ur(j(a,c,l).getClientRects(),r),d.left||d.right||c==0)break;l=c,--c,u=`right`}o&&s<11&&(d=fr(e.display.measure,d))}else{c>0&&(u=r=`right`);var p;d=e.options.lineWrapping&&(p=a.getClientRects()).length>1?p[r==`right`?p.length-1:0]:a.getBoundingClientRect()}if(o&&s<9&&!c&&(!d||!d.left&&!d.right)){var m=a.parentNode.getClientRects()[0];d=m?{left:m.left,right:m.left+Pr(e.display),top:m.top,bottom:m.bottom}:cr}for(var h=d.top-t.rect.top,g=d.bottom-t.rect.top,_=(h+g)/2,v=t.view.measure.heights,y=0;y<v.length-1&&!(_<v[y]);y++);var b=y?v[y-1]:0,x=v[y],S={left:(u==`right`?d.right:d.left)-t.rect.left,right:(u==`left`?d.left:d.right)-t.rect.left,top:b,bottom:x};return!d.left&&!d.right&&(S.bogus=!0),e.options.singleCursorHeightPerLine||(S.rtop=h,S.rbottom=g),S}function fr(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ke(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function pr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function mr(e){e.display.externalMeasure=null,D(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)pr(e.display.view[t])}function hr(e){mr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function gr(e){return u&&_?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function _r(e){return u&&_?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function vr(e){var t=nn(e).widgets,n=0;if(t)for(var r=0;r<t.length;++r)t[r].above&&(n+=qn(t[r]));return n}function yr(e,t,n,r,i){if(!i){var a=vr(t);n.top+=a,n.bottom+=a}if(r==`line`)return n;r||=`local`;var o=un(t);if(r==`local`?o+=Yn(e.display):o-=e.display.viewOffset,r==`page`||r==`window`){var s=e.display.lineSpace.getBoundingClientRect();o+=s.top+(r==`window`?0:_r(F(e)));var c=s.left+(r==`window`?0:gr(F(e)));n.left+=c,n.right+=c}return n.top+=o,n.bottom+=o,n}function br(e,t,n){if(n==`div`)return t;var r=t.left,i=t.top;if(n==`page`)r-=gr(F(e)),i-=_r(F(e));else if(n==`local`||!n){var a=e.display.sizer.getBoundingClientRect();r+=a.left,i+=a.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:r-o.left,top:i-o.top}}function xr(e,t,n,r,i){return r||=X(e.doc,t.line),yr(e,r,ir(e,r,t.ch,i),n)}function Sr(e,t,n,r,i,a){r||=X(e.doc,t.line),i||=or(e,r);function o(t,o){var s=sr(e,i,t,o?`right`:`left`,a);return o?s.left=s.right:s.right=s.left,yr(e,r,s,n)}var s=q(r,e.doc.direction),c=t.ch,l=t.sticky;if(c>=r.text.length?(c=r.text.length,l=`before`):c<=0&&(c=0,l=`after`),!s)return o(l==`before`?c-1:c,l==`before`);function u(e,t,n){var r=s[t].level==1;return o(n?e-1:e,r!=n)}var d=Se(s,c,l),f=xe,p=u(c,d,l==`before`);return f!=null&&(p.other=u(c,f,l!=`before`)),p}function Cr(e,t){var n=0;t=$(e.doc,t),e.options.lineWrapping||(n=Pr(e.display)*t.ch);var r=X(e.doc,t.line),i=un(r)+Yn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function wr(e,t,n,r,i){var a=Z(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function Tr(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return wr(r.first,0,null,-1,-1);var i=lt(r,n),a=r.first+r.size-1;if(i>a)return wr(r.first+r.size-1,X(r,a).text.length,null,1,1);t<0&&(t=0);for(var o=X(r,i);;){var s=kr(e,o,i,t,n),c=en(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!c)return s;var l=c.find(1);if(l.line==i)return l;o=X(r,i=l.line)}}function Er(e,t,n,r){r-=vr(t);var i=t.text.length,a=ye(function(t){return sr(e,n,t-1).bottom<=r},i,0);return i=ye(function(t){return sr(e,n,t).top>r},a,i),{begin:a,end:i}}function Dr(e,t,n,r){n||=or(e,t);var i=yr(e,t,sr(e,n,r),`line`).top;return Er(e,t,n,i)}function Or(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function kr(e,t,n,r,i){i-=un(t);var a=or(e,t),o=vr(t),s=0,c=t.text.length,l=!0,u=q(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?jr:Ar)(e,t,n,a,u,r,i);l=d.level!=1,s=l?d.from:d.to-1,c=l?d.to:d.from-1}var f=null,p=null,m=ye(function(t){var n=sr(e,a,t);return n.top+=o,n.bottom+=o,Or(n,r,i,!1)?(n.top<=i&&n.left<=r&&(f=t,p=n),!0):!1},s,c),h,g,_=!1;if(p){var v=r-p.left<p.right-r,y=v==l;m=f+(y?0:1),g=y?`after`:`before`,h=v?p.left:p.right}else{!l&&(m==c||m==s)&&m++,g=m==0?`after`:m==t.text.length?`before`:sr(e,a,m-(l?1:0)).bottom+o<=i==l?`after`:`before`;var b=Sr(e,Z(n,m,g),`line`,t,a);h=b.left,_=i<b.top?-1:i>=b.bottom?1:0}return m=ve(t.text,m,1),wr(n,m,g,_,r-h)}function Ar(e,t,n,r,i,a,o){var s=ye(function(s){var c=i[s],l=c.level!=1;return Or(Sr(e,Z(n,l?c.to:c.from,l?`before`:`after`),`line`,t,r),a,o,!0)},0,i.length-1),c=i[s];if(s>0){var l=c.level!=1,u=Sr(e,Z(n,l?c.from:c.to,l?`after`:`before`),`line`,t,r);Or(u,a,o,!0)&&u.top>o&&(c=i[s-1])}return c}function jr(e,t,n,r,i,a,o){var s=Er(e,t,r,o),c=s.begin,l=s.end;/\s/.test(t.text.charAt(l-1))&&l--;for(var u=null,d=null,f=0;f<i.length;f++){var p=i[f];if(!(p.from>=l||p.to<=c)){var m=sr(e,r,p.level==1?Math.max(c,p.from):Math.min(l,p.to)-1).right,h=m<a?a-m+1e9:m-a;(!u||d>h)&&(u=p,d=h)}}return u||=i[i.length-1],u.from<c&&(u={from:c,to:u.to,level:u.level}),u.to>l&&(u={from:u.from,to:l,level:u.level}),u}var Mr;function Nr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Mr==null){Mr=k(`pre`,null,`CodeMirror-line-like`);for(var t=0;t<49;++t)Mr.appendChild(document.createTextNode(`x`)),Mr.appendChild(k(`br`));Mr.appendChild(document.createTextNode(`x`))}O(e.measure,Mr);var n=Mr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),D(e.measure),n||1}function Pr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=k(`span`,`xxxxxxxxxx`),n=k(`pre`,[t],`CodeMirror-line-like`);O(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Fr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=e.display.gutterSpecs[o].className;n[s]=a.offsetLeft+a.clientLeft+i,r[s]=a.clientWidth}return{fixedPos:Ir(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Ir(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Lr(e){var t=Nr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Pr(e.display)-3);return function(i){if(cn(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o<i.widgets.length;o++)i.widgets[o].height&&(a+=i.widgets[o].height);return n?a+(Math.ceil(i.text.length/r)||1)*t:a+t}}function Rr(e){var t=e.doc,n=Lr(e);t.iter(function(e){var t=n(e);t!=e.height&&st(e,t)})}function zr(e,t,n,r){var i=e.display;if(!n&&Fe(t).getAttribute(`cm-not-content`)==`true`)return null;var a,o,s=i.lineSpace.getBoundingClientRect();try{a=t.clientX-s.left,o=t.clientY-s.top}catch{return null}var c=Tr(e,a,o),l;if(r&&c.xRel>0&&(l=X(e.doc,c.line).text).length==c.ch){var u=B(l,l.length,e.options.tabSize)-l.length;c=Z(c.line,Math.max(0,Math.round((a-Zn(e.display).left)/Pr(e.display))-u))}return c}function Br(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;r<n.length;r++)if(t-=n[r].size,t<0)return r}function Vr(e,t,n,r){t??=e.doc.first,n??=e.doc.first+e.doc.size,r||=0;var i=e.display;if(r&&n<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Pt&&on(e.doc,t)<i.viewTo&&Ur(e);else if(n<=i.viewFrom)Pt&&sn(e.doc,n+r)>i.viewFrom?Ur(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Ur(e);else if(t<=i.viewFrom){var a=Wr(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):Ur(e)}else if(n>=i.viewTo){var o=Wr(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Ur(e)}else{var s=Wr(e,t,t,-1),c=Wr(e,n,n+r,1);s&&c?(i.view=i.view.slice(0,s.index).concat(Dn(e,s.lineN,c.lineN)).concat(i.view.slice(c.index)),i.viewTo+=r):Ur(e)}var l=i.externalMeasured;l&&(n<l.lineN?l.lineN+=r:t<l.lineN+l.size&&(i.externalMeasured=null))}function Hr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var a=r.view[Br(e,t)];if(a.node!=null){var o=a.changes||=[];V(o,n)==-1&&o.push(n)}}}function Ur(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Wr(e,t,n,r){var i=Br(e,t),a,o=e.display.view;if(!Pt||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var s=e.display.viewFrom,c=0;c<i;c++)s+=o[c].size;if(s!=t){if(r>0){if(i==o.length-1)return null;a=s+o[i].size-t,i++}else a=s-t;t+=a,n+=a}for(;on(e.doc,n)!=n;){if(i==(r<0?0:o.length-1))return null;n+=r*o[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function Gr(e,t,n){var r=e.display;r.view.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=Dn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Dn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Br(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(Dn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Br(e,n)))),r.viewTo=n}function Kr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];!i.hidden&&(!i.node||i.changes)&&++n}return n}function qr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Jr(e,t){t===void 0&&(t=!0);var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),a=r.selection=document.createDocumentFragment(),o=e.options.$customCursor;o&&(t=!0);for(var s=0;s<n.sel.ranges.length;s++)if(!(!t&&s==n.sel.primIndex)){var c=n.sel.ranges[s];if(!(c.from().line>=e.display.viewTo||c.to().line<e.display.viewFrom)){var l=c.empty();if(o){var u=o(e,c);u&&Yr(e,u,i)}else (l||e.options.showCursorWhenSelecting)&&Yr(e,c.head,i);l||Zr(e,c,a)}}return r}function Yr(e,t,n){var r=Sr(e,t,`div`,null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(k(`div`,`\xA0`,`CodeMirror-cursor`));if(i.style.left=r.left+`px`,i.style.top=r.top+`px`,i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+`px`,/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var a=xr(e,t,`div`,null,null),o=a.right-a.left;i.style.width=(o>0?o:e.defaultCharWidth())+`px`}if(r.other){var s=n.appendChild(k(`div`,`\xA0`,`CodeMirror-cursor CodeMirror-secondarycursor`));s.style.display=``,s.style.left=r.other.left+`px`,s.style.top=r.other.top+`px`,s.style.height=(r.other.bottom-r.other.top)*.85+`px`}}function Xr(e,t){return e.top-t.top||e.left-t.left}function Zr(e,t,n){var r=e.display,i=e.doc,a=document.createDocumentFragment(),o=Zn(e.display),s=o.left,c=Math.max(r.sizerWidth,$n(e)-r.sizer.offsetLeft)-o.right,l=i.direction==`ltr`;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),a.appendChild(k(`div`,null,`CodeMirror-selected`,`position: absolute; left: `+e+`px;
6
+ top: `+t+`px; width: `+(n??c-e)+`px;
7
+ height: `+(r-t)+`px`))}function d(t,n,r){var a=X(i,t),o=a.text.length,d,f;function p(n,r){return xr(e,Z(t,n),`div`,a,r)}function m(t,n,r){var i=Dr(e,a,null,t),o=n==`ltr`==(r==`after`)?`left`:`right`;return p(r==`after`?i.begin:i.end-(/\s/.test(a.text.charAt(i.end-1))?2:1),o)[o]}var h=q(a,i.direction);return be(h,n||0,r??o,function(e,t,i,a){var g=i==`ltr`,_=p(e,g?`left`:`right`),v=p(t-1,g?`right`:`left`),y=n==null&&e==0,b=r==null&&t==o,x=a==0,S=!h||a==h.length-1;if(v.top-_.top<=3){var C=(l?y:b)&&x,w=(l?b:y)&&S,T=C?s:(g?_:v).left,E=w?c:(g?v:_).right;u(T,_.top,E-T,_.bottom)}else{var D,O,k,A;g?(D=l&&y&&x?s:_.left,O=l?c:m(e,i,`before`),k=l?s:m(t,i,`after`),A=l&&b&&S?c:v.right):(D=l?m(e,i,`before`):s,O=!l&&y&&x?c:_.right,k=!l&&b&&S?s:v.left,A=l?m(t,i,`after`):c),u(D,_.top,O-D,_.bottom),_.bottom<v.top&&u(s,_.bottom,null,v.top),u(k,v.top,A-k,v.bottom)}(!d||Xr(_,d)<0)&&(d=_),Xr(v,d)<0&&(d=v),(!f||Xr(_,f)<0)&&(f=_),Xr(v,f)<0&&(f=v)}),{start:d,end:f}}var f=t.from(),p=t.to();if(f.line==p.line)d(f.line,f.ch,p.ch);else{var m=X(i,f.line),h=X(i,p.line),g=nn(m)==nn(h),_=d(f.line,f.ch,g?m.text.length+1:null).end,v=d(p.line,g?0:null,p.ch).start;g&&(_.top<v.top-2?(u(_.right,_.top,null,_.bottom),u(s,v.top,v.left,v.bottom)):u(_.right,_.top,v.left-_.right,_.bottom)),_.bottom<v.top&&u(s,_.bottom,null,v.top)}n.appendChild(a)}function Qr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility=``,e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||ni(e),t.cursorDiv.style.visibility=(n=!n)?``:`hidden`},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility=`hidden`)}}function $r(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ti(e))}function ei(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ni(e))},100)}function ti(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!=`nocursor`&&(e.state.focused||(Y(e,`focus`,e,t),e.state.focused=!0,ee(e.display.wrapper,`CodeMirror-focused`),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),c&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Qr(e))}function ni(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Y(e,`blur`,e,t),e.state.focused=!1,E(e.display.wrapper,`CodeMirror-focused`)),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function ri(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,a=0,c=0;c<t.view.length;c++){var l=t.view[c],u=e.options.lineWrapping,d=void 0,f=0;if(!l.hidden){if(i+=l.line.height,o&&s<8){var p=l.node.offsetTop+l.node.offsetHeight;d=p-n,n=p}else{var m=l.node.getBoundingClientRect();d=m.bottom-m.top,!u&&l.text.firstChild&&(f=l.text.firstChild.getBoundingClientRect().right-m.left-1)}var h=l.line.height-d;if((h>.005||h<-.005)&&(i<r&&(a-=h),st(l.line,d),ii(l.line),l.rest))for(var g=0;g<l.rest.length;g++)ii(l.rest[g]);if(f>e.display.sizerWidth){var _=Math.ceil(f/Pr(e.display));_>e.display.maxLineLength&&(e.display.maxLineLength=_,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function ii(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function ai(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Yn(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,a=lt(t,r),o=lt(t,i);if(n&&n.ensure){var s=n.ensure.from.line,c=n.ensure.to.line;s<a?(a=s,o=lt(t,un(X(t,s))+e.wrapper.clientHeight)):Math.min(c,t.lastLine())>=o&&(a=lt(t,un(X(t,c))-e.wrapper.clientHeight),o=c)}return{from:a,to:Math.max(o,a+1)}}function oi(e,t){if(!De(e,`scrollCursorIntoView`)){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,a=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(a.defaultView.innerHeight||a.documentElement.clientHeight)&&(i=!1),i!=null&&!h){var o=k(`div`,`​`,null,`position: absolute;
8
+ top: `+(t.top-n.viewOffset-Yn(e.display))+`px;
9
+ height: `+(t.bottom-t.top+Qn(e)+n.barHeight)+`px;
10
+ left: `+t.left+`px; width: `+Math.max(2,t.right-t.left)+`px;`);e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function si(e,t,n,r){r??=0;var i;!e.options.lineWrapping&&t==n&&(n=t.sticky==`before`?Z(t.line,t.ch+1,`before`):t,t=t.ch?Z(t.line,t.sticky==`before`?t.ch-1:t.ch,`after`):t);for(var a=0;a<5;a++){var o=!1,s=Sr(e,t),c=!n||n==t?s:Sr(e,n);i={left:Math.min(s.left,c.left),top:Math.min(s.top,c.top)-r,right:Math.max(s.left,c.left),bottom:Math.max(s.bottom,c.bottom)+r};var l=li(e,i),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(l.scrollTop!=null&&(gi(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),l.scrollLeft!=null&&(vi(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(o=!0)),!o)break}return i}function ci(e,t){var n=li(e,t);n.scrollTop!=null&&gi(e,n.scrollTop),n.scrollLeft!=null&&vi(e,n.scrollLeft)}function li(e,t){var n=e.display,r=Nr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,a=er(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+Xn(n),c=t.top<r,l=t.bottom>s-r;if(t.top<i)o.scrollTop=c?0:t.top;else if(t.bottom>i+a){var u=Math.min(t.top,(l?s:t.bottom)-a);u!=i&&(o.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-d,p=$n(e)-n.gutters.offsetWidth,m=t.right-t.left>p;return m&&(t.right=t.left+p),t.left<10?o.scrollLeft=0:t.left<f?o.scrollLeft=Math.max(0,t.left+d-(m?0:10)):t.right>p+f-3&&(o.scrollLeft=t.right+(m?0:10)-p),o}function ui(e,t){t!=null&&(mi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function di(e){mi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function fi(e,t,n){(t!=null||n!=null)&&mi(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function pi(e,t){mi(e),e.curOp.scrollToPos=t}function mi(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,hi(e,Cr(e,t.from),Cr(e,t.to),t.margin))}function hi(e,t,n,r){var i=li(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});fi(e,i.scrollLeft,i.scrollTop)}function gi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||qi(e,{top:t}),_i(e,t,!0),n&&qi(e),zi(e,100))}function _i(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function vi(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,Zi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function yi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Xn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Qn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var bi=function(e,t,n){this.cm=n;var r=this.vert=k(`div`,[k(`div`,null,null,`min-width: 1px`)],`CodeMirror-vscrollbar`),i=this.horiz=k(`div`,[k(`div`,null,null,`height: 100%; min-height: 1px`)],`CodeMirror-hscrollbar`);r.tabIndex=i.tabIndex=-1,e(r),e(i),J(r,`scroll`,function(){r.clientHeight&&t(r.scrollTop,`vertical`)}),J(i,`scroll`,function(){i.clientWidth&&t(i.scrollLeft,`horizontal`)}),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth=`18px`)};bi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display=`block`,this.vert.style.bottom=t?r+`px`:`0`;var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+`px`}else this.vert.scrollTop=0,this.vert.style.display=``,this.vert.firstChild.style.height=`0`;if(t){this.horiz.style.display=`block`,this.horiz.style.right=n?r+`px`:`0`,this.horiz.style.left=e.barLeft+`px`;var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+`px`}else this.horiz.style.display=``,this.horiz.firstChild.style.width=`0`;return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},bi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,`horiz`)},bi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,`vert`)},bi.prototype.zeroWidthHack=function(){var e=y&&!m?`12px`:`18px`;this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility=`hidden`,this.disableHoriz=new re,this.disableVert=new re},bi.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility=``;function r(){var i=e.getBoundingClientRect();(n==`vert`?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))==e?t.set(1e3,r):e.style.visibility=`hidden`}t.set(1e3,r)},bi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var xi=function(){};xi.prototype.update=function(){return{bottom:0,right:0}},xi.prototype.setScrollLeft=function(){},xi.prototype.setScrollTop=function(){},xi.prototype.clear=function(){};function Si(e,t){t||=yi(e);var n=e.display.barWidth,r=e.display.barHeight;Ci(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&ri(e),Ci(e,yi(e)),n=e.display.barWidth,r=e.display.barHeight}function Ci(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+`px`,n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+`px`,n.heightForcer.style.borderBottom=r.bottom+`px solid transparent`,r.right&&r.bottom?(n.scrollbarFiller.style.display=`block`,n.scrollbarFiller.style.height=r.bottom+`px`,n.scrollbarFiller.style.width=r.right+`px`):n.scrollbarFiller.style.display=``,r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display=`block`,n.gutterFiller.style.height=r.bottom+`px`,n.gutterFiller.style.width=t.gutterWidth+`px`):n.gutterFiller.style.display=``}var wi={native:bi,null:xi};function Ti(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new wi[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),J(t,`mousedown`,function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute(`cm-not-content`,`true`)},function(t,n){n==`horizontal`?vi(e,t):gi(e,t)},e),e.display.scrollbars.addClass&&ee(e.display.wrapper,e.display.scrollbars.addClass)}var Ei=0;function Di(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ei,markArrays:null},kn(e.curOp)}function Oi(e){var t=e.curOp;t&&jn(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;ki(e)})}function ki(e){for(var t=e.ops,n=0;n<t.length;n++)Ai(t[n]);for(var r=0;r<t.length;r++)ji(t[r]);for(var i=0;i<t.length;i++)Mi(t[i]);for(var a=0;a<t.length;a++)Ni(t[a]);for(var o=0;o<t.length;o++)Pi(t[o])}function Ai(e){var t=e.cm,n=t.display;Hi(t),e.updateMaxLine&&fn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Vi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ji(e){e.updatedDisplay=e.mustUpdate&&Gi(e.cm,e.update)}function Mi(e){var t=e.cm,n=t.display;e.updatedDisplay&&ri(t),e.barMeasure=yi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ir(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Qn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-$n(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Ni(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+`px`,e.maxScrollLeft<t.doc.scrollLeft&&vi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==N(ne(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Si(t,e.barMeasure),e.updatedDisplay&&Xi(t,e.barMeasure),e.selectionChanged&&Qr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&$r(e.cm)}function Pi(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&Ki(t,e.update),n.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),e.scrollTop!=null&&_i(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&vi(t,e.scrollLeft,!0,!0),e.scrollToPos&&oi(t,si(t,$(r,e.scrollToPos.from),$(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(i)for(var o=0;o<i.length;++o)i[o].lines.length||Y(i[o],`hide`);if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&Y(a[s],`unhide`);n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Y(t,`changes`,t,e.changeObjs),e.update&&e.update.finish()}function Fi(e,t){if(e.curOp)return t();Di(e);try{return t()}finally{Oi(e)}}function Ii(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Di(e);try{return t.apply(e,arguments)}finally{Oi(e)}}}function Li(e){return function(){if(this.curOp)return e.apply(this,arguments);Di(this);try{return e.apply(this,arguments)}finally{Oi(this)}}}function Ri(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Di(t);try{return e.apply(this,arguments)}finally{Oi(t)}}}function zi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,R(Bi,e))}function Bi(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Ct(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(r.line>=e.display.viewFrom){var o=a.styles,s=a.text.length>e.options.maxHighlightLength?tt(t.mode,r.state):null,c=xt(e,a,r,!0);s&&(r.state=s),a.styles=c.styles;var l=a.styleClasses,u=c.classes;u?a.styleClasses=u:l&&(a.styleClasses=null);for(var d=!o||o.length!=a.styles.length||l!=u&&(!l||!u||l.bgClass!=u.bgClass||l.textClass!=u.textClass),f=0;!d&&f<o.length;++f)d=o[f]!=a.styles[f];d&&i.push(r.line),a.stateAfter=r.save(),r.nextLine()}else a.text.length<=e.options.maxHighlightLength&&wt(e,a.text,r),a.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return zi(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Fi(e,function(){for(var t=0;t<i.length;t++)Hr(e,i[t],`text`)})}}var Vi=function(e,t,n){var r=e.display;this.viewport=t,this.visible=ai(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=$n(e),this.force=n,this.dims=Fr(e),this.events=[]};Vi.prototype.signal=function(e,t){ke(e,t)&&this.events.push(arguments)},Vi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Y.apply(null,this.events[e])};function Hi(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Qn(e)+`px`,t.sizer.style.marginBottom=-t.nativeBarWidth+`px`,t.sizer.style.borderRightWidth=Qn(e)+`px`,t.scrollbarsClipped=!0)}function Ui(e){if(e.hasFocus())return null;var t=N(ne(e));if(!t||!M(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=L(e).getSelection();r.anchorNode&&r.extend&&M(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function Wi(e){if(!(!e||!e.activeElt||e.activeElt==N(I(e.activeElt)))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&M(document.body,e.anchorNode)&&M(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,n=t.defaultView.getSelection(),r=t.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),n.removeAllRanges(),n.addRange(r),n.extend(e.focusNode,e.focusOffset)}}function Gi(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Ur(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&Kr(e)==0)return!1;Qi(e)&&(Ur(e),t.dims=Fr(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<a&&a-n.viewFrom<20&&(a=Math.max(r.first,n.viewFrom)),n.viewTo>o&&n.viewTo-o<20&&(o=Math.min(i,n.viewTo)),Pt&&(a=on(e.doc,a),o=sn(e.doc,o));var s=a!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Gr(e,a,o),n.viewOffset=un(X(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+`px`;var c=Kr(e);if(!s&&c==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var l=Ui(e);return c>4&&(n.lineDiv.style.display=`none`),Ji(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=``),n.renderedView=n.view,Wi(l),D(n.cursorDiv),D(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,zi(e,400)),n.updateLineNumbers=null,!0}function Ki(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==$n(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+Xn(e.display)-er(e),n.top)}),t.visible=ai(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=ai(e.display,e.doc,n));if(!Gi(e,t))break;ri(e);var i=yi(e);qr(e),Si(e,i),Xi(e,i),t.force=!1}t.signal(e,`update`,e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,`viewportChange`,e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function qi(e,t){var n=new Vi(e,t);if(Gi(e,n)){ri(e),Ki(e,n);var r=yi(e);qr(e),Si(e,r),Xi(e,r),n.finish()}}function Ji(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,o=a.firstChild;function s(t){var n=t.nextSibling;return c&&y&&e.display.currentWheelTarget==t?t.style.display=`none`:t.parentNode.removeChild(t),n}for(var l=r.view,u=r.viewFrom,d=0;d<l.length;d++){var f=l[d];if(!f.hidden)if(!f.node||f.node.parentNode!=a){var p=Un(e,f,u,n);a.insertBefore(p,o)}else{for(;o!=f.node;)o=s(o);var m=i&&t!=null&&t<=u&&f.lineNumber;f.changes&&(V(f.changes,`gutter`)>-1&&(m=!1),Fn(e,f,u,n)),m&&(D(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(dt(e.options,u)))),o=f.node.nextSibling}u+=f.size}for(;o;)o=s(o)}function Yi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+`px`,Nn(e,`gutterChanged`,e)}function Xi(e,t){e.display.sizer.style.minHeight=t.docHeight+`px`,e.display.heightForcer.style.top=t.docHeight+`px`,e.display.gutters.style.height=t.docHeight+e.display.barHeight+Qn(e)+`px`}function Zi(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Ir(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+`px`,o=0;o<n.length;o++)if(!n[o].hidden){e.options.fixedGutter&&(n[o].gutter&&(n[o].gutter.style.left=a),n[o].gutterBackground&&(n[o].gutterBackground.style.left=a));var s=n[o].alignable;if(s)for(var c=0;c<s.length;c++)s[c].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=r+i+`px`)}}function Qi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=dt(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(k(`div`,[k(`div`,n)],`CodeMirror-linenumber CodeMirror-gutter-elt`)),a=i.firstChild.offsetWidth,o=i.offsetWidth-a;return r.lineGutter.style.width=``,r.lineNumInnerWidth=Math.max(a,r.lineGutter.offsetWidth-o)+1,r.lineNumWidth=r.lineNumInnerWidth+o,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+`px`,Yi(e.display),!0}return!1}function $i(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var a=e[i],o=null;if(typeof a!=`string`&&(o=a.style,a=a.className),a==`CodeMirror-linenumbers`)if(t)r=!0;else continue;n.push({className:a,style:o})}return t&&!r&&n.push({className:`CodeMirror-linenumbers`,style:null}),n}function ea(e){var t=e.gutters,n=e.gutterSpecs;D(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],a=i.className,o=i.style,s=t.appendChild(k(`div`,null,`CodeMirror-gutter `+a));o&&(s.style.cssText=o),a==`CodeMirror-linenumbers`&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+`px`)}t.style.display=n.length?``:`none`,Yi(e)}function ta(e){ea(e.display),Vr(e),Zi(e)}function na(e,t,r,i){var a=this;this.input=r,a.scrollbarFiller=k(`div`,null,`CodeMirror-scrollbar-filler`),a.scrollbarFiller.setAttribute(`cm-not-content`,`true`),a.gutterFiller=k(`div`,null,`CodeMirror-gutter-filler`),a.gutterFiller.setAttribute(`cm-not-content`,`true`),a.lineDiv=A(`div`,null,`CodeMirror-code`),a.selectionDiv=k(`div`,null,null,`position: relative; z-index: 1`),a.cursorDiv=k(`div`,null,`CodeMirror-cursors`),a.measure=k(`div`,null,`CodeMirror-measure`),a.lineMeasure=k(`div`,null,`CodeMirror-measure`),a.lineSpace=A(`div`,[a.measure,a.lineMeasure,a.selectionDiv,a.cursorDiv,a.lineDiv],null,`position: relative; outline: none`),a.mover=k(`div`,[A(`div`,[a.lineSpace],`CodeMirror-lines`)],null,`position: relative`),a.sizer=k(`div`,[a.mover],`CodeMirror-sizer`),a.sizerWidth=null,a.heightForcer=k(`div`,null,null,`position: absolute; height: `+H+`px; width: 1px;`),a.gutters=k(`div`,null,`CodeMirror-gutters`),a.lineGutter=null,a.scroller=k(`div`,[a.sizer,a.heightForcer,a.gutters],`CodeMirror-scroll`),a.scroller.setAttribute(`tabIndex`,`-1`),a.wrapper=k(`div`,[a.scrollbarFiller,a.gutterFiller,a.scroller],`CodeMirror`),u&&d===105&&(a.wrapper.style.clipPath=`inset(0px)`),a.wrapper.setAttribute(`translate`,`no`),o&&s<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),!c&&!(n&&v)&&(a.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(a.wrapper):e(a.wrapper)),a.viewFrom=a.viewTo=t.first,a.reportedViewFrom=a.reportedViewTo=t.first,a.view=[],a.renderedView=null,a.externalMeasured=null,a.viewOffset=0,a.lastWrapHeight=a.lastWrapWidth=0,a.updateLineNumbers=null,a.nativeBarWidth=a.barHeight=a.barWidth=0,a.scrollbarsClipped=!1,a.lineNumWidth=a.lineNumInnerWidth=a.lineNumChars=null,a.alignWidgets=!1,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.maxLine=null,a.maxLineLength=0,a.maxLineChanged=!1,a.wheelDX=a.wheelDY=a.wheelStartX=a.wheelStartY=null,a.shift=!1,a.selForContextMenu=null,a.activeTouch=null,a.gutterSpecs=$i(i.gutters,i.lineNumbers),ea(a),r.init(a)}var ra=0,ia=null;o?ia=-.53:n?ia=15:u?ia=-.7:p&&(ia=-1/3);function aa(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n??=e.wheelDelta,{x:t,y:n}}function oa(e){var t=aa(e);return t.x*=ia,t.y*=ia,t}function sa(e,t){u&&d==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents=`none`:clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=``},100));var r=aa(t),i=r.x,a=r.y,o=ia;t.deltaMode===0&&(i=t.deltaX,a=t.deltaY,o=1);var s=e.display,l=s.scroller,p=l.scrollWidth>l.clientWidth,m=l.scrollHeight>l.clientHeight;if(i&&p||a&&m){if(a&&y&&c){outer:for(var h=t.target,g=s.view;h!=l;h=h.parentNode)for(var _=0;_<g.length;_++)if(g[_].node==h){e.display.currentWheelTarget=h;break outer}}if(i&&!n&&!f&&o!=null){a&&m&&gi(e,Math.max(0,l.scrollTop+a*o)),vi(e,Math.max(0,l.scrollLeft+i*o)),(!a||a&&m)&&je(t),s.wheelStartX=null;return}if(a&&o!=null){var v=a*o,b=e.doc.scrollTop,x=b+s.wrapper.clientHeight;v<0?b=Math.max(0,b+v-50):x=Math.min(e.doc.height,x+v+50),qi(e,{top:b,bottom:x})}ra<20&&t.deltaMode!==0&&(s.wheelStartX==null?(s.wheelStartX=l.scrollLeft,s.wheelStartY=l.scrollTop,s.wheelDX=i,s.wheelDY=a,setTimeout(function(){if(s.wheelStartX!=null){var e=l.scrollLeft-s.wheelStartX,t=l.scrollTop-s.wheelStartY,n=t&&s.wheelDY&&t/s.wheelDY||e&&s.wheelDX&&e/s.wheelDX;s.wheelStartX=s.wheelStartY=null,n&&(ia=(ia*ra+n)/(ra+1),++ra)}},200)):(s.wheelDX+=i,s.wheelDY+=a))}}var ca=function(e,t){this.ranges=e,this.primIndex=t};ca.prototype.primary=function(){return this.ranges[this.primIndex]},ca.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!ft(n.anchor,r.anchor)||!ft(n.head,r.head))return!1}return!0},ca.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new la(pt(this.ranges[t].anchor),pt(this.ranges[t].head));return new ca(e,this.primIndex)},ca.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ca.prototype.contains=function(e,t){t||=e;for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(Q(t,r.from())>=0&&Q(e,r.to())<=0)return n}return-1};var la=function(e,t){this.anchor=e,this.head=t};la.prototype.from=function(){return ht(this.anchor,this.head)},la.prototype.to=function(){return mt(this.anchor,this.head)},la.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ua(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(e,t){return Q(e.from(),t.from())}),n=V(t,i);for(var a=1;a<t.length;a++){var o=t[a],s=t[a-1],c=Q(s.to(),o.from());if(r&&!o.empty()?c>0:c>=0){var l=ht(s.from(),o.from()),u=mt(s.to(),o.to()),d=s.empty()?o.from()==o.head:s.from()==s.head;a<=n&&--n,t.splice(--a,2,new la(d?u:l,d?l:u))}}return new ca(t,n)}function da(e,t){return new ca([new la(e,t||e)],0)}function fa(e){return e.text?Z(e.from.line+e.text.length-1,K(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function pa(e,t){if(Q(e,t.from)<0)return e;if(Q(e,t.to)<=0)return fa(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=fa(t).ch-t.to.ch),Z(n,r)}function ma(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new la(pa(i.anchor,t),pa(i.head,t)))}return ua(e.cm,n,e.sel.primIndex)}function ha(e,t,n){return e.line==t.line?Z(n.line,e.ch-t.ch+n.ch):Z(n.line+(e.line-t.line),e.ch)}function ga(e,t,n){for(var r=[],i=Z(e.first,0),a=i,o=0;o<t.length;o++){var s=t[o],c=ha(s.from,i,a),l=ha(fa(s),i,a);if(i=s.to,a=l,n==`around`){var u=e.sel.ranges[o],d=Q(u.head,u.anchor)<0;r[o]=new la(d?l:c,d?c:l)}else r[o]=new la(c,c)}return new ca(r,e.sel.primIndex)}function _a(e){e.doc.mode=Qe(e.options,e.doc.modeOption),va(e)}function va(e){e.doc.iter(function(e){e.stateAfter&&=null,e.styles&&=null}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,zi(e,100),e.state.modeGen++,e.curOp&&Vr(e)}function ya(e,t){return t.from.ch==0&&t.to.ch==0&&K(t.text)==``&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ba(e,t,n,r){function i(e){return n?n[e]:null}function a(e,n,i){mn(e,n,i,r),Nn(e,`change`,e,t)}function o(e,t){for(var n=[],a=e;a<t;++a)n.push(new pn(l[a],i(a),r));return n}var s=t.from,c=t.to,l=t.text,u=X(e,s.line),d=X(e,c.line),f=K(l),p=i(l.length-1),m=c.line-s.line;if(t.full)e.insert(0,o(0,l.length)),e.remove(l.length,e.size-l.length);else if(ya(e,t)){var h=o(0,l.length-1);a(d,d.text,p),m&&e.remove(s.line,m),h.length&&e.insert(s.line,h)}else if(u==d)if(l.length==1)a(u,u.text.slice(0,s.ch)+f+u.text.slice(c.ch),p);else{var g=o(1,l.length-1);g.push(new pn(f+u.text.slice(c.ch),p,r)),a(u,u.text.slice(0,s.ch)+l[0],i(0)),e.insert(s.line+1,g)}else if(l.length==1)a(u,u.text.slice(0,s.ch)+l[0]+d.text.slice(c.ch),i(0)),e.remove(s.line+1,m);else{a(u,u.text.slice(0,s.ch)+l[0],i(0)),a(d,f+d.text.slice(c.ch),p);var _=o(1,l.length-1);m>1&&e.remove(s.line+1,m-1),e.insert(s.line+1,_)}Nn(e,`change`,e,t)}function xa(e,t,n){function r(e,i,a){if(e.linked)for(var o=0;o<e.linked.length;++o){var s=e.linked[o];if(s.doc!=i){var c=a&&s.sharedHist;n&&!c||(t(s.doc,c),r(s.doc,e,c))}}}r(e,null,!0)}function Sa(e,t){if(t.cm)throw Error(`This document is already in use.`);e.doc=t,t.cm=e,Rr(e),_a(e),Ca(e),e.options.direction=t.direction,e.options.lineWrapping||fn(e),e.options.mode=t.modeOption,Vr(e)}function Ca(e){(e.doc.direction==`rtl`?ee:E)(e.display.lineDiv,`CodeMirror-rtl`)}function wa(e){Fi(e,function(){Ca(e),Vr(e)})}function Ta(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Ea(e,t){var n={from:pt(t.from),to:fa(t),text:at(e,t.from,t.to)};return Na(e,n,t.from.line,t.to.line+1),xa(e,function(e){return Na(e,n,t.from.line,t.to.line+1)},!0),n}function Da(e){for(;e.length&&K(e).ranges;)e.pop()}function Oa(e,t){if(t)return Da(e.done),K(e.done);if(e.done.length&&!K(e.done).ranges)return K(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),K(e.done)}function ka(e,t,n,r){var i=e.history;i.undone.length=0;var a=+new Date,o,s;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)==`+`&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)==`*`))&&(o=Oa(i,i.lastOp==r)))s=K(o.changes),Q(t.from,t.to)==0&&Q(t.from,s.to)==0?s.to=fa(t):o.changes.push(Ea(e,t));else{var c=K(i.done);for((!c||!c.ranges)&&Ma(e.sel,i.done),o={changes:[Ea(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||Y(e,`historyAdded`)}function Aa(e,t,n,r){var i=t.charAt(0);return i==`*`||i==`+`&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function ja(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||Aa(e,a,K(i.done),t))?i.done[i.done.length-1]=t:Ma(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&r.clearRedo!==!1&&Da(i.undone)}function Ma(e,t){var n=K(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Na(e,t,n,r){var i=t[`spans_`+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||=t[`spans_`+e.id]={})[a]=n.markedSpans),++a})}function Pa(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||=e.slice(0,n):t&&t.push(e[n]);return t?t.length?t:null:e}function Fa(e,t){var n=t[`spans_`+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Pa(n[i]));return r}function Ia(e,t){var n=Fa(e,t),r=Ut(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var a=n[i],o=r[i];if(a&&o)spans:for(var s=0;s<o.length;++s){for(var c=o[s],l=0;l<a.length;++l)if(a[l].marker==c.marker)continue spans;a.push(c)}else o&&(n[i]=o)}return n}function La(e,t,n){for(var r=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges){r.push(n?ca.prototype.deepCopy.call(a):a);continue}var o=a.changes,s=[];r.push({changes:s});for(var c=0;c<o.length;++c){var l=o[c],u=void 0;if(s.push({from:l.from,to:l.to,text:l.text}),t)for(var d in l)(u=d.match(/^spans_(\d+)$/))&&V(t,Number(u[1]))>-1&&(K(s)[d]=l[d],delete l[d])}}return r}function Ra(e,t,n,r){if(r){var i=e.anchor;if(n){var a=Q(t,i)<0;a==Q(n,i)<0?a!=Q(t,n)<0&&(t=n):(i=t,t=n)}return new la(i,t)}else return new la(n||t,t)}function za(e,t,n,r,i){i??=e.cm&&(e.cm.display.shift||e.extend),Ga(e,new ca([Ra(e.sel.primary(),t,n,i)],0),r)}function Ba(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)r[a]=Ra(e.sel.ranges[a],t[a],null,i);Ga(e,ua(e.cm,r,e.sel.primIndex),n)}function Va(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,Ga(e,ua(e.cm,i,e.sel.primIndex),r)}function Ha(e,t,n,r){Ga(e,da(t,n),r)}function Ua(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new la($(e,t[n].anchor),$(e,t[n].head))},origin:n&&n.origin};return Y(e,`beforeSelectionChange`,e,r),e.cm&&Y(e.cm,`beforeSelectionChange`,e.cm,r),r.ranges==t.ranges?t:ua(e.cm,r.ranges,r.ranges.length-1)}function Wa(e,t,n){var r=e.history.done,i=K(r);i&&i.ranges?(r[r.length-1]=t,Ka(e,t,n)):Ga(e,t,n)}function Ga(e,t,n){Ka(e,t,n),ja(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Ka(e,t,n){(ke(e,`beforeSelectionChange`)||e.cm&&ke(e.cm,`beforeSelectionChange`))&&(t=Ua(e,t,n));var r=n&&n.bias||(Q(t.primary().head,e.sel.primary().head)<0?-1:1);qa(e,Ya(e,t,r,!0)),!(n&&n.scroll===!1)&&e.cm&&e.cm.getOption(`readOnly`)!=`nocursor`&&di(e.cm)}function qa(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Oe(e.cm)),Nn(e,`cursorActivity`,e))}function Ja(e){qa(e,Ya(e,e.sel,null,!1))}function Ya(e,t,n,r){for(var i,a=0;a<t.ranges.length;a++){var o=t.ranges[a],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],c=Za(e,o.anchor,s&&s.anchor,n,r),l=o.head==o.anchor?c:Za(e,o.head,s&&s.head,n,r);(i||c!=o.anchor||l!=o.head)&&(i||=t.ranges.slice(0,a),i[a]=new la(c,l))}return i?ua(e.cm,i,t.primIndex):t}function Xa(e,t,n,r,i){var a=X(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var s=a.markedSpans[o],c=s.marker,l=`selectLeft`in c?!c.selectLeft:c.inclusiveLeft,u=`selectRight`in c?!c.selectRight:c.inclusiveRight;if((s.from==null||(l?s.from<=t.ch:s.from<t.ch))&&(s.to==null||(u?s.to>=t.ch:s.to>t.ch))){if(i&&(Y(c,`beforeCursorEnter`),c.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!c.atomic)continue;if(n){var d=c.find(r<0?1:-1),f=void 0;if((r<0?u:l)&&(d=Qa(e,d,-r,d&&d.line==t.line?a:null)),d&&d.line==t.line&&(f=Q(d,n))&&(r<0?f<0:f>0))return Xa(e,d,t,r,i)}var p=c.find(r<0?-1:1);return(r<0?l:u)&&(p=Qa(e,p,r,p.line==t.line?a:null)),p?Xa(e,p,t,r,i):null}}return t}function Za(e,t,n,r,i){var a=r||1;return Xa(e,t,n,a,i)||!i&&Xa(e,t,n,a,!0)||Xa(e,t,n,-a,i)||!i&&Xa(e,t,n,-a,!0)||(e.cantEdit=!0,Z(e.first,0))}function Qa(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?$(e,Z(t.line-1)):null:n>0&&t.ch==(r||X(e,t.line)).text.length?t.line<e.first+e.size-1?Z(t.line+1,0):null:new Z(t.line,t.ch+n)}function $a(e){e.setSelection(Z(e.firstLine(),0),Z(e.lastLine()),U)}function eo(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,a){t&&(r.from=$(e,t)),n&&(r.to=$(e,n)),i&&(r.text=i),a!==void 0&&(r.origin=a)}),Y(e,`beforeChange`,e,r),e.cm&&Y(e.cm,`beforeChange`,e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function to(e,t,n){if(e.cm){if(!e.cm.curOp)return Ii(e.cm,to)(e,t,n);if(e.cm.state.suppressEdits)return}if(!((ke(e,`beforeChange`)||e.cm&&ke(e.cm,`beforeChange`))&&(t=eo(e,t,!0),!t))){var r=Nt&&!n&&Gt(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)no(e,{from:r[i].from,to:r[i].to,text:i?[``]:t.text,origin:t.origin});else no(e,t)}}function no(e,t){if(!(t.text.length==1&&t.text[0]==``&&Q(t.from,t.to)==0)){var n=ma(e,t);ka(e,t,n,e.cm?e.cm.curOp.id:NaN),ao(e,t,n,Ut(e,t));var r=[];xa(e,function(e,n){!n&&V(r,e.history)==-1&&(uo(e.history,t),r.push(e.history)),ao(e,t,null,Ut(e,t))})}}function ro(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,a,o=e.sel,s=t==`undo`?i.done:i.undone,c=t==`undo`?i.undone:i.done,l=0;l<s.length&&(a=s[l],!(n?a.ranges&&!a.equals(e.sel):!a.ranges));l++);if(l!=s.length){for(i.lastOrigin=i.lastSelOrigin=null;;)if(a=s.pop(),a.ranges){if(Ma(a,c),n&&!a.equals(e.sel)){Ga(e,a,{clearRedo:!1});return}o=a}else if(r){s.push(a);return}else break;var u=[];Ma(o,c),c.push({changes:u,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var d=ke(e,`beforeChange`)||e.cm&&ke(e.cm,`beforeChange`),f=function(n){var r=a.changes[n];if(r.origin=t,d&&!eo(e,r,!1))return s.length=0,{};u.push(Ea(e,r)),ao(e,r,n?ma(e,r):K(s),Ia(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:fa(r)});var i=[];xa(e,function(e,t){!t&&V(i,e.history)==-1&&(uo(e.history,r),i.push(e.history)),ao(e,r,null,Ia(e,r))})},p=a.changes.length-1;p>=0;--p){var m=f(p);if(m)return m.v}}}}function io(e,t){if(t!=0&&(e.first+=t,e.sel=new ca(ce(e.sel.ranges,function(e){return new la(Z(e.anchor.line+t,e.anchor.ch),Z(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Vr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Hr(e.cm,r,`gutter`)}}function ao(e,t,n,r){if(e.cm&&!e.cm.curOp)return Ii(e.cm,ao)(e,t,n,r);if(t.to.line<e.first){io(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);io(e,i),t={from:Z(e.first,0),to:Z(t.to.line+i,t.to.ch),text:[K(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:Z(a,X(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=at(e,t.from,t.to),n||=ma(e,t),e.cm?oo(e.cm,t,r):ba(e,t,r),Ka(e,n,U),e.cantEdit&&Za(e,Z(e.firstLine(),0))&&(e.cantEdit=!1)}}function oo(e,t,n){var r=e.doc,i=e.display,a=t.from,o=t.to,s=!1,c=a.line;e.options.lineWrapping||(c=ct(nn(X(r,a.line))),r.iter(c,o.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Oe(e),ba(r,t,n,Lr(e)),e.options.lineWrapping||(r.iter(c,a.line+t.text.length,function(e){var t=dn(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),Mt(r,a.line),zi(e,400);var l=t.text.length-(o.line-a.line)-1;t.full?Vr(e):a.line==o.line&&t.text.length==1&&!ya(e.doc,t)?Hr(e,a.line,`text`):Vr(e,a.line,o.line+1,l);var u=ke(e,`changes`),d=ke(e,`change`);if(d||u){var f={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};d&&Nn(e,`change`,e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function so(e,t,n,r,i){var a;r||=n,Q(r,n)<0&&(a=[r,n],n=a[0],r=a[1]),typeof t==`string`&&(t=e.splitLines(t)),to(e,{from:n,to:r,text:t,origin:i})}function co(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function lo(e,t,n,r){for(var i=0;i<e.length;++i){var a=e[i],o=!0;if(a.ranges){a.copied||=(a=e[i]=a.deepCopy(),!0);for(var s=0;s<a.ranges.length;s++)co(a.ranges[s].anchor,t,n,r),co(a.ranges[s].head,t,n,r);continue}for(var c=0;c<a.changes.length;++c){var l=a.changes[c];if(n<l.from.line)l.from=Z(l.from.line+r,l.from.ch),l.to=Z(l.to.line+r,l.to.ch);else if(t<=l.to.line){o=!1;break}}o||(e.splice(0,i+1),i=0)}}function uo(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;lo(e.done,n,r,i),lo(e.undone,n,r,i)}function fo(e,t,n,r){var i=t,a=t;return typeof t==`number`?a=X(e,gt(e,t)):i=ct(t),i==null?null:(r(a,i)&&e.cm&&Hr(e.cm,i,n),a)}function po(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}po.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,hn(i),Nn(i,`delete`)}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}};function mo(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}mo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var a=Math.min(t,i-e),o=r.height;if(r.removeInner(e,a),this.height-=o-r.height,i==a&&(this.children.splice(n--,1),r.parent=null),(t-=a)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof po))){var s=[];this.collapse(s),this.children=[new po(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],a=i.chunkSize();if(e<=a){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var o=i.lines.length%25+25,s=o;s<i.lines.length;){var c=new po(i.lines.slice(s,s+=25));i.height-=c.height,this.children.splice(++r,0,c),c.parent=this}i.lines=i.lines.slice(0,o),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new mo(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=V(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new mo(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],a=i.chunkSize();if(e<a){var o=Math.min(t,a-e);if(i.iterN(e,o,n))return!0;if((t-=o)==0)break;e=0}else e-=a}}};var ho=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};ho.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=ct(n);if(!(r==null||!t)){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var a=qn(this);st(n,Math.max(0,n.height-a)),e&&(Fi(e,function(){go(e,n,-a),Hr(e,r,`widget`)}),Nn(e,`lineWidgetCleared`,e,this,r))}},ho.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=qn(this)-t;i&&(cn(this.doc,r)||st(r,r.height+i),n&&Fi(n,function(){n.curOp.forceUpdate=!0,go(n,r,i),Nn(n,`lineWidgetChanged`,n,e,ct(r))}))},Ae(ho);function go(e,t,n){un(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ui(e,n)}function _o(e,t,n,r){var i=new ho(e,n,r),a=e.cm;return a&&i.noHScroll&&(a.display.alignWidgets=!0),fo(e,t,`widget`,function(t){var n=t.widgets||=[];if(i.insertAt==null?n.push(i):n.splice(Math.min(n.length,Math.max(0,i.insertAt)),0,i),i.line=t,a&&!cn(e,t)){var r=un(t)<e.scrollTop;st(t,t.height+qn(i)),r&&ui(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&Nn(a,`lineWidgetAdded`,a,i,typeof t==`number`?t:ct(t)),i}var vo=0,yo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++vo};yo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Di(e),ke(this,`clear`)){var n=this.find();n&&Nn(this,`clear`,n.from,n.to)}for(var r=null,i=null,a=0;a<this.lines.length;++a){var o=this.lines[a],s=Rt(o.markedSpans,this);e&&!this.collapsed?Hr(e,ct(o),`text`):e&&(s.to!=null&&(i=ct(o)),s.from!=null&&(r=ct(o))),o.markedSpans=zt(o.markedSpans,s),s.from==null&&this.collapsed&&!cn(this.doc,o)&&e&&st(o,Nr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var c=0;c<this.lines.length;++c){var l=nn(this.lines[c]),u=dn(l);u>e.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&Vr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ja(e.doc)),e&&Nn(e,`markerCleared`,e,this,r,i),t&&Oi(e),this.parent&&this.parent.clear()}},yo.prototype.find=function(e,t){e==null&&this.type==`bookmark`&&(e=1);for(var n,r,i=0;i<this.lines.length;++i){var a=this.lines[i],o=Rt(a.markedSpans,this);if(o.from!=null&&(n=Z(t?a:ct(a),o.from),e==-1))return n;if(o.to!=null&&(r=Z(t?a:ct(a),o.to),e==1))return r}return n&&{from:n,to:r}},yo.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;!t||!r||Fi(r,function(){var i=t.line,a=ar(r,ct(t.line));if(a&&(pr(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!cn(n.doc,i)&&n.height!=null){var o=n.height;n.height=null;var s=qn(n)-o;s&&st(i,i.height+s)}Nn(r,`markerChanged`,r,e)})},yo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||V(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||=[]).push(this)}this.lines.push(e)},yo.prototype.detachLine=function(e){if(this.lines.splice(V(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||=[]).push(this)}},Ae(yo);function bo(e,t,n,r,i){if(r&&r.shared)return So(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Ii(e.cm,bo)(e,t,n,r,i);var a=new yo(e,i),o=Q(t,n);if(r&&z(r,a,!1),o>0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=A(`span`,[a.replacedWith],`CodeMirror-widget`),r.handleMouseEvents||a.widgetNode.setAttribute(`cm-ignore-events`,`true`),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(tn(e,t.line,t,n,a)||t.line!=n.line&&tn(e,n.line,t,n,a))throw Error(`Inserting collapsed marker partially overlapping an existing one`);It()}a.addToHistory&&ka(e,{from:t,to:n,origin:`markText`},e.sel,NaN);var s=t.line,c=e.cm,l;if(e.iter(s,n.line+1,function(r){c&&a.collapsed&&!c.options.lineWrapping&&nn(r)==c.display.maxLine&&(l=!0),a.collapsed&&s!=t.line&&st(r,0),Bt(r,new Lt(a,s==t.line?t.ch:null,s==n.line?n.ch:null),e.cm&&e.cm.curOp),++s}),a.collapsed&&e.iter(t.line,n.line+1,function(t){cn(e,t)&&st(t,0)}),a.clearOnEnter&&J(a,`beforeCursorEnter`,function(){return a.clear()}),a.readOnly&&(Ft(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++vo,a.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),a.collapsed)Vr(c,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var u=t.line;u<=n.line;u++)Hr(c,u,`text`);a.atomic&&Ja(c.doc),Nn(c,`markerAdded`,c,a)}return a}var xo=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};xo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Nn(this,`clear`)}},xo.prototype.find=function(e,t){return this.primary.find(e,t)},Ae(xo);function So(e,t,n,r,i){r=z(r),r.shared=!1;var a=[bo(e,t,n,r,i)],o=a[0],s=r.widgetNode;return xa(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),a.push(bo(e,$(e,t),$(e,n),r,i));for(var c=0;c<e.linked.length;++c)if(e.linked[c].isParent)return;o=K(a)}),new xo(a,o)}function Co(e){return e.findMarks(Z(e.first,0),e.clipPos(Z(e.lastLine())),function(e){return e.parent})}function wo(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),a=e.clipPos(i.from),o=e.clipPos(i.to);if(Q(a,o)){var s=bo(e,a,o,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}function To(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];xa(n.primary.doc,function(e){return r.push(e)});for(var i=0;i<n.markers.length;i++){var a=n.markers[i];V(r,a.doc)==-1&&(a.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}var Eo=0,Do=function(e,t,n,r,i){if(!(this instanceof Do))return new Do(e,t,n,r,i);n??=0,mo.call(this,[new po([new pn(``,null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var a=Z(n,0);this.sel=da(a),this.history=new Ta(null),this.id=++Eo,this.modeOption=t,this.lineSep=r,this.direction=i==`rtl`?`rtl`:`ltr`,this.extend=!1,typeof e==`string`&&(e=this.splitLines(e)),ba(this,{from:a,to:a,text:e}),Ga(this,da(a),U)};Do.prototype=de(mo.prototype,{constructor:Do,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=ot(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Ri(function(e){var t=Z(this.first,0),n=this.first+this.size-1;to(this,{from:t,to:Z(n,X(this,n).text.length),text:this.splitLines(e),origin:`setValue`,full:!0},!0),this.cm&&fi(this.cm,0,0),Ga(this,da(t),U)}),replaceRange:function(e,t,n,r){t=$(this,t),n=n?$(this,n):t,so(this,e,t,n,r)},getRange:function(e,t,n){var r=at(this,$(this,e),$(this,t));return n===!1?r:n===``?r.join(``):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(ut(this,e))return X(this,e)},getLineNumber:function(e){return ct(e)},getLineHandleVisualStart:function(e){return typeof e==`number`&&(e=X(this,e)),nn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return $(this,e)},getCursor:function(e){var t=this.sel.primary();return e==null||e==`head`?t.head:e==`anchor`?t.anchor:e==`end`||e==`to`||e===!1?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ri(function(e,t,n){Ha(this,$(this,typeof e==`number`?Z(e,t||0):e),null,n)}),setSelection:Ri(function(e,t,n){Ha(this,$(this,e),$(this,t||e),n)}),extendSelection:Ri(function(e,t,n){za(this,$(this,e),t&&$(this,t),n)}),extendSelections:Ri(function(e,t){Ba(this,vt(this,e),t)}),extendSelectionsBy:Ri(function(e,t){var n=ce(this.sel.ranges,e);Ba(this,vt(this,n),t)}),setSelections:Ri(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new la($(this,e[i].anchor),$(this,e[i].head||e[i].anchor));t??=Math.min(e.length-1,this.sel.primIndex),Ga(this,ua(this.cm,r,t),n)}}),addSelection:Ri(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new la($(this,e),$(this,t||e))),Ga(this,ua(this.cm,r,r.length-1),n)}),getSelection:function(e){for(var t=this.sel.ranges,n,r=0;r<t.length;r++){var i=at(this,t[r].from(),t[r].to());n=n?n.concat(i):i}return e===!1?n:n.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=at(this,n[r].from(),n[r].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||`+input`)},replaceSelections:Ri(function(e,t,n){for(var r=[],i=this.sel,a=0;a<i.ranges.length;a++){var o=i.ranges[a];r[a]={from:o.from(),to:o.to(),text:this.splitLines(e[a]),origin:n}}for(var s=t&&t!=`end`&&ga(this,r,t),c=r.length-1;c>=0;c--)to(this,r[c]);s?Wa(this,s):this.cm&&di(this.cm)}),undo:Ri(function(){ro(this,`undo`)}),redo:Ri(function(){ro(this,`redo`)}),undoSelection:Ri(function(){ro(this,`undo`,!0)}),redoSelection:Ri(function(){ro(this,`redo`,!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Ta(this.history),xa(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:La(this.history.done),undone:La(this.history.undone)}},setHistory:function(e){var t=this.history=new Ta(this.history);t.done=La(e.done.slice(0),null,!0),t.undone=La(e.undone.slice(0),null,!0)},setGutterMarker:Ri(function(e,t,n){return fo(this,e,`gutter`,function(e){var r=e.gutterMarkers||={};return r[t]=n,!n&&he(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Ri(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&fo(t,n,`gutter`,function(){return n.gutterMarkers[e]=null,he(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e==`number`){if(!ut(this,e)||(t=e,e=X(this,e),!e))return null}else if(t=ct(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Ri(function(e,t,n){return fo(this,e,t==`gutter`?`gutter`:`class`,function(e){var r=t==`text`?`textClass`:t==`background`?`bgClass`:t==`gutter`?`gutterClass`:`wrapClass`;if(!e[r])e[r]=n;else if(T(n).test(e[r]))return!1;else e[r]+=` `+n;return!0})}),removeLineClass:Ri(function(e,t,n){return fo(this,e,t==`gutter`?`gutter`:`class`,function(e){var r=t==`text`?`textClass`:t==`background`?`bgClass`:t==`gutter`?`gutterClass`:`wrapClass`,i=e[r];if(i)if(n==null)e[r]=null;else{var a=i.match(T(n));if(!a)return!1;var o=a.index+a[0].length;e[r]=i.slice(0,a.index)+(!a.index||o==i.length?``:` `)+i.slice(o)||null}else return!1;return!0})}),addLineWidget:Ri(function(e,t,n){return _o(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return bo(this,$(this,e),$(this,t),n,n&&n.type||`range`)},setBookmark:function(e,t){var n={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=$(this,e),bo(this,e,e,n,`bookmark`)},findMarksAt:function(e){e=$(this,e);var t=[],n=X(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=$(this,e),t=$(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var o=a.markedSpans;if(o)for(var s=0;s<o.length;s++){var c=o[s];!(c.to!=null&&i==e.line&&e.ch>=c.to||c.from==null&&i!=e.line||c.from!=null&&i==t.line&&c.from>=t.ch)&&(!n||n(c.marker))&&r.push(c.marker.parent||c.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)n[r].from!=null&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(i){var a=i.text.length+r;if(a>e)return t=e,!0;e-=a,++n}),$(this,Z(n,t))},indexFromPos:function(e){e=$(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+n}),t},copy:function(e){var t=new Do(ot(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||={};var t=this.first,n=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<n&&(n=e.to);var r=new Do(ot(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||=[]).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],wo(r,Co(this)),r},unlinkDoc:function(e){if(e instanceof Vs&&(e=e.doc),this.linked){for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),To(Co(this));break}}if(e.history==this.history){var n=[e.id];xa(e,function(e){return n.push(e.id)},!0),e.history=new Ta(null),e.history.done=La(this.history.done,n),e.history.undone=La(this.history.undone,n)}},iterLinkedDocs:function(e){xa(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):He(e)},lineSeparator:function(){return this.lineSep||`
11
+ `},setDirection:Ri(function(e){e!=`rtl`&&(e=`ltr`),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&wa(this.cm))})}),Do.prototype.eachLine=Do.prototype.iter;var Oo=0;function ko(e){var t=this;if(Mo(t),!(De(t,e)||Jn(t.display,e))){je(e),o&&(Oo=+new Date);var n=zr(t,e,!0),r=e.dataTransfer.files;if(!(!n||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,a=Array(i),s=0,c=function(){++s==i&&Ii(t,function(){n=$(t.doc,n);var e={from:n,to:n,text:t.doc.splitLines(a.filter(function(e){return e!=null}).join(t.doc.lineSeparator())),origin:`paste`};to(t.doc,e),Wa(t.doc,da($(t.doc,n),$(t.doc,fa(e))))})()},l=function(e,n){if(t.options.allowDropFileTypes&&V(t.options.allowDropFileTypes,e.type)==-1){c();return}var r=new FileReader;r.onerror=function(){return c()},r.onload=function(){var e=r.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)){c();return}a[n]=e,c()},r.readAsText(e)},u=0;u<r.length;u++)l(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var d=e.dataTransfer.getData(`Text`);if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Ka(t.doc,da(n,n)),f)for(var p=0;p<f.length;++p)so(t.doc,``,f[p].anchor,f[p].head,`drag`);t.replaceSelection(d,`around`,`paste`),t.display.input.focus()}}catch{}}}}function Ao(e,t){if(o&&(!e.state.draggingText||+new Date-Oo<100)){Pe(t);return}if(!(De(e,t)||Jn(e.display,t))&&(t.dataTransfer.setData(`Text`,e.getSelection()),t.dataTransfer.effectAllowed=`copyMove`,t.dataTransfer.setDragImage&&!p)){var n=k(`img`,null,null,`position: fixed; left: 0; top: 0;`);n.src=`data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==`,f&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),f&&n.parentNode.removeChild(n)}}function jo(e,t){var n=zr(e,t);if(n){var r=document.createDocumentFragment();Yr(e,n,r),e.display.dragCursor||(e.display.dragCursor=k(`div`,null,`CodeMirror-cursors CodeMirror-dragcursors`),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),O(e.display.dragCursor,r)}}function Mo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function No(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName(`CodeMirror`),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var t=0;t<n.length;t++)e(n[t])})}}var Po=!1;function Fo(){Po||=(Io(),!0)}function Io(){J(window,`resize`,function(){setTimeout(function(){No(Lo)},100)}),J(window,`blur`,function(){return No(ni)})}function Lo(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Ro={3:`Pause`,8:`Backspace`,9:`Tab`,13:`Enter`,16:`Shift`,17:`Ctrl`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Esc`,32:`Space`,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`Left`,38:`Up`,39:`Right`,40:`Down`,44:`PrintScrn`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Mod`,92:`Mod`,93:`Mod`,106:`*`,107:`=`,109:`-`,110:`.`,111:`/`,145:`ScrollLock`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`,224:`Mod`,63232:`Up`,63233:`Down`,63234:`Left`,63235:`Right`,63272:`Delete`,63273:`Home`,63275:`End`,63276:`PageUp`,63277:`PageDown`,63302:`Insert`},zo=0;zo<10;zo++)Ro[zo+48]=Ro[zo+96]=String(zo);for(var Bo=65;Bo<=90;Bo++)Ro[Bo]=String.fromCharCode(Bo);for(var Vo=1;Vo<=12;Vo++)Ro[Vo+111]=Ro[Vo+63235]=`F`+Vo;var Ho={};Ho.basic={Left:`goCharLeft`,Right:`goCharRight`,Up:`goLineUp`,Down:`goLineDown`,End:`goLineEnd`,Home:`goLineStartSmart`,PageUp:`goPageUp`,PageDown:`goPageDown`,Delete:`delCharAfter`,Backspace:`delCharBefore`,"Shift-Backspace":`delCharBefore`,Tab:`defaultTab`,"Shift-Tab":`indentAuto`,Enter:`newlineAndIndent`,Insert:`toggleOverwrite`,Esc:`singleSelection`},Ho.pcDefault={"Ctrl-A":`selectAll`,"Ctrl-D":`deleteLine`,"Ctrl-Z":`undo`,"Shift-Ctrl-Z":`redo`,"Ctrl-Y":`redo`,"Ctrl-Home":`goDocStart`,"Ctrl-End":`goDocEnd`,"Ctrl-Up":`goLineUp`,"Ctrl-Down":`goLineDown`,"Ctrl-Left":`goGroupLeft`,"Ctrl-Right":`goGroupRight`,"Alt-Left":`goLineStart`,"Alt-Right":`goLineEnd`,"Ctrl-Backspace":`delGroupBefore`,"Ctrl-Delete":`delGroupAfter`,"Ctrl-S":`save`,"Ctrl-F":`find`,"Ctrl-G":`findNext`,"Shift-Ctrl-G":`findPrev`,"Shift-Ctrl-F":`replace`,"Shift-Ctrl-R":`replaceAll`,"Ctrl-[":`indentLess`,"Ctrl-]":`indentMore`,"Ctrl-U":`undoSelection`,"Shift-Ctrl-U":`redoSelection`,"Alt-U":`redoSelection`,fallthrough:`basic`},Ho.emacsy={"Ctrl-F":`goCharRight`,"Ctrl-B":`goCharLeft`,"Ctrl-P":`goLineUp`,"Ctrl-N":`goLineDown`,"Ctrl-A":`goLineStart`,"Ctrl-E":`goLineEnd`,"Ctrl-V":`goPageDown`,"Shift-Ctrl-V":`goPageUp`,"Ctrl-D":`delCharAfter`,"Ctrl-H":`delCharBefore`,"Alt-Backspace":`delWordBefore`,"Ctrl-K":`killLine`,"Ctrl-T":`transposeChars`,"Ctrl-O":`openLine`},Ho.macDefault={"Cmd-A":`selectAll`,"Cmd-D":`deleteLine`,"Cmd-Z":`undo`,"Shift-Cmd-Z":`redo`,"Cmd-Y":`redo`,"Cmd-Home":`goDocStart`,"Cmd-Up":`goDocStart`,"Cmd-End":`goDocEnd`,"Cmd-Down":`goDocEnd`,"Alt-Left":`goGroupLeft`,"Alt-Right":`goGroupRight`,"Cmd-Left":`goLineLeft`,"Cmd-Right":`goLineRight`,"Alt-Backspace":`delGroupBefore`,"Ctrl-Alt-Backspace":`delGroupAfter`,"Alt-Delete":`delGroupAfter`,"Cmd-S":`save`,"Cmd-F":`find`,"Cmd-G":`findNext`,"Shift-Cmd-G":`findPrev`,"Cmd-Alt-F":`replace`,"Shift-Cmd-Alt-F":`replaceAll`,"Cmd-[":`indentLess`,"Cmd-]":`indentMore`,"Cmd-Backspace":`delWrappedLineLeft`,"Cmd-Delete":`delWrappedLineRight`,"Cmd-U":`undoSelection`,"Shift-Cmd-U":`redoSelection`,"Ctrl-Up":`goDocStart`,"Ctrl-Down":`goDocEnd`,fallthrough:[`basic`,`emacsy`]},Ho.default=y?Ho.macDefault:Ho.pcDefault;function Uo(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,r,i,a,o=0;o<t.length-1;o++){var s=t[o];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))n=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else if(/^s(hift)?$/i.test(s))i=!0;else throw Error(`Unrecognized modifier name: `+s)}return n&&(e=`Alt-`+e),r&&(e=`Ctrl-`+e),a&&(e=`Cmd-`+e),i&&(e=`Shift-`+e),e}function Wo(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if(r==`...`){delete e[n];continue}for(var i=ce(n.split(` `),Uo),a=0;a<i.length;a++){var o=void 0,s=void 0;a==i.length-1?(s=i.join(` `),o=r):(s=i.slice(0,a+1).join(` `),o=`...`);var c=t[s];if(!c)t[s]=o;else if(c!=o)throw Error(`Inconsistent bindings for `+s)}delete e[n]}for(var l in t)e[l]=t[l];return e}function Go(e,t,n,r){t=Yo(t);var i=t.call?t.call(e,r):t[e];if(i===!1)return`nothing`;if(i===`...`)return`multi`;if(i!=null&&n(i))return`handled`;if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!=`[object Array]`)return Go(e,t.fallthrough,n,r);for(var a=0;a<t.fallthrough.length;a++){var o=Go(e,t.fallthrough[a],n,r);if(o)return o}}}function Ko(e){var t=typeof e==`string`?e:Ro[e.keyCode];return t==`Ctrl`||t==`Alt`||t==`Shift`||t==`Mod`}function qo(e,t,n){var r=e;return t.altKey&&r!=`Alt`&&(e=`Alt-`+e),(C?t.metaKey:t.ctrlKey)&&r!=`Ctrl`&&(e=`Ctrl-`+e),(C?t.ctrlKey:t.metaKey)&&r!=`Mod`&&(e=`Cmd-`+e),!n&&t.shiftKey&&r!=`Shift`&&(e=`Shift-`+e),e}function Jo(e,t){if(f&&e.keyCode==34&&e.char)return!1;var n=Ro[e.keyCode];return n==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(n=e.code),qo(n,e,t))}function Yo(e){return typeof e==`string`?Ho[e]:e}function Xo(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var a=t(n[i]);r.length&&Q(a.from,K(r).to)<=0;){var o=r.pop();if(Q(o.from,a.from)<0){a.from=o.from;break}}r.push(a)}Fi(e,function(){for(var t=r.length-1;t>=0;t--)so(e.doc,``,r[t].from,r[t].to,`+delete`);di(e)})}function Zo(e,t,n){var r=ve(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Qo(e,t,n){var r=Zo(e,t.ch,n);return r==null?null:new Z(t.line,r,n<0?`after`:`before`)}function $o(e,t,n,r,i){if(e){t.doc.direction==`rtl`&&(i=-i);var a=q(n,t.doc.direction);if(a){var o=i<0?K(a):a[0],s=i<0==(o.level==1)?`after`:`before`,c;if(o.level>0||t.doc.direction==`rtl`){var l=or(t,n);c=i<0?n.text.length-1:0;var u=sr(t,l,c).top;c=ye(function(e){return sr(t,l,e).top==u},i<0==(o.level==1)?o.from:o.to-1,c),s==`before`&&(c=Zo(n,c,1))}else c=i<0?o.to:o.from;return new Z(r,c,s)}}return new Z(r,i<0?n.text.length:0,i<0?`before`:`after`)}function es(e,t,n,r){var i=q(t,e.doc.direction);if(!i)return Qo(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky=`before`):n.ch<=0&&(n.ch=0,n.sticky=`after`);var a=Se(i,n.ch,n.sticky),o=i[a];if(e.doc.direction==`ltr`&&o.level%2==0&&(r>0?o.to>n.ch:o.from<n.ch))return Qo(t,n,r);var s=function(e,n){return Zo(t,e instanceof Z?e.ch:e,n)},c,l=function(n){return e.options.lineWrapping?(c||=or(e,t),Dr(e,t,c,n)):{begin:0,end:t.text.length}},u=l(n.sticky==`before`?s(n,-1):n.ch);if(e.doc.direction==`rtl`||o.level==1){var d=o.level==1==r<0,f=s(n,d?1:-1);if(f!=null&&(d?f<=o.to&&f<=u.end:f>=o.from&&f>=u.begin)){var p=d?`before`:`after`;return new Z(n.line,f,p)}}var m=function(e,t,r){for(var a=function(e,t){return t?new Z(n.line,s(e,1),`before`):new Z(n.line,e,`after`)};e>=0&&e<i.length;e+=t){var o=i[e],c=t>0==(o.level!=1),l=c?r.begin:s(r.end,-1);if(o.from<=l&&l<o.to||(l=c?o.from:s(o.to,-1),r.begin<=l&&l<r.end))return a(l,c)}},h=m(a+r,r,u);if(h)return h;var g=r>0?u.end:s(u.begin,-1);return g!=null&&!(r>0&&g==t.text.length)&&(h=m(r>0?0:i.length-1,r,l(g)),h)?h:null}var ts={selectAll:$a,singleSelection:function(e){return e.setSelection(e.getCursor(`anchor`),e.getCursor(`head`),U)},killLine:function(e){return Xo(e,function(t){if(t.empty()){var n=X(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:Z(t.head.line+1,0)}:{from:t.head,to:Z(t.head.line,n)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Xo(e,function(t){return{from:Z(t.from().line,0),to:$(e.doc,Z(t.to().line+1,0))}})},delLineLeft:function(e){return Xo(e,function(e){return{from:Z(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return Xo(e,function(t){var n=e.charCoords(t.head,`div`).top+5;return{from:e.coordsChar({left:0,top:n},`div`),to:t.from()}})},delWrappedLineRight:function(e){return Xo(e,function(t){var n=e.charCoords(t.head,`div`).top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},`div`);return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(Z(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Z(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return ns(e,t.head.line)},{origin:`+move`,bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return is(e,t.head)},{origin:`+move`,bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return rs(e,t.head.line)},{origin:`+move`,bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,`div`).top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},`div`)},ae)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,`div`).top+5;return e.coordsChar({left:0,top:n},`div`)},ae)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,`div`).top+5,r=e.coordsChar({left:0,top:n},`div`);return r.ch<e.getLine(r.line).search(/\S/)?is(e,t.head):r},ae)},goLineUp:function(e){return e.moveV(-1,`line`)},goLineDown:function(e){return e.moveV(1,`line`)},goPageUp:function(e){return e.moveV(-1,`page`)},goPageDown:function(e){return e.moveV(1,`page`)},goCharLeft:function(e){return e.moveH(-1,`char`)},goCharRight:function(e){return e.moveH(1,`char`)},goColumnLeft:function(e){return e.moveH(-1,`column`)},goColumnRight:function(e){return e.moveH(1,`column`)},goWordLeft:function(e){return e.moveH(-1,`word`)},goGroupRight:function(e){return e.moveH(1,`group`)},goGroupLeft:function(e){return e.moveH(-1,`group`)},goWordRight:function(e){return e.moveH(1,`word`)},delCharBefore:function(e){return e.deleteH(-1,`codepoint`)},delCharAfter:function(e){return e.deleteH(1,`char`)},delWordBefore:function(e){return e.deleteH(-1,`word`)},delWordAfter:function(e){return e.deleteH(1,`word`)},delGroupBefore:function(e){return e.deleteH(-1,`group`)},delGroupAfter:function(e){return e.deleteH(1,`group`)},indentAuto:function(e){return e.indentSelection(`smart`)},indentMore:function(e){return e.indentSelection(`add`)},indentLess:function(e){return e.indentSelection(`subtract`)},insertTab:function(e){return e.replaceSelection(` `)},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var a=n[i].from(),o=B(e.getLine(a.line),a.ch,r);t.push(se(r-o%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection(`add`):e.execCommand(`insertTab`)},transposeChars:function(e){return Fi(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,a=X(e.doc,i.line).text;if(a){if(i.ch==a.length&&(i=new Z(i.line,i.ch-1)),i.ch>0)i=new Z(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),Z(i.line,i.ch-2),i,`+transpose`);else if(i.line>e.doc.first){var o=X(e.doc,i.line-1).text;o&&(i=new Z(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),Z(i.line-1,o.length-1),i,`+transpose`))}}n.push(new la(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Fi(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,`+input`);t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);di(e)})},openLine:function(e){return e.replaceSelection(`
12
+ `,`start`)},toggleOverwrite:function(e){return e.toggleOverwrite()}};function ns(e,t){var n=X(e.doc,t),r=nn(n);return r!=n&&(t=ct(r)),$o(!0,e,r,t,1)}function rs(e,t){var n=X(e.doc,t),r=rn(n);return r!=n&&(t=ct(r)),$o(!0,e,n,t,-1)}function is(e,t){var n=ns(e,t.line),r=X(e.doc,n.line),i=q(r,e.doc.direction);if(!i||i[0].level==0){var a=Math.max(n.ch,r.text.search(/\S/)),o=t.line==n.line&&t.ch<=a&&t.ch;return Z(n.line,o?0:a,n.sticky)}return n}function as(e,t,n){if(typeof t==`string`&&(t=ts[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=ie}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function os(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Go(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Go(t,e.options.extraKeys,n,e)||Go(t,e.options.keyMap,n,e)}var ss=new re;function cs(e,t,n,r){var i=e.state.keySeq;if(i){if(Ko(t))return`handled`;if(/\'$/.test(t)?e.state.keySeq=null:ss.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),ls(e,i+` `+t,n,r))return!0}return ls(e,t,n,r)}function ls(e,t,n,r){var i=os(e,t,r);return i==`multi`&&(e.state.keySeq=t),i==`handled`&&Nn(e,`keyHandled`,e,t,n),(i==`handled`||i==`multi`)&&(je(n),Qr(e)),!!i}function us(e,t){var n=Jo(t,!0);return n?t.shiftKey&&!e.state.keySeq?cs(e,`Shift-`+n,t,function(t){return as(e,t,!0)})||cs(e,n,t,function(t){if(typeof t==`string`?/^go[A-Z]/.test(t):t.motion)return as(e,t)}):cs(e,n,t,function(t){return as(e,t)}):!1}function ds(e,t,n){return cs(e,`'`+n+`'`,t,function(t){return as(e,t,!0)})}var fs=null;function ps(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=N(ne(t)),!De(t,e))){o&&s<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var i=us(t,e);f&&(fs=i?r:null,!i&&r==88&&!We&&(y?e.metaKey:e.ctrlKey)&&t.replaceSelection(``,null,`cut`)),n&&!y&&!i&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand(`cut`),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&ms(t)}}function ms(e){var t=e.display.lineDiv;ee(t,`CodeMirror-crosshair`);function n(e){(e.keyCode==18||!e.altKey)&&(E(t,`CodeMirror-crosshair`),Ee(document,`keyup`,n),Ee(document,`mouseover`,n))}J(document,`keyup`,n),J(document,`mouseover`,n)}function hs(e){e.keyCode==16&&(this.doc.sel.shift=!1),De(this,e)}function gs(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(Jn(t.display,e)||De(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(f&&n==fs){fs=null,je(e);return}if(!(f&&(!e.which||e.which<10)&&us(t,e))){var i=String.fromCharCode(r??n);i!=`\b`&&(ds(t,e,i)||t.display.input.onKeyPress(e))}}}var _s=400,vs=function(e,t,n){this.time=e,this.pos=t,this.button=n};vs.prototype.compare=function(e,t,n){return this.time+_s>e&&Q(t,this.pos)==0&&n==this.button};var ys,bs;function xs(e,t){var n=+new Date;return bs&&bs.compare(n,e,t)?(ys=bs=null,`triple`):ys&&ys.compare(n,e,t)?(bs=new vs(n,e,t),ys=null,`double`):(ys=new vs(n,e,t),bs=null,`single`)}function Ss(e){var t=this,n=t.display;if(!(De(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,Jn(n,e)){c||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!js(t,e)){var r=zr(t,e),i=Ie(e),a=r?xs(r,i):`single`;L(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&Cs(t,i,r,a,e))&&(i==1?r?Ts(t,r,a,e):Fe(e)==n.scroller&&je(e):i==2?(r&&za(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(w?t.display.input.onContextMenu(e):ei(t)))}}}function Cs(e,t,n,r,i){var a=`Click`;return r==`double`?a=`Double`+a:r==`triple`&&(a=`Triple`+a),a=(t==1?`Left`:t==2?`Middle`:`Right`)+a,cs(e,qo(a,i),i,function(t){if(typeof t==`string`&&(t=ts[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=ie}finally{e.state.suppressEdits=!1}return r})}function ws(e,t,n){var r=e.getOption(`configureMouse`),i=r?r(e,t,n):{};return i.unit??=(b?n.shiftKey&&n.metaKey:n.altKey)?`rectangle`:t==`single`?`char`:t==`double`?`word`:`line`,(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew??=y?n.metaKey:n.ctrlKey,i.moveOnDrag??=!(y?n.altKey:n.ctrlKey),i}function Ts(e,t,n,r){o?setTimeout(R($r,e),0):e.curOp.focus=N(ne(e));var i=ws(e,n,r),a=e.doc.sel,s;e.options.dragDrop&&Le&&!e.isReadOnly()&&n==`single`&&(s=a.contains(t))>-1&&(Q((s=a.ranges[s]).from(),t)<0||t.xRel>0)&&(Q(s.to(),t)>0||t.xRel<0)?Es(e,r,t,i):Os(e,r,t,i)}function Es(e,t,n,r){var i=e.display,a=!1,l=Ii(e,function(t){c&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:ei(e)),Ee(i.wrapper.ownerDocument,`mouseup`,l),Ee(i.wrapper.ownerDocument,`mousemove`,u),Ee(i.scroller,`dragstart`,d),Ee(i.scroller,`drop`,l),a||(je(t),r.addNew||za(e.doc,n,null,null,r.extend),c&&!p||o&&s==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),u=function(e){a||=Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return a=!0};c&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!r.moveOnDrag,J(i.wrapper.ownerDocument,`mouseup`,l),J(i.wrapper.ownerDocument,`mousemove`,u),J(i.scroller,`dragstart`,d),J(i.scroller,`drop`,l),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Ds(e,t,n){if(n==`char`)return new la(t,t);if(n==`word`)return e.findWordAt(t);if(n==`line`)return new la(Z(t.line,0),$(e.doc,Z(t.line+1,0)));var r=n(e,t);return new la(r.from,r.to)}function Os(e,t,n,r){o&&ei(e);var i=e.display,a=e.doc;je(t);var s,c,l=a.sel,u=l.ranges;if(r.addNew&&!r.extend?(c=a.sel.contains(n),s=c>-1?u[c]:new la(n,n)):(s=a.sel.primary(),c=a.sel.primIndex),r.unit==`rectangle`)r.addNew||(s=new la(n,n)),n=zr(e,t,!0,!0),c=-1;else{var d=Ds(e,n,r.unit);s=r.extend?Ra(s,d.anchor,d.head,r.extend):d}r.addNew?c==-1?(c=u.length,Ga(a,ua(e,u.concat([s]),c),{scroll:!1,origin:`*mouse`})):u.length>1&&u[c].empty()&&r.unit==`char`&&!r.extend?(Ga(a,ua(e,u.slice(0,c).concat(u.slice(c+1)),0),{scroll:!1,origin:`*mouse`}),l=a.sel):Va(a,c,s,W):(c=0,Ga(a,new ca([s],0),W),l=a.sel);var f=n;function p(t){if(Q(f,t)!=0)if(f=t,r.unit==`rectangle`){for(var i=[],o=e.options.tabSize,u=B(X(a,n.line).text,n.ch,o),d=B(X(a,t.line).text,t.ch,o),p=Math.min(u,d),m=Math.max(u,d),h=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));h<=g;h++){var _=X(a,h).text,v=G(_,p,o);p==m?i.push(new la(Z(h,v),Z(h,v))):_.length>v&&i.push(new la(Z(h,v),Z(h,G(_,m,o))))}i.length||i.push(new la(n,n)),Ga(a,ua(e,l.ranges.slice(0,c).concat(i),c),{origin:`*mouse`,scroll:!1}),e.scrollIntoView(t)}else{var y=s,b=Ds(e,t,r.unit),x=y.anchor,S;Q(b.anchor,x)>0?(S=b.head,x=ht(y.from(),b.anchor)):(S=b.anchor,x=mt(y.to(),b.head));var C=l.ranges.slice(0);C[c]=ks(e,new la($(a,x),S)),Ga(a,ua(e,C,c),W)}}var m=i.wrapper.getBoundingClientRect(),h=0;function g(t){var n=++h,o=zr(e,t,!0,r.unit==`rectangle`);if(o)if(Q(o,f)!=0){e.curOp.focus=N(ne(e)),p(o);var s=ai(i,a);(o.line>=s.to||o.line<s.from)&&setTimeout(Ii(e,function(){h==n&&g(t)}),150)}else{var c=t.clientY<m.top?-20:t.clientY>m.bottom?20:0;c&&setTimeout(Ii(e,function(){h==n&&(i.scroller.scrollTop+=c,g(t))}),50)}}function _(t){e.state.selectingText=!1,h=1/0,t&&(je(t),i.input.focus()),Ee(i.wrapper.ownerDocument,`mousemove`,v),Ee(i.wrapper.ownerDocument,`mouseup`,y),a.history.lastSelOrigin=null}var v=Ii(e,function(e){e.buttons===0||!Ie(e)?_(e):g(e)}),y=Ii(e,_);e.state.selectingText=y,J(i.wrapper.ownerDocument,`mousemove`,v),J(i.wrapper.ownerDocument,`mouseup`,y)}function ks(e,t){var n=t.anchor,r=t.head,i=X(e.doc,n.line);if(Q(n,r)==0&&n.sticky==r.sticky)return t;var a=q(i);if(!a)return t;var o=Se(a,n.ch,n.sticky),s=a[o];if(s.from!=n.ch&&s.to!=n.ch)return t;var c=o+(s.from==n.ch==(s.level!=1)?0:1);if(c==0||c==a.length)return t;var l;if(r.line!=n.line)l=(r.line-n.line)*(e.doc.direction==`ltr`?1:-1)>0;else{var u=Se(a,r.ch,r.sticky),d=u-o||(r.ch-n.ch)*(s.level==1?-1:1);l=u==c-1||u==c?d<0:d>0}var f=a[c+(l?-1:0)],p=l==(f.level==1),m=p?f.from:f.to,h=p?`after`:`before`;return n.ch==m&&n.sticky==h?t:new la(new Z(n.line,m,h),r)}function As(e,t,n,r){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch{return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&je(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!ke(e,n))return Ne(t);a-=s.top-o.viewOffset;for(var c=0;c<e.display.gutterSpecs.length;++c){var l=o.gutters.childNodes[c];if(l&&l.getBoundingClientRect().right>=i){var u=lt(e.doc,a),d=e.display.gutterSpecs[c];return Y(e,n,e,u,d.className,t),Ne(t)}}}function js(e,t){return As(e,t,`gutterClick`,!0)}function Ms(e,t){Jn(e.display,t)||Ns(e,t)||De(e,t,`contextmenu`)||w||e.display.input.onContextMenu(t)}function Ns(e,t){return ke(e,`gutterContextMenu`)?As(e,t,`gutterContextMenu`,!1):!1}function Ps(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,``)+e.options.theme.replace(/(^|\s)\s*/g,` cm-s-`),hr(e)}var Fs={toString:function(){return`CodeMirror.Init`}},Is={},Ls={};function Rs(e){var t=e.optionHandlers;function n(n,r,i,a){e.defaults[n]=r,i&&(t[n]=a?function(e,t,n){n!=Fs&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Fs,n(`value`,``,function(e,t){return e.setValue(t)},!0),n(`mode`,null,function(e,t){e.doc.modeOption=t,_a(e)},!0),n(`indentUnit`,2,_a,!0),n(`indentWithTabs`,!1),n(`smartIndent`,!0),n(`tabSize`,4,function(e){va(e),hr(e),Vr(e)},!0),n(`lineSeparator`,null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var a=e.text.indexOf(t,i);if(a==-1)break;i=a+t.length,n.push(Z(r,a))}r++});for(var i=n.length-1;i>=0;i--)so(e.doc,t,n[i],Z(n[i].line,n[i].ch+t.length))}}),n(`specialChars`,/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(e,t,n){e.state.specialChars=RegExp(t.source+(t.test(` `)?``:`| `),`g`),n!=Fs&&e.refresh()}),n(`specialCharPlaceholder`,bn,function(e){return e.refresh()},!0),n(`electricChars`,!0),n(`inputStyle`,v?`contenteditable`:`textarea`,function(){throw Error(`inputStyle can not (yet) be changed in a running editor`)},!0),n(`spellcheck`,!1,function(e,t){return e.getInputField().spellcheck=t},!0),n(`autocorrect`,!1,function(e,t){return e.getInputField().autocorrect=t},!0),n(`autocapitalize`,!1,function(e,t){return e.getInputField().autocapitalize=t},!0),n(`rtlMoveVisually`,!x),n(`wholeLineUpdateBefore`,!0),n(`theme`,`default`,function(e){Ps(e),ta(e)},!0),n(`keyMap`,`default`,function(e,t,n){var r=Yo(t),i=n!=Fs&&Yo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),n(`extraKeys`,null),n(`configureMouse`,null),n(`lineWrapping`,!1,Bs,!0),n(`gutters`,[],function(e,t){e.display.gutterSpecs=$i(t,e.options.lineNumbers),ta(e)},!0),n(`fixedGutter`,!0,function(e,t){e.display.gutters.style.left=t?Ir(e.display)+`px`:`0`,e.refresh()},!0),n(`coverGutterNextToScrollbar`,!1,function(e){return Si(e)},!0),n(`scrollbarStyle`,`native`,function(e){Ti(e),Si(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),n(`lineNumbers`,!1,function(e,t){e.display.gutterSpecs=$i(e.options.gutters,t),ta(e)},!0),n(`firstLineNumber`,1,ta,!0),n(`lineNumberFormatter`,function(e){return e},ta,!0),n(`showCursorWhenSelecting`,!1,qr,!0),n(`resetSelectionOnContextMenu`,!0),n(`lineWiseCopyCut`,!0),n(`pasteLinesPerSelection`,!0),n(`selectionsMayTouch`,!1),n(`readOnly`,!1,function(e,t){t==`nocursor`&&(ni(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),n(`screenReaderLabel`,null,function(e,t){t=t===``?null:t,e.display.input.screenReaderLabelChanged(t)}),n(`disableInput`,!1,function(e,t){t||e.display.input.reset()},!0),n(`dragDrop`,!0,zs),n(`allowDropFileTypes`,null),n(`cursorBlinkRate`,530),n(`cursorScrollMargin`,0),n(`cursorHeight`,1,qr,!0),n(`singleCursorHeightPerLine`,!0,qr,!0),n(`workTime`,100),n(`workDelay`,100),n(`flattenSpans`,!0,va,!0),n(`addModeClass`,!1,va,!0),n(`pollInterval`,100),n(`undoDepth`,200,function(e,t){return e.doc.history.undoDepth=t}),n(`historyEventDelay`,1250),n(`viewportMargin`,10,function(e){return e.refresh()},!0),n(`maxHighlightLength`,1e4,va,!0),n(`moveInputWithCursor`,!0,function(e,t){t||e.display.input.resetPosition()}),n(`tabindex`,null,function(e,t){return e.display.input.getField().tabIndex=t||``}),n(`autofocus`,null),n(`direction`,`ltr`,function(e,t){return e.doc.setDirection(t)},!0),n(`phrases`,null)}function zs(e,t,n){if(!t!=!(n&&n!=Fs)){var r=e.display.dragFunctions,i=t?J:Ee;i(e.display.scroller,`dragstart`,r.start),i(e.display.scroller,`dragenter`,r.enter),i(e.display.scroller,`dragover`,r.over),i(e.display.scroller,`dragleave`,r.leave),i(e.display.scroller,`drop`,r.drop)}}function Bs(e){e.options.lineWrapping?(ee(e.display.wrapper,`CodeMirror-wrap`),e.display.sizer.style.minWidth=``,e.display.sizerWidth=null):(E(e.display.wrapper,`CodeMirror-wrap`),fn(e)),Rr(e),Vr(e),hr(e),setTimeout(function(){return Si(e)},100)}function Vs(e,t){var n=this;if(!(this instanceof Vs))return new Vs(e,t);this.options=t=t?z(t):{},z(Is,t,!1);var r=t.value;typeof r==`string`?r=new Do(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Vs.inputStyles[t.inputStyle](this),a=this.display=new na(e,r,i,t);for(var l in a.wrapper.CodeMirror=this,Ps(this),t.lineWrapping&&(this.display.wrapper.className+=` CodeMirror-wrap`),Ti(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new re,keySeq:null,specialChars:null},t.autofocus&&!v&&a.input.focus(),o&&s<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Hs(this),Fo(),Di(this),this.curOp.forceUpdate=!0,Sa(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&ti(n)},20):ni(this),Ls)Ls.hasOwnProperty(l)&&Ls[l](this,t[l],Fs);Qi(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Us.length;++u)Us[u](this);Oi(this),c&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering==`optimizelegibility`&&(a.lineDiv.style.textRendering=`auto`)}Vs.defaults=Is,Vs.optionHandlers=Ls;function Hs(e){var t=e.display;J(t.scroller,`mousedown`,Ii(e,Ss)),o&&s<11?J(t.scroller,`dblclick`,Ii(e,function(t){if(!De(e,t)){var n=zr(e,t);if(!(!n||js(e,t)||Jn(e.display,t))){je(t);var r=e.findWordAt(n);za(e.doc,r.anchor,r.head)}}})):J(t.scroller,`dblclick`,function(t){return De(e,t)||je(t)}),J(t.scroller,`contextmenu`,function(t){return Ms(e,t)}),J(t.input.getField(),`contextmenu`,function(n){t.scroller.contains(n.target)||Ms(e,n)});var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}function a(e){if(e.touches.length!=1)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function c(e,t){if(t.left==null)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}J(t.scroller,`touchstart`,function(i){if(!De(e,i)&&!a(i)&&!js(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},i.touches.length==1&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),J(t.scroller,`touchmove`,function(){t.activeTouch&&(t.activeTouch.moved=!0)}),J(t.scroller,`touchend`,function(n){var r=t.activeTouch;if(r&&!Jn(t,n)&&r.left!=null&&!r.moved&&new Date-r.start<300){var a=e.coordsChar(t.activeTouch,`page`),o=!r.prev||c(r,r.prev)?new la(a,a):!r.prev.prev||c(r,r.prev.prev)?e.findWordAt(a):new la(Z(a.line,0),$(e.doc,Z(a.line+1,0)));e.setSelection(o.anchor,o.head),e.focus(),je(n)}i()}),J(t.scroller,`touchcancel`,i),J(t.scroller,`scroll`,function(){t.scroller.clientHeight&&(gi(e,t.scroller.scrollTop),vi(e,t.scroller.scrollLeft,!0),Y(e,`scroll`,e))}),J(t.scroller,`mousewheel`,function(t){return sa(e,t)}),J(t.scroller,`DOMMouseScroll`,function(t){return sa(e,t)}),J(t.wrapper,`scroll`,function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){De(e,t)||Pe(t)},over:function(t){De(e,t)||(jo(e,t),Pe(t))},start:function(t){return Ao(e,t)},drop:Ii(e,ko),leave:function(t){De(e,t)||Mo(e)}};var l=t.input.getField();J(l,`keyup`,function(t){return hs.call(e,t)}),J(l,`keydown`,Ii(e,ps)),J(l,`keypress`,Ii(e,gs)),J(l,`focus`,function(t){return ti(e,t)}),J(l,`blur`,function(t){return ni(e,t)})}var Us=[];Vs.defineInitHook=function(e){return Us.push(e)};function Ws(e,t,n,r){var i=e.doc,a;n??=`add`,n==`smart`&&(i.mode.indent?a=Ct(e,t).state:n=`prev`);var o=e.options.tabSize,s=X(i,t),c=B(s.text,null,o);s.stateAfter&&=null;var l=s.text.match(/^\s*/)[0],u;if(!r&&!/\S/.test(s.text))u=0,n=`not`;else if(n==`smart`&&(u=i.mode.indent(a,s.text.slice(l.length),s.text),u==ie||u>150)){if(!r)return;n=`prev`}n==`prev`?u=t>i.first?B(X(i,t-1).text,null,o):0:n==`add`?u=c+e.options.indentUnit:n==`subtract`?u=c-e.options.indentUnit:typeof n==`number`&&(u=c+n),u=Math.max(0,u);var d=``,f=0;if(e.options.indentWithTabs)for(var p=Math.floor(u/o);p;--p)f+=o,d+=` `;if(f<u&&(d+=se(u-f)),d!=l)return so(i,d,Z(t,0),Z(t,l.length),`+input`),s.stateAfter=null,!0;for(var m=0;m<i.sel.ranges.length;m++){var h=i.sel.ranges[m];if(h.head.line==t&&h.head.ch<l.length){var g=Z(t,l.length);Va(i,m,new la(g,g));break}}}var Gs=null;function Ks(e){Gs=e}function qs(e,t,n,r,i){var a=e.doc;e.display.shift=!1,r||=a.sel;var o=new Date-200,s=i==`paste`||e.state.pasteIncoming>o,c=He(t),l=null;if(s&&r.ranges.length>1)if(Gs&&Gs.text.join(`
13
+ `)==t){if(r.ranges.length%Gs.text.length==0){l=[];for(var u=0;u<Gs.text.length;u++)l.push(a.splitLines(Gs.text[u]))}}else c.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(l=ce(c,function(e){return[e]}));for(var d=e.curOp.updateInput,f=r.ranges.length-1;f>=0;f--){var p=r.ranges[f],m=p.from(),h=p.to();p.empty()&&(n&&n>0?m=Z(m.line,m.ch-n):e.state.overwrite&&!s?h=Z(h.line,Math.min(X(a,h.line).text.length,h.ch+K(c).length)):s&&Gs&&Gs.lineWise&&Gs.text.join(`
14
+ `)==c.join(`
15
+ `)&&(m=h=Z(m.line,0)));var g={from:m,to:h,text:l?l[f%l.length]:c,origin:i||(s?`paste`:e.state.cutIncoming>o?`cut`:`+input`)};to(e.doc,g),Nn(e,`inputRead`,e,g)}t&&!s&&Ys(e,t),di(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Js(e,t){var n=e.clipboardData&&e.clipboardData.getData(`Text`);if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Fi(t,function(){return qs(t,n,0,null,`paste`)}),!0}function Ys(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s<a.electricChars.length;s++)if(t.indexOf(a.electricChars.charAt(s))>-1){o=Ws(e,i.head.line,`smart`);break}}else a.electricInput&&a.electricInput.test(X(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=Ws(e,i.head.line,`smart`));o&&Nn(e,`electricInput`,e,i.head.line)}}}function Xs(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,a={anchor:Z(i,0),head:Z(i+1,0)};n.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:n}}function Zs(e,t,n,r){e.setAttribute(`autocorrect`,n?`on`:`off`),e.setAttribute(`autocapitalize`,r?`on`:`off`),e.setAttribute(`spellcheck`,!!t)}function Qs(){var e=k(`textarea`,null,null,`position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none`),t=k(`div`,[e],null,`overflow: hidden; position: relative; width: 3px; height: 0px;`);return c?e.style.width=`1000px`:e.setAttribute(`wrap`,`off`),g&&(e.style.border=`1px solid black`),t}function $s(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){L(this).focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&e!=`mode`||(r[e]=n,t.hasOwnProperty(e)&&Ii(this,t[e])(this,n,i),Y(this,`optionChange`,this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?`push`:`unshift`](Yo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:Li(function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw Error(`Overlays may not be stateful.`);le(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},function(e){return e.priority}),this.state.modeGen++,Vr(this)}),removeOverlay:Li(function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||typeof e==`string`&&r.name==e){t.splice(n,1),this.state.modeGen++,Vr(this);return}}}),indentLine:Li(function(e,t,n){typeof t!=`string`&&typeof t!=`number`&&(t=t==null?this.options.smartIndent?`smart`:`prev`:t?`add`:`subtract`),ut(this.doc,e)&&Ws(this,e,t,n)}),indentSelection:Li(function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Ws(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&di(this));else{var a=i.from(),o=i.to(),s=Math.max(n,a.line);n=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var c=s;c<n;++c)Ws(this,c,e);var l=this.doc.sel.ranges;a.ch==0&&t.length==l.length&&l[r].from().ch>0&&Va(this.doc,r,new la(a,l[r].to()),U)}}}),getTokenAt:function(e,t){return Ot(this,e,t)},getLineTokens:function(e,t){return Ot(this,Z(e),t,!0)},getTokenTypeAt:function(e){e=$(this.doc,e);var t=St(this,X(this.doc,e.line)),n=0,r=(t.length-1)/2,i=e.ch,a;if(i==0)a=t[2];else for(;;){var o=n+r>>1;if((o?t[o*2-1]:0)>=i)r=o;else if(t[o*2+1]<i)n=o+1;else{a=t[o*2+2];break}}var s=a?a.indexOf(`overlay `):-1;return s<0?a:s==0?null:a.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],a=this.getModeAt(e);if(typeof a[t]==`string`)i[a[t]]&&r.push(i[a[t]]);else if(a[t])for(var o=0;o<a[t].length;o++){var s=i[a[t][o]];s&&r.push(s)}else a.helperType&&i[a.helperType]?r.push(i[a.helperType]):i[a.name]&&r.push(i[a.name]);for(var c=0;c<i._global.length;c++){var l=i._global[c];l.pred(a,this)&&V(r,l.val)==-1&&r.push(l.val)}return r},getStateAfter:function(e,t){var n=this.doc;return e=gt(n,e??n.first+n.size-1),Ct(this,e+1,t).state},cursorCoords:function(e,t){var n,r=this.doc.sel.primary();return n=e==null?r.head:typeof e==`object`?$(this.doc,e):e?r.from():r.to(),Sr(this,n,t||`page`)},charCoords:function(e,t){return xr(this,$(this.doc,e),t||`page`)},coordsChar:function(e,t){return e=br(this,e,t||`page`),Tr(this,e.left,e.top)},lineAtHeight:function(e,t){return e=br(this,{top:e,left:0},t||`page`).top,lt(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r=!1,i;if(typeof e==`number`){var a=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>a&&(e=a,r=!0),i=X(this.doc,e)}else i=e;return yr(this,i,{top:0,left:0},t||`page`,n||r).top+(r?this.doc.height-un(i):0)},defaultTextHeight:function(){return Nr(this.display)},defaultCharWidth:function(){return Pr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var a=this.display;e=Sr(this,$(this.doc,e));var o=e.bottom,s=e.left;if(t.style.position=`absolute`,t.setAttribute(`cm-ignore-events`,`true`),this.display.input.setUneditable(t),a.sizer.appendChild(t),r==`over`)o=e.top;else if(r==`above`||r==`near`){var c=Math.max(a.wrapper.clientHeight,this.doc.height),l=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);(r==`above`||e.bottom+t.offsetHeight>c)&&e.top>t.offsetHeight?o=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=c&&(o=e.bottom),s+t.offsetWidth>l&&(s=l-t.offsetWidth)}t.style.top=o+`px`,t.style.left=t.style.right=``,i==`right`?(s=a.sizer.clientWidth-t.offsetWidth,t.style.right=`0px`):(i==`left`?s=0:i==`middle`&&(s=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+`px`),n&&ci(this,{left:s,top:o,right:s+t.offsetWidth,bottom:o+t.offsetHeight})},triggerOnKeyDown:Li(ps),triggerOnKeyPress:Li(gs),triggerOnKeyUp:hs,triggerOnMouseDown:Li(Ss),execCommand:function(e){if(ts.hasOwnProperty(e))return ts[e].call(null,this)},triggerElectric:Li(function(e){Ys(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var a=$(this.doc,e),o=0;o<t&&(a=ec(this.doc,a,i,n,r),!a.hitSide);++o);return a},moveH:Li(function(e,t){var n=this;this.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?ec(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()},ae)}),deleteH:Li(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection(``,null,`+delete`):Xo(this,function(n){var i=ec(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,a=r;t<0&&(i=-1,t=-t);for(var o=$(this.doc,e),s=0;s<t;++s){var c=Sr(this,o,`div`);if(a==null?a=c.left:c.left=a,o=tc(this,c,i,n),o.hitSide)break}return o},moveV:Li(function(e,t){var n=this,r=this.doc,i=[],a=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(o){if(a)return e<0?o.from():o.to();var s=Sr(n,o.head,`div`);o.goalColumn!=null&&(s.left=o.goalColumn),i.push(s.left);var c=tc(n,s,e,t);return t==`page`&&o==r.sel.primary()&&ui(n,xr(n,c,`div`).top-s.top),c},ae),i.length)for(var o=0;o<r.sel.ranges.length;o++)r.sel.ranges[o].goalColumn=i[o]}),findWordAt:function(e){var t=this.doc,n=X(t,e.line).text,r=e.ch,i=e.ch;if(n){var a=this.getHelper(e,`wordChars`);(e.sticky==`before`||i==n.length)&&r?--r:++i;for(var o=n.charAt(r),s=me(o,a)?function(e){return me(e,a)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!me(e)};r>0&&s(n.charAt(r-1));)--r;for(;i<n.length&&s(n.charAt(i));)++i}return new la(Z(e.line,r),Z(e.line,i))},toggleOverwrite:function(e){e!=null&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?ee(this.display.cursorDiv,`CodeMirror-overwrite`):E(this.display.cursorDiv,`CodeMirror-overwrite`),Y(this,`overwriteToggle`,this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==N(ne(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Li(function(e,t){fi(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Qn(this)-this.display.barHeight,width:e.scrollWidth-Qn(this)-this.display.barWidth,clientHeight:er(this),clientWidth:$n(this)}},scrollIntoView:Li(function(e,t){e==null?(e={from:this.doc.sel.primary().head,to:null},t??=this.options.cursorScrollMargin):typeof e==`number`?e={from:Z(e,0),to:null}:e.from??(e={from:e,to:null}),e.to||=e.from,e.margin=t||0,e.from.line==null?hi(this,e.from,e.to,e.margin):pi(this,e)}),setSize:Li(function(e,t){var n=this,r=function(e){return typeof e==`number`||/^\d+$/.test(String(e))?e+`px`:e};e!=null&&(this.display.wrapper.style.width=r(e)),t!=null&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&mr(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets){for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Hr(n,i,`widget`);break}}++i}),this.curOp.forceUpdate=!0,Y(this,`refresh`,this)}),operation:function(e){return Fi(this,e)},startOperation:function(){return Di(this)},endOperation:function(){return Oi(this)},refresh:Li(function(){var e=this.display.cachedTextHeight;Vr(this),this.curOp.forceUpdate=!0,hr(this),fi(this,this.doc.scrollLeft,this.doc.scrollTop),Yi(this.display),(e==null||Math.abs(e-Nr(this.display))>.5||this.options.lineWrapping)&&Rr(this),Y(this,`refresh`,this)}),swapDoc:Li(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Sa(this,e),hr(this),this.display.input.reset(),fi(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Nn(this,`swapDoc`,this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ae(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,a){e.registerHelper(t,r,a),n[t]._global.push({pred:i,val:a})}}function ec(e,t,n,r,i){var a=t,o=n,s=X(e,t.line),c=i&&e.direction==`rtl`?-n:n;function l(){var n=t.line+c;return n<e.first||n>=e.first+e.size?!1:(t=new Z(n,t.ch,t.sticky),s=X(e,n))}function u(a){var o;if(r==`codepoint`){var u=s.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(u))o=null;else{var d=n>0?u>=55296&&u<56320:u>=56320&&u<57343;o=new Z(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(d?2:1))),-n)}}else o=i?es(e.cm,s,t,n):Qo(s,t,n);if(o==null)if(!a&&l())t=$o(i,e.cm,s,t.line,c);else return!1;else t=o;return!0}if(r==`char`||r==`codepoint`)u();else if(r==`column`)u(!0);else if(r==`word`||r==`group`)for(var d=null,f=r==`group`,p=e.cm&&e.cm.getHelper(t,`wordChars`),m=!0;!(n<0&&!u(!m));m=!1){var h=s.text.charAt(t.ch)||`
16
+ `,g=me(h,p)?`w`:f&&h==`
17
+ `?`n`:!f||/\s/.test(h)?null:`p`;if(f&&!m&&!g&&(g=`s`),d&&d!=g){n<0&&(n=1,u(),t.sticky=`after`);break}if(g&&(d=g),n>0&&!u(!m))break}var _=Za(e,t,a,o,!0);return ft(a,_)&&(_.hitSide=!0),_}function tc(e,t,n,r){var i=e.doc,a=t.left,o;if(r==`page`){var s=Math.min(e.display.wrapper.clientHeight,L(e).innerHeight||i(e).documentElement.clientHeight),c=Math.max(s-.5*Nr(e.display),3);o=(n>0?t.bottom:t.top)+n*c}else r==`line`&&(o=n>0?t.bottom+3:t.top-3);for(var l;l=Tr(e,a,o),l.outside;){if(n<0?o<=0:o>=i.height){l.hitSide=!0;break}o+=n*5}return l}var nc=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new re,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};nc.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,Zs(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function a(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}J(i,`paste`,function(e){!a(e)||De(r,e)||Js(e,r)||s<=11&&setTimeout(Ii(r,function(){return t.updateFromDOM()}),20)}),J(i,`compositionstart`,function(e){t.composing={data:e.data,done:!1}}),J(i,`compositionupdate`,function(e){t.composing||={data:e.data,done:!1}}),J(i,`compositionend`,function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),J(i,`touchstart`,function(){return n.forceCompositionEnd()}),J(i,`input`,function(){t.composing||t.readFromDOMSoon()});function o(e){if(!(!a(e)||De(r,e))){if(r.somethingSelected())Ks({lineWise:!1,text:r.getSelections()}),e.type==`cut`&&r.replaceSelection(``,null,`cut`);else if(r.options.lineWiseCopyCut){var t=Xs(r);Ks({lineWise:!0,text:t.text}),e.type==`cut`&&r.operation(function(){r.setSelections(t.ranges,0,U),r.replaceSelection(``,null,`cut`)})}else return;if(e.clipboardData){e.clipboardData.clearData();var o=Gs.text.join(`
18
+ `);if(e.clipboardData.setData(`Text`,o),e.clipboardData.getData(`Text`)==o){e.preventDefault();return}}var s=Qs(),c=s.firstChild;Zs(c),r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),c.value=Gs.text.join(`
19
+ `);var l=N(I(i));te(c),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==i&&n.showPrimarySelection()},50)}}J(i,`copy`,o),J(i,`cut`,o)},nc.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute(`aria-label`,e):this.div.removeAttribute(`aria-label`)},nc.prototype.prepareSelection=function(){var e=Jr(this.cm,!1);return e.focus=N(I(this.div))==this.div,e},nc.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},nc.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},nc.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),a=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||a.line<t.display.viewFrom){e.removeAllRanges();return}var o=sc(t,e.anchorNode,e.anchorOffset),s=sc(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&s&&!s.bad&&Q(ht(o,s),i)==0&&Q(mt(o,s),a)==0)){var c=t.display.view,l=i.line>=t.display.viewFrom&&rc(t,i)||{node:c[0].measure.map[2],offset:0},u=a.line<t.display.viewTo&&rc(t,a);if(!u){var d=c[c.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(!l||!u){e.removeAllRanges();return}var p=e.rangeCount&&e.getRangeAt(0),m;try{m=j(l.node,l.offset,u.offset,u.node)}catch{}m&&(!n&&t.state.focused?(e.collapse(l.node,l.offset),m.collapsed||(e.removeAllRanges(),e.addRange(m))):(e.removeAllRanges(),e.addRange(m)),p&&e.anchorNode==null?e.addRange(p):n&&this.startGracePeriod()),this.rememberSelection()}},nc.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},nc.prototype.showMultipleSelections=function(e){O(this.cm.display.cursorDiv,e.cursors),O(this.cm.display.selectionDiv,e.selection)},nc.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},nc.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return M(this.div,t)},nc.prototype.focus=function(){this.cm.options.readOnly!=`nocursor`&&((!this.selectionInEditor()||N(I(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},nc.prototype.blur=function(){this.div.blur()},nc.prototype.getField=function(){return this.div},nc.prototype.supportsTouch=function(){return!0},nc.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Fi(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.polling.set(this.cm.options.pollInterval,n)},nc.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},nc.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(_&&u&&this.cm.display.gutterSpecs.length&&ic(e.anchorNode)){this.cm.triggerOnKeyDown({type:`keydown`,keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=sc(t,e.anchorNode,e.anchorOffset),r=sc(t,e.focusNode,e.focusOffset);n&&r&&Fi(t,function(){Ga(t.doc,da(n,r),U),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},nc.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.ch==0&&r.line>e.firstLine()&&(r=Z(r.line-1,X(e.doc,r.line-1).length)),i.ch==X(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=Z(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var a,o,s;r.line==t.viewFrom||(a=Br(e,r.line))==0?(o=ct(t.view[0].line),s=t.view[0].node):(o=ct(t.view[a].line),s=t.view[a-1].node.nextSibling);var c=Br(e,i.line),l,u;if(c==t.view.length-1?(l=t.viewTo-1,u=t.lineDiv.lastChild):(l=ct(t.view[c+1].line)-1,u=t.view[c+1].node.previousSibling),!s)return!1;for(var d=e.doc.splitLines(oc(e,s,u,o,l)),f=at(e.doc,Z(o,0),Z(l,X(e.doc,l).text.length));d.length>1&&f.length>1;)if(K(d)==K(f))d.pop(),f.pop(),l--;else if(d[0]==f[0])d.shift(),f.shift(),o++;else break;for(var p=0,m=0,h=d[0],g=f[0],_=Math.min(h.length,g.length);p<_&&h.charCodeAt(p)==g.charCodeAt(p);)++p;for(var v=K(d),y=K(f),b=Math.min(v.length-(d.length==1?p:0),y.length-(f.length==1?p:0));m<b&&v.charCodeAt(v.length-m-1)==y.charCodeAt(y.length-m-1);)++m;if(d.length==1&&f.length==1&&o==r.line)for(;p&&p>r.ch&&v.charCodeAt(v.length-m-1)==y.charCodeAt(y.length-m-1);)p--,m++;d[d.length-1]=v.slice(0,v.length-m).replace(/^\u200b+/,``),d[0]=d[0].slice(p).replace(/\u200b+$/,``);var x=Z(o,p),S=Z(l,f.length?K(f).length-m:0);if(d.length>1||d[0]||Q(x,S))return so(e.doc,d,x,S,`+input`),!0},nc.prototype.ensurePolled=function(){this.forceCompositionEnd()},nc.prototype.reset=function(){this.forceCompositionEnd()},nc.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},nc.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout??=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},nc.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Fi(this.cm,function(){return Vr(e.cm)})},nc.prototype.setUneditable=function(e){e.contentEditable=`false`},nc.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Ii(this.cm,qs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},nc.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!=`nocursor`)},nc.prototype.onContextMenu=function(){},nc.prototype.resetPosition=function(){},nc.prototype.needsContentAttribute=!0;function rc(e,t){var n=ar(e,t.line);if(!n||n.hidden)return null;var r=X(e.doc,t.line),i=nr(n,r,t.line),a=q(r,e.doc.direction),o=`left`;a&&(o=Se(a,t.ch)%2?`right`:`left`);var s=lr(i.map,t.ch,o);return s.offset=s.collapse==`right`?s.end:s.start,s}function ic(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ac(e,t){return t&&(e.bad=!0),e}function oc(e,t,n,r,i){var a=``,o=!1,s=e.doc.lineSeparator(),c=!1;function l(e){return function(t){return t.id==e}}function u(){o&&=(a+=s,c&&(a+=s),c=!1)}function d(e){e&&(u(),a+=e)}function f(t){if(t.nodeType==1){var n=t.getAttribute(`cm-text`);if(n){d(n);return}var a=t.getAttribute(`cm-marker`),p;if(a){var m=e.findMarks(Z(r,0),Z(i+1,0),l(+a));m.length&&(p=m[0].find(0))&&d(at(e.doc,p.from,p.to).join(s));return}if(t.getAttribute(`contenteditable`)==`false`)return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&t.textContent.length==0)return;h&&u();for(var g=0;g<t.childNodes.length;g++)f(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(c=!0),h&&(o=!0)}else t.nodeType==3&&d(t.nodeValue.replace(/\u200b/g,``).replace(/\u00a0/g,` `))}for(;f(t),t!=n;)t=t.nextSibling,c=!1;return a}function sc(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return ac(e.clipPos(Z(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var a=e.display.view[i];if(a.node==r)return cc(a,t,n)}}function cc(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!M(r,t))return ac(Z(ct(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var a=e.rest?K(e.rest):e.line;return ac(Z(ct(a),a.text.length),i)}var o=t.nodeType==3?t:null,s=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,n&&=o.nodeValue.length);s.parentNode!=r;)s=s.parentNode;var c=e.measure,l=c.maps;function u(t,n,r){for(var i=-1;i<(l?l.length:0);i++)for(var a=i<0?c.map:l[i],o=0;o<a.length;o+=3){var s=a[o+2];if(s==t||s==n){var u=ct(i<0?e.line:e.rest[i]),d=a[o]+r;return(r<0||s!=t)&&(d=a[o+(r?1:0)]),Z(u,d)}}}var d=u(o,s,n);if(d)return ac(d,i);for(var f=s.nextSibling,p=o?o.nodeValue.length-n:0;f;f=f.nextSibling){if(d=u(f,f.firstChild,0),d)return ac(Z(d.line,d.ch-p),i);p+=f.textContent.length}for(var m=s.previousSibling,h=n;m;m=m.previousSibling){if(d=u(m,m.firstChild,-1),d)return ac(Z(d.line,d.ch+h),i);h+=m.textContent.length}}var lc=function(e){this.cm=e,this.prevInput=``,this.pollingFast=!1,this.polling=new re,this.hasSelection=!1,this.composing=null,this.resetting=!1};lc.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width=`0px`),J(i,`input`,function(){o&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),J(i,`paste`,function(e){De(r,e)||Js(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function a(e){if(!De(r,e)){if(r.somethingSelected())Ks({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var t=Xs(r);Ks({lineWise:!0,text:t.text}),e.type==`cut`?r.setSelections(t.ranges,null,U):(n.prevInput=``,i.value=t.text.join(`
20
+ `),te(i))}else return;e.type==`cut`&&(r.state.cutIncoming=+new Date)}}J(i,`cut`,a),J(i,`copy`,a),J(e.scroller,`paste`,function(t){if(!(Jn(e,t)||De(r,t))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var a=new Event(`paste`);a.clipboardData=t.clipboardData,i.dispatchEvent(a)}}),J(e.lineSpace,`selectstart`,function(t){Jn(e,t)||je(t)}),J(i,`compositionstart`,function(){var e=r.getCursor(`from`);n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor(`to`),{className:`CodeMirror-composing`})}}),J(i,`compositionend`,function(){n.composing&&=(n.poll(),n.composing.range.clear(),null)})},lc.prototype.createField=function(e){this.wrapper=Qs(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Zs(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},lc.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute(`aria-label`,e):this.textarea.removeAttribute(`aria-label`)},lc.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Jr(e);if(e.options.moveInputWithCursor){var i=Sr(e,n.sel.primary().head,`div`),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return r},lc.prototype.showSelection=function(e){var t=this.cm.display;O(t.cursorDiv,e.cursors),O(t.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+`px`,this.wrapper.style.left=e.teLeft+`px`)},lc.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput=``;var n=t.getSelection();this.textarea.value=n,t.state.focused&&te(this.textarea),o&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value=``,o&&s>=9&&(this.hasSelection=null));this.resetting=!1}},lc.prototype.getField=function(){return this.textarea},lc.prototype.supportsTouch=function(){return!1},lc.prototype.focus=function(){if(this.cm.options.readOnly!=`nocursor`&&(!v||N(I(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},lc.prototype.blur=function(){this.textarea.blur()},lc.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},lc.prototype.receivedFocus=function(){this.slowPoll()},lc.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},lc.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){!t.poll()&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},lc.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Ue(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!r&&(r=`​`),a==8666)return this.reset(),this.cm.execCommand(`undo`)}for(var c=0,l=Math.min(r.length,i.length);c<l&&r.charCodeAt(c)==i.charCodeAt(c);)++c;return Fi(t,function(){qs(t,i.slice(c),r.length-c,null,e.composing?`*compose`:null),i.length>1e3||i.indexOf(`
21
+ `)>-1?n.value=e.prevInput=``:e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor(`to`),{className:`CodeMirror-composing`}))}),!0},lc.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},lc.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},lc.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=zr(n,e),l=r.scroller.scrollTop;if(!a||f)return;n.options.resetSelectionOnContextMenu&&n.doc.sel.contains(a)==-1&&Ii(n,Ga)(n.doc,da(a),U);var u=i.style.cssText,d=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText=`position: static`,i.style.cssText=`position: absolute; width: 30px; height: 30px;
22
+ top: `+(e.clientY-p.top-5)+`px; left: `+(e.clientX-p.left-5)+`px;
23
+ z-index: 1000; background: `+(o?`rgba(255, 255, 255, .05)`:`transparent`)+`;
24
+ outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var m;c&&(m=i.ownerDocument.defaultView.scrollY),r.input.focus(),c&&i.ownerDocument.defaultView.scrollTo(null,m),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=` `),t.contextMenuPending=g,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function h(){if(i.selectionStart!=null){var e=n.somethingSelected(),a=`​`+(e?i.value:``);i.value=`⇚`,i.value=a,t.prevInput=e?``:`​`,i.selectionStart=1,i.selectionEnd=a.length,r.selForContextMenu=n.doc.sel}}function g(){if(t.contextMenuPending==g&&(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=u,o&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!o||o&&s<9)&&h();var e=0,a=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput==`​`?Ii(n,$a)(n):e++<10?r.detectingSelectAll=setTimeout(a,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(a,200)}}if(o&&s>=9&&h(),w){Pe(e);var _=function(){Ee(window,`mouseup`,_),setTimeout(g,20)};J(window,`mouseup`,_)}else setTimeout(g,50)},lc.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e==`nocursor`,this.textarea.readOnly=!!e},lc.prototype.setUneditable=function(){},lc.prototype.needsContentAttribute=!1;function uc(e,t){if(t=t?z(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=N(I(e));t.autofocus=n==e||e.getAttribute(`autofocus`)!=null&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(J(e.form,`submit`,r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var o=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=o}}catch{}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display=``,e.form&&(Ee(e.form,`submit`,r),!t.leaveSubmitMethodAlone&&typeof e.form.submit==`function`&&(e.form.submit=i))}},e.style.display=`none`;var s=Vs(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s}function dc(e){e.off=Ee,e.on=J,e.wheelEventPixels=oa,e.Doc=Do,e.splitLines=He,e.countColumn=B,e.findColumn=G,e.isWordChar=pe,e.Pass=ie,e.signal=Y,e.Line=pn,e.changeEnd=fa,e.scrollbarModel=wi,e.Pos=Z,e.cmpPos=Q,e.modes=qe,e.mimeModes=Je,e.resolveMode=Ze,e.getMode=Qe,e.modeExtensions=$e,e.extendMode=et,e.copyState=tt,e.startState=rt,e.innerMode=nt,e.commands=ts,e.keyMap=Ho,e.keyName=Jo,e.isModifierKey=Ko,e.lookupKey=Go,e.normalizeKeyMap=Wo,e.StringStream=it,e.SharedTextMarker=xo,e.TextMarker=yo,e.LineWidget=ho,e.e_preventDefault=je,e.e_stopPropagation=Me,e.e_stop=Pe,e.addClass=ee,e.contains=M,e.rmClass=E,e.keyNames=Ro}Rs(Vs),$s(Vs);var fc=`iter insert remove copy getEditor constructor`.split(` `);for(var pc in Do.prototype)Do.prototype.hasOwnProperty(pc)&&V(fc,pc)<0&&(Vs.prototype[pc]=(function(e){return function(){return e.apply(this.doc,arguments)}})(Do.prototype[pc]));return Ae(Do),Vs.inputStyles={textarea:lc,contenteditable:nc},Vs.defineMode=function(e){!Vs.defaults.mode&&e!=`null`&&(Vs.defaults.mode=e),Ye.apply(this,arguments)},Vs.defineMIME=Xe,Vs.defineMode(`null`,function(){return{token:function(e){return e.skipToEnd()}}}),Vs.defineMIME(`text/plain`,`null`),Vs.defineExtension=function(e,t){Vs.prototype[e]=t},Vs.defineDocExtension=function(e,t){Do.prototype[e]=t},Vs.fromTextArea=uc,dc(Vs),Vs.version=`5.65.20`,Vs}))})),pt=Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){function t(t,n,r){var i=t.getWrapperElement(),a=i.appendChild(document.createElement(`div`));return r?a.className=`CodeMirror-dialog CodeMirror-dialog-bottom`:a.className=`CodeMirror-dialog CodeMirror-dialog-top`,typeof n==`string`?a.innerHTML=n:a.appendChild(n),e.addClass(i,`dialog-opened`),a}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension(`openDialog`,function(r,i,a){a||={},n(this,null);var o=t(this,r,a.bottom),s=!1,c=this;function l(t){if(typeof t==`string`)u.value=t;else{if(s)return;s=!0,e.rmClass(o.parentNode,`dialog-opened`),o.parentNode.removeChild(o),c.focus(),a.onClose&&a.onClose(o)}}var u=o.getElementsByTagName(`input`)[0],d;return u?(u.focus(),a.value&&(u.value=a.value,a.selectValueOnOpen!==!1&&u.select()),a.onInput&&e.on(u,`input`,function(e){a.onInput(e,u.value,l)}),a.onKeyUp&&e.on(u,`keyup`,function(e){a.onKeyUp(e,u.value,l)}),e.on(u,`keydown`,function(t){a&&a.onKeyDown&&a.onKeyDown(t,u.value,l)||((t.keyCode==27||a.closeOnEnter!==!1&&t.keyCode==13)&&(u.blur(),e.e_stop(t),l()),t.keyCode==13&&i(u.value,t))}),a.closeOnBlur!==!1&&e.on(o,`focusout`,function(e){e.relatedTarget!==null&&l()})):(d=o.getElementsByTagName(`button`)[0])&&(e.on(d,`click`,function(){l(),c.focus()}),a.closeOnBlur!==!1&&e.on(d,`blur`,l),d.focus()),l}),e.defineExtension(`openConfirm`,function(r,i,a){n(this,null);var o=t(this,r,a&&a.bottom),s=o.getElementsByTagName(`button`),c=!1,l=this,u=1;function d(){c||(c=!0,e.rmClass(o.parentNode,`dialog-opened`),o.parentNode.removeChild(o),l.focus())}s[0].focus();for(var f=0;f<s.length;++f){var p=s[f];(function(t){e.on(p,`click`,function(n){e.e_preventDefault(n),d(),t&&t(l)})})(i[f]),e.on(p,`blur`,function(){--u,setTimeout(function(){u<=0&&d()},200)}),e.on(p,`focus`,function(){++u})}}),e.defineExtension(`openNotification`,function(r,i){n(this,l);var a=t(this,r,i&&i.bottom),o=!1,s,c=i&&i.duration!==void 0?i.duration:5e3;function l(){o||(o=!0,clearTimeout(s),e.rmClass(a.parentNode,`dialog-opened`),a.parentNode.removeChild(a))}return e.on(a,`click`,function(t){e.e_preventDefault(t),l()}),c&&(s=setTimeout(l,c)),l})})}));pt();var mt=$e(ft(),1),ht=Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){e.defineOption(`placeholder`,``,function(n,o,s){var c=s&&s!=e.Init;if(o&&!c)n.on(`blur`,i),n.on(`change`,a),n.on(`swapDoc`,a),e.on(n.getInputField(),`compositionupdate`,n.state.placeholderCompose=function(){r(n)}),a(n);else if(!o&&c){n.off(`blur`,i),n.off(`change`,a),n.off(`swapDoc`,a),e.off(n.getInputField(),`compositionupdate`,n.state.placeholderCompose),t(n);var l=n.getWrapperElement();l.className=l.className.replace(` CodeMirror-empty`,``)}o&&!n.hasFocus()&&i(n)});function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement(`pre`);n.style.cssText=`height: 0; overflow: visible`,n.style.direction=e.getOption(`direction`),n.className=`CodeMirror-placeholder CodeMirror-line-like`;var r=e.getOption(`placeholder`);typeof r==`string`&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){setTimeout(function(){var r=!1;if(e.lineCount()==1){var i=e.getInputField();r=i.nodeName==`TEXTAREA`?!e.getLine(0).length:!/[^\u200b]/.test(i.querySelector(`.CodeMirror-line`).textContent)}r?n(e):t(e)},20)}function i(e){o(e)&&n(e)}function a(e){var r=e.getWrapperElement(),i=o(e);r.className=r.className.replace(` CodeMirror-empty`,``)+(i?` CodeMirror-empty`:``),i?n(e):t(e)}function o(e){return e.lineCount()===1&&e.getLine(0)===``}})})),gt=Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft(),pt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../dialog/dialog`],n):n(CodeMirror)})(function(e){e.defineOption(`search`,{bottom:!1});function t(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}function n(e){return e.phrase(`Jump to line:`)+` <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">`+e.phrase(`(Use line:column or scroll% syntax)`)+`</span>`}function r(e,t){var n=Number(t);return/^[-+]/.test(t)?e.getCursor().line+n:n-1}e.commands.jumpToLine=function(e){var i=e.getCursor();t(e,n(e),e.phrase(`Jump to line:`),i.line+1+`:`+i.ch,function(t){if(t){var n;if(n=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(t))e.setCursor(r(e,n[1]),Number(n[2]));else if(n=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(t)){var a=Math.round(e.lineCount()*Number(n[1])/100);/^[-+]/.test(n[1])&&(a=i.line+a+1),e.setCursor(a-1,i.ch)}else (n=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(t))&&e.setCursor(r(e,n[1]),i.ch)}})},e.keyMap.default[`Alt-G`]=`jumpToLine`})})),$=Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){var t=e.Pos;function n(e){return e.flags??(e.ignoreCase?`i`:``)+(e.global?`g`:``)+(e.multiline?`m`:``)}function r(e,t){for(var r=n(e),i=r,a=0;a<t.length;a++)i.indexOf(t.charAt(a))==-1&&(i+=t.charAt(a));return r==i?e:new RegExp(e.source,i)}function i(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function a(e,n,i){n=r(n,`g`);for(var a=i.line,o=i.ch,s=e.lastLine();a<=s;a++,o=0){n.lastIndex=o;var c=e.getLine(a),l=n.exec(c);if(l)return{from:t(a,l.index),to:t(a,l.index+l[0].length),match:l}}}function o(e,n,o){if(!i(n))return a(e,n,o);n=r(n,`gm`);for(var s,c=1,l=o.line,u=e.lastLine();l<=u;){for(var d=0;d<c&&!(l>u);d++){var f=e.getLine(l++);s=s==null?f:s+`
25
+ `+f}c*=2,n.lastIndex=o.ch;var p=n.exec(s);if(p){var m=s.slice(0,p.index).split(`
26
+ `),h=p[0].split(`
27
+ `),g=o.line+m.length-1,_=m[m.length-1].length;return{from:t(g,_),to:t(g+h.length-1,h.length==1?_+h[0].length:h[h.length-1].length),match:p}}}}function s(e,t,n){for(var r,i=0;i<=e.length;){t.lastIndex=i;var a=t.exec(e);if(!a)break;var o=a.index+a[0].length;if(o>e.length-n)break;(!r||o>r.index+r[0].length)&&(r=a),i=a.index+1}return r}function c(e,n,i){n=r(n,`g`);for(var a=i.line,o=i.ch,c=e.firstLine();a>=c;a--,o=-1){var l=e.getLine(a),u=s(l,n,o<0?0:l.length-o);if(u)return{from:t(a,u.index),to:t(a,u.index+u[0].length),match:u}}}function l(e,n,a){if(!i(n))return c(e,n,a);n=r(n,`gm`);for(var o,l=1,u=e.getLine(a.line).length-a.ch,d=a.line,f=e.firstLine();d>=f;){for(var p=0;p<l&&d>=f;p++){var m=e.getLine(d--);o=o==null?m:m+`
28
+ `+o}l*=2;var h=s(o,n,u);if(h){var g=o.slice(0,h.index).split(`
29
+ `),_=h[0].split(`
30
+ `),v=d+g.length,y=g[g.length-1].length;return{from:t(v,y),to:t(v+_.length-1,_.length==1?y+_[0].length:_[_.length-1].length),match:h}}}}var u,d;String.prototype.normalize?(u=function(e){return e.normalize(`NFD`).toLowerCase()},d=function(e){return e.normalize(`NFD`)}):(u=function(e){return e.toLowerCase()},d=function(e){return e});function f(e,t,n,r){if(e.length==t.length)return n;for(var i=0,a=n+Math.max(0,e.length-t.length);;){if(i==a)return i;var o=i+a>>1,s=r(e.slice(0,o)).length;if(s==n)return o;s>n?a=o:i=o+1}}function p(e,n,r,i){if(!n.length)return null;var a=i?u:d,o=a(n).split(/\r|\n\r?/);search:for(var s=r.line,c=r.ch,l=e.lastLine()+1-o.length;s<=l;s++,c=0){var p=e.getLine(s).slice(c),m=a(p);if(o.length==1){var h=m.indexOf(o[0]);if(h==-1)continue search;var r=f(p,m,h,a)+c;return{from:t(s,f(p,m,h,a)+c),to:t(s,f(p,m,h+o[0].length,a)+c)}}else{var g=m.length-o[0].length;if(m.slice(g)!=o[0])continue search;for(var _=1;_<o.length-1;_++)if(a(e.getLine(s+_))!=o[_])continue search;var v=e.getLine(s+o.length-1),y=a(v),b=o[o.length-1];if(y.slice(0,b.length)!=b)continue search;return{from:t(s,f(p,m,g,a)+c),to:t(s+o.length-1,f(v,y,b.length,a))}}}}function m(e,n,r,i){if(!n.length)return null;var a=i?u:d,o=a(n).split(/\r|\n\r?/);search:for(var s=r.line,c=r.ch,l=e.firstLine()-1+o.length;s>=l;s--,c=-1){var p=e.getLine(s);c>-1&&(p=p.slice(0,c));var m=a(p);if(o.length==1){var h=m.lastIndexOf(o[0]);if(h==-1)continue search;return{from:t(s,f(p,m,h,a)),to:t(s,f(p,m,h+o[0].length,a))}}else{var g=o[o.length-1];if(m.slice(0,g.length)!=g)continue search;for(var _=1,r=s-o.length+1;_<o.length-1;_++)if(a(e.getLine(r+_))!=o[_])continue search;var v=e.getLine(s+1-o.length),y=a(v);if(y.slice(y.length-o[0].length)!=o[0])continue search;return{from:t(s+1-o.length,f(v,y,v.length-o[0].length,a)),to:t(s,f(p,m,g.length,a))}}}}function h(e,n,i,s){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,i=i?e.clipPos(i):t(0,0),this.pos={from:i,to:i};var u;typeof s==`object`?u=s.caseFold:(u=s,s=null),typeof n==`string`?(u??=!1,this.matches=function(t,r){return(t?m:p)(e,n,r,u)}):(n=r(n,`gm`),!s||s.multiline!==!1?this.matches=function(t,r){return(t?l:o)(e,n,r)}:this.matches=function(t,r){return(t?c:a)(e,n,r)})}h.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(n){var r=this.doc.clipPos(n?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(r=t(r.line,r.ch),n?(r.ch--,r.ch<0&&(r.line--,r.ch=(this.doc.getLine(r.line)||``).length)):(r.ch++,r.ch>(this.doc.getLine(r.line)||``).length&&(r.ch=0,r.line++)),e.cmpPos(r,this.doc.clipPos(r))!=0))return this.atOccurrence=!1;var i=this.matches(n,r);if(this.afterEmptyMatch=i&&e.cmpPos(i.from,i.to)==0,i)return this.pos=i,this.atOccurrence=!0,this.pos.match||!0;var a=t(n?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:a,to:a},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(n,r){if(this.atOccurrence){var i=e.splitLines(n);this.doc.replaceRange(i,this.pos.from,this.pos.to,r),this.pos.to=t(this.pos.from.line+i.length-1,i[i.length-1].length+(i.length==1?this.pos.from.ch:0))}}},e.defineExtension(`getSearchCursor`,function(e,t,n){return new h(this.doc,e,t,n)}),e.defineDocExtension(`getSearchCursor`,function(e,t,n){return new h(this,e,t,n)}),e.defineExtension(`selectMatches`,function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor(`from`),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor(`to`))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)})})}));Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft(),$(),pt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`./searchcursor`,`../dialog/dialog`],n):n(CodeMirror)})(function(e){e.defineOption(`search`,{bottom:!1});function t(e,t){return typeof e==`string`?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),t?`gi`:`g`):e.global||(e=new RegExp(e.source,e.ignoreCase?`gi`:`g`)),{token:function(t){e.lastIndex=t.pos;var n=e.exec(t.string);if(n&&n.index==t.pos)return t.pos+=n[0].length||1,`searching`;n?t.pos=n.index:t.skipToEnd()}}}function n(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function r(e){return e.state.search||(e.state.search=new n)}function i(e){return typeof e==`string`&&e==e.toLowerCase()}function a(e,t,n){return e.getSearchCursor(t,n,{caseFold:i(t),multiline:!0})}function o(e,t,n,r,i){e.openDialog(t,r,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){m(e)},onKeyDown:i,bottom:e.options.search.bottom})}function s(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}function c(e,t,n,r){e.openConfirm?e.openConfirm(t,r):confirm(n)&&r[0]()}function l(e){return e.replace(/\\([nrt\\])/g,function(e,t){return t==`n`?`
31
+ `:t==`r`?`\r`:t==`t`?` `:t==`\\`?`\\`:e})}function u(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],t[2].indexOf(`i`)==-1?``:`i`)}catch{}else e=l(e);return(typeof e==`string`?e==``:e.test(``))&&(e=/x^/),e}function d(e,n,r){n.queryText=r,n.query=u(r),e.removeOverlay(n.overlay,i(n.query)),n.overlay=t(n.query,i(n.query)),e.addOverlay(n.overlay),e.showMatchesOnScrollbar&&(n.annotate&&=(n.annotate.clear(),null),n.annotate=e.showMatchesOnScrollbar(n.query,i(n.query)))}function f(t,n,i,a){var c=r(t);if(c.query)return p(t,n);var l=t.getSelection()||c.lastQuery;if(l instanceof RegExp&&l.source==`x^`&&(l=null),i&&t.openDialog){var u=null,f=function(n,r){e.e_stop(r),n&&(n!=c.queryText&&(d(t,c,n),c.posFrom=c.posTo=t.getCursor()),u&&(u.style.opacity=1),p(t,r.shiftKey,function(e,n){var r;n.line<3&&document.querySelector&&(r=t.display.wrapper.querySelector(`.CodeMirror-dialog`))&&r.getBoundingClientRect().bottom-4>t.cursorCoords(n,`window`).top&&((u=r).style.opacity=.4)}))};o(t,g(t),l,f,function(n,i){var a=e.keyName(n),o=t.getOption(`extraKeys`),s=o&&o[a]||e.keyMap[t.getOption(`keyMap`)][a];s==`findNext`||s==`findPrev`||s==`findPersistentNext`||s==`findPersistentPrev`?(e.e_stop(n),d(t,r(t),i),t.execCommand(s)):(s==`find`||s==`findPersistent`)&&(e.e_stop(n),f(i,n))}),a&&l&&(d(t,c,l),p(t,n))}else s(t,g(t),`Search for:`,l,function(e){e&&!c.query&&t.operation(function(){d(t,c,e),c.posFrom=c.posTo=t.getCursor(),p(t,n)})})}function p(t,n,i){t.operation(function(){var o=r(t),s=a(t,o.query,n?o.posFrom:o.posTo);!s.find(n)&&(s=a(t,o.query,n?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0)),!s.find(n))||(t.setSelection(s.from(),s.to()),t.scrollIntoView({from:s.from(),to:s.to()},20),o.posFrom=s.from(),o.posTo=s.to(),i&&i(s.from(),s.to()))})}function m(e){e.operation(function(){var t=r(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&=(t.annotate.clear(),null))})}function h(e,t){var n=e?document.createElement(e):document.createDocumentFragment();for(var r in t)n[r]=t[r];for(var i=2;i<arguments.length;i++){var a=arguments[i];n.appendChild(typeof a==`string`?document.createTextNode(a):a)}return n}function g(e){var t=h(`label`,{className:`CodeMirror-search-label`},e.phrase(`Search:`),h(`input`,{type:`text`,style:`width: 10em`,className:`CodeMirror-search-field`,id:`CodeMirror-search-field`}));return t.setAttribute(`for`,`CodeMirror-search-field`),h(``,null,t,` `,h(`span`,{style:`color: #666`,className:`CodeMirror-search-hint`},e.phrase(`(Use /re/ syntax for regexp search)`)))}function _(e){return h(``,null,` `,h(`input`,{type:`text`,style:`width: 10em`,className:`CodeMirror-search-field`}),` `,h(`span`,{style:`color: #666`,className:`CodeMirror-search-hint`},e.phrase(`(Use /re/ syntax for regexp search)`)))}function v(e){return h(``,null,h(`span`,{className:`CodeMirror-search-label`},e.phrase(`With:`)),` `,h(`input`,{type:`text`,style:`width: 10em`,className:`CodeMirror-search-field`}))}function y(e){return h(``,null,h(`span`,{className:`CodeMirror-search-label`},e.phrase(`Replace?`)),` `,h(`button`,{},e.phrase(`Yes`)),` `,h(`button`,{},e.phrase(`No`)),` `,h(`button`,{},e.phrase(`All`)),` `,h(`button`,{},e.phrase(`Stop`)))}function b(e,t,n){e.operation(function(){for(var r=a(e,t);r.findNext();)if(typeof t!=`string`){var i=e.getRange(r.from(),r.to()).match(t);r.replace(n.replace(/\$(\d)/g,function(e,t){return i[t]}))}else r.replace(n)})}function x(e,t){if(!e.getOption(`readOnly`)){var n=e.getSelection()||r(e).lastQuery,i=t?e.phrase(`Replace all:`):e.phrase(`Replace:`);s(e,h(``,null,h(`span`,{className:`CodeMirror-search-label`},i),_(e)),i,n,function(n){n&&(n=u(n),s(e,v(e),e.phrase(`Replace with:`),``,function(r){if(r=l(r),t)b(e,n,r);else{m(e);var i=a(e,n,e.getCursor(`from`)),o=function(){var t=i.from(),l;!(l=i.findNext())&&(i=a(e,n),!(l=i.findNext())||t&&i.from().line==t.line&&i.from().ch==t.ch)||(e.setSelection(i.from(),i.to()),e.scrollIntoView({from:i.from(),to:i.to()}),c(e,y(e),e.phrase(`Replace?`),[function(){s(l)},o,function(){b(e,n,r)}]))},s=function(e){i.replace(typeof n==`string`?r:r.replace(/\$(\d)/g,function(t,n){return e[n]})),o()};o()}}))})}}e.commands.find=function(e){m(e),f(e)},e.commands.findPersistent=function(e){m(e),f(e,!1,!0)},e.commands.findPersistentNext=function(e){f(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){f(e,!0,!0,!0)},e.commands.findNext=f,e.commands.findPrev=function(e){f(e,!0)},e.commands.clearSearch=m,e.commands.replace=x,e.commands.replaceAll=function(e){x(e,!0)}})}))(),gt(),ht();var _t=Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){e.defineMode(`css`,function(t,n){var r=n.inline;n.propertyKeywords||(n=e.resolveMode(`text/css`));var i=t.indentUnit,a=n.tokenHooks,o=n.documentTypes||{},s=n.mediaTypes||{},c=n.mediaFeatures||{},l=n.mediaValueKeywords||{},u=n.propertyKeywords||{},d=n.nonStandardPropertyKeywords||{},f=n.fontProperties||{},p=n.counterDescriptors||{},m=n.colorKeywords||{},h=n.valueKeywords||{},g=n.allowNested,_=n.lineComment,v=n.supportsAtComponent===!0,y=t.highlightNonStandardPropertyKeywords!==!1,b,x;function S(e,t){return b=t,e}function C(e,t){var n=e.next();if(a[n]){var r=a[n](e,t);if(r!==!1)return r}if(n==`@`)return e.eatWhile(/[\w\\\-]/),S(`def`,e.current());if(n==`=`||(n==`~`||n==`|`)&&e.eat(`=`))return S(null,`compare`);if(n==`"`||n==`'`)return t.tokenize=w(n),t.tokenize(e,t);if(n==`#`)return e.eatWhile(/[\w\\\-]/),S(`atom`,`hash`);if(n==`!`)return e.match(/^\s*\w*/),S(`keyword`,`important`);if(/\d/.test(n)||n==`.`&&e.eat(/\d/))return e.eatWhile(/[\w.%]/),S(`number`,`unit`);if(n===`-`){if(/[\d.]/.test(e.peek()))return e.eatWhile(/[\w.%]/),S(`number`,`unit`);if(e.match(/^-[\w\\\-]*/))return e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?S(`variable-2`,`variable-definition`):S(`variable-2`,`variable`);if(e.match(/^\w+-/))return S(`meta`,`meta`)}else if(/[,+>*\/]/.test(n))return S(null,`select-op`);else if(n==`.`&&e.match(/^-?[_a-z][_a-z0-9-]*/i))return S(`qualifier`,`qualifier`);else if(/[:;{}\[\]\(\)]/.test(n))return S(null,n);else if(e.match(/^[\w-.]+(?=\()/))return/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=T),S(`variable callee`,`variable`);else if(/[\w\\\-]/.test(n))return e.eatWhile(/[\w\\\-]/),S(`property`,`word`);else return S(null,null)}function w(e){return function(t,n){for(var r=!1,i;(i=t.next())!=null;){if(i==e&&!r){e==`)`&&t.backUp(1);break}r=!r&&i==`\\`}return(i==e||!r&&e!=`)`)&&(n.tokenize=null),S(`string`,`string`)}}function T(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=w(`)`),S(null,`(`)}function E(e,t,n){this.type=e,this.indent=t,this.prev=n}function D(e,t,n,r){return e.context=new E(n,t.indentation()+(r===!1?0:i),e.context),n}function O(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function k(e,t,n){return M[n.context.type](e,t,n)}function A(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return k(e,t,n)}function j(e){var t=e.current().toLowerCase();x=h.hasOwnProperty(t)?`atom`:m.hasOwnProperty(t)?`keyword`:`variable`}var M={};return M.top=function(e,t,n){if(e==`{`)return D(n,t,`block`);if(e==`}`&&n.context.prev)return O(n);if(v&&/@component/i.test(e))return D(n,t,`atComponentBlock`);if(/^@(-moz-)?document$/i.test(e))return D(n,t,`documentTypes`);if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return D(n,t,`atBlock`);if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,`restricted_atBlock_before`;if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return`keyframes`;if(e&&e.charAt(0)==`@`)return D(n,t,`at`);if(e==`hash`)x=`builtin`;else if(e==`word`)x=`tag`;else if(e==`variable-definition`)return`maybeprop`;else if(e==`interpolation`)return D(n,t,`interpolation`);else if(e==`:`)return`pseudo`;else if(g&&e==`(`)return D(n,t,`parens`);return n.context.type},M.block=function(e,t,n){if(e==`word`){var r=t.current().toLowerCase();return u.hasOwnProperty(r)?(x=`property`,`maybeprop`):d.hasOwnProperty(r)?(x=y?`string-2`:`property`,`maybeprop`):g?(x=t.match(/^\s*:(?:\s|$)/,!1)?`property`:`tag`,`block`):(x+=` error`,`maybeprop`)}else if(e==`meta`)return`block`;else if(!g&&(e==`hash`||e==`qualifier`))return x=`error`,`block`;else return M.top(e,t,n)},M.maybeprop=function(e,t,n){return e==`:`?D(n,t,`prop`):k(e,t,n)},M.prop=function(e,t,n){if(e==`;`)return O(n);if(e==`{`&&g)return D(n,t,`propBlock`);if(e==`}`||e==`{`)return A(e,t,n);if(e==`(`)return D(n,t,`parens`);if(e==`hash`&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t.current()))x+=` error`;else if(e==`word`)j(t);else if(e==`interpolation`)return D(n,t,`interpolation`);return`prop`},M.propBlock=function(e,t,n){return e==`}`?O(n):e==`word`?(x=`property`,`maybeprop`):n.context.type},M.parens=function(e,t,n){return e==`{`||e==`}`?A(e,t,n):e==`)`?O(n):e==`(`?D(n,t,`parens`):e==`interpolation`?D(n,t,`interpolation`):(e==`word`&&j(t),`parens`)},M.pseudo=function(e,t,n){return e==`meta`?`pseudo`:e==`word`?(x=`variable-3`,n.context.type):k(e,t,n)},M.documentTypes=function(e,t,n){return e==`word`&&o.hasOwnProperty(t.current())?(x=`tag`,n.context.type):M.atBlock(e,t,n)},M.atBlock=function(e,t,n){if(e==`(`)return D(n,t,`atBlock_parens`);if(e==`}`||e==`;`)return A(e,t,n);if(e==`{`)return O(n)&&D(n,t,g?`block`:`top`);if(e==`interpolation`)return D(n,t,`interpolation`);if(e==`word`){var r=t.current().toLowerCase();x=r==`only`||r==`not`||r==`and`||r==`or`?`keyword`:s.hasOwnProperty(r)?`attribute`:c.hasOwnProperty(r)?`property`:l.hasOwnProperty(r)?`keyword`:u.hasOwnProperty(r)?`property`:d.hasOwnProperty(r)?y?`string-2`:`property`:h.hasOwnProperty(r)?`atom`:m.hasOwnProperty(r)?`keyword`:`error`}return n.context.type},M.atComponentBlock=function(e,t,n){return e==`}`?A(e,t,n):e==`{`?O(n)&&D(n,t,g?`block`:`top`,!1):(e==`word`&&(x=`error`),n.context.type)},M.atBlock_parens=function(e,t,n){return e==`)`?O(n):e==`{`||e==`}`?A(e,t,n,2):M.atBlock(e,t,n)},M.restricted_atBlock_before=function(e,t,n){return e==`{`?D(n,t,`restricted_atBlock`):e==`word`&&n.stateArg==`@counter-style`?(x=`variable`,`restricted_atBlock_before`):k(e,t,n)},M.restricted_atBlock=function(e,t,n){return e==`}`?(n.stateArg=null,O(n)):e==`word`?(x=n.stateArg==`@font-face`&&!f.hasOwnProperty(t.current().toLowerCase())||n.stateArg==`@counter-style`&&!p.hasOwnProperty(t.current().toLowerCase())?`error`:`property`,`maybeprop`):`restricted_atBlock`},M.keyframes=function(e,t,n){return e==`word`?(x=`variable`,`keyframes`):e==`{`?D(n,t,`top`):k(e,t,n)},M.at=function(e,t,n){return e==`;`?O(n):e==`{`||e==`}`?A(e,t,n):(e==`word`?x=`tag`:e==`hash`&&(x=`builtin`),`at`)},M.interpolation=function(e,t,n){return e==`}`?O(n):e==`{`||e==`;`?A(e,t,n):(e==`word`?x=`variable`:e!=`variable`&&e!=`(`&&e!=`)`&&(x=`error`),`interpolation`)},{startState:function(e){return{tokenize:null,state:r?`block`:`top`,stateArg:null,context:new E(r?`block`:`top`,e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||C)(e,t);return n&&typeof n==`object`&&(b=n[1],n=n[0]),x=n,b!=`comment`&&(t.state=M[t.state](b,e,t)),x},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),a=n.indent;return n.type==`prop`&&(r==`}`||r==`)`)&&(n=n.prev),n.prev&&(r==`}`&&(n.type==`block`||n.type==`top`||n.type==`interpolation`||n.type==`restricted_atBlock`)?(n=n.prev,a=n.indent):(r==`)`&&(n.type==`parens`||n.type==`atBlock_parens`)||r==`{`&&(n.type==`at`||n.type==`atBlock`))&&(a=Math.max(0,n.indent-i))),a},electricChars:`}`,blockCommentStart:`/*`,blockCommentEnd:`*/`,blockCommentContinue:` * `,lineComment:_,fold:`brace`}});function t(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}var n=[`domain`,`regexp`,`url`,`url-prefix`],r=t(n),i=[`all`,`aural`,`braille`,`handheld`,`print`,`projection`,`screen`,`tty`,`tv`,`embossed`],a=t(i),o=`width.min-width.max-width.height.min-height.max-height.device-width.min-device-width.max-device-width.device-height.min-device-height.max-device-height.aspect-ratio.min-aspect-ratio.max-aspect-ratio.device-aspect-ratio.min-device-aspect-ratio.max-device-aspect-ratio.color.min-color.max-color.color-index.min-color-index.max-color-index.monochrome.min-monochrome.max-monochrome.resolution.min-resolution.max-resolution.scan.grid.orientation.device-pixel-ratio.min-device-pixel-ratio.max-device-pixel-ratio.pointer.any-pointer.hover.any-hover.prefers-color-scheme.dynamic-range.video-dynamic-range`.split(`.`),s=t(o),c=[`landscape`,`portrait`,`none`,`coarse`,`fine`,`on-demand`,`hover`,`interlace`,`progressive`,`dark`,`light`,`standard`,`high`],l=t(c),u=`align-content.align-items.align-self.alignment-adjust.alignment-baseline.all.anchor-point.animation.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-timing-function.appearance.azimuth.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.binding.bleed.block-size.bookmark-label.bookmark-level.bookmark-state.bookmark-target.border.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-decoration-break.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.color.color-profile.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.content.counter-increment.counter-reset.crop.cue.cue-after.cue-before.cursor.direction.display.dominant-baseline.drop-initial-after-adjust.drop-initial-after-align.drop-initial-before-adjust.drop-initial-before-align.drop-initial-size.drop-initial-value.elevation.empty-cells.fit.fit-content.fit-position.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.float-offset.flow-from.flow-into.font.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-size.font-size-adjust.font-stretch.font-style.font-synthesis.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.gap.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-gap.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-gap.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphens.icon.image-orientation.image-rendering.image-resolution.inline-box-align.inset.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.left.letter-spacing.line-break.line-height.line-height-step.line-stacking.line-stacking-ruby.line-stacking-shift.line-stacking-strategy.list-style.list-style-image.list-style-position.list-style-type.margin.margin-bottom.margin-left.margin-right.margin-top.marks.marquee-direction.marquee-loop.marquee-play-count.marquee-speed.marquee-style.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.move-to.nav-down.nav-index.nav-left.nav-right.nav-up.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-style.overflow-wrap.overflow-x.overflow-y.padding.padding-bottom.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.page-policy.pause.pause-after.pause-before.perspective.perspective-origin.pitch.pitch-range.place-content.place-items.place-self.play-during.position.presentation-level.punctuation-trim.quotes.region-break-after.region-break-before.region-break-inside.region-fragment.rendering-intent.resize.rest.rest-after.rest-before.richness.right.rotate.rotation.rotation-point.row-gap.ruby-align.ruby-overhang.ruby-position.ruby-span.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-type.shape-image-threshold.shape-inside.shape-margin.shape-outside.size.speak.speak-as.speak-header.speak-numeral.speak-punctuation.speech-rate.stress.string-set.tab-size.table-layout.target.target-name.target-new.target-position.text-align.text-align-last.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-height.text-indent.text-justify.text-orientation.text-outline.text-overflow.text-rendering.text-shadow.text-size-adjust.text-space-collapse.text-transform.text-underline-position.text-wrap.top.touch-action.transform.transform-origin.transform-style.transition.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-select.vertical-align.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.volume.white-space.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.z-index.clip-path.clip-rule.mask.enable-background.filter.flood-color.flood-opacity.lighting-color.stop-color.stop-opacity.pointer-events.color-interpolation.color-interpolation-filters.color-rendering.fill.fill-opacity.fill-rule.image-rendering.marker.marker-end.marker-mid.marker-start.paint-order.shape-rendering.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.text-rendering.baseline-shift.dominant-baseline.glyph-orientation-horizontal.glyph-orientation-vertical.text-anchor.writing-mode`.split(`.`),d=t(u),f=`accent-color.aspect-ratio.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.content-visibility.margin-block.margin-block-end.margin-block-start.margin-inline.margin-inline-end.margin-inline-start.overflow-anchor.overscroll-behavior.padding-block.padding-block-end.padding-block-start.padding-inline.padding-inline-end.padding-inline-start.scroll-snap-stop.scrollbar-3d-light-color.scrollbar-arrow-color.scrollbar-base-color.scrollbar-dark-shadow-color.scrollbar-face-color.scrollbar-highlight-color.scrollbar-shadow-color.scrollbar-track-color.searchfield-cancel-button.searchfield-decoration.searchfield-results-button.searchfield-results-decoration.shape-inside.zoom`.split(`.`),p=t(f),m=t([`font-display`,`font-family`,`src`,`unicode-range`,`font-variant`,`font-feature-settings`,`font-stretch`,`font-weight`,`font-style`]),h=t([`additive-symbols`,`fallback`,`negative`,`pad`,`prefix`,`range`,`speak-as`,`suffix`,`symbols`,`system`]),g=`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.darkgrey.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkslategrey.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dimgrey.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.lightgrey.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightslategrey.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.slategrey.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen`.split(`.`),_=t(g),v=`above.absolute.activeborder.additive.activecaption.afar.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.amharic.amharic-abegede.antialiased.appworkspace.arabic-indic.armenian.asterisks.attr.auto.auto-flow.avoid.avoid-column.avoid-page.avoid-region.axis-pan.background.backwards.baseline.below.bidi-override.binary.bengali.blink.block.block-axis.blur.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.brightness.bullets.button.buttonface.buttonhighlight.buttonshadow.buttontext.calc.cambodian.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.cjk-earthly-branch.cjk-heavenly-stem.cjk-ideographic.clear.clip.close-quote.col-resize.collapse.color.color-burn.color-dodge.column.column-reverse.compact.condensed.conic-gradient.contain.content.contents.content-box.context-menu.continuous.contrast.copy.counter.counters.cover.crop.cross.crosshair.cubic-bezier.currentcolor.cursive.cyclic.darken.dashed.decimal.decimal-leading-zero.default.default-button.dense.destination-atop.destination-in.destination-out.destination-over.devanagari.difference.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.drop-shadow.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic.ethiopic-abegede.ethiopic-abegede-am-et.ethiopic-abegede-gez.ethiopic-abegede-ti-er.ethiopic-abegede-ti-et.ethiopic-halehame-aa-er.ethiopic-halehame-aa-et.ethiopic-halehame-am-et.ethiopic-halehame-gez.ethiopic-halehame-om-et.ethiopic-halehame-sid-et.ethiopic-halehame-so-et.ethiopic-halehame-ti-er.ethiopic-halehame-ti-et.ethiopic-halehame-tig.ethiopic-numeric.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.georgian.grayscale.graytext.grid.groove.gujarati.gurmukhi.hand.hangul.hangul-consonant.hard-light.hebrew.help.hidden.hide.higher.highlight.highlighttext.hiragana.hiragana-iroha.horizontal.hsl.hsla.hue.hue-rotate.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.japanese-formal.japanese-informal.justify.kannada.katakana.katakana-iroha.keep-all.khmer.korean-hangul-formal.korean-hanja-formal.korean-hanja-informal.landscape.lao.large.larger.left.level.lighter.lighten.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-alpha.lower-armenian.lower-greek.lower-hexadecimal.lower-latin.lower-norwegian.lower-roman.lowercase.ltr.luminosity.malayalam.manipulation.match.matrix.matrix3d.media-play-button.media-slider.media-sliderthumb.media-volume-slider.media-volume-sliderthumb.medium.menu.menulist.menulist-button.menutext.message-box.middle.min-intrinsic.mix.mongolian.monospace.move.multiple.multiple_mask_images.multiply.myanmar.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.octal.opacity.open-quote.optimizeLegibility.optimizeSpeed.oriya.oromo.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.persian.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.repeating-conic-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.saturate.saturation.scale.scale3d.scaleX.scaleY.scaleZ.screen.scroll.scrollbar.scroll-position.se-resize.searchfield.searchfield-cancel-button.searchfield-decoration.searchfield-results-button.searchfield-results-decoration.self-start.self-end.semi-condensed.semi-expanded.separate.sepia.serif.show.sidama.simp-chinese-formal.simp-chinese-informal.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.somali.source-atop.source-in.source-out.source-over.space.space-around.space-between.space-evenly.spell-out.square.square-button.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.tamil.telugu.text.text-bottom.text-top.textarea.textfield.thai.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.tibetan.tigre.tigrinya-er.tigrinya-er-abegede.tigrinya-et.tigrinya-et-abegede.to.top.trad-chinese-formal.trad-chinese-informal.transform.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.unidirectional-pan.unset.up.upper-alpha.upper-armenian.upper-greek.upper-hexadecimal.upper-latin.upper-norwegian.upper-roman.uppercase.urdu.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`.split(`.`),y=t(v),b=n.concat(i).concat(o).concat(c).concat(u).concat(f).concat(g).concat(v);e.registerHelper(`hintWords`,`css`,b);function x(e,t){for(var n=!1,r;(r=e.next())!=null;){if(n&&r==`/`){t.tokenize=null;break}n=r==`*`}return[`comment`,`comment`]}e.defineMIME(`text/css`,{documentTypes:r,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:h,colorKeywords:_,valueKeywords:y,tokenHooks:{"/":function(e,t){return e.eat(`*`)?(t.tokenize=x,x(e,t)):!1}},name:`css`}),e.defineMIME(`text/x-scss`,{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:_,valueKeywords:y,fontProperties:m,allowNested:!0,lineComment:`//`,tokenHooks:{"/":function(e,t){return e.eat(`/`)?(e.skipToEnd(),[`comment`,`comment`]):e.eat(`*`)?(t.tokenize=x,x(e,t)):[`operator`,`operator`]},":":function(e){return e.match(/^\s*\{/,!1)?[null,null]:!1},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?[`variable-2`,`variable-definition`]:[`variable-2`,`variable`]},"#":function(e){return e.eat(`{`)?[null,`interpolation`]:!1}},name:`css`,helperType:`scss`}),e.defineMIME(`text/x-less`,{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:_,valueKeywords:y,fontProperties:m,allowNested:!0,lineComment:`//`,tokenHooks:{"/":function(e,t){return e.eat(`/`)?(e.skipToEnd(),[`comment`,`comment`]):e.eat(`*`)?(t.tokenize=x,x(e,t)):[`operator`,`operator`]},"@":function(e){return e.eat(`{`)?[null,`interpolation`]:e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?[`variable-2`,`variable-definition`]:[`variable-2`,`variable`])},"&":function(){return[`atom`,`atom`]}},name:`css`,helperType:`less`}),e.defineMIME(`text/x-gss`,{documentTypes:r,mediaTypes:a,mediaFeatures:s,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:h,colorKeywords:_,valueKeywords:y,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return e.eat(`*`)?(t.tokenize=x,x(e,t)):!1}},name:`css`,helperType:`gss`})})})),vt=Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){e.defineSimpleMode=function(t,n){e.defineMode(t,function(t){return e.simpleMode(t,n)})},e.simpleMode=function(n,r){t(r,`start`);var o={},s=r.meta||{},c=!1;for(var u in r)if(u!=s&&r.hasOwnProperty(u))for(var d=o[u]=[],f=r[u],p=0;p<f.length;p++){var m=f[p];d.push(new i(m,r)),(m.indent||m.dedent)&&(c=!0)}var h={startState:function(){return{state:`start`,pending:null,local:null,localState:null,indent:c?[]:null}},copyState:function(t){var n={state:t.state,pending:t.pending,local:t.local,localState:null,indent:t.indent&&t.indent.slice(0)};t.localState&&(n.localState=e.copyState(t.local.mode,t.localState)),t.stack&&(n.stack=t.stack.slice(0));for(var r=t.persistentStates;r;r=r.next)n.persistentStates={mode:r.mode,spec:r.spec,state:r.state==t.localState?n.localState:e.copyState(r.mode,r.state),next:n.persistentStates};return n},token:a(o,n),innerMode:function(e){return e.local&&{mode:e.local.mode,state:e.localState}},indent:l(o,s)};if(s)for(var g in s)s.hasOwnProperty(g)&&(h[g]=s[g]);return h};function t(e,t){if(!e.hasOwnProperty(t))throw Error(`Undefined state `+t+` in simple mode`)}function n(e,t){if(!e)return/(?:)/;var n=``;return e instanceof RegExp?(e.ignoreCase&&(n=`i`),e.unicode&&(n+=`u`),e=e.source):e=String(e),RegExp((t===!1?``:`^`)+`(?:`+e+`)`,n)}function r(e){if(!e)return null;if(e.apply)return e;if(typeof e==`string`)return e.replace(/\./g,` `);for(var t=[],n=0;n<e.length;n++)t.push(e[n]&&e[n].replace(/\./g,` `));return t}function i(e,i){(e.next||e.push)&&t(i,e.next||e.push),this.regex=n(e.regex),this.token=r(e.token),this.data=e}function a(e,t){return function(n,r){if(r.pending){var i=r.pending.shift();return r.pending.length==0&&(r.pending=null),n.pos+=i.text.length,i.token}if(r.local)if(r.local.end&&n.match(r.local.end)){var a=r.local.endToken||null;return r.local=r.localState=null,a}else{var a=r.local.mode.token(n,r.localState),o;return r.local.endScan&&(o=r.local.endScan.exec(n.current()))&&(n.pos=n.start+o.index),a}for(var c=e[r.state],l=0;l<c.length;l++){var u=c[l],d=(!u.data.sol||n.sol())&&n.match(u.regex);if(d){u.data.next?r.state=u.data.next:u.data.push?((r.stack||=[]).push(r.state),r.state=u.data.push):u.data.pop&&r.stack&&r.stack.length&&(r.state=r.stack.pop()),u.data.mode&&s(t,r,u.data.mode,u.token),u.data.indent&&r.indent.push(n.indentation()+t.indentUnit),u.data.dedent&&r.indent.pop();var f=u.token;if(f&&f.apply&&(f=f(d)),d.length>2&&u.token&&typeof u.token!=`string`){for(var p=2;p<d.length;p++)d[p]&&(r.pending||=[]).push({text:d[p],token:u.token[p-1]});return n.backUp(d[0].length-(d[1]?d[1].length:0)),f[0]}else if(f&&f.join)return f[0];else return f}}return n.next(),null}}function o(e,t){if(e===t)return!0;if(!e||typeof e!=`object`||!t||typeof t!=`object`)return!1;var n=0;for(var r in e)if(e.hasOwnProperty(r)){if(!t.hasOwnProperty(r)||!o(e[r],t[r]))return!1;n++}for(var r in t)t.hasOwnProperty(r)&&n--;return n==0}function s(t,r,i,a){var s;if(i.persistent)for(var c=r.persistentStates;c&&!s;c=c.next)(i.spec?o(i.spec,c.spec):i.mode==c.mode)&&(s=c);var l=s?s.mode:i.mode||e.getMode(t,i.spec),u=s?s.state:e.startState(l);i.persistent&&!s&&(r.persistentStates={mode:l,spec:i.spec,state:u,next:r.persistentStates}),r.localState=u,r.local={mode:l,end:i.end&&n(i.end),endScan:i.end&&i.forceEnd!==!1&&n(i.end,!1),endToken:a&&a.join?a[a.length-1]:a}}function c(e,t){for(var n=0;n<t.length;n++)if(t[n]===e)return!0}function l(t,n){return function(r,i,a){if(r.local&&r.local.mode.indent)return r.local.mode.indent(r.localState,i,a);if(r.indent==null||r.local||n.dontIndentStates&&c(r.state,n.dontIndentStates)>-1)return e.Pass;var o=r.indent.length-1,s=t[r.state];scan:for(;;){for(var l=0;l<s.length;l++){var u=s[l];if(u.data.dedent&&u.data.dedentIfLineStart!==!1){var d=u.regex.exec(i);if(d&&d[0]){o--,(u.next||u.push)&&(s=t[u.next||u.push]),i=i.slice(d[0].length);continue scan}}}break}return o<0?0:r.indent[o]}}})})),yt=Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){e.multiplexingMode=function(t){var n=Array.prototype.slice.call(arguments,1);function r(e,t,n,r){if(typeof t==`string`){var i=e.indexOf(t,n);return r&&i>-1?i+t.length:i}var a=t.exec(n?e.slice(n):e);return a?a.index+n+(r?a[0].length:0):-1}return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null,startingInner:!1}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner),startingInner:n.startingInner}},token:function(i,a){if(a.innerActive){var o=a.innerActive,s=i.string;if(!o.close&&i.sol())return a.innerActive=a.inner=null,this.token(i,a);var c=o.close&&!a.startingInner?r(s,o.close,i.pos,o.parseDelimiters):-1;if(c==i.pos&&!o.parseDelimiters)return i.match(o.close),a.innerActive=a.inner=null,o.delimStyle&&o.delimStyle+` `+o.delimStyle+`-close`;c>-1&&(i.string=s.slice(0,c));var l=o.mode.token(i,a.inner);return c>-1?i.string=s:i.pos>i.start&&(a.startingInner=!1),c==i.pos&&o.parseDelimiters&&(a.innerActive=a.inner=null),o.innerStyle&&(l=l?l+` `+o.innerStyle:o.innerStyle),l}else{for(var u=1/0,s=i.string,d=0;d<n.length;++d){var f=n[d],c=r(s,f.open,i.pos);if(c==i.pos){f.parseDelimiters||i.match(f.open),a.startingInner=!!f.parseDelimiters,a.innerActive=f;var p=0;if(t.indent){var m=t.indent(a.outer,``,``);m!==e.Pass&&(p=m)}return a.inner=e.startState(f.mode,p),f.delimStyle&&f.delimStyle+` `+f.delimStyle+`-open`}else c!=-1&&c<u&&(u=c)}u!=1/0&&(i.string=s.slice(0,u));var h=t.token(i,a.outer);return u!=1/0&&(i.string=s),h}},indent:function(n,r,i){var a=n.innerActive?n.innerActive.mode:t;return a.indent?a.indent(n.innerActive?n.inner:n.outer,r,i):e.Pass},blankLine:function(r){var i=r.innerActive?r.innerActive.mode:t;if(i.blankLine&&i.blankLine(r.innerActive?r.inner:r.outer),r.innerActive)r.innerActive.close===`
32
+ `&&(r.innerActive=r.inner=null);else for(var a=0;a<n.length;++a){var o=n[a];o.open===`
33
+ `&&(r.innerActive=o,r.inner=e.startState(o.mode,i.indent?i.indent(r.outer,``,``):0))}},electricChars:t.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:t}}}}})})),bt=Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft(),vt(),yt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../../addon/mode/simple`,`../../addon/mode/multiplex`],n):n(CodeMirror)})(function(e){e.defineSimpleMode(`handlebars-tags`,{start:[{regex:/\{\{\{/,push:`handlebars_raw`,token:`tag`},{regex:/\{\{!--/,push:`dash_comment`,token:`comment`},{regex:/\{\{!/,push:`comment`,token:`comment`},{regex:/\{\{/,push:`handlebars`,token:`tag`}],handlebars_raw:[{regex:/\}\}\}/,pop:!0,token:`tag`}],handlebars:[{regex:/\}\}/,pop:!0,token:`tag`},{regex:/"(?:[^\\"]|\\.)*"?/,token:`string`},{regex:/'(?:[^\\']|\\.)*'?/,token:`string`},{regex:/>|[#\/]([A-Za-z_]\w*)/,token:`keyword`},{regex:/(?:else|this)\b/,token:`keyword`},{regex:/\d+/i,token:`number`},{regex:/=|~|@|true|false/,token:`atom`},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:`variable-2`}],dash_comment:[{regex:/--\}\}/,pop:!0,token:`comment`},{regex:/./,token:`comment`}],comment:[{regex:/\}\}/,pop:!0,token:`comment`},{regex:/./,token:`comment`}],meta:{blockCommentStart:`{{--`,blockCommentEnd:`--}}`}}),e.defineMode(`handlebars`,function(t,n){var r=e.getMode(t,`handlebars-tags`);return!n||!n.base?r:e.multiplexingMode(e.getMode(t,n.base),{open:`{{`,close:/\}\}\}?/,mode:r,parseDelimiters:!0})}),e.defineMIME(`text/x-handlebars-template`,`handlebars`)})})),xt=Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){var t={autoSelfClosers:{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},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{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}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode(`xml`,function(r,i){var a=r.indentUnit,o={},s=i.htmlMode?t:n;for(var c in s)o[c]=s[c];for(var c in i)o[c]=i[c];var l,u;function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return r==`<`?e.eat(`!`)?e.eat(`[`)?e.match(`CDATA[`)?n(m(`atom`,`]]>`)):null:e.match(`--`)?n(m(`comment`,`-->`)):e.match(`DOCTYPE`,!0,!0)?(e.eatWhile(/[\w\._\-]/),n(h(1))):null:e.eat(`?`)?(e.eatWhile(/[\w\._\-]/),t.tokenize=m(`meta`,`?>`),`meta`):(l=e.eat(`/`)?`closeTag`:`openTag`,t.tokenize=f,`tag bracket`):r==`&`?(e.eat(`#`)?e.eat(`x`)?e.eatWhile(/[a-fA-F\d]/)&&e.eat(`;`):e.eatWhile(/[\d]/)&&e.eat(`;`):e.eatWhile(/[\w\.\-:]/)&&e.eat(`;`))?`atom`:`error`:(e.eatWhile(/[^&<]/),null)}d.isInText=!0;function f(e,t){var n=e.next();if(n==`>`||n==`/`&&e.eat(`>`))return t.tokenize=d,l=n==`>`?`endTag`:`selfcloseTag`,`tag bracket`;if(n==`=`)return l=`equals`,null;if(n==`<`){t.tokenize=d,t.state=b,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+` tag error`:`tag error`}else if(/[\'\"]/.test(n))return t.tokenize=p(n),t.stringStartCol=e.column(),t.tokenize(e,t);else return e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),`word`}function p(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=f;break}return`string`};return t.isInAttribute=!0,t}function m(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=d;break}n.next()}return e}}function h(e){return function(t,n){for(var r;(r=t.next())!=null;)if(r==`<`)return n.tokenize=h(e+1),n.tokenize(t,n);else if(r==`>`)if(e==1){n.tokenize=d;break}else return n.tokenize=h(e-1),n.tokenize(t,n);return`meta`}}function g(e){return e&&e.toLowerCase()}function _(e,t,n){this.prev=e.context,this.tagName=t||``,this.indent=e.indented,this.startOfLine=n,(o.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function v(e){e.context&&=e.context.prev}function y(e,t){for(var n;;){if(!e.context||(n=e.context.tagName,!o.contextGrabbers.hasOwnProperty(g(n))||!o.contextGrabbers[g(n)].hasOwnProperty(g(t))))return;v(e)}}function b(e,t,n){return e==`openTag`?(n.tagStart=t.column(),x):e==`closeTag`?S:b}function x(e,t,n){return e==`word`?(n.tagName=t.current(),u=`tag`,T):o.allowMissingTagName&&e==`endTag`?(u=`tag bracket`,T(e,t,n)):(u=`error`,x)}function S(e,t,n){if(e==`word`){var r=t.current();return n.context&&n.context.tagName!=r&&o.implicitlyClosed.hasOwnProperty(g(n.context.tagName))&&v(n),n.context&&n.context.tagName==r||o.matchClosing===!1?(u=`tag`,C):(u=`tag error`,w)}else if(o.allowMissingTagName&&e==`endTag`)return u=`tag bracket`,C(e,t,n);else return u=`error`,w}function C(e,t,n){return e==`endTag`?(v(n),b):(u=`error`,C)}function w(e,t,n){return u=`error`,C(e,t,n)}function T(e,t,n){if(e==`word`)return u=`attribute`,E;if(e==`endTag`||e==`selfcloseTag`){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,e==`selfcloseTag`||o.autoSelfClosers.hasOwnProperty(g(r))?y(n,r):(y(n,r),n.context=new _(n,r,i==n.indented)),b}return u=`error`,T}function E(e,t,n){return e==`equals`?D:(o.allowMissing||(u=`error`),T(e,t,n))}function D(e,t,n){return e==`string`?O:e==`word`&&o.allowUnquoted?(u=`string`,T):(u=`error`,T(e,t,n))}function O(e,t,n){return e==`string`?O:T(e,t,n)}return{startState:function(e){var t={tokenize:d,state:b,indented:e||0,tagName:null,tagStart:null,context:null};return e!=null&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;l=null;var n=t.tokenize(e,t);return(n||l)&&n!=`comment`&&(u=null,t.state=t.state(l||n,e,t),u&&(n=u==`error`?n+` error`:u)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+a;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=f&&t.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return o.multilineTagIndentPastTag===!1?t.tagStart+a*(o.multilineTagIndentFactor||1):t.tagStart+t.tagName.length+2;if(o.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var s=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(s&&s[1])for(;i;)if(i.tagName==s[2]){i=i.prev;break}else if(o.implicitlyClosed.hasOwnProperty(g(i.tagName)))i=i.prev;else break;else if(s)for(;i;){var c=o.contextGrabbers[g(i.tagName)];if(c&&c.hasOwnProperty(g(s[2])))i=i.prev;else break}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+a:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:`<!--`,blockCommentEnd:`-->`,configuration:o.htmlMode?`html`:`xml`,helperType:o.htmlMode?`html`:`xml`,skipAttribute:function(e){e.state==D&&(e.state=T)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:e.type==`closeTag`}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)t.push(n.tagName);return t.reverse()}}}),e.defineMIME(`text/xml`,`xml`),e.defineMIME(`application/xml`,`xml`),e.mimeModes.hasOwnProperty(`text/html`)||e.defineMIME(`text/html`,{name:`xml`,htmlMode:!0})})})),St=Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){e.defineMode(`javascript`,function(t,n){var r=t.indentUnit,i=n.statementIndent,a=n.jsonld,o=n.json||a,s=n.trackScope!==!1,c=n.typescript,l=n.wordCharacters||/[\w$\xa1-\uffff]/,u=function(){function e(e){return{type:e,style:`keyword`}}var t=e(`keyword a`),n=e(`keyword b`),r=e(`keyword c`),i=e(`keyword d`),a=e(`operator`),o={type:`atom`,style:`atom`};return{if:e(`if`),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:e(`new`),delete:r,void:r,throw:r,debugger:e(`debugger`),var:e(`var`),const:e(`var`),let:e(`var`),function:e(`function`),catch:e(`catch`),for:e(`for`),switch:e(`switch`),case:e(`case`),default:e(`default`),in:a,typeof:a,instanceof:a,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e(`this`),class:e(`class`),super:e(`atom`),yield:r,export:e(`export`),import:e(`import`),extends:r,await:r}}(),d=/[+\-*&%=<>!?|~^@]/,f=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function p(e){for(var t=!1,n,r=!1;(n=e.next())!=null;){if(!t){if(n==`/`&&!r)return;n==`[`?r=!0:r&&n==`]`&&(r=!1)}t=!t&&n==`\\`}}var m,h;function g(e,t,n){return m=e,h=n,t}function _(e,t){var n=e.next();if(n==`"`||n==`'`)return t.tokenize=v(n),t.tokenize(e,t);if(n==`.`&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return g(`number`,`number`);if(n==`.`&&e.match(`..`))return g(`spread`,`meta`);if(/[\[\]{}\(\),;\:\.]/.test(n))return g(n);if(n==`=`&&e.eat(`>`))return g(`=>`,`operator`);if(n==`0`&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return g(`number`,`number`);if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),g(`number`,`number`);if(n==`/`)return e.eat(`*`)?(t.tokenize=y,y(e,t)):e.eat(`/`)?(e.skipToEnd(),g(`comment`,`comment`)):st(e,t,1)?(p(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),g(`regexp`,`string-2`)):(e.eat(`=`),g(`operator`,`operator`,e.current()));if(n=="`")return t.tokenize=b,b(e,t);if(n==`#`&&e.peek()==`!`)return e.skipToEnd(),g(`meta`,`meta`);if(n==`#`&&e.eatWhile(l))return g(`variable`,`property`);if(n==`<`&&e.match(`!--`)||n==`-`&&e.match(`->`)&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),g(`comment`,`comment`);if(d.test(n))return(n!=`>`||!t.lexical||t.lexical.type!=`>`)&&(e.eat(`=`)?(n==`!`||n==`=`)&&e.eat(`=`):/[<>*+\-|&?]/.test(n)&&(e.eat(n),n==`>`&&e.eat(n))),n==`?`&&e.eat(`.`)?g(`.`):g(`operator`,`operator`,e.current());if(l.test(n)){e.eatWhile(l);var r=e.current();if(t.lastType!=`.`){if(u.propertyIsEnumerable(r)){var i=u[r];return g(i.type,i.style,r)}if(r==`async`&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return g(`async`,`keyword`,r)}return g(`variable`,`variable`,r)}}function v(e){return function(t,n){var r=!1,i;if(a&&t.peek()==`@`&&t.match(f))return n.tokenize=_,g(`jsonld-keyword`,`meta`);for(;(i=t.next())!=null&&!(i==e&&!r);)r=!r&&i==`\\`;return r||(n.tokenize=_),g(`string`,`string`)}}function y(e,t){for(var n=!1,r;r=e.next();){if(r==`/`&&n){t.tokenize=_;break}n=r==`*`}return g(`comment`,`comment`)}function b(e,t){for(var n=!1,r;(r=e.next())!=null;){if(!n&&(r=="`"||r==`$`&&e.eat(`{`))){t.tokenize=_;break}n=!n&&r==`\\`}return g(`quasi`,`string-2`,e.current())}var x=`([{}])`;function S(e,t){t.fatArrowAt&&=null;var n=e.string.indexOf(`=>`,e.start);if(!(n<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,a=!1,o=n-1;o>=0;--o){var s=e.string.charAt(o),u=x.indexOf(s);if(u>=0&&u<3){if(!i){++o;break}if(--i==0){s==`(`&&(a=!0);break}}else if(u>=3&&u<6)++i;else if(l.test(s))a=!0;else if(/["'\/`]/.test(s))for(;;--o){if(o==0)return;if(e.string.charAt(o-1)==s&&e.string.charAt(o-2)!=`\\`){o--;break}}else if(a&&!i){++o;break}}a&&!i&&(t.fatArrowAt=o)}}var C={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function w(e,t,n,r,i,a){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=a,r!=null&&(this.align=r)}function T(e,t){if(!s)return!1;for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function E(e,t,n,r,i){var a=e.cc;for(D.state=e,D.stream=i,D.marked=null,D.cc=a,D.style=t,e.lexical.hasOwnProperty(`align`)||(e.lexical.align=!0);;)if((a.length?a.pop():o?V:B)(n,r)){for(;a.length&&a[a.length-1].lex;)a.pop()();return D.marked?D.marked:n==`variable`&&T(e,r)?`variable-2`:t}}var D={state:null,column:null,marked:null,cc:null};function O(){for(var e=arguments.length-1;e>=0;e--)D.cc.push(arguments[e])}function k(){return O.apply(null,arguments),!0}function A(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function j(e){var t=D.state;if(D.marked=`def`,s){if(t.context){if(t.lexical.info==`var`&&t.context&&t.context.block){var r=M(e,t.context);if(r!=null){t.context=r;return}}else if(!A(e,t.localVars)){t.localVars=new P(e,t.localVars);return}}n.globalVars&&!A(e,t.globalVars)&&(t.globalVars=new P(e,t.globalVars))}}function M(e,t){if(t)if(t.block){var n=M(e,t.prev);return n?n==t.prev?t:new ee(n,t.vars,!0):null}else if(A(e,t.vars))return t;else return new ee(t.prev,new P(e,t.vars),!1);else return null}function N(e){return e==`public`||e==`private`||e==`protected`||e==`abstract`||e==`readonly`}function ee(e,t,n){this.prev=e,this.vars=t,this.block=n}function P(e,t){this.name=e,this.next=t}var te=new P(`this`,new P(`arguments`,null));function F(){D.state.context=new ee(D.state.context,D.state.localVars,!1),D.state.localVars=te}function ne(){D.state.context=new ee(D.state.context,D.state.localVars,!0),D.state.localVars=null}F.lex=ne.lex=!0;function I(){D.state.localVars=D.state.context.vars,D.state.context=D.state.context.prev}I.lex=!0;function L(e,t){var n=function(){var n=D.state,r=n.indented;if(n.lexical.type==`stat`)r=n.lexical.indented;else for(var i=n.lexical;i&&i.type==`)`&&i.align;i=i.prev)r=i.indented;n.lexical=new w(r,D.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function R(){var e=D.state;e.lexical.prev&&(e.lexical.type==`)`&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}R.lex=!0;function z(e){function t(n){return n==e?k():e==`;`||n==`}`||n==`)`||n==`]`?O():k(t)}return t}function B(e,t){return e==`var`?k(L(`vardef`,t),Me,z(`;`),R):e==`keyword a`?k(L(`form`),ie,B,R):e==`keyword b`?k(L(`form`),B,R):e==`keyword d`?D.stream.match(/^\s*$/,!1)?k():k(L(`stat`),W,z(`;`),R):e==`debugger`?k(z(`;`)):e==`{`?k(L(`}`),ne,ye,R,I):e==`;`?k():e==`if`?(D.state.lexical.info==`else`&&D.state.cc[D.state.cc.length-1]==R&&D.state.cc.pop()(),k(L(`form`),ie,B,R,Re)):e==`function`?k(He):e==`for`?k(L(`form`),ne,ze,B,I,R):e==`class`||c&&t==`interface`?(D.marked=`keyword`,k(L(`form`,e==`class`?e:t),qe,R)):e==`variable`?c&&t==`declare`?(D.marked=`keyword`,k(B)):c&&(t==`module`||t==`enum`||t==`type`)&&D.stream.match(/^\s*\w/,!1)?(D.marked=`keyword`,t==`enum`?k(X):t==`type`?k(We,z(`operator`),q,z(`;`)):k(L(`form`),Ne,z(`{`),L(`}`),ye,R,R)):c&&t==`namespace`?(D.marked=`keyword`,k(L(`form`),V,B,R)):c&&t==`abstract`?(D.marked=`keyword`,k(B)):k(L(`stat`),fe):e==`switch`?k(L(`form`),ie,z(`{`),L(`}`,`switch`),ne,ye,R,R,I):e==`case`?k(V,z(`:`)):e==`default`?k(z(`:`)):e==`catch`?k(L(`form`),F,re,B,R,I):e==`export`?k(L(`stat`),Ze,R):e==`import`?k(L(`stat`),$e,R):e==`async`?k(B):t==`@`?k(V,B):O(L(`stat`),V,z(`;`),R)}function re(e){if(e==`(`)return k(Ge,z(`)`))}function V(e,t){return U(e,t,!1)}function H(e,t){return U(e,t,!0)}function ie(e){return e==`(`?k(L(`)`),W,z(`)`),R):O()}function U(e,t,n){if(D.state.fatArrowAt==D.stream.start){var r=n?ce:K;if(e==`(`)return k(F,L(`)`),_e(Ge,`)`),R,z(`=>`),r,I);if(e==`variable`)return O(F,Ne,z(`=>`),r,I)}var i=n?G:ae;return C.hasOwnProperty(e)?k(i):e==`function`?k(He,i):e==`class`||c&&t==`interface`?(D.marked=`keyword`,k(L(`form`),Ke,R)):e==`keyword c`||e==`async`?k(n?H:V):e==`(`?k(L(`)`),W,z(`)`),R,i):e==`operator`||e==`spread`?k(n?H:V):e==`[`?k(L(`]`),it,R,i):e==`{`?ve(me,`}`,null,i):e==`quasi`?O(oe,i):e==`new`?k(le(n)):k()}function W(e){return e.match(/[;\}\)\],]/)?O():O(V)}function ae(e,t){return e==`,`?k(W):G(e,t,!1)}function G(e,t,n){var r=n==0?ae:G,i=n==0?V:H;if(e==`=>`)return k(F,n?ce:K,I);if(e==`operator`)return/\+\+|--/.test(t)||c&&t==`!`?k(r):c&&t==`<`&&D.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?k(L(`>`),_e(q,`>`),R,r):t==`?`?k(V,z(`:`),i):k(i);if(e==`quasi`)return O(oe,r);if(e!=`;`){if(e==`(`)return ve(H,`)`,`call`,r);if(e==`.`)return k(pe,r);if(e==`[`)return k(L(`]`),W,z(`]`),R,r);if(c&&t==`as`)return D.marked=`keyword`,k(q,r);if(e==`regexp`)return D.state.lastType=D.marked=`operator`,D.stream.backUp(D.stream.pos-D.stream.start-1),k(i)}}function oe(e,t){return e==`quasi`?t.slice(t.length-2)=="${"?k(W,se):k(oe):O()}function se(e){if(e==`}`)return D.marked=`string-2`,D.state.tokenize=b,k(oe)}function K(e){return S(D.stream,D.state),O(e==`{`?B:V)}function ce(e){return S(D.stream,D.state),O(e==`{`?B:H)}function le(e){return function(t){return t==`.`?k(e?de:ue):t==`variable`&&c?k(ke,e?G:ae):O(e?H:V)}}function ue(e,t){if(t==`target`)return D.marked=`keyword`,k(ae)}function de(e,t){if(t==`target`)return D.marked=`keyword`,k(G)}function fe(e){return e==`:`?k(R,B):O(ae,z(`;`),R)}function pe(e){if(e==`variable`)return D.marked=`property`,k()}function me(e,t){if(e==`async`)return D.marked=`property`,k(me);if(e==`variable`||D.style==`keyword`){if(D.marked=`property`,t==`get`||t==`set`)return k(he);var n;return c&&D.state.fatArrowAt==D.stream.start&&(n=D.stream.match(/^\s*:\s*/,!1))&&(D.state.fatArrowAt=D.stream.pos+n[0].length),k(ge)}else if(e==`number`||e==`string`)return D.marked=a?`property`:D.style+` property`,k(ge);else if(e==`jsonld-keyword`)return k(ge);else if(c&&N(t))return D.marked=`keyword`,k(me);else if(e==`[`)return k(V,be,z(`]`),ge);else if(e==`spread`)return k(H,ge);else if(t==`*`)return D.marked=`keyword`,k(me);else if(e==`:`)return O(ge)}function he(e){return e==`variable`?(D.marked=`property`,k(He)):O(ge)}function ge(e){if(e==`:`)return k(H);if(e==`(`)return O(He)}function _e(e,t,n){function r(i,a){if(n?n.indexOf(i)>-1:i==`,`){var o=D.state.lexical;return o.info==`call`&&(o.pos=(o.pos||0)+1),k(function(n,r){return n==t||r==t?O():O(e)},r)}return i==t||a==t?k():n&&n.indexOf(`;`)>-1?O(e):k(z(t))}return function(n,i){return n==t||i==t?k():O(e,r)}}function ve(e,t,n){for(var r=3;r<arguments.length;r++)D.cc.push(arguments[r]);return k(L(t,n),_e(e,t),R)}function ye(e){return e==`}`?k():O(B,ye)}function be(e,t){if(c){if(e==`:`)return k(q);if(t==`?`)return k(be)}}function xe(e,t){if(c&&(e==`:`||t==`in`))return k(q)}function Se(e){if(c&&e==`:`)return D.stream.match(/^\s*\w+\s+is\b/,!1)?k(V,Ce,q):k(q)}function Ce(e,t){if(t==`is`)return D.marked=`keyword`,k()}function q(e,t){if(t==`keyof`||t==`typeof`||t==`infer`||t==`readonly`)return D.marked=`keyword`,k(t==`typeof`?H:q);if(e==`variable`||t==`void`)return D.marked=`type`,k(Oe);if(t==`|`||t==`&`)return k(q);if(e==`string`||e==`number`||e==`atom`)return k(Oe);if(e==`[`)return k(L(`]`),_e(q,`]`,`,`),R,Oe);if(e==`{`)return k(L(`}`),J,R,Oe);if(e==`(`)return k(_e(De,`)`),we,Oe);if(e==`<`)return k(_e(q,`>`),q);if(e==`quasi`)return O(Ee,Oe)}function we(e){if(e==`=>`)return k(q)}function J(e){return e.match(/[\}\)\]]/)?k():e==`,`||e==`;`?k(J):O(Te,J)}function Te(e,t){if(e==`variable`||D.style==`keyword`)return D.marked=`property`,k(Te);if(t==`?`||e==`number`||e==`string`)return k(Te);if(e==`:`)return k(q);if(e==`[`)return k(z(`variable`),xe,z(`]`),Te);if(e==`(`)return O(Ue,Te);if(!e.match(/[;\}\)\],]/))return k()}function Ee(e,t){return e==`quasi`?t.slice(t.length-2)=="${"?k(q,Y):k(Ee):O()}function Y(e){if(e==`}`)return D.marked=`string-2`,D.state.tokenize=b,k(Ee)}function De(e,t){return e==`variable`&&D.stream.match(/^\s*[?:]/,!1)||t==`?`?k(De):e==`:`?k(q):e==`spread`?k(De):O(q)}function Oe(e,t){if(t==`<`)return k(L(`>`),_e(q,`>`),R,Oe);if(t==`|`||e==`.`||t==`&`)return k(q);if(e==`[`)return k(q,z(`]`),Oe);if(t==`extends`||t==`implements`)return D.marked=`keyword`,k(q);if(t==`?`)return k(q,z(`:`),q)}function ke(e,t){if(t==`<`)return k(L(`>`),_e(q,`>`),R,Oe)}function Ae(){return O(q,je)}function je(e,t){if(t==`=`)return k(q)}function Me(e,t){return t==`enum`?(D.marked=`keyword`,k(X)):O(Ne,be,Ie,Le)}function Ne(e,t){if(c&&N(t))return D.marked=`keyword`,k(Ne);if(e==`variable`)return j(t),k();if(e==`spread`)return k(Ne);if(e==`[`)return ve(Fe,`]`);if(e==`{`)return ve(Pe,`}`)}function Pe(e,t){return e==`variable`&&!D.stream.match(/^\s*:/,!1)?(j(t),k(Ie)):(e==`variable`&&(D.marked=`property`),e==`spread`?k(Ne):e==`}`?O():e==`[`?k(V,z(`]`),z(`:`),Pe):k(z(`:`),Ne,Ie))}function Fe(){return O(Ne,Ie)}function Ie(e,t){if(t==`=`)return k(H)}function Le(e){if(e==`,`)return k(Me)}function Re(e,t){if(e==`keyword b`&&t==`else`)return k(L(`form`,`else`),B,R)}function ze(e,t){if(t==`await`)return k(ze);if(e==`(`)return k(L(`)`),Be,R)}function Be(e){return e==`var`?k(Me,Ve):e==`variable`?k(Ve):O(Ve)}function Ve(e,t){return e==`)`?k():e==`;`?k(Ve):t==`in`||t==`of`?(D.marked=`keyword`,k(V,Ve)):O(V,Ve)}function He(e,t){if(t==`*`)return D.marked=`keyword`,k(He);if(e==`variable`)return j(t),k(He);if(e==`(`)return k(F,L(`)`),_e(Ge,`)`),R,Se,B,I);if(c&&t==`<`)return k(L(`>`),_e(Ae,`>`),R,He)}function Ue(e,t){if(t==`*`)return D.marked=`keyword`,k(Ue);if(e==`variable`)return j(t),k(Ue);if(e==`(`)return k(F,L(`)`),_e(Ge,`)`),R,Se,I);if(c&&t==`<`)return k(L(`>`),_e(Ae,`>`),R,Ue)}function We(e,t){if(e==`keyword`||e==`variable`)return D.marked=`type`,k(We);if(t==`<`)return k(L(`>`),_e(Ae,`>`),R)}function Ge(e,t){return t==`@`&&k(V,Ge),e==`spread`?k(Ge):c&&N(t)?(D.marked=`keyword`,k(Ge)):c&&e==`this`?k(be,Ie):O(Ne,be,Ie)}function Ke(e,t){return e==`variable`?qe(e,t):Je(e,t)}function qe(e,t){if(e==`variable`)return j(t),k(Je)}function Je(e,t){if(t==`<`)return k(L(`>`),_e(Ae,`>`),R,Je);if(t==`extends`||t==`implements`||c&&e==`,`)return t==`implements`&&(D.marked=`keyword`),k(c?q:V,Je);if(e==`{`)return k(L(`}`),Ye,R)}function Ye(e,t){if(e==`async`||e==`variable`&&(t==`static`||t==`get`||t==`set`||c&&N(t))&&D.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return D.marked=`keyword`,k(Ye);if(e==`variable`||D.style==`keyword`)return D.marked=`property`,k(Xe,Ye);if(e==`number`||e==`string`)return k(Xe,Ye);if(e==`[`)return k(V,be,z(`]`),Xe,Ye);if(t==`*`)return D.marked=`keyword`,k(Ye);if(c&&e==`(`)return O(Ue,Ye);if(e==`;`||e==`,`)return k(Ye);if(e==`}`)return k();if(t==`@`)return k(V,Ye)}function Xe(e,t){if(t==`!`||t==`?`)return k(Xe);if(e==`:`)return k(q,Ie);if(t==`=`)return k(H);var n=D.state.lexical.prev;return O(n&&n.info==`interface`?Ue:He)}function Ze(e,t){return t==`*`?(D.marked=`keyword`,k(rt,z(`;`))):t==`default`?(D.marked=`keyword`,k(V,z(`;`))):e==`{`?k(_e(Qe,`}`),rt,z(`;`)):O(B)}function Qe(e,t){if(t==`as`)return D.marked=`keyword`,k(z(`variable`));if(e==`variable`)return O(H,Qe)}function $e(e){return e==`string`?k():e==`(`?O(V):e==`.`?O(ae):O(et,tt,rt)}function et(e,t){return e==`{`?ve(et,`}`):(e==`variable`&&j(t),t==`*`&&(D.marked=`keyword`),k(nt))}function tt(e){if(e==`,`)return k(et,tt)}function nt(e,t){if(t==`as`)return D.marked=`keyword`,k(et)}function rt(e,t){if(t==`from`)return D.marked=`keyword`,k(V)}function it(e){return e==`]`?k():O(_e(H,`]`))}function X(){return O(L(`form`),Ne,z(`{`),L(`}`),_e(at,`}`),R,R)}function at(){return O(Ne,Ie)}function ot(e,t){return e.lastType==`operator`||e.lastType==`,`||d.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function st(e,t,n){return t.tokenize==_&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||t.lastType==`quasi`&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return{startState:function(e){var t={tokenize:_,lastType:`sof`,cc:[],lexical:new w((e||0)-r,0,`block`,!1),localVars:n.localVars,context:n.localVars&&new ee(null,null,!1),indented:e||0};return n.globalVars&&typeof n.globalVars==`object`&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty(`align`)||(t.lexical.align=!1),t.indented=e.indentation(),S(e,t)),t.tokenize!=y&&e.eatSpace())return null;var n=t.tokenize(e,t);return m==`comment`?n:(t.lastType=m==`operator`&&(h==`++`||h==`--`)?`incdec`:m,E(t,n,m,h,e))},indent:function(t,a){if(t.tokenize==y||t.tokenize==b)return e.Pass;if(t.tokenize!=_)return 0;var o=a&&a.charAt(0),s=t.lexical,c;if(!/^\s*else\b/.test(a))for(var l=t.cc.length-1;l>=0;--l){var u=t.cc[l];if(u==R)s=s.prev;else if(u!=Re&&u!=I)break}for(;(s.type==`stat`||s.type==`form`)&&(o==`}`||(c=t.cc[t.cc.length-1])&&(c==ae||c==G)&&!/^[,\.=+\-*:?[\(]/.test(a));)s=s.prev;i&&s.type==`)`&&s.prev.type==`stat`&&(s=s.prev);var d=s.type,f=o==d;return d==`vardef`?s.indented+(t.lastType==`operator`||t.lastType==`,`?s.info.length+1:0):d==`form`&&o==`{`?s.indented:d==`form`?s.indented+r:d==`stat`?s.indented+(ot(t,a)?i||r:0):s.info==`switch`&&!f&&n.doubleIndentSwitch!=0?s.indented+(/^(?:case|default)\b/.test(a)?r:2*r):s.align?s.column+(f?0:1):s.indented+(f?0:r)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:o?null:`/*`,blockCommentEnd:o?null:`*/`,blockCommentContinue:o?null:` * `,lineComment:o?null:`//`,fold:`brace`,closeBrackets:`()[]{}''""\`\``,helperType:o?`json`:`javascript`,jsonldMode:a,jsonMode:o,expressionAllowed:st,skipExpression:function(t){E(t,`atom`,`atom`,`true`,new e.StringStream(``,2,null))}}}),e.registerHelper(`wordChars`,`javascript`,/[\w$]/),e.defineMIME(`text/javascript`,`javascript`),e.defineMIME(`text/ecmascript`,`javascript`),e.defineMIME(`application/javascript`,`javascript`),e.defineMIME(`application/x-javascript`,`javascript`),e.defineMIME(`application/ecmascript`,`javascript`),e.defineMIME(`application/json`,{name:`javascript`,json:!0}),e.defineMIME(`application/x-json`,{name:`javascript`,json:!0}),e.defineMIME(`application/manifest+json`,{name:`javascript`,json:!0}),e.defineMIME(`application/ld+json`,{name:`javascript`,jsonld:!0}),e.defineMIME(`text/typescript`,{name:`javascript`,typescript:!0}),e.defineMIME(`application/typescript`,{name:`javascript`,typescript:!0})})})),Ct=Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft(),xt(),St(),_t()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../xml/xml`,`../javascript/javascript`,`../css/css`],n):n(CodeMirror)})(function(e){var t={script:[[`lang`,/(javascript|babel)/i,`javascript`],[`type`,/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,`javascript`],[`type`,/./,`text/plain`],[null,null,`javascript`]],style:[[`lang`,/^css$/i,`css`],[`type`,/^(text\/)?(x-)?(stylesheet|css)$/i,`css`],[`type`,/./,`text/plain`],[null,null,`css`]]};function n(e,t,n){var r=e.current(),i=r.search(t);return i>-1?e.backUp(r.length-i):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}var r={};function i(e){return r[e]||(r[e]=RegExp(`\\s+`+e+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function a(e,t){var n=e.match(i(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:``}function o(e,t){return RegExp((t?`^`:``)+`</\\s*`+e+`\\s*>`,`i`)}function s(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),i=e[n],a=i.length-1;a>=0;a--)r.unshift(i[a])}function c(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(!r[0]||r[1].test(a(t,r[0])))return r[2]}}e.defineMode(`htmlmixed`,function(r,i){var a=e.getMode(r,{name:`xml`,htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag,allowMissingTagName:i.allowMissingTagName}),l={},u=i&&i.tags,d=i&&i.scriptTypes;if(s(t,l),u&&s(u,l),d)for(var f=d.length-1;f>=0;f--)l.script.unshift([`type`,d[f].matches,d[f].mode]);function p(t,i){var s=a.token(t,i.htmlState),u=/\btag\b/.test(s),d;if(u&&!/[<>\s\/]/.test(t.current())&&(d=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&l.hasOwnProperty(d))i.inTag=d+` `;else if(i.inTag&&u&&/>$/.test(t.current())){var f=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var m=t.current()==`>`&&c(l[f[1]],f[2]),h=e.getMode(r,m),g=o(f[1],!0),_=o(f[1],!1);i.token=function(e,t){return e.match(g,!1)?(t.token=p,t.localState=t.localMode=null,null):n(e,_,t.localMode.token(e,t.localState))},i.localMode=h,i.localState=e.startState(h,a.indent(i.htmlState,``,``))}else i.inTag&&(i.inTag+=t.current(),t.eol()&&(i.inTag+=` `));return s}return{startState:function(){return{token:p,inTag:null,localMode:null,localState:null,htmlState:e.startState(a)}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(a,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?a.indent(t.htmlState,n,r):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||a}}}},`xml`,`javascript`,`css`),e.defineMIME(`text/html`,`htmlmixed`)})})),wt=Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft()):typeof define==`function`&&define.amd?define([`../lib/codemirror`],n):n(CodeMirror)})(function(e){e.modeInfo=[{name:`APL`,mime:`text/apl`,mode:`apl`,ext:[`dyalog`,`apl`]},{name:`PGP`,mimes:[`application/pgp`,`application/pgp-encrypted`,`application/pgp-keys`,`application/pgp-signature`],mode:`asciiarmor`,ext:[`asc`,`pgp`,`sig`]},{name:`ASN.1`,mime:`text/x-ttcn-asn`,mode:`asn.1`,ext:[`asn`,`asn1`]},{name:`Asterisk`,mime:`text/x-asterisk`,mode:`asterisk`,file:/^extensions\.conf$/i},{name:`Brainfuck`,mime:`text/x-brainfuck`,mode:`brainfuck`,ext:[`b`,`bf`]},{name:`C`,mime:`text/x-csrc`,mode:`clike`,ext:[`c`,`h`,`ino`]},{name:`C++`,mime:`text/x-c++src`,mode:`clike`,ext:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],alias:[`cpp`]},{name:`Cobol`,mime:`text/x-cobol`,mode:`cobol`,ext:[`cob`,`cpy`,`cbl`]},{name:`C#`,mime:`text/x-csharp`,mode:`clike`,ext:[`cs`],alias:[`csharp`,`cs`]},{name:`Clojure`,mime:`text/x-clojure`,mode:`clojure`,ext:[`clj`,`cljc`,`cljx`]},{name:`ClojureScript`,mime:`text/x-clojurescript`,mode:`clojure`,ext:[`cljs`]},{name:`Closure Stylesheets (GSS)`,mime:`text/x-gss`,mode:`css`,ext:[`gss`]},{name:`CMake`,mime:`text/x-cmake`,mode:`cmake`,ext:[`cmake`,`cmake.in`],file:/^CMakeLists\.txt$/},{name:`CoffeeScript`,mimes:[`application/vnd.coffeescript`,`text/coffeescript`,`text/x-coffeescript`],mode:`coffeescript`,ext:[`coffee`],alias:[`coffee`,`coffee-script`]},{name:`Common Lisp`,mime:`text/x-common-lisp`,mode:`commonlisp`,ext:[`cl`,`lisp`,`el`],alias:[`lisp`]},{name:`Cypher`,mime:`application/x-cypher-query`,mode:`cypher`,ext:[`cyp`,`cypher`]},{name:`Cython`,mime:`text/x-cython`,mode:`python`,ext:[`pyx`,`pxd`,`pxi`]},{name:`Crystal`,mime:`text/x-crystal`,mode:`crystal`,ext:[`cr`]},{name:`CSS`,mime:`text/css`,mode:`css`,ext:[`css`]},{name:`CQL`,mime:`text/x-cassandra`,mode:`sql`,ext:[`cql`]},{name:`D`,mime:`text/x-d`,mode:`d`,ext:[`d`]},{name:`Dart`,mimes:[`application/dart`,`text/x-dart`],mode:`dart`,ext:[`dart`]},{name:`diff`,mime:`text/x-diff`,mode:`diff`,ext:[`diff`,`patch`]},{name:`Django`,mime:`text/x-django`,mode:`django`},{name:`Dockerfile`,mime:`text/x-dockerfile`,mode:`dockerfile`,file:/^Dockerfile$/},{name:`DTD`,mime:`application/xml-dtd`,mode:`dtd`,ext:[`dtd`]},{name:`Dylan`,mime:`text/x-dylan`,mode:`dylan`,ext:[`dylan`,`dyl`,`intr`]},{name:`EBNF`,mime:`text/x-ebnf`,mode:`ebnf`},{name:`ECL`,mime:`text/x-ecl`,mode:`ecl`,ext:[`ecl`]},{name:`edn`,mime:`application/edn`,mode:`clojure`,ext:[`edn`]},{name:`Eiffel`,mime:`text/x-eiffel`,mode:`eiffel`,ext:[`e`]},{name:`Elm`,mime:`text/x-elm`,mode:`elm`,ext:[`elm`]},{name:`Embedded JavaScript`,mime:`application/x-ejs`,mode:`htmlembedded`,ext:[`ejs`]},{name:`Embedded Ruby`,mime:`application/x-erb`,mode:`htmlembedded`,ext:[`erb`]},{name:`Erlang`,mime:`text/x-erlang`,mode:`erlang`,ext:[`erl`]},{name:`Esper`,mime:`text/x-esper`,mode:`sql`},{name:`Factor`,mime:`text/x-factor`,mode:`factor`,ext:[`factor`]},{name:`FCL`,mime:`text/x-fcl`,mode:`fcl`},{name:`Forth`,mime:`text/x-forth`,mode:`forth`,ext:[`forth`,`fth`,`4th`]},{name:`Fortran`,mime:`text/x-fortran`,mode:`fortran`,ext:[`f`,`for`,`f77`,`f90`,`f95`]},{name:`F#`,mime:`text/x-fsharp`,mode:`mllike`,ext:[`fs`],alias:[`fsharp`]},{name:`Gas`,mime:`text/x-gas`,mode:`gas`,ext:[`s`]},{name:`Gherkin`,mime:`text/x-feature`,mode:`gherkin`,ext:[`feature`]},{name:`GitHub Flavored Markdown`,mime:`text/x-gfm`,mode:`gfm`,file:/^(readme|contributing|history)\.md$/i},{name:`Go`,mime:`text/x-go`,mode:`go`,ext:[`go`]},{name:`Groovy`,mime:`text/x-groovy`,mode:`groovy`,ext:[`groovy`,`gradle`],file:/^Jenkinsfile$/},{name:`HAML`,mime:`text/x-haml`,mode:`haml`,ext:[`haml`]},{name:`Haskell`,mime:`text/x-haskell`,mode:`haskell`,ext:[`hs`]},{name:`Haskell (Literate)`,mime:`text/x-literate-haskell`,mode:`haskell-literate`,ext:[`lhs`]},{name:`Haxe`,mime:`text/x-haxe`,mode:`haxe`,ext:[`hx`]},{name:`HXML`,mime:`text/x-hxml`,mode:`haxe`,ext:[`hxml`]},{name:`ASP.NET`,mime:`application/x-aspx`,mode:`htmlembedded`,ext:[`aspx`],alias:[`asp`,`aspx`]},{name:`HTML`,mime:`text/html`,mode:`htmlmixed`,ext:[`html`,`htm`,`handlebars`,`hbs`],alias:[`xhtml`]},{name:`HTTP`,mime:`message/http`,mode:`http`},{name:`IDL`,mime:`text/x-idl`,mode:`idl`,ext:[`pro`]},{name:`Pug`,mime:`text/x-pug`,mode:`pug`,ext:[`jade`,`pug`],alias:[`jade`]},{name:`Java`,mime:`text/x-java`,mode:`clike`,ext:[`java`]},{name:`Java Server Pages`,mime:`application/x-jsp`,mode:`htmlembedded`,ext:[`jsp`],alias:[`jsp`]},{name:`JavaScript`,mimes:[`text/javascript`,`text/ecmascript`,`application/javascript`,`application/x-javascript`,`application/ecmascript`],mode:`javascript`,ext:[`js`],alias:[`ecmascript`,`js`,`node`]},{name:`JSON`,mimes:[`application/json`,`application/x-json`],mode:`javascript`,ext:[`json`,`map`],alias:[`json5`]},{name:`JSON-LD`,mime:`application/ld+json`,mode:`javascript`,ext:[`jsonld`],alias:[`jsonld`]},{name:`JSX`,mime:`text/jsx`,mode:`jsx`,ext:[`jsx`]},{name:`Jinja2`,mime:`text/jinja2`,mode:`jinja2`,ext:[`j2`,`jinja`,`jinja2`]},{name:`Julia`,mime:`text/x-julia`,mode:`julia`,ext:[`jl`],alias:[`jl`]},{name:`Kotlin`,mime:`text/x-kotlin`,mode:`clike`,ext:[`kt`]},{name:`LESS`,mime:`text/x-less`,mode:`css`,ext:[`less`]},{name:`LiveScript`,mime:`text/x-livescript`,mode:`livescript`,ext:[`ls`],alias:[`ls`]},{name:`Lua`,mime:`text/x-lua`,mode:`lua`,ext:[`lua`]},{name:`Markdown`,mime:`text/x-markdown`,mode:`markdown`,ext:[`markdown`,`md`,`mkd`]},{name:`mIRC`,mime:`text/mirc`,mode:`mirc`},{name:`MariaDB SQL`,mime:`text/x-mariadb`,mode:`sql`},{name:`Mathematica`,mime:`text/x-mathematica`,mode:`mathematica`,ext:[`m`,`nb`,`wl`,`wls`]},{name:`Modelica`,mime:`text/x-modelica`,mode:`modelica`,ext:[`mo`]},{name:`MUMPS`,mime:`text/x-mumps`,mode:`mumps`,ext:[`mps`]},{name:`MS SQL`,mime:`text/x-mssql`,mode:`sql`},{name:`mbox`,mime:`application/mbox`,mode:`mbox`,ext:[`mbox`]},{name:`MySQL`,mime:`text/x-mysql`,mode:`sql`},{name:`Nginx`,mime:`text/x-nginx-conf`,mode:`nginx`,file:/nginx.*\.conf$/i},{name:`NSIS`,mime:`text/x-nsis`,mode:`nsis`,ext:[`nsh`,`nsi`]},{name:`NTriples`,mimes:[`application/n-triples`,`application/n-quads`,`text/n-triples`],mode:`ntriples`,ext:[`nt`,`nq`]},{name:`Objective-C`,mime:`text/x-objectivec`,mode:`clike`,ext:[`m`],alias:[`objective-c`,`objc`]},{name:`Objective-C++`,mime:`text/x-objectivec++`,mode:`clike`,ext:[`mm`],alias:[`objective-c++`,`objc++`]},{name:`OCaml`,mime:`text/x-ocaml`,mode:`mllike`,ext:[`ml`,`mli`,`mll`,`mly`]},{name:`Octave`,mime:`text/x-octave`,mode:`octave`,ext:[`m`]},{name:`Oz`,mime:`text/x-oz`,mode:`oz`,ext:[`oz`]},{name:`Pascal`,mime:`text/x-pascal`,mode:`pascal`,ext:[`p`,`pas`]},{name:`PEG.js`,mime:`null`,mode:`pegjs`,ext:[`jsonld`]},{name:`Perl`,mime:`text/x-perl`,mode:`perl`,ext:[`pl`,`pm`]},{name:`PHP`,mimes:[`text/x-php`,`application/x-httpd-php`,`application/x-httpd-php-open`],mode:`php`,ext:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`]},{name:`Pig`,mime:`text/x-pig`,mode:`pig`,ext:[`pig`]},{name:`Plain Text`,mime:`text/plain`,mode:`null`,ext:[`txt`,`text`,`conf`,`def`,`list`,`log`]},{name:`PLSQL`,mime:`text/x-plsql`,mode:`sql`,ext:[`pls`]},{name:`PostgreSQL`,mime:`text/x-pgsql`,mode:`sql`},{name:`PowerShell`,mime:`application/x-powershell`,mode:`powershell`,ext:[`ps1`,`psd1`,`psm1`]},{name:`Properties files`,mime:`text/x-properties`,mode:`properties`,ext:[`properties`,`ini`,`in`],alias:[`ini`,`properties`]},{name:`ProtoBuf`,mime:`text/x-protobuf`,mode:`protobuf`,ext:[`proto`]},{name:`Python`,mime:`text/x-python`,mode:`python`,ext:[`BUILD`,`bzl`,`py`,`pyw`],file:/^(BUCK|BUILD)$/},{name:`Puppet`,mime:`text/x-puppet`,mode:`puppet`,ext:[`pp`]},{name:`Q`,mime:`text/x-q`,mode:`q`,ext:[`q`]},{name:`R`,mime:`text/x-rsrc`,mode:`r`,ext:[`r`,`R`],alias:[`rscript`]},{name:`reStructuredText`,mime:`text/x-rst`,mode:`rst`,ext:[`rst`],alias:[`rst`]},{name:`RPM Changes`,mime:`text/x-rpm-changes`,mode:`rpm`},{name:`RPM Spec`,mime:`text/x-rpm-spec`,mode:`rpm`,ext:[`spec`]},{name:`Ruby`,mime:`text/x-ruby`,mode:`ruby`,ext:[`rb`],alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`]},{name:`Rust`,mime:`text/x-rustsrc`,mode:`rust`,ext:[`rs`]},{name:`SAS`,mime:`text/x-sas`,mode:`sas`,ext:[`sas`]},{name:`Sass`,mime:`text/x-sass`,mode:`sass`,ext:[`sass`]},{name:`Scala`,mime:`text/x-scala`,mode:`clike`,ext:[`scala`]},{name:`Scheme`,mime:`text/x-scheme`,mode:`scheme`,ext:[`scm`,`ss`]},{name:`SCSS`,mime:`text/x-scss`,mode:`css`,ext:[`scss`]},{name:`Shell`,mimes:[`text/x-sh`,`application/x-sh`],mode:`shell`,ext:[`sh`,`ksh`,`bash`],alias:[`bash`,`sh`,`zsh`],file:/^PKGBUILD$/},{name:`Sieve`,mime:`application/sieve`,mode:`sieve`,ext:[`siv`,`sieve`]},{name:`Slim`,mimes:[`text/x-slim`,`application/x-slim`],mode:`slim`,ext:[`slim`]},{name:`Smalltalk`,mime:`text/x-stsrc`,mode:`smalltalk`,ext:[`st`]},{name:`Smarty`,mime:`text/x-smarty`,mode:`smarty`,ext:[`tpl`]},{name:`Solr`,mime:`text/x-solr`,mode:`solr`},{name:`SML`,mime:`text/x-sml`,mode:`mllike`,ext:[`sml`,`sig`,`fun`,`smackspec`]},{name:`Soy`,mime:`text/x-soy`,mode:`soy`,ext:[`soy`],alias:[`closure template`]},{name:`SPARQL`,mime:`application/sparql-query`,mode:`sparql`,ext:[`rq`,`sparql`],alias:[`sparul`]},{name:`Spreadsheet`,mime:`text/x-spreadsheet`,mode:`spreadsheet`,alias:[`excel`,`formula`]},{name:`SQL`,mime:`text/x-sql`,mode:`sql`,ext:[`sql`]},{name:`SQLite`,mime:`text/x-sqlite`,mode:`sql`},{name:`Squirrel`,mime:`text/x-squirrel`,mode:`clike`,ext:[`nut`]},{name:`Stylus`,mime:`text/x-styl`,mode:`stylus`,ext:[`styl`]},{name:`Swift`,mime:`text/x-swift`,mode:`swift`,ext:[`swift`]},{name:`sTeX`,mime:`text/x-stex`,mode:`stex`},{name:`LaTeX`,mime:`text/x-latex`,mode:`stex`,ext:[`text`,`ltx`,`tex`],alias:[`tex`]},{name:`SystemVerilog`,mime:`text/x-systemverilog`,mode:`verilog`,ext:[`v`,`sv`,`svh`]},{name:`Tcl`,mime:`text/x-tcl`,mode:`tcl`,ext:[`tcl`]},{name:`Textile`,mime:`text/x-textile`,mode:`textile`,ext:[`textile`]},{name:`TiddlyWiki`,mime:`text/x-tiddlywiki`,mode:`tiddlywiki`},{name:`Tiki wiki`,mime:`text/tiki`,mode:`tiki`},{name:`TOML`,mime:`text/x-toml`,mode:`toml`,ext:[`toml`]},{name:`Tornado`,mime:`text/x-tornado`,mode:`tornado`},{name:`troff`,mime:`text/troff`,mode:`troff`,ext:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`]},{name:`TTCN`,mime:`text/x-ttcn`,mode:`ttcn`,ext:[`ttcn`,`ttcn3`,`ttcnpp`]},{name:`TTCN_CFG`,mime:`text/x-ttcn-cfg`,mode:`ttcn-cfg`,ext:[`cfg`]},{name:`Turtle`,mime:`text/turtle`,mode:`turtle`,ext:[`ttl`]},{name:`TypeScript`,mime:`application/typescript`,mode:`javascript`,ext:[`ts`],alias:[`ts`]},{name:`TypeScript-JSX`,mime:`text/typescript-jsx`,mode:`jsx`,ext:[`tsx`],alias:[`tsx`]},{name:`Twig`,mime:`text/x-twig`,mode:`twig`},{name:`Web IDL`,mime:`text/x-webidl`,mode:`webidl`,ext:[`webidl`]},{name:`VB.NET`,mime:`text/x-vb`,mode:`vb`,ext:[`vb`]},{name:`VBScript`,mime:`text/vbscript`,mode:`vbscript`,ext:[`vbs`]},{name:`Velocity`,mime:`text/velocity`,mode:`velocity`,ext:[`vtl`]},{name:`Verilog`,mime:`text/x-verilog`,mode:`verilog`,ext:[`v`]},{name:`VHDL`,mime:`text/x-vhdl`,mode:`vhdl`,ext:[`vhd`,`vhdl`]},{name:`Vue.js Component`,mimes:[`script/x-vue`,`text/x-vue`],mode:`vue`,ext:[`vue`]},{name:`XML`,mimes:[`application/xml`,`text/xml`],mode:`xml`,ext:[`xml`,`xsl`,`xsd`,`svg`],alias:[`rss`,`wsdl`,`xsd`]},{name:`XQuery`,mime:`application/xquery`,mode:`xquery`,ext:[`xy`,`xquery`]},{name:`Yacas`,mime:`text/x-yacas`,mode:`yacas`,ext:[`ys`]},{name:`YAML`,mimes:[`text/x-yaml`,`text/yaml`],mode:`yaml`,ext:[`yaml`,`yml`],alias:[`yml`]},{name:`Z80`,mime:`text/x-z80`,mode:`z80`,ext:[`z80`]},{name:`mscgen`,mime:`text/x-mscgen`,mode:`mscgen`,ext:[`mscgen`,`mscin`,`msc`]},{name:`xu`,mime:`text/x-xu`,mode:`mscgen`,ext:[`xu`]},{name:`msgenny`,mime:`text/x-msgenny`,mode:`mscgen`,ext:[`msgenny`]},{name:`WebAssembly`,mime:`text/webassembly`,mode:`wast`,ext:[`wat`,`wast`]}];for(var t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.mime==t)return r;if(r.mimes){for(var i=0;i<r.mimes.length;i++)if(r.mimes[i]==t)return r}}if(/\+xml$/.test(t))return e.findModeByMIME(`application/xml`);if(/\+json$/.test(t))return e.findModeByMIME(`application/json`)},e.findModeByExtension=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.ext){for(var i=0;i<r.ext.length;i++)if(r.ext[i]==t)return r}}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.file&&r.file.test(t))return r}var i=t.lastIndexOf(`.`),a=i>-1&&t.substring(i+1,t.length);if(a)return e.findModeByExtension(a)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.name.toLowerCase()==t)return r;if(r.alias){for(var i=0;i<r.alias.length;i++)if(r.alias[i].toLowerCase()==t)return r}}}})})),Tt=Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft(),xt(),wt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../xml/xml`,`../meta`],n):n(CodeMirror)})(function(e){e.defineMode(`markdown`,function(t,n){var r=e.getMode(t,`text/html`),i=r.name==`null`;function a(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return i.name==`null`?null:i}n.highlightFormatting===void 0&&(n.highlightFormatting=!1),n.maxBlockquoteDepth===void 0&&(n.maxBlockquoteDepth=0),n.taskLists===void 0&&(n.taskLists=!1),n.strikethrough===void 0&&(n.strikethrough=!1),n.emoji===void 0&&(n.emoji=!1),n.fencedCodeBlockHighlighting===void 0&&(n.fencedCodeBlockHighlighting=!0),n.fencedCodeBlockDefaultMode===void 0&&(n.fencedCodeBlockDefaultMode=`text/plain`),n.xml===void 0&&(n.xml=!0),n.tokenTypeOverrides===void 0&&(n.tokenTypeOverrides={});var o={header:`header`,code:`comment`,quote:`quote`,list1:`variable-2`,list2:`variable-3`,list3:`keyword`,hr:`hr`,image:`image`,imageAltText:`image-alt-text`,imageMarker:`image-marker`,formatting:`formatting`,linkInline:`link`,linkEmail:`link`,linkText:`link`,linkHref:`string`,em:`em`,strong:`strong`,strikethrough:`strikethrough`,emoji:`builtin`};for(var s in o)o.hasOwnProperty(s)&&n.tokenTypeOverrides[s]&&(o[s]=n.tokenTypeOverrides[s]);var c=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,u=/^\[(x| )\](?=\s)/i,d=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,f=/^ {0,3}(?:\={1,}|-{2,})\s*$/,p=/^[^#!\[\]*_\\<>` "'(~:]+/,m=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,h=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,_=` `;function v(e,t,n){return t.f=t.inline=n,n(e,t)}function y(e,t,n){return t.f=t.block=n,n(e,t)}function b(e){return!e||!/\S/.test(e.string)}function x(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==C){var n=i;if(!n){var a=e.innerMode(r,t.htmlState);n=a.mode.name==`xml`&&a.state.tagStart===null&&!a.state.context&&a.state.tokenize.isInText}n&&(t.f=D,t.block=S,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function S(t,r){var i=t.column()===r.indentation,s=b(r.prevLine.stream),p=r.indentedCode,g=r.prevLine.hr,_=r.list!==!1,y=(r.listStack[r.listStack.length-1]||0)+3;r.indentedCode=!1;var x=r.indentation;if(r.indentationDiff===null&&(r.indentationDiff=r.indentation,_)){for(r.list=null;x<r.listStack[r.listStack.length-1];)r.listStack.pop(),r.listStack.length?r.indentation=r.listStack[r.listStack.length-1]:r.list=!1;r.list!==!1&&(r.indentationDiff=x-r.listStack[r.listStack.length-1])}var S=!s&&!g&&!r.prevLine.header&&(!_||!p)&&!r.prevLine.fencedCodeEnd,C=(r.list===!1||g||s)&&r.indentation<=y&&t.match(c),E=null;if(r.indentationDiff>=4&&(p||r.prevLine.fencedCodeEnd||r.prevLine.header||s))return t.skipToEnd(),r.indentedCode=!0,o.code;if(t.eatSpace())return null;if(i&&r.indentation<=y&&(E=t.match(d))&&E[1].length<=6)return r.quote=0,r.header=E[1].length,r.thisLine.header=!0,n.highlightFormatting&&(r.formatting=`header`),r.f=r.inline,T(r);if(r.indentation<=y&&t.eat(`>`))return r.quote=i?1:r.quote+1,n.highlightFormatting&&(r.formatting=`quote`),t.eatSpace(),T(r);if(!C&&!r.setext&&i&&r.indentation<=y&&(E=t.match(l))){var D=E[1]?`ol`:`ul`;return r.indentation=x+t.current().length,r.list=!0,r.quote=0,r.listStack.push(r.indentation),r.em=!1,r.strong=!1,r.code=!1,r.strikethrough=!1,n.taskLists&&t.match(u,!1)&&(r.taskList=!0),r.f=r.inline,n.highlightFormatting&&(r.formatting=[`list`,`list-`+D]),T(r)}else if(i&&r.indentation<=y&&(E=t.match(m,!0)))return r.quote=0,r.fencedEndRE=RegExp(E[1]+`+ *$`),r.localMode=n.fencedCodeBlockHighlighting&&a(E[2]||n.fencedCodeBlockDefaultMode),r.localMode&&(r.localState=e.startState(r.localMode)),r.f=r.block=w,n.highlightFormatting&&(r.formatting=`code-block`),r.code=-1,T(r);else if(r.setext||(!S||!_)&&!r.quote&&r.list===!1&&!r.code&&!C&&!h.test(t.string)&&(E=t.lookAhead(1))&&(E=E.match(f)))return r.setext?(r.header=r.setext,r.setext=0,t.skipToEnd(),n.highlightFormatting&&(r.formatting=`header`)):(r.header=E[0].charAt(0)==`=`?1:2,r.setext=r.header),r.thisLine.header=!0,r.f=r.inline,T(r);else if(C)return t.skipToEnd(),r.hr=!0,r.thisLine.hr=!0,o.hr;else if(t.peek()===`[`)return v(t,r,M);return v(t,r,r.inline)}function C(t,n){var a=r.token(t,n.htmlState);if(!i){var o=e.innerMode(r,n.htmlState);(o.mode.name==`xml`&&o.state.tagStart===null&&!o.state.context&&o.state.tokenize.isInText||n.md_inside&&t.current().indexOf(`>`)>-1)&&(n.f=D,n.block=S,n.htmlState=null)}return a}function w(e,t){var r=t.listStack[t.listStack.length-1]||0,i=t.indentation<r,a=r+3;if(t.fencedEndRE&&t.indentation<=a&&(i||e.match(t.fencedEndRE))){n.highlightFormatting&&(t.formatting=`code-block`);var s;return i||(s=T(t)),t.localMode=t.localState=null,t.block=S,t.f=D,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,i?y(e,t,t.block):s}else if(t.localMode)return t.localMode.token(e,t.localState);else return e.skipToEnd(),o.code}function T(e){var t=[];if(e.formatting){t.push(o.formatting),typeof e.formatting==`string`&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)t.push(o.formatting+`-`+e.formatting[r]),e.formatting[r]===`header`&&t.push(o.formatting+`-`+e.formatting[r]+`-`+e.header),e.formatting[r]===`quote`&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(o.formatting+`-`+e.formatting[r]+`-`+e.quote):t.push(`error`))}if(e.taskOpen)return t.push(`meta`),t.length?t.join(` `):null;if(e.taskClosed)return t.push(`property`),t.length?t.join(` `):null;if(e.linkHref?t.push(o.linkHref,`url`):(e.strong&&t.push(o.strong),e.em&&t.push(o.em),e.strikethrough&&t.push(o.strikethrough),e.emoji&&t.push(o.emoji),e.linkText&&t.push(o.linkText),e.code&&t.push(o.code),e.image&&t.push(o.image),e.imageAltText&&t.push(o.imageAltText,`link`),e.imageMarker&&t.push(o.imageMarker)),e.header&&t.push(o.header,o.header+`-`+e.header),e.quote&&(t.push(o.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(o.quote+`-`+e.quote):t.push(o.quote+`-`+n.maxBlockquoteDepth)),e.list!==!1){var i=(e.listStack.length-1)%3;i?i===1?t.push(o.list2):t.push(o.list3):t.push(o.list1)}return e.trailingSpaceNewLine?t.push(`trailing-space-new-line`):e.trailingSpace&&t.push(`trailing-space-`+(e.trailingSpace%2?`a`:`b`)),t.length?t.join(` `):null}function E(e,t){if(e.match(p,!0))return T(t)}function D(t,i){var a=i.text(t,i);if(a!==void 0)return a;if(i.list)return i.list=null,T(i);if(i.taskList)return t.match(u,!0)[1]===` `?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting=`task`),i.taskList=!1,T(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting=`header`),T(i);var s=t.next();if(i.linkTitle){i.linkTitle=!1;var c=s;s===`(`&&(c=`)`),c=(c+``).replace(/([.?*+^\[\]\\(){}|-])/g,`\\$1`);var l=`^\\s*(?:[^`+c+`\\\\]+|\\\\\\\\|\\\\.)`+c;if(t.match(new RegExp(l),!0))return o.linkHref}if(s==="`"){var d=i.formatting;n.highlightFormatting&&(i.formatting=`code`),t.eatWhile("`");var f=t.current().length;if(i.code==0&&(!i.quote||f==1))return i.code=f,T(i);if(f==i.code){var p=T(i);return i.code=0,p}else return i.formatting=d,T(i)}else if(i.code)return T(i);if(s===`\\`&&(t.next(),n.highlightFormatting)){var m=T(i),h=o.formatting+`-escape`;return m?m+` `+h:h}if(s===`!`&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting=`image`),T(i);if(s===`[`&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting=`image`),T(i);if(s===`]`&&i.imageAltText){n.highlightFormatting&&(i.formatting=`image`);var m=T(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=k,m}if(s===`[`&&!i.image)return i.linkText&&t.match(/^.*?\]/)?T(i):(i.linkText=!0,n.highlightFormatting&&(i.formatting=`link`),T(i));if(s===`]`&&i.linkText){n.highlightFormatting&&(i.formatting=`link`);var m=T(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?k:D,m}if(s===`<`&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){i.f=i.inline=O,n.highlightFormatting&&(i.formatting=`link`);var m=T(i);return m?m+=` `:m=``,m+o.linkInline}if(s===`<`&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){i.f=i.inline=O,n.highlightFormatting&&(i.formatting=`link`);var m=T(i);return m?m+=` `:m=``,m+o.linkEmail}if(n.xml&&s===`<`&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var _=t.string.indexOf(`>`,t.pos);if(_!=-1){var v=t.string.substring(t.start,_);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(v)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),y(t,i,C)}if(n.xml&&s===`<`&&t.match(/^\/\w*?>/))return i.md_inside=!1,`tag`;if(s===`*`||s===`_`){for(var b=1,x=t.pos==1?` `:t.string.charAt(t.pos-2);b<3&&t.eat(s);)b++;var S=t.peek()||` `,w=!/\s/.test(S)&&(!g.test(S)||/\s/.test(x)||g.test(x)),E=!/\s/.test(x)&&(!g.test(x)||/\s/.test(S)||g.test(S)),A=null,j=null;if(b%2&&(!i.em&&w&&(s===`*`||!E||g.test(x))?A=!0:i.em==s&&E&&(s===`*`||!w||g.test(S))&&(A=!1)),b>1&&(!i.strong&&w&&(s===`*`||!E||g.test(x))?j=!0:i.strong==s&&E&&(s===`*`||!w||g.test(S))&&(j=!1)),j!=null||A!=null){n.highlightFormatting&&(i.formatting=A==null?`strong`:j==null?`em`:`strong em`),A===!0&&(i.em=s),j===!0&&(i.strong=s);var p=T(i);return A===!1&&(i.em=!1),j===!1&&(i.strong=!1),p}}else if(s===` `&&(t.eat(`*`)||t.eat(`_`))){if(t.peek()===` `)return T(i);t.backUp(1)}if(n.strikethrough){if(s===`~`&&t.eatWhile(s)){if(i.strikethrough){n.highlightFormatting&&(i.formatting=`strikethrough`);var p=T(i);return i.strikethrough=!1,p}else if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting=`strikethrough`),T(i)}else if(s===` `&&t.match(`~~`,!0)){if(t.peek()===` `)return T(i);t.backUp(2)}}if(n.emoji&&s===`:`&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting=`emoji`);var M=T(i);return i.emoji=!1,M}return s===` `&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),T(i)}function O(e,t){if(e.next()===`>`){t.f=t.inline=D,n.highlightFormatting&&(t.formatting=`link`);var r=T(t);return r?r+=` `:r=``,r+o.linkInline}return e.match(/^[^>]+/,!0),o.linkInline}function k(e,t){if(e.eatSpace())return null;var r=e.next();return r===`(`||r===`[`?(t.f=t.inline=j(r===`(`?`)`:`]`),n.highlightFormatting&&(t.formatting=`link-string`),t.linkHref=!0,T(t)):`error`}var A={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function j(e){return function(t,r){if(t.next()===e){r.f=r.inline=D,n.highlightFormatting&&(r.formatting=`link-string`);var i=T(r);return r.linkHref=!1,i}return t.match(A[e]),r.linkHref=!0,T(r)}}function M(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=N,e.next(),n.highlightFormatting&&(t.formatting=`link`),t.linkText=!0,T(t)):v(e,t,D)}function N(e,t){if(e.match(`]:`,!0)){t.f=t.inline=ee,n.highlightFormatting&&(t.formatting=`link`);var r=T(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),o.linkText}function ee(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),e.peek()===void 0?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),t.f=t.inline=D,o.linkHref+` url`)}var P={startState:function(){return{f:S,prevLine:{stream:null},thisLine:{stream:null},block:S,htmlState:null,indentation:0,inline:D,text:E,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return x(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=C)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g,_).length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==C?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:P}},indent:function(t,n,i){return t.block==C&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine:x,getType:T,blockCommentStart:`<!--`,blockCommentEnd:`-->`,closeBrackets:`()[]{}''""\`\``,fold:`markdown`};return P},`xml`),e.defineMIME(`text/markdown`,`markdown`),e.defineMIME(`text/x-markdown`,`markdown`)})})),Et=Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft(),St(),_t(),Ct()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../javascript/javascript`,`../css/css`,`../htmlmixed/htmlmixed`],n):n(CodeMirror)})(function(e){e.defineMode(`pug`,function(t){var n=`keyword`,r=`meta`,i=`builtin`,a=`qualifier`,o={"{":`}`,"(":`)`,"[":`]`},s=e.getMode(t,`javascript`);function c(){this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=e.startState(s),this.restOfLine=``,this.isIncludeFiltered=!1,this.isEach=!1,this.lastTag=``,this.scriptType=``,this.isAttrs=!1,this.attrsNest=[],this.inAttributeName=!0,this.attributeIsType=!1,this.attrValue=``,this.indentOf=1/0,this.indentToken=``,this.innerMode=null,this.innerState=null,this.innerModeForLine=!1}c.prototype.copy=function(){var t=new c;return t.javaScriptLine=this.javaScriptLine,t.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon,t.javaScriptArguments=this.javaScriptArguments,t.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth,t.isInterpolating=this.isInterpolating,t.interpolationNesting=this.interpolationNesting,t.jsState=e.copyState(s,this.jsState),t.innerMode=this.innerMode,this.innerMode&&this.innerState&&(t.innerState=e.copyState(this.innerMode,this.innerState)),t.restOfLine=this.restOfLine,t.isIncludeFiltered=this.isIncludeFiltered,t.isEach=this.isEach,t.lastTag=this.lastTag,t.scriptType=this.scriptType,t.isAttrs=this.isAttrs,t.attrsNest=this.attrsNest.slice(),t.inAttributeName=this.inAttributeName,t.attributeIsType=this.attributeIsType,t.attrValue=this.attrValue,t.indentOf=this.indentOf,t.indentToken=this.indentToken,t.innerModeForLine=this.innerModeForLine,t};function l(e,t){if(e.sol()&&(t.javaScriptLine=!1,t.javaScriptLineExcludesColon=!1),t.javaScriptLine){if(t.javaScriptLineExcludesColon&&e.peek()===`:`){t.javaScriptLine=!1,t.javaScriptLineExcludesColon=!1;return}var n=s.token(e,t.jsState);return e.eol()&&(t.javaScriptLine=!1),n||!0}}function u(e,t){if(t.javaScriptArguments){if(t.javaScriptArgumentsDepth===0&&e.peek()!==`(`){t.javaScriptArguments=!1;return}if(e.peek()===`(`?t.javaScriptArgumentsDepth++:e.peek()===`)`&&t.javaScriptArgumentsDepth--,t.javaScriptArgumentsDepth===0){t.javaScriptArguments=!1;return}return s.token(e,t.jsState)||!0}}function d(e){if(e.match(/^yield\b/))return`keyword`}function f(e){if(e.match(/^(?:doctype) *([^\n]+)?/))return r}function p(e,t){if(e.match(`#{`))return t.isInterpolating=!0,t.interpolationNesting=0,`punctuation`}function m(e,t){if(t.isInterpolating){if(e.peek()===`}`){if(t.interpolationNesting--,t.interpolationNesting<0)return e.next(),t.isInterpolating=!1,`punctuation`}else e.peek()===`{`&&t.interpolationNesting++;return s.token(e,t.jsState)||!0}}function h(e,t){if(e.match(/^case\b/))return t.javaScriptLine=!0,n}function g(e,t){if(e.match(/^when\b/))return t.javaScriptLine=!0,t.javaScriptLineExcludesColon=!0,n}function _(e){if(e.match(/^default\b/))return n}function v(e,t){if(e.match(/^extends?\b/))return t.restOfLine=`string`,n}function y(e,t){if(e.match(/^append\b/))return t.restOfLine=`variable`,n}function b(e,t){if(e.match(/^prepend\b/))return t.restOfLine=`variable`,n}function x(e,t){if(e.match(/^block\b *(?:(prepend|append)\b)?/))return t.restOfLine=`variable`,n}function S(e,t){if(e.match(/^include\b/))return t.restOfLine=`string`,n}function C(e,t){if(e.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&e.match(`include`))return t.isIncludeFiltered=!0,n}function w(e,t){if(t.isIncludeFiltered){var n=N(e,t);return t.isIncludeFiltered=!1,t.restOfLine=`string`,n}}function T(e,t){if(e.match(/^mixin\b/))return t.javaScriptLine=!0,n}function E(e,t){if(e.match(/^\+([-\w]+)/))return e.match(/^\( *[-\w]+ *=/,!1)||(t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0),`variable`;if(e.match(`+#{`,!1))return e.next(),t.mixinCallAfter=!0,p(e,t)}function D(e,t){if(t.mixinCallAfter)return t.mixinCallAfter=!1,e.match(/^\( *[-\w]+ *=/,!1)||(t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0),!0}function O(e,t){if(e.match(/^(if|unless|else if|else)\b/))return t.javaScriptLine=!0,n}function k(e,t){if(e.match(/^(- *)?(each|for)\b/))return t.isEach=!0,n}function A(e,t){if(t.isEach){if(e.match(/^ in\b/))return t.javaScriptLine=!0,t.isEach=!1,n;if(e.sol()||e.eol())t.isEach=!1;else if(e.next()){for(;!e.match(/^ in\b/,!1)&&e.next(););return`variable`}}}function j(e,t){if(e.match(/^while\b/))return t.javaScriptLine=!0,n}function M(e,t){var n;if(n=e.match(/^(\w(?:[-:\w]*\w)?)\/?/))return t.lastTag=n[1].toLowerCase(),t.lastTag===`script`&&(t.scriptType=`application/javascript`),`tag`}function N(n,r){if(n.match(/^:([\w\-]+)/)){var i;return t&&t.innerModes&&(i=t.innerModes(n.current().substring(1))),i||=n.current().substring(1),typeof i==`string`&&(i=e.getMode(t,i)),H(n,r,i),`atom`}}function ee(e,t){if(e.match(/^(!?=|-)/))return t.javaScriptLine=!0,`punctuation`}function P(e){if(e.match(/^#([\w-]+)/))return i}function te(e){if(e.match(/^\.([\w-]+)/))return a}function F(e,t){if(e.peek()==`(`)return e.next(),t.isAttrs=!0,t.attrsNest=[],t.inAttributeName=!0,t.attrValue=``,t.attributeIsType=!1,`punctuation`}function ne(t,n){if(n.isAttrs){if(o[t.peek()]&&n.attrsNest.push(o[t.peek()]),n.attrsNest[n.attrsNest.length-1]===t.peek())n.attrsNest.pop();else if(t.eat(`)`))return n.isAttrs=!1,`punctuation`;if(n.inAttributeName&&t.match(/^[^=,\)!]+/))return(t.peek()===`=`||t.peek()===`!`)&&(n.inAttributeName=!1,n.jsState=e.startState(s),n.lastTag===`script`&&t.current().trim().toLowerCase()===`type`?n.attributeIsType=!0:n.attributeIsType=!1),`attribute`;var r=s.token(t,n.jsState);if(n.attributeIsType&&r===`string`&&(n.scriptType=t.current().toString()),n.attrsNest.length===0&&(r===`string`||r===`variable`||r===`keyword`))try{return Function(``,`var x `+n.attrValue.replace(/,\s*$/,``).replace(/^!/,``)),n.inAttributeName=!0,n.attrValue=``,t.backUp(t.current().length),ne(t,n)}catch{}return n.attrValue+=t.current(),r||!0}}function I(e,t){if(e.match(/^&attributes\b/))return t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0,`keyword`}function L(e){if(e.sol()&&e.eatSpace())return`indent`}function R(e,t){if(e.match(/^ *\/\/(-)?([^\n]*)/))return t.indentOf=e.indentation(),t.indentToken=`comment`,`comment`}function z(e){if(e.match(/^: */))return`colon`}function B(e,t){if(e.match(/^(?:\| ?| )([^\n]+)/))return`string`;if(e.match(/^(<[^\n]*)/,!1))return H(e,t,`htmlmixed`),t.innerModeForLine=!0,ie(e,t,!0)}function re(e,t){if(e.eat(`.`)){var n=null;return t.lastTag===`script`&&t.scriptType.toLowerCase().indexOf(`javascript`)!=-1?n=t.scriptType.toLowerCase().replace(/"|'/g,``):t.lastTag===`style`&&(n=`css`),H(e,t,n),`dot`}}function V(e){return e.next(),null}function H(n,r,i){i=e.mimeModes[i]||i,i=t.innerModes&&t.innerModes(i)||i,i=e.mimeModes[i]||i,i=e.getMode(t,i),r.indentOf=n.indentation(),i&&i.name!==`null`?r.innerMode=i:r.indentToken=`string`}function ie(t,n,r){if(t.indentation()>n.indentOf||n.innerModeForLine&&!t.sol()||r)return n.innerMode?(n.innerState||=n.innerMode.startState?e.startState(n.innerMode,t.indentation()):{},t.hideFirstChars(n.indentOf+2,function(){return n.innerMode.token(t,n.innerState)||!0})):(t.skipToEnd(),n.indentToken);t.sol()&&(n.indentOf=1/0,n.indentToken=null,n.innerMode=null,n.innerState=null)}function U(e,t){if(e.sol()&&(t.restOfLine=``),t.restOfLine){e.skipToEnd();var n=t.restOfLine;return t.restOfLine=``,n}}function W(){return new c}function ae(e){return e.copy()}function G(e,t){var n=ie(e,t)||U(e,t)||m(e,t)||w(e,t)||A(e,t)||ne(e,t)||l(e,t)||u(e,t)||D(e,t)||d(e)||f(e)||p(e,t)||h(e,t)||g(e,t)||_(e)||v(e,t)||y(e,t)||b(e,t)||x(e,t)||S(e,t)||C(e,t)||T(e,t)||E(e,t)||O(e,t)||k(e,t)||j(e,t)||M(e,t)||N(e,t)||ee(e,t)||P(e)||te(e)||F(e,t)||I(e,t)||L(e)||B(e,t)||R(e,t)||z(e)||re(e,t)||V(e);return n===!0?null:n}return{startState:W,copyState:ae,token:G}},`javascript`,`css`,`htmlmixed`),e.defineMIME(`text/x-pug`,`pug`),e.defineMIME(`text/x-jade`,`pug`)})})),Dt=Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft(),_t()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../css/css`],n):n(CodeMirror)})(function(e){e.defineMode(`sass`,function(t){var n=e.mimeModes[`text/css`],r=n.propertyKeywords||{},i=n.colorKeywords||{},a=n.valueKeywords||{},o=n.fontProperties||{};function s(e){return RegExp(`^`+e.join(`|`))}var c=RegExp(`^`+[`true`,`false`,`null`,`auto`].join(`|`)),l=s([`\\(`,`\\)`,`=`,`>`,`<`,`==`,`>=`,`<=`,`\\+`,`-`,`\\!=`,`/`,`\\*`,`%`,`and`,`or`,`not`,`;`,`\\{`,`\\}`,`:`]),u=/^::?[a-zA-Z_][\w\-]*/,d;function f(e){return!e.peek()||e.match(/\s+$/,!1)}function p(e,t){var n=e.peek();return n===`)`?(e.next(),t.tokenizer=y,`operator`):n===`(`?(e.next(),e.eatSpace(),`operator`):n===`'`||n===`"`?(t.tokenizer=h(e.next()),`string`):(t.tokenizer=h(`)`,!1),`string`)}function m(e,t){return function(n,r){return n.sol()&&n.indentation()<=e?(r.tokenizer=y,y(n,r)):(t&&n.skipTo(`*/`)?(n.next(),n.next(),r.tokenizer=y):n.skipToEnd(),`comment`)}}function h(e,t){t??=!0;function n(r,i){var a=r.next(),o=r.peek(),s=r.string.charAt(r.pos-2);return a!==`\\`&&o===e||a===e&&s!==`\\`?(a!==e&&t&&r.next(),f(r)&&(i.cursorHalf=0),i.tokenizer=y,`string`):a===`#`&&o===`{`?(i.tokenizer=g(n),r.next(),`operator`):`string`}return n}function g(e){return function(t,n){return t.peek()===`}`?(t.next(),n.tokenizer=e,`operator`):y(t,n)}}function _(e){if(e.indentCount==0){e.indentCount++;var n=e.scopes[0].offset+t.indentUnit;e.scopes.unshift({offset:n})}}function v(e){e.scopes.length!=1&&e.scopes.shift()}function y(e,t){var n=e.peek();if(e.match(`/*`))return t.tokenizer=m(e.indentation(),!0),t.tokenizer(e,t);if(e.match(`//`))return t.tokenizer=m(e.indentation(),!1),t.tokenizer(e,t);if(e.match(`#{`))return t.tokenizer=g(y),`operator`;if(n===`"`||n===`'`)return e.next(),t.tokenizer=h(n),`string`;if(t.cursorHalf){if(n===`#`&&(e.next(),e.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/))||e.match(/^-?[0-9\.]+/))return f(e)&&(t.cursorHalf=0),`number`;if(e.match(/^(px|em|in)\b/))return f(e)&&(t.cursorHalf=0),`unit`;if(e.match(c))return f(e)&&(t.cursorHalf=0),`keyword`;if(e.match(/^url/)&&e.peek()===`(`)return t.tokenizer=p,f(e)&&(t.cursorHalf=0),`atom`;if(n===`$`)return e.next(),e.eatWhile(/[\w-]/),f(e)&&(t.cursorHalf=0),`variable-2`;if(n===`!`)return e.next(),t.cursorHalf=0,e.match(/^[\w]+/)?`keyword`:`operator`;if(e.match(l))return f(e)&&(t.cursorHalf=0),`operator`;if(e.eatWhile(/[\w-]/))return f(e)&&(t.cursorHalf=0),d=e.current().toLowerCase(),a.hasOwnProperty(d)?`atom`:i.hasOwnProperty(d)?`keyword`:r.hasOwnProperty(d)?(t.prevProp=e.current().toLowerCase(),`property`):`tag`;if(f(e))return t.cursorHalf=0,null}else{if(n===`-`&&e.match(/^-\w+-/))return`meta`;if(n===`.`){if(e.next(),e.match(/^[\w-]+/))return _(t),`qualifier`;if(e.peek()===`#`)return _(t),`tag`}if(n===`#`){if(e.next(),e.match(/^[\w-]+/))return _(t),`builtin`;if(e.peek()===`#`)return _(t),`tag`}if(n===`$`)return e.next(),e.eatWhile(/[\w-]/),`variable-2`;if(e.match(/^-?[0-9\.]+/))return`number`;if(e.match(/^(px|em|in)\b/))return`unit`;if(e.match(c))return`keyword`;if(e.match(/^url/)&&e.peek()===`(`)return t.tokenizer=p,`atom`;if(n===`=`&&e.match(/^=[\w-]+/))return _(t),`meta`;if(n===`+`&&e.match(/^\+[\w-]+/))return`variable-3`;if(n===`@`&&e.match(`@extend`)&&(e.match(/\s*[\w]/)||v(t)),e.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return _(t),`def`;if(n===`@`)return e.next(),e.eatWhile(/[\w-]/),`def`;if(e.eatWhile(/[\w-]/))if(e.match(/ *: *[\w-\+\$#!\("']/,!1)){d=e.current().toLowerCase();var s=t.prevProp+`-`+d;return r.hasOwnProperty(s)?`property`:r.hasOwnProperty(d)?(t.prevProp=d,`property`):o.hasOwnProperty(d)?`property`:`tag`}else if(e.match(/ *:/,!1))return _(t),t.cursorHalf=1,t.prevProp=e.current().toLowerCase(),`property`;else if(e.match(/ *,/,!1))return`tag`;else return _(t),`tag`;if(n===`:`)return e.match(u)?`variable-3`:(e.next(),t.cursorHalf=1,`operator`)}return e.match(l)?`operator`:(e.next(),null)}function b(e,n){e.sol()&&(n.indentCount=0);var r=n.tokenizer(e,n),i=e.current();if((i===`@return`||i===`}`)&&v(n),r!==null){for(var a=e.pos-i.length+t.indentUnit*n.indentCount,o=[],s=0;s<n.scopes.length;s++){var c=n.scopes[s];c.offset<=a&&o.push(c)}n.scopes=o}return r}return{startState:function(){return{tokenizer:y,scopes:[{offset:0,type:`sass`}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(e,t){var n=b(e,t);return t.lastToken={style:n,content:e.current()},n},indent:function(e){return e.scopes[0].offset},blockCommentStart:`/*`,blockCommentEnd:`*/`,lineComment:`//`,fold:`indent`}},`css`),e.defineMIME(`text/x-sass`,`sass`)})})),Ot=Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){e.overlayMode=function(t,n,r){return{startState:function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(r){return{base:e.copyState(t,r.base),overlay:e.copyState(n,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.overlayPos,overlayCur:null}},token:function(e,i){return(e!=i.streamSeen||Math.min(i.basePos,i.overlayPos)<e.start)&&(i.streamSeen=e,i.basePos=i.overlayPos=e.start),e.start==i.basePos&&(i.baseCur=t.token(e,i.base),i.basePos=e.pos),e.start==i.overlayPos&&(e.pos=e.start,i.overlayCur=n.token(e,i.overlay),i.overlayPos=e.pos),e.pos=Math.min(i.basePos,i.overlayPos),i.overlayCur==null?i.baseCur:i.baseCur!=null&&i.overlay.combineTokens||r&&i.overlay.combineTokens==null?i.baseCur+` `+i.overlayCur:i.overlayCur},indent:t.indent&&function(e,n,r){return t.indent(e.base,n,r)},electricChars:t.electricChars,innerMode:function(e){return{state:e.base,mode:t}},blankLine:function(e){var i,a;return t.blankLine&&(i=t.blankLine(e.base)),n.blankLine&&(a=n.blankLine(e.overlay)),a==null?i:r&&i!=null?i+` `+a:a}}}})})),kt=Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){e.defineMode(`coffeescript`,function(e,t){var n=`error`;function r(e){return RegExp(`^((`+e.join(`)|(`)+`))\\b`)}var i=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,a=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,o=/^[_A-Za-z$][_A-Za-z$0-9]*/,s=/^@[_A-Za-z$][_A-Za-z$0-9]*/,c=r([`and`,`or`,`not`,`is`,`isnt`,`in`,`instanceof`,`typeof`]),l=[`for`,`while`,`loop`,`if`,`unless`,`else`,`switch`,`try`,`catch`,`finally`,`class`],u=r(l.concat([`break`,`by`,`continue`,`debugger`,`delete`,`do`,`in`,`of`,`new`,`return`,`then`,`this`,`@`,`throw`,`when`,`until`,`extends`]));l=r(l);var d=/^('{3}|\"{3}|['\"])/,f=/^(\/{3}|\/)/,p=r([`Infinity`,`NaN`,`undefined`,`null`,`true`,`false`,`on`,`off`,`yes`,`no`]);function m(e,t){if(e.sol()){t.scope.align===null&&(t.scope.align=!1);var r=t.scope.offset;if(e.eatSpace()){var l=e.indentation();return l>r&&t.scope.type==`coffee`?`indent`:l<r?`dedent`:null}else r>0&&v(e,t)}if(e.eatSpace())return null;var m=e.peek();if(e.match(`####`))return e.skipToEnd(),`comment`;if(e.match(`###`))return t.tokenize=g,t.tokenize(e,t);if(m===`#`)return e.skipToEnd(),`comment`;if(e.match(/^-?[0-9\.]/,!1)){var _=!1;if(e.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(_=!0),e.match(/^-?\d+\.\d*/)&&(_=!0),e.match(/^-?\.\d+/)&&(_=!0),_)return e.peek()==`.`&&e.backUp(1),`number`;var y=!1;if(e.match(/^-?0x[0-9a-f]+/i)&&(y=!0),e.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(y=!0),e.match(/^-?0(?![\dx])/i)&&(y=!0),y)return`number`}if(e.match(d))return t.tokenize=h(e.current(),!1,`string`),t.tokenize(e,t);if(e.match(f)){if(e.current()!=`/`||e.match(/^.*\//,!1))return t.tokenize=h(e.current(),!0,`string-2`),t.tokenize(e,t);e.backUp(1)}return e.match(i)||e.match(c)?`operator`:e.match(a)?`punctuation`:e.match(p)?`atom`:e.match(s)||t.prop&&e.match(o)?`property`:e.match(u)?`keyword`:e.match(o)?`variable`:(e.next(),n)}function h(e,r,i){return function(a,o){for(;!a.eol();)if(a.eatWhile(/[^'"\/\\]/),a.eat(`\\`)){if(a.next(),r&&a.eol())return i}else if(a.match(e))return o.tokenize=m,i;else a.eat(/['"\/]/);return r&&(t.singleLineStringErrors?i=n:o.tokenize=m),i}}function g(e,t){for(;!e.eol();){if(e.eatWhile(/[^#]/),e.match(`###`)){t.tokenize=m;break}e.eatWhile(`#`)}return`comment`}function _(t,n,r){r||=`coffee`;for(var i=0,a=!1,o=null,s=n.scope;s;s=s.prev)if(s.type===`coffee`||s.type==`}`){i=s.offset+e.indentUnit;break}r===`coffee`?n.scope.align&&(n.scope.align=!1):(a=null,o=t.column()+t.current().length),n.scope={offset:i,type:r,prev:n.scope,align:a,alignOffset:o}}function v(e,t){if(t.scope.prev)if(t.scope.type===`coffee`){for(var n=e.indentation(),r=!1,i=t.scope;i;i=i.prev)if(n===i.offset){r=!0;break}if(!r)return!0;for(;t.scope.prev&&t.scope.offset!==n;)t.scope=t.scope.prev;return!1}else return t.scope=t.scope.prev,!1}function y(e,t){var r=t.tokenize(e,t),i=e.current();i===`return`&&(t.dedent=!0),((i===`->`||i===`=>`)&&e.eol()||r===`indent`)&&_(e,t);var a=`[({`.indexOf(i);if(a!==-1&&_(e,t,`])}`.slice(a,a+1)),l.exec(i)&&_(e,t),i==`then`&&v(e,t),r===`dedent`&&v(e,t))return n;if(a=`])}`.indexOf(i),a!==-1){for(;t.scope.type==`coffee`&&t.scope.prev;)t.scope=t.scope.prev;t.scope.type==i&&(t.scope=t.scope.prev)}return t.dedent&&e.eol()&&(t.scope.type==`coffee`&&t.scope.prev&&(t.scope=t.scope.prev),t.dedent=!1),r}return{startState:function(e){return{tokenize:m,scope:{offset:e||0,type:`coffee`,prev:null,align:!1},prop:!1,dedent:0}},token:function(e,t){var n=t.scope.align===null&&t.scope;n&&e.sol()&&(n.align=!1);var r=y(e,t);return r&&r!=`comment`&&(n&&(n.align=!0),t.prop=r==`punctuation`&&e.current()==`.`),r},indent:function(e,t){if(e.tokenize!=m)return 0;var n=e.scope,r=t&&`])}`.indexOf(t.charAt(0))>-1;if(r)for(;n.type==`coffee`&&n.prev;)n=n.prev;var i=r&&n.type===t.charAt(0);return n.align?n.alignOffset-(i?1:0):(i?n.prev:n).offset},lineComment:`#`,fold:`indent`}}),e.defineMIME(`application/vnd.coffeescript`,`coffeescript`),e.defineMIME(`text/x-coffeescript`,`coffeescript`),e.defineMIME(`text/coffeescript`,`coffeescript`)})})),At=Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){e.defineMode(`stylus`,function(e){for(var p=e.indentUnit,_=``,v=h(t),y=/^(a|b|i|s|col|em)$/i,b=h(a),x=h(o),S=h(l),C=h(c),w=h(n),T=m(n),E=h(i),D=h(r),O=h(s),k=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,A=m(u),j=h(d),M=new RegExp(/^\-(moz|ms|o|webkit)-/i),N=h(f),ee=``,P={},te,F,ne,I;_.length<p;)_+=` `;function L(e,t){if(ee=e.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),t.context.line.firstWord=ee?ee[0].replace(/^\s*/,``):``,t.context.line.indent=e.indentation(),te=e.peek(),e.match(`//`))return e.skipToEnd(),[`comment`,`comment`];if(e.match(`/*`))return t.tokenize=R,R(e,t);if(te==`"`||te==`'`)return e.next(),t.tokenize=z(te),t.tokenize(e,t);if(te==`@`)return e.next(),e.eatWhile(/[\w\\-]/),[`def`,e.current()];if(te==`#`){if(e.next(),e.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b(?!-)/i))return[`atom`,`atom`];if(e.match(/^[a-z][\w-]*/i))return[`builtin`,`hash`]}return e.match(M)?[`meta`,`vendor-prefixes`]:e.match(/^-?[0-9]?\.?[0-9]/)?(e.eatWhile(/[a-z%]/i),[`number`,`unit`]):te==`!`?(e.next(),[e.match(/^(important|optional)/i)?`keyword`:`operator`,`important`]):te==`.`&&e.match(/^\.[a-z][\w-]*/i)?[`qualifier`,`qualifier`]:e.match(T)?(e.peek()==`(`&&(t.tokenize=B),[`property`,`word`]):e.match(/^[a-z][\w-]*\(/i)?(e.backUp(1),[`keyword`,`mixin`]):e.match(/^(\+|-)[a-z][\w-]*\(/i)?(e.backUp(1),[`keyword`,`block-mixin`]):e.string.match(/^\s*&/)&&e.match(/^[-_]+[a-z][\w-]*/)?[`qualifier`,`qualifier`]:e.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?(e.backUp(1),[`variable-3`,`reference`]):e.match(/^&{1}\s*$/)?[`variable-3`,`reference`]:e.match(A)?[`operator`,`operator`]:e.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?e.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!W(e.current())?(e.match(`.`),[`variable-2`,`variable-name`]):[`variable-2`,`word`]:e.match(k)?[`operator`,e.current()]:/[:;,{}\[\]\(\)]/.test(te)?(e.next(),[null,te]):(e.next(),[null,null])}function R(e,t){for(var n=!1,r;(r=e.next())!=null;){if(n&&r==`/`){t.tokenize=null;break}n=r==`*`}return[`comment`,`comment`]}function z(e){return function(t,n){for(var r=!1,i;(i=t.next())!=null;){if(i==e&&!r){e==`)`&&t.backUp(1);break}r=!r&&i==`\\`}return(i==e||!r&&e!=`)`)&&(n.tokenize=null),[`string`,`string`]}}function B(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=z(`)`),[null,`(`]}function re(e,t,n,r){this.type=e,this.indent=t,this.prev=n,this.line=r||{firstWord:``,indent:0}}function V(e,t,n,r){return r=r>=0?r:p,e.context=new re(n,t.indentation()+r,e.context),n}function H(e,t){var n=e.context.indent-p;return t||=!1,e.context=e.context.prev,t&&(e.context.indent=n),e.context.type}function ie(e,t,n){return P[n.context.type](e,t,n)}function U(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return ie(e,t,n)}function W(e){return e.toLowerCase()in v}function ae(e){return e=e.toLowerCase(),e in b||e in O}function G(e){return e.toLowerCase()in j}function oe(e){return e.toLowerCase().match(M)}function se(e){var t=e.toLowerCase(),n=`variable-2`;return W(e)?n=`tag`:G(e)?n=`block-keyword`:ae(e)?n=`property`:t in S||t in N?n=`atom`:t==`return`||t in C?n=`keyword`:e.match(/^[A-Z]/)&&(n=`string`),n}function K(e,t){return de(t)&&(e==`{`||e==`]`||e==`hash`||e==`qualifier`)||e==`block-mixin`}function ce(e,t){return e==`{`&&t.match(/^\s*\$?[\w-]+/i,!1)}function le(e,t){return e==`:`&&t.match(/^[a-z-]+/,!1)}function ue(e){return e.sol()||e.string.match(RegExp(`^\\s*`+g(e.current())))}function de(e){return e.eol()||e.match(/^\s*$/,!1)}function fe(e){var t=/^\s*[-_]*[a-z0-9]+[\w-]*/i,n=typeof e==`string`?e.match(t):e.string.match(t);return n?n[0].replace(/^\s*/,``):``}return P.block=function(e,t,n){if(e==`comment`&&ue(t)||e==`,`&&de(t)||e==`mixin`)return V(n,t,`block`,0);if(ce(e,t))return V(n,t,`interpolation`);if(de(t)&&e==`]`&&!/^\s*(\.|#|:|\[|\*|&)/.test(t.string)&&!W(fe(t)))return V(n,t,`block`,0);if(K(e,t))return V(n,t,`block`);if(e==`}`&&de(t))return V(n,t,`block`,0);if(e==`variable-name`)return t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||G(fe(t))?V(n,t,`variableName`):V(n,t,`variableName`,0);if(e==`=`)return!de(t)&&!G(fe(t))?V(n,t,`block`,0):V(n,t,`block`);if(e==`*`&&(de(t)||t.match(/\s*(,|\.|#|\[|:|{)/,!1)))return I=`tag`,V(n,t,`block`);if(le(e,t))return V(n,t,`pseudo`);if(/@(font-face|media|supports|(-moz-)?document)/.test(e))return V(n,t,de(t)?`block`:`atBlock`);if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return V(n,t,`keyframes`);if(/@extends?/.test(e))return V(n,t,`extend`,0);if(e&&e.charAt(0)==`@`)return t.indentation()>0&&ae(t.current().slice(1))?(I=`variable-2`,`block`):/(@import|@require|@charset)/.test(e)?V(n,t,`block`,0):V(n,t,`block`);if(e==`reference`&&de(t))return V(n,t,`block`);if(e==`(`)return V(n,t,`parens`);if(e==`vendor-prefixes`)return V(n,t,`vendorPrefixes`);if(e==`word`){var r=t.current();if(I=se(r),I==`property`)return ue(t)?V(n,t,`block`,0):(I=`atom`,`block`);if(I==`tag`){if(/embed|menu|pre|progress|sub|table/.test(r)&&ae(fe(t))||t.string.match(RegExp(`\\[\\s*`+r+`|`+r+`\\s*\\]`)))return I=`atom`,`block`;if(y.test(r)&&(ue(t)&&t.string.match(/=/)||!ue(t)&&!t.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!W(fe(t))))return I=`variable-2`,G(fe(t))?`block`:V(n,t,`block`,0);if(de(t))return V(n,t,`block`)}if(I==`block-keyword`)return I=`keyword`,t.current(/(if|unless)/)&&!ue(t)?`block`:V(n,t,`block`);if(r==`return`)return V(n,t,`block`,0);if(I==`variable-2`&&t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return V(n,t,`block`)}return n.context.type},P.parens=function(e,t,n){if(e==`(`)return V(n,t,`parens`);if(e==`)`)return n.context.prev.type==`parens`?H(n):t.string.match(/^[a-z][\w-]*\(/i)&&de(t)||G(fe(t))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(fe(t))||!t.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&W(fe(t))?V(n,t,`block`):t.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/)||t.string.match(/^\s*(\(|\)|[0-9])/)||t.string.match(/^\s+[a-z][\w-]*\(/i)||t.string.match(/^\s+[\$-]?[a-z]/i)?V(n,t,`block`,0):de(t)?V(n,t,`block`):V(n,t,`block`,0);if(e&&e.charAt(0)==`@`&&ae(t.current().slice(1))&&(I=`variable-2`),e==`word`){var r=t.current();I=se(r),I==`tag`&&y.test(r)&&(I=`variable-2`),(I==`property`||r==`to`)&&(I=`atom`)}return e==`variable-name`?V(n,t,`variableName`):le(e,t)?V(n,t,`pseudo`):n.context.type},P.vendorPrefixes=function(e,t,n){return e==`word`?(I=`property`,V(n,t,`block`,0)):H(n)},P.pseudo=function(e,t,n){return ae(fe(t.string))?U(e,t,n):(t.match(/^[a-z-]+/),I=`variable-3`,de(t)?V(n,t,`block`):H(n))},P.atBlock=function(e,t,n){if(e==`(`)return V(n,t,`atBlock_parens`);if(K(e,t))return V(n,t,`block`);if(ce(e,t))return V(n,t,`interpolation`);if(e==`word`){var r=t.current().toLowerCase();if(I=/^(only|not|and|or)$/.test(r)?`keyword`:w.hasOwnProperty(r)?`tag`:D.hasOwnProperty(r)?`attribute`:E.hasOwnProperty(r)?`property`:x.hasOwnProperty(r)?`string-2`:se(t.current()),I==`tag`&&de(t))return V(n,t,`block`)}return e==`operator`&&/^(not|and|or)$/.test(t.current())&&(I=`keyword`),n.context.type},P.atBlock_parens=function(e,t,n){if(e==`{`||e==`}`)return n.context.type;if(e==`)`)return de(t)?V(n,t,`block`):V(n,t,`atBlock`);if(e==`word`){var r=t.current().toLowerCase();return I=se(r),/^(max|min)/.test(r)&&(I=`property`),I==`tag`&&(I=y.test(r)?`variable-2`:`atom`),n.context.type}return P.atBlock(e,t,n)},P.keyframes=function(e,t,n){return t.indentation()==`0`&&(e==`}`&&ue(t)||e==`]`||e==`hash`||e==`qualifier`||W(t.current()))?U(e,t,n):e==`{`?V(n,t,`keyframes`):e==`}`?ue(t)?H(n,!0):V(n,t,`keyframes`):e==`unit`&&/^[0-9]+\%$/.test(t.current())?V(n,t,`keyframes`):e==`word`&&(I=se(t.current()),I==`block-keyword`)?(I=`keyword`,V(n,t,`keyframes`)):/@(font-face|media|supports|(-moz-)?document)/.test(e)?V(n,t,de(t)?`block`:`atBlock`):e==`mixin`?V(n,t,`block`,0):n.context.type},P.interpolation=function(e,t,n){return e==`{`&&H(n)&&V(n,t,`block`),e==`}`?t.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||t.string.match(/^\s*[a-z]/i)&&W(fe(t))?V(n,t,`block`):!t.string.match(/^(\{|\s*\&)/)||t.match(/\s*[\w-]/,!1)?V(n,t,`block`,0):V(n,t,`block`):e==`variable-name`?V(n,t,`variableName`,0):(e==`word`&&(I=se(t.current()),I==`tag`&&(I=`atom`)),n.context.type)},P.extend=function(e,t,n){return e==`[`||e==`=`?`extend`:e==`]`?H(n):e==`word`?(I=se(t.current()),`extend`):H(n)},P.variableName=function(e,t,n){return e==`string`||e==`[`||e==`]`||t.current().match(/^(\.|\$)/)?(t.current().match(/^\.[\w-]+/i)&&(I=`variable-2`),`variableName`):U(e,t,n)},{startState:function(e){return{tokenize:null,state:`block`,context:new re(`block`,e||0,null)}},token:function(e,t){return!t.tokenize&&e.eatSpace()?null:(F=(t.tokenize||L)(e,t),F&&typeof F==`object`&&(ne=F[1],F=F[0]),I=F,t.state=P[t.state](ne,e,t),I)},indent:function(e,t,n){var r=e.context,i=t&&t.charAt(0),a=r.indent,o=fe(t),s=n.match(/^\s*/)[0].replace(/\t/g,_).length,c=e.context.prev?e.context.prev.line.firstWord:``,l=e.context.prev?e.context.prev.line.indent:s;return r.prev&&(i==`}`&&(r.type==`block`||r.type==`atBlock`||r.type==`keyframes`)||i==`)`&&(r.type==`parens`||r.type==`atBlock_parens`)||i==`{`&&r.type==`at`)?a=r.indent-p:/(\})/.test(i)||(/@|\$|\d/.test(i)||/^\{/.test(t)||/^\s*\/(\/|\*)/.test(t)||/^\s*\/\*/.test(c)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(t)||/^(\+|-)?[a-z][\w-]*\(/i.test(t)||/^return/.test(t)||G(o)?a=s:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(i)||W(o)?a=/\,\s*$/.test(c)?l:/^\s+/.test(n)&&(/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(c)||W(c))?s<=l?l:l+p:s:!/,\s*$/.test(n)&&(oe(o)||ae(o))&&(a=G(c)?s<=l?l:l+p:/^\{/.test(c)?s<=l?s:l+p:oe(c)||ae(c)?s>=l?l:s:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(c)||/=\s*$/.test(c)||W(c)||/^\$[\w-\.\[\]\'\"]/.test(c)?l+p:s)),a},electricChars:`}`,blockCommentStart:`/*`,blockCommentEnd:`*/`,blockCommentContinue:` * `,lineComment:`//`,fold:`indent`}});var t=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.bgsound.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.marquee.menu.menuitem.meta.meter.nav.nobr.noframes.noscript.object.ol.optgroup.option.output.p.param.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.track.u.ul.var.video`.split(`.`),n=[`domain`,`regexp`,`url-prefix`,`url`],r=[`all`,`aural`,`braille`,`handheld`,`print`,`projection`,`screen`,`tty`,`tv`,`embossed`],i=`width.min-width.max-width.height.min-height.max-height.device-width.min-device-width.max-device-width.device-height.min-device-height.max-device-height.aspect-ratio.min-aspect-ratio.max-aspect-ratio.device-aspect-ratio.min-device-aspect-ratio.max-device-aspect-ratio.color.min-color.max-color.color-index.min-color-index.max-color-index.monochrome.min-monochrome.max-monochrome.resolution.min-resolution.max-resolution.scan.grid.dynamic-range.video-dynamic-range`.split(`.`),a=`align-content.align-items.align-self.alignment-adjust.alignment-baseline.anchor-point.animation.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-timing-function.appearance.azimuth.backface-visibility.background.background-attachment.background-clip.background-color.background-image.background-origin.background-position.background-repeat.background-size.baseline-shift.binding.bleed.bookmark-label.bookmark-level.bookmark-state.bookmark-target.border.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-decoration-break.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.clear.clip.color.color-profile.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.content.counter-increment.counter-reset.crop.cue.cue-after.cue-before.cursor.direction.display.dominant-baseline.drop-initial-after-adjust.drop-initial-after-align.drop-initial-before-adjust.drop-initial-before-align.drop-initial-size.drop-initial-value.elevation.empty-cells.fit.fit-position.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.float-offset.flow-from.flow-into.font.font-feature-settings.font-family.font-kerning.font-language-override.font-size.font-size-adjust.font-stretch.font-style.font-synthesis.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-ligatures.font-variant-numeric.font-variant-position.font-weight.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-position.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphens.icon.image-orientation.image-rendering.image-resolution.inline-box-align.justify-content.left.letter-spacing.line-break.line-height.line-stacking.line-stacking-ruby.line-stacking-shift.line-stacking-strategy.list-style.list-style-image.list-style-position.list-style-type.margin.margin-bottom.margin-left.margin-right.margin-top.marker-offset.marks.marquee-direction.marquee-loop.marquee-play-count.marquee-speed.marquee-style.max-height.max-width.min-height.min-width.move-to.nav-down.nav-index.nav-left.nav-right.nav-up.object-fit.object-position.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-style.overflow-wrap.overflow-x.overflow-y.padding.padding-bottom.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.page-policy.pause.pause-after.pause-before.perspective.perspective-origin.pitch.pitch-range.play-during.position.presentation-level.punctuation-trim.quotes.region-break-after.region-break-before.region-break-inside.region-fragment.rendering-intent.resize.rest.rest-after.rest-before.richness.right.rotation.rotation-point.ruby-align.ruby-overhang.ruby-position.ruby-span.shape-image-threshold.shape-inside.shape-margin.shape-outside.size.speak.speak-as.speak-header.speak-numeral.speak-punctuation.speech-rate.stress.string-set.tab-size.table-layout.target.target-name.target-new.target-position.text-align.text-align-last.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-style.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-height.text-indent.text-justify.text-outline.text-overflow.text-shadow.text-size-adjust.text-space-collapse.text-transform.text-underline-position.text-wrap.top.transform.transform-origin.transform-style.transition.transition-delay.transition-duration.transition-property.transition-timing-function.unicode-bidi.vertical-align.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.volume.white-space.widows.width.will-change.word-break.word-spacing.word-wrap.z-index.clip-path.clip-rule.mask.enable-background.filter.flood-color.flood-opacity.lighting-color.stop-color.stop-opacity.pointer-events.color-interpolation.color-interpolation-filters.color-rendering.fill.fill-opacity.fill-rule.image-rendering.marker.marker-end.marker-mid.marker-start.shape-rendering.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.text-rendering.baseline-shift.dominant-baseline.glyph-orientation-horizontal.glyph-orientation-vertical.text-anchor.writing-mode.font-smoothing.osx-font-smoothing`.split(`.`),o=[`scrollbar-arrow-color`,`scrollbar-base-color`,`scrollbar-dark-shadow-color`,`scrollbar-face-color`,`scrollbar-highlight-color`,`scrollbar-shadow-color`,`scrollbar-3d-light-color`,`scrollbar-track-color`,`shape-inside`,`searchfield-cancel-button`,`searchfield-decoration`,`searchfield-results-button`,`searchfield-results-decoration`,`zoom`],s=[`font-family`,`src`,`unicode-range`,`font-variant`,`font-feature-settings`,`font-stretch`,`font-weight`,`font-style`],c=`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`.split(`.`),l=`above.absolute.activeborder.additive.activecaption.afar.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.amharic.amharic-abegede.antialiased.appworkspace.arabic-indic.armenian.asterisks.attr.auto.avoid.avoid-column.avoid-page.avoid-region.background.backwards.baseline.below.bidi-override.binary.bengali.blink.block.block-axis.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.bullets.button.buttonface.buttonhighlight.buttonshadow.buttontext.calc.cambodian.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.cjk-earthly-branch.cjk-heavenly-stem.cjk-ideographic.clear.clip.close-quote.col-resize.collapse.column.compact.condensed.conic-gradient.contain.content.contents.content-box.context-menu.continuous.copy.counter.counters.cover.crop.cross.crosshair.currentcolor.cursive.cyclic.dashed.decimal.decimal-leading-zero.default.default-button.destination-atop.destination-in.destination-out.destination-over.devanagari.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.ethiopic-abegede.ethiopic-abegede-am-et.ethiopic-abegede-gez.ethiopic-abegede-ti-er.ethiopic-abegede-ti-et.ethiopic-halehame-aa-er.ethiopic-halehame-aa-et.ethiopic-halehame-am-et.ethiopic-halehame-gez.ethiopic-halehame-om-et.ethiopic-halehame-sid-et.ethiopic-halehame-so-et.ethiopic-halehame-ti-er.ethiopic-halehame-ti-et.ethiopic-halehame-tig.ethiopic-numeric.ew-resize.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fixed.flat.flex.footnotes.forwards.from.geometricPrecision.georgian.graytext.groove.gujarati.gurmukhi.hand.hangul.hangul-consonant.hebrew.help.hidden.hide.high.higher.highlight.highlighttext.hiragana.hiragana-iroha.horizontal.hsl.hsla.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-table.inset.inside.intrinsic.invert.italic.japanese-formal.japanese-informal.justify.kannada.katakana.katakana-iroha.keep-all.khmer.korean-hangul-formal.korean-hanja-formal.korean-hanja-informal.landscape.lao.large.larger.left.level.lighter.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-alpha.lower-armenian.lower-greek.lower-hexadecimal.lower-latin.lower-norwegian.lower-roman.lowercase.ltr.malayalam.match.matrix.matrix3d.media-play-button.media-slider.media-sliderthumb.media-volume-slider.media-volume-sliderthumb.medium.menu.menulist.menulist-button.menutext.message-box.middle.min-intrinsic.mix.mongolian.monospace.move.multiple.myanmar.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.octal.open-quote.optimizeLegibility.optimizeSpeed.oriya.oromo.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.persian.perspective.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.repeating-conic-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row-resize.rtl.run-in.running.s-resize.sans-serif.scale.scale3d.scaleX.scaleY.scaleZ.scroll.scrollbar.scroll-position.se-resize.searchfield.searchfield-cancel-button.searchfield-decoration.searchfield-results-button.searchfield-results-decoration.semi-condensed.semi-expanded.separate.serif.show.sidama.simp-chinese-formal.simp-chinese-informal.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.solid.somali.source-atop.source-in.source-out.source-over.space.spell-out.square.square-button.standard.start.static.status-bar.stretch.stroke.sub.subpixel-antialiased.super.sw-resize.symbolic.symbols.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.tamil.telugu.text.text-bottom.text-top.textarea.textfield.thai.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.tibetan.tigre.tigrinya-er.tigrinya-er-abegede.tigrinya-et.tigrinya-et-abegede.to.top.trad-chinese-formal.trad-chinese-informal.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.up.upper-alpha.upper-armenian.upper-greek.upper-hexadecimal.upper-latin.upper-norwegian.upper-roman.uppercase.urdu.url.var.vertical.vertical-text.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.x-large.x-small.xor.xx-large.xx-small.bicubic.optimizespeed.grayscale.row.row-reverse.wrap.wrap-reverse.column-reverse.flex-start.flex-end.space-between.space-around.unset`.split(`.`),u=[`in`,`and`,`or`,`not`,`is not`,`is a`,`is`,`isnt`,`defined`,`if unless`],d=[`for`,`if`,`else`,`unless`,`from`,`to`],f=[`null`,`true`,`false`,`href`,`title`,`type`,`not-allowed`,`readonly`,`disabled`],p=t.concat(n,r,i,a,o,c,l,s,u,d,f,[`@font-face`,`@keyframes`,`@media`,`@viewport`,`@page`,`@host`,`@supports`,`@block`,`@css`]);function m(e){return e=e.sort(function(e,t){return t>e}),RegExp(`^((`+e.join(`)|(`)+`))\\b`)}function h(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}function g(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`)}e.registerHelper(`hintWords`,`stylus`,p),e.defineMIME(`text/x-styl`,`stylus`)})})),jt=Ze(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(ft(),Ot(),xt(),St(),kt(),_t(),Dt(),At(),Et(),bt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../../addon/mode/overlay`,`../xml/xml`,`../javascript/javascript`,`../coffeescript/coffeescript`,`../css/css`,`../sass/sass`,`../stylus/stylus`,`../pug/pug`,`../handlebars/handlebars`],n):n(CodeMirror)})(function(e){var t={script:[[`lang`,/coffee(script)?/,`coffeescript`],[`type`,/^(?:text|application)\/(?:x-)?coffee(?:script)?$/,`coffeescript`],[`lang`,/^babel$/,`javascript`],[`type`,/^text\/babel$/,`javascript`],[`type`,/^text\/ecmascript-\d+$/,`javascript`]],style:[[`lang`,/^stylus$/i,`stylus`],[`lang`,/^sass$/i,`sass`],[`lang`,/^less$/i,`text/x-less`],[`lang`,/^scss$/i,`text/x-scss`],[`type`,/^(text\/)?(x-)?styl(us)?$/i,`stylus`],[`type`,/^text\/sass/i,`sass`],[`type`,/^(text\/)?(x-)?scss$/i,`text/x-scss`],[`type`,/^(text\/)?(x-)?less$/i,`text/x-less`]],template:[[`lang`,/^vue-template$/i,`vue`],[`lang`,/^pug$/i,`pug`],[`lang`,/^handlebars$/i,`handlebars`],[`type`,/^(text\/)?(x-)?pug$/i,`pug`],[`type`,/^text\/x-handlebars-template$/i,`handlebars`],[null,null,`vue-template`]]};e.defineMode(`vue-template`,function(t,n){return e.overlayMode(e.getMode(t,n.backdrop||`text/html`),{token:function(e){if(e.match(/^\{\{.*?\}\}/))return`meta mustache`;for(;e.next()&&!e.match(`{{`,!1););return null}})}),e.defineMode(`vue`,function(n){return e.getMode(n,{name:`htmlmixed`,tags:t})},`htmlmixed`,`xml`,`javascript`,`coffeescript`,`css`,`sass`,`stylus`,`pug`,`handlebars`),e.defineMIME(`script/x-vue`,`vue`),e.defineMIME(`text/x-vue`,`vue`)})}));_t(),bt(),Ct(),St(),Tt(),Et(),Dt(),jt(),xt();function Mt(e,t,n={}){let r=(0,mt.default)(e.value,{theme:`vars`,value:t.value,...n}),i=!1;return r.on(`change`,()=>{if(i){i=!1;return}t.value=r.getValue()}),p(t,e=>{if(e!==r.getValue()){i=!0;let t=r.listSelections();r.replaceRange(e,r.posFromIndex(0),r.posFromIndex(1/0)),r.setSelections(t),r.scrollTo(0,0)}},{immediate:!0}),r}function Nt(e,t){let n=e.getScrollInfo(),r=t.getScrollInfo(),i=(r.width-r.clientWidth)/(n.width-n.clientWidth)*n.left,a=(r.height-r.clientHeight)/(n.height-n.clientHeight)*n.top;i=Number.isNaN(i)?0:i,a=Number.isNaN(a)?0:a,t.scrollTo(i,a)}function Pt(e,t){let n=1;e.getWrapperElement().addEventListener(`mouseenter`,()=>{n=1}),t.getWrapperElement().addEventListener(`mouseenter`,()=>{n=2}),e.on(`scroll`,e=>{n===1&&Nt(e,t)}),e.on(`scrollCursorIntoView`,e=>Nt(e,t)),t.on(`scroll`,t=>{n===2&&Nt(t,e)}),t.on(`scrollCursorIntoView`,t=>Nt(t,e))}function Ft(e){return e.trimStart().startsWith(`<`)?`htmlmixed`:e.match(/^import\s/)?`javascript`:e.match(/^[.#].+\{/)?`css`:`javascript`}var It=F({__name:`Viewer`,props:{code:{}},setup(e){let{code:t}=f(e),r,i=l(`codeEl`);return n(()=>{r=Mt(i,t,{mode:`javascript`,readOnly:!0,lineNumbers:!0}),fe(()=>{r.setOption(`lineWrapping`,Y.value.codeviewerLineWrap)})}),(e,t)=>(h(),G(`div`,{ref_key:`codeEl`,ref:i},null,512))}}),Lt=Object.assign(It,{__name:`CodeViewer`}),Rt={flex:``,px2:``},zt={"overflow-hidden":``,"text-ellipsis":``},Bt={"overflow-hidden":``,"text-ellipsis":``},Vt=[`d`],Ht=20,Ut=F({__name:`AssetRelationships`,props:{importers:{},imports:{}},setup(e){let t=e,r={width:400,height:35,padding:4,marginX:8,border:1,margin:8,dot:16,dotOffset:80},i=l(`container`),a=y([]),o=R(()=>Math.min(Math.max(t.importers?.length||0,t.imports?.length||0),Ht)),s=R(()=>Math.min(t.importers?.length||0,Ht)),c=R(()=>Math.min(t.imports?.length||0,Ht)),u=R(()=>r.height*o.value+r.padding*(o.value+1)+r.border*2),d=R(()=>{let e=Math.max(0,c.value-s.value)*(r.height+r.padding)/2;return Math.min(e,u.value/2)}),f=R(()=>{let e=Math.max(0,s.value-c.value)*(r.height+r.padding)/2;return Math.min(e,u.value/2)}),m=R(()=>`${u.value/2-r.dot/2}px ${r.dotOffset}px 0 ${t.importers?.length?r.dotOffset:0}px`),_=R(()=>t.importers?.length?r.width+r.marginX:r.marginX),v=R(()=>t.importers?.length?_.value+r.dotOffset:_.value),b=R(()=>(r.height*o.value+(o.value+1)*r.padding)/2);function x(e){switch(e){case`importer-start`:return _.value;case`importer-end`:return v.value;case`import-start`:return v.value+r.dot;case`import-end`:return t.importers?.length?_.value+r.dotOffset*2+r.dot:_.value+r.dotOffset+r.dot}}function S(e,t){switch(e){case`importer-start`:return(r.height+r.padding)*t+(r.height/2+r.padding)+d.value;case`import-end`:return(r.height+r.padding)*t+(r.height/2+r.padding)+f.value;case`importer-end`:case`import-start`:return b.value}}function C(){if(a.value=[],t.importers?.length){let e=Array.from({length:s.value},(e,t)=>({id:`importer-${t}`,source:{x:x(`importer-start`),y:S(`importer-start`,t)},target:{x:x(`importer-end`),y:S(`importer-end`)}}));a.value.push(...e)}if(t.imports?.length){let e=Array.from({length:c.value},(e,t)=>({id:`import-${t}`,source:{x:x(`import-start`),y:S(`import-start`)},target:{x:x(`import-end`),y:S(`import-end`,t)}}));a.value.push(...e)}}return n(()=>{p(()=>[t.importers,t.imports],C,{immediate:!0})}),(t,n)=>{let o=ye,s=pe;return e.importers?.length||e.imports?.length?(h(),G(`div`,{key:0,ref_key:`container`,ref:i,"w-full":``,relative:``,"select-none":``},[U(`div`,Rt,[e.importers?.length?(h(),G(`div`,{key:0,py1:``,style:H({width:`${r.width}px`,marginTop:`${d.value}px`})},[(h(!0),G(M,null,N(e.importers,(t,n)=>(h(),E(s,{key:t.filename,to:{query:{asset:t.filename}},hover:`bg-active`,block:``,px2:``,p1:``,"bg-base":``,"z-graph-node":``,border:`~ base rounded`,"font-mono":``,"text-sm":``,style:H({width:`${r.width}px`,height:`${r.height}px`,overflow:`hidden`,marginBottom:`${n===e.importers.length-1?0:r.padding}px`,display:`flex`,alignItems:`center`,gap:`0.25rem`})},{default:g(()=>[B(o,{filename:t.filename},null,8,[`filename`]),U(`span`,zt,j(t.filename),1)]),_:2},1032,[`to`,`style`]))),128))],4)):P(``,!0),U(`div`,{"bg-base":``,"rounded-full":``,"border-3":``,"font-mono":``,"border-active":``,"flex-shrink-0":``,style:H({margin:m.value,width:`${r.dot}px`,height:`${r.dot}px`})},null,4),e.imports?.length?(h(),G(`div`,{key:1,py1:``,style:H({width:`${r.width}px`,marginTop:`${f.value}px`})},[(h(!0),G(M,null,N(e.imports,(t,n)=>(h(),E(s,{key:t.filename,to:{query:{asset:t.filename}},hover:`bg-active`,block:``,px2:``,p1:``,"bg-base":``,"z-graph-node":``,border:`~ base rounded`,"font-mono":``,"text-sm":``,style:H({width:`${r.width}px`,height:`${r.height}px`,overflow:`hidden`,marginBottom:`${n===e.imports.length-1?0:r.padding}px`,display:`flex`,alignItems:`center`,gap:`0.25rem`})},{default:g(()=>[B(o,{filename:t.filename},null,8,[`filename`]),U(`span`,Bt,j(t.filename),1)]),_:2},1032,[`to`,`style`]))),128))],4)):P(``,!0)]),(h(),G(`svg`,{"pointer-events-none":``,absolute:``,"left-0":``,"top-0":``,"z-graph-link":``,"w-full":``,style:H({height:`${u.value}px`})},[U(`g`,null,[(h(!0),G(M,null,N(a.value,e=>(h(),G(`path`,{key:e.id,d:O(Me)(e),class:W(O(Ne)(e)),fill:`none`},null,10,Vt))),128))])],4))],512)):P(``,!0)}}}),Wt=Object.assign(Ut,{__name:`DataAssetRelationships`}),Gt={flex:`~ col gap-3`},Kt={flex:`~ gap-4 items-center wrap`},qt={flex:`~ gap-2`},Jt={flex:`~ gap-2 items-center`},Yt={class:`w-full of-auto px2 py1`,border:`~ base rounded-lg`},Xt={key:1,flex:`~ col gap-4`},Zt={flex:`~ col gap-2`},Qt={key:0,flex:`~ col gap-2`},$t={key:2,flex:`~ col gap-1`},en={key:0,flex:`~ items-center gap-2`},tn=F({__name:`AssetDetails`,props:{session:{},asset:{},chunks:{},importers:{},imports:{},lazy:{type:Boolean,default:!1}},setup(t){let n=t,r=ue(),i=_(),a=c(!1),{state:o}=T(async()=>{if(!n.lazy)return;let e=await r.value.$call(`vite:rolldown:get-asset-details`,{session:n.session.id,id:n.asset.filename});return`chunk`in e?{chunks:[{...e?.chunk,type:`chunk`}],importers:e?.importers,imports:e?.imports}:{chunks:[],importers:[],imports:[]}},null),s=R(()=>n.lazy?o.value?.chunks:n.chunks?.filter(e=>e.chunk_id===n.asset.chunk_id)),l=R(()=>n.lazy?o.value?.importers:n.importers),u=R(()=>n.lazy?o.value?.imports:n.imports);function d(){r.value.$call(`vite:core:open-in-editor`,`${n.session.meta.dir}/${n.asset.filename}`)}return(n,r)=>{let o=ke,c=Q,f=at,p=Lt,m=Ae,_=pe,v=Wt,y=be;return h(),G(`div`,Gt,[U(`div`,Kt,[B(o,{asset:t.asset},null,8,[`asset`]),r[5]||=U(`div`,{"flex-auto":``},null,-1),U(`div`,qt,[U(`button`,{"btn-action":``,onClick:d},[...r[3]||=[U(`div`,{"i-ph-arrow-square-out-duotone":``},null,-1),k(` Open in editor `,-1)]]),U(`button`,{"btn-action":``,onClick:r[0]||=e=>a.value=!0},[...r[4]||=[U(`div`,{"i-ph-file-text":``},null,-1),k(` View source `,-1)]]),e(n.$slots,`default`)])]),a.value?(h(),G(M,{key:0},[U(`div`,Jt,[r[6]||=U(`div`,{op50:``},` Source `,-1),r[7]||=U(`span`,{"flex-auto":``},null,-1),B(c,{title:`Line Wrapping`,"class-icon":`i-ph-arrow-u-down-left-duotone`,active:O(Y).codeviewerLineWrap,onClick:r[1]||=e=>O(Y).codeviewerLineWrap=!O(Y).codeviewerLineWrap},null,8,[`active`]),B(f,{onClick:r[2]||=e=>a.value=!1})]),U(`div`,Yt,[B(p,{code:t.asset.content},null,8,[`code`])])],64)):P(``,!0),s.value&&s.value.length>0?(h(),G(`div`,Xt,[U(`div`,Zt,[r[8]||=U(`div`,{op50:``},` Chunks `,-1),(h(!0),G(M,null,N(s.value,e=>(h(),E(_,{key:e.chunk_id,border:`~ base rounded-lg`,px2:``,py1:``,"min-w-fit":``,to:{path:O(i).path,query:{chunk:e.chunk_id}}},{default:g(()=>[B(m,{chunk:e,session:t.session,"show-details":!1},null,8,[`chunk`,`session`])]),_:2},1032,[`to`]))),128))]),l.value?.length||u.value?.length?(h(),G(`div`,Qt,[r[9]||=U(`div`,{op50:``},` Asset Relationships `,-1),B(v,{importers:l.value,imports:u.value},null,8,[`importers`,`imports`])])):P(``,!0)])):(h(),G(`div`,$t,[r[12]||=U(`div`,{op50:``},` [Non-Module Asset] `,-1),t.asset.filename.endsWith(`.map`)?(h(),G(`div`,en,[r[10]||=U(`span`,{op50:``},`Source Map for`,-1),r[11]||=k(),B(y,{text:JSON.parse(t.asset.content).file},null,8,[`text`])])):P(``,!0)]))])}}}),nn=Object.assign(tn,{__name:`DataAssetDetails`}),rn=Symbol(`Comlink.proxy`),an=Symbol(`Comlink.endpoint`),on=Symbol(`Comlink.releaseProxy`),sn=Symbol(`Comlink.finalizer`),cn=Symbol(`Comlink.thrown`),ln=e=>typeof e==`object`&&!!e||typeof e==`function`,un=new Map([[`proxy`,{canHandle:e=>ln(e)&&e[rn],serialize(e){let{port1:t,port2:n}=new MessageChannel;return fn(e,t),[n,[n]]},deserialize(e){return e.start(),hn(e)}}],[`throw`,{canHandle:e=>ln(e)&&cn in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(Error(e.value.message),e.value):e.value}}]]);function dn(e,t){for(let n of e)if(t===n||n===`*`||n instanceof RegExp&&n.test(t))return!0;return!1}function fn(e,t=globalThis,n=[`*`]){t.addEventListener(`message`,function r(i){if(!i||!i.data)return;if(!dn(n,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}let{id:a,type:o,path:s}=Object.assign({path:[]},i.data),c=(i.data.argumentList||[]).map(kn),l;try{let t=s.slice(0,-1).reduce((e,t)=>e[t],e),n=s.reduce((e,t)=>e[t],e);switch(o){case`GET`:l=n;break;case`SET`:t[s.slice(-1)[0]]=kn(i.data.value),l=!0;break;case`APPLY`:l=n.apply(t,c);break;case`CONSTRUCT`:l=Dn(new n(...c));break;case`ENDPOINT`:{let{port1:t,port2:n}=new MessageChannel;fn(e,n),l=En(t,[t])}break;case`RELEASE`:l=void 0;break;default:return}}catch(e){l={value:e,[cn]:0}}Promise.resolve(l).catch(e=>({value:e,[cn]:0})).then(n=>{let[i,s]=On(n);t.postMessage(Object.assign(Object.assign({},i),{id:a}),s),o===`RELEASE`&&(t.removeEventListener(`message`,r),mn(t),sn in e&&typeof e[sn]==`function`&&e[sn]())}).catch(e=>{let[n,r]=On({value:TypeError(`Unserializable return value`),[cn]:0});t.postMessage(Object.assign(Object.assign({},n),{id:a}),r)})}),t.start&&t.start()}function pn(e){return e.constructor.name===`MessagePort`}function mn(e){pn(e)&&e.close()}function hn(e,t){let n=new Map;return e.addEventListener(`message`,function(e){let{data:t}=e;if(!t||!t.id)return;let r=n.get(t.id);if(r)try{r(t)}finally{n.delete(t.id)}}),Sn(e,n,[],t)}function gn(e){if(e)throw Error(`Proxy has been released and is not useable`)}function _n(e){return An(e,new Map,{type:`RELEASE`}).then(()=>{mn(e)})}var vn=new WeakMap,yn=`FinalizationRegistry`in globalThis&&new FinalizationRegistry(e=>{let t=(vn.get(e)||0)-1;vn.set(e,t),t===0&&_n(e)});function bn(e,t){let n=(vn.get(t)||0)+1;vn.set(t,n),yn&&yn.register(e,t,e)}function xn(e){yn&&yn.unregister(e)}function Sn(e,t,n=[],r=function(){}){let i=!1,a=new Proxy(r,{get(r,o){if(gn(i),o===on)return()=>{xn(a),_n(e),t.clear(),i=!0};if(o===`then`){if(n.length===0)return{then:()=>a};let r=An(e,t,{type:`GET`,path:n.map(e=>e.toString())}).then(kn);return r.then.bind(r)}return Sn(e,t,[...n,o])},set(r,a,o){gn(i);let[s,c]=On(o);return An(e,t,{type:`SET`,path:[...n,a].map(e=>e.toString()),value:s},c).then(kn)},apply(r,a,o){gn(i);let s=n[n.length-1];if(s===an)return An(e,t,{type:`ENDPOINT`}).then(kn);if(s===`bind`)return Sn(e,t,n.slice(0,-1));let[c,l]=wn(o);return An(e,t,{type:`APPLY`,path:n.map(e=>e.toString()),argumentList:c},l).then(kn)},construct(r,a){gn(i);let[o,s]=wn(a);return An(e,t,{type:`CONSTRUCT`,path:n.map(e=>e.toString()),argumentList:o},s).then(kn)}});return bn(a,e),a}function Cn(e){return Array.prototype.concat.apply([],e)}function wn(e){let t=e.map(On);return[t.map(e=>e[0]),Cn(t.map(e=>e[1]))]}var Tn=new WeakMap;function En(e,t){return Tn.set(e,t),e}function Dn(e){return Object.assign(e,{[rn]:!0})}function On(e){for(let[t,n]of un)if(n.canHandle(e)){let[r,i]=n.serialize(e);return[{type:`HANDLER`,name:t,value:r},i]}return[{type:`RAW`,value:e},Tn.get(e)||[]]}function kn(e){switch(e.type){case`HANDLER`:return un.get(e.name).deserialize(e.value);case`RAW`:return e.value}}function An(e,t,n,r){return new Promise(i=>{let a=jn();t.set(a,i),e.start&&e.start(),e.postMessage(Object.assign({id:a},n),r)})}function jn(){return[,,,,].fill(0).map(()=>Math.floor(Math.random()*(2**53-1)).toString(16)).join(`-`)}var Mn;async function Nn(e,t){return Mn||=hn(new Worker(new URL(``+new URL(`diff.worker-DCsgdfuV.js`,import.meta.url).href,``+import.meta.url),{type:`module`})),await Mn.calculateDiff(e,t)}var Pn=F({__name:`DiffEditor`,props:{from:{},to:{},oneColumn:{type:Boolean},diff:{type:Boolean}},setup(e){let t=e,{from:r,to:i}=f(t),a=l(`fromEl`),s=l(`toEl`),c,u;n(()=>{c=Mt(a,r,{mode:`javascript`,readOnly:!0,lineNumbers:!0}),u=Mt(s,i,{mode:`javascript`,readOnly:!0,lineNumbers:!0}),Pt(c,u),fe(()=>{c.setOption(`lineWrapping`,Y.value.codeviewerLineWrap),u.setOption(`lineWrapping`,Y.value.codeviewerLineWrap)}),fe(async()=>{c.getWrapperElement().style.display=t.oneColumn?`none`:``,t.oneColumn||(await le(),c.refresh(),Nt(u,c))}),fe(async()=>{let e=r.value,n=i.value,a=t.diff;c.setOption(`mode`,Ft(e)),u.setOption(`mode`,Ft(n)),await le(),c.startOperation(),u.startOperation(),c.getAllMarks().forEach(e=>e.clear()),u.getAllMarks().forEach(e=>e.clear());for(let e=0;e<c.lineCount()+2;e++)c.removeLineClass(e,`background`,`diff-removed`);for(let e=0;e<u.lineCount()+2;e++)u.removeLineClass(e,`background`,`diff-added`);if(a&&r.value){let t=await Nn(e,n),r=new Set,i=new Set,a=0,o=0;t.forEach(([e,t])=>{if(e===1){let e=u.posFromIndex(o);o+=t.length;let n=u.posFromIndex(o);u.markText(e,n,{className:`diff-added-inline`});for(let t=e.line;t<=n.line;t++)r.add(t)}else if(e===-1){let e=c.posFromIndex(a);a+=t.length;let n=c.posFromIndex(a);c.markText(e,n,{className:`diff-removed-inline`});for(let t=e.line;t<=n.line;t++)i.add(t)}else a+=t.length,o+=t.length}),Array.from(i).forEach(e=>c.addLineClass(e,`background`,`diff-removed`)),Array.from(r).forEach(e=>u.addLineClass(e,`background`,`diff-added`))}c.endOperation(),u.endOperation()})});let d=R(()=>t.oneColumn?0:Y.value.codeviewerDiffPanelSize);function p(e){c?.refresh(),u?.refresh(),!t.oneColumn&&(Y.value.codeviewerDiffPanelSize=e)}return(t,n)=>(h(),E(O(lt),{onResize:n[0]||=e=>p(e.prevPane.size)},{default:g(()=>[o(B(O(ut),{"min-size":`10`,size:d.value},{default:g(()=>[U(`div`,{ref_key:`fromEl`,ref:a,"h-inherit":``},null,512)]),_:1},8,[`size`]),[[I,!e.oneColumn]]),B(O(ut),{"min-size":`10`,size:100-d.value},{default:g(()=>[U(`div`,{ref_key:`toEl`,ref:s,"h-inherit":``},null,512)]),_:1},8,[`size`])]),_:1}))}}),Fn=Object.assign(Pn,{__name:`CodeDiffEditor`}),In={key:0,p4:``,"h-full":``,"of-auto":``,style:{"overscroll-behavior":`contain`}},Ln={key:1,p4:``,"h-full":``,"of-auto":``,style:{"overscroll-behavior":`contain`}},Rn={pl4:``,p2:``,"font-mono":``,border:`b base`,flex:`~ items-center gap-2`},zn={key:0,op50:``,"text-xs":``},Bn={key:3,op50:``,italic:``,ma:``},Vn=F({__name:`ModuleFlowDetails`,props:{selected:{},session:{}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=R(()=>!n.selected||!(`type`in n.selected)?null:n.selected.type===`transform`?{type:`transform`,plugin_name:n.selected.plugin_name,from:n.selected.content_from,to:n.selected.content_to}:n.selected.type===`load`?{type:`load`,from:``,plugin_name:n.selected.plugin_name,to:n.selected.content}:null);function a(){r(`close`)}return(t,n)=>{let r=Ae,o=nn,s=Q,c=at,l=Fn;return h(),G(`div`,{"bg-glass":``,"w-full":``,"h-full":``,class:W(i.value?.from&&i.value?.to?``:`border-dashed`),border:`~ base rounded-lg`,"of-hidden":``,flex:`~ col`},[e.selected?.type===`chunk`?(h(),G(`div`,In,[B(r,{chunk:e.selected,session:e.session},null,8,[`chunk`,`session`])])):e.selected?.type===`asset`?(h(),G(`div`,Ln,[B(o,{asset:e.selected,session:e.session,lazy:!0},null,8,[`asset`,`session`])])):i.value?.from&&i.value?.to?(h(),G(M,{key:2},[U(`div`,Rn,[B(Pe,{name:i.value?.plugin_name??``},null,8,[`name`]),i.value?.type?(h(),G(`span`,zn,j(i.value?.type===`load`?`Load`:`Transform`),1)):P(``,!0),n[1]||=U(`div`,{"flex-auto":``},null,-1),B(s,{title:`Line Wrapping`,"class-icon":`i-ph-arrow-u-down-left-duotone`,active:O(Y).codeviewerLineWrap,onClick:n[0]||=e=>O(Y).codeviewerLineWrap=!O(Y).codeviewerLineWrap},null,8,[`active`]),B(c,{onClick:ie(a,[`stop`])})]),B(l,{from:i.value?.from??``,to:i.value?.to??``,diff:!0,"one-column":!1},null,8,[`from`,`to`])],64)):(h(),G(`span`,Bn,` No data `))],2)}}}),Hn=Object.assign(Vn,{__name:`FlowmapModuleFlowDetails`}),Un={flex:`~ col`,relative:``},Wn=F({__name:`Node`,props:de({lines:{},classNodeInline:{},classNodeOuter:{},classNodeInner:{},classLineTop:{},classLineBottom:{},active:{type:Boolean}},{expanded:{type:Boolean,required:!1,default:!0},expandedModifiers:{}}),emits:[`update:expanded`],setup(t){let n=t,r=i(t,`expanded`);return(i,a)=>(h(),G(`div`,Un,[n.lines?.top?(h(),G(`div`,{key:0,absolute:``,"top-0":``,"left-10":``,border:`r`,h:`1/2`,"max-h-4":``,"z-flowmap-line":``,class:W([t.active?`border-flow-line-active`:`border-flow-line`,n.classLineTop]),style:H(typeof n.lines?.top==`number`?`height: ${n.lines.top}px`:``)},null,6)):P(``,!0),n.lines?.bottom?(h(),G(`div`,{key:1,absolute:``,"bottom-0":``,"left-10":``,border:`r`,h:`1/2`,"max-h-4":``,"z-flowmap-line":``,class:W([t.active?`border-flow-line-active`:`border-flow-line`,n.classLineBottom]),style:H(typeof n.lines?.bottom==`number`?`height: ${n.lines.bottom}px`:``)},null,6)):P(``,!0),e(i.$slots,`before`),U(`div`,{flex:`~`,"w-max":``,class:W([n.classNodeInline,`flowmap-node-inline`])},[e(i.$slots,`inline-before`),U(`div`,{class:W([n.classNodeOuter,t.active?`border-flow-active`:`border-flow`]),border:`~ rounded-2xl`,"bg-base":``,"of-hidden":``,"cursor-pointer":``,onClick:a[0]||=e=>r.value=!r.value},[e(i.$slots,`inner`,{},()=>[U(`div`,{px3:``,py1:``,class:W(n.classNodeInner),flex:`~ inline gap-2 items-center`},[e(i.$slots,`content`)],2)])],2),e(i.$slots,`inline-after`)],2),e(i.$slots,`after`)]))}}),Gn=Object.assign(Wn,{__name:`FlowmapNode`});const Kn=y(!1);ae(window,[`pointerup`,`pointercancel`,`pointerleave`],()=>{Kn.value=!1});var qn={key:0,pl10:``},Jn={op50:``},Yn={key:1,pl10:``},Xn={op50:``},Zn={key:0,"text-xs":``,op25:``},Qn={key:1},$n={"font-mono":``,"text-xs":``,flex:`~ gap-1 items-center`},er={"text-green":``},tr={"text-red":``},nr={flex:`~ gap-2 items-center`},rr=F({__name:`NodeModuleInfo`,props:{item:{},session:{},active:{type:Boolean}},emits:[`select`,`toggleShowAll`],setup(t,{emit:n}){let r=t,i=n,a=R(()=>{switch(r.item.type){case`transform`:return r.item.content_from===r.item.content_to;case`load`:return r.item.content==null;default:return!1}});function o(){Kn.value&&i(`select`,r.item)}function s(){i(`select`,r.item),Kn.value=!0}let c=R(()=>{if(r.item.type!==`resolve`)return;let e=r.item.importer;return r.session.modulesList.find(t=>t.id===e)});return(n,r)=>{let l=J,u=Pe,d=xe,f=Gn;return t.item.type===`no_changes_collapsed`?(h(),G(`div`,qn,[U(`div`,{flex:`~ gap-2 items-center`,"text-sm":``,border:`l`,py1:``,class:W(t.active?`border-flow-line-active`:`border-flow-line`)},[U(`div`,{"w-2":``,"h-2":``,border:`4`,"rounded-full":``,"ml--1":``,"translate-x--0.5px":``,class:W(t.active?`border-flow-line-active`:`border-flow-line`)},null,2),U(`span`,Jn,j(t.item.count)+` plugins did not change the content but cost`,1),B(l,{duration:t.item.duration,color:!0,factor:5,"text-xs":``},null,8,[`duration`]),r[3]||=U(`span`,{op50:``,"flex-shrink-0":``},`in total`,-1),U(`button`,{border:`~ base rounded-full`,px2:``,"py-px":``,op50:``,hover:`op100`,onClick:r[0]||=e=>i(`toggleShowAll`,t.item)},` Expand `)],2)])):t.item.type===`no_changes_hide`?(h(),G(`div`,Yn,[U(`div`,{flex:`~ gap-2 items-center`,"text-sm":``,border:`l`,py1:``,class:W(t.active?`border-flow-line-active`:`border-flow-line`)},[U(`div`,{"w-2":``,"h-2":``,border:`4`,"rounded-full":``,"ml--1":``,"translate-x--0.5px":``,class:W(t.active?`border-flow-line-active`:`border-flow-line`)},null,2),U(`span`,Xn,j(t.item.count)+` plugins did not change the content but cost`,1),B(l,{duration:t.item.duration,color:!0,factor:5,"text-xs":``},null,8,[`duration`]),r[4]||=U(`span`,{op50:``,"flex-shrink-0":``},`in total`,-1),U(`button`,{border:`~ base rounded-full`,px2:``,"py-px":``,op50:``,hover:`op100`,onClick:r[1]||=e=>i(`toggleShowAll`,t.item)},` Hide `)],2)])):(h(),E(f,{key:2,lines:{top:!0},"class-node-outer":a.value?`border-dashed`:``,active:t.active,"class-node-inline":`gap-2 items-center`,pl6:``,onPointerenter:o},D({inner:g(()=>[U(`button`,{px3:``,py1:``,hover:`bg-active`,flex:`~ inline gap-2 items-center`,onClick:r[2]||=e=>i(`select`,t.item),onPointerdown:s},[e(n.$slots,`button`,{},()=>[`plugin_name`in t.item?(h(),E(u,{key:0,class:W([a.value?`op50`:``,`font-mono text-sm ws-nowrap`]),name:t.item.plugin_name},null,8,[`class`,`name`])):P(``,!0)])],32)]),"inline-after":g(()=>[`duration`in t.item?(h(),E(l,{key:0,duration:t.item.duration,color:!0,factor:5,"text-xs":``,"flex-shrink-0":``},null,8,[`duration`])):P(``,!0),t.item.type===`transform`?(h(),G(M,{key:1},[t.item.content_from===t.item.content_to?(h(),G(`div`,Zn,` no changes `)):(h(),G(`div`,Qn,[U(`div`,$n,[U(`span`,er,`+`+j(t.item.diff_added),1),U(`span`,tr,`-`+j(t.item.diff_removed),1)])]))],64)):P(``,!0)]),_:2},[t.item.type===`resolve`&&t.item.resolved_id&&t.item.importer?{name:`after`,fn:g(()=>[U(`div`,{p3:``,ml4:``,border:`l`,flex:`~ col gap-1`,class:W(t.active?`border-flow-line-active`:`border-flow-line`)},[U(`div`,nr,[r[5]||=U(`div`,{"i-ph-arrow-elbow-left-down":``,"text-base":``,op50:``,"flex-none":``,"ml0.8":``},null,-1),B(d,{id:t.item.importer,session:t.session,link:!!c.value,class:W(c.value?`hover:bg-active`:``),px2:``,py1:``,rounded:``},null,8,[`id`,`session`,`link`,`class`])]),B(d,{id:t.item.module_request,session:t.session},null,8,[`id`,`session`])],2)]),key:`0`}:void 0]),1032,[`class-node-outer`,`active`]))}}}),ir=Object.assign(rr,{__name:`FlowmapNodeModuleInfo`}),ar={"ml-2px":``},or=F({__name:`Expandable`,props:de({expandable:{type:Boolean},classRootNode:{},activeStart:{type:Boolean},activeEnd:{type:Boolean},showTail:{type:Boolean,default:!0}},{expanded:{type:Boolean,required:!1,default:!0},expandedModifiers:{}}),emits:[`update:expanded`],setup(t){let n=i(t,`expanded`);return(r,i)=>{let a=Gn;return h(),E(a,{expanded:n.value,"onUpdate:expanded":i[1]||=e=>n.value=e,lines:{top:!0,bottom:!t.expandable||!n.value},pl6:``,pt4:``,"class-node-outer":t.classRootNode,active:t.activeStart},D({content:g(()=>[e(r.$slots,`node`)]),_:2},[t.expandable?{name:`inline-before`,fn:g(()=>[U(`button`,{"w-6":``,"h-6":``,mr1:``,"ml--7":``,mya:``,"rounded-full":``,hover:`bg-active`,flex:`~ items-center justify-center`,"cursor-pointer":``,onClick:i[0]||=e=>n.value=!n.value},[U(`div`,{"i-ph-caret-right":``,"text-sm":``,op50:``,transition:``,"duration-300":``,class:W({"rotate-90":n.value})},null,2)])]),key:`0`}:void 0,t.expandable&&n.value?{name:`after`,fn:g(()=>[U(`div`,null,[(h(),G(`svg`,{"ml-1em":``,"w-27px":``,"h-30px":``,viewBox:`0 0 27 30`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:W(t.activeStart?`fg-flow-line-active`:`fg-flow-line`)},[...i[2]||=[U(`g`,null,[U(`path`,{d:`M0.5 0C0.5 18 26.5 12 26.5 30`,stroke:`currentColor`,"stroke-width":`1px`})],-1)]],2)),U(`div`,ar,[e(r.$slots,`container`)]),t.showTail?(h(),G(`svg`,{key:0,"ml-1em":``,"w-27px":``,"h-30px":``,style:{transform:`scaleX(-1)`},viewBox:`0 0 27 30`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:W(t.activeEnd?`fg-flow-line-active`:`fg-flow-line`)},[...i[3]||=[U(`g`,null,[U(`path`,{d:`M0.5 0C0.5 18 26.5 12 26.5 30`,stroke:`currentColor`,"stroke-width":`1px`})],-1)]],2)):P(``,!0)])]),key:`1`}:void 0]),1032,[`expanded`,`lines`,`class-node-outer`,`active`])}}}),sr=Object.assign(or,{__name:`FlowmapExpandable`}),cr={flex:`~ col gap-1 items-start`,p1:``},lr={flex:`~ gap-2 items-center`},ur=[`title`],dr={"text-sm":``},fr=F({__name:`NodeChunkInfo`,props:{item:{},session:{},active:{type:Boolean}},emits:[`select`],setup(t,{emit:n}){let r=n;return(n,i)=>{let a=be,o=Gn;return h(),E(o,{lines:{top:!0},active:t.active,"class-node-inline":`gap-2 items-center`,pl6:``},{inner:g(()=>[U(`button`,{px3:``,py1:``,hover:`bg-active`,flex:`~ inline gap-2 items-center`,onClick:i[0]||=e=>r(`select`,t.item)},[e(n.$slots,`button`,{},()=>[U(`div`,cr,[U(`div`,lr,[B(a,{text:t.item.name||`<unnamed chunk>`},null,8,[`text`]),i[1]||=U(`div`,{"flex-auto":``},null,-1),U(`div`,{title:`Chunk ID: ${t.item.chunk_id}`,op50:``,"font-mono":``,"text-sm":``},` #`+j(t.item.chunk_id),9,ur)]),U(`div`,dr,j(t.item.modules.length)+` modules `,1)])])])]),"inline-after":g(()=>[B(a,{text:t.item.reason},null,8,[`text`])]),_:3},8,[`active`])}}}),pr=Object.assign(fr,{__name:`FlowmapNodeChunkInfo`}),mr={flex:`~ col gap-1 items-start`,p1:``},hr={flex:`~ gap-2 items-center`},gr=F({__name:`NodeAssetInfo`,props:{item:{},session:{},active:{type:Boolean}},emits:[`select`],setup(t,{emit:n}){let r=n;return(n,i)=>{let a=xe,o=Ee,s=be,c=Gn;return h(),E(c,{lines:{top:!0},active:t.active,"class-node-inline":`gap-2 items-center`,pl6:``},{inner:g(()=>[U(`button`,{px3:``,py1:``,hover:`bg-active`,flex:`~ inline gap-2 items-center`,onClick:i[0]||=e=>r(`select`,t.item)},[e(n.$slots,`button`,{},()=>[U(`div`,mr,[U(`div`,hr,[B(a,{id:t.item.filename,session:t.session},null,8,[`id`,`session`])])])])])]),"inline-after":g(()=>[B(o,{bytes:t.item.size,"text-sm":``},null,8,[`bytes`]),B(s,{text:t.item.type},null,8,[`text`])]),_:3},8,[`active`])}}}),_r=Object.assign(gr,{__name:`FlowmapNodeAssetInfo`}),vr={"select-none":``,"h-full":``,"of-auto":``,"ws-nowrap":``,"w-100vh":``,"of-visible":``},yr={key:0,"text-sm":``},br={flex:``},xr={flex:`~ items-center gap-1`,"text-sm":``,"text-blue":``,px3:``,py1:``},Sr={p2:``,flex:`~ col gap-1`},Cr={flex:`~`},wr={p2:``},Tr={flex:`~ items-center gap-1`,"text-sm":``,"text-orange":``,px3:``,py1:``},Er={p2:``,flex:`~ col gap-1`},Dr={op50:``,"text-xs":``},Or={op50:``,"text-xs":``},kr={key:0,"i-ph-spinner":``,"animate-spin":``},Ar={key:1,op50:``,"text-xs":``},jr={op50:``,"text-xs":``},Mr={op50:``,"text-xs":``},Nr=F({__name:`ModuleFlowTimeline`,props:{info:{},session:{},transformsLoading:{type:Boolean},selected:{}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,{info:i}=f(n),{flowShowAllTransforms:a,flowShowAllLoads:o,flowExpandTransforms:s,flowExpandLoads:c,flowExpandResolveId:l,flowExpandChunks:u,flowExpandAssets:d}=Te,p=R(()=>i?.value?.resolve_ids??[]),m=R(()=>{let e=i?.value?.transforms?.filter(e=>e.content_from===e.content_to),t=i?.value?.transforms?.filter(e=>e.content_from!==e.content_to);return a.value&&!e?.length?i?.value?.transforms??[]:a.value&&e?.length?[...i.value.transforms??[],{type:`no_changes_hide`,id:`no_changes_hide`,count:e?.length??0,duration:e?.reduce((e,t)=>e+t.duration,0)??0}]:e?.length?[{type:`no_changes_collapsed`,id:`no_changes_collapsed`,count:e?.length??0,duration:e?.reduce((e,t)=>e+t.duration,0)??0},...t??[]]:t??[]}),_=R(()=>{let e=i?.value?.loads?.filter(e=>!e.content),t=i?.value?.loads?.filter(e=>e.content);return o.value&&!e?.length?i?.value?.loads??[]:o.value&&e?.length?[...i.value.loads??[],{type:`no_changes_hide`,id:`no_changes_hide`,count:e?.length??0,duration:e?.reduce((e,t)=>e+t.duration,0)??0}]:e?.length?[{type:`no_changes_collapsed`,id:`no_changes_collapsed`,count:e?.length??0,duration:e?.reduce((e,t)=>e+t.duration,0)??0},...t??[]]:t??[]}),y=R(()=>[...p.value,..._.value,...m.value,...i.value.chunks,...i.value.assets]);function b(e){return!n.selected||!e?!1:y.value.indexOf(n.selected)>=y.value.indexOf(e)}function x(e){r(`select`,e)}return(t,n)=>{let r=Gn,f=xe,y=ir,S=sr,C=pr,w=_r;return h(),G(`div`,vr,[O(i).importers?.length?(h(),G(`div`,yr,[U(`div`,br,[B(O(se),null,{popper:g(({hide:t})=>[U(`div`,Sr,[(h(!0),G(M,null,N(O(i).importers,n=>(h(),E(f,{id:n,key:n,session:e.session,link:!0,class:`hover:bg-active`,px2:``,py1:``,rounded:``,onClick:t},null,8,[`id`,`session`,`onClick`]))),128))])]),default:g(()=>[B(r,{"class-node-outer":`border-dashed`},{inner:g(()=>[U(`div`,xr,[n[7]||=U(`div`,{"i-ph-arrows-merge-duotone":``,"rotate-270":``},null,-1),k(` `+j(O(i).importers?.length)+` importers `,1)])]),_:1})]),_:1})]),n[8]||=U(`div`,{"pl-10":``,border:`r`,"h-4":``,"w-1px":``,"z-flowmap-line":``,class:`border-flow-line border-dashed`},null,-1)])):P(``,!0),U(`div`,Cr,[B(r,{lines:{bottom:!0},active:e.selected!=null},{content:g(()=>[U(`div`,wr,[B(f,{id:O(i).id,session:e.session},null,8,[`id`,`session`])])]),_:1},8,[`active`]),O(i).imports?.length?(h(),G(M,{key:0},[n[10]||=U(`div`,{"w-10":``,border:`t base dashed`,mya:``},null,-1),B(O(se),{mya:``},{popper:g(({hide:t})=>[U(`div`,Er,[(h(!0),G(M,null,N(O(i).imports,n=>(h(),E(f,{id:n.module_id,key:n.module_id,kind:n.kind,session:e.session,link:!0,class:`hover:bg-active`,px2:``,py1:``,rounded:``,onClick:t},null,8,[`id`,`kind`,`session`,`onClick`]))),128))])]),default:g(()=>[B(r,{"class-node-outer":`border-dashed`},{inner:g(()=>[U(`div`,Tr,[n[9]||=U(`div`,{"i-ph-arrows-split-duotone":``,"rotate-270":``},null,-1),k(` `+j(O(i).imports?.length)+` imports `,1)])]),_:1})]),_:1})],64)):P(``,!0)]),B(S,{expanded:O(l),"onUpdate:expanded":n[0]||=e=>v(l)?l.value=e:null,expandable:p.value.length>0,"class-root-node":p.value.length===0?`border-dashed`:``,"active-start":b(p.value[0]||_.value[0]),"active-end":b(_.value[0])},{node:g(()=>[n[11]||=U(`div`,{"i-ph-magnifying-glass-duotone":``},null,-1),n[12]||=k(` Resolve Id `,-1),U(`span`,Dr,`(`+j(O(i).resolve_ids.length)+`)`,1)]),container:g(()=>[U(`div`,null,[(h(!0),G(M,null,N(p.value,(t,n)=>(h(),E(y,{key:t.id,item:t,session:e.session,active:b(t),class:W(n>0?`pt-2`:``),onSelect:x},null,8,[`item`,`session`,`active`,`class`]))),128))])]),_:1},8,[`expanded`,`expandable`,`class-root-node`,`active-start`,`active-end`]),B(S,{expanded:O(c),"onUpdate:expanded":n[2]||=e=>v(c)?c.value=e:null,expandable:_.value.length>0,"class-root-node":_.value.length===0?`border-dashed`:``,"active-start":b(_.value[0]),"active-end":b(m.value[0])},{node:g(()=>[n[13]||=U(`div`,{"i-ph-upload-simple-duotone":``},null,-1),n[14]||=k(` Load `,-1),U(`span`,Or,`(`+j(O(i).loads.length)+`)`,1)]),container:g(()=>[U(`div`,null,[(h(!0),G(M,null,N(_.value,(t,r)=>(h(),E(y,{key:t.id,item:t,session:e.session,active:b(t),class:W(r>0&&t.type!==`no_changes_hide`?`pt-2`:``),onSelect:x,onToggleShowAll:n[1]||=e=>o.value=!O(o)},null,8,[`item`,`session`,`active`,`class`]))),128))])]),_:1},8,[`expanded`,`expandable`,`class-root-node`,`active-start`,`active-end`]),B(S,{expanded:O(s),"onUpdate:expanded":n[4]||=e=>v(s)?s.value=e:null,expandable:m.value.length>0,"class-root-node":m.value.length===0?`border-dashed`:``,"active-start":b(m.value[0]),"active-end":b(O(i).chunks[0]||m.value.at(-1))},{node:g(()=>[n[15]||=U(`div`,{"i-ph-magic-wand-duotone":``},null,-1),n[16]||=k(` Transform `,-1),e.transformsLoading?(h(),G(`span`,kr)):(h(),G(`span`,Ar,`(`+j(O(i).transforms.length)+`)`,1))]),container:g(()=>[U(`div`,null,[(h(!0),G(M,null,N(m.value,(t,r)=>(h(),E(y,{key:t.id,item:t,session:e.session,active:b(t),class:W(r>0&&t.type!==`no_changes_hide`?`pt-2`:``),onSelect:x,onToggleShowAll:n[3]||=e=>a.value=!O(a)},null,8,[`item`,`session`,`active`,`class`]))),128))])]),_:1},8,[`expanded`,`expandable`,`class-root-node`,`active-start`,`active-end`]),B(S,{expanded:O(u),"onUpdate:expanded":n[5]||=e=>v(u)?u.value=e:null,lines:{top:!0},expandable:O(i).chunks.length>0,"class-root-node":O(i).chunks.length===0?`border-dashed`:``,"active-start":b(O(i).chunks[0]),"active-end":b(O(i).chunks.at(-1)),pl6:``,pt4:``},{node:g(()=>[n[17]||=U(`div`,{"i-ph-shapes-duotone":``},null,-1),n[18]||=k(` Chunk `,-1),U(`span`,jr,`(`+j(O(i).chunks.length)+`)`,1)]),container:g(()=>[(h(!0),G(M,null,N(O(i).chunks,t=>(h(),E(C,{key:t.chunk_id,item:t,active:b(t),session:e.session,onSelect:x},null,8,[`item`,`active`,`session`]))),128))]),_:1},8,[`expanded`,`expandable`,`class-root-node`,`active-start`,`active-end`]),B(S,{expanded:O(d),"onUpdate:expanded":n[6]||=e=>v(d)?d.value=e:null,lines:{top:!0},expandable:O(i).assets.length>0,"class-root-node":O(i).assets.length===0?`border-dashed`:``,"active-start":b(O(i).assets[0]),"active-end":b(O(i).assets.at(-1)),"show-tail":!1,pl6:``,pt4:``},{node:g(()=>[n[19]||=U(`div`,{"i-ph-package-duotone":``},null,-1),n[20]||=k(` Assets `,-1),U(`span`,Mr,`(`+j(O(i).assets.length)+`)`,1)]),container:g(()=>[(h(!0),G(M,null,N(O(i).assets,t=>(h(),E(w,{key:t.filename,item:t,active:b(t),session:e.session,onSelect:x},null,8,[`item`,`active`,`session`]))),128))]),_:1},8,[`expanded`,`expandable`,`class-root-node`,`active-start`,`active-end`])])}}}),Pr=Object.assign(Nr,{__name:`FlowmapModuleFlowTimeline`}),Fr={"w-full":``,h:`[calc(100vh-(var(--spacing)*58))]`,"pointer-events-auto":``,sticky:``,"top-4":``},Ir={p4:``},Lr=F({__name:`ModuleFlow`,props:{info:{},session:{},transformsLoading:{type:Boolean}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,{info:i}=f(n),a=y(null);p(a,e=>{r(`select`,!!e)});function s(e){a.value=e}function c(){a.value=null}return(t,n)=>(h(),G(M,null,[a.value?(h(),E(O(lt),{key:0,class:`!h-auto w-full module-flow-splitter right-4 bottom-4 fixed z-10 pointer-events-none`},{default:g(()=>[B(O(ut),{size:`45`,"min-size":`10`,"max-size":`90`,class:`!h-auto pointer-events-none`}),B(O(ut),{size:`55`,"min-size":`10`,"max-size":`90`,class:`!h-auto !of-visible`},{default:g(()=>[o((h(),G(`div`,Fr,[n[0]||=U(`div`,{absolute:``,"left-0":``,top:`1/2`,"translate-x":`-1/2`,"translate-y":`-1/2`,bg:`#DFDFDF dark:#313131`,"h-10":``,"w-2":``,"rounded-full":``,"z-10":``,"cursor-col-resize":``},null,-1),B(Hn,{selected:a.value,session:e.session,onClose:c},null,8,[`selected`,`session`])])),[[O(st),[c,{ignore:[`.splitpanes__splitter`,`.flowmap-node-inline`]}]]])]),_:1})]),_:1})):P(``,!0),U(`div`,Ir,[B(Pr,{info:O(i),session:e.session,"transforms-loading":e.transformsLoading,selected:a.value,onSelect:s},null,8,[`info`,`session`,`transforms-loading`,`selected`])])],64))}}),Rr=Object.assign(Lr,{__name:`FlowmapModuleFlow`}),zr={relative:``,border:`t base`,pb10:``,py1:``,mt4:``},Br={key:0,border:`~ base`,"rounded-lg":``,"shadow-lg":``,px3:``,py2:``,"bg-glass":``,"pointer-events-none":``,"text-sm":``,"max-w-80":``},Vr={"font-semibold":``,"font-mono":``,"text-base":``,mb2:``},Hr={key:0,border:`t base`,pt2:``,flex:`~ col gap-1.5`,"min-w-48":``},Ur={flex:`~ justify-between items-center`,py1:``},Wr=[`datetime`],Gr={flex:`~ justify-between items-center`,py1:``},Kr=[`datetime`],qr={flex:`~ justify-between items-center`,py1:``,border:`t base dashed`,pt2:``},Jr={key:1},Yr=F({__name:`ModuleFlamegraph`,props:{info:{},session:{},flowNodeSelected:{type:Boolean}},setup(e){let t=e,r=e=>Be(e,void 0,!1),i=R(()=>{let e=t.info.resolve_ids.map((e,t)=>r({id:`resolveId-${t}`,text:e.plugin_name,size:e.duration,meta:e})),n=t.info.loads.map((e,t)=>r({id:`load-${t}`,text:e.plugin_name,size:e.duration,meta:e})),i=t.info.transforms.map((e,t)=>r({id:`transform-${t}`,text:e.plugin_name,size:e.duration,meta:e}));return r({id:`~root`,text:`Module Flamegraph`,children:[r({id:`~resolves`,text:`Resolve Id`,children:e}),r({id:`~loads`,text:`Load`,children:n}),r({id:`~transforms`,text:`Transform`,children:i})]})}),a=c(null),o=c(0),s=c(0),u=l(`el`),d=y(null);function f(){d.value=new ze(i.value,{animate:!0,palette:{fg:`#888`},getSubtext:e=>{let t=e.size/i.value.size*100;if(t>15&&t!==100)return`${t.toFixed(1)}%`},onHover(e,t){if(!e){a.value=null;return}t&&(o.value=t.clientX,s.value=t.clientY),a.value={plugin_name:e.text,duration:e.size,meta:e.meta}},onLeave(){a.value=null}}),u.value.appendChild(d.value.el)}function m(){d.value?.dispose()}return n(()=>{f()}),K(()=>{m()}),p(i,async()=>{m(),f()},{deep:!0}),p(()=>t.flowNodeSelected,async()=>{await le(),d.value?.resize()}),(e,t)=>{let n=J,r=Fe;return h(),G(`div`,zr,[B(r,{"hover-x":o.value,"hover-y":s.value},{default:g(()=>[a.value?(h(),G(`div`,Br,[U(`div`,Vr,j(a.value.plugin_name),1),a.value.meta?(h(),G(`div`,Hr,[U(`div`,Ur,[t[0]||=U(`label`,{"text-xs":``,"opacity-70":``},`Start Time`,-1),U(`time`,{datetime:new Date(a.value.meta.timestamp_start).toISOString(),"font-mono":``,text:`xs`,bg:`base/10`,"px1.5":``,"py0.5":``,rounded:``},j(O(he)(a.value.meta.timestamp_start)),9,Wr)]),U(`div`,Gr,[t[1]||=U(`label`,{"text-xs":``,"opacity-70":``},`End Time`,-1),U(`time`,{datetime:new Date(a.value.meta.timestamp_end).toISOString(),"font-mono":``,text:`xs`,bg:`base/10`,"px1.5":``,"py0.5":``,rounded:``},j(O(he)(a.value.meta.timestamp_end)),9,Kr)]),U(`div`,qr,[t[2]||=U(`label`,{text:`xs`,op70:``},`Duration`,-1),B(n,{duration:a.value.duration},null,8,[`duration`])])])):(h(),G(`div`,Jr,[B(n,{duration:a.value.duration},null,8,[`duration`])]))])):P(``,!0)]),_:1},8,[`hover-x`,`hover-y`]),U(`div`,{ref_key:`el`,ref:u,"min-h-30":``},null,512)])}}}),Xr=Object.assign(Yr,{__name:`ChartModuleFlamegraph`}),Zr={flex:``,px2:``},Qr=[`d`,`stroke-dasharray`],$r=20,ei=F({__name:`ModuleImportRelationships`,props:{module:{},session:{}},setup(e){let t=e,r={width:400,height:30,padding:4,marginX:8,border:1,margin:8,dot:16,dotOffset:80,linkOffset:0},i=l(`container`),a=y([]),o=R(()=>{let e=new Map;for(let n of t.session.modulesList)e.set(n.id,n);return e}),s=R(()=>t.module.importers?.map(e=>o.value.get(e))),c=R(()=>Math.min(Math.max(t.module.importers?.length||0,t.module.imports?.length||0),$r)),u=R(()=>Math.min(s.value?.length||0,$r)),d=R(()=>Math.min(t.module.imports?.length||0,$r)),f=R(()=>r.height*c.value+r.padding*(c.value+1)+r.border*2),m=R(()=>{let e=Math.max(0,d.value-u.value)*(r.height+r.padding)/2;return Math.min(e,f.value/2)}),g=R(()=>{let e=Math.max(0,u.value-d.value)*(r.height+r.padding)/2;return Math.min(e,f.value/2)}),_=R(()=>`${f.value/2-r.dot/2}px ${r.dotOffset}px 0 ${s.value?.length?r.dotOffset:0}px`),v=R(()=>s.value?.length?r.width+r.marginX:r.marginX),b=R(()=>s.value?.length?v.value+r.dotOffset:v.value),x=R(()=>(r.height*c.value+(c.value+1)*r.padding)/2);function S(e){switch(e){case`importer-start`:return v.value;case`importer-end`:return b.value;case`import-start`:return b.value+r.dot;case`import-end`:return s.value?.length?v.value+r.dotOffset*2+r.dot:v.value+r.dotOffset+r.dot}}function C(e,t){switch(e){case`importer-start`:return(r.height+r.padding)*t+(r.height/2+r.padding)+m.value;case`import-end`:return(r.height+r.padding)*t+(r.height/2+r.padding)+g.value;case`importer-end`:case`import-start`:return x.value}}function w(){if(a.value=[],s.value?.length){let e=Array.from({length:u.value},(e,t)=>({id:``,source:{x:S(`importer-start`),y:C(`importer-start`,t)},target:{x:S(`importer-end`),y:C(`importer-end`)}}));a.value.push(...e)}if(t.module?.imports?.length){let e=Array.from({length:d.value},(e,t)=>({id:``,source:{x:S(`import-start`),y:C(`import-start`)},target:{x:S(`import-end`),y:C(`import-end`,t)}}));a.value.push(...e)}}return n(()=>{p(()=>[t.module],w,{immediate:!0})}),(t,n)=>{let o=xe;return h(),G(`div`,{ref_key:`container`,ref:i,"w-full":``,relative:``,"select-none":``,mt4:``},[U(`div`,Zr,[s.value?.length?(h(),G(`div`,{key:0,py1:``,style:H({width:`${r.width}px`,marginTop:`${m.value}px`})},[(h(!0),G(M,null,N(s.value,(t,n)=>(h(),E(o,{key:t.id,id:t.id,hover:`bg-active`,block:``,px2:``,p1:``,"bg-base":``,"ws-nowrap":``,"z-graph-node":``,border:`~ base rounded`,link:!0,session:e.session,minimal:!0,style:H({width:`${r.width}px`,height:`${r.height}px`,overflow:`hidden`,marginBottom:`${n===s.value.length-1?0:r.padding}px`})},null,8,[`id`,`session`,`style`]))),128))],4)):P(``,!0),U(`div`,{"bg-base":``,"rounded-full":``,"border-3":``,"font-mono":``,"border-active":``,"flex-shrink-0":``,style:H({margin:_.value,width:`${r.dot}px`,height:`${r.dot}px`})},null,4),e.module.imports?.length?(h(),G(`div`,{key:1,py1:``,style:H({width:`${r.width}px`,marginTop:`${g.value}px`})},[(h(!0),G(M,null,N(e.module.imports,(t,n)=>(h(),E(o,{key:t.id,id:t.module_id,hover:`bg-active`,block:``,px2:``,p1:``,"bg-base":``,"ws-nowrap":``,"z-graph-node":``,border:`~ base rounded`,link:!0,session:e.session,minimal:!0,style:H({width:`${r.width}px`,height:`${r.height}px`,overflow:`hidden`,marginBottom:`${n===e.module.imports.length-1?0:r.padding}px`})},null,8,[`id`,`session`,`style`]))),128))],4)):P(``,!0)]),(h(),G(`svg`,{"pointer-events-none":``,absolute:``,"left-0":``,"top-0":``,"z-graph-link":``,"w-full":``,style:H({height:`${f.value}px`})},[U(`g`,null,[(h(!0),G(M,null,N(a.value,e=>(h(),G(`path`,{key:e.id,d:O(Me)(e),class:W(O(Ne)(e)),"stroke-dasharray":e.import?.kind===`dynamic-import`?`3 6`:void 0,fill:`none`},null,10,Qr))),128))])],4))],512)}}}),ti=Object.assign(ei,{__name:`DataModuleImportRelationships`}),ni={key:0,relative:``,"h-full":``,"w-full":``},ri={"bg-glass":``,absolute:``,"left-2":``,"top-2":``,"z-panel-content":``,p2:``,border:`~ base rounded-lg`,flex:`~ col gap-2`},ii={"text-xs":``,"font-mono":``,flex:`~ items-center gap-3`,ml2:``},ai={flex:`~ gap-2`},oi={"of-auto":``,"h-full":``,"pt-30":``},si=F({__name:`ModuleDetailsLoader`,props:{session:{},module:{}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=ue(),a=c([]),o=c(!1),s=c(!1);fe(async()=>{let e={session:n.session.id,module:n.module};le(async()=>{a.value=[],o.value=!0,a.value=await i.value.$call(`vite:rolldown:get-module-transforms`,e),o.value=!1})});let l=V(async()=>{let e={session:n.session.id,module:n.module};return{transforms:a.value,...await i.value.$call(`vite:rolldown:get-module-info`,e)}});function u(e){s.value=e}return(t,n)=>{let i=at,a=xe,c=De,d=Rr,f=Xr,p=ti,m=ce;return O(l)?(h(),G(`div`,ni,[B(i,{absolute:``,"right-2":``,"top-1.5":``,"bg-glass":``,"z-panel-content":``,onClick:n[0]||=e=>r(`close`)}),U(`div`,ri,[B(a,{id:e.module,px2:``,pt1:``,session:e.session},null,8,[`id`,`session`]),U(`div`,ii,[O(l)?(h(),E(c,{key:0,metrics:O(l).build_metrics},null,8,[`metrics`])):P(``,!0)]),U(`div`,ai,[U(`button`,{class:W(O(Y).moduleDetailsViewType===`flow`?`text-primary`:``),flex:`~ gap-2 items-center justify-center`,px2:``,py1:``,"w-40":``,border:`~ base rounded-lg`,hover:`bg-active`,onClick:n[1]||=e=>O(Y).moduleDetailsViewType=`flow`},[...n[4]||=[U(`div`,{"i-ph-git-branch-duotone":``,"rotate-180":``},null,-1),k(` Build Flow `,-1)]],2),U(`button`,{class:W(O(Y).moduleDetailsViewType===`charts`?`text-primary`:``),flex:`~ gap-2 items-center justify-center`,px2:``,py1:``,"w-40":``,border:`~ base rounded-lg`,hover:`bg-active`,onClick:n[2]||=e=>O(Y).moduleDetailsViewType=`charts`},[...n[5]||=[U(`div`,{"i-ph-chart-donut-duotone":``},null,-1),k(` Charts `,-1)]],2),U(`button`,{class:W(O(Y).moduleDetailsViewType===`imports`?`text-primary`:``),flex:`~ gap-2 items-center justify-center`,px2:``,py1:``,"w-40":``,border:`~ base rounded-lg`,hover:`bg-active`,onClick:n[3]||=e=>O(Y).moduleDetailsViewType=`imports`},[...n[6]||=[U(`div`,{"i-ph-graph-duotone":``},null,-1),k(` Imports `,-1)]],2)])]),U(`div`,oi,[O(Y).moduleDetailsViewType===`flow`?(h(),E(d,{key:0,info:O(l),session:e.session,"transforms-loading":o.value,onSelect:u},null,8,[`info`,`session`,`transforms-loading`])):P(``,!0),O(Y).moduleDetailsViewType===`charts`?(h(),E(f,{key:1,info:O(l),session:e.session,"flow-node-selected":s.value},null,8,[`info`,`session`,`flow-node-selected`])):P(``,!0),O(Y).moduleDetailsViewType===`imports`?(h(),E(p,{key:2,module:O(l),session:e.session},null,8,[`module`,`session`])):P(``,!0)])])):(h(),E(m,{key:1}))}}}),ci=Object.assign(si,{__name:`DataModuleDetailsLoader`}),li={key:0,p4:``,relative:``,"h-full":``,"w-full":``,"of-auto":``,"bg-glass":``,"z-panel-content":``},ui=F({__name:`AssetDetailsLoader`,props:{asset:{},session:{}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=ue(),{state:a}=T(async()=>{let e=await i.value.$call(`vite:rolldown:get-asset-details`,{session:n.session.id,id:n.asset});return`chunk`in e?{asset:{...e?.asset,type:`asset`},chunks:[{...e?.chunk,type:`chunk`}],importers:e?.importers,imports:e?.imports}:{asset:{...e?.asset,type:`asset`},chunks:[],importers:[],imports:[]}},null);return(t,n)=>{let i=at,o=nn;return O(a)?.asset?(h(),G(`div`,li,[B(o,{asset:O(a).asset,session:e.session,chunks:O(a)?.chunks,importers:O(a)?.importers,imports:O(a)?.imports},{default:g(()=>[B(i,{onClick:n[0]||=e=>r(`close`)})]),_:1},8,[`asset`,`session`,`chunks`,`importers`,`imports`])])):P(``,!0)}}}),di=Object.assign(ui,{__name:`DataAssetDetailsLoader`}),fi={op50:``,"text-xs":``,flex:``,"justify-center":``,"items-center":``},pi=F({__name:`NodePluginInfo`,props:{modules:{},calls:{},duration:{}},setup(e){return(t,n)=>{let r=je,i=J;return h(),G(`span`,fi,[B(r,{number:e.modules,icon:`i-catppuccin-java-class-abstract`,color:`transparent color-scale-neutral`,title:`Module processed: ${e.modules}`},null,8,[`number`,`title`]),n[1]||=U(`span`,{op40:``},`|`,-1),B(r,{number:e.calls,icon:`i-ph-arrow-counter-clockwise`,color:`transparent color-scale-neutral`,title:`Total calls: ${e.calls}`},null,8,[`number`,`title`]),n[2]||=U(`span`,{op40:``},`|`,-1),B(i,{duration:e.duration,flex:`~ gap-1 items-center`,px1:``,title:`Total build cost: ${O(me)(e.duration,!0)}`},{default:g(()=>[...n[0]||=[U(`span`,{"i-ph-clock-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`])])}}}),mi=Object.assign(pi,{__name:`FlowmapNodePluginInfo`}),hi={flex:`~ col w-full`},gi={"select-none":``,"h-full":``,"of-auto":``,"ws-nowrap":``,"w-auto":``,"of-visible":``,p4:``,flex:`~ col`},_i={flex:`~`},vi={flex:`~ items-center justify-center`,relative:``,"w-60":``,h14:``},yi={op50:``,"text-xs":``,flex:`~ items-center justify-center gap-1`,h6:``},bi=[`datetime`],xi={flex:`~ items-center justify-center`,relative:``,"w-60":``,h14:``},Si={op50:``,"text-xs":``,flex:`~ items-center justify-center gap-1`,h6:``},Ci=[`datetime`],wi=F({__name:`PluginFlowTimeline`,props:{session:{},buildMetrics:{}},setup(t){let n=t;function r(e){let t={duration:0,calls:e.length,modules:0},n=new Set;return e.forEach(e=>{n.has(e.module)||(n.add(e.module),t.modules++),t.duration+=e.duration}),t}let i=R(()=>r(n.buildMetrics.resolveIdMetrics)),a=R(()=>r(n.buildMetrics.loadMetrics)),o=R(()=>r(n.buildMetrics.transformMetrics)),s=R(()=>{let e=n.buildMetrics.calls;if(e?.length)return e[0].timestamp_start}),c=R(()=>{let e=n.buildMetrics.calls;if(e?.length)return e[e.length-1].timestamp_end});return(n,r)=>{let l=Pe,u=Gn,d=mi;return h(),G(`div`,hi,[e(n.$slots,`header`),U(`div`,gi,[U(`div`,_i,[B(u,{active:!1,"class-node-inner":`w60`},{content:g(()=>[U(`div`,{p2:``,"w-full":``,"text-center":``,onClick:r[0]||=e=>O(Y).pluginDetailSelectedHook=``},[B(l,{name:t.buildMetrics.plugin_name,class:`font-mono text-sm ws-nowrap text-ellipsis line-clamp-1`},null,8,[`name`])])]),_:1})]),U(`div`,vi,[r[5]||=U(`div`,{class:`border-flow-line left-50% translate-x--1/2`,absolute:``,"top-0":``,border:`r`,"z-flowmap-line":``,h4:``},null,-1),r[6]||=U(`div`,{class:`border-flow-line left-50% translate-x--1/2`,absolute:``,"top-10":``,border:`r`,"z-flowmap-line":``,h4:``},null,-1),U(`span`,yi,[r[4]||=U(`i`,{"i-ph-airplane-takeoff-thin":``,"text-4":``,"inline-flex":``},null,-1),s.value?(h(),G(`time`,{key:0,datetime:new Date(s.value).toISOString()},j(new Date(s.value).toLocaleString()),9,bi)):P(``,!0)])]),B(u,{"class-node-inner":`w60`,"class-node-outer":`${!i.value.modules&&!i.value.calls?`b-dashed!`:``}`,"class-line-bottom":`left-50%! translate-x--1/2`,pb4:``,w60:``,lines:{bottom:!0},active:O(Y).pluginDetailSelectedHook===`resolve`},{content:g(()=>[U(`div`,{flex:`~ col gap1`,"w-full":``,onClick:r[1]||=e=>O(Y).pluginDetailSelectedHook=`resolve`},[r[7]||=U(`span`,{flex:`~ items-center justify-center gap-1`},[U(`i`,{"i-ph-magnifying-glass-duotone":``}),k(` Resolve Id `)],-1),U(`div`,null,[B(d,{modules:i.value.modules,calls:i.value.calls,duration:i.value.duration},null,8,[`modules`,`calls`,`duration`])])])]),_:1},8,[`class-node-outer`,`active`]),B(u,{active:O(Y).pluginDetailSelectedHook===`load`,"class-node-inner":`w60`,"class-node-outer":`${!a.value.modules&&!a.value.calls?`b-dashed!`:``}`,"class-line-bottom":`left-50%! translate-x--1/2`,pb4:``,w60:``,lines:{bottom:!0}},{content:g(()=>[U(`div`,{flex:`~ col gap1`,"w-full":``,onClick:r[2]||=e=>O(Y).pluginDetailSelectedHook=`load`},[r[8]||=U(`span`,{flex:`~ items-center justify-center gap-1`},[U(`i`,{"i-ph-upload-simple-duotone":``}),k(` Load `)],-1),U(`div`,null,[B(d,{modules:a.value.modules,calls:a.value.calls,duration:a.value.duration},null,8,[`modules`,`calls`,`duration`])])])]),_:1},8,[`active`,`class-node-outer`]),B(u,{active:O(Y).pluginDetailSelectedHook===`transform`,"class-node-inner":`w60`,"class-node-outer":`${!o.value.modules&&!o.value.calls?`b-dashed!`:``}`},{content:g(()=>[U(`div`,{flex:`~ col gap1`,"w-full":``,onClick:r[3]||=e=>O(Y).pluginDetailSelectedHook=`transform`},[r[9]||=U(`span`,{flex:`~ items-center justify-center gap-1`},[U(`i`,{"i-ph-magic-wand-duotone":``}),k(` Transform `)],-1),U(`div`,null,[B(d,{modules:o.value.modules,calls:o.value.calls,duration:o.value.duration},null,8,[`modules`,`calls`,`duration`])])])]),_:1},8,[`active`,`class-node-outer`]),U(`div`,xi,[r[11]||=U(`div`,{class:`border-flow-line left-50% translate-x--1/2`,absolute:``,"top-0":``,border:`r`,"z-flowmap-line":``,h4:``},null,-1),r[12]||=U(`div`,{class:`border-flow-line left-50% translate-x--1/2`,absolute:``,"top-10":``,border:`r`,"z-flowmap-line":``,h4:``},null,-1),r[13]||=U(`div`,{class:`border-flow-line left-50% translate-x--1/2`,absolute:``,"top-14":``,"w-2":``,"h-2":``,border:`4`,"rounded-full":``},null,-1),U(`span`,Si,[r[10]||=U(`i`,{"i-ph-airplane-landing-thin":``,"text-4":``,"inline-flex":``},null,-1),c.value?(h(),G(`time`,{key:0,datetime:new Date(c.value).toISOString()},j(new Date(c.value).toLocaleString()),9,Ci)):P(``,!0)])])])])}}}),Ti=Object.assign(wi,{__name:`FlowmapPluginFlowTimeline`}),Ei={role:`table`,"min-w-max":``},Di={role:`row`,class:`sticky top-0 z10 border-b border-base`,flex:`~ row`},Oi={key:0,role:`columnheader`,"bg-base":``,"flex-none":``,w32:``,"ws-nowrap":``,p1:``,"text-center":``,"font-600":``},ki={key:1,role:`columnheader`,"bg-base":``,"flex-1":``,"min-w100":``,"ws-nowrap":``,p1:``,"text-left":``,"font-600":``},Ai={flex:`~ row gap1 items-center`,"w-full":``},ji={"w-6":``,"h-6":``,"rounded-full":``,"cursor-pointer":``,hover:`bg-active`,flex:`~ items-center justify-center`},Mi={class:`p2`,flex:`~ col gap2`},Ni=[`title`],Pi=[`checked`,`onChange`],Fi={"text-sm":``},Ii={key:2,role:`columnheader`,"rounded-tr-2":``,"bg-base":``,"flex-none":``,"ws-nowrap":``,p1:``,"text-center":``,"font-600":``,"w-27":``},Li={"w-6":``,"h-6":``,"rounded-full":``,"cursor-pointer":``,hover:`bg-active`,flex:`~ items-center justify-center`},Ri={key:3,role:`columnheader`,"rounded-tr-2":``,"bg-base":``,"flex-none":``,"min-w52":``,"ws-nowrap":``,p1:``,"text-center":``,"font-600":``},zi={key:4,role:`columnheader`,"rounded-tr-2":``,"bg-base":``,"flex-none":``,"min-w52":``,"ws-nowrap":``,p1:``,"text-center":``,"font-600":``},Bi={key:0,role:`cell`,flex:`~ items-center justify-center`,"flex-none":``,w32:``,"ws-nowrap":``,op80:``},Vi={key:1,role:`cell`,"flex-1":``,"min-w100":``,"text-left":``,"text-ellipsis":``,"line-clamp-2":``},Hi={key:2,role:`cell`,flex:`~ items-center justify-center`,"flex-none":``,"text-center":``,"text-sm":``,"w-27":``},Ui={key:3,role:`cell`,flex:`~ items-center justify-center`,"flex-none":``,"text-center":``,"font-mono":``,"text-sm":``,"min-w52":``,op80:``},Wi={key:4,role:`cell`,flex:`~ items-center justify-center`,"flex-none":``,"text-center":``,"font-mono":``,"text-sm":``,"min-w52":``,op80:``},Gi={key:1},Ki={p4:``},qi={"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},Ji={key:0},Yi={key:1},Xi=F({__name:`PluginDetailsTable`,props:{session:{},buildMetrics:{},selectedFields:{}},setup(e){let t=e,n={resolve:`Resolve Id`,load:`Load`,transform:`Transform`},r=R(()=>t.session.modulesList.map(e=>({mod:e,path:Ce(e.id,t.session.meta.cwd),type:ve(e.id)}))),i=R(()=>ge.filter(e=>r.value.some(t=>e.match.test(t.mod.id)))),a=c(Y.value.pluginDetailsModuleTypes??i.value.map(e=>e.name)),{state:o,next:s}=ee([``,`desc`,`asc`],{initialValue:Y.value.pluginDetailsDurationSortType}),l=R(()=>(o.value?[...t.buildMetrics.calls].sort((e,t)=>o.value===`asc`?e.duration-t.duration:t.duration-e.duration):t.buildMetrics.calls).filter(e=>{if(!e.module)return!1;let t=ve(e.module);return a.value.includes(t.name)}).filter(Y.value.pluginDetailSelectedHook?e=>e.type===Y.value.pluginDetailSelectedHook:Boolean).filter(e=>Y.value.pluginDetailsShowType===`all`||![`load`,`transform`].includes(Y.value.pluginDetailSelectedHook)?!0:Y.value.pluginDetailsShowType===`changed`?!e.unchanged:e.unchanged));function u(e){a.value?.includes(e.name)?a.value=a.value?.filter(t=>t!==e.name):a.value?.push(e.name),Y.value.pluginDetailsModuleTypes=a.value}function d(){s(),Y.value.pluginDetailsDurationSortType=o.value}return(t,r)=>{let s=be,c=xe,f=J,p=Se,m=Ue;return h(),G(`div`,Ei,[U(`div`,Di,[e.selectedFields.includes(`hookName`)?(h(),G(`div`,Oi,` Hook name `)):P(``,!0),e.selectedFields.includes(`module`)?(h(),G(`div`,ki,[U(`button`,Ai,[r[0]||=k(` Module `,-1),B(O(se),null,{popper:g(()=>[U(`div`,Mi,[(h(!0),G(M,null,N(i.value,e=>(h(),G(`label`,{key:e.name,border:`~ base rounded-md`,px2:``,py1:``,flex:`~ items-center gap-1`,"select-none":``,title:e.description,class:`cursor-pointer module-type-filter`},[U(`input`,{type:`checkbox`,mr1:``,checked:a.value?.includes(e.name),onChange:t=>u(e)},null,40,Pi),U(`div`,{class:W(e.icon),"icon-catppuccin":``},null,2),U(`div`,Fi,j(e.description||e.name),1)],8,Ni))),128))])]),default:g(()=>[U(`span`,ji,[U(`i`,{"text-xs":``,class:W([`i-ph-funnel-duotone`,a.value.length===i.value.length?`op50`:`text-primary op100`])},null,2)])]),_:1})])])):P(``,!0),e.selectedFields.includes(`duration`)?(h(),G(`div`,Ii,[U(`button`,{flex:`~ row gap1 items-center justify-center`,"w-full":``,onClick:d},[r[1]||=k(` Duration `,-1),U(`span`,Li,[U(`i`,{"text-xs":``,class:W([O(o)===`asc`?`i-ph-arrow-up-duotone`:`i-ph-arrow-down-duotone`,O(o)?`op100 text-primary`:`op50`])},null,2)])])])):P(``,!0),e.selectedFields.includes(`startTime`)?(h(),G(`div`,Ri,` Start Time `)):P(``,!0),e.selectedFields.includes(`endTime`)?(h(),G(`div`,zi,` End Time `)):P(``,!0)]),l.value.length&&e.selectedFields.length?(h(),E(m,{key:0,role:`rowgroup`,items:l.value,"key-prop":`id`},{default:g(({item:t,index:r})=>[U(`div`,{role:`row`,flex:`~ row`,class:W([`border-base border-b-1 border-dashed`,[r===l.value.length-1?`border-b-0`:``]])},[e.selectedFields.includes(`hookName`)?(h(),G(`div`,Bi,[B(s,{text:n[t.type]},null,8,[`text`])])):P(``,!0),e.selectedFields.includes(`module`)?(h(),G(`div`,Vi,[B(c,{id:t.module,"w-full":``,"border-none":``,"ws-nowrap":``,session:e.session,link:`/session/${e.session.id}/graph?module=${t.module}`,hover:`bg-active`,border:`~ base rounded`,block:``,px2:``,py1:``},null,8,[`id`,`session`,`link`])])):P(``,!0),e.selectedFields.includes(`duration`)?(h(),G(`div`,Hi,[B(f,{duration:t.duration},null,8,[`duration`])])):P(``,!0),e.selectedFields.includes(`startTime`)?(h(),G(`div`,Ui,[B(p,{timestamp:t.timestamp_start},null,8,[`timestamp`])])):P(``,!0),e.selectedFields.includes(`endTime`)?(h(),G(`div`,Wi,[B(p,{timestamp:t.timestamp_end},null,8,[`timestamp`])])):P(``,!0)],2)]),_:1},8,[`items`])):(h(),G(`div`,Gi,[U(`div`,Ki,[U(`div`,qi,[e.selectedFields.length?(h(),G(`p`,Yi,` No data `)):(h(),G(`p`,Ji,` No columns selected `))])])]))])}}}),Zi=Object.assign(Xi,{__name:`DataPluginDetailsTable`}),Qi={p2:``,"h-full":``,"w-full":``},$i={flex:`~`,border:`~ base`,"rounded-2":``,"h-full":``,relative:``,"of-hidden":``},ea={key:0,"of-hidden":``,border:`r base`},ta={px2:``,h10:``,border:`b base`,"bg-base":``,"rounded-t-2":``,flex:`~ items-center justify-end`},na={"flex-1":``,"of-y-auto":``,"h-full":``,flex:`~ col`},ra={flex:`~ items-center justify-between`,border:`b base`,px2:``,h10:``,"bg-base":``,"rounded-t-2":``,"of-x-auto":``,"ws-nowrap":``},ia={flex:`~ items-center`,"h-full":``},aa={key:0,flex:`~ items-center justify-center gap1`,"h-full":``,"text-xs":``,py1:``},oa={class:`op50`,flex:`~ items-center gap-1`},sa=[`title`],ca={class:`text-xs op50`},la={"flex-1":``,"of-y-auto":``,"overscroll-contain":``},ua=F({__name:`PluginFlow`,props:{session:{},buildMetrics:{}},setup(e){let t=e,[n,r]=b(!0),i=[{match:/hookName/,name:`hookName`,description:`Hook name`,icon:`i-ph-function-duotone`},{match:/module/,name:`module`,description:`Module`,icon:`i-ph-package-duotone`},{match:/duration/,name:`duration`,description:`Duration`,icon:`i-ph-clock-countdown-duotone`},{match:/startTime/,name:`startTime`,description:`Start Time`,icon:`i-ph-clock-duotone`},{match:/endTime/,name:`endTime`,description:`End Time`,icon:`i-ph-clock-duotone`}],a=c({selected:Y.value.pluginDetailsTableFields,search:!1}),o=R(()=>Y.value.pluginDetailsTableFields?Y.value.pluginDetailsTableFields:i.map(e=>e.name)),{state:s,next:l}=ee([`changed`,`unchanged`,`all`],{initialValue:Y.value.pluginDetailsShowType}),u=R(()=>s.value===`all`?`Show Changed`:s.value===`changed`?`Show Unchanged`:`Show All`),d=R(()=>!(![`load`,`transform`].includes(Y.value.pluginDetailSelectedHook)||!t.buildMetrics.calls?.filter(e=>e.type===Y.value.pluginDetailSelectedHook).filter(e=>e.unchanged).length)),f=R(()=>{let e=t.buildMetrics.calls?.filter(e=>e.type===Y.value.pluginDetailSelectedHook).filter(e=>e.unchanged),n=e.reduce((e,t)=>e+t.duration,0);return{count:e.length,duration:n}});p(()=>a.value.selected,e=>{Y.value.pluginDetailsTableFields=e});function m(){l(),Y.value.pluginDetailsShowType=s.value}return(t,s)=>{let c=Ti,l=He,p=je,_=J,v=Zi;return h(),G(`div`,Qi,[U(`div`,$i,[O(n)?(h(),G(`div`,ea,[B(c,{session:e.session,"build-metrics":e.buildMetrics},{header:g(()=>[U(`div`,ta,[U(`button`,{w8:``,h8:``,"rounded-full":``,"cursor-pointer":``,hover:`bg-active`,flex:`~ items-center justify-center`,onClick:s[0]||=e=>O(r)(!1)},[...s[3]||=[U(`i`,{"i-ph-sidebar-simple-duotone":``,"inline-flex":``,op50:``},null,-1)]])])]),_:1},8,[`session`,`build-metrics`])])):P(``,!0),U(`div`,na,[U(`div`,ra,[U(`div`,ia,[O(n)?P(``,!0):(h(),G(`button`,{key:0,w8:``,h8:``,"rounded-full":``,"cursor-pointer":``,mr1:``,hover:`bg-active`,flex:`~ items-center justify-center`,onClick:s[1]||=e=>O(r)(!0)},[...s[4]||=[U(`i`,{"i-ph-sidebar-duotone":``,"inline-flex":``,op50:``},null,-1)]])),B(l,{modelValue:a.value,"onUpdate:modelValue":s[2]||=e=>a.value=e,"h-full":``,"border-none":``,"selected-container-class":`px0! py1 border-none bg-none flex-nowrap! h-full`,rules:i,class:`[&_[icon-catppuccin]]:filter-none!`},null,8,[`modelValue`])]),d.value?(h(),G(`div`,aa,[U(`p`,oa,[B(p,{number:f.value.count},null,8,[`number`]),s[5]||=k(` module unchanged, but cost `,-1),B(_,{duration:f.value.duration},null,8,[`duration`])]),U(`button`,{"rounded-md":``,px2:``,py1:``,"select-none":``,"h-full":``,border:`~ base rounded-lg`,hover:`bg-active`,title:u.value,onClick:m},[U(`div`,ca,j(u.value),1)],8,sa)])):P(``,!0)]),U(`div`,la,[B(v,{session:e.session,"build-metrics":e.buildMetrics,"selected-fields":o.value},null,8,[`session`,`build-metrics`,`selected-fields`])])])])])}}}),da=Object.assign(ua,{__name:`FlowmapPluginFlow`}),fa={grid:`~ cols-[max-content_1fr] gap-2`,p4:``},pa={flex:`~ col gap-4`},ma={key:0,grid:`~ cols-[300px_1fr] gap-1`},ha=[`onClick`],ga={key:0,hover:`bg-active`,class:`flex gap2 items-center pl2`},_a={"font-mono":``,"text-sm":``},va=[`onClick`],ya=[`title`],ba=F({__name:`Sunburst`,props:{graph:{},selected:{},session:{}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=l(`el`);return fe(()=>i.value?.append(n.graph.el)),(t,n)=>{let a=Le,s=xe,c=J,l=u(`tooltip`);return h(),G(`div`,fa,[U(`div`,{ref_key:`el`,ref:i,"w-500px":``},null,512),U(`div`,pa,[B(a,{border:`b base`,py2:``,selected:e.selected,options:e.graph.options,onSelect:n[0]||=e=>r(`select`,e)},null,8,[`selected`,`options`]),e.selected?(h(),G(`div`,ma,[(h(!0),G(M,null,N(e.selected.children,t=>(h(),G(M,{key:t.id},[U(`button`,{"ws-nowrap":``,"text-nowrap":``,"text-left":``,"overflow-hidden":``,"text-ellipsis":``,"text-sm":``,hover:`bg-active`,rounded:``,px2:``,onClick:e=>r(`select`,t)},[t.meta?.type===`hook`?(h(),G(`div`,ga,[n[1]||=U(`i`,{class:`i-ph-function-duotone inline-flex`},null,-1),U(`span`,_a,j(t.text),1)])):(h(),E(s,{key:1,id:t.text,"w-full":``,"border-none":``,"ws-nowrap":``,session:e.session,hover:`bg-active`,border:`~ base rounded`,block:``,px2:``,py1:``},null,8,[`id`,`session`]))],8,ha),U(`button`,{relative:``,flex:`~ gap-1 items-center`,hover:`bg-active`,rounded:``,onClick:e=>r(`select`,t)},[U(`div`,{"h-5":``,rounded:``,shadow:``,border:`~ base`,style:H({background:O(Re)(e.graph.options.getColor?.(t)||`#000`),width:`${t.size/e.selected.size*100}%`})},null,4),B(c,{duration:t.size,"text-xs":``},null,8,[`duration`]),t.children.length>0&&t.meta?.type!==`hook`?o((h(),G(`div`,{key:0,title:`${t.children.length} dependencies`,"text-xs":``,"op-fade":``},[k(` (`+j(t.children.length)+`) `,1)],8,ya)),[[l,`${t.children.length} dependencies`]]):P(``,!0)],8,va)],64))),128))])):P(``,!0)])])}}}),xa=Object.assign(ba,{__name:`PluginsSunburst`}),Sa={key:1,relative:``,"h-full":``,"w-full":``},Ca={"bg-glass":``,absolute:``,"left-2":``,"top-2":``,"z-panel-content":``,p2:``,border:`~ base rounded-lg`,flex:`~ col gap-2`},wa={"font-mono":``,px1:``},Ta={"text-xs":``,"font-mono":``,flex:`~ items-center gap-3`,ml2:``},Ea={flex:`~ gap-2`},Da={"of-auto":``,"h-full":``,"pt-30":``},Oa={key:2,flex:`~ items-center justify-center`,"w-full":``,"h-full":``},ka={key:0,border:`~ base`,"rounded-lg":``,"shadow-lg":``,px3:``,py2:``,"bg-glass":``,"pointer-events-none":``,"text-sm":``,"max-w-80":``},Aa={key:0,flex:`~ items-center gap2`},ja={key:0,flex:`~`,"font-semibold":``,"font-mono":``,"text-base":``,mb2:``},Ma={key:1,border:`t base`,pt2:``,flex:`~ col gap-1.5`,"min-w-48":``},Na={flex:`~ justify-between items-center`,py1:``},Pa=[`datetime`],Fa={flex:`~ justify-between items-center`,py1:``},Ia=[`datetime`],La={flex:`~ justify-between items-center`,py1:``,border:`t base dashed`,pt2:``},Ra={key:2},za=F({__name:`PluginDetailsLoader`,props:{plugin:{},session:{}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=_(),a=ue(),{state:o,isLoading:s}=T(async()=>await a.value.$call(`vite:rolldown:get-plugin-details`,{session:n.session.id,id:i.query.plugin}),null),c=R(()=>{let e=new Set;return o.value?.calls?.filter(t=>e.has(t.module)?!1:(e.add(t.module),!0))??[]}),l=R(()=>o.value?.loadMetrics.reduce((e,t)=>e+t.duration,0)),u=R(()=>o.value?.transformMetrics.reduce((e,t)=>e+t.duration,0)),d=R(()=>o.value?.resolveIdMetrics.reduce((e,t)=>e+t.duration,0)),f=R(()=>o.value?.calls?.reduce((e,t)=>e+t.duration,0)),m=R(()=>n.session.modulesList.map(e=>({mod:e,path:Ce(e.id,n.session.meta.cwd),type:ve(e.id)}))),v=R(()=>ge.filter(e=>m.value.some(t=>e.match.test(t.mod.id)))),y=R(()=>{let e=new Map;if(!o.value)return{root:t({id:`~root`,text:`Project`,children:[]}),map:new Map,maxDepth:3};function t(t,n){e.set(t.id,t);let r=Be(t,n,(e,t)=>(t?.meta?.duration??0)-(e?.meta?.duration??0));return r.children&&r.children.forEach(e=>{e.parent=r}),r}function n(e,n){let r=n.filter(e=>!v.value.some(t=>ve(e.module).name===t.name));return[...v.value.map((r,i)=>{let a=n.filter(e=>ve(e.module).name===r.name);return t({id:`${e}-${r.name}-${i}`,text:r.description,children:a.map((n,r)=>t({id:`${e}-${r}`,text:n.module,size:n.duration,meta:n})),meta:{type:`module`,title:r.description,id:`${e}-${r.name}-${i}`,duration:a.reduce((e,t)=>e+t.duration,0)}})}),t({id:`${e}-other`,text:`Other`,children:r.map((n,r)=>t({id:`${e}-other-${r}`,text:n.module,size:n.duration,meta:n})),meta:{type:`module`,title:`Other`,id:`${e}-other`,duration:r.reduce((e,t)=>e+t.duration,0)}})]}let r=n(`resolveId`,o.value.resolveIdMetrics),i=n(`loads`,o.value.loadMetrics),a=n(`transforms`,o.value.transformMetrics);function s(e,n,r){return t({id:e,text:n,children:r.sort((e,t)=>t.size-e.size),meta:{id:e,type:`hook`,title:n,duration:{"~loads":l.value,"~resolves":d.value,"~transforms":u.value}[e]}})}return{root:t({id:`~root`,text:`Project`,children:[s(`~resolves`,`Resolve Id`,r),s(`~loads`,`Load`,i),s(`~transforms`,`Transform`,a)]}),map:e,maxDepth:3}}),b=re(z()),{tree:x,chartOptions:S,graph:C,nodeHover:w,nodeSelected:D,selectedNode:A,selectNode:N,buildGraph:ee}=Ve({data:[],tree:y,nameKey:`id`,sizeKey:`duration`,rootText:`Project`,graphOptions:{onClick(e){e&&(w.value=e),A.value=e.meta},onHover(e){e&&(w.value=e),e===null&&(w.value=void 0)},onLeave(){w.value=void 0},onSelect(e){D.value=e||x.value.root,A.value=e?.meta},getSubtext(e){return me(e.size,!0)}},onUpdate(){C.value=new Ie(x.value.root,S.value)}});return p(()=>Y.value.pluginDetailsViewType,()=>{ee()}),(t,n)=>{let i=ce,a=at,p=Pe,m=J,_=je,v=da,y=xa,x=xe,S=Fe;return h(),G(M,null,[O(s)?(h(),E(i,{key:0})):O(o)?.calls?.length?(h(),G(`div`,Sa,[B(a,{absolute:``,"right-2":``,"top-1.5":``,onClick:n[0]||=e=>r(`close`)}),U(`div`,Ca,[U(`div`,wa,[B(p,{name:O(o)?.plugin_name},null,8,[`name`])]),U(`div`,Ta,[B(m,{duration:d.value,flex:`~ gap-1 items-center`,title:`Resolve Id hooks cost: ${O(me)(d.value,!0)}`},{default:g(()=>[...n[3]||=[U(`span`,{"i-ph-magnifying-glass-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),B(m,{duration:l.value,flex:`~ gap-1 items-center`,title:`Load hooks cost: ${O(me)(l.value,!0)}`},{default:g(()=>[...n[4]||=[U(`span`,{"i-ph-upload-simple-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),B(m,{duration:u.value,flex:`~ gap-1 items-center`,title:`Transform hooks cost: ${O(me)(u.value,!0)}`},{default:g(()=>[...n[5]||=[U(`span`,{"i-ph-magic-wand-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),n[7]||=U(`span`,{op40:``},`|`,-1),B(m,{duration:f.value,flex:`~ gap-1 items-center`,title:`Total build cost: ${O(me)(f.value,!0)}`},{default:g(()=>[...n[6]||=[U(`span`,{"i-ph-clock-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),n[8]||=U(`span`,{op40:``},`|`,-1),B(_,{number:c.value.length,icon:`i-catppuccin-java-class-abstract`,color:`transparent color-scale-neutral`,title:`Module processed: ${c.value.length}`},null,8,[`number`,`title`]),n[9]||=U(`span`,{op40:``},`|`,-1),B(_,{number:O(o)?.calls?.length??0,icon:`i-ph-arrow-counter-clockwise`,color:`transparent color-scale-neutral`,title:`Total calls: ${O(o)?.calls?.length??0}`},null,8,[`number`,`title`])]),U(`div`,Ea,[U(`button`,{class:W(O(Y).pluginDetailsViewType===`flow`?`text-primary`:``),flex:`~ gap-2 items-center justify-center`,px2:``,py1:``,"w-40":``,border:`~ base rounded-lg`,hover:`bg-active`,onClick:n[1]||=e=>O(Y).pluginDetailsViewType=`flow`},[...n[10]||=[U(`div`,{"i-ph-git-branch-duotone":``,"rotate-180":``},null,-1),k(` Build Flow `,-1)]],2),U(`button`,{class:W(O(Y).pluginDetailsViewType===`sunburst`?`text-primary`:``),flex:`~ gap-2 items-center justify-center`,px2:``,py1:``,"w-40":``,border:`~ base rounded-lg`,hover:`bg-active`,onClick:n[2]||=e=>O(Y).pluginDetailsViewType=`sunburst`},[...n[11]||=[U(`div`,{"i-ph-chart-sunburst-duotone":``},null,-1),k(` Sunburst `,-1)]],2)])]),U(`div`,Da,[O(Y).pluginDetailsViewType===`flow`?(h(),E(v,{key:0,session:e.session,"build-metrics":O(o)},null,8,[`session`,`build-metrics`])):P(``,!0),O(Y).pluginDetailsViewType===`sunburst`&&O(C)?(h(),E(y,{key:1,graph:O(C),session:e.session,selected:O(D),onSelect:O(N)},null,8,[`graph`,`session`,`selected`,`onSelect`])):P(``,!0)])])):(h(),G(`div`,Oa,[...n[12]||=[U(`span`,{italic:``,op50:``},` No data `,-1)]])),B(S,{"hover-x":b.x,"hover-y":b.y},{default:g(()=>[O(w)?(h(),G(`div`,ka,[O(w).meta?.title?(h(),G(`div`,Aa,[k(j(O(w).meta.title)+` `,1),B(m,{duration:O(w).meta.duration},null,8,[`duration`])])):(h(),G(M,{key:1},[O(w).meta?.module?(h(),G(`div`,ja,[B(x,{id:O(w).meta.module,session:e.session,link:!1},null,8,[`id`,`session`])])):P(``,!0),O(w).meta?.module?(h(),G(`div`,Ma,[U(`div`,Na,[n[13]||=U(`label`,{"text-xs":``,"opacity-70":``},`Start Time`,-1),U(`time`,{datetime:new Date(O(w).meta.timestamp_start).toISOString(),"font-mono":``,text:`xs`,bg:`base/10`,"px1.5":``,"py0.5":``,rounded:``},j(O(he)(O(w).meta.timestamp_start)),9,Pa)]),U(`div`,Fa,[n[14]||=U(`label`,{"text-xs":``,"opacity-70":``},`End Time`,-1),U(`time`,{datetime:new Date(O(w).meta.timestamp_end).toISOString(),"font-mono":``,text:`xs`,bg:`base/10`,"px1.5":``,"py0.5":``,rounded:``},j(O(he)(O(w).meta.timestamp_end)),9,Ia)]),U(`div`,La,[n[15]||=U(`label`,{text:`xs`,op70:``},`Duration`,-1),B(m,{duration:O(w).meta.duration},null,8,[`duration`])])])):(h(),G(`div`,Ra,[B(m,{duration:O(w).meta?.duration},null,8,[`duration`])]))],64))])):P(``,!0)]),_:1},8,[`hover-x`,`hover-y`])],64)}}}),Ba=Object.assign(za,{__name:`DataPluginDetailsLoader`}),Va={key:1,p4:``,relative:``,"h-full":``,"w-full":``,"of-auto":``,"z-panel-content":``},Ha=F({__name:`ChunkDetailsLoader`,props:{chunk:{},session:{}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=ue(),{state:a,isLoading:o}=T(async()=>await i.value.$call(`vite:rolldown:get-chunk-info`,{session:n.session.id,id:n.chunk}),null);return(t,n)=>{let i=ce,s=at,c=Ae;return h(),G(M,null,[O(o)?(h(),E(i,{key:0})):P(``,!0),O(a)?(h(),G(`div`,Va,[B(c,{session:e.session,chunk:O(a)},{default:g(()=>[B(s,{onClick:n[0]||=e=>r(`close`)})]),_:1},8,[`session`,`chunk`])])):P(``,!0)],64)}}}),Ua=Object.assign(Ha,{__name:`DataChunkDetailsLoader`}),Wa={key:1,p4:``,relative:``,"h-full":``,"w-full":``,"of-auto":``,"z-panel-content":``},Ga={flex:`~ col gap-3`},Ka=[`title`],qa={flex:`~ items-center gap-1`},Ja={open:`true`},Ya={op50:``},Xa={"inline-flex":``},Za={open:`true`},Qa={op50:``},$a=F({__name:`PackageDetailsLoader`,props:{session:{},package:{}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=R(()=>{let[,e,t]=n.package.match(/^(@?[^@]+)@(.+)$/);return{name:e,version:t}}),a=ue(),{state:o,isLoading:s}=T(async()=>await a.value.$call(`vite:rolldown:get-package-details`,{session:n.session.id,id:n.package}),null),c=R(()=>o.value?.files?.filter(e=>!!e.transformedCodeSize)??[]),l=R(()=>{let e=new Map;return o.value?.files.filter(e=>!!e.importers).flatMap(e=>e.importers).filter(e=>!e.path.startsWith(o.value?.dir??``)).forEach(t=>{e.set(t.path,t)}),Array.from(e.values())});function u(){let e=`https://www.npmjs.com/package/${i.value.name}`;window.open(e,`_blank`)}return(t,n)=>{let a=ce,d=We,f=Ee,p=at,m=xe,_=Oe,v=be;return h(),G(M,null,[O(s)?(h(),E(a,{key:0})):P(``,!0),O(o)?(h(),G(`div`,Wa,[U(`div`,Ga,[U(`div`,{flex:`~ gap-3 items-center`,title:e.package},[U(`div`,qa,[U(`div`,null,[B(d,{name:i.value.name},null,8,[`name`])]),B(f,{bytes:O(o).transformedCodeSize},null,8,[`bytes`])]),n[2]||=U(`div`,{"flex-auto":``},null,-1),U(`button`,{"btn-action":``,flex:`~ items-center`,onClick:u},[...n[1]||=[U(`div`,{"i-ph-arrow-square-out-duotone":``},null,-1),k(` Open in npm `,-1)]]),B(p,{onClick:n[0]||=e=>r(`close`)})],8,Ka),U(`details`,Ja,[U(`summary`,Ya,[U(`span`,null,`Bundled Files (`+j(c.value.length)+`)`,1)]),B(_,{flex:`~ col gap-1`,mt2:``,"ws-nowrap":``,list:c.value},{default:g(({items:t})=>[(h(!0),G(M,null,N(t,t=>(h(),G(`div`,{key:t.path,flex:`~ row gap-1 items-center nowrap`,hover:`bg-active`,border:`~ base rounded`,px2:``,py1:``,"w-full":``},[B(m,{id:t.path,session:e.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``,cwd:O(o).dir},null,8,[`id`,`session`,`cwd`]),U(`span`,Xa,[B(f,{bytes:t.transformedCodeSize,"text-xs":``},null,8,[`bytes`])])]))),128))]),_:1},8,[`list`])]),U(`details`,Za,[U(`summary`,Qa,[U(`span`,null,`Importers (`+j(l.value.length)+`)`,1)]),B(_,{flex:`~ col gap-1`,mt2:``,"ws-nowrap":``,list:l.value},{default:g(({items:t})=>[(h(!0),G(M,null,N(t,t=>(h(),G(`div`,{key:t.path,flex:`~ row gap-1 items-center nowrap`,hover:`bg-active`,border:`~ base rounded`,px2:``,py1:``,"w-full":``},[B(m,{id:t.path,session:e.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``},null,8,[`id`,`session`]),t.version?(h(),E(v,{key:0,text:`v${t.version}`,as:`span`},null,8,[`text`])):P(``,!0)]))),128))]),_:1},8,[`list`])])])])):P(``,!0)],64)}}}),eo=Object.assign($a,{__name:`DataPackageDetailsLoader`}),to={key:1,grid:`~ cols-[max-content_1fr]`,"h-screen":``,"w-screen":``,"max-w-screen":``,"max-h-screen":``,"of-hidden":``},no={"of-auto":``,"h-screen":``,"max-h-screen":``,relative:``},ro=F({__name:`[session]`,setup(e){let t=_().params,r=c(!0),i=re({id:R(()=>t.session),meta:void 0,modulesList:y([]),buildDuration:0}),o=ue(),s=a(),l=_(),u=R(()=>[`module`,`asset`,`plugin`,`chunk`,`package`].find(e=>l.query[e]!==void 0));function d(){u.value&&s.replace({query:{...l.query,[u.value]:void 0}})}return L(`Escape`,e=>{e.preventDefault(),!(!e.isTrusted||e.repeat)&&d()}),q(()=>i.meta?[{title:`Home`,to:`/session/${i.id}`,icon:`i-ph-house-duotone`},{title:`Modules Graph`,to:`/session/${i.id}/graph`,icon:`i-ph-graph-duotone`,category:`session`},{title:`Plugins`,to:`/session/${i.id}/plugins`,icon:`i-ph-plugs-duotone`,category:`session`},{title:`Chunks`,to:`/session/${i.id}/chunks`,icon:`i-ph-shapes-duotone `,category:`session`},{title:`Assets`,to:`/session/${i.id}/assets`,icon:`i-ph-files-duotone`,category:`session`},{title:`Packages`,to:`/session/${i.id}/packages`,icon:`i-ph-package-duotone`,category:`session`}]:[]),n(async()=>{let e=await o.value.$call(`vite:rolldown:get-session-summary`,{session:t.session});i.meta=e.meta,i.modulesList=e.modules.map(e=>({id:e.id,fileType:_e(e.id).name,imports:e.imports??[],importers:e.importers??[],buildMetrics:e.build_metrics})),i.buildDuration=e.build_duration,r.value=!1}),(e,t)=>{let n=ce,a=nt,o=C,s=ci,c=di,f=Ba,p=Ua,m=eo;return r.value?(h(),E(n,{key:0})):(h(),G(`div`,to,[B(a),U(`div`,no,[B(o,{session:i},null,8,[`session`])]),u.value?(h(),G(`div`,{key:0,fixed:``,"inset-0":``,"backdrop-blur-8":``,"backdrop-brightness-95":``,"z-panel-content":``,onClick:ie(d,[`self`])},[u.value===`module`?(h(),G(`div`,{key:O(l).query.module,fixed:``,"right-0":``,"bottom-0":``,"top-20":``,"left-20":``,"z-panel-content":``,"bg-glass":``,border:`l t base rounded-tl-xl`},[B(s,{module:O(l).query.module,session:i,onClose:d},null,8,[`module`,`session`])])):P(``,!0),u.value===`asset`?(h(),G(`div`,{key:O(l).query.asset,fixed:``,"right-0":``,"bottom-0":``,"top-30":``,"z-panel-content":``,"of-hidden":``,"bg-glass":``,border:`l t base rounded-tl-xl`,class:`left-20 xl:left-100 2xl:left-150`},[B(c,{asset:O(l).query.asset,session:i,onClose:d},null,8,[`asset`,`session`])])):P(``,!0),u.value===`plugin`?(h(),G(`div`,{key:O(l).query.plugin,fixed:``,"right-0":``,"bottom-0":``,"top-20":``,"left-20":``,"z-panel-content":``,"bg-glass":``,border:`l t base rounded-tl-xl`},[B(f,{plugin:O(l).query.plugin,session:i,onClose:d},null,8,[`plugin`,`session`])])):P(``,!0),u.value===`chunk`?(h(),G(`div`,{key:O(l).query.chunk,fixed:``,"right-0":``,"bottom-0":``,"top-20":``,"z-panel-content":``,"bg-glass":``,border:`l t base rounded-tl-xl`,class:`left-20 xl:left-100 2xl:left-150`},[B(p,{chunk:Number(O(l).query.chunk),session:i,onClose:d},null,8,[`chunk`,`session`])])):P(``,!0),u.value===`package`?(h(),G(`div`,{key:O(l).query.package,fixed:``,"right-0":``,"bottom-0":``,"top-20":``,"z-panel-content":``,"bg-glass":``,border:`l t base rounded-tl-xl`,class:`left-20 xl:left-100 2xl:left-150`},[B(m,{package:O(l).query.package,session:i,onClose:d},null,8,[`package`,`session`])])):P(``,!0)])):P(``,!0)]))}}});export{ro as default};