UNPKG

@rero/rero-ils-ui

Version:

User interface for RERO integrated library system (RERO ILS).

5 lines (4 loc) 2.47 MB
import{$ as Oe,$a as _,$b as fe,$c as Fn,A as E0,Aa as gt,Ab as hT,Ac as De,Ad as IT,B as md,Ba as Ai,Bb as km,Bc as yt,C as Wc,Ca as Lt,Cb as Dm,Cc as cn,D as jS,Da as ZS,Db as $y,Dc as Ul,E as ao,Ea as O0,Eb as yd,Ec as Ny,F as tr,Fa as YS,Fb as fT,Fc as zy,Fd as ET,G as Dy,Ga as Mr,Gb as Js,Gc as Qe,H as or,Ha as A0,Hb as mT,Hc as it,I as Va,Ia as Ay,Ib as el,Ic as tl,J as gd,Ja as XS,Jb as W,Jc as V0,K as Iy,Ka as _d,Kb as g,Kc as qe,L as so,La as R0,Lb as Sn,Lc as Xc,M as F0,Ma as L0,Mb as mi,Mc as xT,N as Na,Na as Gc,Nb as Zt,Nc as Hy,O as To,Oa as bd,Ob as ve,Oc as CT,P as Ey,Pa as JS,Pb as gT,Pc as Ki,Q as US,Qa as eT,Qb as ke,Qc as jy,R as qS,Ra as tT,Rb as $0,Rc as Uy,S as bm,Sa as iT,Sb as Py,Sc as wT,T as Zs,Ta as nT,Tb as mn,Tc as ST,U as bi,Ua as rT,Ub as gn,Uc as Z,V as Ys,Va as oT,Vb as T,Vc as Ze,W as yi,Wa as Kc,Wb as I,Wc as Do,X as ci,Xa as wn,Xb as Q,Xc as ui,Y as Xs,Ya as za,Yb as Ie,Yc as Or,Z as di,Za as aT,Zb as Ee,Zc as Em,_ as me,_a as Cm,_b as we,_c as TT,a as oe,aa as WS,ab as Qc,ac as vT,ad as Ti,b as at,ba as Mt,bb as sT,bc as _T,bd as hi,c as vm,ca as Fy,cb as lT,cc as J,cd as ma,d as _m,da as wt,db as ko,dc as v,dd as wi,e as da,ea as H,eb as B0,ec as Et,ed as zo,f as Kt,fa as gs,fb as Ry,fc as st,fd as qy,g as VS,ga as GS,gb as fa,gc as jl,gd as Ho,h as er,ha as vs,hb as qn,hc as P0,hd as Wy,i as NS,ia as pa,ib as Pe,ic as re,j as No,ja as KS,jb as wm,jc as ze,k as Sy,ka as ym,kb as fn,kc as U,l as Ty,la as Qt,lb as cT,lc as q,m as St,ma as B,mb as Ly,mc as Vy,n as $n,na as $,nb as Zc,nc as bT,o as zS,oa as $t,ob as uT,oc as Im,p as ky,pa as ne,pb as dT,pc as kt,q as Ks,qa as My,qb as pT,qc as Se,r as br,ra as Yi,rb as Sm,rc as tt,s as Je,sa as vd,sb as le,sc as Dt,sd as kT,t as wo,ta as xm,tb as Ae,tc as Yc,td as N0,u as Un,ua as M0,ub as It,uc as yr,ud as Fm,v as HS,va as pe,vb as Wn,vc as xr,w as bt,wa as qt,wb as de,wc as Cr,wd as DT,x as Qs,xa as QS,xb as Tm,xc as yT,y as So,ya as Oy,yb as w,yc as Ue,yd as Mm,z as I0,za as ha,zb as By,zc as Gi}from"./chunk-V6CBOCDD.js";var Po=Kt((o3,a3)=>{(function(t,n){typeof o3=="object"&&typeof a3<"u"?a3.exports=n():typeof define=="function"&&define.amd?define(n):(t=t||self,t.CodeMirror=n())})(o3,function(){"use strict";var t=navigator.userAgent,n=navigator.platform,e=/gecko\/\d/i.test(t),i=/MSIE \d/.test(t),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),a=i||r||o,l=a&&(i?document.documentMode||6:+(o||r)[1]),u=!o&&/WebKit\//.test(t),f=u&&/Qt\/\d+\.\d+/.test(t),m=!o&&/Chrome\/(\d+)/.exec(t),b=m&&+m[1],x=/Opera\//.test(t),C=/Apple Computer/.test(navigator.vendor),k=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),F=/PhantomJS/.test(t),M=C&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),E=/Android/.test(t),R=M||E||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),z=M||/Mac/.test(n),j=/\bCrOS\b/.test(t),Y=/win/i.test(n),ee=x&&t.match(/Version\/(\d*\.\d*)/);ee&&(ee=Number(ee[1])),ee&&ee>=15&&(x=!1,u=!0);var ue=z&&(f||x&&(ee==null||ee<12.11)),Ce=e||a&&l>=9;function ce(s){return new RegExp("(^|\\s)"+s+"(?:$|\\s)\\s*")}var Le=function(s,c){var p=s.className,d=ce(c).exec(p);if(d){var h=p.slice(d.index+d[0].length);s.className=p.slice(0,d.index)+(h?d[1]+h:"")}};function be(s){for(var c=s.childNodes.length;c>0;--c)s.removeChild(s.firstChild);return s}function Fe(s,c){return be(s).appendChild(c)}function te(s,c,p,d){var h=document.createElement(s);if(p&&(h.className=p),d&&(h.style.cssText=d),typeof c=="string")h.appendChild(document.createTextNode(c));else if(c)for(var y=0;y<c.length;++y)h.appendChild(c[y]);return h}function he(s,c,p,d){var h=te(s,c,p,d);return h.setAttribute("role","presentation"),h}var Te;document.createRange?Te=function(s,c,p,d){var h=document.createRange();return h.setEnd(d||s,p),h.setStart(s,c),h}:Te=function(s,c,p){var d=document.body.createTextRange();try{d.moveToElementText(s.parentNode)}catch{return d}return d.collapse(!0),d.moveEnd("character",p),d.moveStart("character",c),d};function $e(s,c){if(c.nodeType==3&&(c=c.parentNode),s.contains)return s.contains(c);do if(c.nodeType==11&&(c=c.host),c==s)return!0;while(c=c.parentNode)}function rt(s){var c=s.ownerDocument||s,p;try{p=s.activeElement}catch{p=c.body||null}for(;p&&p.shadowRoot&&p.shadowRoot.activeElement;)p=p.shadowRoot.activeElement;return p}function Ct(s,c){var p=s.className;ce(c).test(p)||(s.className+=(p?" ":"")+c)}function Ve(s,c){for(var p=s.split(" "),d=0;d<p.length;d++)p[d]&&!ce(p[d]).test(c)&&(c+=" "+p[d]);return c}var K=function(s){s.select()};M?K=function(s){s.selectionStart=0,s.selectionEnd=s.value.length}:a&&(K=function(s){try{s.select()}catch{}});function V(s){return s.display.wrapper.ownerDocument}function xe(s){return Ft(s.display.wrapper)}function Ft(s){return s.getRootNode?s.getRootNode():s.ownerDocument}function ht(s){return V(s).defaultView}function _i(s){var c=Array.prototype.slice.call(arguments,1);return function(){return s.apply(null,c)}}function Ht(s,c,p){c||(c={});for(var d in s)s.hasOwnProperty(d)&&(p!==!1||!c.hasOwnProperty(d))&&(c[d]=s[d]);return c}function Oi(s,c,p,d,h){c==null&&(c=s.search(/[^\s\u00a0]/),c==-1&&(c=s.length));for(var y=d||0,S=h||0;;){var O=s.indexOf(" ",y);if(O<0||O>=c)return S+(c-y);S+=O-y,S+=p-S%p,y=O+1}}var $i=function(){this.id=null,this.f=null,this.time=0,this.handler=_i(this.onTimeout,this)};$i.prototype.onTimeout=function(s){s.id=0,s.time<=+new Date?s.f():setTimeout(s.handler,s.time-+new Date)},$i.prototype.set=function(s,c){this.f=c;var p=+new Date+s;(!this.id||p<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,s),this.time=p)};function ki(s,c){for(var p=0;p<s.length;++p)if(s[p]==c)return p;return-1}var Di=50,Ii={toString:function(){return"CodeMirror.Pass"}},Li={scroll:!1},bo={origin:"*mouse"},zn={origin:"+move"};function nr(s,c,p){for(var d=0,h=0;;){var y=s.indexOf(" ",d);y==-1&&(y=s.length);var S=y-d;if(y==s.length||h+S>=c)return d+Math.min(S,c-h);if(h+=y-d,h+=p-h%p,d=y+1,h>=c)return d}}var Hn=[""];function Er(s){for(;Hn.length<=s;)Hn.push(ni(Hn)+" ");return Hn[s]}function ni(s){return s[s.length-1]}function Ui(s,c){for(var p=[],d=0;d<s.length;d++)p[d]=c(s[d],d);return p}function Ln(s,c,p){for(var d=0,h=p(c);d<s.length&&p(s[d])<=h;)d++;s.splice(d,0,c)}function Jr(){}function Vs(s,c){var p;return Object.create?p=Object.create(s):(Jr.prototype=s,p=new Jr),c&&Ht(c,p),p}var Hu=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ua(s){return/\w/.test(s)||s>"\x80"&&(s.toUpperCase()!=s.toLowerCase()||Hu.test(s))}function cs(s,c){return c?c.source.indexOf("\\w")>-1&&ua(s)?!0:c.test(s):ua(s)}function Rf(s){for(var c in s)if(s.hasOwnProperty(c)&&s[c])return!1;return!0}var Lf=/[\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 ju(s){return s.charCodeAt(0)>=768&&Lf.test(s)}function Ns(s,c,p){for(;(p<0?c>0:c<s.length)&&ju(s.charAt(c));)c+=p;return c}function Aa(s,c,p){for(var d=c>p?-1:1;;){if(c==p)return c;var h=(c+p)/2,y=d<0?Math.ceil(h):Math.floor(h);if(y==c)return s(y)?c:p;s(y)?p=y:c=y+d}}function _b(s,c,p,d){if(!s)return d(c,p,"ltr",0);for(var h=!1,y=0;y<s.length;++y){var S=s[y];(S.from<p&&S.to>c||c==p&&S.to==c)&&(d(Math.max(S.from,c),Math.min(S.to,p),S.level==1?"rtl":"ltr",y),h=!0)}h||d(c,p,"ltr")}var Ol=null;function Al(s,c,p){var d;Ol=null;for(var h=0;h<s.length;++h){var y=s[h];if(y.from<c&&y.to>c)return h;y.to==c&&(y.from!=y.to&&p=="before"?d=h:Ol=h),y.from==c&&(y.from!=y.to&&p!="before"?d=h:Ol=h)}return d??Ol}var bb=function(){var s="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",c="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function p(P){return P<=247?s.charAt(P):1424<=P&&P<=1524?"R":1536<=P&&P<=1785?c.charAt(P-1536):1774<=P&&P<=2220?"r":8192<=P&&P<=8203?"w":P==8204?"b":"L"}var d=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,h=/[stwN]/,y=/[LRr]/,S=/[Lb1n]/,O=/[1n]/;function L(P,X,ie){this.level=P,this.from=X,this.to=ie}return function(P,X){var ie=X=="ltr"?"L":"R";if(P.length==0||X=="ltr"&&!d.test(P))return!1;for(var ye=P.length,ge=[],Be=0;Be<ye;++Be)ge.push(p(P.charCodeAt(Be)));for(var He=0,Ye=ie;He<ye;++He){var lt=ge[He];lt=="m"?ge[He]=Ye:Ye=lt}for(var dt=0,ct=ie;dt<ye;++dt){var _t=ge[dt];_t=="1"&&ct=="r"?ge[dt]="n":y.test(_t)&&(ct=_t,_t=="r"&&(ge[dt]="R"))}for(var Ut=1,zt=ge[0];Ut<ye-1;++Ut){var pi=ge[Ut];pi=="+"&&zt=="1"&&ge[Ut+1]=="1"?ge[Ut]="1":pi==","&&zt==ge[Ut+1]&&(zt=="1"||zt=="n")&&(ge[Ut]=zt),zt=pi}for(var rn=0;rn<ye;++rn){var vr=ge[rn];if(vr==",")ge[rn]="N";else if(vr=="%"){var En=void 0;for(En=rn+1;En<ye&&ge[En]=="%";++En);for(var Co=rn&&ge[rn-1]=="!"||En<ye&&ge[En]=="1"?"1":"N",no=rn;no<En;++no)ge[no]=Co;rn=En-1}}for(var Xn=0,ro=ie;Xn<ye;++Xn){var Fr=ge[Xn];ro=="L"&&Fr=="1"?ge[Xn]="L":y.test(Fr)&&(ro=Fr)}for(var rr=0;rr<ye;++rr)if(h.test(ge[rr])){var Jn=void 0;for(Jn=rr+1;Jn<ye&&h.test(ge[Jn]);++Jn);for(var Bn=(rr?ge[rr-1]:ie)=="L",oo=(Jn<ye?ge[Jn]:ie)=="L",hd=Bn==oo?Bn?"L":"R":ie,Hl=rr;Hl<Jn;++Hl)ge[Hl]=hd;rr=Jn-1}for(var zr=[],ms,_r=0;_r<ye;)if(S.test(ge[_r])){var Cy=_r;for(++_r;_r<ye&&S.test(ge[_r]);++_r);zr.push(new L(0,Cy,_r))}else{var Gs=_r,Uc=zr.length,qc=X=="rtl"?1:0;for(++_r;_r<ye&&ge[_r]!="L";++_r);for(var Gr=Gs;Gr<_r;)if(O.test(ge[Gr])){Gs<Gr&&(zr.splice(Uc,0,new L(1,Gs,Gr)),Uc+=qc);var fd=Gr;for(++Gr;Gr<_r&&O.test(ge[Gr]);++Gr);zr.splice(Uc,0,new L(2,fd,Gr)),Uc+=qc,Gs=Gr}else++Gr;Gs<_r&&zr.splice(Uc,0,new L(1,Gs,_r))}return X=="ltr"&&(zr[0].level==1&&(ms=P.match(/^\s+/))&&(zr[0].from=ms[0].length,zr.unshift(new L(0,0,ms[0].length))),ni(zr).level==1&&(ms=P.match(/\s+$/))&&(ni(zr).to-=ms[0].length,zr.push(new L(0,ye-ms[0].length,ye)))),X=="rtl"?zr.reverse():zr}}();function Ra(s,c){var p=s.order;return p==null&&(p=s.order=bb(s.text,c)),p}var Jp=[],Gt=function(s,c,p){if(s.addEventListener)s.addEventListener(c,p,!1);else if(s.attachEvent)s.attachEvent("on"+c,p);else{var d=s._handlers||(s._handlers={});d[c]=(d[c]||Jp).concat(p)}};function Uu(s,c){return s._handlers&&s._handlers[c]||Jp}function eo(s,c,p){if(s.removeEventListener)s.removeEventListener(c,p,!1);else if(s.detachEvent)s.detachEvent("on"+c,p);else{var d=s._handlers,h=d&&d[c];if(h){var y=ki(h,p);y>-1&&(d[c]=h.slice(0,y).concat(h.slice(y+1)))}}}function In(s,c){var p=Uu(s,c);if(p.length)for(var d=Array.prototype.slice.call(arguments,2),h=0;h<p.length;++h)p[h].apply(null,d)}function Zn(s,c,p){return typeof c=="string"&&(c={type:c,preventDefault:function(){this.defaultPrevented=!0}}),In(s,p||c.type,s,c),qu(c)||c.codemirrorIgnore}function Bf(s){var c=s._handlers&&s._handlers.cursorActivity;if(c)for(var p=s.curOp.cursorActivityHandlers||(s.curOp.cursorActivityHandlers=[]),d=0;d<c.length;++d)ki(p,c[d])==-1&&p.push(c[d])}function yo(s,c){return Uu(s,c).length>0}function zs(s){s.prototype.on=function(c,p){Gt(this,c,p)},s.prototype.off=function(c,p){eo(this,c,p)}}function Vr(s){s.preventDefault?s.preventDefault():s.returnValue=!1}function $f(s){s.stopPropagation?s.stopPropagation():s.cancelBubble=!0}function qu(s){return s.defaultPrevented!=null?s.defaultPrevented:s.returnValue==!1}function Oc(s){Vr(s),$f(s)}function Wu(s){return s.target||s.srcElement}function qr(s){var c=s.which;return c==null&&(s.button&1?c=1:s.button&2?c=3:s.button&4&&(c=2)),z&&s.ctrlKey&&c==1&&(c=3),c}var us=function(){if(a&&l<9)return!1;var s=te("div");return"draggable"in s||"dragDrop"in s}(),Gu;function yb(s){if(Gu==null){var c=te("span","\u200B");Fe(s,te("span",[c,document.createTextNode("x")])),s.firstChild.offsetHeight!=0&&(Gu=c.offsetWidth<=1&&c.offsetHeight>2&&!(a&&l<8))}var p=Gu?te("span","\u200B"):te("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return p.setAttribute("cm-text",""),p}var xb;function AB(s){if(xb!=null)return xb;var c=Fe(s,document.createTextNode("A\u062EA")),p=Te(c,0,1).getBoundingClientRect(),d=Te(c,1,2).getBoundingClientRect();return be(s),!p||p.left==p.right?!1:xb=d.right-p.right<3}var Cb=` b`.split(/\n/).length!=3?function(s){for(var c=0,p=[],d=s.length;c<=d;){var h=s.indexOf(` `,c);h==-1&&(h=s.length);var y=s.slice(c,s.charAt(h-1)=="\r"?h-1:h),S=y.indexOf("\r");S!=-1?(p.push(y.slice(0,S)),c+=S+1):(p.push(y),c=h+1)}return p}:function(s){return s.split(/\r\n?|\n/)},RB=window.getSelection?function(s){try{return s.selectionStart!=s.selectionEnd}catch{return!1}}:function(s){var c;try{c=s.ownerDocument.selection.createRange()}catch{}return!c||c.parentElement()!=s?!1:c.compareEndPoints("StartToEnd",c)!=0},LB=function(){var s=te("div");return"oncopy"in s?!0:(s.setAttribute("oncopy","return;"),typeof s.oncopy=="function")}(),wb=null;function BB(s){if(wb!=null)return wb;var c=Fe(s,te("span","x")),p=c.getBoundingClientRect(),d=Te(c,0,1).getBoundingClientRect();return wb=Math.abs(p.left-d.left)>1}var Sb={},Ku={};function $B(s,c){arguments.length>2&&(c.dependencies=Array.prototype.slice.call(arguments,2)),Sb[s]=c}function PB(s,c){Ku[s]=c}function Pf(s){if(typeof s=="string"&&Ku.hasOwnProperty(s))s=Ku[s];else if(s&&typeof s.name=="string"&&Ku.hasOwnProperty(s.name)){var c=Ku[s.name];typeof c=="string"&&(c={name:c}),s=Vs(c,s),s.name=c.name}else{if(typeof s=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(s))return Pf("application/xml");if(typeof s=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(s))return Pf("application/json")}return typeof s=="string"?{name:s}:s||{name:"null"}}function Tb(s,c){c=Pf(c);var p=Sb[c.name];if(!p)return Tb(s,"text/plain");var d=p(s,c);if(Qu.hasOwnProperty(c.name)){var h=Qu[c.name];for(var y in h)h.hasOwnProperty(y)&&(d.hasOwnProperty(y)&&(d["_"+y]=d[y]),d[y]=h[y])}if(d.name=c.name,c.helperType&&(d.helperType=c.helperType),c.modeProps)for(var S in c.modeProps)d[S]=c.modeProps[S];return d}var Qu={};function VB(s,c){var p=Qu.hasOwnProperty(s)?Qu[s]:Qu[s]={};Ht(c,p)}function Ac(s,c){if(c===!0)return c;if(s.copyState)return s.copyState(c);var p={};for(var d in c){var h=c[d];h instanceof Array&&(h=h.concat([])),p[d]=h}return p}function kb(s,c){for(var p;s.innerMode&&(p=s.innerMode(c),!(!p||p.mode==s));)c=p.state,s=p.mode;return p||{mode:s,state:c}}function V3(s,c,p){return s.startState?s.startState(c,p):!0}var Yn=function(s,c,p){this.pos=this.start=0,this.string=s,this.tabSize=c||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=p};Yn.prototype.eol=function(){return this.pos>=this.string.length},Yn.prototype.sol=function(){return this.pos==this.lineStart},Yn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Yn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Yn.prototype.eat=function(s){var c=this.string.charAt(this.pos),p;if(typeof s=="string"?p=c==s:p=c&&(s.test?s.test(c):s(c)),p)return++this.pos,c},Yn.prototype.eatWhile=function(s){for(var c=this.pos;this.eat(s););return this.pos>c},Yn.prototype.eatSpace=function(){for(var s=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>s},Yn.prototype.skipToEnd=function(){this.pos=this.string.length},Yn.prototype.skipTo=function(s){var c=this.string.indexOf(s,this.pos);if(c>-1)return this.pos=c,!0},Yn.prototype.backUp=function(s){this.pos-=s},Yn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Oi(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Oi(this.string,this.lineStart,this.tabSize):0)},Yn.prototype.indentation=function(){return Oi(this.string,null,this.tabSize)-(this.lineStart?Oi(this.string,this.lineStart,this.tabSize):0)},Yn.prototype.match=function(s,c,p){if(typeof s=="string"){var d=function(S){return p?S.toLowerCase():S},h=this.string.substr(this.pos,s.length);if(d(h)==d(s))return c!==!1&&(this.pos+=s.length),!0}else{var y=this.string.slice(this.pos).match(s);return y&&y.index>0?null:(y&&c!==!1&&(this.pos+=y[0].length),y)}},Yn.prototype.current=function(){return this.string.slice(this.start,this.pos)},Yn.prototype.hideFirstChars=function(s,c){this.lineStart+=s;try{return c()}finally{this.lineStart-=s}},Yn.prototype.lookAhead=function(s){var c=this.lineOracle;return c&&c.lookAhead(s)},Yn.prototype.baseToken=function(){var s=this.lineOracle;return s&&s.baseToken(this.pos)};function Vt(s,c){if(c-=s.first,c<0||c>=s.size)throw new Error("There is no line "+(c+s.first)+" in the document.");for(var p=s;!p.lines;)for(var d=0;;++d){var h=p.children[d],y=h.chunkSize();if(c<y){p=h;break}c-=y}return p.lines[c]}function Rc(s,c,p){var d=[],h=c.line;return s.iter(c.line,p.line+1,function(y){var S=y.text;h==p.line&&(S=S.slice(0,p.ch)),h==c.line&&(S=S.slice(c.ch)),d.push(S),++h}),d}function Db(s,c,p){var d=[];return s.iter(c,p,function(h){d.push(h.text)}),d}function ds(s,c){var p=c-s.height;if(p)for(var d=s;d;d=d.parent)d.height+=p}function qi(s){if(s.parent==null)return null;for(var c=s.parent,p=ki(c.lines,s),d=c.parent;d;c=d,d=d.parent)for(var h=0;d.children[h]!=c;++h)p+=d.children[h].chunkSize();return p+c.first}function Lc(s,c){var p=s.first;e:do{for(var d=0;d<s.children.length;++d){var h=s.children[d],y=h.height;if(c<y){s=h;continue e}c-=y,p+=h.chunkSize()}return p}while(!s.lines);for(var S=0;S<s.lines.length;++S){var O=s.lines[S],L=O.height;if(c<L)break;c-=L}return p+S}function e0(s,c){return c>=s.first&&c<s.first+s.size}function Ib(s,c){return String(s.lineNumberFormatter(c+s.firstLineNumber))}function Ge(s,c,p){if(p===void 0&&(p=null),!(this instanceof Ge))return new Ge(s,c,p);this.line=s,this.ch=c,this.sticky=p}function oi(s,c){return s.line-c.line||s.ch-c.ch}function Eb(s,c){return s.sticky==c.sticky&&oi(s,c)==0}function Fb(s){return Ge(s.line,s.ch)}function Vf(s,c){return oi(s,c)<0?c:s}function Nf(s,c){return oi(s,c)<0?s:c}function N3(s,c){return Math.max(s.first,Math.min(c,s.first+s.size-1))}function ai(s,c){if(c.line<s.first)return Ge(s.first,0);var p=s.first+s.size-1;return c.line>p?Ge(p,Vt(s,p).text.length):NB(c,Vt(s,c.line).text.length)}function NB(s,c){var p=s.ch;return p==null||p>c?Ge(s.line,c):p<0?Ge(s.line,0):s}function z3(s,c){for(var p=[],d=0;d<c.length;d++)p[d]=ai(s,c[d]);return p}var zf=function(s,c){this.state=s,this.lookAhead=c},ps=function(s,c,p,d){this.state=c,this.doc=s,this.line=p,this.maxLookAhead=d||0,this.baseTokens=null,this.baseTokenPos=1};ps.prototype.lookAhead=function(s){var c=this.doc.getLine(this.line+s);return c!=null&&s>this.maxLookAhead&&(this.maxLookAhead=s),c},ps.prototype.baseToken=function(s){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=s;)this.baseTokenPos+=2;var c=this.baseTokens[this.baseTokenPos+1];return{type:c&&c.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-s}},ps.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ps.fromSaved=function(s,c,p){return c instanceof zf?new ps(s,Ac(s.mode,c.state),p,c.lookAhead):new ps(s,Ac(s.mode,c),p)},ps.prototype.save=function(s){var c=s!==!1?Ac(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new zf(c,this.maxLookAhead):c};function H3(s,c,p,d){var h=[s.state.modeGen],y={};K3(s,c.text,s.doc.mode,p,function(P,X){return h.push(P,X)},y,d);for(var S=p.state,O=function(P){p.baseTokens=h;var X=s.state.overlays[P],ie=1,ye=0;p.state=!0,K3(s,c.text,X.mode,p,function(ge,Be){for(var He=ie;ye<ge;){var Ye=h[ie];Ye>ge&&h.splice(ie,1,ge,h[ie+1],Ye),ie+=2,ye=Math.min(ge,Ye)}if(Be)if(X.opaque)h.splice(He,ie-He,ge,"overlay "+Be),ie=He+2;else for(;He<ie;He+=2){var lt=h[He+1];h[He+1]=(lt?lt+" ":"")+"overlay "+Be}},y),p.state=S,p.baseTokens=null,p.baseTokenPos=1},L=0;L<s.state.overlays.length;++L)O(L);return{styles:h,classes:y.bgClass||y.textClass?y:null}}function j3(s,c,p){if(!c.styles||c.styles[0]!=s.state.modeGen){var d=t0(s,qi(c)),h=c.text.length>s.options.maxHighlightLength&&Ac(s.doc.mode,d.state),y=H3(s,c,d);h&&(d.state=h),c.stateAfter=d.save(!h),c.styles=y.styles,y.classes?c.styleClasses=y.classes:c.styleClasses&&(c.styleClasses=null),p===s.doc.highlightFrontier&&(s.doc.modeFrontier=Math.max(s.doc.modeFrontier,++s.doc.highlightFrontier))}return c.styles}function t0(s,c,p){var d=s.doc,h=s.display;if(!d.mode.startState)return new ps(d,!0,c);var y=zB(s,c,p),S=y>d.first&&Vt(d,y-1).stateAfter,O=S?ps.fromSaved(d,S,y):new ps(d,V3(d.mode),y);return d.iter(y,c,function(L){Mb(s,L.text,O);var P=O.line;L.stateAfter=P==c-1||P%5==0||P>=h.viewFrom&&P<h.viewTo?O.save():null,O.nextLine()}),p&&(d.modeFrontier=O.line),O}function Mb(s,c,p,d){var h=s.doc.mode,y=new Yn(c,s.options.tabSize,p);for(y.start=y.pos=d||0,c==""&&U3(h,p.state);!y.eol();)Ob(h,y,p.state),y.start=y.pos}function U3(s,c){if(s.blankLine)return s.blankLine(c);if(s.innerMode){var p=kb(s,c);if(p.mode.blankLine)return p.mode.blankLine(p.state)}}function Ob(s,c,p,d){for(var h=0;h<10;h++){d&&(d[0]=kb(s,p).mode);var y=s.token(c,p);if(c.pos>c.start)return y}throw new Error("Mode "+s.name+" failed to advance stream.")}var q3=function(s,c,p){this.start=s.start,this.end=s.pos,this.string=s.current(),this.type=c||null,this.state=p};function W3(s,c,p,d){var h=s.doc,y=h.mode,S;c=ai(h,c);var O=Vt(h,c.line),L=t0(s,c.line,p),P=new Yn(O.text,s.options.tabSize,L),X;for(d&&(X=[]);(d||P.pos<c.ch)&&!P.eol();)P.start=P.pos,S=Ob(y,P,L.state),d&&X.push(new q3(P,S,Ac(h.mode,L.state)));return d?X:new q3(P,S,L.state)}function G3(s,c){if(s)for(;;){var p=s.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!p)break;s=s.slice(0,p.index)+s.slice(p.index+p[0].length);var d=p[1]?"bgClass":"textClass";c[d]==null?c[d]=p[2]:new RegExp("(?:^|\\s)"+p[2]+"(?:$|\\s)").test(c[d])||(c[d]+=" "+p[2])}return s}function K3(s,c,p,d,h,y,S){var O=p.flattenSpans;O==null&&(O=s.options.flattenSpans);var L=0,P=null,X=new Yn(c,s.options.tabSize,d),ie,ye=s.options.addModeClass&&[null];for(c==""&&G3(U3(p,d.state),y);!X.eol();){if(X.pos>s.options.maxHighlightLength?(O=!1,S&&Mb(s,c,d,X.pos),X.pos=c.length,ie=null):ie=G3(Ob(p,X,d.state,ye),y),ye){var ge=ye[0].name;ge&&(ie="m-"+(ie?ge+" "+ie:ge))}if(!O||P!=ie){for(;L<X.start;)L=Math.min(X.start,L+5e3),h(L,P);P=ie}X.start=X.pos}for(;L<X.pos;){var Be=Math.min(X.pos,L+5e3);h(Be,P),L=Be}}function zB(s,c,p){for(var d,h,y=s.doc,S=p?-1:c-(s.doc.mode.innerMode?1e3:100),O=c;O>S;--O){if(O<=y.first)return y.first;var L=Vt(y,O-1),P=L.stateAfter;if(P&&(!p||O+(P instanceof zf?P.lookAhead:0)<=y.modeFrontier))return O;var X=Oi(L.text,null,s.options.tabSize);(h==null||d>X)&&(h=O-1,d=X)}return h}function HB(s,c){if(s.modeFrontier=Math.min(s.modeFrontier,c),!(s.highlightFrontier<c-10)){for(var p=s.first,d=c-1;d>p;d--){var h=Vt(s,d).stateAfter;if(h&&(!(h instanceof zf)||d+h.lookAhead<c)){p=d+1;break}}s.highlightFrontier=Math.min(s.highlightFrontier,p)}}var Q3=!1,Hs=!1;function jB(){Q3=!0}function UB(){Hs=!0}function Hf(s,c,p){this.marker=s,this.from=c,this.to=p}function i0(s,c){if(s)for(var p=0;p<s.length;++p){var d=s[p];if(d.marker==c)return d}}function qB(s,c){for(var p,d=0;d<s.length;++d)s[d]!=c&&(p||(p=[])).push(s[d]);return p}function WB(s,c,p){var d=p&&window.WeakSet&&(p.markedSpans||(p.markedSpans=new WeakSet));d&&s.markedSpans&&d.has(s.markedSpans)?s.markedSpans.push(c):(s.markedSpans=s.markedSpans?s.markedSpans.concat([c]):[c],d&&d.add(s.markedSpans)),c.marker.attachLine(s)}function GB(s,c,p){var d;if(s)for(var h=0;h<s.length;++h){var y=s[h],S=y.marker,O=y.from==null||(S.inclusiveLeft?y.from<=c:y.from<c);if(O||y.from==c&&S.type=="bookmark"&&(!p||!y.marker.insertLeft)){var L=y.to==null||(S.inclusiveRight?y.to>=c:y.to>c);(d||(d=[])).push(new Hf(S,y.from,L?null:y.to))}}return d}function KB(s,c,p){var d;if(s)for(var h=0;h<s.length;++h){var y=s[h],S=y.marker,O=y.to==null||(S.inclusiveRight?y.to>=c:y.to>c);if(O||y.from==c&&S.type=="bookmark"&&(!p||y.marker.insertLeft)){var L=y.from==null||(S.inclusiveLeft?y.from<=c:y.from<c);(d||(d=[])).push(new Hf(S,L?null:y.from-c,y.to==null?null:y.to-c))}}return d}function Ab(s,c){if(c.full)return null;var p=e0(s,c.from.line)&&Vt(s,c.from.line).markedSpans,d=e0(s,c.to.line)&&Vt(s,c.to.line).markedSpans;if(!p&&!d)return null;var h=c.from.ch,y=c.to.ch,S=oi(c.from,c.to)==0,O=GB(p,h,S),L=KB(d,y,S),P=c.text.length==1,X=ni(c.text).length+(P?h:0);if(O)for(var ie=0;ie<O.length;++ie){var ye=O[ie];if(ye.to==null){var ge=i0(L,ye.marker);ge?P&&(ye.to=ge.to==null?null:ge.to+X):ye.to=h}}if(L)for(var Be=0;Be<L.length;++Be){var He=L[Be];if(He.to!=null&&(He.to+=X),He.from==null){var Ye=i0(O,He.marker);Ye||(He.from=X,P&&(O||(O=[])).push(He))}else He.from+=X,P&&(O||(O=[])).push(He)}O&&(O=Z3(O)),L&&L!=O&&(L=Z3(L));var lt=[O];if(!P){var dt=c.text.length-2,ct;if(dt>0&&O)for(var _t=0;_t<O.length;++_t)O[_t].to==null&&(ct||(ct=[])).push(new Hf(O[_t].marker,null,null));for(var Ut=0;Ut<dt;++Ut)lt.push(ct);lt.push(L)}return lt}function Z3(s){for(var c=0;c<s.length;++c){var p=s[c];p.from!=null&&p.from==p.to&&p.marker.clearWhenEmpty!==!1&&s.splice(c--,1)}return s.length?s:null}function QB(s,c,p){var d=null;if(s.iter(c.line,p.line+1,function(ge){if(ge.markedSpans)for(var Be=0;Be<ge.markedSpans.length;++Be){var He=ge.markedSpans[Be].marker;He.readOnly&&(!d||ki(d,He)==-1)&&(d||(d=[])).push(He)}}),!d)return null;for(var h=[{from:c,to:p}],y=0;y<d.length;++y)for(var S=d[y],O=S.find(0),L=0;L<h.length;++L){var P=h[L];if(!(oi(P.to,O.from)<0||oi(P.from,O.to)>0)){var X=[L,1],ie=oi(P.from,O.from),ye=oi(P.to,O.to);(ie<0||!S.inclusiveLeft&&!ie)&&X.push({from:P.from,to:O.from}),(ye>0||!S.inclusiveRight&&!ye)&&X.push({from:O.to,to:P.to}),h.splice.apply(h,X),L+=X.length-3}}return h}function Y3(s){var c=s.markedSpans;if(c){for(var p=0;p<c.length;++p)c[p].marker.detachLine(s);s.markedSpans=null}}function X3(s,c){if(c){for(var p=0;p<c.length;++p)c[p].marker.attachLine(s);s.markedSpans=c}}function jf(s){return s.inclusiveLeft?-1:0}function Uf(s){return s.inclusiveRight?1:0}function Rb(s,c){var p=s.lines.length-c.lines.length;if(p!=0)return p;var d=s.find(),h=c.find(),y=oi(d.from,h.from)||jf(s)-jf(c);if(y)return-y;var S=oi(d.to,h.to)||Uf(s)-Uf(c);return S||c.id-s.id}function J3(s,c){var p=Hs&&s.markedSpans,d;if(p)for(var h=void 0,y=0;y<p.length;++y)h=p[y],h.marker.collapsed&&(c?h.from:h.to)==null&&(!d||Rb(d,h.marker)<0)&&(d=h.marker);return d}function e4(s){return J3(s,!0)}function qf(s){return J3(s,!1)}function ZB(s,c){var p=Hs&&s.markedSpans,d;if(p)for(var h=0;h<p.length;++h){var y=p[h];y.marker.collapsed&&(y.from==null||y.from<c)&&(y.to==null||y.to>c)&&(!d||Rb(d,y.marker)<0)&&(d=y.marker)}return d}function t4(s,c,p,d,h){var y=Vt(s,c),S=Hs&&y.markedSpans;if(S)for(var O=0;O<S.length;++O){var L=S[O];if(L.marker.collapsed){var P=L.marker.find(0),X=oi(P.from,p)||jf(L.marker)-jf(h),ie=oi(P.to,d)||Uf(L.marker)-Uf(h);if(!(X>=0&&ie<=0||X<=0&&ie>=0)&&(X<=0&&(L.marker.inclusiveRight&&h.inclusiveLeft?oi(P.to,p)>=0:oi(P.to,p)>0)||X>=0&&(L.marker.inclusiveRight&&h.inclusiveLeft?oi(P.from,d)<=0:oi(P.from,d)<0)))return!0}}}function La(s){for(var c;c=e4(s);)s=c.find(-1,!0).line;return s}function YB(s){for(var c;c=qf(s);)s=c.find(1,!0).line;return s}function XB(s){for(var c,p;c=qf(s);)s=c.find(1,!0).line,(p||(p=[])).push(s);return p}function Lb(s,c){var p=Vt(s,c),d=La(p);return p==d?c:qi(d)}function i4(s,c){if(c>s.lastLine())return c;var p=Vt(s,c),d;if(!Rl(s,p))return c;for(;d=qf(p);)p=d.find(1,!0).line;return qi(p)+1}function Rl(s,c){var p=Hs&&c.markedSpans;if(p){for(var d=void 0,h=0;h<p.length;++h)if(d=p[h],!!d.marker.collapsed){if(d.from==null)return!0;if(!d.marker.widgetNode&&d.from==0&&d.marker.inclusiveLeft&&Bb(s,c,d))return!0}}}function Bb(s,c,p){if(p.to==null){var d=p.marker.find(1,!0);return Bb(s,d.line,i0(d.line.markedSpans,p.marker))}if(p.marker.inclusiveRight&&p.to==c.text.length)return!0;for(var h=void 0,y=0;y<c.markedSpans.length;++y)if(h=c.markedSpans[y],h.marker.collapsed&&!h.marker.widgetNode&&h.from==p.to&&(h.to==null||h.to!=p.from)&&(h.marker.inclusiveLeft||p.marker.inclusiveRight)&&Bb(s,c,h))return!0}function js(s){s=La(s);for(var c=0,p=s.parent,d=0;d<p.lines.length;++d){var h=p.lines[d];if(h==s)break;c+=h.height}for(var y=p.parent;y;p=y,y=p.parent)for(var S=0;S<y.children.length;++S){var O=y.children[S];if(O==p)break;c+=O.height}return c}function Wf(s){if(s.height==0)return 0;for(var c=s.text.length,p,d=s;p=e4(d);){var h=p.find(0,!0);d=h.from.line,c+=h.from.ch-h.to.ch}for(d=s;p=qf(d);){var y=p.find(0,!0);c-=d.text.length-y.from.ch,d=y.to.line,c+=d.text.length-y.to.ch}return c}function $b(s){var c=s.display,p=s.doc;c.maxLine=Vt(p,p.first),c.maxLineLength=Wf(c.maxLine),c.maxLineChanged=!0,p.iter(function(d){var h=Wf(d);h>c.maxLineLength&&(c.maxLineLength=h,c.maxLine=d)})}var Zu=function(s,c,p){this.text=s,X3(this,c),this.height=p?p(this):1};Zu.prototype.lineNo=function(){return qi(this)},zs(Zu);function JB(s,c,p,d){s.text=c,s.stateAfter&&(s.stateAfter=null),s.styles&&(s.styles=null),s.order!=null&&(s.order=null),Y3(s),X3(s,p);var h=d?d(s):1;h!=s.height&&ds(s,h)}function e$(s){s.parent=null,Y3(s)}var t$={},i$={};function n4(s,c){if(!s||/^\s*$/.test(s))return null;var p=c.addModeClass?i$:t$;return p[s]||(p[s]=s.replace(/\S+/g,"cm-$&"))}function r4(s,c){var p=he("span",null,null,u?"padding-right: .1px":null),d={pre:he("pre",[p],"CodeMirror-line"),content:p,col:0,pos:0,cm:s,trailingSpace:!1,splitSpaces:s.getOption("lineWrapping")};c.measure={};for(var h=0;h<=(c.rest?c.rest.length:0);h++){var y=h?c.rest[h-1]:c.line,S=void 0;d.pos=0,d.addToken=r$,AB(s.display.measure)&&(S=Ra(y,s.doc.direction))&&(d.addToken=a$(d.addToken,S)),d.map=[];var O=c!=s.display.externalMeasured&&qi(y);s$(y,d,j3(s,y,O)),y.styleClasses&&(y.styleClasses.bgClass&&(d.bgClass=Ve(y.styleClasses.bgClass,d.bgClass||"")),y.styleClasses.textClass&&(d.textClass=Ve(y.styleClasses.textClass,d.textClass||""))),d.map.length==0&&d.map.push(0,0,d.content.appendChild(yb(s.display.measure))),h==0?(c.measure.map=d.map,c.measure.cache={}):((c.measure.maps||(c.measure.maps=[])).push(d.map),(c.measure.caches||(c.measure.caches=[])).push({}))}if(u){var L=d.content.lastChild;(/\bcm-tab\b/.test(L.className)||L.querySelector&&L.querySelector(".cm-tab"))&&(d.content.className="cm-tab-wrap-hack")}return In(s,"renderLine",s,c.line,d.pre),d.pre.className&&(d.textClass=Ve(d.pre.className,d.textClass||"")),d}function n$(s){var c=te("span","\u2022","cm-invalidchar");return c.title="\\u"+s.charCodeAt(0).toString(16),c.setAttribute("aria-label",c.title),c}function r$(s,c,p,d,h,y,S){if(c){var O=s.splitSpaces?o$(c,s.trailingSpace):c,L=s.cm.state.specialChars,P=!1,X;if(!L.test(c))s.col+=c.length,X=document.createTextNode(O),s.map.push(s.pos,s.pos+c.length,X),a&&l<9&&(P=!0),s.pos+=c.length;else{X=document.createDocumentFragment();for(var ie=0;;){L.lastIndex=ie;var ye=L.exec(c),ge=ye?ye.index-ie:c.length-ie;if(ge){var Be=document.createTextNode(O.slice(ie,ie+ge));a&&l<9?X.appendChild(te("span",[Be])):X.appendChild(Be),s.map.push(s.pos,s.pos+ge,Be),s.col+=ge,s.pos+=ge}if(!ye)break;ie+=ge+1;var He=void 0;if(ye[0]==" "){var Ye=s.cm.options.tabSize,lt=Ye-s.col%Ye;He=X.appendChild(te("span",Er(lt),"cm-tab")),He.setAttribute("role","presentation"),He.setAttribute("cm-text"," "),s.col+=lt}else ye[0]=="\r"||ye[0]==` `?(He=X.appendChild(te("span",ye[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),He.setAttribute("cm-text",ye[0]),s.col+=1):(He=s.cm.options.specialCharPlaceholder(ye[0]),He.setAttribute("cm-text",ye[0]),a&&l<9?X.appendChild(te("span",[He])):X.appendChild(He),s.col+=1);s.map.push(s.pos,s.pos+1,He),s.pos++}}if(s.trailingSpace=O.charCodeAt(c.length-1)==32,p||d||h||P||y||S){var dt=p||"";d&&(dt+=d),h&&(dt+=h);var ct=te("span",[X],dt,y);if(S)for(var _t in S)S.hasOwnProperty(_t)&&_t!="style"&&_t!="class"&&ct.setAttribute(_t,S[_t]);return s.content.appendChild(ct)}s.content.appendChild(X)}}function o$(s,c){if(s.length>1&&!/ /.test(s))return s;for(var p=c,d="",h=0;h<s.length;h++){var y=s.charAt(h);y==" "&&p&&(h==s.length-1||s.charCodeAt(h+1)==32)&&(y="\xA0"),d+=y,p=y==" "}return d}function a$(s,c){return function(p,d,h,y,S,O,L){h=h?h+" cm-force-border":"cm-force-border";for(var P=p.pos,X=P+d.length;;){for(var ie=void 0,ye=0;ye<c.length&&(ie=c[ye],!(ie.to>P&&ie.from<=P));ye++);if(ie.to>=X)return s(p,d,h,y,S,O,L);s(p,d.slice(0,ie.to-P),h,y,null,O,L),y=null,d=d.slice(ie.to-P),P=ie.to}}}function o4(s,c,p,d){var h=!d&&p.widgetNode;h&&s.map.push(s.pos,s.pos+c,h),!d&&s.cm.display.input.needsContentAttribute&&(h||(h=s.content.appendChild(document.createElement("span"))),h.setAttribute("cm-marker",p.id)),h&&(s.cm.display.input.setUneditable(h),s.content.appendChild(h)),s.pos+=c,s.trailingSpace=!1}function s$(s,c,p){var d=s.markedSpans,h=s.text,y=0;if(!d){for(var S=1;S<p.length;S+=2)c.addToken(c,h.slice(y,y=p[S]),n4(p[S+1],c.cm.options));return}for(var O=h.length,L=0,P=1,X="",ie,ye,ge=0,Be,He,Ye,lt,dt;;){if(ge==L){Be=He=Ye=ye="",dt=null,lt=null,ge=1/0;for(var ct=[],_t=void 0,Ut=0;Ut<d.length;++Ut){var zt=d[Ut],pi=zt.marker;if(pi.type=="bookmark"&&zt.from==L&&pi.widgetNode)ct.push(pi);else if(zt.from<=L&&(zt.to==null||zt.to>L||pi.collapsed&&zt.to==L&&zt.from==L)){if(zt.to!=null&&zt.to!=L&&ge>zt.to&&(ge=zt.to,He=""),pi.className&&(Be+=" "+pi.className),pi.css&&(ye=(ye?ye+";":"")+pi.css),pi.startStyle&&zt.from==L&&(Ye+=" "+pi.startStyle),pi.endStyle&&zt.to==ge&&(_t||(_t=[])).push(pi.endStyle,zt.to),pi.title&&((dt||(dt={})).title=pi.title),pi.attributes)for(var rn in pi.attributes)(dt||(dt={}))[rn]=pi.attributes[rn];pi.collapsed&&(!lt||Rb(lt.marker,pi)<0)&&(lt=zt)}else zt.from>L&&ge>zt.from&&(ge=zt.from)}if(_t)for(var vr=0;vr<_t.length;vr+=2)_t[vr+1]==ge&&(He+=" "+_t[vr]);if(!lt||lt.from==L)for(var En=0;En<ct.length;++En)o4(c,0,ct[En]);if(lt&&(lt.from||0)==L){if(o4(c,(lt.to==null?O+1:lt.to)-L,lt.marker,lt.from==null),lt.to==null)return;lt.to==L&&(lt=!1)}}if(L>=O)break;for(var Co=Math.min(O,ge);;){if(X){var no=L+X.length;if(!lt){var Xn=no>Co?X.slice(0,Co-L):X;c.addToken(c,Xn,ie?ie+Be:Be,Ye,L+Xn.length==ge?He:"",ye,dt)}if(no>=Co){X=X.slice(Co-L),L=Co;break}L=no,Ye=""}X=h.slice(y,y=p[P++]),ie=n4(p[P++],c.cm.options)}}}function a4(s,c,p){this.line=c,this.rest=XB(c),this.size=this.rest?qi(ni(this.rest))-p+1:1,this.node=this.text=null,this.hidden=Rl(s,c)}function Gf(s,c,p){for(var d=[],h,y=c;y<p;y=h){var S=new a4(s.doc,Vt(s.doc,y),y);h=y+S.size,d.push(S)}return d}var Yu=null;function l$(s){Yu?Yu.ops.push(s):s.ownsGroup=Yu={ops:[s],delayedCallbacks:[]}}function c$(s){var c=s.delayedCallbacks,p=0;do{for(;p<c.length;p++)c[p].call(null);for(var d=0;d<s.ops.length;d++){var h=s.ops[d];if(h.cursorActivityHandlers)for(;h.cursorActivityCalled<h.cursorActivityHandlers.length;)h.cursorActivityHandlers[h.cursorActivityCalled++].call(null,h.cm)}}while(p<c.length)}function u$(s,c){var p=s.ownsGroup;if(p)try{c$(p)}finally{Yu=null,c(p)}}var n0=null;function fr(s,c){var p=Uu(s,c);if(p.length){var d=Array.prototype.slice.call(arguments,2),h;Yu?h=Yu.delayedCallbacks:n0?h=n0:(h=n0=[],setTimeout(d$,0));for(var y=function(O){h.push(function(){return p[O].apply(null,d)})},S=0;S<p.length;++S)y(S)}}function d$(){var s=n0;n0=null;for(var c=0;c<s.length;++c)s[c]()}function s4(s,c,p,d){for(var h=0;h<c.changes.length;h++){var y=c.changes[h];y=="text"?h$(s,c):y=="gutter"?c4(s,c,p,d):y=="class"?Pb(s,c):y=="widget"&&f$(s,c,d)}c.changes=null}function r0(s){return s.node==s.text&&(s.node=te("div",null,null,"position: relative"),s.text.parentNode&&s.text.parentNode.replaceChild(s.node,s.text),s.node.appendChild(s.text),a&&l<8&&(s.node.style.zIndex=2)),s.node}function p$(s,c){var p=c.bgClass?c.bgClass+" "+(c.line.bgClass||""):c.line.bgClass;if(p&&(p+=" CodeMirror-linebackground"),c.background)p?c.background.className=p:(c.background.parentNode.removeChild(c.background),c.background=null);else if(p){var d=r0(c);c.background=d.insertBefore(te("div",null,p),d.firstChild),s.display.input.setUneditable(c.background)}}function l4(s,c){var p=s.display.externalMeasured;return p&&p.line==c.line?(s.display.externalMeasured=null,c.measure=p.measure,p.built):r4(s,c)}function h$(s,c){var p=c.text.className,d=l4(s,c);c.text==c.node&&(c.node=d.pre),c.text.parentNode.replaceChild(d.pre,c.text),c.text=d.pre,d.bgClass!=c.bgClass||d.textClass!=c.textClass?(c.bgClass=d.bgClass,c.textClass=d.textClass,Pb(s,c)):p&&(c.text.className=p)}function Pb(s,c){p$(s,c),c.line.wrapClass?r0(c).className=c.line.wrapClass:c.node!=c.text&&(c.node.className="");var p=c.textClass?c.textClass+" "+(c.line.textClass||""):c.line.textClass;c.text.className=p||""}function c4(s,c,p,d){if(c.gutter&&(c.node.removeChild(c.gutter),c.gutter=null),c.gutterBackground&&(c.node.removeChild(c.gutterBackground),c.gutterBackground=null),c.line.gutterClass){var h=r0(c);c.gutterBackground=te("div",null,"CodeMirror-gutter-background "+c.line.gutterClass,"left: "+(s.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+"px; width: "+d.gutterTotalWidth+"px"),s.display.input.setUneditable(c.gutterBackground),h.insertBefore(c.gutterBackground,c.text)}var y=c.line.gutterMarkers;if(s.options.lineNumbers||y){var S=r0(c),O=c.gutter=te("div",null,"CodeMirror-gutter-wrapper","left: "+(s.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+"px");if(O.setAttribute("aria-hidden","true"),s.display.input.setUneditable(O),S.insertBefore(O,c.text),c.line.gutterClass&&(O.className+=" "+c.line.gutterClass),s.options.lineNumbers&&(!y||!y["CodeMirror-linenumbers"])&&(c.lineNumber=O.appendChild(te("div",Ib(s.options,p),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+d.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+s.display.lineNumInnerWidth+"px"))),y)for(var L=0;L<s.display.gutterSpecs.length;++L){var P=s.display.gutterSpecs[L].className,X=y.hasOwnProperty(P)&&y[P];X&&O.appendChild(te("div",[X],"CodeMirror-gutter-elt","left: "+d.gutterLeft[P]+"px; width: "+d.gutterWidth[P]+"px"))}}}function f$(s,c,p){c.alignable&&(c.alignable=null);for(var d=ce("CodeMirror-linewidget"),h=c.node.firstChild,y=void 0;h;h=y)y=h.nextSibling,d.test(h.className)&&c.node.removeChild(h);u4(s,c,p)}function m$(s,c,p,d){var h=l4(s,c);return c.text=c.node=h.pre,h.bgClass&&(c.bgClass=h.bgClass),h.textClass&&(c.textClass=h.textClass),Pb(s,c),c4(s,c,p,d),u4(s,c,d),c.node}function u4(s,c,p){if(d4(s,c.line,c,p,!0),c.rest)for(var d=0;d<c.rest.length;d++)d4(s,c.rest[d],c,p,!1)}function d4(s,c,p,d,h){if(c.widgets)for(var y=r0(p),S=0,O=c.widgets;S<O.length;++S){var L=O[S],P=te("div",[L.node],"CodeMirror-linewidget"+(L.className?" "+L.className:""));L.handleMouseEvents||P.setAttribute("cm-ignore-events","true"),g$(L,P,p,d),s.display.input.setUneditable(P),h&&L.above?y.insertBefore(P,p.gutter||p.text):y.appendChild(P),fr(L,"redraw")}}function g$(s,c,p,d){if(s.noHScroll){(p.alignable||(p.alignable=[])).push(c);var h=d.wrapperWidth;c.style.left=d.fixedPos+"px",s.coverGutter||(h-=d.gutterTotalWidth,c.style.paddingLeft=d.gutterTotalWidth+"px"),c.style.width=h+"px"}s.coverGutter&&(c.style.zIndex=5,c.style.position="relative",s.noHScroll||(c.style.marginLeft=-d.gutterTotalWidth+"px"))}function o0(s){if(s.height!=null)return s.height;var c=s.doc.cm;if(!c)return 0;if(!$e(document.body,s.node)){var p="position: relative;";s.coverGutter&&(p+="margin-left: -"+c.display.gutters.offsetWidth+"px;"),s.noHScroll&&(p+="width: "+c.display.wrapper.clientWidth+"px;"),Fe(c.display.measure,te("div",[s.node],null,p))}return s.height=s.node.parentNode.offsetHeight}function Us(s,c){for(var p=Wu(c);p!=s.wrapper;p=p.parentNode)if(!p||p.nodeType==1&&p.getAttribute("cm-ignore-events")=="true"||p.parentNode==s.sizer&&p!=s.mover)return!0}function Kf(s){return s.lineSpace.offsetTop}function Vb(s){return s.mover.offsetHeight-s.lineSpace.offsetHeight}function p4(s){if(s.cachedPaddingH)return s.cachedPaddingH;var c=Fe(s.measure,te("pre","x","CodeMirror-line-like")),p=window.getComputedStyle?window.getComputedStyle(c):c.currentStyle,d={left:parseInt(p.paddingLeft),right:parseInt(p.paddingRight)};return!isNaN(d.left)&&!isNaN(d.right)&&(s.cachedPaddingH=d),d}function hs(s){return Di-s.display.nativeBarWidth}function Bc(s){return s.display.scroller.clientWidth-hs(s)-s.display.barWidth}function Nb(s){return s.display.scroller.clientHeight-hs(s)-s.display.barHeight}function v$(s,c,p){var d=s.options.lineWrapping,h=d&&Bc(s);if(!c.measure.heights||d&&c.measure.width!=h){var y=c.measure.heights=[];if(d){c.measure.width=h;for(var S=c.text.firstChild.getClientRects(),O=0;O<S.length-1;O++){var L=S[O],P=S[O+1];Math.abs(L.bottom-P.bottom)>2&&y.push((L.bottom+P.top)/2-p.top)}}y.push(p.bottom-p.top)}}function h4(s,c,p){if(s.line==c)return{map:s.measure.map,cache:s.measure.cache};if(s.rest){for(var d=0;d<s.rest.length;d++)if(s.rest[d]==c)return{map:s.measure.maps[d],cache:s.measure.caches[d]};for(var h=0;h<s.rest.length;h++)if(qi(s.rest[h])>p)return{map:s.measure.maps[h],cache:s.measure.caches[h],before:!0}}}function _$(s,c){c=La(c);var p=qi(c),d=s.display.externalMeasured=new a4(s.doc,c,p);d.lineN=p;var h=d.built=r4(s,d);return d.text=h.pre,Fe(s.display.lineMeasure,h.pre),d}function f4(s,c,p,d){return fs(s,Xu(s,c),p,d)}function zb(s,c){if(c>=s.display.viewFrom&&c<s.display.viewTo)return s.display.view[Vc(s,c)];var p=s.display.externalMeasured;if(p&&c>=p.lineN&&c<p.lineN+p.size)return p}function Xu(s,c){var p=qi(c),d=zb(s,p);d&&!d.text?d=null:d&&d.changes&&(s4(s,d,p,Wb(s)),s.curOp.forceUpdate=!0),d||(d=_$(s,c));var h=h4(d,c,p);return{line:c,view:d,rect:null,map:h.map,cache:h.cache,before:h.before,hasHeights:!1}}function fs(s,c,p,d,h){c.before&&(p=-1);var y=p+(d||""),S;return c.cache.hasOwnProperty(y)?S=c.cache[y]:(c.rect||(c.rect=c.view.text.getBoundingClientRect()),c.hasHeights||(v$(s,c.view,c.rect),c.hasHeights=!0),S=y$(s,c,p,d),S.bogus||(c.cache[y]=S)),{left:S.left,right:S.right,top:h?S.rtop:S.top,bottom:h?S.rbottom:S.bottom}}var m4={left:0,right:0,top:0,bottom:0};function g4(s,c,p){for(var d,h,y,S,O,L,P=0;P<s.length;P+=3)if(O=s[P],L=s[P+1],c<O?(h=0,y=1,S="left"):c<L?(h=c-O,y=h+1):(P==s.length-3||c==L&&s[P+3]>c)&&(y=L-O,h=y-1,c>=L&&(S="right")),h!=null){if(d=s[P+2],O==L&&p==(d.insertLeft?"left":"right")&&(S=p),p=="left"&&h==0)for(;P&&s[P-2]==s[P-3]&&s[P-1].insertLeft;)d=s[(P-=3)+2],S="left";if(p=="right"&&h==L-O)for(;P<s.length-3&&s[P+3]==s[P+4]&&!s[P+5].insertLeft;)d=s[(P+=3)+2],S="right";break}return{node:d,start:h,end:y,collapse:S,coverStart:O,coverEnd:L}}function b$(s,c){var p=m4;if(c=="left")for(var d=0;d<s.length&&(p=s[d]).left==p.right;d++);else for(var h=s.length-1;h>=0&&(p=s[h]).left==p.right;h--);return p}function y$(s,c,p,d){var h=g4(c.map,p,d),y=h.node,S=h.start,O=h.end,L=h.collapse,P;if(y.nodeType==3){for(var X=0;X<4;X++){for(;S&&ju(c.line.text.charAt(h.coverStart+S));)--S;for(;h.coverStart+O<h.coverEnd&&ju(c.line.text.charAt(h.coverStart+O));)++O;if(a&&l<9&&S==0&&O==h.coverEnd-h.coverStart?P=y.parentNode.getBoundingClientRect():P=b$(Te(y,S,O).getClientRects(),d),P.left||P.right||S==0)break;O=S,S=S-1,L="right"}a&&l<11&&(P=x$(s.display.measure,P))}else{S>0&&(L=d="right");var ie;s.options.lineWrapping&&(ie=y.getClientRects()).length>1?P=ie[d=="right"?ie.length-1:0]:P=y.getBoundingClientRect()}if(a&&l<9&&!S&&(!P||!P.left&&!P.right)){var ye=y.parentNode.getClientRects()[0];ye?P={left:ye.left,right:ye.left+ed(s.display),top:ye.top,bottom:ye.bottom}:P=m4}for(var ge=P.top-c.rect.top,Be=P.bottom-c.rect.top,He=(ge+Be)/2,Ye=c.view.measure.heights,lt=0;lt<Ye.length-1&&!(He<Ye[lt]);lt++);var dt=lt?Ye[lt-1]:0,ct=Ye[lt],_t={left:(L=="right"?P.right:P.left)-c.rect.left,right:(L=="left"?P.left:P.right)-c.rect.left,top:dt,bottom:ct};return!P.left&&!P.right&&(_t.bogus=!0),s.options.singleCursorHeightPerLine||(_t.rtop=ge,_t.rbottom=Be),_t}function x$(s,c){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!BB(s))return c;var p=screen.logicalXDPI/screen.deviceXDPI,d=screen.logicalYDPI/screen.deviceYDPI;return{left:c.left*p,right:c.right*p,top:c.top*d,bottom:c.bottom*d}}function v4(s){if(s.measure&&(s.measure.cache={},s.measure.heights=null,s.rest))for(var c=0;c<s.rest.length;c++)s.measure.caches[c]={}}function _4(s){s.display.externalMeasure=null,be(s.display.lineMeasure);for(var c=0;c<s.display.view.length;c++)v4(s.display.view[c])}function a0(s){_4(s),s.display.cachedCharWidth=s.display.cachedTextHeight=s.display.cachedPaddingH=null,s.options.lineWrapping||(s.display.maxLineChanged=!0),s.display.lineNumChars=null}function b4(s){return m&&E?-(s.body.getBoundingClientRect().left-parseInt(getComputedStyle(s.body).marginLeft)):s.defaultView.pageXOffset||(s.documentElement||s.body).scrollLeft}function y4(s){return m&&E?-(s.body.getBoundingClientRect().top-parseInt(getComputedStyle(s.body).marginTop)):s.defaultView.pageYOffset||(s.documentElement||s.body).scrollTop}function Hb(s){var c=La(s),p=c.widgets,d=0;if(p)for(var h=0;h<p.length;++h)p[h].above&&(d+=o0(p[h]));return d}function Qf(s,c,p,d,h){if(!h){var y=Hb(c);p.top+=y,p.bottom+=y}if(d=="line")return p;d||(d="local");var S=js(c);if(d=="local"?S+=Kf(s.display):S-=s.display.viewOffset,d=="page"||d=="window"){var O=s.display.lineSpace.getBoundingClientRect();S+=O.top+(d=="window"?0:y4(V(s)));var L=O.left+(d=="window"?0:b4(V(s)));p.left+=L,p.right+=L}return p.top+=S,p.bottom+=S,p}function x4(s,c,p){if(p=="div")return c;var d=c.left,h=c.top;if(p=="page")d-=b4(V(s)),h-=y4(V(s));else if(p=="local"||!p){var y=s.display.sizer.getBoundingClientRect();d+=y.left,h+=y.top}var S=s.display.lineSpace.getBoundingClientRect();return{left:d-S.left,top:h-S.top}}function Zf(s,c,p,d,h){return d||(d=Vt(s.doc,c.line)),Qf(s,d,f4(s,d,c.ch,h),p)}function Ba(s,c,p,d,h,y){d=d||Vt(s.doc,c.line),h||(h=Xu(s,d));function S(Be,He){var Ye=fs(s,h,Be,He?"right":"left",y);return He?Ye.left=Ye.right:Ye.right=Ye.left,Qf(s,d,Ye,p)}var O=Ra(d,s.doc.direction),L=c.ch,P=c.sticky;if(L>=d.text.length?(L=d.text.length,P="before"):L<=0&&(L=0,P="after"),!O)return S(P=="before"?L-1:L,P=="before");function X(Be,He,Ye){var lt=O[He],dt=lt.level==1;return S(Ye?Be-1:Be,dt!=Ye)}var ie=Al(O,L,P),ye=Ol,ge=X(L,ie,P=="before");return ye!=null&&(ge.other=X(L,ye,P!="before")),ge}function C4(s,c){var p=0;c=ai(s.doc,c),s.options.lineWrapping||(p=ed(s.display)*c.ch);var d=Vt(s.doc,c.line),h=js(d)+Kf(s.display);return{left:p,right:p,top:h,bottom:h+d.height}}function jb(s,c,p,d,h){var y=Ge(s,c,p);return y.xRel=h,d&&(y.outside=d),y}function Ub(s,c,p){var d=s.doc;if(p+=s.display.viewOffset,p<0)return jb(d.first,0,null,-1,-1);var h=Lc(d,p),y=d.first+d.size-1;if(h>y)return jb(d.first+d.size-1,Vt(d,y).text.length,null,1,1);c<0&&(c=0);for(var S=Vt(d,h);;){var O=C$(s,S,h,c,p),L=ZB(S,O.ch+(O.xRel>0||O.outside>0?1:0));if(!L)return O;var P=L.find(1);if(P.line==h)return P;S=Vt(d,h=P.line)}}function w4(s,c,p,d){d-=Hb(c);var h=c.text.length,y=Aa(function(S){return fs(s,p,S-1).bottom<=d},h,0);return h=Aa(function(S){return fs(s,p,S).top>d},y,h),{begin:y,end:h}}function S4(s,c,p,d){p||(p=Xu(s,c));var h=Qf(s,c,fs(s,p,d),"line").top;return w4(s,c,p,h)}function qb(s,c,p,d){return s.bottom<=p?!1:s.top>p?!0:(d?s.left:s.right)>c}function C$(s,c,p,d,h){h-=js(c);var y=Xu(s,c),S=Hb(c),O=0,L=c.text.length,P=!0,X=Ra(c,s.doc.direction);if(X){var ie=(s.options.lineWrapping?S$:w$)(s,c,p,y,X,d,h);P=ie.level!=1,O=P?ie.from:ie.to-1,L=P?ie.to:ie.from-1}var ye=null,ge=null,Be=Aa(function(Ut){var zt=fs(s,y,Ut);return zt.top+=S,zt.bottom+=S,qb(zt,d,h,!1)?(zt.top<=h&&zt.left<=d&&(ye=Ut,ge=zt),!0):!1},O,L),He,Ye,lt=!1;if(ge){var dt=d-ge.left<ge.right-d,ct=dt==P;Be=ye+(ct?0:1),Ye=ct?"after":"before",He=dt?ge.left:ge.right}else{!P&&(Be==L||Be==O)&&Be++,Ye=Be==0?"after":Be==c.text.length?"before":fs(s,y,Be-(P?1:0)).bottom+S<=h==P?"after":"before";var _t=Ba(s,Ge(p,Be,Ye),"line",c,y);He=_t.left,lt=h<_t.top?-1:h>=_t.bottom?1:0}return Be=Ns(c.text,Be,1),jb(p,Be,Ye,lt,d-He)}function w$(s,c,p,d,h,y,S){var O=Aa(function(ie){var ye=h[ie],ge=ye.level!=1;return qb(Ba(s,Ge(p,ge?ye.to:ye.from,ge?"before":"after"),"line",c,d),y,S,!0)},0,h.length-1),L=h[O];if(O>0){var P=L.level!=1,X=Ba(s,Ge(p,P?L.from:L.to,P?"after":"before"),"line",c,d);qb(X,y,S,!0)&&X.top>S&&(L=h[O-1])}return L}function S$(s,c,p,d,h,y,S){var O=w4(s,c,d,S),L=O.begin,P=O.end;/\s/.test(c.text.charAt(P-1))&&P--;for(var X=null,ie=null,ye=0;ye<h.length;ye++){var ge=h[ye];