@unocss/inspector 0.37.0 → 0.37.3

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.
@@ -0,0 +1,30 @@
1
+ var wg=Object.defineProperty,xg=Object.defineProperties;var kg=Object.getOwnPropertyDescriptors;var jf=Object.getOwnPropertySymbols;var Sg=Object.prototype.hasOwnProperty,Cg=Object.prototype.propertyIsEnumerable;var Uf=(r,s,l)=>s in r?wg(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,Wl=(r,s)=>{for(var l in s||(s={}))Sg.call(s,l)&&Uf(r,l,s[l]);if(jf)for(var l of jf(s))Cg.call(s,l)&&Uf(r,l,s[l]);return r},Kf=(r,s)=>xg(r,kg(s));const _g=function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))u(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const v of d.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&u(v)}).observe(document,{childList:!0,subtree:!0});function l(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerpolicy&&(d.referrerPolicy=f.referrerpolicy),f.crossorigin==="use-credentials"?d.credentials="include":f.crossorigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function u(f){if(f.ep)return;f.ep=!0;const d=l(f);fetch(f.href,d)}};_g();const Tg="modulepreload",qf={},Lg="/__unocss/",ga=function(s,l){return!l||l.length===0?s():Promise.all(l.map(u=>{if(u=`${Lg}${u}`,u in qf)return;qf[u]=!0;const f=u.endsWith(".css"),d=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const v=document.createElement("link");if(v.rel=f?"stylesheet":Tg,f||(v.as="script",v.crossOrigin=""),v.href=u,document.head.appendChild(v),f)return new Promise((b,y)=>{v.addEventListener("load",b),v.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${u}`)))})})).then(()=>s())};function va(r,s){const l=Object.create(null),u=r.split(",");for(let f=0;f<u.length;f++)l[u[f]]=!0;return s?f=>!!l[f.toLowerCase()]:f=>!!l[f]}const Pg="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Og=va(Pg);function Zc(r){return!!r||r===""}function Lo(r){if(We(r)){const s={};for(let l=0;l<r.length;l++){const u=r[l],f=zt(u)?Ag(u):Lo(u);if(f)for(const d in f)s[d]=f[d]}return s}else{if(zt(r))return r;if(Ot(r))return r}}const Mg=/;(?![^(]*\))/g,Eg=/:(.+)/;function Ag(r){const s={};return r.split(Mg).forEach(l=>{if(l){const u=l.split(Eg);u.length>1&&(s[u[0].trim()]=u[1].trim())}}),s}function wi(r){let s="";if(zt(r))s=r;else if(We(r))for(let l=0;l<r.length;l++){const u=wi(r[l]);u&&(s+=u+" ")}else if(Ot(r))for(const l in r)r[l]&&(s+=l+" ");return s.trim()}const tr=r=>zt(r)?r:r==null?"":We(r)||Ot(r)&&(r.toString===ed||!Ue(r.toString))?JSON.stringify(r,Jc,2):String(r),Jc=(r,s)=>s&&s.__v_isRef?Jc(r,s.value):yi(s)?{[`Map(${s.size})`]:[...s.entries()].reduce((l,[u,f])=>(l[`${u} =>`]=f,l),{})}:Qc(s)?{[`Set(${s.size})`]:[...s.values()]}:Ot(s)&&!We(s)&&!td(s)?String(s):s,st={},mi=[],br=()=>{},Ng=()=>!1,zg=/^on[^a-z]/,Os=r=>zg.test(r),ma=r=>r.startsWith("onUpdate:"),Zt=Object.assign,ya=(r,s)=>{const l=r.indexOf(s);l>-1&&r.splice(l,1)},Rg=Object.prototype.hasOwnProperty,Ye=(r,s)=>Rg.call(r,s),We=Array.isArray,yi=r=>Ms(r)==="[object Map]",Qc=r=>Ms(r)==="[object Set]",Ue=r=>typeof r=="function",zt=r=>typeof r=="string",ba=r=>typeof r=="symbol",Ot=r=>r!==null&&typeof r=="object",Vc=r=>Ot(r)&&Ue(r.then)&&Ue(r.catch),ed=Object.prototype.toString,Ms=r=>ed.call(r),Dg=r=>Ms(r).slice(8,-1),td=r=>Ms(r)==="[object Object]",wa=r=>zt(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,ps=va(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Es=r=>{const s=Object.create(null);return l=>s[l]||(s[l]=r(l))},Fg=/-(\w)/g,Nr=Es(r=>r.replace(Fg,(s,l)=>l?l.toUpperCase():"")),Ig=/\B([A-Z])/g,Ti=Es(r=>r.replace(Ig,"-$1").toLowerCase()),As=Es(r=>r.charAt(0).toUpperCase()+r.slice(1)),Bl=Es(r=>r?`on${As(r)}`:""),wo=(r,s)=>!Object.is(r,s),jl=(r,s)=>{for(let l=0;l<r.length;l++)r[l](s)},ys=(r,s,l)=>{Object.defineProperty(r,s,{configurable:!0,enumerable:!1,value:l})},Hg=r=>{const s=parseFloat(r);return isNaN(s)?r:s};let $f;const Wg=()=>$f||($f=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let sr;class Bg{constructor(s=!1){this.active=!0,this.effects=[],this.cleanups=[],!s&&sr&&(this.parent=sr,this.index=(sr.scopes||(sr.scopes=[])).push(this)-1)}run(s){if(this.active){const l=sr;try{return sr=this,s()}finally{sr=l}}}on(){sr=this}off(){sr=this.parent}stop(s){if(this.active){let l,u;for(l=0,u=this.effects.length;l<u;l++)this.effects[l].stop();for(l=0,u=this.cleanups.length;l<u;l++)this.cleanups[l]();if(this.scopes)for(l=0,u=this.scopes.length;l<u;l++)this.scopes[l].stop(!0);if(this.parent&&!s){const f=this.parent.scopes.pop();f&&f!==this&&(this.parent.scopes[this.index]=f,f.index=this.index)}this.active=!1}}}function jg(r,s=sr){s&&s.active&&s.effects.push(r)}function Ug(){return sr}function Kg(r){sr&&sr.cleanups.push(r)}const xa=r=>{const s=new Set(r);return s.w=0,s.n=0,s},rd=r=>(r.w&bn)>0,nd=r=>(r.n&bn)>0,qg=({deps:r})=>{if(r.length)for(let s=0;s<r.length;s++)r[s].w|=bn},$g=r=>{const{deps:s}=r;if(s.length){let l=0;for(let u=0;u<s.length;u++){const f=s[u];rd(f)&&!nd(f)?f.delete(r):s[l++]=f,f.w&=~bn,f.n&=~bn}s.length=l}},Zl=new WeakMap;let uo=0,bn=1;const Jl=30;let mr;const Wn=Symbol(""),Ql=Symbol("");class ka{constructor(s,l=null,u){this.fn=s,this.scheduler=l,this.active=!0,this.deps=[],this.parent=void 0,jg(this,u)}run(){if(!this.active)return this.fn();let s=mr,l=vn;for(;s;){if(s===this)return;s=s.parent}try{return this.parent=mr,mr=this,vn=!0,bn=1<<++uo,uo<=Jl?qg(this):Gf(this),this.fn()}finally{uo<=Jl&&$g(this),bn=1<<--uo,mr=this.parent,vn=l,this.parent=void 0,this.deferStop&&this.stop()}}stop(){mr===this?this.deferStop=!0:this.active&&(Gf(this),this.onStop&&this.onStop(),this.active=!1)}}function Gf(r){const{deps:s}=r;if(s.length){for(let l=0;l<s.length;l++)s[l].delete(r);s.length=0}}let vn=!0;const id=[];function Li(){id.push(vn),vn=!1}function Pi(){const r=id.pop();vn=r===void 0?!0:r}function ar(r,s,l){if(vn&&mr){let u=Zl.get(r);u||Zl.set(r,u=new Map);let f=u.get(l);f||u.set(l,f=xa()),od(f)}}function od(r,s){let l=!1;uo<=Jl?nd(r)||(r.n|=bn,l=!rd(r)):l=!r.has(mr),l&&(r.add(mr),mr.deps.push(r))}function Yr(r,s,l,u,f,d){const v=Zl.get(r);if(!v)return;let b=[];if(s==="clear")b=[...v.values()];else if(l==="length"&&We(r))v.forEach((y,x)=>{(x==="length"||x>=u)&&b.push(y)});else switch(l!==void 0&&b.push(v.get(l)),s){case"add":We(r)?wa(l)&&b.push(v.get("length")):(b.push(v.get(Wn)),yi(r)&&b.push(v.get(Ql)));break;case"delete":We(r)||(b.push(v.get(Wn)),yi(r)&&b.push(v.get(Ql)));break;case"set":yi(r)&&b.push(v.get(Wn));break}if(b.length===1)b[0]&&Vl(b[0]);else{const y=[];for(const x of b)x&&y.push(...x);Vl(xa(y))}}function Vl(r,s){const l=We(r)?r:[...r];for(const u of l)u.computed&&Yf(u);for(const u of l)u.computed||Yf(u)}function Yf(r,s){(r!==mr||r.allowRecurse)&&(r.scheduler?r.scheduler():r.run())}const Gg=va("__proto__,__v_isRef,__isVue"),sd=new Set(Object.getOwnPropertyNames(Symbol).filter(r=>r!=="arguments"&&r!=="caller").map(r=>Symbol[r]).filter(ba)),Yg=Sa(),Xg=Sa(!1,!0),Zg=Sa(!0),Xf=Jg();function Jg(){const r={};return["includes","indexOf","lastIndexOf"].forEach(s=>{r[s]=function(...l){const u=Ve(this);for(let d=0,v=this.length;d<v;d++)ar(u,"get",d+"");const f=u[s](...l);return f===-1||f===!1?u[s](...l.map(Ve)):f}}),["push","pop","shift","unshift","splice"].forEach(s=>{r[s]=function(...l){Li();const u=Ve(this)[s].apply(this,l);return Pi(),u}}),r}function Sa(r=!1,s=!1){return function(u,f,d){if(f==="__v_isReactive")return!r;if(f==="__v_isReadonly")return r;if(f==="__v_isShallow")return s;if(f==="__v_raw"&&d===(r?s?hv:cd:s?fd:ud).get(u))return u;const v=We(u);if(!r&&v&&Ye(Xf,f))return Reflect.get(Xf,f,d);const b=Reflect.get(u,f,d);return(ba(f)?sd.has(f):Gg(f))||(r||ar(u,"get",f),s)?b:bt(b)?v&&wa(f)?b:b.value:Ot(b)?r?dd(b):Oi(b):b}}const Qg=ld(),Vg=ld(!0);function ld(r=!1){return function(l,u,f,d){let v=l[u];if(xo(v)&&bt(v)&&!bt(f))return!1;if(!r&&!xo(f)&&(ea(f)||(f=Ve(f),v=Ve(v)),!We(l)&&bt(v)&&!bt(f)))return v.value=f,!0;const b=We(l)&&wa(u)?Number(u)<l.length:Ye(l,u),y=Reflect.set(l,u,f,d);return l===Ve(d)&&(b?wo(f,v)&&Yr(l,"set",u,f):Yr(l,"add",u,f)),y}}function ev(r,s){const l=Ye(r,s);r[s];const u=Reflect.deleteProperty(r,s);return u&&l&&Yr(r,"delete",s,void 0),u}function tv(r,s){const l=Reflect.has(r,s);return(!ba(s)||!sd.has(s))&&ar(r,"has",s),l}function rv(r){return ar(r,"iterate",We(r)?"length":Wn),Reflect.ownKeys(r)}const ad={get:Yg,set:Qg,deleteProperty:ev,has:tv,ownKeys:rv},nv={get:Zg,set(r,s){return!0},deleteProperty(r,s){return!0}},iv=Zt({},ad,{get:Xg,set:Vg}),Ca=r=>r,Ns=r=>Reflect.getPrototypeOf(r);function ls(r,s,l=!1,u=!1){r=r.__v_raw;const f=Ve(r),d=Ve(s);l||(s!==d&&ar(f,"get",s),ar(f,"get",d));const{has:v}=Ns(f),b=u?Ca:l?La:ko;if(v.call(f,s))return b(r.get(s));if(v.call(f,d))return b(r.get(d));r!==f&&r.get(s)}function as(r,s=!1){const l=this.__v_raw,u=Ve(l),f=Ve(r);return s||(r!==f&&ar(u,"has",r),ar(u,"has",f)),r===f?l.has(r):l.has(r)||l.has(f)}function us(r,s=!1){return r=r.__v_raw,!s&&ar(Ve(r),"iterate",Wn),Reflect.get(r,"size",r)}function Zf(r){r=Ve(r);const s=Ve(this);return Ns(s).has.call(s,r)||(s.add(r),Yr(s,"add",r,r)),this}function Jf(r,s){s=Ve(s);const l=Ve(this),{has:u,get:f}=Ns(l);let d=u.call(l,r);d||(r=Ve(r),d=u.call(l,r));const v=f.call(l,r);return l.set(r,s),d?wo(s,v)&&Yr(l,"set",r,s):Yr(l,"add",r,s),this}function Qf(r){const s=Ve(this),{has:l,get:u}=Ns(s);let f=l.call(s,r);f||(r=Ve(r),f=l.call(s,r)),u&&u.call(s,r);const d=s.delete(r);return f&&Yr(s,"delete",r,void 0),d}function Vf(){const r=Ve(this),s=r.size!==0,l=r.clear();return s&&Yr(r,"clear",void 0,void 0),l}function fs(r,s){return function(u,f){const d=this,v=d.__v_raw,b=Ve(v),y=s?Ca:r?La:ko;return!r&&ar(b,"iterate",Wn),v.forEach((x,C)=>u.call(f,y(x),y(C),d))}}function cs(r,s,l){return function(...u){const f=this.__v_raw,d=Ve(f),v=yi(d),b=r==="entries"||r===Symbol.iterator&&v,y=r==="keys"&&v,x=f[r](...u),C=l?Ca:s?La:ko;return!s&&ar(d,"iterate",y?Ql:Wn),{next(){const{value:L,done:O}=x.next();return O?{value:L,done:O}:{value:b?[C(L[0]),C(L[1])]:C(L),done:O}},[Symbol.iterator](){return this}}}}function fn(r){return function(...s){return r==="delete"?!1:this}}function ov(){const r={get(d){return ls(this,d)},get size(){return us(this)},has:as,add:Zf,set:Jf,delete:Qf,clear:Vf,forEach:fs(!1,!1)},s={get(d){return ls(this,d,!1,!0)},get size(){return us(this)},has:as,add:Zf,set:Jf,delete:Qf,clear:Vf,forEach:fs(!1,!0)},l={get(d){return ls(this,d,!0)},get size(){return us(this,!0)},has(d){return as.call(this,d,!0)},add:fn("add"),set:fn("set"),delete:fn("delete"),clear:fn("clear"),forEach:fs(!0,!1)},u={get(d){return ls(this,d,!0,!0)},get size(){return us(this,!0)},has(d){return as.call(this,d,!0)},add:fn("add"),set:fn("set"),delete:fn("delete"),clear:fn("clear"),forEach:fs(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(d=>{r[d]=cs(d,!1,!1),l[d]=cs(d,!0,!1),s[d]=cs(d,!1,!0),u[d]=cs(d,!0,!0)}),[r,l,s,u]}const[sv,lv,av,uv]=ov();function _a(r,s){const l=s?r?uv:av:r?lv:sv;return(u,f,d)=>f==="__v_isReactive"?!r:f==="__v_isReadonly"?r:f==="__v_raw"?u:Reflect.get(Ye(l,f)&&f in u?l:u,f,d)}const fv={get:_a(!1,!1)},cv={get:_a(!1,!0)},dv={get:_a(!0,!1)},ud=new WeakMap,fd=new WeakMap,cd=new WeakMap,hv=new WeakMap;function pv(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function gv(r){return r.__v_skip||!Object.isExtensible(r)?0:pv(Dg(r))}function Oi(r){return xo(r)?r:Ta(r,!1,ad,fv,ud)}function vv(r){return Ta(r,!1,iv,cv,fd)}function dd(r){return Ta(r,!0,nv,dv,cd)}function Ta(r,s,l,u,f){if(!Ot(r)||r.__v_raw&&!(s&&r.__v_isReactive))return r;const d=f.get(r);if(d)return d;const v=gv(r);if(v===0)return r;const b=new Proxy(r,v===2?u:l);return f.set(r,b),b}function bi(r){return xo(r)?bi(r.__v_raw):!!(r&&r.__v_isReactive)}function xo(r){return!!(r&&r.__v_isReadonly)}function ea(r){return!!(r&&r.__v_isShallow)}function hd(r){return bi(r)||xo(r)}function Ve(r){const s=r&&r.__v_raw;return s?Ve(s):r}function pd(r){return ys(r,"__v_skip",!0),r}const ko=r=>Ot(r)?Oi(r):r,La=r=>Ot(r)?dd(r):r;function gd(r){vn&&mr&&(r=Ve(r),od(r.dep||(r.dep=xa())))}function vd(r,s){r=Ve(r),r.dep&&Vl(r.dep)}function bt(r){return!!(r&&r.__v_isRef===!0)}function Nt(r){return md(r,!1)}function co(r){return md(r,!0)}function md(r,s){return bt(r)?r:new mv(r,s)}class mv{constructor(s,l){this.__v_isShallow=l,this.dep=void 0,this.__v_isRef=!0,this._rawValue=l?s:Ve(s),this._value=l?s:ko(s)}get value(){return gd(this),this._value}set value(s){s=this.__v_isShallow?s:Ve(s),wo(s,this._rawValue)&&(this._rawValue=s,this._value=this.__v_isShallow?s:ko(s),vd(this))}}function Me(r){return bt(r)?r.value:r}const yv={get:(r,s,l)=>Me(Reflect.get(r,s,l)),set:(r,s,l,u)=>{const f=r[s];return bt(f)&&!bt(l)?(f.value=l,!0):Reflect.set(r,s,l,u)}};function yd(r){return bi(r)?r:new Proxy(r,yv)}function bv(r){const s=We(r)?new Array(r.length):{};for(const l in r)s[l]=xv(r,l);return s}class wv{constructor(s,l,u){this._object=s,this._key=l,this._defaultValue=u,this.__v_isRef=!0}get value(){const s=this._object[this._key];return s===void 0?this._defaultValue:s}set value(s){this._object[this._key]=s}}function xv(r,s,l){const u=r[s];return bt(u)?u:new wv(r,s,l)}class kv{constructor(s,l,u,f){this._setter=l,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new ka(s,()=>{this._dirty||(this._dirty=!0,vd(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!f,this.__v_isReadonly=u}get value(){const s=Ve(this);return gd(s),(s._dirty||!s._cacheable)&&(s._dirty=!1,s._value=s.effect.run()),s._value}set value(s){this._setter(s)}}function Sv(r,s,l=!1){let u,f;const d=Ue(r);return d?(u=r,f=br):(u=r.get,f=r.set),new kv(u,f,d||!f,l)}function mn(r,s,l,u){let f;try{f=u?r(...u):r()}catch(d){zs(d,s,l)}return f}function wr(r,s,l,u){if(Ue(r)){const d=mn(r,s,l,u);return d&&Vc(d)&&d.catch(v=>{zs(v,s,l)}),d}const f=[];for(let d=0;d<r.length;d++)f.push(wr(r[d],s,l,u));return f}function zs(r,s,l,u=!0){const f=s?s.vnode:null;if(s){let d=s.parent;const v=s.proxy,b=l;for(;d;){const x=d.ec;if(x){for(let C=0;C<x.length;C++)if(x[C](r,v,b)===!1)return}d=d.parent}const y=s.appContext.config.errorHandler;if(y){mn(y,null,10,[r,v,b]);return}}Cv(r,l,f,u)}function Cv(r,s,l,u=!0){console.error(r)}let bs=!1,ta=!1;const lr=[];let $r=0;const ho=[];let fo=null,hi=0;const po=[];let hn=null,pi=0;const bd=Promise.resolve();let Pa=null,ra=null;function Rs(r){const s=Pa||bd;return r?s.then(this?r.bind(this):r):s}function _v(r){let s=$r+1,l=lr.length;for(;s<l;){const u=s+l>>>1;So(lr[u])<r?s=u+1:l=u}return s}function wd(r){(!lr.length||!lr.includes(r,bs&&r.allowRecurse?$r+1:$r))&&r!==ra&&(r.id==null?lr.push(r):lr.splice(_v(r.id),0,r),xd())}function xd(){!bs&&!ta&&(ta=!0,Pa=bd.then(Cd))}function Tv(r){const s=lr.indexOf(r);s>$r&&lr.splice(s,1)}function kd(r,s,l,u){We(r)?l.push(...r):(!s||!s.includes(r,r.allowRecurse?u+1:u))&&l.push(r),xd()}function Lv(r){kd(r,fo,ho,hi)}function Pv(r){kd(r,hn,po,pi)}function Ds(r,s=null){if(ho.length){for(ra=s,fo=[...new Set(ho)],ho.length=0,hi=0;hi<fo.length;hi++)fo[hi]();fo=null,hi=0,ra=null,Ds(r,s)}}function Sd(r){if(Ds(),po.length){const s=[...new Set(po)];if(po.length=0,hn){hn.push(...s);return}for(hn=s,hn.sort((l,u)=>So(l)-So(u)),pi=0;pi<hn.length;pi++)hn[pi]();hn=null,pi=0}}const So=r=>r.id==null?1/0:r.id;function Cd(r){ta=!1,bs=!0,Ds(r),lr.sort((l,u)=>So(l)-So(u));const s=br;try{for($r=0;$r<lr.length;$r++){const l=lr[$r];l&&l.active!==!1&&mn(l,null,14)}}finally{$r=0,lr.length=0,Sd(),bs=!1,Pa=null,(lr.length||ho.length||po.length)&&Cd(r)}}function Ov(r,s,...l){if(r.isUnmounted)return;const u=r.vnode.props||st;let f=l;const d=s.startsWith("update:"),v=d&&s.slice(7);if(v&&v in u){const C=`${v==="modelValue"?"model":v}Modifiers`,{number:L,trim:O}=u[C]||st;O&&(f=l.map(A=>A.trim())),L&&(f=l.map(Hg))}let b,y=u[b=Bl(s)]||u[b=Bl(Nr(s))];!y&&d&&(y=u[b=Bl(Ti(s))]),y&&wr(y,r,6,f);const x=u[b+"Once"];if(x){if(!r.emitted)r.emitted={};else if(r.emitted[b])return;r.emitted[b]=!0,wr(x,r,6,f)}}function _d(r,s,l=!1){const u=s.emitsCache,f=u.get(r);if(f!==void 0)return f;const d=r.emits;let v={},b=!1;if(!Ue(r)){const y=x=>{const C=_d(x,s,!0);C&&(b=!0,Zt(v,C))};!l&&s.mixins.length&&s.mixins.forEach(y),r.extends&&y(r.extends),r.mixins&&r.mixins.forEach(y)}return!d&&!b?(u.set(r,null),null):(We(d)?d.forEach(y=>v[y]=null):Zt(v,d),u.set(r,v),v)}function Fs(r,s){return!r||!Os(s)?!1:(s=s.slice(2).replace(/Once$/,""),Ye(r,s[0].toLowerCase()+s.slice(1))||Ye(r,Ti(s))||Ye(r,s))}let Xt=null,Td=null;function ws(r){const s=Xt;return Xt=r,Td=r&&r.type.__scopeId||null,s}function yn(r,s=Xt,l){if(!s||r._n)return r;const u=(...f)=>{u._d&&fc(-1);const d=ws(s),v=r(...f);return ws(d),u._d&&fc(1),v};return u._n=!0,u._c=!0,u._d=!0,u}function Ul(r){const{type:s,vnode:l,proxy:u,withProxy:f,props:d,propsOptions:[v],slots:b,attrs:y,emit:x,render:C,renderCache:L,data:O,setupState:A,ctx:I,inheritAttrs:ee}=r;let J,N;const D=ws(r);try{if(l.shapeFlag&4){const K=f||u;J=Ar(C.call(K,K,L,d,A,O,I)),N=y}else{const K=s;J=Ar(K.length>1?K(d,{attrs:y,slots:b,emit:x}):K(d,null)),N=s.props?y:Mv(y)}}catch(K){vo.length=0,zs(K,r,1),J=nt(wn)}let F=J;if(N&&ee!==!1){const K=Object.keys(N),{shapeFlag:te}=F;K.length&&te&7&&(v&&K.some(ma)&&(N=Ev(N,v)),F=ki(F,N))}return l.dirs&&(F=ki(F),F.dirs=F.dirs?F.dirs.concat(l.dirs):l.dirs),l.transition&&(F.transition=l.transition),J=F,ws(D),J}const Mv=r=>{let s;for(const l in r)(l==="class"||l==="style"||Os(l))&&((s||(s={}))[l]=r[l]);return s},Ev=(r,s)=>{const l={};for(const u in r)(!ma(u)||!(u.slice(9)in s))&&(l[u]=r[u]);return l};function Av(r,s,l){const{props:u,children:f,component:d}=r,{props:v,children:b,patchFlag:y}=s,x=d.emitsOptions;if(s.dirs||s.transition)return!0;if(l&&y>=0){if(y&1024)return!0;if(y&16)return u?ec(u,v,x):!!v;if(y&8){const C=s.dynamicProps;for(let L=0;L<C.length;L++){const O=C[L];if(v[O]!==u[O]&&!Fs(x,O))return!0}}}else return(f||b)&&(!b||!b.$stable)?!0:u===v?!1:u?v?ec(u,v,x):!0:!!v;return!1}function ec(r,s,l){const u=Object.keys(s);if(u.length!==Object.keys(r).length)return!0;for(let f=0;f<u.length;f++){const d=u[f];if(s[d]!==r[d]&&!Fs(l,d))return!0}return!1}function Nv({vnode:r,parent:s},l){for(;s&&s.subTree===r;)(r=s.vnode).el=l,s=s.parent}const zv=r=>r.__isSuspense;function Rv(r,s){s&&s.pendingBranch?We(r)?s.effects.push(...r):s.effects.push(r):Pv(r)}function gs(r,s){if(At){let l=At.provides;const u=At.parent&&At.parent.provides;u===l&&(l=At.provides=Object.create(u)),l[r]=s}}function Gr(r,s,l=!1){const u=At||Xt;if(u){const f=u.parent==null?u.vnode.appContext&&u.vnode.appContext.provides:u.parent.provides;if(f&&r in f)return f[r];if(arguments.length>1)return l&&Ue(s)?s.call(u.proxy):s}}function Dv(r,s){return Oa(r,null,s)}const tc={};function Ft(r,s,l){return Oa(r,s,l)}function Oa(r,s,{immediate:l,deep:u,flush:f,onTrack:d,onTrigger:v}=st){const b=At;let y,x=!1,C=!1;if(bt(r)?(y=()=>r.value,x=ea(r)):bi(r)?(y=()=>r,u=!0):We(r)?(C=!0,x=r.some(N=>bi(N)||ea(N)),y=()=>r.map(N=>{if(bt(N))return N.value;if(bi(N))return vi(N);if(Ue(N))return mn(N,b,2)})):Ue(r)?s?y=()=>mn(r,b,2):y=()=>{if(!(b&&b.isUnmounted))return L&&L(),wr(r,b,3,[O])}:y=br,s&&u){const N=y;y=()=>vi(N())}let L,O=N=>{L=J.onStop=()=>{mn(N,b,4)}};if(_o)return O=br,s?l&&wr(s,b,3,[y(),C?[]:void 0,O]):y(),br;let A=C?[]:tc;const I=()=>{if(!!J.active)if(s){const N=J.run();(u||x||(C?N.some((D,F)=>wo(D,A[F])):wo(N,A)))&&(L&&L(),wr(s,b,3,[N,A===tc?void 0:A,O]),A=N)}else J.run()};I.allowRecurse=!!s;let ee;f==="sync"?ee=I:f==="post"?ee=()=>er(I,b&&b.suspense):ee=()=>Lv(I);const J=new ka(y,ee);return s?l?I():A=J.run():f==="post"?er(J.run.bind(J),b&&b.suspense):J.run(),()=>{J.stop(),b&&b.scope&&ya(b.scope.effects,J)}}function Fv(r,s,l){const u=this.proxy,f=zt(r)?r.includes(".")?Ld(u,r):()=>u[r]:r.bind(u,u);let d;Ue(s)?d=s:(d=s.handler,l=s);const v=At;Si(this);const b=Oa(f,d.bind(u),l);return v?Si(v):Bn(),b}function Ld(r,s){const l=s.split(".");return()=>{let u=r;for(let f=0;f<l.length&&u;f++)u=u[l[f]];return u}}function vi(r,s){if(!Ot(r)||r.__v_skip||(s=s||new Set,s.has(r)))return r;if(s.add(r),bt(r))vi(r.value,s);else if(We(r))for(let l=0;l<r.length;l++)vi(r[l],s);else if(Qc(r)||yi(r))r.forEach(l=>{vi(l,s)});else if(td(r))for(const l in r)vi(r[l],s);return r}function zr(r){return Ue(r)?{setup:r,name:r.name}:r}const go=r=>!!r.type.__asyncLoader,Pd=r=>r.type.__isKeepAlive;function Iv(r,s){Od(r,"a",s)}function Hv(r,s){Od(r,"da",s)}function Od(r,s,l=At){const u=r.__wdc||(r.__wdc=()=>{let f=l;for(;f;){if(f.isDeactivated)return;f=f.parent}return r()});if(Is(s,u,l),l){let f=l.parent;for(;f&&f.parent;)Pd(f.parent.vnode)&&Wv(u,s,l,f),f=f.parent}}function Wv(r,s,l,u){const f=Is(s,r,u,!0);Ed(()=>{ya(u[s],f)},l)}function Is(r,s,l=At,u=!1){if(l){const f=l[r]||(l[r]=[]),d=s.__weh||(s.__weh=(...v)=>{if(l.isUnmounted)return;Li(),Si(l);const b=wr(s,l,r,v);return Bn(),Pi(),b});return u?f.unshift(d):f.push(d),d}}const Xr=r=>(s,l=At)=>(!_o||r==="sp")&&Is(r,s,l),Md=Xr("bm"),Ma=Xr("m"),Bv=Xr("bu"),jv=Xr("u"),Uv=Xr("bum"),Ed=Xr("um"),Kv=Xr("sp"),qv=Xr("rtg"),$v=Xr("rtc");function Gv(r,s=At){Is("ec",r,s)}function Dn(r,s,l,u){const f=r.dirs,d=s&&s.dirs;for(let v=0;v<f.length;v++){const b=f[v];d&&(b.oldValue=d[v].value);let y=b.dir[u];y&&(Li(),wr(y,l,8,[r.el,b,r,s]),Pi())}}const Ad="components";function xs(r,s){return Xv(Ad,r,!0,s)||r}const Yv=Symbol();function Xv(r,s,l=!0,u=!1){const f=Xt||At;if(f){const d=f.type;if(r===Ad){const b=Cm(d);if(b&&(b===s||b===Nr(s)||b===As(Nr(s))))return d}const v=rc(f[r]||d[r],s)||rc(f.appContext[r],s);return!v&&u?d:v}}function rc(r,s){return r&&(r[s]||r[Nr(s)]||r[As(Nr(s))])}function nc(r,s,l,u){let f;const d=l&&l[u];if(We(r)||zt(r)){f=new Array(r.length);for(let v=0,b=r.length;v<b;v++)f[v]=s(r[v],v,void 0,d&&d[v])}else if(typeof r=="number"){f=new Array(r);for(let v=0;v<r;v++)f[v]=s(v+1,v,void 0,d&&d[v])}else if(Ot(r))if(r[Symbol.iterator])f=Array.from(r,(v,b)=>s(v,b,void 0,d&&d[b]));else{const v=Object.keys(r);f=new Array(v.length);for(let b=0,y=v.length;b<y;b++){const x=v[b];f[b]=s(r[x],x,b,d&&d[b])}}else f=[];return l&&(l[u]=f),f}function Nd(r,s,l={},u,f){if(Xt.isCE||Xt.parent&&go(Xt.parent)&&Xt.parent.isCE)return nt("slot",s==="default"?null:{name:s},u&&u());let d=r[s];d&&d._c&&(d._d=!1),vt();const v=d&&zd(d(l)),b=xi(rr,{key:l.key||`_${s}`},v||(u?u():[]),v&&r._===1?64:-2);return!f&&b.scopeId&&(b.slotScopeIds=[b.scopeId+"-s"]),d&&d._c&&(d._d=!0),b}function zd(r){return r.some(s=>Cs(s)?!(s.type===wn||s.type===rr&&!zd(s.children)):!0)?r:null}const na=r=>r?$d(r)?Ra(r)||r.proxy:na(r.parent):null,ks=Zt(Object.create(null),{$:r=>r,$el:r=>r.vnode.el,$data:r=>r.data,$props:r=>r.props,$attrs:r=>r.attrs,$slots:r=>r.slots,$refs:r=>r.refs,$parent:r=>na(r.parent),$root:r=>na(r.root),$emit:r=>r.emit,$options:r=>Dd(r),$forceUpdate:r=>r.f||(r.f=()=>wd(r.update)),$nextTick:r=>r.n||(r.n=Rs.bind(r.proxy)),$watch:r=>Fv.bind(r)}),Zv={get({_:r},s){const{ctx:l,setupState:u,data:f,props:d,accessCache:v,type:b,appContext:y}=r;let x;if(s[0]!=="$"){const A=v[s];if(A!==void 0)switch(A){case 1:return u[s];case 2:return f[s];case 4:return l[s];case 3:return d[s]}else{if(u!==st&&Ye(u,s))return v[s]=1,u[s];if(f!==st&&Ye(f,s))return v[s]=2,f[s];if((x=r.propsOptions[0])&&Ye(x,s))return v[s]=3,d[s];if(l!==st&&Ye(l,s))return v[s]=4,l[s];ia&&(v[s]=0)}}const C=ks[s];let L,O;if(C)return s==="$attrs"&&ar(r,"get",s),C(r);if((L=b.__cssModules)&&(L=L[s]))return L;if(l!==st&&Ye(l,s))return v[s]=4,l[s];if(O=y.config.globalProperties,Ye(O,s))return O[s]},set({_:r},s,l){const{data:u,setupState:f,ctx:d}=r;return f!==st&&Ye(f,s)?(f[s]=l,!0):u!==st&&Ye(u,s)?(u[s]=l,!0):Ye(r.props,s)||s[0]==="$"&&s.slice(1)in r?!1:(d[s]=l,!0)},has({_:{data:r,setupState:s,accessCache:l,ctx:u,appContext:f,propsOptions:d}},v){let b;return!!l[v]||r!==st&&Ye(r,v)||s!==st&&Ye(s,v)||(b=d[0])&&Ye(b,v)||Ye(u,v)||Ye(ks,v)||Ye(f.config.globalProperties,v)},defineProperty(r,s,l){return l.get!=null?r._.accessCache[s]=0:Ye(l,"value")&&this.set(r,s,l.value,null),Reflect.defineProperty(r,s,l)}};let ia=!0;function Jv(r){const s=Dd(r),l=r.proxy,u=r.ctx;ia=!1,s.beforeCreate&&ic(s.beforeCreate,r,"bc");const{data:f,computed:d,methods:v,watch:b,provide:y,inject:x,created:C,beforeMount:L,mounted:O,beforeUpdate:A,updated:I,activated:ee,deactivated:J,beforeDestroy:N,beforeUnmount:D,destroyed:F,unmounted:K,render:te,renderTracked:de,renderTriggered:ye,errorCaptured:Re,serverPrefetch:Ne,expose:me,inheritAttrs:ce,components:Ee,directives:U,filters:le}=s;if(x&&Qv(x,u,null,r.appContext.config.unwrapInjectedRef),v)for(const G in v){const fe=v[G];Ue(fe)&&(u[G]=fe.bind(l))}if(f){const G=f.call(l,l);Ot(G)&&(r.data=Oi(G))}if(ia=!0,d)for(const G in d){const fe=d[G],Le=Ue(fe)?fe.bind(l,l):Ue(fe.get)?fe.get.bind(l,l):br,Ke=!Ue(fe)&&Ue(fe.set)?fe.set.bind(l):br,lt=ct({get:Le,set:Ke});Object.defineProperty(u,G,{enumerable:!0,configurable:!0,get:()=>lt.value,set:tt=>lt.value=tt})}if(b)for(const G in b)Rd(b[G],u,l,G);if(y){const G=Ue(y)?y.call(l):y;Reflect.ownKeys(G).forEach(fe=>{gs(fe,G[fe])})}C&&ic(C,r,"c");function Q(G,fe){We(fe)?fe.forEach(Le=>G(Le.bind(l))):fe&&G(fe.bind(l))}if(Q(Md,L),Q(Ma,O),Q(Bv,A),Q(jv,I),Q(Iv,ee),Q(Hv,J),Q(Gv,Re),Q($v,de),Q(qv,ye),Q(Uv,D),Q(Ed,K),Q(Kv,Ne),We(me))if(me.length){const G=r.exposed||(r.exposed={});me.forEach(fe=>{Object.defineProperty(G,fe,{get:()=>l[fe],set:Le=>l[fe]=Le})})}else r.exposed||(r.exposed={});te&&r.render===br&&(r.render=te),ce!=null&&(r.inheritAttrs=ce),Ee&&(r.components=Ee),U&&(r.directives=U)}function Qv(r,s,l=br,u=!1){We(r)&&(r=oa(r));for(const f in r){const d=r[f];let v;Ot(d)?"default"in d?v=Gr(d.from||f,d.default,!0):v=Gr(d.from||f):v=Gr(d),bt(v)&&u?Object.defineProperty(s,f,{enumerable:!0,configurable:!0,get:()=>v.value,set:b=>v.value=b}):s[f]=v}}function ic(r,s,l){wr(We(r)?r.map(u=>u.bind(s.proxy)):r.bind(s.proxy),s,l)}function Rd(r,s,l,u){const f=u.includes(".")?Ld(l,u):()=>l[u];if(zt(r)){const d=s[r];Ue(d)&&Ft(f,d)}else if(Ue(r))Ft(f,r.bind(l));else if(Ot(r))if(We(r))r.forEach(d=>Rd(d,s,l,u));else{const d=Ue(r.handler)?r.handler.bind(l):s[r.handler];Ue(d)&&Ft(f,d,r)}}function Dd(r){const s=r.type,{mixins:l,extends:u}=s,{mixins:f,optionsCache:d,config:{optionMergeStrategies:v}}=r.appContext,b=d.get(s);let y;return b?y=b:!f.length&&!l&&!u?y=s:(y={},f.length&&f.forEach(x=>Ss(y,x,v,!0)),Ss(y,s,v)),d.set(s,y),y}function Ss(r,s,l,u=!1){const{mixins:f,extends:d}=s;d&&Ss(r,d,l,!0),f&&f.forEach(v=>Ss(r,v,l,!0));for(const v in s)if(!(u&&v==="expose")){const b=Vv[v]||l&&l[v];r[v]=b?b(r[v],s[v]):s[v]}return r}const Vv={data:oc,props:In,emits:In,methods:In,computed:In,beforeCreate:Yt,created:Yt,beforeMount:Yt,mounted:Yt,beforeUpdate:Yt,updated:Yt,beforeDestroy:Yt,beforeUnmount:Yt,destroyed:Yt,unmounted:Yt,activated:Yt,deactivated:Yt,errorCaptured:Yt,serverPrefetch:Yt,components:In,directives:In,watch:tm,provide:oc,inject:em};function oc(r,s){return s?r?function(){return Zt(Ue(r)?r.call(this,this):r,Ue(s)?s.call(this,this):s)}:s:r}function em(r,s){return In(oa(r),oa(s))}function oa(r){if(We(r)){const s={};for(let l=0;l<r.length;l++)s[r[l]]=r[l];return s}return r}function Yt(r,s){return r?[...new Set([].concat(r,s))]:s}function In(r,s){return r?Zt(Zt(Object.create(null),r),s):s}function tm(r,s){if(!r)return s;if(!s)return r;const l=Zt(Object.create(null),r);for(const u in s)l[u]=Yt(r[u],s[u]);return l}function rm(r,s,l,u=!1){const f={},d={};ys(d,Hs,1),r.propsDefaults=Object.create(null),Fd(r,s,f,d);for(const v in r.propsOptions[0])v in f||(f[v]=void 0);l?r.props=u?f:vv(f):r.type.props?r.props=f:r.props=d,r.attrs=d}function nm(r,s,l,u){const{props:f,attrs:d,vnode:{patchFlag:v}}=r,b=Ve(f),[y]=r.propsOptions;let x=!1;if((u||v>0)&&!(v&16)){if(v&8){const C=r.vnode.dynamicProps;for(let L=0;L<C.length;L++){let O=C[L];if(Fs(r.emitsOptions,O))continue;const A=s[O];if(y)if(Ye(d,O))A!==d[O]&&(d[O]=A,x=!0);else{const I=Nr(O);f[I]=sa(y,b,I,A,r,!1)}else A!==d[O]&&(d[O]=A,x=!0)}}}else{Fd(r,s,f,d)&&(x=!0);let C;for(const L in b)(!s||!Ye(s,L)&&((C=Ti(L))===L||!Ye(s,C)))&&(y?l&&(l[L]!==void 0||l[C]!==void 0)&&(f[L]=sa(y,b,L,void 0,r,!0)):delete f[L]);if(d!==b)for(const L in d)(!s||!Ye(s,L)&&!0)&&(delete d[L],x=!0)}x&&Yr(r,"set","$attrs")}function Fd(r,s,l,u){const[f,d]=r.propsOptions;let v=!1,b;if(s)for(let y in s){if(ps(y))continue;const x=s[y];let C;f&&Ye(f,C=Nr(y))?!d||!d.includes(C)?l[C]=x:(b||(b={}))[C]=x:Fs(r.emitsOptions,y)||(!(y in u)||x!==u[y])&&(u[y]=x,v=!0)}if(d){const y=Ve(l),x=b||st;for(let C=0;C<d.length;C++){const L=d[C];l[L]=sa(f,y,L,x[L],r,!Ye(x,L))}}return v}function sa(r,s,l,u,f,d){const v=r[l];if(v!=null){const b=Ye(v,"default");if(b&&u===void 0){const y=v.default;if(v.type!==Function&&Ue(y)){const{propsDefaults:x}=f;l in x?u=x[l]:(Si(f),u=x[l]=y.call(null,s),Bn())}else u=y}v[0]&&(d&&!b?u=!1:v[1]&&(u===""||u===Ti(l))&&(u=!0))}return u}function Id(r,s,l=!1){const u=s.propsCache,f=u.get(r);if(f)return f;const d=r.props,v={},b=[];let y=!1;if(!Ue(r)){const C=L=>{y=!0;const[O,A]=Id(L,s,!0);Zt(v,O),A&&b.push(...A)};!l&&s.mixins.length&&s.mixins.forEach(C),r.extends&&C(r.extends),r.mixins&&r.mixins.forEach(C)}if(!d&&!y)return u.set(r,mi),mi;if(We(d))for(let C=0;C<d.length;C++){const L=Nr(d[C]);sc(L)&&(v[L]=st)}else if(d)for(const C in d){const L=Nr(C);if(sc(L)){const O=d[C],A=v[L]=We(O)||Ue(O)?{type:O}:O;if(A){const I=uc(Boolean,A.type),ee=uc(String,A.type);A[0]=I>-1,A[1]=ee<0||I<ee,(I>-1||Ye(A,"default"))&&b.push(L)}}}const x=[v,b];return u.set(r,x),x}function sc(r){return r[0]!=="$"}function lc(r){const s=r&&r.toString().match(/^\s*function (\w+)/);return s?s[1]:r===null?"null":""}function ac(r,s){return lc(r)===lc(s)}function uc(r,s){return We(s)?s.findIndex(l=>ac(l,r)):Ue(s)&&ac(s,r)?0:-1}const Hd=r=>r[0]==="_"||r==="$stable",Ea=r=>We(r)?r.map(Ar):[Ar(r)],im=(r,s,l)=>{if(s._n)return s;const u=yn((...f)=>Ea(s(...f)),l);return u._c=!1,u},Wd=(r,s,l)=>{const u=r._ctx;for(const f in r){if(Hd(f))continue;const d=r[f];if(Ue(d))s[f]=im(f,d,u);else if(d!=null){const v=Ea(d);s[f]=()=>v}}},Bd=(r,s)=>{const l=Ea(s);r.slots.default=()=>l},om=(r,s)=>{if(r.vnode.shapeFlag&32){const l=s._;l?(r.slots=Ve(s),ys(s,"_",l)):Wd(s,r.slots={})}else r.slots={},s&&Bd(r,s);ys(r.slots,Hs,1)},sm=(r,s,l)=>{const{vnode:u,slots:f}=r;let d=!0,v=st;if(u.shapeFlag&32){const b=s._;b?l&&b===1?d=!1:(Zt(f,s),!l&&b===1&&delete f._):(d=!s.$stable,Wd(s,f)),v=s}else s&&(Bd(r,s),v={default:1});if(d)for(const b in f)!Hd(b)&&!(b in v)&&delete f[b]};function jd(){return{app:null,config:{isNativeTag:Ng,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let lm=0;function am(r,s){return function(u,f=null){Ue(u)||(u=Object.assign({},u)),f!=null&&!Ot(f)&&(f=null);const d=jd(),v=new Set;let b=!1;const y=d.app={_uid:lm++,_component:u,_props:f,_container:null,_context:d,_instance:null,version:Tm,get config(){return d.config},set config(x){},use(x,...C){return v.has(x)||(x&&Ue(x.install)?(v.add(x),x.install(y,...C)):Ue(x)&&(v.add(x),x(y,...C))),y},mixin(x){return d.mixins.includes(x)||d.mixins.push(x),y},component(x,C){return C?(d.components[x]=C,y):d.components[x]},directive(x,C){return C?(d.directives[x]=C,y):d.directives[x]},mount(x,C,L){if(!b){const O=nt(u,f);return O.appContext=d,C&&s?s(O,x):r(O,x,L),b=!0,y._container=x,x.__vue_app__=y,Ra(O.component)||O.component.proxy}},unmount(){b&&(r(null,y._container),delete y._container.__vue_app__)},provide(x,C){return d.provides[x]=C,y}};return y}}function la(r,s,l,u,f=!1){if(We(r)){r.forEach((O,A)=>la(O,s&&(We(s)?s[A]:s),l,u,f));return}if(go(u)&&!f)return;const d=u.shapeFlag&4?Ra(u.component)||u.component.proxy:u.el,v=f?null:d,{i:b,r:y}=r,x=s&&s.r,C=b.refs===st?b.refs={}:b.refs,L=b.setupState;if(x!=null&&x!==y&&(zt(x)?(C[x]=null,Ye(L,x)&&(L[x]=null)):bt(x)&&(x.value=null)),Ue(y))mn(y,b,12,[v,C]);else{const O=zt(y),A=bt(y);if(O||A){const I=()=>{if(r.f){const ee=O?C[y]:y.value;f?We(ee)&&ya(ee,d):We(ee)?ee.includes(d)||ee.push(d):O?(C[y]=[d],Ye(L,y)&&(L[y]=C[y])):(y.value=[d],r.k&&(C[r.k]=y.value))}else O?(C[y]=v,Ye(L,y)&&(L[y]=v)):bt(y)&&(y.value=v,r.k&&(C[r.k]=v))};v?(I.id=-1,er(I,l)):I()}}}const er=Rv;function um(r){return fm(r)}function fm(r,s){const l=Wg();l.__VUE__=!0;const{insert:u,remove:f,patchProp:d,createElement:v,createText:b,createComment:y,setText:x,setElementText:C,parentNode:L,nextSibling:O,setScopeId:A=br,cloneNode:I,insertStaticContent:ee}=r,J=(P,E,B,H=null,Y=null,ne=null,ae=!1,ue=null,re=!!E.dynamicChildren)=>{if(P===E)return;P&&!so(P,E)&&(H=oe(P),He(P,Y,ne,!0),P=null),E.patchFlag===-2&&(re=!1,E.dynamicChildren=null);const{type:T,ref:j,shapeFlag:z}=E;switch(T){case Aa:N(P,E,B,H);break;case wn:D(P,E,B,H);break;case Kl:P==null&&F(E,B,H,ae);break;case rr:U(P,E,B,H,Y,ne,ae,ue,re);break;default:z&1?de(P,E,B,H,Y,ne,ae,ue,re):z&6?le(P,E,B,H,Y,ne,ae,ue,re):(z&64||z&128)&&T.process(P,E,B,H,Y,ne,ae,ue,re,we)}j!=null&&Y&&la(j,P&&P.ref,ne,E||P,!E)},N=(P,E,B,H)=>{if(P==null)u(E.el=b(E.children),B,H);else{const Y=E.el=P.el;E.children!==P.children&&x(Y,E.children)}},D=(P,E,B,H)=>{P==null?u(E.el=y(E.children||""),B,H):E.el=P.el},F=(P,E,B,H)=>{[P.el,P.anchor]=ee(P.children,E,B,H,P.el,P.anchor)},K=({el:P,anchor:E},B,H)=>{let Y;for(;P&&P!==E;)Y=O(P),u(P,B,H),P=Y;u(E,B,H)},te=({el:P,anchor:E})=>{let B;for(;P&&P!==E;)B=O(P),f(P),P=B;f(E)},de=(P,E,B,H,Y,ne,ae,ue,re)=>{ae=ae||E.type==="svg",P==null?ye(E,B,H,Y,ne,ae,ue,re):me(P,E,Y,ne,ae,ue,re)},ye=(P,E,B,H,Y,ne,ae,ue)=>{let re,T;const{type:j,props:z,shapeFlag:he,transition:Te,patchFlag:je,dirs:Ge}=P;if(P.el&&I!==void 0&&je===-1)re=P.el=I(P.el);else{if(re=P.el=v(P.type,ne,z&&z.is,z),he&8?C(re,P.children):he&16&&Ne(P.children,re,null,H,Y,ne&&j!=="foreignObject",ae,ue),Ge&&Dn(P,null,H,"created"),z){for(const Ie in z)Ie!=="value"&&!ps(Ie)&&d(re,Ie,null,z[Ie],ne,P.children,H,Y,W);"value"in z&&d(re,"value",null,z.value),(T=z.onVnodeBeforeMount)&&Mr(T,H,P)}Re(re,P,P.scopeId,ae,H)}Ge&&Dn(P,null,H,"beforeMount");const $e=(!Y||Y&&!Y.pendingBranch)&&Te&&!Te.persisted;$e&&Te.beforeEnter(re),u(re,E,B),((T=z&&z.onVnodeMounted)||$e||Ge)&&er(()=>{T&&Mr(T,H,P),$e&&Te.enter(re),Ge&&Dn(P,null,H,"mounted")},Y)},Re=(P,E,B,H,Y)=>{if(B&&A(P,B),H)for(let ne=0;ne<H.length;ne++)A(P,H[ne]);if(Y){let ne=Y.subTree;if(E===ne){const ae=Y.vnode;Re(P,ae,ae.scopeId,ae.slotScopeIds,Y.parent)}}},Ne=(P,E,B,H,Y,ne,ae,ue,re=0)=>{for(let T=re;T<P.length;T++){const j=P[T]=ue?pn(P[T]):Ar(P[T]);J(null,j,E,B,H,Y,ne,ae,ue)}},me=(P,E,B,H,Y,ne,ae)=>{const ue=E.el=P.el;let{patchFlag:re,dynamicChildren:T,dirs:j}=E;re|=P.patchFlag&16;const z=P.props||st,he=E.props||st;let Te;B&&Fn(B,!1),(Te=he.onVnodeBeforeUpdate)&&Mr(Te,B,E,P),j&&Dn(E,P,B,"beforeUpdate"),B&&Fn(B,!0);const je=Y&&E.type!=="foreignObject";if(T?ce(P.dynamicChildren,T,ue,B,H,je,ne):ae||Le(P,E,ue,null,B,H,je,ne,!1),re>0){if(re&16)Ee(ue,E,z,he,B,H,Y);else if(re&2&&z.class!==he.class&&d(ue,"class",null,he.class,Y),re&4&&d(ue,"style",z.style,he.style,Y),re&8){const Ge=E.dynamicProps;for(let $e=0;$e<Ge.length;$e++){const Ie=Ge[$e],dt=z[Ie],nr=he[Ie];(nr!==dt||Ie==="value")&&d(ue,Ie,dt,nr,Y,P.children,B,H,W)}}re&1&&P.children!==E.children&&C(ue,E.children)}else!ae&&T==null&&Ee(ue,E,z,he,B,H,Y);((Te=he.onVnodeUpdated)||j)&&er(()=>{Te&&Mr(Te,B,E,P),j&&Dn(E,P,B,"updated")},H)},ce=(P,E,B,H,Y,ne,ae)=>{for(let ue=0;ue<E.length;ue++){const re=P[ue],T=E[ue],j=re.el&&(re.type===rr||!so(re,T)||re.shapeFlag&70)?L(re.el):B;J(re,T,j,null,H,Y,ne,ae,!0)}},Ee=(P,E,B,H,Y,ne,ae)=>{if(B!==H){for(const ue in H){if(ps(ue))continue;const re=H[ue],T=B[ue];re!==T&&ue!=="value"&&d(P,ue,T,re,ae,E.children,Y,ne,W)}if(B!==st)for(const ue in B)!ps(ue)&&!(ue in H)&&d(P,ue,B[ue],null,ae,E.children,Y,ne,W);"value"in H&&d(P,"value",B.value,H.value)}},U=(P,E,B,H,Y,ne,ae,ue,re)=>{const T=E.el=P?P.el:b(""),j=E.anchor=P?P.anchor:b("");let{patchFlag:z,dynamicChildren:he,slotScopeIds:Te}=E;Te&&(ue=ue?ue.concat(Te):Te),P==null?(u(T,B,H),u(j,B,H),Ne(E.children,B,j,Y,ne,ae,ue,re)):z>0&&z&64&&he&&P.dynamicChildren?(ce(P.dynamicChildren,he,B,Y,ne,ae,ue),(E.key!=null||Y&&E===Y.subTree)&&Ud(P,E,!0)):Le(P,E,B,j,Y,ne,ae,ue,re)},le=(P,E,B,H,Y,ne,ae,ue,re)=>{E.slotScopeIds=ue,P==null?E.shapeFlag&512?Y.ctx.activate(E,B,H,ae,re):w(E,B,H,Y,ne,ae,re):Q(P,E,re)},w=(P,E,B,H,Y,ne,ae)=>{const ue=P.component=bm(P,H,Y);if(Pd(P)&&(ue.ctx.renderer=we),wm(ue),ue.asyncDep){if(Y&&Y.registerDep(ue,G),!P.el){const re=ue.subTree=nt(wn);D(null,re,E,B)}return}G(ue,P,E,B,Y,ne,ae)},Q=(P,E,B)=>{const H=E.component=P.component;if(Av(P,E,B))if(H.asyncDep&&!H.asyncResolved){fe(H,E,B);return}else H.next=E,Tv(H.update),H.update();else E.el=P.el,H.vnode=E},G=(P,E,B,H,Y,ne,ae)=>{const ue=()=>{if(P.isMounted){let{next:j,bu:z,u:he,parent:Te,vnode:je}=P,Ge=j,$e;Fn(P,!1),j?(j.el=je.el,fe(P,j,ae)):j=je,z&&jl(z),($e=j.props&&j.props.onVnodeBeforeUpdate)&&Mr($e,Te,j,je),Fn(P,!0);const Ie=Ul(P),dt=P.subTree;P.subTree=Ie,J(dt,Ie,L(dt.el),oe(dt),P,Y,ne),j.el=Ie.el,Ge===null&&Nv(P,Ie.el),he&&er(he,Y),($e=j.props&&j.props.onVnodeUpdated)&&er(()=>Mr($e,Te,j,je),Y)}else{let j;const{el:z,props:he}=E,{bm:Te,m:je,parent:Ge}=P,$e=go(E);if(Fn(P,!1),Te&&jl(Te),!$e&&(j=he&&he.onVnodeBeforeMount)&&Mr(j,Ge,E),Fn(P,!0),z&&ke){const Ie=()=>{P.subTree=Ul(P),ke(z,P.subTree,P,Y,null)};$e?E.type.__asyncLoader().then(()=>!P.isUnmounted&&Ie()):Ie()}else{const Ie=P.subTree=Ul(P);J(null,Ie,B,H,P,Y,ne),E.el=Ie.el}if(je&&er(je,Y),!$e&&(j=he&&he.onVnodeMounted)){const Ie=E;er(()=>Mr(j,Ge,Ie),Y)}(E.shapeFlag&256||Ge&&go(Ge.vnode)&&Ge.vnode.shapeFlag&256)&&P.a&&er(P.a,Y),P.isMounted=!0,E=B=H=null}},re=P.effect=new ka(ue,()=>wd(T),P.scope),T=P.update=()=>re.run();T.id=P.uid,Fn(P,!0),T()},fe=(P,E,B)=>{E.component=P;const H=P.vnode.props;P.vnode=E,P.next=null,nm(P,E.props,H,B),sm(P,E.children,B),Li(),Ds(void 0,P.update),Pi()},Le=(P,E,B,H,Y,ne,ae,ue,re=!1)=>{const T=P&&P.children,j=P?P.shapeFlag:0,z=E.children,{patchFlag:he,shapeFlag:Te}=E;if(he>0){if(he&128){lt(T,z,B,H,Y,ne,ae,ue,re);return}else if(he&256){Ke(T,z,B,H,Y,ne,ae,ue,re);return}}Te&8?(j&16&&W(T,Y,ne),z!==T&&C(B,z)):j&16?Te&16?lt(T,z,B,H,Y,ne,ae,ue,re):W(T,Y,ne,!0):(j&8&&C(B,""),Te&16&&Ne(z,B,H,Y,ne,ae,ue,re))},Ke=(P,E,B,H,Y,ne,ae,ue,re)=>{P=P||mi,E=E||mi;const T=P.length,j=E.length,z=Math.min(T,j);let he;for(he=0;he<z;he++){const Te=E[he]=re?pn(E[he]):Ar(E[he]);J(P[he],Te,B,null,Y,ne,ae,ue,re)}T>j?W(P,Y,ne,!0,!1,z):Ne(E,B,H,Y,ne,ae,ue,re,z)},lt=(P,E,B,H,Y,ne,ae,ue,re)=>{let T=0;const j=E.length;let z=P.length-1,he=j-1;for(;T<=z&&T<=he;){const Te=P[T],je=E[T]=re?pn(E[T]):Ar(E[T]);if(so(Te,je))J(Te,je,B,null,Y,ne,ae,ue,re);else break;T++}for(;T<=z&&T<=he;){const Te=P[z],je=E[he]=re?pn(E[he]):Ar(E[he]);if(so(Te,je))J(Te,je,B,null,Y,ne,ae,ue,re);else break;z--,he--}if(T>z){if(T<=he){const Te=he+1,je=Te<j?E[Te].el:H;for(;T<=he;)J(null,E[T]=re?pn(E[T]):Ar(E[T]),B,je,Y,ne,ae,ue,re),T++}}else if(T>he)for(;T<=z;)He(P[T],Y,ne,!0),T++;else{const Te=T,je=T,Ge=new Map;for(T=je;T<=he;T++){const kt=E[T]=re?pn(E[T]):Ar(E[T]);kt.key!=null&&Ge.set(kt.key,T)}let $e,Ie=0;const dt=he-je+1;let nr=!1,xt=0;const xr=new Array(dt);for(T=0;T<dt;T++)xr[T]=0;for(T=Te;T<=z;T++){const kt=P[T];if(Ie>=dt){He(kt,Y,ne,!0);continue}let ze;if(kt.key!=null)ze=Ge.get(kt.key);else for($e=je;$e<=he;$e++)if(xr[$e-je]===0&&so(kt,E[$e])){ze=$e;break}ze===void 0?He(kt,Y,ne,!0):(xr[ze-je]=T+1,ze>=xt?xt=ze:nr=!0,J(kt,E[ze],B,null,Y,ne,ae,ue,re),Ie++)}const Oe=nr?cm(xr):mi;for($e=Oe.length-1,T=dt-1;T>=0;T--){const kt=je+T,ze=E[kt],it=kt+1<j?E[kt+1].el:H;xr[T]===0?J(null,ze,B,it,Y,ne,ae,ue,re):nr&&($e<0||T!==Oe[$e]?tt(ze,B,it,2):$e--)}}},tt=(P,E,B,H,Y=null)=>{const{el:ne,type:ae,transition:ue,children:re,shapeFlag:T}=P;if(T&6){tt(P.component.subTree,E,B,H);return}if(T&128){P.suspense.move(E,B,H);return}if(T&64){ae.move(P,E,B,we);return}if(ae===rr){u(ne,E,B);for(let z=0;z<re.length;z++)tt(re[z],E,B,H);u(P.anchor,E,B);return}if(ae===Kl){K(P,E,B);return}if(H!==2&&T&1&&ue)if(H===0)ue.beforeEnter(ne),u(ne,E,B),er(()=>ue.enter(ne),Y);else{const{leave:z,delayLeave:he,afterLeave:Te}=ue,je=()=>u(ne,E,B),Ge=()=>{z(ne,()=>{je(),Te&&Te()})};he?he(ne,je,Ge):Ge()}else u(ne,E,B)},He=(P,E,B,H=!1,Y=!1)=>{const{type:ne,props:ae,ref:ue,children:re,dynamicChildren:T,shapeFlag:j,patchFlag:z,dirs:he}=P;if(ue!=null&&la(ue,null,B,P,!0),j&256){E.ctx.deactivate(P);return}const Te=j&1&&he,je=!go(P);let Ge;if(je&&(Ge=ae&&ae.onVnodeBeforeUnmount)&&Mr(Ge,E,P),j&6)V(P.component,B,H);else{if(j&128){P.suspense.unmount(B,H);return}Te&&Dn(P,null,E,"beforeUnmount"),j&64?P.type.remove(P,E,B,Y,we,H):T&&(ne!==rr||z>0&&z&64)?W(T,E,B,!1,!0):(ne===rr&&z&384||!Y&&j&16)&&W(re,E,B),H&&at(P)}(je&&(Ge=ae&&ae.onVnodeUnmounted)||Te)&&er(()=>{Ge&&Mr(Ge,E,P),Te&&Dn(P,null,E,"unmounted")},B)},at=P=>{const{type:E,el:B,anchor:H,transition:Y}=P;if(E===rr){q(B,H);return}if(E===Kl){te(P);return}const ne=()=>{f(B),Y&&!Y.persisted&&Y.afterLeave&&Y.afterLeave()};if(P.shapeFlag&1&&Y&&!Y.persisted){const{leave:ae,delayLeave:ue}=Y,re=()=>ae(B,ne);ue?ue(P.el,ne,re):re()}else ne()},q=(P,E)=>{let B;for(;P!==E;)B=O(P),f(P),P=B;f(E)},V=(P,E,B)=>{const{bum:H,scope:Y,update:ne,subTree:ae,um:ue}=P;H&&jl(H),Y.stop(),ne&&(ne.active=!1,He(ae,P,E,B)),ue&&er(ue,E),er(()=>{P.isUnmounted=!0},E),E&&E.pendingBranch&&!E.isUnmounted&&P.asyncDep&&!P.asyncResolved&&P.suspenseId===E.pendingId&&(E.deps--,E.deps===0&&E.resolve())},W=(P,E,B,H=!1,Y=!1,ne=0)=>{for(let ae=ne;ae<P.length;ae++)He(P[ae],E,B,H,Y)},oe=P=>P.shapeFlag&6?oe(P.component.subTree):P.shapeFlag&128?P.suspense.next():O(P.anchor||P.el),_e=(P,E,B)=>{P==null?E._vnode&&He(E._vnode,null,null,!0):J(E._vnode||null,P,E,null,null,null,B),Sd(),E._vnode=P},we={p:J,um:He,m:tt,r:at,mt:w,mc:Ne,pc:Le,pbc:ce,n:oe,o:r};let pe,ke;return s&&([pe,ke]=s(we)),{render:_e,hydrate:pe,createApp:am(_e,pe)}}function Fn({effect:r,update:s},l){r.allowRecurse=s.allowRecurse=l}function Ud(r,s,l=!1){const u=r.children,f=s.children;if(We(u)&&We(f))for(let d=0;d<u.length;d++){const v=u[d];let b=f[d];b.shapeFlag&1&&!b.dynamicChildren&&((b.patchFlag<=0||b.patchFlag===32)&&(b=f[d]=pn(f[d]),b.el=v.el),l||Ud(v,b))}}function cm(r){const s=r.slice(),l=[0];let u,f,d,v,b;const y=r.length;for(u=0;u<y;u++){const x=r[u];if(x!==0){if(f=l[l.length-1],r[f]<x){s[u]=f,l.push(u);continue}for(d=0,v=l.length-1;d<v;)b=d+v>>1,r[l[b]]<x?d=b+1:v=b;x<r[l[d]]&&(d>0&&(s[u]=l[d-1]),l[d]=u)}}for(d=l.length,v=l[d-1];d-- >0;)l[d]=v,v=s[v];return l}const dm=r=>r.__isTeleport,rr=Symbol(void 0),Aa=Symbol(void 0),wn=Symbol(void 0),Kl=Symbol(void 0),vo=[];let yr=null;function vt(r=!1){vo.push(yr=r?null:[])}function hm(){vo.pop(),yr=vo[vo.length-1]||null}let Co=1;function fc(r){Co+=r}function Kd(r){return r.dynamicChildren=Co>0?yr||mi:null,hm(),Co>0&&yr&&yr.push(r),r}function jt(r,s,l,u,f,d){return Kd(Fe(r,s,l,u,f,d,!0))}function xi(r,s,l,u,f){return Kd(nt(r,s,l,u,f,!0))}function Cs(r){return r?r.__v_isVNode===!0:!1}function so(r,s){return r.type===s.type&&r.key===s.key}const Hs="__vInternal",qd=({key:r})=>r!=null?r:null,vs=({ref:r,ref_key:s,ref_for:l})=>r!=null?zt(r)||bt(r)||Ue(r)?{i:Xt,r,k:s,f:!!l}:r:null;function Fe(r,s=null,l=null,u=0,f=null,d=r===rr?0:1,v=!1,b=!1){const y={__v_isVNode:!0,__v_skip:!0,type:r,props:s,key:s&&qd(s),ref:s&&vs(s),scopeId:Td,slotScopeIds:null,children:l,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:d,patchFlag:u,dynamicProps:f,dynamicChildren:null,appContext:null};return b?(Na(y,l),d&128&&r.normalize(y)):l&&(y.shapeFlag|=zt(l)?8:16),Co>0&&!v&&yr&&(y.patchFlag>0||d&6)&&y.patchFlag!==32&&yr.push(y),y}const nt=pm;function pm(r,s=null,l=null,u=0,f=null,d=!1){if((!r||r===Yv)&&(r=wn),Cs(r)){const b=ki(r,s,!0);return l&&Na(b,l),Co>0&&!d&&yr&&(b.shapeFlag&6?yr[yr.indexOf(r)]=b:yr.push(b)),b.patchFlag|=-2,b}if(_m(r)&&(r=r.__vccOpts),s){s=gm(s);let{class:b,style:y}=s;b&&!zt(b)&&(s.class=wi(b)),Ot(y)&&(hd(y)&&!We(y)&&(y=Zt({},y)),s.style=Lo(y))}const v=zt(r)?1:zv(r)?128:dm(r)?64:Ot(r)?4:Ue(r)?2:0;return Fe(r,s,l,u,f,v,d,!0)}function gm(r){return r?hd(r)||Hs in r?Zt({},r):r:null}function ki(r,s,l=!1){const{props:u,ref:f,patchFlag:d,children:v}=r,b=s?vm(u||{},s):u;return{__v_isVNode:!0,__v_skip:!0,type:r.type,props:b,key:b&&qd(b),ref:s&&s.ref?l&&f?We(f)?f.concat(vs(s)):[f,vs(s)]:vs(s):f,scopeId:r.scopeId,slotScopeIds:r.slotScopeIds,children:v,target:r.target,targetAnchor:r.targetAnchor,staticCount:r.staticCount,shapeFlag:r.shapeFlag,patchFlag:s&&r.type!==rr?d===-1?16:d|16:d,dynamicProps:r.dynamicProps,dynamicChildren:r.dynamicChildren,appContext:r.appContext,dirs:r.dirs,transition:r.transition,component:r.component,suspense:r.suspense,ssContent:r.ssContent&&ki(r.ssContent),ssFallback:r.ssFallback&&ki(r.ssFallback),el:r.el,anchor:r.anchor}}function Er(r=" ",s=0){return nt(Aa,null,r,s)}function _s(r="",s=!1){return s?(vt(),xi(wn,null,r)):nt(wn,null,r)}function Ar(r){return r==null||typeof r=="boolean"?nt(wn):We(r)?nt(rr,null,r.slice()):typeof r=="object"?pn(r):nt(Aa,null,String(r))}function pn(r){return r.el===null||r.memo?r:ki(r)}function Na(r,s){let l=0;const{shapeFlag:u}=r;if(s==null)s=null;else if(We(s))l=16;else if(typeof s=="object")if(u&65){const f=s.default;f&&(f._c&&(f._d=!1),Na(r,f()),f._c&&(f._d=!0));return}else{l=32;const f=s._;!f&&!(Hs in s)?s._ctx=Xt:f===3&&Xt&&(Xt.slots._===1?s._=1:(s._=2,r.patchFlag|=1024))}else Ue(s)?(s={default:s,_ctx:Xt},l=32):(s=String(s),u&64?(l=16,s=[Er(s)]):l=8);r.children=s,r.shapeFlag|=l}function vm(...r){const s={};for(let l=0;l<r.length;l++){const u=r[l];for(const f in u)if(f==="class")s.class!==u.class&&(s.class=wi([s.class,u.class]));else if(f==="style")s.style=Lo([s.style,u.style]);else if(Os(f)){const d=s[f],v=u[f];v&&d!==v&&!(We(d)&&d.includes(v))&&(s[f]=d?[].concat(d,v):v)}else f!==""&&(s[f]=u[f])}return s}function Mr(r,s,l,u=null){wr(r,s,7,[l,u])}const mm=jd();let ym=0;function bm(r,s,l){const u=r.type,f=(s?s.appContext:r.appContext)||mm,d={uid:ym++,vnode:r,type:u,parent:s,appContext:f,root:null,next:null,subTree:null,effect:null,update:null,scope:new Bg(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:s?s.provides:Object.create(f.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Id(u,f),emitsOptions:_d(u,f),emit:null,emitted:null,propsDefaults:st,inheritAttrs:u.inheritAttrs,ctx:st,data:st,props:st,attrs:st,slots:st,refs:st,setupState:st,setupContext:null,suspense:l,suspenseId:l?l.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return d.ctx={_:d},d.root=s?s.root:d,d.emit=Ov.bind(null,d),r.ce&&r.ce(d),d}let At=null;const za=()=>At||Xt,Si=r=>{At=r,r.scope.on()},Bn=()=>{At&&At.scope.off(),At=null};function $d(r){return r.vnode.shapeFlag&4}let _o=!1;function wm(r,s=!1){_o=s;const{props:l,children:u}=r.vnode,f=$d(r);rm(r,l,f,s),om(r,u);const d=f?xm(r,s):void 0;return _o=!1,d}function xm(r,s){const l=r.type;r.accessCache=Object.create(null),r.proxy=pd(new Proxy(r.ctx,Zv));const{setup:u}=l;if(u){const f=r.setupContext=u.length>1?Sm(r):null;Si(r),Li();const d=mn(u,r,0,[r.props,f]);if(Pi(),Bn(),Vc(d)){if(d.then(Bn,Bn),s)return d.then(v=>{cc(r,v,s)}).catch(v=>{zs(v,r,0)});r.asyncDep=d}else cc(r,d,s)}else Gd(r,s)}function cc(r,s,l){Ue(s)?r.type.__ssrInlineRender?r.ssrRender=s:r.render=s:Ot(s)&&(r.setupState=yd(s)),Gd(r,l)}let dc;function Gd(r,s,l){const u=r.type;if(!r.render){if(!s&&dc&&!u.render){const f=u.template;if(f){const{isCustomElement:d,compilerOptions:v}=r.appContext.config,{delimiters:b,compilerOptions:y}=u,x=Zt(Zt({isCustomElement:d,delimiters:b},v),y);u.render=dc(f,x)}}r.render=u.render||br}Si(r),Li(),Jv(r),Pi(),Bn()}function km(r){return new Proxy(r.attrs,{get(s,l){return ar(r,"get","$attrs"),s[l]}})}function Sm(r){const s=u=>{r.exposed=u||{}};let l;return{get attrs(){return l||(l=km(r))},slots:r.slots,emit:r.emit,expose:s}}function Ra(r){if(r.exposed)return r.exposeProxy||(r.exposeProxy=new Proxy(yd(pd(r.exposed)),{get(s,l){if(l in s)return s[l];if(l in ks)return ks[l](r)}}))}function Cm(r){return Ue(r)&&r.displayName||r.name}function _m(r){return Ue(r)&&"__vccOpts"in r}const ct=(r,s)=>Sv(r,s,_o);function Da(r,s,l){const u=arguments.length;return u===2?Ot(s)&&!We(s)?Cs(s)?nt(r,null,[s]):nt(r,s):nt(r,null,s):(u>3?l=Array.prototype.slice.call(arguments,2):u===3&&Cs(l)&&(l=[l]),nt(r,s,l))}const Tm="3.2.36",Lm="http://www.w3.org/2000/svg",Hn=typeof document!="undefined"?document:null,hc=Hn&&Hn.createElement("template"),Pm={insert:(r,s,l)=>{s.insertBefore(r,l||null)},remove:r=>{const s=r.parentNode;s&&s.removeChild(r)},createElement:(r,s,l,u)=>{const f=s?Hn.createElementNS(Lm,r):Hn.createElement(r,l?{is:l}:void 0);return r==="select"&&u&&u.multiple!=null&&f.setAttribute("multiple",u.multiple),f},createText:r=>Hn.createTextNode(r),createComment:r=>Hn.createComment(r),setText:(r,s)=>{r.nodeValue=s},setElementText:(r,s)=>{r.textContent=s},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>Hn.querySelector(r),setScopeId(r,s){r.setAttribute(s,"")},cloneNode(r){const s=r.cloneNode(!0);return"_value"in r&&(s._value=r._value),s},insertStaticContent(r,s,l,u,f,d){const v=l?l.previousSibling:s.lastChild;if(f&&(f===d||f.nextSibling))for(;s.insertBefore(f.cloneNode(!0),l),!(f===d||!(f=f.nextSibling)););else{hc.innerHTML=u?`<svg>${r}</svg>`:r;const b=hc.content;if(u){const y=b.firstChild;for(;y.firstChild;)b.appendChild(y.firstChild);b.removeChild(y)}s.insertBefore(b,l)}return[v?v.nextSibling:s.firstChild,l?l.previousSibling:s.lastChild]}};function Om(r,s,l){const u=r._vtc;u&&(s=(s?[s,...u]:[...u]).join(" ")),s==null?r.removeAttribute("class"):l?r.setAttribute("class",s):r.className=s}function Mm(r,s,l){const u=r.style,f=zt(l);if(l&&!f){for(const d in l)aa(u,d,l[d]);if(s&&!zt(s))for(const d in s)l[d]==null&&aa(u,d,"")}else{const d=u.display;f?s!==l&&(u.cssText=l):s&&r.removeAttribute("style"),"_vod"in r&&(u.display=d)}}const pc=/\s*!important$/;function aa(r,s,l){if(We(l))l.forEach(u=>aa(r,s,u));else if(l==null&&(l=""),s.startsWith("--"))r.setProperty(s,l);else{const u=Em(r,s);pc.test(l)?r.setProperty(Ti(u),l.replace(pc,""),"important"):r[u]=l}}const gc=["Webkit","Moz","ms"],ql={};function Em(r,s){const l=ql[s];if(l)return l;let u=Nr(s);if(u!=="filter"&&u in r)return ql[s]=u;u=As(u);for(let f=0;f<gc.length;f++){const d=gc[f]+u;if(d in r)return ql[s]=d}return s}const vc="http://www.w3.org/1999/xlink";function Am(r,s,l,u,f){if(u&&s.startsWith("xlink:"))l==null?r.removeAttributeNS(vc,s.slice(6,s.length)):r.setAttributeNS(vc,s,l);else{const d=Og(s);l==null||d&&!Zc(l)?r.removeAttribute(s):r.setAttribute(s,d?"":l)}}function Nm(r,s,l,u,f,d,v){if(s==="innerHTML"||s==="textContent"){u&&v(u,f,d),r[s]=l==null?"":l;return}if(s==="value"&&r.tagName!=="PROGRESS"&&!r.tagName.includes("-")){r._value=l;const y=l==null?"":l;(r.value!==y||r.tagName==="OPTION")&&(r.value=y),l==null&&r.removeAttribute(s);return}let b=!1;if(l===""||l==null){const y=typeof r[s];y==="boolean"?l=Zc(l):l==null&&y==="string"?(l="",b=!0):y==="number"&&(l=0,b=!0)}try{r[s]=l}catch{}b&&r.removeAttribute(s)}const[Yd,zm]=(()=>{let r=Date.now,s=!1;if(typeof window!="undefined"){Date.now()>document.createEvent("Event").timeStamp&&(r=performance.now.bind(performance));const l=navigator.userAgent.match(/firefox\/(\d+)/i);s=!!(l&&Number(l[1])<=53)}return[r,s]})();let ua=0;const Rm=Promise.resolve(),Dm=()=>{ua=0},Fm=()=>ua||(Rm.then(Dm),ua=Yd());function Im(r,s,l,u){r.addEventListener(s,l,u)}function Hm(r,s,l,u){r.removeEventListener(s,l,u)}function Wm(r,s,l,u,f=null){const d=r._vei||(r._vei={}),v=d[s];if(u&&v)v.value=u;else{const[b,y]=Bm(s);if(u){const x=d[s]=jm(u,f);Im(r,b,x,y)}else v&&(Hm(r,b,v,y),d[s]=void 0)}}const mc=/(?:Once|Passive|Capture)$/;function Bm(r){let s;if(mc.test(r)){s={};let l;for(;l=r.match(mc);)r=r.slice(0,r.length-l[0].length),s[l[0].toLowerCase()]=!0}return[Ti(r.slice(2)),s]}function jm(r,s){const l=u=>{const f=u.timeStamp||Yd();(zm||f>=l.attached-1)&&wr(Um(u,l.value),s,5,[u])};return l.value=r,l.attached=Fm(),l}function Um(r,s){if(We(s)){const l=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{l.call(r),r._stopped=!0},s.map(u=>f=>!f._stopped&&u&&u(f))}else return s}const yc=/^on[a-z]/,Km=(r,s,l,u,f=!1,d,v,b,y)=>{s==="class"?Om(r,u,f):s==="style"?Mm(r,l,u):Os(s)?ma(s)||Wm(r,s,l,u,v):(s[0]==="."?(s=s.slice(1),!0):s[0]==="^"?(s=s.slice(1),!1):qm(r,s,u,f))?Nm(r,s,u,d,v,b,y):(s==="true-value"?r._trueValue=u:s==="false-value"&&(r._falseValue=u),Am(r,s,u,f))};function qm(r,s,l,u){return u?!!(s==="innerHTML"||s==="textContent"||s in r&&yc.test(s)&&Ue(l)):s==="spellcheck"||s==="draggable"||s==="translate"||s==="form"||s==="list"&&r.tagName==="INPUT"||s==="type"&&r.tagName==="TEXTAREA"||yc.test(s)&&zt(l)?!1:s in r}const $m=Zt({patchProp:Km},Pm);let bc;function Gm(){return bc||(bc=um($m))}const Ym=(...r)=>{const s=Gm().createApp(...r),{mount:l}=s;return s.mount=u=>{const f=Xm(u);if(!f)return;const d=s._component;!Ue(d)&&!d.render&&!d.template&&(d.template=f.innerHTML),f.innerHTML="";const v=l(f,!1,f instanceof SVGElement);return f instanceof Element&&(f.removeAttribute("v-cloak"),f.setAttribute("data-v-app","")),v},s};function Xm(r){return zt(r)?document.querySelector(r):r}function mo(){const r=[],s=f=>{const d=r.indexOf(f);d!==-1&&r.splice(d,1)};return{on:f=>(r.push(f),{off:()=>s(f)}),off:s,trigger:f=>{r.forEach(d=>d(f))}}}function Ws(r){return Ug()?(Kg(r),!0):!1}var wc;const Fa=typeof window!="undefined",Zm=r=>typeof r!="undefined",Jm=r=>typeof r=="string",ms=()=>{};Fa&&((wc=window==null?void 0:window.navigator)==null?void 0:wc.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Xd(r,s){function l(...u){r(()=>s.apply(this,u),{fn:s,thisArg:this,args:u})}return l}const Zd=r=>r();function Qm(r,s={}){let l,u;return d=>{const v=Me(r),b=Me(s.maxWait);if(l&&clearTimeout(l),v<=0||b!==void 0&&b<=0)return u&&(clearTimeout(u),u=null),d();b&&!u&&(u=setTimeout(()=>{l&&clearTimeout(l),u=null,d()},b)),l=setTimeout(()=>{u&&clearTimeout(u),u=null,d()},v)}}function Vm(r=Zd){const s=Nt(!0);function l(){s.value=!1}function u(){s.value=!0}return{isActive:s,pause:l,resume:u,eventFilter:(...d)=>{s.value&&r(...d)}}}function ey(r,s=!1,l="Timeout"){return new Promise((u,f)=>{setTimeout(s?()=>f(l):u,r)})}function ty(r,...s){return s.some(l=>l in r)}function ry(r,s=200,l={}){return Xd(Qm(s,l),r)}function ny(r,s=200,l={}){if(s<=0)return r;const u=Nt(r.value),f=ry(()=>{u.value=r.value},s,l);return Ft(r,()=>f()),u}function iy(r,s=!0){za()?Md(r):s?r():Rs(r)}function oy(r,s=!0){za()?Ma(r):s?r():Rs(r)}function sy(r){let s=!1;function l(L,{flush:O="sync",deep:A=!1,timeout:I,throwOnTimeout:ee}={}){let J=null;const D=[new Promise(F=>{J=Ft(r,K=>{L(K)===!s&&(J==null||J(),F())},{flush:O,deep:A,immediate:!0})})];return I&&D.push(ey(I,ee).finally(()=>{J==null||J()})),Promise.race(D)}function u(L,O){return l(A=>A===Me(L),O)}function f(L){return l(O=>Boolean(O),L)}function d(L){return u(null,L)}function v(L){return u(void 0,L)}function b(L){return l(Number.isNaN,L)}function y(L,O){return l(A=>{const I=Array.from(A);return I.includes(L)||I.includes(Me(L))},O)}function x(L){return C(1,L)}function C(L=1,O){let A=-1;return l(()=>(A+=1,A>=L),O)}return Array.isArray(Me(r))?{toMatch:l,toContains:y,changed:x,changedTimes:C,get not(){return s=!s,this}}:{toMatch:l,toBe:u,toBeTruthy:f,toBeNull:d,toBeNaN:b,toBeUndefined:v,changed:x,changedTimes:C,get not(){return s=!s,this}}}function ly(r,s,l={}){const{immediate:u=!0}=l,f=Nt(!1);let d=null;function v(){d&&(clearTimeout(d),d=null)}function b(){f.value=!1,v()}function y(...x){v(),f.value=!0,d=setTimeout(()=>{f.value=!1,d=null,r(...x)},Me(s))}return u&&(f.value=!0,Fa&&y()),Ws(b),{isPending:f,start:y,stop:b}}function ay(r=!1,s={}){const{truthyValue:l=!0,falsyValue:u=!1}=s,f=bt(r),d=Nt(r);function v(b){return arguments.length?(d.value=b,d.value):(d.value=d.value===Me(l)?Me(u):Me(l),d.value)}return f?v:[d,v]}var xc=Object.getOwnPropertySymbols,uy=Object.prototype.hasOwnProperty,fy=Object.prototype.propertyIsEnumerable,cy=(r,s)=>{var l={};for(var u in r)uy.call(r,u)&&s.indexOf(u)<0&&(l[u]=r[u]);if(r!=null&&xc)for(var u of xc(r))s.indexOf(u)<0&&fy.call(r,u)&&(l[u]=r[u]);return l};function dy(r,s,l={}){const u=l,{eventFilter:f=Zd}=u,d=cy(u,["eventFilter"]);return Ft(r,Xd(f,s),d)}var hy=Object.defineProperty,py=Object.defineProperties,gy=Object.getOwnPropertyDescriptors,Ts=Object.getOwnPropertySymbols,Jd=Object.prototype.hasOwnProperty,Qd=Object.prototype.propertyIsEnumerable,kc=(r,s,l)=>s in r?hy(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,vy=(r,s)=>{for(var l in s||(s={}))Jd.call(s,l)&&kc(r,l,s[l]);if(Ts)for(var l of Ts(s))Qd.call(s,l)&&kc(r,l,s[l]);return r},my=(r,s)=>py(r,gy(s)),yy=(r,s)=>{var l={};for(var u in r)Jd.call(r,u)&&s.indexOf(u)<0&&(l[u]=r[u]);if(r!=null&&Ts)for(var u of Ts(r))s.indexOf(u)<0&&Qd.call(r,u)&&(l[u]=r[u]);return l};function by(r,s,l={}){const u=l,{eventFilter:f}=u,d=yy(u,["eventFilter"]),{eventFilter:v,pause:b,resume:y,isActive:x}=Vm(f);return{stop:dy(r,s,my(vy({},d),{eventFilter:v})),pause:b,resume:y,isActive:x}}function Aw(r,s,l){let u;bt(l)?u={evaluating:l}:u=l||{};const{lazy:f=!1,evaluating:d=void 0,onError:v=ms}=u,b=Nt(!f),y=Nt(s);let x=0;return Dv(async C=>{if(!b.value)return;x++;const L=x;let O=!1;d&&Promise.resolve().then(()=>{d.value=!0});try{const A=await r(I=>{C(()=>{d&&(d.value=!1),O||I()})});L===x&&(y.value=A)}catch(A){v(A)}finally{d&&L===x&&(d.value=!1),O=!0}}),f?ct(()=>(b.value=!0,y.value)):y}function Ia(r){var s;const l=Me(r);return(s=l==null?void 0:l.$el)!=null?s:l}const xn=Fa?window:void 0;function wy(...r){let s,l,u,f;if(Jm(r[0])?([l,u,f]=r,s=xn):[s,l,u,f]=r,!s)return ms;let d=ms;const v=Ft(()=>Ia(s),y=>{d(),y&&(y.addEventListener(l,u,f),d=()=>{y.removeEventListener(l,u,f),d=ms})},{immediate:!0,flush:"post"}),b=()=>{v(),d()};return Ws(b),b}function xy(r,s={}){const{window:l=xn}=s,u=Boolean(l&&"matchMedia"in l);let f;const d=Nt(!1),v=()=>{!u||(f||(f=l.matchMedia(r)),d.value=f.matches)};return iy(()=>{v(),f&&("addEventListener"in f?f.addEventListener("change",v):f.addListener(v),Ws(()=>{"removeEventListener"in f?f.removeEventListener("change",v):f.removeListener(v)}))}),d}const fa=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},ca="__vueuse_ssr_handlers__";fa[ca]=fa[ca]||{};const ky=fa[ca];function Vd(r,s){return ky[r]||s}function Sy(r){return r==null?"any":r instanceof Set?"set":r instanceof Map?"map":r instanceof Date?"date":typeof r=="boolean"?"boolean":typeof r=="string"?"string":typeof r=="object"||Array.isArray(r)?"object":Number.isNaN(r)?"any":"number"}const Cy={boolean:{read:r=>r==="true",write:r=>String(r)},object:{read:r=>JSON.parse(r),write:r=>JSON.stringify(r)},number:{read:r=>Number.parseFloat(r),write:r=>String(r)},any:{read:r=>r,write:r=>String(r)},string:{read:r=>r,write:r=>String(r)},map:{read:r=>new Map(JSON.parse(r)),write:r=>JSON.stringify(Array.from(r.entries()))},set:{read:r=>new Set(JSON.parse(r)),write:r=>JSON.stringify(Array.from(r))},date:{read:r=>new Date(r),write:r=>r.toISOString()}};function _y(r,s,l,u={}){var f;const{flush:d="pre",deep:v=!0,listenToStorageChanges:b=!0,writeDefaults:y=!0,shallow:x,window:C=xn,eventFilter:L,onError:O=de=>{console.error(de)}}=u,A=(x?co:Nt)(s);if(!l)try{l=Vd("getDefaultStorage",()=>{var de;return(de=xn)==null?void 0:de.localStorage})()}catch(de){O(de)}if(!l)return A;const I=Me(s),ee=Sy(I),J=(f=u.serializer)!=null?f:Cy[ee],{pause:N,resume:D}=by(A,()=>F(A.value),{flush:d,deep:v,eventFilter:L});return C&&b&&wy(C,"storage",te),te(),A;function F(de){try{de==null?l.removeItem(r):l.setItem(r,J.write(de))}catch(ye){O(ye)}}function K(de){if(!(de&&de.key!==r)){N();try{const ye=de?de.newValue:l.getItem(r);return ye==null?(y&&I!==null&&l.setItem(r,J.write(I)),I):typeof ye!="string"?ye:J.read(ye)}catch(ye){O(ye)}finally{D()}}}function te(de){de&&de.key!==r||(A.value=K(de))}}function eh(r){return xy("(prefers-color-scheme: dark)",r)}var Ty=Object.defineProperty,Sc=Object.getOwnPropertySymbols,Ly=Object.prototype.hasOwnProperty,Py=Object.prototype.propertyIsEnumerable,Cc=(r,s,l)=>s in r?Ty(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,Oy=(r,s)=>{for(var l in s||(s={}))Ly.call(s,l)&&Cc(r,l,s[l]);if(Sc)for(var l of Sc(s))Py.call(s,l)&&Cc(r,l,s[l]);return r};function My(r={}){const{selector:s="html",attribute:l="class",window:u=xn,storage:f,storageKey:d="vueuse-color-scheme",listenToStorageChanges:v=!0,storageRef:b}=r,y=Oy({auto:"",light:"light",dark:"dark"},r.modes||{}),x=eh({window:u}),C=ct(()=>x.value?"dark":"light"),L=b||(d==null?Nt("auto"):_y(d,"auto",f,{window:u,listenToStorageChanges:v})),O=ct({get(){return L.value==="auto"?C.value:L.value},set(J){L.value=J}}),A=Vd("updateHTMLAttrs",(J,N,D)=>{const F=u==null?void 0:u.document.querySelector(J);if(!!F)if(N==="class"){const K=D.split(/\s/g);Object.values(y).flatMap(te=>(te||"").split(/\s/g)).filter(Boolean).forEach(te=>{K.includes(te)?F.classList.add(te):F.classList.remove(te)})}else F.setAttribute(N,D)});function I(J){var N;A(s,l,(N=y[J])!=null?N:J)}function ee(J){r.onChanged?r.onChanged(J,I):I(J)}return Ft(O,ee,{flush:"post",immediate:!0}),oy(()=>ee(O.value)),O}var Ey=Object.defineProperty,Ay=Object.defineProperties,Ny=Object.getOwnPropertyDescriptors,_c=Object.getOwnPropertySymbols,zy=Object.prototype.hasOwnProperty,Ry=Object.prototype.propertyIsEnumerable,Tc=(r,s,l)=>s in r?Ey(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,Dy=(r,s)=>{for(var l in s||(s={}))zy.call(s,l)&&Tc(r,l,s[l]);if(_c)for(var l of _c(s))Ry.call(s,l)&&Tc(r,l,s[l]);return r},Fy=(r,s)=>Ay(r,Ny(s));function Iy(r={}){const{valueDark:s="dark",valueLight:l="",window:u=xn}=r,f=My(Fy(Dy({},r),{onChanged:(b,y)=>{var x;r.onChanged?(x=r.onChanged)==null||x.call(r,b==="dark"):y(b)},modes:{dark:s,light:l}})),d=eh({window:u});return ct({get(){return f.value==="dark"},set(b){b===d.value?f.value="auto":f.value=b?"dark":"light"}})}var Lc=Object.getOwnPropertySymbols,Hy=Object.prototype.hasOwnProperty,Wy=Object.prototype.propertyIsEnumerable,By=(r,s)=>{var l={};for(var u in r)Hy.call(r,u)&&s.indexOf(u)<0&&(l[u]=r[u]);if(r!=null&&Lc)for(var u of Lc(r))s.indexOf(u)<0&&Wy.call(r,u)&&(l[u]=r[u]);return l};function jy(r,s,l={}){const u=l,{window:f=xn}=u,d=By(u,["window"]);let v;const b=f&&"ResizeObserver"in f,y=()=>{v&&(v.disconnect(),v=void 0)},x=Ft(()=>Ia(r),L=>{y(),b&&f&&L&&(v=new ResizeObserver(s),v.observe(L,d))},{immediate:!0,flush:"post"}),C=()=>{y(),x()};return Ws(C),{isSupported:b,stop:C}}var Uy=Object.defineProperty,Ky=Object.defineProperties,qy=Object.getOwnPropertyDescriptors,Pc=Object.getOwnPropertySymbols,$y=Object.prototype.hasOwnProperty,Gy=Object.prototype.propertyIsEnumerable,Oc=(r,s,l)=>s in r?Uy(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,Vt=(r,s)=>{for(var l in s||(s={}))$y.call(s,l)&&Oc(r,l,s[l]);if(Pc)for(var l of Pc(s))Gy.call(s,l)&&Oc(r,l,s[l]);return r},lo=(r,s)=>Ky(r,qy(s));const Yy={json:"application/json",text:"text/plain",formData:"multipart/form-data"};function Mc(r){return ty(r,"immediate","refetch","initialData","timeout","beforeFetch","afterFetch","onFetchError","fetch")}function $l(r){return r instanceof Headers?Object.fromEntries([...r.entries()]):r}function Bs(r,...s){var l;const u=typeof AbortController=="function";let f={},d={immediate:!0,refetch:!1,timeout:0};const v={method:"GET",type:"text",payload:void 0};s.length>0&&(Mc(s[0])?d=Vt(Vt({},d),s[0]):f=s[0]),s.length>1&&Mc(s[1])&&(d=Vt(Vt({},d),s[1]));const{fetch:b=(l=xn)==null?void 0:l.fetch,initialData:y,timeout:x}=d,C=mo(),L=mo(),O=mo(),A=Nt(!1),I=Nt(!1),ee=Nt(!1),J=Nt(null),N=co(null),D=co(null),F=co(y),K=ct(()=>u&&I.value);let te,de;const ye=()=>{u&&te&&te.abort()},Re=le=>{I.value=le,A.value=!le};x&&(de=ly(ye,x,{immediate:!1}));const Ne=async(le=!1)=>{var w;Re(!0),D.value=null,J.value=null,ee.value=!1,te=void 0,u&&(te=new AbortController,te.signal.onabort=()=>ee.value=!0,f=lo(Vt({},f),{signal:te.signal}));const Q={method:v.method,headers:{}};if(v.payload){const Ke=$l(Q.headers);v.payloadType&&(Ke["Content-Type"]=(w=Yy[v.payloadType])!=null?w:v.payloadType),Q.body=v.payloadType==="json"?JSON.stringify(Me(v.payload)):Me(v.payload)}let G=!1;const fe={url:Me(r),options:Vt(Vt({},Q),f),cancel:()=>{G=!0}};if(d.beforeFetch&&Object.assign(fe,await d.beforeFetch(fe)),G||!b)return Re(!1),Promise.resolve(null);let Le=null;return de&&de.start(),new Promise((Ke,lt)=>{var tt;b(fe.url,lo(Vt(Vt({},Q),fe.options),{headers:Vt(Vt({},$l(Q.headers)),$l((tt=fe.options)==null?void 0:tt.headers))})).then(async He=>{if(N.value=He,J.value=He.status,Le=await He[v.type](),d.afterFetch&&J.value>=200&&J.value<300&&({data:Le}=await d.afterFetch({data:Le,response:He})),F.value=Le,!He.ok)throw new Error(He.statusText);return C.trigger(He),Ke(He)}).catch(async He=>{let at=He.message||He.name;return d.onFetchError&&({data:Le,error:at}=await d.onFetchError({data:Le,error:He,response:N.value})),F.value=Le,D.value=at,L.trigger(He),le?lt(He):Ke(null)}).finally(()=>{Re(!1),de&&de.stop(),O.trigger(null)})})};Ft(()=>[Me(r),Me(d.refetch)],()=>Me(d.refetch)&&Ne(),{deep:!0});const me={isFinished:A,statusCode:J,response:N,error:D,data:F,isFetching:I,canAbort:K,aborted:ee,abort:ye,execute:Ne,onFetchResponse:C.on,onFetchError:L.on,onFetchFinally:O.on,get:ce("GET"),put:ce("PUT"),post:ce("POST"),delete:ce("DELETE"),patch:ce("PATCH"),head:ce("HEAD"),options:ce("OPTIONS"),json:U("json"),text:U("text"),blob:U("blob"),arrayBuffer:U("arrayBuffer"),formData:U("formData")};function ce(le){return(w,Q)=>{if(!I.value)return v.method=le,v.payload=w,v.payloadType=Q,bt(v.payload)&&Ft(()=>[Me(v.payload),Me(d.refetch)],()=>Me(d.refetch)&&Ne(),{deep:!0}),!Q&&Me(w)&&Object.getPrototypeOf(Me(w))===Object.prototype&&(v.payloadType="json"),lo(Vt({},me),{then(G,fe){return Ee().then(G,fe)}})}}function Ee(){return new Promise((le,w)=>{sy(A).toBe(!0).then(()=>le(me)).catch(Q=>w(Q))})}function U(le){return()=>{if(!I.value)return v.type=le,lo(Vt({},me),{then(w,Q){return Ee().then(w,Q)}})}}return d.immediate&&setTimeout(Ne,0),lo(Vt({},me),{then(le,w){return Ee().then(le,w)}})}var Ec;(function(r){r.UP="UP",r.RIGHT="RIGHT",r.DOWN="DOWN",r.LEFT="LEFT",r.NONE="NONE"})(Ec||(Ec={}));function Xy(r,s,l,u={}){var f;const{passive:d=!1,eventName:v,deep:b=!1,defaultValue:y}=u,x=za(),C=l||(x==null?void 0:x.emit)||((f=x==null?void 0:x.$emit)==null?void 0:f.bind(x));let L=v;s||(s="modelValue"),L=v||L||`update:${s.toString()}`;const O=()=>Zm(r[s])?r[s]:y;if(d){const A=Nt(O());return Ft(()=>r[s],I=>A.value=I),Ft(A,I=>{(I!==r[s]||b)&&C(L,I)},{deep:b}),A}else return ct({get(){return O()},set(A){C(L,A)}})}function Zy(r){const s=r.length;let l=-1,u,f="";const d=r.charCodeAt(0);for(;++l<s;){if(u=r.charCodeAt(l),u===0){f+="\uFFFD";continue}if(u===44){f+="\\,";continue}if(u>=1&&u<=31||u===127||l===0&&u>=48&&u<=57||l===1&&u>=48&&u<=57&&d===45){f+=`\\${u.toString(16)} `;continue}if(l===0&&s===1&&u===45){f+=`\\${r.charAt(l)}`;continue}if(u>=128||u===45||u===95||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122){f+=r.charAt(l);continue}f+=`\\${r.charAt(l)}`}return f}const Ac=Zy,Jy=/^\[(.+?)~?="(.*)"\]$/,Qy=/(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:%-?]/;function Vy(r){return r.match(Jy)}function Nw(r=""){return Qy.test(r)}function e0(r,s){const l=[],u=[],f=new Set;Array.from(s).forEach(v=>{const b=Vy(v);b?b[2]?u.push(b):f.add(b[1]):f.add(v)});let d=0;return r.split(/[\s"';<>]/g).forEach(v=>{const b=d+v.length;f.has(v)&&l.push([d,b,v]),d=b+1}),u.forEach(([,v,b])=>{const y=new RegExp(`(${Ac(v)}=)(['"])[^\\2]*?${Ac(b)}[^\\2]*?\\2`,"g");Array.from(r.matchAll(y)).forEach(x=>{const C=x[1],O=x[0].slice(C.length).indexOf(b);if(O<0)return;const A=x.index+C.length+O,I=A+b.length;l.push([A,I,`[${v}="${b}"]`])})}),l}var t0=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Zr={exports:{}};(function(r,s){(function(l,u){r.exports=u()})(t0,function(){var l=navigator.userAgent,u=navigator.platform,f=/gecko\/\d/i.test(l),d=/MSIE \d/.test(l),v=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(l),b=/Edge\/(\d+)/.exec(l),y=d||v||b,x=y&&(d?document.documentMode||6:+(b||v)[1]),C=!b&&/WebKit\//.test(l),L=C&&/Qt\/\d+\.\d+/.test(l),O=!b&&/Chrome\/(\d+)/.exec(l),A=O&&+O[1],I=/Opera\//.test(l),ee=/Apple Computer/.test(navigator.vendor),J=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(l),N=/PhantomJS/.test(l),D=ee&&(/Mobile\/\w+/.test(l)||navigator.maxTouchPoints>2),F=/Android/.test(l),K=D||F||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(l),te=D||/Mac/.test(u),de=/\bCrOS\b/.test(l),ye=/win/i.test(u),Re=I&&l.match(/Version\/(\d*\.\d*)/);Re&&(Re=Number(Re[1])),Re&&Re>=15&&(I=!1,C=!0);var Ne=te&&(L||I&&(Re==null||Re<12.11)),me=f||y&&x>=9;function ce(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Ee=function(e,t){var i=e.className,n=ce(t).exec(i);if(n){var o=i.slice(n.index+n[0].length);e.className=i.slice(0,n.index)+(o?n[1]+o:"")}};function U(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function le(e,t){return U(e).appendChild(t)}function w(e,t,i,n){var o=document.createElement(e);if(i&&(o.className=i),n&&(o.style.cssText=n),typeof t=="string")o.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)o.appendChild(t[a]);return o}function Q(e,t,i,n){var o=w(e,t,i,n);return o.setAttribute("role","presentation"),o}var G;document.createRange?G=function(e,t,i,n){var o=document.createRange();return o.setEnd(n||e,i),o.setStart(e,t),o}:G=function(e,t,i){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch{return n}return n.collapse(!0),n.moveEnd("character",i),n.moveStart("character",t),n};function fe(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 Le(){var e;try{e=document.activeElement}catch{e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function Ke(e,t){var i=e.className;ce(t).test(i)||(e.className+=(i?" ":"")+t)}function lt(e,t){for(var i=e.split(" "),n=0;n<i.length;n++)i[n]&&!ce(i[n]).test(t)&&(t+=" "+i[n]);return t}var tt=function(e){e.select()};D?tt=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:y&&(tt=function(e){try{e.select()}catch{}});function He(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function at(e,t,i){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(i!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function q(e,t,i,n,o){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=n||0,c=o||0;;){var h=e.indexOf(" ",a);if(h<0||h>=t)return c+(t-a);c+=h-a,c+=i-c%i,a=h+1}}var V=function(){this.id=null,this.f=null,this.time=0,this.handler=He(this.onTimeout,this)};V.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},V.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=i)};function W(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}var oe=50,_e={toString:function(){return"CodeMirror.Pass"}},we={scroll:!1},pe={origin:"*mouse"},ke={origin:"+move"};function P(e,t,i){for(var n=0,o=0;;){var a=e.indexOf(" ",n);a==-1&&(a=e.length);var c=a-n;if(a==e.length||o+c>=t)return n+Math.min(c,t-o);if(o+=a-n,o+=i-o%i,n=a+1,o>=t)return n}}var E=[""];function B(e){for(;E.length<=e;)E.push(H(E)+" ");return E[e]}function H(e){return e[e.length-1]}function Y(e,t){for(var i=[],n=0;n<e.length;n++)i[n]=t(e[n],n);return i}function ne(e,t,i){for(var n=0,o=i(t);n<e.length&&i(e[n])<=o;)n++;e.splice(n,0,t)}function ae(){}function ue(e,t){var i;return Object.create?i=Object.create(e):(ae.prototype=e,i=new ae),t&&at(t,i),i}var re=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function T(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||re.test(e))}function j(e,t){return t?t.source.indexOf("\\w")>-1&&T(e)?!0:t.test(e):T(e)}function z(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var he=/[\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 Te(e){return e.charCodeAt(0)>=768&&he.test(e)}function je(e,t,i){for(;(i<0?t>0:t<e.length)&&Te(e.charAt(t));)t+=i;return t}function Ge(e,t,i){for(var n=t>i?-1:1;;){if(t==i)return t;var o=(t+i)/2,a=n<0?Math.ceil(o):Math.floor(o);if(a==t)return e(a)?t:i;e(a)?i=a:t=a+n}}function $e(e,t,i,n){if(!e)return n(t,i,"ltr",0);for(var o=!1,a=0;a<e.length;++a){var c=e[a];(c.from<i&&c.to>t||t==i&&c.to==t)&&(n(Math.max(c.from,t),Math.min(c.to,i),c.level==1?"rtl":"ltr",a),o=!0)}o||n(t,i,"ltr")}var Ie=null;function dt(e,t,i){var n;Ie=null;for(var o=0;o<e.length;++o){var a=e[o];if(a.from<t&&a.to>t)return o;a.to==t&&(a.from!=a.to&&i=="before"?n=o:Ie=o),a.from==t&&(a.from!=a.to&&i!="before"?n=o:Ie=o)}return n!=null?n:Ie}var nr=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(m){return m<=247?e.charAt(m):1424<=m&&m<=1524?"R":1536<=m&&m<=1785?t.charAt(m-1536):1774<=m&&m<=2220?"r":8192<=m&&m<=8203?"w":m==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,c=/[Lb1n]/,h=/[1n]/;function p(m,S,_){this.level=m,this.from=S,this.to=_}return function(m,S){var _=S=="ltr"?"L":"R";if(m.length==0||S=="ltr"&&!n.test(m))return!1;for(var R=m.length,M=[],$=0;$<R;++$)M.push(i(m.charCodeAt($)));for(var Z=0,se=_;Z<R;++Z){var ge=M[Z];ge=="m"?M[Z]=se:se=ge}for(var be=0,ve=_;be<R;++be){var xe=M[be];xe=="1"&&ve=="r"?M[be]="n":a.test(xe)&&(ve=xe,xe=="r"&&(M[be]="R"))}for(var Ae=1,Pe=M[0];Ae<R-1;++Ae){var Be=M[Ae];Be=="+"&&Pe=="1"&&M[Ae+1]=="1"?M[Ae]="1":Be==","&&Pe==M[Ae+1]&&(Pe=="1"||Pe=="n")&&(M[Ae]=Pe),Pe=Be}for(var et=0;et<R;++et){var Lt=M[et];if(Lt==",")M[et]="N";else if(Lt=="%"){var ft=void 0;for(ft=et+1;ft<R&&M[ft]=="%";++ft);for(var Qt=et&&M[et-1]=="!"||ft<R&&M[ft]=="1"?"1":"N",qt=et;qt<ft;++qt)M[qt]=Qt;et=ft-1}}for(var mt=0,$t=_;mt<R;++mt){var Mt=M[mt];$t=="L"&&Mt=="1"?M[mt]="L":a.test(Mt)&&($t=Mt)}for(var wt=0;wt<R;++wt)if(o.test(M[wt])){var yt=void 0;for(yt=wt+1;yt<R&&o.test(M[yt]);++yt);for(var pt=(wt?M[wt-1]:_)=="L",Gt=(yt<R?M[yt]:_)=="L",fi=pt==Gt?pt?"L":"R":_,un=wt;un<yt;++un)M[un]=fi;wt=yt-1}for(var Dt=[],Or,Pt=0;Pt<R;)if(c.test(M[Pt])){var Il=Pt;for(++Pt;Pt<R&&c.test(M[Pt]);++Pt);Dt.push(new p(0,Il,Pt))}else{var qr=Pt,zn=Dt.length,Rn=S=="rtl"?1:0;for(++Pt;Pt<R&&M[Pt]!="L";++Pt);for(var Bt=qr;Bt<Pt;)if(h.test(M[Bt])){qr<Bt&&(Dt.splice(zn,0,new p(1,qr,Bt)),zn+=Rn);var ci=Bt;for(++Bt;Bt<Pt&&h.test(M[Bt]);++Bt);Dt.splice(zn,0,new p(2,ci,Bt)),zn+=Rn,qr=Bt}else++Bt;qr<Pt&&Dt.splice(zn,0,new p(1,qr,Pt))}return S=="ltr"&&(Dt[0].level==1&&(Or=m.match(/^\s+/))&&(Dt[0].from=Or[0].length,Dt.unshift(new p(0,0,Or[0].length))),H(Dt).level==1&&(Or=m.match(/\s+$/))&&(H(Dt).to-=Or[0].length,Dt.push(new p(0,R-Or[0].length,R)))),S=="rtl"?Dt.reverse():Dt}}();function xt(e,t){var i=e.order;return i==null&&(i=e.order=nr(e.text,t)),i}var xr=[],Oe=function(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else if(e.attachEvent)e.attachEvent("on"+t,i);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||xr).concat(i)}};function kt(e,t){return e._handlers&&e._handlers[t]||xr}function ze(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i,!1);else if(e.detachEvent)e.detachEvent("on"+t,i);else{var n=e._handlers,o=n&&n[t];if(o){var a=W(o,i);a>-1&&(n[t]=o.slice(0,a).concat(o.slice(a+1)))}}}function it(e,t){var i=kt(e,t);if(!!i.length)for(var n=Array.prototype.slice.call(arguments,2),o=0;o<i.length;++o)i[o].apply(null,n)}function ht(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),it(e,i||t.type,e,t),Ei(t)||t.codemirrorIgnore}function Jr(e){var t=e._handlers&&e._handlers.cursorActivity;if(!!t)for(var i=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)W(i,t[n])==-1&&i.push(t[n])}function It(e,t){return kt(e,t).length>0}function Qr(e){e.prototype.on=function(t,i){Oe(this,t,i)},e.prototype.off=function(t,i){ze(this,t,i)}}function St(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ur(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ei(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function kr(e){St(e),ur(e)}function Ai(e){return e.target||e.srcElement}function jn(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),te&&e.ctrlKey&&t==1&&(t=3),t}var ir=function(){if(y&&x<9)return!1;var e=w("div");return"draggable"in e||"dragDrop"in e}(),Un;function Ks(e){if(Un==null){var t=w("span","\u200B");le(e,w("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Un=t.offsetWidth<=1&&t.offsetHeight>2&&!(y&&x<8))}var i=Un?w("span","\u200B"):w("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var fr;function qs(e){if(fr!=null)return fr;var t=le(e,document.createTextNode("A\u062EA")),i=G(t,0,1).getBoundingClientRect(),n=G(t,1,2).getBoundingClientRect();return U(e),!i||i.left==i.right?!1:fr=n.right-i.right<3}var Kn=`
2
+
3
+ b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],n=e.length;t<=n;){var o=e.indexOf(`
4
+ `,t);o==-1&&(o=e.length);var a=e.slice(t,e.charAt(o-1)=="\r"?o-1:o),c=a.indexOf("\r");c!=-1?(i.push(a.slice(0,c)),t+=c+1):(i.push(a),t=o+1)}return i}:function(e){return e.split(/\r\n?|\n/)},Po=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},$s=function(){var e=w("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Sr=null;function Cr(e){if(Sr!=null)return Sr;var t=le(e,w("span","x")),i=t.getBoundingClientRect(),n=G(t,0,1).getBoundingClientRect();return Sr=Math.abs(i.left-n.left)>1}var _r={},Rr={};function Dr(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),_r[e]=t}function Gs(e,t){Rr[e]=t}function kn(e){if(typeof e=="string"&&Rr.hasOwnProperty(e))e=Rr[e];else if(e&&typeof e.name=="string"&&Rr.hasOwnProperty(e.name)){var t=Rr[e.name];typeof t=="string"&&(t={name:t}),e=ue(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return kn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return kn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Vr(e,t){t=kn(t);var i=_r[t.name];if(!i)return Vr(e,"text/plain");var n=i(e,t);if(Ht.hasOwnProperty(t.name)){var o=Ht[t.name];for(var a in o)!o.hasOwnProperty(a)||(n.hasOwnProperty(a)&&(n["_"+a]=n[a]),n[a]=o[a])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var c in t.modeProps)n[c]=t.modeProps[c];return n}var Ht={};function Sn(e,t){var i=Ht.hasOwnProperty(e)?Ht[e]:Ht[e]={};at(t,i)}function Fr(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var n in t){var o=t[n];o instanceof Array&&(o=o.concat([])),i[n]=o}return i}function qn(e,t){for(var i;e.innerMode&&(i=e.innerMode(t),!(!i||i.mode==e));)t=i.state,e=i.mode;return i||{mode:e,state:t}}function Oo(e,t,i){return e.startState?e.startState(t,i):!0}var ot=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};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),i;if(typeof e=="string"?i=t==e:i=t&&(e.test?e.test(t):e(t)),i)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=q(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?q(this.string,this.lineStart,this.tabSize):0)},ot.prototype.indentation=function(){return q(this.string,null,this.tabSize)-(this.lineStart?q(this.string,this.lineStart,this.tabSize):0)},ot.prototype.match=function(e,t,i){if(typeof e=="string"){var n=function(c){return i?c.toLowerCase():c},o=this.string.substr(this.pos,e.length);if(n(o)==n(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 Se(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var i=e;!i.lines;)for(var n=0;;++n){var o=i.children[n],a=o.chunkSize();if(t<a){i=o;break}t-=a}return i.lines[t]}function Ir(e,t,i){var n=[],o=t.line;return e.iter(t.line,i.line+1,function(a){var c=a.text;o==i.line&&(c=c.slice(0,i.ch)),o==t.line&&(c=c.slice(t.ch)),n.push(c),++o}),n}function Cn(e,t,i){var n=[];return e.iter(t,i,function(o){n.push(o.text)}),n}function cr(e,t){var i=t-e.height;if(i)for(var n=e;n;n=n.parent)n.height+=i}function Xe(e){if(e.parent==null)return null;for(var t=e.parent,i=W(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var o=0;n.children[o]!=t;++o)i+=n.children[o].chunkSize();return i+t.first}function Hr(e,t){var i=e.first;e:do{for(var n=0;n<e.children.length;++n){var o=e.children[n],a=o.height;if(t<a){e=o;continue e}t-=a,i+=o.chunkSize()}return i}while(!e.lines);for(var c=0;c<e.lines.length;++c){var h=e.lines[c],p=h.height;if(t<p)break;t-=p}return i+c}function _n(e,t){return t>=e.first&&t<e.first+e.size}function $n(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function g(e,t,i){if(i===void 0&&(i=null),!(this instanceof g))return new g(e,t,i);this.line=e,this.ch=t,this.sticky=i}function k(e,t){return e.line-t.line||e.ch-t.ch}function X(e,t){return e.sticky==t.sticky&&k(e,t)==0}function ie(e){return g(e.line,e.ch)}function De(e,t){return k(e,t)<0?t:e}function qe(e,t){return k(e,t)<0?e:t}function Je(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Ce(e,t){if(t.line<e.first)return g(e.first,0);var i=e.first+e.size-1;return t.line>i?g(i,Se(e,i).text.length):dr(t,Se(e,t.line).text.length)}function dr(e,t){var i=e.ch;return i==null||i>t?g(e.line,t):i<0?g(e.line,0):e}function Mo(e,t){for(var i=[],n=0;n<t.length;n++)i[n]=Ce(e,t[n]);return i}var Eo=function(e,t){this.state=e,this.lookAhead=t},Tr=function(e,t,i,n){this.state=t,this.doc=e,this.line=i,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};Tr.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Tr.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}},Tr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Tr.fromSaved=function(e,t,i){return t instanceof Eo?new Tr(e,Fr(e.mode,t.state),i,t.lookAhead):new Tr(e,Fr(e.mode,t),i)},Tr.prototype.save=function(e){var t=e!==!1?Fr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Eo(t,this.maxLookAhead):t};function Ua(e,t,i,n){var o=[e.state.modeGen],a={};Xa(e,t.text,e.doc.mode,i,function(m,S){return o.push(m,S)},a,n);for(var c=i.state,h=function(m){i.baseTokens=o;var S=e.state.overlays[m],_=1,R=0;i.state=!0,Xa(e,t.text,S.mode,i,function(M,$){for(var Z=_;R<M;){var se=o[_];se>M&&o.splice(_,1,M,o[_+1],se),_+=2,R=Math.min(M,se)}if(!!$)if(S.opaque)o.splice(Z,_-Z,M,"overlay "+$),_=Z+2;else for(;Z<_;Z+=2){var ge=o[Z+1];o[Z+1]=(ge?ge+" ":"")+"overlay "+$}},a),i.state=c,i.baseTokens=null,i.baseTokenPos=1},p=0;p<e.state.overlays.length;++p)h(p);return{styles:o,classes:a.bgClass||a.textClass?a:null}}function Ka(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Ni(e,Xe(t)),o=t.text.length>e.options.maxHighlightLength&&Fr(e.doc.mode,n.state),a=Ua(e,t,n);o&&(n.state=o),t.stateAfter=n.save(!o),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ni(e,t,i){var n=e.doc,o=e.display;if(!n.mode.startState)return new Tr(n,!0,t);var a=kh(e,t,i),c=a>n.first&&Se(n,a-1).stateAfter,h=c?Tr.fromSaved(n,c,a):new Tr(n,Oo(n.mode),a);return n.iter(a,t,function(p){Ys(e,p.text,h);var m=h.line;p.stateAfter=m==t-1||m%5==0||m>=o.viewFrom&&m<o.viewTo?h.save():null,h.nextLine()}),i&&(n.modeFrontier=h.line),h}function Ys(e,t,i,n){var o=e.doc.mode,a=new ot(t,e.options.tabSize,i);for(a.start=a.pos=n||0,t==""&&qa(o,i.state);!a.eol();)Xs(o,a,i.state),a.start=a.pos}function qa(e,t){if(e.blankLine)return e.blankLine(t);if(!!e.innerMode){var i=qn(e,t);if(i.mode.blankLine)return i.mode.blankLine(i.state)}}function Xs(e,t,i,n){for(var o=0;o<10;o++){n&&(n[0]=qn(e,i).mode);var a=e.token(t,i);if(t.pos>t.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var $a=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function Ga(e,t,i,n){var o=e.doc,a=o.mode,c;t=Ce(o,t);var h=Se(o,t.line),p=Ni(e,t.line,i),m=new ot(h.text,e.options.tabSize,p),S;for(n&&(S=[]);(n||m.pos<t.ch)&&!m.eol();)m.start=m.pos,c=Xs(a,m,p.state),n&&S.push(new $a(m,c,Fr(o.mode,p.state)));return n?S:new $a(m,c,p.state)}function Ya(e,t){if(e)for(;;){var i=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i)break;e=e.slice(0,i.index)+e.slice(i.index+i[0].length);var n=i[1]?"bgClass":"textClass";t[n]==null?t[n]=i[2]:new RegExp("(?:^|\\s)"+i[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+i[2])}return e}function Xa(e,t,i,n,o,a,c){var h=i.flattenSpans;h==null&&(h=e.options.flattenSpans);var p=0,m=null,S=new ot(t,e.options.tabSize,n),_,R=e.options.addModeClass&&[null];for(t==""&&Ya(qa(i,n.state),a);!S.eol();){if(S.pos>e.options.maxHighlightLength?(h=!1,c&&Ys(e,t,n,S.pos),S.pos=t.length,_=null):_=Ya(Xs(i,S,n.state,R),a),R){var M=R[0].name;M&&(_="m-"+(_?M+" "+_:M))}if(!h||m!=_){for(;p<S.start;)p=Math.min(S.start,p+5e3),o(p,m);m=_}S.start=S.pos}for(;p<S.pos;){var $=Math.min(S.pos,p+5e3);o($,m),p=$}}function kh(e,t,i){for(var n,o,a=e.doc,c=i?-1:t-(e.doc.mode.innerMode?1e3:100),h=t;h>c;--h){if(h<=a.first)return a.first;var p=Se(a,h-1),m=p.stateAfter;if(m&&(!i||h+(m instanceof Eo?m.lookAhead:0)<=a.modeFrontier))return h;var S=q(p.text,null,e.options.tabSize);(o==null||n>S)&&(o=h-1,n=S)}return o}function Sh(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var i=e.first,n=t-1;n>i;n--){var o=Se(e,n).stateAfter;if(o&&(!(o instanceof Eo)||n+o.lookAhead<t)){i=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}}var Za=!1,Wr=!1;function Ch(){Za=!0}function _h(){Wr=!0}function Ao(e,t,i){this.marker=e,this.from=t,this.to=i}function zi(e,t){if(e)for(var i=0;i<e.length;++i){var n=e[i];if(n.marker==t)return n}}function Th(e,t){for(var i,n=0;n<e.length;++n)e[n]!=t&&(i||(i=[])).push(e[n]);return i}function Lh(e,t,i){var n=i&&window.WeakSet&&(i.markedSpans||(i.markedSpans=new WeakSet));n&&e.markedSpans&&n.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],n&&n.add(e.markedSpans)),t.marker.attachLine(e)}function Ph(e,t,i){var n;if(e)for(var o=0;o<e.length;++o){var a=e[o],c=a.marker,h=a.from==null||(c.inclusiveLeft?a.from<=t:a.from<t);if(h||a.from==t&&c.type=="bookmark"&&(!i||!a.marker.insertLeft)){var p=a.to==null||(c.inclusiveRight?a.to>=t:a.to>t);(n||(n=[])).push(new Ao(c,a.from,p?null:a.to))}}return n}function Oh(e,t,i){var n;if(e)for(var o=0;o<e.length;++o){var a=e[o],c=a.marker,h=a.to==null||(c.inclusiveRight?a.to>=t:a.to>t);if(h||a.from==t&&c.type=="bookmark"&&(!i||a.marker.insertLeft)){var p=a.from==null||(c.inclusiveLeft?a.from<=t:a.from<t);(n||(n=[])).push(new Ao(c,p?null:a.from-t,a.to==null?null:a.to-t))}}return n}function Zs(e,t){if(t.full)return null;var i=_n(e,t.from.line)&&Se(e,t.from.line).markedSpans,n=_n(e,t.to.line)&&Se(e,t.to.line).markedSpans;if(!i&&!n)return null;var o=t.from.ch,a=t.to.ch,c=k(t.from,t.to)==0,h=Ph(i,o,c),p=Oh(n,a,c),m=t.text.length==1,S=H(t.text).length+(m?o:0);if(h)for(var _=0;_<h.length;++_){var R=h[_];if(R.to==null){var M=zi(p,R.marker);M?m&&(R.to=M.to==null?null:M.to+S):R.to=o}}if(p)for(var $=0;$<p.length;++$){var Z=p[$];if(Z.to!=null&&(Z.to+=S),Z.from==null){var se=zi(h,Z.marker);se||(Z.from=S,m&&(h||(h=[])).push(Z))}else Z.from+=S,m&&(h||(h=[])).push(Z)}h&&(h=Ja(h)),p&&p!=h&&(p=Ja(p));var ge=[h];if(!m){var be=t.text.length-2,ve;if(be>0&&h)for(var xe=0;xe<h.length;++xe)h[xe].to==null&&(ve||(ve=[])).push(new Ao(h[xe].marker,null,null));for(var Ae=0;Ae<be;++Ae)ge.push(ve);ge.push(p)}return ge}function Ja(e){for(var t=0;t<e.length;++t){var i=e[t];i.from!=null&&i.from==i.to&&i.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Mh(e,t,i){var n=null;if(e.iter(t.line,i.line+1,function(M){if(M.markedSpans)for(var $=0;$<M.markedSpans.length;++$){var Z=M.markedSpans[$].marker;Z.readOnly&&(!n||W(n,Z)==-1)&&(n||(n=[])).push(Z)}}),!n)return null;for(var o=[{from:t,to:i}],a=0;a<n.length;++a)for(var c=n[a],h=c.find(0),p=0;p<o.length;++p){var m=o[p];if(!(k(m.to,h.from)<0||k(m.from,h.to)>0)){var S=[p,1],_=k(m.from,h.from),R=k(m.to,h.to);(_<0||!c.inclusiveLeft&&!_)&&S.push({from:m.from,to:h.from}),(R>0||!c.inclusiveRight&&!R)&&S.push({from:h.to,to:m.to}),o.splice.apply(o,S),p+=S.length-3}}return o}function Qa(e){var t=e.markedSpans;if(!!t){for(var i=0;i<t.length;++i)t[i].marker.detachLine(e);e.markedSpans=null}}function Va(e,t){if(!!t){for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}}function No(e){return e.inclusiveLeft?-1:0}function zo(e){return e.inclusiveRight?1:0}function Js(e,t){var i=e.lines.length-t.lines.length;if(i!=0)return i;var n=e.find(),o=t.find(),a=k(n.from,o.from)||No(e)-No(t);if(a)return-a;var c=k(n.to,o.to)||zo(e)-zo(t);return c||t.id-e.id}function eu(e,t){var i=Wr&&e.markedSpans,n;if(i)for(var o=void 0,a=0;a<i.length;++a)o=i[a],o.marker.collapsed&&(t?o.from:o.to)==null&&(!n||Js(n,o.marker)<0)&&(n=o.marker);return n}function tu(e){return eu(e,!0)}function Ro(e){return eu(e,!1)}function Eh(e,t){var i=Wr&&e.markedSpans,n;if(i)for(var o=0;o<i.length;++o){var a=i[o];a.marker.collapsed&&(a.from==null||a.from<t)&&(a.to==null||a.to>t)&&(!n||Js(n,a.marker)<0)&&(n=a.marker)}return n}function ru(e,t,i,n,o){var a=Se(e,t),c=Wr&&a.markedSpans;if(c)for(var h=0;h<c.length;++h){var p=c[h];if(!!p.marker.collapsed){var m=p.marker.find(0),S=k(m.from,i)||No(p.marker)-No(o),_=k(m.to,n)||zo(p.marker)-zo(o);if(!(S>=0&&_<=0||S<=0&&_>=0)&&(S<=0&&(p.marker.inclusiveRight&&o.inclusiveLeft?k(m.to,i)>=0:k(m.to,i)>0)||S>=0&&(p.marker.inclusiveRight&&o.inclusiveLeft?k(m.from,n)<=0:k(m.from,n)<0)))return!0}}}function hr(e){for(var t;t=tu(e);)e=t.find(-1,!0).line;return e}function Ah(e){for(var t;t=Ro(e);)e=t.find(1,!0).line;return e}function Nh(e){for(var t,i;t=Ro(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function Qs(e,t){var i=Se(e,t),n=hr(i);return i==n?t:Xe(n)}function nu(e,t){if(t>e.lastLine())return t;var i=Se(e,t),n;if(!en(e,i))return t;for(;n=Ro(i);)i=n.find(1,!0).line;return Xe(i)+1}function en(e,t){var i=Wr&&t.markedSpans;if(i){for(var n=void 0,o=0;o<i.length;++o)if(n=i[o],!!n.marker.collapsed){if(n.from==null)return!0;if(!n.marker.widgetNode&&n.from==0&&n.marker.inclusiveLeft&&Vs(e,t,n))return!0}}}function Vs(e,t,i){if(i.to==null){var n=i.marker.find(1,!0);return Vs(e,n.line,zi(n.line.markedSpans,i.marker))}if(i.marker.inclusiveRight&&i.to==t.text.length)return!0;for(var o=void 0,a=0;a<t.markedSpans.length;++a)if(o=t.markedSpans[a],o.marker.collapsed&&!o.marker.widgetNode&&o.from==i.to&&(o.to==null||o.to!=i.from)&&(o.marker.inclusiveLeft||i.marker.inclusiveRight)&&Vs(e,t,o))return!0}function Br(e){e=hr(e);for(var t=0,i=e.parent,n=0;n<i.lines.length;++n){var o=i.lines[n];if(o==e)break;t+=o.height}for(var a=i.parent;a;i=a,a=i.parent)for(var c=0;c<a.children.length;++c){var h=a.children[c];if(h==i)break;t+=h.height}return t}function Do(e){if(e.height==0)return 0;for(var t=e.text.length,i,n=e;i=tu(n);){var o=i.find(0,!0);n=o.from.line,t+=o.from.ch-o.to.ch}for(n=e;i=Ro(n);){var a=i.find(0,!0);t-=n.text.length-a.from.ch,n=a.to.line,t+=n.text.length-a.to.ch}return t}function el(e){var t=e.display,i=e.doc;t.maxLine=Se(i,i.first),t.maxLineLength=Do(t.maxLine),t.maxLineChanged=!0,i.iter(function(n){var o=Do(n);o>t.maxLineLength&&(t.maxLineLength=o,t.maxLine=n)})}var Gn=function(e,t,i){this.text=e,Va(this,t),this.height=i?i(this):1};Gn.prototype.lineNo=function(){return Xe(this)},Qr(Gn);function zh(e,t,i,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Qa(e),Va(e,i);var o=n?n(e):1;o!=e.height&&cr(e,o)}function Rh(e){e.parent=null,Qa(e)}var Dh={},Fh={};function iu(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?Fh:Dh;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function ou(e,t){var i=Q("span",null,null,C?"padding-right: .1px":null),n={pre:Q("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var a=o?t.rest[o-1]:t.line,c=void 0;n.pos=0,n.addToken=Hh,qs(e.display.measure)&&(c=xt(a,e.doc.direction))&&(n.addToken=Bh(n.addToken,c)),n.map=[];var h=t!=e.display.externalMeasured&&Xe(a);jh(a,n,Ka(e,a,h)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=lt(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=lt(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(Ks(e.display.measure))),o==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(C){var p=n.content.lastChild;(/\bcm-tab\b/.test(p.className)||p.querySelector&&p.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return it(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=lt(n.pre.className,n.textClass||"")),n}function Ih(e){var t=w("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Hh(e,t,i,n,o,a,c){if(!!t){var h=e.splitSpaces?Wh(t,e.trailingSpace):t,p=e.cm.state.specialChars,m=!1,S;if(!p.test(t))e.col+=t.length,S=document.createTextNode(h),e.map.push(e.pos,e.pos+t.length,S),y&&x<9&&(m=!0),e.pos+=t.length;else{S=document.createDocumentFragment();for(var _=0;;){p.lastIndex=_;var R=p.exec(t),M=R?R.index-_:t.length-_;if(M){var $=document.createTextNode(h.slice(_,_+M));y&&x<9?S.appendChild(w("span",[$])):S.appendChild($),e.map.push(e.pos,e.pos+M,$),e.col+=M,e.pos+=M}if(!R)break;_+=M+1;var Z=void 0;if(R[0]==" "){var se=e.cm.options.tabSize,ge=se-e.col%se;Z=S.appendChild(w("span",B(ge),"cm-tab")),Z.setAttribute("role","presentation"),Z.setAttribute("cm-text"," "),e.col+=ge}else R[0]=="\r"||R[0]==`
5
+ `?(Z=S.appendChild(w("span",R[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Z.setAttribute("cm-text",R[0]),e.col+=1):(Z=e.cm.options.specialCharPlaceholder(R[0]),Z.setAttribute("cm-text",R[0]),y&&x<9?S.appendChild(w("span",[Z])):S.appendChild(Z),e.col+=1);e.map.push(e.pos,e.pos+1,Z),e.pos++}}if(e.trailingSpace=h.charCodeAt(t.length-1)==32,i||n||o||m||a||c){var be=i||"";n&&(be+=n),o&&(be+=o);var ve=w("span",[S],be,a);if(c)for(var xe in c)c.hasOwnProperty(xe)&&xe!="style"&&xe!="class"&&ve.setAttribute(xe,c[xe]);return e.content.appendChild(ve)}e.content.appendChild(S)}}function Wh(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,n="",o=0;o<e.length;o++){var a=e.charAt(o);a==" "&&i&&(o==e.length-1||e.charCodeAt(o+1)==32)&&(a="\xA0"),n+=a,i=a==" "}return n}function Bh(e,t){return function(i,n,o,a,c,h,p){o=o?o+" cm-force-border":"cm-force-border";for(var m=i.pos,S=m+n.length;;){for(var _=void 0,R=0;R<t.length&&(_=t[R],!(_.to>m&&_.from<=m));R++);if(_.to>=S)return e(i,n,o,a,c,h,p);e(i,n.slice(0,_.to-m),o,a,null,h,p),a=null,n=n.slice(_.to-m),m=_.to}}}function su(e,t,i,n){var o=!n&&i.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!n&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",i.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function jh(e,t,i){var n=e.markedSpans,o=e.text,a=0;if(!n){for(var c=1;c<i.length;c+=2)t.addToken(t,o.slice(a,a=i[c]),iu(i[c+1],t.cm.options));return}for(var h=o.length,p=0,m=1,S="",_,R,M=0,$,Z,se,ge,be;;){if(M==p){$=Z=se=R="",be=null,ge=null,M=1/0;for(var ve=[],xe=void 0,Ae=0;Ae<n.length;++Ae){var Pe=n[Ae],Be=Pe.marker;if(Be.type=="bookmark"&&Pe.from==p&&Be.widgetNode)ve.push(Be);else if(Pe.from<=p&&(Pe.to==null||Pe.to>p||Be.collapsed&&Pe.to==p&&Pe.from==p)){if(Pe.to!=null&&Pe.to!=p&&M>Pe.to&&(M=Pe.to,Z=""),Be.className&&($+=" "+Be.className),Be.css&&(R=(R?R+";":"")+Be.css),Be.startStyle&&Pe.from==p&&(se+=" "+Be.startStyle),Be.endStyle&&Pe.to==M&&(xe||(xe=[])).push(Be.endStyle,Pe.to),Be.title&&((be||(be={})).title=Be.title),Be.attributes)for(var et in Be.attributes)(be||(be={}))[et]=Be.attributes[et];Be.collapsed&&(!ge||Js(ge.marker,Be)<0)&&(ge=Pe)}else Pe.from>p&&M>Pe.from&&(M=Pe.from)}if(xe)for(var Lt=0;Lt<xe.length;Lt+=2)xe[Lt+1]==M&&(Z+=" "+xe[Lt]);if(!ge||ge.from==p)for(var ft=0;ft<ve.length;++ft)su(t,0,ve[ft]);if(ge&&(ge.from||0)==p){if(su(t,(ge.to==null?h+1:ge.to)-p,ge.marker,ge.from==null),ge.to==null)return;ge.to==p&&(ge=!1)}}if(p>=h)break;for(var Qt=Math.min(h,M);;){if(S){var qt=p+S.length;if(!ge){var mt=qt>Qt?S.slice(0,Qt-p):S;t.addToken(t,mt,_?_+$:$,se,p+mt.length==M?Z:"",R,be)}if(qt>=Qt){S=S.slice(Qt-p),p=Qt;break}p=qt,se=""}S=o.slice(a,a=i[m++]),_=iu(i[m++],t.cm.options)}}}function lu(e,t,i){this.line=t,this.rest=Nh(t),this.size=this.rest?Xe(H(this.rest))-i+1:1,this.node=this.text=null,this.hidden=en(e,t)}function Fo(e,t,i){for(var n=[],o,a=t;a<i;a=o){var c=new lu(e.doc,Se(e.doc,a),a);o=a+c.size,n.push(c)}return n}var Yn=null;function Uh(e){Yn?Yn.ops.push(e):e.ownsGroup=Yn={ops:[e],delayedCallbacks:[]}}function Kh(e){var t=e.delayedCallbacks,i=0;do{for(;i<t.length;i++)t[i].call(null);for(var n=0;n<e.ops.length;n++){var o=e.ops[n];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(i<t.length)}function qh(e,t){var i=e.ownsGroup;if(!!i)try{Kh(i)}finally{Yn=null,t(i)}}var Ri=null;function Ct(e,t){var i=kt(e,t);if(!!i.length){var n=Array.prototype.slice.call(arguments,2),o;Yn?o=Yn.delayedCallbacks:Ri?o=Ri:(o=Ri=[],setTimeout($h,0));for(var a=function(h){o.push(function(){return i[h].apply(null,n)})},c=0;c<i.length;++c)a(c)}}function $h(){var e=Ri;Ri=null;for(var t=0;t<e.length;++t)e[t]()}function au(e,t,i,n){for(var o=0;o<t.changes.length;o++){var a=t.changes[o];a=="text"?Yh(e,t):a=="gutter"?fu(e,t,i,n):a=="class"?tl(e,t):a=="widget"&&Xh(e,t,n)}t.changes=null}function Di(e){return e.node==e.text&&(e.node=w("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),y&&x<8&&(e.node.style.zIndex=2)),e.node}function Gh(e,t){var i=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(i&&(i+=" CodeMirror-linebackground"),t.background)i?t.background.className=i:(t.background.parentNode.removeChild(t.background),t.background=null);else if(i){var n=Di(t);t.background=n.insertBefore(w("div",null,i),n.firstChild),e.display.input.setUneditable(t.background)}}function uu(e,t){var i=e.display.externalMeasured;return i&&i.line==t.line?(e.display.externalMeasured=null,t.measure=i.measure,i.built):ou(e,t)}function Yh(e,t){var i=t.text.className,n=uu(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,tl(e,t)):i&&(t.text.className=i)}function tl(e,t){Gh(e,t),t.line.wrapClass?Di(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var i=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=i||""}function fu(e,t,i,n){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 o=Di(t);t.gutterBackground=w("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var c=Di(t),h=t.gutter=w("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(h.setAttribute("aria-hidden","true"),e.display.input.setUneditable(h),c.insertBefore(h,t.text),t.line.gutterClass&&(h.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=h.appendChild(w("div",$n(e.options,i),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var p=0;p<e.display.gutterSpecs.length;++p){var m=e.display.gutterSpecs[p].className,S=a.hasOwnProperty(m)&&a[m];S&&h.appendChild(w("div",[S],"CodeMirror-gutter-elt","left: "+n.gutterLeft[m]+"px; width: "+n.gutterWidth[m]+"px"))}}}function Xh(e,t,i){t.alignable&&(t.alignable=null);for(var n=ce("CodeMirror-linewidget"),o=t.node.firstChild,a=void 0;o;o=a)a=o.nextSibling,n.test(o.className)&&t.node.removeChild(o);cu(e,t,i)}function Zh(e,t,i,n){var o=uu(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),tl(e,t),fu(e,t,i,n),cu(e,t,n),t.node}function cu(e,t,i){if(du(e,t.line,t,i,!0),t.rest)for(var n=0;n<t.rest.length;n++)du(e,t.rest[n],t,i,!1)}function du(e,t,i,n,o){if(!!t.widgets)for(var a=Di(i),c=0,h=t.widgets;c<h.length;++c){var p=h[c],m=w("div",[p.node],"CodeMirror-linewidget"+(p.className?" "+p.className:""));p.handleMouseEvents||m.setAttribute("cm-ignore-events","true"),Jh(p,m,i,n),e.display.input.setUneditable(m),o&&p.above?a.insertBefore(m,i.gutter||i.text):a.appendChild(m),Ct(p,"redraw")}}function Jh(e,t,i,n){if(e.noHScroll){(i.alignable||(i.alignable=[])).push(t);var o=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(o-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Fi(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!fe(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),le(t.display.measure,w("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function jr(e,t){for(var i=Ai(t);i!=e.wrapper;i=i.parentNode)if(!i||i.nodeType==1&&i.getAttribute("cm-ignore-events")=="true"||i.parentNode==e.sizer&&i!=e.mover)return!0}function Io(e){return e.lineSpace.offsetTop}function rl(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function hu(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=le(e.measure,w("pre","x","CodeMirror-line-like")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function Lr(e){return oe-e.display.nativeBarWidth}function Tn(e){return e.display.scroller.clientWidth-Lr(e)-e.display.barWidth}function nl(e){return e.display.scroller.clientHeight-Lr(e)-e.display.barHeight}function Qh(e,t,i){var n=e.options.lineWrapping,o=n&&Tn(e);if(!t.measure.heights||n&&t.measure.width!=o){var a=t.measure.heights=[];if(n){t.measure.width=o;for(var c=t.text.firstChild.getClientRects(),h=0;h<c.length-1;h++){var p=c[h],m=c[h+1];Math.abs(p.bottom-m.bottom)>2&&a.push((p.bottom+m.top)/2-i.top)}}a.push(i.bottom-i.top)}}function pu(e,t,i){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var o=0;o<e.rest.length;o++)if(Xe(e.rest[o])>i)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}}function Vh(e,t){t=hr(t);var i=Xe(t),n=e.display.externalMeasured=new lu(e.doc,t,i);n.lineN=i;var o=n.built=ou(e,n);return n.text=o.pre,le(e.display.lineMeasure,o.pre),n}function gu(e,t,i,n){return Pr(e,Xn(e,t),i,n)}function il(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[On(e,t)];var i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size)return i}function Xn(e,t){var i=Xe(t),n=il(e,i);n&&!n.text?n=null:n&&n.changes&&(au(e,n,i,ul(e)),e.curOp.forceUpdate=!0),n||(n=Vh(e,t));var o=pu(n,t,i);return{line:t,view:n,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function Pr(e,t,i,n,o){t.before&&(i=-1);var a=i+(n||""),c;return t.cache.hasOwnProperty(a)?c=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Qh(e,t.view,t.rect),t.hasHeights=!0),c=tp(e,t,i,n),c.bogus||(t.cache[a]=c)),{left:c.left,right:c.right,top:o?c.rtop:c.top,bottom:o?c.rbottom:c.bottom}}var vu={left:0,right:0,top:0,bottom:0};function mu(e,t,i){for(var n,o,a,c,h,p,m=0;m<e.length;m+=3)if(h=e[m],p=e[m+1],t<h?(o=0,a=1,c="left"):t<p?(o=t-h,a=o+1):(m==e.length-3||t==p&&e[m+3]>t)&&(a=p-h,o=a-1,t>=p&&(c="right")),o!=null){if(n=e[m+2],h==p&&i==(n.insertLeft?"left":"right")&&(c=i),i=="left"&&o==0)for(;m&&e[m-2]==e[m-3]&&e[m-1].insertLeft;)n=e[(m-=3)+2],c="left";if(i=="right"&&o==p-h)for(;m<e.length-3&&e[m+3]==e[m+4]&&!e[m+5].insertLeft;)n=e[(m+=3)+2],c="right";break}return{node:n,start:o,end:a,collapse:c,coverStart:h,coverEnd:p}}function ep(e,t){var i=vu;if(t=="left")for(var n=0;n<e.length&&(i=e[n]).left==i.right;n++);else for(var o=e.length-1;o>=0&&(i=e[o]).left==i.right;o--);return i}function tp(e,t,i,n){var o=mu(t.map,i,n),a=o.node,c=o.start,h=o.end,p=o.collapse,m;if(a.nodeType==3){for(var S=0;S<4;S++){for(;c&&Te(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+h<o.coverEnd&&Te(t.line.text.charAt(o.coverStart+h));)++h;if(y&&x<9&&c==0&&h==o.coverEnd-o.coverStart?m=a.parentNode.getBoundingClientRect():m=ep(G(a,c,h).getClientRects(),n),m.left||m.right||c==0)break;h=c,c=c-1,p="right"}y&&x<11&&(m=rp(e.display.measure,m))}else{c>0&&(p=n="right");var _;e.options.lineWrapping&&(_=a.getClientRects()).length>1?m=_[n=="right"?_.length-1:0]:m=a.getBoundingClientRect()}if(y&&x<9&&!c&&(!m||!m.left&&!m.right)){var R=a.parentNode.getClientRects()[0];R?m={left:R.left,right:R.left+Jn(e.display),top:R.top,bottom:R.bottom}:m=vu}for(var M=m.top-t.rect.top,$=m.bottom-t.rect.top,Z=(M+$)/2,se=t.view.measure.heights,ge=0;ge<se.length-1&&!(Z<se[ge]);ge++);var be=ge?se[ge-1]:0,ve=se[ge],xe={left:(p=="right"?m.right:m.left)-t.rect.left,right:(p=="left"?m.left:m.right)-t.rect.left,top:be,bottom:ve};return!m.left&&!m.right&&(xe.bogus=!0),e.options.singleCursorHeightPerLine||(xe.rtop=M,xe.rbottom=$),xe}function rp(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Cr(e))return t;var i=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*i,right:t.right*i,top:t.top*n,bottom:t.bottom*n}}function yu(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 bu(e){e.display.externalMeasure=null,U(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)yu(e.display.view[t])}function Ii(e){bu(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function wu(){return O&&F?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function xu(){return O&&F?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function ol(e){var t=hr(e),i=t.widgets,n=0;if(i)for(var o=0;o<i.length;++o)i[o].above&&(n+=Fi(i[o]));return n}function Ho(e,t,i,n,o){if(!o){var a=ol(t);i.top+=a,i.bottom+=a}if(n=="line")return i;n||(n="local");var c=Br(t);if(n=="local"?c+=Io(e.display):c-=e.display.viewOffset,n=="page"||n=="window"){var h=e.display.lineSpace.getBoundingClientRect();c+=h.top+(n=="window"?0:xu());var p=h.left+(n=="window"?0:wu());i.left+=p,i.right+=p}return i.top+=c,i.bottom+=c,i}function ku(e,t,i){if(i=="div")return t;var n=t.left,o=t.top;if(i=="page")n-=wu(),o-=xu();else if(i=="local"||!i){var a=e.display.sizer.getBoundingClientRect();n+=a.left,o+=a.top}var c=e.display.lineSpace.getBoundingClientRect();return{left:n-c.left,top:o-c.top}}function Wo(e,t,i,n,o){return n||(n=Se(e.doc,t.line)),Ho(e,n,gu(e,n,t.ch,o),i)}function pr(e,t,i,n,o,a){n=n||Se(e.doc,t.line),o||(o=Xn(e,n));function c($,Z){var se=Pr(e,o,$,Z?"right":"left",a);return Z?se.left=se.right:se.right=se.left,Ho(e,n,se,i)}var h=xt(n,e.doc.direction),p=t.ch,m=t.sticky;if(p>=n.text.length?(p=n.text.length,m="before"):p<=0&&(p=0,m="after"),!h)return c(m=="before"?p-1:p,m=="before");function S($,Z,se){var ge=h[Z],be=ge.level==1;return c(se?$-1:$,be!=se)}var _=dt(h,p,m),R=Ie,M=S(p,_,m=="before");return R!=null&&(M.other=S(p,R,m!="before")),M}function Su(e,t){var i=0;t=Ce(e.doc,t),e.options.lineWrapping||(i=Jn(e.display)*t.ch);var n=Se(e.doc,t.line),o=Br(n)+Io(e.display);return{left:i,right:i,top:o,bottom:o+n.height}}function sl(e,t,i,n,o){var a=g(e,t,i);return a.xRel=o,n&&(a.outside=n),a}function ll(e,t,i){var n=e.doc;if(i+=e.display.viewOffset,i<0)return sl(n.first,0,null,-1,-1);var o=Hr(n,i),a=n.first+n.size-1;if(o>a)return sl(n.first+n.size-1,Se(n,a).text.length,null,1,1);t<0&&(t=0);for(var c=Se(n,o);;){var h=np(e,c,o,t,i),p=Eh(c,h.ch+(h.xRel>0||h.outside>0?1:0));if(!p)return h;var m=p.find(1);if(m.line==o)return m;c=Se(n,o=m.line)}}function Cu(e,t,i,n){n-=ol(t);var o=t.text.length,a=Ge(function(c){return Pr(e,i,c-1).bottom<=n},o,0);return o=Ge(function(c){return Pr(e,i,c).top>n},a,o),{begin:a,end:o}}function _u(e,t,i,n){i||(i=Xn(e,t));var o=Ho(e,t,Pr(e,i,n),"line").top;return Cu(e,t,i,o)}function al(e,t,i,n){return e.bottom<=i?!1:e.top>i?!0:(n?e.left:e.right)>t}function np(e,t,i,n,o){o-=Br(t);var a=Xn(e,t),c=ol(t),h=0,p=t.text.length,m=!0,S=xt(t,e.doc.direction);if(S){var _=(e.options.lineWrapping?op:ip)(e,t,i,a,S,n,o);m=_.level!=1,h=m?_.from:_.to-1,p=m?_.to:_.from-1}var R=null,M=null,$=Ge(function(Ae){var Pe=Pr(e,a,Ae);return Pe.top+=c,Pe.bottom+=c,al(Pe,n,o,!1)?(Pe.top<=o&&Pe.left<=n&&(R=Ae,M=Pe),!0):!1},h,p),Z,se,ge=!1;if(M){var be=n-M.left<M.right-n,ve=be==m;$=R+(ve?0:1),se=ve?"after":"before",Z=be?M.left:M.right}else{!m&&($==p||$==h)&&$++,se=$==0?"after":$==t.text.length?"before":Pr(e,a,$-(m?1:0)).bottom+c<=o==m?"after":"before";var xe=pr(e,g(i,$,se),"line",t,a);Z=xe.left,ge=o<xe.top?-1:o>=xe.bottom?1:0}return $=je(t.text,$,1),sl(i,$,se,ge,n-Z)}function ip(e,t,i,n,o,a,c){var h=Ge(function(_){var R=o[_],M=R.level!=1;return al(pr(e,g(i,M?R.to:R.from,M?"before":"after"),"line",t,n),a,c,!0)},0,o.length-1),p=o[h];if(h>0){var m=p.level!=1,S=pr(e,g(i,m?p.from:p.to,m?"after":"before"),"line",t,n);al(S,a,c,!0)&&S.top>c&&(p=o[h-1])}return p}function op(e,t,i,n,o,a,c){var h=Cu(e,t,n,c),p=h.begin,m=h.end;/\s/.test(t.text.charAt(m-1))&&m--;for(var S=null,_=null,R=0;R<o.length;R++){var M=o[R];if(!(M.from>=m||M.to<=p)){var $=M.level!=1,Z=Pr(e,n,$?Math.min(m,M.to)-1:Math.max(p,M.from)).right,se=Z<a?a-Z+1e9:Z-a;(!S||_>se)&&(S=M,_=se)}}return S||(S=o[o.length-1]),S.from<p&&(S={from:p,to:S.to,level:S.level}),S.to>m&&(S={from:S.from,to:m,level:S.level}),S}var Ln;function Zn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Ln==null){Ln=w("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Ln.appendChild(document.createTextNode("x")),Ln.appendChild(w("br"));Ln.appendChild(document.createTextNode("x"))}le(e.measure,Ln);var i=Ln.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),U(e.measure),i||1}function Jn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=w("span","xxxxxxxxxx"),i=w("pre",[t],"CodeMirror-line-like");le(e.measure,i);var n=t.getBoundingClientRect(),o=(n.right-n.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function ul(e){for(var t=e.display,i={},n={},o=t.gutters.clientLeft,a=t.gutters.firstChild,c=0;a;a=a.nextSibling,++c){var h=e.display.gutterSpecs[c].className;i[h]=a.offsetLeft+a.clientLeft+o,n[h]=a.clientWidth}return{fixedPos:fl(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function fl(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Tu(e){var t=Zn(e.display),i=e.options.lineWrapping,n=i&&Math.max(5,e.display.scroller.clientWidth/Jn(e.display)-3);return function(o){if(en(e.doc,o))return 0;var a=0;if(o.widgets)for(var c=0;c<o.widgets.length;c++)o.widgets[c].height&&(a+=o.widgets[c].height);return i?a+(Math.ceil(o.text.length/n)||1)*t:a+t}}function cl(e){var t=e.doc,i=Tu(e);t.iter(function(n){var o=i(n);o!=n.height&&cr(n,o)})}function Pn(e,t,i,n){var o=e.display;if(!i&&Ai(t).getAttribute("cm-not-content")=="true")return null;var a,c,h=o.lineSpace.getBoundingClientRect();try{a=t.clientX-h.left,c=t.clientY-h.top}catch{return null}var p=ll(e,a,c),m;if(n&&p.xRel>0&&(m=Se(e.doc,p.line).text).length==p.ch){var S=q(m,m.length,e.options.tabSize)-m.length;p=g(p.line,Math.max(0,Math.round((a-hu(e.display).left)/Jn(e.display))-S))}return p}function On(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var i=e.display.view,n=0;n<i.length;n++)if(t-=i[n].size,t<0)return n}function Ut(e,t,i,n){t==null&&(t=e.doc.first),i==null&&(i=e.doc.first+e.doc.size),n||(n=0);var o=e.display;if(n&&i<o.viewTo&&(o.updateLineNumbers==null||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Wr&&Qs(e.doc,t)<o.viewTo&&rn(e);else if(i<=o.viewFrom)Wr&&nu(e.doc,i+n)>o.viewFrom?rn(e):(o.viewFrom+=n,o.viewTo+=n);else if(t<=o.viewFrom&&i>=o.viewTo)rn(e);else if(t<=o.viewFrom){var a=Bo(e,i,i+n,1);a?(o.view=o.view.slice(a.index),o.viewFrom=a.lineN,o.viewTo+=n):rn(e)}else if(i>=o.viewTo){var c=Bo(e,t,t,-1);c?(o.view=o.view.slice(0,c.index),o.viewTo=c.lineN):rn(e)}else{var h=Bo(e,t,t,-1),p=Bo(e,i,i+n,1);h&&p?(o.view=o.view.slice(0,h.index).concat(Fo(e,h.lineN,p.lineN)).concat(o.view.slice(p.index)),o.viewTo+=n):rn(e)}var m=o.externalMeasured;m&&(i<m.lineN?m.lineN+=n:t<m.lineN+m.size&&(o.externalMeasured=null))}function tn(e,t,i){e.curOp.viewChanged=!0;var n=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var a=n.view[On(e,t)];if(a.node!=null){var c=a.changes||(a.changes=[]);W(c,i)==-1&&c.push(i)}}}function rn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Bo(e,t,i,n){var o=On(e,t),a,c=e.display.view;if(!Wr||i==e.doc.first+e.doc.size)return{index:o,lineN:i};for(var h=e.display.viewFrom,p=0;p<o;p++)h+=c[p].size;if(h!=t){if(n>0){if(o==c.length-1)return null;a=h+c[o].size-t,o++}else a=h-t;t+=a,i+=a}for(;Qs(e.doc,i)!=i;){if(o==(n<0?0:c.length-1))return null;i+=n*c[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:i}}function sp(e,t,i){var n=e.display,o=n.view;o.length==0||t>=n.viewTo||i<=n.viewFrom?(n.view=Fo(e,t,i),n.viewFrom=t):(n.viewFrom>t?n.view=Fo(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(On(e,t))),n.viewFrom=t,n.viewTo<i?n.view=n.view.concat(Fo(e,n.viewTo,i)):n.viewTo>i&&(n.view=n.view.slice(0,On(e,i)))),n.viewTo=i}function Lu(e){for(var t=e.display.view,i=0,n=0;n<t.length;n++){var o=t[n];!o.hidden&&(!o.node||o.changes)&&++i}return i}function Hi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Pu(e,t){t===void 0&&(t=!0);var i=e.doc,n={},o=n.cursors=document.createDocumentFragment(),a=n.selection=document.createDocumentFragment(),c=e.options.$customCursor;c&&(t=!0);for(var h=0;h<i.sel.ranges.length;h++)if(!(!t&&h==i.sel.primIndex)){var p=i.sel.ranges[h];if(!(p.from().line>=e.display.viewTo||p.to().line<e.display.viewFrom)){var m=p.empty();if(c){var S=c(e,p);S&&dl(e,S,o)}else(m||e.options.showCursorWhenSelecting)&&dl(e,p.head,o);m||lp(e,p,a)}}return n}function dl(e,t,i){var n=pr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=i.appendChild(w("div","\xA0","CodeMirror-cursor"));if(o.style.left=n.left+"px",o.style.top=n.top+"px",o.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var a=Wo(e,t,"div",null,null),c=a.right-a.left;o.style.width=(c>0?c:e.defaultCharWidth())+"px"}if(n.other){var h=i.appendChild(w("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));h.style.display="",h.style.left=n.other.left+"px",h.style.top=n.other.top+"px",h.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function jo(e,t){return e.top-t.top||e.left-t.left}function lp(e,t,i){var n=e.display,o=e.doc,a=document.createDocumentFragment(),c=hu(e.display),h=c.left,p=Math.max(n.sizerWidth,Tn(e)-n.sizer.offsetLeft)-c.right,m=o.direction=="ltr";function S(ve,xe,Ae,Pe){xe<0&&(xe=0),xe=Math.round(xe),Pe=Math.round(Pe),a.appendChild(w("div",null,"CodeMirror-selected","position: absolute; left: "+ve+`px;
6
+ top: `+xe+"px; width: "+(Ae==null?p-ve:Ae)+`px;
7
+ height: `+(Pe-xe)+"px"))}function _(ve,xe,Ae){var Pe=Se(o,ve),Be=Pe.text.length,et,Lt;function ft(mt,$t){return Wo(e,g(ve,mt),"div",Pe,$t)}function Qt(mt,$t,Mt){var wt=_u(e,Pe,null,mt),yt=$t=="ltr"==(Mt=="after")?"left":"right",pt=Mt=="after"?wt.begin:wt.end-(/\s/.test(Pe.text.charAt(wt.end-1))?2:1);return ft(pt,yt)[yt]}var qt=xt(Pe,o.direction);return $e(qt,xe||0,Ae==null?Be:Ae,function(mt,$t,Mt,wt){var yt=Mt=="ltr",pt=ft(mt,yt?"left":"right"),Gt=ft($t-1,yt?"right":"left"),fi=xe==null&&mt==0,un=Ae==null&&$t==Be,Dt=wt==0,Or=!qt||wt==qt.length-1;if(Gt.top-pt.top<=3){var Pt=(m?fi:un)&&Dt,Il=(m?un:fi)&&Or,qr=Pt?h:(yt?pt:Gt).left,zn=Il?p:(yt?Gt:pt).right;S(qr,pt.top,zn-qr,pt.bottom)}else{var Rn,Bt,ci,Hl;yt?(Rn=m&&fi&&Dt?h:pt.left,Bt=m?p:Qt(mt,Mt,"before"),ci=m?h:Qt($t,Mt,"after"),Hl=m&&un&&Or?p:Gt.right):(Rn=m?Qt(mt,Mt,"before"):h,Bt=!m&&fi&&Dt?p:pt.right,ci=!m&&un&&Or?h:Gt.left,Hl=m?Qt($t,Mt,"after"):p),S(Rn,pt.top,Bt-Rn,pt.bottom),pt.bottom<Gt.top&&S(h,pt.bottom,null,Gt.top),S(ci,Gt.top,Hl-ci,Gt.bottom)}(!et||jo(pt,et)<0)&&(et=pt),jo(Gt,et)<0&&(et=Gt),(!Lt||jo(pt,Lt)<0)&&(Lt=pt),jo(Gt,Lt)<0&&(Lt=Gt)}),{start:et,end:Lt}}var R=t.from(),M=t.to();if(R.line==M.line)_(R.line,R.ch,M.ch);else{var $=Se(o,R.line),Z=Se(o,M.line),se=hr($)==hr(Z),ge=_(R.line,R.ch,se?$.text.length+1:null).end,be=_(M.line,se?0:null,M.ch).start;se&&(ge.top<be.top-2?(S(ge.right,ge.top,null,ge.bottom),S(h,be.top,be.left,be.bottom)):S(ge.right,ge.top,be.left-ge.right,ge.bottom)),ge.bottom<be.top&&S(h,ge.bottom,null,be.top)}i.appendChild(a)}function hl(e){if(!!e.state.focused){var t=e.display;clearInterval(t.blinker);var i=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Qn(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Ou(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||gl(e))}function pl(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Qn(e))},100)}function gl(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(it(e,"focus",e,t),e.state.focused=!0,Ke(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()),hl(e))}function Qn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(it(e,"blur",e,t),e.state.focused=!1,Ee(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Uo(e){for(var t=e.display,i=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),o=t.lineDiv.getBoundingClientRect().top,a=0,c=0;c<t.view.length;c++){var h=t.view[c],p=e.options.lineWrapping,m=void 0,S=0;if(!h.hidden){if(o+=h.line.height,y&&x<8){var _=h.node.offsetTop+h.node.offsetHeight;m=_-i,i=_}else{var R=h.node.getBoundingClientRect();m=R.bottom-R.top,!p&&h.text.firstChild&&(S=h.text.firstChild.getBoundingClientRect().right-R.left-1)}var M=h.line.height-m;if((M>.005||M<-.005)&&(o<n&&(a-=M),cr(h.line,m),Mu(h.line),h.rest))for(var $=0;$<h.rest.length;$++)Mu(h.rest[$]);if(S>e.display.sizerWidth){var Z=Math.ceil(S/Jn(e.display));Z>e.display.maxLineLength&&(e.display.maxLineLength=Z,e.display.maxLine=h.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function Mu(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var i=e.widgets[t],n=i.node.parentNode;n&&(i.height=n.offsetHeight)}}function Ko(e,t,i){var n=i&&i.top!=null?Math.max(0,i.top):e.scroller.scrollTop;n=Math.floor(n-Io(e));var o=i&&i.bottom!=null?i.bottom:n+e.wrapper.clientHeight,a=Hr(t,n),c=Hr(t,o);if(i&&i.ensure){var h=i.ensure.from.line,p=i.ensure.to.line;h<a?(a=h,c=Hr(t,Br(Se(t,h))+e.wrapper.clientHeight)):Math.min(p,t.lastLine())>=c&&(a=Hr(t,Br(Se(t,p))-e.wrapper.clientHeight),c=p)}return{from:a,to:Math.max(c,a+1)}}function ap(e,t){if(!ht(e,"scrollCursorIntoView")){var i=e.display,n=i.sizer.getBoundingClientRect(),o=null;if(t.top+n.top<0?o=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),o!=null&&!N){var a=w("div","\u200B",null,`position: absolute;
8
+ top: `+(t.top-i.viewOffset-Io(e.display))+`px;
9
+ height: `+(t.bottom-t.top+Lr(e)+i.barHeight)+`px;
10
+ left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}function up(e,t,i,n){n==null&&(n=0);var o;!e.options.lineWrapping&&t==i&&(i=t.sticky=="before"?g(t.line,t.ch+1,"before"):t,t=t.ch?g(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var c=!1,h=pr(e,t),p=!i||i==t?h:pr(e,i);o={left:Math.min(h.left,p.left),top:Math.min(h.top,p.top)-n,right:Math.max(h.left,p.left),bottom:Math.max(h.bottom,p.bottom)+n};var m=vl(e,o),S=e.doc.scrollTop,_=e.doc.scrollLeft;if(m.scrollTop!=null&&(Bi(e,m.scrollTop),Math.abs(e.doc.scrollTop-S)>1&&(c=!0)),m.scrollLeft!=null&&(Mn(e,m.scrollLeft),Math.abs(e.doc.scrollLeft-_)>1&&(c=!0)),!c)break}return o}function fp(e,t){var i=vl(e,t);i.scrollTop!=null&&Bi(e,i.scrollTop),i.scrollLeft!=null&&Mn(e,i.scrollLeft)}function vl(e,t){var i=e.display,n=Zn(e.display);t.top<0&&(t.top=0);var o=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,a=nl(e),c={};t.bottom-t.top>a&&(t.bottom=t.top+a);var h=e.doc.height+rl(i),p=t.top<n,m=t.bottom>h-n;if(t.top<o)c.scrollTop=p?0:t.top;else if(t.bottom>o+a){var S=Math.min(t.top,(m?h:t.bottom)-a);S!=o&&(c.scrollTop=S)}var _=e.options.fixedGutter?0:i.gutters.offsetWidth,R=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-_,M=Tn(e)-i.gutters.offsetWidth,$=t.right-t.left>M;return $&&(t.right=t.left+M),t.left<10?c.scrollLeft=0:t.left<R?c.scrollLeft=Math.max(0,t.left+_-($?0:10)):t.right>M+R-3&&(c.scrollLeft=t.right+($?0:10)-M),c}function ml(e,t){t!=null&&(qo(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Vn(e){qo(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Wi(e,t,i){(t!=null||i!=null)&&qo(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function cp(e,t){qo(e),e.curOp.scrollToPos=t}function qo(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=Su(e,t.from),n=Su(e,t.to);Eu(e,i,n,t.margin)}}function Eu(e,t,i,n){var o=vl(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-n,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+n});Wi(e,o.scrollLeft,o.scrollTop)}function Bi(e,t){Math.abs(e.doc.scrollTop-t)<2||(f||bl(e,{top:t}),Au(e,t,!0),f&&bl(e),Ki(e,100))}function Au(e,t,i){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!i)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Mn(e,t,i,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)&&(e.doc.scrollLeft=t,Fu(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function ji(e){var t=e.display,i=t.gutters.offsetWidth,n=Math.round(e.doc.height+rl(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?i:0,docHeight:n,scrollHeight:n+Lr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var En=function(e,t,i){this.cm=i;var n=this.vert=w("div",[w("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=w("div",[w("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=o.tabIndex=-1,e(n),e(o),Oe(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Oe(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,y&&x<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};En.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var o=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"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=i?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(i?n: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&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?n:0,bottom:t?n:0}},En.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},En.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},En.prototype.zeroWidthHack=function(){var e=te&&!J?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new V,this.disableVert=new V},En.prototype.enableZeroWidthBar=function(e,t,i){e.style.pointerEvents="auto";function n(){var o=e.getBoundingClientRect(),a=i=="vert"?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1);a!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},En.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ui=function(){};Ui.prototype.update=function(){return{bottom:0,right:0}},Ui.prototype.setScrollLeft=function(){},Ui.prototype.setScrollTop=function(){},Ui.prototype.clear=function(){};function ei(e,t){t||(t=ji(e));var i=e.display.barWidth,n=e.display.barHeight;Nu(e,t);for(var o=0;o<4&&i!=e.display.barWidth||n!=e.display.barHeight;o++)i!=e.display.barWidth&&e.options.lineWrapping&&Uo(e),Nu(e,ji(e)),i=e.display.barWidth,n=e.display.barHeight}function Nu(e,t){var i=e.display,n=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=n.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=n.bottom)+"px",i.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=n.bottom+"px",i.scrollbarFiller.style.width=n.right+"px"):i.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=n.bottom+"px",i.gutterFiller.style.width=t.gutterWidth+"px"):i.gutterFiller.style.display=""}var zu={native:En,null:Ui};function Ru(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Ee(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new zu[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Oe(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,i){i=="horizontal"?Mn(e,t):Bi(e,t)},e),e.display.scrollbars.addClass&&Ke(e.display.wrapper,e.display.scrollbars.addClass)}var dp=0;function An(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:++dp,markArrays:null},Uh(e.curOp)}function Nn(e){var t=e.curOp;t&&qh(t,function(i){for(var n=0;n<i.ops.length;n++)i.ops[n].cm.curOp=null;hp(i)})}function hp(e){for(var t=e.ops,i=0;i<t.length;i++)pp(t[i]);for(var n=0;n<t.length;n++)gp(t[n]);for(var o=0;o<t.length;o++)vp(t[o]);for(var a=0;a<t.length;a++)mp(t[a]);for(var c=0;c<t.length;c++)yp(t[c])}function pp(e){var t=e.cm,i=t.display;wp(t),e.updateMaxLine&&el(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new $o(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function gp(e){e.updatedDisplay=e.mustUpdate&&yl(e.cm,e.update)}function vp(e){var t=e.cm,i=t.display;e.updatedDisplay&&Uo(t),e.barMeasure=ji(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=gu(t,i.maxLine,i.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+Lr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-Tn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function mp(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Mn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var i=e.focus&&e.focus==Le();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,i),(e.updatedDisplay||e.startHeight!=t.doc.height)&&ei(t,e.barMeasure),e.updatedDisplay&&xl(t,e.barMeasure),e.selectionChanged&&hl(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),i&&Ou(e.cm)}function yp(e){var t=e.cm,i=t.display,n=t.doc;if(e.updatedDisplay&&Du(t,e.update),i.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(i.wheelStartX=i.wheelStartY=null),e.scrollTop!=null&&Au(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Mn(t,e.scrollLeft,!0,!0),e.scrollToPos){var o=up(t,Ce(n,e.scrollToPos.from),Ce(n,e.scrollToPos.to),e.scrollToPos.margin);ap(t,o)}var a=e.maybeHiddenMarkers,c=e.maybeUnhiddenMarkers;if(a)for(var h=0;h<a.length;++h)a[h].lines.length||it(a[h],"hide");if(c)for(var p=0;p<c.length;++p)c[p].lines.length&&it(c[p],"unhide");i.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&it(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Jt(e,t){if(e.curOp)return t();An(e);try{return t()}finally{Nn(e)}}function _t(e,t){return function(){if(e.curOp)return t.apply(e,arguments);An(e);try{return t.apply(e,arguments)}finally{Nn(e)}}}function Wt(e){return function(){if(this.curOp)return e.apply(this,arguments);An(this);try{return e.apply(this,arguments)}finally{Nn(this)}}}function Tt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);An(t);try{return e.apply(this,arguments)}finally{Nn(t)}}}function Ki(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,He(bp,e))}function bp(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var i=+new Date+e.options.workTime,n=Ni(e,t.highlightFrontier),o=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(n.line>=e.display.viewFrom){var c=a.styles,h=a.text.length>e.options.maxHighlightLength?Fr(t.mode,n.state):null,p=Ua(e,a,n,!0);h&&(n.state=h),a.styles=p.styles;var m=a.styleClasses,S=p.classes;S?a.styleClasses=S:m&&(a.styleClasses=null);for(var _=!c||c.length!=a.styles.length||m!=S&&(!m||!S||m.bgClass!=S.bgClass||m.textClass!=S.textClass),R=0;!_&&R<c.length;++R)_=c[R]!=a.styles[R];_&&o.push(n.line),a.stateAfter=n.save(),n.nextLine()}else a.text.length<=e.options.maxHighlightLength&&Ys(e,a.text,n),a.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>i)return Ki(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),o.length&&Jt(e,function(){for(var a=0;a<o.length;a++)tn(e,o[a],"text")})}}var $o=function(e,t,i){var n=e.display;this.viewport=t,this.visible=Ko(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Tn(e),this.force=i,this.dims=ul(e),this.events=[]};$o.prototype.signal=function(e,t){It(e,t)&&this.events.push(arguments)},$o.prototype.finish=function(){for(var e=0;e<this.events.length;e++)it.apply(null,this.events[e])};function wp(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Lr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Lr(e)+"px",t.scrollbarsClipped=!0)}function xp(e){if(e.hasFocus())return null;var t=Le();if(!t||!fe(e.display.lineDiv,t))return null;var i={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&fe(e.display.lineDiv,n.anchorNode)&&(i.anchorNode=n.anchorNode,i.anchorOffset=n.anchorOffset,i.focusNode=n.focusNode,i.focusOffset=n.focusOffset)}return i}function kp(e){if(!(!e||!e.activeElt||e.activeElt==Le())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&fe(document.body,e.anchorNode)&&fe(document.body,e.focusNode))){var t=window.getSelection(),i=document.createRange();i.setEnd(e.anchorNode,e.anchorOffset),i.collapse(!1),t.removeAllRanges(),t.addRange(i),t.extend(e.focusNode,e.focusOffset)}}function yl(e,t){var i=e.display,n=e.doc;if(t.editorIsHidden)return rn(e),!1;if(!t.force&&t.visible.from>=i.viewFrom&&t.visible.to<=i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&Lu(e)==0)return!1;Iu(e)&&(rn(e),t.dims=ul(e));var o=n.first+n.size,a=Math.max(t.visible.from-e.options.viewportMargin,n.first),c=Math.min(o,t.visible.to+e.options.viewportMargin);i.viewFrom<a&&a-i.viewFrom<20&&(a=Math.max(n.first,i.viewFrom)),i.viewTo>c&&i.viewTo-c<20&&(c=Math.min(o,i.viewTo)),Wr&&(a=Qs(e.doc,a),c=nu(e.doc,c));var h=a!=i.viewFrom||c!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;sp(e,a,c),i.viewOffset=Br(Se(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var p=Lu(e);if(!h&&p==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var m=xp(e);return p>4&&(i.lineDiv.style.display="none"),Sp(e,i.updateLineNumbers,t.dims),p>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,kp(m),U(i.cursorDiv),U(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,h&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,Ki(e,400)),i.updateLineNumbers=null,!0}function Du(e,t){for(var i=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Tn(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+rl(e.display)-nl(e),i.top)}),t.visible=Ko(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Ko(e.display,e.doc,i));if(!yl(e,t))break;Uo(e);var o=ji(e);Hi(e),ei(e,o),xl(e,o),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 bl(e,t){var i=new $o(e,t);if(yl(e,i)){Uo(e),Du(e,i);var n=ji(e);Hi(e),ei(e,n),xl(e,n),i.finish()}}function Sp(e,t,i){var n=e.display,o=e.options.lineNumbers,a=n.lineDiv,c=a.firstChild;function h($){var Z=$.nextSibling;return C&&te&&e.display.currentWheelTarget==$?$.style.display="none":$.parentNode.removeChild($),Z}for(var p=n.view,m=n.viewFrom,S=0;S<p.length;S++){var _=p[S];if(!_.hidden)if(!_.node||_.node.parentNode!=a){var R=Zh(e,_,m,i);a.insertBefore(R,c)}else{for(;c!=_.node;)c=h(c);var M=o&&t!=null&&t<=m&&_.lineNumber;_.changes&&(W(_.changes,"gutter")>-1&&(M=!1),au(e,_,m,i)),M&&(U(_.lineNumber),_.lineNumber.appendChild(document.createTextNode($n(e.options,m)))),c=_.node.nextSibling}m+=_.size}for(;c;)c=h(c)}function wl(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Ct(e,"gutterChanged",e)}function xl(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+Lr(e)+"px"}function Fu(e){var t=e.display,i=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var n=fl(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,a=n+"px",c=0;c<i.length;c++)if(!i[c].hidden){e.options.fixedGutter&&(i[c].gutter&&(i[c].gutter.style.left=a),i[c].gutterBackground&&(i[c].gutterBackground.style.left=a));var h=i[c].alignable;if(h)for(var p=0;p<h.length;p++)h[p].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=n+o+"px")}}function Iu(e){if(!e.options.lineNumbers)return!1;var t=e.doc,i=$n(e.options,t.first+t.size-1),n=e.display;if(i.length!=n.lineNumChars){var o=n.measure.appendChild(w("div",[w("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=o.firstChild.offsetWidth,c=o.offsetWidth-a;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(a,n.lineGutter.offsetWidth-c)+1,n.lineNumWidth=n.lineNumInnerWidth+c,n.lineNumChars=n.lineNumInnerWidth?i.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",wl(e.display),!0}return!1}function kl(e,t){for(var i=[],n=!1,o=0;o<e.length;o++){var a=e[o],c=null;if(typeof a!="string"&&(c=a.style,a=a.className),a=="CodeMirror-linenumbers")if(t)n=!0;else continue;i.push({className:a,style:c})}return t&&!n&&i.push({className:"CodeMirror-linenumbers",style:null}),i}function Hu(e){var t=e.gutters,i=e.gutterSpecs;U(t),e.lineGutter=null;for(var n=0;n<i.length;++n){var o=i[n],a=o.className,c=o.style,h=t.appendChild(w("div",null,"CodeMirror-gutter "+a));c&&(h.style.cssText=c),a=="CodeMirror-linenumbers"&&(e.lineGutter=h,h.style.width=(e.lineNumWidth||1)+"px")}t.style.display=i.length?"":"none",wl(e)}function qi(e){Hu(e.display),Ut(e),Fu(e)}function Cp(e,t,i,n){var o=this;this.input=i,o.scrollbarFiller=w("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=w("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=Q("div",null,"CodeMirror-code"),o.selectionDiv=w("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=w("div",null,"CodeMirror-cursors"),o.measure=w("div",null,"CodeMirror-measure"),o.lineMeasure=w("div",null,"CodeMirror-measure"),o.lineSpace=Q("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var a=Q("div",[o.lineSpace],"CodeMirror-lines");o.mover=w("div",[a],null,"position: relative"),o.sizer=w("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=w("div",null,null,"position: absolute; height: "+oe+"px; width: 1px;"),o.gutters=w("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=w("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=w("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),o.wrapper.setAttribute("translate","no"),y&&x<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),!C&&!(f&&K)&&(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=kl(n.gutters,n.lineNumbers),Hu(o),i.init(o)}var Go=0,Ur=null;y?Ur=-.53:f?Ur=15:O?Ur=-.7:ee&&(Ur=-1/3);function Wu(e){var t=e.wheelDeltaX,i=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),i==null&&e.detail&&e.axis==e.VERTICAL_AXIS?i=e.detail:i==null&&(i=e.wheelDelta),{x:t,y:i}}function _p(e){var t=Wu(e);return t.x*=Ur,t.y*=Ur,t}function Bu(e,t){O&&A>=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 i=Wu(t),n=i.x,o=i.y,a=Ur;t.deltaMode===0&&(n=t.deltaX,o=t.deltaY,a=1);var c=e.display,h=c.scroller,p=h.scrollWidth>h.clientWidth,m=h.scrollHeight>h.clientHeight;if(!!(n&&p||o&&m)){if(o&&te&&C){e:for(var S=t.target,_=c.view;S!=h;S=S.parentNode)for(var R=0;R<_.length;R++)if(_[R].node==S){e.display.currentWheelTarget=S;break e}}if(n&&!f&&!I&&a!=null){o&&m&&Bi(e,Math.max(0,h.scrollTop+o*a)),Mn(e,Math.max(0,h.scrollLeft+n*a)),(!o||o&&m)&&St(t),c.wheelStartX=null;return}if(o&&a!=null){var M=o*a,$=e.doc.scrollTop,Z=$+c.wrapper.clientHeight;M<0?$=Math.max(0,$+M-50):Z=Math.min(e.doc.height,Z+M+50),bl(e,{top:$,bottom:Z})}Go<20&&t.deltaMode!==0&&(c.wheelStartX==null?(c.wheelStartX=h.scrollLeft,c.wheelStartY=h.scrollTop,c.wheelDX=n,c.wheelDY=o,setTimeout(function(){if(c.wheelStartX!=null){var se=h.scrollLeft-c.wheelStartX,ge=h.scrollTop-c.wheelStartY,be=ge&&c.wheelDY&&ge/c.wheelDY||se&&c.wheelDX&&se/c.wheelDX;c.wheelStartX=c.wheelStartY=null,be&&(Ur=(Ur*Go+be)/(Go+1),++Go)}},200)):(c.wheelDX+=n,c.wheelDY+=o))}}var or=function(e,t){this.ranges=e,this.primIndex=t};or.prototype.primary=function(){return this.ranges[this.primIndex]},or.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 i=this.ranges[t],n=e.ranges[t];if(!X(i.anchor,n.anchor)||!X(i.head,n.head))return!1}return!0},or.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Ze(ie(this.ranges[t].anchor),ie(this.ranges[t].head));return new or(e,this.primIndex)},or.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},or.prototype.contains=function(e,t){t||(t=e);for(var i=0;i<this.ranges.length;i++){var n=this.ranges[i];if(k(t,n.from())>=0&&k(e,n.to())<=0)return i}return-1};var Ze=function(e,t){this.anchor=e,this.head=t};Ze.prototype.from=function(){return qe(this.anchor,this.head)},Ze.prototype.to=function(){return De(this.anchor,this.head)},Ze.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function gr(e,t,i){var n=e&&e.options.selectionsMayTouch,o=t[i];t.sort(function(R,M){return k(R.from(),M.from())}),i=W(t,o);for(var a=1;a<t.length;a++){var c=t[a],h=t[a-1],p=k(h.to(),c.from());if(n&&!c.empty()?p>0:p>=0){var m=qe(h.from(),c.from()),S=De(h.to(),c.to()),_=h.empty()?c.from()==c.head:h.from()==h.head;a<=i&&--i,t.splice(--a,2,new Ze(_?S:m,_?m:S))}}return new or(t,i)}function nn(e,t){return new or([new Ze(e,t||e)],0)}function on(e){return e.text?g(e.from.line+e.text.length-1,H(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function ju(e,t){if(k(e,t.from)<0)return e;if(k(e,t.to)<=0)return on(t);var i=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=on(t).ch-t.to.ch),g(i,n)}function Sl(e,t){for(var i=[],n=0;n<e.sel.ranges.length;n++){var o=e.sel.ranges[n];i.push(new Ze(ju(o.anchor,t),ju(o.head,t)))}return gr(e.cm,i,e.sel.primIndex)}function Uu(e,t,i){return e.line==t.line?g(i.line,e.ch-t.ch+i.ch):g(i.line+(e.line-t.line),e.ch)}function Tp(e,t,i){for(var n=[],o=g(e.first,0),a=o,c=0;c<t.length;c++){var h=t[c],p=Uu(h.from,o,a),m=Uu(on(h),o,a);if(o=h.to,a=m,i=="around"){var S=e.sel.ranges[c],_=k(S.head,S.anchor)<0;n[c]=new Ze(_?m:p,_?p:m)}else n[c]=new Ze(p,p)}return new or(n,e.sel.primIndex)}function Cl(e){e.doc.mode=Vr(e.options,e.doc.modeOption),$i(e)}function $i(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Ki(e,100),e.state.modeGen++,e.curOp&&Ut(e)}function Ku(e,t){return t.from.ch==0&&t.to.ch==0&&H(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function _l(e,t,i,n){function o(be){return i?i[be]:null}function a(be,ve,xe){zh(be,ve,xe,n),Ct(be,"change",be,t)}function c(be,ve){for(var xe=[],Ae=be;Ae<ve;++Ae)xe.push(new Gn(m[Ae],o(Ae),n));return xe}var h=t.from,p=t.to,m=t.text,S=Se(e,h.line),_=Se(e,p.line),R=H(m),M=o(m.length-1),$=p.line-h.line;if(t.full)e.insert(0,c(0,m.length)),e.remove(m.length,e.size-m.length);else if(Ku(e,t)){var Z=c(0,m.length-1);a(_,_.text,M),$&&e.remove(h.line,$),Z.length&&e.insert(h.line,Z)}else if(S==_)if(m.length==1)a(S,S.text.slice(0,h.ch)+R+S.text.slice(p.ch),M);else{var se=c(1,m.length-1);se.push(new Gn(R+S.text.slice(p.ch),M,n)),a(S,S.text.slice(0,h.ch)+m[0],o(0)),e.insert(h.line+1,se)}else if(m.length==1)a(S,S.text.slice(0,h.ch)+m[0]+_.text.slice(p.ch),o(0)),e.remove(h.line+1,$);else{a(S,S.text.slice(0,h.ch)+m[0],o(0)),a(_,R+_.text.slice(p.ch),M);var ge=c(1,m.length-1);$>1&&e.remove(h.line+1,$-1),e.insert(h.line+1,ge)}Ct(e,"change",e,t)}function sn(e,t,i){function n(o,a,c){if(o.linked)for(var h=0;h<o.linked.length;++h){var p=o.linked[h];if(p.doc!=a){var m=c&&p.sharedHist;i&&!m||(t(p.doc,m),n(p.doc,o,m))}}}n(e,null,!0)}function qu(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,cl(e),Cl(e),$u(e),e.options.direction=t.direction,e.options.lineWrapping||el(e),e.options.mode=t.modeOption,Ut(e)}function $u(e){(e.doc.direction=="rtl"?Ke:Ee)(e.display.lineDiv,"CodeMirror-rtl")}function Lp(e){Jt(e,function(){$u(e),Ut(e)})}function Yo(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 Tl(e,t){var i={from:ie(t.from),to:on(t),text:Ir(e,t.from,t.to)};return Xu(e,i,t.from.line,t.to.line+1),sn(e,function(n){return Xu(n,i,t.from.line,t.to.line+1)},!0),i}function Gu(e){for(;e.length;){var t=H(e);if(t.ranges)e.pop();else break}}function Pp(e,t){if(t)return Gu(e.done),H(e.done);if(e.done.length&&!H(e.done).ranges)return H(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),H(e.done)}function Yu(e,t,i,n){var o=e.history;o.undone.length=0;var a=+new Date,c,h;if((o.lastOp==n||o.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&o.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(c=Pp(o,o.lastOp==n)))h=H(c.changes),k(t.from,t.to)==0&&k(t.from,h.to)==0?h.to=on(t):c.changes.push(Tl(e,t));else{var p=H(o.done);for((!p||!p.ranges)&&Xo(e.sel,o.done),c={changes:[Tl(e,t)],generation:o.generation},o.done.push(c);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(i),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=a,o.lastOp=o.lastSelOp=n,o.lastOrigin=o.lastSelOrigin=t.origin,h||it(e,"historyAdded")}function Op(e,t,i,n){var o=t.charAt(0);return o=="*"||o=="+"&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Mp(e,t,i,n){var o=e.history,a=n&&n.origin;i==o.lastSelOp||a&&o.lastSelOrigin==a&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==a||Op(e,a,H(o.done),t))?o.done[o.done.length-1]=t:Xo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=a,o.lastSelOp=i,n&&n.clearRedo!==!1&&Gu(o.undone)}function Xo(e,t){var i=H(t);i&&i.ranges&&i.equals(e)||t.push(e)}function Xu(e,t,i,n){var o=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,n),function(c){c.markedSpans&&((o||(o=t["spans_"+e.id]={}))[a]=c.markedSpans),++a})}function Ep(e){if(!e)return null;for(var t,i=0;i<e.length;++i)e[i].marker.explicitlyCleared?t||(t=e.slice(0,i)):t&&t.push(e[i]);return t?t.length?t:null:e}function Ap(e,t){var i=t["spans_"+e.id];if(!i)return null;for(var n=[],o=0;o<t.text.length;++o)n.push(Ep(i[o]));return n}function Zu(e,t){var i=Ap(e,t),n=Zs(e,t);if(!i)return n;if(!n)return i;for(var o=0;o<i.length;++o){var a=i[o],c=n[o];if(a&&c){e:for(var h=0;h<c.length;++h){for(var p=c[h],m=0;m<a.length;++m)if(a[m].marker==p.marker)continue e;a.push(p)}}else c&&(i[o]=c)}return i}function ti(e,t,i){for(var n=[],o=0;o<e.length;++o){var a=e[o];if(a.ranges){n.push(i?or.prototype.deepCopy.call(a):a);continue}var c=a.changes,h=[];n.push({changes:h});for(var p=0;p<c.length;++p){var m=c[p],S=void 0;if(h.push({from:m.from,to:m.to,text:m.text}),t)for(var _ in m)(S=_.match(/^spans_(\d+)$/))&&W(t,Number(S[1]))>-1&&(H(h)[_]=m[_],delete m[_])}}return n}function Ll(e,t,i,n){if(n){var o=e.anchor;if(i){var a=k(t,o)<0;a!=k(i,o)<0?(o=t,t=i):a!=k(t,i)<0&&(t=i)}return new Ze(o,t)}else return new Ze(i||t,t)}function Zo(e,t,i,n,o){o==null&&(o=e.cm&&(e.cm.display.shift||e.extend)),Rt(e,new or([Ll(e.sel.primary(),t,i,o)],0),n)}function Ju(e,t,i){for(var n=[],o=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)n[a]=Ll(e.sel.ranges[a],t[a],null,o);var c=gr(e.cm,n,e.sel.primIndex);Rt(e,c,i)}function Pl(e,t,i,n){var o=e.sel.ranges.slice(0);o[t]=i,Rt(e,gr(e.cm,o,e.sel.primIndex),n)}function Qu(e,t,i,n){Rt(e,nn(t,i),n)}function Np(e,t,i){var n={ranges:t.ranges,update:function(o){this.ranges=[];for(var a=0;a<o.length;a++)this.ranges[a]=new Ze(Ce(e,o[a].anchor),Ce(e,o[a].head))},origin:i&&i.origin};return it(e,"beforeSelectionChange",e,n),e.cm&&it(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?gr(e.cm,n.ranges,n.ranges.length-1):t}function Vu(e,t,i){var n=e.history.done,o=H(n);o&&o.ranges?(n[n.length-1]=t,Jo(e,t,i)):Rt(e,t,i)}function Rt(e,t,i){Jo(e,t,i),Mp(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}function Jo(e,t,i){(It(e,"beforeSelectionChange")||e.cm&&It(e.cm,"beforeSelectionChange"))&&(t=Np(e,t,i));var n=i&&i.bias||(k(t.primary().head,e.sel.primary().head)<0?-1:1);ef(e,rf(e,t,n,!0)),!(i&&i.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Vn(e.cm)}function ef(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Jr(e.cm)),Ct(e,"cursorActivity",e))}function tf(e){ef(e,rf(e,e.sel,null,!1))}function rf(e,t,i,n){for(var o,a=0;a<t.ranges.length;a++){var c=t.ranges[a],h=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],p=Qo(e,c.anchor,h&&h.anchor,i,n),m=Qo(e,c.head,h&&h.head,i,n);(o||p!=c.anchor||m!=c.head)&&(o||(o=t.ranges.slice(0,a)),o[a]=new Ze(p,m))}return o?gr(e.cm,o,t.primIndex):t}function ri(e,t,i,n,o){var a=Se(e,t.line);if(a.markedSpans)for(var c=0;c<a.markedSpans.length;++c){var h=a.markedSpans[c],p=h.marker,m="selectLeft"in p?!p.selectLeft:p.inclusiveLeft,S="selectRight"in p?!p.selectRight:p.inclusiveRight;if((h.from==null||(m?h.from<=t.ch:h.from<t.ch))&&(h.to==null||(S?h.to>=t.ch:h.to>t.ch))){if(o&&(it(p,"beforeCursorEnter"),p.explicitlyCleared))if(a.markedSpans){--c;continue}else break;if(!p.atomic)continue;if(i){var _=p.find(n<0?1:-1),R=void 0;if((n<0?S:m)&&(_=nf(e,_,-n,_&&_.line==t.line?a:null)),_&&_.line==t.line&&(R=k(_,i))&&(n<0?R<0:R>0))return ri(e,_,t,n,o)}var M=p.find(n<0?-1:1);return(n<0?m:S)&&(M=nf(e,M,n,M.line==t.line?a:null)),M?ri(e,M,t,n,o):null}}return t}function Qo(e,t,i,n,o){var a=n||1,c=ri(e,t,i,a,o)||!o&&ri(e,t,i,a,!0)||ri(e,t,i,-a,o)||!o&&ri(e,t,i,-a,!0);return c||(e.cantEdit=!0,g(e.first,0))}function nf(e,t,i,n){return i<0&&t.ch==0?t.line>e.first?Ce(e,g(t.line-1)):null:i>0&&t.ch==(n||Se(e,t.line)).text.length?t.line<e.first+e.size-1?g(t.line+1,0):null:new g(t.line,t.ch+i)}function of(e){e.setSelection(g(e.firstLine(),0),g(e.lastLine()),we)}function sf(e,t,i){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return i&&(n.update=function(o,a,c,h){o&&(n.from=Ce(e,o)),a&&(n.to=Ce(e,a)),c&&(n.text=c),h!==void 0&&(n.origin=h)}),it(e,"beforeChange",e,n),e.cm&&it(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function ni(e,t,i){if(e.cm){if(!e.cm.curOp)return _t(e.cm,ni)(e,t,i);if(e.cm.state.suppressEdits)return}if(!((It(e,"beforeChange")||e.cm&&It(e.cm,"beforeChange"))&&(t=sf(e,t,!0),!t))){var n=Za&&!i&&Mh(e,t.from,t.to);if(n)for(var o=n.length-1;o>=0;--o)lf(e,{from:n[o].from,to:n[o].to,text:o?[""]:t.text,origin:t.origin});else lf(e,t)}}function lf(e,t){if(!(t.text.length==1&&t.text[0]==""&&k(t.from,t.to)==0)){var i=Sl(e,t);Yu(e,t,i,e.cm?e.cm.curOp.id:NaN),Gi(e,t,i,Zs(e,t));var n=[];sn(e,function(o,a){!a&&W(n,o.history)==-1&&(cf(o.history,t),n.push(o.history)),Gi(o,t,null,Zs(o,t))})}}function Vo(e,t,i){var n=e.cm&&e.cm.state.suppressEdits;if(!(n&&!i)){for(var o=e.history,a,c=e.sel,h=t=="undo"?o.done:o.undone,p=t=="undo"?o.undone:o.done,m=0;m<h.length&&(a=h[m],!(i?a.ranges&&!a.equals(e.sel):!a.ranges));m++);if(m!=h.length){for(o.lastOrigin=o.lastSelOrigin=null;;)if(a=h.pop(),a.ranges){if(Xo(a,p),i&&!a.equals(e.sel)){Rt(e,a,{clearRedo:!1});return}c=a}else if(n){h.push(a);return}else break;var S=[];Xo(c,p),p.push({changes:S,generation:o.generation}),o.generation=a.generation||++o.maxGeneration;for(var _=It(e,"beforeChange")||e.cm&&It(e.cm,"beforeChange"),R=function(Z){var se=a.changes[Z];if(se.origin=t,_&&!sf(e,se,!1))return h.length=0,{};S.push(Tl(e,se));var ge=Z?Sl(e,se):H(h);Gi(e,se,ge,Zu(e,se)),!Z&&e.cm&&e.cm.scrollIntoView({from:se.from,to:on(se)});var be=[];sn(e,function(ve,xe){!xe&&W(be,ve.history)==-1&&(cf(ve.history,se),be.push(ve.history)),Gi(ve,se,null,Zu(ve,se))})},M=a.changes.length-1;M>=0;--M){var $=R(M);if($)return $.v}}}}function af(e,t){if(t!=0&&(e.first+=t,e.sel=new or(Y(e.sel.ranges,function(o){return new Ze(g(o.anchor.line+t,o.anchor.ch),g(o.head.line+t,o.head.ch))}),e.sel.primIndex),e.cm)){Ut(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,n=i.viewFrom;n<i.viewTo;n++)tn(e.cm,n,"gutter")}}function Gi(e,t,i,n){if(e.cm&&!e.cm.curOp)return _t(e.cm,Gi)(e,t,i,n);if(t.to.line<e.first){af(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 o=t.text.length-1-(e.first-t.from.line);af(e,o),t={from:g(e.first,0),to:g(t.to.line+o,t.to.ch),text:[H(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:g(a,Se(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ir(e,t.from,t.to),i||(i=Sl(e,t)),e.cm?zp(e.cm,t,n):_l(e,t,n),Jo(e,i,we),e.cantEdit&&Qo(e,g(e.firstLine(),0))&&(e.cantEdit=!1)}}function zp(e,t,i){var n=e.doc,o=e.display,a=t.from,c=t.to,h=!1,p=a.line;e.options.lineWrapping||(p=Xe(hr(Se(n,a.line))),n.iter(p,c.line+1,function(M){if(M==o.maxLine)return h=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Jr(e),_l(n,t,i,Tu(e)),e.options.lineWrapping||(n.iter(p,a.line+t.text.length,function(M){var $=Do(M);$>o.maxLineLength&&(o.maxLine=M,o.maxLineLength=$,o.maxLineChanged=!0,h=!1)}),h&&(e.curOp.updateMaxLine=!0)),Sh(n,a.line),Ki(e,400);var m=t.text.length-(c.line-a.line)-1;t.full?Ut(e):a.line==c.line&&t.text.length==1&&!Ku(e.doc,t)?tn(e,a.line,"text"):Ut(e,a.line,c.line+1,m);var S=It(e,"changes"),_=It(e,"change");if(_||S){var R={from:a,to:c,text:t.text,removed:t.removed,origin:t.origin};_&&Ct(e,"change",e,R),S&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(R)}e.display.selForContextMenu=null}function ii(e,t,i,n,o){var a;n||(n=i),k(n,i)<0&&(a=[n,i],i=a[0],n=a[1]),typeof t=="string"&&(t=e.splitLines(t)),ni(e,{from:i,to:n,text:t,origin:o})}function uf(e,t,i,n){i<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function ff(e,t,i,n){for(var o=0;o<e.length;++o){var a=e[o],c=!0;if(a.ranges){a.copied||(a=e[o]=a.deepCopy(),a.copied=!0);for(var h=0;h<a.ranges.length;h++)uf(a.ranges[h].anchor,t,i,n),uf(a.ranges[h].head,t,i,n);continue}for(var p=0;p<a.changes.length;++p){var m=a.changes[p];if(i<m.from.line)m.from=g(m.from.line+n,m.from.ch),m.to=g(m.to.line+n,m.to.ch);else if(t<=m.to.line){c=!1;break}}c||(e.splice(0,o+1),o=0)}}function cf(e,t){var i=t.from.line,n=t.to.line,o=t.text.length-(n-i)-1;ff(e.done,i,n,o),ff(e.undone,i,n,o)}function Yi(e,t,i,n){var o=t,a=t;return typeof t=="number"?a=Se(e,Je(e,t)):o=Xe(t),o==null?null:(n(a,o)&&e.cm&&tn(e.cm,o,i),a)}function Xi(e){this.lines=e,this.parent=null;for(var t=0,i=0;i<e.length;++i)e[i].parent=this,t+=e[i].height;this.height=t}Xi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var i=e,n=e+t;i<n;++i){var o=this.lines[i];this.height-=o.height,Rh(o),Ct(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,i){this.height+=i,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,i){for(var n=e+t;e<n;++e)if(i(this.lines[e]))return!0}};function Zi(e){this.children=e;for(var t=0,i=0,n=0;n<e.length;++n){var o=e[n];t+=o.chunkSize(),i+=o.height,o.parent=this}this.size=t,this.height=i,this.parent=null}Zi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var i=0;i<this.children.length;++i){var n=this.children[i],o=n.chunkSize();if(e<o){var a=Math.min(t,o-e),c=n.height;if(n.removeInner(e,a),this.height-=c-n.height,o==a&&(this.children.splice(i--,1),n.parent=null),(t-=a)==0)break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Xi))){var h=[];this.collapse(h),this.children=[new Xi(h)],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,i){this.size+=t.length,this.height+=i;for(var n=0;n<this.children.length;++n){var o=this.children[n],a=o.chunkSize();if(e<=a){if(o.insertInner(e,t,i),o.lines&&o.lines.length>50){for(var c=o.lines.length%25+25,h=c;h<o.lines.length;){var p=new Xi(o.lines.slice(h,h+=25));o.height-=p.height,this.children.splice(++n,0,p),p.parent=this}o.lines=o.lines.slice(0,c),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),i=new Zi(t);if(e.parent){e.size-=i.size,e.height-=i.height;var o=W(e.parent.children,e);e.parent.children.splice(o+1,0,i)}else{var n=new Zi(e.children);n.parent=e,e.children=[n,i],e=n}i.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,i){for(var n=0;n<this.children.length;++n){var o=this.children[n],a=o.chunkSize();if(e<a){var c=Math.min(t,a-e);if(o.iterN(e,c,i))return!0;if((t-=c)==0)break;e=0}else e-=a}}};var Ji=function(e,t,i){if(i)for(var n in i)i.hasOwnProperty(n)&&(this[n]=i[n]);this.doc=e,this.node=t};Ji.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,i=this.line,n=Xe(i);if(!(n==null||!t)){for(var o=0;o<t.length;++o)t[o]==this&&t.splice(o--,1);t.length||(i.widgets=null);var a=Fi(this);cr(i,Math.max(0,i.height-a)),e&&(Jt(e,function(){df(e,i,-a),tn(e,n,"widget")}),Ct(e,"lineWidgetCleared",e,this,n))}},Ji.prototype.changed=function(){var e=this,t=this.height,i=this.doc.cm,n=this.line;this.height=null;var o=Fi(this)-t;!o||(en(this.doc,n)||cr(n,n.height+o),i&&Jt(i,function(){i.curOp.forceUpdate=!0,df(i,n,o),Ct(i,"lineWidgetChanged",i,e,Xe(n))}))},Qr(Ji);function df(e,t,i){Br(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ml(e,i)}function Rp(e,t,i,n){var o=new Ji(e,i,n),a=e.cm;return a&&o.noHScroll&&(a.display.alignWidgets=!0),Yi(e,t,"widget",function(c){var h=c.widgets||(c.widgets=[]);if(o.insertAt==null?h.push(o):h.splice(Math.min(h.length,Math.max(0,o.insertAt)),0,o),o.line=c,a&&!en(e,c)){var p=Br(c)<e.scrollTop;cr(c,c.height+Fi(o)),p&&ml(a,o.height),a.curOp.forceUpdate=!0}return!0}),a&&Ct(a,"lineWidgetAdded",a,o,typeof t=="number"?t:Xe(t)),o}var hf=0,ln=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++hf};ln.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&An(e),It(this,"clear")){var i=this.find();i&&Ct(this,"clear",i.from,i.to)}for(var n=null,o=null,a=0;a<this.lines.length;++a){var c=this.lines[a],h=zi(c.markedSpans,this);e&&!this.collapsed?tn(e,Xe(c),"text"):e&&(h.to!=null&&(o=Xe(c)),h.from!=null&&(n=Xe(c))),c.markedSpans=Th(c.markedSpans,h),h.from==null&&this.collapsed&&!en(this.doc,c)&&e&&cr(c,Zn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var p=0;p<this.lines.length;++p){var m=hr(this.lines[p]),S=Do(m);S>e.display.maxLineLength&&(e.display.maxLine=m,e.display.maxLineLength=S,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Ut(e,n,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&tf(e.doc)),e&&Ct(e,"markerCleared",e,this,n,o),t&&Nn(e),this.parent&&this.parent.clear()}},ln.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var i,n,o=0;o<this.lines.length;++o){var a=this.lines[o],c=zi(a.markedSpans,this);if(c.from!=null&&(i=g(t?a:Xe(a),c.from),e==-1))return i;if(c.to!=null&&(n=g(t?a:Xe(a),c.to),e==1))return n}return i&&{from:i,to:n}},ln.prototype.changed=function(){var e=this,t=this.find(-1,!0),i=this,n=this.doc.cm;!t||!n||Jt(n,function(){var o=t.line,a=Xe(t.line),c=il(n,a);if(c&&(yu(c),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!en(i.doc,o)&&i.height!=null){var h=i.height;i.height=null;var p=Fi(i)-h;p&&cr(o,o.height+p)}Ct(n,"markerChanged",n,e)})},ln.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||W(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ln.prototype.detachLine=function(e){if(this.lines.splice(W(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Qr(ln);function oi(e,t,i,n,o){if(n&&n.shared)return Dp(e,t,i,n,o);if(e.cm&&!e.cm.curOp)return _t(e.cm,oi)(e,t,i,n,o);var a=new ln(e,o),c=k(t,i);if(n&&at(n,a,!1),c>0||c==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=Q("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ru(e,t.line,t,i,a)||t.line!=i.line&&ru(e,i.line,t,i,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");_h()}a.addToHistory&&Yu(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var h=t.line,p=e.cm,m;if(e.iter(h,i.line+1,function(_){p&&a.collapsed&&!p.options.lineWrapping&&hr(_)==p.display.maxLine&&(m=!0),a.collapsed&&h!=t.line&&cr(_,0),Lh(_,new Ao(a,h==t.line?t.ch:null,h==i.line?i.ch:null),e.cm&&e.cm.curOp),++h}),a.collapsed&&e.iter(t.line,i.line+1,function(_){en(e,_)&&cr(_,0)}),a.clearOnEnter&&Oe(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Ch(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++hf,a.atomic=!0),p){if(m&&(p.curOp.updateMaxLine=!0),a.collapsed)Ut(p,t.line,i.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var S=t.line;S<=i.line;S++)tn(p,S,"text");a.atomic&&tf(p.doc),Ct(p,"markerAdded",p,a)}return a}var Qi=function(e,t){this.markers=e,this.primary=t;for(var i=0;i<e.length;++i)e[i].parent=this};Qi.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Ct(this,"clear")}},Qi.prototype.find=function(e,t){return this.primary.find(e,t)},Qr(Qi);function Dp(e,t,i,n,o){n=at(n),n.shared=!1;var a=[oi(e,t,i,n,o)],c=a[0],h=n.widgetNode;return sn(e,function(p){h&&(n.widgetNode=h.cloneNode(!0)),a.push(oi(p,Ce(p,t),Ce(p,i),n,o));for(var m=0;m<p.linked.length;++m)if(p.linked[m].isParent)return;c=H(a)}),new Qi(a,c)}function pf(e){return e.findMarks(g(e.first,0),e.clipPos(g(e.lastLine())),function(t){return t.parent})}function Fp(e,t){for(var i=0;i<t.length;i++){var n=t[i],o=n.find(),a=e.clipPos(o.from),c=e.clipPos(o.to);if(k(a,c)){var h=oi(e,a,c,n.primary,n.primary.type);n.markers.push(h),h.parent=n}}}function Ip(e){for(var t=function(n){var o=e[n],a=[o.primary.doc];sn(o.primary.doc,function(p){return a.push(p)});for(var c=0;c<o.markers.length;c++){var h=o.markers[c];W(a,h.doc)==-1&&(h.parent=null,o.markers.splice(c--,1))}},i=0;i<e.length;i++)t(i)}var Hp=0,Kt=function(e,t,i,n,o){if(!(this instanceof Kt))return new Kt(e,t,i,n,o);i==null&&(i=0),Zi.call(this,[new Xi([new Gn("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var a=g(i,0);this.sel=nn(a),this.history=new Yo(null),this.id=++Hp,this.modeOption=t,this.lineSep=n,this.direction=o=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),_l(this,{from:a,to:a,text:e}),Rt(this,nn(a),we)};Kt.prototype=ue(Zi.prototype,{constructor:Kt,iter:function(e,t,i){i?this.iterN(e-this.first,t-e,i):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var i=0,n=0;n<t.length;++n)i+=t[n].height;this.insertInner(e-this.first,t,i)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Cn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Tt(function(e){var t=g(this.first,0),i=this.first+this.size-1;ni(this,{from:t,to:g(i,Se(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Wi(this.cm,0,0),Rt(this,nn(t),we)}),replaceRange:function(e,t,i,n){t=Ce(this,t),i=i?Ce(this,i):t,ii(this,e,t,i,n)},getRange:function(e,t,i){var n=Ir(this,Ce(this,e),Ce(this,t));return i===!1?n:i===""?n.join(""):n.join(i||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(_n(this,e))return Se(this,e)},getLineNumber:function(e){return Xe(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Se(this,e)),hr(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Ce(this,e)},getCursor:function(e){var t=this.sel.primary(),i;return e==null||e=="head"?i=t.head:e=="anchor"?i=t.anchor:e=="end"||e=="to"||e===!1?i=t.to():i=t.from(),i},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Tt(function(e,t,i){Qu(this,Ce(this,typeof e=="number"?g(e,t||0):e),null,i)}),setSelection:Tt(function(e,t,i){Qu(this,Ce(this,e),Ce(this,t||e),i)}),extendSelection:Tt(function(e,t,i){Zo(this,Ce(this,e),t&&Ce(this,t),i)}),extendSelections:Tt(function(e,t){Ju(this,Mo(this,e),t)}),extendSelectionsBy:Tt(function(e,t){var i=Y(this.sel.ranges,e);Ju(this,Mo(this,i),t)}),setSelections:Tt(function(e,t,i){if(!!e.length){for(var n=[],o=0;o<e.length;o++)n[o]=new Ze(Ce(this,e[o].anchor),Ce(this,e[o].head||e[o].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Rt(this,gr(this.cm,n,t),i)}}),addSelection:Tt(function(e,t,i){var n=this.sel.ranges.slice(0);n.push(new Ze(Ce(this,e),Ce(this,t||e))),Rt(this,gr(this.cm,n,n.length-1),i)}),getSelection:function(e){for(var t=this.sel.ranges,i,n=0;n<t.length;n++){var o=Ir(this,t[n].from(),t[n].to());i=i?i.concat(o):o}return e===!1?i:i.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],i=this.sel.ranges,n=0;n<i.length;n++){var o=Ir(this,i[n].from(),i[n].to());e!==!1&&(o=o.join(e||this.lineSeparator())),t[n]=o}return t},replaceSelection:function(e,t,i){for(var n=[],o=0;o<this.sel.ranges.length;o++)n[o]=e;this.replaceSelections(n,t,i||"+input")},replaceSelections:Tt(function(e,t,i){for(var n=[],o=this.sel,a=0;a<o.ranges.length;a++){var c=o.ranges[a];n[a]={from:c.from(),to:c.to(),text:this.splitLines(e[a]),origin:i}}for(var h=t&&t!="end"&&Tp(this,n,t),p=n.length-1;p>=0;p--)ni(this,n[p]);h?Vu(this,h):this.cm&&Vn(this.cm)}),undo:Tt(function(){Vo(this,"undo")}),redo:Tt(function(){Vo(this,"redo")}),undoSelection:Tt(function(){Vo(this,"undo",!0)}),redoSelection:Tt(function(){Vo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,i=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var o=0;o<e.undone.length;o++)e.undone[o].ranges||++i;return{undo:t,redo:i}},clearHistory:function(){var e=this;this.history=new Yo(this.history),sn(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:ti(this.history.done),undone:ti(this.history.undone)}},setHistory:function(e){var t=this.history=new Yo(this.history);t.done=ti(e.done.slice(0),null,!0),t.undone=ti(e.undone.slice(0),null,!0)},setGutterMarker:Tt(function(e,t,i){return Yi(this,e,"gutter",function(n){var o=n.gutterMarkers||(n.gutterMarkers={});return o[t]=i,!i&&z(o)&&(n.gutterMarkers=null),!0})}),clearGutter:Tt(function(e){var t=this;this.iter(function(i){i.gutterMarkers&&i.gutterMarkers[e]&&Yi(t,i,"gutter",function(){return i.gutterMarkers[e]=null,z(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!_n(this,e)||(t=e,e=Se(this,e),!e))return null}else if(t=Xe(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:Tt(function(e,t,i){return Yi(this,e,t=="gutter"?"gutter":"class",function(n){var o=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[o])n[o]=i;else{if(ce(i).test(n[o]))return!1;n[o]+=" "+i}return!0})}),removeLineClass:Tt(function(e,t,i){return Yi(this,e,t=="gutter"?"gutter":"class",function(n){var o=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",a=n[o];if(a)if(i==null)n[o]=null;else{var c=a.match(ce(i));if(!c)return!1;var h=c.index+c[0].length;n[o]=a.slice(0,c.index)+(!c.index||h==a.length?"":" ")+a.slice(h)||null}else return!1;return!0})}),addLineWidget:Tt(function(e,t,i){return Rp(this,e,t,i)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,i){return oi(this,Ce(this,e),Ce(this,t),i,i&&i.type||"range")},setBookmark:function(e,t){var i={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=Ce(this,e),oi(this,e,e,i,"bookmark")},findMarksAt:function(e){e=Ce(this,e);var t=[],i=Se(this,e.line).markedSpans;if(i)for(var n=0;n<i.length;++n){var o=i[n];(o.from==null||o.from<=e.ch)&&(o.to==null||o.to>=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,i){e=Ce(this,e),t=Ce(this,t);var n=[],o=e.line;return this.iter(e.line,t.line+1,function(a){var c=a.markedSpans;if(c)for(var h=0;h<c.length;h++){var p=c[h];!(p.to!=null&&o==e.line&&e.ch>=p.to||p.from==null&&o!=e.line||p.from!=null&&o==t.line&&p.from>=t.ch)&&(!i||i(p.marker))&&n.push(p.marker.parent||p.marker)}++o}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var i=t.markedSpans;if(i)for(var n=0;n<i.length;++n)i[n].from!=null&&e.push(i[n].marker)}),e},posFromIndex:function(e){var t,i=this.first,n=this.lineSeparator().length;return this.iter(function(o){var a=o.text.length+n;if(a>e)return t=e,!0;e-=a,++i}),Ce(this,g(i,t))},indexFromPos:function(e){e=Ce(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var i=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+i}),t},copy:function(e){var t=new Kt(Cn(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||(e={});var t=this.first,i=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<i&&(i=e.to);var n=new Kt(Cn(this,t,i),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Fp(n,pf(this)),n},unlinkDoc:function(e){if(e instanceof ut&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var i=this.linked[t];if(i.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Ip(pf(this));break}}if(e.history==this.history){var n=[e.id];sn(e,function(o){return n.push(o.id)},!0),e.history=new Yo(null),e.history.done=ti(this.history.done,n),e.history.undone=ti(this.history.undone,n)}},iterLinkedDocs:function(e){sn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Kn(e)},lineSeparator:function(){return this.lineSep||`
11
+ `},setDirection:Tt(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&Lp(this.cm))})}),Kt.prototype.eachLine=Kt.prototype.iter;var gf=0;function Wp(e){var t=this;if(vf(t),!(ht(t,e)||jr(t.display,e))){St(e),y&&(gf=+new Date);var i=Pn(t,e,!0),n=e.dataTransfer.files;if(!(!i||t.isReadOnly()))if(n&&n.length&&window.FileReader&&window.File)for(var o=n.length,a=Array(o),c=0,h=function(){++c==o&&_t(t,function(){i=Ce(t.doc,i);var M={from:i,to:i,text:t.doc.splitLines(a.filter(function($){return $!=null}).join(t.doc.lineSeparator())),origin:"paste"};ni(t.doc,M),Vu(t.doc,nn(Ce(t.doc,i),Ce(t.doc,on(M))))})()},p=function(M,$){if(t.options.allowDropFileTypes&&W(t.options.allowDropFileTypes,M.type)==-1){h();return}var Z=new FileReader;Z.onerror=function(){return h()},Z.onload=function(){var se=Z.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(se)){h();return}a[$]=se,h()},Z.readAsText(M)},m=0;m<n.length;m++)p(n[m],m);else{if(t.state.draggingText&&t.doc.sel.contains(i)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var S=e.dataTransfer.getData("Text");if(S){var _;if(t.state.draggingText&&!t.state.draggingText.copy&&(_=t.listSelections()),Jo(t.doc,nn(i,i)),_)for(var R=0;R<_.length;++R)ii(t.doc,"",_[R].anchor,_[R].head,"drag");t.replaceSelection(S,"around","paste"),t.display.input.focus()}}catch{}}}}function Bp(e,t){if(y&&(!e.state.draggingText||+new Date-gf<100)){kr(t);return}if(!(ht(e,t)||jr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!ee)){var i=w("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",I&&(i.width=i.height=1,e.display.wrapper.appendChild(i),i._top=i.offsetTop),t.dataTransfer.setDragImage(i,0,0),I&&i.parentNode.removeChild(i)}}function jp(e,t){var i=Pn(e,t);if(!!i){var n=document.createDocumentFragment();dl(e,i,n),e.display.dragCursor||(e.display.dragCursor=w("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),le(e.display.dragCursor,n)}}function vf(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function mf(e){if(!!document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),i=[],n=0;n<t.length;n++){var o=t[n].CodeMirror;o&&i.push(o)}i.length&&i[0].operation(function(){for(var a=0;a<i.length;a++)e(i[a])})}}var yf=!1;function Up(){yf||(Kp(),yf=!0)}function Kp(){var e;Oe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,mf(qp)},100))}),Oe(window,"blur",function(){return mf(Qn)})}function qp(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var an={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"},Vi=0;Vi<10;Vi++)an[Vi+48]=an[Vi+96]=String(Vi);for(var es=65;es<=90;es++)an[es]=String.fromCharCode(es);for(var eo=1;eo<=12;eo++)an[eo+111]=an[eo+63235]="F"+eo;var Kr={};Kr.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"},Kr.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"},Kr.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"},Kr.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"]},Kr.default=te?Kr.macDefault:Kr.pcDefault;function $p(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var i,n,o,a,c=0;c<t.length-1;c++){var h=t[c];if(/^(cmd|meta|m)$/i.test(h))a=!0;else if(/^a(lt)?$/i.test(h))i=!0;else if(/^(c|ctrl|control)$/i.test(h))n=!0;else if(/^s(hift)?$/i.test(h))o=!0;else throw new Error("Unrecognized modifier name: "+h)}return i&&(e="Alt-"+e),n&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),o&&(e="Shift-"+e),e}function Gp(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];if(/^(name|fallthrough|(de|at)tach)$/.test(i))continue;if(n=="..."){delete e[i];continue}for(var o=Y(i.split(" "),$p),a=0;a<o.length;a++){var c=void 0,h=void 0;a==o.length-1?(h=o.join(" "),c=n):(h=o.slice(0,a+1).join(" "),c="...");var p=t[h];if(!p)t[h]=c;else if(p!=c)throw new Error("Inconsistent bindings for "+h)}delete e[i]}for(var m in t)e[m]=t[m];return e}function si(e,t,i,n){t=ts(t);var o=t.call?t.call(e,n):t[e];if(o===!1)return"nothing";if(o==="...")return"multi";if(o!=null&&i(o))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return si(e,t.fallthrough,i,n);for(var a=0;a<t.fallthrough.length;a++){var c=si(e,t.fallthrough[a],i,n);if(c)return c}}}function bf(e){var t=typeof e=="string"?e:an[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function wf(e,t,i){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(Ne?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(Ne?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!i&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function xf(e,t){if(I&&e.keyCode==34&&e.char)return!1;var i=an[e.keyCode];return i==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(i=e.code),wf(i,e,t))}function ts(e){return typeof e=="string"?Kr[e]:e}function li(e,t){for(var i=e.doc.sel.ranges,n=[],o=0;o<i.length;o++){for(var a=t(i[o]);n.length&&k(a.from,H(n).to)<=0;){var c=n.pop();if(k(c.from,a.from)<0){a.from=c.from;break}}n.push(a)}Jt(e,function(){for(var h=n.length-1;h>=0;h--)ii(e.doc,"",n[h].from,n[h].to,"+delete");Vn(e)})}function Ol(e,t,i){var n=je(e.text,t+i,i);return n<0||n>e.text.length?null:n}function Ml(e,t,i){var n=Ol(e,t.ch,i);return n==null?null:new g(t.line,n,i<0?"after":"before")}function El(e,t,i,n,o){if(e){t.doc.direction=="rtl"&&(o=-o);var a=xt(i,t.doc.direction);if(a){var c=o<0?H(a):a[0],h=o<0==(c.level==1),p=h?"after":"before",m;if(c.level>0||t.doc.direction=="rtl"){var S=Xn(t,i);m=o<0?i.text.length-1:0;var _=Pr(t,S,m).top;m=Ge(function(R){return Pr(t,S,R).top==_},o<0==(c.level==1)?c.from:c.to-1,m),p=="before"&&(m=Ol(i,m,1))}else m=o<0?c.to:c.from;return new g(n,m,p)}}return new g(n,o<0?i.text.length:0,o<0?"before":"after")}function Yp(e,t,i,n){var o=xt(t,e.doc.direction);if(!o)return Ml(t,i,n);i.ch>=t.text.length?(i.ch=t.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var a=dt(o,i.ch,i.sticky),c=o[a];if(e.doc.direction=="ltr"&&c.level%2==0&&(n>0?c.to>i.ch:c.from<i.ch))return Ml(t,i,n);var h=function(ge,be){return Ol(t,ge instanceof g?ge.ch:ge,be)},p,m=function(ge){return e.options.lineWrapping?(p=p||Xn(e,t),_u(e,t,p,ge)):{begin:0,end:t.text.length}},S=m(i.sticky=="before"?h(i,-1):i.ch);if(e.doc.direction=="rtl"||c.level==1){var _=c.level==1==n<0,R=h(i,_?1:-1);if(R!=null&&(_?R<=c.to&&R<=S.end:R>=c.from&&R>=S.begin)){var M=_?"before":"after";return new g(i.line,R,M)}}var $=function(ge,be,ve){for(var xe=function(et,Lt){return Lt?new g(i.line,h(et,1),"before"):new g(i.line,et,"after")};ge>=0&&ge<o.length;ge+=be){var Ae=o[ge],Pe=be>0==(Ae.level!=1),Be=Pe?ve.begin:h(ve.end,-1);if(Ae.from<=Be&&Be<Ae.to||(Be=Pe?Ae.from:h(Ae.to,-1),ve.begin<=Be&&Be<ve.end))return xe(Be,Pe)}},Z=$(a+n,n,S);if(Z)return Z;var se=n>0?S.end:h(S.begin,-1);return se!=null&&!(n>0&&se==t.text.length)&&(Z=$(n>0?0:o.length-1,n,m(se)),Z)?Z:null}var to={selectAll:of,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),we)},killLine:function(e){return li(e,function(t){if(t.empty()){var i=Se(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line<e.lastLine()?{from:t.head,to:g(t.head.line+1,0)}:{from:t.head,to:g(t.head.line,i)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return li(e,function(t){return{from:g(t.from().line,0),to:Ce(e.doc,g(t.to().line+1,0))}})},delLineLeft:function(e){return li(e,function(t){return{from:g(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return li(e,function(t){var i=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:i},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return li(e,function(t){var i=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div");return{from:t.from(),to:n}})},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(g(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(g(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return kf(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Sf(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Xp(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div")},ke)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:i},"div")},ke)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:i},"div");return n.ch<e.getLine(n.line).search(/\S/)?Sf(e,t.head):n},ke)},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=[],i=e.listSelections(),n=e.options.tabSize,o=0;o<i.length;o++){var a=i[o].from(),c=q(e.getLine(a.line),a.ch,n);t.push(B(n-c%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Jt(e,function(){for(var t=e.listSelections(),i=[],n=0;n<t.length;n++)if(!!t[n].empty()){var o=t[n].head,a=Se(e.doc,o.line).text;if(a){if(o.ch==a.length&&(o=new g(o.line,o.ch-1)),o.ch>0)o=new g(o.line,o.ch+1),e.replaceRange(a.charAt(o.ch-1)+a.charAt(o.ch-2),g(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var c=Se(e.doc,o.line-1).text;c&&(o=new g(o.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+c.charAt(c.length-1),g(o.line-1,c.length-1),o,"+transpose"))}}i.push(new Ze(o,o))}e.setSelections(i)})},newlineAndIndent:function(e){return Jt(e,function(){for(var t=e.listSelections(),i=t.length-1;i>=0;i--)e.replaceRange(e.doc.lineSeparator(),t[i].anchor,t[i].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Vn(e)})},openLine:function(e){return e.replaceSelection(`
12
+ `,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function kf(e,t){var i=Se(e.doc,t),n=hr(i);return n!=i&&(t=Xe(n)),El(!0,e,n,t,1)}function Xp(e,t){var i=Se(e.doc,t),n=Ah(i);return n!=i&&(t=Xe(n)),El(!0,e,i,t,-1)}function Sf(e,t){var i=kf(e,t.line),n=Se(e.doc,i.line),o=xt(n,e.doc.direction);if(!o||o[0].level==0){var a=Math.max(i.ch,n.text.search(/\S/)),c=t.line==i.line&&t.ch<=a&&t.ch;return g(i.line,c?0:a,i.sticky)}return i}function rs(e,t,i){if(typeof t=="string"&&(t=to[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i&&(e.display.shift=!1),o=t(e)!=_e}finally{e.display.shift=n,e.state.suppressEdits=!1}return o}function Zp(e,t,i){for(var n=0;n<e.state.keyMaps.length;n++){var o=si(t,e.state.keyMaps[n],i,e);if(o)return o}return e.options.extraKeys&&si(t,e.options.extraKeys,i,e)||si(t,e.options.keyMap,i,e)}var Jp=new V;function ro(e,t,i,n){var o=e.state.keySeq;if(o){if(bf(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Jp.set(50,function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())}),Cf(e,o+" "+t,i,n))return!0}return Cf(e,t,i,n)}function Cf(e,t,i,n){var o=Zp(e,t,n);return o=="multi"&&(e.state.keySeq=t),o=="handled"&&Ct(e,"keyHandled",e,t,i),(o=="handled"||o=="multi")&&(St(i),hl(e)),!!o}function _f(e,t){var i=xf(t,!0);return i?t.shiftKey&&!e.state.keySeq?ro(e,"Shift-"+i,t,function(n){return rs(e,n,!0)})||ro(e,i,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return rs(e,n)}):ro(e,i,t,function(n){return rs(e,n)}):!1}function Qp(e,t,i){return ro(e,"'"+i+"'",t,function(n){return rs(e,n,!0)})}var Al=null;function Tf(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=Le(),!ht(t,e))){y&&x<11&&e.keyCode==27&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=i==16||e.shiftKey;var n=_f(t,e);I&&(Al=n?i:null,!n&&i==88&&!$s&&(te?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),f&&!te&&!n&&i==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),i==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Vp(t)}}function Vp(e){var t=e.display.lineDiv;Ke(t,"CodeMirror-crosshair");function i(n){(n.keyCode==18||!n.altKey)&&(Ee(t,"CodeMirror-crosshair"),ze(document,"keyup",i),ze(document,"mouseover",i))}Oe(document,"keyup",i),Oe(document,"mouseover",i)}function Lf(e){e.keyCode==16&&(this.doc.sel.shift=!1),ht(this,e)}function Pf(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(jr(t.display,e)||ht(t,e)||e.ctrlKey&&!e.altKey||te&&e.metaKey)){var i=e.keyCode,n=e.charCode;if(I&&i==Al){Al=null,St(e);return}if(!(I&&(!e.which||e.which<10)&&_f(t,e))){var o=String.fromCharCode(n==null?i:n);o!="\b"&&(Qp(t,e,o)||t.display.input.onKeyPress(e))}}}var eg=400,Nl=function(e,t,i){this.time=e,this.pos=t,this.button=i};Nl.prototype.compare=function(e,t,i){return this.time+eg>e&&k(t,this.pos)==0&&i==this.button};var no,io;function tg(e,t){var i=+new Date;return io&&io.compare(i,e,t)?(no=io=null,"triple"):no&&no.compare(i,e,t)?(io=new Nl(i,e,t),no=null,"double"):(no=new Nl(i,e,t),io=null,"single")}function Of(e){var t=this,i=t.display;if(!(ht(t,e)||i.activeTouch&&i.input.supportsTouch())){if(i.input.ensurePolled(),i.shift=e.shiftKey,jr(i,e)){C||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(!zl(t,e)){var n=Pn(t,e),o=jn(e),a=n?tg(n,o):"single";window.focus(),o==1&&t.state.selectingText&&t.state.selectingText(e),!(n&&rg(t,o,n,a,e))&&(o==1?n?ig(t,n,a,e):Ai(e)==i.scroller&&St(e):o==2?(n&&Zo(t.doc,n),setTimeout(function(){return i.input.focus()},20)):o==3&&(me?t.display.input.onContextMenu(e):pl(t)))}}}function rg(e,t,i,n,o){var a="Click";return n=="double"?a="Double"+a:n=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,ro(e,wf(a,o),o,function(c){if(typeof c=="string"&&(c=to[c]),!c)return!1;var h=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),h=c(e,i)!=_e}finally{e.state.suppressEdits=!1}return h})}function ng(e,t,i){var n=e.getOption("configureMouse"),o=n?n(e,t,i):{};if(o.unit==null){var a=de?i.shiftKey&&i.metaKey:i.altKey;o.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(o.extend==null||e.doc.extend)&&(o.extend=e.doc.extend||i.shiftKey),o.addNew==null&&(o.addNew=te?i.metaKey:i.ctrlKey),o.moveOnDrag==null&&(o.moveOnDrag=!(te?i.altKey:i.ctrlKey)),o}function ig(e,t,i,n){y?setTimeout(He(Ou,e),0):e.curOp.focus=Le();var o=ng(e,i,n),a=e.doc.sel,c;e.options.dragDrop&&ir&&!e.isReadOnly()&&i=="single"&&(c=a.contains(t))>-1&&(k((c=a.ranges[c]).from(),t)<0||t.xRel>0)&&(k(c.to(),t)>0||t.xRel<0)?og(e,n,t,o):sg(e,n,t,o)}function og(e,t,i,n){var o=e.display,a=!1,c=_t(e,function(m){C&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:pl(e)),ze(o.wrapper.ownerDocument,"mouseup",c),ze(o.wrapper.ownerDocument,"mousemove",h),ze(o.scroller,"dragstart",p),ze(o.scroller,"drop",c),a||(St(m),n.addNew||Zo(e.doc,i,null,null,n.extend),C&&!ee||y&&x==9?setTimeout(function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()},20):o.input.focus())}),h=function(m){a=a||Math.abs(t.clientX-m.clientX)+Math.abs(t.clientY-m.clientY)>=10},p=function(){return a=!0};C&&(o.scroller.draggable=!0),e.state.draggingText=c,c.copy=!n.moveOnDrag,Oe(o.wrapper.ownerDocument,"mouseup",c),Oe(o.wrapper.ownerDocument,"mousemove",h),Oe(o.scroller,"dragstart",p),Oe(o.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout(function(){return o.input.focus()},20),o.scroller.dragDrop&&o.scroller.dragDrop()}function Mf(e,t,i){if(i=="char")return new Ze(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new Ze(g(t.line,0),Ce(e.doc,g(t.line+1,0)));var n=i(e,t);return new Ze(n.from,n.to)}function sg(e,t,i,n){y&&pl(e);var o=e.display,a=e.doc;St(t);var c,h,p=a.sel,m=p.ranges;if(n.addNew&&!n.extend?(h=a.sel.contains(i),h>-1?c=m[h]:c=new Ze(i,i)):(c=a.sel.primary(),h=a.sel.primIndex),n.unit=="rectangle")n.addNew||(c=new Ze(i,i)),i=Pn(e,t,!0,!0),h=-1;else{var S=Mf(e,i,n.unit);n.extend?c=Ll(c,S.anchor,S.head,n.extend):c=S}n.addNew?h==-1?(h=m.length,Rt(a,gr(e,m.concat([c]),h),{scroll:!1,origin:"*mouse"})):m.length>1&&m[h].empty()&&n.unit=="char"&&!n.extend?(Rt(a,gr(e,m.slice(0,h).concat(m.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),p=a.sel):Pl(a,h,c,pe):(h=0,Rt(a,new or([c],0),pe),p=a.sel);var _=i;function R(ve){if(k(_,ve)!=0)if(_=ve,n.unit=="rectangle"){for(var xe=[],Ae=e.options.tabSize,Pe=q(Se(a,i.line).text,i.ch,Ae),Be=q(Se(a,ve.line).text,ve.ch,Ae),et=Math.min(Pe,Be),Lt=Math.max(Pe,Be),ft=Math.min(i.line,ve.line),Qt=Math.min(e.lastLine(),Math.max(i.line,ve.line));ft<=Qt;ft++){var qt=Se(a,ft).text,mt=P(qt,et,Ae);et==Lt?xe.push(new Ze(g(ft,mt),g(ft,mt))):qt.length>mt&&xe.push(new Ze(g(ft,mt),g(ft,P(qt,Lt,Ae))))}xe.length||xe.push(new Ze(i,i)),Rt(a,gr(e,p.ranges.slice(0,h).concat(xe),h),{origin:"*mouse",scroll:!1}),e.scrollIntoView(ve)}else{var $t=c,Mt=Mf(e,ve,n.unit),wt=$t.anchor,yt;k(Mt.anchor,wt)>0?(yt=Mt.head,wt=qe($t.from(),Mt.anchor)):(yt=Mt.anchor,wt=De($t.to(),Mt.head));var pt=p.ranges.slice(0);pt[h]=lg(e,new Ze(Ce(a,wt),yt)),Rt(a,gr(e,pt,h),pe)}}var M=o.wrapper.getBoundingClientRect(),$=0;function Z(ve){var xe=++$,Ae=Pn(e,ve,!0,n.unit=="rectangle");if(!!Ae)if(k(Ae,_)!=0){e.curOp.focus=Le(),R(Ae);var Pe=Ko(o,a);(Ae.line>=Pe.to||Ae.line<Pe.from)&&setTimeout(_t(e,function(){$==xe&&Z(ve)}),150)}else{var Be=ve.clientY<M.top?-20:ve.clientY>M.bottom?20:0;Be&&setTimeout(_t(e,function(){$==xe&&(o.scroller.scrollTop+=Be,Z(ve))}),50)}}function se(ve){e.state.selectingText=!1,$=1/0,ve&&(St(ve),o.input.focus()),ze(o.wrapper.ownerDocument,"mousemove",ge),ze(o.wrapper.ownerDocument,"mouseup",be),a.history.lastSelOrigin=null}var ge=_t(e,function(ve){ve.buttons===0||!jn(ve)?se(ve):Z(ve)}),be=_t(e,se);e.state.selectingText=be,Oe(o.wrapper.ownerDocument,"mousemove",ge),Oe(o.wrapper.ownerDocument,"mouseup",be)}function lg(e,t){var i=t.anchor,n=t.head,o=Se(e.doc,i.line);if(k(i,n)==0&&i.sticky==n.sticky)return t;var a=xt(o);if(!a)return t;var c=dt(a,i.ch,i.sticky),h=a[c];if(h.from!=i.ch&&h.to!=i.ch)return t;var p=c+(h.from==i.ch==(h.level!=1)?0:1);if(p==0||p==a.length)return t;var m;if(n.line!=i.line)m=(n.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var S=dt(a,n.ch,n.sticky),_=S-c||(n.ch-i.ch)*(h.level==1?-1:1);S==p-1||S==p?m=_<0:m=_>0}var R=a[p+(m?-1:0)],M=m==(R.level==1),$=M?R.from:R.to,Z=M?"after":"before";return i.ch==$&&i.sticky==Z?t:new Ze(new g(i.line,$,Z),n)}function Ef(e,t,i,n){var o,a;if(t.touches)o=t.touches[0].clientX,a=t.touches[0].clientY;else try{o=t.clientX,a=t.clientY}catch{return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&St(t);var c=e.display,h=c.lineDiv.getBoundingClientRect();if(a>h.bottom||!It(e,i))return Ei(t);a-=h.top-c.viewOffset;for(var p=0;p<e.display.gutterSpecs.length;++p){var m=c.gutters.childNodes[p];if(m&&m.getBoundingClientRect().right>=o){var S=Hr(e.doc,a),_=e.display.gutterSpecs[p];return it(e,i,e,S,_.className,t),Ei(t)}}}function zl(e,t){return Ef(e,t,"gutterClick",!0)}function Af(e,t){jr(e.display,t)||ag(e,t)||ht(e,t,"contextmenu")||me||e.display.input.onContextMenu(t)}function ag(e,t){return It(e,"gutterContextMenu")?Ef(e,t,"gutterContextMenu",!1):!1}function Nf(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ii(e)}var ai={toString:function(){return"CodeMirror.Init"}},zf={},ns={};function ug(e){var t=e.optionHandlers;function i(n,o,a,c){e.defaults[n]=o,a&&(t[n]=c?function(h,p,m){m!=ai&&a(h,p,m)}:a)}e.defineOption=i,e.Init=ai,i("value","",function(n,o){return n.setValue(o)},!0),i("mode",null,function(n,o){n.doc.modeOption=o,Cl(n)},!0),i("indentUnit",2,Cl,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(n){$i(n),Ii(n),Ut(n)},!0),i("lineSeparator",null,function(n,o){if(n.doc.lineSep=o,!!o){var a=[],c=n.doc.first;n.doc.iter(function(p){for(var m=0;;){var S=p.text.indexOf(o,m);if(S==-1)break;m=S+o.length,a.push(g(c,S))}c++});for(var h=a.length-1;h>=0;h--)ii(n.doc,o,a[h],g(a[h].line,a[h].ch+o.length))}}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,o,a){n.state.specialChars=new RegExp(o.source+(o.test(" ")?"":"| "),"g"),a!=ai&&n.refresh()}),i("specialCharPlaceholder",Ih,function(n){return n.refresh()},!0),i("electricChars",!0),i("inputStyle",K?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(n,o){return n.getInputField().spellcheck=o},!0),i("autocorrect",!1,function(n,o){return n.getInputField().autocorrect=o},!0),i("autocapitalize",!1,function(n,o){return n.getInputField().autocapitalize=o},!0),i("rtlMoveVisually",!ye),i("wholeLineUpdateBefore",!0),i("theme","default",function(n){Nf(n),qi(n)},!0),i("keyMap","default",function(n,o,a){var c=ts(o),h=a!=ai&&ts(a);h&&h.detach&&h.detach(n,c),c.attach&&c.attach(n,h||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,cg,!0),i("gutters",[],function(n,o){n.display.gutterSpecs=kl(o,n.options.lineNumbers),qi(n)},!0),i("fixedGutter",!0,function(n,o){n.display.gutters.style.left=o?fl(n.display)+"px":"0",n.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(n){return ei(n)},!0),i("scrollbarStyle","native",function(n){Ru(n),ei(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),i("lineNumbers",!1,function(n,o){n.display.gutterSpecs=kl(n.options.gutters,o),qi(n)},!0),i("firstLineNumber",1,qi,!0),i("lineNumberFormatter",function(n){return n},qi,!0),i("showCursorWhenSelecting",!1,Hi,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(n,o){o=="nocursor"&&(Qn(n),n.display.input.blur()),n.display.input.readOnlyChanged(o)}),i("screenReaderLabel",null,function(n,o){o=o===""?null:o,n.display.input.screenReaderLabelChanged(o)}),i("disableInput",!1,function(n,o){o||n.display.input.reset()},!0),i("dragDrop",!0,fg),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,Hi,!0),i("singleCursorHeightPerLine",!0,Hi,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,$i,!0),i("addModeClass",!1,$i,!0),i("pollInterval",100),i("undoDepth",200,function(n,o){return n.doc.history.undoDepth=o}),i("historyEventDelay",1250),i("viewportMargin",10,function(n){return n.refresh()},!0),i("maxHighlightLength",1e4,$i,!0),i("moveInputWithCursor",!0,function(n,o){o||n.display.input.resetPosition()}),i("tabindex",null,function(n,o){return n.display.input.getField().tabIndex=o||""}),i("autofocus",null),i("direction","ltr",function(n,o){return n.doc.setDirection(o)},!0),i("phrases",null)}function fg(e,t,i){var n=i&&i!=ai;if(!t!=!n){var o=e.display.dragFunctions,a=t?Oe:ze;a(e.display.scroller,"dragstart",o.start),a(e.display.scroller,"dragenter",o.enter),a(e.display.scroller,"dragover",o.over),a(e.display.scroller,"dragleave",o.leave),a(e.display.scroller,"drop",o.drop)}}function cg(e){e.options.lineWrapping?(Ke(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ee(e.display.wrapper,"CodeMirror-wrap"),el(e)),cl(e),Ut(e),Ii(e),setTimeout(function(){return ei(e)},100)}function ut(e,t){var i=this;if(!(this instanceof ut))return new ut(e,t);this.options=t=t?at(t):{},at(zf,t,!1);var n=t.value;typeof n=="string"?n=new Kt(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var o=new ut.inputStyles[t.inputStyle](this),a=this.display=new Cp(e,n,o,t);a.wrapper.CodeMirror=this,Nf(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ru(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 V,keySeq:null,specialChars:null},t.autofocus&&!K&&a.input.focus(),y&&x<11&&setTimeout(function(){return i.display.input.reset(!0)},20),dg(this),Up(),An(this),this.curOp.forceUpdate=!0,qu(this,n),t.autofocus&&!K||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&gl(i)},20):Qn(this);for(var c in ns)ns.hasOwnProperty(c)&&ns[c](this,t[c],ai);Iu(this),t.finishInit&&t.finishInit(this);for(var h=0;h<Rl.length;++h)Rl[h](this);Nn(this),C&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}ut.defaults=zf,ut.optionHandlers=ns;function dg(e){var t=e.display;Oe(t.scroller,"mousedown",_t(e,Of)),y&&x<11?Oe(t.scroller,"dblclick",_t(e,function(p){if(!ht(e,p)){var m=Pn(e,p);if(!(!m||zl(e,p)||jr(e.display,p))){St(p);var S=e.findWordAt(m);Zo(e.doc,S.anchor,S.head)}}})):Oe(t.scroller,"dblclick",function(p){return ht(e,p)||St(p)}),Oe(t.scroller,"contextmenu",function(p){return Af(e,p)}),Oe(t.input.getField(),"contextmenu",function(p){t.scroller.contains(p.target)||Af(e,p)});var i,n={end:0};function o(){t.activeTouch&&(i=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function a(p){if(p.touches.length!=1)return!1;var m=p.touches[0];return m.radiusX<=1&&m.radiusY<=1}function c(p,m){if(m.left==null)return!0;var S=m.left-p.left,_=m.top-p.top;return S*S+_*_>20*20}Oe(t.scroller,"touchstart",function(p){if(!ht(e,p)&&!a(p)&&!zl(e,p)){t.input.ensurePolled(),clearTimeout(i);var m=+new Date;t.activeTouch={start:m,moved:!1,prev:m-n.end<=300?n:null},p.touches.length==1&&(t.activeTouch.left=p.touches[0].pageX,t.activeTouch.top=p.touches[0].pageY)}}),Oe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Oe(t.scroller,"touchend",function(p){var m=t.activeTouch;if(m&&!jr(t,p)&&m.left!=null&&!m.moved&&new Date-m.start<300){var S=e.coordsChar(t.activeTouch,"page"),_;!m.prev||c(m,m.prev)?_=new Ze(S,S):!m.prev.prev||c(m,m.prev.prev)?_=e.findWordAt(S):_=new Ze(g(S.line,0),Ce(e.doc,g(S.line+1,0))),e.setSelection(_.anchor,_.head),e.focus(),St(p)}o()}),Oe(t.scroller,"touchcancel",o),Oe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Bi(e,t.scroller.scrollTop),Mn(e,t.scroller.scrollLeft,!0),it(e,"scroll",e))}),Oe(t.scroller,"mousewheel",function(p){return Bu(e,p)}),Oe(t.scroller,"DOMMouseScroll",function(p){return Bu(e,p)}),Oe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(p){ht(e,p)||kr(p)},over:function(p){ht(e,p)||(jp(e,p),kr(p))},start:function(p){return Bp(e,p)},drop:_t(e,Wp),leave:function(p){ht(e,p)||vf(e)}};var h=t.input.getField();Oe(h,"keyup",function(p){return Lf.call(e,p)}),Oe(h,"keydown",_t(e,Tf)),Oe(h,"keypress",_t(e,Pf)),Oe(h,"focus",function(p){return gl(e,p)}),Oe(h,"blur",function(p){return Qn(e,p)})}var Rl=[];ut.defineInitHook=function(e){return Rl.push(e)};function oo(e,t,i,n){var o=e.doc,a;i==null&&(i="add"),i=="smart"&&(o.mode.indent?a=Ni(e,t).state:i="prev");var c=e.options.tabSize,h=Se(o,t),p=q(h.text,null,c);h.stateAfter&&(h.stateAfter=null);var m=h.text.match(/^\s*/)[0],S;if(!n&&!/\S/.test(h.text))S=0,i="not";else if(i=="smart"&&(S=o.mode.indent(a,h.text.slice(m.length),h.text),S==_e||S>150)){if(!n)return;i="prev"}i=="prev"?t>o.first?S=q(Se(o,t-1).text,null,c):S=0:i=="add"?S=p+e.options.indentUnit:i=="subtract"?S=p-e.options.indentUnit:typeof i=="number"&&(S=p+i),S=Math.max(0,S);var _="",R=0;if(e.options.indentWithTabs)for(var M=Math.floor(S/c);M;--M)R+=c,_+=" ";if(R<S&&(_+=B(S-R)),_!=m)return ii(o,_,g(t,0),g(t,m.length),"+input"),h.stateAfter=null,!0;for(var $=0;$<o.sel.ranges.length;$++){var Z=o.sel.ranges[$];if(Z.head.line==t&&Z.head.ch<m.length){var se=g(t,m.length);Pl(o,$,new Ze(se,se));break}}}var vr=null;function is(e){vr=e}function Dl(e,t,i,n,o){var a=e.doc;e.display.shift=!1,n||(n=a.sel);var c=+new Date-200,h=o=="paste"||e.state.pasteIncoming>c,p=Kn(t),m=null;if(h&&n.ranges.length>1)if(vr&&vr.text.join(`
13
+ `)==t){if(n.ranges.length%vr.text.length==0){m=[];for(var S=0;S<vr.text.length;S++)m.push(a.splitLines(vr.text[S]))}}else p.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(m=Y(p,function(ge){return[ge]}));for(var _=e.curOp.updateInput,R=n.ranges.length-1;R>=0;R--){var M=n.ranges[R],$=M.from(),Z=M.to();M.empty()&&(i&&i>0?$=g($.line,$.ch-i):e.state.overwrite&&!h?Z=g(Z.line,Math.min(Se(a,Z.line).text.length,Z.ch+H(p).length)):h&&vr&&vr.lineWise&&vr.text.join(`
14
+ `)==p.join(`
15
+ `)&&($=Z=g($.line,0)));var se={from:$,to:Z,text:m?m[R%m.length]:p,origin:o||(h?"paste":e.state.cutIncoming>c?"cut":"+input")};ni(e.doc,se),Ct(e,"inputRead",e,se)}t&&!h&&Df(e,t),Vn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=_),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Rf(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Jt(t,function(){return Dl(t,i,0,null,"paste")}),!0}function Df(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var i=e.doc.sel,n=i.ranges.length-1;n>=0;n--){var o=i.ranges[n];if(!(o.head.ch>100||n&&i.ranges[n-1].head.line==o.head.line)){var a=e.getModeAt(o.head),c=!1;if(a.electricChars){for(var h=0;h<a.electricChars.length;h++)if(t.indexOf(a.electricChars.charAt(h))>-1){c=oo(e,o.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Se(e.doc,o.head.line).text.slice(0,o.head.ch))&&(c=oo(e,o.head.line,"smart"));c&&Ct(e,"electricInput",e,o.head.line)}}}function Ff(e){for(var t=[],i=[],n=0;n<e.doc.sel.ranges.length;n++){var o=e.doc.sel.ranges[n].head.line,a={anchor:g(o,0),head:g(o+1,0)};i.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:i}}function If(e,t,i,n){e.setAttribute("autocorrect",i?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Hf(){var e=w("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=w("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return C?e.style.width="1000px":e.setAttribute("wrap","off"),D&&(e.style.border="1px solid black"),If(e),t}function hg(e){var t=e.optionHandlers,i=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,o){var a=this.options,c=a[n];a[n]==o&&n!="mode"||(a[n]=o,t.hasOwnProperty(n)&&_t(this,t[n])(this,o,c),it(this,"optionChange",this,n))},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,o){this.state.keyMaps[o?"push":"unshift"](ts(n))},removeKeyMap:function(n){for(var o=this.state.keyMaps,a=0;a<o.length;++a)if(o[a]==n||o[a].name==n)return o.splice(a,1),!0},addOverlay:Wt(function(n,o){var a=n.token?n:e.getMode(this.options,n);if(a.startState)throw new Error("Overlays may not be stateful.");ne(this.state.overlays,{mode:a,modeSpec:n,opaque:o&&o.opaque,priority:o&&o.priority||0},function(c){return c.priority}),this.state.modeGen++,Ut(this)}),removeOverlay:Wt(function(n){for(var o=this.state.overlays,a=0;a<o.length;++a){var c=o[a].modeSpec;if(c==n||typeof n=="string"&&c.name==n){o.splice(a,1),this.state.modeGen++,Ut(this);return}}}),indentLine:Wt(function(n,o,a){typeof o!="string"&&typeof o!="number"&&(o==null?o=this.options.smartIndent?"smart":"prev":o=o?"add":"subtract"),_n(this.doc,n)&&oo(this,n,o,a)}),indentSelection:Wt(function(n){for(var o=this.doc.sel.ranges,a=-1,c=0;c<o.length;c++){var h=o[c];if(h.empty())h.head.line>a&&(oo(this,h.head.line,n,!0),a=h.head.line,c==this.doc.sel.primIndex&&Vn(this));else{var p=h.from(),m=h.to(),S=Math.max(a,p.line);a=Math.min(this.lastLine(),m.line-(m.ch?0:1))+1;for(var _=S;_<a;++_)oo(this,_,n);var R=this.doc.sel.ranges;p.ch==0&&o.length==R.length&&R[c].from().ch>0&&Pl(this.doc,c,new Ze(p,R[c].to()),we)}}}),getTokenAt:function(n,o){return Ga(this,n,o)},getLineTokens:function(n,o){return Ga(this,g(n),o,!0)},getTokenTypeAt:function(n){n=Ce(this.doc,n);var o=Ka(this,Se(this.doc,n.line)),a=0,c=(o.length-1)/2,h=n.ch,p;if(h==0)p=o[2];else for(;;){var m=a+c>>1;if((m?o[m*2-1]:0)>=h)c=m;else if(o[m*2+1]<h)a=m+1;else{p=o[m*2+2];break}}var S=p?p.indexOf("overlay "):-1;return S<0?p:S==0?null:p.slice(0,S-1)},getModeAt:function(n){var o=this.doc.mode;return o.innerMode?e.innerMode(o,this.getTokenAt(n).state).mode:o},getHelper:function(n,o){return this.getHelpers(n,o)[0]},getHelpers:function(n,o){var a=[];if(!i.hasOwnProperty(o))return a;var c=i[o],h=this.getModeAt(n);if(typeof h[o]=="string")c[h[o]]&&a.push(c[h[o]]);else if(h[o])for(var p=0;p<h[o].length;p++){var m=c[h[o][p]];m&&a.push(m)}else h.helperType&&c[h.helperType]?a.push(c[h.helperType]):c[h.name]&&a.push(c[h.name]);for(var S=0;S<c._global.length;S++){var _=c._global[S];_.pred(h,this)&&W(a,_.val)==-1&&a.push(_.val)}return a},getStateAfter:function(n,o){var a=this.doc;return n=Je(a,n==null?a.first+a.size-1:n),Ni(this,n+1,o).state},cursorCoords:function(n,o){var a,c=this.doc.sel.primary();return n==null?a=c.head:typeof n=="object"?a=Ce(this.doc,n):a=n?c.from():c.to(),pr(this,a,o||"page")},charCoords:function(n,o){return Wo(this,Ce(this.doc,n),o||"page")},coordsChar:function(n,o){return n=ku(this,n,o||"page"),ll(this,n.left,n.top)},lineAtHeight:function(n,o){return n=ku(this,{top:n,left:0},o||"page").top,Hr(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,o,a){var c=!1,h;if(typeof n=="number"){var p=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>p&&(n=p,c=!0),h=Se(this.doc,n)}else h=n;return Ho(this,h,{top:0,left:0},o||"page",a||c).top+(c?this.doc.height-Br(h):0)},defaultTextHeight:function(){return Zn(this.display)},defaultCharWidth:function(){return Jn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,o,a,c,h){var p=this.display;n=pr(this,Ce(this.doc,n));var m=n.bottom,S=n.left;if(o.style.position="absolute",o.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(o),p.sizer.appendChild(o),c=="over")m=n.top;else if(c=="above"||c=="near"){var _=Math.max(p.wrapper.clientHeight,this.doc.height),R=Math.max(p.sizer.clientWidth,p.lineSpace.clientWidth);(c=="above"||n.bottom+o.offsetHeight>_)&&n.top>o.offsetHeight?m=n.top-o.offsetHeight:n.bottom+o.offsetHeight<=_&&(m=n.bottom),S+o.offsetWidth>R&&(S=R-o.offsetWidth)}o.style.top=m+"px",o.style.left=o.style.right="",h=="right"?(S=p.sizer.clientWidth-o.offsetWidth,o.style.right="0px"):(h=="left"?S=0:h=="middle"&&(S=(p.sizer.clientWidth-o.offsetWidth)/2),o.style.left=S+"px"),a&&fp(this,{left:S,top:m,right:S+o.offsetWidth,bottom:m+o.offsetHeight})},triggerOnKeyDown:Wt(Tf),triggerOnKeyPress:Wt(Pf),triggerOnKeyUp:Lf,triggerOnMouseDown:Wt(Of),execCommand:function(n){if(to.hasOwnProperty(n))return to[n].call(null,this)},triggerElectric:Wt(function(n){Df(this,n)}),findPosH:function(n,o,a,c){var h=1;o<0&&(h=-1,o=-o);for(var p=Ce(this.doc,n),m=0;m<o&&(p=Fl(this.doc,p,h,a,c),!p.hitSide);++m);return p},moveH:Wt(function(n,o){var a=this;this.extendSelectionsBy(function(c){return a.display.shift||a.doc.extend||c.empty()?Fl(a.doc,c.head,n,o,a.options.rtlMoveVisually):n<0?c.from():c.to()},ke)}),deleteH:Wt(function(n,o){var a=this.doc.sel,c=this.doc;a.somethingSelected()?c.replaceSelection("",null,"+delete"):li(this,function(h){var p=Fl(c,h.head,n,o,!1);return n<0?{from:p,to:h.head}:{from:h.head,to:p}})}),findPosV:function(n,o,a,c){var h=1,p=c;o<0&&(h=-1,o=-o);for(var m=Ce(this.doc,n),S=0;S<o;++S){var _=pr(this,m,"div");if(p==null?p=_.left:_.left=p,m=Wf(this,_,h,a),m.hitSide)break}return m},moveV:Wt(function(n,o){var a=this,c=this.doc,h=[],p=!this.display.shift&&!c.extend&&c.sel.somethingSelected();if(c.extendSelectionsBy(function(S){if(p)return n<0?S.from():S.to();var _=pr(a,S.head,"div");S.goalColumn!=null&&(_.left=S.goalColumn),h.push(_.left);var R=Wf(a,_,n,o);return o=="page"&&S==c.sel.primary()&&ml(a,Wo(a,R,"div").top-_.top),R},ke),h.length)for(var m=0;m<c.sel.ranges.length;m++)c.sel.ranges[m].goalColumn=h[m]}),findWordAt:function(n){var o=this.doc,a=Se(o,n.line).text,c=n.ch,h=n.ch;if(a){var p=this.getHelper(n,"wordChars");(n.sticky=="before"||h==a.length)&&c?--c:++h;for(var m=a.charAt(c),S=j(m,p)?function(_){return j(_,p)}:/\s/.test(m)?function(_){return/\s/.test(_)}:function(_){return!/\s/.test(_)&&!j(_)};c>0&&S(a.charAt(c-1));)--c;for(;h<a.length&&S(a.charAt(h));)++h}return new Ze(g(n.line,c),g(n.line,h))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ke(this.display.cursorDiv,"CodeMirror-overwrite"):Ee(this.display.cursorDiv,"CodeMirror-overwrite"),it(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Le()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Wt(function(n,o){Wi(this,n,o)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-Lr(this)-this.display.barHeight,width:n.scrollWidth-Lr(this)-this.display.barWidth,clientHeight:nl(this),clientWidth:Tn(this)}},scrollIntoView:Wt(function(n,o){n==null?(n={from:this.doc.sel.primary().head,to:null},o==null&&(o=this.options.cursorScrollMargin)):typeof n=="number"?n={from:g(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=o||0,n.from.line!=null?cp(this,n):Eu(this,n.from,n.to,n.margin)}),setSize:Wt(function(n,o){var a=this,c=function(p){return typeof p=="number"||/^\d+$/.test(String(p))?p+"px":p};n!=null&&(this.display.wrapper.style.width=c(n)),o!=null&&(this.display.wrapper.style.height=c(o)),this.options.lineWrapping&&bu(this);var h=this.display.viewFrom;this.doc.iter(h,this.display.viewTo,function(p){if(p.widgets){for(var m=0;m<p.widgets.length;m++)if(p.widgets[m].noHScroll){tn(a,h,"widget");break}}++h}),this.curOp.forceUpdate=!0,it(this,"refresh",this)}),operation:function(n){return Jt(this,n)},startOperation:function(){return An(this)},endOperation:function(){return Nn(this)},refresh:Wt(function(){var n=this.display.cachedTextHeight;Ut(this),this.curOp.forceUpdate=!0,Ii(this),Wi(this,this.doc.scrollLeft,this.doc.scrollTop),wl(this.display),(n==null||Math.abs(n-Zn(this.display))>.5||this.options.lineWrapping)&&cl(this),it(this,"refresh",this)}),swapDoc:Wt(function(n){var o=this.doc;return o.cm=null,this.state.selectingText&&this.state.selectingText(),qu(this,n),Ii(this),this.display.input.reset(),Wi(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,Ct(this,"swapDoc",this,o),o}),phrase:function(n){var o=this.options.phrases;return o&&Object.prototype.hasOwnProperty.call(o,n)?o[n]:n},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}},Qr(e),e.registerHelper=function(n,o,a){i.hasOwnProperty(n)||(i[n]=e[n]={_global:[]}),i[n][o]=a},e.registerGlobalHelper=function(n,o,a,c){e.registerHelper(n,o,c),i[n]._global.push({pred:a,val:c})}}function Fl(e,t,i,n,o){var a=t,c=i,h=Se(e,t.line),p=o&&e.direction=="rtl"?-i:i;function m(){var be=t.line+p;return be<e.first||be>=e.first+e.size?!1:(t=new g(be,t.ch,t.sticky),h=Se(e,be))}function S(be){var ve;if(n=="codepoint"){var xe=h.text.charCodeAt(t.ch+(i>0?0:-1));if(isNaN(xe))ve=null;else{var Ae=i>0?xe>=55296&&xe<56320:xe>=56320&&xe<57343;ve=new g(t.line,Math.max(0,Math.min(h.text.length,t.ch+i*(Ae?2:1))),-i)}}else o?ve=Yp(e.cm,h,t,i):ve=Ml(h,t,i);if(ve==null)if(!be&&m())t=El(o,e.cm,h,t.line,p);else return!1;else t=ve;return!0}if(n=="char"||n=="codepoint")S();else if(n=="column")S(!0);else if(n=="word"||n=="group")for(var _=null,R=n=="group",M=e.cm&&e.cm.getHelper(t,"wordChars"),$=!0;!(i<0&&!S(!$));$=!1){var Z=h.text.charAt(t.ch)||`
16
+ `,se=j(Z,M)?"w":R&&Z==`
17
+ `?"n":!R||/\s/.test(Z)?null:"p";if(R&&!$&&!se&&(se="s"),_&&_!=se){i<0&&(i=1,S(),t.sticky="after");break}if(se&&(_=se),i>0&&!S(!$))break}var ge=Qo(e,t,a,c,!0);return X(a,ge)&&(ge.hitSide=!0),ge}function Wf(e,t,i,n){var o=e.doc,a=t.left,c;if(n=="page"){var h=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),p=Math.max(h-.5*Zn(e.display),3);c=(i>0?t.bottom:t.top)+i*p}else n=="line"&&(c=i>0?t.bottom+3:t.top-3);for(var m;m=ll(e,a,c),!!m.outside;){if(i<0?c<=0:c>=o.height){m.hitSide=!0;break}c+=i*5}return m}var Qe=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new V,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Qe.prototype.init=function(e){var t=this,i=this,n=i.cm,o=i.div=e.lineDiv;o.contentEditable=!0,If(o,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function a(h){for(var p=h.target;p;p=p.parentNode){if(p==o)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(p.className))break}return!1}Oe(o,"paste",function(h){!a(h)||ht(n,h)||Rf(h,n)||x<=11&&setTimeout(_t(n,function(){return t.updateFromDOM()}),20)}),Oe(o,"compositionstart",function(h){t.composing={data:h.data,done:!1}}),Oe(o,"compositionupdate",function(h){t.composing||(t.composing={data:h.data,done:!1})}),Oe(o,"compositionend",function(h){t.composing&&(h.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Oe(o,"touchstart",function(){return i.forceCompositionEnd()}),Oe(o,"input",function(){t.composing||t.readFromDOMSoon()});function c(h){if(!(!a(h)||ht(n,h))){if(n.somethingSelected())is({lineWise:!1,text:n.getSelections()}),h.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var p=Ff(n);is({lineWise:!0,text:p.text}),h.type=="cut"&&n.operation(function(){n.setSelections(p.ranges,0,we),n.replaceSelection("",null,"cut")})}else return;if(h.clipboardData){h.clipboardData.clearData();var m=vr.text.join(`
18
+ `);if(h.clipboardData.setData("Text",m),h.clipboardData.getData("Text")==m){h.preventDefault();return}}var S=Hf(),_=S.firstChild;n.display.lineSpace.insertBefore(S,n.display.lineSpace.firstChild),_.value=vr.text.join(`
19
+ `);var R=Le();tt(_),setTimeout(function(){n.display.lineSpace.removeChild(S),R.focus(),R==o&&i.showPrimarySelection()},50)}}Oe(o,"copy",c),Oe(o,"cut",c)},Qe.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Qe.prototype.prepareSelection=function(){var e=Pu(this.cm,!1);return e.focus=Le()==this.div,e},Qe.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Qe.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Qe.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),n=i.from(),o=i.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||o.line<t.display.viewFrom){e.removeAllRanges();return}var a=os(t,e.anchorNode,e.anchorOffset),c=os(t,e.focusNode,e.focusOffset);if(!(a&&!a.bad&&c&&!c.bad&&k(qe(a,c),n)==0&&k(De(a,c),o)==0)){var h=t.display.view,p=n.line>=t.display.viewFrom&&Bf(t,n)||{node:h[0].measure.map[2],offset:0},m=o.line<t.display.viewTo&&Bf(t,o);if(!m){var S=h[h.length-1].measure,_=S.maps?S.maps[S.maps.length-1]:S.map;m={node:_[_.length-1],offset:_[_.length-2]-_[_.length-3]}}if(!p||!m){e.removeAllRanges();return}var R=e.rangeCount&&e.getRangeAt(0),M;try{M=G(p.node,p.offset,m.offset,m.node)}catch{}M&&(!f&&t.state.focused?(e.collapse(p.node,p.offset),M.collapsed||(e.removeAllRanges(),e.addRange(M))):(e.removeAllRanges(),e.addRange(M)),R&&e.anchorNode==null?e.addRange(R):f&&this.startGracePeriod()),this.rememberSelection()}},Qe.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)},Qe.prototype.showMultipleSelections=function(e){le(this.cm.display.cursorDiv,e.cursors),le(this.cm.display.selectionDiv,e.selection)},Qe.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Qe.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return fe(this.div,t)},Qe.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||Le()!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Qe.prototype.blur=function(){this.div.blur()},Qe.prototype.getField=function(){return this.div},Qe.prototype.supportsTouch=function(){return!0},Qe.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Jt(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function i(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,i))}this.polling.set(this.cm.options.pollInterval,i)},Qe.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Qe.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(F&&O&&this.cm.display.gutterSpecs.length&&pg(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var i=os(t,e.anchorNode,e.anchorOffset),n=os(t,e.focusNode,e.focusOffset);i&&n&&Jt(t,function(){Rt(t.doc,nn(i,n),we),(i.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},Qe.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,i=e.doc.sel.primary(),n=i.from(),o=i.to();if(n.ch==0&&n.line>e.firstLine()&&(n=g(n.line-1,Se(e.doc,n.line-1).length)),o.ch==Se(e.doc,o.line).text.length&&o.line<e.lastLine()&&(o=g(o.line+1,0)),n.line<t.viewFrom||o.line>t.viewTo-1)return!1;var a,c,h;n.line==t.viewFrom||(a=On(e,n.line))==0?(c=Xe(t.view[0].line),h=t.view[0].node):(c=Xe(t.view[a].line),h=t.view[a-1].node.nextSibling);var p=On(e,o.line),m,S;if(p==t.view.length-1?(m=t.viewTo-1,S=t.lineDiv.lastChild):(m=Xe(t.view[p+1].line)-1,S=t.view[p+1].node.previousSibling),!h)return!1;for(var _=e.doc.splitLines(gg(e,h,S,c,m)),R=Ir(e.doc,g(c,0),g(m,Se(e.doc,m).text.length));_.length>1&&R.length>1;)if(H(_)==H(R))_.pop(),R.pop(),m--;else if(_[0]==R[0])_.shift(),R.shift(),c++;else break;for(var M=0,$=0,Z=_[0],se=R[0],ge=Math.min(Z.length,se.length);M<ge&&Z.charCodeAt(M)==se.charCodeAt(M);)++M;for(var be=H(_),ve=H(R),xe=Math.min(be.length-(_.length==1?M:0),ve.length-(R.length==1?M:0));$<xe&&be.charCodeAt(be.length-$-1)==ve.charCodeAt(ve.length-$-1);)++$;if(_.length==1&&R.length==1&&c==n.line)for(;M&&M>n.ch&&be.charCodeAt(be.length-$-1)==ve.charCodeAt(ve.length-$-1);)M--,$++;_[_.length-1]=be.slice(0,be.length-$).replace(/^\u200b+/,""),_[0]=_[0].slice(M).replace(/\u200b+$/,"");var Ae=g(c,M),Pe=g(m,R.length?H(R).length-$:0);if(_.length>1||_[0]||k(Ae,Pe))return ii(e.doc,_,Ae,Pe,"+input"),!0},Qe.prototype.ensurePolled=function(){this.forceCompositionEnd()},Qe.prototype.reset=function(){this.forceCompositionEnd()},Qe.prototype.forceCompositionEnd=function(){!this.composing||(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Qe.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},Qe.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Jt(this.cm,function(){return Ut(e.cm)})},Qe.prototype.setUneditable=function(e){e.contentEditable="false"},Qe.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||_t(this.cm,Dl)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Qe.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Qe.prototype.onContextMenu=function(){},Qe.prototype.resetPosition=function(){},Qe.prototype.needsContentAttribute=!0;function Bf(e,t){var i=il(e,t.line);if(!i||i.hidden)return null;var n=Se(e.doc,t.line),o=pu(i,n,t.line),a=xt(n,e.doc.direction),c="left";if(a){var h=dt(a,t.ch);c=h%2?"right":"left"}var p=mu(o.map,t.ch,c);return p.offset=p.collapse=="right"?p.end:p.start,p}function pg(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ui(e,t){return t&&(e.bad=!0),e}function gg(e,t,i,n,o){var a="",c=!1,h=e.doc.lineSeparator(),p=!1;function m(M){return function($){return $.id==M}}function S(){c&&(a+=h,p&&(a+=h),c=p=!1)}function _(M){M&&(S(),a+=M)}function R(M){if(M.nodeType==1){var $=M.getAttribute("cm-text");if($){_($);return}var Z=M.getAttribute("cm-marker"),se;if(Z){var ge=e.findMarks(g(n,0),g(o+1,0),m(+Z));ge.length&&(se=ge[0].find(0))&&_(Ir(e.doc,se.from,se.to).join(h));return}if(M.getAttribute("contenteditable")=="false")return;var be=/^(pre|div|p|li|table|br)$/i.test(M.nodeName);if(!/^br$/i.test(M.nodeName)&&M.textContent.length==0)return;be&&S();for(var ve=0;ve<M.childNodes.length;ve++)R(M.childNodes[ve]);/^(pre|p)$/i.test(M.nodeName)&&(p=!0),be&&(c=!0)}else M.nodeType==3&&_(M.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;R(t),t!=i;)t=t.nextSibling,p=!1;return a}function os(e,t,i){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[i],!n)return ui(e.clipPos(g(e.display.viewTo-1)),!0);t=null,i=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var o=0;o<e.display.view.length;o++){var a=e.display.view[o];if(a.node==n)return vg(a,t,i)}}function vg(e,t,i){var n=e.text.firstChild,o=!1;if(!t||!fe(n,t))return ui(g(Xe(e.line),0),!0);if(t==n&&(o=!0,t=n.childNodes[i],i=0,!t)){var a=e.rest?H(e.rest):e.line;return ui(g(Xe(a),a.text.length),o)}var c=t.nodeType==3?t:null,h=t;for(!c&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(c=t.firstChild,i&&(i=c.nodeValue.length));h.parentNode!=n;)h=h.parentNode;var p=e.measure,m=p.maps;function S(se,ge,be){for(var ve=-1;ve<(m?m.length:0);ve++)for(var xe=ve<0?p.map:m[ve],Ae=0;Ae<xe.length;Ae+=3){var Pe=xe[Ae+2];if(Pe==se||Pe==ge){var Be=Xe(ve<0?e.line:e.rest[ve]),et=xe[Ae]+be;return(be<0||Pe!=se)&&(et=xe[Ae+(be?1:0)]),g(Be,et)}}}var _=S(c,h,i);if(_)return ui(_,o);for(var R=h.nextSibling,M=c?c.nodeValue.length-i:0;R;R=R.nextSibling){if(_=S(R,R.firstChild,0),_)return ui(g(_.line,_.ch-M),o);M+=R.textContent.length}for(var $=h.previousSibling,Z=i;$;$=$.previousSibling){if(_=S($,$.firstChild,-1),_)return ui(g(_.line,_.ch+Z),o);Z+=$.textContent.length}}var gt=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new V,this.hasSelection=!1,this.composing=null};gt.prototype.init=function(e){var t=this,i=this,n=this.cm;this.createField(e);var o=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),D&&(o.style.width="0px"),Oe(o,"input",function(){y&&x>=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),Oe(o,"paste",function(c){ht(n,c)||Rf(c,n)||(n.state.pasteIncoming=+new Date,i.fastPoll())});function a(c){if(!ht(n,c)){if(n.somethingSelected())is({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var h=Ff(n);is({lineWise:!0,text:h.text}),c.type=="cut"?n.setSelections(h.ranges,null,we):(i.prevInput="",o.value=h.text.join(`
20
+ `),tt(o))}else return;c.type=="cut"&&(n.state.cutIncoming=+new Date)}}Oe(o,"cut",a),Oe(o,"copy",a),Oe(e.scroller,"paste",function(c){if(!(jr(e,c)||ht(n,c))){if(!o.dispatchEvent){n.state.pasteIncoming=+new Date,i.focus();return}var h=new Event("paste");h.clipboardData=c.clipboardData,o.dispatchEvent(h)}}),Oe(e.lineSpace,"selectstart",function(c){jr(e,c)||St(c)}),Oe(o,"compositionstart",function(){var c=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:c,range:n.markText(c,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Oe(o,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},gt.prototype.createField=function(e){this.wrapper=Hf(),this.textarea=this.wrapper.firstChild},gt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},gt.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,n=Pu(e);if(e.options.moveInputWithCursor){var o=pr(e,i.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),c=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+c.top-a.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+c.left-a.left))}return n},gt.prototype.showSelection=function(e){var t=this.cm,i=t.display;le(i.cursorDiv,e.cursors),le(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},gt.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing)){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&tt(this.textarea),y&&x>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",y&&x>=9&&(this.hasSelection=null))}},gt.prototype.getField=function(){return this.textarea},gt.prototype.supportsTouch=function(){return!1},gt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!K||Le()!=this.textarea))try{this.textarea.focus()}catch{}},gt.prototype.blur=function(){this.textarea.blur()},gt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},gt.prototype.receivedFocus=function(){this.slowPoll()},gt.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},gt.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function i(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,i)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,i)},gt.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Po(i)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=i.value;if(o==n&&!t.somethingSelected())return!1;if(y&&x>=9&&this.hasSelection===o||te&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=o.charCodeAt(0);if(a==8203&&!n&&(n="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var c=0,h=Math.min(n.length,o.length);c<h&&n.charCodeAt(c)==o.charCodeAt(c);)++c;return Jt(t,function(){Dl(t,o.slice(c),n.length-c,null,e.composing?"*compose":null),o.length>1e3||o.indexOf(`
21
+ `)>-1?i.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},gt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},gt.prototype.onKeyPress=function(){y&&x>=9&&(this.hasSelection=null),this.fastPoll()},gt.prototype.onContextMenu=function(e){var t=this,i=t.cm,n=i.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=Pn(i,e),c=n.scroller.scrollTop;if(!a||I)return;var h=i.options.resetSelectionOnContextMenu;h&&i.doc.sel.contains(a)==-1&&_t(i,Rt)(i.doc,nn(a),we);var p=o.style.cssText,m=t.wrapper.style.cssText,S=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",o.style.cssText=`position: absolute; width: 30px; height: 30px;
22
+ top: `+(e.clientY-S.top-5)+"px; left: "+(e.clientX-S.left-5)+`px;
23
+ z-index: 1000; background: `+(y?"rgba(255, 255, 255, .05)":"transparent")+`;
24
+ outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var _;C&&(_=window.scrollY),n.input.focus(),C&&window.scrollTo(null,_),n.input.reset(),i.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=M,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll);function R(){if(o.selectionStart!=null){var Z=i.somethingSelected(),se="\u200B"+(Z?o.value:"");o.value="\u21DA",o.value=se,t.prevInput=Z?"":"\u200B",o.selectionStart=1,o.selectionEnd=se.length,n.selForContextMenu=i.doc.sel}}function M(){if(t.contextMenuPending==M&&(t.contextMenuPending=!1,t.wrapper.style.cssText=m,o.style.cssText=p,y&&x<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=c),o.selectionStart!=null)){(!y||y&&x<9)&&R();var Z=0,se=function(){n.selForContextMenu==i.doc.sel&&o.selectionStart==0&&o.selectionEnd>0&&t.prevInput=="\u200B"?_t(i,of)(i):Z++<10?n.detectingSelectAll=setTimeout(se,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(se,200)}}if(y&&x>=9&&R(),me){kr(e);var $=function(){ze(window,"mouseup",$),setTimeout(M,20)};Oe(window,"mouseup",$)}else setTimeout(M,50)},gt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},gt.prototype.setUneditable=function(){},gt.prototype.needsContentAttribute=!1;function mg(e,t){if(t=t?at(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 i=Le();t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function n(){e.value=h.getValue()}var o;if(e.form&&(Oe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var a=e.form;o=a.submit;try{var c=a.submit=function(){n(),a.submit=o,a.submit(),a.submit=c}}catch{}}t.finishInit=function(p){p.save=n,p.getTextArea=function(){return e},p.toTextArea=function(){p.toTextArea=isNaN,n(),e.parentNode.removeChild(p.getWrapperElement()),e.style.display="",e.form&&(ze(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=o))}},e.style.display="none";var h=ut(function(p){return e.parentNode.insertBefore(p,e.nextSibling)},t);return h}function yg(e){e.off=ze,e.on=Oe,e.wheelEventPixels=_p,e.Doc=Kt,e.splitLines=Kn,e.countColumn=q,e.findColumn=P,e.isWordChar=T,e.Pass=_e,e.signal=it,e.Line=Gn,e.changeEnd=on,e.scrollbarModel=zu,e.Pos=g,e.cmpPos=k,e.modes=_r,e.mimeModes=Rr,e.resolveMode=kn,e.getMode=Vr,e.modeExtensions=Ht,e.extendMode=Sn,e.copyState=Fr,e.startState=Oo,e.innerMode=qn,e.commands=to,e.keyMap=Kr,e.keyName=xf,e.isModifierKey=bf,e.lookupKey=si,e.normalizeKeyMap=Gp,e.StringStream=ot,e.SharedTextMarker=Qi,e.TextMarker=ln,e.LineWidget=Ji,e.e_preventDefault=St,e.e_stopPropagation=ur,e.e_stop=kr,e.addClass=Ke,e.contains=fe,e.rmClass=Ee,e.keyNames=an}ug(ut),hg(ut);var bg="iter insert remove copy getEditor constructor".split(" ");for(var ss in Kt.prototype)Kt.prototype.hasOwnProperty(ss)&&W(bg,ss)<0&&(ut.prototype[ss]=function(e){return function(){return e.apply(this.doc,arguments)}}(Kt.prototype[ss]));return Qr(Kt),ut.inputStyles={textarea:gt,contenteditable:Qe},ut.defineMode=function(e){!ut.defaults.mode&&e!="null"&&(ut.defaults.mode=e),Dr.apply(this,arguments)},ut.defineMIME=Gs,ut.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ut.defineMIME("text/plain","null"),ut.defineExtension=function(e,t){ut.prototype[e]=t},ut.defineDocExtension=function(e,t){Kt.prototype[e]=t},ut.fromTextArea=mg,yg(ut),ut.version="5.65.5",ut})})(Zr);var r0=Zr.exports,th={exports:{}};(function(r,s){(function(l){l(Zr.exports)})(function(l){l.defineMode("javascript",function(u,f){var d=u.indentUnit,v=f.statementIndent,b=f.jsonld,y=f.json||b,x=f.trackScope!==!1,C=f.typescript,L=f.wordCharacters||/[\w$\xa1-\uffff]/,O=function(){function g(Ce){return{type:Ce,style:"keyword"}}var k=g("keyword a"),X=g("keyword b"),ie=g("keyword c"),De=g("keyword d"),qe=g("operator"),Je={type:"atom",style:"atom"};return{if:g("if"),while:k,with:k,else:X,do:X,try:X,finally:X,return:De,break:De,continue:De,new:g("new"),delete:ie,void:ie,throw:ie,debugger:g("debugger"),var:g("var"),const:g("var"),let:g("var"),function:g("function"),catch:g("catch"),for:g("for"),switch:g("switch"),case:g("case"),default:g("default"),in:qe,typeof:qe,instanceof:qe,true:Je,false:Je,null:Je,undefined:Je,NaN:Je,Infinity:Je,this:g("this"),class:g("class"),super:g("atom"),yield:ie,export:g("export"),import:g("import"),extends:ie,await:ie}}(),A=/[+\-*&%=<>!?|~^@]/,I=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function ee(g){for(var k=!1,X,ie=!1;(X=g.next())!=null;){if(!k){if(X=="/"&&!ie)return;X=="["?ie=!0:ie&&X=="]"&&(ie=!1)}k=!k&&X=="\\"}}var J,N;function D(g,k,X){return J=g,N=X,k}function F(g,k){var X=g.next();if(X=='"'||X=="'")return k.tokenize=K(X),k.tokenize(g,k);if(X=="."&&g.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return D("number","number");if(X=="."&&g.match(".."))return D("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(X))return D(X);if(X=="="&&g.eat(">"))return D("=>","operator");if(X=="0"&&g.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return D("number","number");if(/\d/.test(X))return g.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),D("number","number");if(X=="/")return g.eat("*")?(k.tokenize=te,te(g,k)):g.eat("/")?(g.skipToEnd(),D("comment","comment")):$n(g,k,1)?(ee(g),g.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),D("regexp","string-2")):(g.eat("="),D("operator","operator",g.current()));if(X=="`")return k.tokenize=de,de(g,k);if(X=="#"&&g.peek()=="!")return g.skipToEnd(),D("meta","meta");if(X=="#"&&g.eatWhile(L))return D("variable","property");if(X=="<"&&g.match("!--")||X=="-"&&g.match("->")&&!/\S/.test(g.string.slice(0,g.start)))return g.skipToEnd(),D("comment","comment");if(A.test(X))return(X!=">"||!k.lexical||k.lexical.type!=">")&&(g.eat("=")?(X=="!"||X=="=")&&g.eat("="):/[<>*+\-|&?]/.test(X)&&(g.eat(X),X==">"&&g.eat(X))),X=="?"&&g.eat(".")?D("."):D("operator","operator",g.current());if(L.test(X)){g.eatWhile(L);var ie=g.current();if(k.lastType!="."){if(O.propertyIsEnumerable(ie)){var De=O[ie];return D(De.type,De.style,ie)}if(ie=="async"&&g.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return D("async","keyword",ie)}return D("variable","variable",ie)}}function K(g){return function(k,X){var ie=!1,De;if(b&&k.peek()=="@"&&k.match(I))return X.tokenize=F,D("jsonld-keyword","meta");for(;(De=k.next())!=null&&!(De==g&&!ie);)ie=!ie&&De=="\\";return ie||(X.tokenize=F),D("string","string")}}function te(g,k){for(var X=!1,ie;ie=g.next();){if(ie=="/"&&X){k.tokenize=F;break}X=ie=="*"}return D("comment","comment")}function de(g,k){for(var X=!1,ie;(ie=g.next())!=null;){if(!X&&(ie=="`"||ie=="$"&&g.eat("{"))){k.tokenize=F;break}X=!X&&ie=="\\"}return D("quasi","string-2",g.current())}var ye="([{}])";function Re(g,k){k.fatArrowAt&&(k.fatArrowAt=null);var X=g.string.indexOf("=>",g.start);if(!(X<0)){if(C){var ie=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(g.string.slice(g.start,X));ie&&(X=ie.index)}for(var De=0,qe=!1,Je=X-1;Je>=0;--Je){var Ce=g.string.charAt(Je),dr=ye.indexOf(Ce);if(dr>=0&&dr<3){if(!De){++Je;break}if(--De==0){Ce=="("&&(qe=!0);break}}else if(dr>=3&&dr<6)++De;else if(L.test(Ce))qe=!0;else if(/["'\/`]/.test(Ce))for(;;--Je){if(Je==0)return;var Mo=g.string.charAt(Je-1);if(Mo==Ce&&g.string.charAt(Je-2)!="\\"){Je--;break}}else if(qe&&!De){++Je;break}}qe&&!De&&(k.fatArrowAt=Je)}}var Ne={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function me(g,k,X,ie,De,qe){this.indented=g,this.column=k,this.type=X,this.prev=De,this.info=qe,ie!=null&&(this.align=ie)}function ce(g,k){if(!x)return!1;for(var X=g.localVars;X;X=X.next)if(X.name==k)return!0;for(var ie=g.context;ie;ie=ie.prev)for(var X=ie.vars;X;X=X.next)if(X.name==k)return!0}function Ee(g,k,X,ie,De){var qe=g.cc;for(U.state=g,U.stream=De,U.marked=null,U.cc=qe,U.style=k,g.lexical.hasOwnProperty("align")||(g.lexical.align=!0);;){var Je=qe.length?qe.pop():y?pe:_e;if(Je(X,ie)){for(;qe.length&&qe[qe.length-1].lex;)qe.pop()();return U.marked?U.marked:X=="variable"&&ce(g,ie)?"variable-2":k}}}var U={state:null,column:null,marked:null,cc:null};function le(){for(var g=arguments.length-1;g>=0;g--)U.cc.push(arguments[g])}function w(){return le.apply(null,arguments),!0}function Q(g,k){for(var X=k;X;X=X.next)if(X.name==g)return!0;return!1}function G(g){var k=U.state;if(U.marked="def",!!x){if(k.context){if(k.lexical.info=="var"&&k.context&&k.context.block){var X=fe(g,k.context);if(X!=null){k.context=X;return}}else if(!Q(g,k.localVars)){k.localVars=new lt(g,k.localVars);return}}f.globalVars&&!Q(g,k.globalVars)&&(k.globalVars=new lt(g,k.globalVars))}}function fe(g,k){if(k)if(k.block){var X=fe(g,k.prev);return X?X==k.prev?k:new Ke(X,k.vars,!0):null}else return Q(g,k.vars)?k:new Ke(k.prev,new lt(g,k.vars),!1);else return null}function Le(g){return g=="public"||g=="private"||g=="protected"||g=="abstract"||g=="readonly"}function Ke(g,k,X){this.prev=g,this.vars=k,this.block=X}function lt(g,k){this.name=g,this.next=k}var tt=new lt("this",new lt("arguments",null));function He(){U.state.context=new Ke(U.state.context,U.state.localVars,!1),U.state.localVars=tt}function at(){U.state.context=new Ke(U.state.context,U.state.localVars,!0),U.state.localVars=null}He.lex=at.lex=!0;function q(){U.state.localVars=U.state.context.vars,U.state.context=U.state.context.prev}q.lex=!0;function V(g,k){var X=function(){var ie=U.state,De=ie.indented;if(ie.lexical.type=="stat")De=ie.lexical.indented;else for(var qe=ie.lexical;qe&&qe.type==")"&&qe.align;qe=qe.prev)De=qe.indented;ie.lexical=new me(De,U.stream.column(),g,null,ie.lexical,k)};return X.lex=!0,X}function W(){var g=U.state;g.lexical.prev&&(g.lexical.type==")"&&(g.indented=g.lexical.indented),g.lexical=g.lexical.prev)}W.lex=!0;function oe(g){function k(X){return X==g?w():g==";"||X=="}"||X==")"||X=="]"?le():w(k)}return k}function _e(g,k){return g=="var"?w(V("vardef",k),jn,oe(";"),W):g=="keyword a"?w(V("form"),P,_e,W):g=="keyword b"?w(V("form"),_e,W):g=="keyword d"?U.stream.match(/^\s*$/,!1)?w():w(V("stat"),B,oe(";"),W):g=="debugger"?w(oe(";")):g=="{"?w(V("}"),at,nr,W,q):g==";"?w():g=="if"?(U.state.lexical.info=="else"&&U.state.cc[U.state.cc.length-1]==W&&U.state.cc.pop()(),w(V("form"),P,_e,W,Kn)):g=="function"?w(Cr):g=="for"?w(V("form"),at,Po,_e,q,W):g=="class"||C&&k=="interface"?(U.marked="keyword",w(V("form",g=="class"?g:k),kn,W)):g=="variable"?C&&k=="declare"?(U.marked="keyword",w(_e)):C&&(k=="module"||k=="enum"||k=="type")&&U.stream.match(/^\s*\w/,!1)?(U.marked="keyword",k=="enum"?w(Xe):k=="type"?w(Rr,oe("operator"),ze,oe(";")):w(V("form"),ir,oe("{"),V("}"),nr,W,W)):C&&k=="namespace"?(U.marked="keyword",w(V("form"),pe,_e,W)):C&&k=="abstract"?(U.marked="keyword",w(_e)):w(V("stat"),he):g=="switch"?w(V("form"),P,oe("{"),V("}","switch"),at,nr,W,W,q):g=="case"?w(pe,oe(":")):g=="default"?w(oe(":")):g=="catch"?w(V("form"),He,we,_e,W,q):g=="export"?w(V("stat"),Fr,W):g=="import"?w(V("stat"),Oo,W):g=="async"?w(_e):k=="@"?w(pe,_e):le(V("stat"),pe,oe(";"),W)}function we(g){if(g=="(")return w(Dr,oe(")"))}function pe(g,k){return E(g,k,!1)}function ke(g,k){return E(g,k,!0)}function P(g){return g!="("?le():w(V(")"),B,oe(")"),W)}function E(g,k,X){if(U.state.fatArrowAt==U.stream.start){var ie=X?re:ue;if(g=="(")return w(He,V(")"),Ie(Dr,")"),W,oe("=>"),ie,q);if(g=="variable")return le(He,ir,oe("=>"),ie,q)}var De=X?Y:H;return Ne.hasOwnProperty(g)?w(De):g=="function"?w(Cr,De):g=="class"||C&&k=="interface"?(U.marked="keyword",w(V("form"),Gs,W)):g=="keyword c"||g=="async"?w(X?ke:pe):g=="("?w(V(")"),B,oe(")"),W,De):g=="operator"||g=="spread"?w(X?ke:pe):g=="["?w(V("]"),cr,W,De):g=="{"?dt(je,"}",null,De):g=="quasi"?le(ne,De):g=="new"?w(T(X)):w()}function B(g){return g.match(/[;\}\)\],]/)?le():le(pe)}function H(g,k){return g==","?w(B):Y(g,k,!1)}function Y(g,k,X){var ie=X==!1?H:Y,De=X==!1?pe:ke;if(g=="=>")return w(He,X?re:ue,q);if(g=="operator")return/\+\+|--/.test(k)||C&&k=="!"?w(ie):C&&k=="<"&&U.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?w(V(">"),Ie(ze,">"),W,ie):k=="?"?w(pe,oe(":"),De):w(De);if(g=="quasi")return le(ne,ie);if(g!=";"){if(g=="(")return dt(ke,")","call",ie);if(g==".")return w(Te,ie);if(g=="[")return w(V("]"),B,oe("]"),W,ie);if(C&&k=="as")return U.marked="keyword",w(ze,ie);if(g=="regexp")return U.state.lastType=U.marked="operator",U.stream.backUp(U.stream.pos-U.stream.start-1),w(De)}}function ne(g,k){return g!="quasi"?le():k.slice(k.length-2)!="${"?w(ne):w(B,ae)}function ae(g){if(g=="}")return U.marked="string-2",U.state.tokenize=de,w(ne)}function ue(g){return Re(U.stream,U.state),le(g=="{"?_e:pe)}function re(g){return Re(U.stream,U.state),le(g=="{"?_e:ke)}function T(g){return function(k){return k=="."?w(g?z:j):k=="variable"&&C?w(Ei,g?Y:H):le(g?ke:pe)}}function j(g,k){if(k=="target")return U.marked="keyword",w(H)}function z(g,k){if(k=="target")return U.marked="keyword",w(Y)}function he(g){return g==":"?w(W,_e):le(H,oe(";"),W)}function Te(g){if(g=="variable")return U.marked="property",w()}function je(g,k){if(g=="async")return U.marked="property",w(je);if(g=="variable"||U.style=="keyword"){if(U.marked="property",k=="get"||k=="set")return w(Ge);var X;return C&&U.state.fatArrowAt==U.stream.start&&(X=U.stream.match(/^\s*:\s*/,!1))&&(U.state.fatArrowAt=U.stream.pos+X[0].length),w($e)}else{if(g=="number"||g=="string")return U.marked=b?"property":U.style+" property",w($e);if(g=="jsonld-keyword")return w($e);if(C&&Le(k))return U.marked="keyword",w(je);if(g=="[")return w(pe,xt,oe("]"),$e);if(g=="spread")return w(ke,$e);if(k=="*")return U.marked="keyword",w(je);if(g==":")return le($e)}}function Ge(g){return g!="variable"?le($e):(U.marked="property",w(Cr))}function $e(g){if(g==":")return w(ke);if(g=="(")return le(Cr)}function Ie(g,k,X){function ie(De,qe){if(X?X.indexOf(De)>-1:De==","){var Je=U.state.lexical;return Je.info=="call"&&(Je.pos=(Je.pos||0)+1),w(function(Ce,dr){return Ce==k||dr==k?le():le(g)},ie)}return De==k||qe==k?w():X&&X.indexOf(";")>-1?le(g):w(oe(k))}return function(De,qe){return De==k||qe==k?w():le(g,ie)}}function dt(g,k,X){for(var ie=3;ie<arguments.length;ie++)U.cc.push(arguments[ie]);return w(V(k,X),Ie(g,k),W)}function nr(g){return g=="}"?w():le(_e,nr)}function xt(g,k){if(C){if(g==":")return w(ze);if(k=="?")return w(xt)}}function xr(g,k){if(C&&(g==":"||k=="in"))return w(ze)}function Oe(g){if(C&&g==":")return U.stream.match(/^\s*\w+\s+is\b/,!1)?w(pe,kt,ze):w(ze)}function kt(g,k){if(k=="is")return U.marked="keyword",w()}function ze(g,k){if(k=="keyof"||k=="typeof"||k=="infer"||k=="readonly")return U.marked="keyword",w(k=="typeof"?ke:ze);if(g=="variable"||k=="void")return U.marked="type",w(ur);if(k=="|"||k=="&")return w(ze);if(g=="string"||g=="number"||g=="atom")return w(ur);if(g=="[")return w(V("]"),Ie(ze,"]",","),W,ur);if(g=="{")return w(V("}"),ht,W,ur);if(g=="(")return w(Ie(St,")"),it,ur);if(g=="<")return w(Ie(ze,">"),ze);if(g=="quasi")return le(It,ur)}function it(g){if(g=="=>")return w(ze)}function ht(g){return g.match(/[\}\)\]]/)?w():g==","||g==";"?w(ht):le(Jr,ht)}function Jr(g,k){if(g=="variable"||U.style=="keyword")return U.marked="property",w(Jr);if(k=="?"||g=="number"||g=="string")return w(Jr);if(g==":")return w(ze);if(g=="[")return w(oe("variable"),xr,oe("]"),Jr);if(g=="(")return le(_r,Jr);if(!g.match(/[;\}\)\],]/))return w()}function It(g,k){return g!="quasi"?le():k.slice(k.length-2)!="${"?w(It):w(ze,Qr)}function Qr(g){if(g=="}")return U.marked="string-2",U.state.tokenize=de,w(It)}function St(g,k){return g=="variable"&&U.stream.match(/^\s*[?:]/,!1)||k=="?"?w(St):g==":"?w(ze):g=="spread"?w(St):le(ze)}function ur(g,k){if(k=="<")return w(V(">"),Ie(ze,">"),W,ur);if(k=="|"||g=="."||k=="&")return w(ze);if(g=="[")return w(ze,oe("]"),ur);if(k=="extends"||k=="implements")return U.marked="keyword",w(ze);if(k=="?")return w(ze,oe(":"),ze)}function Ei(g,k){if(k=="<")return w(V(">"),Ie(ze,">"),W,ur)}function kr(){return le(ze,Ai)}function Ai(g,k){if(k=="=")return w(ze)}function jn(g,k){return k=="enum"?(U.marked="keyword",w(Xe)):le(ir,xt,fr,qs)}function ir(g,k){if(C&&Le(k))return U.marked="keyword",w(ir);if(g=="variable")return G(k),w();if(g=="spread")return w(ir);if(g=="[")return dt(Ks,"]");if(g=="{")return dt(Un,"}")}function Un(g,k){return g=="variable"&&!U.stream.match(/^\s*:/,!1)?(G(k),w(fr)):(g=="variable"&&(U.marked="property"),g=="spread"?w(ir):g=="}"?le():g=="["?w(pe,oe("]"),oe(":"),Un):w(oe(":"),ir,fr))}function Ks(){return le(ir,fr)}function fr(g,k){if(k=="=")return w(ke)}function qs(g){if(g==",")return w(jn)}function Kn(g,k){if(g=="keyword b"&&k=="else")return w(V("form","else"),_e,W)}function Po(g,k){if(k=="await")return w(Po);if(g=="(")return w(V(")"),$s,W)}function $s(g){return g=="var"?w(jn,Sr):g=="variable"?w(Sr):le(Sr)}function Sr(g,k){return g==")"?w():g==";"?w(Sr):k=="in"||k=="of"?(U.marked="keyword",w(pe,Sr)):le(pe,Sr)}function Cr(g,k){if(k=="*")return U.marked="keyword",w(Cr);if(g=="variable")return G(k),w(Cr);if(g=="(")return w(He,V(")"),Ie(Dr,")"),W,Oe,_e,q);if(C&&k=="<")return w(V(">"),Ie(kr,">"),W,Cr)}function _r(g,k){if(k=="*")return U.marked="keyword",w(_r);if(g=="variable")return G(k),w(_r);if(g=="(")return w(He,V(")"),Ie(Dr,")"),W,Oe,q);if(C&&k=="<")return w(V(">"),Ie(kr,">"),W,_r)}function Rr(g,k){if(g=="keyword"||g=="variable")return U.marked="type",w(Rr);if(k=="<")return w(V(">"),Ie(kr,">"),W)}function Dr(g,k){return k=="@"&&w(pe,Dr),g=="spread"?w(Dr):C&&Le(k)?(U.marked="keyword",w(Dr)):C&&g=="this"?w(xt,fr):le(ir,xt,fr)}function Gs(g,k){return g=="variable"?kn(g,k):Vr(g,k)}function kn(g,k){if(g=="variable")return G(k),w(Vr)}function Vr(g,k){if(k=="<")return w(V(">"),Ie(kr,">"),W,Vr);if(k=="extends"||k=="implements"||C&&g==",")return k=="implements"&&(U.marked="keyword"),w(C?ze:pe,Vr);if(g=="{")return w(V("}"),Ht,W)}function Ht(g,k){if(g=="async"||g=="variable"&&(k=="static"||k=="get"||k=="set"||C&&Le(k))&&U.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return U.marked="keyword",w(Ht);if(g=="variable"||U.style=="keyword")return U.marked="property",w(Sn,Ht);if(g=="number"||g=="string")return w(Sn,Ht);if(g=="[")return w(pe,xt,oe("]"),Sn,Ht);if(k=="*")return U.marked="keyword",w(Ht);if(C&&g=="(")return le(_r,Ht);if(g==";"||g==",")return w(Ht);if(g=="}")return w();if(k=="@")return w(pe,Ht)}function Sn(g,k){if(k=="!"||k=="?")return w(Sn);if(g==":")return w(ze,fr);if(k=="=")return w(ke);var X=U.state.lexical.prev,ie=X&&X.info=="interface";return le(ie?_r:Cr)}function Fr(g,k){return k=="*"?(U.marked="keyword",w(Cn,oe(";"))):k=="default"?(U.marked="keyword",w(pe,oe(";"))):g=="{"?w(Ie(qn,"}"),Cn,oe(";")):le(_e)}function qn(g,k){if(k=="as")return U.marked="keyword",w(oe("variable"));if(g=="variable")return le(ke,qn)}function Oo(g){return g=="string"?w():g=="("?le(pe):g=="."?le(H):le(ot,Se,Cn)}function ot(g,k){return g=="{"?dt(ot,"}"):(g=="variable"&&G(k),k=="*"&&(U.marked="keyword"),w(Ir))}function Se(g){if(g==",")return w(ot,Se)}function Ir(g,k){if(k=="as")return U.marked="keyword",w(ot)}function Cn(g,k){if(k=="from")return U.marked="keyword",w(pe)}function cr(g){return g=="]"?w():le(Ie(ke,"]"))}function Xe(){return le(V("form"),ir,oe("{"),V("}"),Ie(Hr,"}"),W,W)}function Hr(){return le(ir,fr)}function _n(g,k){return g.lastType=="operator"||g.lastType==","||A.test(k.charAt(0))||/[,.]/.test(k.charAt(0))}function $n(g,k,X){return k.tokenize==F&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(k.lastType)||k.lastType=="quasi"&&/\{\s*$/.test(g.string.slice(0,g.pos-(X||0)))}return{startState:function(g){var k={tokenize:F,lastType:"sof",cc:[],lexical:new me((g||0)-d,0,"block",!1),localVars:f.localVars,context:f.localVars&&new Ke(null,null,!1),indented:g||0};return f.globalVars&&typeof f.globalVars=="object"&&(k.globalVars=f.globalVars),k},token:function(g,k){if(g.sol()&&(k.lexical.hasOwnProperty("align")||(k.lexical.align=!1),k.indented=g.indentation(),Re(g,k)),k.tokenize!=te&&g.eatSpace())return null;var X=k.tokenize(g,k);return J=="comment"?X:(k.lastType=J=="operator"&&(N=="++"||N=="--")?"incdec":J,Ee(k,X,J,N,g))},indent:function(g,k){if(g.tokenize==te||g.tokenize==de)return l.Pass;if(g.tokenize!=F)return 0;var X=k&&k.charAt(0),ie=g.lexical,De;if(!/^\s*else\b/.test(k))for(var qe=g.cc.length-1;qe>=0;--qe){var Je=g.cc[qe];if(Je==W)ie=ie.prev;else if(Je!=Kn&&Je!=q)break}for(;(ie.type=="stat"||ie.type=="form")&&(X=="}"||(De=g.cc[g.cc.length-1])&&(De==H||De==Y)&&!/^[,\.=+\-*:?[\(]/.test(k));)ie=ie.prev;v&&ie.type==")"&&ie.prev.type=="stat"&&(ie=ie.prev);var Ce=ie.type,dr=X==Ce;return Ce=="vardef"?ie.indented+(g.lastType=="operator"||g.lastType==","?ie.info.length+1:0):Ce=="form"&&X=="{"?ie.indented:Ce=="form"?ie.indented+d:Ce=="stat"?ie.indented+(_n(g,k)?v||d:0):ie.info=="switch"&&!dr&&f.doubleIndentSwitch!=!1?ie.indented+(/^(?:case|default)\b/.test(k)?d:2*d):ie.align?ie.column+(dr?0:1):ie.indented+(dr?0:d)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:y?null:"/*",blockCommentEnd:y?null:"*/",blockCommentContinue:y?null:" * ",lineComment:y?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:y?"json":"javascript",jsonldMode:b,jsonMode:y,expressionAllowed:$n,skipExpression:function(g){Ee(g,"atom","atom","true",new l.StringStream("",2,null))}}}),l.registerHelper("wordChars","javascript",/[\w$]/),l.defineMIME("text/javascript","javascript"),l.defineMIME("text/ecmascript","javascript"),l.defineMIME("application/javascript","javascript"),l.defineMIME("application/x-javascript","javascript"),l.defineMIME("application/ecmascript","javascript"),l.defineMIME("application/json",{name:"javascript",json:!0}),l.defineMIME("application/x-json",{name:"javascript",json:!0}),l.defineMIME("application/manifest+json",{name:"javascript",json:!0}),l.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),l.defineMIME("text/typescript",{name:"javascript",typescript:!0}),l.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var n0={exports:{}};(function(r,s){(function(l){l(Zr.exports)})(function(l){l.defineMode("css",function(me,ce){var Ee=ce.inline;ce.propertyKeywords||(ce=l.resolveMode("text/css"));var U=me.indentUnit,le=ce.tokenHooks,w=ce.documentTypes||{},Q=ce.mediaTypes||{},G=ce.mediaFeatures||{},fe=ce.mediaValueKeywords||{},Le=ce.propertyKeywords||{},Ke=ce.nonStandardPropertyKeywords||{},lt=ce.fontProperties||{},tt=ce.counterDescriptors||{},He=ce.colorKeywords||{},at=ce.valueKeywords||{},q=ce.allowNested,V=ce.lineComment,W=ce.supportsAtComponent===!0,oe=me.highlightNonStandardPropertyKeywords!==!1,_e,we;function pe(T,j){return _e=j,T}function ke(T,j){var z=T.next();if(le[z]){var he=le[z](T,j);if(he!==!1)return he}if(z=="@")return T.eatWhile(/[\w\\\-]/),pe("def",T.current());if(z=="="||(z=="~"||z=="|")&&T.eat("="))return pe(null,"compare");if(z=='"'||z=="'")return j.tokenize=P(z),j.tokenize(T,j);if(z=="#")return T.eatWhile(/[\w\\\-]/),pe("atom","hash");if(z=="!")return T.match(/^\s*\w*/),pe("keyword","important");if(/\d/.test(z)||z=="."&&T.eat(/\d/))return T.eatWhile(/[\w.%]/),pe("number","unit");if(z==="-"){if(/[\d.]/.test(T.peek()))return T.eatWhile(/[\w.%]/),pe("number","unit");if(T.match(/^-[\w\\\-]*/))return T.eatWhile(/[\w\\\-]/),T.match(/^\s*:/,!1)?pe("variable-2","variable-definition"):pe("variable-2","variable");if(T.match(/^\w+-/))return pe("meta","meta")}else return/[,+>*\/]/.test(z)?pe(null,"select-op"):z=="."&&T.match(/^-?[_a-z][_a-z0-9-]*/i)?pe("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(z)?pe(null,z):T.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(T.current())&&(j.tokenize=E),pe("variable callee","variable")):/[\w\\\-]/.test(z)?(T.eatWhile(/[\w\\\-]/),pe("property","word")):pe(null,null)}function P(T){return function(j,z){for(var he=!1,Te;(Te=j.next())!=null;){if(Te==T&&!he){T==")"&&j.backUp(1);break}he=!he&&Te=="\\"}return(Te==T||!he&&T!=")")&&(z.tokenize=null),pe("string","string")}}function E(T,j){return T.next(),T.match(/^\s*[\"\')]/,!1)?j.tokenize=null:j.tokenize=P(")"),pe(null,"(")}function B(T,j,z){this.type=T,this.indent=j,this.prev=z}function H(T,j,z,he){return T.context=new B(z,j.indentation()+(he===!1?0:U),T.context),z}function Y(T){return T.context.prev&&(T.context=T.context.prev),T.context.type}function ne(T,j,z){return re[z.context.type](T,j,z)}function ae(T,j,z,he){for(var Te=he||1;Te>0;Te--)z.context=z.context.prev;return ne(T,j,z)}function ue(T){var j=T.current().toLowerCase();at.hasOwnProperty(j)?we="atom":He.hasOwnProperty(j)?we="keyword":we="variable"}var re={};return re.top=function(T,j,z){if(T=="{")return H(z,j,"block");if(T=="}"&&z.context.prev)return Y(z);if(W&&/@component/i.test(T))return H(z,j,"atComponentBlock");if(/^@(-moz-)?document$/i.test(T))return H(z,j,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(T))return H(z,j,"atBlock");if(/^@(font-face|counter-style)/i.test(T))return z.stateArg=T,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(T))return"keyframes";if(T&&T.charAt(0)=="@")return H(z,j,"at");if(T=="hash")we="builtin";else if(T=="word")we="tag";else{if(T=="variable-definition")return"maybeprop";if(T=="interpolation")return H(z,j,"interpolation");if(T==":")return"pseudo";if(q&&T=="(")return H(z,j,"parens")}return z.context.type},re.block=function(T,j,z){if(T=="word"){var he=j.current().toLowerCase();return Le.hasOwnProperty(he)?(we="property","maybeprop"):Ke.hasOwnProperty(he)?(we=oe?"string-2":"property","maybeprop"):q?(we=j.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(we+=" error","maybeprop")}else return T=="meta"?"block":!q&&(T=="hash"||T=="qualifier")?(we="error","block"):re.top(T,j,z)},re.maybeprop=function(T,j,z){return T==":"?H(z,j,"prop"):ne(T,j,z)},re.prop=function(T,j,z){if(T==";")return Y(z);if(T=="{"&&q)return H(z,j,"propBlock");if(T=="}"||T=="{")return ae(T,j,z);if(T=="(")return H(z,j,"parens");if(T=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(j.current()))we+=" error";else if(T=="word")ue(j);else if(T=="interpolation")return H(z,j,"interpolation");return"prop"},re.propBlock=function(T,j,z){return T=="}"?Y(z):T=="word"?(we="property","maybeprop"):z.context.type},re.parens=function(T,j,z){return T=="{"||T=="}"?ae(T,j,z):T==")"?Y(z):T=="("?H(z,j,"parens"):T=="interpolation"?H(z,j,"interpolation"):(T=="word"&&ue(j),"parens")},re.pseudo=function(T,j,z){return T=="meta"?"pseudo":T=="word"?(we="variable-3",z.context.type):ne(T,j,z)},re.documentTypes=function(T,j,z){return T=="word"&&w.hasOwnProperty(j.current())?(we="tag",z.context.type):re.atBlock(T,j,z)},re.atBlock=function(T,j,z){if(T=="(")return H(z,j,"atBlock_parens");if(T=="}"||T==";")return ae(T,j,z);if(T=="{")return Y(z)&&H(z,j,q?"block":"top");if(T=="interpolation")return H(z,j,"interpolation");if(T=="word"){var he=j.current().toLowerCase();he=="only"||he=="not"||he=="and"||he=="or"?we="keyword":Q.hasOwnProperty(he)?we="attribute":G.hasOwnProperty(he)?we="property":fe.hasOwnProperty(he)?we="keyword":Le.hasOwnProperty(he)?we="property":Ke.hasOwnProperty(he)?we=oe?"string-2":"property":at.hasOwnProperty(he)?we="atom":He.hasOwnProperty(he)?we="keyword":we="error"}return z.context.type},re.atComponentBlock=function(T,j,z){return T=="}"?ae(T,j,z):T=="{"?Y(z)&&H(z,j,q?"block":"top",!1):(T=="word"&&(we="error"),z.context.type)},re.atBlock_parens=function(T,j,z){return T==")"?Y(z):T=="{"||T=="}"?ae(T,j,z,2):re.atBlock(T,j,z)},re.restricted_atBlock_before=function(T,j,z){return T=="{"?H(z,j,"restricted_atBlock"):T=="word"&&z.stateArg=="@counter-style"?(we="variable","restricted_atBlock_before"):ne(T,j,z)},re.restricted_atBlock=function(T,j,z){return T=="}"?(z.stateArg=null,Y(z)):T=="word"?(z.stateArg=="@font-face"&&!lt.hasOwnProperty(j.current().toLowerCase())||z.stateArg=="@counter-style"&&!tt.hasOwnProperty(j.current().toLowerCase())?we="error":we="property","maybeprop"):"restricted_atBlock"},re.keyframes=function(T,j,z){return T=="word"?(we="variable","keyframes"):T=="{"?H(z,j,"top"):ne(T,j,z)},re.at=function(T,j,z){return T==";"?Y(z):T=="{"||T=="}"?ae(T,j,z):(T=="word"?we="tag":T=="hash"&&(we="builtin"),"at")},re.interpolation=function(T,j,z){return T=="}"?Y(z):T=="{"||T==";"?ae(T,j,z):(T=="word"?we="variable":T!="variable"&&T!="("&&T!=")"&&(we="error"),"interpolation")},{startState:function(T){return{tokenize:null,state:Ee?"block":"top",stateArg:null,context:new B(Ee?"block":"top",T||0,null)}},token:function(T,j){if(!j.tokenize&&T.eatSpace())return null;var z=(j.tokenize||ke)(T,j);return z&&typeof z=="object"&&(_e=z[1],z=z[0]),we=z,_e!="comment"&&(j.state=re[j.state](_e,T,j)),we},indent:function(T,j){var z=T.context,he=j&&j.charAt(0),Te=z.indent;return z.type=="prop"&&(he=="}"||he==")")&&(z=z.prev),z.prev&&(he=="}"&&(z.type=="block"||z.type=="top"||z.type=="interpolation"||z.type=="restricted_atBlock")?(z=z.prev,Te=z.indent):(he==")"&&(z.type=="parens"||z.type=="atBlock_parens")||he=="{"&&(z.type=="at"||z.type=="atBlock"))&&(Te=Math.max(0,z.indent-U))),Te},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:V,fold:"brace"}});function u(me){for(var ce={},Ee=0;Ee<me.length;++Ee)ce[me[Ee].toLowerCase()]=!0;return ce}var f=["domain","regexp","url","url-prefix"],d=u(f),v=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],b=u(v),y=["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"],x=u(y),C=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],L=u(C),O=["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"],A=u(O),I=["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"],ee=u(I),J=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],N=u(J),D=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],F=u(D),K=["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"],te=u(K),de=["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"],ye=u(de),Re=f.concat(v).concat(y).concat(C).concat(O).concat(I).concat(K).concat(de);l.registerHelper("hintWords","css",Re);function Ne(me,ce){for(var Ee=!1,U;(U=me.next())!=null;){if(Ee&&U=="/"){ce.tokenize=null;break}Ee=U=="*"}return["comment","comment"]}l.defineMIME("text/css",{documentTypes:d,mediaTypes:b,mediaFeatures:x,mediaValueKeywords:L,propertyKeywords:A,nonStandardPropertyKeywords:ee,fontProperties:N,counterDescriptors:F,colorKeywords:te,valueKeywords:ye,tokenHooks:{"/":function(me,ce){return me.eat("*")?(ce.tokenize=Ne,Ne(me,ce)):!1}},name:"css"}),l.defineMIME("text/x-scss",{mediaTypes:b,mediaFeatures:x,mediaValueKeywords:L,propertyKeywords:A,nonStandardPropertyKeywords:ee,colorKeywords:te,valueKeywords:ye,fontProperties:N,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(me,ce){return me.eat("/")?(me.skipToEnd(),["comment","comment"]):me.eat("*")?(ce.tokenize=Ne,Ne(me,ce)):["operator","operator"]},":":function(me){return me.match(/^\s*\{/,!1)?[null,null]:!1},$:function(me){return me.match(/^[\w-]+/),me.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(me){return me.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),l.defineMIME("text/x-less",{mediaTypes:b,mediaFeatures:x,mediaValueKeywords:L,propertyKeywords:A,nonStandardPropertyKeywords:ee,colorKeywords:te,valueKeywords:ye,fontProperties:N,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(me,ce){return me.eat("/")?(me.skipToEnd(),["comment","comment"]):me.eat("*")?(ce.tokenize=Ne,Ne(me,ce)):["operator","operator"]},"@":function(me){return me.eat("{")?[null,"interpolation"]:me.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(me.eatWhile(/[\w\\\-]/),me.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),l.defineMIME("text/x-gss",{documentTypes:d,mediaTypes:b,mediaFeatures:x,propertyKeywords:A,nonStandardPropertyKeywords:ee,fontProperties:N,counterDescriptors:F,colorKeywords:te,valueKeywords:ye,supportsAtComponent:!0,tokenHooks:{"/":function(me,ce){return me.eat("*")?(ce.tokenize=Ne,Ne(me,ce)):!1}},name:"css",helperType:"gss"})})})();var rh={exports:{}};(function(r,s){(function(l){l(Zr.exports)})(function(l){var u={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},f={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};l.defineMode("xml",function(d,v){var b=d.indentUnit,y={},x=v.htmlMode?u:f;for(var C in x)y[C]=x[C];for(var C in v)y[C]=v[C];var L,O;function A(w,Q){function G(Ke){return Q.tokenize=Ke,Ke(w,Q)}var fe=w.next();if(fe=="<")return w.eat("!")?w.eat("[")?w.match("CDATA[")?G(J("atom","]]>")):null:w.match("--")?G(J("comment","-->")):w.match("DOCTYPE",!0,!0)?(w.eatWhile(/[\w\._\-]/),G(N(1))):null:w.eat("?")?(w.eatWhile(/[\w\._\-]/),Q.tokenize=J("meta","?>"),"meta"):(L=w.eat("/")?"closeTag":"openTag",Q.tokenize=I,"tag bracket");if(fe=="&"){var Le;return w.eat("#")?w.eat("x")?Le=w.eatWhile(/[a-fA-F\d]/)&&w.eat(";"):Le=w.eatWhile(/[\d]/)&&w.eat(";"):Le=w.eatWhile(/[\w\.\-:]/)&&w.eat(";"),Le?"atom":"error"}else return w.eatWhile(/[^&<]/),null}A.isInText=!0;function I(w,Q){var G=w.next();if(G==">"||G=="/"&&w.eat(">"))return Q.tokenize=A,L=G==">"?"endTag":"selfcloseTag","tag bracket";if(G=="=")return L="equals",null;if(G=="<"){Q.tokenize=A,Q.state=de,Q.tagName=Q.tagStart=null;var fe=Q.tokenize(w,Q);return fe?fe+" tag error":"tag error"}else return/[\'\"]/.test(G)?(Q.tokenize=ee(G),Q.stringStartCol=w.column(),Q.tokenize(w,Q)):(w.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ee(w){var Q=function(G,fe){for(;!G.eol();)if(G.next()==w){fe.tokenize=I;break}return"string"};return Q.isInAttribute=!0,Q}function J(w,Q){return function(G,fe){for(;!G.eol();){if(G.match(Q)){fe.tokenize=A;break}G.next()}return w}}function N(w){return function(Q,G){for(var fe;(fe=Q.next())!=null;){if(fe=="<")return G.tokenize=N(w+1),G.tokenize(Q,G);if(fe==">")if(w==1){G.tokenize=A;break}else return G.tokenize=N(w-1),G.tokenize(Q,G)}return"meta"}}function D(w){return w&&w.toLowerCase()}function F(w,Q,G){this.prev=w.context,this.tagName=Q||"",this.indent=w.indented,this.startOfLine=G,(y.doNotIndent.hasOwnProperty(Q)||w.context&&w.context.noIndent)&&(this.noIndent=!0)}function K(w){w.context&&(w.context=w.context.prev)}function te(w,Q){for(var G;;){if(!w.context||(G=w.context.tagName,!y.contextGrabbers.hasOwnProperty(D(G))||!y.contextGrabbers[D(G)].hasOwnProperty(D(Q))))return;K(w)}}function de(w,Q,G){return w=="openTag"?(G.tagStart=Q.column(),ye):w=="closeTag"?Re:de}function ye(w,Q,G){return w=="word"?(G.tagName=Q.current(),O="tag",ce):y.allowMissingTagName&&w=="endTag"?(O="tag bracket",ce(w,Q,G)):(O="error",ye)}function Re(w,Q,G){if(w=="word"){var fe=Q.current();return G.context&&G.context.tagName!=fe&&y.implicitlyClosed.hasOwnProperty(D(G.context.tagName))&&K(G),G.context&&G.context.tagName==fe||y.matchClosing===!1?(O="tag",Ne):(O="tag error",me)}else return y.allowMissingTagName&&w=="endTag"?(O="tag bracket",Ne(w,Q,G)):(O="error",me)}function Ne(w,Q,G){return w!="endTag"?(O="error",Ne):(K(G),de)}function me(w,Q,G){return O="error",Ne(w,Q,G)}function ce(w,Q,G){if(w=="word")return O="attribute",Ee;if(w=="endTag"||w=="selfcloseTag"){var fe=G.tagName,Le=G.tagStart;return G.tagName=G.tagStart=null,w=="selfcloseTag"||y.autoSelfClosers.hasOwnProperty(D(fe))?te(G,fe):(te(G,fe),G.context=new F(G,fe,Le==G.indented)),de}return O="error",ce}function Ee(w,Q,G){return w=="equals"?U:(y.allowMissing||(O="error"),ce(w,Q,G))}function U(w,Q,G){return w=="string"?le:w=="word"&&y.allowUnquoted?(O="string",ce):(O="error",ce(w,Q,G))}function le(w,Q,G){return w=="string"?le:ce(w,Q,G)}return{startState:function(w){var Q={tokenize:A,state:de,indented:w||0,tagName:null,tagStart:null,context:null};return w!=null&&(Q.baseIndent=w),Q},token:function(w,Q){if(!Q.tagName&&w.sol()&&(Q.indented=w.indentation()),w.eatSpace())return null;L=null;var G=Q.tokenize(w,Q);return(G||L)&&G!="comment"&&(O=null,Q.state=Q.state(L||G,w,Q),O&&(G=O=="error"?G+" error":O)),G},indent:function(w,Q,G){var fe=w.context;if(w.tokenize.isInAttribute)return w.tagStart==w.indented?w.stringStartCol+1:w.indented+b;if(fe&&fe.noIndent)return l.Pass;if(w.tokenize!=I&&w.tokenize!=A)return G?G.match(/^(\s*)/)[0].length:0;if(w.tagName)return y.multilineTagIndentPastTag!==!1?w.tagStart+w.tagName.length+2:w.tagStart+b*(y.multilineTagIndentFactor||1);if(y.alignCDATA&&/<!\[CDATA\[/.test(Q))return 0;var Le=Q&&/^<(\/)?([\w_:\.-]*)/.exec(Q);if(Le&&Le[1])for(;fe;)if(fe.tagName==Le[2]){fe=fe.prev;break}else if(y.implicitlyClosed.hasOwnProperty(D(fe.tagName)))fe=fe.prev;else break;else if(Le)for(;fe;){var Ke=y.contextGrabbers[D(fe.tagName)];if(Ke&&Ke.hasOwnProperty(D(Le[2])))fe=fe.prev;else break}for(;fe&&fe.prev&&!fe.startOfLine;)fe=fe.prev;return fe?fe.indent+b:w.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:y.htmlMode?"html":"xml",helperType:y.htmlMode?"html":"xml",skipAttribute:function(w){w.state==U&&(w.state=ce)},xmlCurrentTag:function(w){return w.tagName?{name:w.tagName,close:w.type=="closeTag"}:null},xmlCurrentContext:function(w){for(var Q=[],G=w.context;G;G=G.prev)Q.push(G.tagName);return Q.reverse()}}}),l.defineMIME("text/xml","xml"),l.defineMIME("application/xml","xml"),l.mimeModes.hasOwnProperty("text/html")||l.defineMIME("text/html",{name:"xml",htmlMode:!0})})})();(function(r,s){(function(l){l(Zr.exports,rh.exports,th.exports,n0.exports)})(function(l){var u={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 f(L,O,A){var I=L.current(),ee=I.search(O);return ee>-1?L.backUp(I.length-ee):I.match(/<\/?$/)&&(L.backUp(I.length),L.match(O,!1)||L.match(I)),A}var d={};function v(L){var O=d[L];return O||(d[L]=new RegExp("\\s+"+L+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function b(L,O){var A=L.match(v(O));return A?/^\s*(.*?)\s*$/.exec(A[2])[1]:""}function y(L,O){return new RegExp((O?"^":"")+"</\\s*"+L+"\\s*>","i")}function x(L,O){for(var A in L)for(var I=O[A]||(O[A]=[]),ee=L[A],J=ee.length-1;J>=0;J--)I.unshift(ee[J])}function C(L,O){for(var A=0;A<L.length;A++){var I=L[A];if(!I[0]||I[1].test(b(O,I[0])))return I[2]}}l.defineMode("htmlmixed",function(L,O){var A=l.getMode(L,{name:"xml",htmlMode:!0,multilineTagIndentFactor:O.multilineTagIndentFactor,multilineTagIndentPastTag:O.multilineTagIndentPastTag,allowMissingTagName:O.allowMissingTagName}),I={},ee=O&&O.tags,J=O&&O.scriptTypes;if(x(u,I),ee&&x(ee,I),J)for(var N=J.length-1;N>=0;N--)I.script.unshift(["type",J[N].matches,J[N].mode]);function D(F,K){var te=A.token(F,K.htmlState),de=/\btag\b/.test(te),ye;if(de&&!/[<>\s\/]/.test(F.current())&&(ye=K.htmlState.tagName&&K.htmlState.tagName.toLowerCase())&&I.hasOwnProperty(ye))K.inTag=ye+" ";else if(K.inTag&&de&&/>$/.test(F.current())){var Re=/^([\S]+) (.*)/.exec(K.inTag);K.inTag=null;var Ne=F.current()==">"&&C(I[Re[1]],Re[2]),me=l.getMode(L,Ne),ce=y(Re[1],!0),Ee=y(Re[1],!1);K.token=function(U,le){return U.match(ce,!1)?(le.token=D,le.localState=le.localMode=null,null):f(U,Ee,le.localMode.token(U,le.localState))},K.localMode=me,K.localState=l.startState(me,A.indent(K.htmlState,"",""))}else K.inTag&&(K.inTag+=F.current(),F.eol()&&(K.inTag+=" "));return te}return{startState:function(){var F=l.startState(A);return{token:D,inTag:null,localMode:null,localState:null,htmlState:F}},copyState:function(F){var K;return F.localState&&(K=l.copyState(F.localMode,F.localState)),{token:F.token,inTag:F.inTag,localMode:F.localMode,localState:K,htmlState:l.copyState(A,F.htmlState)}},token:function(F,K){return K.token(F,K)},indent:function(F,K,te){return!F.localMode||/^\s*<\//.test(K)?A.indent(F.htmlState,K,te):F.localMode.indent?F.localMode.indent(F.localState,K,te):l.Pass},innerMode:function(F){return{state:F.localState||F.htmlState,mode:F.localMode||A}}}},"xml","javascript","css"),l.defineMIME("text/html","htmlmixed")})})();(function(r,s){(function(l){l(Zr.exports,rh.exports,th.exports)})(function(l){function u(d,v,b,y){this.state=d,this.mode=v,this.depth=b,this.prev=y}function f(d){return new u(l.copyState(d.mode,d.state),d.mode,d.depth,d.prev&&f(d.prev))}l.defineMode("jsx",function(d,v){var b=l.getMode(d,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),y=l.getMode(d,v&&v.base||"javascript");function x(A){var I=A.tagName;A.tagName=null;var ee=b.indent(A,"","");return A.tagName=I,ee}function C(A,I){return I.context.mode==b?L(A,I,I.context):O(A,I,I.context)}function L(A,I,ee){if(ee.depth==2)return A.match(/^.*?\*\//)?ee.depth=1:A.skipToEnd(),"comment";if(A.peek()=="{"){b.skipAttribute(ee.state);var J=x(ee.state),N=ee.state.context;if(N&&A.match(/^[^>]*>\s*$/,!1)){for(;N.prev&&!N.startOfLine;)N=N.prev;N.startOfLine?J-=d.indentUnit:ee.prev.state.lexical&&(J=ee.prev.state.lexical.indented)}else ee.depth==1&&(J+=d.indentUnit);return I.context=new u(l.startState(y,J),y,0,I.context),null}if(ee.depth==1){if(A.peek()=="<")return b.skipAttribute(ee.state),I.context=new u(l.startState(b,x(ee.state)),b,0,I.context),null;if(A.match("//"))return A.skipToEnd(),"comment";if(A.match("/*"))return ee.depth=2,C(A,I)}var D=b.token(A,ee.state),F=A.current(),K;return/\btag\b/.test(D)?/>$/.test(F)?ee.state.context?ee.depth=0:I.context=I.context.prev:/^</.test(F)&&(ee.depth=1):!D&&(K=F.indexOf("{"))>-1&&A.backUp(F.length-K),D}function O(A,I,ee){if(A.peek()=="<"&&y.expressionAllowed(A,ee.state))return I.context=new u(l.startState(b,y.indent(ee.state,"","")),b,0,I.context),y.skipExpression(ee.state),null;var J=y.token(A,ee.state);if(!J&&ee.depth!=null){var N=A.current();N=="{"?ee.depth++:N=="}"&&--ee.depth==0&&(I.context=I.context.prev)}return J}return{startState:function(){return{context:new u(l.startState(y),y)}},copyState:function(A){return{context:f(A.context)}},token:C,indent:function(A,I,ee){return A.context.mode.indent(A.context.state,I,ee)},innerMode:function(A){return A.context}}},"xml","javascript"),l.defineMIME("text/jsx","jsx"),l.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})})})();(function(r,s){(function(l){l(Zr.exports)})(function(l){l.defineOption("placeholder","",function(x,C,L){var O=L&&L!=l.Init;if(C&&!O)x.on("blur",v),x.on("change",b),x.on("swapDoc",b),l.on(x.getInputField(),"compositionupdate",x.state.placeholderCompose=function(){d(x)}),b(x);else if(!C&&O){x.off("blur",v),x.off("change",b),x.off("swapDoc",b),l.off(x.getInputField(),"compositionupdate",x.state.placeholderCompose),u(x);var A=x.getWrapperElement();A.className=A.className.replace(" CodeMirror-empty","")}C&&!x.hasFocus()&&v(x)});function u(x){x.state.placeholder&&(x.state.placeholder.parentNode.removeChild(x.state.placeholder),x.state.placeholder=null)}function f(x){u(x);var C=x.state.placeholder=document.createElement("pre");C.style.cssText="height: 0; overflow: visible",C.style.direction=x.getOption("direction"),C.className="CodeMirror-placeholder CodeMirror-line-like";var L=x.getOption("placeholder");typeof L=="string"&&(L=document.createTextNode(L)),C.appendChild(L),x.display.lineSpace.insertBefore(C,x.display.lineSpace.firstChild)}function d(x){setTimeout(function(){var C=!1;if(x.lineCount()==1){var L=x.getInputField();C=L.nodeName=="TEXTAREA"?!x.getLine(0).length:!/[^\u200b]/.test(L.querySelector(".CodeMirror-line").textContent)}C?f(x):u(x)},20)}function v(x){y(x)&&f(x)}function b(x){var C=x.getWrapperElement(),L=y(x);C.className=C.className.replace(" CodeMirror-empty","")+(L?" CodeMirror-empty":""),L?f(x):u(x)}function y(x){return x.lineCount()===1&&x.getLine(0)===""}})})();(function(r,s){(function(l){l(Zr.exports)})(function(l){var u="CodeMirror-hint",f="CodeMirror-hint-active";l.showHint=function(N,D,F){if(!D)return N.showHint(F);F&&F.async&&(D.async=!0);var K={hint:D};if(F)for(var te in F)K[te]=F[te];return N.showHint(K)},l.defineExtension("showHint",function(N){N=y(this,this.getCursor("start"),N);var D=this.listSelections();if(!(D.length>1)){if(this.somethingSelected()){if(!N.hint.supportsSelection)return;for(var F=0;F<D.length;F++)if(D[F].head.line!=D[F].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var K=this.state.completionActive=new d(this,N);!K.options.hint||(l.signal(this,"startCompletion",this),K.update(!0))}}),l.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});function d(N,D){if(this.cm=N,this.options=D,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var F=this;N.on("cursorActivity",this.activityFunc=function(){F.cursorActivity()})}}var v=window.requestAnimationFrame||function(N){return setTimeout(N,1e3/60)},b=window.cancelAnimationFrame||clearTimeout;d.prototype={close:function(){!this.active()||(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&l.signal(this.data,"close"),this.widget&&this.widget.close(),l.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(N,D){var F=N.list[D],K=this;this.cm.operation(function(){F.hint?F.hint(K.cm,N,F):K.cm.replaceRange(x(F),F.from||N.from,F.to||N.to,"complete"),l.signal(N,"pick",F),K.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(b(this.debounce),this.debounce=0);var N=this.startPos;this.data&&(N=this.data.from);var D=this.cm.getCursor(),F=this.cm.getLine(D.line);if(D.line!=this.startPos.line||F.length-D.ch!=this.startLen-this.startPos.ch||D.ch<N.ch||this.cm.somethingSelected()||!D.ch||this.options.closeCharacters.test(F.charAt(D.ch-1)))this.close();else{var K=this;this.debounce=v(function(){K.update()}),this.widget&&this.widget.disable()}},update:function(N){if(this.tick!=null){var D=this,F=++this.tick;I(this.options.hint,this.cm,this.options,function(K){D.tick==F&&D.finishUpdate(K,N)})}},finishUpdate:function(N,D){this.data&&l.signal(this.data,"update");var F=this.widget&&this.widget.picked||D&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=N,N&&N.list.length&&(F&&N.list.length==1?this.pick(N,0):(this.widget=new O(this,N),l.signal(N,"shown")))}};function y(N,D,F){var K=N.options.hintOptions,te={};for(var de in J)te[de]=J[de];if(K)for(var de in K)K[de]!==void 0&&(te[de]=K[de]);if(F)for(var de in F)F[de]!==void 0&&(te[de]=F[de]);return te.hint.resolve&&(te.hint=te.hint.resolve(N,D)),te}function x(N){return typeof N=="string"?N:N.text}function C(N,D){var F={Up:function(){D.moveFocus(-1)},Down:function(){D.moveFocus(1)},PageUp:function(){D.moveFocus(-D.menuSize()+1,!0)},PageDown:function(){D.moveFocus(D.menuSize()-1,!0)},Home:function(){D.setFocus(0)},End:function(){D.setFocus(D.length-1)},Enter:D.pick,Tab:D.pick,Esc:D.close},K=/Mac/.test(navigator.platform);K&&(F["Ctrl-P"]=function(){D.moveFocus(-1)},F["Ctrl-N"]=function(){D.moveFocus(1)});var te=N.options.customKeys,de=te?{}:F;function ye(me,ce){var Ee;typeof ce!="string"?Ee=function(U){return ce(U,D)}:F.hasOwnProperty(ce)?Ee=F[ce]:Ee=ce,de[me]=Ee}if(te)for(var Re in te)te.hasOwnProperty(Re)&&ye(Re,te[Re]);var Ne=N.options.extraKeys;if(Ne)for(var Re in Ne)Ne.hasOwnProperty(Re)&&ye(Re,Ne[Re]);return de}function L(N,D){for(;D&&D!=N;){if(D.nodeName.toUpperCase()==="LI"&&D.parentNode==N)return D;D=D.parentNode}}function O(N,D){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=N,this.data=D,this.picked=!1;var F=this,K=N.cm,te=K.getInputField().ownerDocument,de=te.defaultView||te.parentWindow,ye=this.hints=te.createElement("ul");ye.setAttribute("role","listbox"),ye.setAttribute("aria-expanded","true"),ye.id=this.id;var Re=N.cm.options.theme;ye.className="CodeMirror-hints "+Re,this.selectedHint=D.selectedHint||0;for(var Ne=D.list,me=0;me<Ne.length;++me){var ce=ye.appendChild(te.createElement("li")),Ee=Ne[me],U=u+(me!=this.selectedHint?"":" "+f);Ee.className!=null&&(U=Ee.className+" "+U),ce.className=U,me==this.selectedHint&&ce.setAttribute("aria-selected","true"),ce.id=this.id+"-"+me,ce.setAttribute("role","option"),Ee.render?Ee.render(ce,D,Ee):ce.appendChild(te.createTextNode(Ee.displayText||x(Ee))),ce.hintId=me}var le=N.options.container||te.body,w=K.cursorCoords(N.options.alignWithWord?D.from:null),Q=w.left,G=w.bottom,fe=!0,Le=0,Ke=0;if(le!==te.body){var lt=["absolute","relative","fixed"].indexOf(de.getComputedStyle(le).position)!==-1,tt=lt?le:le.offsetParent,He=tt.getBoundingClientRect(),at=te.body.getBoundingClientRect();Le=He.left-at.left-tt.scrollLeft,Ke=He.top-at.top-tt.scrollTop}ye.style.left=Q-Le+"px",ye.style.top=G-Ke+"px";var q=de.innerWidth||Math.max(te.body.offsetWidth,te.documentElement.offsetWidth),V=de.innerHeight||Math.max(te.body.offsetHeight,te.documentElement.offsetHeight);le.appendChild(ye),K.getInputField().setAttribute("aria-autocomplete","list"),K.getInputField().setAttribute("aria-owns",this.id),K.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var W=N.options.moveOnOverlap?ye.getBoundingClientRect():new DOMRect,oe=N.options.paddingForScrollbar?ye.scrollHeight>ye.clientHeight+1:!1,_e;setTimeout(function(){_e=K.getScrollInfo()});var we=W.bottom-V;if(we>0){var pe=W.bottom-W.top,ke=w.top-(w.bottom-W.top);if(ke-pe>0)ye.style.top=(G=w.top-pe-Ke)+"px",fe=!1;else if(pe>V){ye.style.height=V-5+"px",ye.style.top=(G=w.bottom-W.top-Ke)+"px";var P=K.getCursor();D.from.ch!=P.ch&&(w=K.cursorCoords(P),ye.style.left=(Q=w.left-Le)+"px",W=ye.getBoundingClientRect())}}var E=W.right-q;if(oe&&(E+=K.display.nativeBarWidth),E>0&&(W.right-W.left>q&&(ye.style.width=q-5+"px",E-=W.right-W.left-q),ye.style.left=(Q=w.left-E-Le)+"px"),oe)for(var B=ye.firstChild;B;B=B.nextSibling)B.style.paddingRight=K.display.nativeBarWidth+"px";if(K.addKeyMap(this.keyMap=C(N,{moveFocus:function(ne,ae){F.changeActive(F.selectedHint+ne,ae)},setFocus:function(ne){F.changeActive(ne)},menuSize:function(){return F.screenAmount()},length:Ne.length,close:function(){N.close()},pick:function(){F.pick()},data:D})),N.options.closeOnUnfocus){var H;K.on("blur",this.onBlur=function(){H=setTimeout(function(){N.close()},100)}),K.on("focus",this.onFocus=function(){clearTimeout(H)})}K.on("scroll",this.onScroll=function(){var ne=K.getScrollInfo(),ae=K.getWrapperElement().getBoundingClientRect();_e||(_e=K.getScrollInfo());var ue=G+_e.top-ne.top,re=ue-(de.pageYOffset||(te.documentElement||te.body).scrollTop);if(fe||(re+=ye.offsetHeight),re<=ae.top||re>=ae.bottom)return N.close();ye.style.top=ue+"px",ye.style.left=Q+_e.left-ne.left+"px"}),l.on(ye,"dblclick",function(ne){var ae=L(ye,ne.target||ne.srcElement);ae&&ae.hintId!=null&&(F.changeActive(ae.hintId),F.pick())}),l.on(ye,"click",function(ne){var ae=L(ye,ne.target||ne.srcElement);ae&&ae.hintId!=null&&(F.changeActive(ae.hintId),N.options.completeOnSingleClick&&F.pick())}),l.on(ye,"mousedown",function(){setTimeout(function(){K.focus()},20)});var Y=this.getSelectedHintRange();return(Y.from!==0||Y.to!==0)&&this.scrollToActive(),l.signal(D,"select",Ne[this.selectedHint],ye.childNodes[this.selectedHint]),!0}O.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var N=this.completion.cm.getInputField();N.removeAttribute("aria-activedescendant"),N.removeAttribute("aria-owns");var D=this.completion.cm;this.completion.options.closeOnUnfocus&&(D.off("blur",this.onBlur),D.off("focus",this.onFocus)),D.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var N=this;this.keyMap={Enter:function(){N.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(N,D){if(N>=this.data.list.length?N=D?this.data.list.length-1:0:N<0&&(N=D?0:this.data.list.length-1),this.selectedHint!=N){var F=this.hints.childNodes[this.selectedHint];F&&(F.className=F.className.replace(" "+f,""),F.removeAttribute("aria-selected")),F=this.hints.childNodes[this.selectedHint=N],F.className+=" "+f,F.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",F.id),this.scrollToActive(),l.signal(this.data,"select",this.data.list[this.selectedHint],F)}},scrollToActive:function(){var N=this.getSelectedHintRange(),D=this.hints.childNodes[N.from],F=this.hints.childNodes[N.to],K=this.hints.firstChild;D.offsetTop<this.hints.scrollTop?this.hints.scrollTop=D.offsetTop-K.offsetTop:F.offsetTop+F.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=F.offsetTop+F.offsetHeight-this.hints.clientHeight+K.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var N=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-N),to:Math.min(this.data.list.length-1,this.selectedHint+N)}}};function A(N,D){if(!N.somethingSelected())return D;for(var F=[],K=0;K<D.length;K++)D[K].supportsSelection&&F.push(D[K]);return F}function I(N,D,F,K){if(N.async)N(D,K,F);else{var te=N(D,F);te&&te.then?te.then(K):K(te)}}function ee(N,D){var F=N.getHelpers(D,"hint"),K;if(F.length){var te=function(de,ye,Re){var Ne=A(de,F);function me(ce){if(ce==Ne.length)return ye(null);I(Ne[ce],de,Re,function(Ee){Ee&&Ee.list.length>0?ye(Ee):me(ce+1)})}me(0)};return te.async=!0,te.supportsSelection=!0,te}else return(K=N.getHelper(N.getCursor(),"hintWords"))?function(de){return l.hint.fromList(de,{words:K})}:l.hint.anyword?function(de,ye){return l.hint.anyword(de,ye)}:function(){}}l.registerHelper("hint","auto",{resolve:ee}),l.registerHelper("hint","fromList",function(N,D){var F=N.getCursor(),K=N.getTokenAt(F),te,de=l.Pos(F.line,K.start),ye=F;K.start<F.ch&&/\w/.test(K.string.charAt(F.ch-K.start-1))?te=K.string.substr(0,F.ch-K.start):(te="",de=F);for(var Re=[],Ne=0;Ne<D.words.length;Ne++){var me=D.words[Ne];me.slice(0,te.length)==te&&Re.push(me)}if(Re.length)return{list:Re,from:de,to:ye}}),l.commands.autocomplete=l.showHint;var J={hint:l.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};l.defineOption("hintOptions",null)})})();function i0(r,s,l={}){const u=r0.fromTextArea(r.value,Wl({theme:"vars"},Me(l)));Ft(l,d=>Object.entries(d).forEach(([v,b])=>u.setOption(v,b)));let f=!1;return u.on("change",()=>{if(f){f=!1;return}s.value=u.getValue()}),Ft(s,d=>{if(d!==u.getValue()){f=!0;const v=u.listSelections();u.replaceRange(d,u.posFromIndex(0),u.posFromIndex(1/0)),u.setSelections(v)}},{immediate:!0}),u}const o0={relative:"","font-mono":"","text-sm":""},s0=zr({name:"CodeMirror",props:{modelValue:null,mode:null,readOnly:{type:Boolean},matched:null,getHint:null},emits:["update:modelValue"],setup(r,{emit:s}){const l=r,u={html:"htmlmixed",vue:"htmlmixed",svelte:"htmlmixed",js:"javascript",mjs:"javascript",cjs:"javascript",ts:{name:"javascript",typescript:!0},mts:{name:"javascript",typescript:!0},cts:{name:"javascript",typescript:!0},jsx:{name:"javascript",jsx:!0},tsx:{name:"javascript",typescript:!0,jsx:!0}},f=Nt(),d=Xy(l,"modelValue",s,{passive:!0}),v=ct(()=>u[l.mode||""]||l.mode),b=ct(()=>l.getHint?{"Ctrl-Space":"autocomplete","Ctrl-.":"autocomplete","Cmd-Space":"autocomplete","Cmd-.":"autocomplete",Tab:"autocomplete"}:{}),y=ct(()=>l.getHint?{hint:l.getHint}:{});return Ma(async()=>{const x=i0(f,d,Oi(Kf(Wl({},bv(l)),{mode:v,hintOptions:y,extraKeys:b})));x.setSize("100%","100%"),l.getHint&&x.on("keyup",(I,ee)=>{ee.key.match(/^[\w:-]$/)&&I.execCommand("autocomplete")}),setTimeout(()=>x.refresh(),100);const C=[];function L(I,ee){C.push(x.markText(x.posFromIndex(I),x.posFromIndex(ee),{className:"highlighted"}))}function O(){C.forEach(I=>I.clear()),e0(l.modelValue,Array.from(l.matched||[])).forEach(I=>L(I[0],I[1]))}let A=0;Ft(()=>[l.modelValue,l.matched],async()=>{clearTimeout(A),l.matched&&(A=setTimeout(O,200))},{immediate:!0})}),(x,C)=>(vt(),jt("div",o0,[Fe("textarea",{ref_key:"el",ref:f},null,512)]))}});var nh=(r,s)=>{const l=r.__vccOpts||r;for(const[u,f]of s)l[u]=f;return l};const l0={},a0={"bg-gray4:10":"","p-5":"",b:"b main",text:"sm gray5 dark:gray3"};function u0(r,s){return vt(),jt("div",a0,[Nd(r.$slots,"default")])}var f0=nh(l0,[["render",u0]]);const c0="/@vite/client",ih=mo(),oh=mo(),d0=ih.on,sh=oh.on;ga(()=>import(c0),[]).then(r=>{const s=r.createHotContext("/");s.on("vite:beforeUpdate",l=>{l.updates.forEach(u=>{ih.trigger(u)})}),s.on("unocss:config-changed",()=>{oh.trigger()})}).catch(r=>{console.error("failed to connect to client vite server, you might need to do manual refresh to see the updates"),console.error(r)});const js="/__unocss_api",lh=Bs(js).json(),Ha=Bs(`${js}/overview`,{immediate:!1}).json(),Et=lh.data,ds=Ha.data;sh(()=>{lh.execute(),Ha.execute()});function zw(r){const s=Bs(ct(()=>`${js}/module?id=${encodeURIComponent(Me(r))}`),{refetch:!0}).json();return sh(()=>s.execute()),d0(l=>{var u;(l.path===Me(r)||l.path===Me(r).slice(((u=Et.value)==null?void 0:u.root.length)||0))&&setTimeout(()=>{s.execute()},50)}),s}function Rw(r){const s=ny(r,500);return Bs(ct(()=>`${js}/repl?token=${encodeURIComponent(s.value)}`),{refetch:!0}).json()}const hs=ct(()=>{if(!Et.value)return{workspace:{children:{},items:[]},root:{children:{},items:[]}};const r=Et.value.modules.map(u=>({full:u,path:u})),s=r.filter(u=>u.full.startsWith(Et.value.root)),l=r.filter(u=>!u.full.startsWith(Et.value.root));return s.forEach(u=>u.path=u.path.slice(Et.value.root.length+1)),{workspace:Nc(s,"Project Root"),root:Nc(l,"Disk Root")}});function Nc(r,s){const l={name:s,children:{},items:[]};function u(f,d,v=l){if(d.length<=1){v.items.push(f);return}const b=d.shift();v.children[b]||(v.children[b]={name:b,children:{},items:[]}),u(f,d,v.children[b])}return r.forEach(f=>{const d=f.path.split(/\//g).filter(Boolean);u(f,d)}),l}const h0={key:0,"ws-wrap":""},p0=Fe("span",{op80:""},".",-1),g0={key:1},v0=zr({name:"ModuleId",props:{id:null},setup(r){return(s,l)=>r.id&&Me(Et)?(vt(),jt("span",h0,[r.id.startsWith(Me(Et).root)?(vt(),jt(rr,{key:0},[p0,Fe("span",null,tr(r.id.slice(Me(Et).root.length)),1)],64)):(vt(),jt("span",g0,tr(r.id),1))])):_s("",!0)}}),m0=(r,s)=>{const l=Nt(null);return jy(r,()=>{var f;const u=(f=Ia(r))==null?void 0:f.clientHeight;l.value=u?`--${s}: calc(100vh - ${u}px - 2px);`:null}),l},y0={"h-full":""},b0={p:"x4 y2",grid:"~ cols-4 gap-4"},w0=Fe("div",{op80:""}," Presets ",-1),x0={op50:"","ws-pre":""},k0={overflow:"auto"},S0=Fe("div",{op80:""}," Rules ",-1),C0=Fe("span",{op50:""},"dynamic",-1),_0=Fe("br",null,null,-1),T0=Fe("span",{op50:""},"static",-1),L0=Fe("div",{op80:""}," Variants ",-1),P0=Fe("div",{op80:""}," Shortcuts ",-1),O0={key:0},M0=Fe("div",{op80:""}," Config File ",-1),E0=Fe("div",{op80:""}," Version ",-1),A0={op50:"","ws-pre":""},N0={b:"t main",p:"x4 y2",grid:"~ cols-4 gap-4"},z0=Fe("div",{op80:""}," Included Files ",-1),R0=Fe("div",{op80:""}," CSS Size ",-1),D0=Fe("span",{op50:""},"gzipped",-1),F0=Fe("div",{op80:""}," Matched Rules ",-1),I0=Fe("div",{op80:""}," Layers ",-1),H0={op50:"","ws-pre":""},W0=zr({name:"Overview",setup(r){const s=Nt(null),l=m0(s,"overview-scrolls");return Ha.execute(),(u,f)=>{var y;const d=v0,v=f0,b=s0;return vt(),jt("div",y0,[nt(v,{ref_key:"status",ref:s,p0:""},{default:yn(()=>{var x,C,L,O,A,I,ee,J,N,D,F,K,te,de,ye,Re,Ne,me;return[Fe("div",b0,[Fe("div",null,[w0,Fe("div",x0,tr((L=(C=(x=Me(Et))==null?void 0:x.config)==null?void 0:C.presets)==null?void 0:L.map(ce=>ce.name).join(`
25
+ `)),1)]),Fe("div",k0,[S0,Er(" "+tr((I=(A=(O=Me(Et))==null?void 0:O.config)==null?void 0:A.rulesDynamic)==null?void 0:I.filter(Boolean).length)+" ",1),C0,_0,Er(" "+tr(Object.keys(((J=(ee=Me(Et))==null?void 0:ee.config)==null?void 0:J.rulesStaticMap)||{}).length)+" ",1),T0]),Fe("div",null,[L0,Er(" "+tr((F=(D=(N=Me(Et))==null?void 0:N.config)==null?void 0:D.variants)==null?void 0:F.length),1)]),Fe("div",null,[P0,Er(" "+tr((K=Me(Et))==null?void 0:K.config.shortcuts.length),1)]),(te=Me(Et))!=null&&te.configPath?(vt(),jt("div",O0,[M0,nt(d,{id:Me(Et).configPath},null,8,["id"])])):_s("",!0),Fe("div",null,[E0,Fe("div",A0,tr((de=Me(Et))==null?void 0:de.version),1)])]),Fe("div",N0,[Fe("div",null,[z0,Er(" "+tr((ye=Me(Et))==null?void 0:ye.modules.length),1)]),Fe("div",null,[R0,Er(" "+tr(((((Re=Me(ds))==null?void 0:Re.gzipSize)||0)/1024).toFixed(2))+" KiB ",1),D0]),Fe("div",null,[F0,Er(" "+tr((Ne=Me(ds))==null?void 0:Ne.matched.length),1)]),Fe("div",null,[I0,Fe("div",H0,tr((me=Me(ds))==null?void 0:me.layers.join(`
26
+ `)),1)])])]}),_:1},512),nt(b,{"model-value":((y=Me(ds))==null?void 0:y.css)||"/* empty */","read-only":!0,mode:"css",class:"scrolls overview-scrolls",style:Lo(Me(l))},null,8,["model-value","style"])])}}}),B0={};function j0(r,s){const l=W0;return vt(),xi(l)}var U0=nh(B0,[["render",j0]]);const K0=()=>ga(()=>import("./repl.746c9f79.js"),[]),q0=()=>ga(()=>import("./_id_.d2c3ba35.js"),[]),$0=[{name:"index",path:"/",component:U0,props:!0},{name:"repl",path:"/repl",component:K0,props:!0},{name:"module-id",path:"/module/:id",component:q0,props:!0}];/*!
27
+ * vue-router v4.0.15
28
+ * (c) 2022 Eduardo San Martin Morote
29
+ * @license MIT
30
+ */const ah=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",Mi=r=>ah?Symbol(r):"_vr_"+r,G0=Mi("rvlm"),zc=Mi("rvd"),Wa=Mi("r"),Ba=Mi("rl"),da=Mi("rvl"),gi=typeof window!="undefined";function Y0(r){return r.__esModule||ah&&r[Symbol.toStringTag]==="Module"}const rt=Object.assign;function Gl(r,s){const l={};for(const u in s){const f=s[u];l[u]=Array.isArray(f)?f.map(r):r(f)}return l}const yo=()=>{},X0=/\/$/,Z0=r=>r.replace(X0,"");function Yl(r,s,l="/"){let u,f={},d="",v="";const b=s.indexOf("?"),y=s.indexOf("#",b>-1?b:0);return b>-1&&(u=s.slice(0,b),d=s.slice(b+1,y>-1?y:s.length),f=r(d)),y>-1&&(u=u||s.slice(0,y),v=s.slice(y,s.length)),u=eb(u!=null?u:s,l),{fullPath:u+(d&&"?")+d+v,path:u,query:f,hash:v}}function J0(r,s){const l=s.query?r(s.query):"";return s.path+(l&&"?")+l+(s.hash||"")}function Rc(r,s){return!s||!r.toLowerCase().startsWith(s.toLowerCase())?r:r.slice(s.length)||"/"}function Q0(r,s,l){const u=s.matched.length-1,f=l.matched.length-1;return u>-1&&u===f&&Ci(s.matched[u],l.matched[f])&&uh(s.params,l.params)&&r(s.query)===r(l.query)&&s.hash===l.hash}function Ci(r,s){return(r.aliasOf||r)===(s.aliasOf||s)}function uh(r,s){if(Object.keys(r).length!==Object.keys(s).length)return!1;for(const l in r)if(!V0(r[l],s[l]))return!1;return!0}function V0(r,s){return Array.isArray(r)?Dc(r,s):Array.isArray(s)?Dc(s,r):r===s}function Dc(r,s){return Array.isArray(s)?r.length===s.length&&r.every((l,u)=>l===s[u]):r.length===1&&r[0]===s}function eb(r,s){if(r.startsWith("/"))return r;if(!r)return s;const l=s.split("/"),u=r.split("/");let f=l.length-1,d,v;for(d=0;d<u.length;d++)if(v=u[d],!(f===1||v==="."))if(v==="..")f--;else break;return l.slice(0,f).join("/")+"/"+u.slice(d-(d===u.length?1:0)).join("/")}var To;(function(r){r.pop="pop",r.push="push"})(To||(To={}));var bo;(function(r){r.back="back",r.forward="forward",r.unknown=""})(bo||(bo={}));function tb(r){if(!r)if(gi){const s=document.querySelector("base");r=s&&s.getAttribute("href")||"/",r=r.replace(/^\w+:\/\/[^\/]+/,"")}else r="/";return r[0]!=="/"&&r[0]!=="#"&&(r="/"+r),Z0(r)}const rb=/^[^#]+#/;function nb(r,s){return r.replace(rb,"#")+s}function ib(r,s){const l=document.documentElement.getBoundingClientRect(),u=r.getBoundingClientRect();return{behavior:s.behavior,left:u.left-l.left-(s.left||0),top:u.top-l.top-(s.top||0)}}const Us=()=>({left:window.pageXOffset,top:window.pageYOffset});function ob(r){let s;if("el"in r){const l=r.el,u=typeof l=="string"&&l.startsWith("#"),f=typeof l=="string"?u?document.getElementById(l.slice(1)):document.querySelector(l):l;if(!f)return;s=ib(f,r)}else s=r;"scrollBehavior"in document.documentElement.style?window.scrollTo(s):window.scrollTo(s.left!=null?s.left:window.pageXOffset,s.top!=null?s.top:window.pageYOffset)}function Fc(r,s){return(history.state?history.state.position-s:-1)+r}const ha=new Map;function sb(r,s){ha.set(r,s)}function lb(r){const s=ha.get(r);return ha.delete(r),s}let ab=()=>location.protocol+"//"+location.host;function fh(r,s){const{pathname:l,search:u,hash:f}=s,d=r.indexOf("#");if(d>-1){let b=f.includes(r.slice(d))?r.slice(d).length:1,y=f.slice(b);return y[0]!=="/"&&(y="/"+y),Rc(y,"")}return Rc(l,r)+u+f}function ub(r,s,l,u){let f=[],d=[],v=null;const b=({state:O})=>{const A=fh(r,location),I=l.value,ee=s.value;let J=0;if(O){if(l.value=A,s.value=O,v&&v===I){v=null;return}J=ee?O.position-ee.position:0}else u(A);f.forEach(N=>{N(l.value,I,{delta:J,type:To.pop,direction:J?J>0?bo.forward:bo.back:bo.unknown})})};function y(){v=l.value}function x(O){f.push(O);const A=()=>{const I=f.indexOf(O);I>-1&&f.splice(I,1)};return d.push(A),A}function C(){const{history:O}=window;!O.state||O.replaceState(rt({},O.state,{scroll:Us()}),"")}function L(){for(const O of d)O();d=[],window.removeEventListener("popstate",b),window.removeEventListener("beforeunload",C)}return window.addEventListener("popstate",b),window.addEventListener("beforeunload",C),{pauseListeners:y,listen:x,destroy:L}}function Ic(r,s,l,u=!1,f=!1){return{back:r,current:s,forward:l,replaced:u,position:window.history.length,scroll:f?Us():null}}function fb(r){const{history:s,location:l}=window,u={value:fh(r,l)},f={value:s.state};f.value||d(u.value,{back:null,current:u.value,forward:null,position:s.length-1,replaced:!0,scroll:null},!0);function d(y,x,C){const L=r.indexOf("#"),O=L>-1?(l.host&&document.querySelector("base")?r:r.slice(L))+y:ab()+r+y;try{s[C?"replaceState":"pushState"](x,"",O),f.value=x}catch(A){console.error(A),l[C?"replace":"assign"](O)}}function v(y,x){const C=rt({},s.state,Ic(f.value.back,y,f.value.forward,!0),x,{position:f.value.position});d(y,C,!0),u.value=y}function b(y,x){const C=rt({},f.value,s.state,{forward:y,scroll:Us()});d(C.current,C,!0);const L=rt({},Ic(u.value,y,null),{position:C.position+1},x);d(y,L,!1),u.value=y}return{location:u,state:f,push:b,replace:v}}function cb(r){r=tb(r);const s=fb(r),l=ub(r,s.state,s.location,s.replace);function u(d,v=!0){v||l.pauseListeners(),history.go(d)}const f=rt({location:"",base:r,go:u,createHref:nb.bind(null,r)},s,l);return Object.defineProperty(f,"location",{enumerable:!0,get:()=>s.location.value}),Object.defineProperty(f,"state",{enumerable:!0,get:()=>s.state.value}),f}function db(r){return r=location.host?r||location.pathname+location.search:"",r.includes("#")||(r+="#"),cb(r)}function hb(r){return typeof r=="string"||r&&typeof r=="object"}function ch(r){return typeof r=="string"||typeof r=="symbol"}const cn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},dh=Mi("nf");var Hc;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(Hc||(Hc={}));function _i(r,s){return rt(new Error,{type:r,[dh]:!0},s)}function dn(r,s){return r instanceof Error&&dh in r&&(s==null||!!(r.type&s))}const Wc="[^/]+?",pb={sensitive:!1,strict:!1,start:!0,end:!0},gb=/[.+*?^${}()[\]/\\]/g;function vb(r,s){const l=rt({},pb,s),u=[];let f=l.start?"^":"";const d=[];for(const x of r){const C=x.length?[]:[90];l.strict&&!x.length&&(f+="/");for(let L=0;L<x.length;L++){const O=x[L];let A=40+(l.sensitive?.25:0);if(O.type===0)L||(f+="/"),f+=O.value.replace(gb,"\\$&"),A+=40;else if(O.type===1){const{value:I,repeatable:ee,optional:J,regexp:N}=O;d.push({name:I,repeatable:ee,optional:J});const D=N||Wc;if(D!==Wc){A+=10;try{new RegExp(`(${D})`)}catch(K){throw new Error(`Invalid custom RegExp for param "${I}" (${D}): `+K.message)}}let F=ee?`((?:${D})(?:/(?:${D}))*)`:`(${D})`;L||(F=J&&x.length<2?`(?:/${F})`:"/"+F),J&&(F+="?"),f+=F,A+=20,J&&(A+=-8),ee&&(A+=-20),D===".*"&&(A+=-50)}C.push(A)}u.push(C)}if(l.strict&&l.end){const x=u.length-1;u[x][u[x].length-1]+=.7000000000000001}l.strict||(f+="/?"),l.end?f+="$":l.strict&&(f+="(?:/|$)");const v=new RegExp(f,l.sensitive?"":"i");function b(x){const C=x.match(v),L={};if(!C)return null;for(let O=1;O<C.length;O++){const A=C[O]||"",I=d[O-1];L[I.name]=A&&I.repeatable?A.split("/"):A}return L}function y(x){let C="",L=!1;for(const O of r){(!L||!C.endsWith("/"))&&(C+="/"),L=!1;for(const A of O)if(A.type===0)C+=A.value;else if(A.type===1){const{value:I,repeatable:ee,optional:J}=A,N=I in x?x[I]:"";if(Array.isArray(N)&&!ee)throw new Error(`Provided param "${I}" is an array but it is not repeatable (* or + modifiers)`);const D=Array.isArray(N)?N.join("/"):N;if(!D)if(J)O.length<2&&r.length>1&&(C.endsWith("/")?C=C.slice(0,-1):L=!0);else throw new Error(`Missing required param "${I}"`);C+=D}}return C}return{re:v,score:u,keys:d,parse:b,stringify:y}}function mb(r,s){let l=0;for(;l<r.length&&l<s.length;){const u=s[l]-r[l];if(u)return u;l++}return r.length<s.length?r.length===1&&r[0]===40+40?-1:1:r.length>s.length?s.length===1&&s[0]===40+40?1:-1:0}function yb(r,s){let l=0;const u=r.score,f=s.score;for(;l<u.length&&l<f.length;){const d=mb(u[l],f[l]);if(d)return d;l++}return f.length-u.length}const bb={type:0,value:""},wb=/[a-zA-Z0-9_]/;function xb(r){if(!r)return[[]];if(r==="/")return[[bb]];if(!r.startsWith("/"))throw new Error(`Invalid path "${r}"`);function s(A){throw new Error(`ERR (${l})/"${x}": ${A}`)}let l=0,u=l;const f=[];let d;function v(){d&&f.push(d),d=[]}let b=0,y,x="",C="";function L(){!x||(l===0?d.push({type:0,value:x}):l===1||l===2||l===3?(d.length>1&&(y==="*"||y==="+")&&s(`A repeatable param (${x}) must be alone in its segment. eg: '/:ids+.`),d.push({type:1,value:x,regexp:C,repeatable:y==="*"||y==="+",optional:y==="*"||y==="?"})):s("Invalid state to consume buffer"),x="")}function O(){x+=y}for(;b<r.length;){if(y=r[b++],y==="\\"&&l!==2){u=l,l=4;continue}switch(l){case 0:y==="/"?(x&&L(),v()):y===":"?(L(),l=1):O();break;case 4:O(),l=u;break;case 1:y==="("?l=2:wb.test(y)?O():(L(),l=0,y!=="*"&&y!=="?"&&y!=="+"&&b--);break;case 2:y===")"?C[C.length-1]=="\\"?C=C.slice(0,-1)+y:l=3:C+=y;break;case 3:L(),l=0,y!=="*"&&y!=="?"&&y!=="+"&&b--,C="";break;default:s("Unknown state");break}}return l===2&&s(`Unfinished custom RegExp for param "${x}"`),L(),v(),f}function kb(r,s,l){const u=vb(xb(r.path),l),f=rt(u,{record:r,parent:s,children:[],alias:[]});return s&&!f.record.aliasOf==!s.record.aliasOf&&s.children.push(f),f}function Sb(r,s){const l=[],u=new Map;s=jc({strict:!1,end:!0,sensitive:!1},s);function f(C){return u.get(C)}function d(C,L,O){const A=!O,I=_b(C);I.aliasOf=O&&O.record;const ee=jc(s,C),J=[I];if("alias"in C){const F=typeof C.alias=="string"?[C.alias]:C.alias;for(const K of F)J.push(rt({},I,{components:O?O.record.components:I.components,path:K,aliasOf:O?O.record:I}))}let N,D;for(const F of J){const{path:K}=F;if(L&&K[0]!=="/"){const te=L.record.path,de=te[te.length-1]==="/"?"":"/";F.path=L.record.path+(K&&de+K)}if(N=kb(F,L,ee),O?O.alias.push(N):(D=D||N,D!==N&&D.alias.push(N),A&&C.name&&!Bc(N)&&v(C.name)),"children"in I){const te=I.children;for(let de=0;de<te.length;de++)d(te[de],N,O&&O.children[de])}O=O||N,y(N)}return D?()=>{v(D)}:yo}function v(C){if(ch(C)){const L=u.get(C);L&&(u.delete(C),l.splice(l.indexOf(L),1),L.children.forEach(v),L.alias.forEach(v))}else{const L=l.indexOf(C);L>-1&&(l.splice(L,1),C.record.name&&u.delete(C.record.name),C.children.forEach(v),C.alias.forEach(v))}}function b(){return l}function y(C){let L=0;for(;L<l.length&&yb(C,l[L])>=0&&(C.record.path!==l[L].record.path||!hh(C,l[L]));)L++;l.splice(L,0,C),C.record.name&&!Bc(C)&&u.set(C.record.name,C)}function x(C,L){let O,A={},I,ee;if("name"in C&&C.name){if(O=u.get(C.name),!O)throw _i(1,{location:C});ee=O.record.name,A=rt(Cb(L.params,O.keys.filter(D=>!D.optional).map(D=>D.name)),C.params),I=O.stringify(A)}else if("path"in C)I=C.path,O=l.find(D=>D.re.test(I)),O&&(A=O.parse(I),ee=O.record.name);else{if(O=L.name?u.get(L.name):l.find(D=>D.re.test(L.path)),!O)throw _i(1,{location:C,currentLocation:L});ee=O.record.name,A=rt({},L.params,C.params),I=O.stringify(A)}const J=[];let N=O;for(;N;)J.unshift(N.record),N=N.parent;return{name:ee,path:I,params:A,matched:J,meta:Lb(J)}}return r.forEach(C=>d(C)),{addRoute:d,resolve:x,removeRoute:v,getRoutes:b,getRecordMatcher:f}}function Cb(r,s){const l={};for(const u of s)u in r&&(l[u]=r[u]);return l}function _b(r){return{path:r.path,redirect:r.redirect,name:r.name,meta:r.meta||{},aliasOf:void 0,beforeEnter:r.beforeEnter,props:Tb(r),children:r.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in r?r.components||{}:{default:r.component}}}function Tb(r){const s={},l=r.props||!1;if("component"in r)s.default=l;else for(const u in r.components)s[u]=typeof l=="boolean"?l:l[u];return s}function Bc(r){for(;r;){if(r.record.aliasOf)return!0;r=r.parent}return!1}function Lb(r){return r.reduce((s,l)=>rt(s,l.meta),{})}function jc(r,s){const l={};for(const u in r)l[u]=u in s?s[u]:r[u];return l}function hh(r,s){return s.children.some(l=>l===r||hh(r,l))}const ph=/#/g,Pb=/&/g,Ob=/\//g,Mb=/=/g,Eb=/\?/g,gh=/\+/g,Ab=/%5B/g,Nb=/%5D/g,vh=/%5E/g,zb=/%60/g,mh=/%7B/g,Rb=/%7C/g,yh=/%7D/g,Db=/%20/g;function ja(r){return encodeURI(""+r).replace(Rb,"|").replace(Ab,"[").replace(Nb,"]")}function Fb(r){return ja(r).replace(mh,"{").replace(yh,"}").replace(vh,"^")}function pa(r){return ja(r).replace(gh,"%2B").replace(Db,"+").replace(ph,"%23").replace(Pb,"%26").replace(zb,"`").replace(mh,"{").replace(yh,"}").replace(vh,"^")}function Ib(r){return pa(r).replace(Mb,"%3D")}function Hb(r){return ja(r).replace(ph,"%23").replace(Eb,"%3F")}function Wb(r){return r==null?"":Hb(r).replace(Ob,"%2F")}function Ls(r){try{return decodeURIComponent(""+r)}catch{}return""+r}function Bb(r){const s={};if(r===""||r==="?")return s;const u=(r[0]==="?"?r.slice(1):r).split("&");for(let f=0;f<u.length;++f){const d=u[f].replace(gh," "),v=d.indexOf("="),b=Ls(v<0?d:d.slice(0,v)),y=v<0?null:Ls(d.slice(v+1));if(b in s){let x=s[b];Array.isArray(x)||(x=s[b]=[x]),x.push(y)}else s[b]=y}return s}function Uc(r){let s="";for(let l in r){const u=r[l];if(l=Ib(l),u==null){u!==void 0&&(s+=(s.length?"&":"")+l);continue}(Array.isArray(u)?u.map(d=>d&&pa(d)):[u&&pa(u)]).forEach(d=>{d!==void 0&&(s+=(s.length?"&":"")+l,d!=null&&(s+="="+d))})}return s}function jb(r){const s={};for(const l in r){const u=r[l];u!==void 0&&(s[l]=Array.isArray(u)?u.map(f=>f==null?null:""+f):u==null?u:""+u)}return s}function ao(){let r=[];function s(u){return r.push(u),()=>{const f=r.indexOf(u);f>-1&&r.splice(f,1)}}function l(){r=[]}return{add:s,list:()=>r,reset:l}}function gn(r,s,l,u,f){const d=u&&(u.enterCallbacks[f]=u.enterCallbacks[f]||[]);return()=>new Promise((v,b)=>{const y=L=>{L===!1?b(_i(4,{from:l,to:s})):L instanceof Error?b(L):hb(L)?b(_i(2,{from:s,to:L})):(d&&u.enterCallbacks[f]===d&&typeof L=="function"&&d.push(L),v())},x=r.call(u&&u.instances[f],s,l,y);let C=Promise.resolve(x);r.length<3&&(C=C.then(y)),C.catch(L=>b(L))})}function Xl(r,s,l,u){const f=[];for(const d of r)for(const v in d.components){let b=d.components[v];if(!(s!=="beforeRouteEnter"&&!d.instances[v]))if(Ub(b)){const x=(b.__vccOpts||b)[s];x&&f.push(gn(x,l,u,d,v))}else{let y=b();f.push(()=>y.then(x=>{if(!x)return Promise.reject(new Error(`Couldn't resolve component "${v}" at "${d.path}"`));const C=Y0(x)?x.default:x;d.components[v]=C;const O=(C.__vccOpts||C)[s];return O&&gn(O,l,u,d,v)()}))}}return f}function Ub(r){return typeof r=="object"||"displayName"in r||"props"in r||"__vccOpts"in r}function Kc(r){const s=Gr(Wa),l=Gr(Ba),u=ct(()=>s.resolve(Me(r.to))),f=ct(()=>{const{matched:y}=u.value,{length:x}=y,C=y[x-1],L=l.matched;if(!C||!L.length)return-1;const O=L.findIndex(Ci.bind(null,C));if(O>-1)return O;const A=qc(y[x-2]);return x>1&&qc(C)===A&&L[L.length-1].path!==A?L.findIndex(Ci.bind(null,y[x-2])):O}),d=ct(()=>f.value>-1&&Gb(l.params,u.value.params)),v=ct(()=>f.value>-1&&f.value===l.matched.length-1&&uh(l.params,u.value.params));function b(y={}){return $b(y)?s[Me(r.replace)?"replace":"push"](Me(r.to)).catch(yo):Promise.resolve()}return{route:u,href:ct(()=>u.value.href),isActive:d,isExactActive:v,navigate:b}}const Kb=zr({name:"RouterLink",props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Kc,setup(r,{slots:s}){const l=Oi(Kc(r)),{options:u}=Gr(Wa),f=ct(()=>({[$c(r.activeClass,u.linkActiveClass,"router-link-active")]:l.isActive,[$c(r.exactActiveClass,u.linkExactActiveClass,"router-link-exact-active")]:l.isExactActive}));return()=>{const d=s.default&&s.default(l);return r.custom?d:Da("a",{"aria-current":l.isExactActive?r.ariaCurrentValue:null,href:l.href,onClick:l.navigate,class:f.value},d)}}}),qb=Kb;function $b(r){if(!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)&&!r.defaultPrevented&&!(r.button!==void 0&&r.button!==0)){if(r.currentTarget&&r.currentTarget.getAttribute){const s=r.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(s))return}return r.preventDefault&&r.preventDefault(),!0}}function Gb(r,s){for(const l in s){const u=s[l],f=r[l];if(typeof u=="string"){if(u!==f)return!1}else if(!Array.isArray(f)||f.length!==u.length||u.some((d,v)=>d!==f[v]))return!1}return!0}function qc(r){return r?r.aliasOf?r.aliasOf.path:r.path:""}const $c=(r,s,l)=>r!=null?r:s!=null?s:l,Yb=zr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(r,{attrs:s,slots:l}){const u=Gr(da),f=ct(()=>r.route||u.value),d=Gr(zc,0),v=ct(()=>f.value.matched[d]);gs(zc,d+1),gs(G0,v),gs(da,f);const b=Nt();return Ft(()=>[b.value,v.value,r.name],([y,x,C],[L,O,A])=>{x&&(x.instances[C]=y,O&&O!==x&&y&&y===L&&(x.leaveGuards.size||(x.leaveGuards=O.leaveGuards),x.updateGuards.size||(x.updateGuards=O.updateGuards))),y&&x&&(!O||!Ci(x,O)||!L)&&(x.enterCallbacks[C]||[]).forEach(I=>I(y))},{flush:"post"}),()=>{const y=f.value,x=v.value,C=x&&x.components[r.name],L=r.name;if(!C)return Gc(l.default,{Component:C,route:y});const O=x.props[r.name],A=O?O===!0?y.params:typeof O=="function"?O(y):O:null,ee=Da(C,rt({},A,s,{onVnodeUnmounted:J=>{J.component.isUnmounted&&(x.instances[L]=null)},ref:b}));return Gc(l.default,{Component:ee,route:y})||ee}}});function Gc(r,s){if(!r)return null;const l=r(s);return l.length===1?l[0]:l}const Xb=Yb;function Zb(r){const s=Sb(r.routes,r),l=r.parseQuery||Bb,u=r.stringifyQuery||Uc,f=r.history,d=ao(),v=ao(),b=ao(),y=co(cn);let x=cn;gi&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const C=Gl.bind(null,q=>""+q),L=Gl.bind(null,Wb),O=Gl.bind(null,Ls);function A(q,V){let W,oe;return ch(q)?(W=s.getRecordMatcher(q),oe=V):oe=q,s.addRoute(oe,W)}function I(q){const V=s.getRecordMatcher(q);V&&s.removeRoute(V)}function ee(){return s.getRoutes().map(q=>q.record)}function J(q){return!!s.getRecordMatcher(q)}function N(q,V){if(V=rt({},V||y.value),typeof q=="string"){const ke=Yl(l,q,V.path),P=s.resolve({path:ke.path},V),E=f.createHref(ke.fullPath);return rt(ke,P,{params:O(P.params),hash:Ls(ke.hash),redirectedFrom:void 0,href:E})}let W;if("path"in q)W=rt({},q,{path:Yl(l,q.path,V.path).path});else{const ke=rt({},q.params);for(const P in ke)ke[P]==null&&delete ke[P];W=rt({},q,{params:L(q.params)}),V.params=L(V.params)}const oe=s.resolve(W,V),_e=q.hash||"";oe.params=C(O(oe.params));const we=J0(u,rt({},q,{hash:Fb(_e),path:oe.path})),pe=f.createHref(we);return rt({fullPath:we,hash:_e,query:u===Uc?jb(q.query):q.query||{}},oe,{redirectedFrom:void 0,href:pe})}function D(q){return typeof q=="string"?Yl(l,q,y.value.path):rt({},q)}function F(q,V){if(x!==q)return _i(8,{from:V,to:q})}function K(q){return ye(q)}function te(q){return K(rt(D(q),{replace:!0}))}function de(q){const V=q.matched[q.matched.length-1];if(V&&V.redirect){const{redirect:W}=V;let oe=typeof W=="function"?W(q):W;return typeof oe=="string"&&(oe=oe.includes("?")||oe.includes("#")?oe=D(oe):{path:oe},oe.params={}),rt({query:q.query,hash:q.hash,params:q.params},oe)}}function ye(q,V){const W=x=N(q),oe=y.value,_e=q.state,we=q.force,pe=q.replace===!0,ke=de(W);if(ke)return ye(rt(D(ke),{state:_e,force:we,replace:pe}),V||W);const P=W;P.redirectedFrom=V;let E;return!we&&Q0(u,oe,W)&&(E=_i(16,{to:P,from:oe}),Ke(oe,oe,!0,!1)),(E?Promise.resolve(E):Ne(P,oe)).catch(B=>dn(B)?dn(B,2)?B:Le(B):G(B,P,oe)).then(B=>{if(B){if(dn(B,2))return ye(rt(D(B.to),{state:_e,force:we,replace:pe}),V||P)}else B=ce(P,oe,!0,pe,_e);return me(P,oe,B),B})}function Re(q,V){const W=F(q,V);return W?Promise.reject(W):Promise.resolve()}function Ne(q,V){let W;const[oe,_e,we]=Jb(q,V);W=Xl(oe.reverse(),"beforeRouteLeave",q,V);for(const ke of oe)ke.leaveGuards.forEach(P=>{W.push(gn(P,q,V))});const pe=Re.bind(null,q,V);return W.push(pe),di(W).then(()=>{W=[];for(const ke of d.list())W.push(gn(ke,q,V));return W.push(pe),di(W)}).then(()=>{W=Xl(_e,"beforeRouteUpdate",q,V);for(const ke of _e)ke.updateGuards.forEach(P=>{W.push(gn(P,q,V))});return W.push(pe),di(W)}).then(()=>{W=[];for(const ke of q.matched)if(ke.beforeEnter&&!V.matched.includes(ke))if(Array.isArray(ke.beforeEnter))for(const P of ke.beforeEnter)W.push(gn(P,q,V));else W.push(gn(ke.beforeEnter,q,V));return W.push(pe),di(W)}).then(()=>(q.matched.forEach(ke=>ke.enterCallbacks={}),W=Xl(we,"beforeRouteEnter",q,V),W.push(pe),di(W))).then(()=>{W=[];for(const ke of v.list())W.push(gn(ke,q,V));return W.push(pe),di(W)}).catch(ke=>dn(ke,8)?ke:Promise.reject(ke))}function me(q,V,W){for(const oe of b.list())oe(q,V,W)}function ce(q,V,W,oe,_e){const we=F(q,V);if(we)return we;const pe=V===cn,ke=gi?history.state:{};W&&(oe||pe?f.replace(q.fullPath,rt({scroll:pe&&ke&&ke.scroll},_e)):f.push(q.fullPath,_e)),y.value=q,Ke(q,V,W,pe),Le()}let Ee;function U(){Ee||(Ee=f.listen((q,V,W)=>{const oe=N(q),_e=de(oe);if(_e){ye(rt(_e,{replace:!0}),oe).catch(yo);return}x=oe;const we=y.value;gi&&sb(Fc(we.fullPath,W.delta),Us()),Ne(oe,we).catch(pe=>dn(pe,12)?pe:dn(pe,2)?(ye(pe.to,oe).then(ke=>{dn(ke,20)&&!W.delta&&W.type===To.pop&&f.go(-1,!1)}).catch(yo),Promise.reject()):(W.delta&&f.go(-W.delta,!1),G(pe,oe,we))).then(pe=>{pe=pe||ce(oe,we,!1),pe&&(W.delta?f.go(-W.delta,!1):W.type===To.pop&&dn(pe,20)&&f.go(-1,!1)),me(oe,we,pe)}).catch(yo)}))}let le=ao(),w=ao(),Q;function G(q,V,W){Le(q);const oe=w.list();return oe.length?oe.forEach(_e=>_e(q,V,W)):console.error(q),Promise.reject(q)}function fe(){return Q&&y.value!==cn?Promise.resolve():new Promise((q,V)=>{le.add([q,V])})}function Le(q){return Q||(Q=!q,U(),le.list().forEach(([V,W])=>q?W(q):V()),le.reset()),q}function Ke(q,V,W,oe){const{scrollBehavior:_e}=r;if(!gi||!_e)return Promise.resolve();const we=!W&&lb(Fc(q.fullPath,0))||(oe||!W)&&history.state&&history.state.scroll||null;return Rs().then(()=>_e(q,V,we)).then(pe=>pe&&ob(pe)).catch(pe=>G(pe,q,V))}const lt=q=>f.go(q);let tt;const He=new Set;return{currentRoute:y,addRoute:A,removeRoute:I,hasRoute:J,getRoutes:ee,resolve:N,options:r,push:K,replace:te,go:lt,back:()=>lt(-1),forward:()=>lt(1),beforeEach:d.add,beforeResolve:v.add,afterEach:b.add,onError:w.add,isReady:fe,install(q){const V=this;q.component("RouterLink",qb),q.component("RouterView",Xb),q.config.globalProperties.$router=V,Object.defineProperty(q.config.globalProperties,"$route",{enumerable:!0,get:()=>Me(y)}),gi&&!tt&&y.value===cn&&(tt=!0,K(f.location).catch(_e=>{}));const W={};for(const _e in cn)W[_e]=ct(()=>y.value[_e]);q.provide(Wa,V),q.provide(Ba,Oi(W)),q.provide(da,y);const oe=q.unmount;He.add(q),q.unmount=function(){He.delete(q),He.size<1&&(x=cn,Ee&&Ee(),Ee=null,y.value=cn,tt=!1,Q=!1),oe()}}}}function di(r){return r.reduce((s,l)=>s.then(()=>l()),Promise.resolve())}function Jb(r,s){const l=[],u=[],f=[],d=Math.max(s.matched.length,r.matched.length);for(let v=0;v<d;v++){const b=s.matched[v];b&&(r.matched.find(x=>Ci(x,b))?u.push(b):l.push(b));const y=r.matched[v];y&&(s.matched.find(x=>Ci(x,y))||f.push(y))}return[l,u,f]}function Qb(){return Gr(Ba)}const Vb=zr({name:"FileIcon",props:{id:null},setup(r){const s=r,l=ct(()=>s.id.split(/\./g).pop()),u=ct(()=>{switch(l.value){case"vue":return"i-logos-vue";default:return"i-carbon-document-blank"}});return(f,d)=>(vt(),jt("div",{class:wi(Me(u))},null,2))}}),ew={open:""},tw={"cursor-default":"","select-none":"","text-sm":"",truncate:"",p:"y1"},rw={"ml-1":""},nw=zr({name:"ModuleTreeNode",props:{node:null,icon:{default:"i-carbon-folder"}},setup(r){const s=Qb();return(l,u)=>{const f=xs("ModuleTreeNode",!0),d=Vb,v=xs("RouterLink");return vt(),jt("details",ew,[Fe("summary",tw,[Fe("div",{class:wi(r.icon)},null,2),Er(" "+tr(r.node.name),1)]),(vt(!0),jt(rr,null,nc(Object.entries(r.node.children),b=>(vt(),xi(f,{key:b[0],ml2:"",node:b[1]},null,8,["node"]))),128)),(vt(!0),jt(rr,null,nc(r.node.items,b=>(vt(),jt("div",{key:b.full,ml4:"","ws-nowrap":""},[nt(v,{block:"","text-sm":"",p:"x2 y1",rounded:"",to:`/module/${encodeURIComponent(b.full)}`,class:wi({"bg-gray/10":b.full===Me(s).params.id})},{default:yn(()=>[nt(d,{id:b.path},null,8,["id"]),Fe("span",rw,tr(b.path.split("/").pop()),1)]),_:2},1032,["to","class"])]))),128))])}}});var iw="/__unocss/icon.svg";const ow={p:"x4 y3",b:"b main",flex:"","children:my-auto":""},sw=Fe("div",{flex:"","flex-auto":"","children:my-auto":"","ws-nowrap":""},[Fe("img",{src:iw,filter:"","dark:invert":"","inline-block":"",h:"1.3em",m:"r-1.5"}),Fe("div",{"of-hidden":""},[Er(" Inspector "),Fe("sup",{"text-teal5":"","bg-teal5:10":"",p:"x1.5 y0.5",rounded:"",italic:""},"beta")])],-1),lw=zr({name:"NarBar",setup(r){const s=Iy(),l=ay(s);return(u,f)=>(vt(),jt("nav",ow,[sw,Fe("button",{"text-lg":"","i-carbon-sun":"","dark:i-carbon-moon":"",onClick:f[0]||(f[0]=d=>Me(l)())})]))}}),aw={"h-full":""},uw={b:"r main","of-hidden":""},fw={pt:"4",flex:"~ col gap-3"},cw=Fe("div",{"i-carbon-dashboard":""},null,-1),dw=Fe("span",null," Overview ",-1),hw=Fe("div",{"i-carbon-terminal":""},null,-1),pw=Fe("span",null," REPL ",-1),gw=Fe("div",{b:"b main"},null,-1),vw={b:"r main",class:"scrolls scrolls-sidebar"},mw=zr({name:"Sidebar",setup(r){return(s,l)=>{const u=lw,f=xs("RouterLink"),d=nw;return vt(),jt("div",aw,[Fe("div",uw,[nt(u),Fe("div",fw,[nt(f,{block:"",to:"/","text-sm":"",m:"l-3.7"},{default:yn(()=>[cw,dw]),_:1}),nt(f,{block:"",to:"/repl","text-sm":"",m:"l-3.7"},{default:yn(()=>[hw,pw]),_:1}),gw])]),Fe("div",vw,[Object.keys(Me(hs).workspace.children).length?(vt(),xi(d,{key:0,node:Me(hs).workspace,p:"l3 t4",icon:"i-carbon-portfolio"},null,8,["node"])):_s("",!0),Object.keys(Me(hs).root.children).length?(vt(),xi(d,{key:1,node:Me(hs).root,p:"l3 t4",icon:"i-carbon-vmdk-disk"},null,8,["node"])):_s("",!0)])])}}});var yw=Object.defineProperty,bw=Object.defineProperties,ww=Object.getOwnPropertyDescriptors,Ps=Object.getOwnPropertySymbols,bh=Object.prototype.hasOwnProperty,wh=Object.prototype.propertyIsEnumerable,Yc=(r,s,l)=>s in r?yw(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,xw=(r,s)=>{for(var l in s||(s={}))bh.call(s,l)&&Yc(r,l,s[l]);if(Ps)for(var l of Ps(s))wh.call(s,l)&&Yc(r,l,s[l]);return r},kw=(r,s)=>bw(r,ww(s)),Sw=(r,s)=>{var l={};for(var u in r)bh.call(r,u)&&s.indexOf(u)<0&&(l[u]=r[u]);if(r!=null&&Ps)for(var u of Ps(r))s.indexOf(u)<0&&wh.call(r,u)&&(l[u]=r[u]);return l};const Cw={name:"splitpanes",emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click"],props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((r,s)=>(r[s.id]=s)&&r,{})}},methods:{updatePaneComponents(){this.panes.forEach(r=>{r.update&&r.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[r.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(r,s){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=s},onMouseMove(r){this.touch.mouseDown&&(r.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(r)),this.$emit("resize",this.panes.map(s=>({min:s.min,max:s.max,size:s.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(r=>({min:r.min,max:r.max,size:r.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(r,s){"ontouchstart"in window&&(r.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===s?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(r,s),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=s,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[s])},onSplitterDblClick(r,s){let l=0;this.panes=this.panes.map((u,f)=>(u.size=f===s?u.max:u.min,f!==s&&(l+=u.min),u)),this.panes[s].size-=l,this.$emit("pane-maximize",this.panes[s])},onPaneClick(r,s){this.$emit("pane-click",this.indexedPanes[s])},getCurrentMouseDrag(r){const s=this.container.getBoundingClientRect(),{clientX:l,clientY:u}="ontouchstart"in window&&r.touches?r.touches[0]:r;return{x:l-s.left,y:u-s.top}},getCurrentDragPercentage(r){r=r[this.horizontal?"y":"x"];const s=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(r=s-r),r*100/s},calculatePanesSize(r){const s=this.touch.activeSplitter;let l={prevPanesSize:this.sumPrevPanesSize(s),nextPanesSize:this.sumNextPanesSize(s),prevReachedMinPanes:0,nextReachedMinPanes:0};const u=0+(this.pushOtherPanes?0:l.prevPanesSize),f=100-(this.pushOtherPanes?0:l.nextPanesSize),d=Math.max(Math.min(this.getCurrentDragPercentage(r),f),u);let v=[s,s+1],b=this.panes[v[0]]||null,y=this.panes[v[1]]||null;const x=b.max<100&&d>=b.max+l.prevPanesSize,C=y.max<100&&d<=100-(y.max+this.sumNextPanesSize(s+1));if(x||C){x?(b.size=b.max,y.size=Math.max(100-b.max-l.prevPanesSize-l.nextPanesSize,0)):(b.size=Math.max(100-y.max-l.prevPanesSize-this.sumNextPanesSize(s+1),0),y.size=y.max);return}if(this.pushOtherPanes){const L=this.doPushOtherPanes(l,d);if(!L)return;({sums:l,panesToResize:v}=L),b=this.panes[v[0]]||null,y=this.panes[v[1]]||null}b!==null&&(b.size=Math.min(Math.max(d-l.prevPanesSize-l.prevReachedMinPanes,b.min),b.max)),y!==null&&(y.size=Math.min(Math.max(100-d-l.nextPanesSize-l.nextReachedMinPanes,y.min),y.max))},doPushOtherPanes(r,s){const l=this.touch.activeSplitter,u=[l,l+1];return s<r.prevPanesSize+this.panes[u[0]].min&&(u[0]=this.findPrevExpandedPane(l).index,r.prevReachedMinPanes=0,u[0]<l&&this.panes.forEach((f,d)=>{d>u[0]&&d<=l&&(f.size=f.min,r.prevReachedMinPanes+=f.min)}),r.prevPanesSize=this.sumPrevPanesSize(u[0]),u[0]===void 0)?(r.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((f,d)=>{d>0&&d<=l&&(f.size=f.min,r.prevReachedMinPanes+=f.min)}),this.panes[u[1]].size=100-r.prevReachedMinPanes-this.panes[0].min-r.prevPanesSize-r.nextPanesSize,null):s>100-r.nextPanesSize-this.panes[u[1]].min&&(u[1]=this.findNextExpandedPane(l).index,r.nextReachedMinPanes=0,u[1]>l+1&&this.panes.forEach((f,d)=>{d>l&&d<u[1]&&(f.size=f.min,r.nextReachedMinPanes+=f.min)}),r.nextPanesSize=this.sumNextPanesSize(u[1]-1),u[1]===void 0)?(r.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((f,d)=>{d<this.panesCount-1&&d>=l+1&&(f.size=f.min,r.nextReachedMinPanes+=f.min)}),this.panes[u[0]].size=100-r.prevPanesSize-r.nextReachedMinPanes-this.panes[this.panesCount-1].min-r.nextPanesSize,null):{sums:r,panesToResize:u}},sumPrevPanesSize(r){return this.panes.reduce((s,l,u)=>s+(u<r?l.size:0),0)},sumNextPanesSize(r){return this.panes.reduce((s,l,u)=>s+(u>r+1?l.size:0),0)},findPrevExpandedPane(r){return[...this.panes].reverse().find(l=>l.index<r&&l.size>l.min)||{}},findNextExpandedPane(r){return this.panes.find(l=>l.index>r+1&&l.size>l.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(s=>{const l=s.classList.contains("splitpanes__pane"),u=s.classList.contains("splitpanes__splitter");if(!l&&!u){s.parentNode.removeChild(s),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.");return}})},addSplitter(r,s,l=!1){const u=r-1,f=document.createElement("div");f.classList.add("splitpanes__splitter"),l||(f.onmousedown=d=>this.onMouseDown(d,u),typeof window!="undefined"&&"ontouchstart"in window&&(f.ontouchstart=d=>this.onMouseDown(d,u)),f.onclick=d=>this.onSplitterClick(d,u+1)),this.dblClickSplitter&&(f.ondblclick=d=>this.onSplitterDblClick(d,u+1)),s.parentNode.insertBefore(f,s)},removeSplitter(r){r.onmousedown=void 0,r.onclick=void 0,r.ondblclick=void 0,r.parentNode.removeChild(r)},redoSplitters(){const r=Array.from(this.container.children);r.forEach(l=>{l.className.includes("splitpanes__splitter")&&this.removeSplitter(l)});let s=0;r.forEach(l=>{l.className.includes("splitpanes__pane")&&(!s&&this.firstSplitter?this.addSplitter(s,l,!0):s&&this.addSplitter(s,l),s++)})},requestUpdate(r){var s=r,{target:l}=s,u=Sw(s,["target"]);const f=this.indexedPanes[l._.uid];Object.entries(u).forEach(([d,v])=>f[d]=v)},onPaneAdd(r){let s=-1;Array.from(r.$el.parentNode.children).some(f=>(f.className.includes("splitpanes__pane")&&s++,f===r.$el));const l=parseFloat(r.minSize),u=parseFloat(r.maxSize);this.panes.splice(s,0,{id:r._.uid,index:s,min:isNaN(l)?0:l,max:isNaN(u)?100:u,size:r.size===null?null:parseFloat(r.size),givenSize:r.size,update:r.update}),this.panes.forEach((f,d)=>f.index=d),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[s]}),this.$emit("pane-add",{index:s,panes:this.panes.map(f=>({min:f.min,max:f.max,size:f.size}))})})},onPaneRemove(r){const s=this.panes.findIndex(u=>u.id===r._.uid),l=this.panes.splice(s,1)[0];this.panes.forEach((u,f)=>u.index=f),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:kw(xw({},l),{index:s})}),this.$emit("pane-remove",{removed:l,panes:this.panes.map(u=>({min:u.min,max:u.max,size:u.size}))})})},resetPaneSizes(r={}){!r.addedPane&&!r.removedPane?this.initialPanesSizing():this.panes.some(s=>s.givenSize!==null||s.min||s.max<100)?this.equalizeAfterAddOrRemove(r):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(s=>({min:s.min,max:s.max,size:s.size})))},equalize(){const r=100/this.panesCount;let s=0,l=[],u=[];this.panes.forEach(f=>{f.size=Math.max(Math.min(r,f.max),f.min),s-=f.size,f.size>=f.max&&l.push(f.id),f.size<=f.min&&u.push(f.id)}),s>.1&&this.readjustSizes(s,l,u)},initialPanesSizing(){100/this.panesCount;let r=100,s=[],l=[],u=0;this.panes.forEach(d=>{r-=d.size,d.size!==null&&u++,d.size>=d.max&&s.push(d.id),d.size<=d.min&&l.push(d.id)});let f=100;r>.1&&(this.panes.forEach(d=>{d.size===null&&(d.size=Math.max(Math.min(r/(this.panesCount-u),d.max),d.min)),f-=d.size}),f>.1&&this.readjustSizes(r,s,l))},equalizeAfterAddOrRemove({addedPane:r,removedPane:s}={}){let l=100/this.panesCount,u=0,f=[],d=[];r&&r.givenSize!==null&&(l=(100-r.givenSize)/(this.panesCount-1)),this.panes.forEach(v=>{u-=v.size,v.size>=v.max&&f.push(v.id),v.size<=v.min&&d.push(v.id)}),!(Math.abs(u)<.1)&&(this.panes.forEach(v=>{r&&r.givenSize!==null&&r.id===v.id||(v.size=Math.max(Math.min(l,v.max),v.min)),u-=v.size,v.size>=v.max&&f.push(v.id),v.size<=v.min&&d.push(v.id)}),u>.1&&this.readjustSizes(u,f,d))},readjustSizes(r,s,l){let u;r>0?u=r/(this.panesCount-s.length):u=r/(this.panesCount-l.length),this.panes.forEach((f,d)=>{if(r>0&&!s.includes(f.id)){const v=Math.max(Math.min(f.size+u,f.max),f.min);r-=v-f.size,f.size=v}else if(!l.includes(f.id)){const v=Math.max(Math.min(f.size+u,f.max),f.min);r-=v-f.size,f.size=v}f.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[f.id].size}%`})}),Math.abs(r)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(r){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((l,u)=>{l.ondblclick=r?f=>this.onSplitterDblClick(f,u):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.$emit("ready"),this.ready=!0},render(){return Da("div",{ref:"container",class:["splitpanes",`splitpanes--${this.horizontal?"horizontal":"vertical"}`,{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}};var _w=(r,s)=>{const l=r.__vccOpts||r;for(const[u,f]of s)l[u]=f;return l};const Tw={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:null},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(r){this.style=r}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(r){this.requestUpdate({target:this,size:r})},minSizeNumber(r){this.requestUpdate({target:this,min:r})},maxSizeNumber(r){this.requestUpdate({target:this,max:r})}}};function Lw(r,s,l,u,f,d){return vt(),jt("div",{class:"splitpanes__pane",onClick:s[0]||(s[0]=v=>d.onPaneClick(v,r._.uid)),style:Lo(r.style)},[Nd(r.$slots,"default")],4)}var Xc=_w(Tw,[["render",Lw]]);const Pw={"h-screen":"","w-screen":"",overflow:"hidden"},Ow={"h-full":"","of-hidden":""},Mw=zr({name:"App",setup(r){return(s,l)=>{const u=mw,f=xs("RouterView");return vt(),jt("div",Pw,[nt(Me(Cw),null,{default:yn(()=>[nt(Me(Xc),{size:"20","push-other-panes":!1},{default:yn(()=>[nt(u)]),_:1}),nt(Me(Xc),{size:"80"},{default:yn(()=>[Fe("div",Ow,[nt(f)])]),_:1})]),_:1})])}}}),xh=Ym(Mw);xh.use(Zb({history:db(),routes:$0}));xh.mount("#app");export{f0 as _,_y as a,nt as b,jt as c,zr as d,Fe as e,Rw as f,Me as g,s0 as h,bt as i,nh as j,xi as k,Nw as l,Vy as m,Lo as n,vt as o,zw as p,Aw as q,Nt as r,Er as s,xv as t,m0 as u,tr as v,yn as w,_s as x,v0 as y,Qb as z};