@vitejs/devtools 0.0.0-alpha.0 → 0.0.0-alpha.1

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 (62) hide show
  1. package/dist/{functions-CKJw6Oxo.mjs → cli-B_fm1Ing.mjs} +209 -236
  2. package/dist/cli.mjs +2 -2
  3. package/dist/functions-BdbZxtmk.mjs +3 -0
  4. package/dist/functions-d6vvbndK.mjs +234 -0
  5. package/dist/index.d.mts +1 -1
  6. package/dist/nitro.json +3 -3
  7. package/dist/node/cli.mjs +2 -2
  8. package/dist/public/200.html +9 -18
  9. package/dist/public/404.html +9 -18
  10. package/dist/public/_nuxt/B4lqwDon.js +1 -0
  11. package/dist/public/_nuxt/{CcGHFnjf.js → BMB3EEfo.js} +1 -1
  12. package/dist/public/_nuxt/BYYDnj5Q.js +1 -0
  13. package/dist/public/_nuxt/BeSFnMzD.js +1 -0
  14. package/dist/public/_nuxt/BfzgVO01.js +1 -0
  15. package/dist/public/_nuxt/BpyJ-U40.js +1 -0
  16. package/dist/public/_nuxt/BxkFQq1F.js +1 -0
  17. package/dist/public/_nuxt/C1DPtPHu.js +1 -0
  18. package/dist/public/_nuxt/C8oXVTvZ.js +1 -0
  19. package/dist/public/_nuxt/CWPvh8od.js +1 -0
  20. package/dist/public/_nuxt/CiwsH4Q6.js +33 -0
  21. package/dist/public/_nuxt/CsnZqsGp.js +16 -0
  22. package/dist/public/_nuxt/CzEHI6hC.js +1 -0
  23. package/dist/public/_nuxt/D-iXojuv.js +1 -0
  24. package/dist/public/_nuxt/DHpfOFMA.js +1 -0
  25. package/dist/public/_nuxt/DsbJux3u.js +1 -0
  26. package/dist/public/_nuxt/builds/latest.json +1 -1
  27. package/dist/public/_nuxt/builds/meta/3597016d-955b-44d8-83dd-f083d7311779.json +1 -0
  28. package/dist/public/_nuxt/diff.worker-9IK9E-UB.js +10 -0
  29. package/dist/public/_nuxt/entry.BHghYYEP.css +1 -0
  30. package/dist/public/_nuxt/error-404.7Y6KY23b.css +1 -0
  31. package/dist/public/_nuxt/error-500.CaUb23JJ.css +1 -0
  32. package/dist/public/_nuxt/{flow.CT0fChr5.css → graph.BGBTj9Q7.css} +1 -1
  33. package/dist/public/favicon.svg +15 -0
  34. package/dist/public/index.html +9 -18
  35. package/dist/public/vite-devtools.svg +17 -0
  36. package/package.json +15 -13
  37. package/dist/cli-CkEkRmBL.mjs +0 -176
  38. package/dist/functions-peYM_6iz.mjs +0 -3
  39. package/dist/public/_nuxt/B0gvptKi.js +0 -1
  40. package/dist/public/_nuxt/B1XPhBbs.js +0 -4
  41. package/dist/public/_nuxt/B4YzJ31L.js +0 -1
  42. package/dist/public/_nuxt/BHxVjsIi.js +0 -1
  43. package/dist/public/_nuxt/BKXf1uMu.js +0 -1
  44. package/dist/public/_nuxt/BKZ3jkBI.js +0 -1
  45. package/dist/public/_nuxt/Bnn-hxaI.js +0 -1
  46. package/dist/public/_nuxt/BrR0v-Bn.js +0 -1
  47. package/dist/public/_nuxt/BuzEimhA.js +0 -33
  48. package/dist/public/_nuxt/C4K5k6WM.js +0 -1
  49. package/dist/public/_nuxt/COxwzm_n.js +0 -12
  50. package/dist/public/_nuxt/CaCHQCx7.js +0 -1
  51. package/dist/public/_nuxt/CmTKMvEX.js +0 -1
  52. package/dist/public/_nuxt/CwDtpcut.js +0 -1
  53. package/dist/public/_nuxt/DKLzMrv9.js +0 -1
  54. package/dist/public/_nuxt/I6F6kbCC.js +0 -1
  55. package/dist/public/_nuxt/WiKH-0vv.js +0 -1
  56. package/dist/public/_nuxt/YnXJxoTD.js +0 -1
  57. package/dist/public/_nuxt/builds/meta/4e2f12bf-362f-48e3-9beb-2b83e6e986dc.json +0 -1
  58. package/dist/public/_nuxt/diff.worker-394KunD7.js +0 -4
  59. package/dist/public/_nuxt/entry.DadeTU15.css +0 -1
  60. package/dist/public/_nuxt/error-404.RpxUbdEP.css +0 -1
  61. package/dist/public/_nuxt/error-500.tfCn4Lmz.css +0 -1
  62. package/dist/public/_nuxt/kgs9XIg8.js +0 -1
