@unocss/inspector 0.28.3 → 0.29.2
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.
- package/dist/client/assets/{_id_.7c0817c1.js → _id_.51547589.js} +1 -1
- package/dist/client/assets/{index.91987d98.css → index.dcb4ed18.css} +1 -1
- package/dist/client/assets/index.fedf2005.js +3 -0
- package/dist/client/assets/{repl.751c8e64.js → repl.534d7706.js} +1 -1
- package/dist/client/assets/vendor.e38106f4.js +28 -0
- package/dist/client/index.html +3 -3
- package/package.json +1 -1
- package/dist/client/assets/index.1063a88f.js +0 -3
- package/dist/client/assets/vendor.e31e6b0a.js +0 -28
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function Yl(r,s){const l=Object.create(null),u=r.split(",");for(let c=0;c<u.length;c++)l[u[c]]=!0;return s?c=>!!l[c.toLowerCase()]:c=>!!l[c]}const Hp="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Wp=Yl(Hp);function yc(r){return!!r||r===""}function gs(r){if(Be(r)){const s={};for(let l=0;l<r.length;l++){const u=r[l],c=Mt(u)?Kp(u):gs(u);if(c)for(const d in c)s[d]=c[d]}return s}else{if(Mt(r))return r;if(St(r))return r}}const Bp=/;(?![^(]*\))/g,Up=/:(.+)/;function Kp(r){const s={};return r.split(Bp).forEach(l=>{if(l){const u=l.split(Up);u.length>1&&(s[u[0].trim()]=u[1].trim())}}),s}function Xl(r){let s="";if(Mt(r))s=r;else if(Be(r))for(let l=0;l<r.length;l++){const u=Xl(r[l]);u&&(s+=u+" ")}else if(St(r))for(const l in r)r[l]&&(s+=l+" ");return s.trim()}const l0=r=>Mt(r)?r:r==null?"":Be(r)||St(r)&&(r.toString===kc||!Ke(r.toString))?JSON.stringify(r,bc,2):String(r),bc=(r,s)=>s&&s.__v_isRef?bc(r,s.value):si(s)?{[`Map(${s.size})`]:[...s.entries()].reduce((l,[u,c])=>(l[`${u} =>`]=c,l),{})}:wc(s)?{[`Set(${s.size})`]:[...s.values()]}:St(s)&&!Be(s)&&!Sc(s)?String(s):s,nt={},oi=[],gr=()=>{},jp=()=>!1,qp=/^on[^a-z]/,vs=r=>qp.test(r),$l=r=>r.startsWith("onUpdate:"),Ut=Object.assign,Zl=(r,s)=>{const l=r.indexOf(s);l>-1&&r.splice(l,1)},Gp=Object.prototype.hasOwnProperty,Xe=(r,s)=>Gp.call(r,s),Be=Array.isArray,si=r=>ms(r)==="[object Map]",wc=r=>ms(r)==="[object Set]",Ke=r=>typeof r=="function",Mt=r=>typeof r=="string",Jl=r=>typeof r=="symbol",St=r=>r!==null&&typeof r=="object",xc=r=>St(r)&&Ke(r.then)&&Ke(r.catch),kc=Object.prototype.toString,ms=r=>kc.call(r),Yp=r=>ms(r).slice(8,-1),Sc=r=>ms(r)==="[object Object]",Ql=r=>Mt(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,ts=Yl(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ys=r=>{const s=Object.create(null);return l=>s[l]||(s[l]=r(l))},Xp=/-(\w)/g,Pr=ys(r=>r.replace(Xp,(s,l)=>l?l.toUpperCase():"")),$p=/\B([A-Z])/g,ci=ys(r=>r.replace($p,"-$1").toLowerCase()),bs=ys(r=>r.charAt(0).toUpperCase()+r.slice(1)),yl=ys(r=>r?`on${bs(r)}`:""),so=(r,s)=>!Object.is(r,s),bl=(r,s)=>{for(let l=0;l<r.length;l++)r[l](s)},os=(r,s,l)=>{Object.defineProperty(r,s,{configurable:!0,enumerable:!1,value:l})},Zp=r=>{const s=parseFloat(r);return isNaN(s)?r:s};let wf;const Jp=()=>wf||(wf=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let or;class Qp{constructor(s=!1){this.active=!0,this.effects=[],this.cleanups=[],!s&&or&&(this.parent=or,this.index=(or.scopes||(or.scopes=[])).push(this)-1)}run(s){if(this.active)try{return or=this,s()}finally{or=this.parent}}on(){or=this}off(){or=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 c=this.parent.scopes.pop();c&&c!==this&&(this.parent.scopes[this.index]=c,c.index=this.index)}this.active=!1}}}function Vp(r,s=or){s&&s.active&&s.effects.push(r)}function eg(){return or}function tg(r){or&&or.cleanups.push(r)}const Vl=r=>{const s=new Set(r);return s.w=0,s.n=0,s},Cc=r=>(r.w&an)>0,Tc=r=>(r.n&an)>0,rg=({deps:r})=>{if(r.length)for(let s=0;s<r.length;s++)r[s].w|=an},ng=r=>{const{deps:s}=r;if(s.length){let l=0;for(let u=0;u<s.length;u++){const c=s[u];Cc(c)&&!Tc(c)?c.delete(r):s[l++]=c,c.w&=~an,c.n&=~an}s.length=l}},Pl=new WeakMap;let Qi=0,an=1;const Ol=30;let Mr;const Mn=Symbol(""),El=Symbol("");class ea{constructor(s,l=null,u){this.fn=s,this.scheduler=l,this.active=!0,this.deps=[],this.parent=void 0,Vp(this,u)}run(){if(!this.active)return this.fn();let s=Mr,l=sn;for(;s;){if(s===this)return;s=s.parent}try{return this.parent=Mr,Mr=this,sn=!0,an=1<<++Qi,Qi<=Ol?rg(this):xf(this),this.fn()}finally{Qi<=Ol&&ng(this),an=1<<--Qi,Mr=this.parent,sn=l,this.parent=void 0}}stop(){this.active&&(xf(this),this.onStop&&this.onStop(),this.active=!1)}}function xf(r){const{deps:s}=r;if(s.length){for(let l=0;l<s.length;l++)s[l].delete(r);s.length=0}}let sn=!0;const Lc=[];function hi(){Lc.push(sn),sn=!1}function di(){const r=Lc.pop();sn=r===void 0?!0:r}function rr(r,s,l){if(sn&&Mr){let u=Pl.get(r);u||Pl.set(r,u=new Map);let c=u.get(l);c||u.set(l,c=Vl()),Mc(c)}}function Mc(r,s){let l=!1;Qi<=Ol?Tc(r)||(r.n|=an,l=!Cc(r)):l=!r.has(Mr),l&&(r.add(Mr),Mr.deps.push(r))}function Hr(r,s,l,u,c,d){const m=Pl.get(r);if(!m)return;let b=[];if(s==="clear")b=[...m.values()];else if(l==="length"&&Be(r))m.forEach((y,x)=>{(x==="length"||x>=u)&&b.push(y)});else switch(l!==void 0&&b.push(m.get(l)),s){case"add":Be(r)?Ql(l)&&b.push(m.get("length")):(b.push(m.get(Mn)),si(r)&&b.push(m.get(El)));break;case"delete":Be(r)||(b.push(m.get(Mn)),si(r)&&b.push(m.get(El)));break;case"set":si(r)&&b.push(m.get(Mn));break}if(b.length===1)b[0]&&_l(b[0]);else{const y=[];for(const x of b)x&&y.push(...x);_l(Vl(y))}}function _l(r,s){for(const l of Be(r)?r:[...r])(l!==Mr||l.allowRecurse)&&(l.scheduler?l.scheduler():l.run())}const ig=Yl("__proto__,__v_isRef,__isVue"),Pc=new Set(Object.getOwnPropertyNames(Symbol).map(r=>Symbol[r]).filter(Jl)),og=ta(),sg=ta(!1,!0),lg=ta(!0),kf=ag();function ag(){const r={};return["includes","indexOf","lastIndexOf"].forEach(s=>{r[s]=function(...l){const u=Je(this);for(let d=0,m=this.length;d<m;d++)rr(u,"get",d+"");const c=u[s](...l);return c===-1||c===!1?u[s](...l.map(Je)):c}}),["push","pop","shift","unshift","splice"].forEach(s=>{r[s]=function(...l){hi();const u=Je(this)[s].apply(this,l);return di(),u}}),r}function ta(r=!1,s=!1){return function(u,c,d){if(c==="__v_isReactive")return!r;if(c==="__v_isReadonly")return r;if(c==="__v_isShallow")return s;if(c==="__v_raw"&&d===(r?s?Cg:Nc:s?Ac:_c).get(u))return u;const m=Be(u);if(!r&&m&&Xe(kf,c))return Reflect.get(kf,c,d);const b=Reflect.get(u,c,d);return(Jl(c)?Pc.has(c):ig(c))||(r||rr(u,"get",c),s)?b:gt(b)?!m||!Ql(c)?b.value:b:St(b)?r?zc(b):po(b):b}}const ug=Oc(),fg=Oc(!0);function Oc(r=!1){return function(l,u,c,d){let m=l[u];if(lo(m)&>(m)&&!gt(c))return!1;if(!r&&!lo(c)&&(Dc(c)||(c=Je(c),m=Je(m)),!Be(l)&>(m)&&!gt(c)))return m.value=c,!0;const b=Be(l)&&Ql(u)?Number(u)<l.length:Xe(l,u),y=Reflect.set(l,u,c,d);return l===Je(d)&&(b?so(c,m)&&Hr(l,"set",u,c):Hr(l,"add",u,c)),y}}function cg(r,s){const l=Xe(r,s);r[s];const u=Reflect.deleteProperty(r,s);return u&&l&&Hr(r,"delete",s,void 0),u}function hg(r,s){const l=Reflect.has(r,s);return(!Jl(s)||!Pc.has(s))&&rr(r,"has",s),l}function dg(r){return rr(r,"iterate",Be(r)?"length":Mn),Reflect.ownKeys(r)}const Ec={get:og,set:ug,deleteProperty:cg,has:hg,ownKeys:dg},pg={get:lg,set(r,s){return!0},deleteProperty(r,s){return!0}},gg=Ut({},Ec,{get:sg,set:fg}),ra=r=>r,ws=r=>Reflect.getPrototypeOf(r);function $o(r,s,l=!1,u=!1){r=r.__v_raw;const c=Je(r),d=Je(s);s!==d&&!l&&rr(c,"get",s),!l&&rr(c,"get",d);const{has:m}=ws(c),b=u?ra:l?oa:ao;if(m.call(c,s))return b(r.get(s));if(m.call(c,d))return b(r.get(d));r!==c&&r.get(s)}function Zo(r,s=!1){const l=this.__v_raw,u=Je(l),c=Je(r);return r!==c&&!s&&rr(u,"has",r),!s&&rr(u,"has",c),r===c?l.has(r):l.has(r)||l.has(c)}function Jo(r,s=!1){return r=r.__v_raw,!s&&rr(Je(r),"iterate",Mn),Reflect.get(r,"size",r)}function Sf(r){r=Je(r);const s=Je(this);return ws(s).has.call(s,r)||(s.add(r),Hr(s,"add",r,r)),this}function Cf(r,s){s=Je(s);const l=Je(this),{has:u,get:c}=ws(l);let d=u.call(l,r);d||(r=Je(r),d=u.call(l,r));const m=c.call(l,r);return l.set(r,s),d?so(s,m)&&Hr(l,"set",r,s):Hr(l,"add",r,s),this}function Tf(r){const s=Je(this),{has:l,get:u}=ws(s);let c=l.call(s,r);c||(r=Je(r),c=l.call(s,r)),u&&u.call(s,r);const d=s.delete(r);return c&&Hr(s,"delete",r,void 0),d}function Lf(){const r=Je(this),s=r.size!==0,l=r.clear();return s&&Hr(r,"clear",void 0,void 0),l}function Qo(r,s){return function(u,c){const d=this,m=d.__v_raw,b=Je(m),y=s?ra:r?oa:ao;return!r&&rr(b,"iterate",Mn),m.forEach((x,S)=>u.call(c,y(x),y(S),d))}}function Vo(r,s,l){return function(...u){const c=this.__v_raw,d=Je(c),m=si(d),b=r==="entries"||r===Symbol.iterator&&m,y=r==="keys"&&m,x=c[r](...u),S=l?ra:s?oa:ao;return!s&&rr(d,"iterate",y?El:Mn),{next(){const{value:P,done:O}=x.next();return O?{value:P,done:O}:{value:b?[S(P[0]),S(P[1])]:S(P),done:O}},[Symbol.iterator](){return this}}}}function Vr(r){return function(...s){return r==="delete"?!1:this}}function vg(){const r={get(d){return $o(this,d)},get size(){return Jo(this)},has:Zo,add:Sf,set:Cf,delete:Tf,clear:Lf,forEach:Qo(!1,!1)},s={get(d){return $o(this,d,!1,!0)},get size(){return Jo(this)},has:Zo,add:Sf,set:Cf,delete:Tf,clear:Lf,forEach:Qo(!1,!0)},l={get(d){return $o(this,d,!0)},get size(){return Jo(this,!0)},has(d){return Zo.call(this,d,!0)},add:Vr("add"),set:Vr("set"),delete:Vr("delete"),clear:Vr("clear"),forEach:Qo(!0,!1)},u={get(d){return $o(this,d,!0,!0)},get size(){return Jo(this,!0)},has(d){return Zo.call(this,d,!0)},add:Vr("add"),set:Vr("set"),delete:Vr("delete"),clear:Vr("clear"),forEach:Qo(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(d=>{r[d]=Vo(d,!1,!1),l[d]=Vo(d,!0,!1),s[d]=Vo(d,!1,!0),u[d]=Vo(d,!0,!0)}),[r,l,s,u]}const[mg,yg,bg,wg]=vg();function na(r,s){const l=s?r?wg:bg:r?yg:mg;return(u,c,d)=>c==="__v_isReactive"?!r:c==="__v_isReadonly"?r:c==="__v_raw"?u:Reflect.get(Xe(l,c)&&c in u?l:u,c,d)}const xg={get:na(!1,!1)},kg={get:na(!1,!0)},Sg={get:na(!0,!1)},_c=new WeakMap,Ac=new WeakMap,Nc=new WeakMap,Cg=new WeakMap;function Tg(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Lg(r){return r.__v_skip||!Object.isExtensible(r)?0:Tg(Yp(r))}function po(r){return lo(r)?r:ia(r,!1,Ec,xg,_c)}function Mg(r){return ia(r,!1,gg,kg,Ac)}function zc(r){return ia(r,!0,pg,Sg,Nc)}function ia(r,s,l,u,c){if(!St(r)||r.__v_raw&&!(s&&r.__v_isReactive))return r;const d=c.get(r);if(d)return d;const m=Lg(r);if(m===0)return r;const b=new Proxy(r,m===2?u:l);return c.set(r,b),b}function li(r){return lo(r)?li(r.__v_raw):!!(r&&r.__v_isReactive)}function lo(r){return!!(r&&r.__v_isReadonly)}function Dc(r){return!!(r&&r.__v_isShallow)}function Rc(r){return li(r)||lo(r)}function Je(r){const s=r&&r.__v_raw;return s?Je(s):r}function Fc(r){return os(r,"__v_skip",!0),r}const ao=r=>St(r)?po(r):r,oa=r=>St(r)?zc(r):r;function Ic(r){sn&&Mr&&(r=Je(r),Mc(r.dep||(r.dep=Vl())))}function Hc(r,s){r=Je(r),r.dep&&_l(r.dep)}function gt(r){return!!(r&&r.__v_isRef===!0)}function Yt(r){return Wc(r,!1)}function eo(r){return Wc(r,!0)}function Wc(r,s){return gt(r)?r:new Pg(r,s)}class Pg{constructor(s,l){this.__v_isShallow=l,this.dep=void 0,this.__v_isRef=!0,this._rawValue=l?s:Je(s),this._value=l?s:ao(s)}get value(){return Ic(this),this._value}set value(s){s=this.__v_isShallow?s:Je(s),so(s,this._rawValue)&&(this._rawValue=s,this._value=this.__v_isShallow?s:ao(s),Hc(this))}}function at(r){return gt(r)?r.value:r}const Og={get:(r,s,l)=>at(Reflect.get(r,s,l)),set:(r,s,l,u)=>{const c=r[s];return gt(c)&&!gt(l)?(c.value=l,!0):Reflect.set(r,s,l,u)}};function Bc(r){return li(r)?r:new Proxy(r,Og)}class Eg{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 a0(r,s,l){const u=r[s];return gt(u)?u:new Eg(r,s,l)}class _g{constructor(s,l,u,c){this._setter=l,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new ea(s,()=>{this._dirty||(this._dirty=!0,Hc(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!c,this.__v_isReadonly=u}get value(){const s=Je(this);return Ic(s),(s._dirty||!s._cacheable)&&(s._dirty=!1,s._value=s.effect.run()),s._value}set value(s){this._setter(s)}}function Ag(r,s,l=!1){let u,c;const d=Ke(r);return d?(u=r,c=gr):(u=r.get,c=r.set),new _g(u,c,d||!c,l)}Promise.resolve();function ln(r,s,l,u){let c;try{c=u?r(...u):r()}catch(d){xs(d,s,l)}return c}function vr(r,s,l,u){if(Ke(r)){const d=ln(r,s,l,u);return d&&xc(d)&&d.catch(m=>{xs(m,s,l)}),d}const c=[];for(let d=0;d<r.length;d++)c.push(vr(r[d],s,l,u));return c}function xs(r,s,l,u=!0){const c=s?s.vnode:null;if(s){let d=s.parent;const m=s.proxy,b=l;for(;d;){const x=d.ec;if(x){for(let S=0;S<x.length;S++)if(x[S](r,m,b)===!1)return}d=d.parent}const y=s.appContext.config.errorHandler;if(y){ln(y,null,10,[r,m,b]);return}}Ng(r,l,c,u)}function Ng(r,s,l,u=!0){console.error(r)}let ss=!1,Al=!1;const tr=[];let Fr=0;const to=[];let Vi=null,ti=0;const ro=[];let rn=null,ri=0;const Uc=Promise.resolve();let sa=null,Nl=null;function la(r){const s=sa||Uc;return r?s.then(this?r.bind(this):r):s}function zg(r){let s=Fr+1,l=tr.length;for(;s<l;){const u=s+l>>>1;uo(tr[u])<r?s=u+1:l=u}return s}function Kc(r){(!tr.length||!tr.includes(r,ss&&r.allowRecurse?Fr+1:Fr))&&r!==Nl&&(r.id==null?tr.push(r):tr.splice(zg(r.id),0,r),jc())}function jc(){!ss&&!Al&&(Al=!0,sa=Uc.then(Yc))}function Dg(r){const s=tr.indexOf(r);s>Fr&&tr.splice(s,1)}function qc(r,s,l,u){Be(r)?l.push(...r):(!s||!s.includes(r,r.allowRecurse?u+1:u))&&l.push(r),jc()}function Rg(r){qc(r,Vi,to,ti)}function Fg(r){qc(r,rn,ro,ri)}function aa(r,s=null){if(to.length){for(Nl=s,Vi=[...new Set(to)],to.length=0,ti=0;ti<Vi.length;ti++)Vi[ti]();Vi=null,ti=0,Nl=null,aa(r,s)}}function Gc(r){if(ro.length){const s=[...new Set(ro)];if(ro.length=0,rn){rn.push(...s);return}for(rn=s,rn.sort((l,u)=>uo(l)-uo(u)),ri=0;ri<rn.length;ri++)rn[ri]();rn=null,ri=0}}const uo=r=>r.id==null?1/0:r.id;function Yc(r){Al=!1,ss=!0,aa(r),tr.sort((l,u)=>uo(l)-uo(u));const s=gr;try{for(Fr=0;Fr<tr.length;Fr++){const l=tr[Fr];l&&l.active!==!1&&ln(l,null,14)}}finally{Fr=0,tr.length=0,Gc(),ss=!1,sa=null,(tr.length||to.length||ro.length)&&Yc(r)}}function Ig(r,s,...l){const u=r.vnode.props||nt;let c=l;const d=s.startsWith("update:"),m=d&&s.slice(7);if(m&&m in u){const S=`${m==="modelValue"?"model":m}Modifiers`,{number:P,trim:O}=u[S]||nt;O?c=l.map(z=>z.trim()):P&&(c=l.map(Zp))}let b,y=u[b=yl(s)]||u[b=yl(Pr(s))];!y&&d&&(y=u[b=yl(ci(s))]),y&&vr(y,r,6,c);const x=u[b+"Once"];if(x){if(!r.emitted)r.emitted={};else if(r.emitted[b])return;r.emitted[b]=!0,vr(x,r,6,c)}}function Xc(r,s,l=!1){const u=s.emitsCache,c=u.get(r);if(c!==void 0)return c;const d=r.emits;let m={},b=!1;if(!Ke(r)){const y=x=>{const S=Xc(x,s,!0);S&&(b=!0,Ut(m,S))};!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):(Be(d)?d.forEach(y=>m[y]=null):Ut(m,d),u.set(r,m),m)}function ua(r,s){return!r||!vs(s)?!1:(s=s.slice(2).replace(/Once$/,""),Xe(r,s[0].toLowerCase()+s.slice(1))||Xe(r,ci(s))||Xe(r,s))}let sr=null,$c=null;function ls(r){const s=sr;return sr=r,$c=r&&r.type.__scopeId||null,s}function Hg(r,s=sr,l){if(!s||r._n)return r;const u=(...c)=>{u._d&&Rf(-1);const d=ls(s),m=r(...c);return ls(d),u._d&&Rf(1),m};return u._n=!0,u._c=!0,u._d=!0,u}function wl(r){const{type:s,vnode:l,proxy:u,withProxy:c,props:d,propsOptions:[m],slots:b,attrs:y,emit:x,render:S,renderCache:P,data:O,setupState:z,ctx:j,inheritAttrs:ne}=r;let ee,A;const I=ls(r);try{if(l.shapeFlag&4){const H=c||u;ee=Lr(S.call(H,H,P,d,z,O,j)),A=y}else{const H=s;ee=Lr(H.length>1?H(d,{attrs:y,slots:b,emit:x}):H(d,null)),A=s.props?y:Wg(y)}}catch(H){no.length=0,xs(H,r,1),ee=Xt(un)}let D=ee;if(A&&ne!==!1){const H=Object.keys(A),{shapeFlag:ce}=D;H.length&&ce&7&&(m&&H.some($l)&&(A=Bg(A,m)),D=fo(D,A))}return l.dirs&&(D.dirs=D.dirs?D.dirs.concat(l.dirs):l.dirs),l.transition&&(D.transition=l.transition),ee=D,ls(I),ee}const Wg=r=>{let s;for(const l in r)(l==="class"||l==="style"||vs(l))&&((s||(s={}))[l]=r[l]);return s},Bg=(r,s)=>{const l={};for(const u in r)(!$l(u)||!(u.slice(9)in s))&&(l[u]=r[u]);return l};function Ug(r,s,l){const{props:u,children:c,component:d}=r,{props:m,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?Mf(u,m,x):!!m;if(y&8){const S=s.dynamicProps;for(let P=0;P<S.length;P++){const O=S[P];if(m[O]!==u[O]&&!ua(x,O))return!0}}}else return(c||b)&&(!b||!b.$stable)?!0:u===m?!1:u?m?Mf(u,m,x):!0:!!m;return!1}function Mf(r,s,l){const u=Object.keys(s);if(u.length!==Object.keys(r).length)return!0;for(let c=0;c<u.length;c++){const d=u[c];if(s[d]!==r[d]&&!ua(l,d))return!0}return!1}function Kg({vnode:r,parent:s},l){for(;s&&s.subTree===r;)(r=s.vnode).el=l,s=s.parent}const jg=r=>r.__isSuspense;function qg(r,s){s&&s.pendingBranch?Be(r)?s.effects.push(...r):s.effects.push(r):Fg(r)}function rs(r,s){if(Lt){let l=Lt.provides;const u=Lt.parent&&Lt.parent.provides;u===l&&(l=Lt.provides=Object.create(u)),l[r]=s}}function Ir(r,s,l=!1){const u=Lt||sr;if(u){const c=u.parent==null?u.vnode.appContext&&u.vnode.appContext.provides:u.parent.provides;if(c&&r in c)return c[r];if(arguments.length>1)return l&&Ke(s)?s.call(u.proxy):s}}function Gg(r,s){return fa(r,null,s)}const Pf={};function $t(r,s,l){return fa(r,s,l)}function fa(r,s,{immediate:l,deep:u,flush:c,onTrack:d,onTrigger:m}=nt){const b=Lt;let y,x=!1,S=!1;if(gt(r)?(y=()=>r.value,x=Dc(r)):li(r)?(y=()=>r,u=!0):Be(r)?(S=!0,x=r.some(li),y=()=>r.map(A=>{if(gt(A))return A.value;if(li(A))return ii(A);if(Ke(A))return ln(A,b,2)})):Ke(r)?s?y=()=>ln(r,b,2):y=()=>{if(!(b&&b.isUnmounted))return P&&P(),vr(r,b,3,[O])}:y=gr,s&&u){const A=y;y=()=>ii(A())}let P,O=A=>{P=ee.onStop=()=>{ln(A,b,4)}};if(co)return O=gr,s?l&&vr(s,b,3,[y(),S?[]:void 0,O]):y(),gr;let z=S?[]:Pf;const j=()=>{if(!!ee.active)if(s){const A=ee.run();(u||x||(S?A.some((I,D)=>so(I,z[D])):so(A,z)))&&(P&&P(),vr(s,b,3,[A,z===Pf?void 0:z,O]),z=A)}else ee.run()};j.allowRecurse=!!s;let ne;c==="sync"?ne=j:c==="post"?ne=()=>Gt(j,b&&b.suspense):ne=()=>{!b||b.isMounted?Rg(j):j()};const ee=new ea(y,ne);return s?l?j():z=ee.run():c==="post"?Gt(ee.run.bind(ee),b&&b.suspense):ee.run(),()=>{ee.stop(),b&&b.scope&&Zl(b.scope.effects,ee)}}function Yg(r,s,l){const u=this.proxy,c=Mt(r)?r.includes(".")?Zc(u,r):()=>u[r]:r.bind(u,u);let d;Ke(s)?d=s:(d=s.handler,l=s);const m=Lt;ai(this);const b=fa(c,d.bind(u),l);return m?ai(m):On(),b}function Zc(r,s){const l=s.split(".");return()=>{let u=r;for(let c=0;c<l.length&&u;c++)u=u[l[c]];return u}}function ii(r,s){if(!St(r)||r.__v_skip||(s=s||new Set,s.has(r)))return r;if(s.add(r),gt(r))ii(r.value,s);else if(Be(r))for(let l=0;l<r.length;l++)ii(r[l],s);else if(wc(r)||si(r))r.forEach(l=>{ii(l,s)});else if(Sc(r))for(const l in r)ii(r[l],s);return r}function Jc(r){return Ke(r)?{setup:r,name:r.name}:r}const zl=r=>!!r.type.__asyncLoader,Qc=r=>r.type.__isKeepAlive;function Xg(r,s){Vc(r,"a",s)}function $g(r,s){Vc(r,"da",s)}function Vc(r,s,l=Lt){const u=r.__wdc||(r.__wdc=()=>{let c=l;for(;c;){if(c.isDeactivated)return;c=c.parent}return r()});if(ks(s,u,l),l){let c=l.parent;for(;c&&c.parent;)Qc(c.parent.vnode)&&Zg(u,s,l,c),c=c.parent}}function Zg(r,s,l,u){const c=ks(s,r,u,!0);th(()=>{Zl(u[s],c)},l)}function ks(r,s,l=Lt,u=!1){if(l){const c=l[r]||(l[r]=[]),d=s.__weh||(s.__weh=(...m)=>{if(l.isUnmounted)return;hi(),ai(l);const b=vr(s,l,r,m);return On(),di(),b});return u?c.unshift(d):c.push(d),d}}const Wr=r=>(s,l=Lt)=>(!co||r==="sp")&&ks(r,s,l),Jg=Wr("bm"),eh=Wr("m"),Qg=Wr("bu"),Vg=Wr("u"),ev=Wr("bum"),th=Wr("um"),tv=Wr("sp"),rv=Wr("rtg"),nv=Wr("rtc");function iv(r,s=Lt){ks("ec",r,s)}let Dl=!0;function ov(r){const s=nh(r),l=r.proxy,u=r.ctx;Dl=!1,s.beforeCreate&&Of(s.beforeCreate,r,"bc");const{data:c,computed:d,methods:m,watch:b,provide:y,inject:x,created:S,beforeMount:P,mounted:O,beforeUpdate:z,updated:j,activated:ne,deactivated:ee,beforeDestroy:A,beforeUnmount:I,destroyed:D,unmounted:H,render:ce,renderTracked:Se,renderTriggered:we,errorCaptured:He,serverPrefetch:ze,expose:me,inheritAttrs:de,components:Ae,directives:B,filters:G}=s;if(x&&sv(x,u,null,r.appContext.config.unwrapInjectedRef),m)for(const X in m){const ae=m[X];Ke(ae)&&(u[X]=ae.bind(l))}if(c){const X=c.call(l,l);St(X)&&(r.data=po(X))}if(Dl=!0,d)for(const X in d){const ae=d[X],Ne=Ke(ae)?ae.bind(l,l):Ke(ae.get)?ae.get.bind(l,l):gr,qe=!Ke(ae)&&Ke(ae.set)?ae.set.bind(l):gr,tt=zt({get:Ne,set:qe});Object.defineProperty(u,X,{enumerable:!0,configurable:!0,get:()=>tt.value,set:it=>tt.value=it})}if(b)for(const X in b)rh(b[X],u,l,X);if(y){const X=Ke(y)?y.call(l):y;Reflect.ownKeys(X).forEach(ae=>{rs(ae,X[ae])})}S&&Of(S,r,"c");function V(X,ae){Be(ae)?ae.forEach(Ne=>X(Ne.bind(l))):ae&&X(ae.bind(l))}if(V(Jg,P),V(eh,O),V(Qg,z),V(Vg,j),V(Xg,ne),V($g,ee),V(iv,He),V(nv,Se),V(rv,we),V(ev,I),V(th,H),V(tv,ze),Be(me))if(me.length){const X=r.exposed||(r.exposed={});me.forEach(ae=>{Object.defineProperty(X,ae,{get:()=>l[ae],set:Ne=>l[ae]=Ne})})}else r.exposed||(r.exposed={});ce&&r.render===gr&&(r.render=ce),de!=null&&(r.inheritAttrs=de),Ae&&(r.components=Ae),B&&(r.directives=B)}function sv(r,s,l=gr,u=!1){Be(r)&&(r=Rl(r));for(const c in r){const d=r[c];let m;St(d)?"default"in d?m=Ir(d.from||c,d.default,!0):m=Ir(d.from||c):m=Ir(d),gt(m)&&u?Object.defineProperty(s,c,{enumerable:!0,configurable:!0,get:()=>m.value,set:b=>m.value=b}):s[c]=m}}function Of(r,s,l){vr(Be(r)?r.map(u=>u.bind(s.proxy)):r.bind(s.proxy),s,l)}function rh(r,s,l,u){const c=u.includes(".")?Zc(l,u):()=>l[u];if(Mt(r)){const d=s[r];Ke(d)&&$t(c,d)}else if(Ke(r))$t(c,r.bind(l));else if(St(r))if(Be(r))r.forEach(d=>rh(d,s,l,u));else{const d=Ke(r.handler)?r.handler.bind(l):s[r.handler];Ke(d)&&$t(c,d,r)}}function nh(r){const s=r.type,{mixins:l,extends:u}=s,{mixins:c,optionsCache:d,config:{optionMergeStrategies:m}}=r.appContext,b=d.get(s);let y;return b?y=b:!c.length&&!l&&!u?y=s:(y={},c.length&&c.forEach(x=>as(y,x,m,!0)),as(y,s,m)),d.set(s,y),y}function as(r,s,l,u=!1){const{mixins:c,extends:d}=s;d&&as(r,d,l,!0),c&&c.forEach(m=>as(r,m,l,!0));for(const m in s)if(!(u&&m==="expose")){const b=lv[m]||l&&l[m];r[m]=b?b(r[m],s[m]):s[m]}return r}const lv={data:Ef,props:Tn,emits:Tn,methods:Tn,computed:Tn,beforeCreate:Bt,created:Bt,beforeMount:Bt,mounted:Bt,beforeUpdate:Bt,updated:Bt,beforeDestroy:Bt,beforeUnmount:Bt,destroyed:Bt,unmounted:Bt,activated:Bt,deactivated:Bt,errorCaptured:Bt,serverPrefetch:Bt,components:Tn,directives:Tn,watch:uv,provide:Ef,inject:av};function Ef(r,s){return s?r?function(){return Ut(Ke(r)?r.call(this,this):r,Ke(s)?s.call(this,this):s)}:s:r}function av(r,s){return Tn(Rl(r),Rl(s))}function Rl(r){if(Be(r)){const s={};for(let l=0;l<r.length;l++)s[r[l]]=r[l];return s}return r}function Bt(r,s){return r?[...new Set([].concat(r,s))]:s}function Tn(r,s){return r?Ut(Ut(Object.create(null),r),s):s}function uv(r,s){if(!r)return s;if(!s)return r;const l=Ut(Object.create(null),r);for(const u in s)l[u]=Bt(r[u],s[u]);return l}function fv(r,s,l,u=!1){const c={},d={};os(d,Ss,1),r.propsDefaults=Object.create(null),ih(r,s,c,d);for(const m in r.propsOptions[0])m in c||(c[m]=void 0);l?r.props=u?c:Mg(c):r.type.props?r.props=c:r.props=d,r.attrs=d}function cv(r,s,l,u){const{props:c,attrs:d,vnode:{patchFlag:m}}=r,b=Je(c),[y]=r.propsOptions;let x=!1;if((u||m>0)&&!(m&16)){if(m&8){const S=r.vnode.dynamicProps;for(let P=0;P<S.length;P++){let O=S[P];const z=s[O];if(y)if(Xe(d,O))z!==d[O]&&(d[O]=z,x=!0);else{const j=Pr(O);c[j]=Fl(y,b,j,z,r,!1)}else z!==d[O]&&(d[O]=z,x=!0)}}}else{ih(r,s,c,d)&&(x=!0);let S;for(const P in b)(!s||!Xe(s,P)&&((S=ci(P))===P||!Xe(s,S)))&&(y?l&&(l[P]!==void 0||l[S]!==void 0)&&(c[P]=Fl(y,b,P,void 0,r,!0)):delete c[P]);if(d!==b)for(const P in d)(!s||!Xe(s,P)&&!0)&&(delete d[P],x=!0)}x&&Hr(r,"set","$attrs")}function ih(r,s,l,u){const[c,d]=r.propsOptions;let m=!1,b;if(s)for(let y in s){if(ts(y))continue;const x=s[y];let S;c&&Xe(c,S=Pr(y))?!d||!d.includes(S)?l[S]=x:(b||(b={}))[S]=x:ua(r.emitsOptions,y)||(!(y in u)||x!==u[y])&&(u[y]=x,m=!0)}if(d){const y=Je(l),x=b||nt;for(let S=0;S<d.length;S++){const P=d[S];l[P]=Fl(c,y,P,x[P],r,!Xe(x,P))}}return m}function Fl(r,s,l,u,c,d){const m=r[l];if(m!=null){const b=Xe(m,"default");if(b&&u===void 0){const y=m.default;if(m.type!==Function&&Ke(y)){const{propsDefaults:x}=c;l in x?u=x[l]:(ai(c),u=x[l]=y.call(null,s),On())}else u=y}m[0]&&(d&&!b?u=!1:m[1]&&(u===""||u===ci(l))&&(u=!0))}return u}function oh(r,s,l=!1){const u=s.propsCache,c=u.get(r);if(c)return c;const d=r.props,m={},b=[];let y=!1;if(!Ke(r)){const S=P=>{y=!0;const[O,z]=oh(P,s,!0);Ut(m,O),z&&b.push(...z)};!l&&s.mixins.length&&s.mixins.forEach(S),r.extends&&S(r.extends),r.mixins&&r.mixins.forEach(S)}if(!d&&!y)return u.set(r,oi),oi;if(Be(d))for(let S=0;S<d.length;S++){const P=Pr(d[S]);_f(P)&&(m[P]=nt)}else if(d)for(const S in d){const P=Pr(S);if(_f(P)){const O=d[S],z=m[P]=Be(O)||Ke(O)?{type:O}:O;if(z){const j=zf(Boolean,z.type),ne=zf(String,z.type);z[0]=j>-1,z[1]=ne<0||j<ne,(j>-1||Xe(z,"default"))&&b.push(P)}}}const x=[m,b];return u.set(r,x),x}function _f(r){return r[0]!=="$"}function Af(r){const s=r&&r.toString().match(/^\s*function (\w+)/);return s?s[1]:r===null?"null":""}function Nf(r,s){return Af(r)===Af(s)}function zf(r,s){return Be(s)?s.findIndex(l=>Nf(l,r)):Ke(s)&&Nf(s,r)?0:-1}const sh=r=>r[0]==="_"||r==="$stable",ca=r=>Be(r)?r.map(Lr):[Lr(r)],hv=(r,s,l)=>{const u=Hg((...c)=>ca(s(...c)),l);return u._c=!1,u},lh=(r,s,l)=>{const u=r._ctx;for(const c in r){if(sh(c))continue;const d=r[c];if(Ke(d))s[c]=hv(c,d,u);else if(d!=null){const m=ca(d);s[c]=()=>m}}},ah=(r,s)=>{const l=ca(s);r.slots.default=()=>l},dv=(r,s)=>{if(r.vnode.shapeFlag&32){const l=s._;l?(r.slots=Je(s),os(s,"_",l)):lh(s,r.slots={})}else r.slots={},s&&ah(r,s);os(r.slots,Ss,1)},pv=(r,s,l)=>{const{vnode:u,slots:c}=r;let d=!0,m=nt;if(u.shapeFlag&32){const b=s._;b?l&&b===1?d=!1:(Ut(c,s),!l&&b===1&&delete c._):(d=!s.$stable,lh(s,c)),m=s}else s&&(ah(r,s),m={default:1});if(d)for(const b in c)!sh(b)&&!(b in m)&&delete c[b]};function Sn(r,s,l,u){const c=r.dirs,d=s&&s.dirs;for(let m=0;m<c.length;m++){const b=c[m];d&&(b.oldValue=d[m].value);let y=b.dir[u];y&&(hi(),vr(y,l,8,[r.el,b,r,s]),di())}}function uh(){return{app:null,config:{isNativeTag:jp,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 gv=0;function vv(r,s){return function(u,c=null){c!=null&&!St(c)&&(c=null);const d=uh(),m=new Set;let b=!1;const y=d.app={_uid:gv++,_component:u,_props:c,_container:null,_context:d,_instance:null,version:Wv,get config(){return d.config},set config(x){},use(x,...S){return m.has(x)||(x&&Ke(x.install)?(m.add(x),x.install(y,...S)):Ke(x)&&(m.add(x),x(y,...S))),y},mixin(x){return d.mixins.includes(x)||d.mixins.push(x),y},component(x,S){return S?(d.components[x]=S,y):d.components[x]},directive(x,S){return S?(d.directives[x]=S,y):d.directives[x]},mount(x,S,P){if(!b){const O=Xt(u,c);return O.appContext=d,S&&s?s(O,x):r(O,x,P),b=!0,y._container=x,x.__vue_app__=y,ga(O.component)||O.component.proxy}},unmount(){b&&(r(null,y._container),delete y._container.__vue_app__)},provide(x,S){return d.provides[x]=S,y}};return y}}function Il(r,s,l,u,c=!1){if(Be(r)){r.forEach((O,z)=>Il(O,s&&(Be(s)?s[z]:s),l,u,c));return}if(zl(u)&&!c)return;const d=u.shapeFlag&4?ga(u.component)||u.component.proxy:u.el,m=c?null:d,{i:b,r:y}=r,x=s&&s.r,S=b.refs===nt?b.refs={}:b.refs,P=b.setupState;if(x!=null&&x!==y&&(Mt(x)?(S[x]=null,Xe(P,x)&&(P[x]=null)):gt(x)&&(x.value=null)),Ke(y))ln(y,b,12,[m,S]);else{const O=Mt(y),z=gt(y);if(O||z){const j=()=>{if(r.f){const ne=O?S[y]:y.value;c?Be(ne)&&Zl(ne,d):Be(ne)?ne.includes(d)||ne.push(d):O?S[y]=[d]:(y.value=[d],r.k&&(S[r.k]=y.value))}else O?(S[y]=m,Xe(P,y)&&(P[y]=m)):gt(y)&&(y.value=m,r.k&&(S[r.k]=m))};m?(j.id=-1,Gt(j,l)):j()}}}const Gt=qg;function mv(r){return yv(r)}function yv(r,s){const l=Jp();l.__VUE__=!0;const{insert:u,remove:c,patchProp:d,createElement:m,createText:b,createComment:y,setText:x,setElementText:S,parentNode:P,nextSibling:O,setScopeId:z=gr,cloneNode:j,insertStaticContent:ne}=r,ee=(T,_,F,Y=null,J=null,re=null,ue=!1,fe=null,te=!!_.dynamicChildren)=>{if(T===_)return;T&&!Zi(T,_)&&(Y=oe(T),Re(T,J,re,!0),T=null),_.patchFlag===-2&&(te=!1,_.dynamicChildren=null);const{type:L,ref:W,shapeFlag:N}=_;switch(L){case ha:A(T,_,F,Y);break;case un:I(T,_,F,Y);break;case xl:T==null&&D(_,F,Y,ue);break;case pr:B(T,_,F,Y,J,re,ue,fe,te);break;default:N&1?Se(T,_,F,Y,J,re,ue,fe,te):N&6?G(T,_,F,Y,J,re,ue,fe,te):(N&64||N&128)&&L.process(T,_,F,Y,J,re,ue,fe,te,ke)}W!=null&&J&&Il(W,T&&T.ref,re,_||T,!_)},A=(T,_,F,Y)=>{if(T==null)u(_.el=b(_.children),F,Y);else{const J=_.el=T.el;_.children!==T.children&&x(J,_.children)}},I=(T,_,F,Y)=>{T==null?u(_.el=y(_.children||""),F,Y):_.el=T.el},D=(T,_,F,Y)=>{[T.el,T.anchor]=ne(T.children,_,F,Y,T.el,T.anchor)},H=({el:T,anchor:_},F,Y)=>{let J;for(;T&&T!==_;)J=O(T),u(T,F,Y),T=J;u(_,F,Y)},ce=({el:T,anchor:_})=>{let F;for(;T&&T!==_;)F=O(T),c(T),T=F;c(_)},Se=(T,_,F,Y,J,re,ue,fe,te)=>{ue=ue||_.type==="svg",T==null?we(_,F,Y,J,re,ue,fe,te):me(T,_,J,re,ue,fe,te)},we=(T,_,F,Y,J,re,ue,fe)=>{let te,L;const{type:W,props:N,shapeFlag:he,transition:Me,patchFlag:Ie,dirs:Ve}=T;if(T.el&&j!==void 0&&Ie===-1)te=T.el=j(T.el);else{if(te=T.el=m(T.type,re,N&&N.is,N),he&8?S(te,T.children):he&16&&ze(T.children,te,null,Y,J,re&&W!=="foreignObject",ue,fe),Ve&&Sn(T,null,Y,"created"),N){for(const Fe in N)Fe!=="value"&&!ts(Fe)&&d(te,Fe,null,N[Fe],re,T.children,Y,J,K);"value"in N&&d(te,"value",null,N.value),(L=N.onVnodeBeforeMount)&&Tr(L,Y,T)}He(te,T,T.scopeId,ue,Y)}Ve&&Sn(T,null,Y,"beforeMount");const Ue=(!J||J&&!J.pendingBranch)&&Me&&!Me.persisted;Ue&&Me.beforeEnter(te),u(te,_,F),((L=N&&N.onVnodeMounted)||Ue||Ve)&&Gt(()=>{L&&Tr(L,Y,T),Ue&&Me.enter(te),Ve&&Sn(T,null,Y,"mounted")},J)},He=(T,_,F,Y,J)=>{if(F&&z(T,F),Y)for(let re=0;re<Y.length;re++)z(T,Y[re]);if(J){let re=J.subTree;if(_===re){const ue=J.vnode;He(T,ue,ue.scopeId,ue.slotScopeIds,J.parent)}}},ze=(T,_,F,Y,J,re,ue,fe,te=0)=>{for(let L=te;L<T.length;L++){const W=T[L]=fe?nn(T[L]):Lr(T[L]);ee(null,W,_,F,Y,J,re,ue,fe)}},me=(T,_,F,Y,J,re,ue)=>{const fe=_.el=T.el;let{patchFlag:te,dynamicChildren:L,dirs:W}=_;te|=T.patchFlag&16;const N=T.props||nt,he=_.props||nt;let Me;F&&Cn(F,!1),(Me=he.onVnodeBeforeUpdate)&&Tr(Me,F,_,T),W&&Sn(_,T,F,"beforeUpdate"),F&&Cn(F,!0);const Ie=J&&_.type!=="foreignObject";if(L?de(T.dynamicChildren,L,fe,F,Y,Ie,re):ue||Ne(T,_,fe,null,F,Y,Ie,re,!1),te>0){if(te&16)Ae(fe,_,N,he,F,Y,J);else if(te&2&&N.class!==he.class&&d(fe,"class",null,he.class,J),te&4&&d(fe,"style",N.style,he.style,J),te&8){const Ve=_.dynamicProps;for(let Ue=0;Ue<Ve.length;Ue++){const Fe=Ve[Ue],mt=N[Fe],ht=he[Fe];(ht!==mt||Fe==="value")&&d(fe,Fe,mt,ht,J,T.children,F,Y,K)}}te&1&&T.children!==_.children&&S(fe,_.children)}else!ue&&L==null&&Ae(fe,_,N,he,F,Y,J);((Me=he.onVnodeUpdated)||W)&&Gt(()=>{Me&&Tr(Me,F,_,T),W&&Sn(_,T,F,"updated")},Y)},de=(T,_,F,Y,J,re,ue)=>{for(let fe=0;fe<_.length;fe++){const te=T[fe],L=_[fe],W=te.el&&(te.type===pr||!Zi(te,L)||te.shapeFlag&70)?P(te.el):F;ee(te,L,W,null,Y,J,re,ue,!0)}},Ae=(T,_,F,Y,J,re,ue)=>{if(F!==Y){for(const fe in Y){if(ts(fe))continue;const te=Y[fe],L=F[fe];te!==L&&fe!=="value"&&d(T,fe,L,te,ue,_.children,J,re,K)}if(F!==nt)for(const fe in F)!ts(fe)&&!(fe in Y)&&d(T,fe,F[fe],null,ue,_.children,J,re,K);"value"in Y&&d(T,"value",F.value,Y.value)}},B=(T,_,F,Y,J,re,ue,fe,te)=>{const L=_.el=T?T.el:b(""),W=_.anchor=T?T.anchor:b("");let{patchFlag:N,dynamicChildren:he,slotScopeIds:Me}=_;Me&&(fe=fe?fe.concat(Me):Me),T==null?(u(L,F,Y),u(W,F,Y),ze(_.children,F,W,J,re,ue,fe,te)):N>0&&N&64&&he&&T.dynamicChildren?(de(T.dynamicChildren,he,F,J,re,ue,fe),(_.key!=null||J&&_===J.subTree)&&fh(T,_,!0)):Ne(T,_,F,W,J,re,ue,fe,te)},G=(T,_,F,Y,J,re,ue,fe,te)=>{_.slotScopeIds=fe,T==null?_.shapeFlag&512?J.ctx.activate(_,F,Y,ue,te):w(_,F,Y,J,re,ue,te):V(T,_,te)},w=(T,_,F,Y,J,re,ue)=>{const fe=T.component=Nv(T,Y,J);if(Qc(T)&&(fe.ctx.renderer=ke),zv(fe),fe.asyncDep){if(J&&J.registerDep(fe,X),!T.el){const te=fe.subTree=Xt(un);I(null,te,_,F)}return}X(fe,T,_,F,J,re,ue)},V=(T,_,F)=>{const Y=_.component=T.component;if(Ug(T,_,F))if(Y.asyncDep&&!Y.asyncResolved){ae(Y,_,F);return}else Y.next=_,Dg(Y.update),Y.update();else _.component=T.component,_.el=T.el,Y.vnode=_},X=(T,_,F,Y,J,re,ue)=>{const fe=()=>{if(T.isMounted){let{next:W,bu:N,u:he,parent:Me,vnode:Ie}=T,Ve=W,Ue;Cn(T,!1),W?(W.el=Ie.el,ae(T,W,ue)):W=Ie,N&&bl(N),(Ue=W.props&&W.props.onVnodeBeforeUpdate)&&Tr(Ue,Me,W,Ie),Cn(T,!0);const Fe=wl(T),mt=T.subTree;T.subTree=Fe,ee(mt,Fe,P(mt.el),oe(mt),T,J,re),W.el=Fe.el,Ve===null&&Kg(T,Fe.el),he&&Gt(he,J),(Ue=W.props&&W.props.onVnodeUpdated)&&Gt(()=>Tr(Ue,Me,W,Ie),J)}else{let W;const{el:N,props:he}=_,{bm:Me,m:Ie,parent:Ve}=T,Ue=zl(_);if(Cn(T,!1),Me&&bl(Me),!Ue&&(W=he&&he.onVnodeBeforeMount)&&Tr(W,Ve,_),Cn(T,!0),N&&Le){const Fe=()=>{T.subTree=wl(T),Le(N,T.subTree,T,J,null)};Ue?_.type.__asyncLoader().then(()=>!T.isUnmounted&&Fe()):Fe()}else{const Fe=T.subTree=wl(T);ee(null,Fe,F,Y,T,J,re),_.el=Fe.el}if(Ie&&Gt(Ie,J),!Ue&&(W=he&&he.onVnodeMounted)){const Fe=_;Gt(()=>Tr(W,Ve,Fe),J)}_.shapeFlag&256&&T.a&&Gt(T.a,J),T.isMounted=!0,_=F=Y=null}},te=T.effect=new ea(fe,()=>Kc(T.update),T.scope),L=T.update=te.run.bind(te);L.id=T.uid,Cn(T,!0),L()},ae=(T,_,F)=>{_.component=T;const Y=T.vnode.props;T.vnode=_,T.next=null,cv(T,_.props,Y,F),pv(T,_.children,F),hi(),aa(void 0,T.update),di()},Ne=(T,_,F,Y,J,re,ue,fe,te=!1)=>{const L=T&&T.children,W=T?T.shapeFlag:0,N=_.children,{patchFlag:he,shapeFlag:Me}=_;if(he>0){if(he&128){tt(L,N,F,Y,J,re,ue,fe,te);return}else if(he&256){qe(L,N,F,Y,J,re,ue,fe,te);return}}Me&8?(W&16&&K(L,J,re),N!==L&&S(F,N)):W&16?Me&16?tt(L,N,F,Y,J,re,ue,fe,te):K(L,J,re,!0):(W&8&&S(F,""),Me&16&&ze(N,F,Y,J,re,ue,fe,te))},qe=(T,_,F,Y,J,re,ue,fe,te)=>{T=T||oi,_=_||oi;const L=T.length,W=_.length,N=Math.min(L,W);let he;for(he=0;he<N;he++){const Me=_[he]=te?nn(_[he]):Lr(_[he]);ee(T[he],Me,F,null,J,re,ue,fe,te)}L>W?K(T,J,re,!0,!1,N):ze(_,F,Y,J,re,ue,fe,te,N)},tt=(T,_,F,Y,J,re,ue,fe,te)=>{let L=0;const W=_.length;let N=T.length-1,he=W-1;for(;L<=N&&L<=he;){const Me=T[L],Ie=_[L]=te?nn(_[L]):Lr(_[L]);if(Zi(Me,Ie))ee(Me,Ie,F,null,J,re,ue,fe,te);else break;L++}for(;L<=N&&L<=he;){const Me=T[N],Ie=_[he]=te?nn(_[he]):Lr(_[he]);if(Zi(Me,Ie))ee(Me,Ie,F,null,J,re,ue,fe,te);else break;N--,he--}if(L>N){if(L<=he){const Me=he+1,Ie=Me<W?_[Me].el:Y;for(;L<=he;)ee(null,_[L]=te?nn(_[L]):Lr(_[L]),F,Ie,J,re,ue,fe,te),L++}}else if(L>he)for(;L<=N;)Re(T[L],J,re,!0),L++;else{const Me=L,Ie=L,Ve=new Map;for(L=Ie;L<=he;L++){const Qe=_[L]=te?nn(_[L]):Lr(_[L]);Qe.key!=null&&Ve.set(Qe.key,L)}let Ue,Fe=0;const mt=he-Ie+1;let ht=!1,nr=0;const Pe=new Array(mt);for(L=0;L<mt;L++)Pe[L]=0;for(L=Me;L<=N;L++){const Qe=T[L];if(Fe>=mt){Re(Qe,J,re,!0);continue}let Oe;if(Qe.key!=null)Oe=Ve.get(Qe.key);else for(Ue=Ie;Ue<=he;Ue++)if(Pe[Ue-Ie]===0&&Zi(Qe,_[Ue])){Oe=Ue;break}Oe===void 0?Re(Qe,J,re,!0):(Pe[Oe-Ie]=L+1,Oe>=nr?nr=Oe:ht=!0,ee(Qe,_[Oe],F,null,J,re,ue,fe,te),Fe++)}const Or=ht?bv(Pe):oi;for(Ue=Or.length-1,L=mt-1;L>=0;L--){const Qe=Ie+L,Oe=_[Qe],st=Qe+1<W?_[Qe+1].el:Y;Pe[L]===0?ee(null,Oe,F,st,J,re,ue,fe,te):ht&&(Ue<0||L!==Or[Ue]?it(Oe,F,st,2):Ue--)}}},it=(T,_,F,Y,J=null)=>{const{el:re,type:ue,transition:fe,children:te,shapeFlag:L}=T;if(L&6){it(T.component.subTree,_,F,Y);return}if(L&128){T.suspense.move(_,F,Y);return}if(L&64){ue.move(T,_,F,ke);return}if(ue===pr){u(re,_,F);for(let N=0;N<te.length;N++)it(te[N],_,F,Y);u(T.anchor,_,F);return}if(ue===xl){H(T,_,F);return}if(Y!==2&&L&1&&fe)if(Y===0)fe.beforeEnter(re),u(re,_,F),Gt(()=>fe.enter(re),J);else{const{leave:N,delayLeave:he,afterLeave:Me}=fe,Ie=()=>u(re,_,F),Ve=()=>{N(re,()=>{Ie(),Me&&Me()})};he?he(re,Ie,Ve):Ve()}else u(re,_,F)},Re=(T,_,F,Y=!1,J=!1)=>{const{type:re,props:ue,ref:fe,children:te,dynamicChildren:L,shapeFlag:W,patchFlag:N,dirs:he}=T;if(fe!=null&&Il(fe,null,F,T,!0),W&256){_.ctx.deactivate(T);return}const Me=W&1&&he,Ie=!zl(T);let Ve;if(Ie&&(Ve=ue&&ue.onVnodeBeforeUnmount)&&Tr(Ve,_,T),W&6)Z(T.component,F,Y);else{if(W&128){T.suspense.unmount(F,Y);return}Me&&Sn(T,null,_,"beforeUnmount"),W&64?T.type.remove(T,_,F,J,ke,Y):L&&(re!==pr||N>0&&N&64)?K(L,_,F,!1,!0):(re===pr&&N&384||!J&&W&16)&&K(te,_,F),Y&&$e(T)}(Ie&&(Ve=ue&&ue.onVnodeUnmounted)||Me)&&Gt(()=>{Ve&&Tr(Ve,_,T),Me&&Sn(T,null,_,"unmounted")},F)},$e=T=>{const{type:_,el:F,anchor:Y,transition:J}=T;if(_===pr){q(F,Y);return}if(_===xl){ce(T);return}const re=()=>{c(F),J&&!J.persisted&&J.afterLeave&&J.afterLeave()};if(T.shapeFlag&1&&J&&!J.persisted){const{leave:ue,delayLeave:fe}=J,te=()=>ue(F,re);fe?fe(T.el,re,te):te()}else re()},q=(T,_)=>{let F;for(;T!==_;)F=O(T),c(T),T=F;c(_)},Z=(T,_,F)=>{const{bum:Y,scope:J,update:re,subTree:ue,um:fe}=T;Y&&bl(Y),J.stop(),re&&(re.active=!1,Re(ue,T,_,F)),fe&&Gt(fe,_),Gt(()=>{T.isUnmounted=!0},_),_&&_.pendingBranch&&!_.isUnmounted&&T.asyncDep&&!T.asyncResolved&&T.suspenseId===_.pendingId&&(_.deps--,_.deps===0&&_.resolve())},K=(T,_,F,Y=!1,J=!1,re=0)=>{for(let ue=re;ue<T.length;ue++)Re(T[ue],_,F,Y,J)},oe=T=>T.shapeFlag&6?oe(T.component.subTree):T.shapeFlag&128?T.suspense.next():O(T.anchor||T.el),Ce=(T,_,F)=>{T==null?_._vnode&&Re(_._vnode,null,null,!0):ee(_._vnode||null,T,_,null,null,null,F),Gc(),_._vnode=T},ke={p:ee,um:Re,m:it,r:$e,mt:w,mc:ze,pc:Ne,pbc:de,n:oe,o:r};let pe,Le;return s&&([pe,Le]=s(ke)),{render:Ce,hydrate:pe,createApp:vv(Ce,pe)}}function Cn({effect:r,update:s},l){r.allowRecurse=s.allowRecurse=l}function fh(r,s,l=!1){const u=r.children,c=s.children;if(Be(u)&&Be(c))for(let d=0;d<u.length;d++){const m=u[d];let b=c[d];b.shapeFlag&1&&!b.dynamicChildren&&((b.patchFlag<=0||b.patchFlag===32)&&(b=c[d]=nn(c[d]),b.el=m.el),l||fh(m,b))}}function bv(r){const s=r.slice(),l=[0];let u,c,d,m,b;const y=r.length;for(u=0;u<y;u++){const x=r[u];if(x!==0){if(c=l[l.length-1],r[c]<x){s[u]=c,l.push(u);continue}for(d=0,m=l.length-1;d<m;)b=d+m>>1,r[l[b]]<x?d=b+1:m=b;x<r[l[d]]&&(d>0&&(s[u]=l[d-1]),l[d]=u)}}for(d=l.length,m=l[d-1];d-- >0;)l[d]=m,m=s[m];return l}const wv=r=>r.__isTeleport,ch="components";function u0(r,s){return kv(ch,r,!0,s)||r}const xv=Symbol();function kv(r,s,l=!0,u=!1){const c=sr||Lt;if(c){const d=c.type;if(r===ch){const b=Iv(d);if(b&&(b===s||b===Pr(s)||b===bs(Pr(s))))return d}const m=Df(c[r]||d[r],s)||Df(c.appContext[r],s);return!m&&u?d:m}}function Df(r,s){return r&&(r[s]||r[Pr(s)]||r[bs(Pr(s))])}const pr=Symbol(void 0),ha=Symbol(void 0),un=Symbol(void 0),xl=Symbol(void 0),no=[];let Pn=null;function da(r=!1){no.push(Pn=r?null:[])}function Sv(){no.pop(),Pn=no[no.length-1]||null}let us=1;function Rf(r){us+=r}function hh(r){return r.dynamicChildren=us>0?Pn||oi:null,Sv(),us>0&&Pn&&Pn.push(r),r}function Cv(r,s,l,u,c,d){return hh(gh(r,s,l,u,c,d,!0))}function dh(r,s,l,u,c){return hh(Xt(r,s,l,u,c,!0))}function fs(r){return r?r.__v_isVNode===!0:!1}function Zi(r,s){return r.type===s.type&&r.key===s.key}const Ss="__vInternal",ph=({key:r})=>r!=null?r:null,ns=({ref:r,ref_key:s,ref_for:l})=>r!=null?Mt(r)||gt(r)||Ke(r)?{i:sr,r,k:s,f:!!l}:r:null;function gh(r,s=null,l=null,u=0,c=null,d=r===pr?0:1,m=!1,b=!1){const y={__v_isVNode:!0,__v_skip:!0,type:r,props:s,key:s&&ph(s),ref:s&&ns(s),scopeId:$c,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:c,dynamicChildren:null,appContext:null};return b?(pa(y,l),d&128&&r.normalize(y)):l&&(y.shapeFlag|=Mt(l)?8:16),us>0&&!m&&Pn&&(y.patchFlag>0||d&6)&&y.patchFlag!==32&&Pn.push(y),y}const Xt=Tv;function Tv(r,s=null,l=null,u=0,c=null,d=!1){if((!r||r===xv)&&(r=un),fs(r)){const b=fo(r,s,!0);return l&&pa(b,l),b}if(Hv(r)&&(r=r.__vccOpts),s){s=Lv(s);let{class:b,style:y}=s;b&&!Mt(b)&&(s.class=Xl(b)),St(y)&&(Rc(y)&&!Be(y)&&(y=Ut({},y)),s.style=gs(y))}const m=Mt(r)?1:jg(r)?128:wv(r)?64:St(r)?4:Ke(r)?2:0;return gh(r,s,l,u,c,m,d,!0)}function Lv(r){return r?Rc(r)||Ss in r?Ut({},r):r:null}function fo(r,s,l=!1){const{props:u,ref:c,patchFlag:d,children:m}=r,b=s?Pv(u||{},s):u;return{__v_isVNode:!0,__v_skip:!0,type:r.type,props:b,key:b&&ph(b),ref:s&&s.ref?l&&c?Be(c)?c.concat(ns(s)):[c,ns(s)]:ns(s):c,scopeId:r.scopeId,slotScopeIds:r.slotScopeIds,children:m,target:r.target,targetAnchor:r.targetAnchor,staticCount:r.staticCount,shapeFlag:r.shapeFlag,patchFlag:s&&r.type!==pr?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&&fo(r.ssContent),ssFallback:r.ssFallback&&fo(r.ssFallback),el:r.el,anchor:r.anchor}}function Mv(r=" ",s=0){return Xt(ha,null,r,s)}function f0(r="",s=!1){return s?(da(),dh(un,null,r)):Xt(un,null,r)}function Lr(r){return r==null||typeof r=="boolean"?Xt(un):Be(r)?Xt(pr,null,r.slice()):typeof r=="object"?nn(r):Xt(ha,null,String(r))}function nn(r){return r.el===null||r.memo?r:fo(r)}function pa(r,s){let l=0;const{shapeFlag:u}=r;if(s==null)s=null;else if(Be(s))l=16;else if(typeof s=="object")if(u&65){const c=s.default;c&&(c._c&&(c._d=!1),pa(r,c()),c._c&&(c._d=!0));return}else{l=32;const c=s._;!c&&!(Ss in s)?s._ctx=sr:c===3&&sr&&(sr.slots._===1?s._=1:(s._=2,r.patchFlag|=1024))}else Ke(s)?(s={default:s,_ctx:sr},l=32):(s=String(s),u&64?(l=16,s=[Mv(s)]):l=8);r.children=s,r.shapeFlag|=l}function Pv(...r){const s={};for(let l=0;l<r.length;l++){const u=r[l];for(const c in u)if(c==="class")s.class!==u.class&&(s.class=Xl([s.class,u.class]));else if(c==="style")s.style=gs([s.style,u.style]);else if(vs(c)){const d=s[c],m=u[c];m&&d!==m&&!(Be(d)&&d.includes(m))&&(s[c]=d?[].concat(d,m):m)}else c!==""&&(s[c]=u[c])}return s}function Tr(r,s,l,u=null){vr(r,s,7,[l,u])}function c0(r,s,l,u){let c;const d=l&&l[u];if(Be(r)||Mt(r)){c=new Array(r.length);for(let m=0,b=r.length;m<b;m++)c[m]=s(r[m],m,void 0,d&&d[m])}else if(typeof r=="number"){c=new Array(r);for(let m=0;m<r;m++)c[m]=s(m+1,m,void 0,d&&d[m])}else if(St(r))if(r[Symbol.iterator])c=Array.from(r,(m,b)=>s(m,b,void 0,d&&d[b]));else{const m=Object.keys(r);c=new Array(m.length);for(let b=0,y=m.length;b<y;b++){const x=m[b];c[b]=s(r[x],x,b,d&&d[b])}}else c=[];return l&&(l[u]=c),c}function Ov(r,s,l={},u,c){if(sr.isCE)return Xt("slot",s==="default"?null:{name:s},u&&u());let d=r[s];d&&d._c&&(d._d=!1),da();const m=d&&vh(d(l)),b=dh(pr,{key:l.key||`_${s}`},m||(u?u():[]),m&&r._===1?64:-2);return!c&&b.scopeId&&(b.slotScopeIds=[b.scopeId+"-s"]),d&&d._c&&(d._d=!0),b}function vh(r){return r.some(s=>fs(s)?!(s.type===un||s.type===pr&&!vh(s.children)):!0)?r:null}const Hl=r=>r?yh(r)?ga(r)||r.proxy:Hl(r.parent):null,cs=Ut(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=>Hl(r.parent),$root:r=>Hl(r.root),$emit:r=>r.emit,$options:r=>nh(r),$forceUpdate:r=>()=>Kc(r.update),$nextTick:r=>la.bind(r.proxy),$watch:r=>Yg.bind(r)}),Ev={get({_:r},s){const{ctx:l,setupState:u,data:c,props:d,accessCache:m,type:b,appContext:y}=r;let x;if(s[0]!=="$"){const z=m[s];if(z!==void 0)switch(z){case 1:return u[s];case 2:return c[s];case 4:return l[s];case 3:return d[s]}else{if(u!==nt&&Xe(u,s))return m[s]=1,u[s];if(c!==nt&&Xe(c,s))return m[s]=2,c[s];if((x=r.propsOptions[0])&&Xe(x,s))return m[s]=3,d[s];if(l!==nt&&Xe(l,s))return m[s]=4,l[s];Dl&&(m[s]=0)}}const S=cs[s];let P,O;if(S)return s==="$attrs"&&rr(r,"get",s),S(r);if((P=b.__cssModules)&&(P=P[s]))return P;if(l!==nt&&Xe(l,s))return m[s]=4,l[s];if(O=y.config.globalProperties,Xe(O,s))return O[s]},set({_:r},s,l){const{data:u,setupState:c,ctx:d}=r;return c!==nt&&Xe(c,s)?(c[s]=l,!0):u!==nt&&Xe(u,s)?(u[s]=l,!0):Xe(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:c,propsOptions:d}},m){let b;return!!l[m]||r!==nt&&Xe(r,m)||s!==nt&&Xe(s,m)||(b=d[0])&&Xe(b,m)||Xe(u,m)||Xe(cs,m)||Xe(c.config.globalProperties,m)},defineProperty(r,s,l){return l.get!=null?this.set(r,s,l.get(),null):l.value!=null&&this.set(r,s,l.value,null),Reflect.defineProperty(r,s,l)}},_v=uh();let Av=0;function Nv(r,s,l){const u=r.type,c=(s?s.appContext:r.appContext)||_v,d={uid:Av++,vnode:r,type:u,parent:s,appContext:c,root:null,next:null,subTree:null,effect:null,update:null,scope:new Qp(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:s?s.provides:Object.create(c.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:oh(u,c),emitsOptions:Xc(u,c),emit:null,emitted:null,propsDefaults:nt,inheritAttrs:u.inheritAttrs,ctx:nt,data:nt,props:nt,attrs:nt,slots:nt,refs:nt,setupState:nt,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=Ig.bind(null,d),r.ce&&r.ce(d),d}let Lt=null;const mh=()=>Lt||sr,ai=r=>{Lt=r,r.scope.on()},On=()=>{Lt&&Lt.scope.off(),Lt=null};function yh(r){return r.vnode.shapeFlag&4}let co=!1;function zv(r,s=!1){co=s;const{props:l,children:u}=r.vnode,c=yh(r);fv(r,l,c,s),dv(r,u);const d=c?Dv(r,s):void 0;return co=!1,d}function Dv(r,s){const l=r.type;r.accessCache=Object.create(null),r.proxy=Fc(new Proxy(r.ctx,Ev));const{setup:u}=l;if(u){const c=r.setupContext=u.length>1?Fv(r):null;ai(r),hi();const d=ln(u,r,0,[r.props,c]);if(di(),On(),xc(d)){if(d.then(On,On),s)return d.then(m=>{Ff(r,m,s)}).catch(m=>{xs(m,r,0)});r.asyncDep=d}else Ff(r,d,s)}else bh(r,s)}function Ff(r,s,l){Ke(s)?r.type.__ssrInlineRender?r.ssrRender=s:r.render=s:St(s)&&(r.setupState=Bc(s)),bh(r,l)}let If;function bh(r,s,l){const u=r.type;if(!r.render){if(!s&&If&&!u.render){const c=u.template;if(c){const{isCustomElement:d,compilerOptions:m}=r.appContext.config,{delimiters:b,compilerOptions:y}=u,x=Ut(Ut({isCustomElement:d,delimiters:b},m),y);u.render=If(c,x)}}r.render=u.render||gr}ai(r),hi(),ov(r),di(),On()}function Rv(r){return new Proxy(r.attrs,{get(s,l){return rr(r,"get","$attrs"),s[l]}})}function Fv(r){const s=u=>{r.exposed=u||{}};let l;return{get attrs(){return l||(l=Rv(r))},slots:r.slots,emit:r.emit,expose:s}}function ga(r){if(r.exposed)return r.exposeProxy||(r.exposeProxy=new Proxy(Bc(Fc(r.exposed)),{get(s,l){if(l in s)return s[l];if(l in cs)return cs[l](r)}}))}function Iv(r){return Ke(r)&&r.displayName||r.name}function Hv(r){return Ke(r)&&"__vccOpts"in r}const zt=(r,s)=>Ag(r,s,co);function va(r,s,l){const u=arguments.length;return u===2?St(s)&&!Be(s)?fs(s)?Xt(r,null,[s]):Xt(r,s):Xt(r,null,s):(u>3?l=Array.prototype.slice.call(arguments,2):u===3&&fs(l)&&(l=[l]),Xt(r,s,l))}const Wv="3.2.31",Bv="http://www.w3.org/2000/svg",Ln=typeof document!="undefined"?document:null,Hf=Ln&&Ln.createElement("template"),Uv={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 c=s?Ln.createElementNS(Bv,r):Ln.createElement(r,l?{is:l}:void 0);return r==="select"&&u&&u.multiple!=null&&c.setAttribute("multiple",u.multiple),c},createText:r=>Ln.createTextNode(r),createComment:r=>Ln.createComment(r),setText:(r,s)=>{r.nodeValue=s},setElementText:(r,s)=>{r.textContent=s},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>Ln.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,c,d){const m=l?l.previousSibling:s.lastChild;if(c&&(c===d||c.nextSibling))for(;s.insertBefore(c.cloneNode(!0),l),!(c===d||!(c=c.nextSibling)););else{Hf.innerHTML=u?`<svg>${r}</svg>`:r;const b=Hf.content;if(u){const y=b.firstChild;for(;y.firstChild;)b.appendChild(y.firstChild);b.removeChild(y)}s.insertBefore(b,l)}return[m?m.nextSibling:s.firstChild,l?l.previousSibling:s.lastChild]}};function Kv(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 jv(r,s,l){const u=r.style,c=Mt(l);if(l&&!c){for(const d in l)Wl(u,d,l[d]);if(s&&!Mt(s))for(const d in s)l[d]==null&&Wl(u,d,"")}else{const d=u.display;c?s!==l&&(u.cssText=l):s&&r.removeAttribute("style"),"_vod"in r&&(u.display=d)}}const Wf=/\s*!important$/;function Wl(r,s,l){if(Be(l))l.forEach(u=>Wl(r,s,u));else if(s.startsWith("--"))r.setProperty(s,l);else{const u=qv(r,s);Wf.test(l)?r.setProperty(ci(u),l.replace(Wf,""),"important"):r[u]=l}}const Bf=["Webkit","Moz","ms"],kl={};function qv(r,s){const l=kl[s];if(l)return l;let u=Pr(s);if(u!=="filter"&&u in r)return kl[s]=u;u=bs(u);for(let c=0;c<Bf.length;c++){const d=Bf[c]+u;if(d in r)return kl[s]=d}return s}const Uf="http://www.w3.org/1999/xlink";function Gv(r,s,l,u,c){if(u&&s.startsWith("xlink:"))l==null?r.removeAttributeNS(Uf,s.slice(6,s.length)):r.setAttributeNS(Uf,s,l);else{const d=Wp(s);l==null||d&&!yc(l)?r.removeAttribute(s):r.setAttribute(s,d?"":l)}}function Yv(r,s,l,u,c,d,m){if(s==="innerHTML"||s==="textContent"){u&&m(u,c,d),r[s]=l==null?"":l;return}if(s==="value"&&r.tagName!=="PROGRESS"&&!r.tagName.includes("-")){r._value=l;const b=l==null?"":l;(r.value!==b||r.tagName==="OPTION")&&(r.value=b),l==null&&r.removeAttribute(s);return}if(l===""||l==null){const b=typeof r[s];if(b==="boolean"){r[s]=yc(l);return}else if(l==null&&b==="string"){r[s]="",r.removeAttribute(s);return}else if(b==="number"){try{r[s]=0}catch{}r.removeAttribute(s);return}}try{r[s]=l}catch{}}let hs=Date.now,wh=!1;if(typeof window!="undefined"){hs()>document.createEvent("Event").timeStamp&&(hs=()=>performance.now());const r=navigator.userAgent.match(/firefox\/(\d+)/i);wh=!!(r&&Number(r[1])<=53)}let Bl=0;const Xv=Promise.resolve(),$v=()=>{Bl=0},Zv=()=>Bl||(Xv.then($v),Bl=hs());function Jv(r,s,l,u){r.addEventListener(s,l,u)}function Qv(r,s,l,u){r.removeEventListener(s,l,u)}function Vv(r,s,l,u,c=null){const d=r._vei||(r._vei={}),m=d[s];if(u&&m)m.value=u;else{const[b,y]=em(s);if(u){const x=d[s]=tm(u,c);Jv(r,b,x,y)}else m&&(Qv(r,b,m,y),d[s]=void 0)}}const Kf=/(?:Once|Passive|Capture)$/;function em(r){let s;if(Kf.test(r)){s={};let l;for(;l=r.match(Kf);)r=r.slice(0,r.length-l[0].length),s[l[0].toLowerCase()]=!0}return[ci(r.slice(2)),s]}function tm(r,s){const l=u=>{const c=u.timeStamp||hs();(wh||c>=l.attached-1)&&vr(rm(u,l.value),s,5,[u])};return l.value=r,l.attached=Zv(),l}function rm(r,s){if(Be(s)){const l=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{l.call(r),r._stopped=!0},s.map(u=>c=>!c._stopped&&u&&u(c))}else return s}const jf=/^on[a-z]/,nm=(r,s,l,u,c=!1,d,m,b,y)=>{s==="class"?Kv(r,u,c):s==="style"?jv(r,l,u):vs(s)?$l(s)||Vv(r,s,l,u,m):(s[0]==="."?(s=s.slice(1),!0):s[0]==="^"?(s=s.slice(1),!1):im(r,s,u,c))?Yv(r,s,u,d,m,b,y):(s==="true-value"?r._trueValue=u:s==="false-value"&&(r._falseValue=u),Gv(r,s,u,c))};function im(r,s,l,u){return u?!!(s==="innerHTML"||s==="textContent"||s in r&&jf.test(s)&&Ke(l)):s==="spellcheck"||s==="draggable"||s==="form"||s==="list"&&r.tagName==="INPUT"||s==="type"&&r.tagName==="TEXTAREA"||jf.test(s)&&Mt(l)?!1:s in r}const om=Ut({patchProp:nm},Uv);let qf;function sm(){return qf||(qf=mv(om))}const h0=(...r)=>{const s=sm().createApp(...r),{mount:l}=s;return s.mount=u=>{const c=lm(u);if(!c)return;const d=s._component;!Ke(d)&&!d.render&&!d.template&&(d.template=c.innerHTML),c.innerHTML="";const m=l(c,!1,c instanceof SVGElement);return c instanceof Element&&(c.removeAttribute("v-cloak"),c.setAttribute("data-v-app","")),m},s};function lm(r){return Mt(r)?document.querySelector(r):r}function Sl(){const r=[],s=c=>{const d=r.indexOf(c);d!==-1&&r.splice(d,1)};return{on:c=>(r.push(c),{off:()=>s(c)}),off:s,trigger:c=>{r.forEach(d=>d(c))}}}function Cs(r){return eg()?(tg(r),!0):!1}const ma=typeof window!="undefined",am=r=>typeof r=="string",is=()=>{};function xh(r,s){function l(...u){r(()=>s.apply(this,u),{fn:s,thisArg:this,args:u})}return l}const um=r=>r();function fm(r,s={}){let l,u;return d=>{const m=at(r),b=at(s.maxWait);if(l&&clearTimeout(l),m<=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()},m)}}function cm(r,s=!1,l="Timeout"){return new Promise((u,c)=>{setTimeout(s?()=>c(l):u,r)})}function hm(r,...s){return s.some(l=>l in r)}function dm(r,s=200,l={}){return xh(fm(s,l),r)}function d0(r,s=200,l={}){if(s<=0)return r;const u=Yt(r.value),c=dm(()=>{u.value=r.value},s,l);return $t(r,()=>c()),u}function kh(r,s=!0){mh()?eh(r):s?r():la(r)}function pm(r){let s=!1;function l(P,{flush:O="sync",deep:z=!1,timeout:j,throwOnTimeout:ne}={}){let ee=null;const I=[new Promise(D=>{ee=$t(r,H=>{P(H)===!s&&(ee==null||ee(),D())},{flush:O,deep:z,immediate:!0})})];return j&&I.push(cm(j,ne).finally(()=>{ee==null||ee()})),Promise.race(I)}function u(P,O){return l(z=>z===at(P),O)}function c(P){return l(O=>Boolean(O),P)}function d(P){return u(null,P)}function m(P){return u(void 0,P)}function b(P){return l(Number.isNaN,P)}function y(P,O){return l(z=>{const j=Array.from(z);return j.includes(P)||j.includes(at(P))},O)}function x(P){return S(1,P)}function S(P=1,O){let z=-1;return l(()=>(z+=1,z>=P),O)}return Array.isArray(at(r))?{toMatch:l,toContains:y,changed:x,changedTimes:S,get not(){return s=!s,this}}:{toMatch:l,toBe:u,toBeTruthy:c,toBeNull:d,toBeNaN:b,toBeUndefined:m,changed:x,changedTimes:S,get not(){return s=!s,this}}}function gm(r,s,l={}){const{immediate:u=!0}=l,c=Yt(!1);let d=null;function m(){d&&(clearTimeout(d),d=null)}function b(){c.value=!1,m()}function y(...x){m(),c.value=!0,d=setTimeout(()=>{c.value=!1,d=null,r(...x)},at(s))}return u&&(c.value=!0,ma&&y()),Cs(b),{isPending:c,start:y,stop:b}}function p0(r=!1){if(gt(r))return s=>(r.value=typeof s=="boolean"?s:!r.value,r.value);{const s=Yt(r);return[s,u=>(s.value=typeof u=="boolean"?u:!s.value,s.value)]}}var Gf=Object.getOwnPropertySymbols,vm=Object.prototype.hasOwnProperty,mm=Object.prototype.propertyIsEnumerable,ym=(r,s)=>{var l={};for(var u in r)vm.call(r,u)&&s.indexOf(u)<0&&(l[u]=r[u]);if(r!=null&&Gf)for(var u of Gf(r))s.indexOf(u)<0&&mm.call(r,u)&&(l[u]=r[u]);return l};function bm(r,s,l={}){const u=l,{eventFilter:c=um}=u,d=ym(u,["eventFilter"]);return $t(r,xh(c,s),d)}function g0(r,s,l){let u;gt(l)?u={evaluating:l}:u=l||{};const{lazy:c=!1,evaluating:d=void 0,onError:m=is}=u,b=Yt(!c),y=Yt(s);let x=0;return Gg(async S=>{if(!b.value)return;x++;const P=x;let O=!1;d&&Promise.resolve().then(()=>{d.value=!0});try{const z=await r(j=>{S(()=>{d&&(d.value=!1),O||j()})});P===x&&(y.value=z)}catch(z){m(z)}finally{d&&(d.value=!1),O=!0}}),c?zt(()=>(b.value=!0,y.value)):y}function Sh(r){var s;const l=at(r);return(s=l==null?void 0:l.$el)!=null?s:l}const fn=ma?window:void 0;function wm(...r){let s,l,u,c;if(am(r[0])?([l,u,c]=r,s=fn):[s,l,u,c]=r,!s)return is;let d=is;const m=$t(()=>Sh(s),y=>{d(),y&&(y.addEventListener(l,u,c),d=()=>{y.removeEventListener(l,u,c),d=is})},{immediate:!0,flush:"post"}),b=()=>{m(),d()};return Cs(b),b}function xm(r,s={}){const{window:l=fn}=s;let u;const c=Yt(!1),d=()=>{!l||(u||(u=l.matchMedia(r)),c.value=u.matches)};return kh(()=>{d(),u&&("addEventListener"in u?u.addEventListener("change",d):u.addListener(d),Cs(()=>{"removeEventListener"in u?u.removeEventListener("change",d):u.removeListener(d)}))}),c}const Ul=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Kl="__vueuse_ssr_handlers__";Ul[Kl]=Ul[Kl]||{};const km=Ul[Kl];function Ch(r,s){return km[r]||s}function Sm(r){return r==null?"any":r instanceof Set?"set":r instanceof Map?"map":typeof r=="boolean"?"boolean":typeof r=="string"?"string":typeof r=="object"||Array.isArray(r)?"object":Number.isNaN(r)?"any":"number"}const Cm={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.entries()))}};function Tm(r,s,l,u={}){var c;const{flush:d="pre",deep:m=!0,listenToStorageChanges:b=!0,writeDefaults:y=!0,shallow:x,window:S=fn,eventFilter:P,onError:O=D=>{console.error(D)}}=u,z=at(s),j=Sm(z),ne=(x?eo:Yt)(s),ee=(c=u.serializer)!=null?c:Cm[j];if(!l)try{l=Ch("getDefaultStorage",()=>{var D;return(D=fn)==null?void 0:D.localStorage})()}catch(D){O(D)}let A=!1;function I(D){if(!(!l||D&&D.key!==r))try{const H=D?D.newValue:l.getItem(r);H==null?(ne.value=z,y&&z!==null&&l.setItem(r,ee.write(z))):typeof H!="string"?ne.value=H:ne.value=ee.read(H)}catch(H){O(H)}}return I(),S&&b&&wm(S,"storage",D=>{setTimeout(()=>{if(A){A=!1;return}I(D)},0)}),l&&bm(ne,()=>{try{ne.value==null?l.removeItem(r):l.setItem(r,ee.write(ne.value)),A=!0}catch(D){O(D)}},{flush:d,deep:m,eventFilter:P}),ne}function Th(r){return xm("(prefers-color-scheme: dark)",r)}var Lm=Object.defineProperty,Yf=Object.getOwnPropertySymbols,Mm=Object.prototype.hasOwnProperty,Pm=Object.prototype.propertyIsEnumerable,Xf=(r,s,l)=>s in r?Lm(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,Om=(r,s)=>{for(var l in s||(s={}))Mm.call(s,l)&&Xf(r,l,s[l]);if(Yf)for(var l of Yf(s))Pm.call(s,l)&&Xf(r,l,s[l]);return r};function Em(r={}){const{selector:s="html",attribute:l="class",window:u=fn,storage:c,storageKey:d="vueuse-color-scheme",listenToStorageChanges:m=!0,storageRef:b}=r,y=Om({auto:"",light:"light",dark:"dark"},r.modes||{}),x=Th({window:u}),S=zt(()=>x.value?"dark":"light"),P=b||(d==null?Yt("auto"):Tm(d,"auto",c,{window:u,listenToStorageChanges:m})),O=zt({get(){return P.value==="auto"?S.value:P.value},set(ee){P.value=ee}}),z=Ch("updateHTMLAttrs",(ee,A,I)=>{const D=u==null?void 0:u.document.querySelector(ee);if(!!D)if(A==="class"){const H=I.split(/\s/g);Object.values(y).flatMap(ce=>(ce||"").split(/\s/g)).filter(Boolean).forEach(ce=>{H.includes(ce)?D.classList.add(ce):D.classList.remove(ce)})}else D.setAttribute(A,I)});function j(ee){var A;z(s,l,(A=y[ee])!=null?A:ee)}function ne(ee){r.onChanged?r.onChanged(ee,j):j(ee)}return $t(O,ne,{flush:"post",immediate:!0}),kh(()=>ne(O.value)),O}var _m=Object.defineProperty,Am=Object.defineProperties,Nm=Object.getOwnPropertyDescriptors,$f=Object.getOwnPropertySymbols,zm=Object.prototype.hasOwnProperty,Dm=Object.prototype.propertyIsEnumerable,Zf=(r,s,l)=>s in r?_m(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,Rm=(r,s)=>{for(var l in s||(s={}))zm.call(s,l)&&Zf(r,l,s[l]);if($f)for(var l of $f(s))Dm.call(s,l)&&Zf(r,l,s[l]);return r},Fm=(r,s)=>Am(r,Nm(s));function v0(r={}){const{valueDark:s="dark",valueLight:l="",window:u=fn}=r,c=Em(Fm(Rm({},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=Th({window:u});return zt({get(){return c.value==="dark"},set(b){b===d.value?c.value="auto":c.value=b?"dark":"light"}})}var Jf=Object.getOwnPropertySymbols,Im=Object.prototype.hasOwnProperty,Hm=Object.prototype.propertyIsEnumerable,Wm=(r,s)=>{var l={};for(var u in r)Im.call(r,u)&&s.indexOf(u)<0&&(l[u]=r[u]);if(r!=null&&Jf)for(var u of Jf(r))s.indexOf(u)<0&&Hm.call(r,u)&&(l[u]=r[u]);return l};function m0(r,s,l={}){const u=l,{window:c=fn}=u,d=Wm(u,["window"]);let m;const b=c&&"ResizeObserver"in c,y=()=>{m&&(m.disconnect(),m=void 0)},x=$t(()=>Sh(r),P=>{y(),b&&c&&P&&(m=new ResizeObserver(s),m.observe(P,d))},{immediate:!0,flush:"post"}),S=()=>{y(),x()};return Cs(S),{isSupported:b,stop:S}}var Bm=Object.defineProperty,Um=Object.defineProperties,Km=Object.getOwnPropertyDescriptors,Qf=Object.getOwnPropertySymbols,jm=Object.prototype.hasOwnProperty,qm=Object.prototype.propertyIsEnumerable,Vf=(r,s,l)=>s in r?Bm(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,dr=(r,s)=>{for(var l in s||(s={}))jm.call(s,l)&&Vf(r,l,s[l]);if(Qf)for(var l of Qf(s))qm.call(s,l)&&Vf(r,l,s[l]);return r},es=(r,s)=>Um(r,Km(s));const Gm={json:"application/json",text:"text/plain",formData:"multipart/form-data"};function ec(r){return hm(r,"immediate","refetch","initialData","timeout","beforeFetch","afterFetch","onFetchError")}function Cl(r){return r instanceof Headers?Object.fromEntries([...r.entries()]):r}function y0(r,...s){var l;const u=typeof AbortController=="function";let c={},d={immediate:!0,refetch:!1,timeout:0};const m={method:"GET",type:"text",payload:void 0};s.length>0&&(ec(s[0])?d=dr(dr({},d),s[0]):c=s[0]),s.length>1&&ec(s[1])&&(d=dr(dr({},d),s[1]));const{fetch:b=(l=fn)==null?void 0:l.fetch,initialData:y,timeout:x}=d,S=Sl(),P=Sl(),O=Sl(),z=Yt(!1),j=Yt(!1),ne=Yt(!1),ee=Yt(null),A=eo(null),I=eo(null),D=eo(y),H=zt(()=>u&&j.value);let ce,Se;const we=()=>{u&&ce&&ce.abort()},He=G=>{j.value=G,z.value=!G};x&&(Se=gm(we,x,{immediate:!1}));const ze=async(G=!1)=>{var w;He(!0),I.value=null,ee.value=null,ne.value=!1,ce=void 0,u&&(ce=new AbortController,ce.signal.onabort=()=>ne.value=!0,c=es(dr({},c),{signal:ce.signal}));const V={method:m.method,headers:{}};if(m.payload){const qe=Cl(V.headers);m.payloadType&&(qe["Content-Type"]=(w=Gm[m.payloadType])!=null?w:m.payloadType),V.body=m.payloadType==="json"?JSON.stringify(at(m.payload)):at(m.payload)}let X=!1;const ae={url:at(r),options:c,cancel:()=>{X=!0}};if(d.beforeFetch&&Object.assign(ae,await d.beforeFetch(ae)),X||!b)return He(!1),Promise.resolve(null);let Ne=null;return Se&&Se.start(),new Promise((qe,tt)=>{var it;b(ae.url,es(dr(dr({},V),ae.options),{headers:dr(dr({},Cl(V.headers)),Cl((it=ae.options)==null?void 0:it.headers))})).then(async Re=>{if(A.value=Re,ee.value=Re.status,Ne=await Re[m.type](),d.afterFetch&&ee.value>=200&&ee.value<300&&({data:Ne}=await d.afterFetch({data:Ne,response:Re})),D.value=Ne,!Re.ok)throw new Error(Re.statusText);return S.trigger(Re),qe(Re)}).catch(async Re=>{let $e=Re.message||Re.name;return d.onFetchError&&({data:Ne,error:$e}=await d.onFetchError({data:Ne,error:Re})),D.value=Ne,I.value=$e,P.trigger(Re),G?tt(Re):qe(null)}).finally(()=>{He(!1),Se&&Se.stop(),O.trigger(null)})})};$t(()=>[at(r),at(d.refetch)],()=>at(d.refetch)&&ze(),{deep:!0});const me={isFinished:z,statusCode:ee,response:A,error:I,data:D,isFetching:j,canAbort:H,aborted:ne,abort:we,execute:ze,onFetchResponse:S.on,onFetchError:P.on,onFetchFinally:O.on,get:de("GET"),put:de("PUT"),post:de("POST"),delete:de("DELETE"),patch:de("PATCH"),head:de("HEAD"),options:de("OPTIONS"),json:B("json"),text:B("text"),blob:B("blob"),arrayBuffer:B("arrayBuffer"),formData:B("formData")};function de(G){return(w,V)=>{if(!j.value)return m.method=G,m.payload=w,m.payloadType=V,gt(m.payload)&&$t(()=>[at(m.payload),at(d.refetch)],()=>at(d.refetch)&&ze(),{deep:!0}),!V&&at(w)&&Object.getPrototypeOf(at(w))===Object.prototype&&(m.payloadType="json"),me}}function Ae(){return new Promise((G,w)=>{pm(z).toBe(!0).then(()=>G(me)).catch(V=>w(V))})}function B(G){return()=>{if(!j.value)return m.type=G,es(dr({},me),{then(w,V){return Ae().then(w,V)}})}}return d.immediate&&setTimeout(ze,0),es(dr({},me),{then(G,w){return Ae().then(G,w)}})}var tc,rc;ma&&(window==null?void 0:window.navigator)&&((tc=window==null?void 0:window.navigator)==null?void 0:tc.platform)&&/iP(ad|hone|od)/.test((rc=window==null?void 0:window.navigator)==null?void 0:rc.platform);function b0(r,s,l,u={}){var c;const{passive:d=!1,eventName:m,deep:b=!1}=u,y=mh(),x=l||(y==null?void 0:y.emit)||((c=y==null?void 0:y.$emit)==null?void 0:c.bind(y));let S=m;if(s||(s="modelValue"),S=m||S||`update:${s}`,d){const P=Yt(r[s]);return $t(()=>r[s],O=>P.value=O),$t(P,O=>{(O!==r[s]||b)&&x(S,O)},{deep:b}),P}else return zt({get(){return r[s]},set(P){x(S,P)}})}var Ym=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Br={exports:{}};(function(r,s){(function(l,u){r.exports=u()})(Ym,function(){var l=navigator.userAgent,u=navigator.platform,c=/gecko\/\d/i.test(l),d=/MSIE \d/.test(l),m=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(l),b=/Edge\/(\d+)/.exec(l),y=d||m||b,x=y&&(d?document.documentMode||6:+(b||m)[1]),S=!b&&/WebKit\//.test(l),P=S&&/Qt\/\d+\.\d+/.test(l),O=!b&&/Chrome\//.test(l),z=/Opera\//.test(l),j=/Apple Computer/.test(navigator.vendor),ne=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(l),ee=/PhantomJS/.test(l),A=j&&(/Mobile\/\w+/.test(l)||navigator.maxTouchPoints>2),I=/Android/.test(l),D=A||I||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(l),H=A||/Mac/.test(u),ce=/\bCrOS\b/.test(l),Se=/win/i.test(u),we=z&&l.match(/Version\/(\d*\.\d*)/);we&&(we=Number(we[1])),we&&we>=15&&(z=!1,S=!0);var He=H&&(P||z&&(we==null||we<12.11)),ze=c||y&&x>=9;function me(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var de=function(e,t){var i=e.className,n=me(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 Ae(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function B(e,t){return Ae(e).appendChild(t)}function G(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 w(e,t,i,n){var o=G(e,t,i,n);return o.setAttribute("role","presentation"),o}var V;document.createRange?V=function(e,t,i,n){var o=document.createRange();return o.setEnd(n||e,i),o.setStart(e,t),o}:V=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 X(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 ae(){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 Ne(e,t){var i=e.className;me(t).test(i)||(e.className+=(i?" ":"")+t)}function qe(e,t){for(var i=e.split(" "),n=0;n<i.length;n++)i[n]&&!me(i[n]).test(t)&&(t+=" "+i[n]);return t}var tt=function(e){e.select()};A?tt=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:y&&(tt=function(e){try{e.select()}catch{}});function it(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Re(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 $e(e,t,i,n,o){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=n||0,f=o||0;;){var h=e.indexOf(" ",a);if(h<0||h>=t)return f+(t-a);f+=h-a,f+=i-f%i,a=h+1}}var q=function(){this.id=null,this.f=null,this.time=0,this.handler=it(this.onTimeout,this)};q.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},q.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 Z(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}var K=50,oe={toString:function(){return"CodeMirror.Pass"}},Ce={scroll:!1},ke={origin:"*mouse"},pe={origin:"+move"};function Le(e,t,i){for(var n=0,o=0;;){var a=e.indexOf(" ",n);a==-1&&(a=e.length);var f=a-n;if(a==e.length||o+f>=t)return n+Math.min(f,t-o);if(o+=a-n,o+=i-o%i,n=a+1,o>=t)return n}}var T=[""];function _(e){for(;T.length<=e;)T.push(F(T)+" ");return T[e]}function F(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 J(e,t,i){for(var n=0,o=i(t);n<e.length&&i(e[n])<=o;)n++;e.splice(n,0,t)}function re(){}function ue(e,t){var i;return Object.create?i=Object.create(e):(re.prototype=e,i=new re),t&&Re(t,i),i}var fe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function te(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||fe.test(e))}function L(e,t){return t?t.source.indexOf("\\w")>-1&&te(e)?!0:t.test(e):te(e)}function W(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var N=/[\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 he(e){return e.charCodeAt(0)>=768&&N.test(e)}function Me(e,t,i){for(;(i<0?t>0:t<e.length)&&he(e.charAt(t));)t+=i;return t}function Ie(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 Ve(e,t,i,n){if(!e)return n(t,i,"ltr",0);for(var o=!1,a=0;a<e.length;++a){var f=e[a];(f.from<i&&f.to>t||t==i&&f.to==t)&&(n(Math.max(f.from,t),Math.min(f.to,i),f.level==1?"rtl":"ltr",a),o=!0)}o||n(t,i,"ltr")}var Ue=null;function Fe(e,t,i){var n;Ue=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:Ue=o),a.from==t&&(a.from!=a.to&&i!="before"?n=o:Ue=o)}return n!=null?n:Ue}var mt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(g){return g<=247?e.charAt(g):1424<=g&&g<=1524?"R":1536<=g&&g<=1785?t.charAt(g-1536):1774<=g&&g<=2220?"r":8192<=g&&g<=8203?"w":g==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,f=/[Lb1n]/,h=/[1n]/;function p(g,k,C){this.level=g,this.from=k,this.to=C}return function(g,k){var C=k=="ltr"?"L":"R";if(g.length==0||k=="ltr"&&!n.test(g))return!1;for(var R=g.length,E=[],U=0;U<R;++U)E.push(i(g.charCodeAt(U)));for(var Q=0,le=C;Q<R;++Q){var ge=E[Q];ge=="m"?E[Q]=le:le=ge}for(var ye=0,ve=C;ye<R;++ye){var xe=E[ye];xe=="1"&&ve=="r"?E[ye]="n":a.test(xe)&&(ve=xe,xe=="r"&&(E[ye]="R"))}for(var _e=1,Ee=E[0];_e<R-1;++_e){var We=E[_e];We=="+"&&Ee=="1"&&E[_e+1]=="1"?E[_e]="1":We==","&&Ee==E[_e+1]&&(Ee=="1"||Ee=="n")&&(E[_e]=Ee),Ee=We}for(var et=0;et<R;++et){var xt=E[et];if(xt==",")E[et]="N";else if(xt=="%"){var lt=void 0;for(lt=et+1;lt<R&&E[lt]=="%";++lt);for(var qt=et&&E[et-1]=="!"||lt<R&&E[lt]=="1"?"1":"N",It=et;It<lt;++It)E[It]=qt;et=lt-1}}for(var dt=0,Ht=C;dt<R;++dt){var Tt=E[dt];Ht=="L"&&Tt=="1"?E[dt]="L":a.test(Tt)&&(Ht=Tt)}for(var vt=0;vt<R;++vt)if(o.test(E[vt])){var pt=void 0;for(pt=vt+1;pt<R&&o.test(E[pt]);++pt);for(var ft=(vt?E[vt-1]:C)=="L",Wt=(pt<R?E[pt]:C)=="L",Qn=ft==Wt?ft?"L":"R":C,Qr=vt;Qr<pt;++Qr)E[Qr]=Qn;vt=pt-1}for(var _t=[],Cr,kt=0;kt<R;)if(f.test(E[kt])){var vl=kt;for(++kt;kt<R&&f.test(E[kt]);++kt);_t.push(new p(0,vl,kt))}else{var Rr=kt,xn=_t.length,kn=k=="rtl"?1:0;for(++kt;kt<R&&E[kt]!="L";++kt);for(var Nt=Rr;Nt<kt;)if(h.test(E[Nt])){Rr<Nt&&(_t.splice(xn,0,new p(1,Rr,Nt)),xn+=kn);var Vn=Nt;for(++Nt;Nt<kt&&h.test(E[Nt]);++Nt);_t.splice(xn,0,new p(2,Vn,Nt)),xn+=kn,Rr=Nt}else++Nt;Rr<kt&&_t.splice(xn,0,new p(1,Rr,kt))}return k=="ltr"&&(_t[0].level==1&&(Cr=g.match(/^\s+/))&&(_t[0].from=Cr[0].length,_t.unshift(new p(0,0,Cr[0].length))),F(_t).level==1&&(Cr=g.match(/\s+$/))&&(F(_t).to-=Cr[0].length,_t.push(new p(0,R-Cr[0].length,R)))),k=="rtl"?_t.reverse():_t}}();function ht(e,t){var i=e.order;return i==null&&(i=e.order=mt(e.text,t)),i}var nr=[],Pe=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]||nr).concat(i)}};function Or(e,t){return e._handlers&&e._handlers[t]||nr}function Qe(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=Z(o,i);a>-1&&(n[t]=o.slice(0,a).concat(o.slice(a+1)))}}}function Oe(e,t){var i=Or(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 st(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Oe(e,i||t.type,e,t),Zt(t)||t.codemirrorIgnore}function En(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)Z(i,t[n])==-1&&i.push(t[n])}function Ct(e,t){return Or(e,t).length>0}function mr(e){e.prototype.on=function(t,i){Pe(this,t,i)},e.prototype.off=function(t,i){Qe(this,t,i)}}function Pt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function _n(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Zt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function cn(e){Pt(e),_n(e)}function Ur(e){return e.target||e.srcElement}function go(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),H&&e.ctrlKey&&t==1&&(t=3),t}var gi=function(){if(y&&x<9)return!1;var e=G("div");return"draggable"in e||"dragDrop"in e}(),Dt;function vo(e){if(Dt==null){var t=G("span","\u200B");B(e,G("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Dt=t.offsetWidth<=1&&t.offsetHeight>2&&!(y&&x<8))}var i=Dt?G("span","\u200B"):G("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var vi;function yr(e){if(vi!=null)return vi;var t=B(e,document.createTextNode("A\u062EA")),i=V(t,0,1).getBoundingClientRect(),n=V(t,1,2).getBoundingClientRect();return Ae(e),!i||i.left==i.right?!1:vi=n.right-i.right<3}var mi=`
|
|
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),f=a.indexOf("\r");f!=-1?(i.push(a.slice(0,f)),t+=f+1):(i.push(a),t=o+1)}return i}:function(e){return e.split(/\r\n?|\n/)},mo=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},yo=function(){var e=G("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),yi=null;function Kr(e){if(yi!=null)return yi;var t=B(e,G("span","x")),i=t.getBoundingClientRect(),n=V(t,0,1).getBoundingClientRect();return yi=Math.abs(i.left-n.left)>1}var ir={},Jt={};function bo(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),ir[e]=t}function Er(e,t){Jt[e]=t}function An(e){if(typeof e=="string"&&Jt.hasOwnProperty(e))e=Jt[e];else if(e&&typeof e.name=="string"&&Jt.hasOwnProperty(e.name)){var t=Jt[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 An("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return An("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Nn(e,t){t=An(t);var i=ir[t.name];if(!i)return Nn(e,"text/plain");var n=i(e,t);if(lr.hasOwnProperty(t.name)){var o=lr[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 f in t.modeProps)n[f]=t.modeProps[f];return n}var lr={};function ar(e,t){var i=lr.hasOwnProperty(e)?lr[e]:lr[e]={};Re(t,i)}function Qt(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 bi(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 wi(e,t,i){return e.startState?e.startState(t,i):!0}var ut=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};ut.prototype.eol=function(){return this.pos>=this.string.length},ut.prototype.sol=function(){return this.pos==this.lineStart},ut.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ut.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ut.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},ut.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},ut.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},ut.prototype.skipToEnd=function(){this.pos=this.string.length},ut.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},ut.prototype.backUp=function(e){this.pos-=e},ut.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=$e(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?$e(this.string,this.lineStart,this.tabSize):0)},ut.prototype.indentation=function(){return $e(this.string,null,this.tabSize)-(this.lineStart?$e(this.string,this.lineStart,this.tabSize):0)},ut.prototype.match=function(e,t,i){if(typeof e=="string"){var n=function(f){return i?f.toLowerCase():f},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)}},ut.prototype.current=function(){return this.string.slice(this.start,this.pos)},ut.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},ut.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},ut.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Te(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 br(e,t,i){var n=[],o=t.line;return e.iter(t.line,i.line+1,function(a){var f=a.text;o==i.line&&(f=f.slice(0,i.ch)),o==t.line&&(f=f.slice(t.ch)),n.push(f),++o}),n}function xi(e,t,i){var n=[];return e.iter(t,i,function(o){n.push(o.text)}),n}function Kt(e,t){var i=t-e.height;if(i)for(var n=e;n;n=n.parent)n.height+=i}function Ge(e){if(e.parent==null)return null;for(var t=e.parent,i=Z(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 wr(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 f=0;f<e.lines.length;++f){var h=e.lines[f],p=h.height;if(t<p)break;t-=p}return i+f}function hn(e,t){return t>=e.first&&t<e.first+e.size}function ki(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ie(e,t,i){if(i===void 0&&(i=null),!(this instanceof ie))return new ie(e,t,i);this.line=e,this.ch=t,this.sticky=i}function v(e,t){return e.line-t.line||e.ch-t.ch}function M(e,t){return e.sticky==t.sticky&&v(e,t)==0}function $(e){return ie(e.line,e.ch)}function se(e,t){return v(e,t)<0?t:e}function De(e,t){return v(e,t)<0?e:t}function je(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function be(e,t){if(t.line<e.first)return ie(e.first,0);var i=e.first+e.size-1;return t.line>i?ie(i,Te(e,i).text.length):Ot(t,Te(e,t.line).text.length)}function Ot(e,t){var i=e.ch;return i==null||i>t?ie(e.line,t):i<0?ie(e.line,0):e}function Vt(e,t){for(var i=[],n=0;n<t.length;n++)i[n]=be(e,t[n]);return i}var zn=function(e,t){this.state=e,this.lookAhead=t},xr=function(e,t,i,n){this.state=t,this.doc=e,this.line=i,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};xr.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},xr.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}},xr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},xr.fromSaved=function(e,t,i){return t instanceof zn?new xr(e,Qt(e.mode,t.state),i,t.lookAhead):new xr(e,Qt(e.mode,t),i)},xr.prototype.save=function(e){var t=e!==!1?Qt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new zn(t,this.maxLookAhead):t};function xa(e,t,i,n){var o=[e.state.modeGen],a={};Ma(e,t.text,e.doc.mode,i,function(g,k){return o.push(g,k)},a,n);for(var f=i.state,h=function(g){i.baseTokens=o;var k=e.state.overlays[g],C=1,R=0;i.state=!0,Ma(e,t.text,k.mode,i,function(E,U){for(var Q=C;R<E;){var le=o[C];le>E&&o.splice(C,1,E,o[C+1],le),C+=2,R=Math.min(E,le)}if(!!U)if(k.opaque)o.splice(Q,C-Q,E,"overlay "+U),C=Q+2;else for(;Q<C;Q+=2){var ge=o[Q+1];o[Q+1]=(ge?ge+" ":"")+"overlay "+U}},a),i.state=f,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=Si(e,Ge(t)),o=t.text.length>e.options.maxHighlightLength&&Qt(e.doc.mode,n.state),a=xa(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 Si(e,t,i){var n=e.doc,o=e.display;if(!n.mode.startState)return new xr(n,!0,t);var a=Bh(e,t,i),f=a>n.first&&Te(n,a-1).stateAfter,h=f?xr.fromSaved(n,f,a):new xr(n,wi(n.mode),a);return n.iter(a,t,function(p){Ls(e,p.text,h);var g=h.line;p.stateAfter=g==t-1||g%5==0||g>=o.viewFrom&&g<o.viewTo?h.save():null,h.nextLine()}),i&&(n.modeFrontier=h.line),h}function Ls(e,t,i,n){var o=e.doc.mode,a=new ut(t,e.options.tabSize,i);for(a.start=a.pos=n||0,t==""&&Sa(o,i.state);!a.eol();)Ms(o,a,i.state),a.start=a.pos}function Sa(e,t){if(e.blankLine)return e.blankLine(t);if(!!e.innerMode){var i=bi(e,t);if(i.mode.blankLine)return i.mode.blankLine(i.state)}}function Ms(e,t,i,n){for(var o=0;o<10;o++){n&&(n[0]=bi(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 Ca=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function Ta(e,t,i,n){var o=e.doc,a=o.mode,f;t=be(o,t);var h=Te(o,t.line),p=Si(e,t.line,i),g=new ut(h.text,e.options.tabSize,p),k;for(n&&(k=[]);(n||g.pos<t.ch)&&!g.eol();)g.start=g.pos,f=Ms(a,g,p.state),n&&k.push(new Ca(g,f,Qt(o.mode,p.state)));return n?k:new Ca(g,f,p.state)}function La(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 Ma(e,t,i,n,o,a,f){var h=i.flattenSpans;h==null&&(h=e.options.flattenSpans);var p=0,g=null,k=new ut(t,e.options.tabSize,n),C,R=e.options.addModeClass&&[null];for(t==""&&La(Sa(i,n.state),a);!k.eol();){if(k.pos>e.options.maxHighlightLength?(h=!1,f&&Ls(e,t,n,k.pos),k.pos=t.length,C=null):C=La(Ms(i,k,n.state,R),a),R){var E=R[0].name;E&&(C="m-"+(C?E+" "+C:E))}if(!h||g!=C){for(;p<k.start;)p=Math.min(k.start,p+5e3),o(p,g);g=C}k.start=k.pos}for(;p<k.pos;){var U=Math.min(k.pos,p+5e3);o(U,g),p=U}}function Bh(e,t,i){for(var n,o,a=e.doc,f=i?-1:t-(e.doc.mode.innerMode?1e3:100),h=t;h>f;--h){if(h<=a.first)return a.first;var p=Te(a,h-1),g=p.stateAfter;if(g&&(!i||h+(g instanceof zn?g.lookAhead:0)<=a.modeFrontier))return h;var k=$e(p.text,null,e.options.tabSize);(o==null||n>k)&&(o=h-1,n=k)}return o}function Uh(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=Te(e,n).stateAfter;if(o&&(!(o instanceof zn)||n+o.lookAhead<t)){i=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}}var Pa=!1,_r=!1;function Kh(){Pa=!0}function jh(){_r=!0}function wo(e,t,i){this.marker=e,this.from=t,this.to=i}function Ci(e,t){if(e)for(var i=0;i<e.length;++i){var n=e[i];if(n.marker==t)return n}}function qh(e,t){for(var i,n=0;n<e.length;++n)e[n]!=t&&(i||(i=[])).push(e[n]);return i}function Gh(e,t,i){var n=i&&window.WeakSet&&(i.markedSpans||(i.markedSpans=new WeakSet));n&&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 Yh(e,t,i){var n;if(e)for(var o=0;o<e.length;++o){var a=e[o],f=a.marker,h=a.from==null||(f.inclusiveLeft?a.from<=t:a.from<t);if(h||a.from==t&&f.type=="bookmark"&&(!i||!a.marker.insertLeft)){var p=a.to==null||(f.inclusiveRight?a.to>=t:a.to>t);(n||(n=[])).push(new wo(f,a.from,p?null:a.to))}}return n}function Xh(e,t,i){var n;if(e)for(var o=0;o<e.length;++o){var a=e[o],f=a.marker,h=a.to==null||(f.inclusiveRight?a.to>=t:a.to>t);if(h||a.from==t&&f.type=="bookmark"&&(!i||a.marker.insertLeft)){var p=a.from==null||(f.inclusiveLeft?a.from<=t:a.from<t);(n||(n=[])).push(new wo(f,p?null:a.from-t,a.to==null?null:a.to-t))}}return n}function Ps(e,t){if(t.full)return null;var i=hn(e,t.from.line)&&Te(e,t.from.line).markedSpans,n=hn(e,t.to.line)&&Te(e,t.to.line).markedSpans;if(!i&&!n)return null;var o=t.from.ch,a=t.to.ch,f=v(t.from,t.to)==0,h=Yh(i,o,f),p=Xh(n,a,f),g=t.text.length==1,k=F(t.text).length+(g?o:0);if(h)for(var C=0;C<h.length;++C){var R=h[C];if(R.to==null){var E=Ci(p,R.marker);E?g&&(R.to=E.to==null?null:E.to+k):R.to=o}}if(p)for(var U=0;U<p.length;++U){var Q=p[U];if(Q.to!=null&&(Q.to+=k),Q.from==null){var le=Ci(h,Q.marker);le||(Q.from=k,g&&(h||(h=[])).push(Q))}else Q.from+=k,g&&(h||(h=[])).push(Q)}h&&(h=Oa(h)),p&&p!=h&&(p=Oa(p));var ge=[h];if(!g){var ye=t.text.length-2,ve;if(ye>0&&h)for(var xe=0;xe<h.length;++xe)h[xe].to==null&&(ve||(ve=[])).push(new wo(h[xe].marker,null,null));for(var _e=0;_e<ye;++_e)ge.push(ve);ge.push(p)}return ge}function Oa(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 $h(e,t,i){var n=null;if(e.iter(t.line,i.line+1,function(E){if(E.markedSpans)for(var U=0;U<E.markedSpans.length;++U){var Q=E.markedSpans[U].marker;Q.readOnly&&(!n||Z(n,Q)==-1)&&(n||(n=[])).push(Q)}}),!n)return null;for(var o=[{from:t,to:i}],a=0;a<n.length;++a)for(var f=n[a],h=f.find(0),p=0;p<o.length;++p){var g=o[p];if(!(v(g.to,h.from)<0||v(g.from,h.to)>0)){var k=[p,1],C=v(g.from,h.from),R=v(g.to,h.to);(C<0||!f.inclusiveLeft&&!C)&&k.push({from:g.from,to:h.from}),(R>0||!f.inclusiveRight&&!R)&&k.push({from:h.to,to:g.to}),o.splice.apply(o,k),p+=k.length-3}}return o}function Ea(e){var t=e.markedSpans;if(!!t){for(var i=0;i<t.length;++i)t[i].marker.detachLine(e);e.markedSpans=null}}function _a(e,t){if(!!t){for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}}function xo(e){return e.inclusiveLeft?-1:0}function ko(e){return e.inclusiveRight?1:0}function Os(e,t){var i=e.lines.length-t.lines.length;if(i!=0)return i;var n=e.find(),o=t.find(),a=v(n.from,o.from)||xo(e)-xo(t);if(a)return-a;var f=v(n.to,o.to)||ko(e)-ko(t);return f||t.id-e.id}function Aa(e,t){var i=_r&&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||Os(n,o.marker)<0)&&(n=o.marker);return n}function Na(e){return Aa(e,!0)}function So(e){return Aa(e,!1)}function Zh(e,t){var i=_r&&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||Os(n,a.marker)<0)&&(n=a.marker)}return n}function za(e,t,i,n,o){var a=Te(e,t),f=_r&&a.markedSpans;if(f)for(var h=0;h<f.length;++h){var p=f[h];if(!!p.marker.collapsed){var g=p.marker.find(0),k=v(g.from,i)||xo(p.marker)-xo(o),C=v(g.to,n)||ko(p.marker)-ko(o);if(!(k>=0&&C<=0||k<=0&&C>=0)&&(k<=0&&(p.marker.inclusiveRight&&o.inclusiveLeft?v(g.to,i)>=0:v(g.to,i)>0)||k>=0&&(p.marker.inclusiveRight&&o.inclusiveLeft?v(g.from,n)<=0:v(g.from,n)<0)))return!0}}}function ur(e){for(var t;t=Na(e);)e=t.find(-1,!0).line;return e}function Jh(e){for(var t;t=So(e);)e=t.find(1,!0).line;return e}function Qh(e){for(var t,i;t=So(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function Es(e,t){var i=Te(e,t),n=ur(i);return i==n?t:Ge(n)}function Da(e,t){if(t>e.lastLine())return t;var i=Te(e,t),n;if(!jr(e,i))return t;for(;n=So(i);)i=n.find(1,!0).line;return Ge(i)+1}function jr(e,t){var i=_r&&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&&_s(e,t,n))return!0}}}function _s(e,t,i){if(i.to==null){var n=i.marker.find(1,!0);return _s(e,n.line,Ci(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)&&_s(e,t,o))return!0}function Ar(e){e=ur(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 f=0;f<a.children.length;++f){var h=a.children[f];if(h==i)break;t+=h.height}return t}function Co(e){if(e.height==0)return 0;for(var t=e.text.length,i,n=e;i=Na(n);){var o=i.find(0,!0);n=o.from.line,t+=o.from.ch-o.to.ch}for(n=e;i=So(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 As(e){var t=e.display,i=e.doc;t.maxLine=Te(i,i.first),t.maxLineLength=Co(t.maxLine),t.maxLineChanged=!0,i.iter(function(n){var o=Co(n);o>t.maxLineLength&&(t.maxLineLength=o,t.maxLine=n)})}var Dn=function(e,t,i){this.text=e,_a(this,t),this.height=i?i(this):1};Dn.prototype.lineNo=function(){return Ge(this)},mr(Dn);function Vh(e,t,i,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Ea(e),_a(e,i);var o=n?n(e):1;o!=e.height&&Kt(e,o)}function ed(e){e.parent=null,Ea(e)}var td={},rd={};function Ra(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?rd:td;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function Fa(e,t){var i=w("span",null,null,S?"padding-right: .1px":null),n={pre:w("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,f=void 0;n.pos=0,n.addToken=id,yr(e.display.measure)&&(f=ht(a,e.doc.direction))&&(n.addToken=sd(n.addToken,f)),n.map=[];var h=t!=e.display.externalMeasured&&Ge(a);ld(a,n,ka(e,a,h)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=qe(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=qe(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(vo(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(S){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 Oe(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=qe(n.pre.className,n.textClass||"")),n}function nd(e){var t=G("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function id(e,t,i,n,o,a,f){if(!!t){var h=e.splitSpaces?od(t,e.trailingSpace):t,p=e.cm.state.specialChars,g=!1,k;if(!p.test(t))e.col+=t.length,k=document.createTextNode(h),e.map.push(e.pos,e.pos+t.length,k),y&&x<9&&(g=!0),e.pos+=t.length;else{k=document.createDocumentFragment();for(var C=0;;){p.lastIndex=C;var R=p.exec(t),E=R?R.index-C:t.length-C;if(E){var U=document.createTextNode(h.slice(C,C+E));y&&x<9?k.appendChild(G("span",[U])):k.appendChild(U),e.map.push(e.pos,e.pos+E,U),e.col+=E,e.pos+=E}if(!R)break;C+=E+1;var Q=void 0;if(R[0]==" "){var le=e.cm.options.tabSize,ge=le-e.col%le;Q=k.appendChild(G("span",_(ge),"cm-tab")),Q.setAttribute("role","presentation"),Q.setAttribute("cm-text"," "),e.col+=ge}else R[0]=="\r"||R[0]==`
|
|
5
|
+
`?(Q=k.appendChild(G("span",R[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Q.setAttribute("cm-text",R[0]),e.col+=1):(Q=e.cm.options.specialCharPlaceholder(R[0]),Q.setAttribute("cm-text",R[0]),y&&x<9?k.appendChild(G("span",[Q])):k.appendChild(Q),e.col+=1);e.map.push(e.pos,e.pos+1,Q),e.pos++}}if(e.trailingSpace=h.charCodeAt(t.length-1)==32,i||n||o||g||a||f){var ye=i||"";n&&(ye+=n),o&&(ye+=o);var ve=G("span",[k],ye,a);if(f)for(var xe in f)f.hasOwnProperty(xe)&&xe!="style"&&xe!="class"&&ve.setAttribute(xe,f[xe]);return e.content.appendChild(ve)}e.content.appendChild(k)}}function od(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 sd(e,t){return function(i,n,o,a,f,h,p){o=o?o+" cm-force-border":"cm-force-border";for(var g=i.pos,k=g+n.length;;){for(var C=void 0,R=0;R<t.length&&(C=t[R],!(C.to>g&&C.from<=g));R++);if(C.to>=k)return e(i,n,o,a,f,h,p);e(i,n.slice(0,C.to-g),o,a,null,h,p),a=null,n=n.slice(C.to-g),g=C.to}}}function Ia(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 ld(e,t,i){var n=e.markedSpans,o=e.text,a=0;if(!n){for(var f=1;f<i.length;f+=2)t.addToken(t,o.slice(a,a=i[f]),Ra(i[f+1],t.cm.options));return}for(var h=o.length,p=0,g=1,k="",C,R,E=0,U,Q,le,ge,ye;;){if(E==p){U=Q=le=R="",ye=null,ge=null,E=1/0;for(var ve=[],xe=void 0,_e=0;_e<n.length;++_e){var Ee=n[_e],We=Ee.marker;if(We.type=="bookmark"&&Ee.from==p&&We.widgetNode)ve.push(We);else if(Ee.from<=p&&(Ee.to==null||Ee.to>p||We.collapsed&&Ee.to==p&&Ee.from==p)){if(Ee.to!=null&&Ee.to!=p&&E>Ee.to&&(E=Ee.to,Q=""),We.className&&(U+=" "+We.className),We.css&&(R=(R?R+";":"")+We.css),We.startStyle&&Ee.from==p&&(le+=" "+We.startStyle),We.endStyle&&Ee.to==E&&(xe||(xe=[])).push(We.endStyle,Ee.to),We.title&&((ye||(ye={})).title=We.title),We.attributes)for(var et in We.attributes)(ye||(ye={}))[et]=We.attributes[et];We.collapsed&&(!ge||Os(ge.marker,We)<0)&&(ge=Ee)}else Ee.from>p&&E>Ee.from&&(E=Ee.from)}if(xe)for(var xt=0;xt<xe.length;xt+=2)xe[xt+1]==E&&(Q+=" "+xe[xt]);if(!ge||ge.from==p)for(var lt=0;lt<ve.length;++lt)Ia(t,0,ve[lt]);if(ge&&(ge.from||0)==p){if(Ia(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,E);;){if(k){var It=p+k.length;if(!ge){var dt=It>qt?k.slice(0,qt-p):k;t.addToken(t,dt,C?C+U:U,le,p+dt.length==E?Q:"",R,ye)}if(It>=qt){k=k.slice(qt-p),p=qt;break}p=It,le=""}k=o.slice(a,a=i[g++]),C=Ra(i[g++],t.cm.options)}}}function Ha(e,t,i){this.line=t,this.rest=Qh(t),this.size=this.rest?Ge(F(this.rest))-i+1:1,this.node=this.text=null,this.hidden=jr(e,t)}function To(e,t,i){for(var n=[],o,a=t;a<i;a=o){var f=new Ha(e.doc,Te(e.doc,a),a);o=a+f.size,n.push(f)}return n}var Rn=null;function ad(e){Rn?Rn.ops.push(e):e.ownsGroup=Rn={ops:[e],delayedCallbacks:[]}}function ud(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 fd(e,t){var i=e.ownsGroup;if(!!i)try{ud(i)}finally{Rn=null,t(i)}}var Ti=null;function yt(e,t){var i=Or(e,t);if(!!i.length){var n=Array.prototype.slice.call(arguments,2),o;Rn?o=Rn.delayedCallbacks:Ti?o=Ti:(o=Ti=[],setTimeout(cd,0));for(var a=function(h){o.push(function(){return i[h].apply(null,n)})},f=0;f<i.length;++f)a(f)}}function cd(){var e=Ti;Ti=null;for(var t=0;t<e.length;++t)e[t]()}function Wa(e,t,i,n){for(var o=0;o<t.changes.length;o++){var a=t.changes[o];a=="text"?dd(e,t):a=="gutter"?Ua(e,t,i,n):a=="class"?Ns(e,t):a=="widget"&&pd(e,t,n)}t.changes=null}function Li(e){return e.node==e.text&&(e.node=G("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 hd(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=Li(t);t.background=n.insertBefore(G("div",null,i),n.firstChild),e.display.input.setUneditable(t.background)}}function Ba(e,t){var i=e.display.externalMeasured;return i&&i.line==t.line?(e.display.externalMeasured=null,t.measure=i.measure,i.built):Fa(e,t)}function dd(e,t){var i=t.text.className,n=Ba(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,Ns(e,t)):i&&(t.text.className=i)}function Ns(e,t){hd(e,t),t.line.wrapClass?Li(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 Ua(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=Li(t);t.gutterBackground=G("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 f=Li(t),h=t.gutter=G("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),f.insertBefore(h,t.text),t.line.gutterClass&&(h.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=h.appendChild(G("div",ki(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 g=e.display.gutterSpecs[p].className,k=a.hasOwnProperty(g)&&a[g];k&&h.appendChild(G("div",[k],"CodeMirror-gutter-elt","left: "+n.gutterLeft[g]+"px; width: "+n.gutterWidth[g]+"px"))}}}function pd(e,t,i){t.alignable&&(t.alignable=null);for(var n=me("CodeMirror-linewidget"),o=t.node.firstChild,a=void 0;o;o=a)a=o.nextSibling,n.test(o.className)&&t.node.removeChild(o);Ka(e,t,i)}function gd(e,t,i,n){var o=Ba(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),Ns(e,t),Ua(e,t,i,n),Ka(e,t,n),t.node}function Ka(e,t,i){if(ja(e,t.line,t,i,!0),t.rest)for(var n=0;n<t.rest.length;n++)ja(e,t.rest[n],t,i,!1)}function ja(e,t,i,n,o){if(!!t.widgets)for(var a=Li(i),f=0,h=t.widgets;f<h.length;++f){var p=h[f],g=G("div",[p.node],"CodeMirror-linewidget"+(p.className?" "+p.className:""));p.handleMouseEvents||g.setAttribute("cm-ignore-events","true"),vd(p,g,i,n),e.display.input.setUneditable(g),o&&p.above?a.insertBefore(g,i.gutter||i.text):a.appendChild(g),yt(p,"redraw")}}function vd(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 Mi(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!X(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;"),B(t.display.measure,G("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function Nr(e,t){for(var i=Ur(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 Lo(e){return e.lineSpace.offsetTop}function zs(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function qa(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=B(e.measure,G("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 kr(e){return K-e.display.nativeBarWidth}function dn(e){return e.display.scroller.clientWidth-kr(e)-e.display.barWidth}function Ds(e){return e.display.scroller.clientHeight-kr(e)-e.display.barHeight}function md(e,t,i){var n=e.options.lineWrapping,o=n&&dn(e);if(!t.measure.heights||n&&t.measure.width!=o){var a=t.measure.heights=[];if(n){t.measure.width=o;for(var f=t.text.firstChild.getClientRects(),h=0;h<f.length-1;h++){var p=f[h],g=f[h+1];Math.abs(p.bottom-g.bottom)>2&&a.push((p.bottom+g.top)/2-i.top)}}a.push(i.bottom-i.top)}}function Ga(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(Ge(e.rest[o])>i)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}}function yd(e,t){t=ur(t);var i=Ge(t),n=e.display.externalMeasured=new Ha(e.doc,t,i);n.lineN=i;var o=n.built=Fa(e,n);return n.text=o.pre,B(e.display.lineMeasure,o.pre),n}function Ya(e,t,i,n){return Sr(e,Fn(e,t),i,n)}function Rs(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[vn(e,t)];var i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size)return i}function Fn(e,t){var i=Ge(t),n=Rs(e,i);n&&!n.text?n=null:n&&n.changes&&(Wa(e,n,i,Bs(e)),e.curOp.forceUpdate=!0),n||(n=yd(e,t));var o=Ga(n,t,i);return{line:t,view:n,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function Sr(e,t,i,n,o){t.before&&(i=-1);var a=i+(n||""),f;return t.cache.hasOwnProperty(a)?f=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(md(e,t.view,t.rect),t.hasHeights=!0),f=wd(e,t,i,n),f.bogus||(t.cache[a]=f)),{left:f.left,right:f.right,top:o?f.rtop:f.top,bottom:o?f.rbottom:f.bottom}}var Xa={left:0,right:0,top:0,bottom:0};function $a(e,t,i){for(var n,o,a,f,h,p,g=0;g<e.length;g+=3)if(h=e[g],p=e[g+1],t<h?(o=0,a=1,f="left"):t<p?(o=t-h,a=o+1):(g==e.length-3||t==p&&e[g+3]>t)&&(a=p-h,o=a-1,t>=p&&(f="right")),o!=null){if(n=e[g+2],h==p&&i==(n.insertLeft?"left":"right")&&(f=i),i=="left"&&o==0)for(;g&&e[g-2]==e[g-3]&&e[g-1].insertLeft;)n=e[(g-=3)+2],f="left";if(i=="right"&&o==p-h)for(;g<e.length-3&&e[g+3]==e[g+4]&&!e[g+5].insertLeft;)n=e[(g+=3)+2],f="right";break}return{node:n,start:o,end:a,collapse:f,coverStart:h,coverEnd:p}}function bd(e,t){var i=Xa;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 wd(e,t,i,n){var o=$a(t.map,i,n),a=o.node,f=o.start,h=o.end,p=o.collapse,g;if(a.nodeType==3){for(var k=0;k<4;k++){for(;f&&he(t.line.text.charAt(o.coverStart+f));)--f;for(;o.coverStart+h<o.coverEnd&&he(t.line.text.charAt(o.coverStart+h));)++h;if(y&&x<9&&f==0&&h==o.coverEnd-o.coverStart?g=a.parentNode.getBoundingClientRect():g=bd(V(a,f,h).getClientRects(),n),g.left||g.right||f==0)break;h=f,f=f-1,p="right"}y&&x<11&&(g=xd(e.display.measure,g))}else{f>0&&(p=n="right");var C;e.options.lineWrapping&&(C=a.getClientRects()).length>1?g=C[n=="right"?C.length-1:0]:g=a.getBoundingClientRect()}if(y&&x<9&&!f&&(!g||!g.left&&!g.right)){var R=a.parentNode.getClientRects()[0];R?g={left:R.left,right:R.left+Hn(e.display),top:R.top,bottom:R.bottom}:g=Xa}for(var E=g.top-t.rect.top,U=g.bottom-t.rect.top,Q=(E+U)/2,le=t.view.measure.heights,ge=0;ge<le.length-1&&!(Q<le[ge]);ge++);var ye=ge?le[ge-1]:0,ve=le[ge],xe={left:(p=="right"?g.right:g.left)-t.rect.left,right:(p=="left"?g.left:g.right)-t.rect.left,top:ye,bottom:ve};return!g.left&&!g.right&&(xe.bogus=!0),e.options.singleCursorHeightPerLine||(xe.rtop=E,xe.rbottom=U),xe}function xd(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Kr(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 Za(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 Ja(e){e.display.externalMeasure=null,Ae(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Za(e.display.view[t])}function Pi(e){Ja(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Qa(){return O&&I?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Va(){return O&&I?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Fs(e){var t=ur(e),i=t.widgets,n=0;if(i)for(var o=0;o<i.length;++o)i[o].above&&(n+=Mi(i[o]));return n}function Mo(e,t,i,n,o){if(!o){var a=Fs(t);i.top+=a,i.bottom+=a}if(n=="line")return i;n||(n="local");var f=Ar(t);if(n=="local"?f+=Lo(e.display):f-=e.display.viewOffset,n=="page"||n=="window"){var h=e.display.lineSpace.getBoundingClientRect();f+=h.top+(n=="window"?0:Va());var p=h.left+(n=="window"?0:Qa());i.left+=p,i.right+=p}return i.top+=f,i.bottom+=f,i}function eu(e,t,i){if(i=="div")return t;var n=t.left,o=t.top;if(i=="page")n-=Qa(),o-=Va();else if(i=="local"||!i){var a=e.display.sizer.getBoundingClientRect();n+=a.left,o+=a.top}var f=e.display.lineSpace.getBoundingClientRect();return{left:n-f.left,top:o-f.top}}function Po(e,t,i,n,o){return n||(n=Te(e.doc,t.line)),Mo(e,n,Ya(e,n,t.ch,o),i)}function fr(e,t,i,n,o,a){n=n||Te(e.doc,t.line),o||(o=Fn(e,n));function f(U,Q){var le=Sr(e,o,U,Q?"right":"left",a);return Q?le.left=le.right:le.right=le.left,Mo(e,n,le,i)}var h=ht(n,e.doc.direction),p=t.ch,g=t.sticky;if(p>=n.text.length?(p=n.text.length,g="before"):p<=0&&(p=0,g="after"),!h)return f(g=="before"?p-1:p,g=="before");function k(U,Q,le){var ge=h[Q],ye=ge.level==1;return f(le?U-1:U,ye!=le)}var C=Fe(h,p,g),R=Ue,E=k(p,C,g=="before");return R!=null&&(E.other=k(p,R,g!="before")),E}function tu(e,t){var i=0;t=be(e.doc,t),e.options.lineWrapping||(i=Hn(e.display)*t.ch);var n=Te(e.doc,t.line),o=Ar(n)+Lo(e.display);return{left:i,right:i,top:o,bottom:o+n.height}}function Is(e,t,i,n,o){var a=ie(e,t,i);return a.xRel=o,n&&(a.outside=n),a}function Hs(e,t,i){var n=e.doc;if(i+=e.display.viewOffset,i<0)return Is(n.first,0,null,-1,-1);var o=wr(n,i),a=n.first+n.size-1;if(o>a)return Is(n.first+n.size-1,Te(n,a).text.length,null,1,1);t<0&&(t=0);for(var f=Te(n,o);;){var h=kd(e,f,o,t,i),p=Zh(f,h.ch+(h.xRel>0||h.outside>0?1:0));if(!p)return h;var g=p.find(1);if(g.line==o)return g;f=Te(n,o=g.line)}}function ru(e,t,i,n){n-=Fs(t);var o=t.text.length,a=Ie(function(f){return Sr(e,i,f-1).bottom<=n},o,0);return o=Ie(function(f){return Sr(e,i,f).top>n},a,o),{begin:a,end:o}}function nu(e,t,i,n){i||(i=Fn(e,t));var o=Mo(e,t,Sr(e,i,n),"line").top;return ru(e,t,i,o)}function Ws(e,t,i,n){return e.bottom<=i?!1:e.top>i?!0:(n?e.left:e.right)>t}function kd(e,t,i,n,o){o-=Ar(t);var a=Fn(e,t),f=Fs(t),h=0,p=t.text.length,g=!0,k=ht(t,e.doc.direction);if(k){var C=(e.options.lineWrapping?Cd:Sd)(e,t,i,a,k,n,o);g=C.level!=1,h=g?C.from:C.to-1,p=g?C.to:C.from-1}var R=null,E=null,U=Ie(function(_e){var Ee=Sr(e,a,_e);return Ee.top+=f,Ee.bottom+=f,Ws(Ee,n,o,!1)?(Ee.top<=o&&Ee.left<=n&&(R=_e,E=Ee),!0):!1},h,p),Q,le,ge=!1;if(E){var ye=n-E.left<E.right-n,ve=ye==g;U=R+(ve?0:1),le=ve?"after":"before",Q=ye?E.left:E.right}else{!g&&(U==p||U==h)&&U++,le=U==0?"after":U==t.text.length?"before":Sr(e,a,U-(g?1:0)).bottom+f<=o==g?"after":"before";var xe=fr(e,ie(i,U,le),"line",t,a);Q=xe.left,ge=o<xe.top?-1:o>=xe.bottom?1:0}return U=Me(t.text,U,1),Is(i,U,le,ge,n-Q)}function Sd(e,t,i,n,o,a,f){var h=Ie(function(C){var R=o[C],E=R.level!=1;return Ws(fr(e,ie(i,E?R.to:R.from,E?"before":"after"),"line",t,n),a,f,!0)},0,o.length-1),p=o[h];if(h>0){var g=p.level!=1,k=fr(e,ie(i,g?p.from:p.to,g?"after":"before"),"line",t,n);Ws(k,a,f,!0)&&k.top>f&&(p=o[h-1])}return p}function Cd(e,t,i,n,o,a,f){var h=ru(e,t,n,f),p=h.begin,g=h.end;/\s/.test(t.text.charAt(g-1))&&g--;for(var k=null,C=null,R=0;R<o.length;R++){var E=o[R];if(!(E.from>=g||E.to<=p)){var U=E.level!=1,Q=Sr(e,n,U?Math.min(g,E.to)-1:Math.max(p,E.from)).right,le=Q<a?a-Q+1e9:Q-a;(!k||C>le)&&(k=E,C=le)}}return k||(k=o[o.length-1]),k.from<p&&(k={from:p,to:k.to,level:k.level}),k.to>g&&(k={from:k.from,to:g,level:k.level}),k}var pn;function In(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(pn==null){pn=G("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)pn.appendChild(document.createTextNode("x")),pn.appendChild(G("br"));pn.appendChild(document.createTextNode("x"))}B(e.measure,pn);var i=pn.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),Ae(e.measure),i||1}function Hn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=G("span","xxxxxxxxxx"),i=G("pre",[t],"CodeMirror-line-like");B(e.measure,i);var n=t.getBoundingClientRect(),o=(n.right-n.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function Bs(e){for(var t=e.display,i={},n={},o=t.gutters.clientLeft,a=t.gutters.firstChild,f=0;a;a=a.nextSibling,++f){var h=e.display.gutterSpecs[f].className;i[h]=a.offsetLeft+a.clientLeft+o,n[h]=a.clientWidth}return{fixedPos:Us(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Us(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function iu(e){var t=In(e.display),i=e.options.lineWrapping,n=i&&Math.max(5,e.display.scroller.clientWidth/Hn(e.display)-3);return function(o){if(jr(e.doc,o))return 0;var a=0;if(o.widgets)for(var f=0;f<o.widgets.length;f++)o.widgets[f].height&&(a+=o.widgets[f].height);return i?a+(Math.ceil(o.text.length/n)||1)*t:a+t}}function Ks(e){var t=e.doc,i=iu(e);t.iter(function(n){var o=i(n);o!=n.height&&Kt(n,o)})}function gn(e,t,i,n){var o=e.display;if(!i&&Ur(t).getAttribute("cm-not-content")=="true")return null;var a,f,h=o.lineSpace.getBoundingClientRect();try{a=t.clientX-h.left,f=t.clientY-h.top}catch{return null}var p=Hs(e,a,f),g;if(n&&p.xRel>0&&(g=Te(e.doc,p.line).text).length==p.ch){var k=$e(g,g.length,e.options.tabSize)-g.length;p=ie(p.line,Math.max(0,Math.round((a-qa(e.display).left)/Hn(e.display))-k))}return p}function vn(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 Rt(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)_r&&Es(e.doc,t)<o.viewTo&&Gr(e);else if(i<=o.viewFrom)_r&&Da(e.doc,i+n)>o.viewFrom?Gr(e):(o.viewFrom+=n,o.viewTo+=n);else if(t<=o.viewFrom&&i>=o.viewTo)Gr(e);else if(t<=o.viewFrom){var a=Oo(e,i,i+n,1);a?(o.view=o.view.slice(a.index),o.viewFrom=a.lineN,o.viewTo+=n):Gr(e)}else if(i>=o.viewTo){var f=Oo(e,t,t,-1);f?(o.view=o.view.slice(0,f.index),o.viewTo=f.lineN):Gr(e)}else{var h=Oo(e,t,t,-1),p=Oo(e,i,i+n,1);h&&p?(o.view=o.view.slice(0,h.index).concat(To(e,h.lineN,p.lineN)).concat(o.view.slice(p.index)),o.viewTo+=n):Gr(e)}var g=o.externalMeasured;g&&(i<g.lineN?g.lineN+=n:t<g.lineN+g.size&&(o.externalMeasured=null))}function qr(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[vn(e,t)];if(a.node!=null){var f=a.changes||(a.changes=[]);Z(f,i)==-1&&f.push(i)}}}function Gr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Oo(e,t,i,n){var o=vn(e,t),a,f=e.display.view;if(!_r||i==e.doc.first+e.doc.size)return{index:o,lineN:i};for(var h=e.display.viewFrom,p=0;p<o;p++)h+=f[p].size;if(h!=t){if(n>0){if(o==f.length-1)return null;a=h+f[o].size-t,o++}else a=h-t;t+=a,i+=a}for(;Es(e.doc,i)!=i;){if(o==(n<0?0:f.length-1))return null;i+=n*f[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:i}}function Td(e,t,i){var n=e.display,o=n.view;o.length==0||t>=n.viewTo||i<=n.viewFrom?(n.view=To(e,t,i),n.viewFrom=t):(n.viewFrom>t?n.view=To(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(vn(e,t))),n.viewFrom=t,n.viewTo<i?n.view=n.view.concat(To(e,n.viewTo,i)):n.viewTo>i&&(n.view=n.view.slice(0,vn(e,i)))),n.viewTo=i}function ou(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 Oi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function su(e,t){t===void 0&&(t=!0);var i=e.doc,n={},o=n.cursors=document.createDocumentFragment(),a=n.selection=document.createDocumentFragment(),f=e.options.$customCursor;f&&(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 g=p.empty();if(f){var k=f(e,p);k&&js(e,k,o)}else(g||e.options.showCursorWhenSelecting)&&js(e,p.head,o);g||Ld(e,p,a)}}return n}function js(e,t,i){var n=fr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=i.appendChild(G("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=Po(e,t,"div",null,null),f=a.right-a.left;o.style.width=(f>0?f:e.defaultCharWidth())+"px"}if(n.other){var h=i.appendChild(G("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 Eo(e,t){return e.top-t.top||e.left-t.left}function Ld(e,t,i){var n=e.display,o=e.doc,a=document.createDocumentFragment(),f=qa(e.display),h=f.left,p=Math.max(n.sizerWidth,dn(e)-n.sizer.offsetLeft)-f.right,g=o.direction=="ltr";function k(ve,xe,_e,Ee){xe<0&&(xe=0),xe=Math.round(xe),Ee=Math.round(Ee),a.appendChild(G("div",null,"CodeMirror-selected","position: absolute; left: "+ve+`px;
|
|
6
|
+
top: `+xe+"px; width: "+(_e==null?p-ve:_e)+`px;
|
|
7
|
+
height: `+(Ee-xe)+"px"))}function C(ve,xe,_e){var Ee=Te(o,ve),We=Ee.text.length,et,xt;function lt(dt,Ht){return Po(e,ie(ve,dt),"div",Ee,Ht)}function qt(dt,Ht,Tt){var vt=nu(e,Ee,null,dt),pt=Ht=="ltr"==(Tt=="after")?"left":"right",ft=Tt=="after"?vt.begin:vt.end-(/\s/.test(Ee.text.charAt(vt.end-1))?2:1);return lt(ft,pt)[pt]}var It=ht(Ee,o.direction);return Ve(It,xe||0,_e==null?We:_e,function(dt,Ht,Tt,vt){var pt=Tt=="ltr",ft=lt(dt,pt?"left":"right"),Wt=lt(Ht-1,pt?"right":"left"),Qn=xe==null&&dt==0,Qr=_e==null&&Ht==We,_t=vt==0,Cr=!It||vt==It.length-1;if(Wt.top-ft.top<=3){var kt=(g?Qn:Qr)&&_t,vl=(g?Qr:Qn)&&Cr,Rr=kt?h:(pt?ft:Wt).left,xn=vl?p:(pt?Wt:ft).right;k(Rr,ft.top,xn-Rr,ft.bottom)}else{var kn,Nt,Vn,ml;pt?(kn=g&&Qn&&_t?h:ft.left,Nt=g?p:qt(dt,Tt,"before"),Vn=g?h:qt(Ht,Tt,"after"),ml=g&&Qr&&Cr?p:Wt.right):(kn=g?qt(dt,Tt,"before"):h,Nt=!g&&Qn&&_t?p:ft.right,Vn=!g&&Qr&&Cr?h:Wt.left,ml=g?qt(Ht,Tt,"after"):p),k(kn,ft.top,Nt-kn,ft.bottom),ft.bottom<Wt.top&&k(h,ft.bottom,null,Wt.top),k(Vn,Wt.top,ml-Vn,Wt.bottom)}(!et||Eo(ft,et)<0)&&(et=ft),Eo(Wt,et)<0&&(et=Wt),(!xt||Eo(ft,xt)<0)&&(xt=ft),Eo(Wt,xt)<0&&(xt=Wt)}),{start:et,end:xt}}var R=t.from(),E=t.to();if(R.line==E.line)C(R.line,R.ch,E.ch);else{var U=Te(o,R.line),Q=Te(o,E.line),le=ur(U)==ur(Q),ge=C(R.line,R.ch,le?U.text.length+1:null).end,ye=C(E.line,le?0:null,E.ch).start;le&&(ge.top<ye.top-2?(k(ge.right,ge.top,null,ge.bottom),k(h,ye.top,ye.left,ye.bottom)):k(ge.right,ge.top,ye.left-ge.right,ge.bottom)),ge.bottom<ye.top&&k(h,ge.bottom,null,ye.top)}i.appendChild(a)}function qs(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()||Wn(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function lu(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Ys(e))}function Gs(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Wn(e))},100)}function Ys(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Oe(e,"focus",e,t),e.state.focused=!0,Ne(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),S&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),qs(e))}function Wn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Oe(e,"blur",e,t),e.state.focused=!1,de(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function _o(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,f=0;f<t.view.length;f++){var h=t.view[f],p=e.options.lineWrapping,g=void 0,k=0;if(!h.hidden){if(o+=h.line.height,y&&x<8){var C=h.node.offsetTop+h.node.offsetHeight;g=C-i,i=C}else{var R=h.node.getBoundingClientRect();g=R.bottom-R.top,!p&&h.text.firstChild&&(k=h.text.firstChild.getBoundingClientRect().right-R.left-1)}var E=h.line.height-g;if((E>.005||E<-.005)&&(o<n&&(a-=E),Kt(h.line,g),au(h.line),h.rest))for(var U=0;U<h.rest.length;U++)au(h.rest[U]);if(k>e.display.sizerWidth){var Q=Math.ceil(k/Hn(e.display));Q>e.display.maxLineLength&&(e.display.maxLineLength=Q,e.display.maxLine=h.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function au(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 Ao(e,t,i){var n=i&&i.top!=null?Math.max(0,i.top):e.scroller.scrollTop;n=Math.floor(n-Lo(e));var o=i&&i.bottom!=null?i.bottom:n+e.wrapper.clientHeight,a=wr(t,n),f=wr(t,o);if(i&&i.ensure){var h=i.ensure.from.line,p=i.ensure.to.line;h<a?(a=h,f=wr(t,Ar(Te(t,h))+e.wrapper.clientHeight)):Math.min(p,t.lastLine())>=f&&(a=wr(t,Ar(Te(t,p))-e.wrapper.clientHeight),f=p)}return{from:a,to:Math.max(f,a+1)}}function Md(e,t){if(!st(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&&!ee){var a=G("div","\u200B",null,`position: absolute;
|
|
8
|
+
top: `+(t.top-i.viewOffset-Lo(e.display))+`px;
|
|
9
|
+
height: `+(t.bottom-t.top+kr(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 Pd(e,t,i,n){n==null&&(n=0);var o;!e.options.lineWrapping&&t==i&&(i=t.sticky=="before"?ie(t.line,t.ch+1,"before"):t,t=t.ch?ie(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var f=!1,h=fr(e,t),p=!i||i==t?h:fr(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 g=Xs(e,o),k=e.doc.scrollTop,C=e.doc.scrollLeft;if(g.scrollTop!=null&&(_i(e,g.scrollTop),Math.abs(e.doc.scrollTop-k)>1&&(f=!0)),g.scrollLeft!=null&&(mn(e,g.scrollLeft),Math.abs(e.doc.scrollLeft-C)>1&&(f=!0)),!f)break}return o}function Od(e,t){var i=Xs(e,t);i.scrollTop!=null&&_i(e,i.scrollTop),i.scrollLeft!=null&&mn(e,i.scrollLeft)}function Xs(e,t){var i=e.display,n=In(e.display);t.top<0&&(t.top=0);var o=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,a=Ds(e),f={};t.bottom-t.top>a&&(t.bottom=t.top+a);var h=e.doc.height+zs(i),p=t.top<n,g=t.bottom>h-n;if(t.top<o)f.scrollTop=p?0:t.top;else if(t.bottom>o+a){var k=Math.min(t.top,(g?h:t.bottom)-a);k!=o&&(f.scrollTop=k)}var C=e.options.fixedGutter?0:i.gutters.offsetWidth,R=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-C,E=dn(e)-i.gutters.offsetWidth,U=t.right-t.left>E;return U&&(t.right=t.left+E),t.left<10?f.scrollLeft=0:t.left<R?f.scrollLeft=Math.max(0,t.left+C-(U?0:10)):t.right>E+R-3&&(f.scrollLeft=t.right+(U?0:10)-E),f}function $s(e,t){t!=null&&(No(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Bn(e){No(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ei(e,t,i){(t!=null||i!=null)&&No(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function Ed(e,t){No(e),e.curOp.scrollToPos=t}function No(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=tu(e,t.from),n=tu(e,t.to);uu(e,i,n,t.margin)}}function uu(e,t,i,n){var o=Xs(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});Ei(e,o.scrollLeft,o.scrollTop)}function _i(e,t){Math.abs(e.doc.scrollTop-t)<2||(c||Js(e,{top:t}),fu(e,t,!0),c&&Js(e),zi(e,100))}function fu(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,gu(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Ai(e){var t=e.display,i=t.gutters.offsetWidth,n=Math.round(e.doc.height+zs(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+kr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var yn=function(e,t,i){this.cm=i;var n=this.vert=G("div",[G("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=G("div",[G("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=o.tabIndex=-1,e(n),e(o),Pe(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Pe(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,y&&x<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};yn.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}},yn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},yn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},yn.prototype.zeroWidthHack=function(){var e=H&&!ne?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new q,this.disableVert=new q},yn.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)},yn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ni=function(){};Ni.prototype.update=function(){return{bottom:0,right:0}},Ni.prototype.setScrollLeft=function(){},Ni.prototype.setScrollTop=function(){},Ni.prototype.clear=function(){};function Un(e,t){t||(t=Ai(e));var i=e.display.barWidth,n=e.display.barHeight;cu(e,t);for(var o=0;o<4&&i!=e.display.barWidth||n!=e.display.barHeight;o++)i!=e.display.barWidth&&e.options.lineWrapping&&_o(e),cu(e,Ai(e)),i=e.display.barWidth,n=e.display.barHeight}function cu(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 hu={native:yn,null:Ni};function du(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&de(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new hu[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Pe(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):_i(e,t)},e),e.display.scrollbars.addClass&&Ne(e.display.wrapper,e.display.scrollbars.addClass)}var _d=0;function bn(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:++_d,markArrays:null},ad(e.curOp)}function wn(e){var t=e.curOp;t&&fd(t,function(i){for(var n=0;n<i.ops.length;n++)i.ops[n].cm.curOp=null;Ad(i)})}function Ad(e){for(var t=e.ops,i=0;i<t.length;i++)Nd(t[i]);for(var n=0;n<t.length;n++)zd(t[n]);for(var o=0;o<t.length;o++)Dd(t[o]);for(var a=0;a<t.length;a++)Rd(t[a]);for(var f=0;f<t.length;f++)Fd(t[f])}function Nd(e){var t=e.cm,i=t.display;Hd(t),e.updateMaxLine&&As(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 zo(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function zd(e){e.updatedDisplay=e.mustUpdate&&Zs(e.cm,e.update)}function Dd(e){var t=e.cm,i=t.display;e.updatedDisplay&&_o(t),e.barMeasure=Ai(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ya(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+kr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-dn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function Rd(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==ae();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,i),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Un(t,e.barMeasure),e.updatedDisplay&&Vs(t,e.barMeasure),e.selectionChanged&&qs(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),i&&lu(e.cm)}function Fd(e){var t=e.cm,i=t.display,n=t.doc;if(e.updatedDisplay&&pu(t,e.update),i.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(i.wheelStartX=i.wheelStartY=null),e.scrollTop!=null&&fu(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&mn(t,e.scrollLeft,!0,!0),e.scrollToPos){var o=Pd(t,be(n,e.scrollToPos.from),be(n,e.scrollToPos.to),e.scrollToPos.margin);Md(t,o)}var a=e.maybeHiddenMarkers,f=e.maybeUnhiddenMarkers;if(a)for(var h=0;h<a.length;++h)a[h].lines.length||Oe(a[h],"hide");if(f)for(var p=0;p<f.length;++p)f[p].lines.length&&Oe(f[p],"unhide");i.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Oe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function jt(e,t){if(e.curOp)return t();bn(e);try{return t()}finally{wn(e)}}function bt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);bn(e);try{return t.apply(e,arguments)}finally{wn(e)}}}function At(e){return function(){if(this.curOp)return e.apply(this,arguments);bn(this);try{return e.apply(this,arguments)}finally{wn(this)}}}function wt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);bn(t);try{return e.apply(this,arguments)}finally{wn(t)}}}function zi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,it(Id,e))}function Id(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var i=+new Date+e.options.workTime,n=Si(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 f=a.styles,h=a.text.length>e.options.maxHighlightLength?Qt(t.mode,n.state):null,p=xa(e,a,n,!0);h&&(n.state=h),a.styles=p.styles;var g=a.styleClasses,k=p.classes;k?a.styleClasses=k:g&&(a.styleClasses=null);for(var C=!f||f.length!=a.styles.length||g!=k&&(!g||!k||g.bgClass!=k.bgClass||g.textClass!=k.textClass),R=0;!C&&R<f.length;++R)C=f[R]!=a.styles[R];C&&o.push(n.line),a.stateAfter=n.save(),n.nextLine()}else a.text.length<=e.options.maxHighlightLength&&Ls(e,a.text,n),a.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>i)return zi(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++)qr(e,o[a],"text")})}}var zo=function(e,t,i){var n=e.display;this.viewport=t,this.visible=Ao(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=dn(e),this.force=i,this.dims=Bs(e),this.events=[]};zo.prototype.signal=function(e,t){Ct(e,t)&&this.events.push(arguments)},zo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Oe.apply(null,this.events[e])};function Hd(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=kr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=kr(e)+"px",t.scrollbarsClipped=!0)}function Wd(e){if(e.hasFocus())return null;var t=ae();if(!t||!X(e.display.lineDiv,t))return null;var i={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&X(e.display.lineDiv,n.anchorNode)&&(i.anchorNode=n.anchorNode,i.anchorOffset=n.anchorOffset,i.focusNode=n.focusNode,i.focusOffset=n.focusOffset)}return i}function Bd(e){if(!(!e||!e.activeElt||e.activeElt==ae())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&X(document.body,e.anchorNode)&&X(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 Zs(e,t){var i=e.display,n=e.doc;if(t.editorIsHidden)return Gr(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&&ou(e)==0)return!1;vu(e)&&(Gr(e),t.dims=Bs(e));var o=n.first+n.size,a=Math.max(t.visible.from-e.options.viewportMargin,n.first),f=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>f&&i.viewTo-f<20&&(f=Math.min(o,i.viewTo)),_r&&(a=Es(e.doc,a),f=Da(e.doc,f));var h=a!=i.viewFrom||f!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;Td(e,a,f),i.viewOffset=Ar(Te(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var p=ou(e);if(!h&&p==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var g=Wd(e);return p>4&&(i.lineDiv.style.display="none"),Ud(e,i.updateLineNumbers,t.dims),p>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Bd(g),Ae(i.cursorDiv),Ae(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,h&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,zi(e,400)),i.updateLineNumbers=null,!0}function pu(e,t){for(var i=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==dn(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+zs(e.display)-Ds(e),i.top)}),t.visible=Ao(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Ao(e.display,e.doc,i));if(!Zs(e,t))break;_o(e);var o=Ai(e);Oi(e),Un(e,o),Vs(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 Js(e,t){var i=new zo(e,t);if(Zs(e,i)){_o(e),pu(e,i);var n=Ai(e);Oi(e),Un(e,n),Vs(e,n),i.finish()}}function Ud(e,t,i){var n=e.display,o=e.options.lineNumbers,a=n.lineDiv,f=a.firstChild;function h(U){var Q=U.nextSibling;return S&&H&&e.display.currentWheelTarget==U?U.style.display="none":U.parentNode.removeChild(U),Q}for(var p=n.view,g=n.viewFrom,k=0;k<p.length;k++){var C=p[k];if(!C.hidden)if(!C.node||C.node.parentNode!=a){var R=gd(e,C,g,i);a.insertBefore(R,f)}else{for(;f!=C.node;)f=h(f);var E=o&&t!=null&&t<=g&&C.lineNumber;C.changes&&(Z(C.changes,"gutter")>-1&&(E=!1),Wa(e,C,g,i)),E&&(Ae(C.lineNumber),C.lineNumber.appendChild(document.createTextNode(ki(e.options,g)))),f=C.node.nextSibling}g+=C.size}for(;f;)f=h(f)}function Qs(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",yt(e,"gutterChanged",e)}function Vs(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+kr(e)+"px"}function gu(e){var t=e.display,i=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var n=Us(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,a=n+"px",f=0;f<i.length;f++)if(!i[f].hidden){e.options.fixedGutter&&(i[f].gutter&&(i[f].gutter.style.left=a),i[f].gutterBackground&&(i[f].gutterBackground.style.left=a));var h=i[f].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 vu(e){if(!e.options.lineNumbers)return!1;var t=e.doc,i=ki(e.options,t.first+t.size-1),n=e.display;if(i.length!=n.lineNumChars){var o=n.measure.appendChild(G("div",[G("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=o.firstChild.offsetWidth,f=o.offsetWidth-a;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(a,n.lineGutter.offsetWidth-f)+1,n.lineNumWidth=n.lineNumInnerWidth+f,n.lineNumChars=n.lineNumInnerWidth?i.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",Qs(e.display),!0}return!1}function el(e,t){for(var i=[],n=!1,o=0;o<e.length;o++){var a=e[o],f=null;if(typeof a!="string"&&(f=a.style,a=a.className),a=="CodeMirror-linenumbers")if(t)n=!0;else continue;i.push({className:a,style:f})}return t&&!n&&i.push({className:"CodeMirror-linenumbers",style:null}),i}function mu(e){var t=e.gutters,i=e.gutterSpecs;Ae(t),e.lineGutter=null;for(var n=0;n<i.length;++n){var o=i[n],a=o.className,f=o.style,h=t.appendChild(G("div",null,"CodeMirror-gutter "+a));f&&(h.style.cssText=f),a=="CodeMirror-linenumbers"&&(e.lineGutter=h,h.style.width=(e.lineNumWidth||1)+"px")}t.style.display=i.length?"":"none",Qs(e)}function Di(e){mu(e.display),Rt(e),gu(e)}function Kd(e,t,i,n){var o=this;this.input=i,o.scrollbarFiller=G("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=G("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=w("div",null,"CodeMirror-code"),o.selectionDiv=G("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=G("div",null,"CodeMirror-cursors"),o.measure=G("div",null,"CodeMirror-measure"),o.lineMeasure=G("div",null,"CodeMirror-measure"),o.lineSpace=w("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var a=w("div",[o.lineSpace],"CodeMirror-lines");o.mover=G("div",[a],null,"position: relative"),o.sizer=G("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=G("div",null,null,"position: absolute; height: "+K+"px; width: 1px;"),o.gutters=G("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=G("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=G("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),!S&&!(c&&D)&&(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=el(n.gutters,n.lineNumbers),mu(o),i.init(o)}var Do=0,zr=null;y?zr=-.53:c?zr=15:O?zr=-.7:j&&(zr=-1/3);function yu(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 jd(e){var t=yu(e);return t.x*=zr,t.y*=zr,t}function bu(e,t){var i=yu(t),n=i.x,o=i.y,a=zr;t.deltaMode===0&&(n=t.deltaX,o=t.deltaY,a=1);var f=e.display,h=f.scroller,p=h.scrollWidth>h.clientWidth,g=h.scrollHeight>h.clientHeight;if(!!(n&&p||o&&g)){if(o&&H&&S){e:for(var k=t.target,C=f.view;k!=h;k=k.parentNode)for(var R=0;R<C.length;R++)if(C[R].node==k){e.display.currentWheelTarget=k;break e}}if(n&&!c&&!z&&a!=null){o&&g&&_i(e,Math.max(0,h.scrollTop+o*a)),mn(e,Math.max(0,h.scrollLeft+n*a)),(!o||o&&g)&&Pt(t),f.wheelStartX=null;return}if(o&&a!=null){var E=o*a,U=e.doc.scrollTop,Q=U+f.wrapper.clientHeight;E<0?U=Math.max(0,U+E-50):Q=Math.min(e.doc.height,Q+E+50),Js(e,{top:U,bottom:Q})}Do<20&&t.deltaMode!==0&&(f.wheelStartX==null?(f.wheelStartX=h.scrollLeft,f.wheelStartY=h.scrollTop,f.wheelDX=n,f.wheelDY=o,setTimeout(function(){if(f.wheelStartX!=null){var le=h.scrollLeft-f.wheelStartX,ge=h.scrollTop-f.wheelStartY,ye=ge&&f.wheelDY&&ge/f.wheelDY||le&&f.wheelDX&&le/f.wheelDX;f.wheelStartX=f.wheelStartY=null,ye&&(zr=(zr*Do+ye)/(Do+1),++Do)}},200)):(f.wheelDX+=n,f.wheelDY+=o))}}var er=function(e,t){this.ranges=e,this.primIndex=t};er.prototype.primary=function(){return this.ranges[this.primIndex]},er.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(!M(i.anchor,n.anchor)||!M(i.head,n.head))return!1}return!0},er.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Ye($(this.ranges[t].anchor),$(this.ranges[t].head));return new er(e,this.primIndex)},er.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},er.prototype.contains=function(e,t){t||(t=e);for(var i=0;i<this.ranges.length;i++){var n=this.ranges[i];if(v(t,n.from())>=0&&v(e,n.to())<=0)return i}return-1};var Ye=function(e,t){this.anchor=e,this.head=t};Ye.prototype.from=function(){return De(this.anchor,this.head)},Ye.prototype.to=function(){return se(this.anchor,this.head)},Ye.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function cr(e,t,i){var n=e&&e.options.selectionsMayTouch,o=t[i];t.sort(function(R,E){return v(R.from(),E.from())}),i=Z(t,o);for(var a=1;a<t.length;a++){var f=t[a],h=t[a-1],p=v(h.to(),f.from());if(n&&!f.empty()?p>0:p>=0){var g=De(h.from(),f.from()),k=se(h.to(),f.to()),C=h.empty()?f.from()==f.head:h.from()==h.head;a<=i&&--i,t.splice(--a,2,new Ye(C?k:g,C?g:k))}}return new er(t,i)}function Yr(e,t){return new er([new Ye(e,t||e)],0)}function Xr(e){return e.text?ie(e.from.line+e.text.length-1,F(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function wu(e,t){if(v(e,t.from)<0)return e;if(v(e,t.to)<=0)return Xr(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+=Xr(t).ch-t.to.ch),ie(i,n)}function tl(e,t){for(var i=[],n=0;n<e.sel.ranges.length;n++){var o=e.sel.ranges[n];i.push(new Ye(wu(o.anchor,t),wu(o.head,t)))}return cr(e.cm,i,e.sel.primIndex)}function xu(e,t,i){return e.line==t.line?ie(i.line,e.ch-t.ch+i.ch):ie(i.line+(e.line-t.line),e.ch)}function qd(e,t,i){for(var n=[],o=ie(e.first,0),a=o,f=0;f<t.length;f++){var h=t[f],p=xu(h.from,o,a),g=xu(Xr(h),o,a);if(o=h.to,a=g,i=="around"){var k=e.sel.ranges[f],C=v(k.head,k.anchor)<0;n[f]=new Ye(C?g:p,C?p:g)}else n[f]=new Ye(p,p)}return new er(n,e.sel.primIndex)}function rl(e){e.doc.mode=Nn(e.options,e.doc.modeOption),Ri(e)}function Ri(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,zi(e,100),e.state.modeGen++,e.curOp&&Rt(e)}function ku(e,t){return t.from.ch==0&&t.to.ch==0&&F(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function nl(e,t,i,n){function o(ye){return i?i[ye]:null}function a(ye,ve,xe){Vh(ye,ve,xe,n),yt(ye,"change",ye,t)}function f(ye,ve){for(var xe=[],_e=ye;_e<ve;++_e)xe.push(new Dn(g[_e],o(_e),n));return xe}var h=t.from,p=t.to,g=t.text,k=Te(e,h.line),C=Te(e,p.line),R=F(g),E=o(g.length-1),U=p.line-h.line;if(t.full)e.insert(0,f(0,g.length)),e.remove(g.length,e.size-g.length);else if(ku(e,t)){var Q=f(0,g.length-1);a(C,C.text,E),U&&e.remove(h.line,U),Q.length&&e.insert(h.line,Q)}else if(k==C)if(g.length==1)a(k,k.text.slice(0,h.ch)+R+k.text.slice(p.ch),E);else{var le=f(1,g.length-1);le.push(new Dn(R+k.text.slice(p.ch),E,n)),a(k,k.text.slice(0,h.ch)+g[0],o(0)),e.insert(h.line+1,le)}else if(g.length==1)a(k,k.text.slice(0,h.ch)+g[0]+C.text.slice(p.ch),o(0)),e.remove(h.line+1,U);else{a(k,k.text.slice(0,h.ch)+g[0],o(0)),a(C,R+C.text.slice(p.ch),E);var ge=f(1,g.length-1);U>1&&e.remove(h.line+1,U-1),e.insert(h.line+1,ge)}yt(e,"change",e,t)}function $r(e,t,i){function n(o,a,f){if(o.linked)for(var h=0;h<o.linked.length;++h){var p=o.linked[h];if(p.doc!=a){var g=f&&p.sharedHist;i&&!g||(t(p.doc,g),n(p.doc,o,g))}}}n(e,null,!0)}function Su(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Ks(e),rl(e),Cu(e),e.options.direction=t.direction,e.options.lineWrapping||As(e),e.options.mode=t.modeOption,Rt(e)}function Cu(e){(e.doc.direction=="rtl"?Ne:de)(e.display.lineDiv,"CodeMirror-rtl")}function Gd(e){jt(e,function(){Cu(e),Rt(e)})}function Ro(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 il(e,t){var i={from:$(t.from),to:Xr(t),text:br(e,t.from,t.to)};return Mu(e,i,t.from.line,t.to.line+1),$r(e,function(n){return Mu(n,i,t.from.line,t.to.line+1)},!0),i}function Tu(e){for(;e.length;){var t=F(e);if(t.ranges)e.pop();else break}}function Yd(e,t){if(t)return Tu(e.done),F(e.done);if(e.done.length&&!F(e.done).ranges)return F(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),F(e.done)}function Lu(e,t,i,n){var o=e.history;o.undone.length=0;var a=+new Date,f,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)=="*"))&&(f=Yd(o,o.lastOp==n)))h=F(f.changes),v(t.from,t.to)==0&&v(t.from,h.to)==0?h.to=Xr(t):f.changes.push(il(e,t));else{var p=F(o.done);for((!p||!p.ranges)&&Fo(e.sel,o.done),f={changes:[il(e,t)],generation:o.generation},o.done.push(f);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||Oe(e,"historyAdded")}function Xd(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 $d(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||Xd(e,a,F(o.done),t))?o.done[o.done.length-1]=t:Fo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=a,o.lastSelOp=i,n&&n.clearRedo!==!1&&Tu(o.undone)}function Fo(e,t){var i=F(t);i&&i.ranges&&i.equals(e)||t.push(e)}function Mu(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(f){f.markedSpans&&((o||(o=t["spans_"+e.id]={}))[a]=f.markedSpans),++a})}function Zd(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 Jd(e,t){var i=t["spans_"+e.id];if(!i)return null;for(var n=[],o=0;o<t.text.length;++o)n.push(Zd(i[o]));return n}function Pu(e,t){var i=Jd(e,t),n=Ps(e,t);if(!i)return n;if(!n)return i;for(var o=0;o<i.length;++o){var a=i[o],f=n[o];if(a&&f){e:for(var h=0;h<f.length;++h){for(var p=f[h],g=0;g<a.length;++g)if(a[g].marker==p.marker)continue e;a.push(p)}}else f&&(i[o]=f)}return i}function Kn(e,t,i){for(var n=[],o=0;o<e.length;++o){var a=e[o];if(a.ranges){n.push(i?er.prototype.deepCopy.call(a):a);continue}var f=a.changes,h=[];n.push({changes:h});for(var p=0;p<f.length;++p){var g=f[p],k=void 0;if(h.push({from:g.from,to:g.to,text:g.text}),t)for(var C in g)(k=C.match(/^spans_(\d+)$/))&&Z(t,Number(k[1]))>-1&&(F(h)[C]=g[C],delete g[C])}}return n}function ol(e,t,i,n){if(n){var o=e.anchor;if(i){var a=v(t,o)<0;a!=v(i,o)<0?(o=t,t=i):a!=v(t,i)<0&&(t=i)}return new Ye(o,t)}else return new Ye(i||t,t)}function Io(e,t,i,n,o){o==null&&(o=e.cm&&(e.cm.display.shift||e.extend)),Et(e,new er([ol(e.sel.primary(),t,i,o)],0),n)}function Ou(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]=ol(e.sel.ranges[a],t[a],null,o);var f=cr(e.cm,n,e.sel.primIndex);Et(e,f,i)}function sl(e,t,i,n){var o=e.sel.ranges.slice(0);o[t]=i,Et(e,cr(e.cm,o,e.sel.primIndex),n)}function Eu(e,t,i,n){Et(e,Yr(t,i),n)}function Qd(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 Ye(be(e,o[a].anchor),be(e,o[a].head))},origin:i&&i.origin};return Oe(e,"beforeSelectionChange",e,n),e.cm&&Oe(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?cr(e.cm,n.ranges,n.ranges.length-1):t}function _u(e,t,i){var n=e.history.done,o=F(n);o&&o.ranges?(n[n.length-1]=t,Ho(e,t,i)):Et(e,t,i)}function Et(e,t,i){Ho(e,t,i),$d(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}function Ho(e,t,i){(Ct(e,"beforeSelectionChange")||e.cm&&Ct(e.cm,"beforeSelectionChange"))&&(t=Qd(e,t,i));var n=i&&i.bias||(v(t.primary().head,e.sel.primary().head)<0?-1:1);Au(e,zu(e,t,n,!0)),!(i&&i.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Bn(e.cm)}function Au(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,En(e.cm)),yt(e,"cursorActivity",e))}function Nu(e){Au(e,zu(e,e.sel,null,!1))}function zu(e,t,i,n){for(var o,a=0;a<t.ranges.length;a++){var f=t.ranges[a],h=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],p=Wo(e,f.anchor,h&&h.anchor,i,n),g=Wo(e,f.head,h&&h.head,i,n);(o||p!=f.anchor||g!=f.head)&&(o||(o=t.ranges.slice(0,a)),o[a]=new Ye(p,g))}return o?cr(e.cm,o,t.primIndex):t}function jn(e,t,i,n,o){var a=Te(e,t.line);if(a.markedSpans)for(var f=0;f<a.markedSpans.length;++f){var h=a.markedSpans[f],p=h.marker,g="selectLeft"in p?!p.selectLeft:p.inclusiveLeft,k="selectRight"in p?!p.selectRight:p.inclusiveRight;if((h.from==null||(g?h.from<=t.ch:h.from<t.ch))&&(h.to==null||(k?h.to>=t.ch:h.to>t.ch))){if(o&&(Oe(p,"beforeCursorEnter"),p.explicitlyCleared))if(a.markedSpans){--f;continue}else break;if(!p.atomic)continue;if(i){var C=p.find(n<0?1:-1),R=void 0;if((n<0?k:g)&&(C=Du(e,C,-n,C&&C.line==t.line?a:null)),C&&C.line==t.line&&(R=v(C,i))&&(n<0?R<0:R>0))return jn(e,C,t,n,o)}var E=p.find(n<0?-1:1);return(n<0?g:k)&&(E=Du(e,E,n,E.line==t.line?a:null)),E?jn(e,E,t,n,o):null}}return t}function Wo(e,t,i,n,o){var a=n||1,f=jn(e,t,i,a,o)||!o&&jn(e,t,i,a,!0)||jn(e,t,i,-a,o)||!o&&jn(e,t,i,-a,!0);return f||(e.cantEdit=!0,ie(e.first,0))}function Du(e,t,i,n){return i<0&&t.ch==0?t.line>e.first?be(e,ie(t.line-1)):null:i>0&&t.ch==(n||Te(e,t.line)).text.length?t.line<e.first+e.size-1?ie(t.line+1,0):null:new ie(t.line,t.ch+i)}function Ru(e){e.setSelection(ie(e.firstLine(),0),ie(e.lastLine()),Ce)}function Fu(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,f,h){o&&(n.from=be(e,o)),a&&(n.to=be(e,a)),f&&(n.text=f),h!==void 0&&(n.origin=h)}),Oe(e,"beforeChange",e,n),e.cm&&Oe(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 qn(e,t,i){if(e.cm){if(!e.cm.curOp)return bt(e.cm,qn)(e,t,i);if(e.cm.state.suppressEdits)return}if(!((Ct(e,"beforeChange")||e.cm&&Ct(e.cm,"beforeChange"))&&(t=Fu(e,t,!0),!t))){var n=Pa&&!i&&$h(e,t.from,t.to);if(n)for(var o=n.length-1;o>=0;--o)Iu(e,{from:n[o].from,to:n[o].to,text:o?[""]:t.text,origin:t.origin});else Iu(e,t)}}function Iu(e,t){if(!(t.text.length==1&&t.text[0]==""&&v(t.from,t.to)==0)){var i=tl(e,t);Lu(e,t,i,e.cm?e.cm.curOp.id:NaN),Fi(e,t,i,Ps(e,t));var n=[];$r(e,function(o,a){!a&&Z(n,o.history)==-1&&(Uu(o.history,t),n.push(o.history)),Fi(o,t,null,Ps(o,t))})}}function Bo(e,t,i){var n=e.cm&&e.cm.state.suppressEdits;if(!(n&&!i)){for(var o=e.history,a,f=e.sel,h=t=="undo"?o.done:o.undone,p=t=="undo"?o.undone:o.done,g=0;g<h.length&&(a=h[g],!(i?a.ranges&&!a.equals(e.sel):!a.ranges));g++);if(g!=h.length){for(o.lastOrigin=o.lastSelOrigin=null;;)if(a=h.pop(),a.ranges){if(Fo(a,p),i&&!a.equals(e.sel)){Et(e,a,{clearRedo:!1});return}f=a}else if(n){h.push(a);return}else break;var k=[];Fo(f,p),p.push({changes:k,generation:o.generation}),o.generation=a.generation||++o.maxGeneration;for(var C=Ct(e,"beforeChange")||e.cm&&Ct(e.cm,"beforeChange"),R=function(Q){var le=a.changes[Q];if(le.origin=t,C&&!Fu(e,le,!1))return h.length=0,{};k.push(il(e,le));var ge=Q?tl(e,le):F(h);Fi(e,le,ge,Pu(e,le)),!Q&&e.cm&&e.cm.scrollIntoView({from:le.from,to:Xr(le)});var ye=[];$r(e,function(ve,xe){!xe&&Z(ye,ve.history)==-1&&(Uu(ve.history,le),ye.push(ve.history)),Fi(ve,le,null,Pu(ve,le))})},E=a.changes.length-1;E>=0;--E){var U=R(E);if(U)return U.v}}}}function Hu(e,t){if(t!=0&&(e.first+=t,e.sel=new er(Y(e.sel.ranges,function(o){return new Ye(ie(o.anchor.line+t,o.anchor.ch),ie(o.head.line+t,o.head.ch))}),e.sel.primIndex),e.cm)){Rt(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,n=i.viewFrom;n<i.viewTo;n++)qr(e.cm,n,"gutter")}}function Fi(e,t,i,n){if(e.cm&&!e.cm.curOp)return bt(e.cm,Fi)(e,t,i,n);if(t.to.line<e.first){Hu(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);Hu(e,o),t={from:ie(e.first,0),to:ie(t.to.line+o,t.to.ch),text:[F(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:ie(a,Te(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=br(e,t.from,t.to),i||(i=tl(e,t)),e.cm?Vd(e.cm,t,n):nl(e,t,n),Ho(e,i,Ce),e.cantEdit&&Wo(e,ie(e.firstLine(),0))&&(e.cantEdit=!1)}}function Vd(e,t,i){var n=e.doc,o=e.display,a=t.from,f=t.to,h=!1,p=a.line;e.options.lineWrapping||(p=Ge(ur(Te(n,a.line))),n.iter(p,f.line+1,function(E){if(E==o.maxLine)return h=!0,!0})),n.sel.contains(t.from,t.to)>-1&&En(e),nl(n,t,i,iu(e)),e.options.lineWrapping||(n.iter(p,a.line+t.text.length,function(E){var U=Co(E);U>o.maxLineLength&&(o.maxLine=E,o.maxLineLength=U,o.maxLineChanged=!0,h=!1)}),h&&(e.curOp.updateMaxLine=!0)),Uh(n,a.line),zi(e,400);var g=t.text.length-(f.line-a.line)-1;t.full?Rt(e):a.line==f.line&&t.text.length==1&&!ku(e.doc,t)?qr(e,a.line,"text"):Rt(e,a.line,f.line+1,g);var k=Ct(e,"changes"),C=Ct(e,"change");if(C||k){var R={from:a,to:f,text:t.text,removed:t.removed,origin:t.origin};C&&yt(e,"change",e,R),k&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(R)}e.display.selForContextMenu=null}function Gn(e,t,i,n,o){var a;n||(n=i),v(n,i)<0&&(a=[n,i],i=a[0],n=a[1]),typeof t=="string"&&(t=e.splitLines(t)),qn(e,{from:i,to:n,text:t,origin:o})}function Wu(e,t,i,n){i<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Bu(e,t,i,n){for(var o=0;o<e.length;++o){var a=e[o],f=!0;if(a.ranges){a.copied||(a=e[o]=a.deepCopy(),a.copied=!0);for(var h=0;h<a.ranges.length;h++)Wu(a.ranges[h].anchor,t,i,n),Wu(a.ranges[h].head,t,i,n);continue}for(var p=0;p<a.changes.length;++p){var g=a.changes[p];if(i<g.from.line)g.from=ie(g.from.line+n,g.from.ch),g.to=ie(g.to.line+n,g.to.ch);else if(t<=g.to.line){f=!1;break}}f||(e.splice(0,o+1),o=0)}}function Uu(e,t){var i=t.from.line,n=t.to.line,o=t.text.length-(n-i)-1;Bu(e.done,i,n,o),Bu(e.undone,i,n,o)}function Ii(e,t,i,n){var o=t,a=t;return typeof t=="number"?a=Te(e,je(e,t)):o=Ge(t),o==null?null:(n(a,o)&&e.cm&&qr(e.cm,o,i),a)}function Hi(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}Hi.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,ed(o),yt(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 Wi(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}Wi.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),f=n.height;if(n.removeInner(e,a),this.height-=f-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 Hi))){var h=[];this.collapse(h),this.children=[new Hi(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 f=o.lines.length%25+25,h=f;h<o.lines.length;){var p=new Hi(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,f),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 Wi(t);if(e.parent){e.size-=i.size,e.height-=i.height;var o=Z(e.parent.children,e);e.parent.children.splice(o+1,0,i)}else{var n=new Wi(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 f=Math.min(t,a-e);if(o.iterN(e,f,i))return!0;if((t-=f)==0)break;e=0}else e-=a}}};var Bi=function(e,t,i){if(i)for(var n in i)i.hasOwnProperty(n)&&(this[n]=i[n]);this.doc=e,this.node=t};Bi.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,i=this.line,n=Ge(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=Mi(this);Kt(i,Math.max(0,i.height-a)),e&&(jt(e,function(){Ku(e,i,-a),qr(e,n,"widget")}),yt(e,"lineWidgetCleared",e,this,n))}},Bi.prototype.changed=function(){var e=this,t=this.height,i=this.doc.cm,n=this.line;this.height=null;var o=Mi(this)-t;!o||(jr(this.doc,n)||Kt(n,n.height+o),i&&jt(i,function(){i.curOp.forceUpdate=!0,Ku(i,n,o),yt(i,"lineWidgetChanged",i,e,Ge(n))}))},mr(Bi);function Ku(e,t,i){Ar(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&$s(e,i)}function ep(e,t,i,n){var o=new Bi(e,i,n),a=e.cm;return a&&o.noHScroll&&(a.display.alignWidgets=!0),Ii(e,t,"widget",function(f){var h=f.widgets||(f.widgets=[]);if(o.insertAt==null?h.push(o):h.splice(Math.min(h.length,Math.max(0,o.insertAt)),0,o),o.line=f,a&&!jr(e,f)){var p=Ar(f)<e.scrollTop;Kt(f,f.height+Mi(o)),p&&$s(a,o.height),a.curOp.forceUpdate=!0}return!0}),a&&yt(a,"lineWidgetAdded",a,o,typeof t=="number"?t:Ge(t)),o}var ju=0,Zr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ju};Zr.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&bn(e),Ct(this,"clear")){var i=this.find();i&&yt(this,"clear",i.from,i.to)}for(var n=null,o=null,a=0;a<this.lines.length;++a){var f=this.lines[a],h=Ci(f.markedSpans,this);e&&!this.collapsed?qr(e,Ge(f),"text"):e&&(h.to!=null&&(o=Ge(f)),h.from!=null&&(n=Ge(f))),f.markedSpans=qh(f.markedSpans,h),h.from==null&&this.collapsed&&!jr(this.doc,f)&&e&&Kt(f,In(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var p=0;p<this.lines.length;++p){var g=ur(this.lines[p]),k=Co(g);k>e.display.maxLineLength&&(e.display.maxLine=g,e.display.maxLineLength=k,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Rt(e,n,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Nu(e.doc)),e&&yt(e,"markerCleared",e,this,n,o),t&&wn(e),this.parent&&this.parent.clear()}},Zr.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],f=Ci(a.markedSpans,this);if(f.from!=null&&(i=ie(t?a:Ge(a),f.from),e==-1))return i;if(f.to!=null&&(n=ie(t?a:Ge(a),f.to),e==1))return n}return i&&{from:i,to:n}},Zr.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=Ge(t.line),f=Rs(n,a);if(f&&(Za(f),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!jr(i.doc,o)&&i.height!=null){var h=i.height;i.height=null;var p=Mi(i)-h;p&&Kt(o,o.height+p)}yt(n,"markerChanged",n,e)})},Zr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||Z(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Zr.prototype.detachLine=function(e){if(this.lines.splice(Z(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},mr(Zr);function Yn(e,t,i,n,o){if(n&&n.shared)return tp(e,t,i,n,o);if(e.cm&&!e.cm.curOp)return bt(e.cm,Yn)(e,t,i,n,o);var a=new Zr(e,o),f=v(t,i);if(n&&Re(n,a,!1),f>0||f==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=w("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(za(e,t.line,t,i,a)||t.line!=i.line&&za(e,i.line,t,i,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");jh()}a.addToHistory&&Lu(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var h=t.line,p=e.cm,g;if(e.iter(h,i.line+1,function(C){p&&a.collapsed&&!p.options.lineWrapping&&ur(C)==p.display.maxLine&&(g=!0),a.collapsed&&h!=t.line&&Kt(C,0),Gh(C,new wo(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(C){jr(e,C)&&Kt(C,0)}),a.clearOnEnter&&Pe(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Kh(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++ju,a.atomic=!0),p){if(g&&(p.curOp.updateMaxLine=!0),a.collapsed)Rt(p,t.line,i.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var k=t.line;k<=i.line;k++)qr(p,k,"text");a.atomic&&Nu(p.doc),yt(p,"markerAdded",p,a)}return a}var Ui=function(e,t){this.markers=e,this.primary=t;for(var i=0;i<e.length;++i)e[i].parent=this};Ui.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();yt(this,"clear")}},Ui.prototype.find=function(e,t){return this.primary.find(e,t)},mr(Ui);function tp(e,t,i,n,o){n=Re(n),n.shared=!1;var a=[Yn(e,t,i,n,o)],f=a[0],h=n.widgetNode;return $r(e,function(p){h&&(n.widgetNode=h.cloneNode(!0)),a.push(Yn(p,be(p,t),be(p,i),n,o));for(var g=0;g<p.linked.length;++g)if(p.linked[g].isParent)return;f=F(a)}),new Ui(a,f)}function qu(e){return e.findMarks(ie(e.first,0),e.clipPos(ie(e.lastLine())),function(t){return t.parent})}function rp(e,t){for(var i=0;i<t.length;i++){var n=t[i],o=n.find(),a=e.clipPos(o.from),f=e.clipPos(o.to);if(v(a,f)){var h=Yn(e,a,f,n.primary,n.primary.type);n.markers.push(h),h.parent=n}}}function np(e){for(var t=function(n){var o=e[n],a=[o.primary.doc];$r(o.primary.doc,function(p){return a.push(p)});for(var f=0;f<o.markers.length;f++){var h=o.markers[f];Z(a,h.doc)==-1&&(h.parent=null,o.markers.splice(f--,1))}},i=0;i<e.length;i++)t(i)}var ip=0,Ft=function(e,t,i,n,o){if(!(this instanceof Ft))return new Ft(e,t,i,n,o);i==null&&(i=0),Wi.call(this,[new Hi([new Dn("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var a=ie(i,0);this.sel=Yr(a),this.history=new Ro(null),this.id=++ip,this.modeOption=t,this.lineSep=n,this.direction=o=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),nl(this,{from:a,to:a,text:e}),Et(this,Yr(a),Ce)};Ft.prototype=ue(Wi.prototype,{constructor:Ft,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=xi(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:wt(function(e){var t=ie(this.first,0),i=this.first+this.size-1;qn(this,{from:t,to:ie(i,Te(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ei(this.cm,0,0),Et(this,Yr(t),Ce)}),replaceRange:function(e,t,i,n){t=be(this,t),i=i?be(this,i):t,Gn(this,e,t,i,n)},getRange:function(e,t,i){var n=br(this,be(this,e),be(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(hn(this,e))return Te(this,e)},getLineNumber:function(e){return Ge(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Te(this,e)),ur(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return be(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:wt(function(e,t,i){Eu(this,be(this,typeof e=="number"?ie(e,t||0):e),null,i)}),setSelection:wt(function(e,t,i){Eu(this,be(this,e),be(this,t||e),i)}),extendSelection:wt(function(e,t,i){Io(this,be(this,e),t&&be(this,t),i)}),extendSelections:wt(function(e,t){Ou(this,Vt(this,e),t)}),extendSelectionsBy:wt(function(e,t){var i=Y(this.sel.ranges,e);Ou(this,Vt(this,i),t)}),setSelections:wt(function(e,t,i){if(!!e.length){for(var n=[],o=0;o<e.length;o++)n[o]=new Ye(be(this,e[o].anchor),be(this,e[o].head||e[o].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Et(this,cr(this.cm,n,t),i)}}),addSelection:wt(function(e,t,i){var n=this.sel.ranges.slice(0);n.push(new Ye(be(this,e),be(this,t||e))),Et(this,cr(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=br(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=br(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:wt(function(e,t,i){for(var n=[],o=this.sel,a=0;a<o.ranges.length;a++){var f=o.ranges[a];n[a]={from:f.from(),to:f.to(),text:this.splitLines(e[a]),origin:i}}for(var h=t&&t!="end"&&qd(this,n,t),p=n.length-1;p>=0;p--)qn(this,n[p]);h?_u(this,h):this.cm&&Bn(this.cm)}),undo:wt(function(){Bo(this,"undo")}),redo:wt(function(){Bo(this,"redo")}),undoSelection:wt(function(){Bo(this,"undo",!0)}),redoSelection:wt(function(){Bo(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 Ro(this.history),$r(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:Kn(this.history.done),undone:Kn(this.history.undone)}},setHistory:function(e){var t=this.history=new Ro(this.history);t.done=Kn(e.done.slice(0),null,!0),t.undone=Kn(e.undone.slice(0),null,!0)},setGutterMarker:wt(function(e,t,i){return Ii(this,e,"gutter",function(n){var o=n.gutterMarkers||(n.gutterMarkers={});return o[t]=i,!i&&W(o)&&(n.gutterMarkers=null),!0})}),clearGutter:wt(function(e){var t=this;this.iter(function(i){i.gutterMarkers&&i.gutterMarkers[e]&&Ii(t,i,"gutter",function(){return i.gutterMarkers[e]=null,W(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!hn(this,e)||(t=e,e=Te(this,e),!e))return null}else if(t=Ge(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:wt(function(e,t,i){return Ii(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(me(i).test(n[o]))return!1;n[o]+=" "+i}return!0})}),removeLineClass:wt(function(e,t,i){return Ii(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 f=a.match(me(i));if(!f)return!1;var h=f.index+f[0].length;n[o]=a.slice(0,f.index)+(!f.index||h==a.length?"":" ")+a.slice(h)||null}else return!1;return!0})}),addLineWidget:wt(function(e,t,i){return ep(this,e,t,i)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,i){return Yn(this,be(this,e),be(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=be(this,e),Yn(this,e,e,i,"bookmark")},findMarksAt:function(e){e=be(this,e);var t=[],i=Te(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=be(this,e),t=be(this,t);var n=[],o=e.line;return this.iter(e.line,t.line+1,function(a){var f=a.markedSpans;if(f)for(var h=0;h<f.length;h++){var p=f[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}),be(this,ie(i,t))},indexFromPos:function(e){e=be(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 Ft(xi(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 Ft(xi(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}],rp(n,qu(this)),n},unlinkDoc:function(e){if(e instanceof ot&&(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),np(qu(this));break}}if(e.history==this.history){var n=[e.id];$r(e,function(o){return n.push(o.id)},!0),e.history=new Ro(null),e.history.done=Kn(this.history.done,n),e.history.undone=Kn(this.history.undone,n)}},iterLinkedDocs:function(e){$r(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):mi(e)},lineSeparator:function(){return this.lineSep||`
|
|
11
|
+
`},setDirection:wt(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&Gd(this.cm))})}),Ft.prototype.eachLine=Ft.prototype.iter;var Gu=0;function op(e){var t=this;if(Yu(t),!(st(t,e)||Nr(t.display,e))){Pt(e),y&&(Gu=+new Date);var i=gn(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),f=0,h=function(){++f==o&&bt(t,function(){i=be(t.doc,i);var E={from:i,to:i,text:t.doc.splitLines(a.filter(function(U){return U!=null}).join(t.doc.lineSeparator())),origin:"paste"};qn(t.doc,E),_u(t.doc,Yr(be(t.doc,i),be(t.doc,Xr(E))))})()},p=function(E,U){if(t.options.allowDropFileTypes&&Z(t.options.allowDropFileTypes,E.type)==-1){h();return}var Q=new FileReader;Q.onerror=function(){return h()},Q.onload=function(){var le=Q.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(le)){h();return}a[U]=le,h()},Q.readAsText(E)},g=0;g<n.length;g++)p(n[g],g);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 k=e.dataTransfer.getData("Text");if(k){var C;if(t.state.draggingText&&!t.state.draggingText.copy&&(C=t.listSelections()),Ho(t.doc,Yr(i,i)),C)for(var R=0;R<C.length;++R)Gn(t.doc,"",C[R].anchor,C[R].head,"drag");t.replaceSelection(k,"around","paste"),t.display.input.focus()}}catch{}}}}function sp(e,t){if(y&&(!e.state.draggingText||+new Date-Gu<100)){cn(t);return}if(!(st(e,t)||Nr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!j)){var i=G("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",z&&(i.width=i.height=1,e.display.wrapper.appendChild(i),i._top=i.offsetTop),t.dataTransfer.setDragImage(i,0,0),z&&i.parentNode.removeChild(i)}}function lp(e,t){var i=gn(e,t);if(!!i){var n=document.createDocumentFragment();js(e,i,n),e.display.dragCursor||(e.display.dragCursor=G("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),B(e.display.dragCursor,n)}}function Yu(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Xu(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 $u=!1;function ap(){$u||(up(),$u=!0)}function up(){var e;Pe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Xu(fp)},100))}),Pe(window,"blur",function(){return Xu(Wn)})}function fp(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Jr={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"},Ki=0;Ki<10;Ki++)Jr[Ki+48]=Jr[Ki+96]=String(Ki);for(var Uo=65;Uo<=90;Uo++)Jr[Uo]=String.fromCharCode(Uo);for(var ji=1;ji<=12;ji++)Jr[ji+111]=Jr[ji+63235]="F"+ji;var Dr={};Dr.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"},Dr.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"},Dr.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"},Dr.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"]},Dr.default=H?Dr.macDefault:Dr.pcDefault;function cp(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var i,n,o,a,f=0;f<t.length-1;f++){var h=t[f];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 hp(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(" "),cp),a=0;a<o.length;a++){var f=void 0,h=void 0;a==o.length-1?(h=o.join(" "),f=n):(h=o.slice(0,a+1).join(" "),f="...");var p=t[h];if(!p)t[h]=f;else if(p!=f)throw new Error("Inconsistent bindings for "+h)}delete e[i]}for(var g in t)e[g]=t[g];return e}function Xn(e,t,i,n){t=Ko(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 Xn(e,t.fallthrough,i,n);for(var a=0;a<t.fallthrough.length;a++){var f=Xn(e,t.fallthrough[a],i,n);if(f)return f}}}function Zu(e){var t=typeof e=="string"?e:Jr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function Ju(e,t,i){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(He?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(He?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!i&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function Qu(e,t){if(z&&e.keyCode==34&&e.char)return!1;var i=Jr[e.keyCode];return i==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(i=e.code),Ju(i,e,t))}function Ko(e){return typeof e=="string"?Dr[e]:e}function $n(e,t){for(var i=e.doc.sel.ranges,n=[],o=0;o<i.length;o++){for(var a=t(i[o]);n.length&&v(a.from,F(n).to)<=0;){var f=n.pop();if(v(f.from,a.from)<0){a.from=f.from;break}}n.push(a)}jt(e,function(){for(var h=n.length-1;h>=0;h--)Gn(e.doc,"",n[h].from,n[h].to,"+delete");Bn(e)})}function ll(e,t,i){var n=Me(e.text,t+i,i);return n<0||n>e.text.length?null:n}function al(e,t,i){var n=ll(e,t.ch,i);return n==null?null:new ie(t.line,n,i<0?"after":"before")}function ul(e,t,i,n,o){if(e){t.doc.direction=="rtl"&&(o=-o);var a=ht(i,t.doc.direction);if(a){var f=o<0?F(a):a[0],h=o<0==(f.level==1),p=h?"after":"before",g;if(f.level>0||t.doc.direction=="rtl"){var k=Fn(t,i);g=o<0?i.text.length-1:0;var C=Sr(t,k,g).top;g=Ie(function(R){return Sr(t,k,R).top==C},o<0==(f.level==1)?f.from:f.to-1,g),p=="before"&&(g=ll(i,g,1))}else g=o<0?f.to:f.from;return new ie(n,g,p)}}return new ie(n,o<0?i.text.length:0,o<0?"before":"after")}function dp(e,t,i,n){var o=ht(t,e.doc.direction);if(!o)return al(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=Fe(o,i.ch,i.sticky),f=o[a];if(e.doc.direction=="ltr"&&f.level%2==0&&(n>0?f.to>i.ch:f.from<i.ch))return al(t,i,n);var h=function(ge,ye){return ll(t,ge instanceof ie?ge.ch:ge,ye)},p,g=function(ge){return e.options.lineWrapping?(p=p||Fn(e,t),nu(e,t,p,ge)):{begin:0,end:t.text.length}},k=g(i.sticky=="before"?h(i,-1):i.ch);if(e.doc.direction=="rtl"||f.level==1){var C=f.level==1==n<0,R=h(i,C?1:-1);if(R!=null&&(C?R<=f.to&&R<=k.end:R>=f.from&&R>=k.begin)){var E=C?"before":"after";return new ie(i.line,R,E)}}var U=function(ge,ye,ve){for(var xe=function(et,xt){return xt?new ie(i.line,h(et,1),"before"):new ie(i.line,et,"after")};ge>=0&&ge<o.length;ge+=ye){var _e=o[ge],Ee=ye>0==(_e.level!=1),We=Ee?ve.begin:h(ve.end,-1);if(_e.from<=We&&We<_e.to||(We=Ee?_e.from:h(_e.to,-1),ve.begin<=We&&We<ve.end))return xe(We,Ee)}},Q=U(a+n,n,k);if(Q)return Q;var le=n>0?k.end:h(k.begin,-1);return le!=null&&!(n>0&&le==t.text.length)&&(Q=U(n>0?0:o.length-1,n,g(le)),Q)?Q:null}var qi={selectAll:Ru,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ce)},killLine:function(e){return $n(e,function(t){if(t.empty()){var i=Te(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line<e.lastLine()?{from:t.head,to:ie(t.head.line+1,0)}:{from:t.head,to:ie(t.head.line,i)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return $n(e,function(t){return{from:ie(t.from().line,0),to:be(e.doc,ie(t.to().line+1,0))}})},delLineLeft:function(e){return $n(e,function(t){return{from:ie(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return $n(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 $n(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(ie(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ie(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Vu(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return ef(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return pp(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")},pe)},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")},pe)},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/)?ef(e,t.head):n},pe)},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(),f=$e(e.getLine(a.line),a.ch,n);t.push(_(n-f%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=Te(e.doc,o.line).text;if(a){if(o.ch==a.length&&(o=new ie(o.line,o.ch-1)),o.ch>0)o=new ie(o.line,o.ch+1),e.replaceRange(a.charAt(o.ch-1)+a.charAt(o.ch-2),ie(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var f=Te(e.doc,o.line-1).text;f&&(o=new ie(o.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+f.charAt(f.length-1),ie(o.line-1,f.length-1),o,"+transpose"))}}i.push(new Ye(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);Bn(e)})},openLine:function(e){return e.replaceSelection(`
|
|
12
|
+
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Vu(e,t){var i=Te(e.doc,t),n=ur(i);return n!=i&&(t=Ge(n)),ul(!0,e,n,t,1)}function pp(e,t){var i=Te(e.doc,t),n=Jh(i);return n!=i&&(t=Ge(n)),ul(!0,e,i,t,-1)}function ef(e,t){var i=Vu(e,t.line),n=Te(e.doc,i.line),o=ht(n,e.doc.direction);if(!o||o[0].level==0){var a=Math.max(i.ch,n.text.search(/\S/)),f=t.line==i.line&&t.ch<=a&&t.ch;return ie(i.line,f?0:a,i.sticky)}return i}function jo(e,t,i){if(typeof t=="string"&&(t=qi[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)!=oe}finally{e.display.shift=n,e.state.suppressEdits=!1}return o}function gp(e,t,i){for(var n=0;n<e.state.keyMaps.length;n++){var o=Xn(t,e.state.keyMaps[n],i,e);if(o)return o}return e.options.extraKeys&&Xn(t,e.options.extraKeys,i,e)||Xn(t,e.options.keyMap,i,e)}var vp=new q;function Gi(e,t,i,n){var o=e.state.keySeq;if(o){if(Zu(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:vp.set(50,function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())}),tf(e,o+" "+t,i,n))return!0}return tf(e,t,i,n)}function tf(e,t,i,n){var o=gp(e,t,n);return o=="multi"&&(e.state.keySeq=t),o=="handled"&&yt(e,"keyHandled",e,t,i),(o=="handled"||o=="multi")&&(Pt(i),qs(e)),!!o}function rf(e,t){var i=Qu(t,!0);return i?t.shiftKey&&!e.state.keySeq?Gi(e,"Shift-"+i,t,function(n){return jo(e,n,!0)})||Gi(e,i,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return jo(e,n)}):Gi(e,i,t,function(n){return jo(e,n)}):!1}function mp(e,t,i){return Gi(e,"'"+i+"'",t,function(n){return jo(e,n,!0)})}var fl=null;function nf(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=ae(),!st(t,e))){y&&x<11&&e.keyCode==27&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=i==16||e.shiftKey;var n=rf(t,e);z&&(fl=n?i:null,!n&&i==88&&!yo&&(H?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),c&&!H&&!n&&i==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),i==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&yp(t)}}function yp(e){var t=e.display.lineDiv;Ne(t,"CodeMirror-crosshair");function i(n){(n.keyCode==18||!n.altKey)&&(de(t,"CodeMirror-crosshair"),Qe(document,"keyup",i),Qe(document,"mouseover",i))}Pe(document,"keyup",i),Pe(document,"mouseover",i)}function of(e){e.keyCode==16&&(this.doc.sel.shift=!1),st(this,e)}function sf(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(Nr(t.display,e)||st(t,e)||e.ctrlKey&&!e.altKey||H&&e.metaKey)){var i=e.keyCode,n=e.charCode;if(z&&i==fl){fl=null,Pt(e);return}if(!(z&&(!e.which||e.which<10)&&rf(t,e))){var o=String.fromCharCode(n==null?i:n);o!="\b"&&(mp(t,e,o)||t.display.input.onKeyPress(e))}}}var bp=400,cl=function(e,t,i){this.time=e,this.pos=t,this.button=i};cl.prototype.compare=function(e,t,i){return this.time+bp>e&&v(t,this.pos)==0&&i==this.button};var Yi,Xi;function wp(e,t){var i=+new Date;return Xi&&Xi.compare(i,e,t)?(Yi=Xi=null,"triple"):Yi&&Yi.compare(i,e,t)?(Xi=new cl(i,e,t),Yi=null,"double"):(Yi=new cl(i,e,t),Xi=null,"single")}function lf(e){var t=this,i=t.display;if(!(st(t,e)||i.activeTouch&&i.input.supportsTouch())){if(i.input.ensurePolled(),i.shift=e.shiftKey,Nr(i,e)){S||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(!hl(t,e)){var n=gn(t,e),o=go(e),a=n?wp(n,o):"single";window.focus(),o==1&&t.state.selectingText&&t.state.selectingText(e),!(n&&xp(t,o,n,a,e))&&(o==1?n?Sp(t,n,a,e):Ur(e)==i.scroller&&Pt(e):o==2?(n&&Io(t.doc,n),setTimeout(function(){return i.input.focus()},20)):o==3&&(ze?t.display.input.onContextMenu(e):Gs(t)))}}}function xp(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,Gi(e,Ju(a,o),o,function(f){if(typeof f=="string"&&(f=qi[f]),!f)return!1;var h=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),h=f(e,i)!=oe}finally{e.state.suppressEdits=!1}return h})}function kp(e,t,i){var n=e.getOption("configureMouse"),o=n?n(e,t,i):{};if(o.unit==null){var a=ce?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=H?i.metaKey:i.ctrlKey),o.moveOnDrag==null&&(o.moveOnDrag=!(H?i.altKey:i.ctrlKey)),o}function Sp(e,t,i,n){y?setTimeout(it(lu,e),0):e.curOp.focus=ae();var o=kp(e,i,n),a=e.doc.sel,f;e.options.dragDrop&&gi&&!e.isReadOnly()&&i=="single"&&(f=a.contains(t))>-1&&(v((f=a.ranges[f]).from(),t)<0||t.xRel>0)&&(v(f.to(),t)>0||t.xRel<0)?Cp(e,n,t,o):Tp(e,n,t,o)}function Cp(e,t,i,n){var o=e.display,a=!1,f=bt(e,function(g){S&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Gs(e)),Qe(o.wrapper.ownerDocument,"mouseup",f),Qe(o.wrapper.ownerDocument,"mousemove",h),Qe(o.scroller,"dragstart",p),Qe(o.scroller,"drop",f),a||(Pt(g),n.addNew||Io(e.doc,i,null,null,n.extend),S&&!j||y&&x==9?setTimeout(function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()},20):o.input.focus())}),h=function(g){a=a||Math.abs(t.clientX-g.clientX)+Math.abs(t.clientY-g.clientY)>=10},p=function(){return a=!0};S&&(o.scroller.draggable=!0),e.state.draggingText=f,f.copy=!n.moveOnDrag,Pe(o.wrapper.ownerDocument,"mouseup",f),Pe(o.wrapper.ownerDocument,"mousemove",h),Pe(o.scroller,"dragstart",p),Pe(o.scroller,"drop",f),e.state.delayingBlurEvent=!0,setTimeout(function(){return o.input.focus()},20),o.scroller.dragDrop&&o.scroller.dragDrop()}function af(e,t,i){if(i=="char")return new Ye(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new Ye(ie(t.line,0),be(e.doc,ie(t.line+1,0)));var n=i(e,t);return new Ye(n.from,n.to)}function Tp(e,t,i,n){y&&Gs(e);var o=e.display,a=e.doc;Pt(t);var f,h,p=a.sel,g=p.ranges;if(n.addNew&&!n.extend?(h=a.sel.contains(i),h>-1?f=g[h]:f=new Ye(i,i)):(f=a.sel.primary(),h=a.sel.primIndex),n.unit=="rectangle")n.addNew||(f=new Ye(i,i)),i=gn(e,t,!0,!0),h=-1;else{var k=af(e,i,n.unit);n.extend?f=ol(f,k.anchor,k.head,n.extend):f=k}n.addNew?h==-1?(h=g.length,Et(a,cr(e,g.concat([f]),h),{scroll:!1,origin:"*mouse"})):g.length>1&&g[h].empty()&&n.unit=="char"&&!n.extend?(Et(a,cr(e,g.slice(0,h).concat(g.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),p=a.sel):sl(a,h,f,ke):(h=0,Et(a,new er([f],0),ke),p=a.sel);var C=i;function R(ve){if(v(C,ve)!=0)if(C=ve,n.unit=="rectangle"){for(var xe=[],_e=e.options.tabSize,Ee=$e(Te(a,i.line).text,i.ch,_e),We=$e(Te(a,ve.line).text,ve.ch,_e),et=Math.min(Ee,We),xt=Math.max(Ee,We),lt=Math.min(i.line,ve.line),qt=Math.min(e.lastLine(),Math.max(i.line,ve.line));lt<=qt;lt++){var It=Te(a,lt).text,dt=Le(It,et,_e);et==xt?xe.push(new Ye(ie(lt,dt),ie(lt,dt))):It.length>dt&&xe.push(new Ye(ie(lt,dt),ie(lt,Le(It,xt,_e))))}xe.length||xe.push(new Ye(i,i)),Et(a,cr(e,p.ranges.slice(0,h).concat(xe),h),{origin:"*mouse",scroll:!1}),e.scrollIntoView(ve)}else{var Ht=f,Tt=af(e,ve,n.unit),vt=Ht.anchor,pt;v(Tt.anchor,vt)>0?(pt=Tt.head,vt=De(Ht.from(),Tt.anchor)):(pt=Tt.anchor,vt=se(Ht.to(),Tt.head));var ft=p.ranges.slice(0);ft[h]=Lp(e,new Ye(be(a,vt),pt)),Et(a,cr(e,ft,h),ke)}}var E=o.wrapper.getBoundingClientRect(),U=0;function Q(ve){var xe=++U,_e=gn(e,ve,!0,n.unit=="rectangle");if(!!_e)if(v(_e,C)!=0){e.curOp.focus=ae(),R(_e);var Ee=Ao(o,a);(_e.line>=Ee.to||_e.line<Ee.from)&&setTimeout(bt(e,function(){U==xe&&Q(ve)}),150)}else{var We=ve.clientY<E.top?-20:ve.clientY>E.bottom?20:0;We&&setTimeout(bt(e,function(){U==xe&&(o.scroller.scrollTop+=We,Q(ve))}),50)}}function le(ve){e.state.selectingText=!1,U=1/0,ve&&(Pt(ve),o.input.focus()),Qe(o.wrapper.ownerDocument,"mousemove",ge),Qe(o.wrapper.ownerDocument,"mouseup",ye),a.history.lastSelOrigin=null}var ge=bt(e,function(ve){ve.buttons===0||!go(ve)?le(ve):Q(ve)}),ye=bt(e,le);e.state.selectingText=ye,Pe(o.wrapper.ownerDocument,"mousemove",ge),Pe(o.wrapper.ownerDocument,"mouseup",ye)}function Lp(e,t){var i=t.anchor,n=t.head,o=Te(e.doc,i.line);if(v(i,n)==0&&i.sticky==n.sticky)return t;var a=ht(o);if(!a)return t;var f=Fe(a,i.ch,i.sticky),h=a[f];if(h.from!=i.ch&&h.to!=i.ch)return t;var p=f+(h.from==i.ch==(h.level!=1)?0:1);if(p==0||p==a.length)return t;var g;if(n.line!=i.line)g=(n.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var k=Fe(a,n.ch,n.sticky),C=k-f||(n.ch-i.ch)*(h.level==1?-1:1);k==p-1||k==p?g=C<0:g=C>0}var R=a[p+(g?-1:0)],E=g==(R.level==1),U=E?R.from:R.to,Q=E?"after":"before";return i.ch==U&&i.sticky==Q?t:new Ye(new ie(i.line,U,Q),n)}function uf(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&&Pt(t);var f=e.display,h=f.lineDiv.getBoundingClientRect();if(a>h.bottom||!Ct(e,i))return Zt(t);a-=h.top-f.viewOffset;for(var p=0;p<e.display.gutterSpecs.length;++p){var g=f.gutters.childNodes[p];if(g&&g.getBoundingClientRect().right>=o){var k=wr(e.doc,a),C=e.display.gutterSpecs[p];return Oe(e,i,e,k,C.className,t),Zt(t)}}}function hl(e,t){return uf(e,t,"gutterClick",!0)}function ff(e,t){Nr(e.display,t)||Mp(e,t)||st(e,t,"contextmenu")||ze||e.display.input.onContextMenu(t)}function Mp(e,t){return Ct(e,"gutterContextMenu")?uf(e,t,"gutterContextMenu",!1):!1}function cf(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Pi(e)}var Zn={toString:function(){return"CodeMirror.Init"}},hf={},qo={};function Pp(e){var t=e.optionHandlers;function i(n,o,a,f){e.defaults[n]=o,a&&(t[n]=f?function(h,p,g){g!=Zn&&a(h,p,g)}:a)}e.defineOption=i,e.Init=Zn,i("value","",function(n,o){return n.setValue(o)},!0),i("mode",null,function(n,o){n.doc.modeOption=o,rl(n)},!0),i("indentUnit",2,rl,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(n){Ri(n),Pi(n),Rt(n)},!0),i("lineSeparator",null,function(n,o){if(n.doc.lineSep=o,!!o){var a=[],f=n.doc.first;n.doc.iter(function(p){for(var g=0;;){var k=p.text.indexOf(o,g);if(k==-1)break;g=k+o.length,a.push(ie(f,k))}f++});for(var h=a.length-1;h>=0;h--)Gn(n.doc,o,a[h],ie(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!=Zn&&n.refresh()}),i("specialCharPlaceholder",nd,function(n){return n.refresh()},!0),i("electricChars",!0),i("inputStyle",D?"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",!Se),i("wholeLineUpdateBefore",!0),i("theme","default",function(n){cf(n),Di(n)},!0),i("keyMap","default",function(n,o,a){var f=Ko(o),h=a!=Zn&&Ko(a);h&&h.detach&&h.detach(n,f),f.attach&&f.attach(n,h||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,Ep,!0),i("gutters",[],function(n,o){n.display.gutterSpecs=el(o,n.options.lineNumbers),Di(n)},!0),i("fixedGutter",!0,function(n,o){n.display.gutters.style.left=o?Us(n.display)+"px":"0",n.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(n){return Un(n)},!0),i("scrollbarStyle","native",function(n){du(n),Un(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=el(n.options.gutters,o),Di(n)},!0),i("firstLineNumber",1,Di,!0),i("lineNumberFormatter",function(n){return n},Di,!0),i("showCursorWhenSelecting",!1,Oi,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(n,o){o=="nocursor"&&(Wn(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,Op),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,Oi,!0),i("singleCursorHeightPerLine",!0,Oi,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,Ri,!0),i("addModeClass",!1,Ri,!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,Ri,!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 Op(e,t,i){var n=i&&i!=Zn;if(!t!=!n){var o=e.display.dragFunctions,a=t?Pe:Qe;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 Ep(e){e.options.lineWrapping?(Ne(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(de(e.display.wrapper,"CodeMirror-wrap"),As(e)),Ks(e),Rt(e),Pi(e),setTimeout(function(){return Un(e)},100)}function ot(e,t){var i=this;if(!(this instanceof ot))return new ot(e,t);this.options=t=t?Re(t):{},Re(hf,t,!1);var n=t.value;typeof n=="string"?n=new Ft(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var o=new ot.inputStyles[t.inputStyle](this),a=this.display=new Kd(e,n,o,t);a.wrapper.CodeMirror=this,cf(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),du(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 q,keySeq:null,specialChars:null},t.autofocus&&!D&&a.input.focus(),y&&x<11&&setTimeout(function(){return i.display.input.reset(!0)},20),_p(this),ap(),bn(this),this.curOp.forceUpdate=!0,Su(this,n),t.autofocus&&!D||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&Ys(i)},20):Wn(this);for(var f in qo)qo.hasOwnProperty(f)&&qo[f](this,t[f],Zn);vu(this),t.finishInit&&t.finishInit(this);for(var h=0;h<dl.length;++h)dl[h](this);wn(this),S&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}ot.defaults=hf,ot.optionHandlers=qo;function _p(e){var t=e.display;Pe(t.scroller,"mousedown",bt(e,lf)),y&&x<11?Pe(t.scroller,"dblclick",bt(e,function(p){if(!st(e,p)){var g=gn(e,p);if(!(!g||hl(e,p)||Nr(e.display,p))){Pt(p);var k=e.findWordAt(g);Io(e.doc,k.anchor,k.head)}}})):Pe(t.scroller,"dblclick",function(p){return st(e,p)||Pt(p)}),Pe(t.scroller,"contextmenu",function(p){return ff(e,p)}),Pe(t.input.getField(),"contextmenu",function(p){t.scroller.contains(p.target)||ff(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 g=p.touches[0];return g.radiusX<=1&&g.radiusY<=1}function f(p,g){if(g.left==null)return!0;var k=g.left-p.left,C=g.top-p.top;return k*k+C*C>20*20}Pe(t.scroller,"touchstart",function(p){if(!st(e,p)&&!a(p)&&!hl(e,p)){t.input.ensurePolled(),clearTimeout(i);var g=+new Date;t.activeTouch={start:g,moved:!1,prev:g-n.end<=300?n:null},p.touches.length==1&&(t.activeTouch.left=p.touches[0].pageX,t.activeTouch.top=p.touches[0].pageY)}}),Pe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Pe(t.scroller,"touchend",function(p){var g=t.activeTouch;if(g&&!Nr(t,p)&&g.left!=null&&!g.moved&&new Date-g.start<300){var k=e.coordsChar(t.activeTouch,"page"),C;!g.prev||f(g,g.prev)?C=new Ye(k,k):!g.prev.prev||f(g,g.prev.prev)?C=e.findWordAt(k):C=new Ye(ie(k.line,0),be(e.doc,ie(k.line+1,0))),e.setSelection(C.anchor,C.head),e.focus(),Pt(p)}o()}),Pe(t.scroller,"touchcancel",o),Pe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(_i(e,t.scroller.scrollTop),mn(e,t.scroller.scrollLeft,!0),Oe(e,"scroll",e))}),Pe(t.scroller,"mousewheel",function(p){return bu(e,p)}),Pe(t.scroller,"DOMMouseScroll",function(p){return bu(e,p)}),Pe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(p){st(e,p)||cn(p)},over:function(p){st(e,p)||(lp(e,p),cn(p))},start:function(p){return sp(e,p)},drop:bt(e,op),leave:function(p){st(e,p)||Yu(e)}};var h=t.input.getField();Pe(h,"keyup",function(p){return of.call(e,p)}),Pe(h,"keydown",bt(e,nf)),Pe(h,"keypress",bt(e,sf)),Pe(h,"focus",function(p){return Ys(e,p)}),Pe(h,"blur",function(p){return Wn(e,p)})}var dl=[];ot.defineInitHook=function(e){return dl.push(e)};function $i(e,t,i,n){var o=e.doc,a;i==null&&(i="add"),i=="smart"&&(o.mode.indent?a=Si(e,t).state:i="prev");var f=e.options.tabSize,h=Te(o,t),p=$e(h.text,null,f);h.stateAfter&&(h.stateAfter=null);var g=h.text.match(/^\s*/)[0],k;if(!n&&!/\S/.test(h.text))k=0,i="not";else if(i=="smart"&&(k=o.mode.indent(a,h.text.slice(g.length),h.text),k==oe||k>150)){if(!n)return;i="prev"}i=="prev"?t>o.first?k=$e(Te(o,t-1).text,null,f):k=0:i=="add"?k=p+e.options.indentUnit:i=="subtract"?k=p-e.options.indentUnit:typeof i=="number"&&(k=p+i),k=Math.max(0,k);var C="",R=0;if(e.options.indentWithTabs)for(var E=Math.floor(k/f);E;--E)R+=f,C+=" ";if(R<k&&(C+=_(k-R)),C!=g)return Gn(o,C,ie(t,0),ie(t,g.length),"+input"),h.stateAfter=null,!0;for(var U=0;U<o.sel.ranges.length;U++){var Q=o.sel.ranges[U];if(Q.head.line==t&&Q.head.ch<g.length){var le=ie(t,g.length);sl(o,U,new Ye(le,le));break}}}var hr=null;function Go(e){hr=e}function pl(e,t,i,n,o){var a=e.doc;e.display.shift=!1,n||(n=a.sel);var f=+new Date-200,h=o=="paste"||e.state.pasteIncoming>f,p=mi(t),g=null;if(h&&n.ranges.length>1)if(hr&&hr.text.join(`
|
|
13
|
+
`)==t){if(n.ranges.length%hr.text.length==0){g=[];for(var k=0;k<hr.text.length;k++)g.push(a.splitLines(hr.text[k]))}}else p.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(g=Y(p,function(ge){return[ge]}));for(var C=e.curOp.updateInput,R=n.ranges.length-1;R>=0;R--){var E=n.ranges[R],U=E.from(),Q=E.to();E.empty()&&(i&&i>0?U=ie(U.line,U.ch-i):e.state.overwrite&&!h?Q=ie(Q.line,Math.min(Te(a,Q.line).text.length,Q.ch+F(p).length)):h&&hr&&hr.lineWise&&hr.text.join(`
|
|
14
|
+
`)==p.join(`
|
|
15
|
+
`)&&(U=Q=ie(U.line,0)));var le={from:U,to:Q,text:g?g[R%g.length]:p,origin:o||(h?"paste":e.state.cutIncoming>f?"cut":"+input")};qn(e.doc,le),yt(e,"inputRead",e,le)}t&&!h&&pf(e,t),Bn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=C),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function df(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&jt(t,function(){return pl(t,i,0,null,"paste")}),!0}function pf(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),f=!1;if(a.electricChars){for(var h=0;h<a.electricChars.length;h++)if(t.indexOf(a.electricChars.charAt(h))>-1){f=$i(e,o.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Te(e.doc,o.head.line).text.slice(0,o.head.ch))&&(f=$i(e,o.head.line,"smart"));f&&yt(e,"electricInput",e,o.head.line)}}}function gf(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:ie(o,0),head:ie(o+1,0)};i.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:i}}function vf(e,t,i,n){e.setAttribute("autocorrect",i?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function mf(){var e=G("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=G("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return S?e.style.width="1000px":e.setAttribute("wrap","off"),A&&(e.style.border="1px solid black"),vf(e),t}function Ap(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,f=a[n];a[n]==o&&n!="mode"||(a[n]=o,t.hasOwnProperty(n)&&bt(this,t[n])(this,o,f),Oe(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"](Ko(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:At(function(n,o){var a=n.token?n:e.getMode(this.options,n);if(a.startState)throw new Error("Overlays may not be stateful.");J(this.state.overlays,{mode:a,modeSpec:n,opaque:o&&o.opaque,priority:o&&o.priority||0},function(f){return f.priority}),this.state.modeGen++,Rt(this)}),removeOverlay:At(function(n){for(var o=this.state.overlays,a=0;a<o.length;++a){var f=o[a].modeSpec;if(f==n||typeof n=="string"&&f.name==n){o.splice(a,1),this.state.modeGen++,Rt(this);return}}}),indentLine:At(function(n,o,a){typeof o!="string"&&typeof o!="number"&&(o==null?o=this.options.smartIndent?"smart":"prev":o=o?"add":"subtract"),hn(this.doc,n)&&$i(this,n,o,a)}),indentSelection:At(function(n){for(var o=this.doc.sel.ranges,a=-1,f=0;f<o.length;f++){var h=o[f];if(h.empty())h.head.line>a&&($i(this,h.head.line,n,!0),a=h.head.line,f==this.doc.sel.primIndex&&Bn(this));else{var p=h.from(),g=h.to(),k=Math.max(a,p.line);a=Math.min(this.lastLine(),g.line-(g.ch?0:1))+1;for(var C=k;C<a;++C)$i(this,C,n);var R=this.doc.sel.ranges;p.ch==0&&o.length==R.length&&R[f].from().ch>0&&sl(this.doc,f,new Ye(p,R[f].to()),Ce)}}}),getTokenAt:function(n,o){return Ta(this,n,o)},getLineTokens:function(n,o){return Ta(this,ie(n),o,!0)},getTokenTypeAt:function(n){n=be(this.doc,n);var o=ka(this,Te(this.doc,n.line)),a=0,f=(o.length-1)/2,h=n.ch,p;if(h==0)p=o[2];else for(;;){var g=a+f>>1;if((g?o[g*2-1]:0)>=h)f=g;else if(o[g*2+1]<h)a=g+1;else{p=o[g*2+2];break}}var k=p?p.indexOf("overlay "):-1;return k<0?p:k==0?null:p.slice(0,k-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 f=i[o],h=this.getModeAt(n);if(typeof h[o]=="string")f[h[o]]&&a.push(f[h[o]]);else if(h[o])for(var p=0;p<h[o].length;p++){var g=f[h[o][p]];g&&a.push(g)}else h.helperType&&f[h.helperType]?a.push(f[h.helperType]):f[h.name]&&a.push(f[h.name]);for(var k=0;k<f._global.length;k++){var C=f._global[k];C.pred(h,this)&&Z(a,C.val)==-1&&a.push(C.val)}return a},getStateAfter:function(n,o){var a=this.doc;return n=je(a,n==null?a.first+a.size-1:n),Si(this,n+1,o).state},cursorCoords:function(n,o){var a,f=this.doc.sel.primary();return n==null?a=f.head:typeof n=="object"?a=be(this.doc,n):a=n?f.from():f.to(),fr(this,a,o||"page")},charCoords:function(n,o){return Po(this,be(this.doc,n),o||"page")},coordsChar:function(n,o){return n=eu(this,n,o||"page"),Hs(this,n.left,n.top)},lineAtHeight:function(n,o){return n=eu(this,{top:n,left:0},o||"page").top,wr(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,o,a){var f=!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,f=!0),h=Te(this.doc,n)}else h=n;return Mo(this,h,{top:0,left:0},o||"page",a||f).top+(f?this.doc.height-Ar(h):0)},defaultTextHeight:function(){return In(this.display)},defaultCharWidth:function(){return Hn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,o,a,f,h){var p=this.display;n=fr(this,be(this.doc,n));var g=n.bottom,k=n.left;if(o.style.position="absolute",o.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(o),p.sizer.appendChild(o),f=="over")g=n.top;else if(f=="above"||f=="near"){var C=Math.max(p.wrapper.clientHeight,this.doc.height),R=Math.max(p.sizer.clientWidth,p.lineSpace.clientWidth);(f=="above"||n.bottom+o.offsetHeight>C)&&n.top>o.offsetHeight?g=n.top-o.offsetHeight:n.bottom+o.offsetHeight<=C&&(g=n.bottom),k+o.offsetWidth>R&&(k=R-o.offsetWidth)}o.style.top=g+"px",o.style.left=o.style.right="",h=="right"?(k=p.sizer.clientWidth-o.offsetWidth,o.style.right="0px"):(h=="left"?k=0:h=="middle"&&(k=(p.sizer.clientWidth-o.offsetWidth)/2),o.style.left=k+"px"),a&&Od(this,{left:k,top:g,right:k+o.offsetWidth,bottom:g+o.offsetHeight})},triggerOnKeyDown:At(nf),triggerOnKeyPress:At(sf),triggerOnKeyUp:of,triggerOnMouseDown:At(lf),execCommand:function(n){if(qi.hasOwnProperty(n))return qi[n].call(null,this)},triggerElectric:At(function(n){pf(this,n)}),findPosH:function(n,o,a,f){var h=1;o<0&&(h=-1,o=-o);for(var p=be(this.doc,n),g=0;g<o&&(p=gl(this.doc,p,h,a,f),!p.hitSide);++g);return p},moveH:At(function(n,o){var a=this;this.extendSelectionsBy(function(f){return a.display.shift||a.doc.extend||f.empty()?gl(a.doc,f.head,n,o,a.options.rtlMoveVisually):n<0?f.from():f.to()},pe)}),deleteH:At(function(n,o){var a=this.doc.sel,f=this.doc;a.somethingSelected()?f.replaceSelection("",null,"+delete"):$n(this,function(h){var p=gl(f,h.head,n,o,!1);return n<0?{from:p,to:h.head}:{from:h.head,to:p}})}),findPosV:function(n,o,a,f){var h=1,p=f;o<0&&(h=-1,o=-o);for(var g=be(this.doc,n),k=0;k<o;++k){var C=fr(this,g,"div");if(p==null?p=C.left:C.left=p,g=yf(this,C,h,a),g.hitSide)break}return g},moveV:At(function(n,o){var a=this,f=this.doc,h=[],p=!this.display.shift&&!f.extend&&f.sel.somethingSelected();if(f.extendSelectionsBy(function(k){if(p)return n<0?k.from():k.to();var C=fr(a,k.head,"div");k.goalColumn!=null&&(C.left=k.goalColumn),h.push(C.left);var R=yf(a,C,n,o);return o=="page"&&k==f.sel.primary()&&$s(a,Po(a,R,"div").top-C.top),R},pe),h.length)for(var g=0;g<f.sel.ranges.length;g++)f.sel.ranges[g].goalColumn=h[g]}),findWordAt:function(n){var o=this.doc,a=Te(o,n.line).text,f=n.ch,h=n.ch;if(a){var p=this.getHelper(n,"wordChars");(n.sticky=="before"||h==a.length)&&f?--f:++h;for(var g=a.charAt(f),k=L(g,p)?function(C){return L(C,p)}:/\s/.test(g)?function(C){return/\s/.test(C)}:function(C){return!/\s/.test(C)&&!L(C)};f>0&&k(a.charAt(f-1));)--f;for(;h<a.length&&k(a.charAt(h));)++h}return new Ye(ie(n.line,f),ie(n.line,h))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ne(this.display.cursorDiv,"CodeMirror-overwrite"):de(this.display.cursorDiv,"CodeMirror-overwrite"),Oe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ae()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:At(function(n,o){Ei(this,n,o)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-kr(this)-this.display.barHeight,width:n.scrollWidth-kr(this)-this.display.barWidth,clientHeight:Ds(this),clientWidth:dn(this)}},scrollIntoView:At(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:ie(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?Ed(this,n):uu(this,n.from,n.to,n.margin)}),setSize:At(function(n,o){var a=this,f=function(p){return typeof p=="number"||/^\d+$/.test(String(p))?p+"px":p};n!=null&&(this.display.wrapper.style.width=f(n)),o!=null&&(this.display.wrapper.style.height=f(o)),this.options.lineWrapping&&Ja(this);var h=this.display.viewFrom;this.doc.iter(h,this.display.viewTo,function(p){if(p.widgets){for(var g=0;g<p.widgets.length;g++)if(p.widgets[g].noHScroll){qr(a,h,"widget");break}}++h}),this.curOp.forceUpdate=!0,Oe(this,"refresh",this)}),operation:function(n){return jt(this,n)},startOperation:function(){return bn(this)},endOperation:function(){return wn(this)},refresh:At(function(){var n=this.display.cachedTextHeight;Rt(this),this.curOp.forceUpdate=!0,Pi(this),Ei(this,this.doc.scrollLeft,this.doc.scrollTop),Qs(this.display),(n==null||Math.abs(n-In(this.display))>.5||this.options.lineWrapping)&&Ks(this),Oe(this,"refresh",this)}),swapDoc:At(function(n){var o=this.doc;return o.cm=null,this.state.selectingText&&this.state.selectingText(),Su(this,n),Pi(this),this.display.input.reset(),Ei(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,yt(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}},mr(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,f){e.registerHelper(n,o,f),i[n]._global.push({pred:a,val:f})}}function gl(e,t,i,n,o){var a=t,f=i,h=Te(e,t.line),p=o&&e.direction=="rtl"?-i:i;function g(){var ye=t.line+p;return ye<e.first||ye>=e.first+e.size?!1:(t=new ie(ye,t.ch,t.sticky),h=Te(e,ye))}function k(ye){var ve;if(n=="codepoint"){var xe=h.text.charCodeAt(t.ch+(i>0?0:-1));if(isNaN(xe))ve=null;else{var _e=i>0?xe>=55296&&xe<56320:xe>=56320&&xe<57343;ve=new ie(t.line,Math.max(0,Math.min(h.text.length,t.ch+i*(_e?2:1))),-i)}}else o?ve=dp(e.cm,h,t,i):ve=al(h,t,i);if(ve==null)if(!ye&&g())t=ul(o,e.cm,h,t.line,p);else return!1;else t=ve;return!0}if(n=="char"||n=="codepoint")k();else if(n=="column")k(!0);else if(n=="word"||n=="group")for(var C=null,R=n=="group",E=e.cm&&e.cm.getHelper(t,"wordChars"),U=!0;!(i<0&&!k(!U));U=!1){var Q=h.text.charAt(t.ch)||`
|
|
16
|
+
`,le=L(Q,E)?"w":R&&Q==`
|
|
17
|
+
`?"n":!R||/\s/.test(Q)?null:"p";if(R&&!U&&!le&&(le="s"),C&&C!=le){i<0&&(i=1,k(),t.sticky="after");break}if(le&&(C=le),i>0&&!k(!U))break}var ge=Wo(e,t,a,f,!0);return M(a,ge)&&(ge.hitSide=!0),ge}function yf(e,t,i,n){var o=e.doc,a=t.left,f;if(n=="page"){var h=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),p=Math.max(h-.5*In(e.display),3);f=(i>0?t.bottom:t.top)+i*p}else n=="line"&&(f=i>0?t.bottom+3:t.top-3);for(var g;g=Hs(e,a,f),!!g.outside;){if(i<0?f<=0:f>=o.height){g.hitSide=!0;break}f+=i*5}return g}var Ze=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new q,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ze.prototype.init=function(e){var t=this,i=this,n=i.cm,o=i.div=e.lineDiv;o.contentEditable=!0,vf(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}Pe(o,"paste",function(h){!a(h)||st(n,h)||df(h,n)||x<=11&&setTimeout(bt(n,function(){return t.updateFromDOM()}),20)}),Pe(o,"compositionstart",function(h){t.composing={data:h.data,done:!1}}),Pe(o,"compositionupdate",function(h){t.composing||(t.composing={data:h.data,done:!1})}),Pe(o,"compositionend",function(h){t.composing&&(h.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Pe(o,"touchstart",function(){return i.forceCompositionEnd()}),Pe(o,"input",function(){t.composing||t.readFromDOMSoon()});function f(h){if(!(!a(h)||st(n,h))){if(n.somethingSelected())Go({lineWise:!1,text:n.getSelections()}),h.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var p=gf(n);Go({lineWise:!0,text:p.text}),h.type=="cut"&&n.operation(function(){n.setSelections(p.ranges,0,Ce),n.replaceSelection("",null,"cut")})}else return;if(h.clipboardData){h.clipboardData.clearData();var g=hr.text.join(`
|
|
18
|
+
`);if(h.clipboardData.setData("Text",g),h.clipboardData.getData("Text")==g){h.preventDefault();return}}var k=mf(),C=k.firstChild;n.display.lineSpace.insertBefore(k,n.display.lineSpace.firstChild),C.value=hr.text.join(`
|
|
19
|
+
`);var R=ae();tt(C),setTimeout(function(){n.display.lineSpace.removeChild(k),R.focus(),R==o&&i.showPrimarySelection()},50)}}Pe(o,"copy",f),Pe(o,"cut",f)},Ze.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ze.prototype.prepareSelection=function(){var e=su(this.cm,!1);return e.focus=ae()==this.div,e},Ze.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ze.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ze.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=Yo(t,e.anchorNode,e.anchorOffset),f=Yo(t,e.focusNode,e.focusOffset);if(!(a&&!a.bad&&f&&!f.bad&&v(De(a,f),n)==0&&v(se(a,f),o)==0)){var h=t.display.view,p=n.line>=t.display.viewFrom&&bf(t,n)||{node:h[0].measure.map[2],offset:0},g=o.line<t.display.viewTo&&bf(t,o);if(!g){var k=h[h.length-1].measure,C=k.maps?k.maps[k.maps.length-1]:k.map;g={node:C[C.length-1],offset:C[C.length-2]-C[C.length-3]}}if(!p||!g){e.removeAllRanges();return}var R=e.rangeCount&&e.getRangeAt(0),E;try{E=V(p.node,p.offset,g.offset,g.node)}catch{}E&&(!c&&t.state.focused?(e.collapse(p.node,p.offset),E.collapsed||(e.removeAllRanges(),e.addRange(E))):(e.removeAllRanges(),e.addRange(E)),R&&e.anchorNode==null?e.addRange(R):c&&this.startGracePeriod()),this.rememberSelection()}},Ze.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)},Ze.prototype.showMultipleSelections=function(e){B(this.cm.display.cursorDiv,e.cursors),B(this.cm.display.selectionDiv,e.selection)},Ze.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ze.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return X(this.div,t)},Ze.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||ae()!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ze.prototype.blur=function(){this.div.blur()},Ze.prototype.getField=function(){return this.div},Ze.prototype.supportsTouch=function(){return!0},Ze.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)},Ze.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ze.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(I&&O&&this.cm.display.gutterSpecs.length&&Np(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var i=Yo(t,e.anchorNode,e.anchorOffset),n=Yo(t,e.focusNode,e.focusOffset);i&&n&&jt(t,function(){Et(t.doc,Yr(i,n),Ce),(i.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},Ze.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=ie(n.line-1,Te(e.doc,n.line-1).length)),o.ch==Te(e.doc,o.line).text.length&&o.line<e.lastLine()&&(o=ie(o.line+1,0)),n.line<t.viewFrom||o.line>t.viewTo-1)return!1;var a,f,h;n.line==t.viewFrom||(a=vn(e,n.line))==0?(f=Ge(t.view[0].line),h=t.view[0].node):(f=Ge(t.view[a].line),h=t.view[a-1].node.nextSibling);var p=vn(e,o.line),g,k;if(p==t.view.length-1?(g=t.viewTo-1,k=t.lineDiv.lastChild):(g=Ge(t.view[p+1].line)-1,k=t.view[p+1].node.previousSibling),!h)return!1;for(var C=e.doc.splitLines(zp(e,h,k,f,g)),R=br(e.doc,ie(f,0),ie(g,Te(e.doc,g).text.length));C.length>1&&R.length>1;)if(F(C)==F(R))C.pop(),R.pop(),g--;else if(C[0]==R[0])C.shift(),R.shift(),f++;else break;for(var E=0,U=0,Q=C[0],le=R[0],ge=Math.min(Q.length,le.length);E<ge&&Q.charCodeAt(E)==le.charCodeAt(E);)++E;for(var ye=F(C),ve=F(R),xe=Math.min(ye.length-(C.length==1?E:0),ve.length-(R.length==1?E:0));U<xe&&ye.charCodeAt(ye.length-U-1)==ve.charCodeAt(ve.length-U-1);)++U;if(C.length==1&&R.length==1&&f==n.line)for(;E&&E>n.ch&&ye.charCodeAt(ye.length-U-1)==ve.charCodeAt(ve.length-U-1);)E--,U++;C[C.length-1]=ye.slice(0,ye.length-U).replace(/^\u200b+/,""),C[0]=C[0].slice(E).replace(/\u200b+$/,"");var _e=ie(f,E),Ee=ie(g,R.length?F(R).length-U:0);if(C.length>1||C[0]||v(_e,Ee))return Gn(e.doc,C,_e,Ee,"+input"),!0},Ze.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ze.prototype.reset=function(){this.forceCompositionEnd()},Ze.prototype.forceCompositionEnd=function(){!this.composing||(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ze.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))},Ze.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&jt(this.cm,function(){return Rt(e.cm)})},Ze.prototype.setUneditable=function(e){e.contentEditable="false"},Ze.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||bt(this.cm,pl)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Ze.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Ze.prototype.onContextMenu=function(){},Ze.prototype.resetPosition=function(){},Ze.prototype.needsContentAttribute=!0;function bf(e,t){var i=Rs(e,t.line);if(!i||i.hidden)return null;var n=Te(e.doc,t.line),o=Ga(i,n,t.line),a=ht(n,e.doc.direction),f="left";if(a){var h=Fe(a,t.ch);f=h%2?"right":"left"}var p=$a(o.map,t.ch,f);return p.offset=p.collapse=="right"?p.end:p.start,p}function Np(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Jn(e,t){return t&&(e.bad=!0),e}function zp(e,t,i,n,o){var a="",f=!1,h=e.doc.lineSeparator(),p=!1;function g(E){return function(U){return U.id==E}}function k(){f&&(a+=h,p&&(a+=h),f=p=!1)}function C(E){E&&(k(),a+=E)}function R(E){if(E.nodeType==1){var U=E.getAttribute("cm-text");if(U){C(U);return}var Q=E.getAttribute("cm-marker"),le;if(Q){var ge=e.findMarks(ie(n,0),ie(o+1,0),g(+Q));ge.length&&(le=ge[0].find(0))&&C(br(e.doc,le.from,le.to).join(h));return}if(E.getAttribute("contenteditable")=="false")return;var ye=/^(pre|div|p|li|table|br)$/i.test(E.nodeName);if(!/^br$/i.test(E.nodeName)&&E.textContent.length==0)return;ye&&k();for(var ve=0;ve<E.childNodes.length;ve++)R(E.childNodes[ve]);/^(pre|p)$/i.test(E.nodeName)&&(p=!0),ye&&(f=!0)}else E.nodeType==3&&C(E.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;R(t),t!=i;)t=t.nextSibling,p=!1;return a}function Yo(e,t,i){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[i],!n)return Jn(e.clipPos(ie(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 Dp(a,t,i)}}function Dp(e,t,i){var n=e.text.firstChild,o=!1;if(!t||!X(n,t))return Jn(ie(Ge(e.line),0),!0);if(t==n&&(o=!0,t=n.childNodes[i],i=0,!t)){var a=e.rest?F(e.rest):e.line;return Jn(ie(Ge(a),a.text.length),o)}var f=t.nodeType==3?t:null,h=t;for(!f&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(f=t.firstChild,i&&(i=f.nodeValue.length));h.parentNode!=n;)h=h.parentNode;var p=e.measure,g=p.maps;function k(le,ge,ye){for(var ve=-1;ve<(g?g.length:0);ve++)for(var xe=ve<0?p.map:g[ve],_e=0;_e<xe.length;_e+=3){var Ee=xe[_e+2];if(Ee==le||Ee==ge){var We=Ge(ve<0?e.line:e.rest[ve]),et=xe[_e]+ye;return(ye<0||Ee!=le)&&(et=xe[_e+(ye?1:0)]),ie(We,et)}}}var C=k(f,h,i);if(C)return Jn(C,o);for(var R=h.nextSibling,E=f?f.nodeValue.length-i:0;R;R=R.nextSibling){if(C=k(R,R.firstChild,0),C)return Jn(ie(C.line,C.ch-E),o);E+=R.textContent.length}for(var U=h.previousSibling,Q=i;U;U=U.previousSibling){if(C=k(U,U.firstChild,-1),C)return Jn(ie(C.line,C.ch+Q),o);Q+=U.textContent.length}}var ct=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new q,this.hasSelection=!1,this.composing=null};ct.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),A&&(o.style.width="0px"),Pe(o,"input",function(){y&&x>=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),Pe(o,"paste",function(f){st(n,f)||df(f,n)||(n.state.pasteIncoming=+new Date,i.fastPoll())});function a(f){if(!st(n,f)){if(n.somethingSelected())Go({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var h=gf(n);Go({lineWise:!0,text:h.text}),f.type=="cut"?n.setSelections(h.ranges,null,Ce):(i.prevInput="",o.value=h.text.join(`
|
|
20
|
+
`),tt(o))}else return;f.type=="cut"&&(n.state.cutIncoming=+new Date)}}Pe(o,"cut",a),Pe(o,"copy",a),Pe(e.scroller,"paste",function(f){if(!(Nr(e,f)||st(n,f))){if(!o.dispatchEvent){n.state.pasteIncoming=+new Date,i.focus();return}var h=new Event("paste");h.clipboardData=f.clipboardData,o.dispatchEvent(h)}}),Pe(e.lineSpace,"selectstart",function(f){Nr(e,f)||Pt(f)}),Pe(o,"compositionstart",function(){var f=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:f,range:n.markText(f,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Pe(o,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},ct.prototype.createField=function(e){this.wrapper=mf(),this.textarea=this.wrapper.firstChild},ct.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ct.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,n=su(e);if(e.options.moveInputWithCursor){var o=fr(e,i.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),f=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+f.top-a.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+f.left-a.left))}return n},ct.prototype.showSelection=function(e){var t=this.cm,i=t.display;B(i.cursorDiv,e.cursors),B(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ct.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))}},ct.prototype.getField=function(){return this.textarea},ct.prototype.supportsTouch=function(){return!1},ct.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!D||ae()!=this.textarea))try{this.textarea.focus()}catch{}},ct.prototype.blur=function(){this.textarea.blur()},ct.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ct.prototype.receivedFocus=function(){this.slowPoll()},ct.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},ct.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)},ct.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||mo(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||H&&/[\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 f=0,h=Math.min(n.length,o.length);f<h&&n.charCodeAt(f)==o.charCodeAt(f);)++f;return jt(t,function(){pl(t,o.slice(f),n.length-f,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},ct.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ct.prototype.onKeyPress=function(){y&&x>=9&&(this.hasSelection=null),this.fastPoll()},ct.prototype.onContextMenu=function(e){var t=this,i=t.cm,n=i.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=gn(i,e),f=n.scroller.scrollTop;if(!a||z)return;var h=i.options.resetSelectionOnContextMenu;h&&i.doc.sel.contains(a)==-1&&bt(i,Et)(i.doc,Yr(a),Ce);var p=o.style.cssText,g=t.wrapper.style.cssText,k=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",o.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
22
|
+
top: `+(e.clientY-k.top-5)+"px; left: "+(e.clientX-k.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;S&&(C=window.scrollY),n.input.focus(),S&&window.scrollTo(null,C),n.input.reset(),i.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=E,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll);function R(){if(o.selectionStart!=null){var Q=i.somethingSelected(),le="\u200B"+(Q?o.value:"");o.value="\u21DA",o.value=le,t.prevInput=Q?"":"\u200B",o.selectionStart=1,o.selectionEnd=le.length,n.selForContextMenu=i.doc.sel}}function E(){if(t.contextMenuPending==E&&(t.contextMenuPending=!1,t.wrapper.style.cssText=g,o.style.cssText=p,y&&x<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=f),o.selectionStart!=null)){(!y||y&&x<9)&&R();var Q=0,le=function(){n.selForContextMenu==i.doc.sel&&o.selectionStart==0&&o.selectionEnd>0&&t.prevInput=="\u200B"?bt(i,Ru)(i):Q++<10?n.detectingSelectAll=setTimeout(le,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(le,200)}}if(y&&x>=9&&R(),ze){cn(e);var U=function(){Qe(window,"mouseup",U),setTimeout(E,20)};Pe(window,"mouseup",U)}else setTimeout(E,50)},ct.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},ct.prototype.setUneditable=function(){},ct.prototype.needsContentAttribute=!1;function Rp(e,t){if(t=t?Re(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=ae();t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function n(){e.value=h.getValue()}var o;if(e.form&&(Pe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var a=e.form;o=a.submit;try{var f=a.submit=function(){n(),a.submit=o,a.submit(),a.submit=f}}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&&(Qe(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=o))}},e.style.display="none";var h=ot(function(p){return e.parentNode.insertBefore(p,e.nextSibling)},t);return h}function Fp(e){e.off=Qe,e.on=Pe,e.wheelEventPixels=jd,e.Doc=Ft,e.splitLines=mi,e.countColumn=$e,e.findColumn=Le,e.isWordChar=te,e.Pass=oe,e.signal=Oe,e.Line=Dn,e.changeEnd=Xr,e.scrollbarModel=hu,e.Pos=ie,e.cmpPos=v,e.modes=ir,e.mimeModes=Jt,e.resolveMode=An,e.getMode=Nn,e.modeExtensions=lr,e.extendMode=ar,e.copyState=Qt,e.startState=wi,e.innerMode=bi,e.commands=qi,e.keyMap=Dr,e.keyName=Qu,e.isModifierKey=Zu,e.lookupKey=Xn,e.normalizeKeyMap=hp,e.StringStream=ut,e.SharedTextMarker=Ui,e.TextMarker=Zr,e.LineWidget=Bi,e.e_preventDefault=Pt,e.e_stopPropagation=_n,e.e_stop=cn,e.addClass=Ne,e.contains=X,e.rmClass=de,e.keyNames=Jr}Pp(ot),Ap(ot);var Ip="iter insert remove copy getEditor constructor".split(" ");for(var Xo in Ft.prototype)Ft.prototype.hasOwnProperty(Xo)&&Z(Ip,Xo)<0&&(ot.prototype[Xo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ft.prototype[Xo]));return mr(Ft),ot.inputStyles={textarea:ct,contenteditable:Ze},ot.defineMode=function(e){!ot.defaults.mode&&e!="null"&&(ot.defaults.mode=e),bo.apply(this,arguments)},ot.defineMIME=Er,ot.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ot.defineMIME("text/plain","null"),ot.defineExtension=function(e,t){ot.prototype[e]=t},ot.defineDocExtension=function(e,t){Ft.prototype[e]=t},ot.fromTextArea=Rp,Fp(ot),ot.version="5.65.2",ot})})(Br);var w0=Br.exports,Lh={exports:{}};(function(r,s){(function(l){l(Br.exports)})(function(l){l.defineMode("javascript",function(u,c){var d=u.indentUnit,m=c.statementIndent,b=c.jsonld,y=c.json||b,x=c.trackScope!==!1,S=c.typescript,P=c.wordCharacters||/[\w$\xa1-\uffff]/,O=function(){function v(Ot){return{type:Ot,style:"keyword"}}var M=v("keyword a"),$=v("keyword b"),se=v("keyword c"),De=v("keyword d"),je=v("operator"),be={type:"atom",style:"atom"};return{if:v("if"),while:M,with:M,else:$,do:$,try:$,finally:$,return:De,break:De,continue:De,new:v("new"),delete:se,void:se,throw:se,debugger:v("debugger"),var:v("var"),const:v("var"),let:v("var"),function:v("function"),catch:v("catch"),for:v("for"),switch:v("switch"),case:v("case"),default:v("default"),in:je,typeof:je,instanceof:je,true:be,false:be,null:be,undefined:be,NaN:be,Infinity:be,this:v("this"),class:v("class"),super:v("atom"),yield:se,export:v("export"),import:v("import"),extends:se,await:se}}(),z=/[+\-*&%=<>!?|~^@]/,j=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function ne(v){for(var M=!1,$,se=!1;($=v.next())!=null;){if(!M){if($=="/"&&!se)return;$=="["?se=!0:se&&$=="]"&&(se=!1)}M=!M&&$=="\\"}}var ee,A;function I(v,M,$){return ee=v,A=$,M}function D(v,M){var $=v.next();if($=='"'||$=="'")return M.tokenize=H($),M.tokenize(v,M);if($=="."&&v.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return I("number","number");if($=="."&&v.match(".."))return I("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test($))return I($);if($=="="&&v.eat(">"))return I("=>","operator");if($=="0"&&v.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return I("number","number");if(/\d/.test($))return v.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),I("number","number");if($=="/")return v.eat("*")?(M.tokenize=ce,ce(v,M)):v.eat("/")?(v.skipToEnd(),I("comment","comment")):ie(v,M,1)?(ne(v),v.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),I("regexp","string-2")):(v.eat("="),I("operator","operator",v.current()));if($=="`")return M.tokenize=Se,Se(v,M);if($=="#"&&v.peek()=="!")return v.skipToEnd(),I("meta","meta");if($=="#"&&v.eatWhile(P))return I("variable","property");if($=="<"&&v.match("!--")||$=="-"&&v.match("->")&&!/\S/.test(v.string.slice(0,v.start)))return v.skipToEnd(),I("comment","comment");if(z.test($))return($!=">"||!M.lexical||M.lexical.type!=">")&&(v.eat("=")?($=="!"||$=="=")&&v.eat("="):/[<>*+\-|&?]/.test($)&&(v.eat($),$==">"&&v.eat($))),$=="?"&&v.eat(".")?I("."):I("operator","operator",v.current());if(P.test($)){v.eatWhile(P);var se=v.current();if(M.lastType!="."){if(O.propertyIsEnumerable(se)){var De=O[se];return I(De.type,De.style,se)}if(se=="async"&&v.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return I("async","keyword",se)}return I("variable","variable",se)}}function H(v){return function(M,$){var se=!1,De;if(b&&M.peek()=="@"&&M.match(j))return $.tokenize=D,I("jsonld-keyword","meta");for(;(De=M.next())!=null&&!(De==v&&!se);)se=!se&&De=="\\";return se||($.tokenize=D),I("string","string")}}function ce(v,M){for(var $=!1,se;se=v.next();){if(se=="/"&&$){M.tokenize=D;break}$=se=="*"}return I("comment","comment")}function Se(v,M){for(var $=!1,se;(se=v.next())!=null;){if(!$&&(se=="`"||se=="$"&&v.eat("{"))){M.tokenize=D;break}$=!$&&se=="\\"}return I("quasi","string-2",v.current())}var we="([{}])";function He(v,M){M.fatArrowAt&&(M.fatArrowAt=null);var $=v.string.indexOf("=>",v.start);if(!($<0)){if(S){var se=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(v.string.slice(v.start,$));se&&($=se.index)}for(var De=0,je=!1,be=$-1;be>=0;--be){var Ot=v.string.charAt(be),Vt=we.indexOf(Ot);if(Vt>=0&&Vt<3){if(!De){++be;break}if(--De==0){Ot=="("&&(je=!0);break}}else if(Vt>=3&&Vt<6)++De;else if(P.test(Ot))je=!0;else if(/["'\/`]/.test(Ot))for(;;--be){if(be==0)return;var zn=v.string.charAt(be-1);if(zn==Ot&&v.string.charAt(be-2)!="\\"){be--;break}}else if(je&&!De){++be;break}}je&&!De&&(M.fatArrowAt=be)}}var ze={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function me(v,M,$,se,De,je){this.indented=v,this.column=M,this.type=$,this.prev=De,this.info=je,se!=null&&(this.align=se)}function de(v,M){if(!x)return!1;for(var $=v.localVars;$;$=$.next)if($.name==M)return!0;for(var se=v.context;se;se=se.prev)for(var $=se.vars;$;$=$.next)if($.name==M)return!0}function Ae(v,M,$,se,De){var je=v.cc;for(B.state=v,B.stream=De,B.marked=null,B.cc=je,B.style=M,v.lexical.hasOwnProperty("align")||(v.lexical.align=!0);;){var be=je.length?je.pop():y?pe:Ce;if(be($,se)){for(;je.length&&je[je.length-1].lex;)je.pop()();return B.marked?B.marked:$=="variable"&&de(v,se)?"variable-2":M}}}var B={state:null,column:null,marked:null,cc:null};function G(){for(var v=arguments.length-1;v>=0;v--)B.cc.push(arguments[v])}function w(){return G.apply(null,arguments),!0}function V(v,M){for(var $=M;$;$=$.next)if($.name==v)return!0;return!1}function X(v){var M=B.state;if(B.marked="def",!!x){if(M.context){if(M.lexical.info=="var"&&M.context&&M.context.block){var $=ae(v,M.context);if($!=null){M.context=$;return}}else if(!V(v,M.localVars)){M.localVars=new tt(v,M.localVars);return}}c.globalVars&&!V(v,M.globalVars)&&(M.globalVars=new tt(v,M.globalVars))}}function ae(v,M){if(M)if(M.block){var $=ae(v,M.prev);return $?$==M.prev?M:new qe($,M.vars,!0):null}else return V(v,M.vars)?M:new qe(M.prev,new tt(v,M.vars),!1);else return null}function Ne(v){return v=="public"||v=="private"||v=="protected"||v=="abstract"||v=="readonly"}function qe(v,M,$){this.prev=v,this.vars=M,this.block=$}function tt(v,M){this.name=v,this.next=M}var it=new tt("this",new tt("arguments",null));function Re(){B.state.context=new qe(B.state.context,B.state.localVars,!1),B.state.localVars=it}function $e(){B.state.context=new qe(B.state.context,B.state.localVars,!0),B.state.localVars=null}Re.lex=$e.lex=!0;function q(){B.state.localVars=B.state.context.vars,B.state.context=B.state.context.prev}q.lex=!0;function Z(v,M){var $=function(){var se=B.state,De=se.indented;if(se.lexical.type=="stat")De=se.lexical.indented;else for(var je=se.lexical;je&&je.type==")"&&je.align;je=je.prev)De=je.indented;se.lexical=new me(De,B.stream.column(),v,null,se.lexical,M)};return $.lex=!0,$}function K(){var v=B.state;v.lexical.prev&&(v.lexical.type==")"&&(v.indented=v.lexical.indented),v.lexical=v.lexical.prev)}K.lex=!0;function oe(v){function M($){return $==v?w():v==";"||$=="}"||$==")"||$=="]"?G():w(M)}return M}function Ce(v,M){return v=="var"?w(Z("vardef",M),gi,oe(";"),K):v=="keyword a"?w(Z("form"),T,Ce,K):v=="keyword b"?w(Z("form"),Ce,K):v=="keyword d"?B.stream.match(/^\s*$/,!1)?w():w(Z("stat"),F,oe(";"),K):v=="debugger"?w(oe(";")):v=="{"?w(Z("}"),$e,ht,K,q):v==";"?w():v=="if"?(B.state.lexical.info=="else"&&B.state.cc[B.state.cc.length-1]==K&&B.state.cc.pop()(),w(Z("form"),T,Ce,K,mo)):v=="function"?w(ir):v=="for"?w(Z("form"),$e,yo,Ce,q,K):v=="class"||S&&M=="interface"?(B.marked="keyword",w(Z("form",v=="class"?v:M),Nn,K)):v=="variable"?S&&M=="declare"?(B.marked="keyword",w(Ce)):S&&(M=="module"||M=="enum"||M=="type")&&B.stream.match(/^\s*\w/,!1)?(B.marked="keyword",M=="enum"?w(wr):M=="type"?w(bo,oe("operator"),Oe,oe(";")):w(Z("form"),Dt,oe("{"),Z("}"),ht,K,K)):S&&M=="namespace"?(B.marked="keyword",w(Z("form"),pe,Ce,K)):S&&M=="abstract"?(B.marked="keyword",w(Ce)):w(Z("stat"),he):v=="switch"?w(Z("form"),T,oe("{"),Z("}","switch"),$e,ht,K,K,q):v=="case"?w(pe,oe(":")):v=="default"?w(oe(":")):v=="catch"?w(Z("form"),Re,ke,Ce,K,q):v=="export"?w(Z("stat"),bi,K):v=="import"?w(Z("stat"),ut,K):v=="async"?w(Ce):M=="@"?w(pe,Ce):G(Z("stat"),pe,oe(";"),K)}function ke(v){if(v=="(")return w(Er,oe(")"))}function pe(v,M){return _(v,M,!1)}function Le(v,M){return _(v,M,!0)}function T(v){return v!="("?G():w(Z(")"),F,oe(")"),K)}function _(v,M,$){if(B.state.fatArrowAt==B.stream.start){var se=$?te:fe;if(v=="(")return w(Re,Z(")"),Fe(Er,")"),K,oe("=>"),se,q);if(v=="variable")return G(Re,Dt,oe("=>"),se,q)}var De=$?J:Y;return ze.hasOwnProperty(v)?w(De):v=="function"?w(ir,De):v=="class"||S&&M=="interface"?(B.marked="keyword",w(Z("form"),An,K)):v=="keyword c"||v=="async"?w($?Le:pe):v=="("?w(Z(")"),F,oe(")"),K,De):v=="operator"||v=="spread"?w($?Le:pe):v=="["?w(Z("]"),Ge,K,De):v=="{"?mt(Ie,"}",null,De):v=="quasi"?G(re,De):v=="new"?w(L($)):w()}function F(v){return v.match(/[;\}\)\],]/)?G():G(pe)}function Y(v,M){return v==","?w(F):J(v,M,!1)}function J(v,M,$){var se=$==!1?Y:J,De=$==!1?pe:Le;if(v=="=>")return w(Re,$?te:fe,q);if(v=="operator")return/\+\+|--/.test(M)||S&&M=="!"?w(se):S&&M=="<"&&B.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?w(Z(">"),Fe(Oe,">"),K,se):M=="?"?w(pe,oe(":"),De):w(De);if(v=="quasi")return G(re,se);if(v!=";"){if(v=="(")return mt(Le,")","call",se);if(v==".")return w(Me,se);if(v=="[")return w(Z("]"),F,oe("]"),K,se);if(S&&M=="as")return B.marked="keyword",w(Oe,se);if(v=="regexp")return B.state.lastType=B.marked="operator",B.stream.backUp(B.stream.pos-B.stream.start-1),w(De)}}function re(v,M){return v!="quasi"?G():M.slice(M.length-2)!="${"?w(re):w(F,ue)}function ue(v){if(v=="}")return B.marked="string-2",B.state.tokenize=Se,w(re)}function fe(v){return He(B.stream,B.state),G(v=="{"?Ce:pe)}function te(v){return He(B.stream,B.state),G(v=="{"?Ce:Le)}function L(v){return function(M){return M=="."?w(v?N:W):M=="variable"&&S?w(cn,v?J:Y):G(v?Le:pe)}}function W(v,M){if(M=="target")return B.marked="keyword",w(Y)}function N(v,M){if(M=="target")return B.marked="keyword",w(J)}function he(v){return v==":"?w(K,Ce):G(Y,oe(";"),K)}function Me(v){if(v=="variable")return B.marked="property",w()}function Ie(v,M){if(v=="async")return B.marked="property",w(Ie);if(v=="variable"||B.style=="keyword"){if(B.marked="property",M=="get"||M=="set")return w(Ve);var $;return S&&B.state.fatArrowAt==B.stream.start&&($=B.stream.match(/^\s*:\s*/,!1))&&(B.state.fatArrowAt=B.stream.pos+$[0].length),w(Ue)}else{if(v=="number"||v=="string")return B.marked=b?"property":B.style+" property",w(Ue);if(v=="jsonld-keyword")return w(Ue);if(S&&Ne(M))return B.marked="keyword",w(Ie);if(v=="[")return w(pe,nr,oe("]"),Ue);if(v=="spread")return w(Le,Ue);if(M=="*")return B.marked="keyword",w(Ie);if(v==":")return G(Ue)}}function Ve(v){return v!="variable"?G(Ue):(B.marked="property",w(ir))}function Ue(v){if(v==":")return w(Le);if(v=="(")return G(ir)}function Fe(v,M,$){function se(De,je){if($?$.indexOf(De)>-1:De==","){var be=B.state.lexical;return be.info=="call"&&(be.pos=(be.pos||0)+1),w(function(Ot,Vt){return Ot==M||Vt==M?G():G(v)},se)}return De==M||je==M?w():$&&$.indexOf(";")>-1?G(v):w(oe(M))}return function(De,je){return De==M||je==M?w():G(v,se)}}function mt(v,M,$){for(var se=3;se<arguments.length;se++)B.cc.push(arguments[se]);return w(Z(M,$),Fe(v,M),K)}function ht(v){return v=="}"?w():G(Ce,ht)}function nr(v,M){if(S){if(v==":")return w(Oe);if(M=="?")return w(nr)}}function Pe(v,M){if(S&&(v==":"||M=="in"))return w(Oe)}function Or(v){if(S&&v==":")return B.stream.match(/^\s*\w+\s+is\b/,!1)?w(pe,Qe,Oe):w(Oe)}function Qe(v,M){if(M=="is")return B.marked="keyword",w()}function Oe(v,M){if(M=="keyof"||M=="typeof"||M=="infer"||M=="readonly")return B.marked="keyword",w(M=="typeof"?Le:Oe);if(v=="variable"||M=="void")return B.marked="type",w(Zt);if(M=="|"||M=="&")return w(Oe);if(v=="string"||v=="number"||v=="atom")return w(Zt);if(v=="[")return w(Z("]"),Fe(Oe,"]",","),K,Zt);if(v=="{")return w(Z("}"),En,K,Zt);if(v=="(")return w(Fe(_n,")"),st,Zt);if(v=="<")return w(Fe(Oe,">"),Oe);if(v=="quasi")return G(mr,Zt)}function st(v){if(v=="=>")return w(Oe)}function En(v){return v.match(/[\}\)\]]/)?w():v==","||v==";"?w(En):G(Ct,En)}function Ct(v,M){if(v=="variable"||B.style=="keyword")return B.marked="property",w(Ct);if(M=="?"||v=="number"||v=="string")return w(Ct);if(v==":")return w(Oe);if(v=="[")return w(oe("variable"),Pe,oe("]"),Ct);if(v=="(")return G(Jt,Ct);if(!v.match(/[;\}\)\],]/))return w()}function mr(v,M){return v!="quasi"?G():M.slice(M.length-2)!="${"?w(mr):w(Oe,Pt)}function Pt(v){if(v=="}")return B.marked="string-2",B.state.tokenize=Se,w(mr)}function _n(v,M){return v=="variable"&&B.stream.match(/^\s*[?:]/,!1)||M=="?"?w(_n):v==":"?w(Oe):v=="spread"?w(_n):G(Oe)}function Zt(v,M){if(M=="<")return w(Z(">"),Fe(Oe,">"),K,Zt);if(M=="|"||v=="."||M=="&")return w(Oe);if(v=="[")return w(Oe,oe("]"),Zt);if(M=="extends"||M=="implements")return B.marked="keyword",w(Oe);if(M=="?")return w(Oe,oe(":"),Oe)}function cn(v,M){if(M=="<")return w(Z(">"),Fe(Oe,">"),K,Zt)}function Ur(){return G(Oe,go)}function go(v,M){if(M=="=")return w(Oe)}function gi(v,M){return M=="enum"?(B.marked="keyword",w(wr)):G(Dt,nr,yr,mi)}function Dt(v,M){if(S&&Ne(M))return B.marked="keyword",w(Dt);if(v=="variable")return X(M),w();if(v=="spread")return w(Dt);if(v=="[")return mt(vi,"]");if(v=="{")return mt(vo,"}")}function vo(v,M){return v=="variable"&&!B.stream.match(/^\s*:/,!1)?(X(M),w(yr)):(v=="variable"&&(B.marked="property"),v=="spread"?w(Dt):v=="}"?G():v=="["?w(pe,oe("]"),oe(":"),vo):w(oe(":"),Dt,yr))}function vi(){return G(Dt,yr)}function yr(v,M){if(M=="=")return w(Le)}function mi(v){if(v==",")return w(gi)}function mo(v,M){if(v=="keyword b"&&M=="else")return w(Z("form","else"),Ce,K)}function yo(v,M){if(M=="await")return w(yo);if(v=="(")return w(Z(")"),yi,K)}function yi(v){return v=="var"?w(gi,Kr):v=="variable"?w(Kr):G(Kr)}function Kr(v,M){return v==")"?w():v==";"?w(Kr):M=="in"||M=="of"?(B.marked="keyword",w(pe,Kr)):G(pe,Kr)}function ir(v,M){if(M=="*")return B.marked="keyword",w(ir);if(v=="variable")return X(M),w(ir);if(v=="(")return w(Re,Z(")"),Fe(Er,")"),K,Or,Ce,q);if(S&&M=="<")return w(Z(">"),Fe(Ur,">"),K,ir)}function Jt(v,M){if(M=="*")return B.marked="keyword",w(Jt);if(v=="variable")return X(M),w(Jt);if(v=="(")return w(Re,Z(")"),Fe(Er,")"),K,Or,q);if(S&&M=="<")return w(Z(">"),Fe(Ur,">"),K,Jt)}function bo(v,M){if(v=="keyword"||v=="variable")return B.marked="type",w(bo);if(M=="<")return w(Z(">"),Fe(Ur,">"),K)}function Er(v,M){return M=="@"&&w(pe,Er),v=="spread"?w(Er):S&&Ne(M)?(B.marked="keyword",w(Er)):S&&v=="this"?w(nr,yr):G(Dt,nr,yr)}function An(v,M){return v=="variable"?Nn(v,M):lr(v,M)}function Nn(v,M){if(v=="variable")return X(M),w(lr)}function lr(v,M){if(M=="<")return w(Z(">"),Fe(Ur,">"),K,lr);if(M=="extends"||M=="implements"||S&&v==",")return M=="implements"&&(B.marked="keyword"),w(S?Oe:pe,lr);if(v=="{")return w(Z("}"),ar,K)}function ar(v,M){if(v=="async"||v=="variable"&&(M=="static"||M=="get"||M=="set"||S&&Ne(M))&&B.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return B.marked="keyword",w(ar);if(v=="variable"||B.style=="keyword")return B.marked="property",w(Qt,ar);if(v=="number"||v=="string")return w(Qt,ar);if(v=="[")return w(pe,nr,oe("]"),Qt,ar);if(M=="*")return B.marked="keyword",w(ar);if(S&&v=="(")return G(Jt,ar);if(v==";"||v==",")return w(ar);if(v=="}")return w();if(M=="@")return w(pe,ar)}function Qt(v,M){if(M=="!"||M=="?")return w(Qt);if(v==":")return w(Oe,yr);if(M=="=")return w(Le);var $=B.state.lexical.prev,se=$&&$.info=="interface";return G(se?Jt:ir)}function bi(v,M){return M=="*"?(B.marked="keyword",w(Kt,oe(";"))):M=="default"?(B.marked="keyword",w(pe,oe(";"))):v=="{"?w(Fe(wi,"}"),Kt,oe(";")):G(Ce)}function wi(v,M){if(M=="as")return B.marked="keyword",w(oe("variable"));if(v=="variable")return G(Le,wi)}function ut(v){return v=="string"?w():v=="("?G(pe):v=="."?G(Y):G(Te,br,Kt)}function Te(v,M){return v=="{"?mt(Te,"}"):(v=="variable"&&X(M),M=="*"&&(B.marked="keyword"),w(xi))}function br(v){if(v==",")return w(Te,br)}function xi(v,M){if(M=="as")return B.marked="keyword",w(Te)}function Kt(v,M){if(M=="from")return B.marked="keyword",w(pe)}function Ge(v){return v=="]"?w():G(Fe(Le,"]"))}function wr(){return G(Z("form"),Dt,oe("{"),Z("}"),Fe(hn,"}"),K,K)}function hn(){return G(Dt,yr)}function ki(v,M){return v.lastType=="operator"||v.lastType==","||z.test(M.charAt(0))||/[,.]/.test(M.charAt(0))}function ie(v,M,$){return M.tokenize==D&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(M.lastType)||M.lastType=="quasi"&&/\{\s*$/.test(v.string.slice(0,v.pos-($||0)))}return{startState:function(v){var M={tokenize:D,lastType:"sof",cc:[],lexical:new me((v||0)-d,0,"block",!1),localVars:c.localVars,context:c.localVars&&new qe(null,null,!1),indented:v||0};return c.globalVars&&typeof c.globalVars=="object"&&(M.globalVars=c.globalVars),M},token:function(v,M){if(v.sol()&&(M.lexical.hasOwnProperty("align")||(M.lexical.align=!1),M.indented=v.indentation(),He(v,M)),M.tokenize!=ce&&v.eatSpace())return null;var $=M.tokenize(v,M);return ee=="comment"?$:(M.lastType=ee=="operator"&&(A=="++"||A=="--")?"incdec":ee,Ae(M,$,ee,A,v))},indent:function(v,M){if(v.tokenize==ce||v.tokenize==Se)return l.Pass;if(v.tokenize!=D)return 0;var $=M&&M.charAt(0),se=v.lexical,De;if(!/^\s*else\b/.test(M))for(var je=v.cc.length-1;je>=0;--je){var be=v.cc[je];if(be==K)se=se.prev;else if(be!=mo&&be!=q)break}for(;(se.type=="stat"||se.type=="form")&&($=="}"||(De=v.cc[v.cc.length-1])&&(De==Y||De==J)&&!/^[,\.=+\-*:?[\(]/.test(M));)se=se.prev;m&&se.type==")"&&se.prev.type=="stat"&&(se=se.prev);var Ot=se.type,Vt=$==Ot;return Ot=="vardef"?se.indented+(v.lastType=="operator"||v.lastType==","?se.info.length+1:0):Ot=="form"&&$=="{"?se.indented:Ot=="form"?se.indented+d:Ot=="stat"?se.indented+(ki(v,M)?m||d:0):se.info=="switch"&&!Vt&&c.doubleIndentSwitch!=!1?se.indented+(/^(?:case|default)\b/.test(M)?d:2*d):se.align?se.column+(Vt?0:1):se.indented+(Vt?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:ie,skipExpression:function(v){Ae(v,"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 Xm={exports:{}};(function(r,s){(function(l){l(Br.exports)})(function(l){l.defineMode("css",function(me,de){var Ae=de.inline;de.propertyKeywords||(de=l.resolveMode("text/css"));var B=me.indentUnit,G=de.tokenHooks,w=de.documentTypes||{},V=de.mediaTypes||{},X=de.mediaFeatures||{},ae=de.mediaValueKeywords||{},Ne=de.propertyKeywords||{},qe=de.nonStandardPropertyKeywords||{},tt=de.fontProperties||{},it=de.counterDescriptors||{},Re=de.colorKeywords||{},$e=de.valueKeywords||{},q=de.allowNested,Z=de.lineComment,K=de.supportsAtComponent===!0,oe=me.highlightNonStandardPropertyKeywords!==!1,Ce,ke;function pe(L,W){return Ce=W,L}function Le(L,W){var N=L.next();if(G[N]){var he=G[N](L,W);if(he!==!1)return he}if(N=="@")return L.eatWhile(/[\w\\\-]/),pe("def",L.current());if(N=="="||(N=="~"||N=="|")&&L.eat("="))return pe(null,"compare");if(N=='"'||N=="'")return W.tokenize=T(N),W.tokenize(L,W);if(N=="#")return L.eatWhile(/[\w\\\-]/),pe("atom","hash");if(N=="!")return L.match(/^\s*\w*/),pe("keyword","important");if(/\d/.test(N)||N=="."&&L.eat(/\d/))return L.eatWhile(/[\w.%]/),pe("number","unit");if(N==="-"){if(/[\d.]/.test(L.peek()))return L.eatWhile(/[\w.%]/),pe("number","unit");if(L.match(/^-[\w\\\-]*/))return L.eatWhile(/[\w\\\-]/),L.match(/^\s*:/,!1)?pe("variable-2","variable-definition"):pe("variable-2","variable");if(L.match(/^\w+-/))return pe("meta","meta")}else return/[,+>*\/]/.test(N)?pe(null,"select-op"):N=="."&&L.match(/^-?[_a-z][_a-z0-9-]*/i)?pe("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(N)?pe(null,N):L.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(L.current())&&(W.tokenize=_),pe("variable callee","variable")):/[\w\\\-]/.test(N)?(L.eatWhile(/[\w\\\-]/),pe("property","word")):pe(null,null)}function T(L){return function(W,N){for(var he=!1,Me;(Me=W.next())!=null;){if(Me==L&&!he){L==")"&&W.backUp(1);break}he=!he&&Me=="\\"}return(Me==L||!he&&L!=")")&&(N.tokenize=null),pe("string","string")}}function _(L,W){return L.next(),L.match(/^\s*[\"\')]/,!1)?W.tokenize=null:W.tokenize=T(")"),pe(null,"(")}function F(L,W,N){this.type=L,this.indent=W,this.prev=N}function Y(L,W,N,he){return L.context=new F(N,W.indentation()+(he===!1?0:B),L.context),N}function J(L){return L.context.prev&&(L.context=L.context.prev),L.context.type}function re(L,W,N){return te[N.context.type](L,W,N)}function ue(L,W,N,he){for(var Me=he||1;Me>0;Me--)N.context=N.context.prev;return re(L,W,N)}function fe(L){var W=L.current().toLowerCase();$e.hasOwnProperty(W)?ke="atom":Re.hasOwnProperty(W)?ke="keyword":ke="variable"}var te={};return te.top=function(L,W,N){if(L=="{")return Y(N,W,"block");if(L=="}"&&N.context.prev)return J(N);if(K&&/@component/i.test(L))return Y(N,W,"atComponentBlock");if(/^@(-moz-)?document$/i.test(L))return Y(N,W,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(L))return Y(N,W,"atBlock");if(/^@(font-face|counter-style)/i.test(L))return N.stateArg=L,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(L))return"keyframes";if(L&&L.charAt(0)=="@")return Y(N,W,"at");if(L=="hash")ke="builtin";else if(L=="word")ke="tag";else{if(L=="variable-definition")return"maybeprop";if(L=="interpolation")return Y(N,W,"interpolation");if(L==":")return"pseudo";if(q&&L=="(")return Y(N,W,"parens")}return N.context.type},te.block=function(L,W,N){if(L=="word"){var he=W.current().toLowerCase();return Ne.hasOwnProperty(he)?(ke="property","maybeprop"):qe.hasOwnProperty(he)?(ke=oe?"string-2":"property","maybeprop"):q?(ke=W.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(ke+=" error","maybeprop")}else return L=="meta"?"block":!q&&(L=="hash"||L=="qualifier")?(ke="error","block"):te.top(L,W,N)},te.maybeprop=function(L,W,N){return L==":"?Y(N,W,"prop"):re(L,W,N)},te.prop=function(L,W,N){if(L==";")return J(N);if(L=="{"&&q)return Y(N,W,"propBlock");if(L=="}"||L=="{")return ue(L,W,N);if(L=="(")return Y(N,W,"parens");if(L=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(W.current()))ke+=" error";else if(L=="word")fe(W);else if(L=="interpolation")return Y(N,W,"interpolation");return"prop"},te.propBlock=function(L,W,N){return L=="}"?J(N):L=="word"?(ke="property","maybeprop"):N.context.type},te.parens=function(L,W,N){return L=="{"||L=="}"?ue(L,W,N):L==")"?J(N):L=="("?Y(N,W,"parens"):L=="interpolation"?Y(N,W,"interpolation"):(L=="word"&&fe(W),"parens")},te.pseudo=function(L,W,N){return L=="meta"?"pseudo":L=="word"?(ke="variable-3",N.context.type):re(L,W,N)},te.documentTypes=function(L,W,N){return L=="word"&&w.hasOwnProperty(W.current())?(ke="tag",N.context.type):te.atBlock(L,W,N)},te.atBlock=function(L,W,N){if(L=="(")return Y(N,W,"atBlock_parens");if(L=="}"||L==";")return ue(L,W,N);if(L=="{")return J(N)&&Y(N,W,q?"block":"top");if(L=="interpolation")return Y(N,W,"interpolation");if(L=="word"){var he=W.current().toLowerCase();he=="only"||he=="not"||he=="and"||he=="or"?ke="keyword":V.hasOwnProperty(he)?ke="attribute":X.hasOwnProperty(he)?ke="property":ae.hasOwnProperty(he)?ke="keyword":Ne.hasOwnProperty(he)?ke="property":qe.hasOwnProperty(he)?ke=oe?"string-2":"property":$e.hasOwnProperty(he)?ke="atom":Re.hasOwnProperty(he)?ke="keyword":ke="error"}return N.context.type},te.atComponentBlock=function(L,W,N){return L=="}"?ue(L,W,N):L=="{"?J(N)&&Y(N,W,q?"block":"top",!1):(L=="word"&&(ke="error"),N.context.type)},te.atBlock_parens=function(L,W,N){return L==")"?J(N):L=="{"||L=="}"?ue(L,W,N,2):te.atBlock(L,W,N)},te.restricted_atBlock_before=function(L,W,N){return L=="{"?Y(N,W,"restricted_atBlock"):L=="word"&&N.stateArg=="@counter-style"?(ke="variable","restricted_atBlock_before"):re(L,W,N)},te.restricted_atBlock=function(L,W,N){return L=="}"?(N.stateArg=null,J(N)):L=="word"?(N.stateArg=="@font-face"&&!tt.hasOwnProperty(W.current().toLowerCase())||N.stateArg=="@counter-style"&&!it.hasOwnProperty(W.current().toLowerCase())?ke="error":ke="property","maybeprop"):"restricted_atBlock"},te.keyframes=function(L,W,N){return L=="word"?(ke="variable","keyframes"):L=="{"?Y(N,W,"top"):re(L,W,N)},te.at=function(L,W,N){return L==";"?J(N):L=="{"||L=="}"?ue(L,W,N):(L=="word"?ke="tag":L=="hash"&&(ke="builtin"),"at")},te.interpolation=function(L,W,N){return L=="}"?J(N):L=="{"||L==";"?ue(L,W,N):(L=="word"?ke="variable":L!="variable"&&L!="("&&L!=")"&&(ke="error"),"interpolation")},{startState:function(L){return{tokenize:null,state:Ae?"block":"top",stateArg:null,context:new F(Ae?"block":"top",L||0,null)}},token:function(L,W){if(!W.tokenize&&L.eatSpace())return null;var N=(W.tokenize||Le)(L,W);return N&&typeof N=="object"&&(Ce=N[1],N=N[0]),ke=N,Ce!="comment"&&(W.state=te[W.state](Ce,L,W)),ke},indent:function(L,W){var N=L.context,he=W&&W.charAt(0),Me=N.indent;return N.type=="prop"&&(he=="}"||he==")")&&(N=N.prev),N.prev&&(he=="}"&&(N.type=="block"||N.type=="top"||N.type=="interpolation"||N.type=="restricted_atBlock")?(N=N.prev,Me=N.indent):(he==")"&&(N.type=="parens"||N.type=="atBlock_parens")||he=="{"&&(N.type=="at"||N.type=="atBlock"))&&(Me=Math.max(0,N.indent-B))),Me},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:Z,fold:"brace"}});function u(me){for(var de={},Ae=0;Ae<me.length;++Ae)de[me[Ae].toLowerCase()]=!0;return de}var c=["domain","regexp","url","url-prefix"],d=u(c),m=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],b=u(m),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),S=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],P=u(S),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"],z=u(O),j=["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"],ne=u(j),ee=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],A=u(ee),I=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],D=u(I),H=["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"],ce=u(H),Se=["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","button-bevel","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-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","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"],we=u(Se),He=c.concat(m).concat(y).concat(S).concat(O).concat(j).concat(H).concat(Se);l.registerHelper("hintWords","css",He);function ze(me,de){for(var Ae=!1,B;(B=me.next())!=null;){if(Ae&&B=="/"){de.tokenize=null;break}Ae=B=="*"}return["comment","comment"]}l.defineMIME("text/css",{documentTypes:d,mediaTypes:b,mediaFeatures:x,mediaValueKeywords:P,propertyKeywords:z,nonStandardPropertyKeywords:ne,fontProperties:A,counterDescriptors:D,colorKeywords:ce,valueKeywords:we,tokenHooks:{"/":function(me,de){return me.eat("*")?(de.tokenize=ze,ze(me,de)):!1}},name:"css"}),l.defineMIME("text/x-scss",{mediaTypes:b,mediaFeatures:x,mediaValueKeywords:P,propertyKeywords:z,nonStandardPropertyKeywords:ne,colorKeywords:ce,valueKeywords:we,fontProperties:A,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(me,de){return me.eat("/")?(me.skipToEnd(),["comment","comment"]):me.eat("*")?(de.tokenize=ze,ze(me,de)):["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:P,propertyKeywords:z,nonStandardPropertyKeywords:ne,colorKeywords:ce,valueKeywords:we,fontProperties:A,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(me,de){return me.eat("/")?(me.skipToEnd(),["comment","comment"]):me.eat("*")?(de.tokenize=ze,ze(me,de)):["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:z,nonStandardPropertyKeywords:ne,fontProperties:A,counterDescriptors:D,colorKeywords:ce,valueKeywords:we,supportsAtComponent:!0,tokenHooks:{"/":function(me,de){return me.eat("*")?(de.tokenize=ze,ze(me,de)):!1}},name:"css",helperType:"gss"})})})();var Mh={exports:{}};(function(r,s){(function(l){l(Br.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},c={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};l.defineMode("xml",function(d,m){var b=d.indentUnit,y={},x=m.htmlMode?u:c;for(var S in x)y[S]=x[S];for(var S in m)y[S]=m[S];var P,O;function z(w,V){function X(qe){return V.tokenize=qe,qe(w,V)}var ae=w.next();if(ae=="<")return w.eat("!")?w.eat("[")?w.match("CDATA[")?X(ee("atom","]]>")):null:w.match("--")?X(ee("comment","-->")):w.match("DOCTYPE",!0,!0)?(w.eatWhile(/[\w\._\-]/),X(A(1))):null:w.eat("?")?(w.eatWhile(/[\w\._\-]/),V.tokenize=ee("meta","?>"),"meta"):(P=w.eat("/")?"closeTag":"openTag",V.tokenize=j,"tag bracket");if(ae=="&"){var Ne;return w.eat("#")?w.eat("x")?Ne=w.eatWhile(/[a-fA-F\d]/)&&w.eat(";"):Ne=w.eatWhile(/[\d]/)&&w.eat(";"):Ne=w.eatWhile(/[\w\.\-:]/)&&w.eat(";"),Ne?"atom":"error"}else return w.eatWhile(/[^&<]/),null}z.isInText=!0;function j(w,V){var X=w.next();if(X==">"||X=="/"&&w.eat(">"))return V.tokenize=z,P=X==">"?"endTag":"selfcloseTag","tag bracket";if(X=="=")return P="equals",null;if(X=="<"){V.tokenize=z,V.state=Se,V.tagName=V.tagStart=null;var ae=V.tokenize(w,V);return ae?ae+" tag error":"tag error"}else return/[\'\"]/.test(X)?(V.tokenize=ne(X),V.stringStartCol=w.column(),V.tokenize(w,V)):(w.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ne(w){var V=function(X,ae){for(;!X.eol();)if(X.next()==w){ae.tokenize=j;break}return"string"};return V.isInAttribute=!0,V}function ee(w,V){return function(X,ae){for(;!X.eol();){if(X.match(V)){ae.tokenize=z;break}X.next()}return w}}function A(w){return function(V,X){for(var ae;(ae=V.next())!=null;){if(ae=="<")return X.tokenize=A(w+1),X.tokenize(V,X);if(ae==">")if(w==1){X.tokenize=z;break}else return X.tokenize=A(w-1),X.tokenize(V,X)}return"meta"}}function I(w){return w&&w.toLowerCase()}function D(w,V,X){this.prev=w.context,this.tagName=V||"",this.indent=w.indented,this.startOfLine=X,(y.doNotIndent.hasOwnProperty(V)||w.context&&w.context.noIndent)&&(this.noIndent=!0)}function H(w){w.context&&(w.context=w.context.prev)}function ce(w,V){for(var X;;){if(!w.context||(X=w.context.tagName,!y.contextGrabbers.hasOwnProperty(I(X))||!y.contextGrabbers[I(X)].hasOwnProperty(I(V))))return;H(w)}}function Se(w,V,X){return w=="openTag"?(X.tagStart=V.column(),we):w=="closeTag"?He:Se}function we(w,V,X){return w=="word"?(X.tagName=V.current(),O="tag",de):y.allowMissingTagName&&w=="endTag"?(O="tag bracket",de(w,V,X)):(O="error",we)}function He(w,V,X){if(w=="word"){var ae=V.current();return X.context&&X.context.tagName!=ae&&y.implicitlyClosed.hasOwnProperty(I(X.context.tagName))&&H(X),X.context&&X.context.tagName==ae||y.matchClosing===!1?(O="tag",ze):(O="tag error",me)}else return y.allowMissingTagName&&w=="endTag"?(O="tag bracket",ze(w,V,X)):(O="error",me)}function ze(w,V,X){return w!="endTag"?(O="error",ze):(H(X),Se)}function me(w,V,X){return O="error",ze(w,V,X)}function de(w,V,X){if(w=="word")return O="attribute",Ae;if(w=="endTag"||w=="selfcloseTag"){var ae=X.tagName,Ne=X.tagStart;return X.tagName=X.tagStart=null,w=="selfcloseTag"||y.autoSelfClosers.hasOwnProperty(I(ae))?ce(X,ae):(ce(X,ae),X.context=new D(X,ae,Ne==X.indented)),Se}return O="error",de}function Ae(w,V,X){return w=="equals"?B:(y.allowMissing||(O="error"),de(w,V,X))}function B(w,V,X){return w=="string"?G:w=="word"&&y.allowUnquoted?(O="string",de):(O="error",de(w,V,X))}function G(w,V,X){return w=="string"?G:de(w,V,X)}return{startState:function(w){var V={tokenize:z,state:Se,indented:w||0,tagName:null,tagStart:null,context:null};return w!=null&&(V.baseIndent=w),V},token:function(w,V){if(!V.tagName&&w.sol()&&(V.indented=w.indentation()),w.eatSpace())return null;P=null;var X=V.tokenize(w,V);return(X||P)&&X!="comment"&&(O=null,V.state=V.state(P||X,w,V),O&&(X=O=="error"?X+" error":O)),X},indent:function(w,V,X){var ae=w.context;if(w.tokenize.isInAttribute)return w.tagStart==w.indented?w.stringStartCol+1:w.indented+b;if(ae&&ae.noIndent)return l.Pass;if(w.tokenize!=j&&w.tokenize!=z)return X?X.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(V))return 0;var Ne=V&&/^<(\/)?([\w_:\.-]*)/.exec(V);if(Ne&&Ne[1])for(;ae;)if(ae.tagName==Ne[2]){ae=ae.prev;break}else if(y.implicitlyClosed.hasOwnProperty(I(ae.tagName)))ae=ae.prev;else break;else if(Ne)for(;ae;){var qe=y.contextGrabbers[I(ae.tagName)];if(qe&&qe.hasOwnProperty(I(Ne[2])))ae=ae.prev;else break}for(;ae&&ae.prev&&!ae.startOfLine;)ae=ae.prev;return ae?ae.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==B&&(w.state=de)},xmlCurrentTag:function(w){return w.tagName?{name:w.tagName,close:w.type=="closeTag"}:null},xmlCurrentContext:function(w){for(var V=[],X=w.context;X;X=X.prev)V.push(X.tagName);return V.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(Br.exports,Mh.exports,Lh.exports,Xm.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 c(P,O,z){var j=P.current(),ne=j.search(O);return ne>-1?P.backUp(j.length-ne):j.match(/<\/?$/)&&(P.backUp(j.length),P.match(O,!1)||P.match(j)),z}var d={};function m(P){var O=d[P];return O||(d[P]=new RegExp("\\s+"+P+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function b(P,O){var z=P.match(m(O));return z?/^\s*(.*?)\s*$/.exec(z[2])[1]:""}function y(P,O){return new RegExp((O?"^":"")+"</\\s*"+P+"\\s*>","i")}function x(P,O){for(var z in P)for(var j=O[z]||(O[z]=[]),ne=P[z],ee=ne.length-1;ee>=0;ee--)j.unshift(ne[ee])}function S(P,O){for(var z=0;z<P.length;z++){var j=P[z];if(!j[0]||j[1].test(b(O,j[0])))return j[2]}}l.defineMode("htmlmixed",function(P,O){var z=l.getMode(P,{name:"xml",htmlMode:!0,multilineTagIndentFactor:O.multilineTagIndentFactor,multilineTagIndentPastTag:O.multilineTagIndentPastTag,allowMissingTagName:O.allowMissingTagName}),j={},ne=O&&O.tags,ee=O&&O.scriptTypes;if(x(u,j),ne&&x(ne,j),ee)for(var A=ee.length-1;A>=0;A--)j.script.unshift(["type",ee[A].matches,ee[A].mode]);function I(D,H){var ce=z.token(D,H.htmlState),Se=/\btag\b/.test(ce),we;if(Se&&!/[<>\s\/]/.test(D.current())&&(we=H.htmlState.tagName&&H.htmlState.tagName.toLowerCase())&&j.hasOwnProperty(we))H.inTag=we+" ";else if(H.inTag&&Se&&/>$/.test(D.current())){var He=/^([\S]+) (.*)/.exec(H.inTag);H.inTag=null;var ze=D.current()==">"&&S(j[He[1]],He[2]),me=l.getMode(P,ze),de=y(He[1],!0),Ae=y(He[1],!1);H.token=function(B,G){return B.match(de,!1)?(G.token=I,G.localState=G.localMode=null,null):c(B,Ae,G.localMode.token(B,G.localState))},H.localMode=me,H.localState=l.startState(me,z.indent(H.htmlState,"",""))}else H.inTag&&(H.inTag+=D.current(),D.eol()&&(H.inTag+=" "));return ce}return{startState:function(){var D=l.startState(z);return{token:I,inTag:null,localMode:null,localState:null,htmlState:D}},copyState:function(D){var H;return D.localState&&(H=l.copyState(D.localMode,D.localState)),{token:D.token,inTag:D.inTag,localMode:D.localMode,localState:H,htmlState:l.copyState(z,D.htmlState)}},token:function(D,H){return H.token(D,H)},indent:function(D,H,ce){return!D.localMode||/^\s*<\//.test(H)?z.indent(D.htmlState,H,ce):D.localMode.indent?D.localMode.indent(D.localState,H,ce):l.Pass},innerMode:function(D){return{state:D.localState||D.htmlState,mode:D.localMode||z}}}},"xml","javascript","css"),l.defineMIME("text/html","htmlmixed")})})();(function(r,s){(function(l){l(Br.exports,Mh.exports,Lh.exports)})(function(l){function u(d,m,b,y){this.state=d,this.mode=m,this.depth=b,this.prev=y}function c(d){return new u(l.copyState(d.mode,d.state),d.mode,d.depth,d.prev&&c(d.prev))}l.defineMode("jsx",function(d,m){var b=l.getMode(d,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),y=l.getMode(d,m&&m.base||"javascript");function x(z){var j=z.tagName;z.tagName=null;var ne=b.indent(z,"","");return z.tagName=j,ne}function S(z,j){return j.context.mode==b?P(z,j,j.context):O(z,j,j.context)}function P(z,j,ne){if(ne.depth==2)return z.match(/^.*?\*\//)?ne.depth=1:z.skipToEnd(),"comment";if(z.peek()=="{"){b.skipAttribute(ne.state);var ee=x(ne.state),A=ne.state.context;if(A&&z.match(/^[^>]*>\s*$/,!1)){for(;A.prev&&!A.startOfLine;)A=A.prev;A.startOfLine?ee-=d.indentUnit:ne.prev.state.lexical&&(ee=ne.prev.state.lexical.indented)}else ne.depth==1&&(ee+=d.indentUnit);return j.context=new u(l.startState(y,ee),y,0,j.context),null}if(ne.depth==1){if(z.peek()=="<")return b.skipAttribute(ne.state),j.context=new u(l.startState(b,x(ne.state)),b,0,j.context),null;if(z.match("//"))return z.skipToEnd(),"comment";if(z.match("/*"))return ne.depth=2,S(z,j)}var I=b.token(z,ne.state),D=z.current(),H;return/\btag\b/.test(I)?/>$/.test(D)?ne.state.context?ne.depth=0:j.context=j.context.prev:/^</.test(D)&&(ne.depth=1):!I&&(H=D.indexOf("{"))>-1&&z.backUp(D.length-H),I}function O(z,j,ne){if(z.peek()=="<"&&y.expressionAllowed(z,ne.state))return j.context=new u(l.startState(b,y.indent(ne.state,"","")),b,0,j.context),y.skipExpression(ne.state),null;var ee=y.token(z,ne.state);if(!ee&&ne.depth!=null){var A=z.current();A=="{"?ne.depth++:A=="}"&&--ne.depth==0&&(j.context=j.context.prev)}return ee}return{startState:function(){return{context:new u(l.startState(y),y)}},copyState:function(z){return{context:c(z.context)}},token:S,indent:function(z,j,ne){return z.context.mode.indent(z.context.state,j,ne)},innerMode:function(z){return z.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(Br.exports)})(function(l){l.defineOption("placeholder","",function(x,S,P){var O=P&&P!=l.Init;if(S&&!O)x.on("blur",m),x.on("change",b),x.on("swapDoc",b),l.on(x.getInputField(),"compositionupdate",x.state.placeholderCompose=function(){d(x)}),b(x);else if(!S&&O){x.off("blur",m),x.off("change",b),x.off("swapDoc",b),l.off(x.getInputField(),"compositionupdate",x.state.placeholderCompose),u(x);var z=x.getWrapperElement();z.className=z.className.replace(" CodeMirror-empty","")}S&&!x.hasFocus()&&m(x)});function u(x){x.state.placeholder&&(x.state.placeholder.parentNode.removeChild(x.state.placeholder),x.state.placeholder=null)}function c(x){u(x);var S=x.state.placeholder=document.createElement("pre");S.style.cssText="height: 0; overflow: visible",S.style.direction=x.getOption("direction"),S.className="CodeMirror-placeholder CodeMirror-line-like";var P=x.getOption("placeholder");typeof P=="string"&&(P=document.createTextNode(P)),S.appendChild(P),x.display.lineSpace.insertBefore(S,x.display.lineSpace.firstChild)}function d(x){setTimeout(function(){var S=!1;if(x.lineCount()==1){var P=x.getInputField();S=P.nodeName=="TEXTAREA"?!x.getLine(0).length:!/[^\u200b]/.test(P.querySelector(".CodeMirror-line").textContent)}S?c(x):u(x)},20)}function m(x){y(x)&&c(x)}function b(x){var S=x.getWrapperElement(),P=y(x);S.className=S.className.replace(" CodeMirror-empty","")+(P?" CodeMirror-empty":""),P?c(x):u(x)}function y(x){return x.lineCount()===1&&x.getLine(0)===""}})})();(function(r,s){(function(l){l(Br.exports)})(function(l){var u="CodeMirror-hint",c="CodeMirror-hint-active";l.showHint=function(A,I,D){if(!I)return A.showHint(D);D&&D.async&&(I.async=!0);var H={hint:I};if(D)for(var ce in D)H[ce]=D[ce];return A.showHint(H)},l.defineExtension("showHint",function(A){A=y(this,this.getCursor("start"),A);var I=this.listSelections();if(!(I.length>1)){if(this.somethingSelected()){if(!A.hint.supportsSelection)return;for(var D=0;D<I.length;D++)if(I[D].head.line!=I[D].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var H=this.state.completionActive=new d(this,A);!H.options.hint||(l.signal(this,"startCompletion",this),H.update(!0))}}),l.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});function d(A,I){if(this.cm=A,this.options=I,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 D=this;A.on("cursorActivity",this.activityFunc=function(){D.cursorActivity()})}}var m=window.requestAnimationFrame||function(A){return setTimeout(A,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(A,I){var D=A.list[I],H=this;this.cm.operation(function(){D.hint?D.hint(H.cm,A,D):H.cm.replaceRange(x(D),D.from||A.from,D.to||A.to,"complete"),l.signal(A,"pick",D),H.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(b(this.debounce),this.debounce=0);var A=this.startPos;this.data&&(A=this.data.from);var I=this.cm.getCursor(),D=this.cm.getLine(I.line);if(I.line!=this.startPos.line||D.length-I.ch!=this.startLen-this.startPos.ch||I.ch<A.ch||this.cm.somethingSelected()||!I.ch||this.options.closeCharacters.test(D.charAt(I.ch-1)))this.close();else{var H=this;this.debounce=m(function(){H.update()}),this.widget&&this.widget.disable()}},update:function(A){if(this.tick!=null){var I=this,D=++this.tick;j(this.options.hint,this.cm,this.options,function(H){I.tick==D&&I.finishUpdate(H,A)})}},finishUpdate:function(A,I){this.data&&l.signal(this.data,"update");var D=this.widget&&this.widget.picked||I&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=A,A&&A.list.length&&(D&&A.list.length==1?this.pick(A,0):(this.widget=new O(this,A),l.signal(A,"shown")))}};function y(A,I,D){var H=A.options.hintOptions,ce={};for(var Se in ee)ce[Se]=ee[Se];if(H)for(var Se in H)H[Se]!==void 0&&(ce[Se]=H[Se]);if(D)for(var Se in D)D[Se]!==void 0&&(ce[Se]=D[Se]);return ce.hint.resolve&&(ce.hint=ce.hint.resolve(A,I)),ce}function x(A){return typeof A=="string"?A:A.text}function S(A,I){var D={Up:function(){I.moveFocus(-1)},Down:function(){I.moveFocus(1)},PageUp:function(){I.moveFocus(-I.menuSize()+1,!0)},PageDown:function(){I.moveFocus(I.menuSize()-1,!0)},Home:function(){I.setFocus(0)},End:function(){I.setFocus(I.length-1)},Enter:I.pick,Tab:I.pick,Esc:I.close},H=/Mac/.test(navigator.platform);H&&(D["Ctrl-P"]=function(){I.moveFocus(-1)},D["Ctrl-N"]=function(){I.moveFocus(1)});var ce=A.options.customKeys,Se=ce?{}:D;function we(me,de){var Ae;typeof de!="string"?Ae=function(B){return de(B,I)}:D.hasOwnProperty(de)?Ae=D[de]:Ae=de,Se[me]=Ae}if(ce)for(var He in ce)ce.hasOwnProperty(He)&&we(He,ce[He]);var ze=A.options.extraKeys;if(ze)for(var He in ze)ze.hasOwnProperty(He)&&we(He,ze[He]);return Se}function P(A,I){for(;I&&I!=A;){if(I.nodeName.toUpperCase()==="LI"&&I.parentNode==A)return I;I=I.parentNode}}function O(A,I){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=A,this.data=I,this.picked=!1;var D=this,H=A.cm,ce=H.getInputField().ownerDocument,Se=ce.defaultView||ce.parentWindow,we=this.hints=ce.createElement("ul");we.setAttribute("role","listbox"),we.setAttribute("aria-expanded","true"),we.id=this.id;var He=A.cm.options.theme;we.className="CodeMirror-hints "+He,this.selectedHint=I.selectedHint||0;for(var ze=I.list,me=0;me<ze.length;++me){var de=we.appendChild(ce.createElement("li")),Ae=ze[me],B=u+(me!=this.selectedHint?"":" "+c);Ae.className!=null&&(B=Ae.className+" "+B),de.className=B,me==this.selectedHint&&de.setAttribute("aria-selected","true"),de.id=this.id+"-"+me,de.setAttribute("role","option"),Ae.render?Ae.render(de,I,Ae):de.appendChild(ce.createTextNode(Ae.displayText||x(Ae))),de.hintId=me}var G=A.options.container||ce.body,w=H.cursorCoords(A.options.alignWithWord?I.from:null),V=w.left,X=w.bottom,ae=!0,Ne=0,qe=0;if(G!==ce.body){var tt=["absolute","relative","fixed"].indexOf(Se.getComputedStyle(G).position)!==-1,it=tt?G:G.offsetParent,Re=it.getBoundingClientRect(),$e=ce.body.getBoundingClientRect();Ne=Re.left-$e.left-it.scrollLeft,qe=Re.top-$e.top-it.scrollTop}we.style.left=V-Ne+"px",we.style.top=X-qe+"px";var q=Se.innerWidth||Math.max(ce.body.offsetWidth,ce.documentElement.offsetWidth),Z=Se.innerHeight||Math.max(ce.body.offsetHeight,ce.documentElement.offsetHeight);G.appendChild(we),H.getInputField().setAttribute("aria-autocomplete","list"),H.getInputField().setAttribute("aria-owns",this.id),H.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var K=A.options.moveOnOverlap?we.getBoundingClientRect():new DOMRect,oe=A.options.paddingForScrollbar?we.scrollHeight>we.clientHeight+1:!1,Ce;setTimeout(function(){Ce=H.getScrollInfo()});var ke=K.bottom-Z;if(ke>0){var pe=K.bottom-K.top,Le=w.top-(w.bottom-K.top);if(Le-pe>0)we.style.top=(X=w.top-pe-qe)+"px",ae=!1;else if(pe>Z){we.style.height=Z-5+"px",we.style.top=(X=w.bottom-K.top-qe)+"px";var T=H.getCursor();I.from.ch!=T.ch&&(w=H.cursorCoords(T),we.style.left=(V=w.left-Ne)+"px",K=we.getBoundingClientRect())}}var _=K.right-q;if(oe&&(_+=H.display.nativeBarWidth),_>0&&(K.right-K.left>q&&(we.style.width=q-5+"px",_-=K.right-K.left-q),we.style.left=(V=w.left-_-Ne)+"px"),oe)for(var F=we.firstChild;F;F=F.nextSibling)F.style.paddingRight=H.display.nativeBarWidth+"px";if(H.addKeyMap(this.keyMap=S(A,{moveFocus:function(re,ue){D.changeActive(D.selectedHint+re,ue)},setFocus:function(re){D.changeActive(re)},menuSize:function(){return D.screenAmount()},length:ze.length,close:function(){A.close()},pick:function(){D.pick()},data:I})),A.options.closeOnUnfocus){var Y;H.on("blur",this.onBlur=function(){Y=setTimeout(function(){A.close()},100)}),H.on("focus",this.onFocus=function(){clearTimeout(Y)})}H.on("scroll",this.onScroll=function(){var re=H.getScrollInfo(),ue=H.getWrapperElement().getBoundingClientRect();Ce||(Ce=H.getScrollInfo());var fe=X+Ce.top-re.top,te=fe-(Se.pageYOffset||(ce.documentElement||ce.body).scrollTop);if(ae||(te+=we.offsetHeight),te<=ue.top||te>=ue.bottom)return A.close();we.style.top=fe+"px",we.style.left=V+Ce.left-re.left+"px"}),l.on(we,"dblclick",function(re){var ue=P(we,re.target||re.srcElement);ue&&ue.hintId!=null&&(D.changeActive(ue.hintId),D.pick())}),l.on(we,"click",function(re){var ue=P(we,re.target||re.srcElement);ue&&ue.hintId!=null&&(D.changeActive(ue.hintId),A.options.completeOnSingleClick&&D.pick())}),l.on(we,"mousedown",function(){setTimeout(function(){H.focus()},20)});var J=this.getSelectedHintRange();return(J.from!==0||J.to!==0)&&this.scrollToActive(),l.signal(I,"select",ze[this.selectedHint],we.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 A=this.completion.cm.getInputField();A.removeAttribute("aria-activedescendant"),A.removeAttribute("aria-owns");var I=this.completion.cm;this.completion.options.closeOnUnfocus&&(I.off("blur",this.onBlur),I.off("focus",this.onFocus)),I.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var A=this;this.keyMap={Enter:function(){A.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(A,I){if(A>=this.data.list.length?A=I?this.data.list.length-1:0:A<0&&(A=I?0:this.data.list.length-1),this.selectedHint!=A){var D=this.hints.childNodes[this.selectedHint];D&&(D.className=D.className.replace(" "+c,""),D.removeAttribute("aria-selected")),D=this.hints.childNodes[this.selectedHint=A],D.className+=" "+c,D.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",D.id),this.scrollToActive(),l.signal(this.data,"select",this.data.list[this.selectedHint],D)}},scrollToActive:function(){var A=this.getSelectedHintRange(),I=this.hints.childNodes[A.from],D=this.hints.childNodes[A.to],H=this.hints.firstChild;I.offsetTop<this.hints.scrollTop?this.hints.scrollTop=I.offsetTop-H.offsetTop:D.offsetTop+D.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=D.offsetTop+D.offsetHeight-this.hints.clientHeight+H.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var A=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-A),to:Math.min(this.data.list.length-1,this.selectedHint+A)}}};function z(A,I){if(!A.somethingSelected())return I;for(var D=[],H=0;H<I.length;H++)I[H].supportsSelection&&D.push(I[H]);return D}function j(A,I,D,H){if(A.async)A(I,H,D);else{var ce=A(I,D);ce&&ce.then?ce.then(H):H(ce)}}function ne(A,I){var D=A.getHelpers(I,"hint"),H;if(D.length){var ce=function(Se,we,He){var ze=z(Se,D);function me(de){if(de==ze.length)return we(null);j(ze[de],Se,He,function(Ae){Ae&&Ae.list.length>0?we(Ae):me(de+1)})}me(0)};return ce.async=!0,ce.supportsSelection=!0,ce}else return(H=A.getHelper(A.getCursor(),"hintWords"))?function(Se){return l.hint.fromList(Se,{words:H})}:l.hint.anyword?function(Se,we){return l.hint.anyword(Se,we)}:function(){}}l.registerHelper("hint","auto",{resolve:ne}),l.registerHelper("hint","fromList",function(A,I){var D=A.getCursor(),H=A.getTokenAt(D),ce,Se=l.Pos(D.line,H.start),we=D;H.start<D.ch&&/\w/.test(H.string.charAt(D.ch-H.start-1))?ce=H.string.substr(0,D.ch-H.start):(ce="",Se=D);for(var He=[],ze=0;ze<I.words.length;ze++){var me=I.words[ze];me.slice(0,ce.length)==ce&&He.push(me)}if(He.length)return{list:He,from:Se,to:we}}),l.commands.autocomplete=l.showHint;var ee={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)})})();/*!
|
|
25
|
+
* vue-router v4.0.14
|
|
26
|
+
* (c) 2022 Eduardo San Martin Morote
|
|
27
|
+
* @license MIT
|
|
28
|
+
*/const Ph=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",pi=r=>Ph?Symbol(r):"_vr_"+r,$m=pi("rvlm"),nc=pi("rvd"),ya=pi("r"),ba=pi("rl"),jl=pi("rvl"),ni=typeof window!="undefined";function Zm(r){return r.__esModule||Ph&&r[Symbol.toStringTag]==="Module"}const rt=Object.assign;function Tl(r,s){const l={};for(const u in s){const c=s[u];l[u]=Array.isArray(c)?c.map(r):r(c)}return l}const io=()=>{},Jm=/\/$/,Qm=r=>r.replace(Jm,"");function Ll(r,s,l="/"){let u,c={},d="",m="";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),c=r(d)),y>-1&&(u=u||s.slice(0,y),m=s.slice(y,s.length)),u=ry(u!=null?u:s,l),{fullPath:u+(d&&"?")+d+m,path:u,query:c,hash:m}}function Vm(r,s){const l=s.query?r(s.query):"";return s.path+(l&&"?")+l+(s.hash||"")}function ic(r,s){return!s||!r.toLowerCase().startsWith(s.toLowerCase())?r:r.slice(s.length)||"/"}function ey(r,s,l){const u=s.matched.length-1,c=l.matched.length-1;return u>-1&&u===c&&ui(s.matched[u],l.matched[c])&&Oh(s.params,l.params)&&r(s.query)===r(l.query)&&s.hash===l.hash}function ui(r,s){return(r.aliasOf||r)===(s.aliasOf||s)}function Oh(r,s){if(Object.keys(r).length!==Object.keys(s).length)return!1;for(const l in r)if(!ty(r[l],s[l]))return!1;return!0}function ty(r,s){return Array.isArray(r)?oc(r,s):Array.isArray(s)?oc(s,r):r===s}function oc(r,s){return Array.isArray(s)?r.length===s.length&&r.every((l,u)=>l===s[u]):r.length===1&&r[0]===s}function ry(r,s){if(r.startsWith("/"))return r;if(!r)return s;const l=s.split("/"),u=r.split("/");let c=l.length-1,d,m;for(d=0;d<u.length;d++)if(m=u[d],!(c===1||m==="."))if(m==="..")c--;else break;return l.slice(0,c).join("/")+"/"+u.slice(d-(d===u.length?1:0)).join("/")}var ho;(function(r){r.pop="pop",r.push="push"})(ho||(ho={}));var oo;(function(r){r.back="back",r.forward="forward",r.unknown=""})(oo||(oo={}));function ny(r){if(!r)if(ni){const s=document.querySelector("base");r=s&&s.getAttribute("href")||"/",r=r.replace(/^\w+:\/\/[^\/]+/,"")}else r="/";return r[0]!=="/"&&r[0]!=="#"&&(r="/"+r),Qm(r)}const iy=/^[^#]+#/;function oy(r,s){return r.replace(iy,"#")+s}function sy(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 Ts=()=>({left:window.pageXOffset,top:window.pageYOffset});function ly(r){let s;if("el"in r){const l=r.el,u=typeof l=="string"&&l.startsWith("#"),c=typeof l=="string"?u?document.getElementById(l.slice(1)):document.querySelector(l):l;if(!c)return;s=sy(c,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 sc(r,s){return(history.state?history.state.position-s:-1)+r}const ql=new Map;function ay(r,s){ql.set(r,s)}function uy(r){const s=ql.get(r);return ql.delete(r),s}let fy=()=>location.protocol+"//"+location.host;function Eh(r,s){const{pathname:l,search:u,hash:c}=s,d=r.indexOf("#");if(d>-1){let b=c.includes(r.slice(d))?r.slice(d).length:1,y=c.slice(b);return y[0]!=="/"&&(y="/"+y),ic(y,"")}return ic(l,r)+u+c}function cy(r,s,l,u){let c=[],d=[],m=null;const b=({state:O})=>{const z=Eh(r,location),j=l.value,ne=s.value;let ee=0;if(O){if(l.value=z,s.value=O,m&&m===j){m=null;return}ee=ne?O.position-ne.position:0}else u(z);c.forEach(A=>{A(l.value,j,{delta:ee,type:ho.pop,direction:ee?ee>0?oo.forward:oo.back:oo.unknown})})};function y(){m=l.value}function x(O){c.push(O);const z=()=>{const j=c.indexOf(O);j>-1&&c.splice(j,1)};return d.push(z),z}function S(){const{history:O}=window;!O.state||O.replaceState(rt({},O.state,{scroll:Ts()}),"")}function P(){for(const O of d)O();d=[],window.removeEventListener("popstate",b),window.removeEventListener("beforeunload",S)}return window.addEventListener("popstate",b),window.addEventListener("beforeunload",S),{pauseListeners:y,listen:x,destroy:P}}function lc(r,s,l,u=!1,c=!1){return{back:r,current:s,forward:l,replaced:u,position:window.history.length,scroll:c?Ts():null}}function hy(r){const{history:s,location:l}=window,u={value:Eh(r,l)},c={value:s.state};c.value||d(u.value,{back:null,current:u.value,forward:null,position:s.length-1,replaced:!0,scroll:null},!0);function d(y,x,S){const P=r.indexOf("#"),O=P>-1?(l.host&&document.querySelector("base")?r:r.slice(P))+y:fy()+r+y;try{s[S?"replaceState":"pushState"](x,"",O),c.value=x}catch(z){console.error(z),l[S?"replace":"assign"](O)}}function m(y,x){const S=rt({},s.state,lc(c.value.back,y,c.value.forward,!0),x,{position:c.value.position});d(y,S,!0),u.value=y}function b(y,x){const S=rt({},c.value,s.state,{forward:y,scroll:Ts()});d(S.current,S,!0);const P=rt({},lc(u.value,y,null),{position:S.position+1},x);d(y,P,!1),u.value=y}return{location:u,state:c,push:b,replace:m}}function dy(r){r=ny(r);const s=hy(r),l=cy(r,s.state,s.location,s.replace);function u(d,m=!0){m||l.pauseListeners(),history.go(d)}const c=rt({location:"",base:r,go:u,createHref:oy.bind(null,r)},s,l);return Object.defineProperty(c,"location",{enumerable:!0,get:()=>s.location.value}),Object.defineProperty(c,"state",{enumerable:!0,get:()=>s.state.value}),c}function x0(r){return r=location.host?r||location.pathname+location.search:"",r.includes("#")||(r+="#"),dy(r)}function py(r){return typeof r=="string"||r&&typeof r=="object"}function _h(r){return typeof r=="string"||typeof r=="symbol"}const en={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Ah=pi("nf");var ac;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(ac||(ac={}));function fi(r,s){return rt(new Error,{type:r,[Ah]:!0},s)}function tn(r,s){return r instanceof Error&&Ah in r&&(s==null||!!(r.type&s))}const uc="[^/]+?",gy={sensitive:!1,strict:!1,start:!0,end:!0},vy=/[.+*?^${}()[\]/\\]/g;function my(r,s){const l=rt({},gy,s),u=[];let c=l.start?"^":"";const d=[];for(const x of r){const S=x.length?[]:[90];l.strict&&!x.length&&(c+="/");for(let P=0;P<x.length;P++){const O=x[P];let z=40+(l.sensitive?.25:0);if(O.type===0)P||(c+="/"),c+=O.value.replace(vy,"\\$&"),z+=40;else if(O.type===1){const{value:j,repeatable:ne,optional:ee,regexp:A}=O;d.push({name:j,repeatable:ne,optional:ee});const I=A||uc;if(I!==uc){z+=10;try{new RegExp(`(${I})`)}catch(H){throw new Error(`Invalid custom RegExp for param "${j}" (${I}): `+H.message)}}let D=ne?`((?:${I})(?:/(?:${I}))*)`:`(${I})`;P||(D=ee&&x.length<2?`(?:/${D})`:"/"+D),ee&&(D+="?"),c+=D,z+=20,ee&&(z+=-8),ne&&(z+=-20),I===".*"&&(z+=-50)}S.push(z)}u.push(S)}if(l.strict&&l.end){const x=u.length-1;u[x][u[x].length-1]+=.7000000000000001}l.strict||(c+="/?"),l.end?c+="$":l.strict&&(c+="(?:/|$)");const m=new RegExp(c,l.sensitive?"":"i");function b(x){const S=x.match(m),P={};if(!S)return null;for(let O=1;O<S.length;O++){const z=S[O]||"",j=d[O-1];P[j.name]=z&&j.repeatable?z.split("/"):z}return P}function y(x){let S="",P=!1;for(const O of r){(!P||!S.endsWith("/"))&&(S+="/"),P=!1;for(const z of O)if(z.type===0)S+=z.value;else if(z.type===1){const{value:j,repeatable:ne,optional:ee}=z,A=j in x?x[j]:"";if(Array.isArray(A)&&!ne)throw new Error(`Provided param "${j}" is an array but it is not repeatable (* or + modifiers)`);const I=Array.isArray(A)?A.join("/"):A;if(!I)if(ee)O.length<2&&(S.endsWith("/")?S=S.slice(0,-1):P=!0);else throw new Error(`Missing required param "${j}"`);S+=I}}return S}return{re:m,score:u,keys:d,parse:b,stringify:y}}function yy(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 by(r,s){let l=0;const u=r.score,c=s.score;for(;l<u.length&&l<c.length;){const d=yy(u[l],c[l]);if(d)return d;l++}return c.length-u.length}const wy={type:0,value:""},xy=/[a-zA-Z0-9_]/;function ky(r){if(!r)return[[]];if(r==="/")return[[wy]];if(!r.startsWith("/"))throw new Error(`Invalid path "${r}"`);function s(z){throw new Error(`ERR (${l})/"${x}": ${z}`)}let l=0,u=l;const c=[];let d;function m(){d&&c.push(d),d=[]}let b=0,y,x="",S="";function P(){!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:S,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&&P(),m()):y===":"?(P(),l=1):O();break;case 4:O(),l=u;break;case 1:y==="("?l=2:xy.test(y)?O():(P(),l=0,y!=="*"&&y!=="?"&&y!=="+"&&b--);break;case 2:y===")"?S[S.length-1]=="\\"?S=S.slice(0,-1)+y:l=3:S+=y;break;case 3:P(),l=0,y!=="*"&&y!=="?"&&y!=="+"&&b--,S="";break;default:s("Unknown state");break}}return l===2&&s(`Unfinished custom RegExp for param "${x}"`),P(),m(),c}function Sy(r,s,l){const u=my(ky(r.path),l),c=rt(u,{record:r,parent:s,children:[],alias:[]});return s&&!c.record.aliasOf==!s.record.aliasOf&&s.children.push(c),c}function Cy(r,s){const l=[],u=new Map;s=cc({strict:!1,end:!0,sensitive:!1},s);function c(S){return u.get(S)}function d(S,P,O){const z=!O,j=Ly(S);j.aliasOf=O&&O.record;const ne=cc(s,S),ee=[j];if("alias"in S){const D=typeof S.alias=="string"?[S.alias]:S.alias;for(const H of D)ee.push(rt({},j,{components:O?O.record.components:j.components,path:H,aliasOf:O?O.record:j}))}let A,I;for(const D of ee){const{path:H}=D;if(P&&H[0]!=="/"){const ce=P.record.path,Se=ce[ce.length-1]==="/"?"":"/";D.path=P.record.path+(H&&Se+H)}if(A=Sy(D,P,ne),O?O.alias.push(A):(I=I||A,I!==A&&I.alias.push(A),z&&S.name&&!fc(A)&&m(S.name)),"children"in j){const ce=j.children;for(let Se=0;Se<ce.length;Se++)d(ce[Se],A,O&&O.children[Se])}O=O||A,y(A)}return I?()=>{m(I)}:io}function m(S){if(_h(S)){const P=u.get(S);P&&(u.delete(S),l.splice(l.indexOf(P),1),P.children.forEach(m),P.alias.forEach(m))}else{const P=l.indexOf(S);P>-1&&(l.splice(P,1),S.record.name&&u.delete(S.record.name),S.children.forEach(m),S.alias.forEach(m))}}function b(){return l}function y(S){let P=0;for(;P<l.length&&by(S,l[P])>=0&&(S.record.path!==l[P].record.path||!Nh(S,l[P]));)P++;l.splice(P,0,S),S.record.name&&!fc(S)&&u.set(S.record.name,S)}function x(S,P){let O,z={},j,ne;if("name"in S&&S.name){if(O=u.get(S.name),!O)throw fi(1,{location:S});ne=O.record.name,z=rt(Ty(P.params,O.keys.filter(I=>!I.optional).map(I=>I.name)),S.params),j=O.stringify(z)}else if("path"in S)j=S.path,O=l.find(I=>I.re.test(j)),O&&(z=O.parse(j),ne=O.record.name);else{if(O=P.name?u.get(P.name):l.find(I=>I.re.test(P.path)),!O)throw fi(1,{location:S,currentLocation:P});ne=O.record.name,z=rt({},P.params,S.params),j=O.stringify(z)}const ee=[];let A=O;for(;A;)ee.unshift(A.record),A=A.parent;return{name:ne,path:j,params:z,matched:ee,meta:Py(ee)}}return r.forEach(S=>d(S)),{addRoute:d,resolve:x,removeRoute:m,getRoutes:b,getRecordMatcher:c}}function Ty(r,s){const l={};for(const u of s)u in r&&(l[u]=r[u]);return l}function Ly(r){return{path:r.path,redirect:r.redirect,name:r.name,meta:r.meta||{},aliasOf:void 0,beforeEnter:r.beforeEnter,props:My(r),children:r.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in r?r.components||{}:{default:r.component}}}function My(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 fc(r){for(;r;){if(r.record.aliasOf)return!0;r=r.parent}return!1}function Py(r){return r.reduce((s,l)=>rt(s,l.meta),{})}function cc(r,s){const l={};for(const u in r)l[u]=u in s?s[u]:r[u];return l}function Nh(r,s){return s.children.some(l=>l===r||Nh(r,l))}const zh=/#/g,Oy=/&/g,Ey=/\//g,_y=/=/g,Ay=/\?/g,Dh=/\+/g,Ny=/%5B/g,zy=/%5D/g,Rh=/%5E/g,Dy=/%60/g,Fh=/%7B/g,Ry=/%7C/g,Ih=/%7D/g,Fy=/%20/g;function wa(r){return encodeURI(""+r).replace(Ry,"|").replace(Ny,"[").replace(zy,"]")}function Iy(r){return wa(r).replace(Fh,"{").replace(Ih,"}").replace(Rh,"^")}function Gl(r){return wa(r).replace(Dh,"%2B").replace(Fy,"+").replace(zh,"%23").replace(Oy,"%26").replace(Dy,"`").replace(Fh,"{").replace(Ih,"}").replace(Rh,"^")}function Hy(r){return Gl(r).replace(_y,"%3D")}function Wy(r){return wa(r).replace(zh,"%23").replace(Ay,"%3F")}function By(r){return r==null?"":Wy(r).replace(Ey,"%2F")}function ds(r){try{return decodeURIComponent(""+r)}catch{}return""+r}function Uy(r){const s={};if(r===""||r==="?")return s;const u=(r[0]==="?"?r.slice(1):r).split("&");for(let c=0;c<u.length;++c){const d=u[c].replace(Dh," "),m=d.indexOf("="),b=ds(m<0?d:d.slice(0,m)),y=m<0?null:ds(d.slice(m+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 hc(r){let s="";for(let l in r){const u=r[l];if(l=Hy(l),u==null){u!==void 0&&(s+=(s.length?"&":"")+l);continue}(Array.isArray(u)?u.map(d=>d&&Gl(d)):[u&&Gl(u)]).forEach(d=>{d!==void 0&&(s+=(s.length?"&":"")+l,d!=null&&(s+="="+d))})}return s}function Ky(r){const s={};for(const l in r){const u=r[l];u!==void 0&&(s[l]=Array.isArray(u)?u.map(c=>c==null?null:""+c):u==null?u:""+u)}return s}function Ji(){let r=[];function s(u){return r.push(u),()=>{const c=r.indexOf(u);c>-1&&r.splice(c,1)}}function l(){r=[]}return{add:s,list:()=>r,reset:l}}function on(r,s,l,u,c){const d=u&&(u.enterCallbacks[c]=u.enterCallbacks[c]||[]);return()=>new Promise((m,b)=>{const y=P=>{P===!1?b(fi(4,{from:l,to:s})):P instanceof Error?b(P):py(P)?b(fi(2,{from:s,to:P})):(d&&u.enterCallbacks[c]===d&&typeof P=="function"&&d.push(P),m())},x=r.call(u&&u.instances[c],s,l,y);let S=Promise.resolve(x);r.length<3&&(S=S.then(y)),S.catch(P=>b(P))})}function Ml(r,s,l,u){const c=[];for(const d of r)for(const m in d.components){let b=d.components[m];if(!(s!=="beforeRouteEnter"&&!d.instances[m]))if(jy(b)){const x=(b.__vccOpts||b)[s];x&&c.push(on(x,l,u,d,m))}else{let y=b();c.push(()=>y.then(x=>{if(!x)return Promise.reject(new Error(`Couldn't resolve component "${m}" at "${d.path}"`));const S=Zm(x)?x.default:x;d.components[m]=S;const O=(S.__vccOpts||S)[s];return O&&on(O,l,u,d,m)()}))}}return c}function jy(r){return typeof r=="object"||"displayName"in r||"props"in r||"__vccOpts"in r}function dc(r){const s=Ir(ya),l=Ir(ba),u=zt(()=>s.resolve(at(r.to))),c=zt(()=>{const{matched:y}=u.value,{length:x}=y,S=y[x-1],P=l.matched;if(!S||!P.length)return-1;const O=P.findIndex(ui.bind(null,S));if(O>-1)return O;const z=pc(y[x-2]);return x>1&&pc(S)===z&&P[P.length-1].path!==z?P.findIndex(ui.bind(null,y[x-2])):O}),d=zt(()=>c.value>-1&&Xy(l.params,u.value.params)),m=zt(()=>c.value>-1&&c.value===l.matched.length-1&&Oh(l.params,u.value.params));function b(y={}){return Yy(y)?s[at(r.replace)?"replace":"push"](at(r.to)).catch(io):Promise.resolve()}return{route:u,href:zt(()=>u.value.href),isActive:d,isExactActive:m,navigate:b}}const qy=Jc({name:"RouterLink",props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:dc,setup(r,{slots:s}){const l=po(dc(r)),{options:u}=Ir(ya),c=zt(()=>({[gc(r.activeClass,u.linkActiveClass,"router-link-active")]:l.isActive,[gc(r.exactActiveClass,u.linkExactActiveClass,"router-link-exact-active")]:l.isExactActive}));return()=>{const d=s.default&&s.default(l);return r.custom?d:va("a",{"aria-current":l.isExactActive?r.ariaCurrentValue:null,href:l.href,onClick:l.navigate,class:c.value},d)}}}),Gy=qy;function Yy(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 Xy(r,s){for(const l in s){const u=s[l],c=r[l];if(typeof u=="string"){if(u!==c)return!1}else if(!Array.isArray(c)||c.length!==u.length||u.some((d,m)=>d!==c[m]))return!1}return!0}function pc(r){return r?r.aliasOf?r.aliasOf.path:r.path:""}const gc=(r,s,l)=>r!=null?r:s!=null?s:l,$y=Jc({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},setup(r,{attrs:s,slots:l}){const u=Ir(jl),c=zt(()=>r.route||u.value),d=Ir(nc,0),m=zt(()=>c.value.matched[d]);rs(nc,d+1),rs($m,m),rs(jl,c);const b=Yt();return $t(()=>[b.value,m.value,r.name],([y,x,S],[P,O,z])=>{x&&(x.instances[S]=y,O&&O!==x&&y&&y===P&&(x.leaveGuards.size||(x.leaveGuards=O.leaveGuards),x.updateGuards.size||(x.updateGuards=O.updateGuards))),y&&x&&(!O||!ui(x,O)||!P)&&(x.enterCallbacks[S]||[]).forEach(j=>j(y))},{flush:"post"}),()=>{const y=c.value,x=m.value,S=x&&x.components[r.name],P=r.name;if(!S)return vc(l.default,{Component:S,route:y});const O=x.props[r.name],z=O?O===!0?y.params:typeof O=="function"?O(y):O:null,ne=va(S,rt({},z,s,{onVnodeUnmounted:ee=>{ee.component.isUnmounted&&(x.instances[P]=null)},ref:b}));return vc(l.default,{Component:ne,route:y})||ne}}});function vc(r,s){if(!r)return null;const l=r(s);return l.length===1?l[0]:l}const Zy=$y;function k0(r){const s=Cy(r.routes,r),l=r.parseQuery||Uy,u=r.stringifyQuery||hc,c=r.history,d=Ji(),m=Ji(),b=Ji(),y=eo(en);let x=en;ni&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const S=Tl.bind(null,q=>""+q),P=Tl.bind(null,By),O=Tl.bind(null,ds);function z(q,Z){let K,oe;return _h(q)?(K=s.getRecordMatcher(q),oe=Z):oe=q,s.addRoute(oe,K)}function j(q){const Z=s.getRecordMatcher(q);Z&&s.removeRoute(Z)}function ne(){return s.getRoutes().map(q=>q.record)}function ee(q){return!!s.getRecordMatcher(q)}function A(q,Z){if(Z=rt({},Z||y.value),typeof q=="string"){const Le=Ll(l,q,Z.path),T=s.resolve({path:Le.path},Z),_=c.createHref(Le.fullPath);return rt(Le,T,{params:O(T.params),hash:ds(Le.hash),redirectedFrom:void 0,href:_})}let K;if("path"in q)K=rt({},q,{path:Ll(l,q.path,Z.path).path});else{const Le=rt({},q.params);for(const T in Le)Le[T]==null&&delete Le[T];K=rt({},q,{params:P(q.params)}),Z.params=P(Z.params)}const oe=s.resolve(K,Z),Ce=q.hash||"";oe.params=S(O(oe.params));const ke=Vm(u,rt({},q,{hash:Iy(Ce),path:oe.path})),pe=c.createHref(ke);return rt({fullPath:ke,hash:Ce,query:u===hc?Ky(q.query):q.query||{}},oe,{redirectedFrom:void 0,href:pe})}function I(q){return typeof q=="string"?Ll(l,q,y.value.path):rt({},q)}function D(q,Z){if(x!==q)return fi(8,{from:Z,to:q})}function H(q){return we(q)}function ce(q){return H(rt(I(q),{replace:!0}))}function Se(q){const Z=q.matched[q.matched.length-1];if(Z&&Z.redirect){const{redirect:K}=Z;let oe=typeof K=="function"?K(q):K;return typeof oe=="string"&&(oe=oe.includes("?")||oe.includes("#")?oe=I(oe):{path:oe},oe.params={}),rt({query:q.query,hash:q.hash,params:q.params},oe)}}function we(q,Z){const K=x=A(q),oe=y.value,Ce=q.state,ke=q.force,pe=q.replace===!0,Le=Se(K);if(Le)return we(rt(I(Le),{state:Ce,force:ke,replace:pe}),Z||K);const T=K;T.redirectedFrom=Z;let _;return!ke&&ey(u,oe,K)&&(_=fi(16,{to:T,from:oe}),qe(oe,oe,!0,!1)),(_?Promise.resolve(_):ze(T,oe)).catch(F=>tn(F)?tn(F,2)?F:Ne(F):X(F,T,oe)).then(F=>{if(F){if(tn(F,2))return we(rt(I(F.to),{state:Ce,force:ke,replace:pe}),Z||T)}else F=de(T,oe,!0,pe,Ce);return me(T,oe,F),F})}function He(q,Z){const K=D(q,Z);return K?Promise.reject(K):Promise.resolve()}function ze(q,Z){let K;const[oe,Ce,ke]=Jy(q,Z);K=Ml(oe.reverse(),"beforeRouteLeave",q,Z);for(const Le of oe)Le.leaveGuards.forEach(T=>{K.push(on(T,q,Z))});const pe=He.bind(null,q,Z);return K.push(pe),ei(K).then(()=>{K=[];for(const Le of d.list())K.push(on(Le,q,Z));return K.push(pe),ei(K)}).then(()=>{K=Ml(Ce,"beforeRouteUpdate",q,Z);for(const Le of Ce)Le.updateGuards.forEach(T=>{K.push(on(T,q,Z))});return K.push(pe),ei(K)}).then(()=>{K=[];for(const Le of q.matched)if(Le.beforeEnter&&!Z.matched.includes(Le))if(Array.isArray(Le.beforeEnter))for(const T of Le.beforeEnter)K.push(on(T,q,Z));else K.push(on(Le.beforeEnter,q,Z));return K.push(pe),ei(K)}).then(()=>(q.matched.forEach(Le=>Le.enterCallbacks={}),K=Ml(ke,"beforeRouteEnter",q,Z),K.push(pe),ei(K))).then(()=>{K=[];for(const Le of m.list())K.push(on(Le,q,Z));return K.push(pe),ei(K)}).catch(Le=>tn(Le,8)?Le:Promise.reject(Le))}function me(q,Z,K){for(const oe of b.list())oe(q,Z,K)}function de(q,Z,K,oe,Ce){const ke=D(q,Z);if(ke)return ke;const pe=Z===en,Le=ni?history.state:{};K&&(oe||pe?c.replace(q.fullPath,rt({scroll:pe&&Le&&Le.scroll},Ce)):c.push(q.fullPath,Ce)),y.value=q,qe(q,Z,K,pe),Ne()}let Ae;function B(){Ae=c.listen((q,Z,K)=>{const oe=A(q),Ce=Se(oe);if(Ce){we(rt(Ce,{replace:!0}),oe).catch(io);return}x=oe;const ke=y.value;ni&&ay(sc(ke.fullPath,K.delta),Ts()),ze(oe,ke).catch(pe=>tn(pe,12)?pe:tn(pe,2)?(we(pe.to,oe).then(Le=>{tn(Le,20)&&!K.delta&&K.type===ho.pop&&c.go(-1,!1)}).catch(io),Promise.reject()):(K.delta&&c.go(-K.delta,!1),X(pe,oe,ke))).then(pe=>{pe=pe||de(oe,ke,!1),pe&&(K.delta?c.go(-K.delta,!1):K.type===ho.pop&&tn(pe,20)&&c.go(-1,!1)),me(oe,ke,pe)}).catch(io)})}let G=Ji(),w=Ji(),V;function X(q,Z,K){Ne(q);const oe=w.list();return oe.length?oe.forEach(Ce=>Ce(q,Z,K)):console.error(q),Promise.reject(q)}function ae(){return V&&y.value!==en?Promise.resolve():new Promise((q,Z)=>{G.add([q,Z])})}function Ne(q){return V||(V=!q,B(),G.list().forEach(([Z,K])=>q?K(q):Z()),G.reset()),q}function qe(q,Z,K,oe){const{scrollBehavior:Ce}=r;if(!ni||!Ce)return Promise.resolve();const ke=!K&&uy(sc(q.fullPath,0))||(oe||!K)&&history.state&&history.state.scroll||null;return la().then(()=>Ce(q,Z,ke)).then(pe=>pe&&ly(pe)).catch(pe=>X(pe,q,Z))}const tt=q=>c.go(q);let it;const Re=new Set;return{currentRoute:y,addRoute:z,removeRoute:j,hasRoute:ee,getRoutes:ne,resolve:A,options:r,push:H,replace:ce,go:tt,back:()=>tt(-1),forward:()=>tt(1),beforeEach:d.add,beforeResolve:m.add,afterEach:b.add,onError:w.add,isReady:ae,install(q){const Z=this;q.component("RouterLink",Gy),q.component("RouterView",Zy),q.config.globalProperties.$router=Z,Object.defineProperty(q.config.globalProperties,"$route",{enumerable:!0,get:()=>at(y)}),ni&&!it&&y.value===en&&(it=!0,H(c.location).catch(Ce=>{}));const K={};for(const Ce in en)K[Ce]=zt(()=>y.value[Ce]);q.provide(ya,Z),q.provide(ba,po(K)),q.provide(jl,y);const oe=q.unmount;Re.add(q),q.unmount=function(){Re.delete(q),Re.size<1&&(x=en,Ae&&Ae(),y.value=en,it=!1,V=!1),oe()}}}}function ei(r){return r.reduce((s,l)=>s.then(()=>l()),Promise.resolve())}function Jy(r,s){const l=[],u=[],c=[],d=Math.max(s.matched.length,r.matched.length);for(let m=0;m<d;m++){const b=s.matched[m];b&&(r.matched.find(x=>ui(x,b))?u.push(b):l.push(b));const y=r.matched[m];y&&(s.matched.find(x=>ui(x,y))||c.push(y))}return[l,u,c]}function S0(){return Ir(ba)}var Qy=Object.defineProperty,Vy=Object.defineProperties,e0=Object.getOwnPropertyDescriptors,ps=Object.getOwnPropertySymbols,Hh=Object.prototype.hasOwnProperty,Wh=Object.prototype.propertyIsEnumerable,mc=(r,s,l)=>s in r?Qy(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,t0=(r,s)=>{for(var l in s||(s={}))Hh.call(s,l)&&mc(r,l,s[l]);if(ps)for(var l of ps(s))Wh.call(s,l)&&mc(r,l,s[l]);return r},r0=(r,s)=>Vy(r,e0(s)),n0=(r,s)=>{var l={};for(var u in r)Hh.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 C0={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,c)=>(u.size=c===s?u.max:u.min,c!==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),c=100-(this.pushOtherPanes?0:l.nextPanesSize),d=Math.max(Math.min(this.getCurrentDragPercentage(r),c),u);let m=[s,s+1],b=this.panes[m[0]]||null,y=this.panes[m[1]]||null;const x=b.max<100&&d>=b.max+l.prevPanesSize,S=y.max<100&&d<=100-(y.max+this.sumNextPanesSize(s+1));if(x||S){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 P=this.doPushOtherPanes(l,d);if(!P)return;({sums:l,panesToResize:m}=P),b=this.panes[m[0]]||null,y=this.panes[m[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((c,d)=>{d>u[0]&&d<=l&&(c.size=c.min,r.prevReachedMinPanes+=c.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((c,d)=>{d>0&&d<=l&&(c.size=c.min,r.prevReachedMinPanes+=c.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((c,d)=>{d>l&&d<u[1]&&(c.size=c.min,r.nextReachedMinPanes+=c.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((c,d)=>{d<this.panesCount-1&&d>=l+1&&(c.size=c.min,r.nextReachedMinPanes+=c.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,c=document.createElement("div");c.classList.add("splitpanes__splitter"),l||(c.onmousedown=d=>this.onMouseDown(d,u),typeof window!="undefined"&&"ontouchstart"in window&&(c.ontouchstart=d=>this.onMouseDown(d,u)),c.onclick=d=>this.onSplitterClick(d,u+1)),this.dblClickSplitter&&(c.ondblclick=d=>this.onSplitterDblClick(d,u+1)),s.parentNode.insertBefore(c,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=n0(s,["target"]);const c=this.indexedPanes[l._.uid];Object.entries(u).forEach(([d,m])=>c[d]=m)},onPaneAdd(r){let s=-1;Array.from(r.$el.parentNode.children).some(c=>(c.className.includes("splitpanes__pane")&&s++,c===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((c,d)=>c.index=d),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[s]}),this.$emit("pane-add",{index:s,panes:this.panes.map(c=>({min:c.min,max:c.max,size:c.size}))})})},onPaneRemove(r){const s=this.panes.findIndex(u=>u.id===r._.uid),l=this.panes.splice(s,1)[0];this.panes.forEach((u,c)=>u.index=c),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:r0(t0({},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(c=>{c.size=Math.max(Math.min(r,c.max),c.min),s-=c.size,c.size>=c.max&&l.push(c.id),c.size<=c.min&&u.push(c.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 c=100;r>.1&&(this.panes.forEach(d=>{d.size===null&&(d.size=Math.max(Math.min(r/(this.panesCount-u),d.max),d.min)),c-=d.size}),c>.1&&this.readjustSizes(r,s,l))},equalizeAfterAddOrRemove({addedPane:r,removedPane:s}={}){let l=100/this.panesCount,u=0,c=[],d=[];r&&r.givenSize!==null&&(l=(100-r.givenSize)/(this.panesCount-1)),this.panes.forEach(m=>{u-=m.size,m.size>=m.max&&c.push(m.id),m.size<=m.min&&d.push(m.id)}),!(Math.abs(u)<.1)&&(this.panes.forEach(m=>{r&&r.givenSize!==null&&r.id===m.id||(m.size=Math.max(Math.min(l,m.max),m.min)),u-=m.size,m.size>=m.max&&c.push(m.id),m.size<=m.min&&d.push(m.id)}),u>.1&&this.readjustSizes(u,c,d))},readjustSizes(r,s,l){let u;r>0?u=r/(this.panesCount-s.length):u=r/(this.panesCount-l.length),this.panes.forEach((c,d)=>{if(r>0&&!s.includes(c.id)){const m=Math.max(Math.min(c.size+u,c.max),c.min);r-=m-c.size,c.size=m}else if(!l.includes(c.id)){const m=Math.max(Math.min(c.size+u,c.max),c.min);r-=m-c.size,c.size=m}c.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[c.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?c=>this.onSplitterDblClick(c,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 va("div",{ref:"container",class:["splitpanes",`splitpanes--${this.horizontal?"horizontal":"vertical"}`,{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}};var i0=(r,s)=>{const l=r.__vccOpts||r;for(const[u,c]of s)l[u]=c;return l};const o0={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 s0(r,s,l,u,c,d){return da(),Cv("div",{class:"splitpanes__pane",onClick:s[0]||(s[0]=m=>d.onPaneClick(m,r._.uid)),style:gs(r.style)},[Ov(r.$slots,"default")],4)}var T0=i0(o0,[["render",s0]]);export{c0 as A,v0 as B,w0 as C,p0 as D,T0 as E,pr as F,h0 as G,k0 as H,x0 as I,Tm as J,gt as K,a0 as L,g0 as M,C0 as _,da as a,gh as b,Cv as c,Jc as d,Ov as e,Sl as f,y0 as g,zt as h,at as i,d0 as j,f0 as k,m0 as l,Sh as m,Xt as n,eh as o,Hg as p,Mv as q,Yt as r,gs as s,l0 as t,b0 as u,dh as v,$t as w,Xl as x,S0 as y,u0 as z};
|