| 1 | webpackJsonp([2],{115:function(e,t){!function(){"use strict";var t=void 0!==e&&e.exports,n="undefined"!=typeof Element&&"ALLOW_KEYBOARD_INPUT"in Element,r=function(){for(var e,t,n=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],r=0,i=n.length,o={};r<i;r++)if((e=n[r])&&e[1]in document){for(r=0,t=e.length;r<t;r++)o[n[0][r]]=e[r];return o}return!1}(),i={request:function(e){var t=r.requestFullscreen;e=e||document.documentElement,/5\.1[\.\d]* Safari/.test(navigator.userAgent)?e[t]():e[t](n&&Element.ALLOW_KEYBOARD_INPUT)},exit:function(){document[r.exitFullscreen]()},toggle:function(e){this.isFullscreen?this.exit():this.request(e)},raw:r};if(!r)return void(t?e.exports=!1:window.screenfull=!1);Object.defineProperties(i,{isFullscreen:{get:function(){return Boolean(document[r.fullscreenElement])}},element:{enumerable:!0,get:function(){return document[r.fullscreenElement]}},enabled:{enumerable:!0,get:function(){return Boolean(document[r.fullscreenEnabled])}}}),t?e.exports=i:window.screenfull=i}()},12:function(e,t,n){!function(t){e.exports=t()}(function(){"use strict";function e(n,r){if(!(this instanceof e))return new e(n,r);this.options=r=r?Hi(r):{},Hi(el,r,!1),h(r);var i=r.value;"string"==typeof i&&(i=new kl(i,r.mode,null,r.lineSeparator)),this.doc=i;var o=new e.inputStyles[r.inputStyle](this),l=this.display=new t(n,i,o);l.wrapper.CodeMirror=this,c(this),a(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),r.autofocus&&!Eo&&l.input.focus(),v(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 Ai,keySeq:null,specialChars:null};var s=this;bo&&xo<11&&setTimeout(function(){s.display.input.reset(!0)},20),Bt(this),Yi(),xt(this),this.curOp.forceUpdate=!0,$r(this,i),r.autofocus&&!Eo||s.hasFocus()?setTimeout(Ri(vn,this),20):yn(this);for(var u in tl)tl.hasOwnProperty(u)&&tl[u](this,r[u],nl);C(this),r.finishInit&&r.finishInit(this);for(var f=0;f<ll.length;++f)ll[f](this);Ct(this),wo&&r.lineWrapping&&"optimizelegibility"==getComputedStyle(l.lineDiv).textRendering&&(l.lineDiv.style.textRendering="auto")}function t(e,t,n){var r=this;this.input=n,r.scrollbarFiller=Bi("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=Bi("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=Bi("div",null,"CodeMirror-code"),r.selectionDiv=Bi("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=Bi("div",null,"CodeMirror-cursors"),r.measure=Bi("div",null,"CodeMirror-measure"),r.lineMeasure=Bi("div",null,"CodeMirror-measure"),r.lineSpace=Bi("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none"),r.mover=Bi("div",[Bi("div",[r.lineSpace],"CodeMirror-lines")],null,"position: relative"),r.sizer=Bi("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=Bi("div",null,null,"position: absolute; height: "+Fl+"px; width: 1px;"),r.gutters=Bi("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=Bi("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=Bi("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),bo&&xo<8&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),wo||mo&&Eo||(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,n.init(r)}function n(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),r(t)}function r(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,je(e,100),e.state.modeGen++,e.curOp&&Ft(e)}function i(e){e.options.lineWrapping?(Jl(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Zl(e.display.wrapper,"CodeMirror-wrap"),d(e)),l(e),Ft(e),at(e),setTimeout(function(){y(e)},100)}function o(e){var t=yt(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/bt(e.display)-3);return function(i){if(Cr(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l<i.widgets.length;l++)i.widgets[l].height&&(o+=i.widgets[l].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function l(e){var t=e.doc,n=o(e);t.iter(function(e){var t=n(e);t!=e.height&&ei(e,t)})}function a(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),at(e)}function s(e){c(e),Ft(e),setTimeout(function(){w(e)},20)}function c(e){var t=e.display.gutters,n=e.options.gutters;Ui(t);for(var r=0;r<n.length;++r){var i=n[r],o=t.appendChild(Bi("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=r?"":"none",u(e)}function u(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function f(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=gr(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=mr(r);){var i=t.find(0,!0);n-=r.text.length-i.from.ch,r=i.to.line,n+=r.text.length-i.to.ch}return n}function d(e){var t=e.display,n=e.doc;t.maxLine=Zr(n,n.first),t.maxLineLength=f(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=f(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function h(e){var t=Wi(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function p(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Ve(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Ke(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function g(e,t,n){this.cm=n;var r=this.vert=Bi("div",[Bi("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=Bi("div",[Bi("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),Al(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Al(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,bo&&xo<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function m(){}function v(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Zl(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Al(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?on(t,e):rn(t,e)},t),t.display.scrollbars.addClass&&Jl(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=p(e));var n=e.display.barWidth,r=e.display.barHeight;b(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&P(e),b(e,p(e)),n=e.display.barWidth,r=e.display.barHeight}function b(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function x(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Ue(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=ni(t,r),l=ni(t,i);if(n&&n.ensure){var a=n.ensure.from.line,s=n.ensure.to.line;a<o?(o=a,l=ni(t,ri(Zr(t,a))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=l&&(o=ni(t,ri(Zr(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function w(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=k(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",l=0;l<n.length;l++)if(!n[l].hidden){e.options.fixedGutter&&n[l].gutter&&(n[l].gutter.style.left=o);var a=n[l].alignable;if(a)for(var s=0;s<a.length;s++)a[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function C(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=S(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(Bi("div",[Bi("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,l=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-l)+1,r.lineNumWidth=r.lineNumInnerWidth+l,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",u(e),!0}return!1}function S(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function k(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function L(e,t,n){var r=e.display;this.viewport=t,this.visible=x(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=qe(e),this.force=n,this.dims=W(e),this.events=[]}function M(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Ke(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Ke(e)+"px",t.scrollbarsClipped=!0)}function T(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Ht(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==zt(e))return!1;C(e)&&(Ht(e),t.dims=W(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>l&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),Ho&&(o=xr(e.doc,o),l=wr(e.doc,l));var a=o!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;_t(e,o,l),n.viewOffset=ri(Zr(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=zt(e);if(!a&&0==s&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Gi();return s>4&&(n.lineDiv.style.display="none"),D(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,c&&Gi()!=c&&c.offsetHeight&&c.focus(),Ui(n.cursorDiv),Ui(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,je(e,400)),n.updateLineNumbers=null,!0}function O(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=qe(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Ve(e.display)-Xe(e),n.top)}),t.visible=x(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&T(e,t);r=!1){P(e);var i=p(e);De(e),y(e,i),A(e,i)}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 E(e,t){var n=new L(e,t);if(T(e,n)){P(e),O(e,n);var r=p(e);De(e),y(e,r),A(e,r),n.finish()}}function A(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+Ke(e)+"px"}function P(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i,o=t.view[r];if(!o.hidden){if(bo&&xo<8){var l=o.node.offsetTop+o.node.offsetHeight;i=l-n,n=l}else{var a=o.node.getBoundingClientRect();i=a.bottom-a.top}var s=o.line.height-i;if(i<2&&(i=yt(t)),(s>.001||s<-.001)&&(ei(o.line,i),N(o.line),o.rest))for(var c=0;c<o.rest.length;c++)N(o.rest[c])}}}function N(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.parentNode.offsetHeight}function W(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l)n[e.options.gutters[l]]=o.offsetLeft+o.clientLeft+i,r[e.options.gutters[l]]=o.clientWidth;return{fixedPos:k(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function D(e,t,n){function r(t){var n=t.nextSibling;return wo&&Ao&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var i=e.display,o=e.options.lineNumbers,l=i.lineDiv,a=l.firstChild,s=i.view,c=i.viewFrom,u=0;u<s.length;u++){var f=s[u];if(f.hidden);else if(f.node&&f.node.parentNode==l){for(;a!=f.node;)a=r(a);var d=o&&null!=t&&t<=c&&f.lineNumber;f.changes&&(Wi(f.changes,"gutter")>-1&&(d=!1),F(e,f,c,n)),d&&(Ui(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(S(e.options,c)))),a=f.node.nextSibling}else{var h=U(e,f,c,n);l.insertBefore(h,a)}c+=f.size}for(;a;)a=r(a)}function F(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?j(e,t):"gutter"==o?z(e,t,n,r):"class"==o?_(t):"widget"==o&&B(e,t,r)}t.changes=null}function I(e){return e.node==e.text&&(e.node=Bi("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),bo&&xo<8&&(e.node.style.zIndex=2)),e.node}function H(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=I(e);e.background=n.insertBefore(Bi("div",null,t),n.firstChild)}}function R(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Rr(e,t)}function j(e,t){var n=t.text.className,r=R(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,_(t)):n&&(t.text.className=n)}function _(e){H(e),e.line.wrapClass?I(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function z(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=I(t);t.gutterBackground=Bi("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var i=I(t),l=t.gutter=Bi("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),i.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(Bi("div",S(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var a=0;a<e.options.gutters.length;++a){var s=e.options.gutters[a],c=o.hasOwnProperty(s)&&o[s];c&&l.appendChild(Bi("div",[c],"CodeMirror-gutter-elt","left: "+r.gutterLeft[s]+"px; width: "+r.gutterWidth[s]+"px"))}}}function B(e,t,n){t.alignable&&(t.alignable=null);for(var r,i=t.node.firstChild;i;i=r){var r=i.nextSibling;"CodeMirror-linewidget"==i.className&&t.node.removeChild(i)}V(e,t,n)}function U(e,t,n,r){var i=R(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),_(t),z(e,t,n,r),V(e,t,r),t.node}function V(e,t,n){if(G(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)G(e,t.rest[r],t,n,!1)}function G(e,t,n,r,i){if(t.widgets)for(var o=I(n),l=0,a=t.widgets;l<a.length;++l){var s=a[l],c=Bi("div",[s.node],"CodeMirror-linewidget");s.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),K(s,c,n,r),e.display.input.setUneditable(c),i&&s.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),ki(s,"redraw")}}function K(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function q(e){return Ro(e.line,e.ch)}function X(e,t){return jo(e,t)<0?t:e}function Y(e,t){return jo(e,t)<0?e:t}function $(e){e.state.focused||(e.display.input.focus(),vn(e))}function Z(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var l=e.state.pasteIncoming||"paste"==i,a=o.splitLines(t),s=null;if(l&&r.ranges.length>1)if(_o&&_o.join("\n")==t){if(r.ranges.length%_o.length==0){s=[];for(var c=0;c<_o.length;c++)s.push(o.splitLines(_o[c]))}}else a.length==r.ranges.length&&(s=Di(a,function(e){return[e]}));for(var c=r.ranges.length-1;c>=0;c--){var u=r.ranges[c],f=u.from(),d=u.to();u.empty()&&(n&&n>0?f=Ro(f.line,f.ch-n):e.state.overwrite&&!l&&(d=Ro(d.line,Math.min(Zr(o,d.line).text.length,d.ch+Ni(a).length))));var h=e.curOp.updateInput,p={from:f,to:d,text:s?s[c%s.length]:a,origin:i||(l?"paste":e.state.cutIncoming?"cut":"+input")};Mn(e.doc,p),ki(e,"inputRead",e,p)}t&&!l&&Q(e,t),Rn(e),e.curOp.updateInput=h,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function J(e,t){var n=e.clipboardData&&e.clipboardData.getData("text/plain");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Et(t,function(){Z(t,n,0,null,"paste")}),!0}function Q(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(t.indexOf(o.electricChars.charAt(a))>-1){l=_n(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Zr(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=_n(e,i.head.line,"smart"));l&&ki(e,"electricInput",e,i.head.line)}}}function ee(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:Ro(i,0),head:Ro(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function te(e){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck","false")}function ne(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Ai,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null}function re(){var e=Bi("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none"),t=Bi("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return wo?e.style.width="1000px":e.setAttribute("wrap","off"),Oo&&(e.style.border="1px solid black"),te(e),t}function ie(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ai,this.gracePeriod=!1}function oe(e,t){var n=Qe(e,t.line);if(!n||n.hidden)return null;var r=Zr(e.doc,t.line),i=$e(n,r,t.line),o=ii(r),l="left";if(o){l=co(o,t.ch)%2?"right":"left"}var a=nt(i.map,t.ch,l);return a.offset="right"==a.collapse?a.end:a.start,a}function le(e,t){return t&&(e.bad=!0),e}function ae(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return le(e.clipPos(Ro(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return se(o,t,n)}}function se(e,t,n){function r(t,n,r){for(var i=-1;i<(u?u.length:0);i++)for(var o=i<0?c.map:u[i],l=0;l<o.length;l+=3){var a=o[l+2];if(a==t||a==n){var s=ti(i<0?e.line:e.rest[i]),f=o[l]+r;return(r<0||a!=t)&&(f=o[l+(r?1:0)]),Ro(s,f)}}}var i=e.text.firstChild,o=!1;if(!t||!Xl(i,t))return le(Ro(ti(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[n],n=0,!t)){var l=e.rest?Ni(e.rest):e.line;return le(Ro(ti(l),l.text.length),o)}var a=3==t.nodeType?t:null,s=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));s.parentNode!=i;)s=s.parentNode;var c=e.measure,u=c.maps,f=r(a,s,n);if(f)return le(f,o);for(var d=s.nextSibling,h=a?a.nodeValue.length-n:0;d;d=d.nextSibling){if(f=r(d,d.firstChild,0))return le(Ro(f.line,f.ch-h),o);h+=d.textContent.length}for(var p=s.previousSibling,h=n;p;p=p.previousSibling){if(f=r(p,p.firstChild,-1))return le(Ro(f.line,f.ch+h),o);h+=d.textContent.length}}function ce(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function l(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return""==n&&(n=t.textContent.replace(/\u200b/g,"")),void(a+=n);var u,f=t.getAttribute("cm-marker");if(f){var d=e.findMarks(Ro(r,0),Ro(i+1,0),o(+f));return void(d.length&&(u=d[0].find())&&(a+=Jr(e.doc,u.from,u.to).join(c)))}if("false"==t.getAttribute("contenteditable"))return;for(var h=0;h<t.childNodes.length;h++)l(t.childNodes[h]);/^(pre|div|p)$/i.test(t.nodeName)&&(s=!0)}else if(3==t.nodeType){var p=t.nodeValue;if(!p)return;s&&(a+=c,s=!1),a+=p}}for(var a="",s=!1,c=e.doc.lineSeparator();l(t),t!=n;)t=t.nextSibling;return a}function ue(e,t){this.ranges=e,this.primIndex=t}function fe(e,t){this.anchor=e,this.head=t}function de(e,t){var n=e[t];e.sort(function(e,t){return jo(e.from(),t.from())}),t=Wi(e,n);for(var r=1;r<e.length;r++){var i=e[r],o=e[r-1];if(jo(o.to(),i.from())>=0){var l=Y(o.from(),i.from()),a=X(o.to(),i.to()),s=o.empty()?i.from()==i.head:o.from()==o.head;r<=t&&--t,e.splice(--r,2,new fe(s?a:l,s?l:a))}}return new ue(e,t)}function he(e,t){return new ue([new fe(e,t||e)],0)}function pe(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ge(e,t){if(t.line<e.first)return Ro(e.first,0);var n=e.first+e.size-1;return t.line>n?Ro(n,Zr(e,n).text.length):me(t,Zr(e,t.line).text.length)}function me(e,t){var n=e.ch;return null==n||n>t?Ro(e.line,t):n<0?Ro(e.line,0):e}function ve(e,t){return t>=e.first&&t<e.first+e.size}function ye(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=ge(e,t[r]);return n}function be(e,t,n,r){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(r){var o=jo(n,i)<0;o!=jo(r,i)<0?(i=n,n=r):o!=jo(n,r)<0&&(n=r)}return new fe(i,n)}return new fe(r||n,n)}function xe(e,t,n,r){Me(e,new ue([be(e,e.sel.primary(),t,n)],0),r)}function we(e,t,n){for(var r=[],i=0;i<e.sel.ranges.length;i++)r[i]=be(e,e.sel.ranges[i],t[i],null);Me(e,de(r,e.sel.primIndex),n)}function Ce(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,Me(e,de(i,e.sel.primIndex),r)}function Se(e,t,n,r){Me(e,he(t,n),r)}function ke(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new fe(ge(e,t[n].anchor),ge(e,t[n].head))},origin:n&&n.origin};return Wl(e,"beforeSelectionChange",e,r),e.cm&&Wl(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?de(r.ranges,r.ranges.length-1):t}function Le(e,t,n){var r=e.history.done,i=Ni(r);i&&i.ranges?(r[r.length-1]=t,Te(e,t,n)):Me(e,t,n)}function Me(e,t,n){Te(e,t,n),fi(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Te(e,t,n){(Oi(e,"beforeSelectionChange")||e.cm&&Oi(e.cm,"beforeSelectionChange"))&&(t=ke(e,t,n)),Oe(e,Ae(e,t,n&&n.bias||(jo(t.primary().head,e.sel.primary().head)<0?-1:1),!0)),n&&!1===n.scroll||!e.cm||Rn(e.cm)}function Oe(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Ti(e.cm)),ki(e,"cursorActivity",e))}function Ee(e){Oe(e,Ae(e,e.sel,null,!1),Hl)}function Ae(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var l=t.ranges[o],a=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=Ne(e,l.anchor,a&&a.anchor,n,r),c=Ne(e,l.head,a&&a.head,n,r);(i||s!=l.anchor||c!=l.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new fe(s,c))}return i?de(i,t.primIndex):t}function Pe(e,t,n,r,i){var o=Zr(e,t.line);if(o.markedSpans)for(var l=0;l<o.markedSpans.length;++l){var a=o.markedSpans[l],s=a.marker;if((null==a.from||(s.inclusiveLeft?a.from<=t.ch:a.from<t.ch))&&(null==a.to||(s.inclusiveRight?a.to>=t.ch:a.to>t.ch))){if(i&&(Wl(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!s.atomic)continue;if(n){var c,u=s.find(r<0?1:-1);if((r<0?s.inclusiveRight:s.inclusiveLeft)&&(u=We(e,u,-r,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=jo(u,n))&&(r<0?c<0:c>0))return Pe(e,u,t,r,i)}var f=s.find(r<0?-1:1);return(r<0?s.inclusiveLeft:s.inclusiveRight)&&(f=We(e,f,r,f.line==t.line?o:null)),f?Pe(e,f,t,r,i):null}}return t}function Ne(e,t,n,r,i){var o=r||1,l=Pe(e,t,n,o,i)||!i&&Pe(e,t,n,o,!0)||Pe(e,t,n,-o,i)||!i&&Pe(e,t,n,-o,!0);return l||(e.cantEdit=!0,Ro(e.first,0))}function We(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?ge(e,Ro(t.line-1)):null:n>0&&t.ch==(r||Zr(e,t.line)).text.length?t.line<e.first+e.size-1?Ro(t.line+1,0):null:new Ro(t.line,t.ch+n)}function De(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Fe(e,t){for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),l=0;l<n.sel.ranges.length;l++)if(!1!==t||l!=n.sel.primIndex){var a=n.sel.ranges[l];if(!(a.from().line>=e.display.viewTo||a.to().line<e.display.viewFrom)){var s=a.empty();(s||e.options.showCursorWhenSelecting)&&Ie(e,a.head,i),s||He(e,a,o)}}return r}function Ie(e,t,n){var r=ht(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(Bi("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var o=n.appendChild(Bi("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function He(e,t,n){function r(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),a.appendChild(Bi("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?u-e:n)+"px; height: "+(r-t)+"px"))}function i(t,n,i){function o(n,r){return dt(e,Ro(t,n),"div",f,r)}var a,s,f=Zr(l,t),d=f.text.length;return eo(ii(f),n||0,null==i?d:i,function(e,t,l){var f,h,p,g=o(e,"left");if(e==t)f=g,h=p=g.left;else{if(f=o(t-1,"right"),"rtl"==l){var m=g;g=f,f=m}h=g.left,p=f.right}null==n&&0==e&&(h=c),f.top-g.top>3&&(r(h,g.top,null,g.bottom),h=c,g.bottom<f.top&&r(h,g.bottom,null,f.top)),null==i&&t==d&&(p=u),(!a||g.top<a.top||g.top==a.top&&g.left<a.left)&&(a=g),(!s||f.bottom>s.bottom||f.bottom==s.bottom&&f.right>s.right)&&(s=f),h<c+1&&(h=c),r(h,f.top,p-h,f.bottom)}),{start:a,end:s}}var o=e.display,l=e.doc,a=document.createDocumentFragment(),s=Ge(e.display),c=s.left,u=Math.max(o.sizerWidth,qe(e)-o.sizer.offsetLeft)-s.right,f=t.from(),d=t.to();if(f.line==d.line)i(f.line,f.ch,d.ch);else{var h=Zr(l,f.line),p=Zr(l,d.line),g=yr(h)==yr(p),m=i(f.line,f.ch,g?h.text.length+1:null).end,v=i(d.line,g?0:null,d.ch).start;g&&(m.top<v.top-2?(r(m.right,m.top,null,m.bottom),r(c,v.top,v.left,v.bottom)):r(m.right,m.top,v.left-m.right,m.bottom)),m.bottom<v.top&&r(c,m.bottom,null,v.top)}n.appendChild(a)}function Re(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function je(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.viewTo&&e.state.highlight.set(t,Ri(_e,e))}function _e(e){var t=e.doc;if(t.frontier<t.first&&(t.frontier=t.first),!(t.frontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=sl(t.mode,Be(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength,s=Dr(e,o,a?sl(t.mode,r):r,!0);o.styles=s.styles;var c=o.styleClasses,u=s.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var f=!l||l.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!f&&d<l.length;++d)f=l[d]!=o.styles[d];f&&i.push(t.frontier),o.stateAfter=a?r:sl(t.mode,r)}else o.text.length<=e.options.maxHighlightLength&&Ir(e,o.text,r),o.stateAfter=t.frontier%5==0?sl(t.mode,r):null;if(++t.frontier,+new Date>n)return je(e,e.options.workDelay),!0}),i.length&&Et(e,function(){for(var t=0;t<i.length;t++)It(e,i[t],"text")})}}function ze(e,t,n){for(var r,i,o=e.doc,l=n?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>l;--a){if(a<=o.first)return o.first;var s=Zr(o,a-1);if(s.stateAfter&&(!n||a<=o.frontier))return a;var c=_l(s.text,null,e.options.tabSize);(null==i||r>c)&&(i=a-1,r=c)}return i}function Be(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=ze(e,t,n),l=o>r.first&&Zr(r,o-1).stateAfter;return l=l?sl(r.mode,l):cl(r.mode),r.iter(o,t,function(n){Ir(e,n.text,l);var a=o==t-1||o%5==0||o>=i.viewFrom&&o<i.viewTo;n.stateAfter=a?sl(r.mode,l):null,++o}),n&&(r.frontier=o),l}function Ue(e){return e.lineSpace.offsetTop}function Ve(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ge(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=Vi(e.measure,Bi("pre","x")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function Ke(e){return Fl-e.display.nativeBarWidth}function qe(e){return e.display.scroller.clientWidth-Ke(e)-e.display.barWidth}function Xe(e){return e.display.scroller.clientHeight-Ke(e)-e.display.barHeight}function Ye(e,t,n){var r=e.options.lineWrapping,i=r&&qe(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),a=0;a<l.length-1;a++){var s=l[a],c=l[a+1];Math.abs(s.bottom-c.bottom)>2&&o.push((s.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function $e(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var r=0;r<e.rest.length;r++)if(ti(e.rest[r])>n)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Ze(e,t){t=yr(t);var n=ti(t),r=e.display.externalMeasured=new Wt(e.doc,t,n);r.lineN=n;var i=r.built=Rr(e,r);return r.text=i.pre,Vi(e.display.lineMeasure,i.pre),r}function Je(e,t,n,r){return tt(e,et(e,t),n,r)}function Qe(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Rt(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function et(e,t){var n=ti(t),r=Qe(e,n);r&&!r.text?r=null:r&&r.changes&&(F(e,r,n,W(e)),e.curOp.forceUpdate=!0),r||(r=Ze(e,t));var i=$e(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function tt(e,t,n,r,i){t.before&&(n=-1);var o,l=n+(r||"");return t.cache.hasOwnProperty(l)?o=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Ye(e,t.view,t.rect),t.hasHeights=!0),o=rt(e,t,n,r),o.bogus||(t.cache[l]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}function nt(e,t,n){for(var r,i,o,l,a=0;a<e.length;a+=3){var s=e[a],c=e[a+1];if(t<s?(i=0,o=1,l="left"):t<c?(i=t-s,o=i+1):(a==e.length-3||t==c&&e[a+3]>t)&&(o=c-s,i=o-1,t>=c&&(l="right")),null!=i){if(r=e[a+2],s==c&&n==(r.insertLeft?"left":"right")&&(l=n),"left"==n&&0==i)for(;a&&e[a-2]==e[a-3]&&e[a-1].insertLeft;)r=e[2+(a-=3)],l="left";if("right"==n&&i==c-s)for(;a<e.length-3&&e[a+3]==e[a+4]&&!e[a+5].insertLeft;)r=e[(a+=3)+2],l="right";break}}return{node:r,start:i,end:o,collapse:l,coverStart:s,coverEnd:c}}function rt(e,t,n,r){var i,o=nt(t.map,n,r),l=o.node,a=o.start,s=o.end,c=o.collapse;if(3==l.nodeType){for(var u=0;u<4;u++){for(;a&&zi(t.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+s<o.coverEnd&&zi(t.line.text.charAt(o.coverStart+s));)++s;if(bo&&xo<9&&0==a&&s==o.coverEnd-o.coverStart)i=l.parentNode.getBoundingClientRect();else if(bo&&e.options.lineWrapping){var f=Vl(l,a,s).getClientRects();i=f.length?f["right"==r?f.length-1:0]:Vo}else i=Vl(l,a,s).getBoundingClientRect()||Vo;if(i.left||i.right||0==a)break;s=a,a-=1,c="right"}bo&&xo<11&&(i=it(e.display.measure,i))}else{a>0&&(c=r="right");var f;i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(bo&&xo<9&&!a&&(!i||!i.left&&!i.right)){var d=l.parentNode.getClientRects()[0];i=d?{left:d.left,right:d.left+bt(e.display),top:d.top,bottom:d.bottom}:Vo}for(var h=i.top-t.rect.top,p=i.bottom-t.rect.top,g=(h+p)/2,m=t.view.measure.heights,u=0;u<m.length-1&&!(g<m[u]);u++);var v=u?m[u-1]:0,y=m[u],b={left:("right"==c?i.right:i.left)-t.rect.left,right:("left"==c?i.left:i.right)-t.rect.left,top:v,bottom:y};return i.left||i.right||(b.bogus=!0),e.options.singleCursorHeightPerLine||(b.rtop=h,b.rbottom=p),b}function it(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Qi(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function ot(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 lt(e){e.display.externalMeasure=null,Ui(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)ot(e.display.view[t])}function at(e){lt(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function st(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ct(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function ut(e,t,n,r){if(t.widgets)for(var i=0;i<t.widgets.length;++i)if(t.widgets[i].above){var o=Lr(t.widgets[i]);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var l=ri(t);if("local"==r?l+=Ue(e.display):l-=e.display.viewOffset,"page"==r||"window"==r){var a=e.display.lineSpace.getBoundingClientRect();l+=a.top+("window"==r?0:ct());var s=a.left+("window"==r?0:st());n.left+=s,n.right+=s}return n.top+=l,n.bottom+=l,n}function ft(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=st(),i-=ct();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:r-l.left,top:i-l.top}}function dt(e,t,n,r,i){return r||(r=Zr(e.doc,t.line)),ut(e,r,Je(e,r,t.ch,i),n)}function ht(e,t,n,r,i,o){function l(t,l){var a=tt(e,i,t,l?"right":"left",o);return l?a.left=a.right:a.right=a.left,ut(e,r,a,n)}function a(e,t){var n=s[t],r=n.level%2;return e==to(n)&&t&&n.level<s[t-1].level?(n=s[--t],e=no(n)-(n.level%2?0:1),r=!0):e==no(n)&&t<s.length-1&&n.level<s[t+1].level&&(n=s[++t],e=to(n)-n.level%2,r=!1),r&&e==n.to&&e>n.from?l(e-1):l(e,r)}r=r||Zr(e.doc,t.line),i||(i=et(e,r));var s=ii(r),c=t.ch;if(!s)return l(c);var u=co(s,c),f=a(c,u);return null!=la&&(f.other=a(c,la)),f}function pt(e,t){var n=0,t=ge(e.doc,t);e.options.lineWrapping||(n=bt(e.display)*t.ch);var r=Zr(e.doc,t.line),i=ri(r)+Ue(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function gt(e,t,n,r){var i=Ro(e,t);return i.xRel=r,n&&(i.outside=!0),i}function mt(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return gt(r.first,0,!0,-1);var i=ni(r,n),o=r.first+r.size-1;if(i>o)return gt(r.first+r.size-1,Zr(r,o).text.length,!0,1);t<0&&(t=0);for(var l=Zr(r,i);;){var a=vt(e,l,i,t,n),s=mr(l),c=s&&s.find(0,!0);if(!s||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;i=ti(l=c.to.line)}}function vt(e,t,n,r,i){function o(r){var i=ht(e,Ro(n,r),"line",t,c);return a=!0,l>i.bottom?i.left-s:l<i.top?i.left+s:(a=!1,i.left)}var l=i-ri(t),a=!1,s=2*e.display.wrapper.clientWidth,c=et(e,t),u=ii(t),f=t.text.length,d=ro(t),h=io(t),p=o(d),g=a,m=o(h),v=a;if(r>m)return gt(n,h,v,1);for(;;){if(u?h==d||h==fo(t,d,1):h-d<=1){for(var y=r<p||r-p<=m-r?d:h,b=r-(y==d?p:m);zi(t.text.charAt(y));)++y;return gt(n,y,y==d?g:v,b<-1?-1:b>1?1:0)}var x=Math.ceil(f/2),w=d+x;if(u){w=d;for(var C=0;C<x;++C)w=fo(t,w,1)}var S=o(w);S>r?(h=w,m=S,(v=a)&&(m+=1e3),f=x):(d=w,p=S,g=a,f-=x)}}function yt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==zo){zo=Bi("pre");for(var t=0;t<49;++t)zo.appendChild(document.createTextNode("x")),zo.appendChild(Bi("br"));zo.appendChild(document.createTextNode("x"))}Vi(e.measure,zo);var n=zo.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Ui(e.measure),n||1}function bt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=Bi("span","xxxxxxxxxx"),n=Bi("pre",[t]);Vi(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function xt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ko},Go?Go.ops.push(e.curOp):e.curOp.ownsGroup=Go={ops:[e.curOp],delayedCallbacks:[]}}function wt(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function Ct(e){var t=e.curOp,n=t.ownsGroup;if(n)try{wt(n)}finally{Go=null;for(var r=0;r<n.ops.length;r++)n.ops[r].cm.curOp=null;St(n)}}function St(e){for(var t=e.ops,n=0;n<t.length;n++)kt(t[n]);for(var n=0;n<t.length;n++)Lt(t[n]);for(var n=0;n<t.length;n++)Mt(t[n]);for(var n=0;n<t.length;n++)Tt(t[n]);for(var n=0;n<t.length;n++)Ot(t[n])}function kt(e){var t=e.cm,n=t.display;M(t),e.updateMaxLine&&d(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new L(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Lt(e){e.updatedDisplay=e.mustUpdate&&T(e.cm,e.update)}function Mt(e){var t=e.cm,n=t.display;e.updatedDisplay&&P(t),e.barMeasure=p(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Je(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Ke(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-qe(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection(e.focus))}function Tt(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&on(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==Gi()&&(!document.hasFocus||document.hasFocus());e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&y(t,e.barMeasure),e.updatedDisplay&&A(t,e.barMeasure),e.selectionChanged&&Re(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&$(e.cm)}function Ot(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&O(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null==e.scrollTop||n.scroller.scrollTop==e.scrollTop&&!e.forceScroll||(r.scrollTop=Math.max(0,Math.min(n.scroller.scrollHeight-n.scroller.clientHeight,e.scrollTop)),n.scrollbars.setScrollTop(r.scrollTop),n.scroller.scrollTop=r.scrollTop),null==e.scrollLeft||n.scroller.scrollLeft==e.scrollLeft&&!e.forceScroll||(r.scrollLeft=Math.max(0,Math.min(n.scroller.scrollWidth-n.scroller.clientWidth,e.scrollLeft)),n.scrollbars.setScrollLeft(r.scrollLeft),n.scroller.scrollLeft=r.scrollLeft,w(t)),e.scrollToPos){var i=Dn(t,ge(r,e.scrollToPos.from),ge(r,e.scrollToPos.to),e.scrollToPos.margin);e.scrollToPos.isCursor&&t.state.focused&&Wn(t,i)}var o=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||Wl(o[a],"hide");if(l)for(var a=0;a<l.length;++a)l[a].lines.length&&Wl(l[a],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Wl(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Et(e,t){if(e.curOp)return t();xt(e);try{return t()}finally{Ct(e)}}function At(e,t){return function(){if(e.curOp)return t.apply(e,arguments);xt(e);try{return t.apply(e,arguments)}finally{Ct(e)}}}function Pt(e){return function(){if(this.curOp)return e.apply(this,arguments);xt(this);try{return e.apply(this,arguments)}finally{Ct(this)}}}function Nt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);xt(t);try{return e.apply(this,arguments)}finally{Ct(t)}}}function Wt(e,t,n){this.line=t,this.rest=br(t),this.size=this.rest?ti(Ni(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Cr(e,t)}function Dt(e,t,n){for(var r,i=[],o=t;o<n;o=r){var l=new Wt(e.doc,Zr(e.doc,o),o);r=o+l.size,i.push(l)}return i}function Ft(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ho&&xr(e.doc,t)<i.viewTo&&Ht(e);else if(n<=i.viewFrom)Ho&&wr(e.doc,n+r)>i.viewFrom?Ht(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Ht(e);else if(t<=i.viewFrom){var o=jt(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Ht(e)}else if(n>=i.viewTo){var o=jt(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Ht(e)}else{var l=jt(e,t,t,-1),a=jt(e,n,n+r,1);l&&a?(i.view=i.view.slice(0,l.index).concat(Dt(e,l.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=r):Ht(e)}var s=i.externalMeasured;s&&(n<s.lineN?s.lineN+=r:t<s.lineN+s.size&&(i.externalMeasured=null))}function It(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[Rt(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==Wi(l,n)&&l.push(n)}}}function Ht(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Rt(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function jt(e,t,n,r){var i,o=Rt(e,t),l=e.display.view;if(!Ho||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=0,s=e.display.viewFrom;a<o;a++)s+=l[a].size;if(s!=t){if(r>0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;xr(e.doc,n)!=n;){if(o==(r<0?0:l.length-1))return null;n+=r*l[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function _t(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Dt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Dt(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Rt(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(Dt(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Rt(e,n)))),r.viewTo=n}function zt(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function Bt(e){function t(){i.activeTouch&&(o=setTimeout(function(){i.activeTouch=null},1e3),l=i.activeTouch,l.end=+new Date)}function n(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function r(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}var i=e.display;Al(i.scroller,"mousedown",At(e,qt)),bo&&xo<11?Al(i.scroller,"dblclick",At(e,function(t){if(!Mi(e,t)){var n=Kt(e,t);if(n&&!Jt(e,t)&&!Gt(e.display,t)){Tl(t);var r=e.findWordAt(n);xe(e.doc,r.anchor,r.head)}}})):Al(i.scroller,"dblclick",function(t){Mi(e,t)||Tl(t)}),Fo||Al(i.scroller,"contextmenu",function(t){bn(e,t)});var o,l={end:0};Al(i.scroller,"touchstart",function(t){if(!Mi(e,t)&&!n(t)){clearTimeout(o);var r=+new Date;i.activeTouch={start:r,moved:!1,prev:r-l.end<=300?l:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Al(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Al(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!Gt(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var l,a=e.coordsChar(i.activeTouch,"page");l=!o.prev||r(o,o.prev)?new fe(a,a):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(a):new fe(Ro(a.line,0),ge(e.doc,Ro(a.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),Tl(n)}t()}),Al(i.scroller,"touchcancel",t),Al(i.scroller,"scroll",function(){i.scroller.clientHeight&&(rn(e,i.scroller.scrollTop),on(e,i.scroller.scrollLeft,!0),Wl(e,"scroll",e))}),Al(i.scroller,"mousewheel",function(t){ln(e,t)}),Al(i.scroller,"DOMMouseScroll",function(t){ln(e,t)}),Al(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Mi(e,t)||El(t)},over:function(t){Mi(e,t)||(tn(e,t),El(t))},start:function(t){en(e,t)},drop:At(e,Qt),leave:function(t){Mi(e,t)||nn(e)}};var a=i.input.getField();Al(a,"keyup",function(t){pn.call(e,t)}),Al(a,"keydown",At(e,dn)),Al(a,"keypress",At(e,gn)),Al(a,"focus",Ri(vn,e)),Al(a,"blur",Ri(yn,e))}function Ut(t,n,r){if(!n!=!(r&&r!=e.Init)){var i=t.display.dragFunctions,o=n?Al:Nl;o(t.display.scroller,"dragstart",i.start),o(t.display.scroller,"dragenter",i.enter),o(t.display.scroller,"dragover",i.over),o(t.display.scroller,"dragleave",i.leave),o(t.display.scroller,"drop",i.drop)}}function Vt(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function Gt(e,t){for(var n=wi(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Kt(e,t,n,r){var i=e.display;if(!n&&"true"==wi(t).getAttribute("cm-not-content"))return null;var o,l,a=i.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,l=t.clientY-a.top}catch(t){return null}var s,c=mt(e,o,l);if(r&&1==c.xRel&&(s=Zr(e.doc,c.line).text).length==c.ch){var u=_l(s,s.length,e.options.tabSize)-s.length;c=Ro(c.line,Math.max(0,Math.round((o-Ge(e.display).left)/bt(e.display))-u))}return c}function qt(e){var t=this,n=t.display;if(!(Mi(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.shift=e.shiftKey,Gt(n,e))return void(wo||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!Jt(t,e)){var r=Kt(t,e);switch(window.focus(),Ci(e)){case 1:t.state.selectingText?t.state.selectingText(e):r?Xt(t,e,r):wi(e)==n.scroller&&Tl(e);break;case 2:wo&&(t.state.lastMiddleDown=+new Date),r&&xe(t.doc,r),setTimeout(function(){n.input.focus()},20),Tl(e);break;case 3:Fo?bn(t,e):mn(t)}}}}function Xt(e,t,n){bo?setTimeout(Ri($,e),0):e.curOp.focus=Gi();var r,i=+new Date;Uo&&Uo.time>i-400&&0==jo(Uo.pos,n)?r="triple":Bo&&Bo.time>i-400&&0==jo(Bo.pos,n)?(r="double",Uo={time:i,pos:n}):(r="single",Bo={time:i,pos:n});var o,l=e.doc.sel,a=Ao?t.metaKey:t.ctrlKey;e.options.dragDrop&&ea&&!e.isReadOnly()&&"single"==r&&(o=l.contains(n))>-1&&(jo((o=l.ranges[o]).from(),n)<0||n.xRel>0)&&(jo(o.to(),n)>0||n.xRel<0)?Yt(e,t,n,a):$t(e,t,n,r,a)}function Yt(e,t,n,r){var i=e.display,o=+new Date,l=At(e,function(a){wo&&(i.scroller.draggable=!1),e.state.draggingText=!1,Nl(document,"mouseup",l),Nl(i.scroller,"drop",l),Math.abs(t.clientX-a.clientX)+Math.abs(t.clientY-a.clientY)<10&&(Tl(a),!r&&+new Date-200<o&&xe(e.doc,n),wo||bo&&9==xo?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())});wo&&(i.scroller.draggable=!0),e.state.draggingText=l,i.scroller.dragDrop&&i.scroller.dragDrop(),Al(document,"mouseup",l),Al(i.scroller,"drop",l)}function $t(e,t,n,r,i){function o(t){if(0!=jo(m,t))if(m=t,"rect"==r){for(var i=[],o=e.options.tabSize,l=_l(Zr(c,n.line).text,n.ch,o),a=_l(Zr(c,t.line).text,t.ch,o),s=Math.min(l,a),h=Math.max(l,a),p=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));p<=g;p++){var v=Zr(c,p).text,y=zl(v,s,o);s==h?i.push(new fe(Ro(p,y),Ro(p,y))):v.length>y&&i.push(new fe(Ro(p,y),Ro(p,zl(v,h,o))))}i.length||i.push(new fe(n,n)),Me(c,de(d.ranges.slice(0,f).concat(i),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=u,x=b.anchor,w=t;if("single"!=r){if("double"==r)var C=e.findWordAt(t);else var C=new fe(Ro(t.line,0),ge(c,Ro(t.line+1,0)));jo(C.anchor,x)>0?(w=C.head,x=Y(b.from(),C.anchor)):(w=C.anchor,x=X(b.to(),C.head))}var i=d.ranges.slice(0);i[f]=new fe(ge(c,x),w),Me(c,de(i,f),Rl)}}function l(t){var n=++y,i=Kt(e,t,!0,"rect"==r);if(i)if(0!=jo(i,m)){e.curOp.focus=Gi(),o(i);var a=x(s,c);(i.line>=a.to||i.line<a.from)&&setTimeout(At(e,function(){y==n&&l(t)}),150)}else{var u=t.clientY<v.top?-20:t.clientY>v.bottom?20:0;u&&setTimeout(At(e,function(){y==n&&(s.scroller.scrollTop+=u,l(t))}),50)}}function a(t){e.state.selectingText=!1,y=1/0,Tl(t),s.input.focus(),Nl(document,"mousemove",b),Nl(document,"mouseup",w),c.history.lastSelOrigin=null}var s=e.display,c=e.doc;Tl(t);var u,f,d=c.sel,h=d.ranges;if(i&&!t.shiftKey?(f=c.sel.contains(n),u=f>-1?h[f]:new fe(n,n)):(u=c.sel.primary(),f=c.sel.primIndex),Po?t.shiftKey&&t.metaKey:t.altKey)r="rect",i||(u=new fe(n,n)),n=Kt(e,t,!0,!0),f=-1;else if("double"==r){var p=e.findWordAt(n);u=e.display.shift||c.extend?be(c,u,p.anchor,p.head):p}else if("triple"==r){var g=new fe(Ro(n.line,0),ge(c,Ro(n.line+1,0)));u=e.display.shift||c.extend?be(c,u,g.anchor,g.head):g}else u=be(c,u,n);i?-1==f?(f=h.length,Me(c,de(h.concat([u]),f),{scroll:!1,origin:"*mouse"})):h.length>1&&h[f].empty()&&"single"==r&&!t.shiftKey?(Me(c,de(h.slice(0,f).concat(h.slice(f+1)),0),{scroll:!1,origin:"*mouse"}),d=c.sel):Ce(c,f,u,Rl):(f=0,Me(c,new ue([u],0),Rl),d=c.sel);var m=n,v=s.wrapper.getBoundingClientRect(),y=0,b=At(e,function(e){Ci(e)?l(e):a(e)}),w=At(e,a);e.state.selectingText=w,Al(document,"mousemove",b),Al(document,"mouseup",w)}function Zt(e,t,n,r){try{var i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Tl(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!Oi(e,n))return xi(t);o-=a.top-l.viewOffset;for(var s=0;s<e.options.gutters.length;++s){var c=l.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=i){var u=ni(e.doc,o),f=e.options.gutters[s];return Wl(e,n,e,u,f,t),xi(t)}}}function Jt(e,t){return Zt(e,t,"gutterClick",!0)}function Qt(e){var t=this;if(nn(t),!Mi(t,e)&&!Gt(t.display,e)){Tl(e),bo&&(qo=+new Date);var n=Kt(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),l=0,a=0;a<i;++a)!function(e,r){if(!t.options.allowDropFileTypes||-1!=Wi(t.options.allowDropFileTypes,e.type)){var a=new FileReader;a.onload=At(t,function(){var e=a.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[r]=e,++l==i){n=ge(t.doc,n);var s={from:n,to:n,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Mn(t.doc,s),Le(t.doc,he(n,Qo(s)))}}),a.readAsText(e)}}(r[a],a);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!(Ao?e.altKey:e.ctrlKey))var s=t.listSelections();if(Te(t.doc,he(n,n)),s)for(var a=0;a<s.length;++a)Nn(t.doc,"",s[a].anchor,s[a].head,"drag");t.replaceSelection(o,"around","paste"),t.display.input.focus()}}catch(e){}}}}function en(e,t){if(bo&&(!e.state.draggingText||+new Date-qo<100))return void El(t);if(!Mi(e,t)&&!Gt(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Lo)){var n=Bi("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ko&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),ko&&n.parentNode.removeChild(n)}}function tn(e,t){var n=Kt(e,t);if(n){var r=document.createDocumentFragment();Ie(e,n,r),e.display.dragCursor||(e.display.dragCursor=Bi("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),Vi(e.display.dragCursor,r)}}function nn(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function rn(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,mo||E(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbars.setScrollTop(t),mo&&E(e),je(e,100))}function on(e,t,n){(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,w(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function ln(e,t){var n=$o(t),r=n.x,i=n.y,o=e.display,l=o.scroller,a=l.scrollWidth>l.clientWidth,s=l.scrollHeight>l.clientHeight;if(r&&a||i&&s){if(i&&Ao&&wo)e:for(var c=t.target,u=o.view;c!=l;c=c.parentNode)for(var f=0;f<u.length;f++)if(u[f].node==c){e.display.currentWheelTarget=c;break e}if(r&&!mo&&!ko&&null!=Yo)return i&&s&&rn(e,Math.max(0,Math.min(l.scrollTop+i*Yo,l.scrollHeight-l.clientHeight))),on(e,Math.max(0,Math.min(l.scrollLeft+r*Yo,l.scrollWidth-l.clientWidth))),(!i||i&&s)&&Tl(t),void(o.wheelStartX=null);if(i&&null!=Yo){var d=i*Yo,h=e.doc.scrollTop,p=h+o.wrapper.clientHeight;d<0?h=Math.max(0,h+d-50):p=Math.min(e.doc.height,p+d+50),E(e,{top:h,bottom:p})}Xo<20&&(null==o.wheelStartX?(o.wheelStartX=l.scrollLeft,o.wheelStartY=l.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=l.scrollLeft-o.wheelStartX,t=l.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(Yo=(Yo*Xo+n)/(Xo+1),++Xo)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}function an(e,t,n){if("string"==typeof t&&!(t=ul[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Il}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function sn(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=dl(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&dl(t,e.options.extraKeys,n,e)||dl(t,e.options.keyMap,n,e)}function cn(e,t,n,r){var i=e.state.keySeq;if(i){if(hl(t))return"handled";Zo.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),t=i+" "+t}var o=sn(e,t,r);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&ki(e,"keyHandled",e,t,n),"handled"!=o&&"multi"!=o||(Tl(n),Re(e)),i&&!o&&/\'$/.test(t)?(Tl(n),!0):!!o}function un(e,t){var n=pl(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?cn(e,"Shift-"+n,t,function(t){return an(e,t,!0)})||cn(e,n,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return an(e,t)}):cn(e,n,t,function(t){return an(e,t)}))}function fn(e,t,n){return cn(e,"'"+n+"'",t,function(t){return an(e,t,!0)})}function dn(e){var t=this;if(t.curOp.focus=Gi(),!Mi(t,e)){bo&&xo<11&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=un(t,e);ko&&(Jo=r?n:null,!r&&88==n&&!ra&&(Ao?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||hn(t)}}function hn(e){function t(e){18!=e.keyCode&&e.altKey||(Zl(n,"CodeMirror-crosshair"),Nl(document,"keyup",t),Nl(document,"mouseover",t))}var n=e.display.lineDiv;Jl(n,"CodeMirror-crosshair"),Al(document,"keyup",t),Al(document,"mouseover",t)}function pn(e){16==e.keyCode&&(this.doc.sel.shift=!1),Mi(this,e)}function gn(e){var t=this;if(!(Gt(t.display,e)||Mi(t,e)||e.ctrlKey&&!e.altKey||Ao&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(ko&&n==Jo)return Jo=null,void Tl(e);if(!ko||e.which&&!(e.which<10)||!un(t,e)){fn(t,e,String.fromCharCode(null==r?n:r))||t.display.input.onKeyPress(e)}}}function mn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,yn(e))},100)}function vn(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Wl(e,"focus",e),e.state.focused=!0,Jl(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),wo&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Re(e))}function yn(e){e.state.delayingBlurEvent||(e.state.focused&&(Wl(e,"blur",e),e.state.focused=!1,Zl(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function bn(e,t){Gt(e.display,t)||xn(e,t)||Mi(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function xn(e,t){return!!Oi(e,"gutterContextMenu")&&Zt(e,t,"gutterContextMenu",!1)}function wn(e,t){if(jo(e,t.from)<0)return e;if(jo(e,t.to)<=0)return Qo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Qo(t).ch-t.to.ch),Ro(n,r)}function Cn(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new fe(wn(i.anchor,t),wn(i.head,t)))}return de(n,e.sel.primIndex)}function Sn(e,t,n){return e.line==t.line?Ro(n.line,e.ch-t.ch+n.ch):Ro(n.line+(e.line-t.line),e.ch)}function kn(e,t,n){for(var r=[],i=Ro(e.first,0),o=i,l=0;l<t.length;l++){var a=t[l],s=Sn(a.from,i,o),c=Sn(Qo(a),i,o);if(i=a.to,o=c,"around"==n){var u=e.sel.ranges[l],f=jo(u.head,u.anchor)<0;r[l]=new fe(f?c:s,f?s:c)}else r[l]=new fe(s,s)}return new ue(r,e.sel.primIndex)}function Ln(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){this.canceled=!0}};return n&&(r.update=function(t,n,r,i){t&&(this.from=ge(e,t)),n&&(this.to=ge(e,n)),r&&(this.text=r),void 0!==i&&(this.origin=i)}),Wl(e,"beforeChange",e,r),e.cm&&Wl(e.cm,"beforeChange",e.cm,r),r.canceled?null:{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Mn(e,t,n){if(e.cm){if(!e.cm.curOp)return At(e.cm,Mn)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(Oi(e,"beforeChange")||e.cm&&Oi(e.cm,"beforeChange"))||(t=Ln(e,t,!0))){var r=Io&&!n&&sr(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Tn(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else Tn(e,t)}}function Tn(e,t){if(1!=t.text.length||""!=t.text[0]||0!=jo(t.from,t.to)){var n=Cn(e,t);ci(e,t,n,e.cm?e.cm.curOp.id:NaN),An(e,t,n,or(e,t));var r=[];Yr(e,function(e,n){n||-1!=Wi(r,e.history)||(bi(e.history,t),r.push(e.history)),An(e,t,null,or(e,t))})}}function On(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var r,i=e.history,o=e.sel,l="undo"==t?i.done:i.undone,a="undo"==t?i.undone:i.done,s=0;s<l.length&&(r=l[s],n?!r.ranges||r.equals(e.sel):r.ranges);s++);if(s!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;r=l.pop(),r.ranges;){if(di(r,a),n&&!r.equals(e.sel))return void Me(e,r,{clearRedo:!1});o=r}var c=[];di(o,a),a.push({changes:c,generation:i.generation}),i.generation=r.generation||++i.maxGeneration;for(var u=Oi(e,"beforeChange")||e.cm&&Oi(e.cm,"beforeChange"),s=r.changes.length-1;s>=0;--s){var f=r.changes[s];if(f.origin=t,u&&!Ln(e,f,!1))return void(l.length=0);c.push(li(e,f));var d=s?Cn(e,f):Ni(l);An(e,f,d,ar(e,f)),!s&&e.cm&&e.cm.scrollIntoView({from:f.from,to:Qo(f)});var h=[];Yr(e,function(e,t){t||-1!=Wi(h,e.history)||(bi(e.history,f),h.push(e.history)),An(e,f,null,ar(e,f))})}}}}function En(e,t){if(0!=t&&(e.first+=t,e.sel=new ue(Di(e.sel.ranges,function(e){return new fe(Ro(e.anchor.line+t,e.anchor.ch),Ro(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Ft(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)It(e.cm,r,"gutter")}}function An(e,t,n,r){if(e.cm&&!e.cm.curOp)return At(e.cm,An)(e,t,n,r);if(t.to.line<e.first)return void En(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);En(e,i),t={from:Ro(e.first,0),to:Ro(t.to.line+i,t.to.ch),text:[Ni(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:Ro(o,Zr(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Jr(e,t.from,t.to),n||(n=Cn(e,t)),e.cm?Pn(e.cm,t,r):Kr(e,t,r),Te(e,n,Hl)}}function Pn(e,t,n){var r=e.doc,i=e.display,l=t.from,a=t.to,s=!1,c=l.line;e.options.lineWrapping||(c=ti(yr(Zr(r,l.line))),r.iter(c,a.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Ti(e),Kr(r,t,n,o(e)),e.options.lineWrapping||(r.iter(c,l.line+t.text.length,function(e){var t=f(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,l.line),je(e,400);var u=t.text.length-(a.line-l.line)-1;t.full?Ft(e):l.line!=a.line||1!=t.text.length||Gr(e.doc,t)?Ft(e,l.line,a.line+1,u):It(e,l.line,"text");var d=Oi(e,"changes"),h=Oi(e,"change");if(h||d){var p={from:l,to:a,text:t.text,removed:t.removed,origin:t.origin};h&&ki(e,"change",e,p),d&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}function Nn(e,t,n,r,i){if(r||(r=n),jo(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=e.splitLines(t)),Mn(e,{from:n,to:r,text:t,origin:i})}function Wn(e,t){if(!Mi(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!To){var o=Bi("div","",null,"position: absolute; top: "+(t.top-n.viewOffset-Ue(e.display))+"px; height: "+(t.bottom-t.top+Ke(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function Dn(e,t,n,r){null==r&&(r=0);for(var i=0;i<5;i++){var o=!1,l=ht(e,t),a=n&&n!=t?ht(e,n):l,s=In(e,Math.min(l.left,a.left),Math.min(l.top,a.top)-r,Math.max(l.left,a.left),Math.max(l.bottom,a.bottom)+r),c=e.doc.scrollTop,u=e.doc.scrollLeft;if(null!=s.scrollTop&&(rn(e,s.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(o=!0)),null!=s.scrollLeft&&(on(e,s.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(o=!0)),!o)break}return l}function Fn(e,t,n,r,i){var o=In(e,t,n,r,i);null!=o.scrollTop&&rn(e,o.scrollTop),null!=o.scrollLeft&&on(e,o.scrollLeft)}function In(e,t,n,r,i){var o=e.display,l=yt(e.display);n<0&&(n=0);var a=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,s=Xe(e),c={};i-n>s&&(i=n+s);var u=e.doc.height+Ve(o),f=n<l,d=i>u-l;if(n<a)c.scrollTop=f?0:n;else if(i>a+s){var h=Math.min(n,(d?u:i)-s);h!=a&&(c.scrollTop=h)}var p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=qe(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),m=r-t>g;return m&&(r=t+g),t<10?c.scrollLeft=0:t<p?c.scrollLeft=Math.max(0,t-(m?0:10)):r>g+p-3&&(c.scrollLeft=r+(m?0:10)-g),c}function Hn(e,t,n){null==t&&null==n||jn(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Rn(e){jn(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?Ro(t.line,t.ch-1):t,r=Ro(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function jn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=pt(e,t.from),r=pt(e,t.to),i=In(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function _n(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=Be(e,t):n="prev");var l=e.options.tabSize,a=Zr(o,t),s=_l(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(r||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(i,a.text.slice(u.length),a.text))==Il||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?_l(Zr(o,t-1).text,null,l):0:"add"==n?c=s+e.options.indentUnit:"subtract"==n?c=s-e.options.indentUnit:"number"==typeof n&&(c=s+n),c=Math.max(0,c);var f="",d=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/l);h;--h)d+=l,f+="\t";if(d<c&&(f+=Pi(c-d)),f!=u)return Nn(o,f,Ro(t,0),Ro(t,u.length),"+input"),a.stateAfter=null,!0;for(var h=0;h<o.sel.ranges.length;h++){var p=o.sel.ranges[h];if(p.head.line==t&&p.head.ch<u.length){var d=Ro(t,u.length);Ce(o,h,new fe(d,d));break}}}function zn(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=Zr(e,pe(e,t)):i=ti(t),null==i?null:(r(o,i)&&e.cm&&It(e.cm,i,n),o)}function Bn(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&jo(o.from,Ni(r).to)<=0;){var l=r.pop();if(jo(l.from,o.from)<0){o.from=l.from;break}}r.push(o)}Et(e,function(){for(var t=r.length-1;t>=0;t--)Nn(e.doc,"",r[t].from,r[t].to,"+delete");Rn(e)})}function Un(e,t,n,r,i){function o(){var t=a+n;return!(t<e.first||t>=e.first+e.size)&&(a=t,u=Zr(e,t))}function l(e){var t=(i?fo:ho)(u,s,n,!0);if(null==t){if(e||!o())return!1;s=i?(n<0?io:ro)(u):n<0?u.text.length:0}else s=t;return!0}var a=t.line,s=t.ch,c=n,u=Zr(e,a);if("char"==r)l();else if("column"==r)l(!0);else if("word"==r||"group"==r)for(var f=null,d="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||l(!p);p=!1){var g=u.text.charAt(s)||"\n",m=ji(g,h)?"w":d&&"\n"==g?"n":!d||/\s/.test(g)?null:"p";if(!d||p||m||(m="s"),f&&f!=m){n<0&&(n=1,l());break}if(m&&(f=m),n>0&&!l(!p))break}var v=Ne(e,Ro(a,s),t,c,!0);return jo(t,v)||(v.hitSide=!0),v}function Vn(e,t,n,r){var i,o=e.doc,l=t.left;if("page"==r){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(a-(n<0?1.5:.5)*yt(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){var s=mt(e,l,i);if(!s.outside)break;if(n<0?i<=0:i>=o.height){s.hitSide=!0;break}i+=5*n}return s}function Gn(t,n,r,i){e.defaults[t]=n,r&&(tl[t]=i?function(e,t,n){n!=nl&&r(e,t,n)}:r)}function Kn(e){for(var t,n,r,i,o=e.split(/-(?!$)/),e=o[o.length-1],l=0;l<o.length-1;l++){var a=o[l];if(/^(cmd|meta|m)$/i.test(a))i=!0;else if(/^a(lt)?$/i.test(a))t=!0;else if(/^(c|ctrl|control)$/i.test(a))n=!0;else{if(!/^s(hift)$/i.test(a))throw new Error("Unrecognized modifier name: "+a);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function qn(e){return"string"==typeof e?fl[e]:e}function Xn(e,t,n,r,i){if(r&&r.shared)return Yn(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return At(e.cm,Xn)(e,t,n,r,i);var o=new vl(e,i),l=jo(t,n);if(r&&Hi(r,o,!1),l>0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Bi("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(vr(e,t.line,t,n,o)||t.line!=n.line&&vr(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ho=!0}o.addToHistory&&ci(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a,s=t.line,c=e.cm;if(e.iter(s,n.line+1,function(e){c&&o.collapsed&&!c.options.lineWrapping&&yr(e)==c.display.maxLine&&(a=!0),o.collapsed&&s!=t.line&&ei(e,0),nr(e,new Qn(o,s==t.line?t.ch:null,s==n.line?n.ch:null)),++s}),o.collapsed&&e.iter(t.line,n.line+1,function(t){Cr(e,t)&&ei(t,0)}),o.clearOnEnter&&Al(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(Io=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ml,o.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),o.collapsed)Ft(c,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var u=t.line;u<=n.line;u++)It(c,u,"text");o.atomic&&Ee(c.doc),ki(c,"markerAdded",c,o)}return o}function Yn(e,t,n,r,i){r=Hi(r),r.shared=!1;var o=[Xn(e,t,n,r,i)],l=o[0],a=r.widgetNode;return Yr(e,function(e){a&&(r.widgetNode=a.cloneNode(!0)),o.push(Xn(e,ge(e,t),ge(e,n),r,i));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;l=Ni(o)}),new yl(o,l)}function $n(e){return e.findMarks(Ro(e.first,0),e.clipPos(Ro(e.lastLine())),function(e){return e.parent})}function Zn(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),l=e.clipPos(i.to);if(jo(o,l)){var a=Xn(e,o,l,r.primary,r.primary.type);r.markers.push(a),a.parent=r}}}function Jn(e){for(var t=0;t<e.length;t++){var n=e[t],r=[n.primary.doc];Yr(n.primary.doc,function(e){r.push(e)});for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==Wi(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}}}function Qn(e,t,n){this.marker=e,this.from=t,this.to=n}function er(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function tr(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function nr(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function rr(e,t,n){if(e)for(var r,i=0;i<e.length;++i){var o=e[i],l=o.marker,a=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);if(a||o.from==t&&"bookmark"==l.type&&(!n||!o.marker.insertLeft)){var s=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Qn(l,o.from,s?null:o.to))}}return r}function ir(e,t,n){if(e)for(var r,i=0;i<e.length;++i){var o=e[i],l=o.marker,a=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);if(a||o.from==t&&"bookmark"==l.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Qn(l,s?null:o.from-t,null==o.to?null:o.to-t))}}return r}function or(e,t){if(t.full)return null;var n=ve(e,t.from.line)&&Zr(e,t.from.line).markedSpans,r=ve(e,t.to.line)&&Zr(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,l=0==jo(t.from,t.to),a=rr(n,i,l),s=ir(r,o,l),c=1==t.text.length,u=Ni(t.text).length+(c?i:0);if(a)for(var f=0;f<a.length;++f){var d=a[f];if(null==d.to){var h=er(s,d.marker);h?c&&(d.to=null==h.to?null:h.to+u):d.to=i}}if(s)for(var f=0;f<s.length;++f){var d=s[f];if(null!=d.to&&(d.to+=u),null==d.from){var h=er(a,d.marker);h||(d.from=u,c&&(a||(a=[])).push(d))}else d.from+=u,c&&(a||(a=[])).push(d)}a&&(a=lr(a)),s&&s!=a&&(s=lr(s));var p=[a];if(!c){var g,m=t.text.length-2;if(m>0&&a)for(var f=0;f<a.length;++f)null==a[f].to&&(g||(g=[])).push(new Qn(a[f].marker,null,null));for(var f=0;f<m;++f)p.push(g);p.push(s)}return p}function lr(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function ar(e,t){var n=gi(e,t),r=or(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],l=r[i];if(o&&l)e:for(var a=0;a<l.length;++a){for(var s=l[a],c=0;c<o.length;++c)if(o[c].marker==s.marker)continue e;o.push(s)}else l&&(n[i]=l)}return n}function sr(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=Wi(r,n)||(r||(r=[])).push(n)}}),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var l=r[o],a=l.find(0),s=0;s<i.length;++s){var c=i[s];if(!(jo(c.to,a.from)<0||jo(c.from,a.to)>0)){var u=[s,1],f=jo(c.from,a.from),d=jo(c.to,a.to);(f<0||!l.inclusiveLeft&&!f)&&u.push({from:c.from,to:a.from}),(d>0||!l.inclusiveRight&&!d)&&u.push({from:a.to,to:c.to}),i.splice.apply(i,u),s+=u.length-1}}return i}function cr(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function ur(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function fr(e){return e.inclusiveLeft?-1:0}function dr(e){return e.inclusiveRight?1:0}function hr(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=jo(r.from,i.from)||fr(e)-fr(t);if(o)return-o;var l=jo(r.to,i.to)||dr(e)-dr(t);return l||t.id-e.id}function pr(e,t){var n,r=Ho&&e.markedSpans;if(r)for(var i,o=0;o<r.length;++o)i=r[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!n||hr(n,i.marker)<0)&&(n=i.marker);return n}function gr(e){return pr(e,!0)}function mr(e){return pr(e,!1)}function vr(e,t,n,r,i){var o=Zr(e,t),l=Ho&&o.markedSpans;if(l)for(var a=0;a<l.length;++a){var s=l[a];if(s.marker.collapsed){var c=s.marker.find(0),u=jo(c.from,n)||fr(s.marker)-fr(i),f=jo(c.to,r)||dr(s.marker)-dr(i);if(!(u>=0&&f<=0||u<=0&&f>=0)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?jo(c.to,n)>=0:jo(c.to,n)>0)||u>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?jo(c.from,r)<=0:jo(c.from,r)<0)))return!0}}}function yr(e){for(var t;t=gr(e);)e=t.find(-1,!0).line;return e}function br(e){for(var t,n;t=mr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function xr(e,t){var n=Zr(e,t),r=yr(n);return n==r?t:ti(r)}function wr(e,t){if(t>e.lastLine())return t;var n,r=Zr(e,t);if(!Cr(e,r))return t;for(;n=mr(r);)r=n.find(1,!0).line;return ti(r)+1}function Cr(e,t){var n=Ho&&t.markedSpans;if(n)for(var r,i=0;i<n.length;++i)if(r=n[i],r.marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Sr(e,t,r))return!0}}function Sr(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Sr(e,r.line,er(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Sr(e,t,i))return!0}function kr(e,t,n){ri(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Hn(e,null,n)}function Lr(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!Xl(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),Vi(t.display.measure,Bi("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Mr(e,t,n,r){var i=new bl(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),zn(e,t,"widget",function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!Cr(e,t)){var r=ri(t)<e.scrollTop;ei(t,t.height+Lr(i)),r&&Hn(o,null,i.height),o.curOp.forceUpdate=!0}return!0}),i}function Tr(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),cr(e),ur(e,n);var i=r?r(e):1;i!=e.height&&ei(e,i)}function Or(e){e.parent=null,cr(e)}function Er(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Ar(t,n){if(t.blankLine)return t.blankLine(n);if(t.innerMode){var r=e.innerMode(t,n);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function Pr(t,n,r,i){for(var o=0;o<10;o++){i&&(i[0]=e.innerMode(t,r).mode);var l=t.token(n,r);if(n.pos>n.start)return l}throw new Error("Mode "+t.name+" failed to advance stream.")}function Nr(e,t,n,r){function i(e){return{start:f.start,end:f.pos,string:f.current(),type:o||null,state:e?sl(l.mode,u):u}}var o,l=e.doc,a=l.mode;t=ge(l,t);var s,c=Zr(l,t.line),u=Be(e,t.line,n),f=new gl(c.text,e.options.tabSize);for(r&&(s=[]);(r||f.pos<t.ch)&&!f.eol();)f.start=f.pos,o=Pr(a,f,u),r&&s.push(i(!0));return r?s:i()}function Wr(e,t,n,r,i,o,l){var a=n.flattenSpans;null==a&&(a=e.options.flattenSpans);var s,c=0,u=null,f=new gl(t,e.options.tabSize),d=e.options.addModeClass&&[null];for(""==t&&Er(Ar(n,r),o);!f.eol();){if(f.pos>e.options.maxHighlightLength?(a=!1,l&&Ir(e,t,r,f.pos),f.pos=t.length,s=null):s=Er(Pr(n,f,r,d),o),d){var h=d[0].name;h&&(s="m-"+(s?h+" "+s:h))}if(!a||u!=s){for(;c<f.start;)c=Math.min(f.start,c+5e4),i(c,u);u=s}f.start=f.pos}for(;c<f.pos;){var p=Math.min(f.pos,c+5e4);i(p,u),c=p}}function Dr(e,t,n,r){var i=[e.state.modeGen],o={};Wr(e,t.text,e.doc.mode,n,function(e,t){i.push(e,t)},o,r);for(var l=0;l<e.state.overlays.length;++l){var a=e.state.overlays[l],s=1,c=0;Wr(e,t.text,a.mode,!0,function(e,t){for(var n=s;c<e;){var r=i[s];r>e&&i.splice(s,1,e,i[s+1],r),s+=2,c=Math.min(e,r)}if(t)if(a.opaque)i.splice(n,s-n,e,"cm-overlay "+t),s=n+2;else for(;n<s;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Fr(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Be(e,ti(t)),i=Dr(e,t,t.text.length>e.options.maxHighlightLength?sl(e.doc.mode,r):r);t.stateAfter=r,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Ir(e,t,n,r){var i=e.doc.mode,o=new gl(t,e.options.tabSize);for(o.start=o.pos=r||0,""==t&&Ar(i,n);!o.eol();)Pr(i,o,n),o.start=o.pos}function Hr(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Cl:wl;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Rr(e,t){var n=Bi("span",null,null,wo?"padding-right: .1px":null),r={pre:Bi("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,splitSpaces:(bo||wo)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o,l=i?t.rest[i-1]:t.line;r.pos=0,r.addToken=_r,Ji(e.display.measure)&&(o=ii(l))&&(r.addToken=Br(r.addToken,o)),r.map=[];Vr(l,r,Fr(e,l,t!=e.display.externalMeasured&&ti(l))),l.styleClasses&&(l.styleClasses.bgClass&&(r.bgClass=qi(l.styleClasses.bgClass,r.bgClass||"")),l.styleClasses.textClass&&(r.textClass=qi(l.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Zi(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(wo){var a=r.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Wl(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=qi(r.pre.className,r.textClass||"")),r}function jr(e){var t=Bi("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function _r(e,t,n,r,i,o,l){if(t){var a=e.splitSpaces?t.replace(/ {3,}/g,zr):t,s=e.cm.state.specialChars,c=!1;if(s.test(t))for(var u=document.createDocumentFragment(),f=0;;){s.lastIndex=f;var d=s.exec(t),h=d?d.index-f:t.length-f;if(h){var p=document.createTextNode(a.slice(f,f+h));bo&&xo<9?u.appendChild(Bi("span",[p])):u.appendChild(p),e.map.push(e.pos,e.pos+h,p),e.col+=h,e.pos+=h}if(!d)break;if(f+=h+1,"\t"==d[0]){var g=e.cm.options.tabSize,m=g-e.col%g,p=u.appendChild(Bi("span",Pi(m),"cm-tab"));p.setAttribute("role","presentation"),p.setAttribute("cm-text","\t"),e.col+=m}else if("\r"==d[0]||"\n"==d[0]){var p=u.appendChild(Bi("span","\r"==d[0]?"␍":"","cm-invalidchar"));p.setAttribute("cm-text",d[0]),e.col+=1}else{var p=e.cm.options.specialCharPlaceholder(d[0]);p.setAttribute("cm-text",d[0]),bo&&xo<9?u.appendChild(Bi("span",[p])):u.appendChild(p),e.col+=1}e.map.push(e.pos,e.pos+1,p),e.pos++}else{e.col+=t.length;var u=document.createTextNode(a);e.map.push(e.pos,e.pos+t.length,u),bo&&xo<9&&(c=!0),e.pos+=t.length}if(n||r||i||c||l){var v=n||"";r&&(v+=r),i&&(v+=i);var y=Bi("span",[u],v,l);return o&&(y.title=o),e.content.appendChild(y)}e.content.appendChild(u)}}function zr(e){for(var t=" ",n=0;n<e.length-2;++n)t+=n%2?" ":" ";return t+=" "}function Br(e,t){return function(n,r,i,o,l,a,s){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var f=0;f<t.length;f++){var d=t[f];if(d.to>c&&d.from<=c)break}if(d.to>=u)return e(n,r,i,o,l,a,s);e(n,r.slice(0,d.to-c),i,o,null,a,s),o=null,r=r.slice(d.to-c),c=d.to}}}function Ur(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t}function Vr(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var l,a,s,c,u,f,d,h=i.length,p=0,g=1,m="",v=0;;){if(v==p){s=c=u=f=a="",d=null,v=1/0;for(var y,b=[],x=0;x<r.length;++x){var w=r[x],C=w.marker;"bookmark"==C.type&&w.from==p&&C.widgetNode?b.push(C):w.from<=p&&(null==w.to||w.to>p||C.collapsed&&w.to==p&&w.from==p)?(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,c=""),C.className&&(s+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&w.from==p&&(u+=" "+C.startStyle),C.endStyle&&w.to==v&&(y||(y=[])).push(C.endStyle,w.to),C.title&&!f&&(f=C.title),C.collapsed&&(!d||hr(d.marker,C)<0)&&(d=w)):w.from>p&&v>w.from&&(v=w.from)}if(y)for(var x=0;x<y.length;x+=2)y[x+1]==v&&(c+=" "+y[x]);if(!d||d.from==p)for(var x=0;x<b.length;++x)Ur(t,0,b[x]);if(d&&(d.from||0)==p){if(Ur(t,(null==d.to?h+1:d.to)-p,d.marker,null==d.from),null==d.to)return;d.to==p&&(d=!1)}}if(p>=h)break;for(var S=Math.min(h,v);;){if(m){var k=p+m.length;if(!d){var L=k>S?m.slice(0,S-p):m;t.addToken(t,L,l?l+s:s,u,p+L.length==v?c:"",f,a)}if(k>=S){m=m.slice(S-p),p=S;break}p=k,u=""}m=i.slice(o,o=n[g++]),l=Hr(n[g++],t.cm.options)}}else for(var g=1;g<n.length;g+=2)t.addToken(t,i.slice(o,o=n[g]),Hr(n[g+1],t.cm.options))}function Gr(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Ni(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Kr(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){Tr(e,n,i,r),ki(e,"change",e,t)}function l(e,t){for(var n=e,o=[];n<t;++n)o.push(new xl(c[n],i(n),r));return o}var a=t.from,s=t.to,c=t.text,u=Zr(e,a.line),f=Zr(e,s.line),d=Ni(c),h=i(c.length-1),p=s.line-a.line;if(t.full)e.insert(0,l(0,c.length)),e.remove(c.length,e.size-c.length);else if(Gr(e,t)){var g=l(0,c.length-1);o(f,f.text,h),p&&e.remove(a.line,p),g.length&&e.insert(a.line,g)}else if(u==f)if(1==c.length)o(u,u.text.slice(0,a.ch)+d+u.text.slice(s.ch),h);else{var g=l(1,c.length-1);g.push(new xl(d+u.text.slice(s.ch),h,r)),o(u,u.text.slice(0,a.ch)+c[0],i(0)),e.insert(a.line+1,g)}else if(1==c.length)o(u,u.text.slice(0,a.ch)+c[0]+f.text.slice(s.ch),i(0)),e.remove(a.line+1,p);else{o(u,u.text.slice(0,a.ch)+c[0],i(0)),o(f,d+f.text.slice(s.ch),h);var g=l(1,c.length-1);p>1&&e.remove(a.line+1,p-1),e.insert(a.line+1,g)}ki(e,"change",e,t)}function qr(e){this.lines=e,this.parent=null;for(var t=0,n=0;t<e.length;++t)e[t].parent=this,n+=e[t].height;this.height=n}function Xr(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}function Yr(e,t,n){function r(e,i,o){if(e.linked)for(var l=0;l<e.linked.length;++l){var a=e.linked[l];if(a.doc!=i){var s=o&&a.sharedHist;n&&!s||(t(a.doc,s),r(a.doc,e,s))}}}r(e,null,!0)}function $r(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,l(e),n(e),e.options.lineWrapping||d(e),e.options.mode=t.modeOption,Ft(e)}function Zr(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function Jr(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}function Qr(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function ei(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function ti(e){if(null==e.parent)return null;for(var t=e.parent,n=Wi(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function ni(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var r=0;r<e.lines.length;++r){var l=e.lines[r],a=l.height;if(t<a)break;t-=a}return n+r}function ri(e){e=yr(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;n=o,o=n.parent)for(var r=0;r<o.children.length;++r){var l=o.children[r];if(l==n)break;t+=l.height}return t}function ii(e){var t=e.order;return null==t&&(t=e.order=aa(e.text)),t}function oi(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function li(e,t){var n={from:q(t.from),to:Qo(t),text:Jr(e,t.from,t.to)};return hi(e,n,t.from.line,t.to.line+1),Yr(e,function(e){hi(e,n,t.from.line,t.to.line+1)},!0),n}function ai(e){for(;e.length;){if(!Ni(e).ranges)break;e.pop()}}function si(e,t){return t?(ai(e.done),Ni(e.done)):e.done.length&&!Ni(e.done).ranges?Ni(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Ni(e.done)):void 0}function ci(e,t,n,r){var i=e.history;i.undone.length=0;var o,l=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>l-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=si(i,i.lastOp==r))){var a=Ni(o.changes);0==jo(t.from,t.to)&&0==jo(t.from,a.to)?a.to=Qo(t):o.changes.push(li(e,t))}else{var s=Ni(i.done);for(s&&s.ranges||di(e.sel,i.done),o={changes:[li(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Wl(e,"historyAdded")}function ui(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function fi(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ui(e,o,Ni(i.done),t))?i.done[i.done.length-1]=t:di(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&ai(i.undone)}function di(e,t){var n=Ni(t);n&&n.ranges&&n.equals(e)||t.push(e)}function hi(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function pi(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function gi(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=0,i=[];r<t.text.length;++r)i.push(pi(n[r]));return i}function mi(e,t,n){for(var r=0,i=[];r<e.length;++r){var o=e[r];if(o.ranges)i.push(n?ue.prototype.deepCopy.call(o):o);else{var l=o.changes,a=[];i.push({changes:a});for(var s=0;s<l.length;++s){var c,u=l[s];if(a.push({from:u.from,to:u.to,text:u.text}),t)for(var f in u)(c=f.match(/^spans_(\d+)$/))&&Wi(t,Number(c[1]))>-1&&(Ni(a)[f]=u[f],delete u[f])}}}return i}function vi(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function yi(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],l=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var a=0;a<o.ranges.length;a++)vi(o.ranges[a].anchor,t,n,r),vi(o.ranges[a].head,t,n,r)}else{for(var a=0;a<o.changes.length;++a){var s=o.changes[a];if(n<s.from.line)s.from=Ro(s.from.line+r,s.from.ch),s.to=Ro(s.to.line+r,s.to.ch);else if(t<=s.to.line){l=!1;break}}l||(e.splice(0,i+1),i=0)}}}function bi(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;yi(e.done,n,r,i),yi(e.undone,n,r,i)}function xi(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function wi(e){return e.target||e.srcElement}function Ci(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),Ao&&e.ctrlKey&&1==t&&(t=3),t}function Si(e,t,n){var r=e._handlers&&e._handlers[t];return n?r&&r.length>0?r.slice():Pl:r||Pl}function ki(e,t){var n=Si(e,t,!1);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);Go?r=Go.delayedCallbacks:Dl?r=Dl:(r=Dl=[],setTimeout(Li,0));for(var o=0;o<n.length;++o)r.push(function(e){return function(){e.apply(null,i)}}(n[o]))}}function Li(){var e=Dl;Dl=null;for(var t=0;t<e.length;++t)e[t]()}function Mi(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Wl(e,n||t.type,e,t),xi(t)||t.codemirrorIgnore}function Ti(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==Wi(n,t[r])&&n.push(t[r])}function Oi(e,t){return Si(e,t).length>0}function Ei(e){e.prototype.on=function(e,t){Al(this,e,t)},e.prototype.off=function(e,t){Nl(this,e,t)}}function Ai(){this.id=null}function Pi(e){for(;Bl.length<=e;)Bl.push(Ni(Bl)+" ");return Bl[e]}function Ni(e){return e[e.length-1]}function Wi(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}function Di(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function Fi(){}function Ii(e,t){var n;return Object.create?n=Object.create(e):(Fi.prototype=e,n=new Fi),t&&Hi(t,n),n}function Hi(e,t,n){t||(t={});for(var r in e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function Ri(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function ji(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Kl(e))||t.test(e):Kl(e)}function _i(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function zi(e){return e.charCodeAt(0)>=768&&ql.test(e)}function Bi(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function Ui(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Vi(e,t){return Ui(e).appendChild(t)}function Gi(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function Ki(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function qi(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!Ki(n[r]).test(t)&&(t+=" "+n[r]);return t}function Xi(e){if(document.body.getElementsByClassName)for(var t=document.body.getElementsByClassName("CodeMirror"),n=0;n<t.length;n++){var r=t[n].CodeMirror;r&&e(r)}}function Yi(){Ql||($i(),Ql=!0)}function $i(){var e;Al(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Xi(Vt)},100))}),Al(window,"blur",function(){Xi(yn)})}function Zi(e){if(null==Yl){var t=Bi("span","");Vi(e,Bi("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Yl=t.offsetWidth<=1&&t.offsetHeight>2&&!(bo&&xo<8))}var n=Yl?Bi("span",""):Bi("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ji(e){if(null!=$l)return $l;var t=Vi(e,document.createTextNode("AخA")),n=Vl(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var r=Vl(t,1,2).getBoundingClientRect();return $l=r.right-n.right<3}function Qi(e){if(null!=ia)return ia;var t=Vi(e,Bi("span","x")),n=t.getBoundingClientRect(),r=Vl(t,0,1).getBoundingClientRect();return ia=Math.abs(n.left-r.left)>1}function eo(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<n&&l.to>t||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),1==l.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}function to(e){return e.level%2?e.to:e.from}function no(e){return e.level%2?e.from:e.to}function ro(e){var t=ii(e);return t?to(t[0]):0}function io(e){var t=ii(e);return t?no(Ni(t)):e.text.length}function oo(e,t){var n=Zr(e.doc,t),r=yr(n);r!=n&&(t=ti(r));var i=ii(r),o=i?i[0].level%2?io(r):ro(r):0;return Ro(t,o)}function lo(e,t){for(var n,r=Zr(e.doc,t);n=mr(r);)r=n.find(1,!0).line,t=null;var i=ii(r),o=i?i[0].level%2?ro(r):io(r):r.text.length;return Ro(null==t?ti(r):t,o)}function ao(e,t){var n=oo(e,t.line),r=Zr(e.doc,n.line),i=ii(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),l=t.line==n.line&&t.ch<=o&&t.ch;return Ro(n.line,l?0:o)}return n}function so(e,t,n){var r=e[0].level;return t==r||n!=r&&t<n}function co(e,t){la=null;for(var n,r=0;r<e.length;++r){var i=e[r];if(i.from<t&&i.to>t)return r;if(i.from==t||i.to==t){if(null!=n)return so(e,i.level,e[n].level)?(i.from!=i.to&&(la=n),r):(i.from!=i.to&&(la=r),n);n=r}}return n}function uo(e,t,n,r){if(!r)return t+n;do{t+=n}while(t>0&&zi(e.text.charAt(t)));return t}function fo(e,t,n,r){var i=ii(e);if(!i)return ho(e,t,n,r);for(var o=co(i,t),l=i[o],a=uo(e,t,l.level%2?-n:n,r);;){if(a>l.from&&a<l.to)return a;if(a==l.from||a==l.to)return co(i,a)==o?a:(l=i[o+=n],n>0==l.level%2?l.to:l.from);if(!(l=i[o+=n]))return null;a=n>0==l.level%2?uo(e,l.to,-1,r):uo(e,l.from,1,r)}}function ho(e,t,n,r){var i=t+n;if(r)for(;i>0&&zi(e.text.charAt(i));)i+=n;return i<0||i>e.text.length?null:i}var po=navigator.userAgent,go=navigator.platform,mo=/gecko\/\d/i.test(po),vo=/MSIE \d/.test(po),yo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(po),bo=vo||yo,xo=bo&&(vo?document.documentMode||6:yo[1]),wo=/WebKit\//.test(po),Co=wo&&/Qt\/\d+\.\d+/.test(po),So=/Chrome\//.test(po),ko=/Opera\//.test(po),Lo=/Apple Computer/.test(navigator.vendor),Mo=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(po),To=/PhantomJS/.test(po),Oo=/AppleWebKit/.test(po)&&/Mobile\/\w+/.test(po),Eo=Oo||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(po),Ao=Oo||/Mac/.test(go),Po=/\bCrOS\b/.test(po),No=/win/i.test(go),Wo=ko&&po.match(/Version\/(\d*\.\d*)/);Wo&&(Wo=Number(Wo[1])),Wo&&Wo>=15&&(ko=!1,wo=!0);var Do=Ao&&(Co||ko&&(null==Wo||Wo<12.11)),Fo=mo||bo&&xo>=9,Io=!1,Ho=!1;g.prototype=Hi({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=Ao&&!Mo?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ai,this.disableVert=new Ai},enableZeroWidthBar:function(e,t){function n(){var r=e.getBoundingClientRect();document.elementFromPoint(r.left+1,r.bottom-1)!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},g.prototype),m.prototype=Hi({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},m.prototype),e.scrollbarModel={native:g,null:m},L.prototype.signal=function(e,t){Oi(e,t)&&this.events.push(arguments)},L.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Wl.apply(null,this.events[e])};var Ro=e.Pos=function(e,t){if(!(this instanceof Ro))return new Ro(e,t);this.line=e,this.ch=t},jo=e.cmpPos=function(e,t){return e.line-t.line||e.ch-t.ch},_o=null;ne.prototype=Hi({init:function(e){function t(e){if(!Mi(r,e)){if(r.somethingSelected())_o=r.getSelections(),n.inaccurateSelection&&(n.prevInput="",n.inaccurateSelection=!1,o.value=_o.join("\n"),Ul(o));else{if(!r.options.lineWiseCopyCut)return;var t=ee(r);_o=t.text,"cut"==e.type?r.setSelections(t.ranges,null,Hl):(n.prevInput="",o.value=t.text.join("\n"),Ul(o))}"cut"==e.type&&(r.state.cutIncoming=!0)}}var n=this,r=this.cm,i=this.wrapper=re(),o=this.textarea=i.firstChild;e.wrapper.insertBefore(i,e.wrapper.firstChild),Oo&&(o.style.width="0px"),Al(o,"input",function(){bo&&xo>=9&&n.hasSelection&&(n.hasSelection=null),n.poll()}),Al(o,"paste",function(e){Mi(r,e)||J(e,r)||(r.state.pasteIncoming=!0,n.fastPoll())}),Al(o,"cut",t),Al(o,"copy",t),Al(e.scroller,"paste",function(t){Gt(e,t)||Mi(r,t)||(r.state.pasteIncoming=!0,n.focus())}),Al(e.lineSpace,"selectstart",function(t){Gt(e,t)||Tl(t)}),Al(o,"compositionstart",function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Al(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,r=Fe(e);if(e.options.moveInputWithCursor){var i=ht(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return r},showSelection:function(e){var t=this.cm,n=t.display;Vi(n.cursorDiv,e.cursors),Vi(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=ra&&(o.to().line-o.from().line>100||(n=r.getSelection()).length>1e3);var l=t?"-":n||r.getSelection();this.textarea.value=l,r.state.focused&&Ul(this.textarea),bo&&xo>=9&&(this.hasSelection=l)}else e||(this.prevInput=this.textarea.value="",bo&&xo>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Eo||Gi()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){n.poll()||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||na(t)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=t.value;if(r==n&&!e.somethingSelected())return!1;if(bo&&xo>=9&&this.hasSelection===r||Ao&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||n||(n=""),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var o=0,l=Math.min(n.length,r.length);o<l&&n.charCodeAt(o)==r.charCodeAt(o);)++o;var a=this;return Et(e,function(){Z(e,r.slice(o),n.length-o,null,a.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?t.value=a.prevInput="":a.prevInput=r,a.composing&&(a.composing.range.clear(),a.composing.range=e.markText(a.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){bo&&xo>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=l.selectionStart){var e=i.somethingSelected(),t=""+(e?l.value:"");l.value="⇚",l.value=t,r.prevInput=e?"":"",l.selectionStart=1,l.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.cssText=u,l.style.cssText=c,bo&&xo<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=s),null!=l.selectionStart){(!bo||bo&&xo<9)&&t();var e=0,n=function(){o.selForContextMenu==i.doc.sel&&0==l.selectionStart&&l.selectionEnd>0&&""==r.prevInput?At(i,ul.selectAll)(i):e++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,o=i.display,l=r.textarea,a=Kt(i,e),s=o.scroller.scrollTop;if(a&&!ko){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(a)&&At(i,Me)(i.doc,he(a),Hl);var c=l.style.cssText,u=r.wrapper.style.cssText;r.wrapper.style.cssText="position: absolute";var f=r.wrapper.getBoundingClientRect();if(l.style.cssText="position: absolute; width: 30px; height: 30px; top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px; z-index: 1000; background: "+(bo?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",wo)var d=window.scrollY;if(o.input.focus(),wo&&window.scrollTo(null,d),o.input.reset(),i.somethingSelected()||(l.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),bo&&xo>=9&&t(),Fo){El(e);var h=function(){Nl(window,"mouseup",h),setTimeout(n,20)};Al(window,"mouseup",h)}else setTimeout(n,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:Fi,needsContentAttribute:!1},ne.prototype),ie.prototype=Hi({init:function(e){function t(e){if(!Mi(r,e)){if(r.somethingSelected())_o=r.getSelections(),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=ee(r);_o=t.text,"cut"==e.type&&r.operation(function(){r.setSelections(t.ranges,0,Hl),r.replaceSelection("",null,"cut")})}if(e.clipboardData&&!Oo)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",_o.join("\n"));else{var n=re(),i=n.firstChild;r.display.lineSpace.insertBefore(n,r.display.lineSpace.firstChild),i.value=_o.join("\n");var o=document.activeElement;Ul(i),setTimeout(function(){r.display.lineSpace.removeChild(n),o.focus()},50)}}}var n=this,r=n.cm,i=n.div=e.lineDiv;te(i),Al(i,"paste",function(e){Mi(r,e)||J(e,r)}),Al(i,"compositionstart",function(e){var t=e.data;if(n.composing={sel:r.doc.sel,data:t,startData:t},t){var i=r.doc.sel.primary(),o=r.getLine(i.head.line),l=o.indexOf(t,Math.max(0,i.head.ch-t.length));l>-1&&l<=i.head.ch&&(n.composing.sel=he(Ro(i.head.line,l),Ro(i.head.line,l+t.length)))}}),Al(i,"compositionupdate",function(e){n.composing.data=e.data}),Al(i,"compositionend",function(e){var t=n.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||n.applyComposition(t),n.composing==t&&(n.composing=null)},50))}),Al(i,"touchstart",function(){n.forceCompositionEnd()}),Al(i,"input",function(){n.composing||!r.isReadOnly()&&n.pollContent()||Et(n.cm,function(){Ft(r)})}),Al(i,"copy",t),Al(i,"cut",t)},prepareSelection:function(){var e=Fe(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=ae(this.cm,e.anchorNode,e.anchorOffset),r=ae(this.cm,e.focusNode,e.focusOffset);if(!n||n.bad||!r||r.bad||0!=jo(Y(n,r),t.from())||0!=jo(X(n,r),t.to())){var i=oe(this.cm,t.from()),o=oe(this.cm,t.to());if(i||o){var l=this.cm.display.view,a=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var s=l[l.length-1].measure,c=s.maps?s.maps[s.maps.length-1]:s.map;o={node:c[c.length-1],offset:c[c.length-2]-c[c.length-3]}}}else i={node:l[0].measure.map[2],offset:0};try{var u=Vl(i.node,i.offset,o.offset,o.node)}catch(e){}u&&(!mo&&this.cm.state.focused?(e.collapse(i.node,i.offset),u.collapsed||e.addRange(u)):(e.removeAllRanges(),e.addRange(u)),a&&null==e.anchorNode?e.addRange(a):mo&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){Vi(this.cm.display.cursorDiv,e.cursors),Vi(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Xl(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():Et(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=ae(t,e.anchorNode,e.anchorOffset),r=ae(t,e.focusNode,e.focusOffset);n&&r&&Et(t,function(){Me(t.doc,he(n,r),Hl),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o;if(r.line==t.viewFrom||0==(o=Rt(e,r.line)))var l=ti(t.view[0].line),a=t.view[0].node;else var l=ti(t.view[o].line),a=t.view[o-1].node.nextSibling;var s=Rt(e,i.line);if(s==t.view.length-1)var c=t.viewTo-1,u=t.lineDiv.lastChild;else var c=ti(t.view[s+1].line)-1,u=t.view[s+1].node.previousSibling;for(var f=e.doc.splitLines(ce(e,a,u,l,c)),d=Jr(e.doc,Ro(l,0),Ro(c,Zr(e.doc,c).text.length));f.length>1&&d.length>1;)if(Ni(f)==Ni(d))f.pop(),d.pop(),c--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),l++}for(var h=0,p=0,g=f[0],m=d[0],v=Math.min(g.length,m.length);h<v&&g.charCodeAt(h)==m.charCodeAt(h);)++h;for(var y=Ni(f),b=Ni(d),x=Math.min(y.length-(1==f.length?h:0),b.length-(1==d.length?h:0));p<x&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;f[f.length-1]=y.slice(0,y.length-p),f[0]=f[0].slice(h);var w=Ro(l,h),C=Ro(c,d.length?Ni(d).length-p:0);return f.length>1||f[0]||jo(w,C)?(Nn(e.doc,f,w,C,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){this.cm.isReadOnly()?At(this.cm,Ft)(this.cm):e.data&&e.data!=e.startData&&At(this.cm,Z)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),this.cm.isReadOnly()||At(this.cm,Z)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:Fi,resetPosition:Fi,needsContentAttribute:!0},ie.prototype),e.inputStyles={textarea:ne,contenteditable:ie},ue.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(0!=jo(n.anchor,r.anchor)||0!=jo(n.head,r.head))return!1}return!0},deepCopy:function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new fe(q(this.ranges[t].anchor),q(this.ranges[t].head));return new ue(e,this.primIndex)},somethingSelected:function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},contains:function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(jo(t,r.from())>=0&&jo(e,r.to())<=0)return n}return-1}},fe.prototype={from:function(){return Y(this.anchor,this.head)},to:function(){return X(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var zo,Bo,Uo,Vo={left:0,right:0,top:0,bottom:0},Go=null,Ko=0,qo=0,Xo=0,Yo=null;bo?Yo=-.53:mo?Yo=15:So?Yo=-.7:Lo&&(Yo=-1/3);var $o=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};e.wheelEventPixels=function(e){var t=$o(e);return t.x*=Yo,t.y*=Yo,t};var Zo=new Ai,Jo=null,Qo=e.changeEnd=function(e){return e.text?Ro(e.from.line+e.text.length-1,Ni(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];n[e]==t&&"mode"!=e||(n[e]=t,tl.hasOwnProperty(e)&&At(this,tl[e])(this,t,r))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](qn(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:Pt(function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:r,modeSpec:t,opaque:n&&n.opaque}),this.state.modeGen++,Ft(this)}),removeOverlay:Pt(function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void Ft(this)}}),indentLine:Pt(function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),ve(this.doc,e)&&_n(this,e,t,n)}),indentSelection:Pt(function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(_n(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Rn(this));else{var o=i.from(),l=i.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var s=a;s<n;++s)_n(this,s,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&Ce(this.doc,r,new fe(o,c[r].to()),Hl)}}}),getTokenAt:function(e,t){return Nr(this,e,t)},getLineTokens:function(e,t){return Nr(this,Ro(e),t,!0)},getTokenTypeAt:function(e){e=ge(this.doc,e);var t,n=Fr(this,Zr(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var l=r+i>>1;if((l?n[2*l-1]:0)>=o)i=l;else{if(!(n[2*l+1]<o)){t=n[2*l+2];break}r=l+1}}var a=t?t.indexOf("cm-overlay "):-1;return a<0?t:0==a?null:t.slice(0,a-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!al.hasOwnProperty(t))return n;var r=al[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var l=r[i[t][o]];l&&n.push(l)}else i.helperType&&r[i.helperType]?n.push(r[i.helperType]):r[i.name]&&n.push(r[i.name]);for(var o=0;o<r._global.length;o++){var a=r._global[o];a.pred(i,this)&&-1==Wi(n,a.val)&&n.push(a.val)}return n},getStateAfter:function(e,t){var n=this.doc;return e=pe(n,null==e?n.first+n.size-1:e),Be(this,e+1,t)},cursorCoords:function(e,t){var n,r=this.doc.sel.primary();return n=null==e?r.head:"object"==typeof e?ge(this.doc,e):e?r.from():r.to(),ht(this,n,t||"page")},charCoords:function(e,t){return dt(this,ge(this.doc,e),t||"page")},coordsChar:function(e,t){return e=ft(this,e,t||"page"),mt(this,e.left,e.top)},lineAtHeight:function(e,t){return e=ft(this,{top:e,left:0},t||"page").top,ni(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){var n,r=!1;if("number"==typeof e){var i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,r=!0),n=Zr(this.doc,e)}else n=e;return ut(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-ri(n):0)},defaultTextHeight:function(){return yt(this.display)},defaultCharWidth:function(){return bt(this.display)},setGutterMarker:Pt(function(e,t,n){return zn(this.doc,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&_i(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Pt(function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,It(t,r,"gutter"),_i(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),lineInfo:function(e){if("number"==typeof e){if(!ve(this.doc,e))return null;var t=e;if(!(e=Zr(this.doc,e)))return null}else{var t=ti(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=ht(this,ge(this.doc,e));var l=e.bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)l=e.top;else if("above"==r||"near"==r){var s=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(l=e.bottom),a+t.offsetWidth>c&&(a=c-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?a=0:"middle"==i&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),n&&Fn(this,a,l,a+t.offsetWidth,l+t.offsetHeight)},triggerOnKeyDown:Pt(dn),triggerOnKeyPress:Pt(gn),triggerOnKeyUp:pn,execCommand:function(e){if(ul.hasOwnProperty(e))return ul[e].call(null,this)},triggerElectric:Pt(function(e){Q(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=0,l=ge(this.doc,e);o<t&&(l=Un(this.doc,l,i,n,r),!l.hitSide);++o);return l},moveH:Pt(function(e,t){var n=this;n.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?Un(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()},jl)}),deleteH:Pt(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Bn(this,function(n){var i=Un(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var l=0,a=ge(this.doc,e);l<t;++l){var s=ht(this,a,"div");if(null==o?o=s.left:s.left=o,a=Vn(this,s,i,n),a.hitSide)break}return a},moveV:Pt(function(e,t){var n=this,r=this.doc,i=[],o=!n.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(l){if(o)return e<0?l.from():l.to();var a=ht(n,l.head,"div");null!=l.goalColumn&&(a.left=l.goalColumn),i.push(a.left);var s=Vn(n,a,e,t);return"page"==t&&l==r.sel.primary()&&Hn(n,null,dt(n,s,"div").top-a.top),s},jl),i.length)for(var l=0;l<r.sel.ranges.length;l++)r.sel.ranges[l].goalColumn=i[l]}),findWordAt:function(e){var t=this.doc,n=Zr(t,e.line).text,r=e.ch,i=e.ch;if(n){var o=this.getHelper(e,"wordChars");(e.xRel<0||i==n.length)&&r?--r:++i;for(var l=n.charAt(r),a=ji(l,o)?function(e){return ji(e,o)}:/\s/.test(l)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ji(e)};r>0&&a(n.charAt(r-1));)--r;for(;i<n.length&&a(n.charAt(i));)++i}return new fe(Ro(e.line,r),Ro(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Jl(this.display.cursorDiv,"CodeMirror-overwrite"):Zl(this.display.cursorDiv,"CodeMirror-overwrite"),Wl(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Gi()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Pt(function(e,t){null==e&&null==t||jn(this),null!=e&&(this.curOp.scrollLeft=e),null!=t&&(this.curOp.scrollTop=t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Ke(this)-this.display.barHeight,width:e.scrollWidth-Ke(this)-this.display.barWidth,clientHeight:Xe(this),clientWidth:qe(this)}},scrollIntoView:Pt(function(e,t){if(null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:Ro(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)jn(this),this.curOp.scrollToPos=e;else{var n=In(this,Math.min(e.from.left,e.to.left),Math.min(e.from.top,e.to.top)-e.margin,Math.max(e.from.right,e.to.right),Math.max(e.from.bottom,e.to.bottom)+e.margin);this.scrollTo(n.scrollLeft,n.scrollTop)}}),setSize:Pt(function(e,t){function n(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e}var r=this;null!=e&&(r.display.wrapper.style.width=n(e)),null!=t&&(r.display.wrapper.style.height=n(t)),r.options.lineWrapping&<(this);var i=r.display.viewFrom;r.doc.iter(i,r.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){It(r,i,"widget");break}++i}),r.curOp.forceUpdate=!0,Wl(r,"refresh",this)}),operation:function(e){return Et(this,e)},refresh:Pt(function(){var e=this.display.cachedTextHeight;Ft(this),this.curOp.forceUpdate=!0,at(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),u(this),(null==e||Math.abs(e-yt(this.display))>.5)&&l(this),Wl(this,"refresh",this)}),swapDoc:Pt(function(e){var t=this.doc;return t.cm=null,$r(this,e),at(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ki(this,"swapDoc",this,t),t}),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}},Ei(e);var el=e.defaults={},tl=e.optionHandlers={},nl=e.Init={toString:function(){return"CodeMirror.Init"}};Gn("value","",function(e,t){e.setValue(t)},!0),Gn("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),Gn("indentUnit",2,n,!0),Gn("indentWithTabs",!1),Gn("smartIndent",!0),Gn("tabSize",4,function(e){r(e),at(e),Ft(e)},!0),Gn("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(Ro(r,o))}r++});for(var i=n.length-1;i>=0;i--)Nn(e.doc,t,n[i],Ro(n[i].line,n[i].ch+t.length))}}),Gn("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,r){t.state.specialChars=new RegExp(n.source+(n.test("\t")?"":"|\t"),"g"),r!=e.Init&&t.refresh()}),Gn("specialCharPlaceholder",jr,function(e){e.refresh()},!0),Gn("electricChars",!0),Gn("inputStyle",Eo?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Gn("rtlMoveVisually",!No),Gn("wholeLineUpdateBefore",!0),Gn("theme","default",function(e){a(e),s(e)},!0),Gn("keyMap","default",function(t,n,r){var i=qn(n),o=r!=e.Init&&qn(r);o&&o.detach&&o.detach(t,i),i.attach&&i.attach(t,o||null)}),Gn("extraKeys",null),Gn("lineWrapping",!1,i,!0),Gn("gutters",[],function(e){h(e.options),s(e)},!0),Gn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?k(e.display)+"px":"0",e.refresh()},!0),Gn("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),Gn("scrollbarStyle","native",function(e){v(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),Gn("lineNumbers",!1,function(e){h(e.options),s(e)},!0),Gn("firstLineNumber",1,s,!0),Gn("lineNumberFormatter",function(e){return e},s,!0),Gn("showCursorWhenSelecting",!1,De,!0),Gn("resetSelectionOnContextMenu",!0),Gn("lineWiseCopyCut",!0),Gn("readOnly",!1,function(e,t){"nocursor"==t?(yn(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),Gn("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),Gn("dragDrop",!0,Ut),Gn("allowDropFileTypes",null),Gn("cursorBlinkRate",530),Gn("cursorScrollMargin",0),Gn("cursorHeight",1,De,!0),Gn("singleCursorHeightPerLine",!0,De,!0),Gn("workTime",100),Gn("workDelay",100),Gn("flattenSpans",!0,r,!0),Gn("addModeClass",!1,r,!0),Gn("pollInterval",100),Gn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),Gn("historyEventDelay",1250),Gn("viewportMargin",10,function(e){e.refresh()},!0),Gn("maxHighlightLength",1e4,r,!0),Gn("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),Gn("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),Gn("autofocus",null);var rl=e.modes={},il=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),rl[t]=n},e.defineMIME=function(e,t){il[e]=t},e.resolveMode=function(t){if("string"==typeof t&&il.hasOwnProperty(t))t=il[t];else if(t&&"string"==typeof t.name&&il.hasOwnProperty(t.name)){var n=il[t.name];"string"==typeof n&&(n={name:n}),t=Ii(n,t),t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),r=rl[n.name];if(!r)return e.getMode(t,"text/plain");var i=r(t,n);if(ol.hasOwnProperty(n.name)){var o=ol[n.name];for(var l in o)o.hasOwnProperty(l)&&(i.hasOwnProperty(l)&&(i["_"+l]=i[l]),i[l]=o[l])}if(i.name=n.name,n.helperType&&(i.helperType=n.helperType),n.modeProps)for(var l in n.modeProps)i[l]=n.modeProps[l];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var ol=e.modeExtensions={};e.extendMode=function(e,t){Hi(t,ol.hasOwnProperty(e)?ol[e]:ol[e]={})},e.defineExtension=function(t,n){e.prototype[t]=n},e.defineDocExtension=function(e,t){kl.prototype[e]=t},e.defineOption=Gn;var ll=[];e.defineInitHook=function(e){ll.push(e)};var al=e.helpers={};e.registerHelper=function(t,n,r){al.hasOwnProperty(t)||(al[t]=e[t]={_global:[]}),al[t][n]=r},e.registerGlobalHelper=function(t,n,r,i){e.registerHelper(t,n,i),al[t]._global.push({pred:r,val:i})};var sl=e.copyState=function(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},cl=e.startState=function(e,t,n){return!e.startState||e.startState(t,n)};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var ul=e.commands={selectAll:function(e){e.setSelection(Ro(e.firstLine(),0),Ro(e.lastLine()),Hl)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Hl)},killLine:function(e){Bn(e,function(t){if(t.empty()){var n=Zr(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:Ro(t.head.line+1,0)}:{from:t.head,to:Ro(t.head.line,n)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){Bn(e,function(t){return{from:Ro(t.from().line,0),to:ge(e.doc,Ro(t.to().line+1,0))}})},delLineLeft:function(e){Bn(e,function(e){return{from:Ro(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){Bn(e,function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}})},delWrappedLineRight:function(e){Bn(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}})},undo:function(e){e.undo()},redo:function(e){e.redo()},undoSelection:function(e){e.undoSelection()},redoSelection:function(e){e.redoSelection()},goDocStart:function(e){e.extendSelection(Ro(e.firstLine(),0))},goDocEnd:function(e){e.extendSelection(Ro(e.lastLine()))},goLineStart:function(e){e.extendSelectionsBy(function(t){return oo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){e.extendSelectionsBy(function(t){return ao(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){e.extendSelectionsBy(function(t){return lo(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){e.extendSelectionsBy(function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},jl)},goLineLeft:function(e){e.extendSelectionsBy(function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},jl)},goLineLeftSmart:function(e){e.extendSelectionsBy(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?ao(e,t.head):r},jl)},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goGroupRight:function(e){e.moveH(1,"group")},goGroupLeft:function(e){e.moveH(-1,"group")},goWordRight:function(e){e.moveH(1,"word")},delCharBefore:function(e){e.deleteH(-1,"char")},delCharAfter:function(e){e.deleteH(1,"char")},delWordBefore:function(e){e.deleteH(-1,"word")},delWordAfter:function(e){e.deleteH(1,"word")},delGroupBefore:function(e){e.deleteH(-1,"group")},delGroupAfter:function(e){e.deleteH(1,"group")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),l=_l(e.getLine(o.line),o.ch,r);t.push(Pi(r-l%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){Et(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){var i=t[r].head,o=Zr(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new Ro(i.line,i.ch-1)),i.ch>0)i=new Ro(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Ro(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=Zr(e.doc,i.line-1).text;l&&e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),Ro(i.line-1,l.length-1),Ro(i.line,1),"+transpose")}n.push(new fe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){Et(e,function(){for(var t=e.listSelections().length,n=0;n<t;n++){var r=e.listSelections()[n];e.replaceRange(e.doc.lineSeparator(),r.anchor,r.head,"+input"),e.indentLine(r.from().line+1,null,!0)}Rn(e)})},toggleOverwrite:function(e){e.toggleOverwrite()}},fl=e.keyMap={};fl.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"},fl.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"},fl.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},fl.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"]},fl.default=Ao?fl.macDefault:fl.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Di(n.split(" "),Kn),o=0;o<i.length;o++){var l,a;o==i.length-1?(a=i.join(" "),l=r):(a=i.slice(0,o+1).join(" "),l="...");var s=t[a];if(s){if(s!=l)throw new Error("Inconsistent bindings for "+a)}else t[a]=l}delete e[n]}for(var c in t)e[c]=t[c];return e};var dl=e.lookupKey=function(e,t,n,r){t=qn(t);var i=t.call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return dl(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var l=dl(e,t.fallthrough[o],n,r);if(l)return l}}},hl=e.isModifierKey=function(e){var t="string"==typeof e?e:oa[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t},pl=e.keyName=function(e,t){if(ko&&34==e.keyCode&&e.char)return!1;var n=oa[e.keyCode],r=n;return null!=r&&!e.altGraphKey&&(e.altKey&&"Alt"!=n&&(r="Alt-"+r),(Do?e.metaKey:e.ctrlKey)&&"Ctrl"!=n&&(r="Ctrl-"+r),(Do?e.ctrlKey:e.metaKey)&&"Cmd"!=n&&(r="Cmd-"+r),!t&&e.shiftKey&&"Shift"!=n&&(r="Shift-"+r),r)};e.fromTextArea=function(t,n){function r(){t.value=s.getValue()}if(n=n?Hi(n):{},n.value=t.value,!n.tabindex&&t.tabIndex&&(n.tabindex=t.tabIndex),!n.placeholder&&t.placeholder&&(n.placeholder=t.placeholder),null==n.autofocus){var i=Gi();n.autofocus=i==t||null!=t.getAttribute("autofocus")&&i==document.body}if(t.form&&(Al(t.form,"submit",r),!n.leaveSubmitMethodAlone)){var o=t.form,l=o.submit;try{var a=o.submit=function(){r(),o.submit=l,o.submit(),o.submit=a}}catch(e){}}n.finishInit=function(e){e.save=r,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,r(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(Nl(t.form,"submit",r),"function"==typeof t.form.submit&&(t.form.submit=l))}},t.style.display="none";var s=e(function(e){t.parentNode.insertBefore(e,t.nextSibling)},n);return s};var gl=e.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};gl.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t=this.string.charAt(this.pos);if("string"==typeof e)var n=t==e;else var n=t&&(e.test?e.test(t):e(t));if(n)return++this.pos,t},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=_l(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?_l(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return _l(this.string,null,this.tabSize)-(this.lineStart?_l(this.string,this.lineStart,this.tabSize):0)},match:function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var ml=0,vl=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ml};Ei(vl),vl.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&xt(e),Oi(this,"clear")){var n=this.find();n&&ki(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var l=this.lines[o],a=er(l.markedSpans,this);e&&!this.collapsed?It(e,ti(l),"text"):e&&(null!=a.to&&(i=ti(l)),null!=a.from&&(r=ti(l))),l.markedSpans=tr(l.markedSpans,a),null==a.from&&this.collapsed&&!Cr(this.doc,l)&&e&&ei(l,yt(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var o=0;o<this.lines.length;++o){var s=yr(this.lines[o]),c=f(s);c>e.display.maxLineLength&&(e.display.maxLine=s,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Ft(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ee(e.doc)),e&&ki(e,"markerCleared",e,this),t&&Ct(e),this.parent&&this.parent.clear()}},vl.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,r,i=0;i<this.lines.length;++i){var o=this.lines[i],l=er(o.markedSpans,this);if(null!=l.from&&(n=Ro(t?o:ti(o),l.from),-1==e))return n;if(null!=l.to&&(r=Ro(t?o:ti(o),l.to),1==e))return r}return n&&{from:n,to:r}},vl.prototype.changed=function(){var e=this.find(-1,!0),t=this,n=this.doc.cm;e&&n&&Et(n,function(){var r=e.line,i=ti(e.line),o=Qe(n,i);if(o&&(ot(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Cr(t.doc,r)&&null!=t.height){var l=t.height;t.height=null;var a=Lr(t)-l;a&&ei(r,r.height+a)}})},vl.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=Wi(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},vl.prototype.detachLine=function(e){if(this.lines.splice(Wi(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}};var ml=0,yl=e.SharedTextMarker=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};Ei(yl),yl.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ki(this,"clear")}},yl.prototype.find=function(e,t){return this.primary.find(e,t)};var bl=e.LineWidget=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};Ei(bl),bl.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=ti(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=Lr(this);ei(n,Math.max(0,n.height-o)),e&&Et(e,function(){kr(e,n,-o),It(e,r,"widget")})}},bl.prototype.changed=function(){var e=this.height,t=this.doc.cm,n=this.line;this.height=null;var r=Lr(this)-e;r&&(ei(n,n.height+r),t&&Et(t,function(){t.curOp.forceUpdate=!0,kr(t,n,r)}))};var xl=e.Line=function(e,t,n){this.text=e,ur(this,t),this.height=n?n(this):1};Ei(xl),xl.prototype.lineNo=function(){return ti(this)};var wl={},Cl={};qr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,Or(i),ki(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},Xr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),l=r.height;if(r.removeInner(e,o),this.height-=l-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof qr))){var a=[];this.collapse(a),this.children=[new qr(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var l=i.lines.length%25+25,a=l;a<i.lines.length;){var s=new qr(i.lines.slice(a,a+=25));i.height-=s.height,this.children.splice(++r,0,s),s.parent=this}i.lines=i.lines.slice(0,l),this.maybeSpill()}break}e-=o}},maybeSpill:function(){var e=this,t=e.children,n=t.length;if(!(n<=10)){var r=e.parent||e,i=Math.ceil((n-10)/5),o=n-5*i,l=new Xr(t.slice(0,o)),a=[l];l.parent=r;for(var s=0;s<i;s++){var c=o+5*s,u=new Xr(t.slice(c,c+5));a.push(u),u.parent=r}if(r===e)r.children=a;else{var f=Wi(r.children,e);r.children.splice(f,1,a)}r.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var l=Math.min(t,o-e);if(i.iterN(e,l,n))return!0;if(0==(t-=l))break;e=0}else e-=o}}};var Sl=0,kl=e.Doc=function(e,t,n,r){if(!(this instanceof kl))return new kl(e,t,n,r);null==n&&(n=0),Xr.call(this,[new qr([new xl("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var i=Ro(n,0);this.sel=he(i),this.history=new oi(null),this.id=++Sl,this.modeOption=t,this.lineSep=r,this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Kr(this,{from:i,to:i,text:e}),Me(this,he(i),Hl)};kl.prototype=Ii(Xr.prototype,{constructor:kl,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Qr(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Nt(function(e){var t=Ro(this.first,0),n=this.first+this.size-1;Mn(this,{from:t,to:Ro(n,Zr(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),Me(this,he(t))}),replaceRange:function(e,t,n,r){t=ge(this,t),n=n?ge(this,n):t,Nn(this,e,t,n,r)},getRange:function(e,t,n){var r=Jr(this,ge(this,e),ge(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(ve(this,e))return Zr(this,e)},getLineNumber:function(e){return ti(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Zr(this,e)),yr(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ge(this,e)},getCursor:function(e){var t=this.sel.primary();return 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:Nt(function(e,t,n){Se(this,ge(this,"number"==typeof e?Ro(e,t||0):e),null,n)}),setSelection:Nt(function(e,t,n){Se(this,ge(this,e),ge(this,t||e),n)}),extendSelection:Nt(function(e,t,n){xe(this,ge(this,e),t&&ge(this,t),n)}),extendSelections:Nt(function(e,t){we(this,ye(this,e),t)}),extendSelectionsBy:Nt(function(e,t){we(this,ye(this,Di(this.sel.ranges,e)),t)}),setSelections:Nt(function(e,t,n){if(e.length){for(var r=0,i=[];r<e.length;r++)i[r]=new fe(ge(this,e[r].anchor),ge(this,e[r].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Me(this,de(i,t),n)}}),addSelection:Nt(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new fe(ge(this,e),ge(this,t||e))),Me(this,de(r,r.length-1),n)}),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=Jr(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=Jr(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Nt(function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var l=i.ranges[o];r[o]={from:l.from(),to:l.to(),text:this.splitLines(e[o]),origin:n}}for(var a=t&&"end"!=t&&kn(this,r,t),o=r.length-1;o>=0;o--)Mn(this,r[o]);a?Le(this,a):this.cm&&Rn(this.cm)}),undo:Nt(function(){On(this,"undo")}),redo:Nt(function(){On(this,"redo")}),undoSelection:Nt(function(){On(this,"undo",!0)}),redoSelection:Nt(function(){On(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var r=0;r<e.undone.length;r++)e.undone[r].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){this.history=new oi(this.history.maxGeneration)},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:mi(this.history.done),undone:mi(this.history.undone)}},setHistory:function(e){var t=this.history=new oi(this.history.maxGeneration);t.done=mi(e.done.slice(0),null,!0),t.undone=mi(e.undone.slice(0),null,!0)},addLineClass:Nt(function(e,t,n){return zn(this,e,"gutter"==t?"gutter":"class",function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(Ki(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0})}),removeLineClass:Nt(function(e,t,n){return zn(this,e,"gutter"==t?"gutter":"class",function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(Ki(n));if(!o)return!1;var l=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&l!=i.length?" ":"")+i.slice(l)||null}return!0})}),addLineWidget:Nt(function(e,t,n){return Mr(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Xn(this,ge(this,e),ge(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=ge(this,e),Xn(this,e,e,n,"bookmark")},findMarksAt:function(e){e=ge(this,e);var t=[],n=Zr(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(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,n){e=ge(this,e),t=ge(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var a=0;a<l.length;a++){var s=l[a];null!=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||n&&!n(s.marker)||r.push(s.marker.parent||s.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n}),ge(this,Ro(n,t))},indexFromPos:function(e){e=ge(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+n}),t},copy:function(e){var t=new kl(Qr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new kl(Qr(this,t,n),e.mode||this.modeOption,t,this.lineSep);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Zn(r,$n(this)),r},unlinkDoc:function(t){if(t instanceof e&&(t=t.doc),this.linked)for(var n=0;n<this.linked.length;++n){var r=this.linked[n];if(r.doc==t){this.linked.splice(n,1),t.unlinkDoc(this),Jn($n(this));break}}if(t.history==this.history){var i=[t.id];Yr(t,function(e){i.push(e.id)},!0),t.history=new oi(null),t.history.done=mi(this.history.done,i),t.history.undone=mi(this.history.undone,i)}},iterLinkedDocs:function(e){Yr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):ta(e)},lineSeparator:function(){return this.lineSep||"\n"}}),kl.prototype.eachLine=kl.prototype.iter;var Ll="iter insert remove copy getEditor constructor".split(" ");for(var Ml in kl.prototype)kl.prototype.hasOwnProperty(Ml)&&Wi(Ll,Ml)<0&&(e.prototype[Ml]=function(e){return function(){return e.apply(this.doc,arguments)}}(kl.prototype[Ml]));Ei(kl);var Tl=e.e_preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},Ol=e.e_stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},El=e.e_stop=function(e){Tl(e),Ol(e)},Al=e.on=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={}),i=r[t]||(r[t]=[]);i.push(n)}},Pl=[],Nl=e.off=function(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else for(var r=Si(e,t,!1),i=0;i<r.length;++i)if(r[i]==n){r.splice(i,1);break}},Wl=e.signal=function(e,t){var n=Si(e,t,!0);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)},Dl=null,Fl=30,Il=e.Pass={toString:function(){return"CodeMirror.Pass"}},Hl={scroll:!1},Rl={origin:"*mouse"},jl={origin:"+move"};Ai.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var _l=e.countColumn=function(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,l=i||0;;){var a=e.indexOf("\t",o);if(a<0||a>=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}},zl=e.findColumn=function(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var l=o-r;if(o==e.length||i+l>=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}},Bl=[""],Ul=function(e){e.select()};Oo?Ul=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:bo&&(Ul=function(e){try{e.select()}catch(e){}});var Vl,Gl=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Kl=e.isWordChar=function(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Gl.test(e))},ql=/[\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]/;Vl=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var Xl=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)};bo&&xo<11&&(Gi=function(){try{return document.activeElement}catch(e){return document.body}});var Yl,$l,Zl=e.rmClass=function(e,t){var n=e.className,r=Ki(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},Jl=e.addClass=function(e,t){var n=e.className;Ki(t).test(n)||(e.className+=(n?" ":"")+t)},Ql=!1,ea=function(){if(bo&&xo<9)return!1;var e=Bi("div");return"draggable"in e||"dragDrop"in e}(),ta=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},na=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},ra=function(){var e=Bi("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),ia=null,oa=e.keyNames={3:"Enter",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:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};!function(){for(var e=0;e<10;e++)oa[e+48]=oa[e+96]=String(e);for(var e=65;e<=90;e++)oa[e]=String.fromCharCode(e);for(var e=1;e<=12;e++)oa[e+111]=oa[e+63235]="F"+e}();var la,aa=function(){function e(e){return e<=247?n.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1773?r.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,l=/[LRr]/,a=/[Lb1n]/,s=/[1n]/;return function(n){if(!i.test(n))return!1;for(var r,c=n.length,u=[],f=0;f<c;++f)u.push(r=e(n.charCodeAt(f)));for(var f=0,d="L";f<c;++f){var r=u[f];"m"==r?u[f]=d:d=r}for(var f=0,h="L";f<c;++f){var r=u[f];"1"==r&&"r"==h?u[f]="n":l.test(r)&&(h=r,"r"==r&&(u[f]="R"))}for(var f=1,d=u[0];f<c-1;++f){var r=u[f];"+"==r&&"1"==d&&"1"==u[f+1]?u[f]="1":","!=r||d!=u[f+1]||"1"!=d&&"n"!=d||(u[f]=d),d=r}for(var f=0;f<c;++f){var r=u[f];if(","==r)u[f]="N";else if("%"==r){for(var p=f+1;p<c&&"%"==u[p];++p);for(var g=f&&"!"==u[f-1]||p<c&&"1"==u[p]?"1":"N",m=f;m<p;++m)u[m]=g;f=p-1}}for(var f=0,h="L";f<c;++f){var r=u[f];"L"==h&&"1"==r?u[f]="L":l.test(r)&&(h=r)}for(var f=0;f<c;++f)if(o.test(u[f])){for(var p=f+1;p<c&&o.test(u[p]);++p);for(var v="L"==(f?u[f-1]:"L"),y="L"==(p<c?u[p]:"L"),g=v||y?"L":"R",m=f;m<p;++m)u[m]=g;f=p-1}for(var b,x=[],f=0;f<c;)if(a.test(u[f])){var w=f;for(++f;f<c&&a.test(u[f]);++f);x.push(new t(0,w,f))}else{var C=f,S=x.length;for(++f;f<c&&"L"!=u[f];++f);for(var m=C;m<f;)if(s.test(u[m])){C<m&&x.splice(S,0,new t(1,C,m));var k=m;for(++m;m<f&&s.test(u[m]);++m);x.splice(S,0,new t(2,k,m)),C=m}else++m;C<f&&x.splice(S,0,new t(1,C,f))}return 1==x[0].level&&(b=n.match(/^\s+/))&&(x[0].from=b[0].length,x.unshift(new t(0,0,b[0].length))),1==Ni(x).level&&(b=n.match(/\s+$/))&&(Ni(x).to-=b[0].length,x.push(new t(0,c-b[0].length,c))),2==x[0].level&&x.unshift(new t(1,x[0].to,x[0].to)),x[0].level!=Ni(x).level&&x.push(new t(x[0].level,c,c)),x}}();return e.version="5.14.3",e})},121:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,s,c,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d=n(0),h=r(d),p=n(9),g=r(p),m=n(7),v=(0,m.prefixObject)({container:{flex:"0 0 40px",display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"stretch",backgroundColor:"#3B3738",boxShadow:"0 1px 1px rgba(0,0,0,0.2)",zIndex:1e3,overflow:"hidden"},text:{userSelect:"none",color:"rgba(255,255,255,0.6)",fontSize:13,fontFamily:'proxima-nova, "Helvetica Neue", Helvetica, Arial, sans-serif',lineHeight:"40px",padding:"0 20px",cursor:"pointer",borderBottomStyle:"solid",borderBottomColor:"#1990B8",borderBottomWidth:0,transition:"border-width 0.1s, color 0.1s"},spacer:{flex:"1 1 auto"}});v.activeText=f({},v.text,{borderBottomWidth:3,color:"#FFF"});var y=(0,g.default)((c=s=function(e){function t(){var e,n,r,l;i(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.onClickTab=function(e){return r.props.onClickTab(e)},r.getComputedStyles=function(){var e=r.props.tabStyle;return{container:e?(0,m.prefix)(f({},v.container,e)):v.container}},r.getTextStyle=function(e){var t=r.props,n=t.activeTab,i=t.textStyle,o=t.activeTextStyle;if((0,t.compareTabs)(e,n)){var l=i?(0,m.prefix)(f({},v.activeText,i)):v.activeText;return o?(0,m.prefix)(f({},l,o)):l}return i?(0,m.prefix)(f({},v.text,i)):v.text},l=n,o(r,l)}return l(t,e),u(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.tabs,i=t.titles,o=this.getComputedStyles();return h.default.createElement("div",{style:o.container},r.map(function(t,n){var r=i.length>0?i[n]:t;return h.default.createElement("div",{key:r,style:e.getTextStyle(t),onClick:e.onClickTab.bind(e,t)},r)}),h.default.createElement("div",{style:v.spacer}),n)}}]),t}(d.Component),s.defaultProps={tabs:[],titles:[],activeTab:null,onClickTab:function(){},compareTabs:function(e,t){return e===t},textStyle:null,activeTextStyle:null,tabStyle:null},a=c))||a;t.default=y},122:function(e,t,n){!function(e){e(n(12))}(function(e){"use strict";function t(e,t){return e.line-t.line||e.ch-t.ch}function n(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?r.from:e.firstLine(),this.max=r?r.to-1:e.lastLine()}function r(e,t){var n=e.cm.getTokenTypeAt(d(e.line,t));return n&&/\btag\b/.test(n)}function i(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function o(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function l(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(i(e))continue;return}{if(r(e,t+1)){var n=e.text.lastIndexOf("/",t),o=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t+1}}}function a(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(o(e))continue;return}if(r(e,t+1)){p.lastIndex=t,e.ch=t;var n=p.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function s(e){for(;;){p.lastIndex=e.ch;var t=p.exec(e.text);if(!t){if(i(e))continue;return}{if(r(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(o(e))continue;return}{if(r(e,t+1)){var n=e.text.lastIndexOf("/",t),i=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,i?"selfClose":"regular"}e.ch=t}}}function u(e,t){for(var n=[];;){var r,i=s(e),o=e.line,a=e.ch-(i?i[0].length:0);if(!i||!(r=l(e)))return;if("selfClose"!=r)if(i[1]){for(var c=n.length-1;c>=0;--c)if(n[c]==i[2]){n.length=c;break}if(c<0&&(!t||t==i[2]))return{tag:i[2],from:d(o,a),to:d(e.line,e.ch)}}else n.push(i[2])}}function f(e,t){for(var n=[];;){var r=c(e);if(!r)return;if("selfClose"!=r){var i=e.line,o=e.ch,l=a(e);if(!l)return;if(l[1])n.push(l[2]);else{for(var s=n.length-1;s>=0;--s)if(n[s]==l[2]){n.length=s;break}if(s<0&&(!t||t==l[2]))return{tag:l[2],from:d(e.line,e.ch),to:d(i,o)}}}else a(e)}}var d=e.Pos,h="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",p=new RegExp("<(/?)(["+h+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");e.registerHelper("fold","xml",function(e,t){for(var r=new n(e,t.line,0);;){var i,o=s(r);if(!o||r.line!=t.line||!(i=l(r)))return;if(!o[1]&&"selfClose"!=i){var t=d(r.line,r.ch),a=u(r,o[2]);return a&&{from:t,to:a.from}}}}),e.findMatchingTag=function(e,r,i){var o=new n(e,r.line,r.ch,i);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var s=l(o),c=s&&d(o.line,o.ch),h=s&&a(o);if(s&&h&&!(t(o,r)>0)){var p={from:d(o.line,o.ch),to:c,tag:h[2]};return"selfClose"==s?{open:p,close:null,at:"open"}:h[1]?{open:f(o,h[2]),close:p,at:"close"}:(o=new n(e,c.line,c.ch,i),{open:p,close:u(o,h[2]),at:"open"})}}},e.findEnclosingTag=function(e,t,r){for(var i=new n(e,t.line,t.ch,r);;){var o=f(i);if(!o)break;var l=new n(e,t.line,t.ch,r),a=u(l,o.tag);if(a)return{open:o,close:a}}},e.scanForClosingTag=function(e,t,r,i){return u(new n(e,t.line,t.ch,i?{from:0,to:i}:null),r)}})},181:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s,c,u,f,d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(0),g=r(p),m=n(9),v=r(m),y=n(208),b=r(y),x=n(206),w=r(x),C=n(211),S=r(C),k=n(212),L=r(k),M=n(209),T=r(M),O=n(204),E=r(O),A=n(203),P=r(A),N=n(121),W=r(N),D=n(213),F=r(D),I=n(207),H=r(I),R=n(205),j=r(R),_=n(218),z=n(7),B=n(427),U=new B,V=function(e){return"@babel-"+e},G=function(e){return 0===e.indexOf("@babel-")},K=function e(t,n){return t.some(function(t){return"string"==typeof t?t===n:e(t.children,n)})},q=(0,z.prefixObject)({container:{flex:"1",display:"flex",alignItems:"stretch",minWidth:0,minHeight:0},editorPane:{flex:"1",display:"flex",flexDirection:"column",alignItems:"stretch",minWidth:0,minHeight:0,overflow:"hidden"},transpilerPane:{flex:"1",display:"flex",flexDirection:"column",alignItems:"stretch",minWidth:0,minHeight:0,overflow:"hidden"},playerPane:{position:"relative",display:"flex",flexDirection:"column",minWidth:0,minHeight:0,marginLeft:10,marginRight:10},overlayContainer:{position:"relative",flex:0,height:0,alignItems:"stretch"},overlay:{position:"absolute",bottom:0,background:"rgba(255,255,255,0.95)",zIndex:100,left:4,right:0,borderTop:"1px solid #F8F8F8",display:"flex",alignItems:"stretch",overflow:"auto",maxHeight:300},column:{flex:"1",display:"flex",flexDirection:"column",alignItems:"stretch",minWidth:0,minHeight:0,overflow:"hidden",position:"relative"},row:{flex:"1",display:"flex",flexDirection:"row",alignItems:"stretch",minWidth:0,minHeight:0,overflow:"hidden",position:"relative"}}),X=(0,v.default)((u=c=function(e){function t(e){o(this,t);var n=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));f.call(n);var r=e.initialTab,i=e.panes,a=e.consoleOptions;return n.state={compilerError:null,runtimeError:null,showDetails:!1,showLogs:a.visible,logs:[],activeTab:r,transpilerCache:{},transpilerVisible:K(i,"transpiler"),playerVisible:K(i,"player")},n.codeCache={},n.playerCache={},n.paneMap={editor:n.renderEditor,transpiler:n.renderTranspiler,player:n.renderPlayer},U.addEventListener("message",n.onBabelWorkerMessage),n}return a(t,e),h(t,[{key:"componentWillUnmount",value:function(){U.removeEventListener("message",this.onBabelWorkerMessage)}},{key:"componentDidMount",value:function(){var e=this;"undefined"!=typeof navigator&&function(){var t=e.props.files,n=e.state,r=n.playerVisible,i=n.transpilerVisible;Object.keys(t).forEach(function(n){var o=t[n];e.codeCache[n]=o,r&&U.postMessage({filename:n,code:o,options:{retainLines:!0}}),i&&U.postMessage({filename:V(n),code:o})})}()}},{key:"clearLogs",value:function(){0!==this.state.logs.length&&this.setState({logs:[]})}},{key:"render",value:function(){var e=this.props.panes;return g.default.createElement("div",{style:q.container},e.map(this.renderPane))}}]),t}(p.Component),c.defaultProps={title:"Live Editor",files:i({},"index.js",""),entry:"index.js",initialTab:"index.js",onChange:function(){},platform:null,scale:null,width:null,assetRoot:null,vendorComponents:[],externalStyles:{},fullscreen:!1,playerStyleSheet:null,playerCSS:null,panes:[],consoleOptions:{}},f=function(){var e=this;this.runApplication=function(){var t=e.playerCache,n=e.player,r=e.props.entry;n.runApplication(t,r)},this.onBabelWorkerMessage=function(t){var n=t.data,r=e.playerCache,o=e.props.files,l=e.state.transpilerCache,a=JSON.parse(n),s=a.filename,c=a.type,u=a.code,f=a.error;e.updateStatus(c,f),"code"===c&&(G(s)?e.setState({transpilerCache:d({},l,i({},s,u))}):(r[s]=u,Object.keys(o).every(function(e){return r[e]})&&(e.clearLogs(),e.runApplication())))},this.updateStatus=function(t,n){switch(t){case"code":e.setState({compilerError:null,showDetails:!1});break;case"error":e.setState({compilerError:(0,_.getErrorDetails)(n.message)})}},this.onCodeChange=function(t){var n=e.state,r=n.activeTab,i=n.transpilerVisible;n.playerVisible&&U.postMessage({filename:r,code:t,options:{retainLines:!0}}),i&&U.postMessage({filename:V(r),code:t}),e.codeCache[r]=t,e.props.onChange(e.codeCache)},this.onToggleDetails=function(t){e.setState({showDetails:t})},this.onToggleLogs=function(t){e.setState({showLogs:t})},this.onPlayerRun=function(){e.setState({runtimeError:null})},this.onPlayerError=function(t){e.setState({runtimeError:(0,_.getErrorDetails)(t)})},this.onPlayerConsole=function(t){var n=e.props.consoleOptions,r=e.state.logs;if(n.enabled){switch(t.command){case"log":e.setState({logs:r.concat(t)});break;case"clear":e.clearLogs()}}},this.onClickTab=function(t){e.setState({activeTab:t})},this.renderEditor=function(t){var n=e.props,r=n.files,i=n.title,o=n.externalStyles,l=n.fullscreen,a=e.state,s=a.compilerError,c=a.runtimeError,u=a.showDetails,f=a.activeTab,d=Object.keys(r),h=s||c,p=!!h;return g.default.createElement("div",{key:t,style:q.editorPane},i&&g.default.createElement(b.default,{text:i,headerStyle:o.header,textStyle:o.headerText},l&&g.default.createElement(H.default,{textStyle:o.headerText})),d.length>1&&g.default.createElement(W.default,{tabs:d,activeTab:f,onClickTab:e.onClickTab,tabStyle:o.tab,textStyle:o.tabText,activeTextStyle:o.tabTextActive},l&&!i&&g.default.createElement(H.default,{textStyle:o.tabText})),g.default.createElement(w.default,{key:f,initialValue:r[f],filename:f,onChange:e.onCodeChange,errorLineNumber:p&&h.lineNumber}),u&&g.default.createElement("div",{style:q.overlayContainer},g.default.createElement("div",{style:q.overlay},g.default.createElement(T.default,{isError:p},p?h.description+"\n\n":"",g.default.createElement(P.default,null)))),g.default.createElement(L.default,{text:p?h.summary:"No Errors",isError:p},g.default.createElement(E.default,{active:u,isError:p,onChange:e.onToggleDetails},"Show Details")))},this.renderTranspiler=function(t){var n=e.props,r=n.externalStyles,i=n.transpilerTitle,o=e.state,l=o.activeTab,a=o.transpilerCache;return g.default.createElement("div",{key:t,style:q.transpilerPane},i&&g.default.createElement(b.default,{text:i,headerStyle:r.transpilerHeader,textStyle:r.transpilerHeaderText}),g.default.createElement(w.default,{key:V(l),readOnly:!0,value:a[V(l)],filename:V(l)}))},this.renderPlayer=function(t){var n=e.props,r=n.width,i=n.scale,o=n.platform,l=n.assetRoot,a=n.vendorComponents,s=n.externalStyles,c=n.playerStyleSheet,u=n.playerCSS,f=n.playerTitle,h=n.consoleOptions,p=e.state,m=p.showLogs,v=p.logs,y=s.playerPane?d({},q.playerPane,s.playerPane):q.playerPane;return g.default.createElement("div",{key:t,style:y},f&&g.default.createElement(b.default,{text:f,headerStyle:s.playerHeader,textStyle:s.playerHeaderText}),g.default.createElement("div",{style:q.column},g.default.createElement("div",{style:q.row},g.default.createElement(S.default,{ref:function(t){return e.player=t},width:r,scale:i,platform:o,assetRoot:l,vendorComponents:a,playerStyleSheet:c,playerCSS:u,onRun:e.onPlayerRun,onError:e.onPlayerError,onConsole:e.onPlayerConsole}),h.enabled&&m&&g.default.createElement(j.default,{style:s.consolePane,rowStyle:s.consoleRow,maximize:h.maximized,logs:v})),h.enabled&&!1!==h.collapsible&&g.default.createElement(L.default,{text:"Logs"+(m?"":" ("+v.length+")")},g.default.createElement(E.default,{active:m,onChange:e.onToggleLogs},"Show Logs"))))},this.renderPane=function(t,n){var r=e.props.externalStyles;if("string"==typeof t)return e.paneMap[t](n);var i=t.children,o=t.type;if("stack"===o){var l=i.map(function(e,t){return{title:"string"==typeof e?e:e.title,index:t,pane:e}});return g.default.createElement(F.default,{tabs:l,titles:l.map(function(e){return e.title}),initialTab:l[0],tabStyle:r.tab,textStyle:r.tabText,activeTextStyle:r.tabTextActive,renderHiddenContent:!0,compareTabs:function(e,t){return e.index===t.index},renderContent:function(t){return e.renderPane(t.pane,t.index)}})}return g.default.createElement("div",{key:n,style:q["row"===o?"row":"column"]},i.map(e.renderPane))}},s=u))||s;t.default=X},182:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="import React, { Component } from 'react'\nimport {\n AppRegistry,\n StyleSheet,\n Text,\n View,\n} from 'react-native'\n\nclass App extends Component {\n render() {\n return (\n <View style={styles.container}>\n <Text style={styles.welcome}>\n Welcome to React Native!\n </Text>\n </View>\n )\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: '#F5FCFF',\n },\n welcome: {\n fontSize: 20,\n textAlign: 'center',\n margin: 10,\n },\n})\n\nAppRegistry.registerComponent('App', () => App)\n"},183:function(e,t,n){var r=n(233);"string"==typeof r&&(r=[[e.i,r,""]]);n(52)(r,{});r.locals&&(e.exports=r.locals)},203:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,s,c,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(0),d=r(f),h=n(9),p=r(h),g=(0,p.default)((c=s=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),u(t,[{key:"render",value:function(){return d.default.createElement("div",null,"How this simulator works: the"," ",d.default.createElement("a",{target:"_blank",href:"https://github.com/dabbott/react-native-web-player"},"react-native-web-player")," ","simulates a React Native environment using the components from"," ",d.default.createElement("a",{target:"_blank",href:"https://github.com/necolas/react-native-web"},"react-native-web"),".")}}]),t}(f.Component),s.defaultProps={},a=c))||a;t.default=g},204:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,s,c,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d=n(0),h=r(d),p=n(9),g=r(p),m=n(7),v={normal:"#D8D8D8",error:"#C92C2C"},y={container:{flex:"0 0 auto",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",borderWidth:1,borderStyle:"solid",borderRadius:3,cursor:"pointer",transition:"border-color 0.2s"},text:{fontSize:13,fontFamily:'proxima-nova, "Helvetica Neue", Helvetica, Arial, sans-serif',padding:"6px 8px",fontWeight:"bold",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",transition:"color 0.2s",userSelect:"none"}},b={};["normal","error"].forEach(function(e){var t=v[e];b[e]={base:(0,m.prefixObject)({container:f({},y.container,{borderColor:t}),text:f({},y.text,{color:t})}),active:(0,m.prefixObject)({container:f({},y.container,{backgroundColor:t,borderColor:t}),text:f({},y.text,{color:"white"})})}});var x=(0,g.default)((c=s=function(e){function t(){i(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.state={hover:!1},e}return l(t,e),u(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.isError,i=t.active,o=t.onChange,l=this.state.hover,a=l?.7:.85,s=b[r?"error":"normal"][i?"active":"base"],c=f({},s.container,{opacity:a});return h.default.createElement("div",{style:c},h.default.createElement("div",{style:s.text,onMouseEnter:function(){return e.setState({hover:!0})},onMouseLeave:function(){return e.setState({hover:!1})},onClick:function(){return o(!i)}},n))}}]),t}(d.Component),s.defaultProps={text:"",active:!1,isError:!1,onChange:function(){}},a=c))||a;t.default=x},205:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,s,c,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d=n(0),h=r(d),p=n(9),g=r(p),m=n(316),v=r(m),y=n(7),b=(0,y.prefixObject)({overlay:{position:"absolute",zIndex:100,overflow:"auto",boxSizing:"border-box",padding:"4px 0",left:0,right:0,bottom:0,height:"30%",borderTop:"1px solid #F8F8F8",background:"rgba(255,255,255,0.98)"},overlayMaximized:{position:"absolute",zIndex:100,overflow:"auto",boxSizing:"border-box",padding:"4px 0",left:0,right:0,bottom:0,height:"100%",background:"rgba(255,255,255,0.98)",borderLeft:"4px solid rgba(238,238,238,1)"},entryRow:{display:"flex",boxSizing:"border-box",boxShadow:"0 -1px 0 0 rgb(240,240,240) inset",padding:"0 7px"},itemSpacer:{width:8}}),x=function(e){return f({},e,{BASE_FONT_SIZE:"13px",TREENODE_FONT_SIZE:"13px",BASE_LINE_HEIGHT:"20px",TREENODE_LINE_HEIGHT:"20px",BASE_BACKGROUND_COLOR:"transparent"})},w=(0,v.default)({loader:function(){return n.e(0).then(n.bind(null,429)).then(function(e){var t=e.default,n=e.chromeLight,r=x(n);return function(e){return h.default.createElement(t,f({},e,{theme:r}))}})},LoadingComponent:function(){return null}}),C=(0,g.default)((c=s=function(e){function t(){var e,n,r,l;i(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.getComputedStyle=function(){var e=r.props,t=e.style,n=e.maximize,i=n?b.overlayMaximized:b.overlay;return t?(0,y.prefix)(f({},i,t)):i},r.getComputedRowStyle=function(){var e=r.props.rowStyle,t=b.entryRow;return e?(0,y.prefix)(f({},t,e)):t},r.renderEntry=function(e){var t=e.data.map(function(e,t){return h.default.createElement(w,{key:t,data:e})}).reduce(function(e,t,n,r){return e.push(t),n!==r.length-1&&e.push(h.default.createElement("div",{key:"s-"+n,style:b.itemSpacer})),e},[]);return h.default.createElement("div",{key:e.id,style:r.getComputedRowStyle()},t)},l=n,o(r,l)}return l(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this.container,t=e.clientHeight,n=e.scrollHeight,r=n-t;this.container.scrollTop=r>0?r:0}},{key:"componentDidUpdate",value:function(){var e=this.container,t=e.clientHeight,n=e.scrollHeight,r=e.scrollTop,i=n-t;i-t<r&&(this.container.scrollTop=i>0?i:0)}},{key:"render",value:function(){var e=this,t=this.props.logs;return h.default.createElement("div",{style:this.getComputedStyle(),ref:function(t){return e.container=t}},t.map(this.renderEntry))}}]),t}(d.Component),s.defaultProps={maximize:!1,logs:[],style:null,rowStyle:null},a=c))||a;t.default=C},206:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,s,c,u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(0),h=r(d),p=n(9),g=r(p),m=n(217),v=n(7);n(423),n(424);var y=(0,v.prefixObject)({editorContainer:{display:"flex",position:"relative",flex:"1",minWidth:0,minHeight:0},editor:{position:"absolute",height:"100%",width:"100%"}}),b={},x=(0,g.default)((c=s=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),f(t,[{key:"componentDidMount",value:function(){var e=this;"undefined"!=typeof navigator&&function(){var t=e.props,r=t.filename,i=t.initialValue,o=t.value,l=t.readOnly,a=t.onChange;(0,m.requireAddons)();var s=n(12);b[r]||(b[r]=new s.Doc(i||o||"",m.options.mode)),e.cm=s(e.refs.editor,u({},m.options,{readOnly:l,value:b[r].linkedDoc({sharedHist:!0})})),e.cm.on("changes",function(e){a(e.getValue())})}()}},{key:"componentWillUnmount",value:function(){if("undefined"!=typeof navigator){var e=this.props.filename,t=n(12),r=this.cm.doc;this.cm.swapDoc(new t.Doc("",m.options.mode)),b[e].unlinkDoc(r)}}},{key:"componentWillUpdate",value:function(e){var t=e.errorLineNumber,n=e.value,r=this.props.errorLineNumber;this.cm&&("number"==typeof r&&this.cm.removeLineClass(r,"background","cm-line-error"),"number"==typeof t&&this.cm.addLineClass(t,"background","cm-line-error"),"string"==typeof n&&n!==this.cm.getValue()&&this.cm.setValue(n))}},{key:"render",value:function(){var e=this.props.readOnly;return h.default.createElement("div",{style:y.editorContainer,className:e&&"read-only"},h.default.createElement("div",{style:y.editor,ref:"editor"}))}}]),t}(d.Component),s.defaultProps={initialValue:null,value:null,onChange:function(){},readOnly:!1},a=c))||a;t.default=x},207:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,s,c,u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(0),h=r(d),p=n(9),g=r(p),m=n(115),v=r(m),y=n(7),b=(0,y.prefixObject)({text:{color:"#FFF",fontSize:13,fontFamily:'proxima-nova, "Helvetica Neue", Helvetica, Arial, sans-serif',padding:"0 20px",display:"flex",alignItems:"center"}}),x=(0,g.default)((c=s=function(e){function t(){var e,n,r,l;i(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.getComputedStyles=function(){var e=r.props.textStyle;return{text:e?(0,y.prefix)(u({},b.text,e)):b.text}},r.toggleFullscreen=function(){return v.default.toggle()},l=n,o(r,l)}return l(t,e),f(t,[{key:"render",value:function(){var e=this.getComputedStyles();return h.default.createElement("div",{style:e.text,onClick:this.toggleFullscreen},"Fullscreen")}}]),t}(d.Component),s.defaultProps={textStyle:null},a=c))||a;t.default=x},208:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,s,c,u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(0),h=r(d),p=n(9),g=r(p),m=n(7),v=(0,m.prefixObject)({container:{flex:"0 0 40px",display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"stretch",backgroundColor:"#3B3738"},text:{color:"#FFF",fontSize:13,fontFamily:'proxima-nova, "Helvetica Neue", Helvetica, Arial, sans-serif',fontWeight:"bold",padding:"0 20px",display:"flex",alignItems:"center"},spacer:{flex:"1 1 auto"}}),y=(0,g.default)((c=s=function(e){function t(){var e,n,r,l;i(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.getComputedStyles=function(){var e=r.props,t=e.textStyle,n=e.headerStyle;return{container:n?(0,m.prefix)(u({},v.container,n)):v.container,text:t?(0,m.prefix)(u({},v.text,t)):v.text}},l=n,o(r,l)}return l(t,e),f(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.text,r=this.getComputedStyles();return h.default.createElement("div",{style:r.container},h.default.createElement("div",{style:r.text},n),h.default.createElement("div",{style:v.spacer}),t)}}]),t}(d.Component),s.defaultProps={text:"",textStyle:null,headerStyle:null},a=c))||a;t.default=y},209:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,s,c,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d=n(0),h=r(d),p=n(9),g=r(p),m=n(7),v={container:{flex:"1",display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"stretch",whiteSpace:"pre-wrap"},text:{color:"rgba(0,0,0,0.5)",fontSize:13,fontFamily:'proxima-nova, "Helvetica Neue", Helvetica, Arial, sans-serif',lineHeight:"20px",padding:"12px"}};v.error=f({},v.text,{color:"#C92C2C"}),v=(0,m.prefixObject)(v);var y=(0,g.default)((c=s=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.isError;return h.default.createElement("div",{style:v.container},h.default.createElement("div",{style:n?v.error:v.text},t))}}]),t}(d.Component),s.defaultProps={children:"",isError:!1},a=c))||a;t.default=y},210:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,s,c,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(0),d=r(f),h=n(9),p=r(h),g=n(7),m=n(214),v=r(m),y=(0,p.default)((c=s=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.width,r=e.device,i=e.scale,o=v.default[r],l=o.deviceImageUrl,a=o.deviceImageWidth,s=o.deviceImageHeight,c=o.screenWidth,u=o.screenHeight,f=n/a,h=f*s,p=(0,g.prefixObject)({container:{width:n,height:h,margin:"0 auto",position:"relative",backgroundImage:"url("+l+")",backgroundSize:"cover"},screen:{position:"absolute",top:(s-u)/2*f,left:(a-c)/2*f,width:c*f,height:u*f,backgroundColor:"white"},overlay:{position:"absolute",top:(s-u)/2*f,left:(a-c)/2*f,width:c*f/i,height:u*f/i,transform:"scale("+i+", "+i+")",transformOrigin:"0 0 0px",display:"flex"}});return d.default.createElement("div",{style:p.container},d.default.createElement("div",{style:p.screen}),d.default.createElement("div",{style:p.overlay},t))}}]),t}(f.Component),s.defaultProps={width:500,device:"ios",scale:1},a=c))||a;t.default=y},211:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,s,c,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(0),d=r(f),h=n(9),p=r(h),g=n(210),m=r(g),v=n(7),y=(0,v.prefixObject)({iframe:{flex:"1 1 auto",minWidth:0,minHeight:0}}),b=(0,p.default)((c=s=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.renderFrame=function(){var e=n.props,t=e.assetRoot,r=e.vendorComponents,i=e.playerStyleSheet,o=e.playerCSS,l=n.state.id;if(!l)return null;var a=encodeURIComponent(JSON.stringify(r)),s=encodeURIComponent(o);return d.default.createElement("iframe",{style:y.iframe,ref:"iframe",frameBorder:0,src:"player.html#id="+l+"&assetRoot="+t+"&vendorComponents="+a+"&styleSheet="+i+"&css="+s})},n.state={id:null},n.status="loading",n.fileMap=null,n.entry=null,n}return l(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this;this.setState({id:Math.random().toString().slice(2)}),window.addEventListener("message",function(t){var n=void 0;try{n=JSON.parse(t.data)}catch(e){return}var r=n,i=r.id,o=r.type,l=r.payload;if(i===e.state.id)switch(o){case"ready":e.status="ready",e.fileMap&&(e.runApplication(e.fileMap,e.entry),e.fileMap=null,e.entry=null);break;case"error":e.props.onError(l);break;case"console":e.props.onConsole(l)}})}},{key:"runApplication",value:function(e,t){switch(this.props.onRun(),this.status){case"loading":this.fileMap=e,this.entry=t;break;case"ready":this.refs.iframe.contentWindow.postMessage({fileMap:e,entry:t},"*")}}},{key:"render",value:function(){var e=this.props,t=e.width,n=e.scale,r=e.platform;return"web"===r?this.renderFrame():d.default.createElement(m.default,{width:t,device:r,scale:n},this.renderFrame())}}]),t}(f.Component),s.defaultProps={platform:"ios",width:300,scale:1,assetRoot:"",vendorComponents:[],playerStyleSheet:"",playerCSS:"",onError:function(){},onRun:function(){},onConsole:function(){}},a=c))||a;t.default=b},212:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,s,c,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d=n(0),h=r(d),p=n(9),g=r(p),m=n(7),v={container:{flex:"0 0 40px",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"white",borderTop:"1px solid #F7F7F7",borderLeft:"4px solid rgba(238,238,238,1)",boxSizing:"border-box",paddingRight:7},text:{color:"#D8D8D8",fontSize:13,fontFamily:'proxima-nova, "Helvetica Neue", Helvetica, Arial, sans-serif',padding:"0 12px",fontWeight:"bold",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",transition:"color 0.2s"}};v.error=f({},v.text,{color:"#C92C2C"}),v=(0,m.prefixObject)(v);var y=(0,g.default)((c=s=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.text,n=e.isError,r=e.children;return h.default.createElement("div",{style:v.container},h.default.createElement("div",{style:n?v.error:v.text},t),r)}}]),t}(d.Component),s.defaultProps={text:"",isError:!1},a=c))||a;t.default=y},213:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,s,c,u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(0),h=r(d),p=n(9),g=r(p),m=n(7),v=n(121),y=r(v),b=(0,m.prefixObject)({container:{flex:"1",display:"flex",flexDirection:"column",alignItems:"stretch",minWidth:0,minHeight:0}}),x=(0,g.default)((c=s=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));n.onClickTab=function(e){var t=n.props.onClickTab;n.setState({activeTab:e}),t(e)},n.renderTab=function(e,t){var r=n.props,i=r.compareTabs,o=r.renderContent,l=r.renderHiddenContent;return i(e,n.state.activeTab)?h.default.createElement("div",{style:b.container},o(e,t)):l?h.default.createElement("div",{style:u({},b.container,{flex:"0"})},o(e,t)):null};var r=e.initialTab;return n.state={activeTab:r},n}return l(t,e),f(t,[{key:"render",value:function(){var e=this.props,t=e.renderRight,n=e.tabs,r=e.titles,i=e.compareTabs,o=e.tabStyle,l=e.textStyle,a=e.textActiveStyle,s=this.state.activeTab;return h.default.createElement("div",{style:b.container},h.default.createElement(y.default,{tabs:n,titles:r,compareTabs:i,activeTab:s,onClickTab:this.onClickTab,tabStyle:o,textStyle:l,activeTextStyle:a},t()),n.map(this.renderTab))}}]),t}(d.Component),s.defaultProps={tabs:[],titles:[],initialTab:null,onClickTab:function(){},renderContent:function(){return null},renderRight:function(){return null},compareTabs:function(e,t){return e===t},renderHiddenContent:!1,tabStyle:null,textStyle:null,textActiveStyle:null},a=c))||a;t.default=x},214:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={ios:{deviceImageUrl:"https://cdn.rawgit.com/koenbok/Framer/master/extras/DeviceResources/iphone-6-silver.png",deviceImageWidth:870,deviceImageHeight:1738,screenWidth:750,screenHeight:1334},android:{deviceImageUrl:"https://cdn.rawgit.com/koenbok/Framer/master/extras/DeviceResources/google-nexus-5x.png",deviceImageWidth:1204,deviceImageHeight:2432,screenWidth:1080,screenHeight:1920}}},215:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var l,a=e[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=n(0),l=r(o),a=n(27),s=r(a),c=n(115),u=r(c),f=n(181),d=r(f),h=n(70),p=n(182),g=r(p),m=n(7),v=n(71);n(72),n(183);var y=(0,m.prefix)({flex:"1 1 auto",display:"flex",alignItems:"stretch",minWidth:0,minHeight:0,overflow:"hidden"}),b=(0,h.getHashString)(),x=b.title,w=void 0===x?"":x,C=b.code,S=void 0===C?g.default:C,k=b.files,L=void 0===k?"[]":k,M=b.entry,T=void 0===M?"index.js":M,O=b.initialTab,E=void 0===O?"index.js":O,A=b.platform,P=void 0===A?"ios":A,N=b.width,W=void 0===N?"210":N,D=b.scale,F=void 0===D?"1":D,I=b.assetRoot,H=void 0===I?"":I,R=b.vendorComponents,j=void 0===R?"[]":R,_=b.styles,z=void 0===_?"{}":_,B=b.fullscreen,U=void 0===B?"false":B,V=b.panes,G=void 0===V?'["editor", "player"]':V,K=b.transpilerTitle,q=void 0===K?"":K,X=b.playerTitle,Y=void 0===X?"":X,$=b.playerStyleSheet,Z=void 0===$?"reset":$,J=b.playerCSS,Q=void 0===J?"":J,ee=b.workspaceCSS,te=void 0===ee?"":ee,ne=b.console,re=void 0===ne?'{"enabled": false, "visible": false, "maximized": false, "collapsible": true}':ne;te&&(0,v.appendCSS)(te);var ie=JSON.parse(L),oe=void 0;ie.length>0?(oe=ie.reduce(function(e,t){var n=i(t,2),r=n[0],o=n[1];return e[r]=o,e},{}),oe.hasOwnProperty(T)||(T=ie[0][0])):oe=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},T,S),oe.hasOwnProperty(E)||(E=T);var le=l.default.createElement("div",{style:y},l.default.createElement(d.default,{title:w,files:oe,entry:T,initialTab:E,platform:P,assetRoot:H,scale:parseFloat(F),width:parseFloat(W),vendorComponents:JSON.parse(j),externalStyles:JSON.parse(z),fullscreen:"true"===U&&u.default.enabled,panes:JSON.parse(G),transpilerTitle:q,playerTitle:Y,playerStyleSheet:Z,playerCSS:Q,onChange:h.setHashString,consoleOptions:JSON.parse(re)})),ae=document.getElementById("react-root");(0,m.prefixAndApply)({display:"flex"},ae),s.default.render(le,ae)},217:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.options={value:"",mode:"jsx",theme:"react",keyMap:"sublime",indentUnit:2,lineNumbers:!0,dragDrop:!1,showCursorWhenSelecting:!0,autoCloseBrackets:!0,matchTags:{bothTags:!0},extraKeys:{Tab:"indentMore","Cmd-/":function(e){e.listSelections().forEach(function(t){e.toggleComment({lineComment:"//"})})}}},t.requireAddons=function(){n(229),n(227),n(122),n(224),n(222),n(221),n(226)}},218:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var l,a=e[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=[["TypeError: Unable to get property 'pos' of undefined or null reference",function(e){return{summary:"This web player isn't supported for your web browser.",description:"Please use the latest Google Chrome, Safari, Firefox, or Internet Explorer to use the React Native Web Player."}}],["TypeError: inst.render is not a function",function(e){return{summary:"Invalid component or undefined render method.",description:"No 'render' method found on the returned component instance: you may have forgotten to define 'render', returned null/false from a stateless component, or tried to render an element whose type is a function that isn't a React component."}}],["Invariant Violation: Element type is invalid",function(e){var t=e.match(/`(.*)`/);return{summary:"The element rendered"+(t?" by "+t[0]+" ":" ")+"is either invalid, or can't run on the web.",description:"Every element must be an instance of a React Class, instantiated either with React.createElement or using a JSX expression like '<MyClass/>'. Additionally, some components aren’t available to the web player, and thus will only run on a real native device or emulator."}}]];t.getErrorDetails=function(e){for(var t=e.split("\n")[0],n=t.match(/\((\d+)/),l={lineNumber:n&&parseInt(n[1])-1,summary:t,description:"The web player encountered an error. When you fix the error, the web player will automatically re-run your code."},a=0;a<o.length;a++){var s=i(o[a],2),c=s[0],u=s[1];if(e.match(c))return r({},l,u(e))}return l}},221:function(e,t,n){!function(e){e(n(12))}(function(e){"use strict";function t(e){var t=e.search(i);return-1==t?0:t}function n(e,t,n){return/\bstring\b/.test(e.getTokenTypeAt(o(t.line,0)))&&!/^[\'\"`]/.test(n)}var r={},i=/[^\s\u00a0]/,o=e.Pos;e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",function(e){e||(e=r);for(var t=this,n=1/0,i=this.listSelections(),l=null,a=i.length-1;a>=0;a--){var s=i[a].from(),c=i[a].to();s.line>=n||(c.line>=n&&(c=o(n,0)),n=s.line,null==l?t.uncomment(s,c,e)?l="un":(t.lineComment(s,c,e),l="line"):"un"==l?t.uncomment(s,c,e):t.lineComment(s,c,e))}}),e.defineExtension("lineComment",function(e,l,a){a||(a=r);var s=this,c=s.getModeAt(e),u=s.getLine(e.line);if(null!=u&&!n(s,e,u)){var f=a.lineComment||c.lineComment;if(!f)return void((a.blockCommentStart||c.blockCommentStart)&&(a.fullLines=!0,s.blockComment(e,l,a)));var d=Math.min(0!=l.ch||l.line==e.line?l.line+1:l.line,s.lastLine()+1),h=null==a.padding?" ":a.padding,p=a.commentBlankLines||e.line==l.line;s.operation(function(){if(a.indent){for(var n=null,r=e.line;r<d;++r){var l=s.getLine(r),c=l.slice(0,t(l));(null==n||n.length>c.length)&&(n=c)}for(var r=e.line;r<d;++r){var l=s.getLine(r),u=n.length;(p||i.test(l))&&(l.slice(0,u)!=n&&(u=t(l)),s.replaceRange(n+f+h,o(r,0),o(r,u)))}}else for(var r=e.line;r<d;++r)(p||i.test(s.getLine(r)))&&s.replaceRange(f+h,o(r,0))})}}),e.defineExtension("blockComment",function(e,t,n){n||(n=r);var l=this,a=l.getModeAt(e),s=n.blockCommentStart||a.blockCommentStart,c=n.blockCommentEnd||a.blockCommentEnd;if(!s||!c)return void((n.lineComment||a.lineComment)&&0!=n.fullLines&&l.lineComment(e,t,n));var u=Math.min(t.line,l.lastLine());u!=e.line&&0==t.ch&&i.test(l.getLine(u))&&--u;var f=null==n.padding?" ":n.padding;e.line>u||l.operation(function(){if(0!=n.fullLines){var r=i.test(l.getLine(u));l.replaceRange(f+c,o(u)),l.replaceRange(s+f,o(e.line,0));var d=n.blockCommentLead||a.blockCommentLead;if(null!=d)for(var h=e.line+1;h<=u;++h)(h!=u||r)&&l.replaceRange(d+f,o(h,0))}else l.replaceRange(c,t),l.replaceRange(s,e)})}),e.defineExtension("uncomment",function(e,t,n){n||(n=r);var l,a=this,s=a.getModeAt(e),c=Math.min(0!=t.ch||t.line==e.line?t.line:t.line-1,a.lastLine()),u=Math.min(e.line,c),f=n.lineComment||s.lineComment,d=[],h=null==n.padding?" ":n.padding;e:if(f){for(var p=u;p<=c;++p){var g=a.getLine(p),m=g.indexOf(f);if(m>-1&&!/comment/.test(a.getTokenTypeAt(o(p,m+1)))&&(m=-1),-1==m&&(p!=c||p==u)&&i.test(g))break e;if(m>-1&&i.test(g.slice(0,m)))break e;d.push(g)}if(a.operation(function(){for(var e=u;e<=c;++e){var t=d[e-u],n=t.indexOf(f),r=n+f.length;n<0||(t.slice(r,r+h.length)==h&&(r+=h.length),l=!0,a.replaceRange("",o(e,n),o(e,r)))}}),l)return!0}var v=n.blockCommentStart||s.blockCommentStart,y=n.blockCommentEnd||s.blockCommentEnd;if(!v||!y)return!1;var b=n.blockCommentLead||s.blockCommentLead,x=a.getLine(u),w=c==u?x:a.getLine(c),C=x.indexOf(v),S=w.lastIndexOf(y);if(-1==S&&u!=c&&(w=a.getLine(--c),S=w.lastIndexOf(y)),-1==C||-1==S||!/comment/.test(a.getTokenTypeAt(o(u,C+1)))||!/comment/.test(a.getTokenTypeAt(o(c,S+1))))return!1;var k=x.lastIndexOf(v,e.ch),L=-1==k?-1:x.slice(0,e.ch).indexOf(y,k+v.length);if(-1!=k&&-1!=L&&L+y.length!=e.ch)return!1;L=w.indexOf(y,t.ch);var M=w.slice(t.ch).lastIndexOf(v,L-t.ch);return k=-1==L||-1==M?-1:t.ch+M,(-1==L||-1==k||k==t.ch)&&(a.operation(function(){a.replaceRange("",o(c,S-(h&&w.slice(S-h.length,S)==h?h.length:0)),o(c,S+y.length));var e=C+v.length;if(h&&x.slice(e,e+h.length)==h&&(e+=h.length),a.replaceRange("",o(u,C),o(u,e)),b)for(var t=u+1;t<=c;++t){var n=a.getLine(t),r=n.indexOf(b);if(-1!=r&&!i.test(n.slice(0,r))){var l=r+b.length;h&&n.slice(l,l+h.length)==h&&(l+=h.length),a.replaceRange("",o(t,r),o(t,l))}}}),!0)})})},222:function(e,t,n){!function(e){e(n(12))}(function(e){function t(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:u[t]}function n(e){var t=e.state.closeBrackets;return t?e.getModeAt(e.getCursor()).closeBrackets||t:null}function r(r){var i=n(r);if(!i||r.getOption("disableInput"))return e.Pass;for(var o=t(i,"pairs"),l=r.listSelections(),a=0;a<l.length;a++){if(!l[a].empty())return e.Pass;var c=s(r,l[a].head);if(!c||o.indexOf(c)%2!=0)return e.Pass}for(var a=l.length-1;a>=0;a--){var u=l[a].head;r.replaceRange("",f(u.line,u.ch-1),f(u.line,u.ch+1),"+delete")}}function i(r){var i=n(r),o=i&&t(i,"explode");if(!o||r.getOption("disableInput"))return e.Pass;for(var l=r.listSelections(),a=0;a<l.length;a++){if(!l[a].empty())return e.Pass;var c=s(r,l[a].head);if(!c||o.indexOf(c)%2!=0)return e.Pass}r.operation(function(){r.replaceSelection("\n\n",null),r.execCommand("goCharLeft"),l=r.listSelections();for(var e=0;e<l.length;e++){var t=l[e].head.line;r.indentLine(t,null,!0),r.indentLine(t+1,null,!0)}})}function o(t){var n=e.cmpPos(t.anchor,t.head)>0;return{anchor:new f(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new f(t.head.line,t.head.ch+(n?1:-1))}}function l(r,i){var l=n(r);if(!l||r.getOption("disableInput"))return e.Pass;var s=t(l,"pairs"),u=s.indexOf(i);if(-1==u)return e.Pass;for(var d,h,p=t(l,"triples"),g=s.charAt(u+1)==i,m=r.listSelections(),v=u%2==0,y=0;y<m.length;y++){var b,x=m[y],w=x.head,h=r.getRange(w,f(w.line,w.ch+1));if(v&&!x.empty())b="surround";else if(!g&&v||h!=i)if(g&&w.ch>1&&p.indexOf(i)>=0&&r.getRange(f(w.line,w.ch-2),w)==i+i&&(w.ch<=2||r.getRange(f(w.line,w.ch-3),f(w.line,w.ch-2))!=i))b="addFour";else if(g){if(e.isWordChar(h)||!c(r,w,i))return e.Pass;b="both"}else{if(!v||r.getLine(w.line).length!=w.ch&&!a(h,s)&&!/\s/.test(h))return e.Pass;b="both"}else b=p.indexOf(i)>=0&&r.getRange(w,f(w.line,w.ch+3))==i+i+i?"skipThree":"skip";if(d){if(d!=b)return e.Pass}else d=b}var C=u%2?s.charAt(u-1):i,S=u%2?i:s.charAt(u+1);r.operation(function(){if("skip"==d)r.execCommand("goCharRight");else if("skipThree"==d)for(var e=0;e<3;e++)r.execCommand("goCharRight");else if("surround"==d){for(var t=r.getSelections(),e=0;e<t.length;e++)t[e]=C+t[e]+S;r.replaceSelections(t,"around"),t=r.listSelections().slice();for(var e=0;e<t.length;e++)t[e]=o(t[e]);r.setSelections(t)}else"both"==d?(r.replaceSelection(C+S,null),r.triggerElectric(C+S),r.execCommand("goCharLeft")):"addFour"==d&&(r.replaceSelection(C+C+C+C,"before"),r.execCommand("goCharRight"))})}function a(e,t){var n=t.lastIndexOf(e);return n>-1&&n%2==1}function s(e,t){var n=e.getRange(f(t.line,t.ch-1),f(t.line,t.ch+1));return 2==n.length?n:null}function c(t,n,r){var i=t.getLine(n.line),o=t.getTokenAt(n);if(/\bstring2?\b/.test(o.type))return!1;var l=new e.StringStream(i.slice(0,n.ch)+r+i.slice(n.ch),4);for(l.pos=l.start=o.start;;){var a=t.getMode().token(l,o.state);if(l.pos>=n.ch+1)return/\bstring2?\b/.test(a);l.start=l.pos}}var u={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},f=e.Pos;e.defineOption("autoCloseBrackets",!1,function(t,n,r){r&&r!=e.Init&&(t.removeKeyMap(h),t.state.closeBrackets=null),n&&(t.state.closeBrackets=n,t.addKeyMap(h))});for(var d=u.pairs+"`",h={Backspace:r,Enter:i},p=0;p<d.length;p++)h["'"+d.charAt(p)+"'"]=function(e){return function(t){return l(t,e)}}(d.charAt(p))})},223:function(e,t,n){!function(e){e(n(12))}(function(e){function t(e,t,r,i){var o=e.getLineHandle(t.line),s=t.ch-1,c=s>=0&&a[o.text.charAt(s)]||a[o.text.charAt(++s)];if(!c)return null;var u=">"==c.charAt(1)?1:-1;if(r&&u>0!=(s==t.ch))return null;var f=e.getTokenTypeAt(l(t.line,s+1)),d=n(e,l(t.line,s+(u>0?1:0)),u,f||null,i);return null==d?null:{from:l(t.line,s),to:d&&d.pos,match:d&&d.ch==c.charAt(0),forward:u>0}}function n(e,t,n,r,i){for(var o=i&&i.maxScanLineLength||1e4,s=i&&i.maxScanLines||1e3,c=[],u=i&&i.bracketRegex?i.bracketRegex:/[(){}[\]]/,f=n>0?Math.min(t.line+s,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-s),d=t.line;d!=f;d+=n){var h=e.getLine(d);if(h){var p=n>0?0:h.length-1,g=n>0?h.length:-1;if(!(h.length>o))for(d==t.line&&(p=t.ch-(n<0?1:0));p!=g;p+=n){var m=h.charAt(p);if(u.test(m)&&(void 0===r||e.getTokenTypeAt(l(d,p+1))==r)){var v=a[m];if(">"==v.charAt(1)==n>0)c.push(m);else{if(!c.length)return{pos:l(d,p),ch:m};c.pop()}}}}}return d-n!=(n>0?e.lastLine():e.firstLine())&&null}function r(e,n,r){for(var i=e.state.matchBrackets.maxHighlightLineLength||1e3,a=[],s=e.listSelections(),c=0;c<s.length;c++){var u=s[c].empty()&&t(e,s[c].head,!1,r);if(u&&e.getLine(u.from.line).length<=i){var f=u.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";a.push(e.markText(u.from,l(u.from.line,u.from.ch+1),{className:f})),u.to&&e.getLine(u.to.line).length<=i&&a.push(e.markText(u.to,l(u.to.line,u.to.ch+1),{className:f}))}}if(a.length){o&&e.state.focused&&e.focus();var d=function(){e.operation(function(){for(var e=0;e<a.length;e++)a[e].clear()})};if(!n)return d;setTimeout(d,800)}}function i(e){e.operation(function(){s&&(s(),s=null),s=r(e,!1,e.state.matchBrackets)})}var o=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),l=e.Pos,a={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},s=null;e.defineOption("matchBrackets",!1,function(t,n,r){r&&r!=e.Init&&t.off("cursorActivity",i),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",i))}),e.defineExtension("matchBrackets",function(){r(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,r){return t(this,e,n,r)}),e.defineExtension("scanForBracket",function(e,t,r,i){return n(this,e,t,r,i)})})},224:function(e,t,n){!function(e){e(n(12),n(122))}(function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function n(n){n.state.failedTagMatch=!1,n.operation(function(){if(t(n),!n.somethingSelected()){var r=n.getCursor(),i=n.getViewport();i.from=Math.min(i.from,r.line),i.to=Math.max(r.line+1,i.to);var o=e.findMatchingTag(n,r,i);if(o){if(n.state.matchBothTags){var l="open"==o.at?o.open:o.close;l&&(n.state.tagHit=n.markText(l.from,l.to,{className:"CodeMirror-matchingtag"}))}var a="close"==o.at?o.open:o.close;a?n.state.tagOther=n.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}):n.state.failedTagMatch=!0}}})}function r(e){e.state.failedTagMatch&&n(e)}e.defineOption("matchTags",!1,function(i,o,l){l&&l!=e.Init&&(i.off("cursorActivity",n),i.off("viewportChange",r),t(i)),o&&(i.state.matchBothTags="object"==typeof o&&o.bothTags,i.on("cursorActivity",n),i.on("viewportChange",r),n(i))}),e.commands.toMatchingTag=function(t){var n=e.findMatchingTag(t,t.getCursor());if(n){var r="close"==n.at?n.open:n.close;r&&t.extendSelection(r.to,r.from)}}})},225:function(e,t,n){!function(e){e(n(12))}(function(e){"use strict";function t(e,t,i,o){if(this.atOccurrence=!1,this.doc=e,null==o&&"string"==typeof t&&(o=!1),i=i?e.clipPos(i):r(0,0),this.pos={from:i,to:i},"string"!=typeof t)t.global||(t=new RegExp(t.source,t.ignoreCase?"ig":"g")),this.matches=function(n,i){if(n){t.lastIndex=0;for(var o,l,a=e.getLine(i.line).slice(0,i.ch),s=0;;){t.lastIndex=s;var c=t.exec(a);if(!c)break;if(o=c,l=o.index,(s=o.index+(o[0].length||1))==a.length)break}var u=o&&o[0].length||0;u||(0==l&&0==a.length?o=void 0:l!=e.getLine(i.line).length&&u++)}else{t.lastIndex=i.ch;var a=e.getLine(i.line),o=t.exec(a),u=o&&o[0].length||0,l=o&&o.index;l+u==a.length||u||(u=1)}if(o&&u)return{from:r(i.line,l),to:r(i.line,l+u),match:o}};else{var l=t;o&&(t=t.toLowerCase());var a=o?function(e){return e.toLowerCase()}:function(e){return e},s=t.split("\n");if(1==s.length)t.length?this.matches=function(i,o){if(i){var s=e.getLine(o.line).slice(0,o.ch),c=a(s),u=c.lastIndexOf(t);if(u>-1)return u=n(s,c,u),{from:r(o.line,u),to:r(o.line,u+l.length)}}else{var s=e.getLine(o.line).slice(o.ch),c=a(s),u=c.indexOf(t);if(u>-1)return u=n(s,c,u)+o.ch,{from:r(o.line,u),to:r(o.line,u+l.length)}}}:this.matches=function(){};else{var c=l.split("\n");this.matches=function(t,n){var i=s.length-1;if(t){if(n.line-(s.length-1)<e.firstLine())return;if(a(e.getLine(n.line).slice(0,c[i].length))!=s[s.length-1])return;for(var o=r(n.line,c[i].length),l=n.line-1,u=i-1;u>=1;--u,--l)if(s[u]!=a(e.getLine(l)))return;var f=e.getLine(l),d=f.length-c[0].length;if(a(f.slice(d))!=s[0])return;return{from:r(l,d),to:o}}if(!(n.line+(s.length-1)>e.lastLine())){var f=e.getLine(n.line),d=f.length-c[0].length;if(a(f.slice(d))==s[0]){for(var h=r(n.line,d),l=n.line+1,u=1;u<i;++u,++l)if(s[u]!=a(e.getLine(l)))return;if(a(e.getLine(l).slice(0,c[i].length))==s[i])return{from:h,to:r(l,c[i].length)}}}}}}}function n(e,t,n){if(e.length==t.length)return n;for(var r=Math.min(n,e.length);;){var i=e.slice(0,r).toLowerCase().length;if(i<n)++r;else{if(!(i>n))return r;--r}}}var r=e.Pos;t.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){function t(e){var t=r(e,0);return n.pos={from:t,to:t},n.atOccurrence=!1,!1}for(var n=this,i=this.doc.clipPos(e?this.pos.from:this.pos.to);;){if(this.pos=this.matches(e,i))return this.atOccurrence=!0,this.pos.match||!0;if(e){if(!i.line)return t(0);i=r(i.line-1,this.doc.getLine(i.line-1).length)}else{var o=this.doc.lineCount();if(i.line==o-1)return t(o);i=r(i.line+1,0)}}},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var i=e.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to,n),this.pos.to=r(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",function(e,n,r){return new t(this.doc,e,n,r)}),e.defineDocExtension("getSearchCursor",function(e,n,r){return new t(this,e,n,r)}),e.defineExtension("selectMatches",function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor("from"),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor("to"))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)})})},226:function(e,t,n){!function(e){e(n(12))}(function(e){"use strict";function t(e){for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],"wrap",o),e.removeLineClass(e.state.activeLines[t],"background",l),e.removeLineClass(e.state.activeLines[t],"gutter",a)}function n(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function r(e,r){for(var i=[],s=0;s<r.length;s++){var c=r[s];if(c.empty()){var u=e.getLineHandleVisualStart(c.head.line);i[i.length-1]!=u&&i.push(u)}}n(e.state.activeLines,i)||e.operation(function(){t(e);for(var n=0;n<i.length;n++)e.addLineClass(i[n],"wrap",o),e.addLineClass(i[n],"background",l),e.addLineClass(i[n],"gutter",a);e.state.activeLines=i})}function i(e,t){r(e,t.ranges)}var o="CodeMirror-activeline",l="CodeMirror-activeline-background",a="CodeMirror-activeline-gutter";e.defineOption("styleActiveLine",!1,function(n,o,l){var a=l&&l!=e.Init;o&&!a?(n.state.activeLines=[],r(n,n.listSelections()),n.on("beforeSelectionChange",i)):!o&&a&&(n.off("beforeSelectionChange",i),t(n),delete n.state.activeLines)})})},227:function(e,t,n){!function(e){e(n(12),n(225),n(223))}(function(e){"use strict";function t(t,n,r){if(r<0&&0==n.ch)return t.clipPos(d(n.line-1));var i=t.getLine(n.line);if(r>0&&n.ch>=i.length)return t.clipPos(d(n.line+1,0));for(var o,l="start",a=n.ch,s=r<0?0:i.length,c=0;a!=s;a+=r,c++){var u=i.charAt(r<0?a-1:a),f="_"!=u&&e.isWordChar(u)?"w":"o";if("w"==f&&u.toUpperCase()==u&&(f="W"),"start"==l)"o"!=f&&(l="in",o=f);else if("in"==l&&o!=f){if("w"==o&&"W"==f&&r<0&&a--,"W"==o&&"w"==f&&r>0){o="w";continue}break}}return d(n.line,a)}function n(e,n){e.extendSelectionsBy(function(r){return e.display.shift||e.doc.extend||r.empty()?t(e.doc,r.head,n):n<0?r.from():r.to()})}function r(t,n){if(t.isReadOnly())return e.Pass;t.operation(function(){for(var e=t.listSelections().length,r=[],i=-1,o=0;o<e;o++){var l=t.listSelections()[o].head;if(!(l.line<=i)){var a=d(l.line+(n?0:1),0);t.replaceRange("\n",a,null,"+insertLine"),t.indentLine(a.line,null,!0),r.push({head:a,anchor:a}),i=l.line+1}}t.setSelections(r)}),t.execCommand("indentAuto")}function i(t,n){for(var r=n.ch,i=r,o=t.getLine(n.line);r&&e.isWordChar(o.charAt(r-1));)--r;for(;i<o.length&&e.isWordChar(o.charAt(i));)++i;return{from:d(n.line,r),to:d(n.line,i),word:o.slice(r,i)}}function o(e){var t=e.getCursor(),n=e.scanForBracket(t,-1);if(n)for(;;){var r=e.scanForBracket(t,1);if(!r)return;if(r.ch==m.charAt(m.indexOf(n.ch)+1))return e.setSelection(d(n.pos.line,n.pos.ch+1),r.pos,!1),!0;t=d(r.pos.line,r.pos.ch+1)}}function l(t,n){if(t.isReadOnly())return e.Pass;for(var r,i=t.listSelections(),o=[],l=0;l<i.length;l++){var a=i[l];if(!a.empty()){for(var s=a.from().line,c=a.to().line;l<i.length-1&&i[l+1].from().line==c;)c=a[++l].to().line;o.push(s,c)}}o.length?r=!0:o.push(t.firstLine(),t.lastLine()),t.operation(function(){for(var e=[],i=0;i<o.length;i+=2){var l=o[i],a=o[i+1],s=d(l,0),c=d(a),u=t.getRange(s,c,!1);n?u.sort():u.sort(function(e,t){var n=e.toUpperCase(),r=t.toUpperCase();return n!=r&&(e=n,t=r),e<t?-1:e==t?0:1}),t.replaceRange(u,s,c),r&&e.push({anchor:s,head:c})}r&&t.setSelections(e,0)})}function a(t,n){t.operation(function(){for(var r=t.listSelections(),o=[],l=[],a=0;a<r.length;a++){var s=r[a];s.empty()?(o.push(a),l.push("")):l.push(n(t.getRange(s.from(),s.to())))}t.replaceSelections(l,"around","case");for(var c,a=o.length-1;a>=0;a--){var s=r[o[a]];if(!(c&&e.cmpPos(s.head,c)>0)){var u=i(t,s.head);c=u.from,t.replaceRange(n(u.word),u.from,u.to)}}})}function s(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var o=i(t,n);if(!o.word)return;n=o.from,r=o.to}return{from:n,to:r,query:t.getRange(n,r),word:o}}function c(e,t){var n=s(e);if(n){var r=n.query,i=e.getSearchCursor(r,t?n.to:n.from);(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):(i=e.getSearchCursor(r,t?d(e.firstLine(),0):e.clipPos(d(e.lastLine()))),(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):n.word&&e.setSelection(n.from,n.to))}}var u=e.keyMap.sublime={fallthrough:"default"},f=e.commands,d=e.Pos,h=e.keyMap.default==e.keyMap.macDefault,p=h?"Cmd-":"Ctrl-";f[u["Alt-Left"]="goSubwordLeft"]=function(e){n(e,-1)},f[u["Alt-Right"]="goSubwordRight"]=function(e){n(e,1)},h&&(u["Cmd-Left"]="goLineStartSmart");var g=h?"Ctrl-Alt-":"Ctrl-";f[u[g+"Up"]="scrollLineUp"]=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},f[u[g+"Down"]="scrollLineDown"]=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},f[u["Shift-"+p+"L"]="splitSelectionByLine"]=function(e){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)for(var i=t[r].from(),o=t[r].to(),l=i.line;l<=o.line;++l)o.line>i.line&&l==o.line&&0==o.ch||n.push({anchor:l==i.line?i:d(l,0),head:l==o.line?o:d(l)});e.setSelections(n,0)},u["Shift-Tab"]="indentLess",f[u.Esc="singleSelectionTop"]=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},f[u[p+"L"]="selectLine"]=function(e){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){var i=t[r];n.push({anchor:d(i.from().line,0),head:d(i.to().line+1,0)})}e.setSelections(n)},u["Shift-Ctrl-K"]="deleteLine",f[u[p+"Enter"]="insertLineAfter"]=function(e){return r(e,!1)},f[u["Shift-"+p+"Enter"]="insertLineBefore"]=function(e){return r(e,!0)},f[u[p+"D"]="selectNextOccurrence"]=function(t){var n=t.getCursor("from"),r=t.getCursor("to"),o=t.state.sublimeFindFullWord==t.doc.sel;if(0==e.cmpPos(n,r)){var l=i(t,n);if(!l.word)return;t.setSelection(l.from,l.to),o=!0}else{var a=t.getRange(n,r),s=o?new RegExp("\\b"+a+"\\b"):a,c=t.getSearchCursor(s,r);c.findNext()?t.addSelection(c.from(),c.to()):(c=t.getSearchCursor(s,d(t.firstLine(),0)),c.findNext()&&t.addSelection(c.from(),c.to()))}o&&(t.state.sublimeFindFullWord=t.doc.sel)};var m="(){}[]";f[u["Shift-"+p+"Space"]="selectScope"]=function(e){o(e)||e.execCommand("selectAll")},f[u["Shift-"+p+"M"]="selectBetweenBrackets"]=function(t){if(!o(t))return e.Pass},f[u[p+"M"]="goToBracket"]=function(t){t.extendSelectionsBy(function(n){var r=t.scanForBracket(n.head,1);if(r&&0!=e.cmpPos(r.pos,n.head))return r.pos;var i=t.scanForBracket(n.head,-1);return i&&d(i.pos.line,i.pos.ch+1)||n.head})};var v=h?"Cmd-Ctrl-":"Shift-Ctrl-";f[u[v+"Up"]="swapLineUp"]=function(t){if(t.isReadOnly())return e.Pass;for(var n=t.listSelections(),r=[],i=t.firstLine()-1,o=[],l=0;l<n.length;l++){var a=n[l],s=a.from().line-1,c=a.to().line;o.push({anchor:d(a.anchor.line-1,a.anchor.ch),head:d(a.head.line-1,a.head.ch)}),0!=a.to().ch||a.empty()||--c,s>i?r.push(s,c):r.length&&(r[r.length-1]=c),i=c}t.operation(function(){for(var e=0;e<r.length;e+=2){var n=r[e],i=r[e+1],l=t.getLine(n);t.replaceRange("",d(n,0),d(n+1,0),"+swapLine"),i>t.lastLine()?t.replaceRange("\n"+l,d(t.lastLine()),null,"+swapLine"):t.replaceRange(l+"\n",d(i,0),null,"+swapLine")}t.setSelections(o),t.scrollIntoView()})},f[u[v+"Down"]="swapLineDown"]=function(t){if(t.isReadOnly())return e.Pass;for(var n=t.listSelections(),r=[],i=t.lastLine()+1,o=n.length-1;o>=0;o--){var l=n[o],a=l.to().line+1,s=l.from().line;0!=l.to().ch||l.empty()||a--,a<i?r.push(a,s):r.length&&(r[r.length-1]=s),i=s}t.operation(function(){for(var e=r.length-2;e>=0;e-=2){var n=r[e],i=r[e+1],o=t.getLine(n);n==t.lastLine()?t.replaceRange("",d(n-1),d(n),"+swapLine"):t.replaceRange("",d(n,0),d(n+1,0),"+swapLine"),t.replaceRange(o+"\n",d(i,0),null,"+swapLine")}t.scrollIntoView()})},f[u[p+"/"]="toggleCommentIndented"]=function(e){e.toggleComment({indent:!0})},f[u[p+"J"]="joinLines"]=function(e){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){for(var i=t[r],o=i.from(),l=o.line,a=i.to().line;r<t.length-1&&t[r+1].from().line==a;)a=t[++r].to().line;n.push({start:l,end:a,anchor:!i.empty()&&o})}e.operation(function(){for(var t=0,r=[],i=0;i<n.length;i++){for(var o,l=n[i],a=l.anchor&&d(l.anchor.line-t,l.anchor.ch),s=l.start;s<=l.end;s++){var c=s-t;s==l.end&&(o=d(c,e.getLine(c).length+1)),c<e.lastLine()&&(e.replaceRange(" ",d(c),d(c+1,/^\s*/.exec(e.getLine(c+1))[0].length)),++t)}r.push({anchor:a||o,head:o})}e.setSelections(r,0)})},f[u["Shift-"+p+"D"]="duplicateLine"]=function(e){e.operation(function(){for(var t=e.listSelections().length,n=0;n<t;n++){var r=e.listSelections()[n];r.empty()?e.replaceRange(e.getLine(r.head.line)+"\n",d(r.head.line,0)):e.replaceRange(e.getRange(r.from(),r.to()),r.from())}e.scrollIntoView()})},u[p+"T"]="transposeChars",f[u.F9="sortLines"]=function(e){l(e,!0)},f[u[p+"F9"]="sortLinesInsensitive"]=function(e){l(e,!1)},f[u.F2="nextBookmark"]=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){var n=t.shift(),r=n.find();if(r)return t.push(n),e.setSelection(r.from,r.to)}},f[u["Shift-F2"]="prevBookmark"]=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){t.unshift(t.pop());var n=t[t.length-1].find();if(n)return e.setSelection(n.from,n.to);t.pop()}},f[u[p+"F2"]="toggleBookmark"]=function(e){for(var t=e.listSelections(),n=e.state.sublimeBookmarks||(e.state.sublimeBookmarks=[]),r=0;r<t.length;r++){for(var i=t[r].from(),o=t[r].to(),l=e.findMarks(i,o),a=0;a<l.length;a++)if(l[a].sublimeBookmark){l[a].clear();for(var s=0;s<n.length;s++)n[s]==l[a]&&n.splice(s--,1);break}a==l.length&&n.push(e.markText(i,o,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},f[u["Shift-"+p+"F2"]="clearBookmarks"]=function(e){var t=e.state.sublimeBookmarks;if(t)for(var n=0;n<t.length;n++)t[n].clear();t.length=0},f[u["Alt-F2"]="selectBookmarks"]=function(e){var t=e.state.sublimeBookmarks,n=[];if(t)for(var r=0;r<t.length;r++){var i=t[r].find();i?n.push({anchor:i.from,head:i.to}):t.splice(r--,0)}n.length&&e.setSelections(n,0)},u["Alt-Q"]="wrapLines";var y=p+"K ";u[y+p+"Backspace"]="delLineLeft",f[u.Backspace="smartBackspace"]=function(t){if(t.somethingSelected())return e.Pass;var n=t.getCursor(),r=t.getRange({line:n.line,ch:0},n),i=e.countColumn(r,null,t.getOption("tabSize")),o=t.getOption("indentUnit");if(r&&!/\S/.test(r)&&i%o==0){var l=new d(n.line,e.findColumn(r,i-o,o));return l.ch==n.ch?e.Pass:t.replaceRange("",l,n,"+delete")}return e.Pass},f[u[y+p+"K"]="delLineRight"]=function(e){e.operation(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange("",t[n].anchor,d(t[n].to().line),"+delete");e.scrollIntoView()})},f[u[y+p+"U"]="upcaseAtCursor"]=function(e){a(e,function(e){return e.toUpperCase()})},f[u[y+p+"L"]="downcaseAtCursor"]=function(e){a(e,function(e){return e.toLowerCase()})},f[u[y+p+"Space"]="setSublimeMark"]=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},f[u[y+p+"A"]="selectToSublimeMark"]=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},f[u[y+p+"W"]="deleteToSublimeMark"]=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),i=n;if(e.cmpPos(r,i)>0){var o=i;i=r,r=o}t.state.sublimeKilled=t.getRange(r,i),t.replaceRange("",r,i)}},f[u[y+p+"X"]="swapWithSublimeMark"]=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},f[u[y+p+"Y"]="sublimeYank"]=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},u[y+p+"G"]="clearBookmarks",f[u[y+p+"C"]="showInCenter"]=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},f[u["Shift-Alt-Up"]="selectLinesUpward"]=function(e){e.operation(function(){for(var t=e.listSelections(),n=0;n<t.length;n++){var r=t[n];r.head.line>e.firstLine()&&e.addSelection(d(r.head.line-1,r.head.ch))}})},f[u["Shift-Alt-Down"]="selectLinesDownward"]=function(e){e.operation(function(){for(var t=e.listSelections(),n=0;n<t.length;n++){var r=t[n];r.head.line<e.lastLine()&&e.addSelection(d(r.head.line+1,r.head.ch))}})},f[u[p+"F3"]="findUnder"]=function(e){c(e,!0)},f[u["Shift-"+p+"F3"]="findUnderPrevious"]=function(e){c(e,!1)},f[u["Alt-F3"]="findAllUnder"]=function(e){var t=s(e);if(t){for(var n=e.getSearchCursor(t.query),r=[],i=-1;n.findNext();)r.push({anchor:n.from(),head:n.to()}),n.from().line<=t.from.line&&n.from().ch<=t.from.ch&&i++;e.setSelections(r,i)}},u["Shift-"+p+"["]="fold",u["Shift-"+p+"]"]="unfold",u[y+p+"0"]=u[y+p+"j"]="unfoldAll",u[p+"I"]="findIncremental",u["Shift-"+p+"I"]="findIncrementalReverse",u[p+"H"]="replace",u.F3="findNext",u["Shift-F3"]="findPrev",e.normalizeKeyMap(u)})},228:function(e,t,n){!function(e){e(n(12))}(function(e){"use strict";function t(e,t,n){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}e.defineMode("javascript",function(n,r){function i(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function o(e,t,n){return we=e,Ce=n,t}function l(e,n){var r=e.next();if('"'==r||"'"==r)return n.tokenize=a(r),n.tokenize(e,n);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==r&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return o(r);if("="==r&&e.eat(">"))return o("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),o("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),o("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),o("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),o("number","number");if("/"==r)return e.eat("*")?(n.tokenize=s,s(e,n)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):t(e,n,1)?(i(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),o("regexp","string-2")):(e.eatWhile(Ae),o("operator","operator",e.current()));if("`"==r)return n.tokenize=c,c(e,n);if("#"==r)return e.skipToEnd(),o("error","error");if(Ae.test(r))return e.eatWhile(Ae),o("operator","operator",e.current());if(Oe.test(r)){e.eatWhile(Oe);var l=e.current(),u=Ee.propertyIsEnumerable(l)&&Ee[l];return u&&"."!=n.lastType?o(u.type,u.style,l):o("variable","variable",l)}}function a(e){return function(t,n){var r,i=!1;if(Le&&"@"==t.peek()&&t.match(Pe))return n.tokenize=l,o("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||i);)i=!i&&"\\"==r;return i||(n.tokenize=l),o("string","string")}}function s(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=l;break}r="*"==n}return o("comment","comment")}function c(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=l;break}r=!r&&"\\"==n}return o("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){for(var r=0,i=!1,o=n-1;o>=0;--o){var l=e.string.charAt(o),a=Ne.indexOf(l);if(a>=0&&a<3){if(!r){++o;break}if(0==--r)break}else if(a>=3&&a<6)++r;else if(Oe.test(l))i=!0;else{if(/["'\/]/.test(l))return;if(i&&!r){++o;break}}}i&&!r&&(t.fatArrowAt=o)}}function f(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function d(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function h(e,t,n,r,i){var o=e.cc;for(De.state=e,De.stream=i,De.marked=null,De.cc=o,De.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((o.length?o.pop():Me?S:C)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return De.marked?De.marked:"variable"==n&&d(e,r)?"variable-2":t}}}function p(){for(var e=arguments.length-1;e>=0;e--)De.cc.push(arguments[e])}function g(){return p.apply(null,arguments),!0}function m(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var n=De.state;if(De.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function v(){De.state.context={prev:De.state.context,vars:De.state.localVars},De.state.localVars=Fe}function y(){De.state.localVars=De.state.context.vars,De.state.context=De.state.context.prev}function b(e,t){var n=function(){var n=De.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new f(r,De.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function x(){var e=De.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(n){return n==e?g():";"==e?p():g(t)}return t}function C(e,t){return"var"==e?g(b("vardef",t.length),X,w(";"),x):"keyword a"==e?g(b("form"),S,C,x):"keyword b"==e?g(b("form"),C,x):"{"==e?g(b("}"),V,x):";"==e?g():"if"==e?("else"==De.state.lexical.info&&De.state.cc[De.state.cc.length-1]==x&&De.state.cc.pop()(),g(b("form"),S,C,x,Q)):"function"==e?g(oe):"for"==e?g(b("form"),ee,C,x):"variable"==e?g(b("stat"),H):"switch"==e?g(b("form"),S,b("}","switch"),w("{"),V,x,x):"case"==e?g(S,w(":")):"default"==e?g(w(":")):"catch"==e?g(b("form"),v,w("("),le,w(")"),C,x,y):"export"==e?g(b("stat"),de,x):"import"==e?g(b("stat"),he,x):"module"==e?g(b("form"),Y,b("}"),w("{"),V,x,x):p(b("stat"),S,w(";"),x)}function S(e){return L(e,!1)}function k(e){return L(e,!0)}function L(e,t){if(De.state.fatArrowAt==De.stream.start){var n=t?W:N;if("("==e)return g(v,b(")"),B(Y,")"),x,w("=>"),n,y);if("variable"==e)return p(v,Y,w("=>"),n,y)}var r=t?E:O;return We.hasOwnProperty(e)?g(r):"class"==e?g(b("form"),ae,x):"function"==e?g(oe,r):"keyword c"==e?g(t?T:M):"("==e?g(b(")"),M,be,w(")"),x,r):"operator"==e||"spread"==e?g(t?k:S):"["==e?g(b("]"),ve,x,r):"{"==e?U(j,"}",null,r):"quasi"==e?p(A,r):"new"==e?g(D(t)):g()}function M(e){return e.match(/[;\}\)\],]/)?p():p(S)}function T(e){return e.match(/[;\}\)\],]/)?p():p(k)}function O(e,t){return","==e?g(S):E(e,t,!1)}function E(e,t,n){var r=0==n?O:E,i=0==n?S:k;return"=>"==e?g(v,n?W:N,y):"operator"==e?/\+\+|--/.test(t)?g(r):"?"==t?g(S,w(":"),i):g(i):"quasi"==e?p(A,r):";"!=e?"("==e?U(k,")","call",r):"."==e?g(R,r):"["==e?g(b("]"),M,w("]"),x,r):void 0:void 0}function A(e,t){return"quasi"!=e?p():"${"!=t.slice(t.length-2)?g(A):g(S,P)}function P(e){if("}"==e)return De.marked="string-2",De.state.tokenize=c,g(A)}function N(e){return u(De.stream,De.state),p("{"==e?C:S)}function W(e){return u(De.stream,De.state),p("{"==e?C:k)}function D(e){return function(t){return"."==t?g(e?I:F):p(e?k:S)}}function F(e,t){if("target"==t)return De.marked="keyword",g(O)}function I(e,t){if("target"==t)return De.marked="keyword",g(E)}function H(e){return":"==e?g(x,C):p(O,w(";"),x)}function R(e){if("variable"==e)return De.marked="property",g()}function j(e,t){return"variable"==e||"keyword"==De.style?(De.marked="property",g("get"==t||"set"==t?_:z)):"number"==e||"string"==e?(De.marked=Le?"property":De.style+" property",g(z)):"jsonld-keyword"==e?g(z):"modifier"==e?g(j):"["==e?g(S,w("]"),z):"spread"==e?g(S):void 0}function _(e){return"variable"!=e?p(z):(De.marked="property",g(oe))}function z(e){return":"==e?g(k):"("==e?p(oe):void 0}function B(e,t){function n(r){if(","==r){var i=De.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),g(e,n)}return r==t?g():g(w(t))}return function(r){return r==t?g():p(e,n)}}function U(e,t,n){for(var r=3;r<arguments.length;r++)De.cc.push(arguments[r]);return g(b(t,n),B(e,t),x)}function V(e){return"}"==e?g():p(C,V)}function G(e){if(Te&&":"==e)return g(q)}function K(e,t){if("="==t)return g(k)}function q(e){if("variable"==e)return De.marked="variable-3",g()}function X(){return p(Y,G,Z,J)}function Y(e,t){return"modifier"==e?g(Y):"variable"==e?(m(t),g()):"spread"==e?g(Y):"["==e?U(Y,"]"):"{"==e?U($,"}"):void 0}function $(e,t){return"variable"!=e||De.stream.match(/^\s*:/,!1)?("variable"==e&&(De.marked="property"),"spread"==e?g(Y):"}"==e?p():g(w(":"),Y,Z)):(m(t),g(Z))}function Z(e,t){if("="==t)return g(k)}function J(e){if(","==e)return g(X)}function Q(e,t){if("keyword b"==e&&"else"==t)return g(b("form","else"),C,x)}function ee(e){if("("==e)return g(b(")"),te,w(")"),x)}function te(e){return"var"==e?g(X,w(";"),re):";"==e?g(re):"variable"==e?g(ne):p(S,w(";"),re)}function ne(e,t){return"in"==t||"of"==t?(De.marked="keyword",g(S)):g(O,re)}function re(e,t){return";"==e?g(ie):"in"==t||"of"==t?(De.marked="keyword",g(S)):p(S,w(";"),ie)}function ie(e){")"!=e&&g(S)}function oe(e,t){return"*"==t?(De.marked="keyword",g(oe)):"variable"==e?(m(t),g(oe)):"("==e?g(v,b(")"),B(le,")"),x,C,y):void 0}function le(e){return"spread"==e?g(le):p(Y,G,K)}function ae(e,t){return"variable"==e?(m(t),g(se)):p(se)}function se(e,t){return"extends"==t?g(S,se):"{"==e?g(b("}"),ce,x):void 0}function ce(e,t){return"variable"==e||"keyword"==De.style?"static"==t?(De.marked="keyword",g(ce)):(De.marked="property","get"==t||"set"==t?g(ue,oe,ce):g(fe,ce)):"*"==t?(De.marked="keyword",g(ce)):";"==e?g(ce):"}"==e?g():void 0}function ue(e){return"variable"!=e?p():(De.marked="property",g())}function fe(e,t){return"="==t?g(k):p(oe)}function de(e,t){return"*"==t?(De.marked="keyword",g(me,w(";"))):"default"==t?(De.marked="keyword",g(S,w(";"))):p(C)}function he(e){return"string"==e?g():p(pe,me)}function pe(e,t){return"{"==e?U(pe,"}"):"}"==e?p():("variable"==e&&m(t),"*"==t&&(De.marked="keyword"),g(ge))}function ge(e,t){if("as"==t)return De.marked="keyword",g(pe)}function me(e,t){return","==e?g(pe):"from"==t?(De.marked="keyword",g(S)):void 0}function ve(e){return"]"==e?g():p(k,ye)}function ye(e){return"for"==e?p(be,w("]")):","==e?g(B(T,"]")):p(B(k,"]"))}function be(e){return"for"==e?g(ee,be):"if"==e?g(S,be):void 0}function xe(e,t){return"operator"==e.lastType||","==e.lastType||Ae.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}var we,Ce,Se=n.indentUnit,ke=r.statementIndent,Le=r.jsonld,Me=r.json||Le,Te=r.typescript,Oe=r.wordCharacters||/[\w$\xa1-\uffff]/,Ee=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},l={if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:r,break:r,continue:r,new:e("new"),delete:r,throw:r,debugger:r,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:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r};if(Te){var a={type:"variable",style:"variable-3"},s={interface:e("class"),implements:r,namespace:r,module:e("module"),enum:e("module"),public:e("modifier"),private:e("modifier"),protected:e("modifier"),abstract:e("modifier"),as:i,string:a,number:a,boolean:a,any:a};for(var c in s)l[c]=s[c]}return l}(),Ae=/[+\-*&%=<>!?|~^]/,Pe=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ne="([{}])",We={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},De={state:null,column:null,marked:null,cc:null},Fe={name:"this",next:{name:"arguments"}};return x.lex=!0,{startState:function(e){var t={tokenize:l,lastType:"sof",cc:[],lexical:new f((e||0)-Se,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return 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(),u(e,t)),t.tokenize!=s&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==we?n:(t.lastType="operator"!=we||"++"!=Ce&&"--"!=Ce?we:"incdec",h(t,n,we,Ce,e))},indent:function(t,n){if(t.tokenize==s)return e.Pass;if(t.tokenize!=l)return 0;var i=n&&n.charAt(0),o=t.lexical;if(!/^\s*else\b/.test(n))for(var a=t.cc.length-1;a>=0;--a){var c=t.cc[a];if(c==x)o=o.prev;else if(c!=Q)break}"stat"==o.type&&"}"==i&&(o=o.prev),ke&&")"==o.type&&"stat"==o.prev.type&&(o=o.prev);var u=o.type,f=i==u;return"vardef"==u?o.indented+("operator"==t.lastType||","==t.lastType?o.info+1:0):"form"==u&&"{"==i?o.indented:"form"==u?o.indented+Se:"stat"==u?o.indented+(xe(t,n)?ke||Se:0):"switch"!=o.info||f||0==r.doubleIndentSwitch?o.align?o.column+(f?0:1):o.indented+(f?0:Se):o.indented+(/^(?:case|default)\b/.test(n)?Se:2*Se)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Me?null:"/*",blockCommentEnd:Me?null:"*/",lineComment:Me?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Me?"json":"javascript",jsonldMode:Le,jsonMode:Me,expressionAllowed:t,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=S&&t!=k||e.cc.pop()},expectExpression:function(e){e.cc.push(k)}}}),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/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},229:function(e,t,n){!function(e){e(n(12),n(230),n(228))}(function(e){"use strict";function t(e,t,n,r){this.state=e,this.mode=t,this.depth=n,this.prev=r}function n(r){return new t(e.copyState(r.mode,r.state),r.mode,r.depth,r.prev&&n(r.prev))}e.defineMode("jsx",function(r,i){function o(e){var t=e.tagName;e.tagName=null;var n=c.indent(e,"");return e.tagName=t,n}function l(e,t){return t.context.mode==c?a(e,t,t.context):s(e,t,t.context)}function a(n,i,a){if(2==a.depth)return n.match(/^.*?\*\//)?a.depth=1:n.skipToEnd(),"comment";if("{"==n.peek()){c.skipAttribute(a.state);var s=o(a.state),f=a.state.context;if(f&&n.match(/^[^>]*>\s*$/,!1)){for(;f.prev&&!f.startOfLine;)f=f.prev;f.startOfLine?s-=r.indentUnit:a.prev.state.lexical&&(s=a.prev.state.lexical.indented)}else 1==a.depth&&(s+=r.indentUnit);return n.next(),i.context=new t(e.startState(u,s),u,1,i.context),u.expectExpression(i.context.state),null}if(1==a.depth){if("<"==n.peek())return c.skipAttribute(a.state),i.context=new t(e.startState(c,o(a.state)),c,0,i.context),null;if(n.match("//"))return n.skipToEnd(),"comment";if(n.match("/*"))return a.depth=2,l(n,i);if(n.eat("}"))return null}var d,h=c.token(n,a.state),p=n.current();return/\btag\b/.test(h)?/>$/.test(p)?a.state.context?a.depth=0:i.context=i.context.prev:/^</.test(p)&&(a.depth=1):!h&&(d=p.indexOf("{"))>-1&&n.backUp(p.length-d),h}function s(n,r,i){if("<"==n.peek()&&u.expressionAllowed(n,i.state))return u.skipExpression(i.state),r.context=new t(e.startState(c,u.indent(i.state,"")),c,0,r.context),null;var o=u.token(n,i.state);if(!o&&null!=i.depth){var l=n.current();if("{"==l)i.depth++;else if("}"==l&&0==--i.depth)return r.context=r.context.prev,n.backUp(1),null}return o}var c=e.getMode(r,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1}),u=e.getMode(r,i&&i.base||"javascript");return{startState:function(){return{context:new t(e.startState(u),u)}},copyState:function(e){return{context:n(e.context)}},token:l,indent:function(e,t,n){return e.context.mode.indent(e.context.state,t,n)},innerMode:function(e){return e.context}}},"xml","javascript"),e.defineMIME("text/jsx","jsx")})},230:function(e,t,n){!function(e){e(n(12))}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(r,i){function o(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();if("<"==r)return e.eat("!")?e.eat("[")?e.match("CDATA[")?n(s("atom","]]>")):null:e.match("--")?n(s("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(M=e.eat("/")?"closeTag":"openTag",t.tokenize=l,"tag bracket");if("&"==r){var i;return i=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),i?"atom":"error"}return e.eatWhile(/[^&<]/),null}function l(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=o,M=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return M="equals",null;if("<"==n){t.tokenize=o,t.state=h,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=a(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=l;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=o;break}n.next()}return e}}function c(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=c(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=o;break}return n.tokenize=c(e-1),n.tokenize(t,n)}}return"meta"}}function u(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(S.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function f(e){e.context&&(e.context=e.context.prev)}function d(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!S.contextGrabbers.hasOwnProperty(n)||!S.contextGrabbers[n].hasOwnProperty(t))return;f(e)}}function h(e,t,n){return"openTag"==e?(n.tagStart=t.column(),p):"closeTag"==e?g:h}function p(e,t,n){return"word"==e?(n.tagName=t.current(),T="tag",y):(T="error",p)}function g(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&S.implicitlyClosed.hasOwnProperty(n.context.tagName)&&f(n),n.context&&n.context.tagName==r||!1===S.matchClosing?(T="tag",m):(T="tag error",v)}return T="error",v}function m(e,t,n){return"endTag"!=e?(T="error",m):(f(n),h)}function v(e,t,n){return T="error",m(e,t,n)}function y(e,t,n){if("word"==e)return T="attribute",b;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||S.autoSelfClosers.hasOwnProperty(r)?d(n,r):(d(n,r),n.context=new u(n,r,i==n.indented)),h}return T="error",y}function b(e,t,n){return"equals"==e?x:(S.allowMissing||(T="error"),y(e,t,n))}function x(e,t,n){return"string"==e?w:"word"==e&&S.allowUnquoted?(T="string",y):(T="error",y(e,t,n))}function w(e,t,n){return"string"==e?w:y(e,t,n)}var C=r.indentUnit,S={},k=i.htmlMode?t:n;for(var L in k)S[L]=k[L];for(var L in i)S[L]=i[L];var M,T;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:h,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;M=null;var n=t.tokenize(e,t);return(n||M)&&"comment"!=n&&(T=null,t.state=t.state(M||n,e,t),T&&(n="error"==T?n+" error":T)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+C;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=l&&t.tokenize!=o)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==S.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+C*(S.multilineTagIndentFactor||1);if(S.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var a=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(a&&a[1])for(;i;){if(i.tagName==a[2]){i=i.prev;break}if(!S.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(a)for(;i;){var s=S.contextGrabbers[i.tagName];if(!s||!s.hasOwnProperty(a[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+C: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==x&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},231:function(e,t,n){t=e.exports=n(39)(),t.push([e.i,"/* BASICS */\n\n.CodeMirror {\n /* Set height, width, borders, and global font properties here */\n font-family: monospace;\n height: 300px;\n color: black;\n}\n\n/* PADDING */\n\n.CodeMirror-lines {\n padding: 4px 0; /* Vertical padding around content */\n}\n.CodeMirror pre {\n padding: 0 4px; /* Horizontal padding of content */\n}\n\n.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n background-color: white; /* The little square between H and V scrollbars */\n}\n\n/* GUTTER */\n\n.CodeMirror-gutters {\n border-right: 1px solid #ddd;\n background-color: #f7f7f7;\n white-space: nowrap;\n}\n.CodeMirror-linenumbers {}\n.CodeMirror-linenumber {\n padding: 0 3px 0 5px;\n min-width: 20px;\n text-align: right;\n color: #999;\n white-space: nowrap;\n}\n\n.CodeMirror-guttermarker { color: black; }\n.CodeMirror-guttermarker-subtle { color: #999; }\n\n/* CURSOR */\n\n.CodeMirror-cursor {\n border-left: 1px solid black;\n border-right: none;\n width: 0;\n}\n/* Shown when moving in bi-directional text */\n.CodeMirror div.CodeMirror-secondarycursor {\n border-left: 1px solid silver;\n}\n.cm-fat-cursor .CodeMirror-cursor {\n width: auto;\n border: 0;\n background: #7e7;\n}\n.cm-fat-cursor div.CodeMirror-cursors {\n z-index: 1;\n}\n\n.cm-animate-fat-cursor {\n width: auto;\n border: 0;\n -webkit-animation: blink 1.06s steps(1) infinite;\n -moz-animation: blink 1.06s steps(1) infinite;\n animation: blink 1.06s steps(1) infinite;\n background-color: #7e7;\n}\n@-moz-keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n@-webkit-keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n@keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n\n/* Can style cursor different in overwrite (non-insert) mode */\n.CodeMirror-overwrite .CodeMirror-cursor {}\n\n.cm-tab { display: inline-block; text-decoration: inherit; }\n\n.CodeMirror-ruler {\n border-left: 1px solid #ccc;\n position: absolute;\n}\n\n/* DEFAULT THEME */\n\n.cm-s-default .cm-header {color: blue;}\n.cm-s-default .cm-quote {color: #090;}\n.cm-negative {color: #d44;}\n.cm-positive {color: #292;}\n.cm-header, .cm-strong {font-weight: bold;}\n.cm-em {font-style: italic;}\n.cm-link {text-decoration: underline;}\n.cm-strikethrough {text-decoration: line-through;}\n\n.cm-s-default .cm-keyword {color: #708;}\n.cm-s-default .cm-atom {color: #219;}\n.cm-s-default .cm-number {color: #164;}\n.cm-s-default .cm-def {color: #00f;}\n.cm-s-default .cm-variable,\n.cm-s-default .cm-punctuation,\n.cm-s-default .cm-property,\n.cm-s-default .cm-operator {}\n.cm-s-default .cm-variable-2 {color: #05a;}\n.cm-s-default .cm-variable-3 {color: #085;}\n.cm-s-default .cm-comment {color: #a50;}\n.cm-s-default .cm-string {color: #a11;}\n.cm-s-default .cm-string-2 {color: #f50;}\n.cm-s-default .cm-meta {color: #555;}\n.cm-s-default .cm-qualifier {color: #555;}\n.cm-s-default .cm-builtin {color: #30a;}\n.cm-s-default .cm-bracket {color: #997;}\n.cm-s-default .cm-tag {color: #170;}\n.cm-s-default .cm-attribute {color: #00c;}\n.cm-s-default .cm-hr {color: #999;}\n.cm-s-default .cm-link {color: #00c;}\n\n.cm-s-default .cm-error {color: #f00;}\n.cm-invalidchar {color: #f00;}\n\n.CodeMirror-composing { border-bottom: 2px solid; }\n\n/* Default styles for common addons */\n\ndiv.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}\n.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }\n.CodeMirror-activeline-background {background: #e8f2ff;}\n\n/* STOP */\n\n/* The rest of this file contains styles related to the mechanics of\n the editor. You probably shouldn't touch them. */\n\n.CodeMirror {\n position: relative;\n overflow: hidden;\n background: white;\n}\n\n.CodeMirror-scroll {\n overflow: scroll !important; /* Things will break if this is overridden */\n /* 30px is the magic margin used to hide the element's real scrollbars */\n /* See overflow: hidden in .CodeMirror */\n margin-bottom: -30px; margin-right: -30px;\n padding-bottom: 30px;\n height: 100%;\n outline: none; /* Prevent dragging from highlighting the element */\n position: relative;\n}\n.CodeMirror-sizer {\n position: relative;\n border-right: 30px solid transparent;\n}\n\n/* The fake, visible scrollbars. Used to force redraw during scrolling\n before actual scrolling happens, thus preventing shaking and\n flickering artifacts. */\n.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n position: absolute;\n z-index: 6;\n display: none;\n}\n.CodeMirror-vscrollbar {\n right: 0; top: 0;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n.CodeMirror-hscrollbar {\n bottom: 0; left: 0;\n overflow-y: hidden;\n overflow-x: scroll;\n}\n.CodeMirror-scrollbar-filler {\n right: 0; bottom: 0;\n}\n.CodeMirror-gutter-filler {\n left: 0; bottom: 0;\n}\n\n.CodeMirror-gutters {\n position: absolute; left: 0; top: 0;\n min-height: 100%;\n z-index: 3;\n}\n.CodeMirror-gutter {\n white-space: normal;\n height: 100%;\n display: inline-block;\n vertical-align: top;\n margin-bottom: -30px;\n /* Hack to make IE7 behave */\n *zoom:1;\n *display:inline;\n}\n.CodeMirror-gutter-wrapper {\n position: absolute;\n z-index: 4;\n background: none !important;\n border: none !important;\n}\n.CodeMirror-gutter-background {\n position: absolute;\n top: 0; bottom: 0;\n z-index: 4;\n}\n.CodeMirror-gutter-elt {\n position: absolute;\n cursor: default;\n z-index: 4;\n}\n.CodeMirror-gutter-wrapper {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.CodeMirror-lines {\n cursor: text;\n min-height: 1px; /* prevents collapsing before first draw */\n}\n.CodeMirror pre {\n /* Reset some styles that the rest of the page might have set */\n -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;\n border-width: 0;\n background: transparent;\n font-family: inherit;\n font-size: inherit;\n margin: 0;\n white-space: pre;\n word-wrap: normal;\n line-height: inherit;\n color: inherit;\n z-index: 2;\n position: relative;\n overflow: visible;\n -webkit-tap-highlight-color: transparent;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n}\n.CodeMirror-wrap pre {\n word-wrap: break-word;\n white-space: pre-wrap;\n word-break: normal;\n}\n\n.CodeMirror-linebackground {\n position: absolute;\n left: 0; right: 0; top: 0; bottom: 0;\n z-index: 0;\n}\n\n.CodeMirror-linewidget {\n position: relative;\n z-index: 2;\n overflow: auto;\n}\n\n.CodeMirror-widget {}\n\n.CodeMirror-code {\n outline: none;\n}\n\n/* Force content-box sizing for the elements where we expect it */\n.CodeMirror-scroll,\n.CodeMirror-sizer,\n.CodeMirror-gutter,\n.CodeMirror-gutters,\n.CodeMirror-linenumber {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n}\n\n.CodeMirror-measure {\n position: absolute;\n width: 100%;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n}\n\n.CodeMirror-cursor { position: absolute; }\n.CodeMirror-measure pre { position: static; }\n\ndiv.CodeMirror-cursors {\n visibility: hidden;\n position: relative;\n z-index: 3;\n}\ndiv.CodeMirror-dragcursors {\n visibility: visible;\n}\n\n.CodeMirror-focused div.CodeMirror-cursors {\n visibility: visible;\n}\n\n.CodeMirror-selected { background: #d9d9d9; }\n.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }\n.CodeMirror-crosshair { cursor: crosshair; }\n.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }\n.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }\n\n.cm-searching {\n background: #ffa;\n background: rgba(255, 255, 0, .4);\n}\n\n/* IE7 hack to prevent it from returning funny offsetTops on the spans */\n.CodeMirror span { *vertical-align: text-bottom; }\n\n/* Used to force a border model for a node */\n.cm-force-border { padding-right: .1px; }\n\n@media print {\n /* Hide the cursor when printing */\n .CodeMirror div.CodeMirror-cursors {\n visibility: hidden;\n }\n}\n\n/* See issue #2901 */\n.cm-tab-wrap-hack:after { content: ''; }\n\n/* Help users use markselection to safely style text background */\nspan.CodeMirror-selectedtext { background: none; }\n",""])},232:function(e,t,n){t=e.exports=n(39)(),t.push([e.i,".cm-s-react {\n font-family: 'source-code-pro', Menlo, 'Courier New', Consolas, monospace;\n font-size: 13px;\n line-height: 20px;\n color: #484848;\n}\n\n.cm-s-react .CodeMirror-linenumber {\n color: #D8D8D8;\n padding: 0 3px 0 3px;\n font-size: 10px;\n line-height: 22px;\n}\n\n.cm-s-react .CodeMirror-gutters {\n background: white;\n border-left: 4px solid rgba(238,238,238,1);\n border-right: 0px;\n}\n\n.cm-s-react span.cm-keyword { color: #1990B8; }\n.cm-s-react span.cm-atom { color: #C92C2C; }\n.cm-s-react span.cm-number { color: #C92C2C; }\n.cm-s-react span.cm-variable { color: black; }\n.cm-s-react span.cm-variable-2 { color: #0000C0; }\n.cm-s-react span.cm-variable-3 { color: #0000C0; }\n.cm-s-react span.cm-property { color: black; }\n.cm-s-react span.cm-operator { color: black; }\n.cm-s-react span.cm-comment { color: #7D8B99; }\n.cm-s-react span.cm-string { color: #2F9C0A; }\n.cm-s-react span.cm-string-2 { color: #2F9C0A; }\n.cm-s-react span.cm-link { color: #C92C2C; }\n\n.cm-s-react .CodeMirror-activeline-background { background: #e8f2ff; }\n.cm-s-react .CodeMirror-matchingtag { background: transparent; }\n.cm-s-react .cm-tag.CodeMirror-matchingtag:not(.cm-bracket) { text-decoration: underline; }\n\n@keyframes cm-line-warning {\n 0% { background-color: white; }\n 66% { background-color: white; }\n 100% { background-color: #FFDADA; }\n}\n\n.cm-s-react .cm-line-error {\n background-color: #FFDADA;\n animation: cm-line-warning 0.5s;\n}\n\n/* read-only styles */\n\n.read-only .CodeMirror, .read-only .CodeMirror-gutters {\n background: rgb(238,238,238);\n}\n\n.read-only .CodeMirror-linenumber {\n color: #BCBCBC;\n}\n",""])},233:function(e,t,n){t=e.exports=n(39)(),t.push([e.i,"html, body, #react-root {\n width: 100%;\n height: 100%;\n min-width: 0;\n min-height: 0;\n}\n\n#react-root {\n display: flex;\n}\n\n.CodeMirror {\n width: 100%;\n height: 100%;\n}\n",""])},316:function(e,t,n){"use strict";(function(e){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t=e.loader,l=e.LoadingComponent,a=e.delay||200,s=e.serverSideRequirePath,u=e.webpackRequireWeakId,g=e.resolveModule?e.resolveModule:m,y=!1,b=null,x=null,w=null;!p&&s&&(b=v(g,s));var C=function(){return x||(y=!0,x=t().then(function(e){y=!1,b=g(e)}).catch(function(e){y=!1,w=e})),x};return function(e){function t(e){r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if(!b&&p&&u){var l=u();n.m[l]&&(b=v(g,l))}return o.state={error:w,pastDelay:!1,Component:b},o}return o(t,e),c(t,null,[{key:"preload",value:function(){C()}}]),c(t,[{key:"componentWillMount",value:function(){var e=this;this._mounted=!0,this.state.Component||(this._timeout=setTimeout(function(){e.setState({pastDelay:!0})},a),C().then(function(){e._mounted&&(clearTimeout(e._timeout),e.setState({error:w,pastDelay:!1,Component:b}))}))}},{key:"componentWillUnmount",value:function(){this._mounted=!1,clearTimeout(this._timeout)}},{key:"render",value:function(){var e=this.state,t=e.pastDelay,n=e.error,r=e.Component;return!p&&s&&d.add(s),p&&u&&h.add(u()),y||n?f.default.createElement(l,{isLoading:y,pastDelay:t,error:n}):r?f.default.createElement(r,this.props):null}}]),t}(f.default.Component)}function a(){var e=Array.from(d);return d.clear(),e}function s(){var e=Array.from(h);return h.clear(),e}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=l,t.flushServerSideRequirePaths=a,t.flushWebpackRequireWeakIds=s;var u=n(0),f=function(e){return e&&e.__esModule?e:{default:e}}(u),d=new Set,h=new Set,p=void 0!==n,g=p?n:e.require.bind(e),m=function(e){return e&&e.__esModule?e.default:e},v=function(e,t){try{return e(g(t))}catch(e){}return null}}).call(t,n(426)(e))},423:function(e,t,n){var r=n(231);"string"==typeof r&&(r=[[e.i,r,""]]);n(52)(r,{});r.locals&&(e.exports=r.locals)},424:function(e,t,n){var r=n(232);"string"==typeof r&&(r=[[e.i,r,""]]);n(52)(r,{});r.locals&&(e.exports=r.locals)},426:function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},427:function(e,t,n){e.exports=function(){return new Worker(n.p+"babel-worker-bundle.js")}}},[215]); |