@@ -0,0 +1,33 @@
1
+ import{Fragment as e,Loading_default as t,Lt as n,Teleport as r,__plugin_vue_export_helper_default as i,computed as a,computedAsync as o,computedWithControl as s,createBaseVNode as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createSlots as f,createTextVNode as p,createVNode as m,defineComponent as h,isClient as g,isIOS as _,isObject as v,nextTick as y,noop as b,normalizeClass as x,normalizeStyle as S,onMounted as C,openBlock as w,reactive as T,ref as E,renderList as D,renderSlot as O,shallowReactive as k,shallowRef as A,toArray as j,toDisplayString as M,toRef as ee,toRefs as te,toValue as N,tryOnScopeDispose as P,unref as F,useEventListener as I,useLocalStorage as L,useRoute as R,useRouter as z,useRpc as B,useTemplateRef as V,vModelText as ne,vShow as H,watch as re,watchDebounced as ie,watchEffect as ae,watchImmediate as oe,withCtx as U,withDirectives as se}from"./CsnZqsGp.js";import{getFileTypeFromModuleId as ce,getFileTypeFromName as le,makeCachedFunction as W}from"./BpyJ-U40.js";import{ModuleId_default as ue,relative as de}from"./B4lqwDon.js";import"./CzEHI6hC.js";import{PluginName_default as fe}from"./BMB3EEfo.js";var pe=Object.create,me=Object.defineProperty,he=Object.getOwnPropertyDescriptor,ge=Object.getOwnPropertyNames,_e=Object.getPrototypeOf,ve=Object.prototype.hasOwnProperty,G=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ye=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=ge(t),a=0,o=i.length,s;a<o;a++)s=i[a],!ve.call(e,s)&&s!==n&&me(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=he(t,s))||r.enumerable});return e},be=(e,t,n)=>(n=e==null?{}:pe(_e(e)),ye(t||!e||!e.__esModule?me(n,`default`,{value:e,enumerable:!0}):n,e));const xe={flex:`~ col gap-2`,p4:``};var Se=h({__name:`FlatList`,props:{session:{},modules:{}},setup(t){return(t,n)=>{let r=ue;return w(),d(`div`,xe,[(w(!0),d(e,null,D(t.modules,e=>(w(),l(r,{key:e,id:e.id,session:t.session,hover:`bg-active`,block:``,px2:``,p1:``,border:`~ base rounded`,link:!0},null,8,[`id`,`session`]))),128))])}}}),Ce=Se;function we(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function K(){return this.eachAfter(we)}function Te(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function q(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function Ee(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function De(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function Oe(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function ke(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Ae(e){for(var t=this,n=je(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function je(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function Me(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function Ne(){return Array.from(this)}function Pe(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function Fe(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*Ie(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function Le(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Be)):t===void 0&&(t=ze);for(var n=new Ue(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new Ue(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(He)}function Re(){return Le(this).eachBefore(Ve)}function ze(e){return e.children}function Be(e){return Array.isArray(e)?e[1]:null}function Ve(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function He(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Ue(e){this.data=e,this.depth=this.height=0,this.parent=null}Ue.prototype=Le.prototype={constructor:Ue,count:K,each:Te,eachAfter:Ee,eachBefore:q,find:De,sum:Oe,sort:ke,path:Ae,ancestors:Me,descendants:Ne,leaves:Pe,links:Fe,copy:Re,[Symbol.iterator]:Ie};function We(e,t){return e.parent===t.parent?1:2}function Ge(e){var t=e.children;return t?t[0]:e.t}function Ke(e){var t=e.children;return t?t[t.length-1]:e.t}function qe(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function Je(e){for(var t=0,n=0,r=e.children,i=r.length,a;--i>=0;)a=r[i],a.z+=t,a.m+=t,t+=a.s+(n+=a.c)}function Ye(e,t,n){return e.a.parent===t.parent?e.a:n}function Xe(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}Xe.prototype=Object.create(Ue.prototype);function Ze(e){for(var t=new Xe(e,0),n,r=[t],i,a,o,s;n=r.pop();)if(a=n._.children)for(n.children=Array(s=a.length),o=s-1;o>=0;--o)r.push(i=n.children[o]=new Xe(a[o],o)),i.parent=n;return(t.parent=new Xe(null,0)).children=[t],t}function Qe(){var e=We,t=1,n=1,r=null;function i(i){var s=Ze(i);if(s.eachAfter(a),s.parent.m=-s.z,s.eachBefore(o),r)i.eachBefore(c);else{var l=i,u=i,d=i;i.eachBefore(function(e){e.x<l.x&&(l=e),e.x>u.x&&(u=e),e.depth>d.depth&&(d=e)});var f=l===u?1:e(l,u)/2,p=f-l.x,m=t/(u.x+f+p),h=n/(d.depth||1);i.eachBefore(function(e){e.x=(e.x+p)*m,e.y=e.depth*h})}return i}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){Je(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=s(t,i,t.parent.A||r[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(t,n,r){if(n){for(var i=t,a=t,o=n,s=i.parent.children[0],c=i.m,l=a.m,u=o.m,d=s.m,f;o=Ke(o),i=Ge(i),o&&i;)s=Ge(s),a=Ke(a),a.a=t,f=o.z+u-i.z-c+e(o._,i._),f>0&&(qe(Ye(o,t,r),t,f),c+=f,l+=f),u+=o.m,c+=i.m,d+=s.m,l+=a.m;o&&!Ke(a)&&(a.t=o,a.m+=u-l),i&&!Ge(s)&&(s.t=i,s.m+=c-d,r=t)}return r}function c(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function $e(e){return function(){return e}}const et=Math.PI,tt=2*et,nt=1e-6,rt=tt-nt;function it(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function at(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return it;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var ot=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?it:at(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>nt)if(!(Math.abs(u*s-c*l)>nt)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((et-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>nt&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>nt||Math.abs(this._y1-l)>nt)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%tt+tt),d>rt?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>nt&&this._append`A${n},${n},0,${+(d>=et)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function J(){return new ot}J.prototype=ot.prototype;function st(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new ot(t)}var ct=Array.prototype.slice;function lt(e){return e[0]}function ut(e){return e[1]}var dt=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function ft(e){return new dt(e,!0)}function pt(e){return new dt(e,!1)}function Y(e){return e.source}function X(e){return e.target}function mt(e){let t=Y,n=X,r=lt,i=ut,a=null,o=null,s=st(c);function c(){let c,l=ct.call(arguments),u=t.apply(this,l),d=n.apply(this,l);if(a??(o=e(c=s())),o.lineStart(),l[0]=u,o.point(+r.apply(this,l),+i.apply(this,l)),l[0]=d,o.point(+r.apply(this,l),+i.apply(this,l)),o.lineEnd(),c)return o=null,c+``||null}return c.source=function(e){return arguments.length?(t=e,c):t},c.target=function(e){return arguments.length?(n=e,c):n},c.x=function(e){return arguments.length?(r=typeof e==`function`?e:$e(+e),c):r},c.y=function(e){return arguments.length?(i=typeof e==`function`?e:$e(+e),c):i},c.context=function(t){return arguments.length?(t==null?a=o=null:o=e(a=t),c):a},c}function ht(){return mt(ft)}function gt(){return mt(pt)}const _t=[`width`,`height`],vt=[`d`,`stroke-dasharray`];var Z=h({__name:`Graph`,props:{session:{},modules:{}},setup(t){let n=t,r=E(`normal`),i=T({width:a(()=>r.value===`normal`?400:10),height:a(()=>r.value===`normal`?55:20),linkOffset:a(()=>r.value===`normal`?20:0),margin:a(()=>800),gap:a(()=>r.value===`normal`?150:100)}),o=V(`container`),s=E(!1),f=E(window.innerWidth),p=E(window.innerHeight),m=E(1),h=k(new Map),g=A([]),_=A([]),v=k(new Map),b=k(new Map),O=a(()=>{let e=new Map;for(let t of n.modules)e.set(t.id,t);return e}),j=a(()=>n.modules.filter(e=>e.importers.length===0)),M=ht().x(e=>e[0]).y(e=>e[1]),ee=gt().x(e=>e[0]).y(e=>e[1]);function te(){f.value=window.innerWidth,p.value=window.innerHeight;let e=new Set,t=Le({module:{id:`~root`}},t=>{if(t.module.id===`~root`)return j.value.forEach(t=>e.add(t)),j.value.map(e=>({module:e}));let n=t.module.imports.map(t=>{let n=O.value.get(t.id);if(n&&!e.has(n))return e.add(n),{module:n,import:t}}).filter(e=>e!==void 0);return n}),n=Qe().nodeSize([i.height,i.width+i.gap]);n(t);let r=t.descendants();for(let e of r)[e.x,e.y]=[e.y-i.width,e.x];let a=Math.min(...r.map(e=>e.x)),s=Math.min(...r.map(e=>e.y));if(a<i.margin)for(let e of r)e.x+=Math.abs(a)+i.margin;if(s<i.margin)for(let e of r)e.y+=Math.abs(s)+i.margin;g.value=r,v.clear();for(let e of r)v.set(e.data.module.id,e);let c=t.links().filter(e=>e.source.data.module.id!==`~root`).map(e=>({...e,import:e.source.data.import,id:`${e.source.data.module.id}|${e.target.data.module.id}`}));b.clear();for(let e of c)b.set(e.id,e);_.value=c,y(()=>{f.value=o.value.scrollWidth/m.value+i.margin,p.value=o.value.scrollHeight/m.value+i.margin,N(j.value[0].id,!1)})}function N(e,t=!0){let n=h.get(e);n?.scrollIntoView({block:`center`,inline:`center`,behavior:t?`smooth`:`instant`})}function P(e){return e.target.x<=e.source.x?ee({source:[e.source.x+i.width/2-i.linkOffset,e.source.y],target:[e.target.x-i.width/2+i.linkOffset,e.target.y]}):M({source:[e.source.x+i.width/2-i.linkOffset,e.source.y],target:[e.target.x-i.width/2+i.linkOffset,e.target.y]})}function L(e){return`stroke-#8882`}function R(){let e=0,t=0,n=20;I(o,`mousedown`,r=>{let i=o.value.getBoundingClientRect(),a=i.right-r.clientX,c=i.bottom-r.clientY;a<=n||c<=n||(s.value=!0,e=o.value.scrollLeft+r.pageX,t=o.value.scrollTop+r.pageY)}),I(`mouseleave`,()=>s.value=!1),I(`mouseup`,()=>s.value=!1),I(`mousemove`,n=>{s.value&&(n.preventDefault(),o.value.scrollLeft=e-n.pageX,o.value.scrollTop=t-n.pageY)})}return C(()=>{R(),re(()=>[n.modules,r.value],te,{immediate:!0})}),(t,n)=>{let a=ue;return w(),d(`div`,{ref_key:`container`,ref:o,"w-full":``,"h-screen":``,"of-scroll":``,relative:``,"select-none":``,class:x(s.value?`cursor-grabbing`:``)},[c(`div`,{absolute:``,"left-0":``,"top-0":``,style:S({width:`${f.value}px`,height:`${p.value}px`}),class:`bg-dots`},null,4),(w(),d(`svg`,{"pointer-events-none":``,absolute:``,"left-0":``,"top-0":``,"z-graph-link":``,width:f.value,height:p.value},[c(`g`,null,[(w(!0),d(e,null,D(_.value,e=>(w(),d(`path`,{key:e.id,d:P(e),class:x(L(e)),"stroke-dasharray":e.import?.kind===`dynamic-import`?`3 6`:void 0,fill:`none`},null,10,vt))),128))])],8,_t)),(w(!0),d(e,null,D(g.value,n=>(w(),d(e,{key:n.data.module.id},[n.data.module.id===`~root`?u(``,!0):(w(),l(a,{key:0,id:n.data.module.id,ref_for:!0,ref:e=>F(h).set(n.data.module.id,e?.$el),absolute:``,hover:`bg-active`,block:``,px2:``,p1:``,"bg-glass":``,"z-graph-node":``,border:`~ base rounded`,link:!0,session:t.session,pkg:n.data.module,minimal:!0,style:S({left:`${n.x}px`,top:`${n.y}px`,minWidth:r.value===`normal`?`${i.width}px`:void 0,transform:`translate(-50%, -50%)`,maxWidth:`400px`,maxHeight:`50px`,overflow:`hidden`})},null,8,[`id`,`session`,`pkg`,`style`]))],64))),128))],2)}}}),yt=Z;const bt={flex:`~ col`,relative:``};var xt=h({__name:`Node`,props:{lines:{},classNodeInline:{},classNodeOuter:{},classNodeInner:{},active:{type:Boolean}},setup(e){let t=e;return(e,n)=>(w(),d(`div`,bt,[t.lines?.top?(w(),d(`div`,{key:0,absolute:``,"top-0":``,"left-10":``,border:`r`,h:`1/2`,"max-h-4":``,"z-flowmap-line":``,class:x(e.active?`border-flow-line-active`:`border-flow-line`),style:S(typeof t.lines?.top==`number`?`height: ${t.lines.top}px`:``)},null,6)):u(``,!0),t.lines?.bottom?(w(),d(`div`,{key:1,absolute:``,"bottom-0":``,"left-10":``,border:`r`,h:`1/2`,"max-h-4":``,"z-flowmap-line":``,class:x(e.active?`border-flow-line-active`:`border-flow-line`),style:S(typeof t.lines?.bottom==`number`?`height: ${t.lines.bottom}px`:``)},null,6)):u(``,!0),O(e.$slots,`before`),c(`div`,{flex:`~`,class:x(t.classNodeInline)},[O(e.$slots,`inline-before`),c(`div`,{class:x([t.classNodeOuter,e.active?`border-flow-active`:`border-flow`]),border:`~ rounded-full`,"bg-base":``,"of-hidden":``},[O(e.$slots,`inner`,{},()=>[c(`div`,{px3:``,py1:``,class:x(t.classNodeInner),flex:`~ inline gap-2 items-center`},[O(e.$slots,`content`)],2)])],2),O(e.$slots,`inline-after`)],2),O(e.$slots,`after`)]))}}),St=xt;const Ct={block:``},wt={"ml-0.4":``,"text-xs":``,op75:``};var Tt=h({__name:`NumberWithUnit`,props:{number:{},unit:{}},setup(e){return(e,t)=>(w(),d(`span`,Ct,[c(`span`,null,M(e.number),1),c(`span`,wt,M(e.unit),1)]))}}),Et=Tt,Dt=h({__name:`Duration`,props:{duration:{},factor:{default:1},unit:{default:`ms`},color:{type:Boolean,default:!0}},setup(e){let t=e,n=a(()=>{if(t.duration!=null)return t.unit===`ns`?t.duration/1e3:t.duration});function r(e){return!t.color||e==null?``:(e*=t.factor,e<1?`op50`:e>1e4?`color-scale-critical`:e>1e3?`color-scale-high`:e>500?`color-scale-medium`:e>200?`color-scale-low`:`color-scale-neutral`)}let i=a(()=>n.value==null?[``,`-`]:n.value<1?[`<1`,`ms`]:n.value<1e3?[n.value.toFixed(0),`ms`]:n.value<1e3*60?[(n.value/1e3).toFixed(1),`s`]:[(n.value/1e3/60).toFixed(1),`min`]);return(e,t)=>{let a=Et;return w(),l(a,{class:x(r(n.value)),number:i.value[0],unit:i.value[1]},null,8,[`class`,`number`,`unit`])}}}),Ot=Dt;const kt=A(!1);I(window,[`pointerup`,`pointercancel`,`pointerleave`],()=>{kt.value=!1});const At={key:0,pl10:``},jt={op50:``},Mt={key:0,"text-xs":``,op50:``},Nt={key:1},Pt={"font-mono":``,"text-xs":``,flex:`~ gap-1 items-center`},Ft={"text-green":``},It={"text-red":``},Lt={flex:`~ gap-2 items-center`};var Rt=h({__name:`NodeModuleInfo`,props:{item:{},session:{},active:{type:Boolean}},emits:[`select`,`activate`],setup(t,{emit:n}){let r=t,i=n,o=a(()=>{switch(r.item.type){case`transform`:return r.item.source_from===r.item.source_to;case`load`:return r.item.source==null;default:return!1}});function s(){kt.value&&i(`select`,r.item)}function p(){i(`select`,r.item),kt.value=!0}let h=a(()=>{if(r.item.type!==`resolve`)return;let e=r.item.importer;return r.session.modulesList.find(t=>t.id===e)});return(t,n)=>{let r=Ot,a=fe,g=ue,_=St;return t.item.type===`transform_no_changes`||t.item.type===`load_no_changes`?(w(),d(`div`,At,[c(`div`,{flex:`~ gap-2 items-center`,"text-sm":``,border:`l`,py1:``,class:x(t.active?`border-flow-line-active`:`border-flow-line`)},[c(`div`,{"w-2":``,"h-2":``,border:`4`,"rounded-full":``,"ml--1":``,"translate-x--0.5px":``,class:x(t.active?`border-flow-line-active`:`border-flow-line`)},null,2),c(`span`,jt,M(t.item.count)+` plugins did not change the content but cost`,1),m(r,{duration:t.item.duration,color:!0,factor:5,"text-xs":``},null,8,[`duration`]),n[2]||=c(`span`,{op50:``},`in total`,-1),c(`button`,{border:`~ base rounded-full`,px2:``,"py-px":``,op50:``,hover:`op100`,onClick:n[0]||=e=>i(`activate`,t.item)},` Expand `)],2)])):(w(),l(_,{key:1,lines:{top:!0},"class-node-outer":o.value?`border-dashed`:``,active:t.active,"class-node-inline":`gap-2 items-center`,pl6:``,onPointerenter:s},f({inner:U(()=>[c(`button`,{px3:``,py1:``,hover:`bg-active`,flex:`~ inline gap-2 items-center`,onClick:n[1]||=e=>i(`select`,t.item),onPointerdown:p},[O(t.$slots,`button`,{},()=>[`plugin_name`in t.item?(w(),l(a,{key:0,class:x([o.value?`op50`:``,`font-mono text-sm`]),name:t.item.plugin_name},null,8,[`class`,`name`])):u(``,!0)])],32)]),"inline-after":U(()=>[m(r,{duration:t.item.duration,color:!0,factor:5,"text-xs":``},null,8,[`duration`]),t.item.type===`transform`?(w(),d(e,{key:0},[t.item.source_from===t.item.source_to?(w(),d(`div`,Mt,` no changes `)):(w(),d(`div`,Nt,[c(`div`,Pt,[c(`span`,Ft,`+`+M(t.item.diff_added),1),c(`span`,It,`-`+M(t.item.diff_removed),1)])]))],64)):u(``,!0)]),_:2},[t.item.type===`resolve`&&t.item.resolved_id&&t.item.importer?{name:`after`,fn:U(()=>[c(`div`,{p3:``,ml4:``,border:`l`,flex:`~ col gap-1`,class:x(t.active?`border-flow-line-active`:`border-flow-line`)},[c(`div`,Lt,[n[3]||=c(`div`,{"i-ph-arrow-elbow-left-down":``,"text-base":``,op50:``,"flex-none":``,"ml0.8":``},null,-1),m(g,{id:t.item.importer,session:t.session,link:!!h.value,class:x(h.value?`hover:bg-active`:``),px2:``,py1:``,rounded:``},null,8,[`id`,`session`,`link`,`class`])]),m(g,{id:t.item.module_request,session:t.session},null,8,[`id`,`session`])],2)]),key:`0`}:void 0]),1032,[`class-node-outer`,`active`]))}}}),zt=Rt;const Bt={"ml-2px":``};var Vt=h({__name:`Expandable`,props:{expandable:{type:Boolean},classRootNode:{},activeStart:{type:Boolean},activeEnd:{type:Boolean}},setup(e){let t=E(!0);return(e,n)=>{let r=St;return w(),l(r,{lines:{top:!0,bottom:!e.expandable||!t.value},pl6:``,pt4:``,"class-node-outer":e.classRootNode,active:e.activeStart},f({content:U(()=>[O(e.$slots,`node`)]),_:2},[e.expandable?{name:`inline-before`,fn:U(()=>[c(`button`,{"w-6":``,"h-6":``,mr1:``,"ml--7":``,mya:``,"rounded-full":``,hover:`bg-active`,flex:`~ items-center justify-center`,onClick:n[0]||=e=>t.value=!t.value},[c(`div`,{"i-ph-caret-right":``,"text-sm":``,op50:``,transition:``,"duration-300":``,class:x({"rotate-90":t.value})},null,2)])]),key:`0`}:void 0,e.expandable&&t.value?{name:`after`,fn:U(()=>[c(`div`,null,[(w(),d(`svg`,{"ml-1em":``,"w-27px":``,"h-30px":``,viewBox:`0 0 27 30`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:x(e.activeStart?`fg-flow-line-active`:`fg-flow-line`)},n[1]||=[c(`g`,null,[c(`path`,{d:`M0.5 0C0.5 18 26.5 12 26.5 30`,stroke:`currentColor`,"stroke-width":`1px`})],-1)],2)),c(`div`,Bt,[O(e.$slots,`container`)]),(w(),d(`svg`,{"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:x(e.activeEnd?`fg-flow-line-active`:`fg-flow-line`)},n[2]||=[c(`g`,null,[c(`path`,{d:`M0.5 0C0.5 18 26.5 12 26.5 30`,stroke:`currentColor`,"stroke-width":`1px`})],-1)],2))])]),key:`1`}:void 0]),1032,[`lines`,`class-node-outer`,`active`])}}}),Ht=Vt;const Ut={},Wt={"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,hover:`bg-active op100`,op50:``,title:`Close`};function Gt(e,t){return w(),d(`button`,Wt,t[0]||=[c(`div`,{"i-ph-x":``},null,-1)])}var Kt=i(Ut,[[`render`,Gt]]),qt=G((exports,t)=>{(function(n,r){typeof exports==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n||=self,n.CodeMirror=r())})(void 0,function(){"use strict";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;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 ee(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 te(e,t){var n=e.className;T(t).test(n)||(e.className+=(n?` `:``)+t)}function N(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 P=function(e){e.select()};g?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&(P=function(e){try{e.select()}catch{}});function F(e){return e.display.wrapper.ownerDocument}function I(e){return L(e.display.wrapper)}function L(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function R(e){return F(e).defaultView}function z(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function B(e,t,n){for(var r in t||={},e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function V(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 ne=function(){this.id=null,this.f=null,this.time=0,this.handler=z(this.onTimeout,this)};ne.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ne.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 H(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var re=50,ie={toString:function(){return`CodeMirror.Pass`}},ae={scroll:!1},oe={origin:`*mouse`},U={origin:`+move`};function se(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 ce=[``];function le(e){for(;ce.length<=e;)ce.push(W(ce)+` `);return ce[e]}function W(e){return e[e.length-1]}function ue(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function de(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function fe(){}function pe(e,t){var n;return Object.create?n=Object.create(e):(fe.prototype=e,n=new fe),t&&B(t,n),n}var me=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function he(e){return/\w/.test(e)||e>`€`&&(e.toUpperCase()!=e.toLowerCase()||me.test(e))}function ge(e,t){return t?t.source.indexOf(`\\w`)>-1&&he(e)?!0:t.test(e):he(e)}function _e(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ve=/[\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 G(e){return e.charCodeAt(0)>=768&&ve.test(e)}function ye(e,t,n){for(;(n<0?t>0:t<e.length)&&G(e.charAt(t));)t+=n;return t}function be(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 xe(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 Se=null;function Ce(e,t,n){var r;Se=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:Se=i),a.from==t&&(a.from!=a.to&&n!=`before`?r=i:Se=i)}return r??Se}var we=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`,ee=(j<u?d[j]:l)==`L`,te=M==ee?M?`L`:`R`:l,N=A;N<j;++N)d[N]=te;A=j-1}for(var P=[],F,I=0;I<u;)if(o.test(d[I])){var L=I;for(++I;I<u&&o.test(d[I]);++I);P.push(new c(0,L,I))}else{var R=I,z=P.length,B=t==`rtl`?1:0;for(++I;I<u&&d[I]!=`L`;++I);for(var V=R;V<I;)if(s.test(d[V])){R<V&&(P.splice(z,0,new c(1,R,V)),z+=B);var ne=V;for(++V;V<I&&s.test(d[V]);++V);P.splice(z,0,new c(2,ne,V)),z+=B,R=V}else ++V;R<I&&P.splice(z,0,new c(1,R,I))}return t==`ltr`&&(P[0].level==1&&(F=e.match(/^\s+/))&&(P[0].from=F[0].length,P.unshift(new c(0,0,F[0].length))),W(P).level==1&&(F=e.match(/\s+$/))&&(W(P).to-=F[0].length,P.push(new c(0,u-F[0].length,u)))),t==`rtl`?P.reverse():P}}();function K(e,t){var n=e.order;return n??=e.order=we(e.text,t),n}var Te=[],q=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]||Te).concat(n)}};function Ee(e,t){return e._handlers&&e._handlers[t]||Te}function De(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=H(i,n);a>-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function Oe(e,t){var n=Ee(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 ke(e,t,n){return typeof t==`string`&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Oe(e,n||t.type,e,t),Fe(t)||t.codemirrorIgnore}function Ae(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)H(n,t[r])==-1&&n.push(t[r])}function je(e,t){return Ee(e,t).length>0}function Me(e){e.prototype.on=function(e,t){q(this,e,t)},e.prototype.off=function(e,t){De(this,e,t)}}function Ne(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Pe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Fe(e){return e.defaultPrevented==null?e.returnValue==0:e.defaultPrevented}function Ie(e){Ne(e),Pe(e)}function Le(e){return e.target||e.srcElement}function Re(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 ze=function(){if(o&&s<9)return!1;var e=k(`div`);return`draggable`in e||`dragDrop`in e}(),Be;function Ve(e){if(Be==null){var t=k(`span`,`​`);O(e,k(`span`,[t,document.createTextNode(`x`)])),e.firstChild.offsetHeight!=0&&(Be=t.offsetWidth<=1&&t.offsetHeight>2&&!(o&&s<8))}var n=Be?k(`span`,`​`):k(`span`,`\xA0`,null,`display: inline-block; width: 1px; margin-right: -1px`);return n.setAttribute(`cm-text`,``),n}var He;function Ue(e){if(He!=null)return He;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:He=r.right-n.right<3}var We=`
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},Ge=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},Ke=function(){var e=k(`div`);return`oncopy`in e?!0:(e.setAttribute(`oncopy`,`return;`),typeof e.oncopy==`function`)}(),qe=null;function Je(e){if(qe!=null)return qe;var t=O(e,k(`span`,`x`)),n=t.getBoundingClientRect(),r=j(t,0,1).getBoundingClientRect();return qe=Math.abs(n.left-r.left)>1}var Ye={},Xe={};function Ze(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ye[e]=t}function Qe(e,t){Xe[e]=t}function $e(e){if(typeof e==`string`&&Xe.hasOwnProperty(e))e=Xe[e];else if(e&&typeof e.name==`string`&&Xe.hasOwnProperty(e.name)){var t=Xe[e.name];typeof t==`string`&&(t={name:t}),e=pe(t,e),e.name=t.name}else if(typeof e==`string`&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return $e(`application/xml`);else if(typeof e==`string`&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return $e(`application/json`);return typeof e==`string`?{name:e}:e||{name:`null`}}function et(e,t){t=$e(t);var n=Ye[t.name];if(!n)return et(e,`text/plain`);var r=n(e,t);if(tt.hasOwnProperty(t.name)){var i=tt[t.name];for(var a in i){if(!i.hasOwnProperty(a))continue;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 tt={};function nt(e,t){var n=tt.hasOwnProperty(e)?tt[e]:tt[e]={};B(t,n)}function rt(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 it(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 at(e,t,n){return e.startState?e.startState(t,n):!0}var ot=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};ot.prototype.eol=function(){return this.pos>=this.string.length},ot.prototype.sol=function(){return this.pos==this.lineStart},ot.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ot.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ot.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(n=typeof e==`string`?t==e:t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},ot.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},ot.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},ot.prototype.skipToEnd=function(){this.pos=this.string.length},ot.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},ot.prototype.backUp=function(e){this.pos-=e},ot.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=V(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?V(this.string,this.lineStart,this.tabSize):0)},ot.prototype.indentation=function(){return V(this.string,null,this.tabSize)-(this.lineStart?V(this.string,this.lineStart,this.tabSize):0)},ot.prototype.match=function(e,t,n){if(typeof e==`string`){var r=function(e){return n?e.toLowerCase():e},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var a=this.string.slice(this.pos).match(e);return a&&a.index>0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},ot.prototype.current=function(){return this.string.slice(this.start,this.pos)},ot.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},ot.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},ot.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function J(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 st(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 ct(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function lt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function ut(e){if(e.parent==null)return null;for(var t=e.parent,n=H(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 dt(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],c=s.height;if(t<c)break;t-=c}return n+o}function ft(e,t){return t>=e.first&&t<e.first+e.size}function pt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Y(e,t,n){if(n===void 0&&(n=null),!(this instanceof Y))return new Y(e,t,n);this.line=e,this.ch=t,this.sticky=n}function X(e,t){return e.line-t.line||e.ch-t.ch}function mt(e,t){return e.sticky==t.sticky&&X(e,t)==0}function ht(e){return Y(e.line,e.ch)}function gt(e,t){return X(e,t)<0?t:e}function _t(e,t){return X(e,t)<0?e:t}function vt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Z(e,t){if(t.line<e.first)return Y(e.first,0);var n=e.first+e.size-1;return t.line>n?Y(n,J(e,n).text.length):yt(t,J(e,t.line).text.length)}function yt(e,t){var n=e.ch;return n==null||n>t?Y(e.line,t):n<0?Y(e.line,0):e}function bt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=Z(e,t[r]);return n}var xt=function(e,t){this.state=e,this.lookAhead=t},St=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};St.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},St.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}},St.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},St.fromSaved=function(e,t,n){return t instanceof xt?new St(e,rt(e.mode,t.state),n,t.lookAhead):new St(e,rt(e.mode,t),n)},St.prototype.save=function(e){var t=e===!1?this.state:rt(this.doc.mode,this.state);return this.maxLookAhead>0?new xt(t,this.maxLookAhead):t};function Ct(e,t,n,r){var i=[e.state.modeGen],a={};Mt(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,Mt(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 wt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Tt(e,ut(t)),i=t.text.length>e.options.maxHighlightLength&&rt(e.doc.mode,r.state),a=Ct(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 Tt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new St(r,!0,t);var a=Nt(e,t,n),o=a>r.first&&J(r,a-1).stateAfter,s=o?St.fromSaved(r,o,a):new St(r,at(r.mode),a);return r.iter(a,t,function(n){Et(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 Et(e,t,n,r){var i=e.doc.mode,a=new ot(t,e.options.tabSize,n);for(a.start=a.pos=r||0,t==``&&Dt(i,n.state);!a.eol();)Ot(i,a,n.state),a.start=a.pos}function Dt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=it(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function Ot(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=it(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 kt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function At(e,t,n,r){var i=e.doc,a=i.mode,o;t=Z(i,t);var s=J(i,t.line),c=Tt(e,t.line,n),l=new ot(s.text,e.options.tabSize,c),u;for(r&&(u=[]);(r||l.pos<t.ch)&&!l.eol();)l.start=l.pos,o=Ot(a,l,c.state),r&&u.push(new kt(l,o,rt(i.mode,c.state)));return r?u:new kt(l,o,c.state)}function jt(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 Mt(e,t,n,r,i,a,o){var s=n.flattenSpans;s??=e.options.flattenSpans;var c=0,l=null,u=new ot(t,e.options.tabSize,r),d,f=e.options.addModeClass&&[null];for(t==``&&jt(Dt(n,r.state),a);!u.eol();){if(u.pos>e.options.maxHighlightLength?(s=!1,o&&Et(e,t,r,u.pos),u.pos=t.length,d=null):d=jt(Ot(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 Nt(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=J(a,s-1),l=c.stateAfter;if(l&&(!n||s+(l instanceof xt?l.lookAhead:0)<=a.modeFrontier))return s;var u=V(c.text,null,e.options.tabSize);(i==null||r>u)&&(i=s-1,r=u)}return i}function Pt(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=J(e,r).stateAfter;if(i&&(!(i instanceof xt)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var Ft=!1,It=!1;function Lt(){Ft=!0}function Rt(){It=!0}function zt(e,t,n){this.marker=e,this.from=t,this.to=n}function Bt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Vt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||=[]).push(e[r]);return n}function Ht(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 Ut(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,s=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);if(s||a.from==t&&o.type==`bookmark`&&(!n||!a.marker.insertLeft)){var c=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);(r||=[]).push(new zt(o,a.from,c?null:a.to))}}return r}function Wt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,s=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);if(s||a.from==t&&o.type==`bookmark`&&(!n||a.marker.insertLeft)){var c=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);(r||=[]).push(new zt(o,c?null:a.from-t,a.to==null?null:a.to-t))}}return r}function Gt(e,t){if(t.full)return null;var n=ft(e,t.from.line)&&J(e,t.from.line).markedSpans,r=ft(e,t.to.line)&&J(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,a=t.to.ch,o=X(t.from,t.to)==0,s=Ut(n,i,o),c=Wt(r,a,o),l=t.text.length==1,u=W(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=Bt(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];if(h.to!=null&&(h.to+=u),h.from==null){var g=Bt(s,h.marker);g||(h.from=u,l&&(s||=[]).push(h))}else h.from+=u,l&&(s||=[]).push(h)}s&&=Kt(s),c&&c!=s&&(c=Kt(c));var _=[s];if(!l){var v=t.text.length-2,y;if(v>0&&s)for(var b=0;b<s.length;++b)s[b].to??(y||=[]).push(new zt(s[b].marker,null,null));for(var x=0;x<v;++x)_.push(y);_.push(c)}return _}function Kt(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 qt(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||H(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(!(X(l.to,s.from)<0||X(l.from,s.to)>0)){var u=[c,1],d=X(l.from,s.from),f=X(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 Jt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Yt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Xt(e){return e.inclusiveLeft?-1:0}function Zt(e){return e.inclusiveRight?1:0}function Qt(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),i=t.find(),a=X(r.from,i.from)||Xt(e)-Xt(t);if(a)return-a;var o=X(r.to,i.to)||Zt(e)-Zt(t);return o||t.id-e.id}function $t(e,t){var n=It&&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||Qt(r,i.marker)<0)&&(r=i.marker);return r}function en(e){return $t(e,!0)}function tn(e){return $t(e,!1)}function nn(e,t){var n=It&&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||Qt(r,a.marker)<0)&&(r=a.marker)}return r}function rn(e,t,n,r,i){var a=J(e,t),o=It&&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=X(l.from,n)||Xt(c.marker)-Xt(i),d=X(l.to,r)||Zt(c.marker)-Zt(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?X(l.to,n)>=0:X(l.to,n)>0)||u>=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?X(l.from,r)<=0:X(l.from,r)<0)))return!0}}}function an(e){for(var t;t=en(e);)e=t.find(-1,!0).line;return e}function on(e){for(var t;t=tn(e);)e=t.find(1,!0).line;return e}function sn(e){for(var t,n;t=tn(e);)e=t.find(1,!0).line,(n||=[]).push(e);return n}function cn(e,t){var n=J(e,t),r=an(n);return n==r?t:ut(r)}function ln(e,t){if(t>e.lastLine())return t;var n=J(e,t),r;if(!un(e,n))return t;for(;r=tn(n);)n=r.find(1,!0).line;return ut(n)+1}function un(e,t){var n=It&&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&&dn(e,t,r)))return!0}}function dn(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return dn(e,r.line,Bt(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)&&dn(e,t,i))return!0}function fn(e){e=an(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 pn(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=en(r);){var i=n.find(0,!0);r=i.from.line,t+=i.from.ch-i.to.ch}for(r=e;n=tn(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 mn(e){var t=e.display,n=e.doc;t.maxLine=J(n,n.first),t.maxLineLength=pn(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=pn(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var hn=function(e,t,n){this.text=e,Yt(this,t),this.height=n?n(this):1};hn.prototype.lineNo=function(){return ut(this)},Me(hn);function gn(e,t,n,r){e.text=t,e.stateAfter&&=null,e.styles&&=null,e.order!=null&&(e.order=null),Jt(e),Yt(e,n);var i=r?r(e):1;i!=e.height&&lt(e,i)}function _n(e){e.parent=null,Jt(e)}var vn={},yn={};function bn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?yn:vn;return n[e]||(n[e]=e.replace(/\S+/g,`cm-$&`))}function xn(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=Cn,Ue(e.display.measure)&&(o=K(a,e.doc.direction))&&(r.addToken=Tn(r.addToken,o)),r.map=[];var s=t!=e.display.externalMeasured&&ut(a);Dn(a,r,wt(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=N(a.styleClasses.bgClass,r.bgClass||``)),a.styleClasses.textClass&&(r.textClass=N(a.styleClasses.textClass,r.textClass||``))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Ve(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 l=r.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(`.cm-tab`))&&(r.content.className=`cm-tab-wrap-hack`)}return Oe(e,`renderLine`,e,t.line,r.pre),r.pre.className&&(r.textClass=N(r.pre.className,r.textClass||``)),r}function Sn(e){var t=k(`span`,`•`,`cm-invalidchar`);return t.title=`\\u`+e.charCodeAt(0).toString(16),t.setAttribute(`aria-label`,t.title),t}function Cn(e,t,n,r,i,a,c){if(t){var l=e.splitSpaces?wn(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`,le(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 wn(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 Tn(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 En(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 Dn(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]),bn(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&&(!_||Qt(_.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)En(t,0,y[E]);if(_&&(_.from||0)==c){if(En(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=bn(n[l++],t.cm.options)}}}function On(e,t,n){this.line=t,this.rest=sn(t),this.size=this.rest?ut(W(this.rest))-n+1:1,this.node=this.text=null,this.hidden=un(e,t)}function kn(e,t,n){for(var r=[],i,a=t;a<n;a=i){var o=new On(e.doc,J(e.doc,a),a);i=a+o.size,r.push(o)}return r}var An=null;function jn(e){An?An.ops.push(e):e.ownsGroup=An={ops:[e],delayedCallbacks:[]}}function Mn(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 Nn(e,t){var n=e.ownsGroup;if(n)try{Mn(n)}finally{An=null,t(n)}}var Pn=null;function Fn(e,t){var n=Ee(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;An?i=An.delayedCallbacks:Pn?i=Pn:(i=Pn=[],setTimeout(In,0));for(var a=function(e){i.push(function(){return n[e].apply(null,r)})},o=0;o<n.length;++o)a(o)}}function In(){var e=Pn;Pn=null;for(var t=0;t<e.length;++t)e[t]()}function Ln(e,t,n,r){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];a==`text`?Vn(e,t):a==`gutter`?Un(e,t,n,r):a==`class`?Hn(e,t):a==`widget`&&Wn(e,t,r)}t.changes=null}function Rn(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 zn(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=Rn(t);t.background=r.insertBefore(k(`div`,null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Bn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):xn(e,t)}function Vn(e,t){var n=t.text.className,r=Bn(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,Hn(e,t)):n&&(t.text.className=n)}function Hn(e,t){zn(e,t),t.line.wrapClass?Rn(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 Un(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=Rn(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=Rn(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`,pt(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 Wn(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);Kn(e,t,n)}function Gn(e,t,n,r){var i=Bn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Hn(e,t),Un(e,t,n,r),Kn(e,t,r),t.node}function Kn(e,t,n){if(qn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)qn(e,t.rest[r],t,n,!1)}function qn(e,t,n,r,i){if(t.widgets)for(var a=Rn(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`),Jn(c,l,n,r),e.display.input.setUneditable(l),i&&c.above?a.insertBefore(l,n.gutter||n.text):a.appendChild(l),Fn(c,`redraw`)}}function Jn(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 Yn(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 Xn(e,t){for(var n=Le(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 Zn(e){return e.lineSpace.offsetTop}function Qn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function $n(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 er(e){return re-e.display.nativeBarWidth}function tr(e){return e.display.scroller.clientWidth-er(e)-e.display.barWidth}function nr(e){return e.display.scroller.clientHeight-er(e)-e.display.barHeight}function rr(e,t,n){var r=e.options.lineWrapping,i=r&&tr(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 ir(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(ut(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function ar(e,t){t=an(t);var n=ut(t),r=e.display.externalMeasured=new On(e.doc,t,n);r.lineN=n;var i=r.built=xn(e,r);return r.text=i.pre,O(e.display.lineMeasure,i.pre),r}function or(e,t,n,r){return lr(e,cr(e,t),n,r)}function sr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Hr(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function cr(e,t){var n=ut(t),r=sr(e,n);r&&!r.text?r=null:r&&r.changes&&(Ln(e,r,n,Lr(e)),e.curOp.forceUpdate=!0),r||=ar(e,t);var i=ir(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function lr(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||(rr(e,t.view,t.rect),t.hasHeights=!0),o=pr(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 ur={left:0,right:0,top:0,bottom:0};function dr(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 fr(e,t){var n=ur;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 pr(e,t,n,r){var i=dr(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&&G(t.line.text.charAt(i.coverStart+c));)--c;for(;i.coverStart+l<i.coverEnd&&G(t.line.text.charAt(i.coverStart+l));)++l;if(d=o&&s<9&&c==0&&l==i.coverEnd-i.coverStart?a.parentNode.getBoundingClientRect():fr(j(a,c,l).getClientRects(),r),d.left||d.right||c==0)break;l=c,--c,u=`right`}o&&s<11&&(d=mr(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+Ir(e.display),top:m.top,bottom:m.bottom}:ur}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 mr(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Je(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 hr(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 gr(e){e.display.externalMeasure=null,D(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)hr(e.display.view[t])}function _r(e){gr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function vr(e){return u&&_?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function yr(e){return u&&_?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function br(e){var t=an(e),n=t.widgets,r=0;if(n)for(var i=0;i<n.length;++i)n[i].above&&(r+=Yn(n[i]));return r}function xr(e,t,n,r,i){if(!i){var a=br(t);n.top+=a,n.bottom+=a}if(r==`line`)return n;r||=`local`;var o=fn(t);if(r==`local`?o+=Zn(e.display):o-=e.display.viewOffset,r==`page`||r==`window`){var s=e.display.lineSpace.getBoundingClientRect();o+=s.top+(r==`window`?0:yr(F(e)));var c=s.left+(r==`window`?0:vr(F(e)));n.left+=c,n.right+=c}return n.top+=o,n.bottom+=o,n}function Sr(e,t,n){if(n==`div`)return t;var r=t.left,i=t.top;if(n==`page`)r-=vr(F(e)),i-=yr(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 Cr(e,t,n,r,i){return r||=J(e.doc,t.line),xr(e,r,or(e,r,t.ch,i),n)}function wr(e,t,n,r,i,a){r||=J(e.doc,t.line),i||=cr(e,r);function o(t,o){var s=lr(e,i,t,o?`right`:`left`,a);return o?s.left=s.right:s.right=s.left,xr(e,r,s,n)}var s=K(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],i=r.level==1;return o(n?e-1:e,i!=n)}var d=Ce(s,c,l),f=Se,p=u(c,d,l==`before`);return f!=null&&(p.other=u(c,f,l!=`before`)),p}function Tr(e,t){var n=0;t=Z(e.doc,t),e.options.lineWrapping||(n=Ir(e.display)*t.ch);var r=J(e.doc,t.line),i=fn(r)+Zn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Er(e,t,n,r,i){var a=Y(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function Dr(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Er(r.first,0,null,-1,-1);var i=dt(r,n),a=r.first+r.size-1;if(i>a)return Er(r.first+r.size-1,J(r,a).text.length,null,1,1);t<0&&(t=0);for(var o=J(r,i);;){var s=jr(e,o,i,t,n),c=nn(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=J(r,i=l.line)}}function Or(e,t,n,r){r-=br(t);var i=t.text.length,a=be(function(t){return lr(e,n,t-1).bottom<=r},i,0);return i=be(function(t){return lr(e,n,t).top>r},a,i),{begin:a,end:i}}function kr(e,t,n,r){n||=cr(e,t);var i=xr(e,t,lr(e,n,r),`line`).top;return Or(e,t,n,i)}function Ar(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function jr(e,t,n,r,i){i-=fn(t);var a=cr(e,t),o=br(t),s=0,c=t.text.length,l=!0,u=K(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?Nr:Mr)(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=be(function(t){var n=lr(e,a,t);return n.top+=o,n.bottom+=o,Ar(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`:lr(e,a,m-(l?1:0)).bottom+o<=i==l?`after`:`before`;var b=wr(e,Y(n,m,g),`line`,t,a);h=b.left,_=i<b.top?-1:i>=b.bottom?1:0}return m=ye(t.text,m,1),Er(n,m,g,_,r-h)}function Mr(e,t,n,r,i,a,o){var s=be(function(s){var c=i[s],l=c.level!=1;return Ar(wr(e,Y(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=wr(e,Y(n,l?c.from:c.to,l?`after`:`before`),`line`,t,r);Ar(u,a,o,!0)&&u.top>o&&(c=i[s-1])}return c}function Nr(e,t,n,r,i,a,o){var s=Or(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=p.level!=1,h=lr(e,r,m?Math.min(l,p.to)-1:Math.max(c,p.from)).right,g=h<a?a-h+1e9:h-a;(!u||d>g)&&(u=p,d=g)}}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 Pr;function Fr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Pr==null){Pr=k(`pre`,null,`CodeMirror-line-like`);for(var t=0;t<49;++t)Pr.appendChild(document.createTextNode(`x`)),Pr.appendChild(k(`br`));Pr.appendChild(document.createTextNode(`x`))}O(e.measure,Pr);var n=Pr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),D(e.measure),n||1}function Ir(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 Lr(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:Rr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Rr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function zr(e){var t=Fr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Ir(e.display)-3);return function(i){if(un(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 Br(e){var t=e.doc,n=zr(e);t.iter(function(e){var t=n(e);t!=e.height&&lt(e,t)})}function Vr(e,t,n,r){var i=e.display;if(!n&&Le(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=Dr(e,a,o),l;if(r&&c.xRel>0&&(l=J(e.doc,c.line).text).length==c.ch){var u=V(l,l.length,e.options.tabSize)-l.length;c=Y(c.line,Math.max(0,Math.round((a-$n(e.display).left)/Ir(e.display))-u))}return c}function Hr(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 Ur(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)It&&cn(e.doc,t)<i.viewTo&&Gr(e);else if(n<=i.viewFrom)It&&ln(e.doc,n+r)>i.viewFrom?Gr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Gr(e);else if(t<=i.viewFrom){var a=Kr(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):Gr(e)}else if(n>=i.viewTo){var o=Kr(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Gr(e)}else{var s=Kr(e,t,t,-1),c=Kr(e,n,n+r,1);s&&c?(i.view=i.view.slice(0,s.index).concat(kn(e,s.lineN,c.lineN)).concat(i.view.slice(c.index)),i.viewTo+=r):Gr(e)}var l=i.externalMeasured;l&&(n<l.lineN?l.lineN+=r:t<l.lineN+l.size&&(i.externalMeasured=null))}function Wr(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[Hr(e,t)];if(a.node!=null){var o=a.changes||=[];H(o,n)==-1&&o.push(n)}}}function Gr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Kr(e,t,n,r){var i=Hr(e,t),a,o=e.display.view;if(!It||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(;cn(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 qr(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=kn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=kn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Hr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(kn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Hr(e,n)))),r.viewTo=n}function Jr(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 Yr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Xr(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&&Zr(e,u,i)}else (l||e.options.showCursorWhenSelecting)&&Zr(e,c.head,i);l||$r(e,c,a)}}return r}function Zr(e,t,n){var r=wr(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=Cr(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 Qr(e,t){return e.top-t.top||e.left-t.left}function $r(e,t,n){var r=e.display,i=e.doc,a=document.createDocumentFragment(),o=$n(e.display),s=o.left,c=Math.max(r.sizerWidth,tr(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=J(i,t),o=a.text.length,d,f;function p(n,r){return Cr(e,Y(t,n),`div`,a,r)}function m(t,n,r){var i=kr(e,a,null,t),o=n==`ltr`==(r==`after`)?`left`:`right`,s=r==`after`?i.begin:i.end-(/\s/.test(a.text.charAt(i.end-1))?2:1);return p(s,o)[o]}var h=K(a,i.direction);return xe(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||Qr(_,d)<0)&&(d=_),Qr(v,d)<0&&(d=v),(!f||Qr(_,f)<0)&&(f=_),Qr(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=J(i,f.line),h=J(i,p.line),g=an(m)==an(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 ei(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()||ii(e),t.cursorDiv.style.visibility=(n=!n)?``:`hidden`},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility=`hidden`)}}function ti(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ri(e))}function ni(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ii(e))},100)}function ri(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!=`nocursor`&&(e.state.focused||(Oe(e,`focus`,e,t),e.state.focused=!0,te(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()),ei(e))}function ii(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Oe(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 ai(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),lt(l.line,d),oi(l.line),l.rest))for(var g=0;g<l.rest.length;g++)oi(l.rest[g]);if(f>e.display.sizerWidth){var _=Math.ceil(f/Ir(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 oi(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 si(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Zn(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,a=dt(t,r),o=dt(t,i);if(n&&n.ensure){var s=n.ensure.from.line,c=n.ensure.to.line;s<a?(a=s,o=dt(t,fn(J(t,s))+e.wrapper.clientHeight)):Math.min(c,t.lastLine())>=o&&(a=dt(t,fn(J(t,c))-e.wrapper.clientHeight),o=c)}return{from:a,to:Math.max(o,a+1)}}function ci(e,t){if(!ke(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-Zn(e.display))+`px;
9
+ height: `+(t.bottom-t.top+er(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 li(e,t,n,r){r??=0;var i;!e.options.lineWrapping&&t==n&&(n=t.sticky==`before`?Y(t.line,t.ch+1,`before`):t,t=t.ch?Y(t.line,t.sticky==`before`?t.ch-1:t.ch,`after`):t);for(var a=0;a<5;a++){var o=!1,s=wr(e,t),c=!n||n==t?s:wr(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=di(e,i),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(l.scrollTop!=null&&(vi(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),l.scrollLeft!=null&&(bi(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(o=!0)),!o)break}return i}function ui(e,t){var n=di(e,t);n.scrollTop!=null&&vi(e,n.scrollTop),n.scrollLeft!=null&&bi(e,n.scrollLeft)}function di(e,t){var n=e.display,r=Fr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,a=nr(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+Qn(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=tr(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 fi(e,t){t!=null&&(gi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function pi(e){gi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function mi(e,t,n){(t!=null||n!=null)&&gi(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function hi(e,t){gi(e),e.curOp.scrollToPos=t}function gi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Tr(e,t.from),r=Tr(e,t.to);_i(e,n,r,t.margin)}}function _i(e,t,n,r){var i=di(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});mi(e,i.scrollLeft,i.scrollTop)}function vi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||Yi(e,{top:t}),yi(e,t,!0),n&&Yi(e),Vi(e,100))}function yi(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 bi(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,$i(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function xi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Qn(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+er(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Si=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),q(r,`scroll`,function(){r.clientHeight&&t(r.scrollTop,`vertical`)}),q(i,`scroll`,function(){i.clientWidth&&t(i.scrollLeft,`horizontal`)}),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth=`18px`)};Si.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}},Si.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,`horiz`)},Si.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,`vert`)},Si.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 ne,this.disableVert=new ne},Si.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility=``;function r(){var i=e.getBoundingClientRect(),a=n==`vert`?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);a==e?t.set(1e3,r):e.style.visibility=`hidden`}t.set(1e3,r)},Si.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ci=function(){};Ci.prototype.update=function(){return{bottom:0,right:0}},Ci.prototype.setScrollLeft=function(){},Ci.prototype.setScrollTop=function(){},Ci.prototype.clear=function(){};function wi(e,t){t||=xi(e);var n=e.display.barWidth,r=e.display.barHeight;Ti(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&ai(e),Ti(e,xi(e)),n=e.display.barWidth,r=e.display.barHeight}function Ti(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 Ei={native:Si,null:Ci};function Di(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Ei[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),q(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`?bi(e,t):vi(e,t)},e),e.display.scrollbars.addClass&&te(e.display.wrapper,e.display.scrollbars.addClass)}var Oi=0;function ki(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:++Oi,markArrays:null},jn(e.curOp)}function Ai(e){var t=e.curOp;t&&Nn(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;ji(e)})}function ji(e){for(var t=e.ops,n=0;n<t.length;n++)Mi(t[n]);for(var r=0;r<t.length;r++)Ni(t[r]);for(var i=0;i<t.length;i++)Pi(t[i]);for(var a=0;a<t.length;a++)Fi(t[a]);for(var o=0;o<t.length;o++)Ii(t[o])}function Mi(e){var t=e.cm,n=t.display;Wi(t),e.updateMaxLine&&mn(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 Ui(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ni(e){e.updatedDisplay=e.mustUpdate&&qi(e.cm,e.update)}function Pi(e){var t=e.cm,n=t.display;e.updatedDisplay&&ai(t),e.barMeasure=xi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=or(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+er(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-tr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Fi(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+`px`,e.maxScrollLeft<t.doc.scrollLeft&&bi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==ee(I(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&wi(t,e.barMeasure),e.updatedDisplay&&Qi(t,e.barMeasure),e.selectionChanged&&ei(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&ti(e.cm)}function Ii(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&Ji(t,e.update),n.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),e.scrollTop!=null&&yi(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&bi(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=li(t,Z(r,e.scrollToPos.from),Z(r,e.scrollToPos.to),e.scrollToPos.margin);ci(t,i)}var a=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(a)for(var s=0;s<a.length;++s)a[s].lines.length||Oe(a[s],`hide`);if(o)for(var c=0;c<o.length;++c)o[c].lines.length&&Oe(o[c],`unhide`);n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Oe(t,`changes`,t,e.changeObjs),e.update&&e.update.finish()}function Li(e,t){if(e.curOp)return t();ki(e);try{return t()}finally{Ai(e)}}function Ri(e,t){return function(){if(e.curOp)return t.apply(e,arguments);ki(e);try{return t.apply(e,arguments)}finally{Ai(e)}}}function zi(e){return function(){if(this.curOp)return e.apply(this,arguments);ki(this);try{return e.apply(this,arguments)}finally{Ai(this)}}}function Bi(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ki(t);try{return e.apply(this,arguments)}finally{Ai(t)}}}function Vi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,z(Hi,e))}function Hi(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Tt(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?rt(t.mode,r.state):null,c=Ct(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&&Et(e,a.text,r),a.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return Vi(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Li(e,function(){for(var t=0;t<i.length;t++)Wr(e,i[t],`text`)})}}var Ui=function(e,t,n){var r=e.display;this.viewport=t,this.visible=si(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=tr(e),this.force=n,this.dims=Lr(e),this.events=[]};Ui.prototype.signal=function(e,t){je(e,t)&&this.events.push(arguments)},Ui.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Oe.apply(null,this.events[e])};function Wi(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=er(e)+`px`,t.sizer.style.marginBottom=-t.nativeBarWidth+`px`,t.sizer.style.borderRightWidth=er(e)+`px`,t.scrollbarsClipped=!0)}function Gi(e){if(e.hasFocus())return null;var t=ee(I(e));if(!t||!M(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=R(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 Ki(e){if(!(!e||!e.activeElt||e.activeElt==ee(L(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 qi(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Gr(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&&Jr(e)==0)return!1;ea(e)&&(Gr(e),t.dims=Lr(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)),It&&(a=cn(e.doc,a),o=ln(e.doc,o));var s=a!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;qr(e,a,o),n.viewOffset=fn(J(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+`px`;var c=Jr(e);if(!s&&c==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var l=Gi(e);return c>4&&(n.lineDiv.style.display=`none`),Xi(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=``),n.renderedView=n.view,Ki(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,Vi(e,400)),n.updateLineNumbers=null,!0}function Ji(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==tr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+Qn(e.display)-nr(e),n.top)}),t.visible=si(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=si(e.display,e.doc,n));if(!qi(e,t))break;ai(e);var i=xi(e);Yr(e),wi(e,i),Qi(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 Yi(e,t){var n=new Ui(e,t);if(qi(e,n)){ai(e),Ji(e,n);var r=xi(e);Yr(e),wi(e,r),Qi(e,r),n.finish()}}function Xi(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=Gn(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&&(H(f.changes,`gutter`)>-1&&(m=!1),Ln(e,f,u,n)),m&&(D(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(pt(e.options,u)))),o=f.node.nextSibling}u+=f.size}for(;o;)o=s(o)}function Zi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+`px`,Fn(e,`gutterChanged`,e)}function Qi(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+er(e)+`px`}function $i(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Rr(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 ea(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=pt(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`,Zi(e.display),!0}return!1}function ta(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 na(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`,Zi(e)}function ra(e){na(e.display),Ur(e),$i(e)}function ia(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`);var l=A(`div`,[a.lineSpace],`CodeMirror-lines`);a.mover=k(`div`,[l],null,`position: relative`),a.sizer=k(`div`,[a.mover],`CodeMirror-sizer`),a.sizerWidth=null,a.heightForcer=k(`div`,null,null,`position: absolute; height: `+re+`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=ta(i.gutters,i.lineNumbers),na(a),r.init(a)}var aa=0,oa=null;o?oa=-.53:n?oa=15:u?oa=-.7:p&&(oa=-1/3);function sa(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 ca(e){var t=sa(e);return t.x*=oa,t.y*=oa,t}function la(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=sa(t),i=r.x,a=r.y,o=oa;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&&vi(e,Math.max(0,l.scrollTop+a*o)),bi(e,Math.max(0,l.scrollLeft+i*o)),(!a||a&&m)&&Ne(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),Yi(e,{top:b,bottom:x})}aa<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&&(oa=(oa*aa+n)/(aa+1),++aa)}},200)):(s.wheelDX+=i,s.wheelDY+=a))}}var ua=function(e,t){this.ranges=e,this.primIndex=t};ua.prototype.primary=function(){return this.ranges[this.primIndex]},ua.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(!mt(n.anchor,r.anchor)||!mt(n.head,r.head))return!1}return!0},ua.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Q(ht(this.ranges[t].anchor),ht(this.ranges[t].head));return new ua(e,this.primIndex)},ua.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ua.prototype.contains=function(e,t){t||=e;for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(X(t,r.from())>=0&&X(e,r.to())<=0)return n}return-1};var Q=function(e,t){this.anchor=e,this.head=t};Q.prototype.from=function(){return _t(this.anchor,this.head)},Q.prototype.to=function(){return gt(this.anchor,this.head)},Q.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function da(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(e,t){return X(e.from(),t.from())}),n=H(t,i);for(var a=1;a<t.length;a++){var o=t[a],s=t[a-1],c=X(s.to(),o.from());if(r&&!o.empty()?c>0:c>=0){var l=_t(s.from(),o.from()),u=gt(s.to(),o.to()),d=s.empty()?o.from()==o.head:s.from()==s.head;a<=n&&--n,t.splice(--a,2,new Q(d?u:l,d?l:u))}}return new ua(t,n)}function fa(e,t){return new ua([new Q(e,t||e)],0)}function pa(e){return e.text?Y(e.from.line+e.text.length-1,W(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function ma(e,t){if(X(e,t.from)<0)return e;if(X(e,t.to)<=0)return pa(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+=pa(t).ch-t.to.ch),Y(n,r)}function ha(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Q(ma(i.anchor,t),ma(i.head,t)))}return da(e.cm,n,e.sel.primIndex)}function $(e,t,n){return e.line==t.line?Y(n.line,e.ch-t.ch+n.ch):Y(n.line+(e.line-t.line),e.ch)}function ga(e,t,n){for(var r=[],i=Y(e.first,0),a=i,o=0;o<t.length;o++){var s=t[o],c=$(s.from,i,a),l=$(pa(s),i,a);if(i=s.to,a=l,n==`around`){var u=e.sel.ranges[o],d=X(u.head,u.anchor)<0;r[o]=new Q(d?l:c,d?c:l)}else r[o]=new Q(c,c)}return new ua(r,e.sel.primIndex)}function _a(e){e.doc.mode=et(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,Vi(e,100),e.state.modeGen++,e.curOp&&Ur(e)}function ya(e,t){return t.from.ch==0&&t.to.ch==0&&W(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){gn(e,n,i,r),Fn(e,`change`,e,t)}function o(e,t){for(var n=[],a=e;a<t;++a)n.push(new hn(l[a],i(a),r));return n}var s=t.from,c=t.to,l=t.text,u=J(e,s.line),d=J(e,c.line),f=W(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 hn(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,_)}Fn(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,Br(e),_a(e),Ca(e),e.options.direction=t.direction,e.options.lineWrapping||mn(e),e.options.mode=t.modeOption,Ur(e)}function Ca(e){(e.doc.direction==`rtl`?te:E)(e.display.lineDiv,`CodeMirror-rtl`)}function wa(e){Li(e,function(){Ca(e),Ur(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:ht(t.from),to:pa(t),text:st(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;){var t=W(e);if(t.ranges)e.pop();else break}}function Oa(e,t){if(t)return Da(e.done),W(e.done);if(e.done.length&&!W(e.done).ranges)return W(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),W(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=W(o.changes),X(t.from,t.to)==0&&X(t.from,s.to)==0?s.to=pa(t):o.changes.push(Ea(e,t));else{var c=W(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||Oe(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,W(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=W(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=Gt(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?ua.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+)$/))&&H(t,Number(u[1]))>-1&&(W(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=X(t,i)<0;a==X(n,i)<0?a!=X(t,n)<0&&(t=n):(i=t,t=n)}return new Q(i,t)}else return new Q(n||t,t)}function za(e,t,n,r,i){i??=e.cm&&(e.cm.display.shift||e.extend),Ga(e,new ua([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);var o=da(e.cm,r,e.sel.primIndex);Ga(e,o,n)}function Va(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,Ga(e,da(e.cm,i,e.sel.primIndex),r)}function Ha(e,t,n,r){Ga(e,fa(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 Q(Z(e,t[n].anchor),Z(e,t[n].head))},origin:n&&n.origin};return Oe(e,`beforeSelectionChange`,e,r),e.cm&&Oe(e.cm,`beforeSelectionChange`,e.cm,r),r.ranges==t.ranges?t:da(e.cm,r.ranges,r.ranges.length-1)}function Wa(e,t,n){var r=e.history.done,i=W(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){(je(e,`beforeSelectionChange`)||e.cm&&je(e.cm,`beforeSelectionChange`))&&(t=Ua(e,t,n));var r=n&&n.bias||(X(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`&&pi(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,Ae(e.cm)),Fn(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 Q(c,l))}return i?da(e.cm,i,t.primIndex):t}function Xa(e,t,n,r,i){var a=J(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&&(Oe(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=X(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,o=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);return o||(e.cantEdit=!0,Y(e.first,0))}function Qa(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?Z(e,Y(t.line-1)):null:n>0&&t.ch==(r||J(e,t.line)).text.length?t.line<e.first+e.size-1?Y(t.line+1,0):null:new Y(t.line,t.ch+n)}function $a(e){e.setSelection(Y(e.firstLine(),0),Y(e.lastLine()),ae)}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=Z(e,t)),n&&(r.to=Z(e,n)),i&&(r.text=i),a!==void 0&&(r.origin=a)}),Oe(e,`beforeChange`,e,r),e.cm&&Oe(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 Ri(e.cm,to)(e,t,n);if(e.cm.state.suppressEdits)return}if(!((je(e,`beforeChange`)||e.cm&&je(e.cm,`beforeChange`))&&(t=eo(e,t,!0),!t))){var r=Ft&&!n&&qt(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]==``&&X(t.from,t.to)==0)){var n=ha(e,t);ka(e,t,n,e.cm?e.cm.curOp.id:NaN),ao(e,t,n,Gt(e,t));var r=[];xa(e,function(e,n){!n&&H(r,e.history)==-1&&(uo(e.history,t),r.push(e.history)),ao(e,t,null,Gt(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=je(e,`beforeChange`)||e.cm&&je(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));var i=n?ha(e,r):W(s);ao(e,r,i,Ia(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:pa(r)});var o=[];xa(e,function(e,t){!t&&H(o,e.history)==-1&&(uo(e.history,r),o.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 ua(ue(e.sel.ranges,function(e){return new Q(Y(e.anchor.line+t,e.anchor.ch),Y(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Ur(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Wr(e.cm,r,`gutter`)}}function ao(e,t,n,r){if(e.cm&&!e.cm.curOp)return Ri(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:Y(e.first,0),to:Y(t.to.line+i,t.to.ch),text:[W(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:Y(a,J(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=st(e,t.from,t.to),n||=ha(e,t),e.cm?oo(e.cm,t,r):ba(e,t,r),Ka(e,n,ae),e.cantEdit&&Za(e,Y(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=ut(an(J(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&&Ae(e),ba(r,t,n,zr(e)),e.options.lineWrapping||(r.iter(c,a.line+t.text.length,function(e){var t=pn(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),Pt(r,a.line),Vi(e,400);var l=t.text.length-(o.line-a.line)-1;t.full?Ur(e):a.line==o.line&&t.text.length==1&&!ya(e.doc,t)?Wr(e,a.line,`text`):Ur(e,a.line,o.line+1,l);var u=je(e,`changes`),d=je(e,`change`);if(d||u){var f={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};d&&Fn(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,X(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(),a.copied=!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=Y(l.from.line+r,l.from.ch),l.to=Y(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=J(e,vt(e,t)):i=ut(t),i==null?null:(r(a,i)&&e.cm&&Wr(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,_n(i),Fn(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=e.children.splice(e.children.length-5,5),n=new mo(t);if(e.parent){e.size-=n.size,e.height-=n.height;var r=H(e.parent.children,e);e.parent.children.splice(r+1,0,n)}else{var i=new mo(e.children);i.parent=e,e.children=[i,n],e=i}n.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=ut(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=Yn(this);lt(n,Math.max(0,n.height-a)),e&&(Li(e,function(){go(e,n,-a),Wr(e,r,`widget`)}),Fn(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=Yn(this)-t;i&&(un(this.doc,r)||lt(r,r.height+i),n&&Li(n,function(){n.curOp.forceUpdate=!0,go(n,r,i),Fn(n,`lineWidgetChanged`,n,e,ut(r))}))},Me(ho);function go(e,t,n){fn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&fi(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&&!un(e,t)){var r=fn(t)<e.scrollTop;lt(t,t.height+Yn(i)),r&&fi(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&Fn(a,`lineWidgetAdded`,a,i,typeof t==`number`?t:ut(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&&ki(e),je(this,`clear`)){var n=this.find();n&&Fn(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=Bt(o.markedSpans,this);e&&!this.collapsed?Wr(e,ut(o),`text`):e&&(s.to!=null&&(i=ut(o)),s.from!=null&&(r=ut(o))),o.markedSpans=Vt(o.markedSpans,s),s.from==null&&this.collapsed&&!un(this.doc,o)&&e&&lt(o,Fr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var c=0;c<this.lines.length;++c){var l=an(this.lines[c]),u=pn(l);u>e.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&Ur(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&&Fn(e,`markerCleared`,e,this,r,i),t&&Ai(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=Bt(a.markedSpans,this);if(o.from!=null&&(n=Y(t?a:ut(a),o.from),e==-1))return n;if(o.to!=null&&(r=Y(t?a:ut(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||Li(r,function(){var i=t.line,a=ut(t.line),o=sr(r,a);if(o&&(hr(o),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!un(n.doc,i)&&n.height!=null){var s=n.height;n.height=null;var c=Yn(n)-s;c&&lt(i,i.height+c)}Fn(r,`markerChanged`,r,e)})},yo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||H(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||=[]).push(this)}this.lines.push(e)},yo.prototype.detachLine=function(e){if(this.lines.splice(H(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||=[]).push(this)}},Me(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 Ri(e.cm,bo)(e,t,n,r,i);var a=new yo(e,i),o=X(t,n);if(r&&B(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(rn(e,t.line,t,n,a)||t.line!=n.line&&rn(e,n.line,t,n,a))throw Error(`Inserting collapsed marker partially overlapping an existing one`);Rt()}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&&an(r)==c.display.maxLine&&(l=!0),a.collapsed&&s!=t.line&&lt(r,0),Ht(r,new zt(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){un(e,t)&&lt(t,0)}),a.clearOnEnter&&q(a,`beforeCursorEnter`,function(){return a.clear()}),a.readOnly&&(Lt(),(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)Ur(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++)Wr(c,u,`text`);a.atomic&&Ja(c.doc),Fn(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();Fn(this,`clear`)}},xo.prototype.find=function(e,t){return this.primary.find(e,t)},Me(xo);function So(e,t,n,r,i){r=B(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,Z(e,t),Z(e,n),r,i));for(var c=0;c<e.linked.length;++c)if(e.linked[c].isParent)return;o=W(a)}),new xo(a,o)}function Co(e){return e.findMarks(Y(e.first,0),e.clipPos(Y(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(X(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];H(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 hn(``,null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var a=Y(n,0);this.sel=fa(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,fa(a),ae)};Do.prototype=pe(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=ct(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Bi(function(e){var t=Y(this.first,0),n=this.first+this.size-1;to(this,{from:t,to:Y(n,J(this,n).text.length),text:this.splitLines(e),origin:`setValue`,full:!0},!0),this.cm&&mi(this.cm,0,0),Ga(this,fa(t),ae)}),replaceRange:function(e,t,n,r){t=Z(this,t),n=n?Z(this,n):t,so(this,e,t,n,r)},getRange:function(e,t,n){var r=st(this,Z(this,e),Z(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(ft(this,e))return J(this,e)},getLineNumber:function(e){return ut(e)},getLineHandleVisualStart:function(e){return typeof e==`number`&&(e=J(this,e)),an(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Z(this,e)},getCursor:function(e){var t=this.sel.primary(),n;return n=e==null||e==`head`?t.head:e==`anchor`?t.anchor:e==`end`||e==`to`||e===!1?t.to():t.from(),n},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Bi(function(e,t,n){Ha(this,Z(this,typeof e==`number`?Y(e,t||0):e),null,n)}),setSelection:Bi(function(e,t,n){Ha(this,Z(this,e),Z(this,t||e),n)}),extendSelection:Bi(function(e,t,n){za(this,Z(this,e),t&&Z(this,t),n)}),extendSelections:Bi(function(e,t){Ba(this,bt(this,e),t)}),extendSelectionsBy:Bi(function(e,t){var n=ue(this.sel.ranges,e);Ba(this,bt(this,n),t)}),setSelections:Bi(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Q(Z(this,e[i].anchor),Z(this,e[i].head||e[i].anchor));t??=Math.min(e.length-1,this.sel.primIndex),Ga(this,da(this.cm,r,t),n)}}),addSelection:Bi(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Q(Z(this,e),Z(this,t||e))),Ga(this,da(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=st(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=st(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:Bi(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&&pi(this.cm)}),undo:Bi(function(){ro(this,`undo`)}),redo:Bi(function(){ro(this,`redo`)}),undoSelection:Bi(function(){ro(this,`undo`,!0)}),redoSelection:Bi(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:Bi(function(e,t,n){return fo(this,e,`gutter`,function(e){var r=e.gutterMarkers||={};return r[t]=n,!n&&_e(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Bi(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&fo(t,n,`gutter`,function(){return n.gutterMarkers[e]=null,_e(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e==`number`){if(!ft(this,e)||(t=e,e=J(this,e),!e))return null}else if(t=ut(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:Bi(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:Bi(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:Bi(function(e,t,n){return _o(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return bo(this,Z(this,e),Z(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=Z(this,e),bo(this,e,e,n,`bookmark`)},findMarksAt:function(e){e=Z(this,e);var t=[],n=J(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=Z(this,e),t=Z(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}),Z(this,Y(n,t))},indexFromPos:function(e){e=Z(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(ct(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(ct(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 Us&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var n=this.linked[t];if(n.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),To(Co(this));break}}if(e.history==this.history){var r=[e.id];xa(e,function(e){return r.push(e.id)},!0),e.history=new Ta(null),e.history.done=La(this.history.done,r),e.history.undone=La(this.history.undone,r)}},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):We(e)},lineSeparator:function(){return this.lineSep||`
11
+ `},setDirection:Bi(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),!(ke(t,e)||Xn(t.display,e))){Ne(e),o&&(Oo=+new Date);var n=Vr(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&&Ri(t,function(){n=Z(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,fa(Z(t.doc,n),Z(t.doc,pa(e))))})()},l=function(e,n){if(t.options.allowDropFileTypes&&H(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,fa(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)){Ie(t);return}if(!(ke(e,t)||Xn(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=Vr(e,t);if(n){var r=document.createDocumentFragment();Zr(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(),Po=!0)}function Io(){var e;q(window,`resize`,function(){e??=setTimeout(function(){e=null,No(Lo)},100)}),q(window,`blur`,function(){return No(ii)})}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=ue(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&&X(a.from,W(r).to)<=0;){var o=r.pop();if(X(o.from,a.from)<0){a.from=o.from;break}}r.push(a)}Li(e,function(){for(var t=r.length-1;t>=0;t--)so(e.doc,``,r[t].from,r[t].to,`+delete`);pi(e)})}function Zo(e,t,n){var r=ye(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 Y(t.line,r,n<0?`after`:`before`)}function $o(e,t,n,r,i){if(e){t.doc.direction==`rtl`&&(i=-i);var a=K(n,t.doc.direction);if(a){var o=i<0?W(a):a[0],s=i<0==(o.level==1),c=s?`after`:`before`,l;if(o.level>0||t.doc.direction==`rtl`){var u=cr(t,n);l=i<0?n.text.length-1:0;var d=lr(t,u,l).top;l=be(function(e){return lr(t,u,e).top==d},i<0==(o.level==1)?o.from:o.to-1,l),c==`before`&&(l=Zo(n,l,1))}else l=i<0?o.to:o.from;return new Y(r,l,c)}}return new Y(r,i<0?n.text.length:0,i<0?`before`:`after`)}function es(e,t,n,r){var i=K(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=Ce(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 Y?e.ch:e,n)},c,l=function(n){return e.options.lineWrapping?(c||=cr(e,t),kr(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 Y(n.line,f,p)}}var m=function(e,t,r){for(var a=function(e,t){return t?new Y(n.line,s(e,1),`before`):new Y(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`),ae)},killLine:function(e){return Xo(e,function(t){if(t.empty()){var n=J(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:Y(t.head.line+1,0)}:{from:t.head,to:Y(t.head.line,n)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Xo(e,function(t){return{from:Y(t.from().line,0),to:Z(e.doc,Y(t.to().line+1,0))}})},delLineLeft:function(e){return Xo(e,function(e){return{from:Y(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return Xo(e,function(t){var n=e.charCoords(t.head,`div`).top+5,r=e.coordsChar({left:0,top:n},`div`);return{from:r,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(Y(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Y(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 os(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`)},U)},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`)},U)},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/)?os(e,t.head):r},U)},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=V(e.getLine(a.line),a.ch,r);t.push(le(r-o%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection(`add`):e.execCommand(`insertTab`)},transposeChars:function(e){return Li(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,a=J(e.doc,i.line).text;if(a){if(i.ch==a.length&&(i=new Y(i.line,i.ch-1)),i.ch>0)i=new Y(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),Y(i.line,i.ch-2),i,`+transpose`);else if(i.line>e.doc.first){var o=J(e.doc,i.line-1).text;o&&(i=new Y(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),Y(i.line-1,o.length-1),i,`+transpose`))}}n.push(new Q(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Li(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);pi(e)})},openLine:function(e){return e.replaceSelection(`
12
+ `,`start`)},toggleOverwrite:function(e){return e.toggleOverwrite()}};function ns(e,t){var n=J(e.doc,t),r=an(n);return r!=n&&(t=ut(r)),$o(!0,e,r,t,1)}function rs(e,t){var n=J(e.doc,t),r=on(n);return r!=n&&(t=ut(r)),$o(!0,e,n,t,-1)}function os(e,t){var n=ns(e,t.line),r=J(e.doc,n.line),i=K(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 Y(n.line,o?0:a,n.sticky)}return n}function ss(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 cs(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 ls=new ne;function us(e,t,n,r){var i=e.state.keySeq;if(i){if(Ko(t))return`handled`;if(/\'$/.test(t)?e.state.keySeq=null:ls.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),ds(e,i+` `+t,n,r))return!0}return ds(e,t,n,r)}function ds(e,t,n,r){var i=cs(e,t,r);return i==`multi`&&(e.state.keySeq=t),i==`handled`&&Fn(e,`keyHandled`,e,t,n),(i==`handled`||i==`multi`)&&(Ne(n),ei(e)),!!i}function fs(e,t){var n=Jo(t,!0);return n?t.shiftKey&&!e.state.keySeq?us(e,`Shift-`+n,t,function(t){return ss(e,t,!0)})||us(e,n,t,function(t){if(typeof t==`string`?/^go[A-Z]/.test(t):t.motion)return ss(e,t)}):us(e,n,t,function(t){return ss(e,t)}):!1}function ps(e,t,n){return us(e,`'`+n+`'`,t,function(t){return ss(e,t,!0)})}var ms=null;function hs(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=ee(I(t)),!ke(t,e))){o&&s<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var i=fs(t,e);f&&(ms=i?r:null,!i&&r==88&&!Ke&&(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)&&gs(t)}}function gs(e){var t=e.display.lineDiv;te(t,`CodeMirror-crosshair`);function n(e){(e.keyCode==18||!e.altKey)&&(E(t,`CodeMirror-crosshair`),De(document,`keyup`,n),De(document,`mouseover`,n))}q(document,`keyup`,n),q(document,`mouseover`,n)}function _s(e){e.keyCode==16&&(this.doc.sel.shift=!1),ke(this,e)}function vs(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(Xn(t.display,e)||ke(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(f&&n==ms){ms=null,Ne(e);return}if(!(f&&(!e.which||e.which<10)&&fs(t,e))){var i=String.fromCharCode(r??n);i!=`\b`&&(ps(t,e,i)||t.display.input.onKeyPress(e))}}}var ys=400,bs=function(e,t,n){this.time=e,this.pos=t,this.button=n};bs.prototype.compare=function(e,t,n){return this.time+ys>e&&X(t,this.pos)==0&&n==this.button};var xs,Ss;function Cs(e,t){var n=+new Date;return Ss&&Ss.compare(n,e,t)?(xs=Ss=null,`triple`):xs&&xs.compare(n,e,t)?(Ss=new bs(n,e,t),xs=null,`double`):(xs=new bs(n,e,t),Ss=null,`single`)}function ws(e){var t=this,n=t.display;if(!(ke(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,Xn(n,e)){c||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!Ns(t,e)){var r=Vr(t,e),i=Re(e),a=r?Cs(r,i):`single`;R(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&Ts(t,i,r,a,e))&&(i==1?r?Ds(t,r,a,e):Le(e)==n.scroller&&Ne(e):i==2?(r&&za(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(w?t.display.input.onContextMenu(e):ni(t)))}}}function Ts(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,us(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 Es(e,t,n){var r=e.getOption(`configureMouse`),i=r?r(e,t,n):{};if(i.unit==null){var a=b?n.shiftKey&&n.metaKey:n.altKey;i.unit=a?`rectangle`:t==`single`?`char`:t==`double`?`word`:`line`}return(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 Ds(e,t,n,r){o?setTimeout(z(ti,e),0):e.curOp.focus=ee(I(e));var i=Es(e,n,r),a=e.doc.sel,s;e.options.dragDrop&&ze&&!e.isReadOnly()&&n==`single`&&(s=a.contains(t))>-1&&(X((s=a.ranges[s]).from(),t)<0||t.xRel>0)&&(X(s.to(),t)>0||t.xRel<0)?Os(e,r,t,i):As(e,r,t,i)}function Os(e,t,n,r){var i=e.display,a=!1,l=Ri(e,function(t){c&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:ni(e)),De(i.wrapper.ownerDocument,`mouseup`,l),De(i.wrapper.ownerDocument,`mousemove`,u),De(i.scroller,`dragstart`,d),De(i.scroller,`drop`,l),a||(Ne(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,q(i.wrapper.ownerDocument,`mouseup`,l),q(i.wrapper.ownerDocument,`mousemove`,u),q(i.scroller,`dragstart`,d),q(i.scroller,`drop`,l),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function ks(e,t,n){if(n==`char`)return new Q(t,t);if(n==`word`)return e.findWordAt(t);if(n==`line`)return new Q(Y(t.line,0),Z(e.doc,Y(t.line+1,0)));var r=n(e,t);return new Q(r.from,r.to)}function As(e,t,n,r){o&&ni(e);var i=e.display,a=e.doc;Ne(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 Q(n,n)):(s=a.sel.primary(),c=a.sel.primIndex),r.unit==`rectangle`)r.addNew||(s=new Q(n,n)),n=Vr(e,t,!0,!0),c=-1;else{var d=ks(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,da(e,u.concat([s]),c),{scroll:!1,origin:`*mouse`})):u.length>1&&u[c].empty()&&r.unit==`char`&&!r.extend?(Ga(a,da(e,u.slice(0,c).concat(u.slice(c+1)),0),{scroll:!1,origin:`*mouse`}),l=a.sel):Va(a,c,s,oe):(c=0,Ga(a,new ua([s],0),oe),l=a.sel);var f=n;function p(t){if(X(f,t)!=0)if(f=t,r.unit==`rectangle`){for(var i=[],o=e.options.tabSize,u=V(J(a,n.line).text,n.ch,o),d=V(J(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 _=J(a,h).text,v=se(_,p,o);p==m?i.push(new Q(Y(h,v),Y(h,v))):_.length>v&&i.push(new Q(Y(h,v),Y(h,se(_,m,o))))}i.length||i.push(new Q(n,n)),Ga(a,da(e,l.ranges.slice(0,c).concat(i),c),{origin:`*mouse`,scroll:!1}),e.scrollIntoView(t)}else{var y=s,b=ks(e,t,r.unit),x=y.anchor,S;X(b.anchor,x)>0?(S=b.head,x=_t(y.from(),b.anchor)):(S=b.anchor,x=gt(y.to(),b.head));var C=l.ranges.slice(0);C[c]=js(e,new Q(Z(a,x),S)),Ga(a,da(e,C,c),oe)}}var m=i.wrapper.getBoundingClientRect(),h=0;function g(t){var n=++h,o=Vr(e,t,!0,r.unit==`rectangle`);if(o)if(X(o,f)!=0){e.curOp.focus=ee(I(e)),p(o);var s=si(i,a);(o.line>=s.to||o.line<s.from)&&setTimeout(Ri(e,function(){h==n&&g(t)}),150)}else{var c=t.clientY<m.top?-20:t.clientY>m.bottom?20:0;c&&setTimeout(Ri(e,function(){h==n&&(i.scroller.scrollTop+=c,g(t))}),50)}}function _(t){e.state.selectingText=!1,h=1/0,t&&(Ne(t),i.input.focus()),De(i.wrapper.ownerDocument,`mousemove`,v),De(i.wrapper.ownerDocument,`mouseup`,y),a.history.lastSelOrigin=null}var v=Ri(e,function(e){e.buttons===0||!Re(e)?_(e):g(e)}),y=Ri(e,_);e.state.selectingText=y,q(i.wrapper.ownerDocument,`mousemove`,v),q(i.wrapper.ownerDocument,`mouseup`,y)}function js(e,t){var n=t.anchor,r=t.head,i=J(e.doc,n.line);if(X(n,r)==0&&n.sticky==r.sticky)return t;var a=K(i);if(!a)return t;var o=Ce(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=Ce(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 Q(new Y(n.line,m,h),r)}function Ms(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&&Ne(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!je(e,n))return Fe(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=dt(e.doc,a),d=e.display.gutterSpecs[c];return Oe(e,n,e,u,d.className,t),Fe(t)}}}function Ns(e,t){return Ms(e,t,`gutterClick`,!0)}function Ps(e,t){Xn(e.display,t)||Fs(e,t)||ke(e,t,`contextmenu`)||w||e.display.input.onContextMenu(t)}function Fs(e,t){return je(e,`gutterContextMenu`)?Ms(e,t,`gutterContextMenu`,!1):!1}function Is(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,``)+e.options.theme.replace(/(^|\s)\s*/g,` cm-s-`),_r(e)}var Ls={toString:function(){return`CodeMirror.Init`}},Rs={},zs={};function Bs(e){var t=e.optionHandlers;function n(n,r,i,a){e.defaults[n]=r,i&&(t[n]=a?function(e,t,n){n!=Ls&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ls,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),_r(e),Ur(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(Y(r,a))}r++});for(var i=n.length-1;i>=0;i--)so(e.doc,t,n[i],Y(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!=Ls&&e.refresh()}),n(`specialCharPlaceholder`,Sn,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){Is(e),ra(e)},!0),n(`keyMap`,`default`,function(e,t,n){var r=Yo(t),i=n!=Ls&&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,Hs,!0),n(`gutters`,[],function(e,t){e.display.gutterSpecs=ta(t,e.options.lineNumbers),ra(e)},!0),n(`fixedGutter`,!0,function(e,t){e.display.gutters.style.left=t?Rr(e.display)+`px`:`0`,e.refresh()},!0),n(`coverGutterNextToScrollbar`,!1,function(e){return wi(e)},!0),n(`scrollbarStyle`,`native`,function(e){Di(e),wi(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=ta(e.options.gutters,t),ra(e)},!0),n(`firstLineNumber`,1,ra,!0),n(`lineNumberFormatter`,function(e){return e},ra,!0),n(`showCursorWhenSelecting`,!1,Yr,!0),n(`resetSelectionOnContextMenu`,!0),n(`lineWiseCopyCut`,!0),n(`pasteLinesPerSelection`,!0),n(`selectionsMayTouch`,!1),n(`readOnly`,!1,function(e,t){t==`nocursor`&&(ii(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,Vs),n(`allowDropFileTypes`,null),n(`cursorBlinkRate`,530),n(`cursorScrollMargin`,0),n(`cursorHeight`,1,Yr,!0),n(`singleCursorHeightPerLine`,!0,Yr,!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 Vs(e,t,n){var r=n&&n!=Ls;if(!t!=!r){var i=e.display.dragFunctions,a=t?q:De;a(e.display.scroller,`dragstart`,i.start),a(e.display.scroller,`dragenter`,i.enter),a(e.display.scroller,`dragover`,i.over),a(e.display.scroller,`dragleave`,i.leave),a(e.display.scroller,`drop`,i.drop)}}function Hs(e){e.options.lineWrapping?(te(e.display.wrapper,`CodeMirror-wrap`),e.display.sizer.style.minWidth=``,e.display.sizerWidth=null):(E(e.display.wrapper,`CodeMirror-wrap`),mn(e)),Br(e),Ur(e),_r(e),setTimeout(function(){return wi(e)},100)}function Us(e,t){var n=this;if(!(this instanceof Us))return new Us(e,t);this.options=t=t?B(t):{},B(Rs,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 Us.inputStyles[t.inputStyle](this),a=this.display=new ia(e,r,i,t);for(var l in a.wrapper.CodeMirror=this,Is(this),t.lineWrapping&&(this.display.wrapper.className+=` CodeMirror-wrap`),Di(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 ne,keySeq:null,specialChars:null},t.autofocus&&!v&&a.input.focus(),o&&s<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Ws(this),Fo(),ki(this),this.curOp.forceUpdate=!0,Sa(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&ri(n)},20):ii(this),zs)zs.hasOwnProperty(l)&&zs[l](this,t[l],Ls);ea(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Gs.length;++u)Gs[u](this);Ai(this),c&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering==`optimizelegibility`&&(a.lineDiv.style.textRendering=`auto`)}Us.defaults=Rs,Us.optionHandlers=zs;function Ws(e){var t=e.display;q(t.scroller,`mousedown`,Ri(e,ws)),o&&s<11?q(t.scroller,`dblclick`,Ri(e,function(t){if(!ke(e,t)){var n=Vr(e,t);if(!(!n||Ns(e,t)||Xn(e.display,t))){Ne(t);var r=e.findWordAt(n);za(e.doc,r.anchor,r.head)}}})):q(t.scroller,`dblclick`,function(t){return ke(e,t)||Ne(t)}),q(t.scroller,`contextmenu`,function(t){return Ps(e,t)}),q(t.input.getField(),`contextmenu`,function(n){t.scroller.contains(n.target)||Ps(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>20*20}q(t.scroller,`touchstart`,function(i){if(!ke(e,i)&&!a(i)&&!Ns(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)}}),q(t.scroller,`touchmove`,function(){t.activeTouch&&(t.activeTouch.moved=!0)}),q(t.scroller,`touchend`,function(n){var r=t.activeTouch;if(r&&!Xn(t,n)&&r.left!=null&&!r.moved&&new Date-r.start<300){var a=e.coordsChar(t.activeTouch,`page`),o;o=!r.prev||c(r,r.prev)?new Q(a,a):!r.prev.prev||c(r,r.prev.prev)?e.findWordAt(a):new Q(Y(a.line,0),Z(e.doc,Y(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Ne(n)}i()}),q(t.scroller,`touchcancel`,i),q(t.scroller,`scroll`,function(){t.scroller.clientHeight&&(vi(e,t.scroller.scrollTop),bi(e,t.scroller.scrollLeft,!0),Oe(e,`scroll`,e))}),q(t.scroller,`mousewheel`,function(t){return la(e,t)}),q(t.scroller,`DOMMouseScroll`,function(t){return la(e,t)}),q(t.wrapper,`scroll`,function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){ke(e,t)||Ie(t)},over:function(t){ke(e,t)||(jo(e,t),Ie(t))},start:function(t){return Ao(e,t)},drop:Ri(e,ko),leave:function(t){ke(e,t)||Mo(e)}};var l=t.input.getField();q(l,`keyup`,function(t){return _s.call(e,t)}),q(l,`keydown`,Ri(e,hs)),q(l,`keypress`,Ri(e,vs)),q(l,`focus`,function(t){return ri(e,t)}),q(l,`blur`,function(t){return ii(e,t)})}var Gs=[];Us.defineInitHook=function(e){return Gs.push(e)};function Ks(e,t,n,r){var i=e.doc,a;n??=`add`,n==`smart`&&(i.mode.indent?a=Tt(e,t).state:n=`prev`);var o=e.options.tabSize,s=J(i,t),c=V(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?V(J(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+=le(u-f)),d!=l)return so(i,d,Y(t,0),Y(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=Y(t,l.length);Va(i,m,new Q(g,g));break}}}var qs=null;function Js(e){qs=e}function Ys(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=We(t),l=null;if(s&&r.ranges.length>1)if(qs&&qs.text.join(`
13
+ `)==t){if(r.ranges.length%qs.text.length==0){l=[];for(var u=0;u<qs.text.length;u++)l.push(a.splitLines(qs.text[u]))}}else c.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(l=ue(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=Y(m.line,m.ch-n):e.state.overwrite&&!s?h=Y(h.line,Math.min(J(a,h.line).text.length,h.ch+W(c).length)):s&&qs&&qs.lineWise&&qs.text.join(`
14
+ `)==c.join(`
15
+ `)&&(m=h=Y(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),Fn(e,`inputRead`,e,g)}t&&!s&&Zs(e,t),pi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Xs(e,t){var n=e.clipboardData&&e.clipboardData.getData(`Text`);if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Li(t,function(){return Ys(t,n,0,null,`paste`)}),!0}function Zs(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=Ks(e,i.head.line,`smart`);break}}else a.electricInput&&a.electricInput.test(J(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=Ks(e,i.head.line,`smart`));o&&Fn(e,`electricInput`,e,i.head.line)}}}function Qs(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:Y(i,0),head:Y(i+1,0)};n.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:n}}function $s(e,t,n,r){e.setAttribute(`autocorrect`,n?`on`:`off`),e.setAttribute(`autocapitalize`,r?`on`:`off`),e.setAttribute(`spellcheck`,!!t)}function ec(){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 tc(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){R(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)&&Ri(this,t[e])(this,n,i),Oe(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:zi(function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw Error(`Overlays may not be stateful.`);de(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},function(e){return e.priority}),this.state.modeGen++,Ur(this)}),removeOverlay:zi(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++,Ur(this);return}}}),indentLine:zi(function(e,t,n){typeof t!=`string`&&typeof t!=`number`&&(t=t==null?this.options.smartIndent?`smart`:`prev`:t?`add`:`subtract`),ft(this.doc,e)&&Ks(this,e,t,n)}),indentSelection:zi(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&&(Ks(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&pi(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)Ks(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 Q(a,l[r].to()),ae)}}}),getTokenAt:function(e,t){return At(this,e,t)},getLineTokens:function(e,t){return At(this,Y(e),t,!0)},getTokenTypeAt:function(e){e=Z(this.doc,e);var t=wt(this,J(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)&&H(r,l.val)==-1&&r.push(l.val)}return r},getStateAfter:function(e,t){var n=this.doc;return e=vt(n,e??n.first+n.size-1),Tt(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`?Z(this.doc,e):e?r.from():r.to(),wr(this,n,t||`page`)},charCoords:function(e,t){return Cr(this,Z(this.doc,e),t||`page`)},coordsChar:function(e,t){return e=Sr(this,e,t||`page`),Dr(this,e.left,e.top)},lineAtHeight:function(e,t){return e=Sr(this,{top:e,left:0},t||`page`).top,dt(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=J(this.doc,e)}else i=e;return xr(this,i,{top:0,left:0},t||`page`,n||r).top+(r?this.doc.height-fn(i):0)},defaultTextHeight:function(){return Fr(this.display)},defaultCharWidth:function(){return Ir(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=wr(this,Z(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&&ui(this,{left:s,top:o,right:s+t.offsetWidth,bottom:o+t.offsetHeight})},triggerOnKeyDown:zi(hs),triggerOnKeyPress:zi(vs),triggerOnKeyUp:_s,triggerOnMouseDown:zi(ws),execCommand:function(e){if(ts.hasOwnProperty(e))return ts[e].call(null,this)},triggerElectric:zi(function(e){Zs(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var a=Z(this.doc,e),o=0;o<t&&(a=nc(this.doc,a,i,n,r),!a.hitSide);++o);return a},moveH:zi(function(e,t){var n=this;this.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?nc(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()},U)}),deleteH:zi(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection(``,null,`+delete`):Xo(this,function(n){var i=nc(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=Z(this.doc,e),s=0;s<t;++s){var c=wr(this,o,`div`);if(a==null?a=c.left:c.left=a,o=rc(this,c,i,n),o.hitSide)break}return o},moveV:zi(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=wr(n,o.head,`div`);o.goalColumn!=null&&(s.left=o.goalColumn),i.push(s.left);var c=rc(n,s,e,t);return t==`page`&&o==r.sel.primary()&&fi(n,Cr(n,c,`div`).top-s.top),c},U),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=J(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=ge(o,a)?function(e){return ge(e,a)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ge(e)};r>0&&s(n.charAt(r-1));)--r;for(;i<n.length&&s(n.charAt(i));)++i}return new Q(Y(e.line,r),Y(e.line,i))},toggleOverwrite:function(e){e!=null&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?te(this.display.cursorDiv,`CodeMirror-overwrite`):E(this.display.cursorDiv,`CodeMirror-overwrite`),Oe(this,`overwriteToggle`,this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ee(I(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:zi(function(e,t){mi(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-er(this)-this.display.barHeight,width:e.scrollWidth-er(this)-this.display.barWidth,clientHeight:nr(this),clientWidth:tr(this)}},scrollIntoView:zi(function(e,t){e==null?(e={from:this.doc.sel.primary().head,to:null},t??=this.options.cursorScrollMargin):typeof e==`number`?e={from:Y(e,0),to:null}:e.from??(e={from:e,to:null}),e.to||=e.from,e.margin=t||0,e.from.line==null?_i(this,e.from,e.to,e.margin):hi(this,e)}),setSize:zi(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&&gr(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){Wr(n,i,`widget`);break}}++i}),this.curOp.forceUpdate=!0,Oe(this,`refresh`,this)}),operation:function(e){return Li(this,e)},startOperation:function(){return ki(this)},endOperation:function(){return Ai(this)},refresh:zi(function(){var e=this.display.cachedTextHeight;Ur(this),this.curOp.forceUpdate=!0,_r(this),mi(this,this.doc.scrollLeft,this.doc.scrollTop),Zi(this.display),(e==null||Math.abs(e-Fr(this.display))>.5||this.options.lineWrapping)&&Br(this),Oe(this,`refresh`,this)}),swapDoc:zi(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Sa(this,e),_r(this),this.display.input.reset(),mi(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Fn(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}},Me(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 nc(e,t,n,r,i){var a=t,o=n,s=J(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 Y(n,t.ch,t.sticky),s=J(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 Y(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=ge(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 mt(a,_)&&(_.hitSide=!0),_}function rc(e,t,n,r){var i=e.doc,a=t.left,o;if(r==`page`){var s=Math.min(e.display.wrapper.clientHeight,R(e).innerHeight||i(e).documentElement.clientHeight),c=Math.max(s-.5*Fr(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=Dr(e,a,o),l.outside;){if(n<0?o<=0:o>=i.height){l.hitSide=!0;break}o+=n*5}return l}var ic=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ne,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ic.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,$s(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}q(i,`paste`,function(e){!a(e)||ke(r,e)||Xs(e,r)||s<=11&&setTimeout(Ri(r,function(){return t.updateFromDOM()}),20)}),q(i,`compositionstart`,function(e){t.composing={data:e.data,done:!1}}),q(i,`compositionupdate`,function(e){t.composing||={data:e.data,done:!1}}),q(i,`compositionend`,function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),q(i,`touchstart`,function(){return n.forceCompositionEnd()}),q(i,`input`,function(){t.composing||t.readFromDOMSoon()});function o(e){if(!(!a(e)||ke(r,e))){if(r.somethingSelected())Js({lineWise:!1,text:r.getSelections()}),e.type==`cut`&&r.replaceSelection(``,null,`cut`);else if(r.options.lineWiseCopyCut){var t=Qs(r);Js({lineWise:!0,text:t.text}),e.type==`cut`&&r.operation(function(){r.setSelections(t.ranges,0,ae),r.replaceSelection(``,null,`cut`)})}else return;if(e.clipboardData){e.clipboardData.clearData();var o=qs.text.join(`
18
+ `);if(e.clipboardData.setData(`Text`,o),e.clipboardData.getData(`Text`)==o){e.preventDefault();return}}var s=ec(),c=s.firstChild;$s(c),r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),c.value=qs.text.join(`
19
+ `);var l=ee(L(i));P(c),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==i&&n.showPrimarySelection()},50)}}q(i,`copy`,o),q(i,`cut`,o)},ic.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute(`aria-label`,e):this.div.removeAttribute(`aria-label`)},ic.prototype.prepareSelection=function(){var e=Xr(this.cm,!1);return e.focus=ee(L(this.div))==this.div,e},ic.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},ic.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ic.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=lc(t,e.anchorNode,e.anchorOffset),s=lc(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&s&&!s.bad&&X(_t(o,s),i)==0&&X(gt(o,s),a)==0)){var c=t.display.view,l=i.line>=t.display.viewFrom&&ac(t,i)||{node:c[0].measure.map[2],offset:0},u=a.line<t.display.viewTo&&ac(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()}},ic.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)},ic.prototype.showMultipleSelections=function(e){O(this.cm.display.cursorDiv,e.cursors),O(this.cm.display.selectionDiv,e.selection)},ic.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},ic.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return M(this.div,t)},ic.prototype.focus=function(){this.cm.options.readOnly!=`nocursor`&&((!this.selectionInEditor()||ee(L(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ic.prototype.blur=function(){this.div.blur()},ic.prototype.getField=function(){return this.div},ic.prototype.supportsTouch=function(){return!0},ic.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Li(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)},ic.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},ic.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&&oc(e.anchorNode)){this.cm.triggerOnKeyDown({type:`keydown`,keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=lc(t,e.anchorNode,e.anchorOffset),r=lc(t,e.focusNode,e.focusOffset);n&&r&&Li(t,function(){Ga(t.doc,fa(n,r),ae),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},ic.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=Y(r.line-1,J(e.doc,r.line-1).length)),i.ch==J(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=Y(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var a,o,s;r.line==t.viewFrom||(a=Hr(e,r.line))==0?(o=ut(t.view[0].line),s=t.view[0].node):(o=ut(t.view[a].line),s=t.view[a-1].node.nextSibling);var c=Hr(e,i.line),l,u;if(c==t.view.length-1?(l=t.viewTo-1,u=t.lineDiv.lastChild):(l=ut(t.view[c+1].line)-1,u=t.view[c+1].node.previousSibling),!s)return!1;for(var d=e.doc.splitLines(cc(e,s,u,o,l)),f=st(e.doc,Y(o,0),Y(l,J(e.doc,l).text.length));d.length>1&&f.length>1;)if(W(d)==W(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=W(d),y=W(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=Y(o,p),S=Y(l,f.length?W(f).length-m:0);if(d.length>1||d[0]||X(x,S))return so(e.doc,d,x,S,`+input`),!0},ic.prototype.ensurePolled=function(){this.forceCompositionEnd()},ic.prototype.reset=function(){this.forceCompositionEnd()},ic.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ic.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)},ic.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Li(this.cm,function(){return Ur(e.cm)})},ic.prototype.setUneditable=function(e){e.contentEditable=`false`},ic.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Ri(this.cm,Ys)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},ic.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!=`nocursor`)},ic.prototype.onContextMenu=function(){},ic.prototype.resetPosition=function(){},ic.prototype.needsContentAttribute=!0;function ac(e,t){var n=sr(e,t.line);if(!n||n.hidden)return null;var r=J(e.doc,t.line),i=ir(n,r,t.line),a=K(r,e.doc.direction),o=`left`;if(a){var s=Ce(a,t.ch);o=s%2?`right`:`left`}var c=dr(i.map,t.ch,o);return c.offset=c.collapse==`right`?c.end:c.start,c}function oc(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function sc(e,t){return t&&(e.bad=!0),e}function cc(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),o=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(Y(r,0),Y(i+1,0),l(+a));m.length&&(p=m[0].find(0))&&d(st(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 lc(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return sc(e.clipPos(Y(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 uc(a,t,n)}}function uc(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!M(r,t))return sc(Y(ut(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var a=e.rest?W(e.rest):e.line;return sc(Y(ut(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=ut(i<0?e.line:e.rest[i]),d=a[o]+r;return(r<0||s!=t)&&(d=a[o+(r?1:0)]),Y(u,d)}}}var d=u(o,s,n);if(d)return sc(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 sc(Y(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 sc(Y(d.line,d.ch+h),i);h+=m.textContent.length}}var dc=function(e){this.cm=e,this.prevInput=``,this.pollingFast=!1,this.polling=new ne,this.hasSelection=!1,this.composing=null,this.resetting=!1};dc.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`),q(i,`input`,function(){o&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),q(i,`paste`,function(e){ke(r,e)||Xs(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function a(e){if(!ke(r,e)){if(r.somethingSelected())Js({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var t=Qs(r);Js({lineWise:!0,text:t.text}),e.type==`cut`?r.setSelections(t.ranges,null,ae):(n.prevInput=``,i.value=t.text.join(`
20
+ `),P(i))}else return;e.type==`cut`&&(r.state.cutIncoming=+new Date)}}q(i,`cut`,a),q(i,`copy`,a),q(e.scroller,`paste`,function(t){if(!(Xn(e,t)||ke(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)}}),q(e.lineSpace,`selectstart`,function(t){Xn(e,t)||Ne(t)}),q(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`})}}),q(i,`compositionend`,function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},dc.prototype.createField=function(e){this.wrapper=ec(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;$s(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},dc.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute(`aria-label`,e):this.textarea.removeAttribute(`aria-label`)},dc.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Xr(e);if(e.options.moveInputWithCursor){var i=wr(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},dc.prototype.showSelection=function(e){var t=this.cm,n=t.display;O(n.cursorDiv,e.cursors),O(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+`px`,this.wrapper.style.left=e.teLeft+`px`)},dc.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&&P(this.textarea),o&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value=``,o&&s>=9&&(this.hasSelection=null));this.resetting=!1}},dc.prototype.getField=function(){return this.textarea},dc.prototype.supportsTouch=function(){return!1},dc.prototype.focus=function(){if(this.cm.options.readOnly!=`nocursor`&&(!v||ee(L(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},dc.prototype.blur=function(){this.textarea.blur()},dc.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},dc.prototype.receivedFocus=function(){this.slowPoll()},dc.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},dc.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},dc.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Ge(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 Li(t,function(){Ys(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},dc.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},dc.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},dc.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=Vr(n,e),l=r.scroller.scrollTop;if(!a||f)return;var u=n.options.resetSelectionOnContextMenu;u&&n.doc.sel.contains(a)==-1&&Ri(n,Ga)(n.doc,fa(a),ae);var d=i.style.cssText,p=t.wrapper.style.cssText,m=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText=`position: static`,i.style.cssText=`position: absolute; width: 30px; height: 30px;
22
+ top: `+(e.clientY-m.top-5)+`px; left: `+(e.clientX-m.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 h;c&&(h=i.ownerDocument.defaultView.scrollY),r.input.focus(),c&&i.ownerDocument.defaultView.scrollTo(null,h),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=` `),t.contextMenuPending=_,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function g(){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 _(){if(t.contextMenuPending==_&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=d,o&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!o||o&&s<9)&&g();var e=0,a=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput==`​`?Ri(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&&g(),w){Ie(e);var v=function(){De(window,`mouseup`,v),setTimeout(_,20)};q(window,`mouseup`,v)}else setTimeout(_,50)},dc.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e==`nocursor`,this.textarea.readOnly=!!e},dc.prototype.setUneditable=function(){},dc.prototype.needsContentAttribute=!1;function fc(e,t){if(t=t?B(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=ee(L(e));t.autofocus=n==e||e.getAttribute(`autofocus`)!=null&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(q(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&&(De(e.form,`submit`,r),!t.leaveSubmitMethodAlone&&typeof e.form.submit==`function`&&(e.form.submit=i))}},e.style.display=`none`;var s=Us(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s}function pc(e){e.off=De,e.on=q,e.wheelEventPixels=ca,e.Doc=Do,e.splitLines=We,e.countColumn=V,e.findColumn=se,e.isWordChar=he,e.Pass=ie,e.signal=Oe,e.Line=hn,e.changeEnd=pa,e.scrollbarModel=Ei,e.Pos=Y,e.cmpPos=X,e.modes=Ye,e.mimeModes=Xe,e.resolveMode=$e,e.getMode=et,e.modeExtensions=tt,e.extendMode=nt,e.copyState=rt,e.startState=at,e.innerMode=it,e.commands=ts,e.keyMap=Ho,e.keyName=Jo,e.isModifierKey=Ko,e.lookupKey=Go,e.normalizeKeyMap=Wo,e.StringStream=ot,e.SharedTextMarker=xo,e.TextMarker=yo,e.LineWidget=ho,e.e_preventDefault=Ne,e.e_stopPropagation=Pe,e.e_stop=Ie,e.addClass=te,e.contains=M,e.rmClass=E,e.keyNames=Ro}Bs(Us),tc(Us);var mc=`iter insert remove copy getEditor constructor`.split(` `);for(var hc in Do.prototype)Do.prototype.hasOwnProperty(hc)&&H(mc,hc)<0&&(Us.prototype[hc]=function(e){return function(){return e.apply(this.doc,arguments)}}(Do.prototype[hc]));return Me(Do),Us.inputStyles={textarea:dc,contenteditable:ic},Us.defineMode=function(e){!Us.defaults.mode&&e!=`null`&&(Us.defaults.mode=e),Ze.apply(this,arguments)},Us.defineMIME=Qe,Us.defineMode(`null`,function(){return{token:function(e){return e.skipToEnd()}}}),Us.defineMIME(`text/plain`,`null`),Us.defineExtension=function(e,t){Us.prototype[e]=t},Us.defineDocExtension=function(e,t){Do.prototype[e]=t},Us.fromTextArea=fc,pc(Us),Us.version=`5.65.19`,Us})}),Jt=G((exports,t)=>{(function(n){typeof exports==`object`&&typeof t==`object`?n(qt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){function t(t,n,r){var i=t.getWrapperElement(),a;return a=i.appendChild(document.createElement(`div`)),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})})}),Yt=G((exports,t)=>{(function(n){typeof exports==`object`&&typeof t==`object`?n(qt()):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)===``}})}),Xt=G((exports,t)=>{(function(n){typeof exports==`object`&&typeof t==`object`?n(qt(),Jt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../dialog/dialog`],n):n(CodeMirror)})(function(e){"use strict";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`})}),Zt=G((exports,t)=>{(function(n){typeof exports==`object`&&typeof t==`object`?n(qt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";var t=e.Pos;function n(e){var t=e.flags;return t??(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)})})}),Qt=G((exports,t)=>{(function(n){typeof exports==`object`&&typeof t==`object`?n(qt(),Zt(),Jt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`./searchcursor`,`../dialog/dialog`],n):n(CodeMirror)})(function(e){"use strict";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(),n.annotate=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(),t.annotate=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:`),o=h(``,null,h(`span`,{className:`CodeMirror-search-label`},i),_(e));s(e,o,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)}})}),$t=G((exports,t)=>{(function(n){typeof exports==`object`&&typeof t==`object`?n(qt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";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=[`font-display`,`font-family`,`src`,`unicode-range`,`font-variant`,`font-feature-settings`,`font-stretch`,`font-weight`,`font-style`],h=t(m),g=[`additive-symbols`,`fallback`,`negative`,`pad`,`prefix`,`range`,`speak-as`,`suffix`,`symbols`,`system`],_=t(g),v=`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(`.`),y=t(v),b=`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(`.`),x=t(b),S=n.concat(i).concat(o).concat(c).concat(u).concat(f).concat(v).concat(b);e.registerHelper(`hintWords`,`css`,S);function C(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:h,counterDescriptors:_,colorKeywords:y,valueKeywords:x,tokenHooks:{"/":function(e,t){return e.eat(`*`)?(t.tokenize=C,C(e,t)):!1}},name:`css`}),e.defineMIME(`text/x-scss`,{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:y,valueKeywords:x,fontProperties:h,allowNested:!0,lineComment:`//`,tokenHooks:{"/":function(e,t){return e.eat(`/`)?(e.skipToEnd(),[`comment`,`comment`]):e.eat(`*`)?(t.tokenize=C,C(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:y,valueKeywords:x,fontProperties:h,allowNested:!0,lineComment:`//`,tokenHooks:{"/":function(e,t){return e.eat(`/`)?(e.skipToEnd(),[`comment`,`comment`]):e.eat(`*`)?(t.tokenize=C,C(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:h,counterDescriptors:_,colorKeywords:y,valueKeywords:x,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return e.eat(`*`)?(t.tokenize=C,C(e,t)):!1}},name:`css`,helperType:`gss`})})}),en=G((exports,t)=>{(function(n){typeof exports==`object`&&typeof t==`object`?n(qt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";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]}}})}),tn=G((exports,t)=>{(function(n){typeof exports==`object`&&typeof t==`object`?n(qt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";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}}}}})}),nn=G((exports,t)=>{(function(n){typeof exports==`object`&&typeof t==`object`?n(qt(),en(),tn()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../../addon/mode/simple`,`../../addon/mode/multiplex`],n):n(CodeMirror)})(function(e){"use strict";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`)})}),rn=G((exports,t)=>{(function(n){typeof exports==`object`&&typeof t==`object`?n(qt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";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();if(r==`<`)return 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`);if(r==`&`){var i;return i=e.eat(`#`)?e.eat(`x`)?e.eatWhile(/[a-fA-F\d]/)&&e.eat(`;`):e.eatWhile(/[\d]/)&&e.eat(`;`):e.eatWhile(/[\w\.\-:]/)&&e.eat(`;`),i?`atom`:`error`}else return 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})})}),an=G((exports,t)=>{(function(n){typeof exports==`object`&&typeof t==`object`?n(qt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";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`)):lt(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;var d=e.string.charAt(o-1);if(d==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);;){var s=a.length?a.pop():o?H:V;if(s(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 N(e,t.localVars);return}}n.globalVars&&!A(e,t.globalVars)&&(t.globalVars=new N(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 te(n,t.vars,!0):null}else if(A(e,t.vars))return t;else return new te(t.prev,new N(e,t.vars),!1);else return null}function ee(e){return e==`public`||e==`private`||e==`protected`||e==`abstract`||e==`readonly`}function te(e,t,n){this.prev=e,this.vars=t,this.block=n}function N(e,t){this.name=e,this.next=t}var P=new N(`this`,new N(`arguments`,null));function F(){D.state.context=new te(D.state.context,D.state.localVars,!1),D.state.localVars=P}function I(){D.state.context=new te(D.state.context,D.state.localVars,!0),D.state.localVars=null}F.lex=I.lex=!0;function L(){D.state.localVars=D.state.context.vars,D.state.context=D.state.context.prev}L.lex=!0;function R(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 z(){var e=D.state;e.lexical.prev&&(e.lexical.type==`)`&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}z.lex=!0;function B(e){function t(n){return n==e?k():e==`;`||n==`}`||n==`)`||n==`]`?O():k(t)}return t}function V(e,t){return e==`var`?k(R(`vardef`,t),Pe,B(`;`),z):e==`keyword a`?k(R(`form`),ie,V,z):e==`keyword b`?k(R(`form`),V,z):e==`keyword d`?D.stream.match(/^\s*$/,!1)?k():k(R(`stat`),oe,B(`;`),z):e==`debugger`?k(B(`;`)):e==`{`?k(R(`}`),I,be,z,L):e==`;`?k():e==`if`?(D.state.lexical.info==`else`&&D.state.cc[D.state.cc.length-1]==z&&D.state.cc.pop()(),k(R(`form`),ie,V,z,Be)):e==`function`?k(We):e==`for`?k(R(`form`),I,Ve,V,L,z):e==`class`||c&&t==`interface`?(D.marked=`keyword`,k(R(`form`,e==`class`?e:t),Ye,z)):e==`variable`?c&&t==`declare`?(D.marked=`keyword`,k(V)):c&&(t==`module`||t==`enum`||t==`type`)&&D.stream.match(/^\s*\w/,!1)?(D.marked=`keyword`,t==`enum`?k(J):t==`type`?k(Ke,B(`operator`),K,B(`;`)):k(R(`form`),Fe,B(`{`),R(`}`),be,z,z)):c&&t==`namespace`?(D.marked=`keyword`,k(R(`form`),H,V,z)):c&&t==`abstract`?(D.marked=`keyword`,k(V)):k(R(`stat`),me):e==`switch`?k(R(`form`),ie,B(`{`),R(`}`,`switch`),I,be,z,z,L):e==`case`?k(H,B(`:`)):e==`default`?k(B(`:`)):e==`catch`?k(R(`form`),F,ne,V,z,L):e==`export`?k(R(`stat`),$e,z):e==`import`?k(R(`stat`),tt,z):e==`async`?k(V):t==`@`?k(H,V):O(R(`stat`),H,B(`;`),z)}function ne(e){if(e==`(`)return k(qe,B(`)`))}function H(e,t){return ae(e,t,!1)}function re(e,t){return ae(e,t,!0)}function ie(e){return e==`(`?k(R(`)`),oe,B(`)`),z):O()}function ae(e,t,n){if(D.state.fatArrowAt==D.stream.start){var r=n?ue:W;if(e==`(`)return k(F,R(`)`),G(qe,`)`),z,B(`=>`),r,L);if(e==`variable`)return O(F,Fe,B(`=>`),r,L)}var i=n?se:U;return C.hasOwnProperty(e)?k(i):e==`function`?k(We,i):e==`class`||c&&t==`interface`?(D.marked=`keyword`,k(R(`form`),Je,z)):e==`keyword c`||e==`async`?k(n?re:H):e==`(`?k(R(`)`),oe,B(`)`),z,i):e==`operator`||e==`spread`?k(n?re:H):e==`[`?k(R(`]`),ot,z,i):e==`{`?ye(ge,`}`,null,i):e==`quasi`?O(ce,i):e==`new`?k(de(n)):k()}function oe(e){return e.match(/[;\}\)\],]/)?O():O(H)}function U(e,t){return e==`,`?k(oe):se(e,t,!1)}function se(e,t,n){var r=n==0?U:se,i=n==0?H:re;if(e==`=>`)return k(F,n?ue:W,L);if(e==`operator`)return/\+\+|--/.test(t)||c&&t==`!`?k(r):c&&t==`<`&&D.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?k(R(`>`),G(K,`>`),z,r):t==`?`?k(H,B(`:`),i):k(i);if(e==`quasi`)return O(ce,r);if(e!=`;`){if(e==`(`)return ye(re,`)`,`call`,r);if(e==`.`)return k(he,r);if(e==`[`)return k(R(`]`),oe,B(`]`),z,r);if(c&&t==`as`)return D.marked=`keyword`,k(K,r);if(e==`regexp`)return D.state.lastType=D.marked=`operator`,D.stream.backUp(D.stream.pos-D.stream.start-1),k(i)}}function ce(e,t){return e==`quasi`?t.slice(t.length-2)=="${"?k(oe,le):k(ce):O()}function le(e){if(e==`}`)return D.marked=`string-2`,D.state.tokenize=b,k(ce)}function W(e){return S(D.stream,D.state),O(e==`{`?V:H)}function ue(e){return S(D.stream,D.state),O(e==`{`?V:re)}function de(e){return function(t){return t==`.`?k(e?pe:fe):t==`variable`&&c?k(je,e?se:U):O(e?re:H)}}function fe(e,t){if(t==`target`)return D.marked=`keyword`,k(U)}function pe(e,t){if(t==`target`)return D.marked=`keyword`,k(se)}function me(e){return e==`:`?k(z,V):O(U,B(`;`),z)}function he(e){if(e==`variable`)return D.marked=`property`,k()}function ge(e,t){if(e==`async`)return D.marked=`property`,k(ge);if(e==`variable`||D.style==`keyword`){if(D.marked=`property`,t==`get`||t==`set`)return k(_e);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(ve)}else if(e==`number`||e==`string`)return D.marked=a?`property`:D.style+` property`,k(ve);else if(e==`jsonld-keyword`)return k(ve);else if(c&&ee(t))return D.marked=`keyword`,k(ge);else if(e==`[`)return k(H,xe,B(`]`),ve);else if(e==`spread`)return k(re,ve);else if(t==`*`)return D.marked=`keyword`,k(ge);else if(e==`:`)return O(ve)}function _e(e){return e==`variable`?(D.marked=`property`,k(We)):O(ve)}function ve(e){if(e==`:`)return k(re);if(e==`(`)return O(We)}function G(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(B(t))}return function(n,i){return n==t||i==t?k():O(e,r)}}function ye(e,t,n){for(var r=3;r<arguments.length;r++)D.cc.push(arguments[r]);return k(R(t,n),G(e,t),z)}function be(e){return e==`}`?k():O(V,be)}function xe(e,t){if(c){if(e==`:`)return k(K);if(t==`?`)return k(xe)}}function Se(e,t){if(c&&(e==`:`||t==`in`))return k(K)}function Ce(e){if(c&&e==`:`)return D.stream.match(/^\s*\w+\s+is\b/,!1)?k(H,we,K):k(K)}function we(e,t){if(t==`is`)return D.marked=`keyword`,k()}function K(e,t){if(t==`keyof`||t==`typeof`||t==`infer`||t==`readonly`)return D.marked=`keyword`,k(t==`typeof`?re:K);if(e==`variable`||t==`void`)return D.marked=`type`,k(Ae);if(t==`|`||t==`&`)return k(K);if(e==`string`||e==`number`||e==`atom`)return k(Ae);if(e==`[`)return k(R(`]`),G(K,`]`,`,`),z,Ae);if(e==`{`)return k(R(`}`),q,z,Ae);if(e==`(`)return k(G(ke,`)`),Te,Ae);if(e==`<`)return k(G(K,`>`),K);if(e==`quasi`)return O(De,Ae)}function Te(e){if(e==`=>`)return k(K)}function q(e){return e.match(/[\}\)\]]/)?k():e==`,`||e==`;`?k(q):O(Ee,q)}function Ee(e,t){if(e==`variable`||D.style==`keyword`)return D.marked=`property`,k(Ee);if(t==`?`||e==`number`||e==`string`)return k(Ee);if(e==`:`)return k(K);if(e==`[`)return k(B(`variable`),Se,B(`]`),Ee);if(e==`(`)return O(Ge,Ee);if(!e.match(/[;\}\)\],]/))return k()}function De(e,t){return e==`quasi`?t.slice(t.length-2)=="${"?k(K,Oe):k(De):O()}function Oe(e){if(e==`}`)return D.marked=`string-2`,D.state.tokenize=b,k(De)}function ke(e,t){return e==`variable`&&D.stream.match(/^\s*[?:]/,!1)||t==`?`?k(ke):e==`:`?k(K):e==`spread`?k(ke):O(K)}function Ae(e,t){if(t==`<`)return k(R(`>`),G(K,`>`),z,Ae);if(t==`|`||e==`.`||t==`&`)return k(K);if(e==`[`)return k(K,B(`]`),Ae);if(t==`extends`||t==`implements`)return D.marked=`keyword`,k(K);if(t==`?`)return k(K,B(`:`),K)}function je(e,t){if(t==`<`)return k(R(`>`),G(K,`>`),z,Ae)}function Me(){return O(K,Ne)}function Ne(e,t){if(t==`=`)return k(K)}function Pe(e,t){return t==`enum`?(D.marked=`keyword`,k(J)):O(Fe,xe,Re,ze)}function Fe(e,t){if(c&&ee(t))return D.marked=`keyword`,k(Fe);if(e==`variable`)return j(t),k();if(e==`spread`)return k(Fe);if(e==`[`)return ye(Le,`]`);if(e==`{`)return ye(Ie,`}`)}function Ie(e,t){return e==`variable`&&!D.stream.match(/^\s*:/,!1)?(j(t),k(Re)):(e==`variable`&&(D.marked=`property`),e==`spread`?k(Fe):e==`}`?O():e==`[`?k(H,B(`]`),B(`:`),Ie):k(B(`:`),Fe,Re))}function Le(){return O(Fe,Re)}function Re(e,t){if(t==`=`)return k(re)}function ze(e){if(e==`,`)return k(Pe)}function Be(e,t){if(e==`keyword b`&&t==`else`)return k(R(`form`,`else`),V,z)}function Ve(e,t){if(t==`await`)return k(Ve);if(e==`(`)return k(R(`)`),He,z)}function He(e){return e==`var`?k(Pe,Ue):e==`variable`?k(Ue):O(Ue)}function Ue(e,t){return e==`)`?k():e==`;`?k(Ue):t==`in`||t==`of`?(D.marked=`keyword`,k(H,Ue)):O(H,Ue)}function We(e,t){if(t==`*`)return D.marked=`keyword`,k(We);if(e==`variable`)return j(t),k(We);if(e==`(`)return k(F,R(`)`),G(qe,`)`),z,Ce,V,L);if(c&&t==`<`)return k(R(`>`),G(Me,`>`),z,We)}function Ge(e,t){if(t==`*`)return D.marked=`keyword`,k(Ge);if(e==`variable`)return j(t),k(Ge);if(e==`(`)return k(F,R(`)`),G(qe,`)`),z,Ce,L);if(c&&t==`<`)return k(R(`>`),G(Me,`>`),z,Ge)}function Ke(e,t){if(e==`keyword`||e==`variable`)return D.marked=`type`,k(Ke);if(t==`<`)return k(R(`>`),G(Me,`>`),z)}function qe(e,t){return t==`@`&&k(H,qe),e==`spread`?k(qe):c&&ee(t)?(D.marked=`keyword`,k(qe)):c&&e==`this`?k(xe,Re):O(Fe,xe,Re)}function Je(e,t){return e==`variable`?Ye(e,t):Xe(e,t)}function Ye(e,t){if(e==`variable`)return j(t),k(Xe)}function Xe(e,t){if(t==`<`)return k(R(`>`),G(Me,`>`),z,Xe);if(t==`extends`||t==`implements`||c&&e==`,`)return t==`implements`&&(D.marked=`keyword`),k(c?K:H,Xe);if(e==`{`)return k(R(`}`),Ze,z)}function Ze(e,t){if(e==`async`||e==`variable`&&(t==`static`||t==`get`||t==`set`||c&&ee(t))&&D.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return D.marked=`keyword`,k(Ze);if(e==`variable`||D.style==`keyword`)return D.marked=`property`,k(Qe,Ze);if(e==`number`||e==`string`)return k(Qe,Ze);if(e==`[`)return k(H,xe,B(`]`),Qe,Ze);if(t==`*`)return D.marked=`keyword`,k(Ze);if(c&&e==`(`)return O(Ge,Ze);if(e==`;`||e==`,`)return k(Ze);if(e==`}`)return k();if(t==`@`)return k(H,Ze)}function Qe(e,t){if(t==`!`||t==`?`)return k(Qe);if(e==`:`)return k(K,Re);if(t==`=`)return k(re);var n=D.state.lexical.prev,r=n&&n.info==`interface`;return O(r?Ge:We)}function $e(e,t){return t==`*`?(D.marked=`keyword`,k(at,B(`;`))):t==`default`?(D.marked=`keyword`,k(H,B(`;`))):e==`{`?k(G(et,`}`),at,B(`;`)):O(V)}function et(e,t){if(t==`as`)return D.marked=`keyword`,k(B(`variable`));if(e==`variable`)return O(re,et)}function tt(e){return e==`string`?k():e==`(`?O(H):e==`.`?O(U):O(nt,rt,at)}function nt(e,t){return e==`{`?ye(nt,`}`):(e==`variable`&&j(t),t==`*`&&(D.marked=`keyword`),k(it))}function rt(e){if(e==`,`)return k(nt,rt)}function it(e,t){if(t==`as`)return D.marked=`keyword`,k(nt)}function at(e,t){if(t==`from`)return D.marked=`keyword`,k(H)}function ot(e){return e==`]`?k():O(G(re,`]`))}function J(){return O(R(`form`),Fe,B(`{`),R(`}`),G(st,`}`),z,z)}function st(){return O(Fe,Re)}function ct(e,t){return e.lastType==`operator`||e.lastType==`,`||d.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function lt(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 te(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==z)s=s.prev;else if(u!=Be&&u!=L)break}for(;(s.type==`stat`||s.type==`form`)&&(o==`}`||(c=t.cc[t.cc.length-1])&&(c==U||c==se)&&!/^[,\.=+\-*:?[\(]/.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+(ct(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:lt,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})})}),on=G((exports,t)=>{(function(n){typeof exports==`object`&&typeof t==`object`?n(qt(),rn(),an(),$t()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../xml/xml`,`../javascript/javascript`,`../css/css`],n):n(CodeMirror)})(function(e){"use strict";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){var t=r[e];return t||(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(){var t=e.startState(a);return{token:p,inTag:null,localMode:null,localState:null,htmlState:t}},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`)})}),sn=G((exports,t)=>{(function(n){typeof exports==`object`&&typeof t==`object`?n(qt()):typeof define==`function`&&define.amd?define([`../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";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}}}})}),cn=G((exports,t)=>{(function(n){typeof exports==`object`&&typeof t==`object`?n(qt(),rn(),sn()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../xml/xml`,`../meta`],n):n(CodeMirror)})(function(e){"use strict";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){var s=t.match(u,!0)[1]===` `;return s?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 c=t.next();if(i.linkTitle){i.linkTitle=!1;var l=c;c===`(`&&(l=`)`),l=(l+``).replace(/([.?*+^\[\]\\(){}|-])/g,`\\$1`);var d=`^\\s*(?:[^`+l+`\\\\]+|\\\\\\\\|\\\\.)`+l;if(t.match(new RegExp(d),!0))return o.linkHref}if(c==="`"){var f=i.formatting;n.highlightFormatting&&(i.formatting=`code`),t.eatWhile("`");var p=t.current().length;if(i.code==0&&(!i.quote||p==1))return i.code=p,T(i);if(p==i.code){var m=T(i);return i.code=0,m}else return i.formatting=f,T(i)}else if(i.code)return T(i);if(c===`\\`&&(t.next(),n.highlightFormatting)){var h=T(i),_=o.formatting+`-escape`;return h?h+` `+_:_}if(c===`!`&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting=`image`),T(i);if(c===`[`&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting=`image`),T(i);if(c===`]`&&i.imageAltText){n.highlightFormatting&&(i.formatting=`image`);var h=T(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=k,h}if(c===`[`&&!i.image)return i.linkText&&t.match(/^.*?\]/)?T(i):(i.linkText=!0,n.highlightFormatting&&(i.formatting=`link`),T(i));if(c===`]`&&i.linkText){n.highlightFormatting&&(i.formatting=`link`);var h=T(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?k:D,h}if(c===`<`&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){i.f=i.inline=O,n.highlightFormatting&&(i.formatting=`link`);var h=T(i);return h?h+=` `:h=``,h+o.linkInline}if(c===`<`&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){i.f=i.inline=O,n.highlightFormatting&&(i.formatting=`link`);var h=T(i);return h?h+=` `:h=``,h+o.linkEmail}if(n.xml&&c===`<`&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var v=t.string.indexOf(`>`,t.pos);if(v!=-1){var b=t.string.substring(t.start,v);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),y(t,i,C)}if(n.xml&&c===`<`&&t.match(/^\/\w*?>/))return i.md_inside=!1,`tag`;if(c===`*`||c===`_`){for(var x=1,S=t.pos==1?` `:t.string.charAt(t.pos-2);x<3&&t.eat(c);)x++;var w=t.peek()||` `,E=!/\s/.test(w)&&(!g.test(w)||/\s/.test(S)||g.test(S)),A=!/\s/.test(S)&&(!g.test(S)||/\s/.test(w)||g.test(w)),j=null,M=null;if(x%2&&(!i.em&&E&&(c===`*`||!A||g.test(S))?j=!0:i.em==c&&A&&(c===`*`||!E||g.test(w))&&(j=!1)),x>1&&(!i.strong&&E&&(c===`*`||!A||g.test(S))?M=!0:i.strong==c&&A&&(c===`*`||!E||g.test(w))&&(M=!1)),M!=null||j!=null){n.highlightFormatting&&(i.formatting=j==null?`strong`:M==null?`em`:`strong em`),j===!0&&(i.em=c),M===!0&&(i.strong=c);var m=T(i);return j===!1&&(i.em=!1),M===!1&&(i.strong=!1),m}}else if(c===` `&&(t.eat(`*`)||t.eat(`_`))){if(t.peek()===` `)return T(i);t.backUp(1)}if(n.strikethrough){if(c===`~`&&t.eatWhile(c)){if(i.strikethrough){n.highlightFormatting&&(i.formatting=`strikethrough`);var m=T(i);return i.strikethrough=!1,m}else if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting=`strikethrough`),T(i)}else if(c===` `&&t.match(`~~`,!0)){if(t.peek()===` `)return T(i);t.backUp(2)}}if(n.emoji&&c===`:`&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting=`emoji`);var ee=T(i);return i.emoji=!1,ee}return c===` `&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),T(i)}function O(e,t){var r=e.next();if(r===`>`){t.f=t.inline=D,n.highlightFormatting&&(t.formatting=`link`);var i=T(t);return i?i+=` `:i=``,i+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){var i=t.next();if(i===e){r.f=r.inline=D,n.highlightFormatting&&(r.formatting=`link-string`);var a=T(r);return r.linkHref=!1,a}return t.match(A[e]),r.linkHref=!0,T(r)}}function M(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=ee,e.next(),n.highlightFormatting&&(t.formatting=`link`),t.linkText=!0,T(t)):v(e,t,D)}function ee(e,t){if(e.match(`]:`,!0)){t.f=t.inline=te,n.highlightFormatting&&(t.formatting=`link`);var r=T(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),o.linkText}function te(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 N={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:N}},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 N},`xml`),e.defineMIME(`text/markdown`,`markdown`),e.defineMIME(`text/x-markdown`,`markdown`)})}),ln=G((exports,t)=>{(function(n){typeof exports==`object`&&typeof t==`object`?n(qt(),an(),$t(),on()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../javascript/javascript`,`../css/css`,`../htmlmixed/htmlmixed`],n):n(CodeMirror)})(function(e){"use strict";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}var n=s.token(e,t.jsState);return n||!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=ee(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 ee(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)),re(n,r,i),`atom`}}function te(e,t){if(e.match(/^(!?=|-)/))return t.javaScriptLine=!0,`punctuation`}function N(e){if(e.match(/^#([\w-]+)/))return i}function P(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 I(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),I(t,n)}catch{}return n.attrValue+=t.current(),r||!0}}function L(e,t){if(e.match(/^&attributes\b/))return t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0,`keyword`}function R(e){if(e.sol()&&e.eatSpace())return`indent`}function z(e,t){if(e.match(/^ *\/\/(-)?([^\n]*)/))return t.indentOf=e.indentation(),t.indentToken=`comment`,`comment`}function B(e){if(e.match(/^: */))return`colon`}function V(e,t){if(e.match(/^(?:\| ?| )([^\n]+)/))return`string`;if(e.match(/^(<[^\n]*)/,!1))return re(e,t,`htmlmixed`),t.innerModeForLine=!0,ie(e,t,!0)}function ne(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`),re(e,t,n),`dot`}}function H(e){return e.next(),null}function re(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 ae(e,t){if(e.sol()&&(t.restOfLine=``),t.restOfLine){e.skipToEnd();var n=t.restOfLine;return t.restOfLine=``,n}}function oe(){return new c}function U(e){return e.copy()}function se(e,t){var n=ie(e,t)||ae(e,t)||m(e,t)||w(e,t)||A(e,t)||I(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)||ee(e,t)||te(e,t)||N(e)||P(e)||F(e,t)||L(e,t)||R(e)||V(e,t)||z(e,t)||B(e)||ne(e,t)||H(e);return n===!0?null:n}return{startState:oe,copyState:U,token:se}},`javascript`,`css`,`htmlmixed`),e.defineMIME(`text/x-pug`,`pug`),e.defineMIME(`text/x-jade`,`pug`)})}),un=G((exports,t)=>{(function(n){typeof exports==`object`&&typeof t==`object`?n(qt(),$t()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../css/css`],n):n(CodeMirror)})(function(e){"use strict";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=[`true`,`false`,`null`,`auto`],l=RegExp(`^`+c.join(`|`)),u=[`\\(`,`\\)`,`=`,`>`,`<`,`==`,`>=`,`<=`,`\\+`,`-`,`\\!=`,`/`,`\\*`,`%`,`and`,`or`,`not`,`;`,`\\{`,`\\}`,`:`],d=s(u),f=/^::?[a-zA-Z_][\w\-]*/,p;function m(e){return!e.peek()||e.match(/\s+$/,!1)}function h(e,t){var n=e.peek();return n===`)`?(e.next(),t.tokenizer=x,`operator`):n===`(`?(e.next(),e.eatSpace(),`operator`):n===`'`||n===`"`?(t.tokenizer=_(e.next()),`string`):(t.tokenizer=_(`)`,!1),`string`)}function g(e,t){return function(n,r){return n.sol()&&n.indentation()<=e?(r.tokenizer=x,x(n,r)):(t&&n.skipTo(`*/`)?(n.next(),n.next(),r.tokenizer=x):n.skipToEnd(),`comment`)}}function _(e,t){t??=!0;function n(r,i){var a=r.next(),o=r.peek(),s=r.string.charAt(r.pos-2),c=a!==`\\`&&o===e||a===e&&s!==`\\`;return c?(a!==e&&t&&r.next(),m(r)&&(i.cursorHalf=0),i.tokenizer=x,`string`):a===`#`&&o===`{`?(i.tokenizer=v(n),r.next(),`operator`):`string`}return n}function v(e){return function(t,n){return t.peek()===`}`?(t.next(),n.tokenizer=e,`operator`):x(t,n)}}function y(e){if(e.indentCount==0){e.indentCount++;var n=e.scopes[0].offset,r=n+t.indentUnit;e.scopes.unshift({offset:r})}}function b(e){e.scopes.length!=1&&e.scopes.shift()}function x(e,t){var n=e.peek();if(e.match(`/*`))return t.tokenizer=g(e.indentation(),!0),t.tokenizer(e,t);if(e.match(`//`))return t.tokenizer=g(e.indentation(),!1),t.tokenizer(e,t);if(e.match(`#{`))return t.tokenizer=v(x),`operator`;if(n===`"`||n===`'`)return e.next(),t.tokenizer=_(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 m(e)&&(t.cursorHalf=0),`number`;if(e.match(/^(px|em|in)\b/))return m(e)&&(t.cursorHalf=0),`unit`;if(e.match(l))return m(e)&&(t.cursorHalf=0),`keyword`;if(e.match(/^url/)&&e.peek()===`(`)return t.tokenizer=h,m(e)&&(t.cursorHalf=0),`atom`;if(n===`$`)return e.next(),e.eatWhile(/[\w-]/),m(e)&&(t.cursorHalf=0),`variable-2`;if(n===`!`)return e.next(),t.cursorHalf=0,e.match(/^[\w]+/)?`keyword`:`operator`;if(e.match(d))return m(e)&&(t.cursorHalf=0),`operator`;if(e.eatWhile(/[\w-]/))return m(e)&&(t.cursorHalf=0),p=e.current().toLowerCase(),a.hasOwnProperty(p)?`atom`:i.hasOwnProperty(p)?`keyword`:r.hasOwnProperty(p)?(t.prevProp=e.current().toLowerCase(),`property`):`tag`;if(m(e))return t.cursorHalf=0,null}else{if(n===`-`&&e.match(/^-\w+-/))return`meta`;if(n===`.`){if(e.next(),e.match(/^[\w-]+/))return y(t),`qualifier`;if(e.peek()===`#`)return y(t),`tag`}if(n===`#`){if(e.next(),e.match(/^[\w-]+/))return y(t),`builtin`;if(e.peek()===`#`)return y(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(l))return`keyword`;if(e.match(/^url/)&&e.peek()===`(`)return t.tokenizer=h,`atom`;if(n===`=`&&e.match(/^=[\w-]+/))return y(t),`meta`;if(n===`+`&&e.match(/^\+[\w-]+/))return`variable-3`;if(n===`@`&&e.match(`@extend`)&&(e.match(/\s*[\w]/)||b(t)),e.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return y(t),`def`;if(n===`@`)return e.next(),e.eatWhile(/[\w-]/),`def`;if(e.eatWhile(/[\w-]/))if(e.match(/ *: *[\w-\+\$#!\("']/,!1)){p=e.current().toLowerCase();var s=t.prevProp+`-`+p;return r.hasOwnProperty(s)?`property`:r.hasOwnProperty(p)?(t.prevProp=p,`property`):o.hasOwnProperty(p)?`property`:`tag`}else if(e.match(/ *:/,!1))return y(t),t.cursorHalf=1,t.prevProp=e.current().toLowerCase(),`property`;else if(e.match(/ *,/,!1))return`tag`;else return y(t),`tag`;if(n===`:`)return e.match(f)?`variable-3`:(e.next(),t.cursorHalf=1,`operator`)}return e.match(d)?`operator`:(e.next(),null)}function S(e,n){e.sol()&&(n.indentCount=0);var r=n.tokenizer(e,n),i=e.current();if((i===`@return`||i===`}`)&&b(n),r!==null){for(var a=e.pos-i.length,o=a+t.indentUnit*n.indentCount,s=[],c=0;c<n.scopes.length;c++){var l=n.scopes[c];l.offset<=o&&s.push(l)}n.scopes=s}return r}return{startState:function(){return{tokenizer:x,scopes:[{offset:0,type:`sass`}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(e,t){var n=S(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`)})}),dn=G((exports,t)=>{(function(n){typeof exports==`object`&&typeof t==`object`?n(qt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";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}}}})}),fn=G((exports,t)=>{(function(n){typeof exports==`object`&&typeof t==`object`?n(qt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";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=[`break`,`by`,`continue`,`debugger`,`delete`,`do`,`in`,`of`,`new`,`return`,`then`,`this`,`@`,`throw`,`when`,`until`,`extends`],d=r(l.concat(u));l=r(l);var f=/^('{3}|\"{3}|['\"])/,p=/^(\/{3}|\/)/,m=[`Infinity`,`NaN`,`undefined`,`null`,`true`,`false`,`on`,`off`,`yes`,`no`],h=r(m);function g(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&&b(e,t)}if(e.eatSpace())return null;var u=e.peek();if(e.match(`####`))return e.skipToEnd(),`comment`;if(e.match(`###`))return t.tokenize=v,t.tokenize(e,t);if(u===`#`)return e.skipToEnd(),`comment`;if(e.match(/^-?[0-9\.]/,!1)){var m=!1;if(e.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(m=!0),e.match(/^-?\d+\.\d*/)&&(m=!0),e.match(/^-?\.\d+/)&&(m=!0),m)return e.peek()==`.`&&e.backUp(1),`number`;var g=!1;if(e.match(/^-?0x[0-9a-f]+/i)&&(g=!0),e.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(g=!0),e.match(/^-?0(?![\dx])/i)&&(g=!0),g)return`number`}if(e.match(f))return t.tokenize=_(e.current(),!1,`string`),t.tokenize(e,t);if(e.match(p)){if(e.current()!=`/`||e.match(/^.*\//,!1))return t.tokenize=_(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(h)?`atom`:e.match(s)||t.prop&&e.match(o)?`property`:e.match(d)?`keyword`:e.match(o)?`variable`:(e.next(),n)}function _(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=g,i;else a.eat(/['"\/]/);return r&&(t.singleLineStringErrors?i=n:o.tokenize=g),i}}function v(e,t){for(;!e.eol();){if(e.eatWhile(/[^#]/),e.match(`###`)){t.tokenize=g;break}e.eatWhile(`#`)}return`comment`}function y(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 b(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 x(e,t){var r=t.tokenize(e,t),i=e.current();i===`return`&&(t.dedent=!0),((i===`->`||i===`=>`)&&e.eol()||r===`indent`)&&y(e,t);var a=`[({`.indexOf(i);if(a!==-1&&y(e,t,`])}`.slice(a,a+1)),l.exec(i)&&y(e,t),i==`then`&&b(e,t),r===`dedent`&&b(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}var S={startState:function(e){return{tokenize:g,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=x(e,t);return r&&r!=`comment`&&(n&&(n.align=!0),t.prop=r==`punctuation`&&e.current()==`.`),r},indent:function(e,t){if(e.tokenize!=g)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`};return S}),e.defineMIME(`application/vnd.coffeescript`,`coffeescript`),e.defineMIME(`text/x-coffeescript`,`coffeescript`),e.defineMIME(`text/coffeescript`,`coffeescript`)})}),pn=G((exports,t)=>{(function(n){typeof exports==`object`&&typeof t==`object`?n(qt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){"use strict";e.defineMode(`stylus`,function(e){for(var p=e.indentUnit,m=``,v=g(t),y=/^(a|b|i|s|col|em)$/i,b=g(a),x=g(o),S=g(l),C=g(c),w=g(n),T=h(n),E=g(i),D=g(r),O=g(s),k=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,A=h(u),j=g(d),M=new RegExp(/^\-(moz|ms|o|webkit)-/i),ee=g(f),te=``,N={},P,F,I,L;m.length<p;)m+=` `;function R(e,t){if(te=e.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),t.context.line.firstWord=te?te[0].replace(/^\s*/,``):``,t.context.line.indent=e.indentation(),P=e.peek(),e.match(`//`))return e.skipToEnd(),[`comment`,`comment`];if(e.match(`/*`))return t.tokenize=z,z(e,t);if(P==`"`||P==`'`)return e.next(),t.tokenize=B(P),t.tokenize(e,t);if(P==`@`)return e.next(),e.eatWhile(/[\w\\-]/),[`def`,e.current()];if(P==`#`){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`]):P==`!`?(e.next(),[e.match(/^(important|optional)/i)?`keyword`:`operator`,`important`]):P==`.`&&e.match(/^\.[a-z][\w-]*/i)?[`qualifier`,`qualifier`]:e.match(T)?(e.peek()==`(`&&(t.tokenize=V),[`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)&&!oe(e.current())?(e.match(`.`),[`variable-2`,`variable-name`]):[`variable-2`,`word`]:e.match(k)?[`operator`,e.current()]:/[:;,{}\[\]\(\)]/.test(P)?(e.next(),[null,P]):(e.next(),[null,null])}function z(e,t){for(var n=!1,r;(r=e.next())!=null;){if(n&&r==`/`){t.tokenize=null;break}n=r==`*`}return[`comment`,`comment`]}function B(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 V(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=B(`)`),[null,`(`]}function ne(e,t,n,r){this.type=e,this.indent=t,this.prev=n,this.line=r||{firstWord:``,indent:0}}function H(e,t,n,r){return r=r>=0?r:p,e.context=new ne(n,t.indentation()+r,e.context),n}function re(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 N[n.context.type](e,t,n)}function ae(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return ie(e,t,n)}function oe(e){return e.toLowerCase()in v}function U(e){return e=e.toLowerCase(),e in b||e in O}function se(e){return e.toLowerCase()in j}function ce(e){return e.toLowerCase().match(M)}function le(e){var t=e.toLowerCase(),n=`variable-2`;return oe(e)?n=`tag`:se(e)?n=`block-keyword`:U(e)?n=`property`:t in S||t in ee?n=`atom`:t==`return`||t in C?n=`keyword`:e.match(/^[A-Z]/)&&(n=`string`),n}function W(e,t){return pe(t)&&(e==`{`||e==`]`||e==`hash`||e==`qualifier`)||e==`block-mixin`}function ue(e,t){return e==`{`&&t.match(/^\s*\$?[\w-]+/i,!1)}function de(e,t){return e==`:`&&t.match(/^[a-z-]+/,!1)}function fe(e){return e.sol()||e.string.match(RegExp(`^\\s*`+_(e.current())))}function pe(e){return e.eol()||e.match(/^\s*$/,!1)}function me(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 N.block=function(e,t,n){if(e==`comment`&&fe(t)||e==`,`&&pe(t)||e==`mixin`)return H(n,t,`block`,0);if(ue(e,t))return H(n,t,`interpolation`);if(pe(t)&&e==`]`&&!/^\s*(\.|#|:|\[|\*|&)/.test(t.string)&&!oe(me(t)))return H(n,t,`block`,0);if(W(e,t))return H(n,t,`block`);if(e==`}`&&pe(t))return H(n,t,`block`,0);if(e==`variable-name`)return t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||se(me(t))?H(n,t,`variableName`):H(n,t,`variableName`,0);if(e==`=`)return!pe(t)&&!se(me(t))?H(n,t,`block`,0):H(n,t,`block`);if(e==`*`&&(pe(t)||t.match(/\s*(,|\.|#|\[|:|{)/,!1)))return L=`tag`,H(n,t,`block`);if(de(e,t))return H(n,t,`pseudo`);if(/@(font-face|media|supports|(-moz-)?document)/.test(e))return H(n,t,pe(t)?`block`:`atBlock`);if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return H(n,t,`keyframes`);if(/@extends?/.test(e))return H(n,t,`extend`,0);if(e&&e.charAt(0)==`@`)return t.indentation()>0&&U(t.current().slice(1))?(L=`variable-2`,`block`):/(@import|@require|@charset)/.test(e)?H(n,t,`block`,0):H(n,t,`block`);if(e==`reference`&&pe(t))return H(n,t,`block`);if(e==`(`)return H(n,t,`parens`);if(e==`vendor-prefixes`)return H(n,t,`vendorPrefixes`);if(e==`word`){var r=t.current();if(L=le(r),L==`property`)return fe(t)?H(n,t,`block`,0):(L=`atom`,`block`);if(L==`tag`){if(/embed|menu|pre|progress|sub|table/.test(r)&&U(me(t))||t.string.match(RegExp(`\\[\\s*`+r+`|`+r+`\\s*\\]`)))return L=`atom`,`block`;if(y.test(r)&&(fe(t)&&t.string.match(/=/)||!fe(t)&&!t.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!oe(me(t))))return L=`variable-2`,se(me(t))?`block`:H(n,t,`block`,0);if(pe(t))return H(n,t,`block`)}if(L==`block-keyword`)return L=`keyword`,t.current(/(if|unless)/)&&!fe(t)?`block`:H(n,t,`block`);if(r==`return`)return H(n,t,`block`,0);if(L==`variable-2`&&t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return H(n,t,`block`)}return n.context.type},N.parens=function(e,t,n){if(e==`(`)return H(n,t,`parens`);if(e==`)`)return n.context.prev.type==`parens`?re(n):t.string.match(/^[a-z][\w-]*\(/i)&&pe(t)||se(me(t))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(me(t))||!t.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&oe(me(t))?H(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)?H(n,t,`block`,0):pe(t)?H(n,t,`block`):H(n,t,`block`,0);if(e&&e.charAt(0)==`@`&&U(t.current().slice(1))&&(L=`variable-2`),e==`word`){var r=t.current();L=le(r),L==`tag`&&y.test(r)&&(L=`variable-2`),(L==`property`||r==`to`)&&(L=`atom`)}return e==`variable-name`?H(n,t,`variableName`):de(e,t)?H(n,t,`pseudo`):n.context.type},N.vendorPrefixes=function(e,t,n){return e==`word`?(L=`property`,H(n,t,`block`,0)):re(n)},N.pseudo=function(e,t,n){return U(me(t.string))?ae(e,t,n):(t.match(/^[a-z-]+/),L=`variable-3`,pe(t)?H(n,t,`block`):re(n))},N.atBlock=function(e,t,n){if(e==`(`)return H(n,t,`atBlock_parens`);if(W(e,t))return H(n,t,`block`);if(ue(e,t))return H(n,t,`interpolation`);if(e==`word`){var r=t.current().toLowerCase();if(L=/^(only|not|and|or)$/.test(r)?`keyword`:w.hasOwnProperty(r)?`tag`:D.hasOwnProperty(r)?`attribute`:E.hasOwnProperty(r)?`property`:x.hasOwnProperty(r)?`string-2`:le(t.current()),L==`tag`&&pe(t))return H(n,t,`block`)}return e==`operator`&&/^(not|and|or)$/.test(t.current())&&(L=`keyword`),n.context.type},N.atBlock_parens=function(e,t,n){if(e==`{`||e==`}`)return n.context.type;if(e==`)`)return pe(t)?H(n,t,`block`):H(n,t,`atBlock`);if(e==`word`){var r=t.current().toLowerCase();return L=le(r),/^(max|min)/.test(r)&&(L=`property`),L==`tag`&&(L=y.test(r)?`variable-2`:`atom`),n.context.type}return N.atBlock(e,t,n)},N.keyframes=function(e,t,n){return t.indentation()==`0`&&(e==`}`&&fe(t)||e==`]`||e==`hash`||e==`qualifier`||oe(t.current()))?ae(e,t,n):e==`{`?H(n,t,`keyframes`):e==`}`?fe(t)?re(n,!0):H(n,t,`keyframes`):e==`unit`&&/^[0-9]+\%$/.test(t.current())?H(n,t,`keyframes`):e==`word`&&(L=le(t.current()),L==`block-keyword`)?(L=`keyword`,H(n,t,`keyframes`)):/@(font-face|media|supports|(-moz-)?document)/.test(e)?H(n,t,pe(t)?`block`:`atBlock`):e==`mixin`?H(n,t,`block`,0):n.context.type},N.interpolation=function(e,t,n){return e==`{`&&re(n)&&H(n,t,`block`),e==`}`?t.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||t.string.match(/^\s*[a-z]/i)&&oe(me(t))?H(n,t,`block`):!t.string.match(/^(\{|\s*\&)/)||t.match(/\s*[\w-]/,!1)?H(n,t,`block`,0):H(n,t,`block`):e==`variable-name`?H(n,t,`variableName`,0):(e==`word`&&(L=le(t.current()),L==`tag`&&(L=`atom`)),n.context.type)},N.extend=function(e,t,n){return e==`[`||e==`=`?`extend`:e==`]`?re(n):e==`word`?(L=le(t.current()),`extend`):re(n)},N.variableName=function(e,t,n){return e==`string`||e==`[`||e==`]`||t.current().match(/^(\.|\$)/)?(t.current().match(/^\.[\w-]+/i)&&(L=`variable-2`),`variableName`):ae(e,t,n)},{startState:function(e){return{tokenize:null,state:`block`,context:new ne(`block`,e||0,null)}},token:function(e,t){return!t.tokenize&&e.eatSpace()?null:(F=(t.tokenize||R)(e,t),F&&typeof F==`object`&&(I=F[1],F=F[0]),L=F,t.state=N[t.state](I,e,t),L)},indent:function(e,t,n){var r=e.context,i=t&&t.charAt(0),a=r.indent,o=me(t),s=n.match(/^\s*/)[0].replace(/\t/g,m).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)||se(o)?a=s:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(i)||oe(o)?a=/\,\s*$/.test(c)?l:/^\s+/.test(n)&&(/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(c)||oe(c))?s<=l?l:l+p:s:!/,\s*$/.test(n)&&(ce(o)||U(o))&&(a=se(c)?s<=l?l:l+p:/^\{/.test(c)?s<=l?s:l+p:ce(c)||U(c)?s>=l?l:s:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(c)||/=\s*$/.test(c)||oe(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=[`@font-face`,`@keyframes`,`@media`,`@viewport`,`@page`,`@host`,`@supports`,`@block`,`@css`],m=t.concat(n,r,i,a,o,c,l,s,u,d,f,p);function h(e){return e=e.sort(function(e,t){return t>e}),RegExp(`^((`+e.join(`)|(`)+`))\\b`)}function g(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}function _(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`)}e.registerHelper(`hintWords`,`stylus`,m),e.defineMIME(`text/x-styl`,`stylus`)})}),mn=G((exports,t)=>{(function(n){"use strict";typeof exports==`object`&&typeof t==`object`?n(qt(),dn(),rn(),an(),fn(),$t(),un(),pn(),ln(),nn()):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){var r={token:function(e){if(e.match(/^\{\{.*?\}\}/))return`meta mustache`;for(;e.next()&&!e.match(`{{`,!1););return null}};return e.overlayMode(e.getMode(t,n.backdrop||`text/html`),r)}),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`)})}),hn=be(qt()),gn=be(Jt()),_n=be(Yt()),vn=be(Xt()),yn=be(Qt()),bn=be($t()),xn=be(nn()),Sn=be(on()),Cn=be(an()),wn=be(cn()),Tn=be(ln()),En=be(un()),Dn=be(mn()),On=be(rn());function kn(e,t,n={}){let r=(0,hn.default)(e.value,{theme:`vars`,value:t.value,...n}),i=!1;return r.on(`change`,()=>{if(i){i=!1;return}t.value=r.getValue()}),re(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 An(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 jn(e,t){let n=1;e.getWrapperElement().addEventListener(`mouseenter`,()=>{n=1}),t.getWrapperElement().addEventListener(`mouseenter`,()=>{n=2}),e.on(`scroll`,e=>{n===1&&An(e,t)}),e.on(`scrollCursorIntoView`,e=>An(e,t)),t.on(`scroll`,t=>{n===2&&An(t,e)}),t.on(`scrollCursorIntoView`,t=>An(t,e))}function Mn(e){return e.trimStart().startsWith(`<`)?`htmlmixed`:e.match(/^import\s/)?`javascript`:e.match(/^[.#].+\{/)?`css`:`javascript`}const Nn=L(`vite-devtools-settings`,{codeviewerLineWrap:!1,codeviewerDiffPanelSize:200},{mergeDefaults:!0}),Pn=Symbol(`Comlink.proxy`),Fn=Symbol(`Comlink.endpoint`),In=Symbol(`Comlink.releaseProxy`),Ln=Symbol(`Comlink.finalizer`),Rn=Symbol(`Comlink.thrown`),zn=e=>typeof e==`object`&&!!e||typeof e==`function`,Bn={canHandle:e=>zn(e)&&e[Pn],serialize(e){let{port1:t,port2:n}=new MessageChannel;return Wn(e,t),[n,[n]]},deserialize(e){return e.start(),qn(e)}},Vn={canHandle:e=>zn(e)&&Rn 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}},Hn=new Map([[`proxy`,Bn],[`throw`,Vn]]);function Un(e,t){for(let n of e)if(t===n||n===`*`||n instanceof RegExp&&n.test(t))return!0;return!1}function Wn(e,t=globalThis,n=[`*`]){t.addEventListener(`message`,function r(i){if(!i||!i.data)return;if(!Un(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(sr),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]]=sr(i.data.value),l=!0;break;case`APPLY`:l=n.apply(t,c);break;case`CONSTRUCT`:{let e=new n(...c);l=ar(e)}break;case`ENDPOINT`:{let{port1:t,port2:n}=new MessageChannel;Wn(e,n),l=ir(t,[t])}break;case`RELEASE`:l=void 0;break;default:return}}catch(e){l={value:e,[Rn]:0}}Promise.resolve(l).catch(e=>({value:e,[Rn]:0})).then(n=>{let[i,s]=or(n);t.postMessage(Object.assign(Object.assign({},i),{id:a}),s),o===`RELEASE`&&(t.removeEventListener(`message`,r),Kn(t),Ln in e&&typeof e[Ln]==`function`&&e[Ln]())}).catch(e=>{let[n,r]=or({value:TypeError(`Unserializable return value`),[Rn]:0});t.postMessage(Object.assign(Object.assign({},n),{id:a}),r)})}),t.start&&t.start()}function Gn(e){return e.constructor.name===`MessagePort`}function Kn(e){Gn(e)&&e.close()}function qn(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)}}),er(e,n,[],t)}function Jn(e){if(e)throw Error(`Proxy has been released and is not useable`)}function Yn(e){return cr(e,new Map,{type:`RELEASE`}).then(()=>{Kn(e)})}const Xn=new WeakMap,Zn=`FinalizationRegistry`in globalThis&&new FinalizationRegistry(e=>{let t=(Xn.get(e)||0)-1;Xn.set(e,t),t===0&&Yn(e)});function Qn(e,t){let n=(Xn.get(t)||0)+1;Xn.set(t,n),Zn&&Zn.register(e,t,e)}function $n(e){Zn&&Zn.unregister(e)}function er(e,t,n=[],r=function(){}){let i=!1,a=new Proxy(r,{get(r,o){if(Jn(i),o===In)return()=>{$n(a),Yn(e),t.clear(),i=!0};if(o===`then`){if(n.length===0)return{then:()=>a};let r=cr(e,t,{type:`GET`,path:n.map(e=>e.toString())}).then(sr);return r.then.bind(r)}return er(e,t,[...n,o])},set(r,a,o){Jn(i);let[s,c]=or(o);return cr(e,t,{type:`SET`,path:[...n,a].map(e=>e.toString()),value:s},c).then(sr)},apply(r,a,o){Jn(i);let s=n[n.length-1];if(s===Fn)return cr(e,t,{type:`ENDPOINT`}).then(sr);if(s===`bind`)return er(e,t,n.slice(0,-1));let[c,l]=nr(o);return cr(e,t,{type:`APPLY`,path:n.map(e=>e.toString()),argumentList:c},l).then(sr)},construct(r,a){Jn(i);let[o,s]=nr(a);return cr(e,t,{type:`CONSTRUCT`,path:n.map(e=>e.toString()),argumentList:o},s).then(sr)}});return Qn(a,e),a}function tr(e){return Array.prototype.concat.apply([],e)}function nr(e){let t=e.map(or);return[t.map(e=>e[0]),tr(t.map(e=>e[1]))]}const rr=new WeakMap;function ir(e,t){return rr.set(e,t),e}function ar(e){return Object.assign(e,{[Pn]:!0})}function or(e){for(let[t,n]of Hn)if(n.canHandle(e)){let[r,i]=n.serialize(e);return[{type:`HANDLER`,name:t,value:r},i]}return[{type:`RAW`,value:e},rr.get(e)||[]]}function sr(e){switch(e.type){case`HANDLER`:return Hn.get(e.name).deserialize(e.value);case`RAW`:return e.value}}function cr(e,t,n,r){return new Promise(i=>{let a=lr();t.set(a,i),e.start&&e.start(),e.postMessage(Object.assign({id:a},n),r)})}function lr(){return[,,,,].fill(0).map(()=>Math.floor(Math.random()*(2**53-1)).toString(16)).join(`-`)}let ur;async function dr(e,t){ur||=qn(new Worker(new URL(``+new URL(`diff.worker-9IK9E-UB.js`,import.meta.url).href,``+import.meta.url),{type:`module`}));let n=await ur.calculateDiff(e,t);return n}var fr=h({__name:`DiffEditor`,props:{from:{},to:{},oneColumn:{type:Boolean},diff:{type:Boolean}},setup(e){let t=e,{from:n,to:r}=te(t),i=V(`fromEl`),a=V(`toEl`),o,s;C(()=>{o=kn(i,n,{mode:`javascript`,readOnly:!0,lineNumbers:!0}),s=kn(a,r,{mode:`javascript`,readOnly:!0,lineNumbers:!0}),jn(o,s),ae(()=>{o.setOption(`lineWrapping`,Nn.value.codeviewerLineWrap),s.setOption(`lineWrapping`,Nn.value.codeviewerLineWrap)}),ae(async()=>{o.getWrapperElement().style.display=t.oneColumn?`none`:``,t.oneColumn||(await y(),o.refresh(),An(s,o))}),ae(async()=>{let e=n.value,i=r.value,a=t.diff;o.setOption(`mode`,Mn(e)),s.setOption(`mode`,Mn(i)),await y(),o.startOperation(),s.startOperation(),o.getAllMarks().forEach(e=>e.clear()),s.getAllMarks().forEach(e=>e.clear());for(let e=0;e<o.lineCount()+2;e++)o.removeLineClass(e,`background`,`diff-removed`);for(let e=0;e<s.lineCount()+2;e++)s.removeLineClass(e,`background`,`diff-added`);if(a&&n.value){let t=await dr(e,i),n=new Set,r=new Set,a=0,c=0;t.forEach(([e,t])=>{if(e===1){let e=s.posFromIndex(c);c+=t.length;let r=s.posFromIndex(c);s.markText(e,r,{className:`diff-added-inline`});for(let t=e.line;t<=r.line;t++)n.add(t)}else if(e===-1){let e=o.posFromIndex(a);a+=t.length;let n=o.posFromIndex(a);o.markText(e,n,{className:`diff-removed-inline`});for(let t=e.line;t<=n.line;t++)r.add(t)}else a+=t.length,c+=t.length}),Array.from(r).forEach(e=>o.addLineClass(e,`background`,`diff-removed`)),Array.from(n).forEach(e=>s.addLineClass(e,`background`,`diff-added`))}o.endOperation(),s.endOperation()})});function l(e){o?.refresh(),s?.refresh(),!t.oneColumn&&(Nn.value.codeviewerDiffPanelSize=e)}return(e,t)=>(w(),d(`div`,{"h-full":``,"w-full":``,"max-h-100vh":``,class:x(e.oneColumn?`flex`:`grid grid-cols-2`)},[se(c(`div`,{ref_key:`fromEl`,ref:i,class:`h-full max-h-100vh`},null,512),[[H,!e.oneColumn]]),c(`div`,{ref_key:`toEl`,ref:a,class:`h-full max-h-100vh`},null,512)],2))}}),pr=fr;const mr={pt4:``,"w-full":``,"min-w-full":``},hr={key:0,"text-sm":``},gr={flex:``},_r={flex:`~ items-center gap-1`,"text-sm":``,"text-blue":``,px3:``,py1:``},vr={p2:``,flex:`~ col gap-1`},yr={flex:`~`},br={p2:``},xr={flex:`~ items-center gap-1`,"text-sm":``,"text-orange":``,px3:``,py1:``},Sr={p2:``,flex:`~ col gap-1`},Cr={"w-full":``,flex:`~`},wr={"select-none":``,"flex-1":``},Tr={op50:``,"text-xs":``},Er={op50:``,"text-xs":``},Dr={key:0,"i-ph-spinner":``,"animate-spin":``},Or={key:1,op50:``,"text-xs":``},kr={key:0,border:`~ base rounded-lg`,"bg-glass":``,"of-hidden":``,"max-h-120vh":``,"flex-1":``,m4:``},Ar={pl4:``,p2:``,"font-mono":``,border:`b base`,flex:`~ items-center gap-2`,"h-max-100vh":``},jr={op50:``,"text-xs":``};var Mr=h({__name:`ModuleFlow`,props:{info:{},session:{},transformsLoading:{type:Boolean}},emits:[`select`],setup(t,{emit:r}){let i=t,o=r,{info:s}=te(i),f=E(!1),h=E(!1),g=A(null),_=a(()=>s?.value?.resolve_ids??[]),v=a(()=>{if(f.value)return s?.value?.transforms??[];let e=s?.value?.transforms?.filter(e=>e.source_from===e.source_to),t=s?.value?.transforms?.filter(e=>e.source_from!==e.source_to);return e?.length?[{type:`transform_no_changes`,id:`transform_no_changes`,count:e?.length??0,duration:e?.reduce((e,t)=>e+t.duration,0)??0},...t??[]]:t??[]}),y=a(()=>{if(h.value)return s?.value?.loads??[];let e=s?.value?.loads?.filter(e=>!e.source),t=s?.value?.loads?.filter(e=>e.source);return e?.length?[{type:`load_no_changes`,id:`load_no_changes`,count:e?.length??0,duration:e?.reduce((e,t)=>e+t.duration,0)??0},...t??[]]:t??[]}),b=a(()=>[..._.value,...y.value,...v.value]);function S(e){if(!g.value||!e)return!1;let t=b.value.indexOf(g.value),n=b.value.indexOf(e);return t>=n}function C(e){g.value=e}re(g,e=>{o(`select`,!!e)});function T(e){e.type===`transform_no_changes`?f.value=!f.value:e.type===`load_no_changes`&&(h.value=!h.value)}let O=a(()=>g.value?g.value.type===`transform`?{type:`transform`,plugin_name:g.value.plugin_name,from:g.value.source_from,to:g.value.source_to}:g.value.type===`load`?{type:`load`,from:``,plugin_name:g.value.plugin_name,to:g.value.source}:null:null);return(t,r)=>{let i=St,a=ue,o=zt,f=Ht,h=Kt,b=pr;return w(),d(`div`,mr,[F(s).importers?.length?(w(),d(`div`,hr,[c(`div`,gr,[m(F(n),null,{popper:U(({hide:n})=>[c(`div`,vr,[(w(!0),d(e,null,D(F(s).importers,e=>(w(),l(a,{id:e,key:e,session:t.session,link:!0,class:`hover:bg-active`,px2:``,py1:``,rounded:``,onClick:n},null,8,[`id`,`session`,`onClick`]))),128))])]),default:U(()=>[m(i,{"class-node-outer":`border-dashed`},{inner:U(()=>[c(`div`,_r,[r[1]||=c(`div`,{"i-ph-arrows-merge-duotone":``,"rotate-270":``},null,-1),p(` `+M(F(s).importers?.length)+` importers `,1)])]),_:1})]),_:1})]),r[2]||=c(`div`,{"pl-10":``,border:`r`,"h-4":``,"w-1px":``,"z-flowmap-line":``,class:`border-flow-line border-dashed`},null,-1)])):u(``,!0),c(`div`,yr,[m(i,{lines:{bottom:!0},active:g.value!=null},{content:U(()=>[c(`div`,br,[m(a,{id:F(s).id,session:t.session},null,8,[`id`,`session`])])]),_:1},8,[`active`]),F(s).imports?.length?(w(),d(e,{key:0},[r[4]||=c(`div`,{"w-10":``,border:`t base dashed`,mya:``},null,-1),m(F(n),{mya:``},{popper:U(({hide:n})=>[c(`div`,Sr,[(w(!0),d(e,null,D(F(s).imports,e=>(w(),l(a,{id:e.id,key:e.id,kind:e.kind,session:t.session,link:!0,class:`hover:bg-active`,px2:``,py1:``,rounded:``,onClick:n},null,8,[`id`,`kind`,`session`,`onClick`]))),128))])]),default:U(()=>[m(i,{"class-node-outer":`border-dashed`},{inner:U(()=>[c(`div`,xr,[r[3]||=c(`div`,{"i-ph-arrows-split-duotone":``,"rotate-270":``},null,-1),p(` `+M(F(s).imports?.length)+` imports `,1)])]),_:1})]),_:1})],64)):u(``,!0)]),c(`div`,Cr,[c(`div`,wr,[m(f,{items:_.value,expandable:_.value.length>0,"class-root-node":_.value.length===0?`border-dashed`:``,"active-start":S(_.value[0]||y.value[0]),"active-end":S(y.value[0])},{node:U(()=>[r[5]||=c(`div`,{"i-ph-magnifying-glass-duotone":``},null,-1),r[6]||=p(` Resolve Id `),c(`span`,Tr,`(`+M(F(s).resolve_ids.length)+`)`,1)]),container:U(()=>[c(`div`,null,[(w(!0),d(e,null,D(_.value,(e,n)=>(w(),l(o,{key:e.id,item:e,session:t.session,active:S(e),class:x(n>0?`pt-2`:``),onSelect:C,onActivate:T},null,8,[`item`,`session`,`active`,`class`]))),128))])]),_:1},8,[`items`,`expandable`,`class-root-node`,`active-start`,`active-end`]),m(f,{items:y.value,expandable:y.value.length>0,"class-root-node":y.value.length===0?`border-dashed`:``,"active-start":S(y.value[0]),"active-end":S(v.value[0])},{node:U(()=>[r[7]||=c(`div`,{"i-ph-upload-simple-duotone":``},null,-1),r[8]||=p(` Load `),c(`span`,Er,`(`+M(F(s).loads.length)+`)`,1)]),container:U(()=>[c(`div`,null,[(w(!0),d(e,null,D(y.value,(e,n)=>(w(),l(o,{key:e.id,item:e,session:t.session,active:S(e),class:x(n>0?`pt-2`:``),onSelect:C,onActivate:T},null,8,[`item`,`session`,`active`,`class`]))),128))])]),_:1},8,[`items`,`expandable`,`class-root-node`,`active-start`,`active-end`]),m(f,{expandable:v.value.length>0,"class-root-node":v.value.length===0?`border-dashed`:``,"active-start":S(v.value[0]),"active-end":S(v.value.at(-1))},{node:U(()=>[r[9]||=c(`div`,{"i-ph-magic-wand-duotone":``},null,-1),r[10]||=p(` Transform `),t.transformsLoading?(w(),d(`span`,Dr)):(w(),d(`span`,Or,`(`+M(F(s).transforms.length)+`)`,1))]),container:U(()=>[c(`div`,null,[(w(!0),d(e,null,D(v.value,(e,n)=>(w(),l(o,{key:e.id,item:e,session:t.session,active:S(e),class:x(n>0?`pt-2`:``),onSelect:C,onActivate:T},null,8,[`item`,`session`,`active`,`class`]))),128))])]),_:1},8,[`expandable`,`class-root-node`,`active-start`,`active-end`]),m(i,{lines:{top:!0,bottom:!0},pl6:``,pt4:``},{content:U(()=>r[11]||=[c(`div`,{"i-ph-shapes-duotone":``},null,-1),p(` Chunk `)]),_:1}),m(i,{lines:{top:!0,bottom:!0},pl6:``,pt4:``},{content:U(()=>r[12]||=[c(`div`,{"i-ph-tree-duotone":``},null,-1),p(` Tree shake `)]),_:1}),m(i,{lines:{top:!0},pl6:``,pt4:``},{content:U(()=>r[13]||=[c(`div`,{"i-ph-package-duotone":``},null,-1),p(` Generate `)]),_:1})]),O.value?(w(),d(`div`,kr,[c(`div`,Ar,[m(fe,{name:O.value.plugin_name},null,8,[`name`]),c(`span`,jr,M(O.value.type===`load`?`Load`:`Transform`),1),r[14]||=c(`div`,{"flex-auto":``},null,-1),m(h,{onClick:r[0]||=e=>g.value=null})]),m(b,{from:O.value.from??``,to:O.value.to??``,diff:!0,"one-column":!1},null,8,[`from`,`to`])])):u(``,!0)])])}}}),Nr=Mr;function Pr(e,t=1,n=1){let r=(.6+.4*Math.max(0,Math.cos(e)))*t,i=(.5+.2*Math.max(0,Math.cos(e+Math.PI*2/3)))*n;return`hsl(${e*180/Math.PI}deg, ${Math.round(100*r)}%, ${Math.round(100*i)}%)`}let Fr,Ir,Lr,Rr,zr,Br=1,Vr;function Hr(e,t,n,r,i){if(!Array.isArray(e))return e;let a=window.devicePixelRatio||1;if(Fr!==t||Ir!==a||Lr!==i){let n=Math.round(64*a)/64;Br=i,Br=Math.log2(Br),Br-=Math.floor(Br);let r=Br,o=Math.min(1,8*r);Br=2**Br;let s=8*Math.SQRT2/Br;Fr=t,Ir=a,Lr=i,Rr||=document.createElement(`canvas`),zr||=Rr.getContext(`2d`),Rr.width=Rr.height=Math.round(64*n),zr.scale(n,n),zr.fillStyle=e[0],zr.fillRect(0,0,64,64),zr.globalAlpha=.25,zr.fillStyle=e[1],zr.fillRect(0,0,64,64),zr.globalAlpha=.67,zr.strokeStyle=e[1],zr.beginPath();for(let e=0;e<=64;e+=16)zr.moveTo(e-32,e+32),zr.lineTo(e+32,e-32);if(zr.lineWidth=s*(1-(o-r)/2),zr.stroke(),o+r>0){zr.beginPath();for(let e=8;e<64;e+=16)zr.moveTo(e-32,e+32),zr.lineTo(e+32,e-32);zr.lineWidth=s*(o+r)/2,zr.stroke()}Vr=t.createPattern(Rr,`repeat`),Br/=n}return n/=64*Br*a,n-=Math.floor(n),n*=64*Br*a,Vr.setTransform(new DOMMatrix([Br,0,0,Br,n,r])),Vr}function Ur(e){return t=>t.id&&e[t.id]||t.color}function Wr(e,t=1,n=1){let r={};return Gr(r,e,0,Math.PI*2,t,n),Ur(r)}function Gr(e,t,n,r,i=1,a=1){let o=t.size;e[t.id]=Pr(n+r/2,i,a);for(let s of t.children){let t=s.size/o*r;Gr(e,s,n,t,i,a),n+=t}}const Kr=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function qr(e=16,t=Kr){let n=``,r=e,i=t.length;for(;r--;)n+=t[Math.random()*i|0];return n}function Jr(e,t,n=(e,t)=>t.size-e.size){if(e.__nanovis)return e;let r={...e};return r.id||=qr(),r.parent||=t,r.children||=[],r.sizeSelf==null&&r.size!=null&&r.children.length===0?r.sizeSelf=r.size:r.sizeSelf||=0,r.children=(r.children||[]).map(e=>Jr(e,r,n)),r.size||=r.children.reduce((e,t)=>e+t.size,0)+r.sizeSelf,n&&r.children.sort(n),Object.defineProperty(r,`__nanovis`,{enumerable:!1,value:!0}),r}function Yr(e){return e.children.length===0?1:Math.max(...e.children.map(e=>Yr(e)))+1}const Xr=/\bFirefox\//.test(navigator.userAgent);let Zr;function Qr(){return(window.performance||Date).now()}function $r(e,t,n,r,i,a){if(Xr){let o=e.lineWidth,s=o/2;e.fillStyle=t,e.fillRect(n-s,r-s,i+o,o),e.fillRect(n-s,r+s,o,a-o),e.fillRect(n-s,r+a-s,i+o,o),e.fillRect(n+i-s,r+s,o,a-o);return}e.strokeStyle=t,e.strokeRect(n,r,i,a)}function ei(e){return window.addEventListener(`wheel`,e,{passive:!1}),()=>window.removeEventListener(`wheel`,e)}function ti(e){return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)}try{Zr=new Intl.NumberFormat}catch{}let ni=()=>({emit(e,...t){for(let n=this.events[e]||[],r=0,i=n.length;r<i;r++)n[r](...t)},events:{},on(e,t){return(this.events[e]||=[]).push(t),()=>{this.events[e]=this.events[e]?.filter(e=>t!==e)}}});const ri={getText:e=>e.text,getSubtext:e=>e.subtext,animate:!0,animateDuration:350},ii={fallback:`#CCC`,stroke:`#0008`,text:`#222`,hover:`#fff5`,shadow:`#0008`,fg:`#fff`,bg:`#222`},ai=46,oi=`14px sans-serif`,si=`bold ${oi}`;var ci=class{el;canvas;c;width=0;height=0;ratio=1;root;maxDepth;events;options;palette;disposables;getColor;getText;getSubtext;_animationFrame=null;constructor(e,t){this.options={...ri,...t};let{getColor:n=Wr(e),getText:r=()=>void 0,getSubtext:i=()=>void 0}=this.options;this.palette={...ii,...t.palette},this.el=document.createElement(`div`),this.canvas=document.createElement(`canvas`),this.c=this.canvas.getContext(`2d`),this.root=e,this.maxDepth=Yr(e),this.disposables=[],this.events=ni(),this.getColor=n,this.getText=r,this.getSubtext=i,this.setFont(oi),t.onClick&&this.events.on(`click`,t.onClick),t.onHover&&this.events.on(`hover`,t.onHover),t.onLeave&&this.events.on(`leave`,t.onLeave),t.onSelect&&this.events.on(`select`,t.onSelect),this.el.addEventListener(`mouseleave`,()=>{this.events.emit(`leave`)})}invalidate(){this._animationFrame===null&&(this._animationFrame=requestAnimationFrame(()=>{this._animationFrame=null,this.tick()}))}tick(){this.draw()}draw(){}resize(){this.ratio=window.devicePixelRatio||1,this.canvas.style.width=`${this.width}px`,this.canvas.style.height=`${this.height}px`,this.canvas.width=Math.round(this.width*this.ratio),this.canvas.height=Math.round(this.height*this.ratio),this.c.scale(this.ratio,this.ratio),this.draw()}select(e,t){this.events.emit(`select`,e)}dispose(){this.disposables.forEach(e=>e()),this.disposables.length=0,this.el.remove()}[Symbol.dispose](){this.dispose()}_font=`14px sans-serif`;_fontWidthCache=new Map;ellipsisWidth=0;getFontCache(){return this._fontWidthCache.has(this._font)||this._fontWidthCache.set(this._font,{}),this._fontWidthCache.get(this._font)}setFont(e){this._font=e,this.c.font=e,this.c.textBaseline=`middle`,this.ellipsisWidth=3*this.charCodeWidth(ai)}charCodeWidth(e){let t=this.getFontCache(),n=t[e];return n===void 0&&(n=this.c.measureText(String.fromCharCode(e)).width,t[e]=n),n}textOverflowEllipsis(e,t){if(t<this.ellipsisWidth)return[``,0];let n=0,r=e.length,i=0;for(;i<r;){let r=this.charCodeWidth(e.charCodeAt(i));if(t<n+this.ellipsisWidth+r)return[`${e.slice(0,i)}...`,n+this.ellipsisWidth];n+=r,i++}return[e,n]}};const li=24,ui=5,di=.01,fi=1e3;var pi=class extends ci{mainEl=document.createElement(`div`);totalBytes;viewportMin;viewportMax;zoomedOutMin=0;zoomedOutWidth=0;prevWheelTime=0;prevWheelWasZoom=!1;stripeScaleAdjust=1;hoveredNode=null;selectedNode=null;nodeStartBytes=new Map;animationFromMin=0;animationFromMax=0;animationToMin=0;animationToMax=0;animationStart=0;constructor(e,t={}){super(e,t),this.totalBytes=e.size,this.viewportMin=this.animationFromMin=this.animationToMin=0,this.viewportMax=this.animationFromMax=this.animationToMax=this.totalBytes,Object.assign(this.mainEl.style,{position:`relative`}),Object.assign(this.canvas.style,{position:`absolute`,left:`0`,top:`0`});let n=!1;this.canvas.onmousedown=e=>{if(n=!1,e.button!==2){let t=e.pageX,r=e=>{let r=e.pageX-t;!n&&Math.abs(r)<3||(n=!0,this.modifyViewport(-r,0,null),t=e.pageX)},i=()=>{document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i)};e.preventDefault(),document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i)}},this.canvas.onmousemove=e=>{this.updateHover(e)},this.canvas.onmouseout=()=>{this.changeHoveredNode(null)},this.canvas.onclick=e=>{if(n)return;let t=this.hitTestNode(e);this.changeHoveredNode(t),this.changeSelectedNode(t),t&&this.events.emit(`click`,t,e)},this.disposables.push(ei(e=>{let t=e.deltaX,n=e.deltaY,r=Qr(),i=r-this.prevWheelTime<50?this.prevWheelWasZoom:e.ctrlKey||e.metaKey;this.prevWheelTime=r,this.prevWheelWasZoom=i,(i||Math.abs(t)>=Math.abs(n))&&e.preventDefault(),this.modifyViewport(t,n,i?e.pageX:null),this.updateHover(e)})),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(ti(()=>this.resize())),this.mainEl.append(this.canvas),this.el.append(this.mainEl)}tick(){let e=(Qr()-this.animationStart)/(this.options.animateDuration??ri.animateDuration);e<0||e>1?(e=1,this.viewportMin=this.animationToMin,this.viewportMax=this.animationToMax):(e<.5?e*=4*e*e:(e=1-e,e*=4*e*e,e=1-e),this.viewportMin=this.animationFromMin+(this.animationToMin-this.animationFromMin)*e,this.viewportMax=this.animationFromMax+(this.animationToMax-this.animationFromMax)*e,this.invalidate()),this.draw()}draw(){this.c.clearRect(0,0,this.width,this.height),this.drawNode(this.root,0,0,-1/0,1)}changeSelectedNode(e,t=this.options.animate??ri.animate){if(this.selectedNode!==e&&(this.selectedNode=e,this.events.emit(`select`,e),e&&this.nodeStartBytes.has(e.id))){let n=this.nodeStartBytes.get(e.id),r=n+e.size;n=Math.max(0,n-e.size*di),r=Math.min(this.totalBytes,r+e.size*di),this.setViewport(n,r,t)}}select(e,t=this.options.animate??ri.animate){this.changeSelectedNode(e,t)}resize(){this.width=this.el.clientWidth,this.height=this.maxDepth*li+1,this.zoomedOutMin=this.width-fi>>1,this.zoomedOutWidth=this.zoomedOutMin+fi,this.zoomedOutMin<0&&(this.zoomedOutMin=0),this.zoomedOutWidth>this.width&&(this.zoomedOutWidth=this.width),this.zoomedOutWidth-=this.zoomedOutMin,this.stripeScaleAdjust=this.totalBytes/this.zoomedOutWidth,this.mainEl.style.height=`${this.height}px`,super.resize()}drawNode(e,t,n,r,i){this.nodeStartBytes.set(e.id,n);let a=this.zoomedOutWidth/(this.viewportMax-this.viewportMin),o=this.zoomedOutMin+(n-this.viewportMin)*a,s=e.size*a,c=o+s;if(c<r+1.5)return r;if(o+s<0||o>this.width)return c;let l=s<2?2:s,u=(o>0?o:0)+ui,d=t+li/2,f=this.getText(e)||``,p=this.getSubtext(e)||``,m,h=0,g=s+o-u,_=Hr(this.getColor(e)||this.palette.fallback,this.c,this.zoomedOutMin-this.viewportMin*a,li,a*this.stripeScaleAdjust),v=this.palette.text,y=-1/0;i&1?(v=this.palette.fg,this.setFont(si)):(this.c.fillStyle=_,this.c.fillRect(o,t,l,li),(i&2||this.hoveredNode&&e.id===this.hoveredNode.id)&&(this.c.fillStyle=this.palette.hover,this.c.fillRect(o,t,l,li),i|=2)),this.ellipsisWidth<g&&(m=this.c.measureText(f).width,m<=g?h+=m:(f=this.textOverflowEllipsis(f,g)[0],h=g),this.c.fillStyle=v,this.c.fillText(f,u,d)),i&1&&this.setFont(oi),h+this.ellipsisWidth<g&&(p&&f&&(p=` - ${p}`),m=this.c.measureText(p).width,h+m>g&&(p=this.textOverflowEllipsis(p,g-h)[0]),this.c.globalAlpha=.5,this.c.fillText(p,u+h,d),this.c.globalAlpha=1);for(let r of e.children)y=this.drawNode(r,t+li,n,y,i&-2),n+=r.size;return i&1||$r(this.c,this.palette.stroke,o+.5,t+.5,l,li),c}changeHoveredNode(e){this.hoveredNode!==e&&(this.hoveredNode=e,this.canvas.style.cursor=e&&!e.children.length?`pointer`:`auto`,this.invalidate())}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=this.viewportMin+(this.viewportMax-this.viewportMin)/this.zoomedOutWidth*(n-this.zoomedOutMin),a=(e,t,n)=>{if(i>=n&&i<n+e.size){if(r>=t&&r<t+li&&e.id)return e;if(r>=t+li)for(let r of e.children){let e=a(r,t+li,n);if(e)return e;n+=r.size}}return null};return a(this.root,0,0)}modifyViewport(e,t,n){let r=this.viewportMin,i=this.viewportMax,a=0;if(n!==null){let e=r+(i-r)/this.zoomedOutWidth*(n-this.zoomedOutMin),a=1.01**t;r=e+(r-e)*a,i=e+(i-e)*a}else a=e*(i-r)/this.zoomedOutWidth;r+a<0?a=-r:i+a>this.totalBytes&&(a=this.totalBytes-i),r+=a,i+=a,r<0&&(r=0),i>this.totalBytes&&(i=this.totalBytes),this.setViewport(r,i,!1)}setViewport(e,t,n){this.animationFromMin=this.viewportMin,this.animationFromMax=this.viewportMax,this.animationToMin=e,this.animationToMax=t,n?this.animationStart=Qr():this.animationStart=0,this.invalidate()}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),this.events.emit(`hover`,t,e)}};const mi=-Math.PI/2,hi=4,gi=20,_i=2*hi,vi=gi+hi,yi={relative:``,border:`t base`,pb10:``,py1:``},bi={"font-bold":``,"font-mono":``};var xi=h({__name:`ModuleFlamegraph`,props:{info:{},session:{},flowNodeSelected:{type:Boolean}},setup(e){let t=e,n=e=>Jr(e,void 0,!1),i=a(()=>{let e=t.info.resolve_ids.map((e,t)=>n({id:`resolveId-${t}`,text:e.plugin_name,size:e.duration})),r=t.info.loads.map((e,t)=>n({id:`load-${t}`,text:e.plugin_name,size:e.duration})),i=t.info.transforms.map((e,t)=>n({id:`transform-${t}`,text:e.plugin_name,size:e.duration})),a=[n({id:`~resolves`,text:`resolve`,children:e}),n({id:`~loads`,text:`load`,children:r}),n({id:`~transforms`,text:`transform`,children:i})];return n({id:`~root`,text:`Module Flamegraph`,children:a})}),o=E(null),s=E(0),f=E(0),p=V(`el`),h=A(null);function g(){h.value=new pi(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){o.value=null;return}t&&(s.value=t.clientX,f.value=t.clientY),o.value={plugin_name:e.text,duration:e.size}}}),p.value.appendChild(h.value.el)}function _(){h.value?.dispose()}return C(()=>(g(),()=>{_()})),re(i,async()=>{_(),g()},{deep:!0}),re(()=>t.flowNodeSelected,async()=>{await y(),h.value?.resize()}),(e,t)=>{let n=Ot;return w(),d(`div`,yi,[(w(),l(r,{to:`body`},[o.value?(w(),d(`div`,{key:0,border:`~ base`,rounded:``,shadow:``,px2:``,py1:``,fixed:``,"z-panel-content":``,"bg-glass":``,"pointer-events-none":``,"text-sm":``,style:S({left:`${s.value}px`,top:`${f.value}px`})},[c(`div`,bi,M(o.value.plugin_name),1),m(n,{duration:o.value.duration},null,8,[`duration`])],4)):u(``,!0)])),c(`div`,{ref_key:`el`,ref:p,"min-h-30":``},null,512)])}}}),Si=xi;const Ci={"of-auto":``,"w-full":``,"h-full":``,relative:``},wi={key:0,flex:`~ col`,"w-full":``,"min-w-full":``};var Ti=h({__name:`ModuleFlowLoader`,props:{session:{},module:{}},setup(e){let n=e,r=B(),i=E([]),a=E(!1),s=E(!1);ae(async()=>{let e={session:n.session.id,module:n.module};y(async()=>{a.value=!0,i.value=await r.value[`vite:rolldown:get-module-transforms`]?.(e),a.value=!1})});let c=o(async()=>{let e={session:n.session.id,module:n.module};return{transforms:i.value,...await r.value[`vite:rolldown:get-module-info`]?.(e)}});function u(e){s.value=e}return(e,n)=>{let r=Nr,i=Si,o=t;return w(),d(`div`,Ci,[F(c)?(w(),d(`div`,wi,[m(r,{p4:``,info:F(c),session:e.session,"transforms-loading":a.value,onSelect:u},null,8,[`info`,`session`,`transforms-loading`]),m(i,{info:F(c),session:e.session,"flow-node-selected":s.value},null,8,[`info`,`session`,`flow-node-selected`])])):(w(),l(o,{key:1}))])}}}),Ei=Ti;function Di(e){return Object.keys(e).forEach(t=>e[t]===void 0?delete e[t]:{}),e}const Oi=Symbol(`p-void`),ki=g?window:void 0;function Ai(e){var t;let n=N(e);return(t=n?.$el)??n}function ji(...e){let t=[],n=()=>{t.forEach(e=>e()),t.length=0},r=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),i=a(()=>{let t=j(N(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0}),o=oe(()=>{var t,n;return[(n=(t=i.value)?.map(e=>Ai(e)))??[ki].filter(e=>e!=null),j(N(i.value?e[1]:e[0])),j(F(i.value?e[2]:e[1])),N(i.value?e[3]:e[2])]},([e,i,a,o])=>{if(n(),!e?.length||!i?.length||!a?.length)return;let s=v(o)?{...o}:o;t.push(...e.flatMap(e=>i.flatMap(t=>a.map(n=>r(e,t,n,s)))))},{flush:`post`}),s=()=>{o(),n()};return P(n),s}let Mi=!1;function Ni(e,t,n={}){let{window:r=ki,ignore:i=[],capture:a=!0,detectIframe:o=!1,controls:s=!1}=n;if(!r)return s?{stop:b,cancel:b,trigger:b}:b;if(_&&!Mi){Mi=!0;let e={passive:!0};Array.from(r.document.body.children).forEach(t=>t.addEventListener(`click`,b,e)),r.document.documentElement.addEventListener(`click`,b,e)}let c=!0,l=e=>N(i).some(t=>{if(typeof t==`string`)return Array.from(r.document.querySelectorAll(t)).some(t=>t===e.target||e.composedPath().includes(t));{let n=Ai(t);return n&&(e.target===n||e.composedPath().includes(n))}});function u(e){let t=N(e);return t&&t.$.subTree.shapeFlag===16}function d(e,t){let n=N(e),r=n.$.subTree&&n.$.subTree.children;return r==null||!Array.isArray(r)?!1:r.some(e=>e.el===t.target||t.composedPath().includes(e.el))}let f=n=>{let r=Ai(e);if(n.target!=null&&!(!(r instanceof Element)&&u(e)&&d(e,n))&&!(!r||r===n.target||n.composedPath().includes(r))){if(`detail`in n&&n.detail===0&&(c=!l(n)),!c){c=!0;return}t(n)}},p=!1,m=[ji(r,`click`,e=>{p||(p=!0,setTimeout(()=>{p=!1},0),f(e))},{passive:!0,capture:a}),ji(r,`pointerdown`,t=>{let n=Ai(e);c=!l(t)&&!!(n&&!t.composedPath().includes(n))},{passive:!0}),o&&ji(r,`blur`,n=>{setTimeout(()=>{var i;let a=Ai(e);(i=r.document.activeElement)?.tagName===`IFRAME`&&!a?.contains(r.document.activeElement)&&t(n)},0)},{passive:!0})].filter(Boolean),h=()=>m.forEach(e=>e());return s?{stop:h,cancel:()=>{c=!1},trigger:e=>{c=!0,f(e),c=!1}}:h}const Pi=new WeakMap,Fi={mounted(e,t){let n=!t.modifiers.bubble,r;if(typeof t.value==`function`)r=Ni(e,t.value,{capture:n});else{let[i,a]=t.value;r=Ni(e,i,Object.assign({capture:n},a))}Pi.set(e,r)},unmounted(e){let t=Pi.get(e);t&&typeof t==`function`?t():t?.stop(),Pi.delete(e)}},Ii=Symbol(`vueuse-ssr-width`);function Li(e){return typeof Window<`u`&&e instanceof Window?e.document.documentElement:typeof Document<`u`&&e instanceof Document?e.documentElement:e}function Ri(e){let t=window.getComputedStyle(e);if(t.overflowX===`scroll`||t.overflowY===`scroll`||t.overflowX===`auto`&&e.clientWidth<e.scrollWidth||t.overflowY===`auto`&&e.clientHeight<e.scrollHeight)return!0;{let t=e.parentNode;return!t||t.tagName===`BODY`?!1:Ri(t)}}function zi(e){let t=e||window.event,n=t.target;return Ri(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const Bi=new WeakMap;function Vi(e,t=!1){let n=A(t),r=null,i=``;re(ee(e),e=>{let t=Li(N(e));if(t){let e=t;if(Bi.get(e)||Bi.set(e,e.style.overflow),e.style.overflow!==`hidden`&&(i=e.style.overflow),e.style.overflow===`hidden`)return n.value=!0;if(n.value)return e.style.overflow=`hidden`}},{immediate:!0});let o=()=>{let t=Li(N(e));!t||n.value||(_&&(r=ji(t,`touchmove`,e=>{zi(e)},{passive:!1})),t.style.overflow=`hidden`,n.value=!0)},s=()=>{let t=Li(N(e));!t||!n.value||(_&&r?.(),t.style.overflow=i,Bi.delete(t),n.value=!1)};return P(s),a({get(){return n.value},set(e){e?o():s()}})}function Hi(){let e=!1,t=A(!1);return(n,r)=>{if(t.value=r.value,e)return;e=!0;let i=Vi(n,r.value);re(t,e=>i.value=e)}}const Ui=Hi();function Wi(e){return Array.isArray?Array.isArray(e):ta(e)===`[object Array]`}const Gi=1/0;function Ki(e){if(typeof e==`string`)return e;let t=e+``;return t==`0`&&1/e==-Gi?`-0`:t}function qi(e){return e==null?``:Ki(e)}function Ji(e){return typeof e==`string`}function Yi(e){return typeof e==`number`}function Xi(e){return e===!0||e===!1||Qi(e)&&ta(e)==`[object Boolean]`}function Zi(e){return typeof e==`object`}function Qi(e){return Zi(e)&&e!==null}function $i(e){return e!=null}function ea(e){return!e.trim().length}function ta(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}const na=`Incorrect 'index' type`,ra=e=>`Invalid value for key ${e}`,ia=e=>`Pattern length exceeds max of ${e}.`,aa=e=>`Missing ${e} property in key`,oa=e=>`Property 'weight' in key '${e}' must be a positive integer`,sa=Object.prototype.hasOwnProperty;var ca=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=la(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function la(e){let t=null,n=null,r=null,i=1,a=null;if(Ji(e)||Wi(e))r=e,t=ua(e),n=Q(e);else{if(!sa.call(e,`name`))throw Error(aa(`name`));let o=e.name;if(r=o,sa.call(e,`weight`)&&(i=e.weight,i<=0))throw Error(oa(o));t=ua(o),n=Q(o),a=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:a}}function ua(e){return Wi(e)?e:e.split(`.`)}function Q(e){return Wi(e)?e.join(`.`):e}function da(e,t){let n=[],r=!1,i=(e,t,a)=>{if($i(e))if(!t[a])n.push(e);else{let o=t[a],s=e[o];if(!$i(s))return;if(a===t.length-1&&(Ji(s)||Yi(s)||Xi(s)))n.push(qi(s));else if(Wi(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,a+1)}else t.length&&i(s,t,a+1)}};return i(e,Ji(t)?t.split(`.`):t,0),r?n:n[0]}const fa={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},pa={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},ma={location:0,threshold:.6,distance:100},ha={useExtendedSearch:!1,getFn:da,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var $={...pa,...fa,...ma,...ha};const ga=/[^ ]+/g;function _a(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(ga).length;if(n.has(i))return n.get(i);let a=1/i**(.5*e),o=parseFloat(Math.round(a*r)/r);return n.set(i,o),o},clear(){n.clear()}}}var va=class{constructor({getFn:e=$.getFn,fieldNormWeight:t=$.fieldNormWeight}={}){this.norm=_a(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Ji(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();Ji(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)--this.records[t].i}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!$i(e)||ea(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach((t,r)=>{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if($i(i)){if(Wi(i)){let e=[],t=[{nestedArrIndex:-1,value:i}];for(;t.length;){let{nestedArrIndex:n,value:r}=t.pop();if($i(r))if(Ji(r)&&!ea(r)){let t={v:r,i:n,n:this.norm.get(r)};e.push(t)}else Wi(r)&&r.forEach((e,n)=>{t.push({nestedArrIndex:n,value:e})})}n.$[r]=e}else if(Ji(i)&&!ea(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}};function ya(e,t,{getFn:n=$.getFn,fieldNormWeight:r=$.fieldNormWeight}={}){let i=new va({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(la)),i.setSources(t),i.create(),i}function ba(e,{getFn:t=$.getFn,fieldNormWeight:n=$.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new va({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function xa(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:i=$.distance,ignoreLocation:a=$.ignoreLocation}={}){let o=t/e.length;if(a)return o;let s=Math.abs(r-n);return i?o+s/i:s?1:o}function Sa(e=[],t=$.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}const Ca=32;function wa(e,t,n,{location:r=$.location,distance:i=$.distance,threshold:a=$.threshold,findAllMatches:o=$.findAllMatches,minMatchCharLength:s=$.minMatchCharLength,includeMatches:c=$.includeMatches,ignoreLocation:l=$.ignoreLocation}={}){if(t.length>Ca)throw Error(ia(Ca));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=s>1||c,g=h?Array(d):[],_;for(;(_=e.indexOf(t,m))>-1;){let e=xa(t,{currentLocation:_,expectedLocation:f,distance:i,ignoreLocation:l});if(p=Math.min(e,p),m=_+u,h){let e=0;for(;e<u;)g[_+e]=1,e+=1}}m=-1;let v=[],y=1,b=u+d,x=1<<u-1;for(let r=0;r<u;r+=1){let a=0,s=b;for(;a<s;){let e=xa(t,{errors:r,currentLocation:f+s,expectedLocation:f,distance:i,ignoreLocation:l});e<=p?a=s:b=s,s=Math.floor((b-a)/2+a)}b=s;let c=Math.max(1,f-s+1),_=o?d:Math.min(f+s,d)+u,S=Array(_+2);S[_+1]=(1<<r)-1;for(let a=_;a>=c;--a){let o=a-1,s=n[e.charAt(o)];if(h&&(g[o]=+!!s),S[a]=(S[a+1]<<1|1)&s,r&&(S[a]|=(v[a+1]|v[a])<<1|1|v[a+1]),S[a]&x&&(y=xa(t,{errors:r,currentLocation:o,expectedLocation:f,distance:i,ignoreLocation:l}),y<=p)){if(p=y,m=o,m<=f)break;c=Math.max(1,2*f-m)}}let C=xa(t,{errors:r+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:l});if(C>p)break;v=S}let S={isMatch:m>=0,score:Math.max(.001,y)};if(h){let e=Sa(g,s);e.length?c&&(S.indices=e):S.isMatch=!1}return S}function Ta(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}const Ea=String.prototype.normalize?e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``):e=>e;var Da=class{constructor(e,{location:t=$.location,threshold:n=$.threshold,distance:r=$.distance,includeMatches:i=$.includeMatches,findAllMatches:a=$.findAllMatches,minMatchCharLength:o=$.minMatchCharLength,isCaseSensitive:s=$.isCaseSensitive,ignoreDiacritics:c=$.ignoreDiacritics,ignoreLocation:l=$.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?Ea(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:Ta(e),startIndex:t})},d=this.pattern.length;if(d>Ca){let e=0,t=d%Ca,n=d-t;for(;e<n;)u(this.pattern.substr(e,Ca),e),e+=Ca;if(t){let e=d-Ca;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?Ea(e):e,this.pattern===e){let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=wa(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&(u=[...u,...g])});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=u),p}},Oa=class{constructor(e){this.pattern=e}static isMultiMatch(e){return ka(e,this.multiRegex)}static isSingleMatch(e){return ka(e,this.singleRegex)}search(){}};function ka(e,t){let n=e.match(t);return n?n[1]:null}var Aa=class extends Oa{constructor(e){super(e)}static get type(){return`exact`}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},ja=class extends Oa{constructor(e){super(e)}static get type(){return`inverse-exact`}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern),n=t===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}},Ma=class extends Oa{constructor(e){super(e)}static get type(){return`prefix-exact`}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},Na=class extends Oa{constructor(e){super(e)}static get type(){return`inverse-prefix-exact`}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},Pa=class extends Oa{constructor(e){super(e)}static get type(){return`suffix-exact`}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},Fa=class extends Oa{constructor(e){super(e)}static get type(){return`inverse-suffix-exact`}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},Ia=class extends Oa{constructor(e,{location:t=$.location,threshold:n=$.threshold,distance:r=$.distance,includeMatches:i=$.includeMatches,findAllMatches:a=$.findAllMatches,minMatchCharLength:o=$.minMatchCharLength,isCaseSensitive:s=$.isCaseSensitive,ignoreDiacritics:c=$.ignoreDiacritics,ignoreLocation:l=$.ignoreLocation}={}){super(e),this._bitapSearch=new Da(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l})}static get type(){return`fuzzy`}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},La=class extends Oa{constructor(e){super(e)}static get type(){return`include`}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n,r=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,r.push([n,t-1]);let a=!!r.length;return{isMatch:a,score:a?0:1,indices:r}}};const Ra=[Aa,La,Ma,Na,Fa,Pa,ja,Ia],za=Ra.length,Ba=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Va=`|`;function Ha(e,t={}){return e.split(Va).map(e=>{let n=e.trim().split(Ba).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<za;){let e=Ra[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<za;){let e=Ra[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}const Ua=new Set([Ia.type,La.type]);var Wa=class{constructor(e,{isCaseSensitive:t=$.isCaseSensitive,ignoreDiacritics:n=$.ignoreDiacritics,includeMatches:r=$.includeMatches,minMatchCharLength:i=$.minMatchCharLength,ignoreLocation:a=$.ignoreLocation,findAllMatches:o=$.findAllMatches,location:s=$.location,threshold:c=$.threshold,distance:l=$.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?Ea(e):e,this.pattern=e,this.query=Ha(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?Ea(e):e;let a=0,o=[],s=0;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:c,indices:l,score:u}=r.search(e);if(c){if(a+=1,s+=u,n){let e=r.constructor.type;Ua.has(e)?o=[...o,...l]:o.push(l)}}else{s=0,a=0,o.length=0;break}}if(a){let e={isMatch:!0,score:s/a};return n&&(e.indices=o),e}}return{isMatch:!1,score:1}}};const Ga=[];function Ka(...e){Ga.push(...e)}function qa(e,t){for(let n=0,r=Ga.length;n<r;n+=1){let r=Ga[n];if(r.condition(e,t))return new r(e,t)}return new Da(e,t)}const Ja={AND:`$and`,OR:`$or`},Ya={PATH:`$path`,PATTERN:`$val`},Xa=e=>!!(e[Ja.AND]||e[Ja.OR]),Za=e=>!!e[Ya.PATH],Qa=e=>!Wi(e)&&Zi(e)&&!Xa(e),$a=e=>({[Ja.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function eo(e,t,{auto:n=!0}={}){let r=e=>{let i=Object.keys(e),a=Za(e);if(!a&&i.length>1&&!Xa(e))return r($a(e));if(Qa(e)){let r=a?e[Ya.PATH]:i[0],o=a?e[Ya.PATTERN]:e[r];if(!Ji(o))throw Error(ra(r));let s={keyId:Q(r),pattern:o};return n&&(s.searcher=qa(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];Wi(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return Xa(e)||(e=$a(e)),r(e)}function to(e,{ignoreFieldNorm:t=$.ignoreFieldNorm}){e.forEach(e=>{let n=1;e.matches.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),e.score=n})}function no(e,t){let n=e.matches;t.matches=[],$i(n)&&n.forEach(e=>{if(!$i(e.indices)||!e.indices.length)return;let{indices:n,value:r}=e,i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function ro(e,t){t.score=e.score}function io(e,t,{includeMatches:n=$.includeMatches,includeScore:r=$.includeScore}={}){let i=[];return n&&i.push(no),r&&i.push(ro),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var ao=class{constructor(e,t={},n){this.options={...$,...t},this.options.useExtendedSearch,this._keyStore=new ca(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof va))throw Error(na);this._myIndex=t||ya(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){$i(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){let t=[];for(let n=0,r=this._docs.length;n<r;n+=1){let i=this._docs[n];e(i,n)&&(this.removeAt(n),--n,--r,t.push(i))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){let{includeMatches:n,includeScore:r,shouldSort:i,sortFn:a,ignoreFieldNorm:o}=this.options,s=Ji(e)?Ji(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return to(s,{ignoreFieldNorm:o}),i&&s.sort(a),Yi(t)&&t>-1&&(s=s.slice(0,t)),io(s,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){let t=qa(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach(({v:e,i:n,n:i})=>{if(!$i(e))return;let{isMatch:a,score:o,indices:s}=t.searchIn(e);a&&r.push({item:e,idx:n,matches:[{score:o,value:e,norm:i,indices:s}]})}),r}_searchLogical(e){let t=eo(e,this.options),n=(e,t,r)=>{if(!e.children){let{keyId:n,searcher:i}=e,a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i});return a&&a.length?[{idx:r,item:t,matches:a}]:[]}let i=[];for(let a=0,o=e.children.length;a<o;a+=1){let o=e.children[a],s=n(o,t,r);if(s.length)i.push(...s);else if(e.operator===Ja.AND)return[]}return i},r=this._myIndex.records,i={},a=[];return r.forEach(({$:e,i:r})=>{if($i(e)){let o=n(t,e,r);o.length&&(i[r]||(i[r]={idx:r,item:e,matches:[]},a.push(i[r])),o.forEach(({matches:e})=>{i[r].matches.push(...e)}))}}),a}_searchObjectList(e){let t=qa(e,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach(({$:e,i:r})=>{if(!$i(e))return;let a=[];n.forEach((n,r)=>{a.push(...this._findMatches({key:n,value:e[r],searcher:t}))}),a.length&&i.push({idx:r,item:e,matches:a})}),i}_findMatches({key:e,value:t,searcher:n}){if(!$i(t))return[];let r=[];if(Wi(t))t.forEach(({v:t,i,n:a})=>{if(!$i(t))return;let{isMatch:o,score:s,indices:c}=n.searchIn(t);o&&r.push({score:s,key:e,value:t,idx:i,norm:a,indices:c})});else{let{v:i,n:a}=t,{isMatch:o,score:s,indices:c}=n.searchIn(i);o&&r.push({score:s,key:e,value:i,norm:a,indices:c})}return r}};ao.version=`7.1.0`,ao.createIndex=ya,ao.parseIndex=ba,ao.config=$,ao.parseQuery=eo,Ka(Wa);function oo(e){return e[0]===`#`||!!e.match(/^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/)}function so(e){if(oo(e))return e;let t=e.replace(/\\/g,`/`).match(/.*\/node_modules\/(.*)$/)?.[1];if(t)return t.startsWith(`@`)?t.split(`/`).slice(0,2).join(`/`):t.split(`/`)[0]}function co(e){let t=e.match(/.*\/node_modules\/(.*)$/)?.[1];if(t)return t}const lo=W((e,t)=>{if(e=e.replace(/%2F/g,`/`).replace(/\\/g,`/`),oo(e)||e.match(/^\w+:/))return{moduleName:e,path:e};let n=so(e),r=co(e);if(n&&r)return{moduleName:n,path:r};try{let n=de(t,e);return!n.startsWith(`./`)&&!n.startsWith(`../`)&&(n=`./${n}`),n.startsWith(`./.nuxt/`)&&(n=`#build${n.slice(7)}`),{path:n}}catch{return{path:e}}}),uo={relative:``,"max-h-screen":``,"of-hidden":``},fo={flex:`col gap-2`,absolute:``,"left-4":``,"top-4":``,"max-w-90vw":``,border:`~ base rounded-xl`,"bg-glass":``,"z-panel-nav":``},po={border:`b base`},mo={flex:`~ gap-2 wrap`,p2:``},ho=[`title`],go=[`checked`,`onChange`],_o={"text-sm":``},vo={flex:`~ gap-2 items-center`,p2:``,border:`t base`},yo={key:0,"i-ph-graph-duotone":``},bo={key:1,"i-ph-list-duotone":``},xo={key:0,"of-scroll":``,"max-h-screen":``,"pt-45":``,relative:``},So={"text-center":``,"text-xs":``,op50:``,m4:``},Co={key:0,fixed:``,"inset-0":``,"backdrop-blur-5":``,"z-panel-content":``};var wo=h({__name:`index`,props:{session:{}},setup(t){let n=t,r=R(),i=z(),o=T({search:r.query.search||``,file_types:r.query.file_types||null,node_modules:r.query.node_modules||null});ie(o,e=>{let t={...r.query,search:e.search||void 0,file_types:e.file_types||void 0,node_modules:e.node_modules||void 0};i.replace({query:Di(t)})},{debounce:500});let f=a(()=>n.session.modulesList.map(e=>{let t=lo(e.id,n.session.meta.cwd),r=ce(e.id);return{mod:e,path:t,type:r}})),h=a(()=>{let e=new Set;for(let t of f.value)e.add(t.type.name);return e}),g=a(()=>{let e=f.value;return o.file_types&&(e=e.filter(e=>o.file_types.includes(e.type.name))),o.node_modules&&(e=e.filter(e=>e.path.moduleName&&o.node_modules.includes(e.path.moduleName))),e.map(e=>e.mod)});function _(e){return o.file_types==null||o.file_types.includes(e)}function v(e){o.file_types??=Array.from(h.value),o.file_types.includes(e)?o.file_types=o.file_types.filter(t=>t!==e):o.file_types.push(e),o.file_types.length===h.value.size&&(o.file_types=null)}let y=s(()=>g.value,()=>new ao(g.value,{includeScore:!0,keys:[`id`]})),b=a(()=>o.search===``?g.value:y.value.search(o.search).map(e=>e.item)),S=E(`list`);function C(){r.query.module&&i.replace({query:{...r.query,module:void 0}}),S.value=S.value===`list`?`graph`:`list`}function O(){i.replace({query:{...r.query,module:void 0}})}return(t,n)=>{let i=Ce,a=yt,s=Ei,f=Kt;return w(),d(e,null,[c(`div`,uo,[c(`div`,fo,[c(`div`,po,[se(c(`input`,{"onUpdate:modelValue":n[0]||=e=>o.search=e,p2:``,px4:``,"w-full":``,style:{outline:`none`},placeholder:`Search`},null,512),[[ne,o.search]])]),c(`div`,mo,[(w(!0),d(e,null,D(h.value,e=>(w(),d(`label`,{key:e,border:`~ base rounded-md`,px2:``,py1:``,flex:`~ items-center gap-1`,"select-none":``,title:e,class:x(_(e)?`bg-active`:`grayscale op50`)},[c(`input`,{type:`checkbox`,checked:_(e),mr1:``,onChange:t=>v(e)},null,40,go),c(`div`,{class:x(F(le)(e).icon),"icon-catppuccin":``},null,2),c(`div`,_o,M(F(le)(e).description),1)],10,ho))),128))]),c(`div`,vo,[n[1]||=c(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),c(`button`,{"btn-action":``,onClick:C},[S.value===`graph`?(w(),d(`div`,yo)):(w(),d(`div`,bo)),p(` `+M(S.value===`list`?`List`:`Graph`),1)])])]),S.value===`list`?(w(),d(`div`,xo,[S.value===`list`?(w(),l(i,{key:0,session:t.session,modules:b.value},null,8,[`session`,`modules`])):u(``,!0),c(`div`,So,M(g.value.length)+` of `+M(t.session.modulesList.length),1)])):(w(),l(a,{key:1,session:t.session,modules:b.value},null,8,[`session`,`modules`]))]),F(r).query.module?(w(),d(`div`,Co,[se((w(),d(`div`,{key:F(r).query.module,fixed:``,"right-0":``,"bottom-0":``,"top-20":``,"z-panel-content":``,"min-w-300":``,"of-scroll":``,"bg-glass":``,border:`l t base rounded-tl-xl`,"max-w-85vw":``},[m(s,{module:F(r).query.module,session:t.session},null,8,[`module`,`session`]),m(f,{absolute:``,"right-2":``,"top-2":``,onClick:O})])),[[F(Fi),O]])])):u(``,!0)],64)}}}),To=wo;export{To as default};