1(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[8597],{60585:(e,t,r)=>{"use strict" 2r.r(t),r.d(t,{default:()=>u}) 3var n=r(48431),i=r(43343),o=r(91121),a=r(42295) 4class l extends n.Component{static defaultProps={position:"bottom-right",onResize:i.A} 5constructor(e){super(e),this.widthSignFactor=s(e.position),this.heightSignFactor=c(e.position)}componentDidUpdate(e){this.props.position!==e.position&&(this.widthSignFactor=s(this.props.position),this.heightSignFactor=c(this.props.position))}handleResizeElementMouseDown=e=>{e.preventDefault(),this.rect=this.element.getBoundingClientRect(),this.isMouseDown=!0,this.initialWidth=this.rect.width,this.initialHeight=this.rect.height,this.initialClientX=e.clientX,this.initialClientY=e.clientY,window.requestAnimationFrame(this.updateElementSize),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)} 6handleMouseMove=e=>{e.preventDefault(),this.deltaX=e.clientX-this.initialClientX,this.deltaY=this.initialClientY-e.clientY} 7handleMouseUp=()=>{this.isMouseDown=!1,this.shouldResize=!1,this.deltaX=this.deltaY=0,document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)} 8updateElementSize=()=>{if(this.isMouseDown&&window.requestAnimationFrame(this.updateElementSize),this.shouldResize=this.deltaX*this.deltaX+this.deltaY*this.deltaY>100,this.shouldResize){const e=this.initialWidth+this.deltaX*this.widthSignFactor,t=this.initialHeight+this.deltaY*this.heightSignFactor,r=e!==this.width&&this.rect.left+e-window.innerWidth<0,n=t!==this.height&&this.rect.top+t-window.innerHeight<0 9r&&(this.width=e,this.element.style.width=`${e}px`),n&&(this.height=t,this.element.style.height=`${t}px`),(r||n)&&this.props.onResize(this.width,this.height)}} 10render(){const e=this.props.children 11return(0,n.cloneElement)(e,{className:(0,o.A)([e.props.className,"ep-resizable"]),ref:t=>{this.element=t 12const{ref:r}=e 13"function"==typeof r&&r(t)}},[e.props.children,(0,a.jsx)("div",{className:"ep-resizable-handle","data-position":this.props.position,onMouseDown:this.handleResizeElementMouseDown},"handle")])}}function s(e){return e.endsWith("left")?-1:1}function c(e){return e.startsWith("bottom")?-1:1}class u extends n.PureComponent{static defaultProps={onResize:i.A,value:""} 14textareaNode=(0,n.createRef)() 15componentDidMount(){const{options:e,onChange:t,value:n}=this.props,i=r(57226) 16if(r(4444),r(24352),e&&e.mode){const t=e.mode.name||e.mode.replace(/^\w+\//,"") 17"css"===t&&r(46363),"htmlmixed"===t&&(r(95395),e.lint&&(e.lint={getAnnotations:(e,t,r)=>{if(this.props.onLint){const n=i.lint.html(e,r) 18this.props.onLint(n,e),t(n)}},async:!0,rules:{"id-unique":!0,"tag-pair":!0,"head-script-disabled":!0,"attr-no-duplication":!0,"src-not-empty":!0}}))}this.codeMirror=i.fromTextArea(this.textareaNode.current,e),this.codeMirror.on("change",((e,r)=>{"setValue"!==r.origin&&t(e.getValue(),r)})),this.codeMirror.setValue(n)}componentDidUpdate(e){const{value:t}=this.props 19this.codeMirror&&t!==e.value&&t!==this.codeMirror.getValue()&&this.codeMirror.setValue(t)}
19componentWillUnmount(){this.codeMirror.toTextArea()}handleResize=(e,t)=>{this.codeMirror.setSize(e,t),this.props.onResize(e,t)} 20render(){const{value:e,className:t,resizable:r}=this.props,n=(0,a.jsx)("div",{className:t,"data-resizable":r,children:(0,a.jsx)("textarea",{ref:this.textareaNode,defaultValue:e,autoComplete:"off"})}) 21return r?(0,a.jsx)(l,{onResize:this.handleResize,children:n}):n}}},24352:(e,t,r)=>{ 22// CodeMirror, copyright (c) by Marijn Haverbeke and others 23// Distributed under an MIT license: https://codemirror.net/5/LICENSE 24!function(e,t){"use strict" 25var r={"tagname-lowercase":!0,"attr-lowercase":!0,"attr-value-double-quotes":!0,"doctype-first":!1,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0} 26e.registerHelper("lint","html",(function(n,i){var o=[] 27if(t&&!t.verify&&(t=void 0!==t.default?t.default:t.HTMLHint),t||(t=window.HTMLHint),!t)return window.console&&window.console.error("Error: HTMLHint not found, not defined on window, or not available through define/require, CodeMirror HTML linting cannot run."),o 28for(var a=t.verify(n,i&&i.rules||r),l=0;l<a.length;l++){var s=a[l],c=s.line-1,u=s.line-1,d=s.col-1,f=s.col 29o.push({from:e.Pos(c,d),to:e.Pos(u,f),message:s.message,severity:s.type})}return o}))}(r(57226),r(63094))},4444:(e,t,r)=>{ 30// CodeMirror, copyright (c) by Marijn Haverbeke and others 31// Distributed under an MIT license: https://codemirror.net/5/LICENSE 32!function(e){"use strict" 33var t="CodeMirror-lint-markers",r="CodeMirror-lint-line-" 34function n(t,r,n){var i=document.createElement("div") 35function o(t){if(!i.parentNode)return e.off(document,"mousemove",o) 36var r=Math.max(0,t.clientY-i.offsetHeight-5),n=Math.max(0,Math.min(t.clientX+5,i.ownerDocument.defaultView.innerWidth-i.offsetWidth)) 37i.style.top=r+"px",i.style.left=n+"px"}return i.className="CodeMirror-lint-tooltip cm-s-"+t.options.theme,i.appendChild(n.cloneNode(!0)),t.state.lint.options.selfContain?t.getWrapperElement().appendChild(i):document.body.appendChild(i),e.on(document,"mousemove",o),o(r),null!=i.style.opacity&&(i.style.opacity=1),i}function i(e){e.parentNode&&e.parentNode.removeChild(e)}function o(e){e.parentNode&&(null==e.style.opacity&&i(e),e.style.opacity=0,setTimeout((function(){i(e)}),600))}function a(t,r,i,a){var l=n(t,r,i) 38function s(){e.off(a,"mouseout",s),l&&(o(l),l=null)}var c=setInterval((function(){if(l)for(var e=a;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return 39if(!e){s() 40break}}if(!l)return clearInterval(c)}),400) 41e.on(a,"mouseout",s)}function l(e,t,r){for(var n in this.marked=[],t instanceof Function&&(t={getAnnotations:t}),t&&!0!==t||(t={}),this.options={},this.linterOptions=t.options||{},s)this.options[n]=s[n] 42for(var n in t)s.hasOwnProperty(n)?null!=t[n]&&(this.options[n]=t[n]):t.options||(this.linterOptions[n]=t[n]) 43this.timeout=null,this.hasGutter=r,this.onMouseOver=function(t){w(e,t)},this.waitingFor=0}var s={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null} 44function c(e){var r=e.state.lint 45r.hasGutter&&e.clearGutter(t),r.options.highlightLines&&u(e) 46for(var n=0;n<r.marked.length;++n)r.marked[n].clear() 47r.marked.length=0}function u(e){e.eachLine((function(t){var r=t.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(t.wrapClass) 48r&&e.removeLineClass(t,"wrap",r[0])}))}function d(t,r,n,i,o){var l=document.createElement("div"),s=l 49return l.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+n,i&&((s=l.appendChild(document.createElement("div"))).className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),0!=o&&e.on(s,"mouseover",(function(e){a(t,e,r,s)})),l}function f(e,t){return"error"==e?e:t}function h(e){for(var t=[],r=0;r<e.length;++r){var n=e[r],i=n.from.line;(t[i]||(t[i]=[])).push(n)}return t}function p(e){var t=e.severity 50t||(t="error") 51var r=document.createElement("div") 52return r.className="CodeMirror-lint-message CodeMirror-lint-message-"+t,void 0!==e.messageHTML?r.innerHTML=e.messageHTML:r.appendChild(document.createTextNode(e.message)),r}function g(t,r){var n=t.state.lint,i=++n.waitingFor 53function o(){i=-1,t.off("change",o)}t.on("change",o),r(t.getValue(),(function(r,a){t.off("change",o),n.waitingFor==i&&(a&&r instanceof e&&(r=a),t.operation((function(){v(t,r)})))}),n.linterOptions,t)}function m(t){var r=t.state.lint 54if(r){var n=r.options,i=n.getAnnotations||t.getHelper(e.Pos(0,0),"lint") 55if(i)if(n.async||i.async)g(t,i) 56else{var o=i(t.getValue(),r.linterOptions,t) 57if(!o)return 58o.then?o.then((function(e){t.operation((function(){v(t,e)}))}
58)):t.operation((function(){v(t,o)}))}}}function v(e,n){var i=e.state.lint 59if(i){var o=i.options 60c(e) 61for(var a=h(n),l=0;l<a.length;++l){var s=a[l] 62if(s){for(var u=null,g=i.hasGutter&&document.createDocumentFragment(),m=0;m<s.length;++m){var v=s[m],y=v.severity 63y||(y="error"),u=f(u,y),o.formatAnnotation&&(v=o.formatAnnotation(v)),i.hasGutter&&g.appendChild(p(v)),v.to&&i.marked.push(e.markText(v.from,v.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+y,__annotation:v}))}i.hasGutter&&e.setGutterMarker(l,t,d(e,g,u,s.length>1,o.tooltips)),o.highlightLines&&e.addLineClass(l,"wrap",r+u)}}o.onUpdateLinting&&o.onUpdateLinting(n,a,e)}}function y(e){var t=e.state.lint 64t&&(clearTimeout(t.timeout),t.timeout=setTimeout((function(){m(e)}),t.options.delay))}function b(e,t,r){for(var n=r.target||r.srcElement,i=document.createDocumentFragment(),o=0;o<t.length;o++){var l=t[o] 65i.appendChild(p(l))}a(e,r,i,n)}function w(e,t){var r=t.target||t.srcElement 66if(/\bCodeMirror-lint-mark-/.test(r.className)){for(var n=r.getBoundingClientRect(),i=(n.left+n.right)/2,o=(n.top+n.bottom)/2,a=e.findMarksAt(e.coordsChar({left:i,top:o},"client")),l=[],s=0;s<a.length;++s){var c=a[s].__annotation 67c&&l.push(c)}l.length&&b(e,l,t)}}e.defineOption("lint",!1,(function(r,n,i){if(i&&i!=e.Init&&(c(r),!1!==r.state.lint.options.lintOnChange&&r.off("change",y),e.off(r.getWrapperElement(),"mouseover",r.state.lint.onMouseOver),clearTimeout(r.state.lint.timeout),delete r.state.lint),n){for(var o=r.getOption("gutters"),a=!1,s=0;s<o.length;++s)o[s]==t&&(a=!0) 68var u=r.state.lint=new l(r,n,a) 69u.options.lintOnChange&&r.on("change",y),0!=u.options.tooltips&&"gutter"!=u.options.tooltips&&e.on(r.getWrapperElement(),"mouseover",u.onMouseOver),m(r)}})),e.defineExtension("performLint",(function(){m(this)}))}(r(57226))},57226:function(e){ 70// CodeMirror, copyright (c) by Marijn Haverbeke and others 71// Distributed under an MIT license: https://codemirror.net/5/LICENSE 72e.exports=function(){"use strict" 73var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=n||i||o,l=a&&(n?document.documentMode||6:+(o||i)[1]),s=!o&&/WebKit\//.test(e),c=s&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\/(\d+)/.exec(e),d=u&&+u[1],f=/Opera\//.test(e),h=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),g=/PhantomJS/.test(e),m=h&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),y=m||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=m||/Mac/.test(t),w=/\bCrOS\b/.test(e),x=/win/i.test(t),k=f&&e.match(/Version\/(\d*\.\d*)/) 74k&&(k=Number(k[1])),k&&k>=15&&(f=!1,s=!0) 75var C=b&&(c||f&&(null==k||k<12.11)),S=r||a&&l>=9 76function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var M,T=function(e,t){var r=e.className,n=L(t).exec(r) 77if(n){var i=r.slice(n.index+n[0].length) 78e.className=r.slice(0,n.index)+(i?n[1]+i:"")}} 79function O(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild) 80return e}function N(e,t){return O(e).appendChild(t)}function A(e,t,r,n){var i=document.createElement(e) 81if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t)) 82else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]) 83return i}function P(e,t,r,n){var i=A(e,t,r,n) 84return i.setAttribute("role","presentation"),i}function z(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t) 85do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function D(e){var t,r=e.ownerDocument||e 86try{t=e.activeElement}catch(e){t=r.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement 87return t}function E(e,t){var r=e.className 88L(t).test(r)||(e.className+=(r?" ":"")+t)}function W(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!L(r[n]).test(t)&&(t+=" "+r[n]) 89return t}M=document.createRange?function(e,t,r,n){var i=document.createRange() 90return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange() 91try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n} 92var H=function(e){e.select()} 93function F(e){return e.display.wrapper.ownerDocument}function I(e){return j(e.display.wrapper)}function j(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function R(e){return F(e).defaultView}
93function _(e){var t=Array.prototype.slice.call(arguments,1) 94return function(){return e.apply(null,t)}}function B(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]) 95return t}function $(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length) 96for(var o=n||0,a=i||0;;){var l=e.indexOf("\t",o) 97if(l<0||l>=t)return a+(t-o) 98a+=l-o,a+=r-a%r,o=l+1}}m?H=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(H=function(e){try{e.select()}catch(e){}}) 99var q=function(){this.id=null,this.f=null,this.time=0,this.handler=_(this.onTimeout,this)} 100function U(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r 101return-1}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 102var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)} 103var V=50,G={toString:function(){return"CodeMirror.Pass"}},K={scroll:!1},X={origin:"*mouse"},Y={origin:"+move"} 104function Z(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length) 105var a=o-n 106if(o==e.length||i+a>=t)return n+Math.min(a,t-i) 107if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var Q=[""] 108function J(e){for(;Q.length<=e;)Q.push(ee(Q)+" ") 109return Q[e]}function ee(e){return e[e.length-1]}function te(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n) 110return r}function re(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++ 111e.splice(n,0,t)}function ne(){}function ie(e,t){var r 112return Object.create?r=Object.create(e):(ne.prototype=e,r=new ne),t&&B(t,r),r}var oe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/ 113function ae(e){return/\w/.test(e)||e>"Â"&&(e.toUpperCase()!=e.toLowerCase()||oe.test(e))}function le(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ae(e))||t.test(e):ae(e)}function se(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1 114return!0}var ce=/[\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]/ 115function ue(e){return e.charCodeAt(0)>=768&&ce.test(e)}function de(e,t,r){for(;(r<0?t>0:t<e.length)&&ue(e.charAt(t));)t+=r 116return t}function fe(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t 117var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i) 118if(o==t)return e(o)?t:r 119e(o)?r=o:t=o+n}}function he(e,t,r,n){if(!e)return n(t,r,"ltr",0) 120for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}var pe=null 121function ge(e,t,r){var n 122pe=null 123for(var i=0;i<e.length;++i){var o=e[i] 124if(o.from<t&&o.to>t)return i 125o.to==t&&(o.from!=o.to&&"before"==r?n=i:pe=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:pe=i)}return null!=n?n:pe}var me=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111" 126function r(r){return r<=247?e.charAt(r):1424<=r&&r<=1524?"R":1536<=r&&r<=1785?t.charAt(r-1536):1774<=r&&r<=2220?"r":8192<=r&&r<=8203?"w":8204==r?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,l=/[1n]/ 127function s(e,t,r){this.level=e,this.from=t,this.to=r}return function(e,t){var c="ltr"==t?"L":"R" 128if(0==e.length||"ltr"==t&&!n.test(e))return!1 129for(var u=e.length,d=[],f=0;f<u;
129++f)d.push(r(e.charCodeAt(f))) 130for(var h=0,p=c;h<u;++h){var g=d[h] 131"m"==g?d[h]=p:p=g}for(var m=0,v=c;m<u;++m){var y=d[m] 132"1"==y&&"r"==v?d[m]="n":o.test(y)&&(v=y,"r"==y&&(d[m]="R"))}for(var b=1,w=d[0];b<u-1;++b){var x=d[b] 133"+"==x&&"1"==w&&"1"==d[b+1]?d[b]="1":","!=x||w!=d[b+1]||"1"!=w&&"n"!=w||(d[b]=w),w=x}for(var k=0;k<u;++k){var C=d[k] 134if(","==C)d[k]="N" 135else if("%"==C){var S=void 0 136for(S=k+1;S<u&&"%"==d[S];++S);for(var L=k&&"!"==d[k-1]||S<u&&"1"==d[S]?"1":"N",M=k;M<S;++M)d[M]=L 137k=S-1}}for(var T=0,O=c;T<u;++T){var N=d[T] 138"L"==O&&"1"==N?d[T]="L":o.test(N)&&(O=N)}for(var A=0;A<u;++A)if(i.test(d[A])){var P=void 0 139for(P=A+1;P<u&&i.test(d[P]);++P);for(var z="L"==(A?d[A-1]:c),D=z==("L"==(P<u?d[P]:c))?z?"L":"R":c,E=A;E<P;++E)d[E]=D 140A=P-1}for(var W,H=[],F=0;F<u;)if(a.test(d[F])){var I=F 141for(++F;F<u&&a.test(d[F]);++F);H.push(new s(0,I,F))}else{var j=F,R=H.length,_="rtl"==t?1:0 142for(++F;F<u&&"L"!=d[F];++F);for(var B=j;B<F;)if(l.test(d[B])){j<B&&(H.splice(R,0,new s(1,j,B)),R+=_) 143var $=B 144for(++B;B<F&&l.test(d[B]);++B);H.splice(R,0,new s(2,$,B)),R+=_,j=B}else++B 145j<F&&H.splice(R,0,new s(1,j,F))}return"ltr"==t&&(1==H[0].level&&(W=e.match(/^\s+/))&&(H[0].from=W[0].length,H.unshift(new s(0,0,W[0].length))),1==ee(H).level&&(W=e.match(/\s+$/))&&(ee(H).to-=W[0].length,H.push(new s(0,u-W[0].length,u)))),"rtl"==t?H.reverse():H}}() 146function ve(e,t){var r=e.order 147return null==r&&(r=e.order=me(e.text,t)),r}var ye=[],be=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1) 148else if(e.attachEvent)e.attachEvent("on"+t,r) 149else{var n=e._handlers||(e._handlers={}) 150n[t]=(n[t]||ye).concat(r)}} 151function we(e,t){return e._handlers&&e._handlers[t]||ye}function xe(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1) 152else if(e.detachEvent)e.detachEvent("on"+t,r) 153else{var n=e._handlers,i=n&&n[t] 154if(i){var o=U(i,r) 155o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ke(e,t){var r=we(e,t) 156if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function Ce(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ke(e,r||t.type,e,t),Ne(t)||t.codemirrorIgnore}function Se(e){var t=e._handlers&&e._handlers.cursorActivity 157if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==U(r,t[n])&&r.push(t[n])}function Le(e,t){return we(e,t).length>0}function Me(e){e.prototype.on=function(e,t){be(this,e,t)},e.prototype.off=function(e,t){xe(this,e,t)}}function Te(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Oe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ne(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ae(e){Te(e),Oe(e)}function Pe(e){return e.target||e.srcElement}function ze(e){var t=e.which 158return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var De,Ee,We=function(){if(a&&l<9)return!1 159var e=A("div") 160return"draggable"in e||"dragDrop"in e}() 161function He(e){if(null==De){var t=A("span","â") 162N(e,A("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(De=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&l<8))}var r=De?A("span","â"):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px") 163return r.setAttribute("cm-text",""),r}function Fe(e){if(null!=Ee)return Ee 164var t=N(e,document.createTextNode("AØ®A")),r=M(t,0,1).getBoundingClientRect(),n=M(t,1,2).getBoundingClientRect() 165return O(e),!(!r||r.left==r.right)&&(Ee=n.right-r.right<3)}var Ie,je=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length) 166var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Re=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t 167try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},_e="oncopy"in(Ie=A("div"))||(Ie.setAttribute("oncopy","return;"),"function"==typeof Ie.oncopy),Be=null 168function $e(e){if(null!=Be)return Be 169var t=N(e,A("span","x")),r=t.getBoundingClientRect(),n=M(t,0,1).getBoundingClientRect() 170return Be=Math.abs(r.left-n.left)>1}var qe={},Ue={} 171function Ve(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),qe[e]=t}function Ge(e,t){Ue[e]=t}function Ke(e){if("string"==typeof e&&Ue.hasOwnProperty(e))e=Ue[e] 172else if(e&&"string"==typeof e.name&&Ue.hasOwnProperty(e.name)){var t=Ue[e.name] 173"string"==typeof t&&(t={name:t}),(e=ie(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ke("application/xml") 174if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ke("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Xe(e,t){t=Ke(t) 175var r=qe[t.name] 176if(!r)return Xe(e,"text/plain") 177var n=r(e,t) 178if(Ye.hasOwnProperty(t.name)){var i=Ye[t.name] 179for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a] 180return n}var Ye={} 181function Ze(e,t){B(t,Ye.hasOwnProperty(e)?Ye[e]:Ye[e]={})}function Qe(e,t){if(!0===t)return t 182if(e.copyState)return e.copyState(t) 183var r={} 184for(var n in t){var i=t[n] 185i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Je(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode 186return r||{mode:e,state:t}}function et(e,t,r){return!e.startState||e.startState(t,r)}var tt=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r} 187function rt(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.") 188for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize() 189if(t<o){r=i 190break}t-=o}return r.lines[t]}function nt(e,t,r){var n=[],i=t.line 191return e.iter(t.line,r.line+1,(function(e){var o=e.text
192i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i})),n}function it(e,t,r){var n=[] 193return e.iter(t,r,(function(e){n.push(e.text)})),n}function ot(e,t){var r=t-e.height 194if(r)for(var n=e;n;n=n.parent)n.height+=r}function at(e){if(null==e.parent)return null 195for(var t=e.parent,r=U(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize() 196return r+t.first}function lt(e,t){var r=e.first 197e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height 198if(t<o){e=i 199continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines) 200for(var a=0;a<e.lines.length;++a){var l=e.lines[a].height 201if(t<l)break 202t-=l}return r+a}function st(e,t){return t>=e.first&&t<e.first+e.size}function ct(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ut(e,t,r){if(void 0===r&&(r=null),!(this instanceof ut))return new ut(e,t,r) 203this.line=e,this.ch=t,this.sticky=r}function dt(e,t){return e.line-t.line||e.ch-t.ch}function ft(e,t){return e.sticky==t.sticky&&0==dt(e,t)}function ht(e){return ut(e.line,e.ch)}function pt(e,t){return dt(e,t)<0?t:e}function gt(e,t){return dt(e,t)<0?e:t}function mt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function vt(e,t){if(t.line<e.first)return ut(e.first,0) 204var r=e.first+e.size-1 205return t.line>r?ut(r,rt(e,r).text.length):yt(t,rt(e,t.line).text.length)}function yt(e,t){var r=e.ch 206return null==r||r>t?ut(e.line,t):r<0?ut(e.line,0):e}function bt(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=vt(e,t[n]) 207return r}tt.prototype.eol=function(){return this.pos>=this.string.length},tt.prototype.sol=function(){return this.pos==this.lineStart},tt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},tt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},tt.prototype.eat=function(e){var t=this.string.charAt(this.pos) 208if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},tt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},tt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos 209return this.pos>e},tt.prototype.skipToEnd=function(){this.pos=this.string.length},tt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos) 210if(t>-1)return this.pos=t,!0},tt.prototype.backUp=function(e){this.pos-=e},tt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=$(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?$(this.string,this.lineStart,this.tabSize):0)},tt.prototype.indentation=function(){return $(this.string,null,this.tabSize)-(this.lineStart?$(this.string,this.lineStart,this.tabSize):0)},tt.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e) 211return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e} 212if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},tt.prototype.current=function(){return this.string.slice(this.start,this.pos)},tt.prototype.hideFirstChars=function(e,t){this.lineStart+=e 213try{return t()}finally{this.lineStart-=e}},tt.prototype.lookAhead=function(e){var t=this.lineOracle 214return t&&t.lookAhead(e)},tt.prototype.baseToken=function(){var e=this.lineOracle 215return e&&e.baseToken(this.pos)} 216var wt=function(e,t){this.state=e,this.lookAhead=t},xt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1} 217function kt(e,t,r,n){var i=[e.state.modeGen],o={} 218Pt(e,t.text,e.doc.mode,r,(function(e,t){return i.push(e,t)}),o,n) 219for(var a=r.state,l=function(n){r.baseTokens=i 220var l=e.state.overlays[n],s=1,c=0 221r.state=!0,Pt(e,t.text,l.mode,r,(function(e,t){for(var r=s;c<e;){var n=i[s] 222n>e&&i.splice(s,1,e,i[s+1],n),s+=2,c=Math.min(e,n)}if(t)if(l.opaque)i.splice(r,s-r,e,"overlay "+t),s=r+2 223else for(;r<s;r+=2){var o=i[r+1] 224i[r+1]=(o?o+" ":"")+"overlay "+t}}),o),r.state=a,r.baseTokens=null,r.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s) 225return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Ct(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=St(e,at(t)),i=t.text.length>e.options.maxHighlightLength&&Qe(e.doc.mode,n.state),o=kt(e,t,n) 226i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function St(e,t,r){var n=e.doc,i=e.display 227if(!n.mode.startState)return new xt(n,!0,t) 228var o=zt(e,t,r),a=o>n.first&&rt(n,o-1).stateAfter,l=a?xt.fromSaved(n,a,o):new xt(n,et(n.mode),o) 229return n.iter(o,t,(function(r){Lt(e,r.text,l) 230var n=l.line 231r.stateAfter=n==t-1||n%5==0||n>
231=i.viewFrom&&n<i.viewTo?l.save():null,l.nextLine()})),r&&(n.modeFrontier=l.line),l}function Lt(e,t,r,n){var i=e.doc.mode,o=new tt(t,e.options.tabSize,r) 232for(o.start=o.pos=n||0,""==t&&Mt(i,r.state);!o.eol();)Tt(i,o,r.state),o.start=o.pos}function Mt(e,t){if(e.blankLine)return e.blankLine(t) 233if(e.innerMode){var r=Je(e,t) 234return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function Tt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Je(e,r).mode) 235var o=e.token(t,r) 236if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}xt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e) 237return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},xt.prototype.baseToken=function(e){if(!this.baseTokens)return null 238for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2 239var t=this.baseTokens[this.baseTokenPos+1] 240return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},xt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},xt.fromSaved=function(e,t,r){return t instanceof wt?new xt(e,Qe(e.mode,t.state),r,t.lookAhead):new xt(e,Qe(e.mode,t),r)},xt.prototype.save=function(e){var t=!1!==e?Qe(this.doc.mode,this.state):this.state 241return this.maxLookAhead>0?new wt(t,this.maxLookAhead):t} 242var Ot=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r} 243function Nt(e,t,r,n){var i,o,a=e.doc,l=a.mode,s=rt(a,(t=vt(a,t)).line),c=St(e,t.line,r),u=new tt(s.text,e.options.tabSize,c) 244for(n&&(o=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=Tt(l,u,c.state),n&&o.push(new Ot(u,i,Qe(a.mode,c.state))) 245return n?o:new Ot(u,i,c.state)}function At(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/) 246if(!r)break 247e=e.slice(0,r.index)+e.slice(r.index+r[0].length) 248var n=r[1]?"bgClass":"textClass" 249null==t[n]?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function Pt(e,t,r,n,i,o,a){var l=r.flattenSpans 250null==l&&(l=e.options.flattenSpans) 251var s,c=0,u=null,d=new tt(t,e.options.tabSize,n),f=e.options.addModeClass&&[null] 252for(""==t&&At(Mt(r,n.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&Lt(e,t,n,d.pos),d.pos=t.length,s=null):s=At(Tt(r,d,n.state,f),o),f){var h=f[0].name 253h&&(s="m-"+(s?h+" "+s:h))}if(!l||u!=s){for(;c<d.start;)i(c=Math.min(d.start,c+5e3),u) 254u=s}d.start=d.pos}for(;c<d.pos;){var p=Math.min(d.pos,c+5e3) 255i(p,u),c=p}}function zt(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first 256var s=rt(o,l-1),c=s.stateAfter 257if(c&&(!r||l+(c instanceof wt?c.lookAhead:0)<=o.modeFrontier))return l 258var u=$(s.text,null,e.options.tabSize);(null==i||n>u)&&(i=l-1,n=u)}return i}function Dt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=rt(e,n).stateAfter 259if(i&&(!(i instanceof wt)||n+i.lookAhead<t)){r=n+1 260break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}var Et=!1,Wt=!1 261function Ht(){Et=!0}function Ft(){Wt=!0}function It(e,t,r){this.marker=e,this.from=t,this.to=r}function jt(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r] 262if(n.marker==t)return n}}function Rt(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]) 263return r}function _t(e,t,r){var n=r&&window.WeakSet&&(r.markedSpans||(r.markedSpans=new WeakSet)) 264n&&e.markedSpans&&n.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],n&&n.add(e.markedSpans)),t.marker.attachLine(e)}function Bt(e,t,r){var n 265if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker 266if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!r||!o.marker.insertLeft)){var l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new It(a,o.from,l?null:o.to))}}return n}function $t(e,t,r){var n 267if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker 268if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new It(a,l?null:o.from-t,null==o.to?null:o.to-t))}}return n}function qt(e,t){if(t.full)return null 269var r=st(e,t.from.line)&&rt(e,t.from.line).markedSpans,n=st(e,t.to.line)&&rt(e,t.to.line).markedSpans 270if(!r&&!n)return null 271var i=t.from.ch,o=t.to.ch,a=0==dt(t.from,t.to),l=Bt(r,i,a),s=$t(n,o,a),c=1==t.text.length,u=ee(t.text).length+(c?i:0) 272if(l)for(var d=0;d<l.length;++d){var f=l[d] 273if(null==f.to){var h=jt(s,f.marker) 274h?c&&(f.to=null==h.to?null:h.to+u):f.to=i}}if(s)for(var p=0;p<s.length;++p){var g=s[p] 275null!=g.to&&(g.to+=u),null==g.from?jt(l,g.marker)||(g.from=u,c&&(l||(l=[])).push(g)):(g.from+=u,c&&(l||(l=[])).push(g))}l&&(l=Ut(l)),s&&s!=l&&(s=Ut(s)) 276var m=[l] 277if(!c){var v,y=t.text.length-2 278if(y>0&&l)for(var b=0;b<l.length;++b)null==l[b].to&&(v||(v=[])).push(new It(l[b].marker,null,null)) 279for(var w=0;w<y;++w)m.push(v) 280m.push(s)}return m}function Ut(e){for(var t=0;t<e.length;++t){var r=e[t] 281null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Vt(e,t,r){var n=null 282if(e.iter(t.line,r.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker 283!r.readOnly||n&&-1!=U(n,r)||(n||(n=[])).push(r)}})),!n)return null 284for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[o],l=a.find(0),s=0;s<i.length;++s){var c=i[s] 285if(!(dt(c.to,l.from)<0||dt(c.from,l.to)>0)){var u=[s,1],d=dt(c.from,l.from),f=dt(c.to,l.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:l.from}),(f>0||!a.inclusiveRight&&!f)&&u.push({from:l.to,to:c.to}),i.splice.apply(i,u),s+=u.length-3}}return i}function Gt(e){var t=e.markedSpans 286if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e) 287e.markedSpans=null}}function Kt(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e) 288e.markedSpans=t}}function Xt(e){return e.inclusiveLeft?-1:0}function Yt(e){return e.inclusiveRight?1:0}function Zt(e,t){var r=e.lines.length-t.lines.length 289if(0!=r)return r 290var n=e.find(),i=t.find(),o=dt(n.from,i.from)||Xt(e)-Xt(t) 291if(o)return-o 292var a=dt(n.to,i.to)||Yt(e)-Yt(t) 293return a||t.id-e.id}function Qt(e,t){var r,n=Wt&&e.markedSpans 294if(n)for(var i=void 0,o=0;o<n.length;++o)(i=n[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!r||Zt(r,i.marker)<0)&&(r=i.marker) 295return r}function Jt(e){return Qt(e,!0)}function er(e){return Qt(e,!1)}function tr(e,t){var r,n=Wt&&e.markedSpans 296if(n)for(var i=0;i<n.length;++i){var o=n[i] 297o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!r||Zt(r,o.marker)<0)&&(r=o.marker)}return r}function rr(e,t,r,n,i){var o=rt(e,t),a=Wt&&o.markedSpans 298if(a)for(var l=0;l<a.length;++l){var s=a[l] 299if(s.marker.collapsed){var c=s.marker.find(0),u=dt(c.from,r)||Xt(s.marker)-Xt(i),d=dt(c.to,n)||Yt(s.marker)-Yt(i) 300if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?dt(c.to,r)>=0:dt(c.to,r)>0)||u>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?dt(c.from,n)<=0:dt(c.from,n)<0)))return!0}}}function nr(e){for(var t;t=Jt(e);)e=t.find(-1,!0).line 301return e}function ir(e){for(var t;t=er(e);)e=t.find(1,!0).line 302return e}function or(e){for(var t,r;t=er(e);)e=t.find(1,!0).line,(r||(r=[])).push(e) 303return r}function ar(e,t){var r=rt(e,t),n=nr(r) 304return r==n?t:at(n)}function lr(e,t){if(t>
304e.lastLine())return t 305var r,n=rt(e,t) 306if(!sr(e,n))return t 307for(;r=er(n);)n=r.find(1,!0).line 308return at(n)+1}function sr(e,t){var r=Wt&&t.markedSpans 309if(r)for(var n=void 0,i=0;i<r.length;++i)if((n=r[i]).marker.collapsed){if(null==n.from)return!0 310if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&cr(e,t,n))return!0}}function cr(e,t,r){if(null==r.to){var n=r.marker.find(1,!0) 311return cr(e,n.line,jt(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0 312for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&cr(e,t,i))return!0}function ur(e){for(var t=0,r=(e=nr(e)).parent,n=0;n<r.lines.length;++n){var i=r.lines[n] 313if(i==e)break 314t+=i.height}for(var o=r.parent;o;o=(r=o).parent)for(var a=0;a<o.children.length;++a){var l=o.children[a] 315if(l==r)break 316t+=l.height}return t}function dr(e){if(0==e.height)return 0 317for(var t,r=e.text.length,n=e;t=Jt(n);){var i=t.find(0,!0) 318n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=er(n);){var o=t.find(0,!0) 319r-=n.text.length-o.from.ch,r+=(n=o.to.line).text.length-o.to.ch}return r}function fr(e){var t=e.display,r=e.doc 320t.maxLine=rt(r,r.first),t.maxLineLength=dr(t.maxLine),t.maxLineChanged=!0,r.iter((function(e){var r=dr(e) 321r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)}))}var hr=function(e,t,r){this.text=e,Kt(this,t),this.height=r?r(this):1}
321 322function pr(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Gt(e),Kt(e,r) 323var i=n?n(e):1 324i!=e.height&&ot(e,i)}function gr(e){e.parent=null,Gt(e)}hr.prototype.lineNo=function(){return at(this)},Me(hr) 325var mr={},vr={} 326function yr(e,t){if(!e||/^\s*$/.test(e))return null 327var r=t.addModeClass?vr:mr 328return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function br(e,t){var r=P("span",null,null,s?"padding-right: .1px":null),n={pre:P("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")} 329t.measure={} 330for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0 331n.pos=0,n.addToken=xr,Fe(e.display.measure)&&(a=ve(o,e.doc.direction))&&(n.addToken=Cr(n.addToken,a)),n.map=[],Lr(o,n,Ct(e,o,t!=e.display.externalMeasured&&at(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=W(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=W(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(He(e.display.measure))),0==i?(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 l=n.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return ke(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=W(n.pre.className,n.textClass||"")),n}function wr(e){var t=A("span","â¢","cm-invalidchar") 332return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function xr(e,t,r,n,i,o,s){if(t){var c,u=e.splitSpaces?kr(t,e.trailingSpace):t,d=e.cm.state.specialChars,f=!1 333if(d.test(t)){c=document.createDocumentFragment() 334for(var h=0;;){d.lastIndex=h 335var p=d.exec(t),g=p?p.index-h:t.length-h 336if(g){var m=document.createTextNode(u.slice(h,h+g)) 337a&&l<9?c.appendChild(A("span",[m])):c.appendChild(m),e.map.push(e.pos,e.pos+g,m),e.col+=g,e.pos+=g}if(!p)break 338h+=g+1 339var v=void 0 340if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(v=c.appendChild(A("span",J(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?((v=c.appendChild(A("span","\r"==p[0]?"â":"â¤","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),a&&l<9?c.appendChild(A("span",[v])):c.appendChild(v),e.col+=1) 341e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&l<9&&(f=!0),e.pos+=t.length 342if(e.trailingSpace=32==u.charCodeAt(t.length-1),r||n||i||f||o||s){var w=r||"" 343n&&(w+=n),i&&(w+=i) 344var x=A("span",[c],w,o) 345if(s)for(var k in s)s.hasOwnProperty(k)&&"style"!=k&&"class"!=k&&x.setAttribute(k,s[k]) 346return e.content.appendChild(x)}e.content.appendChild(c)}}function kr(e,t){if(e.length>1&&!/ /.test(e))return e 347for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i) 348" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}function Cr(e,t){return function(r,n,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border" 349for(var c=r.pos,u=c+n.length;;){for(var d=void 0,f=0;f<t.length&&!((d=t[f]).to>c&&d.from<=c);f++);if(d.to>=u)return e(r,n,i,o,a,l,s) 350e(r,n.slice(0,d.to-c),i,o,null,l,s),o=null,n=n.slice(d.to-c),c=d.to}}}function Sr(e,t,r,n){var i=!n&&r.widgetNode 351i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Lr(e,t,r){var n=e.markedSpans,i=e.text,o=0 352if(n)for(var a,l,s,c,u,d,f,h=i.length,p=0,g=1,m="",v=0;;){if(v==p){s=c=u=l="",f=null,d=null,v=1/0 353for(var y=[],b=void 0,w=0;w<n.length;++w){var x=n[w],k=x.marker 354if("bookmark"==k.type&&x.from==p&&k.widgetNode)y.push(k) 355else if(x.from<=p&&(null==x.to||x.to>p||k.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,c=""),k.className&&(s+=" "+k.className),k.css&&(l=(l?l+";":"")+k.css),k.startStyle&&x.from==p&&(u+=" "+k.startStyle),k.endStyle&&x.to==v&&(b||(b=[])).push(k.endStyle,x.to),k.title&&((f||(f={})).title=k.title),k.attributes)for(var C in k.attributes)(f||(f={}))[C]=k.attributes[C] 356k.collapsed&&(!d||Zt(d.marker,k)<0)&&(d=x)}else x.from>p&&v>x.from&&(v=x.from)}if(b)for(var S=0;S<b.length;S+=2)b[S+1]==v&&(c+=" "+b[S]) 357if(!d||d.from==p)for(var L=0;L<y.length;++L)Sr(t,0,y[L]) 358if(d&&(d.from||0)==p){if(Sr(t,(null==d.to?h+1:d.to)-p,d.marker,null==d.from),null==d.to)return 359d.to==p&&(d=!1)}}if(p>=h)break 360for(var M=Math.min(h,v);;){if(m){var T=p+m.length 361if(!d){var O=T>M?m.slice(0,M-p):m 362t.addToken(t,O,a?a+s:s,u,p+O.length==v?c:"",l,f)}if(T>=M){m=m.slice(M-p),p=M 363break}p=T,u=""}m=i.slice(o,o=r[g++]),a=yr(r[g++],t.cm.options)}}else for(var N=1;N<r.length;N+=2)t.addToken(t,i.slice(o,o=r[N]),yr(r[N+1],t.cm.options))}function Mr(e,t,r){this.line=t,this.rest=or(t),this.size=this.rest?at(ee(this.rest))-r+1:1,this.node=this.text=null,this.hidden=sr(e,t)}function Tr(e,t,r){for(var n,i=[],o=t;o<r;o=n){var a=new Mr(e.doc,rt(e.doc,o),o) 364n=o+a.size,i.push(a)}return i}var Or=null 365function Nr(e){Or?Or.ops.push(e):e.ownsGroup=Or={ops:[e],delayedCallbacks:[]}}function Ar(e){var t=e.delayedCallbacks,r=0 366do{for(;r<t.length;r++)t[r].call(null) 367for(var n=0;n<e.ops.length;n++){var i=e.ops[n] 368if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function Pr(e,t){var r=e.ownsGroup 369if(r)try{Ar(r)}finally{Or=null,t(r)}}var zr=null 370function Dr(e,t){var r=we(e,t) 371if(r.length){var n,i=Array.prototype.slice.call(arguments,2) 372Or?n=Or.delayedCallbacks:zr?n=zr:(n=zr=[],setTimeout(Er,0)) 373for(var o=function(e){n.push((function(){return r[e].apply(null,i)}))},a=0;a<r.length;++a)o(a)}}function Er(){var e=zr 374zr=null 375for(var t=0;t<e.length;++t)e[t]()}function Wr(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i] 376"text"==o?jr(e,t):"gutter"==o?_r(e,t,r,n):"class"==o?Rr(e,t):"widget"==o&&Br(e,t,n)}t.changes=null}
376function Hr(e){return e.node==e.text&&(e.node=A("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&l<8&&(e.node.style.zIndex=2)),e.node}function Fr(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass 377if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null) 378else if(r){var n=Hr(t) 379t.background=n.insertBefore(A("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Ir(e,t){var r=e.display.externalMeasured 380return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):br(e,t)}function jr(e,t){var r=t.text.className,n=Ir(e,t) 381t.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,Rr(e,t)):r&&(t.text.className=r)}function Rr(e,t){Fr(e,t),t.line.wrapClass?Hr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="") 382var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass 383t.text.className=r||""}function _r(e,t,r,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 i=Hr(t) 384t.gutterBackground=A("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),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers 385if(e.options.lineNumbers||o){var a=Hr(t),l=t.gutter=A("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px") 386if(l.setAttribute("aria-hidden","true"),e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(A("div",ct(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var c=e.display.gutterSpecs[s].className,u=o.hasOwnProperty(c)&&o[c] 387u&&l.appendChild(A("div",[u],"CodeMirror-gutter-elt","left: "+n.gutterLeft[c]+"px; width: "+n.gutterWidth[c]+"px"))}}}function Br(e,t,r){t.alignable&&(t.alignable=null) 388for(var n=L("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,n.test(i.className)&&t.node.removeChild(i) 389qr(e,t,r)}function $r(e,t,r,n){var i=Ir(e,t) 390return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Rr(e,t),_r(e,t,r,n),qr(e,t,n),t.node}function qr(e,t,r){if(Ur(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Ur(e,t.rest[n],t,r,!1)}function Ur(e,t,r,n,i){if(t.widgets)for(var o=Hr(r),a=0,l=t.widgets;a<l.length;++a){var s=l[a],c=A("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:"")) 391s.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Vr(s,c,r,n),e.display.input.setUneditable(c),i&&s.above?o.insertBefore(c,r.gutter||r.text):o.appendChild(c),Dr(s,"redraw")}}function Vr(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t) 392var i=n.wrapperWidth 393t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Gr(e){if(null!=e.height)return e.height 394var t=e.doc.cm 395if(!t)return 0 396if(!z(document.body,e.node)){var r="position: relative;" 397e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),N(t.display.measure,A("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Kr(e,t){for(var r=Pe(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function Xr(e){return e.lineSpace.offsetTop}function Yr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}
397function Zr(e){if(e.cachedPaddingH)return e.cachedPaddingH 398var t=N(e.measure,A("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)} 399return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function Qr(e){return V-e.display.nativeBarWidth}function Jr(e){return e.display.scroller.clientWidth-Qr(e)-e.display.barWidth}function en(e){return e.display.scroller.clientHeight-Qr(e)-e.display.barHeight}function tn(e,t,r){var n=e.options.lineWrapping,i=n&&Jr(e) 400if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[] 401if(n){t.measure.width=i 402for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],c=a[l+1] 403Math.abs(s.bottom-c.bottom)>2&&o.push((s.bottom+c.top)/2-r.top)}}o.push(r.bottom-r.top)}}function rn(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache} 404if(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]} 405for(var i=0;i<e.rest.length;i++)if(at(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function nn(e,t){var r=at(t=nr(t)),n=e.display.externalMeasured=new Mr(e.doc,t,r) 406n.lineN=r 407var i=n.built=br(e,n) 408return n.text=i.pre,N(e.display.lineMeasure,i.pre),n}function on(e,t,r,n){return sn(e,ln(e,t),r,n)}function an(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[_n(e,t)] 409var r=e.display.externalMeasured 410return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function ln(e,t){var r=at(t),n=an(e,r) 411n&&!n.text?n=null:n&&n.changes&&(Wr(e,n,r,Hn(e)),e.curOp.forceUpdate=!0),n||(n=nn(e,t)) 412var i=rn(n,t,r) 413return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function sn(e,t,r,n,i){t.before&&(r=-1) 414var o,a=r+(n||"") 415return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(tn(e,t.view,t.rect),t.hasHeights=!0),(o=hn(e,t,r,n)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var cn,un={left:0,right:0,top:0,bottom:0} 416function dn(e,t,r){for(var n,i,o,a,l,s,c=0;c<e.length;c+=3)if(l=e[c],s=e[c+1],t<l?(i=0,o=1,a="left"):t<s?o=1+(i=t-l):(c==e.length-3||t==s&&e[c+3]>t)&&(i=(o=s-l)-1,t>=s&&(a="right")),null!=i){if(n=e[c+2],l==s&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)n=e[2+(c-=3)],a="left" 417if("right"==r&&i==s-l)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)n=e[(c+=3)+2],a="right" 418break}return{node:n,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function fn(e,t){var r=un 419if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function hn(e,t,r,n){var i,o=dn(t.map,r,n),s=o.node,c=o.start,u=o.end,d=o.collapse 420if(3==s.nodeType){for(var f=0;f<4;f++){for(;c&&ue(t.line.text.charAt(o.coverStart+c));)--c 421for(;o.coverStart+u<o.coverEnd&&ue(t.line.text.charAt(o.coverStart+u));)++u 422if((i=a&&l<9&&0==c&&u==o.coverEnd-o.coverStart?s.parentNode.getBoundingClientRect():fn(M(s,c,u).getClientRects(),n)).left||i.right||0==c)break 423u=c,c-=1,d="right"}a&&l<11&&(i=pn(e.display.measure,i))}else{var h 424c>0&&(d=n="right"),i=e.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==n?h.length-1:0]:s.getBoundingClientRect()}if(a&&l<9&&!c&&(!i||!i.left&&!i.right)){var p=s.parentNode.getClientRects()[0] 425i=p?{left:p.left,right:p.left+Wn(e.display),top:p.top,bottom:p.bottom}:un}for(var g=i.top-t.rect.top,m=i.bottom-t.rect.top,v=(g+m)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(v<y[b]);b++);var w=b?y[b-1]:0,x=y[b],k={left:("right"==d?i.right:i.left)-t.rect.left,right:("left"==d?i.left:i.right)-t.rect.left,top:w,bottom:x} 426return i.left||i.right||(k.bogus=!0),e.options.singleCursorHeightPerLine||(k.rto
426p=g,k.rbottom=m),k}function pn(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!$e(e))return t 427var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI 428return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function gn(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 mn(e){e.display.externalMeasure=null,O(e.display.lineMeasure) 429for(var t=0;t<e.display.view.length;t++)gn(e.display.view[t])}function vn(e){mn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function yn(e){return u&&v?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function bn(e){return u&&v?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function wn(e){var t=nr(e).widgets,r=0 430if(t)for(var n=0;n<t.length;++n)t[n].above&&(r+=Gr(t[n])) 431return r}function xn(e,t,r,n,i){if(!i){var o=wn(t) 432r.top+=o,r.bottom+=o}if("line"==n)return r 433n||(n="local") 434var a=ur(t) 435if("local"==n?a+=Xr(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var l=e.display.lineSpace.getBoundingClientRect() 436a+=l.top+("window"==n?0:bn(F(e))) 437var s=l.left+("window"==n?0:yn(F(e))) 438r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function kn(e,t,r){if("div"==r)return t 439var n=t.left,i=t.top 440if("page"==r)n-=yn(F(e)),i-=bn(F(e)) 441else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect() 442n+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect() 443return{left:n-a.left,top:i-a.top}}function Cn(e,t,r,n,i){return n||(n=rt(e.doc,t.line)),xn(e,n,on(e,n,t.ch,i),r)}function Sn(e,t,r,n,i,o){function a(t,a){var l=sn(e,i,t,a?"right":"left",o) 444return a?l.left=l.right:l.right=l.left,xn(e,n,l,r)}n=n||rt(e.doc,t.line),i||(i=ln(e,n)) 445var l=ve(n,e.doc.direction),s=t.ch,c=t.sticky 446if(s>=n.text.length?(s=n.text.length,c="before"):s<=0&&(s=0,c="after"),!l)return a("before"==c?s-1:s,"before"==c) 447function u(e,t,r){return a(r?e-1:e,1==l[t].level!=r)}var d=ge(l,s,c),f=pe,h=u(s,d,"before"==c) 448return null!=f&&(h.other=u(s,f,"before"!=c)),h}function Ln(e,t){var r=0 449t=vt(e.doc,t),e.options.lineWrapping||(r=Wn(e.display)*t.ch) 450var n=rt(e.doc,t.line),i=ur(n)+Xr(e.display) 451return{left:r,right:r,top:i,bottom:i+n.height}}function Mn(e,t,r,n,i){var o=ut(e,t,r) 452return o.xRel=i,n&&(o.outside=n),o}function Tn(e,t,r){var n=e.doc 453if((r+=e.display.viewOffset)<0)return Mn(n.first,0,null,-1,-1) 454var i=lt(n,r),o=n.first+n.size-1 455if(i>o)return Mn(n.first+n.size-1,rt(n,o).text.length,null,1,1) 456t<0&&(t=0) 457for(var a=rt(n,i);;){var l=Pn(e,a,i,t,r),s=tr(a,l.ch+(l.xRel>0||l.outside>0?1:0)) 458if(!s)return l 459var c=s.find(1) 460if(c.line==i)return c 461a=rt(n,i=c.line)}}function On(e,t,r,n){n-=wn(t) 462var i=t.text.length,o=fe((function(t){return sn(e,r,t-1).bottom<=n}),i,0) 463return{begin:o,end:i=fe((function(t){return sn(e,r,t).top>n}),o,i)}}function Nn(e,t,r,n){return r||(r=ln(e,t)),On(e,t,r,xn(e,t,sn(e,r,n),"line").top)}function An(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Pn(e,t,r,n,i){i-=ur(t) 464var o=ln(e,t),a=wn(t),l=0,s=t.text.length,c=!0,u=ve(t,e.doc.direction) 465if(u){var d=(e.options.lineWrapping?Dn:zn)(e,t,r,o,u,n,i) 466l=(c=1!=d.level)?d.from:d.to-1,s=c?d.to:d.from-1}var f,h,p=null,g=null,m=fe((function(t){var r=sn(e,o,t) 467return r.top+=a,r.bottom+=a,!!An(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)}),l,s),v=!1 468if(g){var y=n-g.left<g.right-n,b=y==c 469m=p+(b?0:1),h=b?"after":"before",f=y?g.left:g.right}else{c||m!=s&&m!=l||m++,h=0==m?"after":m==t.text.length?"before":sn(e,o,m-(c?1:0)).bottom+a<=i==c?"after":"before" 470var w=Sn(e,ut(r,m,h),"line",t,o) 471f=w.left,v=i<w.top?-1:i>=w.bottom?1:0}return Mn(r,m=de(t.text,m,1),h,v,n-f)}function zn(e,t,r,n,i,o,a){var l=fe((function(l){var s=i[l],c=1!=s.level 472return An(Sn(e,ut(r,c?s.to:s.from,c?"before":"after"),"line",t,n
472),o,a,!0)}),0,i.length-1),s=i[l] 473if(l>0){var c=1!=s.level,u=Sn(e,ut(r,c?s.from:s.to,c?"after":"before"),"line",t,n) 474An(u,o,a,!0)&&u.top>a&&(s=i[l-1])}return s}function Dn(e,t,r,n,i,o,a){var l=On(e,t,n,a),s=l.begin,c=l.end;/\s/.test(t.text.charAt(c-1))&&c-- 475for(var u=null,d=null,f=0;f<i.length;f++){var h=i[f] 476if(!(h.from>=c||h.to<=s)){var p=sn(e,n,1!=h.level?Math.min(c,h.to)-1:Math.max(s,h.from)).right,g=p<o?o-p+1e9:p-o;(!u||d>g)&&(u=h,d=g)}}return u||(u=i[i.length-1]),u.from<s&&(u={from:s,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function En(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight 477if(null==cn){cn=A("pre",null,"CodeMirror-line-like") 478for(var t=0;t<49;++t)cn.appendChild(document.createTextNode("x")),cn.appendChild(A("br")) 479cn.appendChild(document.createTextNode("x"))}N(e.measure,cn) 480var r=cn.offsetHeight/50 481return r>3&&(e.cachedTextHeight=r),O(e.measure),r||1}function Wn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth 482var t=A("span","xxxxxxxxxx"),r=A("pre",[t],"CodeMirror-line-like") 483N(e.measure,r) 484var n=t.getBoundingClientRect(),i=(n.right-n.left)/10 485return i>2&&(e.cachedCharWidth=i),i||10}function Hn(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className 486r[l]=o.offsetLeft+o.clientLeft+i,n[l]=o.clientWidth}return{fixedPos:Fn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Fn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function In(e){var t=En(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Wn(e.display)-3) 487return function(i){if(sr(e.doc,i))return 0 488var o=0 489if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height) 490return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function jn(e){var t=e.doc,r=In(e) 491t.iter((function(e){var t=r(e) 492t!=e.height&&ot(e,t)}))}function Rn(e,t,r,n){var i=e.display 493if(!r&&"true"==Pe(t).getAttribute("cm-not-content"))return null 494var o,a,l=i.lineSpace.getBoundingClientRect() 495try{o=t.clientX-l.left,a=t.clientY-l.top}catch(e){return null}var s,c=Tn(e,o,a) 496if(n&&c.xRel>0&&(s=rt(e.doc,c.line).text).length==c.ch){var u=$(s,s.length,e.options.tabSize)-s.length 497c=ut(c.line,Math.max(0,Math.round((o-Zr(e.display).left)/Wn(e.display))-u))}return c}function _n(e,t){if(t>=e.display.viewTo)return null 498if((t-=e.display.viewFrom)<0)return null 499for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function Bn(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0) 500var i=e.display 501if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Wt&&ar(e.doc,t)<i.viewTo&&qn(e) 502else if(r<=i.viewFrom)Wt&&lr(e.doc,r+n)>i.viewFrom?qn(e):(i.viewFrom+=n,i.viewTo+=n) 503else if(t<=i.viewFrom&&r>=i.viewTo)qn(e) 504else if(t<=i.viewFrom){var o=Un(e,r,r+n,1) 505o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):qn(e)}else if(r>=i.viewTo){var a=Un(e,t,t,-1) 506a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):qn(e)}else{var l=Un(e,t,t,-1),s=Un(e,r,r+n,1) 507l&&s?(i.view=i.view.slice(0,l.index).concat(Tr(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):qn(e)}var c=i.externalMeasured 508c&&(r<c.lineN?c.lineN+=n:t<c.lineN+c.size&&(i.externalMeasured=null))}function $n(e,t,r){e.curOp.viewChanged=!0 509var n=e.display,i=e.display.externalMeasured 510if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[_n(e,t)] 511if(null!=o.node){var a=o.changes||(o.changes=[]);-1==U(a,r)&&a.push(r)}}}function qn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Un(e,t,r,n){var i,o=_n(e,t),a=e.display.view 512if(!Wt||r==e.doc.first+e.doc.size)return{index:o,lineN:r} 513for(var l=e.display.viewFrom,s=0;s<o;s++)l+=a[s].size 514if(l!=t){if(n>0){if(o==a.length-1)return null 515i=l+a[o].size-t,o++}else i=l-t 516t+=i,r+=i}for(;ar(e.doc,r)!=r;){if(o==(n<0?0:a.length-1))return null 517r+=n*a[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function Vn(e,t,r){var n=e.display 5180==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Tr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Tr(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(_n(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Tr(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,_n(e,r)))),n.viewTo=r}
518function Gn(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n] 519i.hidden||i.node&&!i.changes||++r}return r}function Kn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Xn(e,t){void 0===t&&(t=!0) 520var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=e.options.$customCursor 521a&&(t=!0) 522for(var l=0;l<r.sel.ranges.length;l++)if(t||l!=r.sel.primIndex){var s=r.sel.ranges[l] 523if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var c=s.empty() 524if(a){var u=a(e,s) 525u&&Yn(e,u,i)}else(c||e.options.showCursorWhenSelecting)&&Yn(e,s.head,i) 526c||Qn(e,s,o)}}return n}function Yn(e,t,r){var n=Sn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(A("div","Â ","CodeMirror-cursor")) 527if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=Cn(e,t,"div",null,null),a=o.right-o.left 528i.style.width=(a>0?a:e.defaultCharWidth())+"px"}if(n.other){var l=r.appendChild(A("div","Â ","CodeMirror-cursor CodeMirror-secondarycursor")) 529l.style.display="",l.style.left=n.other.left+"px",l.style.top=n.other.top+"px",l.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function Zn(e,t){return e.top-t.top||e.left-t.left}function Qn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),a=Zr(e.display),l=a.left,s=Math.max(n.sizerWidth,Jr(e)-n.sizer.offsetLeft)-a.right,c="ltr"==i.direction 530function u(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(r??s-e)+"px;\n height: "+(n-t)+"px"))}function d(t,r,n){var o,a,d=rt(i,t),f=d.text.length 531function h(r,n){return Cn(e,ut(t,r),"div",d,n)}function p(t,r,n){var i=Nn(e,d,null,t),o="ltr"==r==("after"==n)?"left":"right" 532return h("after"==n?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),o)[o]}var g=ve(d,i.direction) 533return he(g,r||0,n??f,(function(e,t,i,d){var m="ltr"==i,v=h(e,m?"left":"right"),y=h(t-1,m?"right":"left"),b=null==r&&0==e,w=null==n&&t==f,x=0==d,k=!g||d==g.length-1 534if(y.top-v.top<=3){var C=(c?w:b)&&k,S=(c?b:w)&&x?l:(m?v:y).left,L=C?s:(m?y:v).right 535u(S,v.top,L-S,v.bottom)}else{var M,T,O,N 536m?(M=c&&b&&x?l:v.left,T=c?s:p(e,i,"before"),O=c?l:p(t,i,"after"),N=c&&w&&k?s:y.right):(M=c?p(e,i,"before"):l,T=!c&&b&&x?s:v.right,O=!c&&w&&k?l:y.left,N=c?p(t,i,"after"):s),u(M,v.top,T-M,v.bottom),v.bottom<y.top&&u(l,v.bottom,null,y.top),u(O,y.top,N-O,y.bottom)}(!o||Zn(v,o)<0)&&(o=v),Zn(y,o)<0&&(o=y),(!a||Zn(v,a)<0)&&(a=v),Zn(y,a)<0&&(a=y)})),{start:o,end:a}}var f=t.from(),h=t.to() 537if(f.line==h.line)d(f.line,f.ch,h.ch) 538else{var p=rt(i,f.line),g=rt(i,h.line),m=nr(p)==nr(g),v=d(f.line,f.ch,m?p.text.length+1:null).end,y=d(h.line,m?0:null,h.ch).start 539m&&(v.top<y.top-2?(u(v.right,v.top,null,v.bottom),u(l,y.top,y.left,y.bottom)):u(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&u(l,v.bottom,null,y.top)}r.appendChild(o)}function Jn(e){if(e.state.focused){var t=e.display 540clearInterval(t.blinker) 541var r=!0 542t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||ni(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function ei(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ri(e))}function ti(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ni(e))}),100)}function ri(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ke(e,"focus",e,t),e.state.focused=!0,E(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()),Jn(e))}function ni(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ke(e,"blur",e,t),e.state.focused=!1,T(e.dis
542play.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function ii(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,s=0;s<t.view.length;s++){var c=t.view[s],u=e.options.lineWrapping,d=void 0,f=0 543if(!c.hidden){if(i+=c.line.height,a&&l<8){var h=c.node.offsetTop+c.node.offsetHeight 544d=h-r,r=h}else{var p=c.node.getBoundingClientRect() 545d=p.bottom-p.top,!u&&c.text.firstChild&&(f=c.text.firstChild.getBoundingClientRect().right-p.left-1)}var g=c.line.height-d 546if((g>.005||g<-.005)&&(i<n&&(o-=g),ot(c.line,d),oi(c.line),c.rest))for(var m=0;m<c.rest.length;m++)oi(c.rest[m]) 547if(f>e.display.sizerWidth){var v=Math.ceil(f/Wn(e.display)) 548v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function oi(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode 549n&&(r.height=n.offsetHeight)}}function ai(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop 550n=Math.floor(n-Xr(e)) 551var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=lt(t,n),a=lt(t,i) 552if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line 553l<o?(o=l,a=lt(t,ur(rt(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=lt(t,ur(rt(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function li(e,t){if(!Ce(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null,o=r.wrapper.ownerDocument 554if(t.top+n.top<0?i=!0:t.bottom+n.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),null!=i&&!g){var a=A("div","â",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Xr(e.display))+"px;\n height: "+(t.bottom-t.top+Qr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;") 555e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}function si(e,t,r,n){var i 556null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==t.sticky?ut(t.line,t.ch+1,"before"):t,t=t.ch?ut(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t) 557for(var o=0;o<5;o++){var a=!1,l=Sn(e,t),s=r&&r!=t?Sn(e,r):l,c=ui(e,i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-n,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+n}),u=e.doc.scrollTop,d=e.doc.scrollLeft 558if(null!=c.scrollTop&&(vi(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(bi(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}function ci(e,t){var r=ui(e,t) 559null!=r.scrollTop&&vi(e,r.scrollTop),null!=r.scrollLeft&&bi(e,r.scrollLeft)}function ui(e,t){var r=e.display,n=En(e.display) 560t.top<0&&(t.top=0) 561var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=en(e),a={} 562t.bottom-t.top>o&&(t.bottom=t.top+o) 563var l=e.doc.height+Yr(r),s=t.top<n,c=t.bottom>l-n 564if(t.top<i)a.scrollTop=s?0:t.top 565else if(t.bottom>i+o){var u=Math.min(t.top,(c?l:t.bottom)-o) 566u!=i&&(a.scrollTop=u)}var d=e.options.fixedGutter?0:r.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-d,h=Jr(e)-r.gutters.offsetWidth,p=t.right-t.left>h 567return p&&(t.right=t.left+h),t.left<10?a.scrollLeft=0:t.left<f?a.scrollLeft=Math.max(0,t.left+d-(p?0:10)):t.right>h+f-3&&(a.scrollLeft=t.right+(p?0:10)-h),a}function di(e,t){null!=t&&(gi(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function fi(e){gi(e) 568var t=e.getCursor() 569e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function hi(e,t,r){null==t&&null==r||gi(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function pi(e,t){gi(e),e.curOp.scrollToPos=t}function gi(e){var t=e.curOp.scrollToPos 570t&&(e.curOp.scrollToPos=null,mi(e,Ln(e,t.from),Ln(e,t.to),t.margin))}function mi(e,t,r,n){var i=ui(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n}) 571hi(e,i.scrollLeft,i.scrollTop)}function vi(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||Ki(e,{top:t}),yi(e,t,!0),r&&Ki(e),Ri(e,100))}function yi(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.dis
571play.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function bi(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Qi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function wi(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Yr(e.display)) 572return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Qr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var xi=function(e,t,r){this.cm=r 573var n=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar") 574n.tabIndex=i.tabIndex=-1,e(n),e(i),be(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),be(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")} 575xi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth 576if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0" 577var i=e.viewHeight-(t?n:0) 578this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0" 579if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px" 580var o=e.viewWidth-e.barLeft-(r?n:0) 581this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0" 582return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},xi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},xi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},xi.prototype.zeroWidthHack=function(){var e=b&&!p?"12px":"18px" 583this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new q,this.disableVert=new q},xi.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.visibility="hidden":t.set(1e3,n)}e.style.visibility="",t.set(1e3,n)},xi.prototype.clear=function(){var e=this.horiz.parentNode 584e.removeChild(this.horiz),e.removeChild(this.vert)} 585var ki=function(){} 586function Ci(e,t){t||(t=wi(e)) 587var r=e.display.barWidth,n=e.display.barHeight 588Si(e,t) 589for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&ii(e),Si(e,wi(e)),r=e.display.barWidth,n=e.display.barHeight}function Si(e,t){var r=e.display,n=r.scrollbars.update(t) 590r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}ki.prototype.update=function(){return{bottom:0,right:0}},ki.prototype.setScrollLeft=function(){},ki.prototype.setScrollTop=function(){},ki.prototype.clear=function(){} 591var Li={native:xi,null:ki} 592function Mi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.dis
592play.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Li[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),be(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,r){"horizontal"==r?bi(e,t):vi(e,t)}),e),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)}var Ti=0 593function Oi(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:++Ti,markArrays:null},Nr(e.curOp)}function Ni(e){var t=e.curOp 594t&&Pr(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null 595Ai(e)}))}function Ai(e){for(var t=e.ops,r=0;r<t.length;r++)Pi(t[r]) 596for(var n=0;n<t.length;n++)zi(t[n]) 597for(var i=0;i<t.length;i++)Di(t[i]) 598for(var o=0;o<t.length;o++)Ei(t[o]) 599for(var a=0;a<t.length;a++)Wi(t[a])}function Pi(e){var t=e.cm,r=t.display 600$i(t),e.updateMaxLine&&fr(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Bi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function zi(e){e.updatedDisplay=e.mustUpdate&&Vi(e.cm,e.update)}function Di(e){var t=e.cm,r=t.display 601e.updatedDisplay&&ii(t),e.barMeasure=wi(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=on(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Qr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Jr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Ei(e){var t=e.cm 602null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&bi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1) 603var r=e.focus&&e.focus==D(I(t)) 604e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ci(t,e.barMeasure),e.updatedDisplay&&Zi(t,e.barMeasure),e.selectionChanged&&Jn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&ei(e.cm)}function Wi(e){var t=e.cm,r=t.display,n=t.doc 605e.updatedDisplay&&Gi(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&yi(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&bi(t,e.scrollLeft,!0,!0),e.scrollToPos&&li(t,si(t,vt(n,e.scrollToPos.from),vt(n,e.scrollToPos.to),e.scrollToPos.margin)) 606var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers 607if(i)for(var a=0;a<i.length;++a)i[a].lines.length||ke(i[a],"hide") 608if(o)for(var l=0;l<o.length;++l)o[l].lines.length&&ke(o[l],"unhide") 609r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ke(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Hi(e,t){if(e.curOp)return t() 610Oi(e) 611try{return t()}finally{Ni(e)}}function Fi(e,t){return function(){if(e.curOp)return t.apply(e,arguments) 612Oi(e) 613try{return t.apply(e,arguments)}finally{Ni(e)}}}function Ii(e){return function(){if(this.curOp)return e.apply(this,arguments) 614Oi(this) 615try{return e.apply(this,arguments)}finally{Ni(this)}}}function ji(e){return function(){var t=this.cm 616if(!t||t.curOp)return e.apply(this,arguments) 617Oi(t) 618try{return e.apply(this,arguments)}finally{Ni(t)}}}function Ri(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,_(_i,e))}function _i(e){var t=e.doc 619if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=St(e,t.highlightFrontier),i=[] 620t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(n.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?Qe(t.mode,n.state):null,s=kt(e,o,n,!0) 621l&&(n.state=l),o.styles=s.styles 622var c=o.styleClasses,u=s.classes 623u?o.styleClasses=u:c&&(o.styleClasses=null) 624for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&f<a.length;++f)d=a[f]!=o.styles[f] 625d&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Lt(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine() 626if(+new Date>r)return Ri(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&Hi(e,(function(){for(var t=0;t<i.length;t++)$n(e,i[t],"text")}))}}var Bi=function(e,t,r){var n=e.display 627this.viewport=t,this.visible=ai(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperW
627idth=n.wrapper.clientWidth,this.oldDisplayWidth=Jr(e),this.force=r,this.dims=Hn(e),this.events=[]} 628function $i(e){var t=e.display 629!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Qr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Qr(e)+"px",t.scrollbarsClipped=!0)}function qi(e){if(e.hasFocus())return null 630var t=D(I(e)) 631if(!t||!z(e.display.lineDiv,t))return null 632var r={activeElt:t} 633if(window.getSelection){var n=R(e).getSelection() 634n.anchorNode&&n.extend&&z(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function Ui(e){if(e&&e.activeElt&&e.activeElt!=D(j(e.activeElt))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&z(document.body,e.anchorNode)&&z(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,r=t.defaultView.getSelection(),n=t.createRange() 635n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),r.removeAllRanges(),r.addRange(n),r.extend(e.focusNode,e.focusOffset)}}function Vi(e,t){var r=e.display,n=e.doc 636if(t.editorIsHidden)return qn(e),!1 637if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Gn(e))return!1 638Ji(e)&&(qn(e),t.dims=Hn(e)) 639var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(i,t.visible.to+e.options.viewportMargin) 640r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>a&&r.viewTo-a<20&&(a=Math.min(i,r.viewTo)),Wt&&(o=ar(e.doc,o),a=lr(e.doc,a)) 641var l=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth 642Vn(e,o,a),r.viewOffset=ur(rt(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px" 643var s=Gn(e) 644if(!l&&0==s&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1 645var c=qi(e) 646return s>4&&(r.lineDiv.style.display="none"),Xi(e,r.updateLineNumbers,t.dims),s>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Ui(c),O(r.cursorDiv),O(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Ri(e,400)),r.updateLineNumbers=null,!0}function Gi(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Jr(e))n&&(t.visible=ai(e.display,e.doc,r)) 647else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Yr(e.display)-en(e),r.top)}),t.visible=ai(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break 648if(!Vi(e,t))break 649ii(e) 650var i=wi(e) 651Kn(e),Ci(e,i),Zi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ki(e,t){var r=new Bi(e,t) 652if(Vi(e,r)){ii(e),Gi(e,r) 653var n=wi(e) 654Kn(e),Ci(e,n),Zi(e,n),r.finish()}}function Xi(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,a=o.firstChild 655function l(t){var r=t.nextSibling 656return s&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var c=n.view,u=n.viewFrom,d=0;d<c.length;d++){var f=c[d] 657if(f.hidden);else if(f.node&&f.node.parentNode==o){for(;a!=f.node;)a=l(a) 658var h=i&&null!=t&&t<=u&&f.lineNumber 659f.changes&&(U(f.changes,"gutter")>-1&&(h=!1),Wr(e,f,u,r)),h&&(O(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(ct(e.options,u)))),a=f.node.nextSibling}else{var p=$r(e,f,u,r) 660o.insertBefore(p,a)}u+=f.size}for(;a;)a=l(a)}function Yi(e){var t=e.gutters.offsetWidth 661e.sizer.style.marginLeft=t+"px",Dr(e,"gutterChanged",e)}function Zi(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+Qr(e)+"px"}function Qi(e){var t=e.display,r=t.view 662if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=Fn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;
662a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=o),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o)) 663var l=r[a].alignable 664if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function Ji(e){if(!e.options.lineNumbers)return!1 665var t=e.doc,r=ct(e.options,t.first+t.size-1),n=e.display 666if(r.length!=n.lineNumChars){var i=n.measure.appendChild(A("div",[A("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o 667return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-a)+1,n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",Yi(e.display),!0}return!1}function eo(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var o=e[i],a=null 668if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue 669n=!0}r.push({className:o,style:a})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function to(e){var t=e.gutters,r=e.gutterSpecs 670O(t),e.lineGutter=null 671for(var n=0;n<r.length;++n){var i=r[n],o=i.className,a=i.style,l=t.appendChild(A("div",null,"CodeMirror-gutter "+o)) 672a&&(l.style.cssText=a),"CodeMirror-linenumbers"==o&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",Yi(e)}function ro(e){to(e.display),Bn(e),Qi(e)}function no(e,t,n,i){var o=this 673this.input=n,o.scrollbarFiller=A("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=A("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=P("div",null,"CodeMirror-code"),o.selectionDiv=A("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=A("div",null,"CodeMirror-cursors"),o.measure=A("div",null,"CodeMirror-measure"),o.lineMeasure=A("div",null,"CodeMirror-measure"),o.lineSpace=P("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none") 674var c=P("div",[o.lineSpace],"CodeMirror-lines") 675o.mover=A("div",[c],null,"position: relative"),o.sizer=A("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=A("div",null,null,"position: absolute; height: "+V+"px; width: 1px;"),o.gutters=A("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=A("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=A("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),u&&105===d&&(o.wrapper.style.clipPath="inset(0px)"),o.wrapper.setAttribute("translate","no"),a&&l<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),s||r&&y||(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=eo(i.gutters,i.lineNumbers),to(o),n.init(o)}Bi.prototype.signal=function(e,t){Le(e,t)&&this.events.push(arguments)},Bi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ke.apply(null,this.events[e])} 676var io=0,oo=null 677function ao(e){var t=e.wheelDeltaX,r=e.wheelDeltaY 678return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function lo(e){var t=ao(e) 679return t.x*=oo,t.y*=oo,t}function so(e,t){u&&102==d&&(null==e.display.chromeScrollHack?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout((function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""}),100)) 680var n=ao(t),i=n.x,o=n.y,a=oo 6810===t.deltaMode&&(i=t.deltaX,o=t.deltaY,a=1) 682var l=e.display,c=l.scroller,h=c.scrollWidth>c.clientWidth,p=c.scrollHeight>c.clientHeight 683if(i&&h||o&&p){if(o&&b&&s)e:for(var g=t.target,m=l.view;g!=c;g=g.parentNode)for(var v=0;v<m.length;v++)if(m[v].node==g){e.display.currentWheelTarget=g 684break e}if(i&&!r&&!f&&null!=a)return o&&p&&vi(e,Math.max(0,c.scrollTop+o*a)),bi(e,Math.max(0,c.scrollLeft+i*a)),(!o||o&&p)&&Te(t),void(l.wheelStartX=null) 685if(o&&null!=a){var y=o*a,w=e.doc.scrollTop,x=w+l.wrapper.clientHeight 686y<0?w=Math.max(0,w+y-50):x=Math.min(e.doc.height,x+y+50),Ki(e,{top:w,bottom:x})}io<20&&0!==t.deltaMode&&(null==l.wheelStartX?(l.wheelStartX=c.scrollLeft,l.wheelStartY=c.scrollTop,l.wheelDX=i,l.wheelDY=o,setTimeout((function(){if(null!=l.wheelStartX){var e=c.scrollLeft-l.wheelStartX,t=c.scrollTop-l.wheelStartY,r=t&&l.wheelDY&&t/l.wheelDY||e&&l.wheelDX&&e/l.wheelDX 687l.wheelStartX=l.wheelStartY=null,r&&(oo=(oo*io+r)/(io+1),++io)}}),200)):(l.wheelDX+=i,l.wheelDY+=o))}}a?oo=-.53:r?oo=15:u?oo=-.7:h&&(oo=-1/3) 688var co=function(e,t){this.ranges=e,this.primIndex=t} 689co.prototype.primary=function(){return this.ranges[this.primIndex]},co.prototype.equals=function(e){if(e==this)return!0 690if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1 691for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t] 692if(!ft(r.anchor,n.anchor)||!ft(r.head,n.head))return!1}return!0},co.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;
692t++)e[t]=new uo(ht(this.ranges[t].anchor),ht(this.ranges[t].head)) 693return new co(e,this.primIndex)},co.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0 694return!1},co.prototype.contains=function(e,t){t||(t=e) 695for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r] 696if(dt(t,n.from())>=0&&dt(e,n.to())<=0)return r}return-1} 697var uo=function(e,t){this.anchor=e,this.head=t} 698function fo(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r] 699t.sort((function(e,t){return dt(e.from(),t.from())})),r=U(t,i) 700for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=dt(l.to(),a.from()) 701if(n&&!a.empty()?s>0:s>=0){var c=gt(l.from(),a.from()),u=pt(l.to(),a.to()),d=l.empty()?a.from()==a.head:l.from()==l.head 702o<=r&&--r,t.splice(--o,2,new uo(d?u:c,d?c:u))}}return new co(t,r)}function ho(e,t){return new co([new uo(e,t||e)],0)}function po(e){return e.text?ut(e.from.line+e.text.length-1,ee(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function go(e,t){if(dt(e,t.from)<0)return e 703if(dt(e,t.to)<=0)return po(t) 704var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch 705return e.line==t.to.line&&(n+=po(t).ch-t.to.ch),ut(r,n)}function mo(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n] 706r.push(new uo(go(i.anchor,t),go(i.head,t)))}return fo(e.cm,r,e.sel.primIndex)}function vo(e,t,r){return e.line==t.line?ut(r.line,e.ch-t.ch+r.ch):ut(r.line+(e.line-t.line),e.ch)}function yo(e,t,r){for(var n=[],i=ut(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=vo(l.from,i,o),c=vo(po(l),i,o) 707if(i=l.to,o=c,"around"==r){var u=e.sel.ranges[a],d=dt(u.head,u.anchor)<0 708n[a]=new uo(d?c:s,d?s:c)}else n[a]=new uo(s,s)}return new co(n,e.sel.primIndex)}function bo(e){e.doc.mode=Xe(e.options,e.doc.modeOption),wo(e)}function wo(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Ri(e,100),e.state.modeGen++,e.curOp&&Bn(e)}function xo(e,t){return 0==t.from.ch&&0==t.to.ch&&""==ee(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ko(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){pr(e,r,i,n),Dr(e,"change",e,t)}function a(e,t){for(var r=[],o=e;o<t;++o)r.push(new hr(c[o],i(o),n)) 709return r}var l=t.from,s=t.to,c=t.text,u=rt(e,l.line),d=rt(e,s.line),f=ee(c),h=i(c.length-1),p=s.line-l.line 710if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length) 711else if(xo(e,t)){var g=a(0,c.length-1) 712o(d,d.text,h),p&&e.remove(l.line,p),g.length&&e.insert(l.line,g)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,l.ch)+f+u.text.slice(s.ch),h) 713else{var m=a(1,c.length-1) 714m.push(new hr(f+u.text.slice(s.ch),h,n)),o(u,u.text.slice(0,l.ch)+c[0],i(0)),e.insert(l.line+1,m)}else if(1==c.length)o(u,u.text.slice(0,l.ch)+c[0]+d.text.slice(s.ch),i(0)),e.remove(l.line+1,p) 715else{o(u,u.text.slice(0,l.ch)+c[0],i(0)),o(d,f+d.text.slice(s.ch),h) 716var v=a(1,c.length-1) 717p>1&&e.remove(l.line+1,p-1),e.insert(l.line+1,v)}Dr(e,"change",e,t)}function Co(e,t,r){function n(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var l=e.linked[a] 718if(l.doc!=i){var s=o&&l.sharedHist 719r&&!s||(t(l.doc,s),n(l.doc,e,s))}}}n(e,null,!0)}function So(e,t){if(t.cm)throw new Error("This document is already in use.") 720e.doc=t,t.cm=e,jn(e),bo(e),Lo(e),e.options.direction=t.direction,e.options.lineWrapping||fr(e),e.options.mode=t.modeOption,Bn(e)}function Lo(e){("rtl"==e.doc.direction?E:T)(e.display.lineDiv,"CodeMirror-rtl")}function Mo(e){Hi(e,(function(){Lo(e),Bn(e)}))}function To(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 Oo(e,t){var r={from:ht(t.from),to:po(t),text:nt(e,t.from,t.to)} 721return Wo(e,r,t.from.line,t.to.line+1),Co(e,(function(e){return Wo(e,r,t.from.line,t.to.line+1)}),!0),r}function No(e){for(;e.length&&ee(e).ranges;)e.pop()}function Ao(e,t){return t?(No(e.done),ee(e.done)):e.done.length&&!ee(e.done).ranges?ee(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),ee(e.done)):void 0}function Po(e,t,r,n){var i=e.history 722i.undone.length=0 723var o,a,l=+new Date 724if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Ao(i,i.lastOp==n)))a=ee(o.changes),0==dt(t.from,t.to)&&0==dt(t.from,a.to)?a.to=po(t):o.changes.push(Oo(e,t)) 725else{var s=ee(i.done) 726for(s&&s.ranges||Eo(e.sel,i.done),o={changes:[Oo(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,a||ke(e,"historyAdded")}function zo(e,t,r,n){var i=t.charAt(0) 727return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime
727<=(e.cm?e.cm.options.historyEventDelay:500)}function Do(e,t,r,n){var i=e.history,o=n&&n.origin 728r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||zo(e,o,ee(i.done),t))?i.done[i.done.length-1]=t:Eo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&No(i.undone)}function Eo(e,t){var r=ee(t) 729r&&r.ranges&&r.equals(e)||t.push(e)}function Wo(e,t,r,n){var i=t["spans_"+e.id],o=0 730e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),(function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o}))}function Ho(e){if(!e)return null 731for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]) 732return t?t.length?t:null:e}function Fo(e,t){var r=t["spans_"+e.id] 733if(!r)return null 734for(var n=[],i=0;i<t.text.length;++i)n.push(Ho(r[i])) 735return n}function Io(e,t){var r=Fo(e,t),n=qt(e,t) 736if(!r)return n 737if(!n)return r 738for(var i=0;i<r.length;++i){var o=r[i],a=n[i] 739if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],c=0;c<o.length;++c)if(o[c].marker==s.marker)continue e 740o.push(s)}else a&&(r[i]=a)}return r}function jo(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i] 741if(o.ranges)n.push(r?co.prototype.deepCopy.call(o):o) 742else{var a=o.changes,l=[] 743n.push({changes:l}) 744for(var s=0;s<a.length;++s){var c=a[s],u=void 0 745if(l.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&U(t,Number(u[1]))>-1&&(ee(l)[d]=c[d],delete c[d])}}}return n}function Ro(e,t,r,n){if(n){var i=e.anchor 746if(r){var o=dt(t,i)<0 747o!=dt(r,i)<0?(i=t,t=r):o!=dt(t,r)<0&&(t=r)}return new uo(i,t)}return new uo(r||t,t)}function _o(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Go(e,new co([Ro(e.sel.primary(),t,r,i)],0),n)}function Bo(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=Ro(e.sel.ranges[o],t[o],null,i) 748Go(e,fo(e.cm,n,e.sel.primIndex),r)}function $o(e,t,r,n){var i=e.sel.ranges.slice(0) 749i[t]=r,Go(e,fo(e.cm,i,e.sel.primIndex),n)}function qo(e,t,r,n){Go(e,ho(t,r),n)}function Uo(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[] 750for(var r=0;r<t.length;r++)this.ranges[r]=new uo(vt(e,t[r].anchor),vt(e,t[r].head))},origin:r&&r.origin} 751return ke(e,"beforeSelectionChange",e,n),e.cm&&ke(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?fo(e.cm,n.ranges,n.ranges.length-1):t}function Vo(e,t,r){var n=e.history.done,i=ee(n) 752i&&i.ranges?(n[n.length-1]=t,Ko(e,t,r)):Go(e,t,r)}function Go(e,t,r){Ko(e,t,r),Do(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Ko(e,t,r){(Le(e,"beforeSelectionChange")||e.cm&&Le(e.cm,"beforeSelectionChange"))&&(t=Uo(e,t,r)) 753var n=r&&r.bias||(dt(t.primary().head,e.sel.primary().head)<0?-1:1)
754Xo(e,Zo(e,t,n,!0)),r&&!1===r.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||fi(e.cm)}function Xo(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Se(e.cm)),Dr(e,"cursorActivity",e))}function Yo(e){Xo(e,Zo(e,e.sel,null,!1))}function Zo(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=Jo(e,a.anchor,l&&l.anchor,r,n),c=a.head==a.anchor?s:Jo(e,a.head,l&&l.head,r,n);(i||s!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new uo(s,c))}return i?fo(e.cm,i,t.primIndex):t}function Qo(e,t,r,n,i){var o=rt(e,t.line) 755if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker,c="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,u="selectRight"in s?!s.selectRight:s.inclusiveRight 756if((null==l.from||(c?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(u?l.to>=t.ch:l.to>t.ch))){if(i&&(ke(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a 757continue}break}if(!s.atomic)continue 758if(r){var d=s.find(n<0?1:-1),f=void 0 759if((n<0?u:c)&&(d=ea(e,d,-n,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(f=dt(d,r))&&(n<0?f<0:f>0))return Qo(e,d,t,n,i)}var h=s.find(n<0?-1:1) 760return(n<0?c:u)&&(h=ea(e,h,n,h.line==t.line?o:null)),h?Qo(e,h,t,n,i):null}}return t}function Jo(e,t,r,n,i){var o=n||1,a=Qo(e,t,r,o,i)||!i&&Qo(e,t,r,o,!0)||Qo(e,t,r,-o,i)||!i&&Qo(e,t,r,-o,!0) 761return a||(e.cantEdit=!0,ut(e.first,0))}function ea(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?vt(e,ut(t.line-1)):null:r>0&&t.ch==(n||rt(e,t.line)).text.length?t.line<e.first+e.size-1?ut(t.line+1,0):null:new ut(t.line,t.ch+r)}function ta(e){e.setSelection(ut(e.firstLine(),0),ut(e.lastLine()),K)}function ra(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}} 762return r&&(n.update=function(t,r,i,o){t&&(n.from=vt(e,t)),r&&(n.to=vt(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),ke(e,"beforeChange",e,n),e.cm&&ke(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 na(e,t,r){if(e.cm){if(!e.cm.curOp)return Fi(e.cm,na)(e,t,r) 763if(e.cm.state.suppressEdits)return}if(!(Le(e,"beforeChange")||e.cm&&Le(e.cm,"beforeChange"))||(t=ra(e,t,!0))
763){var n=Et&&!r&&Vt(e,t.from,t.to) 764if(n)for(var i=n.length-1;i>=0;--i)ia(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin}) 765else ia(e,t)}}function ia(e,t){if(1!=t.text.length||""!=t.text[0]||0!=dt(t.from,t.to)){var r=mo(e,t) 766Po(e,t,r,e.cm?e.cm.curOp.id:NaN),la(e,t,r,qt(e,t)) 767var n=[] 768Co(e,(function(e,r){r||-1!=U(n,e.history)||(fa(e.history,t),n.push(e.history)),la(e,t,null,qt(e,t))}))}}function oa(e,t,r){var n=e.cm&&e.cm.state.suppressEdits 769if(!n||r){for(var i,o=e.history,a=e.sel,l="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,c=0;c<l.length&&(i=l[c],r?!i.ranges||i.equals(e.sel):i.ranges);c++);if(c!=l.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=l.pop()).ranges){if(n)return void l.push(i) 770break}if(Eo(i,s),r&&!i.equals(e.sel))return void Go(e,i,{clearRedo:!1}) 771a=i}var u=[] 772Eo(a,s),s.push({changes:u,generation:o.generation}),o.generation=i.generation||++o.maxGeneration 773for(var d=Le(e,"beforeChange")||e.cm&&Le(e.cm,"beforeChange"),f=function(r){var n=i.changes[r] 774if(n.origin=t,d&&!ra(e,n,!1))return l.length=0,{} 775u.push(Oo(e,n)) 776var o=r?mo(e,n):ee(l) 777la(e,n,o,Io(e,n)),!r&&e.cm&&e.cm.scrollIntoView({from:n.from,to:po(n)}) 778var a=[] 779Co(e,(function(e,t){t||-1!=U(a,e.history)||(fa(e.history,n),a.push(e.history)),la(e,n,null,Io(e,n))}))},h=i.changes.length-1;h>=0;--h){var p=f(h) 780if(p)return p.v}}}}function aa(e,t){if(0!=t&&(e.first+=t,e.sel=new co(te(e.sel.ranges,(function(e){return new uo(ut(e.anchor.line+t,e.anchor.ch),ut(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){Bn(e.cm,e.first,e.first-t,t) 781for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)$n(e.cm,n,"gutter")}}function la(e,t,r,n){if(e.cm&&!e.cm.curOp)return Fi(e.cm,la)(e,t,r,n) 782if(t.to.line<e.first)aa(e,t.text.length-1-(t.to.line-t.from.line)) 783else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line) 784aa(e,i),t={from:ut(e.first,0),to:ut(t.to.line+i,t.to.ch),text:[ee(t.text)],origin:t.origin}}var o=e.lastLine() 785t.to.line>o&&(t={from:t.from,to:ut(o,rt(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=nt(e,t.from,t.to),r||(r=mo(e,t)),e.cm?sa(e.cm,t,n):ko(e,t,n),Ko(e,r,K),e.cantEdit&&Jo(e,ut(e.firstLine(),0))&&(e.cantEdit=!1)}}function sa(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line 786e.options.lineWrapping||(s=at(nr(rt(n,o.line))),n.iter(s,a.line+1,(function(e){if(e==i.maxLine)return l=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&Se(e),ko(n,t,r,In(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,(function(e){var t=dr(e) 787t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)})),l&&(e.curOp.updateMaxLine=!0)),Dt(n,o.line),Ri(e,400) 788var c=t.text.length-(a.line-o.line)-1 789t.full?Bn(e):o.line!=a.line||1!=t.text.length||xo(e.doc,t)?Bn(e,o.line,a.line+1,c):$n(e,o.line,"text") 790var u=Le(e,"changes"),d=Le(e,"change") 791if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin} 792d&&Dr(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function ca(e,t,r,n,i){var o 793n||(n=r),dt(n,r)<0&&(r=(o=[n,r])[0],n=o[1]),"string"==typeof t&&(t=e.splitLines(t)),na(e,{from:r,to:n,text:t,origin:i})}function ua(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function da(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0 794if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0) 795for(var l=0;l<o.ranges.length;l++)ua(o.ranges[l].anchor,t,r,n),ua(o.ranges[l].head,t,r,n)}else{for(var s=0;s<o.changes.length;++s){var c=o.changes[s] 796if(r<c.from.line)c.from=ut(c.from.line+n,c.from.ch),c.to=ut(c.to.line+n,c.to.ch) 797else if(t<=c.to.line){a=!1 798break}}a||(e.splice(0,i+1),i=0)}}}function fa(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1 799da(e.done,r,n,i),da(e.undone,r,n,i)}function ha(e,t,r,n){var i=t,o=t 800return"number"==typeof t?o=rt(e,mt(e,t)):i=at(t),null==i?null:(n(o,i)&&e.cm&&$n(e.cm,i,r),o)}function pa(e){this.lines=e,this.parent=null 801for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height 802this.height=t}function ga(e){this.children=e 803for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n] 804t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}uo.prototype.from=function(){return gt(this.anchor,this.head)},uo.prototype.to=function(){return pt(this.anchor,this.head)},uo.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},pa.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r] 805this.height-=i.height,gr(i),Dr(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e)) 806for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},ga.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t 807for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize() 808if(e<i){var o=Math.min(t,i-e),a=n.height 809if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break 810e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof pa))){var l=[] 811this.collapse(l),this.children=[new pa(l)],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,r){this.size+=t.length,this.height+=r 812for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize() 813if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new pa(i.lines.slice(l,l+=25)) 814i.height-=s.height,this.children.splice(++n,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this 815do{var t=new ga(e.children.splice(e.children.length-5,5)) 816if(e.parent){e.size-=t.size,e.height-=t.height 817var r=U(e.parent.children,e) 818e.parent.children.splice(r+1,0,t)}else{var n=new ga(e.children) 819n.parent=e,e.children=[n,t],e=n}t.parent=e.parent}while(e.children.length>10) 820e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize() 821if(e<o){var a=Math.min(t,o-e) 822if(i.iterN(e,a,r))return!0 823if(0==(t-=a))break 824e=0}else e-=o}}} 825var ma=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]) 826this.doc=e,this.node=t} 827function va(e,t,r){ur(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&di(e,r)}function ya(e,t,r,n){var i=new ma(e,r,n),o=e.cm 828return o&&i.noHScroll&&(o.display.alignWidgets=!0),ha(e,t,"widget",(function(t){var r=t.widgets||(t.widgets=[]) 829if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!sr(e,t)){var n=ur(t)<e.scrollTop
830ot(t,t.height+Gr(i)),n&&di(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&Dr(o,"lineWidgetAdded",o,i,"number"==typeof t?t:at(t)),i}ma.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=at(r) 831if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1) 832t.length||(r.widgets=null) 833var o=Gr(this) 834ot(r,Math.max(0,r.height-o)),e&&(Hi(e,(function(){va(e,r,-o),$n(e,n,"widget")})),Dr(e,"lineWidgetCleared",e,this,n))}},ma.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line 835this.height=null 836var i=Gr(this)-t 837i&&(sr(this.doc,n)||ot(n,n.height+i),r&&Hi(r,(function(){r.curOp.forceUpdate=!0,va(r,n,i),Dr(r,"lineWidgetChanged",r,e,at(n))})))},Me(ma) 838var ba=0,wa=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ba} 839function xa(e,t,r,n,i){if(n&&n.shared)return Ca(e,t,r,n,i) 840if(e.cm&&!e.cm.curOp)return Fi(e.cm,xa)(e,t,r,n,i) 841var o=new wa(e,i),a=dt(t,r) 842if(n&&B(n,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o 843if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=P("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(rr(e,t.line,t,r,o)||t.line!=r.line&&rr(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one") 844Ft()}o.addToHistory&&Po(e,{from:t,to:r,origin:"markText"},e.sel,NaN) 845var l,s=t.line,c=e.cm 846if(e.iter(s,r.line+1,(function(n){c&&o.collapsed&&!c.options.lineWrapping&&nr(n)==c.display.maxLine&&(l=!0),o.collapsed&&s!=t.line&&ot(n,0),_t(n,new It(o,s==t.line?t.ch:null,s==r.line?r.ch:null),e.cm&&e.cm.curOp),++s})),o.collapsed&&e.iter(t.line,r.line+1,(function(t){sr(e,t)&&ot(t,0)})),o.clearOnEnter&&be(o,"beforeCursorEnter",(function(){return o.clear()}
846)),o.readOnly&&(Ht(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ba,o.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),o.collapsed)Bn(c,t.line,r.line+1) 847else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=r.line;u++)$n(c,u,"text") 848o.atomic&&Yo(c.doc),Dr(c,"markerAdded",c,o)}return o}wa.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp 849if(t&&Oi(e),Le(this,"clear")){var r=this.find() 850r&&Dr(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=jt(a.markedSpans,this) 851e&&!this.collapsed?$n(e,at(a),"text"):e&&(null!=l.to&&(i=at(a)),null!=l.from&&(n=at(a))),a.markedSpans=Rt(a.markedSpans,l),null==l.from&&this.collapsed&&!sr(this.doc,a)&&e&&ot(a,En(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=nr(this.lines[s]),u=dr(c) 852u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&Bn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Yo(e.doc)),e&&Dr(e,"markerCleared",e,this,n,i),t&&Ni(e),this.parent&&this.parent.clear()}},wa.prototype.find=function(e,t){var r,n 853null==e&&"bookmark"==this.type&&(e=1) 854for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=jt(o.markedSpans,this) 855if(null!=a.from&&(r=ut(t?o:at(o),a.from),-1==e))return r 856if(null!=a.to&&(n=ut(t?o:at(o),a.to),1==e))return n}return r&&{from:r,to:n}},wa.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm 857t&&n&&Hi(n,(function(){var i=t.line,o=at(t.line),a=an(n,o) 858if(a&&(gn(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!sr(r.doc,i)&&null!=r.height){var l=r.height 859r.height=null 860var s=Gr(r)-l 861s&&ot(i,i.height+s)}Dr(n,"markerChanged",n,e)}))},wa.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp 862t.maybeHiddenMarkers&&-1!=U(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},wa.prototype.detachLine=function(e){if(this.lines.splice(U(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Me(wa) 863var ka=function(e,t){this.markers=e,this.primary=t 864for(var r=0;r<e.length;++r)e[r].parent=this} 865function Ca(e,t,r,n,i){(n=B(n)).shared=!1 866var o=[xa(e,t,r,n,i)],a=o[0],l=n.widgetNode 867return Co(e,(function(e){l&&(n.widgetNode=l.cloneNode(!0)),o.push(xa(e,vt(e,t),vt(e,r),n,i)) 868for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return 869a=ee(o)})),new ka(o,a)}function Sa(e){return e.findMarks(ut(e.first,0),e.clipPos(ut(e.lastLine())),(function(e){return e.parent}))}function La(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),a=e.clipPos(i.to) 870if(dt(o,a)){var l=xa(e,o,a,n.primary,n.primary.type) 871n.markers.push(l),l.parent=n}}}function Ma(e){for(var t=function(t){var r=e[t],n=[r.primary.doc] 872Co(r.primary.doc,(function(e){return n.push(e)})) 873for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==U(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}},r=0;r<e.length;r++)t(r)}ka.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0 874for(var e=0;e<this.markers.length;++e)this.markers[e].clear() 875Dr(this,"clear")}},ka.prototype.find=function(e,t){return this.primary.find(e,t)},Me(ka) 876var Ta=0,Oa=function(e,t,r,n,i){if(!(this instanceof Oa))return new Oa(e,t,r,n,i) 877null==r&&(r=0),ga.call(this,[new pa([new hr("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r 878var o=ut(r,0) 879this.sel=ho(o),this.history=new To(null),this.id=++Ta,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),ko(this,{from:o,to:o,text:e}),Go(this,ho(o),K)} 880Oa.prototype=ie(ga.prototype,{constructor:Oa,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height 881this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=it(this,this.first,this.first+this.size) 882return!1===e?t:t.join(e||this.lineSeparator())},setValue:ji((function(e){var t=ut(this.first,0),r=this.first+this.size-1 883na(this,{from:t,to:ut(r,rt(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&hi(this.cm,0,0),Go(this,ho(t),K)})),replaceRange:function(e,t,r,n){ca(this,e,t=vt(this,t),r=r?vt(this,r):t,n)},getRange:function(e,t,r){var n=nt(this,vt(this,e),vt(this,t)) 884return!1===r?n:""===r?n.join(""):n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e) 885return t&&t.text},getLineHandle:function(e){if(st(this,e))return rt(this,e)},getLineNumber:function(e){return at(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=rt(this,e)),nr(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return vt(this,e)},getCursor:function(e){var t=this.sel.primary() 886return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ji((function(e,t,r){qo(this,vt(this,"number"==typeof e?ut(e,t||0):e),null,r)})),setSelection:ji((function(e,t,r){qo(this,vt(this,e),vt(this,t||e),r)})),extendSelection:ji((function(e,t,r){_o(this,vt(this,e),t&&vt(this,t),r)})),extendSelections:ji((function(e,t){Bo(this,bt(this,e),t)})),extendSelectionsBy:ji((function(e,t){Bo(this,bt(this,te(this.sel.ranges,e)),t)})),setSelections:ji((function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new uo(vt(this,e[i].anchor),vt(this,e[i].head||e[i].anchor)) 887null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Go(this,fo(this.cm,n,t),r)}})),addSelection:ji((function(e,t,r){var n=this.sel.ranges.slice(0) 888n.push(new uo(vt(this,e),vt(this,t||e))),Go(this,fo(this.cm,n,n.length-1),r)})),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=nt(this,r[n].from(),r[n].to()) 889t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=nt(this,r[n].from(),r[n].to()) 890!1!==e&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e 891this.replaceSelections(n,t,r||"+input")},replaceSelections:ji((function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o] 892n[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:r}}for(var l=t&&"end"!=t&&yo(this,n,t),s=n.length-1;s>=0;s--)na(this,n[s]) 893l?Vo(this,l):this.cm&&fi(this.cm)})),undo:ji((function(){oa(this,"undo")})),redo:ji((function(){oa(this,"redo")})),undoSelection:ji((function(){oa(this,"undo",!0)})),redoSelection:ji((function(){oa(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t 894for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r 895return{undo:t,redo:r}},clearHistory:function(){var e=this 896this.history=new To(this.history),Co(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:jo(this.history.done),undone:jo(this.history.undone)}},setHistory:function(e){var t=this.history=new To(this.history) 897t.done=jo(e.done.slice(0),null,!0),t.undone=jo(e.undone.slice(0),null,!0)},setGutterMarker:ji((function(e,t,r){return ha(this,e,"gutter",(function(e){var n=e.gutterMarkers||(e.gutterMarkers={}) 898return n[t]=r,!r&&se(n)&&(e.gutterMarkers=null),!0}))})),clearGutter:ji((function(e){var t=this 899this.iter((function(r){r.gutterMarkers&&r.gutterMarkers[e]&&ha(t,r,"gutter",(function(){return r.gutterMarkers[e]=null,se(r.gutterMarkers)&&(r.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t 900if("number"==typeof e){if(!st(this,e))return null 901if(t=e,!(e=rt(this,e)))return null}else if(null==(t=at(e)))return null 902return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:ji((function(e,t,r){return ha(this,e,"gutter"==t?"gutter":"class",(function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass"
903if(e[n]){if(L(r).test(e[n]))return!1 904e[n]+=" "+r}else e[n]=r 905return!0}))})),removeLineClass:ji((function(e,t,r){return ha(this,e,"gutter"==t?"gutter":"class",(function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[n] 906if(!i)return!1 907if(null==r)e[n]=null 908else{var o=i.match(L(r)) 909if(!o)return!1 910var a=o.index+o[0].length 911e[n]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0}))})),addLineWidget:ji((function(e,t,r){return ya(this,e,t,r)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return xa(this,vt(this,e),vt(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents} 912return xa(this,e=vt(this,e),e,r,"bookmark")},findMarksAt:function(e){var t=[],r=rt(this,(e=vt(this,e)).line).markedSpans 913if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=vt(this,e),t=vt(this,t) 914var n=[],i=e.line 915return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans 916if(a)for(var l=0;l<a.length;l++){var s=a[l] 917null!=s.to&&i==e.line&&e.ch>=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++i})),n},getAllMarks:function(){var e=[] 918return this.iter((function(t){var r=t.markedSpans 919if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)})),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length 920return this.iter((function(i){var o=i.text.length+n 921if(o>e)return t=e,!0 922e-=o,++r})),vt(this,ut(r,t))},indexFromPos:function(e){var t=(e=vt(this,e)).ch 923if(e.line<this.first||e.ch<0)return 0 924var r=this.lineSeparator().length 925return this.iter(this.first,e.line,(function(e){t+=e.text.length+r})),t},copy:function(e){var t=new Oa(it(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction) 926return 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={}) 927var t=this.first,r=this.first+this.size 928null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to) 929var n=new Oa(it(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction) 930return 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}],La(n,Sa(this)),n},unlinkDoc:function(e){if(e instanceof Bl&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Ma(Sa(this)) 931break}if(e.history==this.history){var r=[e.id] 932Co(e,(function(e){return r.push(e.id)}),!0),e.history=new To(null),e.history.done=jo(this.history.done,r),e.history.undone=jo(this.history.undone,r)}},iterLinkedDocs:function(e){Co(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):je(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:ji((function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&Mo(this.cm))}))}),Oa.prototype.eachLine=Oa.prototype.iter 933var Na=0 934function Aa(e){var t=this 935if(Da(t),!Ce(t,e)&&!Kr(t.display,e)){Te(e),a&&(Na=+new Date) 936var r=Rn(t,e,!0),n=e.dataTransfer.files 937if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),l=0,s=function(){++l==i&&Fi(t,(function(){var e={from:r=vt(t.doc,r),to:r,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"} 938na(t.doc,e),Vo(t.doc,ho(vt(t.doc,r),vt(t.doc,po(e))))}))()},c=function(e,r){if(t.options.allowDropFileTypes&&-1==U(t.options.allowDropFileTypes,e.type))s() 939else{var n=new FileReader 940n.onerror=function(){return s()},n.onload=function(){var e=n.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[r]=e),s()},n.readAsText(e)}},u=0;u<n.length;u++)c(n[u],u) 941else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20) 942try{var d=e.dataTransfer.getData("Text") 943if(d){var f 944if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Ko(t.doc,ho(r,r)),f)for(var h=0;h<f.length;++h)ca(t.doc,"",f[h].anchor,f[h].head,"drag") 945t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Pa(e,t){if(a&&(!e.state.draggingText||+new Date-Na<100))Ae(t) 946else if(!Ce(e,t)&&!Kr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!h)){var r=A("img",null,null,"position: fixed; left: 0; top: 0;") 947r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),f&&r.parentNode.removeChild(r)}}function za(e,t){var r=Rn(e,t) 948if(r){var n=document.createDocumentFragment()
949Yn(e,r,n),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),N(e.display.dragCursor,n)}}function Da(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ea(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror 950i&&r.push(i)}r.length&&r[0].operation((function(){for(var t=0;t<r.length;t++)e(r[t])}))}}var Wa=!1 951function Ha(){Wa||(Fa(),Wa=!0)}function Fa(){var e 952be(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Ea(Ia)}),100))})),be(window,"blur",(function(){return Ea(ni)}))}function Ia(e){var t=e.display 953t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var ja={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"},Ra=0;Ra<10;Ra++)ja[Ra+48]=ja[Ra+96]=String(Ra) 954for(var _a=65;_a<=90;_a++)ja[_a]=String.fromCharCode(_a) 955for(var Ba=1;Ba<=12;Ba++)ja[Ba+111]=ja[Ba+63235]="F"+Ba 956var $a={} 957function qa(e){var t,r,n,i,o=e.split(/-(?!$)/) 958e=o[o.length-1] 959for(var a=0;a<o.length-1;a++){var l=o[a] 960if(/^(cmd|meta|m)$/i.test(l))i=!0 961else if(/^a(lt)?$/i.test(l))t=!0 962else if(/^(c|ctrl|control)$/i.test(l))r=!0 963else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l) 964n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Ua(e){var t={} 965for(var r in e)if(e.hasOwnProperty(r)){var n=e[r] 966if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue 967if("..."==n){delete e[r] 968continue}for(var i=te(r.split(" "),qa),o=0;o<i.length;o++){var a=void 0,l=void 0 969o==i.length-1?(l=i.join(" "),a=n):(l=i.slice(0,o+1).join(" "),a="...") 970var s=t[l] 971if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[r]}for(var c in t)e[c]=t[c] 972return e}function Va(e,t,r,n){var i=(t=Ya(t)).call?t.call(e,n):t[e] 973if(!1===i)return"nothing" 974if("..."===i)return"multi" 975if(null!=i&&r(i))return"handled" 976if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Va(e,t.fallthrough,r,n) 977for(var o=0;o<t.fallthrough.length;o++){var a=Va(e,t.fallthrough[o],r,n) 978if(a)return a}}}function Ga(e){var t="string"==typeof e?e:ja[e.keyCode] 979return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Ka(e,t,r){var n=e 980return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(C?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(C?t.ctrlKey:t.metaKey)&&"Mod"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function Xa(e,t){if(f&&34==e.keyCode&&e.char)return!1 981var r=ja[e.keyCode] 982return null!=r&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(r=e.code),Ka(r,e,t))}function Ya(e){return"string"==typeof e?$a[e]:e}function Za(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&dt(o.from,ee(n).to)<=0;){var a=n.pop() 983if(dt(a.from,o.from)<0){o.from=a.from 984break}}n.push(o)}Hi(e,(function(){for(var t=n.length-1;t>=0;t--)ca(e.doc,"",n[t].from,n[t].to,"+delete") 985fi(e)}))}function Qa(e,t,r){var n=de(e.text,t+r,r) 986return n<0||n>e.text.length?null:n}function Ja(e,t,r){var n=Qa(e,t.ch,r) 987return null==n?null:new ut(t.line,n,r<0?"after":"before")}function el(e,t,r,n,i){if(e){"rtl"==t.doc.direction&&(i=-i) 988var o=ve(r,t.doc.direction) 989if(o){var a,l=i<0?ee(o):o[0],s=i<0==(1==l.level)?"after":"before" 990if(l.level>0||"rtl"==t.doc.direction){var c=ln(t,r) 991a=i<0?r.text.length-1:0 992var u=sn(t,c,a).top 993a=fe((function(e){return sn(t,c,e).top==u}),i<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=Qa(r,a,1))}else a=i<0?l.to:l.from 994return new ut(n,a,s)}}return new ut(n,i<0?r.text.length:0,i<0?"before":"after")}function tl(e,t,r,n){var i=ve(t,e.doc.direction) 995if(!i)return Ja(t,r,n) 996r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after") 997var o=ge(i,r.ch,r.sticky),a=i[o] 998if("ltr"==e.doc.direction&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return Ja(t,r,n) 999var l,s=function(e,r){return Qa(t,e instanceof ut?e.ch:e,r)},c=function(r){return e.options.lineWrapping?(l=l||ln(e,t),Nn(e,t,l,r)):{begin:0,end:t.text.length}},u=c("before"==r.sticky?s(r,-1):r.ch) 1000if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==n<0,f=s(r,d?1:-1) 1001if(null!=f&&(d?f<=a.to&&f<=u.end:f>=a.from&&f>=u.begin)){var h=d?"before":"after" 1002return new ut(r.line,f,h)}}var p=function(e,t,n){for(var o=function(e,t){return t?new ut(r.line,s(e,1),"before"):new ut(r.line,e,"after")};e>=0&&e<i.length;e+=t){var a=i[e],l=t>0==(1!=a.level),c=l?n.begin:s(n.end,-1) 1003if(a.from<=c&&c<a.to)return o(c,l) 1004if(c=l?a.from:s(a.to,-1),n.begin<=c&&c<n.end)return o(c,l)}},g=p(o+n,n,u) 1005if(g)return g 1006var m=n>0?u.end:s(u.begin,-1) 1007return null==m||n>0&&m==t.text.length||!(g=p(n>0?0:i.length-1,n,c(m)))?null:g}$a.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"},$a.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"},$a.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"},$a.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"]},$a.default=b?$a.macDefault:$a.pcDefault 1008var rl={selectAll:ta,singleSelection:function(e){return e.setSelection(e.getCursor("anch
1008or"),e.getCursor("head"),K)},killLine:function(e){return Za(e,(function(t){if(t.empty()){var r=rt(e.doc,t.head.line).text.length 1009return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:ut(t.head.line+1,0)}:{from:t.head,to:ut(t.head.line,r)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Za(e,(function(t){return{from:ut(t.from().line,0),to:vt(e.doc,ut(t.to().line+1,0))}}))},delLineLeft:function(e){return Za(e,(function(e){return{from:ut(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Za(e,(function(t){var r=e.charCoords(t.head,"div").top+5 1010return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Za(e,(function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div") 1011return{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(ut(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ut(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return nl(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return ol(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return il(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5 1012return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")}),Y)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5 1013return e.coordsChar({left:0,top:r},"div")}),Y)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div") 1014return n.ch<e.getLine(n.line).search(/\S/)?ol(e,t.head):n}),Y)},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("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=$(e.getLine(o.line),o.ch,n) 1015t.push(J(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Hi(e,(function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=rt(e.doc,i.line).text 1016if(o)if(i.ch==o.length&&(i=new ut(i.line,i.ch-1)),i.ch>0)i=new ut(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ut(i.line,i.ch-2),i,"+transpose") 1017else if(i.line>e.doc.first){var a=rt(e.doc,i.line-1).text 1018a&&(i=new ut(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),ut(i.line-1,a.length-1),i,"+transpose"))}r.push(new uo(i,i))}e.setSelections(r)}))},newlineAndIndent:function(e){return Hi(e,(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;
1018r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input") 1019t=e.listSelections() 1020for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0) 1021fi(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}} 1022function nl(e,t){var r=rt(e.doc,t),n=nr(r) 1023return n!=r&&(t=at(n)),el(!0,e,n,t,1)}function il(e,t){var r=rt(e.doc,t),n=ir(r) 1024return n!=r&&(t=at(n)),el(!0,e,r,t,-1)}function ol(e,t){var r=nl(e,t.line),n=rt(e.doc,r.line),i=ve(n,e.doc.direction) 1025if(!i||0==i[0].level){var o=Math.max(r.ch,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch 1026return ut(r.line,a?0:o,r.sticky)}return r}function al(e,t,r){if("string"==typeof t&&!(t=rl[t]))return!1 1027e.display.input.ensurePolled() 1028var n=e.display.shift,i=!1 1029try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=G}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function ll(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Va(t,e.state.keyMaps[n],r,e) 1030if(i)return i}return e.options.extraKeys&&Va(t,e.options.extraKeys,r,e)||Va(t,e.options.keyMap,r,e)}var sl=new q 1031function cl(e,t,r,n){var i=e.state.keySeq 1032if(i){if(Ga(t))return"handled" 1033if(/\'$/.test(t)?e.state.keySeq=null:sl.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),ul(e,i+" "+t,r,n))return!0}return ul(e,t,r,n)}function ul(e,t,r,n){var i=ll(e,t,n) 1034return"multi"==i&&(e.state.keySeq=t),"handled"==i&&Dr(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(Te(r),Jn(e)),!!i}function dl(e,t){var r=Xa(t,!0) 1035return!!r&&(t.shiftKey&&!e.state.keySeq?cl(e,"Shift-"+r,t,(function(t){return al(e,t,!0)}))||cl(e,r,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return al(e,t)})):cl(e,r,t,(function(t){return al(e,t)})))}function fl(e,t,r){return cl(e,"'"+r+"'",t,(function(t){return al(e,t,!0)}))}var hl=null 1036function pl(e){var t=this 1037if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=D(I(t)),Ce(t,e)))){a&&l<11&&27==e.keyCode&&(e.returnValue=!1) 1038var n=e.keyCode 1039t.display.shift=16==n||e.shiftKey 1040var i=dl(t,e) 1041f&&(hl=i?n:null,i||88!=n||_e||!(b?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),r&&!b&&!i&&46==n&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||gl(t)}}function gl(e){var t=e.display.lineDiv 1042function r(e){18!=e.keyCode&&e.altKey||(T(t,"CodeMirror-crosshair"),xe(document,"keyup",r),xe(document,"mouseover",r))}E(t,"CodeMirror-crosshair"),be(document,"keyup",r),be(document,"mouseover",r)}
1042function ml(e){16==e.keyCode&&(this.doc.sel.shift=!1),Ce(this,e)}function vl(e){var t=this 1043if(!(e.target&&e.target!=t.display.input.getField()||Kr(t.display,e)||Ce(t,e)||e.ctrlKey&&!e.altKey||b&&e.metaKey)){var r=e.keyCode,n=e.charCode 1044if(f&&r==hl)return hl=null,void Te(e) 1045if(!f||e.which&&!(e.which<10)||!dl(t,e)){var i=String.fromCharCode(n??r) 1046"\b"!=i&&(fl(t,e,i)||t.display.input.onKeyPress(e))}}}var yl,bl,wl=400,xl=function(e,t,r){this.time=e,this.pos=t,this.button=r} 1047function kl(e,t){var r=+new Date 1048return bl&&bl.compare(r,e,t)?(yl=bl=null,"triple"):yl&&yl.compare(r,e,t)?(bl=new xl(r,e,t),yl=null,"double"):(yl=new xl(r,e,t),bl=null,"single")}function Cl(e){var t=this,r=t.display 1049if(!(Ce(t,e)||r.activeTouch&&r.input.supportsTouch()))if(r.input.ensurePolled(),r.shift=e.shiftKey,Kr(r,e))s||(r.scroller.draggable=!1,setTimeout((function(){return r.scroller.draggable=!0}),100)) 1050else if(!zl(t,e)){var n=Rn(t,e),i=ze(e),o=n?kl(n,i):"single" 1051R(t).focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),n&&Sl(t,i,n,o,e)||(1==i?n?Ml(t,n,o,e):Pe(e)==r.scroller&&Te(e):2==i?(n&&_o(t.doc,n),setTimeout((function(){return r.input.focus()}),20)):3==i&&(S?t.display.input.onContextMenu(e):ti(t)))}}function Sl(e,t,r,n,i){var o="Click" 1052return"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o),cl(e,Ka(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,(function(t){if("string"==typeof t&&(t=rl[t]),!t)return!1 1053var n=!1 1054try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=G}finally{e.state.suppressEdits=!1}return n}))}function Ll(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{} 1055if(null==i.unit){var o=w?r.shiftKey&&r.metaKey:r.altKey 1056i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),null==i.addNew&&(i.addNew=b?r.metaKey:r.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(b?r.altKey:r.ctrlKey)),i}function Ml(e,t,r,n){a?setTimeout(_(ei,e),0):e.curOp.focus=D(I(e)) 1057var i,o=Ll(e,r,n),l=e.doc.sel 1058e.options.dragDrop&&We&&!e.isReadOnly()&&"single"==r&&(i=l.contains(t))>-1&&(dt((i=l.ranges[i]).from(),t)<0||t.xRel>0)&&(dt(i.to(),t)>0||t.xRel<0)?Tl(e,n,t,o):Nl(e,n,t,o)}function Tl(e,t,r,n){var i=e.display,o=!1,c=Fi(e,(function(t){s&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:ti(e)),xe(i.wrapper.ownerDocument,"mouseup",c),xe(i.wrapper.ownerDocument,"mousemove",u),xe(i.scroller,"dragstart",d),xe(i.scroller,"drop",c),o||(Te(t),n.addNew||_o(e.doc,r,null,null,n.extend),s&&!h||a&&9==l?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0} 1059s&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!n.moveOnDrag,be(i.wrapper.ownerDocument,"mouseup",c),be(i.wrapper.ownerDocument,"mousemove",u),be(i.scroller,"dragstart",d),be(i.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Ol(e,t,r){if("char"==r)return new uo(t,t) 1060if("word"==r)return e.findWordAt(t) 1061if("line"==r)return new uo(ut(t.line,0),vt(e.doc,ut(t.line+1,0))) 1062var n=r(e,t) 1063return new uo(n.from,n.to)}function Nl(e,t,r,n){a&&ti(e) 1064var i=e.display,o=e.doc 1065Te(t) 1066var l,s,c=o.sel,u=c.ranges 1067if(n.addNew&&!n.extend?(s=o.sel.contains(r),l=s>-1?u[s]:new uo(r,r)):(l=o.sel.primary(),s=o.sel.primIndex),"rectangle"==n.unit)n.addNew||(l=new uo(r,r)),r=Rn(e,t,!0,!0),s=-1 1068else{var d=Ol(e,r,n.unit) 1069l=n.extend?Ro(l,d.anchor,d.head,n.extend):d}n.addNew?-1==s?(s=u.length,Go(o,fo(e,u.concat([l]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&"char"==n.unit&&!n.extend?(Go(o,fo(e,u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):$o(o,s,l,X):(s=0,Go(o,new co([l],0),X),c=o.sel) 1070var f=r 1071function h(t){if(0!=dt(f,t))if(f=t,"rectangle"==n.unit){for(var i=[],a=e.options.tabSize,u=$(rt(o,r.line).text,r.ch,a),d=$(rt(o,t.line).text,t.ch,a),h=Math.min(u,d),p=Math.max(u,d),g=Math.min(r.line,t.line),m=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=m;g++){var v=rt(o,g).text,y=Z(v,h,a) 1072h==p?i.push(new uo(ut(g,y),ut(g,y))):v.length>y&&i.push(new uo(ut(g,y),ut(g,Z(v,p,a))))}i.length||i.push(new uo(r,r)),Go(o,fo(e,c.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=l,x=Ol(e,t,n.unit),k=w.anchor 1073dt(x.anchor,k)>0?(b=x.head,k=gt(w.from(),x.anchor)):(b=x.anchor,k=pt(w.to(),x.head)) 1074var C=c.ranges.slice(0) 1075C[s]=Al(e,new uo(vt(o,k),b)),Go(o,fo(e,C,s),X)}}var p=i.wrapper.getBoundingClientRect(),g=0 1076function m(t){var r=++g,a=Rn(e,t,!0,"rectangle"==n.unit) 1077if(a)if(0!=dt(a,f)){e.curOp.focus=D(I(e)),h(a) 1078var l=ai(i,o);(a.line>=l.to||a.line<l.from)&&setTimeout(Fi(e,(function(){g==r&&m(t)})),150)}
1078else{var s=t.clientY<p.top?-20:t.clientY>p.bottom?20:0 1079s&&setTimeout(Fi(e,(function(){g==r&&(i.scroller.scrollTop+=s,m(t))})),50)}}function v(t){e.state.selectingText=!1,g=1/0,t&&(Te(t),i.input.focus()),xe(i.wrapper.ownerDocument,"mousemove",y),xe(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var y=Fi(e,(function(e){0!==e.buttons&&ze(e)?m(e):v(e)})),b=Fi(e,v) 1080e.state.selectingText=b,be(i.wrapper.ownerDocument,"mousemove",y),be(i.wrapper.ownerDocument,"mouseup",b)}function Al(e,t){var r=t.anchor,n=t.head,i=rt(e.doc,r.line) 1081if(0==dt(r,n)&&r.sticky==n.sticky)return t 1082var o=ve(i) 1083if(!o)return t 1084var a=ge(o,r.ch,r.sticky),l=o[a] 1085if(l.from!=r.ch&&l.to!=r.ch)return t 1086var s,c=a+(l.from==r.ch==(1!=l.level)?0:1) 1087if(0==c||c==o.length)return t 1088if(n.line!=r.line)s=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0 1089else{var u=ge(o,n.ch,n.sticky),d=u-a||(n.ch-r.ch)*(1==l.level?-1:1) 1090s=u==c-1||u==c?d<0:d>0}var f=o[c+(s?-1:0)],h=s==(1==f.level),p=h?f.from:f.to,g=h?"after":"before" 1091return r.ch==p&&r.sticky==g?t:new uo(new ut(r.line,p,g),n)}function Pl(e,t,r,n){var i,o 1092if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY 1093else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1 1094n&&Te(t) 1095var a=e.display,l=a.lineDiv.getBoundingClientRect() 1096if(o>l.bottom||!Le(e,r))return Ne(t) 1097o-=l.top-a.viewOffset 1098for(var s=0;s<e.display.gutterSpecs.length;++s){var c=a.gutters.childNodes[s] 1099if(c&&c.getBoundingClientRect().right>=i)return ke(e,r,e,lt(e.doc,o),e.display.gutterSpecs[s].className,t),Ne(t)}}function zl(e,t){return Pl(e,t,"gutterClick",!0)}function Dl(e,t){Kr(e.display,t)||El(e,t)||Ce(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function El(e,t){return!!Le(e,"gutterContextMenu")&&Pl(e,t,"gutterContextMenu",!1)}function Wl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),vn(e)}xl.prototype.compare=function(e,t,r){return this.time+wl>e&&0==dt(t,this.pos)&&r==this.button} 1100var Hl={toString:function(){return"CodeMirror.Init"}},Fl={},Il={} 1101function jl(e){var t=e.optionHandlers 1102function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=Hl&&i(e,t,r)}:i)}e.defineOption=r,e.Init=Hl,r("value","",(function(e,t){return e.setValue(t)}),!0),r("mode",null,(function(e,t){e.doc.modeOption=t,bo(e)}),!0),r("indentUnit",2,bo,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(e){wo(e),vn(e),Bn(e)}),!0),r("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first 1103e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i) 1104if(-1==o)break 1105i=o+t.length,r.push(ut(n,o))}n++})) 1106for(var i=r.length-1;i>=0;i--)ca(e.doc,t,r[i],ut(r[i].line,r[i].ch+t.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,(function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=Hl&&e.refresh()})),r("specialCharPlaceholder",wr,(function(e){return e.refresh()}),!0),r("electricChars",!0),r("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),r("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),r("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),r("rtlMoveVisually",!x),r("wholeLineUpdateBefore",!0),r("theme","default",(function(e){Wl(e),ro(e)}),!0),r("keyMap","default",(function(e,t,r){var n=Ya(t),i=r!=Hl&&Ya(r) 1107i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,_l,!0),r("gutters",[],(function(e,t){e.display.gutterSpecs=eo(t,e.options.lineNumbers),ro(e)}),!0),r("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Fn(e.display)+"px":"0",e.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(e){return Ci(e)}),!0),r("scrollbarStyle","native",(function(e){Mi(e),Ci(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=eo(e.options.gutters,t),ro(e)}
1107),!0),r("firstLineNumber",1,ro,!0),r("lineNumberFormatter",(function(e){return e}),ro,!0),r("showCursorWhenSelecting",!1,Kn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(e,t){"nocursor"==t&&(ni(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),r("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),r("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),r("dragDrop",!0,Rl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Kn,!0),r("singleCursorHeightPerLine",!0,Kn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,wo,!0),r("addModeClass",!1,wo,!0),r("pollInterval",100),r("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),r("historyEventDelay",1250),r("viewportMargin",10,(function(e){return e.refresh()}),!0),r("maxHighlightLength",1e4,wo,!0),r("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),r("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),r("autofocus",null),r("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),r("phrases",null)}function Rl(e,t,r){if(!t!=!(r&&r!=Hl)){var n=e.display.dragFunctions,i=t?be:xe 1108i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function _l(e){e.options.lineWrapping?(E(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),fr(e)),jn(e),Bn(e),vn(e),setTimeout((function(){return Ci(e)}),100)}function Bl(e,t){var r=this 1109if(!(this instanceof Bl))return new Bl(e,t) 1110this.options=t=t?B(t):{},B(Fl,t,!1) 1111var n=t.value 1112"string"==typeof n?n=new Oa(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n 1113var i=new Bl.inputStyles[t.inputStyle](this),o=this.display=new no(e,n,i,t) 1114for(var c in o.wrapper.CodeMirror=this,Wl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Mi(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&&!y&&o.input.focus(),a&&l<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),$l(this),Ha(),Oi(this),this.curOp.forceUpdate=!0,So(this,n),t.autofocus&&!y||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&ri(r)}),20):ni(this),Il)Il.hasOwnProperty(c)&&Il[c](this,t[c],Hl) 1115Ji(this),t.finishInit&&t.finishInit(this) 1116for(var u=0;u<ql.length;++u)ql[u](this) 1117Ni(this),s&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function $l(e){var t=e.display 1118be(t.scroller,"mousedown",Fi(e,Cl)),be(t.scroller,"dblclick",a&&l<11?Fi(e,(function(t){if(!Ce(e,t)){var r=Rn(e,t) 1119if(r&&!zl(e,t)&&!Kr(e.display,t)){Te(t) 1120var n=e.findWordAt(r) 1121_o(e.doc,n.anchor,n.head)}}})):function(t){return Ce(e,t)||Te(t)}),be(t.scroller,"contextmenu",(function(t){return Dl(e,t)})),be(t.input.getField(),"contextmenu",(function(r){t.scroller.contains(r.target)||Dl(e,r)})) 1122var r,n={end:0} 1123function i(){t.activeTouch&&(r=setTimeout((function(){return t.activeTouch=null}),1e3),(n=t.activeTouch).end=+new Date)}function o(e){if(1!=e.touches.length)return!1 1124var t=e.touches[0] 1125return t.radiusX<=1&&t.radiusY<=1}function s(e,t){if(null==t.left)return!0 1126var r=t.left-e.left,n=t.top-e.top 1127return r*r+n*n>400}be(t.scroller,"touchstart",(function(i){if(!Ce(e,i)&&!o(i)&&!zl(e,i)){t.input.ensurePolled(),clearTimeout(r) 1128var a=+new Date 1129t.activeTouch={start:a,moved:!1,prev:a-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),be(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),be(t.scroller,"touchend",(function(r){var n=t.activeTouch 1130if(n&&!Kr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var o,a=e.coordsChar(t.activeTouch,"page") 1131o=!n.prev||s(n,n.prev)?new uo(a,a):!n.prev.prev||s(n,n.prev.prev)?e.findWordAt(a):new uo(ut(a.line,0),vt(e.doc,ut(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Te(r)}i()})),be(t.scroller,"touchcancel",i),be(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(vi(e,t.scroller.scrollTop),bi(e,t.scroller.scrollLeft,!0),ke(e,"scroll",e))})),be(t.scroller,"mousewheel",(function(t){return so(e,t)})),be(t.scroller,"DOMMouseScroll",(function(t){return so(e,t)})),be(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){Ce(e,t)||Ae(t)},over:function(t){Ce(e,t)||(za(e,t),Ae(t))},start:function(t){return Pa(e,t)},drop:Fi(e,Aa),leave:function(t){Ce(e,t)||Da(e)}} 1132var c=t.input.getField() 1133be(c,"keyup",(function(t){return ml.call(e,t)})),be(c,"keydown",Fi(e,pl)),be(c,"keypress",Fi(e,vl)),be(c,"focus",(function(t){return ri(e,t)})),be(c,"blur",(function(t){return ni(e,t)}))}Bl.defaults=Fl,Bl.optionHandlers=Il 1134var ql=[] 1135function Ul(e,t,r,n){var i,o=e.doc 1136null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=St(e,t).state:r="prev") 1137var a=e.options.tabSize,l=rt(o,t),s=$(l.text,null,a) 1138l.stateAfter&&(l.stateAfter=null) 1139var c,u=l.text.match(/^\s*/)[0] 1140if(n||/\S/.test(l.text)){if("smart"==r&&((c=o.mode.indent(i,l.text.slice(u.length),l.text))==G||c>150)){if(!n)return 1141r="prev"}}else c=0,r="not" 1142"prev"==r?c=t>o.first?$(rt(o,t-1).text,null,a):0:"add"==r?c=s+e.options.indentUnit:"subtract"==r?c=s-e.options.indentUnit:"number"==typeof r&&(c=s+r),c=Math.max(0,c) 1143var d="",f=0 1144if(e.options.indentWithTabs)for(var h=Math.floor(c/a);h;--h)f+=a,d+="\t" 1145if(f<c&&(d+=J(c-f)),d!=u)return ca(o,d,ut(t,0),ut(t,u.length),"+input"),l.stateAfter=null,!0 1146for(var p=0;p<o.sel.ranges.length;p++){var g=o.sel.ranges[p] 1147if(g.head.line==t&&g.head.ch<u.length){var m=ut(t,u.length) 1148$o(o,p,new uo(m,m)) 1149break}}}Bl.defineInitHook=function(e){return ql.push(e)} 1150var Vl=null 1151function Gl(e){Vl=e}function Kl(e,t,r,n,i){var o=e.doc 1152e.display.shift=!1,n||(n=o.sel) 1153var a=+new Date-200,l="paste"==i||e.state.pasteIncoming>a,s=je(t),c=null 1154if(l&&n.ranges.length>1)if(Vl&&Vl.text.join("\n")==t){if(n.ranges.length%Vl.text.length==0){c=[] 1155for(var u=0;u<Vl.text.length;u++)c.push(o.splitLines(Vl.text[u]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(c=te(s,(function(e){return[e]}))) 1156for(var d=e.curOp.updateInput,f=n.ranges.length-1;f>=0;f--){var h=n.ranges[f],p=h.from(),g=h.to() 1157h.empty()&&(r&&r>0?p=ut(p.line,p.ch-r):e.state.overwrite&&!l?g=ut(g.line,Math.min(rt(o,g.line).text.length,g.ch+ee(s).length)):l&&Vl&&Vl.lineWise&&Vl.text.join("\n")==s.join("\n")&&(p=g=ut(p.line,0))) 1158var m={from:p,to:g,text:c?c[f%c.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")} 1159na(e.doc,m),Dr(e,"inputRead",e,m)}t&&!l&&Yl(e,t),fi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Xl(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text") 1160if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||Hi(t,(function(){return Kl(t,r,0,null,"paste")})),!0}function Yl(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n] 1161if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1 1162if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=Ul(e,i.head.line,"smart") 1163break}}else o.electricInput&&o.electricInput.test(rt(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Ul(e,i.head.line,"smart")) 1164a&&Dr(e,"electricInput",e,i.head.line)}}}function Zl(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:ut(i,0),head:ut(i+1,0)} 1165r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function Ql(e,t,r,n){e.setAttribute("autocorrect",r?"on":"off"),e.setAttribute("autocapitalize",n?"on":"off"),e.setAttribute("spellcheck",!!t)}
1165function Jl(){var e=A("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=A("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;") 1166return s?e.style.width="1000px":e.setAttribute("wrap","off"),m&&(e.style.border="1px solid black"),t}function es(e){var t=e.optionHandlers,r=e.helpers={} 1167e.prototype={constructor:e,focus:function(){R(this).focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e] 1168n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&Fi(this,t[e])(this,r,i),ke(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Ya(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:Ii((function(t,r){var n=t.token?t:e.getMode(this.options,t) 1169if(n.startState)throw new Error("Overlays may not be stateful.") 1170re(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},(function(e){return e.priority})),this.state.modeGen++,Bn(this)})),removeOverlay:Ii((function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec 1171if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void Bn(this)}})),indentLine:Ii((function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),st(this.doc,e)&&Ul(this,e,t,r)})),indentSelection:Ii((function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n] 1172if(i.empty())i.head.line>r&&(Ul(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&fi(this)) 1173else{var o=i.from(),a=i.to(),l=Math.max(r,o.line) 1174r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1 1175for(var s=l;s<r;++s)Ul(this,s,e) 1176var c=this.doc.sel.ranges 11770==o.ch&&t.length==c.length&&c[n].from().ch>0&&$o(this.doc,n,new uo(o,c[n].to()),K)}}})),getTokenAt:function(e,t){return Nt(this,e,t)},getLineTokens:function(e,t){return Nt(this,ut(e),t,!0)},getTokenTypeAt:function(e){e=vt(this.doc,e) 1178var t,r=Ct(this,rt(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch 1179if(0==o)t=r[2] 1180else for(;;){var a=n+i>>1 1181if((a?r[2*a-1]:0)>=o)i=a 1182else{if(!(r[2*a+1]<o)){t=r[2*a+2] 1183break}n=a+1}}var l=t?t.indexOf("overlay "):-1 1184return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var r=this.doc.mode 1185return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[] 1186if(!r.hasOwnProperty(t))return n 1187var i=r[t],o=this.getModeAt(e) 1188if("string"==typeof o[t])i[o[t]]&&n.push(i[o[t]]) 1189else if(o[t])for(var a=0;a<o[t].length;a++){var l=i[o[t][a]] 1190l&&n.push(l)}else o.helperType&&i[o.helperType]?n.push(i[o.helperType]):i[o.name]&&n.push(i[o.name]) 1191for(var s=0;s<i._global.length;s++){var c=i._global[s] 1192c.pred(o,this)&&-1==U(n,c.val)&&n.push(c.val)}return n},getStateAfter:function(e,t){var r=this.doc 1193return St(this,(e=mt(r,e??r.first+r.size-1))+1,t).state},cursorCoords:function(e,t){var r=this.doc.sel.primary() 1194return Sn(this,null==e?r.head:"object"==typeof e?vt(this.doc,e):e?r.from():r.to(),t||"page")},charCoords:function(e,t){return Cn(this,vt(this.doc,e),t||"page")},coordsChar:function(e,t){return Tn(this,(e=kn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=kn(this,{top:e,left:0},t||"page").top,lt(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,i=!1 1195if("number"==typeof e){var o=this.doc.first+this.doc.size-1 1196e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),n=rt(this.doc,e)}else n=e 1197return xn(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-ur(n):0)},defaultTextHeight:function(){return En(this.display)},defaultCharWidth:function(){return Wn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display,a=(e=Sn(this,vt(this.doc,e))).bottom,l=e.left 1198if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)a=e.top 1199else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),r&&ci(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Ii(pl),triggerOnKeyPress:Ii(vl),triggerOnKeyUp:ml,triggerOnM
1199ouseDown:Ii(Cl),execCommand:function(e){if(rl.hasOwnProperty(e))return rl[e].call(null,this)},triggerElectric:Ii((function(e){Yl(this,e)})),findPosH:function(e,t,r,n){var i=1 1200t<0&&(i=-1,t=-t) 1201for(var o=vt(this.doc,e),a=0;a<t&&!(o=ts(this.doc,o,i,r,n)).hitSide;++a);return o},moveH:Ii((function(e,t){var r=this 1202this.extendSelectionsBy((function(n){return r.display.shift||r.doc.extend||n.empty()?ts(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()}),Y)})),deleteH:Ii((function(e,t){var r=this.doc.sel,n=this.doc 1203r.somethingSelected()?n.replaceSelection("",null,"+delete"):Za(this,(function(r){var i=ts(n,r.head,e,t,!1) 1204return e<0?{from:i,to:r.head}:{from:r.head,to:i}}))})),findPosV:function(e,t,r,n){var i=1,o=n 1205t<0&&(i=-1,t=-t) 1206for(var a=vt(this.doc,e),l=0;l<t;++l){var s=Sn(this,a,"div") 1207if(null==o?o=s.left:s.left=o,(a=rs(this,s,i,r)).hitSide)break}return a},moveV:Ii((function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected() 1208if(n.extendSelectionsBy((function(a){if(o)return e<0?a.from():a.to() 1209var l=Sn(r,a.head,"div") 1210null!=a.goalColumn&&(l.left=a.goalColumn),i.push(l.left) 1211var s=rs(r,l,e,t) 1212return"page"==t&&a==n.sel.primary()&&di(r,Cn(r,s,"div").top-l.top),s}),Y),i.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=i[a]})),findWordAt:function(e){var t=rt(this.doc,e.line).text,r=e.ch,n=e.ch 1213if(t){var i=this.getHelper(e,"wordChars") 1214"before"!=e.sticky&&n!=t.length||!r?++n:--r 1215for(var o=t.charAt(r),a=le(o,i)?function(e){return le(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!le(e)};r>0&&a(t.charAt(r-1));)--r 1216for(;n<t.length&&a(t.charAt(n));)++n}return new uo(ut(e.line,r),ut(e.line,n))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?E(this.display.cursorDiv,"CodeMirror-overwrite"):T(this.display.cursorDiv,"CodeMirror-overwrite"),ke(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==D(I(this))},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Ii((function(e,t){hi(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller 1217return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Qr(this)-this.display.barHeight,width:e.scrollWidth-Qr(this)-this.display.barWidth,clientHeight:en(this),clientWidth:Jr(this)}},scrollIntoView:Ii((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:ut(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?pi(this,e):mi(this,e.from,e.to,e.margin)})),setSize:Ii((function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e} 1218null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&mn(this) 1219var i=this.display.viewFrom 1220this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){$n(r,i,"widget") 1221break}++i})),this.curOp.forceUpdate=!0,ke(this,"refresh",this)})),operation:function(e){return Hi(this,e)},startOperation:function(){return Oi(this)},endOperation:function(){return Ni(this)},refresh:Ii((function(){var e=this.display.cachedTextHeight 1222Bn(this),this.curOp.forceUpdate=!0,vn(this),hi(this,this.doc.scrollLeft,this.doc.scrollTop),Yi(this.display),(null==e||Math.abs(e-En(this.display))>.5||this.options.lineWrapping)&&jn(this),ke(this,"refresh",this)})),swapDoc:Ii((function(e){var t=this.doc 1223return t.cm=null,this.state.selectingText&&this.state.selectingText(),So(this,e),vn(this),this.display.input.reset(),hi(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Dr(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases 1224return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Me(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}function ts(e,t,r,n,i){var o=t,a=r,l=rt(e,t.line),s=i&&"rtl"==e.direction?-r:r 1225function c(){var r=t.line+s 1226return!(r<e.first||r>=e.first+e.size)&&(t=new ut(r,t.ch,t.sticky),l=rt(e,r))}function u(o){var a 1227if("codepoint"==n){var u=l.text.charCodeAt(t.ch+(r>0?0:-1)) 1228if(isNaN(u))a=null 1229else{var d=r>0?u>=55296&&u<56320:u>=56320&&u<57343 1230a=new ut(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(d?2:1))),-r)}}else a=i?tl(e.cm,l,t,r):Ja(l,t,r) 1231if(null==a){if(o||!c())return!1 1232t=el(i,e.cm,l,t.line,s)}else t=a 1233return!0}if("char"==n||"codepoint"==n)u() 1234else if("column"==n)u(!0) 1235else if("word"==n||"group"==n)for(var d=null,f="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(r<0)||u(!p);p=!1){var g=l.text.charAt(t.ch)||"\n",m=le(g,h)?"w":f&&"\n"==g?"n":!f||/\s/.test(g)?null:"p" 1236if(!f||p||m||(m="s"),d&&d!=m){r<0&&(r=1,u(),t.sticky="after") 1237break}if(m&&(d=m),r>0&&!u(!p))break}var v=Jo(e,t,o,a,!0) 1238return ft(o,v)&&(v.hitSide=!0),v}function rs(e,t,r,n){var i,o,a=e.doc,l=t.left 1239if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,R(e).innerHeight||a(e).documentElement.clientHeight),c=Math.max(s-.5*En(e.display),3) 1240i=(r>0?t.bottom:t.top)+r*c}else"line"==n&&(i=r>0?t.bottom+3:t.top-3) 1241for(;(o=Tn(e,l,i)).outside;){if(r<0?i<=0:i>=a.height){o.hitSide=!0 1242break}i+=5*r}return o}var ns=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} 1243function is(e,t){var r=an(e,t.line) 1244if(!r||r.hidden)return null 1245var n=rt(e.doc,t.line),i=rn(r,n,t.line),o=ve(n,e.doc.direction),a="left" 1246o&&(a=ge(o,t.ch)%2?"right":"left") 1247var l=dn(i.map,t.ch,a) 1248return l.offset="right"==l.collapse?l.end:l.start,l}function os(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0 1249return!1}function as(e,t){return t&&(e.bad=!0),e}function ls(e,t,r,n,i){var o="",a=!1,l=e.doc.lineSeparator(),s=!1 1250function c(e){return function(t){return t.id==e}}function u(){a&&(o+=l,s&&(o+=l),a=s=!1)}function d(e){e&&(u(),o+=e)}function f(t){if(1==t.nodeType){var r=t.getAttribute("cm-text") 1251if(r)return void d(r) 1252var o,h=t.getAttribute("cm-marker") 1253if(h){var p=e.findMarks(ut(n,0),ut(i+1,0),c(+h)) 1254return void(p.length&&(o=p[0].find(0))&&d(nt(e.doc,o.from,o.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return
1255var g=/^(pre|div|p|li|table|br)$/i.test(t.nodeName) 1256if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return 1257g&&u() 1258for(var m=0;m<t.childNodes.length;m++)f(t.childNodes[m]);/^(pre|p)$/i.test(t.nodeName)&&(s=!0),g&&(a=!0)}else 3==t.nodeType&&d(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;f(t),t!=r;)t=t.nextSibling,s=!1 1259return o}function ss(e,t,r){var n 1260if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return as(e.clipPos(ut(e.display.viewTo-1)),!0) 1261t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null 1262if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i] 1263if(o.node==n)return cs(o,t,r)}}function cs(e,t,r){var n=e.text.firstChild,i=!1 1264if(!t||!z(n,t))return as(ut(at(e.line),0),!0) 1265if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?ee(e.rest):e.line 1266return as(ut(at(o),o.text.length),i)}var a=3==t.nodeType?t:null,l=t 1267for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,r&&(r=a.nodeValue.length));l.parentNode!=n;)l=l.parentNode 1268var s=e.measure,c=s.maps 1269function u(t,r,n){for(var i=-1;i<(c?c.length:0);i++)for(var o=i<0?s.map:c[i],a=0;a<o.length;a+=3){var l=o[a+2] 1270if(l==t||l==r){var u=at(i<0?e.line:e.rest[i]),d=o[a]+n 1271return(n<0||l!=t)&&(d=o[a+(n?1:0)]),ut(u,d)}}}var d=u(a,l,r) 1272if(d)return as(d,i) 1273for(var f=l.nextSibling,h=a?a.nodeValue.length-r:0;f;f=f.nextSibling){if(d=u(f,f.firstChild,0))return as(ut(d.line,d.ch-h),i) 1274h+=f.textContent.length}for(var p=l.previousSibling,g=r;p;p=p.previousSibling){if(d=u(p,p.firstChild,-1))return as(ut(d.line,d.ch+g),i) 1275g+=p.textContent.length}}ns.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv 1276function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0 1277if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(o(e)&&!Ce(n,e)){if(n.somethingSelected())Gl({lineWise:!1,text:n.getSelections()}),"cut"==e.type&&n.replaceSelection("",null,"cut") 1278else{if(!n.options.lineWiseCopyCut)return 1279var t=Zl(n) 1280Gl({lineWise:!0,text:t.text}),"cut"==e.type&&n.operation((function(){n.setSelections(t.ranges,0,K),n.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData() 1281var a=Vl.text.join("\n") 1282if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var l=Jl(),s=l.firstChild 1283Ql(s),n.display.lineSpace.insertBefore(l,n.display.lineSpace.firstChild),s.value=Vl.text.join("\n") 1284var c=D(j(i)) 1285H(s),setTimeout((function(){n.display.lineSpace.removeChild(l),c.focus(),c==i&&r.showPrimarySelection()}),50)}}i.contentEditable=!0,Ql(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize),be(i,"paste",(function(e){!o(e)||Ce(n,e)||Xl(e,n)||l<=11&&setTimeout(Fi(n,(function(){return t.updateFromDOM()})),20)})),be(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),be(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),be(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),be(i,"touchstart",(function(){return r.forceCompositionEnd()})),be(i,"input",(function(){t.composing||t.readFromDOMSoon()})),be(i,"copy",a),be(i,"cut",a)},ns.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},ns.prototype.prepareSelection=function(){var e=Xn(this.cm,!1) 1286return e.focus=D(j(this.div))==this.div,e},ns.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},ns.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ns.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),i=n.from(),o=n.to() 1287if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges() 1288else{var a=ss(t,e.anchorNode,e.anchorOffset),l=ss(t,e.focusNode,e.focusOffset) 1289if(!a||a.bad||!l||l.bad||0!=dt(gt(a,l),i)||0!=dt(pt(a,l),o)){var s=t.display.view,c=i.line>=t.display.viewFrom&&is(t,i)||{node:s[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&is(t,o) 1290if(!u){var d=s[s.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map 1291u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(c&&u){var h,p=e.rangeCount&&e.getRangeAt(0) 1292try{h=M(c.node,c.offset,u.offset,u.node)}catch(e){}h&&(!r&&t.state.focused?(e.collapse(c.node,c.offset),h.collapsed||(e.removeAllRanges(),e.addRange(h))):(e.removeAllRanges(),e.addRange(h)),p&&null==e.anchorNode?e.addRange(p):r&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},ns.prototype.startGracePeriod=function(){var e=this 1293clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},ns.prototype.showMultipleSelections=function(e){N(this.cm.display.cursorDiv,e.cursors),N(this.cm.display.selectionDiv,e.selection)},ns.prototype.rememberSelection=function(){var e=this.getSelection() 1294this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},ns.prototype.selectionInEditor=function(){var e=this.getSelection() 1295if(!e.rangeCount)return!1 1296var t=e.getRangeAt(0).commonAncestorContainer 1297return z(this.div,t)}
1297,ns.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&D(j(this.div))==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},ns.prototype.blur=function(){this.div.blur()},ns.prototype.getField=function(){return this.div},ns.prototype.supportsTouch=function(){return!0},ns.prototype.receivedFocus=function(){var e=this,t=this 1298function r(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,r))}this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):Hi(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,r)},ns.prototype.selectionChanged=function(){var e=this.getSelection() 1299return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},ns.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm 1300if(v&&u&&this.cm.display.gutterSpecs.length&&os(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus() 1301if(!this.composing){this.rememberSelection() 1302var r=ss(t,e.anchorNode,e.anchorOffset),n=ss(t,e.focusNode,e.focusOffset) 1303r&&n&&Hi(t,(function(){Go(t.doc,ho(r,n),K),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)}))}}},ns.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null) 1304var e,t,r,n=this.cm,i=n.display,o=n.doc.sel.primary(),a=o.from(),l=o.to() 1305if(0==a.ch&&a.line>n.firstLine()&&(a=ut(a.line-1,rt(n.doc,a.line-1).length)),l.ch==rt(n.doc,l.line).text.length&&l.line<n.lastLine()&&(l=ut(l.line+1,0)),a.line<i.viewFrom||l.line>i.viewTo-1)return!1 1306a.line==i.viewFrom||0==(e=_n(n,a.line))?(t=at(i.view[0].line),r=i.view[0].node):(t=at(i.view[e].line),r=i.view[e-1].node.nextSibling) 1307var s,c,u=_n(n,l.line) 1308if(u==i.view.length-1?(s=i.viewTo-1,c=i.lineDiv.lastChild):(s=at(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!r)return!1 1309for(var d=n.doc.splitLines(ls(n,r,c,t,s)),f=nt(n.doc,ut(t,0),ut(s,rt(n.doc,s).text.length));d.length>1&&f.length>1;)if(ee(d)==ee(f))d.pop(),f.pop(),s-- 1310else{if(d[0]!=f[0])break 1311d.shift(),f.shift(),t++}for(var h=0,p=0,g=d[0],m=f[0],v=Math.min(g.length,m.length);h<v&&g.charCodeAt(h)==m.charCodeAt(h);)++h 1312for(var y=ee(d),b=ee(f),w=Math.min(y.length-(1==d.length?h:0),b.length-(1==f.length?h:0));p<w&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p 1313if(1==d.length&&1==f.length&&t==a.line)for(;h&&h>a.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)h--,p++ 1314d[d.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(h).replace(/\u200b+$/,"") 1315var x=ut(t,h),k=ut(s,f.length?ee(f).length-p:0) 1316return d.length>1||d[0]||dt(x,k)?(ca(n.doc,d,x,k,"+input"),!0):void 0},ns.prototype.ensurePolled=function(){this.forceCompositionEnd()},ns.prototype.reset=function(){this.forceCompositionEnd()},ns.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ns.prototype.readFromDOMSoon=function(){var e=this 1317null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return 1318e.composing=null}e.updateFromDOM()}),80))},ns.prototype.updateFromDOM=function(){var e=this 1319!this.cm.isReadOnly()&&this.pollContent()||Hi(this.cm,(function(){return Bn(e.cm)}))},ns.prototype.setUneditable=function(e){e.contentEditable="false"},ns.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Fi(this.cm,Kl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},ns.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},ns.prototype.onContextMenu=function(){},ns.prototype.resetPosition=function(){},ns.prototype.needsContentAttribute=!0 1320var us=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new q,this.hasSelection=!1,this.composing=null,this.resetting=!1} 1321function ds(e,t){if((t=t?B(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=D(j(e)) 1322t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=l.getValue()}var i 1323if(e.form&&(be(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form 1324i=o.submit 1325try{var a=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(xe(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none" 1326var l=Bl((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t) 1327return l}function fs(e){e.off=xe,e.on=be,e.wheelEventPixels=lo,e.Doc=Oa,e.splitLines=je,e.countColumn=$,e.findColumn=Z,e.isWordChar=ae,e.Pass=G,e.signal=ke,e.Line=hr,e.changeEnd=po,e.scrollbarModel=Li,e.Pos=ut,e.cmpPos=dt,e.modes=qe,e.mimeModes=Ue,e.resolveMode=Ke,e.getMode=Xe,e.modeExtensions=Ye,e.extendMode=Ze,e.copyState=Qe,e.startState=et,e.innerMode=Je,e.commands=rl,e.keyMap=$a,e.keyName=Xa,e.isModifierKey=Ga,e.lookupKey=Va,e.normalizeKeyMap=Ua,e.StringStream=tt,e.SharedTextMarker=ka,e.TextMarker=wa,e.LineWidget=ma,e.e_preventDefault=Te,e.e_stopPropagation=Oe,e.e_stop=Ae,e.addClass=E,e.contains=z,e.rmClass=T,e.keyNames=ja}us.prototype.init=function(e){var t=this,r=this,n=this.cm 1328this.createField(e) 1329var i=this.textarea 1330function o(e){if(!Ce(n,e)){if(n.somethingSelected())Gl({lineWise:!1,text:n.getSelections()}) 1331else{if(!n.options.lineWiseCopyCut)return 1332var t=Zl(n) 1333Gl({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,K):(r.prevInput="",i.value=t.text.join("\n"),H(i))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),be(i,"input",(function(){a&&l>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}
1333)),be(i,"paste",(function(e){Ce(n,e)||Xl(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),be(i,"cut",o),be(i,"copy",o),be(e.scroller,"paste",(function(t){if(!Kr(e,t)&&!Ce(n,t)){if(!i.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus() 1334var o=new Event("paste") 1335o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),be(e.lineSpace,"selectstart",(function(t){Kr(e,t)||Te(t)})),be(i,"compositionstart",(function(){var e=n.getCursor("from") 1336r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),be(i,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},us.prototype.createField=function(e){this.wrapper=Jl(),this.textarea=this.wrapper.firstChild 1337var t=this.cm.options 1338Ql(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},us.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},us.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Xn(e) 1339if(e.options.moveInputWithCursor){var i=Sn(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect() 1340n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},us.prototype.showSelection=function(e){var t=this.cm.display 1341N(t.cursorDiv,e.cursors),N(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},us.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm 1342if(this.resetting=!0,t.somethingSelected()){this.prevInput="" 1343var r=t.getSelection() 1344this.textarea.value=r,t.state.focused&&H(this.textarea),a&&l>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",a&&l>=9&&(this.hasSelection=null)) 1345this.resetting=!1}},us.prototype.getField=function(){return this.textarea},us.prototype.supportsTouch=function(){return!1},us.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||D(j(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(e){}},us.prototype.blur=function(){this.textarea.blur()},us.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},us.prototype.receivedFocus=function(){this.slowPoll()},us.prototype.slowPoll=function(){var e=this 1346this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},us.prototype.fastPoll=function(){var e=!1,t=this 1347function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}t.pollingFast=!0,t.polling.set(20,r)},us.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput 1348if(this.contextMenuPending||this.resetting||!t.state.focused||Re(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1 1349var i=r.value 1350if(i==n&&!t.somethingSelected())return!1 1351if(a&&l>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1 1352if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0) 1353if(8203!=o||n||(n="â"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var s=0,c=Math.min(n.length,i.length);s<c&&n.charCodeAt(s)==i.charCodeAt(s);)++s 1354return Hi(t,(function(){Kl(t,i.slice(s),n.length-s,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},us.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},us.prototype.onKeyPress=function(){a&&l>=9&&(this.hasSelection=null),this.fastPoll()},us.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea 1355t.contextMenuPending&&t.contextMenuPending() 1356var o=Rn(r,e),c=n.scroller.scrollTop 1357if(o&&!f){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&Fi(r,Go)(r.doc,ho(o),K) 1358var u,d=i.style.cssText,h=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect() 1359if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(u=i.ownerDocument.defaultView.scrollY),n.input.focus(),s&&i.ownerDocument.defaultView.scrollTo(null,u),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),a&&l>=9&&m(),S){Ae(e) 1360var g=function(){xe(window,"mouseup",g),setTimeout(v,20)} 1361be(window,"mouseup",g)}else setTimeout(v,50)}function m(){if(null!=i.selectionStart){var e=r.somethingSelected(),o="â"+(e?i.value:"") 1362i.value="â",i.value=o,t.prevInput=e?"":"â",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=h,i.style.cssText=d,a&&l<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&l<9)&&m() 1363var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"â"==t.prevInput?Fi(r,ta)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())} 1364n.detectingSelectAll=setTimeout(o,200)}}},us.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},us.prototype.setUneditable=function(){},us.prototype.needsContentAttribute=!1,jl(Bl),es(Bl) 1365var hs="iter insert remove copy getEditor constructor".split(" ") 1366for(var ps in Oa.prototype)Oa.prototype.hasOwnProperty(ps)&&U(hs,ps)<0&&(Bl.prototype[ps]=function(e){return function(){return e.apply(this.doc,arguments)}}(Oa.prototype[ps])) 1367return Me(Oa),Bl.inputStyles={textarea:us,contenteditable:ns},Bl.defineMode=function(e){Bl.defaults.mode||"null"==e||(Bl.defaults.mode=e),
1367Ve.apply(this,arguments)},Bl.defineMIME=Ge,Bl.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Bl.defineMIME("text/plain","null"),Bl.defineExtension=function(e,t){Bl.prototype[e]=t},Bl.defineDocExtension=function(e,t){Oa.prototype[e]=t},Bl.fromTextArea=ds,fs(Bl),Bl.version="5.65.20",Bl}()},46363:(e,t,r)=>{ 1368// CodeMirror, copyright (c) by Marijn Haverbeke and others 1369// Distributed under an MIT license: https://codemirror.net/5/LICENSE 1370!function(e){"use strict" 1371function t(e){for(var t={},r=0;r<e.length;++r)t[e[r].toLowerCase()]=!0 1372return t}e.defineMode("css",(function(t,r){var n=r.inline 1373r.propertyKeywords||(r=e.resolveMode("text/css")) 1374var i,o,a=t.indentUnit,l=r.tokenHooks,s=r.documentTypes||{},c=r.mediaTypes||{},u=r.mediaFeatures||{},d=r.mediaValueKeywords||{},f=r.propertyKeywords||{},h=r.nonStandardPropertyKeywords||{},p=r.fontProperties||{},g=r.counterDescriptors||{},m=r.colorKeywords||{},v=r.valueKeywords||{},y=r.allowNested,b=r.lineComment,w=!0===r.supportsAtComponent,x=!1!==t.highlightNonStandardPropertyKeywords 1375function k(e,t){return i=t,e}function C(e,t){var r=e.next() 1376if(l[r]){var n=l[r](e,t) 1377if(!1!==n)return n}return"@"==r?(e.eatWhile(/[\w\\\-]/),k("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?k(null,"compare"):'"'==r||"'"==r?(t.tokenize=S(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),k("atom","hash")):"!"==r?(e.match(/^\s*\w*/),k("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),k("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?k(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?k("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?k(null,r):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=L),k("variable callee","variable")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),k("property","word")):k(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),k("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?k("variable-2","variable-definition"):k("variable-2","variable")):e.match(/^\w+-/)?k("meta","meta"):void 0}function S(e){return function(t,r){for(var n,i=!1;null!=(n=t.next());){if(n==e&&!i){")"==e&&t.backUp(1) 1378break}i=!i&&"\\"==n}return(n==e||!i&&")"!=e)&&(r.tokenize=null),k("string","string")}}function L(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=S(")"),k(null,"(")}function M(e,t,r){this.type=e,this.indent=t,this.prev=r}function T(e,t,r,n){return e.context=new M(r,t.indentation()+(!1===n?0:a),e.context),r}function O(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function N(e,t,r){return z[r.context.type](e,t,r)}function A(e,t,r,n){for(var i=n||1;i>0;i--)r.context=r.context.prev 1379return N(e,t,r)}function P(e){var t=e.current().toLowerCase() 1380o=v.hasOwnProperty(t)?"atom":m.hasOwnProperty(t)?"keyword":"variable"}var z={top:function(e,t,r){if("{"==e)return T(r,t,"block") 1381if("}"==e&&r.context.prev)return O(r) 1382if(w&&/@component/i.test(e))return T(r,t,"atComponentBlock") 1383if(/^@(-moz-)?document$/i.test(e))return T(r,t,"documentTypes") 1384if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return T(r,t,"atBlock") 1385if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before" 1386if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes" 1387if(e&&"@"==e.charAt(0))return T(r,t,"at") 1388if("hash"==e)o="builtin" 1389else if("word"==e)o="tag" 1390else{if("variable-definition"==e)return"maybeprop" 1391if("interpolation"==e)return T(r,t,"interpolation") 1392if(":"==e)return"pseudo" 1393if(y&&"("==e)return T(r,t,"parens")}return r.context.type},block:function(e,t,r){if("word"==e){var n=t.current().toLowerCase() 1394return f.hasOwnProperty(n)?(o="property","maybeprop"):h.hasOwnProperty(n)?(o=x?"string-2":"property","maybeprop"):y?(o=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==e?"block":y||"hash"!=e&&"qualifier"!=e?z.top(e,t,r):(o="error","block")},maybeprop:function(e,t,r){return":"==e?T(r,t,"prop"):N(e,t,r)},prop:function(e,t,r){if(";"==e)return O(r) 1395if("{"==e&&y)return T(r,t,"propBlock") 1396if("}"==e||"{"==e)return A(e,t,r) 1397if("("==e)return T(r,t,"parens") 1398if("hash"!=e||/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t.current())){if("word"==e)P(t) 1399else if("interpolation"==e)return T(r,t,"interpolation")}else o+=" error" 1400return"prop"},propBlock:function(e,t,r){return"}"==e?O(r):"word"==e?(o="property","maybeprop"):r.context.type},parens:function(e,t,r){return"{"==e||"}"==e?A(e,t,r):")"==e?O(r):"("==e?T(r,t,"parens"):"interpolation"==e?T(r,t,"interpolation"):("word"==e&&P(t),"parens")},pseudo:function(e,t,r){return"meta"==e?"pseudo":"word"==e?(o="variable-3",r.context.type):N(e,t,r)},documentTypes:function(e,t,r){return"word"==e&&s.hasOwnProperty(t.current())?(o="tag",r.context.type):z.atBlock(e,t,r)},atBlock:function(e,t,r){if("("==e)return T(r,t,"atBlock_parens") 1401if("}"==e||";"==e)return A(e,t,r) 1402if("{"==e)return O(r)&&T(r,t,y?"block":"top") 1403if("interpolation"==e)return T(r,t,"interpolation") 1404if("word"==e){var n=t.current().toLowerCase() 1405o="only"==n||"not"==n||"and"==n||"or"==n?"keyword":c.hasOwnProperty(n)?"attribute":u.hasOwnProperty(n)?"property":d.hasOwnProperty(n)?"keyword":f.hasOwnProperty(n)?"property":h.hasOwnProperty(n)?x?"string-2":"property":v.hasOwnProperty(n)?"atom":m.hasOwnProperty(n)?"keyword":"error"}return r.context.type},atComponentBlock:function(e,t,r){return"}"==e?A(e,t,r):"{"==e?O(r)&&T(r,t,y?"block":"top",!1):("word"==e&&(o="error"),r.context.type)},atBlock_parens:function(e,t,r){return")"==e?O(r):"{"==e||"}"==e?A(e,t,r,2):z.atBlock(e,t,r)},restricted_atBlock_before:function(e,t,r){return"{"==e?T(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(o="variable","restricted_atBlock_before"):N(e,t,r)},restricted_atBlock:function(e,t,r){return"}"==e?(r.stateArg=null,O(r)):"word"==e?(o="@font-face"==r.stateArg&&!p.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!g.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,r){return"word"==e?(o="variable","keyframes"):"{"==e?T(r,t,"top"):N(e,t,r)},at:function(e,t,r){return";"==e?O(r):"{"==e||"}
1405"==e?A(e,t,r):("word"==e?o="tag":"hash"==e&&(o="builtin"),"at")},interpolation:function(e,t,r){return"}"==e?O(r):"{"==e||";"==e?A(e,t,r):("word"==e?o="variable":"variable"!=e&&"("!=e&&")"!=e&&(o="error"),"interpolation")}} 1406return{startState:function(e){return{tokenize:null,state:n?"block":"top",stateArg:null,context:new M(n?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null 1407var r=(t.tokenize||C)(e,t) 1408return r&&"object"==typeof r&&(i=r[1],r=r[0]),o=r,"comment"!=i&&(t.state=z[t.state](i,e,t)),o},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),i=r.indent 1409return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(i=Math.max(0,r.indent-a)):i=(r=r.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}})) 1410var r=["domain","regexp","url","url-prefix"],n=t(r),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=t(i),a=["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"],l=t(a),s=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],c=t(s),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","
1410nav-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"],d=t(u),f=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],h=t(f),p=t(["font-display","font-family","src","unicode
1410-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),m=["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"],v=t(m),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","
1410initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=t(y),w=r.concat(i).concat(a).concat(s).concat(u).concat(f).concat(m).concat(y) 1411function x(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null 1412break}n="*"==r}return["comment","comment"]}e.registerHelper("hintWords","css",w),e.defineMIME("text/css",{documentTypes:n,mediaTypes:o,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:h,fontProperties:p,counterDescriptors:g,colorKeywords:v,valueKeywords:b,tokenHo
1412oks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=x,x(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:h,colorKeywords:v,valueKeywords:b,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=x,x(e,t)):["operator","operator"]},":":function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:d,nonStandardPropertyKeywords:h,colorKeywords:v,valueKeywords:b,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=x,x(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:n,mediaTypes:o,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:h,fontProperties:p,counterDescriptors:g,colorKeywords:v,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=x,x(e,t))}},name:"css",helperType:"gss"})}(r(57226))},95395:(e,t,r)=>{ 1413// CodeMirror, copyright (c) by Marijn Haverbeke and others 1414// Distributed under an MIT license: https://codemirror.net/5/LICENSE 1415!function(e){"use strict" 1416var t={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]} 1417function r(e,t,r){var n=e.current(),i=n.search(t) 1418return i>-1?e.backUp(n.length-i):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}var n={} 1419function i(e){var t=n[e] 1420return t||(n[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function o(e,t){var r=e.match(i(t)) 1421return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function a(e,t){return new RegExp((t?"^":"")+"</\\s*"+e+"\\s*>","i")}function l(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),i=e[r],o=i.length-1;o>=0;o--)n.unshift(i[o])}function s(e,t){for(var r=0;r<e.length;r++){var n=e[r] 1422if(!n[0]||n[1].test(o(t,n[0])))return n[2]}}e.defineMode("htmlmixed",(function(n,i){var o=e.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag,allowMissingTagName:i.allowMissingTagName}),c={},u=i&&i.tags,d=i&&i.scriptTypes 1423if(l(t,c),u&&l(u,c),d)for(var f=d.length-1;f>=0;f--)c.script.unshift(["type",d[f].matches,d[f].mode]) 1424function h(t,i){var l,u=o.token(t,i.htmlState),d=/\btag\b/.test(u) 1425if(d&&!/[<>\s\/]/.test(t.current())&&(l=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&c.hasOwnProperty(l))i.inTag=l+" " 1426else if(i.inTag&&d&&/>$/.test(t.current())){var f=/^([\S]+) (.*)/.exec(i.inTag) 1427i.inTag=null 1428var p=">"==t.current()&&s(c[f[1]],f[2]),g=e.getMode(n,p),m=a(f[1],!0),v=a(f[1],!1) 1429i.token=function(e,t){return e.match(m,!1)?(t.token=h,t.localState=t.localMode=null,null):r(e,v,t.localMode.token(e,t.localState))},i.localMode=g,i.localState=e.startState(g,o.indent(i.htmlState,"",""))}else i.inTag&&(i.inTag+=t.current(),t.eol()&&(i.inTag+=" ")) 1430return u}return{startState:function(){return{token:h,inTag:null,localMode:null,localState:null,htmlState:e.startState(o)}},copyState:function(t){var r 1431return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(o,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?o.indent(t.htmlState,r,n):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||o}}}}),"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}(r(57226),r(94691),r(8779),r(46363))},8779:(e,t,r)=>{ 1432// CodeMirror, copyright (c) by Marijn Haverbeke and others 1433// Distributed under an MIT license: https://codemirror.net/5/LICENSE 1434!function(e){"use strict" 1435e.defineMode("javascript",(function(t,r){var n,i,o=t.indentUnit,a=r.statementIndent,l=r.jsonld,s=r.json||l,c=!1!==r.trackScope,u=r.typescript,d=r.wordCharacters||/[\w$\xa1-\uffff]/,f=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("keyword d"),o=e("operator"),a={type:"atom",style:"atom"} 1436return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:i,break:i,continue:i,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),h=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/ 1437function g(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return 1438"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function m(e,t,r){return n=e,i=r,t}function v(e,t){var r=e.next() 1439if('"'==r||"'"==r)return t.tokenize=y(r),t.tokenize(e,t) 1440if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return m("number","number") 1441if("."==r&&e.match(".."))return m("spread","meta") 1442if(/[\[\]{}\(\),;\:\.]/.test(r))return m(r) 1443if("="==r&&e.eat(">"))return m("=>","operator") 1444if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return m("number","number") 1445if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),m("number","number") 1446if("/"==r)return e.eat("*")?(t.tokenize=b,b(e,t)):e.eat("/")?(e.skipToEnd(),m("comment","comment")):it(e,t,1)?(g(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),m("regexp","string-2")):(e.eat("="),m("operator","operator",e.current())) 1447if("`"==r)return t.tokenize=w,w(e,t) 1448if("#"==r&&"!"==e.peek())return e.skipToEnd(),m("meta","meta") 1449if("#"==r&&e.eatWhile(d))return m("variable","property") 1450if("<"==r&&e.match("!--")||"-"==r&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),m("comment","comment") 1451if(h.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-|&?]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),"?"==r&&e.eat(".")?m("."):m("operator","operator",e.current()) 1452if(d.test(r)){e.eatWhile(d) 1453var n=e.current() 1454if("."!=t.lastType){if(f.propertyIsEnumerable(n)){var i=f[n] 1455return m(i.type,i.style,n)}if("async"==n&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return m("async","keyword",n)}return m("variable","variable",n)}}function y(e){return function(t,r){var n,i=!1 1456if(l&&"@"==t.peek()&&t.match(p))return r.tokenize=v,m("jsonld-keyword","meta") 1457for(;
1457null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n 1458return i||(r.tokenize=v),m("string","string")}}function b(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=v 1459break}n="*"==r}return m("comment","comment")}function w(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=v 1460break}n=!n&&"\\"==r}return m("quasi","string-2",e.current())}var x="([{}])" 1461function k(e,t){t.fatArrowAt&&(t.fatArrowAt=null) 1462var r=e.string.indexOf("=>",e.start) 1463if(!(r<0)){if(u){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r)) 1464n&&(r=n.index)}for(var i=0,o=!1,a=r-1;a>=0;--a){var l=e.string.charAt(a),s=x.indexOf(l) 1465if(s>=0&&s<3){if(!i){++a 1466break}if(0==--i){"("==l&&(o=!0) 1467break}}else if(s>=3&&s<6)++i 1468else if(d.test(l))o=!0 1469else if(/["'\/`]/.test(l))for(;;--a){if(0==a)return 1470if(e.string.charAt(a-1)==l&&"\\"!=e.string.charAt(a-2)){a-- 1471break}}else if(o&&!i){++a 1472break}}o&&!i&&(t.fatArrowAt=a)}}var C={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0} 1473function S(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function L(e,t){if(!c)return!1 1474for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0 1475for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}function M(e,t,r,n,i){var o=e.cc 1476for(T.state=e,T.stream=i,T.marked=null,T.cc=o,T.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():s?U:$)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()() 1477return T.marked?T.marked:"variable"==r&&L(e,n)?"variable-2":t}}var T={state:null,column:null,marked:null,cc:null} 1478function O(){for(var e=arguments.length-1;e>=0;e--)T.cc.push(arguments[e])}function N(){return O.apply(null,arguments),!0}function A(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0 1479return!1}function P(e){var t=T.state 1480if(T.marked="def",c){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=z(e,t.context) 1481if(null!=n)return void(t.context=n)}else if(!A(e,t.localVars))return void(t.localVars=new W(e,t.localVars)) 1482r.globalVars&&!A(e,t.globalVars)&&(t.globalVars=new W(e,t.globalVars))}}function z(e,t){if(t){if(t.block){var r=z(e,t.prev) 1483return r?r==t.prev?t:new E(r,t.vars,!0):null}return A(e,t.vars)?t:new E(t.prev,new W(e,t.vars),!1)}return null}function D(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function E(e,t,r){this.prev=e,this.vars=t,this.block=r}function W(e,t){this.name=e,this.next=t}var H=new W("this",new W("arguments",null)) 1484function F(){T.state.context=new E(T.state.context,T.state.localVars,!1),T.state.localVars=H}function I(){T.state.context=new E(T.state.context,T.state.localVars,!0),T.state.localVars=null}function j(){T.state.localVars=T.state.context.vars,T.state.context=T.state.context.prev}function R(e,t){var r=function(){var r=T.state,n=r.indented 1485if("stat"==r.lexical.type)n=r.lexical.indented 1486else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented 1487r.lexical=new S(n,T.stream.column(),e,null,r.lexical,t)} 1488return r.lex=!0,r}function _(){var e=T.state 1489e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function B(e){function t(r){return r==e?N():";"==e||"}"==r||")"==r||"]"==r?O():N(t)}return t}function $(e,t){return"var"==e?N(R("vardef",t),Oe,B(";"),_):"keyword a"==e?N(R("form"),G,$,_):"keyword b"==e?N(R("form"),$,_):"keyword d"==e?T.stream.match(/^\s*$/,!1)?N():N(R("stat"),X,B(";"),_):"debugger"==e?N(B(";")):"{"==e?N(R("}"),I,fe,_,j):";"==e?N():"if"==e?("else"==T.state.lexical.info&&T.state.cc[T.state.cc.length-1]==_&&T.state.cc.pop()(),N(R("form"),G,$,_,Ee)):"function"==e?N(Ie):"for"==e?N(R("form"),I,We,$,j,_):"class"==e||u&&"interface"==t?(T.marked="keyword",N(R("form","class"==e?e:t),$e,_)):"variable"==e?u&&"declare"==t?(T.marked="keyword",N($)):u&&("module"==t||"enum"==t||"type"==t)&&T.stream.match(/^\s*\w/,!1)?(T.marked="keyword","enum"==t?N(tt):"type"==t?N(Re,B("operator"),ve,B(";")):N(R("form"),Ne,B("{"),R("}"),fe,_,_)):u&&"namespace"==t?(T.marked="keyword",N(R("form"),U,$,_)):u&&"abstract"==t?(T.marked="keyword",N($)):N(R("stat"),oe):"switch"==e?N(R("form"),G,B("{"),R("}","switch"),I,fe,_,_,j):"case"==e?N(U,B(":")):"default"==e?N(B(":")):"catch"==e?N(R("form"),F,q,$,_,j):"export"==e?N(R("stat"),Ge,_):"import"==e?N(R("stat"),Xe,_):"async"==e?N($):"@"==t?N(U,$):O(R("stat"),U,B(";"),_)}function q(e){if("("==e)return N(_e,B(")"))}function U(e,t){return K(e,t,!1)}function V(e,t){return K(e,t,!0)}function G(e){return"("!=e?O():N(R(")"),X,B(")"),_)}function K(e,t,r){if(T.state.fatArrowAt==T.stream.start){var n=r?te:ee 1490if("("==e)return N(F,R(")"),ue(_e,")"),_,B("=>"),n,j) 1491if("variable"==e)return O(F,Ne,B("=>"),n,j)}var i=r?Z:Y 1492return C.hasOwnProperty(e)?N(i):"function"==e?N(Ie,i):"class"==e||u&&"interface"==t?(T.marked="keyword",N(R("form"),Be,_)):"keyword c"==e||"async"==e?N(r?V:U):"("==e?N(R(")"),X,B(")"),_,i):"operator"==e||"spread"==e?N(r?V:U):"["==e?N(R("]"),et,_,i):"{"==e?de(le,"}
vendor: 10,126 bytes, lines 1492-1517
1492",null,i):"quasi"==e?O(Q,i):"new"==e?N(re(r)):N()}function X(e){return e.match(/[;\}\)\],]/)?O():O(U)}function Y(e,t){return","==e?N(X):Z(e,t,!1)}function Z(e,t,r){var n=0==r?Y:Z,i=0==r?U:V 1493return"=>"==e?N(F,r?te:ee,j):"operator"==e?/\+\+|--/.test(t)||u&&"!"==t?N(n):u&&"<"==t&&T.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?N(R(">"),ue(ve,">"),_,n):"?"==t?N(U,B(":"),i):N(i):"quasi"==e?O(Q,n):";"!=e?"("==e?de(V,")","call",n):"."==e?N(ae,n):"["==e?N(R("]"),X,B("]"),_,n):u&&"as"==t?(T.marked="keyword",N(ve,n)):"regexp"==e?(T.state.lastType=T.marked="operator",T.stream.backUp(T.stream.pos-T.stream.start-1),N(i)):void 0:void 0}function Q(e,t){return"quasi"!=e?O():"${"!=t.slice(t.length-2)?N(Q):N(X,J)}function J(e){if("}"==e)return T.marked="string-2",T.state.tokenize=w,N(Q)}function ee(e){return k(T.stream,T.state),O("{"==e?$:U)}function te(e){return k(T.stream,T.state),O("{"==e?$:V)}function re(e){return function(t){return"."==t?N(e?ie:ne):"variable"==t&&u?N(Le,e?Z:Y):O(e?V:U)}}function ne(e,t){if("target"==t)return T.marked="keyword",N(Y)}function ie(e,t){if("target"==t)return T.marked="keyword",N(Z)}function oe(e){return":"==e?N(_,$):O(Y,B(";"),_)}function ae(e){if("variable"==e)return T.marked="property",N()}function le(e,t){return"async"==e?(T.marked="property",N(le)):"variable"==e||"keyword"==T.style?(T.marked="property","get"==t||"set"==t?N(se):(u&&T.state.fatArrowAt==T.stream.start&&(r=T.stream.match(/^\s*:\s*/,!1))&&(T.state.fatArrowAt=T.stream.pos+r[0].length),N(ce))):"number"==e||"string"==e?(T.marked=l?"property":T.style+" property",N(ce)):"jsonld-keyword"==e?N(ce):u&&D(t)?(T.marked="keyword",N(le)):"["==e?N(U,he,B("]"),ce):"spread"==e?N(V,ce):"*"==t?(T.marked="keyword",N(le)):":"==e?O(ce):void 0 1494var r}function se(e){return"variable"!=e?O(ce):(T.marked="property",N(Ie))}function ce(e){return":"==e?N(V):"("==e?O(Ie):void 0}function ue(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var a=T.state.lexical 1495return"call"==a.info&&(a.pos=(a.pos||0)+1),N((function(r,n){return r==t||n==t?O():O(e)}),n)}return i==t||o==t?N():r&&r.indexOf(";")>-1?O(e):N(B(t))}return function(r,i){return r==t||i==t?N():O(e,n)}}function de(e,t,r){for(var n=3;n<arguments.length;n++)T.cc.push(arguments[n]) 1496return N(R(t,r),ue(e,t),_)}function fe(e){return"}"==e?N():O($,fe)}function he(e,t){if(u){if(":"==e)return N(ve) 1497if("?"==t)return N(he)}}function pe(e,t){if(u&&(":"==e||"in"==t))return N(ve)}function ge(e){if(u&&":"==e)return T.stream.match(/^\s*\w+\s+is\b/,!1)?N(U,me,ve):N(ve)}function me(e,t){if("is"==t)return T.marked="keyword",N()}function ve(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(T.marked="keyword",N("typeof"==t?V:ve)):"variable"==e||"void"==t?(T.marked="type",N(Se)):"|"==t||"&"==t?N(ve):"string"==e||"number"==e||"atom"==e?N(Se):"["==e?N(R("]"),ue(ve,"]",","),_,Se):"{"==e?N(R("}"),be,_,Se):"("==e?N(ue(Ce,")"),ye,Se):"<"==e?N(ue(ve,">"),ve):"quasi"==e?O(xe,Se):void 0}function ye(e){if("=>"==e)return N(ve)}function be(e){return e.match(/[\}\)\]]/)?N():","==e||";"==e?N(be):O(we,be)}function we(e,t){return"variable"==e||"keyword"==T.style?(T.marked="property",N(we)):"?"==t||"number"==e||"string"==e?N(we):":"==e?N(ve):"["==e?N(B("variable"),pe,B("]"),we):"("==e?O(je,we):e.match(/[;\}\)\],]/)?void 0:N()}function xe(e,t){return"quasi"!=e?O():"${"!=t.slice(t.length-2)?N(xe):N(ve,ke)}function ke(e){if("}"==e)return T.marked="string-2",T.state.tokenize=w,N(xe)}function Ce(e,t){return"variable"==e&&T.stream.match(/^\s*[?:]/,!1)||"?"==t?N(Ce):":"==e?N(ve):"spread"==e?N(Ce):O(ve)}function Se(e,t){return"<"==t?N(R(">"),ue(ve,">"),_,Se):"|"==t||"."==e||"&"==t?N(ve):"["==e?N(ve,B("]"),Se):"extends"==t||"implements"==t?(T.marked="keyword",N(ve)):"?"==t?N(ve,B(":"),ve):void 0}function Le(e,t){if("<"==t)return N(R(">"),ue(ve,">"),_,Se)}function Me(){return O(ve,Te)}function Te(e,t){if("="==t)return N(ve)}function Oe(e,t){return"enum"==t?(T.marked="keyword",N(tt)):O(Ne,he,ze,De)}function Ne(e,t){return u&&D(t)?(T.marked="keyword",N(Ne)):"variable"==e?(P(t),N()):"spread"==e?N(Ne):"["==e?de(Pe,"]"):"{"==e?de(Ae,"}"):void 0}function Ae(e,t){return"variable"!=e||T.stream.match(/^\s*:/,!1)?("variable"==e&&(T.marked="property"),"spread"==e?N(Ne):"}"==e?O():"["==e?N(U,B("]"),B(":"),Ae):N(B(":"),Ne,ze)):(P(t),N(ze))}function Pe(){return O(Ne,ze)}function ze(e,t){if("="==t)return N(V)}function De(e){if(","==e)return N(Oe)}function Ee(e,t){if("keyword b"==e&&"else"==t)return N(R("form","else"),$,_)}function We(e,t){return"await"==t?N(We):"("==e?N(R(")"),He,_):void 0}function He(e){return"var"==e?N(Oe,Fe):"variable"==e?N(Fe):O(Fe)}function Fe(e,t){return")"==e?N():";"==e?N(Fe):"in"==t||"of"==t?(T.marked="keyword",N(U,Fe)):O(U,Fe)}function Ie(e,t){return"*"==t?(T.marked="keyword",N(Ie)):"variable"==e?(P(t),N(Ie)):"("==e?N(F,R(")"),ue(_e,")"),_,ge,$,j):u&&"<"==t?N(R(">"),ue(Me,">"),_,Ie):void 0}function je(e,t){return"*"==t?(T.marked="keyword",N(je)):"variable"==e?(P(t),N(je)):"("==e?N(F,R(")"),ue(_e,")"),_,ge,j):u&&"<"==t?N(R(">"),ue(Me,">"),_,je):void 0}function Re(e,t){return"keyword"==e||"variable"==e?(T.marked="type",N(Re)):"<"==t?N(R(">"),ue(Me,">"),_):void 0}function _e(e,t){return"@"==t&&N(U,_e),"spread"==e?N(_e):u&&D(t)?(T.marked="keyword",N(_e)):u&&"this"==e?N(he,ze):O(Ne,he,ze)}function Be(e,t){return"variable"==e?$e(e,t):qe(e,t)}function $e(e,t){if("variable"==e)return P(t),N(qe)}function qe(e,t){return"<"==t?N(R(">"),ue(Me,">"),_,qe):"extends"==t||"implements"==t||u&&","==e?("implements"==t&&(T.marked="keyword"),N(u?ve:U,qe)):"{"==e?N(R("}"),Ue,_):void 0}function Ue(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||u&&D(t))&&T.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1)?(T.marked="keyword",N(Ue)):"variable"==e||"keyword"==T.style?(T.marked="property",N(Ve,Ue)):"number"==e||"string"==e?N(Ve,Ue):"["==e?N(U,he,B("]"),Ve,Ue):"*"==t?(T.marked="keyword",N(Ue)):u&&"("==e?O(je,Ue):";"==e||","==e?N(Ue):"}"==e?N():"@"==t?N(U,Ue):void 0}function Ve(e,t){if("!"==t)return N(Ve) 1498if("?"==t)return N(Ve) 1499if(":"==e)return N(ve,ze) 1500if("="==t)return N(V) 1501var r=T.state.lexical.prev 1502return O(r&&"interface"==r.info?je:Ie)}function Ge(e,t){return"*"==t?(T.marked="keyword",N(Je,B(";"))):"default"==t?(T.marked="keyword",N(U,B(";"))):"{"==e?N(ue(Ke,"}"),Je,B(";")):O($)}function Ke(e,t){return"as"==t?(T.marked="keyword",N(B("variable"))):"variable"==e?O(V,Ke):void 0}function Xe(e){return"string"==e?N():"("==e?O(U):"."==e?O(Y):O(Ye,Ze,Je)}function Ye(e,t){return"{"==e?de(Ye,"}"):("variable"==e&&P(t),"*"==t&&(T.marked="keyword"),N(Qe))}function Ze(e){if(","==e)return N(Ye,Ze)}function Qe(e,t){if("as"==t)return T.marked="keyword",N(Ye)}function Je(e,t){if("from"==t)return T.marked="keyword",N(U)}function et(e){return"]"==e?N():O(ue(V,"]"))}function tt(){return O(R("form"),Ne,B("{"),R("}"),ue(rt,"}"),_,_)}function rt(){return O(Ne,ze)}function nt(e,t){return"operator"==e.lastType||","==e.lastType||h.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function it(e,t,r){return t.tokenize==v&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return F.lex=I.lex=!0,j.lex=!0,_.lex=!0,{startState:function(e){var t={tokenize:v,lastType:"sof",cc:[],lexical:new S((e||0)-o,0,"block",!1),localVars:r.localVars,context:r.localVars&&new E(null,null,!1),indented:e||0} 1503return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),k(e,t)),t.tokenize!=b&&e.eatSpace())return null 1504var r=t.tokenize(e,t) 1505return"comment"==n?r:(t.lastType="operator"!=n||"++"!=i&&"--"!=i?n:"incdec",M(t,r,n,i,e))},indent:function(t,n){if(t.tokenize==b||t.tokenize==w)return e.Pass 1506if(t.tokenize!=v)return 0 1507var i,l=n&&n.charAt(0),s=t.lexical 1508if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c] 1509if(u==_)s=s.prev 1510else if(u!=Ee&&u!=j)break}for(;("stat"==s.type||"form"==s.type)&&("}"==l||(i=t.cc[t.cc.length-1])&&(i==Y||i==Z)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev 1511a&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev) 1512var d=s.type,f=l==d 1513return"vardef"==d?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==d&&"{"==l?s.indented:"form"==d?s.indented+o:"stat"==d?s.indented+(nt(t,n)?a||o:0):"switch"!=s.info||f||0==r.doubleIndentSwitch?s.align?s.column+(f?0:1):s.indented+(f?0:o):s.indented+(/^(?:case|default)\b/.test(n)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:l,jsonMode:s,expressionAllowed:it,skipExpression:function(t){M(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(r(57226))},94691:(e,t,r)=>{ 1514// CodeMirror, copyright (c) by Marijn Haverbeke and others 1515// Distributed under an MIT license: https://codemirror.net/5/LICENSE 1516!function(e){"use strict" 1517var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0}
1517,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},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1} 1518e.defineMode("xml",(function(n,i){var o,a,l=n.indentUnit,s={},c=i.htmlMode?t:r 1519for(var u in c)s[u]=c[u] 1520for(var u in i)s[u]=i[u] 1521function d(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next() 1522return"<"==n?e.eat("!")?e.eat("[")?e.match("CDATA[")?r(p("atom","]]>")):null:e.match("--")?r(p("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(g(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=p("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=f,"tag bracket"):"&"==n?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function f(e,t){var r=e.next() 1523if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=d,o=">"==r?"endTag":"selfcloseTag","tag bracket" 1524if("="==r)return o="equals",null 1525if("<"==r){t.tokenize=d,t.state=w,t.tagName=t.tagStart=null 1526var n=t.tokenize(e,t) 1527return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=h(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=f 1528break}return"string"} 1529return t.isInAttribute=!0,t}function p(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=d 1530break}r.next()}return e}}function g(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=g(e+1),r.tokenize(t,r) 1531if(">"==n){if(1==e){r.tokenize=d 1532break}return r.tokenize=g(e-1),r.tokenize(t,r)}}return"meta"}}function m(e){return e&&e.toLowerCase()}function v(e,t,r){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=r,(s.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function y(e){e.context&&(e.context=e.context.prev)}function b(e,t){for(var r;;){if(!e.context)return 1533if(r=e.context.tagName,!s.contextGrabbers.hasOwnProperty(m(r))||!s.contextGrabbers[m(r)].hasOwnProperty(m(t)))return 1534y(e)}}function w(e,t,r){return"openTag"==e?(r.tagStart=t.column(),x):"closeTag"==e?k:w}function x(e,t,r){return"word"==e?(r.tagName=t.current(),a="tag",L):s.allowMissingTagName&&"endTag"==e?(a="tag bracket",L(e,t,r)):(a="error",x)}function k(e,t,r){if("word"==e){var n=t.current() 1535return r.context&&r.context.tagName!=n&&s.implicitlyClosed.hasOwnProperty(m(r.context.tagName))&&y(r),r.context&&r.context.tagName==n||!1===s.matchClosing?(a="tag",C):(a="tag error",S)}return s.allowMissingTagName&&"endTag"==e?(a="tag bracket",C(e,t,r)):(a="error",S)}function C(e,t,r){return"endTag"!=e?(a="error",C):(y(r),w)}function S(e,t,r){return a="error",C(e,t,r)}function L(e,t,r){if("word"==e)return a="attribute",M 1536if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart 1537return r.tagName=r.tagStart=null,"selfcloseTag"==e||s.autoSelfClosers.hasOwnProperty(m(n))?b(r,n):(b(r,n),r.context=new v(r,n,i==r.indented)),w}return a="error",L}function M(e,t,r){return"equals"==e?T:(s.allowMissing||(a="error"),L(e,t,r))}function T(e,t,r){return"string"==e?O:"word"==e&&s.allowUnquoted?(a="string",L):(a="error",L(e,t,r))}function O(e,t,r){return"string"==e?O:L(e,t,r)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:w,indented:e||0,tagName:null,tagStart:null,context:null} 1538return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null 1539o=null 1540var r=t.tokenize(e,t) 1541return(r||o)&&"comment"!=r&&(a=null,t.state=t.state(o||r,e,t),a&&(r="error"==a?r+" error":a)),r},indent:function(t,r,n){var i=t.context
1542if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+l 1543if(i&&i.noIndent)return e.Pass 1544if(t.tokenize!=f&&t.tokenize!=d)return n?n.match(/^(\s*)/)[0].length:0 1545if(t.tagName)return!1!==s.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+l*(s.multilineTagIndentFactor||1) 1546if(s.alignCDATA&&/<!\[CDATA\[/.test(r))return 0 1547var o=r&&/^<(\/)?([\w_:\.-]*)/.exec(r) 1548if(o&&o[1])for(;i;){if(i.tagName==o[2]){i=i.prev 1549break}if(!s.implicitlyClosed.hasOwnProperty(m(i.tagName)))break 1550i=i.prev}else if(o)for(;i;){var a=s.contextGrabbers[m(i.tagName)] 1551if(!a||!a.hasOwnProperty(m(o[2])))break 1552i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev 1553return i?i.indent+l:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:s.htmlMode?"html":"xml",helperType:s.htmlMode?"html":"xml",skipAttribute:function(e){e.state==T&&(e.state=L)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],r=e.context;r;r=r.prev)t.push(r.tagName) 1554return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(r(57226))},63094:(e,t,r)=>{"use strict" 1555Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLParser=t.Reporter=t.HTMLRules=t.HTMLHint=void 0 1556const n=r(55823) 1557t.HTMLParser=n.default 1558const i=r(20396) 1559t.Reporter=i.default 1560const o=r(84037) 1561t.HTMLRules=o 1562function a(e,t){return new Array(e+1).join(t||" ")}t.HTMLHint=new class{constructor(){this.rules={},this.defaultRuleset={"tagname-lowercase":!0,"attr-lowercase":!0,"attr-value-double-quotes":!0,"doctype-first":!0,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0,"title-require":!0}}addRule(e){this.rules[e.id]=e}verify(e,t=this.defaultRuleset){0===Object.keys(t).length&&(t=this.defaultRuleset),e=e.replace(/^\s*<!--\s*htmlhint\s+([^\r\n]+?)\s*-->/i,((e,r)=>(r.replace(/(?:^|,)\s*([^:,]+)\s*(?:\:\s*([^,\s]+))?/g,((e,r,n)=>(t[r]=!(void 0!==n&&n.length>0)||JSON.parse(n),""))),""))) 1563const r=new n.default,o=new i.default(e,t),a=this.rules 1564let l 1565for(const e in t)l=a[e],void 0!==l&&!1!==t[e]&&l.init(r,o,t[e]) 1566return r.parse(e),o.messages}format(e,t={}){const r=[],n={white:"",grey:"",red:"",reset:""} 1567t.colors&&(n.white="�[37m",n.grey="�[90m",n.red="�[31m",n.reset="�[39m") 1568const i=t.indent||0 1569return e.forEach((e=>{let t=e.evidence 1570const o=e.line,l=e.col,s=t.length 1571let c=l>41?l-40:1,u=t.length>l+60?l+60:s 1572l<41&&(u+=40-l+1),t=t.replace(/\t/g," ").substring(c-1,u),c>1&&(t=`...${t}`,c-=3),u<s&&(t+="..."),r.push(`${n.white+a(i)}L${o} |${n.grey}${t}${n.reset}`) 1573let d=l-c 1574const f=t.substring(0,d).match(/[^\u0000-\u00ff]/g) 1575null!==f&&(d+=f.length),r.push(`${n.white+a(i)+a(String(o).length+3+d)}^ ${n.red}${e.message} (${e.rule.id})${n.reset}`)})),r}},Object.keys(o).forEach((e=>{t.HTMLHint.addRule(o[e])}))},55823:(e,t)=>{"use strict" 1576Object.defineProperty(t,"__esModule",{value:!0}) 1577t.default=class{constructor(){this._listeners={},this._mapCdataTags=this.makeMap("script,style"),this._arrBlocks=[],this.lastEvent=null}makeMap(e){const t={},r=e.split(",") 1578for(let e=0;e<r.length;e++)t[r[e]]=!0 1579return t}parse(e){const t=this._mapCdataTags,r=/<(?:\/([^\s>]+)\s*|!--([\s\S]*?)--|!([^>]*?)|([\w\-:]+)((?:\s+[^\s"'>\/=\x00-\x0F\x7F\x80-\x9F]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'>]*))?)*?)\s*(\/?))>/g,n=/\s*([^\s"'>\/=\x00-\x0F\x7F\x80-\x9F]+)(?:\s*=\s*(?:(")([^"]*)"|(')([^']*)'|([^\s"'>]*)))?/g,i=/\r?\n/g 1580let o,a,l,s,c,u,d=0,f=null,h=[],p=0,g=0,m=1 1581const v=this._arrBlocks 1582this.fire("start",{pos:0,line:1,col:1}) 1583const y=()=>{const e=s.find((e=>"type"===e.name))||{value:""} 1584return t[l]&&-1===e.value.indexOf("text/ng-template")},b=(e,t,r,n)=>{const o=r-g+1 1585for(void 0===n&&(n={}),n.raw=t,n.pos=r,n.line=m,n.col=o,v.push(n),this.fire(e,n);i.exec(t);)m++,g=r+i.lastIndex} 1586for(;o=r.exec(e);)if(a=o.index,a>d&&(u=e.substring(d,a),f?h.push(u):b("text",u,d)),d=r.lastIndex,!(l=o[1])||(f&&l===f&&(u=h.join(""),b("cdata",u,p,{tagName:f,attrs:c}),f=null,c=void 0,h=[]),f))if(f)h.push(o[0]) 1587else if(l=o[4]){s=[] 1588const e=o[5] 1589let t,r=0 1590for(;t=n.exec(e);){const e=t[1],n=t[2]?t[2]:t[4]?t[4]:"",i=t[3]?t[3]:t[5]?t[5]:t[6]?t[6]:"" 1591s.push({name:e,value:i,quote:n,index:t.index,raw:t[0]}),r+=t[0].length}r===e.length?(b("tagstart",o[0],a,{tagName:l,attrs:s,close:o[6]}),y()&&(f=l,c=s.concat(),h=[],p=d)):b("text",o[0],a)}else(o[2]||o[3])&&b("comment",o[0],a,{content:o[2]||o[3],long:!!o[2]}) 1592else b("tagend",o[0],a,{tagName:l}) 1593e.length>d&&(u=e.substring(d,e.length),b("text",u,d)),this.fire("end",{pos:d,line:m,col:e.length-g+1})}addListener(e,t){const r=this._listeners,n=e.split(/[,\s]/) 1594let i 1595for(let e=0,o=n.length;e<o;e++)i=n[e],void 0===r[i]&&(r[i]=[]),r[i].push(t)}fire(e,t){void 0===t&&(t={}),t.type=e 1596let r=[] 1597const n=this._listeners[e],i=this._listeners.all 1598void 0!==n&&(r=r.concat(n)),void 0!==i&&(r=r.concat(i)) 1599const o=this.lastEvent 1600null!==o&&(delete o.lastEvent,t.lastEvent=o),this.lastEvent=t 1601for(let e=0,n=r.length;e<n;e++)r[e].call(this,t)}removeListener(e,t){const r=this._listeners[e] 1602if(void 0!==r)for(let e=0,n=r.length;e<n;e++)if(r[e]===t){r.splice(e,1) 1603break}}fixPos(e,t){const r=e.raw.substr(0,t).split(/\r?\n/),n=r.length-1 1604let i,o=e.line 1605return n>0?(o+=n,i=r[n].length+1):i=e.col+t,{line:o,col:i}}getMapAttrs(e){const t={} 1606let r 1607for(let n=0,i=e.length;n<i;n++)r=e[n],t[r.name]=r.value 1608return t}}},20396:(e,t)=>{"use strict"
1609Object.defineProperty(t,"__esModule",{value:!0}) 1610t.default=class{constructor(e,t){this.html=e,this.lines=e.split(/\r?\n/) 1611const r=/\r?\n/.exec(e) 1612this.brLen=null!==r?r[0].length:0,this.ruleset=t,this.messages=[]}info(e,t,r,n,i){this.report("info",e,t,r,n,i)}warn(e,t,r,n,i){this.report("warning",e,t,r,n,i)}error(e,t,r,n,i){this.report("error",e,t,r,n,i)}report(e,t,r,n,i,o){const a=this.lines,l=this.brLen 1613let s="",c=0 1614for(let e=r-1,t=a.length;e<t&&(s=a[e],c=s.length,n>c&&r<t);e++)r++,1!==(n-=c)&&(n-=l) 1615this.messages.push({type:e,message:t,raw:o,evidence:s,line:r,col:n,rule:{id:i.id,description:i.description,link:`https://htmlhint.com/docs/user-guide/rules/${i.id}`}})}}},60436:(e,t)=>{"use strict" 1616Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"alt-require",description:"The alt attribute of an <img> element must be present and alt attribute of area[href] and input[type=image] must have a value.",init(e,t){e.addListener("tagstart",(r=>{const n=r.tagName.toLowerCase(),i=e.getMapAttrs(r.attrs),o=r.col+n.length+1 1617let a 1618"img"!==n||"alt"in i?("area"===n&&"href"in i||"input"===n&&"image"===i.type)&&("alt"in i&&""!==i.alt||(a="area"===n?"area[href]":"input[type=image]",t.warn(`The alt attribute of ${a} must have a value.`,r.line,o,this,r.raw))):t.warn("An alt attribute must be present on <img> elements.",r.line,o,this,r.raw)}))}}},34842:(e,t)=>{"use strict" 1619Object.defineProperty(t,"__esModule",{value:!0}) 1620const r=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPath","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","onBlur","onChange","onClick","onFocus","onKeyUp","onLoad","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"] 1621function n(e,t){if(t instanceof RegExp)return!!t.test(e)&&{match:e,pattern:t} 1622const r=t[0],n=t[t.length-1],i=t[t.length-2],o="/"===r&&("/"===n||"/"===i&&"i"===n) 1623if(o){return o&&"i"===n?new RegExp(t.slice(1,-2),"i").test(e):new RegExp(t.slice(1,-1)).test(e)}return e===t}t.default={id:"attr-lowercase",description:"All attribute names must be in lowercase.",init(e,t,i){const o=(Array.isArray(i)?i:[]).concat(r) 1624e.addListener("tagstart",(e=>{const r=e.attrs 1625let i 1626const a=e.col+e.tagName.length+1 1627for(let l=0,s=r.length;l<s;l++){i=r[l] 1628const s=i.name 1629o.find((e=>n(s,e)))||s===s.toLowerCase()||t.error(`The attribute name of [ ${s} ] must be in lowercase.`,e.line,a+i.index,this,i.raw)}}))}}},59025:(e,t)=>{"use strict" 1630Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-no-duplication",description:"Elements cannot have duplicate attributes.",init(e,t){e.addListener("tagstart",(e=>{const r=e.attrs 1631let n,i 1632const o=e.col+e.tagName.length+1,a={} 1633for(let l=0,s=r.length;l<s;l++)n=r[l],i=n.name,!0===a[i]&&t.error(`Duplicate of attribute name [ ${n.name} ] was found.`,e.line,o+n.index,this,n.raw),a[i]=!0}))}}},34221:(e,t)=>{"use strict" 1634Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-no-unnecessary-whitespace",description:"No spaces between attribute names and values.",init(e,t,r){const n=Array.isArray(r)?r:[] 1635e.addListener("tagstart",(e=>{const r=e.attrs,i=e.col+e.tagName.length+1 1636for(let o=0;o<r.length;o++)if(-1===n.indexOf(r[o].name)){const n=/(\s*)=(\s*)/.exec(r[o].raw.trim()) 1637!n||0===n[1].length&&0===n[2].length||t.error(`The attribute '${r[o].name}' must not have spaces between the name and value.`,e.line,i+r[o].index,this,r[o].raw)}}))}}},13470:(e,t)=>{"use strict"
1638Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-sorted",description:"Attribute tags must be in proper order.",init(e,t){const r={},n=["class","id","name","src","for","type","href","value","title","alt","role"] 1639for(let e=0;e<n.length;e++)r[n[e]]=e 1640e.addListener("tagstart",(e=>{const n=e.attrs,i=[] 1641for(let e=0;e<n.length;e++)i.push(n[e].name) 1642const o=JSON.stringify(i) 1643i.sort(((e,t)=>null==r[e]&&null==r[t]?0:null==r[e]?1:null==r[t]?-1:r[e]-r[t]||e.localeCompare(t))),o!==JSON.stringify(i)&&t.error(`Inaccurate order ${o} should be in hierarchy ${JSON.stringify(i)} `,e.line,e.col,this,e.raw)}))}}},57977:(e,t)=>{"use strict" 1644Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-unsafe-chars",description:"Attribute values cannot contain unsafe chars.",init(e,t){e.addListener("tagstart",(e=>{const r=e.attrs 1645let n 1646const i=e.col+e.tagName.length+1,o=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/ 1647let a 1648for(let l=0,s=r.length;l<s;l++)if(n=r[l],a=o.exec(n.value),null!==a){const r=escape(a[0]).replace(/%u/,"\\u").replace(/%/,"\\x") 1649t.warn(`The value of attribute [ ${n.name} ] cannot contain an unsafe char [ ${r} ].`,e.line,i+n.index,this,n.raw)}}))}}},3866:(e,t)=>{"use strict" 1650Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-value-double-quotes",description:"Attribute values must be in double quotes.",init(e,t){e.addListener("tagstart",(e=>{const r=e.attrs 1651let n 1652const i=e.col+e.tagName.length+1 1653for(let o=0,a=r.length;o<a;o++)n=r[o],(""!==n.value&&'"'!==n.quote||""===n.value&&"'"===n.quote)&&t.error(`The value of attribute [ ${n.name} ] must be in double quotes.`,e.line,i+n.index,this,n.raw)}))}}},8410:(e,t)=>{"use strict" 1654Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-value-not-empty",description:"All attributes must have values.",init(e,t){e.addListener("tagstart",(e=>{const r=e.attrs 1655let n 1656const i=e.col+e.tagName.length+1 1657for(let o=0,a=r.length;o<a;o++)n=r[o],""===n.quote&&""===n.value&&t.warn(`The attribute [ ${n.name} ] must have a value.`,e.line,i+n.index,this,n.raw)}))}}},92729:(e,t)=>{"use strict" 1658Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-value-single-quotes",description:"Attribute values must be in single quotes.",init(e,t){e.addListener("tagstart",(e=>{const r=e.attrs 1659let n 1660const i=e.col+e.tagName.length+1 1661for(let o=0,a=r.length;o<a;o++)n=r[o],(""!==n.value&&"'"!==n.quote||""===n.value&&'"'===n.quote)&&t.error(`The value of attribute [ ${n.name} ] must be in single quotes.`,e.line,i+n.index,this,n.raw)}))}}},20190:(e,t)=>{"use strict" 1662Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-whitespace",description:"All attributes should be separated by only one space and not have leading/trailing whitespace.",init(e,t,r){const n=Array.isArray(r)?r:[] 1663e.addListener("tagstart",(e=>{const r=e.attrs 1664let i 1665const o=e.col+e.tagName.length+1 1666r.forEach((r=>{i=r 1667const a=r.name;-1===n.indexOf(a)&&(r.value.trim()!==r.value&&t.error(`The attributes of [ ${a} ] must not have leading or trailing whitespace.`,e.line,o+i.index,this,i.raw),r.value.replace(/ +(?= )/g,"")!==r.value&&t.error(`The attributes of [ ${a} ] must be separated by only one space.`,e.line,o+i.index,this,i.raw))}))}))}}},47216:(e,t)=>{"use strict" 1668Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"doctype-first",description:"Doctype must be declared first.",init(e,t){const r=n=>{"start"===n.type||"text"===n.type&&/^\s*$/.test(n.raw)||(("comment"!==n.type&&!1===n.long||!1===/^DOCTYPE\s+/i.test(n.content))&&t.error("Doctype must be declared first.",n.line,n.col,this,n.raw),e.removeListener("all",r))} 1669e.addListener("all",r)}}},85974:(e,t)=>{"use strict" 1670Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"doctype-html5",description:'Invalid doctype. Use: "<!DOCTYPE html>"',init(e,t){const r=e=>{!1===e.long&&"doctype html"!==e.content.toLowerCase()&&t.warn('Invalid doctype. Use: "<!DOCTYPE html>"',e.line,e.col,this,e.raw)},n=()=>{e.removeListener("comment",r),e.removeListener("tagstart",n)} 1671e.addListener("all",r),e.addListener("tagstart",n)}}},8885:(e,t)=>{"use strict"
1672Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"empty-tag-not-self-closed",description:"Empty tags must not use self closed syntax.",init(e,t){const r=e.makeMap("area,base,basefont,bgsound,br,col,frame,hr,img,input,isindex,link,meta,param,embed,track,command,source,keygen,wbr") 1673e.addListener("tagstart",(e=>{const n=e.tagName.toLowerCase() 1674void 0!==r[n]&&e.close&&t.error(`The empty tag : [ ${n} ] must not use self closed syntax.`,e.line,e.col,this,e.raw)}))}}},14980:(e,t)=>{"use strict" 1675Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"head-script-disabled",description:"The <script> tag cannot be used in a <head> tag.",init(e,t){const r=/^(text\/javascript|application\/javascript)$/i 1676let n=!1 1677const i=i=>{const o=e.getMapAttrs(i.attrs).type,a=i.tagName.toLowerCase() 1678"head"===a&&(n=!0),!0!==n||"script"!==a||o&&!0!==r.test(o)||t.warn("The <script> tag cannot be used in a <head> tag.",i.line,i.col,this,i.raw)},o=t=>{"head"===t.tagName.toLowerCase()&&(e.removeListener("tagstart",i),e.removeListener("tagend",o))} 1679e.addListener("tagstart",i),e.addListener("tagend",o)}}},61409:(e,t)=>{"use strict" 1680Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"href-abs-or-rel",description:"An href attribute must be either absolute or relative.",init(e,t,r){const n="abs"===r?"absolute":"relative" 1681e.addListener("tagstart",(e=>{const r=e.attrs 1682let i 1683const o=e.col+e.tagName.length+1 1684for(let a=0,l=r.length;a<l;a++)if(i=r[a],"href"===i.name){("absolute"===n&&!1===/^\w+?:/.test(i.value)||"relative"===n&&!0===/^https?:\/\//.test(i.value))&&t.warn(`The value of the href attribute [ ${i.value} ] must be ${n}.`,e.line,o+i.index,this,i.raw) 1685break}}))}}},90175:(e,t)=>{"use strict" 1686Object.defineProperty(t,"__esModule",{value:!0}) 1687t.default={id:"html-lang-require",description:"The lang attribute of an <html> element must be present and should be valid.",init(e,t){e.addListener("tagstart",(r=>{const n=r.tagName.toLowerCase(),i=e.getMapAttrs(r.attrs),o=r.col+n.length+1,a=new RegExp("((?<grandfathered>(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|n
1687o-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?<language>([A-Za-z]{2,3}(-(?<extlang>[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?<script>[A-Za-z]{4}))?(-(?<region>[A-Za-z]{2}|[0-9]{3}))?(-(?<variant>[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?<extension>[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?<privateUse>x(-[A-Za-z0-9]{1,8})+))?)|(?<privateUse2>x(-[A-Za-z0-9]{1,8})+))","g") 1688"html"===n&&("lang"in i?i.lang?a.test(i.lang)||t.warn("The lang attribute value of <html> element must be a valid BCP47.",r.line,o,this,r.raw):t.warn("The lang attribute of <html> element must have a value.",r.line,o,this,r.raw):t.warn("An lang attribute must be present on <html> elements.",r.line,o,this,r.raw))}))}}},31164:(e,t)=>{"use strict" 1689Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"id-class-ad-disabled",description:"The id and class attributes cannot use the ad keyword, it will be blocked by adblock software.",init(e,t){e.addListener("tagstart",(e=>{const r=e.attrs 1690let n,i 1691const o=e.col+e.tagName.length+1 1692for(let a=0,l=r.length;a<l;a++)n=r[a],i=n.name,/^(id|class)$/i.test(i)&&/(^|[-_])ad([-_]|$)/i.test(n.value)&&t.warn(`The value of attribute ${i} cannot use the ad keyword.`,e.line,o+n.index,this,n.raw)}))}}},59325:(e,t)=>{"use strict" 1693Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"id-class-value",description:"The id and class attribute values must meet the specified rules.",init(e,t,r){let n 1694if(n="string"==typeof r?{underline:{regId:/^[a-z\d]+(_[a-z\d]+)*$/,message:"The id and class attribute values must be in lowercase and split by an underscore."},dash:{regId:/^[a-z\d]+(-[a-z\d]+)*$/,message:"The id and class attribute values must be in lowercase and split by a dash."},hump:{regId:/^[a-z][a-zA-Z\d]*([A-Z][a-zA-Z\d]*)*$/,message:"The id and class attribute values must meet the camelCase style."}}[r]:r,"object"==typeof n&&n.regId){let r=n.regId 1695const i=n.message 1696r instanceof RegExp||(r=new RegExp(r)),e.addListener("tagstart",(e=>{const n=e.attrs 1697let o 1698const a=e.col+e.tagName.length+1 1699for(let l=0,s=n.length;l<s;l++)if(o=n[l],"id"===o.name.toLowerCase()&&!1===r.test(o.value)&&t.warn(i,e.line,a+o.index,this,o.raw),"class"===o.name.toLowerCase()){const n=o.value.split(/\s+/g) 1700let l 1701for(let s=0,c=n.length;s<c;s++)l=n[s],l&&!1===r.test(l)&&t.warn(i,e.line,a+o.index,this,l)}}))}}}},62878:(e,t)=>{"use strict" 1702Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"id-unique",description:"The value of id attributes must be unique.",init(e,t){const r={} 1703e.addListener("tagstart",(e=>{const n=e.attrs 1704let i,o 1705const a=e.col+e.tagName.length+1 1706for(let l=0,s=n.length;l<s;l++)if(i=n[l],"id"===i.name.toLowerCase()){o=i.value,o&&(void 0===r[o]?r[o]=1:r[o]++,r[o]>1&&t.error(`The id value [ ${o} ] must be unique.`,e.line,a+i.index,this,i.raw)) 1707break}}))}}},84037:(e,t,r)=>{"use strict" 1708Object.defineProperty(t,"__esModule",{value:!0}),t.attrNoUnnecessaryWhitespace=t.tagsCheck=t.titleRequire=t.tagnameSpecialChars=t.tagnameLowercase=t.emptyTagNotSelfClosed=t.tagSelfClose=t.tagPair=t.styleDisabled=t.srcNotEmpty=t.specCharEscape=t.spaceTabMixedDisabled=t.scriptDisabled=t.inputRequiresLabel=t.inlineStyleDisabled=t.inlineScriptDisabled=t.idUnique=t.idClassValue=t.idClsasAdDisabled=t.htmlLangRequire=t.hrefAbsOrRel=t.headScriptDisabled=t.doctypeHTML5=t.doctypeFirst=t.attrWhitespace=t.attrValueSingleQuotes=t.attrValueNotEmpty=t.attrValueDoubleQuotes=t.attrUnsafeChars=t.attrNoDuplication=t.attrSort=t.attrLowercase=t.altRequire=void 0 1709var n=r(60436) 1710Object.defineProperty(t,"altRequire",{enumerable:!0,get:function(){return n.default}}) 1711var i=r(34842) 1712Object.defineProperty(t,"attrLowercase",{enumerable:!0,get:function(){return i.default}}) 1713var o=r(13470) 1714Object.defineProperty(t,"attrSort",{enumerable:!0,get:function(){return o.default}}) 1715var a=r(59025) 1716Object.defineProperty(t,"attrNoDuplication",{enumerable:!0,get:function(){return a.default}}) 1717var l=r(57977) 1718Object.defineProperty(t,"attrUnsafeChars",{enumerable:!0,get:function(){return l.default}}) 1719var s=r(3866) 1720Object.defineProperty(t,"attrValueDoubleQuotes",{enumerable:!0,get:function(){return s.default}}) 1721var c=r(8410) 1722Object.defineProperty(t,"attrValueNotEmpty",{enumerable:!0,get:function(){return c.default}}) 1723var u=r(92729) 1724Object.defineProperty(t,"attrValueSingleQuotes",{enumerable:!0,get:function(){return u.default}}) 1725var d=r(20190) 1726Object.defineProperty(t,"attrWhitespace",{enumerable:!0,get:function(){return d.default}}) 1727var f=r(47216) 1728Object.defineProperty(t,"doctypeFirst",{enumerable:!0,get:function(){return f.default}}) 1729var h=r(85974) 1730Object.defineProperty(t,"doctypeHTML5",{enumerable:!0,get:function(){return h.default}}) 1731var p=r(14980) 1732Object.defineProperty(t,"headScriptDisabled",{enumerable:!0,get:function(){return p.default}}) 1733var g=r(61409) 1734Object.defineProperty(t,"hrefAbsOrRel",{enumerable:!0,get:function(){return g.default}}) 1735var m=r(90175) 1736Object.defineProperty(t,"htmlLangRequire",{enumerable:!0,get:function(){return m.default}}) 1737var v=r(31164) 1738Object.defineProperty(t,"idClsasAdDisabled",{enumerable:!0,get:function(){return v.default}}) 1739var y=r(59325) 1740Object.defineProperty(t,"idClassValue",{enumerable:!0,get:function(){return y.default}}) 1741var b=r(62878) 1742Object.defineProperty(t,"idUnique",{enumerable:!0,get:function(){return b.default}}) 1743var w=r(63619) 1744Object.defineProperty(t,"inlineScriptDisabled",{enumerable:!0,get:function(){return w.default}}) 1745var x=r(60353) 1746Object.defineProperty(t,"inlineStyleDisabled",{enumerable:!0,get:function(){return x.default}}) 1747var k=r(4913) 1748Object.defineProperty(t,"inputRequiresLabel",{enumerable:!0,get:function(){return k.default}}) 1749var C=r(4399) 1750Object.defineProperty(t,"scriptDisabled",{enumerable:!0,get:function(){return C.default}}) 1751var S=r(14464) 1752Object.defineProperty(t,"spaceTabMixedDisabled",{enumerable:!0,get:function(){return S.default}}) 1753var L=r(93319) 1754Object.defineProperty(t,"specCharEscape",{enumerable:!0,get:function(){return L.default}}) 1755var M=r(3015) 1756Object.defineProperty(t,"srcNotEmpty",{enumerable:!0,get:function(){return M.default}}) 1757var T=r(53845) 1758Object.defineProperty(t,"styleDisabled",{enumerable:!0,get:function(){return T.default}}) 1759var O=r(30398) 1760Object.defineProperty(t,"tagPair",{enumerable:!0,get:function(){return O.default}}) 1761var N=r(10785) 1762Object.defineProperty(t,"tagSelfClose",{enumerable:!0,get:function(){return N.default}}) 1763var A=r(8885) 1764Object.defineProperty(t,"emptyTagNotSelfClosed",{enumerable:!0,get:function(){return A.default}}) 1765var P=r(20666) 1766Object.defineProperty(t,"tagnameLowercase",{enumerable:!0,get:function(){return P.default}}) 1767var z=r(38431) 1768Object.defineProperty(t,"tagnameSpecialChars",{enumerable:!0,get:function(){return z.default}}) 1769var D=r(29877) 1770Object.defineProperty(t,"titleRequire",{enumerable:!0,get:function(){return D.default}}) 1771var E=r(39721) 1772Object.defineProperty(t,"tagsCheck",{enumerable:!0,get:function(){return E.default}}) 1773var W=r(34221) 1774Object.defineProperty(t,"attrNoUnnecessaryWhitespace",{enumerable:!0,get:function(){return W.default}})},63619:(e,t)=>{"use strict"
1775Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"inline-script-disabled",description:"Inline script cannot be used.",init(e,t){e.addListener("tagstart",(e=>{const r=e.attrs 1776let n 1777const i=e.col+e.tagName.length+1 1778let o 1779const a=/^on(unload|message|submit|select|scroll|resize|mouseover|mouseout|mousemove|mouseleave|mouseenter|mousedown|load|keyup|keypress|keydown|focus|dblclick|click|change|blur|error)$/i 1780for(let l=0,s=r.length;l<s;l++)n=r[l],o=n.name.toLowerCase(),!0===a.test(o)?t.warn(`Inline script [ ${n.raw} ] cannot be used.`,e.line,i+n.index,this,n.raw):"src"!==o&&"href"!==o||/^\s*javascript:/i.test(n.value)&&t.warn(`Inline script [ ${n.raw} ] cannot be used.`,e.line,i+n.index,this,n.raw)}))}}},60353:(e,t)=>{"use strict" 1781Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"inline-style-disabled",description:"Inline style cannot be used.",init(e,t){e.addListener("tagstart",(e=>{const r=e.attrs 1782let n 1783const i=e.col+e.tagName.length+1 1784for(let o=0,a=r.length;o<a;o++)n=r[o],"style"===n.name.toLowerCase()&&t.warn(`Inline style [ ${n.raw} ] cannot be used.`,e.line,i+n.index,this,n.raw)}))}}},4913:(e,t)=>{"use strict" 1785Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"input-requires-label",description:"All [ input ] tags must have a corresponding [ label ] tag. ",init(e,t){const r=[],n=[] 1786e.addListener("tagstart",(t=>{const i=t.tagName.toLowerCase(),o=e.getMapAttrs(t.attrs),a=t.col+i.length+1 1787"input"===i&&"hidden"!==o.type&&n.push({event:t,col:a,id:o.id}),"label"===i&&"for"in o&&""!==o.for&&r.push({event:t,col:a,forValue:o.for})})),e.addListener("end",(()=>{n.forEach((e=>{(function(e){let t=!1 1788return r.forEach((r=>{e.id&&e.id===r.forValue&&(t=!0)})),t})(e)||t.warn("No matching [ label ] tag found.",e.event.line,e.col,this,e.event.raw)}))}))}}},4399:(e,t)=>{"use strict" 1789Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"script-disabled",description:"The <script> tag cannot be used.",init(e,t){e.addListener("tagstart",(e=>{"script"===e.tagName.toLowerCase()&&t.error("The <script> tag cannot be used.",e.line,e.col,this,e.raw)}))}}},14464:(e,t)=>{"use strict" 1790Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"space-tab-mixed-disabled",description:"Do not mix tabs and spaces for indentation.",init(e,t,r){let n="nomix",i=null 1791if("string"==typeof r){const e=/^([a-z]+)(\d+)?/.exec(r) 1792e&&(n=e[1],i=e[2]&&parseInt(e[2],10))}e.addListener("text",(r=>{const o=r.raw,a=/(^|\r?\n)([ \t]+)/g 1793let l 1794for(;l=a.exec(o);){const o=e.fixPos(r,l.index+l[1].length) 1795if(1!==o.col)continue 1796const a=l[2] 1797"space"===n?i?!1!==/^ +$/.test(a)&&a.length%i==0||t.warn(`Please use space for indentation and keep ${i} length.`,o.line,1,this,r.raw):!1===/^ +$/.test(a)&&t.warn("Please use space for indentation.",o.line,1,this,r.raw):"tab"===n&&!1===/^\t+$/.test(a)?t.warn("Please use tab for indentation.",o.line,1,this,r.raw):!0===/ +\t|\t+ /.test(a)&&t.warn("Do not mix tabs and spaces for indentation.",o.line,1,this,r.raw)}}))}}},93319:(e,t)=>{"use strict" 1798Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"spec-char-escape",description:"Special characters must be escaped.",init(e,t){e.addListener("text",(r=>{const n=r.raw,i=/([<>])|( \& )/g 1799let o 1800for(;o=i.exec(n);){const n=e.fixPos(r,o.index) 1801t.error(`Special characters must be escaped : [ ${o[0]} ].`,n.line,n.col,this,r.raw)}}))}}},3015:(e,t)=>{"use strict" 1802Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"src-not-empty",description:"The src attribute of an img(script,link) must have a value.",init(e,t){e.addListener("tagstart",(e=>{const r=e.tagName,n=e.attrs 1803let i 1804const o=e.col+r.length+1 1805for(let a=0,l=n.length;a<l;a++)i=n[a],(!0===/^(img|script|embed|bgsound|iframe)$/.test(r)&&"src"===i.name||"link"===r&&"href"===i.name||"object"===r&&"data"===i.name)&&""===i.value&&t.error(`The attribute [ ${i.name} ] of the tag [ ${r} ] must have a value.`,e.line,o+i.index,this,i.raw)}))}}},53845:(e,t)=>{"use strict" 1806Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"style-disabled",description:"<style> tags cannot be used.",init(e,t){e.addListener("tagstart",(e=>{"style"===e.tagName.toLowerCase()&&t.warn("The <style> tag cannot be used.",e.line,e.col,this,e.raw)}))}}},30398:(e,t)=>
1806{"use strict" 1807Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"tag-pair",description:"Tag must be paired.",init(e,t){const r=[],n=e.makeMap("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,track,command,source,keygen,wbr") 1808e.addListener("tagstart",(e=>{const t=e.tagName.toLowerCase() 1809void 0!==n[t]||e.close||r.push({tagName:t,line:e.line,raw:e.raw})})),e.addListener("tagend",(e=>{const n=e.tagName.toLowerCase() 1810let i 1811for(i=r.length-1;i>=0&&r[i].tagName!==n;i--);if(i>=0){const n=[] 1812for(let e=r.length-1;e>i;e--)n.push(`</${r[e].tagName}>`) 1813if(n.length>0){const i=r[r.length-1] 1814t.error(`Tag must be paired, missing: [ ${n.join("")} ], start tag match failed [ ${i.raw} ] on line ${i.line}.`,e.line,e.col,this,e.raw)}r.length=i}else t.error(`Tag must be paired, no start tag: [ ${e.raw} ]`,e.line,e.col,this,e.raw)})),e.addListener("end",(e=>{const n=[] 1815for(let e=r.length-1;e>=0;e--)n.push(`</${r[e].tagName}>`) 1816if(n.length>0){const i=r[r.length-1] 1817t.error(`Tag must be paired, missing: [ ${n.join("")} ], open tag match failed [ ${i.raw} ] on line ${i.line}.`,e.line,e.col,this,"")}}))}}},10785:(e,t)=>{"use strict" 1818Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"tag-self-close",description:"Empty tags must be self closed.",init(e,t){const r=e.makeMap("area,base,basefont,bgsound,br,col,frame,hr,img,input,isindex,link,meta,param,embed,track,command,source,keygen,wbr") 1819e.addListener("tagstart",(e=>{const n=e.tagName.toLowerCase() 1820void 0!==r[n]&&(e.close||t.warn(`The empty tag : [ ${n} ] must be self closed.`,e.line,e.col,this,e.raw))}))}}},20666:(e,t)=>{"use strict" 1821Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"tagname-lowercase",description:"All html element names must be in lowercase.",init(e,t,r){const n=Array.isArray(r)?r:[] 1822e.addListener("tagstart,tagend",(e=>{const r=e.tagName;-1===n.indexOf(r)&&r!==r.toLowerCase()&&t.error(`The html element name of [ ${r} ] must be in lowercase.`,e.line,e.col,this,e.raw)}))}}},38431:(e,t)=>{"use strict" 1823Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"tagname-specialchars",description:"All special characters must be escaped.",init(e,t){const r=/[^a-zA-Z0-9\-:_]/ 1824e.addListener("tagstart,tagend",(e=>{const n=e.tagName 1825r.test(n)&&t.error(`The html element name of [ ${n} ] contains special character.`,e.line,e.col,this,e.raw)}))}}},39721:(e,t)=>{"use strict" 1826Object.defineProperty(t,"__esModule",{value:!0}) 1827let r={a:{selfclosing:!1,attrsRequired:["href","title"],redundantAttrs:["alt"]},div:{selfclosing:!1},main:{selfclosing:!1,redundantAttrs:["role"]},nav:{selfclosing:!1,redundantAttrs:["role"]},script:{attrsOptional:[["async","async"],["defer","defer"]]},img:{selfclosing:!0,attrsRequired:["src","alt","title"]}} 1828t.default={id:"tags-check",description:"Checks html tags.",init(e,t,n){r=Object.assign(Object.assign({},r),n),e.addListener("tagstart",(e=>{const n=e.attrs,i=e.col+e.tagName.length+1,o=e.tagName.toLowerCase() 1829if(r[o]){const a=r[o] 1830if(!0!==a.selfclosing||e.close?!1===a.selfclosing&&e.close&&t.warn(`The <${o}> tag must not be selfclosing.`,e.line,e.col,this,e.raw):t.warn(`The <${o}> tag must be selfclosing.`,e.line,e.col,this,e.raw),Array.isArray(a.attrsRequired)){a.attrsRequired.forEach((r=>{if(Array.isArray(r)){const a=r.map((e=>e)),l=a.shift(),s=a 1831n.some((e=>e.name===l))?n.forEach((r=>{r.name===l&&-1===s.indexOf(r.value)&&t.error(`The <${o}> tag must have attr '${l}' with one value of '${s.join("' or '")}'.`,e.line,i,this,e.raw)})):t.error(`The <${o}> tag must have attr '${l}'.`,e.line,i,this,e.raw)}else n.some((e=>-1!==r.split("|").indexOf(e.name)))||t.error(`The <${o}> tag must have attr '${r}'.`,e.line,i,this,e.raw)}))}if(Array.isArray(a.attrsOptional)){a.attrsOptional.forEach((r=>{if(Array.isArray(r)){const a=r.map((e=>e)),l=a.shift(),s=a 1832n.some((e=>e.name===l))&&n.forEach((r=>{r.name===l&&-1===s.indexOf(r.value)&&t.error(`The <${o}> tag must have optional attr '${l}' with one value of '${s.join("' or '")}'.`,e.line,i,this,e.raw)}))}}))}if(Array.isArray(a.redundantAttrs)){a.redundantAttrs.forEach((r=>{n.some((e=>e.name===r))&&t.error(`The attr '${r}' is redundant for <${o}> and should be omitted.`,e.line,i,this,e.raw)}))}}}))}}},29877:(e,t)=>{"use strict"
1833Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"title-require",description:"<title> must be present in <head> tag.",init(e,t){let r=!1,n=!1 1834const i=e=>{const t=e.tagName.toLowerCase() 1835"head"===t?r=!0:"title"===t&&r&&(n=!0)},o=r=>{const a=r.tagName.toLowerCase() 1836if(n&&"title"===a){const e=r.lastEvent;("text"!==e.type||"text"===e.type&&!0===/^\s*$/.test(e.raw))&&t.error("<title></title> must not be empty.",r.line,r.col,this,r.raw)}else"head"===a&&(!1===n&&t.error("<title> must be present in <head> tag.",r.line,r.col,this,r.raw),e.removeListener("tagstart",i),e.removeListener("tagend",o))} 1837e.addListener("tagstart",i),e.addListener("tagend",o)}}}}]) 1838 1839//# sourceMappingURL=codeMirror-9c85e489f94551c6136b.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.