text: (window.webpackJsonp=window.webpackJsonp||[]).push([[1],{438:function(e,t,r){var n=r(465);e.exports=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(t){n(e,t,r[t])})}return e}},439:function(e,t,r){"use strict";var n,i=r(0),o=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){e.search="search",e.userUploads="user_uploads",e.playlist="playlist"}(n||(n={}));var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={playerName:"youtube_player_"+Math.random(),isMuted:!1,volume:100,availablePlaybackRates:[],playbackRate:1,playbackQuality:"large",currentTime:0,duration:0,videoUrl:"",videoEmbedCode:"",playerState:-1,playlist:[],playlistIndex:0,videoLoadedFraction:0},t.callbackObject={iframe:i.createElement("div",{id:t.state.playerName}),loadVideoById:function(e,r,n){t.proxyToPlayer("loadVideoById",[e,r,n])},cueVideoById:function(e,r,n){t.proxyToPlayer("cueVideoById",[e,r,n])},loadVideoByUrl:function(e,r,n){t.proxyToPlayer("videoUrl",[e,r,n])},cueVideoByUrl:function(e,r,n){t.proxyToPlayer("loadVideoById",[e,r,n])},loadPlaylist:function(e,r,i,o){"string"==typeof e?t.proxyToPlayer("loadPlaylist",[{list:e,listType:n.playlist,index:r.toString(),startSeconds:i||0,suggestedQuality:o}]):t.proxyToPlayer("loadPlaylist",[e,r,i,o])},cuePlaylist:function(e,r,n,i){t.proxyToPlayer("cuePlaylist",[e,r,n,i])},pauseVideo:function(){return t.proxyToPlayer("pauseVideo")},playVideo:function(){return t.proxyToPlayer("playVideo")},stopVideo:function(){return t.proxyToPlayer("stopVideo")},clearVideo:function(){return t.proxyToPlayer("clearVideo")},nextVideo:function(){return t.proxyToPlayer("nextVideo")},previousVideo:function(){return t.proxyToPlayer("previousVideo")},playVideoAt:function(e){return t.proxyToPlayer("playVideoAt",[e])},seekTo:function(e,r){return t.proxyToPlayer("seekTo",[e,r])},mute:function(){t.proxyToPlayer("mute"),t.setState({isMuted:!0})},unMute:function(){t.proxyToPlayer("unMute"),t.setState({isMuted:!1})},isMuted:function(){return t.state.isMuted},setVolume:function(e){t.proxyToPlayer("setVolume",[e]),t.setState({volume:50})},getVolume:function(){return t.state.volume},getPlaybackRate:function(){return t.state.playbackRate},setPlaybackRate:function(e){-1!==t.player.getAvailablePlaybackRates().indexOf(e)&&(t.proxyToPlayer("setPlaybackRate",[e]),t.setState({playbackRate:e}))},getAvailablePlaybackRates:function(){return t.state.availablePlaybackRates},setLoop:function(e){return t.proxyToPlayer("setLoop",[e])},setShuffle:function(e){return t.proxyToPlayer("setShuffle",[e])},getVideoLoadedFraction:function(){return t.state.videoLoadedFraction},getPlayerState:function(){return t.state.playerState},getCurrentTime:function(){return t.state.currentTime},getPlaybackQuality:function(){return t.state.playbackQuality},setPlaybackQuality:function(e){t.proxyToPlayer("setPlaybackQuality",[e]),t.setState({playbackQuality:e})},getDuration:function(){return t.state.duration},getVideoUrl:function(){return t.state.videoUrl},getVideoEmbedCode:function(){return t.state.videoEmbedCode},getPlaylist:function(){return t.props.listType===n.playlist&&Array.isArray(t.props.listType)?t.props.listType:Array.isArray(t.state.playlist)&&0!==t.state.playlist.length?t.state.playlist:[]},getPlaylistIndex:function(){return t.state.playlistIndex},addEventListener:function(e,r){return t.proxyToPlayer("addEventListener",[r])},removeEventListener:function(e,r){return t.proxyToPlayer("removeEventListener",[r])},player:t.player},t.proxyToPlayer=function(e,r){return void 0===r&&(r=[]),t.player&&t.player[e]&&"function"==typeof t.player[e]?(n=t.player[e]).call.apply(n,[t.player].concat(r)):void console.warn("Tried to proxy an function call to a player that is not yet ready.");var n},t.callEventIfBound=function(e,r){t.props.events&&t.props.events[e]&&t.props.events[e](r)},t.sync=function(){t.setState({isMuted:t.player.isMuted(),volume:t.player.getVolume(),availablePlaybackRates:t.player.getAvailablePlaybackRates(),playerState:t.player.getPlayerState(),playbackRate:t.player.getPlaybackRate(),playbackQuality:t.player.getPlaybackQuality(),currentTime:Math.round(t.player.getCurrentTime()),duration:Math.round(t.player.getDuration()),videoUrl:t.player.getVideoUrl(),videoEmbedCode:t.player.getVideoEmbedCode(),playlist:t.player.getPlaylist(),playlistIndex:t.player.getPlaylistIndex(),videoLoadedFraction:t.player.getVideoLoadedFraction()})},t.startSync=function(){t.syncInterval||(t.syncInterval=window.setInterval(t.sync,1e3))},t.stopSync=function(){window.clearInterval(t.syncInterval),t.syncInterval=0},t.handleReady=function(e){t.sync(),t.callEventIfBound("onReady",e),t.forceUpdate()},t.handleStateChange=function(e){1===e.data?t.startSync():t.stopSync(),t.sync(),t.callEventIfBound("onStateChange",e),t.forceUpdate()},t.handlePlaybackQualityChange=function(e){t.callEventIfBound("onPlaybackQualityChange",e),t.forceUpdate()},t.handlePlaybackRateChange=function(e){t.callEventIfBound("onPlaybackRateChange",e),t.forceUpdate()},t.handleError=function(e){t.callEventIfBound("onError",e),t.forceUpdate()},t.handleApiChange=function(e){t.callEventIfBound("onApiChange",e),t.forceUpdate()},t.initPlayer=function(){var e={videoId:"",playerVars:t.getPlayerVars(),events:{onReady:t.handleReady,onStateChange:t.handleStateChange,onPlaybackQualityChange:t.handlePlaybackQualityChange,onPlaybackRateChange:t.handlePlaybackRateChange,onError:t.handleError,onApiChange:t.handleApiChange}};if(!t.props.list||t.props.listType!==n.playlist&&t.props.listType!==n.search&&t.props.listType!==n.userUploads){if("string"!=typeof t.props.videoId)throw new Error("Please make sure to either specify the videoId or list and listType props");e.videoId=t.props.videoId}else delete e.videoId;t.player=new YT.Player(t.state.playerName,e),t.forceUpdate()},t}return o(t,e),t.prototype.getPlayerVars=function(){var e={};return void 0!==this.props.autoplay&&(e.autoplay=this.props.autoplay?"1":"0"),void 0!==this.props.ccLoadPolicy&&(e.cc_load_policy=this.props.autoplay?"1":"0"),void 0!==this.props.color&&(e.color=this.props.color),void 0!==this.props.controls&&(e.controls=this.props.controls),void 0!==this.props.disablekb&&(e.disablekb=this.props.disablekb?"1":"0"),void 0!==this.props.enableJsApi&&(e.enablejsapi=this.props.enableJsApi?"1":"0"),void 0!==this.props.end&&(e.end=this.props.end),void 0!==this.props.fs&&(e.fs=this.props.fs?"1":"0"),void 0!==this.props.hl&&(e.hl=this.props.hl),void 0!==this.props.ivLoadPolicy&&(e.iv_load_policy=this.props.ivLoadPolicy),void 0!==this.props.list&&(e.list=this.props.list),void 0!==this.props.listType&&(e.listType=this.props.listType),void 0!==this.props.loop&&(e.loop=this.props.loop?"1":"0"),void 0!==this.props.modestbranding&&(e.modestbranding=this.props.modestbranding?"1":"0"),void 0!==this.props.origin&&(e.origin=this.props.origin),void 0!==this.props.playlist&&(e.playlist=this.props.playlist?"1":"0"),void 0!==this.props.playsinline&&(e.playsinline=this.props.playsinline?"1":"0"),void 0!==this.props.rel&&(e.rel=this.props.rel?"1":"0"),void 0!==this.props.showinfo&&(e.showinfo=this.props.showinfo?"1":"0"),void 0!==this.props.start&&(e.start=this.props.start),e},t.prototype.componentWillReceiveProps=function(e){e.videoId&&e.videoId!==this.props.videoId&&(this.player.cueVideoById(e.videoId,e.start),e.autoplay&&this.player.playVideo()),e.list&&e.list!==this.props.list&&(this.proxyToPlayer("cuePlaylist",[{list:e.list,listType:n.playlist,index:"0",startSeconds:e.start||0}]),e.autoplay&&this.player.playVideo()),e.autoplay!==this.props.autoplay&&(e.autoplay?this.player.playVideo():this.player.pauseVideo())},t.prototype.render=function(){return this.props.render?this.props.render(this.callbackObject):i.createElement("div",{id:this.state.playerName})},t.prototype.componentDidMount=function(){var e=this;if(document.querySelector("[data-youtube]"))t.loadPromise.then(this.initPlayer);else{var r=document.createElement("script");r.src="https://www.youtube.com/iframe_api",r.dataset.youtube="true",document.getElementsByTagName("head")[0].appendChild(r),t.loadPromise=new Promise(function(t){window.onYouTubeIframeAPIReady=function(){e.initPlayer(),t()}})}},t.prototype.componentWillUnmount=function(){this.player&&this.player.destroy(),this.stopSync()},t}(i.Component);t.a=a},440:function(e,t,r){e.exports=r(466)},441:function(e,t,r){!function(e){"use strict";e.defineMode("javascript",function(t,r){var n,i,o=t.indentUnit,a=r.statementIndent,l=r.jsonld,s=r.json||l,c=r.typescript,u=r.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("keyword d"),o=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:i,break:i,continue:i,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),f=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function h(e,t,r){return n=e,i=r,t}function g(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=function(e){return function(t,r){var n,i=!1;if(l&&"@"==t.peek()&&t.match(p))return r.tokenize=g,h("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=g),h("string","string")}}(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return h("number","number");if("."==r&&e.match(".."))return h("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return h(r);if("="==r&&e.eat(">"))return h("=>","operator");if("0"==r&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return h("number","number");if(/\d/.test(r))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),h("number","number");if("/"==r)return e.eat("*")?(t.tokenize=m,m(e,t)):e.eat("/")?(e.skipToEnd(),h("comment","comment")):$e(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),h("regexp","string-2")):(e.eat("="),h("operator","operator",e.current()));if("`"==r)return t.tokenize=v,v(e,t);if("#"==r)return e.skipToEnd(),h("error","error");if(f.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),h("operator","operator",e.current());if(u.test(r)){e.eatWhile(u);var n=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(n)){var i=d[n];return h(i.type,i.style,n)}if("async"==n&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return h("async","keyword",n)}return h("variable","variable",n)}}function m(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=g;break}n="*"==r}return h("comment","comment")}function v(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=g;break}n=!n&&"\\"==r}return h("quasi","string-2",e.current())}var y="([{}])";function b(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(c){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,a=r-1;a>=0;--a){var l=e.string.charAt(a),s=y.indexOf(l);if(s>=0&&s<3){if(!i){++a;break}if(0==--i){"("==l&&(o=!0);break}}else if(s>=3&&s<6)++i;else if(u.test(l))o=!0;else{if(/["'\/]/.test(l))return;if(o&&!i){++a;break}}}o&&!i&&(t.fatArrowAt=a)}}var w={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function x(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function C(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}var k={state:null,column:null,marked:null,cc:null};function M(){for(var e=arguments.length-1;e>=0;e--)k.cc.push(arguments[e])}function S(){return M.apply(null,arguments),!0}function T(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function L(e){var t=k.state;if(k.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=function e(t,r){if(r){if(r.block){var n=e(t,r.prev);return n?n==r.prev?r:new D(n,r.vars,!0):null}return T(t,r.vars)?r:new D(r.prev,new P(t,r.vars),!1)}return null}(e,t.context);if(null!=n)return void(t.context=n)}else if(!T(e,t.localVars))return void(t.localVars=new P(e,t.localVars));r.globalVars&&!T(e,t.globalVars)&&(t.globalVars=new P(e,t.globalVars))}function O(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function D(e,t,r){this.prev=e,this.vars=t,this.block=r}function P(e,t){this.name=e,this.next=t}var A=new P("this",new P("arguments",null));function N(){k.state.context=new D(k.state.context,k.state.localVars,!1),k.state.localVars=A}function W(){k.state.context=new D(k.state.context,k.state.localVars,!0),k.state.localVars=null}function z(){k.state.localVars=k.state.context.vars,k.state.context=k.state.context.prev}function E(e,t){var r=function(){var r=k.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new x(n,k.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function I(){var e=k.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function F(e){return function t(r){return r==e?S():";"==e||"}"==r||")"==r||"]"==r?M():S(t)}}function _(e,t){return"var"==e?S(E("vardef",t),ye,F(";"),I):"keyword a"==e?S(E("form"),V,_,I):"keyword b"==e?S(E("form"),_,I):"keyword d"==e?k.stream.match(/^\s*$/,!1)?S():S(E("stat"),U,F(";"),I):"debugger"==e?S(F(";")):"{"==e?S(E("}"),W,ae,I,z):";"==e?S():"if"==e?("else"==k.state.lexical.info&&k.state.cc[k.state.cc.length-1]==I&&k.state.cc.pop()(),S(E("form"),V,_,I,Me)):"function"==e?S(Pe):"for"==e?S(E("form"),Se,_,I):"class"==e||c&&"interface"==t?(k.marked="keyword",S(E("form"),We,I)):"variable"==e?c&&"declare"==t?(k.marked="keyword",S(_)):c&&("module"==t||"enum"==t||"type"==t)&&k.stream.match(/^\s*\w/,!1)?(k.marked="keyword","enum"==t?S(Ge):"type"==t?S(ue,F("operator"),ue,F(";")):S(E("form"),be,F("{"),E("}"),ae,I,I)):c&&"namespace"==t?(k.marked="keyword",S(E("form"),R,ae,I)):c&&"abstract"==t?(k.marked="keyword",S(_)):S(E("stat"),J):"switch"==e?S(E("form"),V,F("{"),E("}","switch"),W,ae,I,I,z):"case"==e?S(R,F(":")):"default"==e?S(F(":")):"catch"==e?S(E("form"),N,H,_,I,z):"export"==e?S(E("stat"),Fe,I):"import"==e?S(E("stat"),He,I):"async"==e?S(_):"@"==t?S(R,_):M(E("stat"),R,F(";"),I)}function H(e){if("("==e)return S(Ae,F(")"))}function R(e,t){return j(e,t,!1)}function B(e,t){return j(e,t,!0)}function V(e){return"("!=e?M():S(E(")"),R,F(")"),I)}function j(e,t,r){if(k.state.fatArrowAt==k.stream.start){var n=r?Y:X;if("("==e)return S(N,E(")"),ie(Ae,")"),I,F("=>"),n,z);if("variable"==e)return M(N,be,F("=>"),n,z)}var i=r?K:G;return w.hasOwnProperty(e)?S(i):"function"==e?S(Pe,i):"class"==e||c&&"interface"==t?(k.marked="keyword",S(E("form"),Ne,I)):"keyword c"==e||"async"==e?S(r?B:R):"("==e?S(E(")"),U,F(")"),I,i):"operator"==e||"spread"==e?S(r?B:R):"["==e?S(E("]"),Ue,I,i):"{"==e?oe(te,"}",null,i):"quasi"==e?M($,i):"new"==e?S(function(e){return function(t){return"."==t?S(e?Z:Q):"variable"==t&&c?S(ge,e?K:G):M(e?B:R)}}(r)):"import"==e?S(R):S()}function U(e){return e.match(/[;\}\)\],]/)?M():M(R)}function G(e,t){return","==e?S(R):K(e,t,!1)}function K(e,t,r){var n=0==r?G:K,i=0==r?R:B;return"=>"==e?S(N,r?Y:X,z):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?S(n):c&&"<"==t&&k.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?S(E(">"),ie(ue,">"),I,n):"?"==t?S(R,F(":"),i):S(i):"quasi"==e?M($,n):";"!=e?"("==e?oe(B,")","call",n):"."==e?S(ee,n):"["==e?S(E("]"),U,F("]"),I,n):c&&"as"==t?(k.marked="keyword",S(ue,n)):"regexp"==e?(k.state.lastType=k.marked="operator",k.stream.backUp(k.stream.pos-k.stream.start-1),S(i)):void 0:void 0}function $(e,t){return"quasi"!=e?M():"${"!=t.slice(t.length-2)?S($):S(R,q)}function q(e){if("}"==e)return k.marked="string-2",k.state.tokenize=v,S($)}function X(e){return b(k.stream,k.state),M("{"==e?_:R)}function Y(e){return b(k.stream,k.state),M("{"==e?_:B)}function Q(e,t){if("target"==t)return k.marked="keyword",S(G)}function Z(e,t){if("target"==t)return k.marked="keyword",S(K)}function J(e){return":"==e?S(I,_):M(G,F(";"),I)}function ee(e){if("variable"==e)return k.marked="property",S()}function te(e,t){if("async"==e)return k.marked="property",S(te);if("variable"==e||"keyword"==k.style){return k.marked="property","get"==t||"set"==t?S(re):(c&&k.state.fatArrowAt==k.stream.start&&(r=k.stream.match(/^\s*:\s*/,!1))&&(k.state.fatArrowAt=k.stream.pos+r[0].length),S(ne));var r}else{if("number"==e||"string"==e)return k.marked=l?"property":k.style+" property",S(ne);if("jsonld-keyword"==e)return S(ne);if(c&&O(t))return k.marked="keyword",S(te);if("["==e)return S(R,le,F("]"),ne);if("spread"==e)return S(B,ne);if("*"==t)return k.marked="keyword",S(te);if(":"==e)return M(ne)}}function re(e){return"variable"!=e?M(ne):(k.marked="property",S(Pe))}function ne(e){return":"==e?S(B):"("==e?M(Pe):void 0}function ie(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var a=k.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),S(function(r,n){return r==t||n==t?M():M(e)},n)}return i==t||o==t?S():S(F(t))}return function(r,i){return r==t||i==t?S():M(e,n)}}function oe(e,t,r){for(var n=3;n<arguments.length;n++)k.cc.push(arguments[n]);return S(E(t,r),ie(e,t),I)}function ae(e){return"}"==e?S():M(_,ae)}function le(e,t){if(c){if(":"==e)return S(ue);if("?"==t)return S(le)}}function se(e){if(c&&":"==e)return k.stream.match(/^\s*\w+\s+is\b/,!1)?S(R,ce,ue):S(ue)}function ce(e,t){if("is"==t)return k.marked="keyword",S()}function ue(e,t){return"keyof"==t||"typeof"==t?(k.marked="keyword",S("keyof"==t?ue:B)):"variable"==e||"void"==t?(k.marked="type",S(he)):"string"==e||"number"==e||"atom"==e?S(he):"["==e?S(E("]"),ie(ue,"]",","),I,he):"{"==e?S(E("}"),ie(fe,"}",",;"),I,he):"("==e?S(ie(pe,")"),de):"<"==e?S(ie(ue,">"),ue):void 0}function de(e){if("=>"==e)return S(ue)}function fe(e,t){return"variable"==e||"keyword"==k.style?(k.marked="property",S(fe)):"?"==t?S(fe):":"==e?S(ue):"["==e?S(R,le,F("]"),fe):void 0}function pe(e,t){return"variable"==e&&k.stream.match(/^\s*[?:]/,!1)||"?"==t?S(pe):":"==e?S(ue):M(ue)}function he(e,t){return"<"==t?S(E(">"),ie(ue,">"),I,he):"|"==t||"."==e||"&"==t?S(ue):"["==e?S(F("]"),he):"extends"==t||"implements"==t?(k.marked="keyword",S(ue)):void 0}function ge(e,t){if("<"==t)return S(E(">"),ie(ue,">"),I,he)}function me(){return M(ue,ve)}function ve(e,t){if("="==t)return S(ue)}function ye(e,t){return"enum"==t?(k.marked="keyword",S(Ge)):M(be,le,Ce,ke)}function be(e,t){return c&&O(t)?(k.marked="keyword",S(be)):"variable"==e?(L(t),S()):"spread"==e?S(be):"["==e?oe(xe,"]"):"{"==e?oe(we,"}"):void 0}function we(e,t){return"variable"!=e||k.stream.match(/^\s*:/,!1)?("variable"==e&&(k.marked="property"),"spread"==e?S(be):"}"==e?M():S(F(":"),be,Ce)):(L(t),S(Ce))}function xe(){return M(be,Ce)}function Ce(e,t){if("="==t)return S(B)}function ke(e){if(","==e)return S(ye)}function Me(e,t){if("keyword b"==e&&"else"==t)return S(E("form","else"),_,I)}function Se(e,t){return"await"==t?S(Se):"("==e?S(E(")"),Te,F(")"),I):void 0}function Te(e){return"var"==e?S(ye,F(";"),Oe):";"==e?S(Oe):"variable"==e?S(Le):M(R,F(";"),Oe)}function Le(e,t){return"in"==t||"of"==t?(k.marked="keyword",S(R)):S(G,Oe)}function Oe(e,t){return";"==e?S(De):"in"==t||"of"==t?(k.marked="keyword",S(R)):M(R,F(";"),De)}function De(e){")"!=e&&S(R)}function Pe(e,t){return"*"==t?(k.marked="keyword",S(Pe)):"variable"==e?(L(t),S(Pe)):"("==e?S(N,E(")"),ie(Ae,")"),I,se,_,z):c&&"<"==t?S(E(">"),ie(me,">"),I,Pe):void 0}function Ae(e,t){return"@"==t&&S(R,Ae),"spread"==e?S(Ae):c&&O(t)?(k.marked="keyword",S(Ae)):M(be,le,Ce)}function Ne(e,t){return"variable"==e?We(e,t):ze(e,t)}function We(e,t){if("variable"==e)return L(t),S(ze)}function ze(e,t){return"<"==t?S(E(">"),ie(me,">"),I,ze):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(k.marked="keyword"),S(c?ue:R,ze)):"{"==e?S(E("}"),Ee,I):void 0}function Ee(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&O(t))&&k.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(k.marked="keyword",S(Ee)):"variable"==e||"keyword"==k.style?(k.marked="property",S(c?Ie:Pe,Ee)):"["==e?S(R,le,F("]"),c?Ie:Pe,Ee):"*"==t?(k.marked="keyword",S(Ee)):";"==e?S(Ee):"}"==e?S():"@"==t?S(R,Ee):void 0}function Ie(e,t){return"?"==t?S(Ie):":"==e?S(ue,Ce):"="==t?S(B):M(Pe)}function Fe(e,t){return"*"==t?(k.marked="keyword",S(je,F(";"))):"default"==t?(k.marked="keyword",S(R,F(";"))):"{"==e?S(ie(_e,"}"),je,F(";")):M(_)}function _e(e,t){return"as"==t?(k.marked="keyword",S(F("variable"))):"variable"==e?M(B,_e):void 0}function He(e){return"string"==e?S():"("==e?M(R):M(Re,Be,je)}function Re(e,t){return"{"==e?oe(Re,"}"):("variable"==e&&L(t),"*"==t&&(k.marked="keyword"),S(Ve))}function Be(e){if(","==e)return S(Re,Be)}function Ve(e,t){if("as"==t)return k.marked="keyword",S(Re)}function je(e,t){if("from"==t)return k.marked="keyword",S(R)}function Ue(e){return"]"==e?S():M(ie(B,"]"))}function Ge(){return M(E("form"),be,F("{"),E("}"),ie(Ke,"}"),I,I)}function Ke(){return M(be,Ce)}function $e(e,t,r){return t.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return z.lex=!0,I.lex=!0,{startState:function(e){var t={tokenize:g,lastType:"sof",cc:[],lexical:new x((e||0)-o,0,"block",!1),localVars:r.localVars,context:r.localVars&&new D(null,null,!1),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(),b(e,t)),t.tokenize!=m&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=i&&"--"!=i?n:"incdec",function(e,t,r,n,i){var o=e.cc;for(k.state=e,k.stream=i,k.marked=null,k.cc=o,k.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=o.length?o.pop():s?R:_;if(a(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return k.marked?k.marked:"variable"==r&&C(e,n)?"variable-2":t}}}(t,r,n,i,e))},indent:function(t,n){if(t.tokenize==m)return e.Pass;if(t.tokenize!=g)return 0;var i,l=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==I)s=s.prev;else if(u!=Me)break}for(;("stat"==s.type||"form"==s.type)&&("}"==l||(i=t.cc[t.cc.length-1])&&(i==G||i==K)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;a&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var d=s.type,p=l==d;return"vardef"==d?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==d&&"{"==l?s.indented:"form"==d?s.indented+o:"stat"==d?s.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||f.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,n)?a||o:0):"switch"!=s.info||p||0==r.doubleIndentSwitch?s.align?s.column+(p?0:1):s.indented+(p?0:o):s.indented+(/^(?:case|default)\b/.test(n)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:l,jsonMode:s,expressionAllowed:$e,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=R&&t!=B||e.cc.pop()}}}),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})}(r(454))},442:function(e,t,r){!function(e){"use strict";function t(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.info=n,this.align=i,this.prev=o}function r(e,r,n,i){var o=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=n&&(o=e.context.indented),e.context=new t(o,r,n,i,null,e.context)}function n(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function i(e,t,r){return"variable"==t.prevToken||"type"==t.prevToken||!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,r))||!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0}function o(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function a(e){for(var t={},r=e.split(" "),n=0;n<r.length;++n)t[r[n]]=!0;return t}function l(e,t){return"function"==typeof e?e(t):e.propertyIsEnumerable(t)}e.defineMode("clike",function(a,s){var c,u,d=a.indentUnit,f=s.statementIndentUnit||d,p=s.dontAlignCalls,h=s.keywords||{},g=s.types||{},m=s.builtin||{},v=s.blockKeywords||{},y=s.defKeywords||{},b=s.atoms||{},w=s.hooks||{},x=s.multiLineStrings,C=!1!==s.indentStatements,k=!1!==s.indentSwitch,M=s.namespaceSeparator,S=s.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,T=s.numberStart||/[\d\.]/,L=s.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,O=s.isOperatorChar||/[+\-*&%=<>!?|\/]/,D=s.isIdentifierChar||/[\w\$_\xa1-\uffff]/;function P(e,t){var r=e.next();if(w[r]){var n=w[r](e,t);if(!1!==n)return n}if('"'==r||"'"==r)return t.tokenize=function(e){return function(t,r){for(var n,i=!1,o=!1;null!=(n=t.next());){if(n==e&&!i){o=!0;break}i=!i&&"\\"==n}return(o||!i&&!x)&&(r.tokenize=null),"string"}}(r),t.tokenize(e,t);if(S.test(r))return c=r,null;if(T.test(r)){if(e.backUp(1),e.match(L))return"number";e.next()}if("/"==r){if(e.eat("*"))return t.tokenize=A,A(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(O.test(r)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(O););return"operator"}if(e.eatWhile(D),M)for(;e.match(M);)e.eatWhile(D);var i=e.current();return l(h,i)?(l(v,i)&&(c="newstatement"),l(y,i)&&(u=!0),"keyword"):l(g,i)?"type":l(m,i)?(l(v,i)&&(c="newstatement"),"builtin"):l(b,i)?"atom":"variable"}function A(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=null;break}n="*"==r}return"comment"}function N(e,t){s.typeFirstDefinitions&&e.eol()&&o(t.context)&&(t.typeAtEndOfLine=i(e,t,e.pos))}return{startState:function(e){return{tokenize:null,context:new t((e||0)-d,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var a=t.context;if(e.sol()&&(null==a.align&&(a.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return N(e,t),null;c=u=null;var l=(t.tokenize||P)(e,t);if("comment"==l||"meta"==l)return l;if(null==a.align&&(a.align=!0),";"==c||":"==c||","==c&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)n(t);else if("{"==c)r(t,e.column(),"}");else if("["==c)r(t,e.column(),"]");else if("("==c)r(t,e.column(),")");else if("}"==c){for(;"statement"==a.type;)a=n(t);for("}"==a.type&&(a=n(t));"statement"==a.type;)a=n(t)}else c==a.type?n(t):C&&(("}"==a.type||"top"==a.type)&&";"!=c||"statement"==a.type&&"newstatement"==c)&&r(t,e.column(),"statement",e.current());if("variable"==l&&("def"==t.prevToken||s.typeFirstDefinitions&&i(e,t,e.start)&&o(t.context)&&e.match(/^\s*\(/,!1))&&(l="def"),w.token){var d=w.token(e,t,l);void 0!==d&&(l=d)}return"def"==l&&!1===s.styleDefs&&(l="variable"),t.startOfLine=!1,t.prevToken=u?"def":l||c,N(e,t),l},indent:function(t,r){if(t.tokenize!=P&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var n=t.context,i=r&&r.charAt(0),o=i==n.type;if("statement"==n.type&&"}"==i&&(n=n.prev),s.dontIndentStatements)for(;"statement"==n.type&&s.dontIndentStatements.test(n.info);)n=n.prev;if(w.indent){var a=w.indent(t,n,r,d);if("number"==typeof a)return a}var l=n.prev&&"switch"==n.prev.info;if(s.allmanIndentation&&/[{(]/.test(i)){for(;"top"!=n.type&&"}"!=n.type;)n=n.prev;return n.indented}return"statement"==n.type?n.indented+("{"==i?0:f):!n.align||p&&")"==n.type?")"!=n.type||o?n.indented+(o?0:d)+(o||!l||/^(?:case|default)\b/.test(r)?0:d):n.indented+f:n.column+(o?0:1)},electricInput:k?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});var s="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile",c="int long char short double float unsigned signed void size_t ptrdiff_t";function u(e,t){if(!t.startOfLine)return!1;for(var r,n=null;r=e.peek();){if("\\"==r&&e.match(/^.$/)){n=u;break}if("/"==r&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=n,"meta"}function d(e,t){return"type"==t.prevToken&&"type"}function f(e){return e.eatWhile(/[\w\.']/),"number"}function p(e,t){if(e.backUp(1),e.match(/(R|u8R|uR|UR|LR)/)){var r=e.match(/"([^\s\\()]{0,16})\(/);return!!r&&(t.cpp11RawStringDelim=r[1],t.tokenize=g,g(e,t))}return e.match(/(u8|u|U|L)/)?!!e.match(/["']/,!1)&&"string":(e.next(),!1)}function h(e,t){for(var r;null!=(r=e.next());)if('"'==r&&!e.eat('"')){t.tokenize=null;break}return"string"}function g(e,t){var r=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&"),n=e.match(new RegExp(".*?\\)"+r+'"'));return n?t.tokenize=null:e.skipToEnd(),"string"}function m(t,r){"string"==typeof t&&(t=[t]);var n=[];function i(e){if(e)for(var t in e)e.hasOwnProperty(t)&&n.push(t)}i(r.keywords),i(r.types),i(r.builtin),i(r.atoms),n.length&&(r.helperType=t[0],e.registerHelper("hintWords",t[0],n));for(var o=0;o<t.length;++o)e.defineMIME(t[o],r)}function v(e,t){for(var r=!1;!e.eol();){if(!r&&e.match('"""')){t.tokenize=null;break}r="\\"==e.next()&&!r}return"string"}m(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:a(s),types:a(c+" bool _Complex _Bool float_t double_t intptr_t intmax_t int8_t int16_t int32_t int64_t uintptr_t uintmax_t uint8_t uint16_t uint32_t uint64_t"),blockKeywords:a("case do else for if switch while struct"),defKeywords:a("struct"),typeFirstDefinitions:!0,atoms:a("NULL true false"),hooks:{"#":u,"*":d},modeProps:{fold:["brace","include"]}}),m(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:a(s+" asm dynamic_cast namespace reinterpret_cast try explicit new static_cast typeid catch operator template typename class friend private this using const_cast inline public throw virtual delete mutable protected alignas alignof constexpr decltype nullptr noexcept thread_local final static_assert override"),types:a(c+" bool wchar_t"),blockKeywords:a("catch class do else finally for if struct switch try while"),defKeywords:a("class namespace struct enum union"),typeFirstDefinitions:!0,atoms:a("true false NULL"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,hooks:{"#":u,"*":d,u:p,U:p,L:p,R:p,0:f,1:f,2:f,3:f,4:f,5:f,6:f,7:f,8:f,9:f,token:function(e,t,r){if("variable"==r&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&function(e){var t=/(\w+)::~?(\w+)$/.exec(e);return t&&t[1]==t[2]}(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),m("text/x-java",{name:"clike",keywords:a("abstract assert break case catch class const continue default do else enum extends final finally float for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:a("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:a("catch class do else finally for if switch try while"),defKeywords:a("class interface enum @interface"),typeFirstDefinitions:!0,atoms:a("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return!e.match("interface",!1)&&(e.eatWhile(/[\w\$_]/),"meta")}},modeProps:{fold:["brace","import"]}}),m("text/x-csharp",{name:"clike",keywords:a("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:a("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:a("catch class do else finally for foreach if struct switch try while"),defKeywords:a("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:a("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=h,h(e,t)):(e.eatWhile(/[\w\$_]/),"meta")}}}),m("text/x-scala",{name:"clike",keywords:a("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:a("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:a("catch class enum do else finally for forSome if match switch try while"),defKeywords:a("class enum def object package trait type val var"),atoms:a("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=v,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,r){var n=r.context;return!("}"!=n.type||!n.align||!e.eat(">"))&&(r.context=new t(n.indented,n.column,n.type,n.info,null,n.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=function e(t){return function(r,n){for(var i;i=r.next();){if("*"==i&&r.eat("/")){if(1==t){n.tokenize=null;break}return n.tokenize=e(t-1),n.tokenize(r,n)}if("/"==i&&r.eat("*"))return n.tokenize=e(t+1),n.tokenize(r,n)}return"comment"}}(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}}),m("text/x-kotlin",{name:"clike",keywords:a("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:a("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:a("catch class do else finally for if where try while enum"),defKeywords:a("class val var object interface fun"),atoms:a("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=function(e){return function(t,r){for(var n,i=!1,o=!1;!t.eol();){if(!e&&!i&&t.match('"')){o=!0;break}if(e&&t.match('"""')){o=!0;break}n=t.next(),!i&&"$"==n&&t.match("{")&&t.skipTo("}"),i=!i&&"\\"==n&&!e}return!o&&e||(r.tokenize=null),"string"}}(e.match('""')),t.tokenize(e,t)},indent:function(e,t,r,n){var i=r&&r.charAt(0);return"}"!=e.prevToken&&")"!=e.prevToken||""!=r?"operator"==e.prevToken&&"}"!=r||"variable"==e.prevToken&&"."==i||("}"==e.prevToken||")"==e.prevToken)&&"."==i?2*n+t.indented:t.align&&"}"==t.type?t.indented+(e.context.type==(r||"").charAt(0)?0:n):void 0:e.indented}},modeProps:{closeBrackets:{triples:'"'}}}),m(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:a("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:a("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:a("for while do if else struct"),builtin:a("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:a("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":u},modeProps:{fold:["brace","include"]}}),m("text/x-nesc",{name:"clike",keywords:a(s+"as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:a(c),blockKeywords:a("case do else for if switch while struct"),atoms:a("null true false"),hooks:{"#":u},modeProps:{fold:["brace","include"]}}),m("text/x-objectivec",{name:"clike",keywords:a(s+"inline restrict _Bool _Complex _Imaginary BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),types:a(c),atoms:a("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(e){return e.eatWhile(/[\w\$]/),"keyword"},"#":u,indent:function(e,t,r){if("statement"==t.type&&/^@\w/.test(r))return t.indented}},modeProps:{fold:"brace"}}),m("text/x-squirrel",{name:"clike",keywords:a("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:a(c),blockKeywords:a("case catch class else for foreach if switch try while"),defKeywords:a("function local class"),typeFirstDefinitions:!0,atoms:a("true false null"),hooks:{"#":u},modeProps:{fold:["brace","include"]}});var y=null;m("text/x-ceylon",{name:"clike",keywords:a("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:a("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:a("class dynamic function interface module object package value"),builtin:a("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:a("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=function e(t){return function(r,n){for(var i,o=!1,a=!1;!r.eol();){if(!o&&r.match('"')&&("single"==t||r.match('""'))){a=!0;break}if(!o&&r.match("``")){y=e(t),a=!0;break}i=r.next(),o="single"==t&&!o&&"\\"==i}return a&&(n.tokenize=null),"string"}}(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!y||!e.match("`"))&&(t.tokenize=y,y=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,r){if(("variable"==r||"type"==r)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}(r(454))},454:function(e,t,r){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=n||i||o,l=a&&(n?document.documentMode||6:+(o||i)[1]),s=!o&&/WebKit\//.test(e),c=s&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\//.test(e),d=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),g=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),m=/Android/.test(e),v=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),x=d&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(d=!1,s=!0);var C=y&&(c||d&&(null==x||x<12.11)),k=r||a&&l>=9;function M(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,T=function(e,t){var r=e.className,n=M(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function L(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function O(e,t){return L(e).appendChild(t)}function D(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"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 P(e,t,r,n){var i=D(e,t,r,n);return i.setAttribute("role","presentation"),i}function A(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)}function N(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function W(e,t){var r=e.className;M(t).test(r)||(e.className+=(r?" ":"")+t)}function z(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!M(r[n]).test(t)&&(t+=" "+r[n]);return t}S=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var E=function(e){e.select()};function I(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function F(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function _(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,a=i||0;;){var l=e.indexOf("\t",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=r-a%r,o=l+1}}g?E=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(E=function(e){try{e.select()}catch(e){}});var H=function(){this.id=null};function R(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}H.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var B=30,V={toString:function(){return"CodeMirror.Pass"}},j={scroll:!1},U={origin:"*mouse"},G={origin:"+move"};function K(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var a=o-n;if(o==e.length||i+a>=t)return n+Math.min(a,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var $=[""];function q(e){for(;$.length<=e;)$.push(X($)+" ");return $[e]}function X(e){return e[e.length-1]}function Y(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function Q(){}function Z(e,t){var r;return Object.create?r=Object.create(e):(Q.prototype=e,r=new Q),t&&F(t,r),r}var J=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ee(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ie(e){return e.charCodeAt(0)>=768&&ne.test(e)}function oe(e,t,r){for(;(r<0?t>0:t<e.length)&&ie(e.charAt(t));)t+=r;return t}function ae(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function le(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 r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function se(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function ce(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function ue(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function de(e){if(null==e.parent)return null;for(var t=e.parent,r=R(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function fe(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a],s=l.height;if(t<s)break;t-=s}return r+a}function pe(e,t){return t>=e.first&&t<e.first+e.size}function he(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ge(e,t,r){if(void 0===r&&(r=null),!(this instanceof ge))return new ge(e,t,r);this.line=e,this.ch=t,this.sticky=r}function me(e,t){return e.line-t.line||e.ch-t.ch}function ve(e,t){return e.sticky==t.sticky&&0==me(e,t)}function ye(e){return ge(e.line,e.ch)}function be(e,t){return me(e,t)<0?t:e}function we(e,t){return me(e,t)<0?e:t}function xe(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Ce(e,t){if(t.line<e.first)return ge(e.first,0);var r=e.first+e.size-1;return t.line>r?ge(r,le(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?ge(e.line,t):r<0?ge(e.line,0):e}(t,le(e,t.line).text.length)}function ke(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=Ce(e,t[n]);return r}var Me=!1,Se=!1;function Te(e,t,r){this.marker=e,this.from=t,this.to=r}function Le(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Oe(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function De(e,t){if(t.full)return null;var r=pe(e,t.from.line)&&le(e,t.from.line).markedSpans,n=pe(e,t.to.line)&&le(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=0==me(t.from,t.to),l=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);if(l||o.from==t&&"bookmark"==a.type&&(!r||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Te(a,o.from,s?null:o.to))}}return n}(r,i,a),s=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);if(l||o.from==t&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Te(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return n}(n,o,a),c=1==t.text.length,u=X(t.text).length+(c?i:0);if(l)for(var d=0;d<l.length;++d){var f=l[d];if(null==f.to){var p=Le(s,f.marker);p?c&&(f.to=null==p.to?null:p.to+u):f.to=i}}if(s)for(var h=0;h<s.length;++h){var g=s[h];if(null!=g.to&&(g.to+=u),null==g.from){var m=Le(l,g.marker);m||(g.from=u,c&&(l||(l=[])).push(g))}else g.from+=u,c&&(l||(l=[])).push(g)}l&&(l=Pe(l)),s&&s!=l&&(s=Pe(s));var v=[l];if(!c){var y,b=t.text.length-2;if(b>0&&l)for(var w=0;w<l.length;++w)null==l[w].to&&(y||(y=[])).push(new Te(l[w].marker,null,null));for(var x=0;x<b;++x)v.push(y);v.push(s)}return v}function Pe(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Ae(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function Ne(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function We(e){return e.inclusiveLeft?-1:0}function ze(e){return e.inclusiveRight?1:0}function Ee(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=me(n.from,i.from)||We(e)-We(t);if(o)return-o;var a=me(n.to,i.to)||ze(e)-ze(t);return a||t.id-e.id}function Ie(e,t){var r,n=Se&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)(i=n[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!r||Ee(r,i.marker)<0)&&(r=i.marker);return r}function Fe(e){return Ie(e,!0)}function _e(e){return Ie(e,!1)}function He(e,t){var r,n=Se&&e.markedSpans;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!r||Ee(r,o.marker)<0)&&(r=o.marker)}return r}function Re(e,t,r,n,i){var o=le(e,t),a=Se&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var c=s.marker.find(0),u=me(c.from,r)||We(s.marker)-We(i),d=me(c.to,n)||ze(s.marker)-ze(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?me(c.to,r)>=0:me(c.to,r)>0)||u>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?me(c.from,n)<=0:me(c.from,n)<0)))return!0}}}function Be(e){for(var t;t=Fe(e);)e=t.find(-1,!0).line;return e}function Ve(e,t){var r=le(e,t),n=Be(r);return r==n?t:de(n)}function je(e,t){if(t>e.lastLine())return t;var r,n=le(e,t);if(!Ue(e,n))return t;for(;r=_e(n);)n=r.find(1,!0).line;return de(n)+1}function Ue(e,t){var r=Se&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if((n=r[i]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&Ge(e,t,n))return!0}}function Ge(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return Ge(e,n.line,Le(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&Ge(e,t,i))return!0}function Ke(e){for(var t=0,r=(e=Be(e)).parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;o=(r=o).parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==r)break;t+=l.height}return t}function $e(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=Fe(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=_e(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,n=o.to.line,r+=n.text.length-o.to.ch}return r}function qe(e){var t=e.display,r=e.doc;t.maxLine=le(r,r.first),t.maxLineLength=$e(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=$e(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}var Xe=null;function Ye(e,t,r){var n;Xe=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:Xe=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:Xe=i)}return null!=n?n:Xe}var Qe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(r){return r<=247?e.charAt(r):1424<=r&&r<=1524?"R":1536<=r&&r<=1785?t.charAt(r-1536):1774<=r&&r<=2220?"r":8192<=r&&r<=8203?"w":8204==r?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;function s(e,t,r){this.level=e,this.from=t,this.to=r}return function(e,t){var c="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!n.test(e))return!1;for(var u=e.length,d=[],f=0;f<u;++f)d.push(r(e.charCodeAt(f)));for(var p=0,h=c;p<u;++p){var g=d[p];"m"==g?d[p]=h:h=g}for(var m=0,v=c;m<u;++m){var y=d[m];"1"==y&&"r"==v?d[m]="n":o.test(y)&&(v=y,"r"==y&&(d[m]="R"))}for(var b=1,w=d[0];b<u-1;++b){var x=d[b];"+"==x&&"1"==w&&"1"==d[b+1]?d[b]="1":","!=x||w!=d[b+1]||"1"!=w&&"n"!=w||(d[b]=w),w=x}for(var C=0;C<u;++C){var k=d[C];if(","==k)d[C]="N";else if("%"==k){var M=void 0;for(M=C+1;M<u&&"%"==d[M];++M);for(var S=C&&"!"==d[C-1]||M<u&&"1"==d[M]?"1":"N",T=C;T<M;++T)d[T]=S;C=M-1}}for(var L=0,O=c;L<u;++L){var D=d[L];"L"==O&&"1"==D?d[L]="L":o.test(D)&&(O=D)}for(var P=0;P<u;++P)if(i.test(d[P])){var A=void 0;for(A=P+1;A<u&&i.test(d[A]);++A);for(var N="L"==(P?d[P-1]:c),W="L"==(A<u?d[A]:c),z=N==W?N?"L":"R":c,E=P;E<A;++E)d[E]=z;P=A-1}for(var I,F=[],_=0;_<u;)if(a.test(d[_])){var H=_;for(++_;_<u&&a.test(d[_]);++_);F.push(new s(0,H,_))}else{var R=_,B=F.length;for(++_;_<u&&"L"!=d[_];++_);for(var V=R;V<_;)if(l.test(d[V])){R<V&&F.splice(B,0,new s(1,R,V));var j=V;for(++V;V<_&&l.test(d[V]);++V);F.splice(B,0,new s(2,j,V)),R=V}else++V;R<_&&F.splice(B,0,new s(1,R,_))}return"ltr"==t&&(1==F[0].level&&(I=e.match(/^\s+/))&&(F[0].from=I[0].length,F.unshift(new s(0,0,I[0].length))),1==X(F).level&&(I=e.match(/\s+$/))&&(X(F).to-=I[0].length,F.push(new s(0,u-I[0].length,u)))),"rtl"==t?F.reverse():F}}();function Ze(e,t){var r=e.order;return null==r&&(r=e.order=Qe(e.text,t)),r}var Je=[],et=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Je).concat(r)}};function tt(e,t){return e._handlers&&e._handlers[t]||Je}function rt(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=R(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function nt(e,t){var r=tt(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function it(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),nt(e,r||t.type,e,t),ut(t)||t.codemirrorIgnore}function ot(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==R(r,t[n])&&r.push(t[n])}function at(e,t){return tt(e,t).length>0}function lt(e){e.prototype.on=function(e,t){et(this,e,t)},e.prototype.off=function(e,t){rt(this,e,t)}}function st(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ct(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ut(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function dt(e){st(e),ct(e)}function ft(e){return e.target||e.srcElement}function pt(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var ht,gt,mt=function(){if(a&&l<9)return!1;var e=D("div");return"draggable"in e||"dragDrop"in e}();function vt(e){if(null==ht){var t=D("span","​");O(e,D("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(ht=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&l<8))}var r=ht?D("span","​"):D("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function yt(e){if(null!=gt)return gt;var t=O(e,document.createTextNode("AخA")),r=S(t,0,1).getBoundingClientRect(),n=S(t,1,2).getBoundingClientRect();return L(e),!(!r||r.left==r.right)&&(gt=n.right-r.right<3)}var bt=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},wt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},xt=function(){var e=D("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Ct=null,kt={},Mt={};function St(e){if("string"==typeof e&&Mt.hasOwnProperty(e))e=Mt[e];else if(e&&"string"==typeof e.name&&Mt.hasOwnProperty(e.name)){var t=Mt[e.name];"string"==typeof t&&(t={name:t}),(e=Z(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return St("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return St("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Tt(e,t){t=St(t);var r=kt[t.name];if(!r)return Tt(e,"text/plain");var n=r(e,t);if(Lt.hasOwnProperty(t.name)){var i=Lt[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}var Lt={};function Ot(e,t){var r=Lt.hasOwnProperty(e)?Lt[e]:Lt[e]={};F(t,r)}function Dt(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Pt(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function At(e,t,r){return!e.startState||e.startState(t,r)}var Nt=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Nt.prototype.eol=function(){return this.pos>=this.string.length},Nt.prototype.sol=function(){return this.pos==this.lineStart},Nt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Nt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Nt.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Nt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Nt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Nt.prototype.skipToEnd=function(){this.pos=this.string.length},Nt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Nt.prototype.backUp=function(e){this.pos-=e},Nt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=_(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?_(this.string,this.lineStart,this.tabSize):0)},Nt.prototype.indentation=function(){return _(this.string,null,this.tabSize)-(this.lineStart?_(this.string,this.lineStart,this.tabSize):0)},Nt.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return!1!==t&&(this.pos+=e.length),!0},Nt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Nt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Nt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Nt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var Wt=function(e,t){this.state=e,this.lookAhead=t},zt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function Et(e,t,r,n){var i=[e.state.modeGen],o={};Ut(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var a=r.state,l=function(n){r.baseTokens=i;var l=e.state.overlays[n],s=1,c=0;r.state=!0,Ut(e,t.text,l.mode,r,function(e,t){for(var r=s;c<e;){var n=i[s];n>e&&i.splice(s,1,e,i[s+1],n),s+=2,c=Math.min(e,n)}if(t)if(l.opaque)i.splice(r,s-r,e,"overlay "+t),s=r+2;else for(;r<s;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+t}},o),r.state=a,r.baseTokens=null,r.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function It(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Ft(e,de(t)),i=t.text.length>e.options.maxHighlightLength&&Dt(e.doc.mode,n.state),o=Et(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ft(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new zt(n,!0,t);var o=function(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=le(o,l-1),c=s.stateAfter;if(c&&(!r||l+(c instanceof Wt?c.lookAhead:0)<=o.modeFrontier))return l;var u=_(s.text,null,e.options.tabSize);(null==i||n>u)&&(i=l-1,n=u)}return i}(e,t,r),a=o>n.first&&le(n,o-1).stateAfter,l=a?zt.fromSaved(n,a,o):new zt(n,At(n.mode),o);return n.iter(o,t,function(r){_t(e,r.text,l);var n=l.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&n<i.viewTo?l.save():null,l.nextLine()}),r&&(n.modeFrontier=l.line),l}function _t(e,t,r,n){var i=e.doc.mode,o=new Nt(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&Ht(i,r.state);!o.eol();)Rt(i,o,r.state),o.start=o.pos}function Ht(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Pt(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function Rt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Pt(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}zt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},zt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},zt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},zt.fromSaved=function(e,t,r){return t instanceof Wt?new zt(e,Dt(e.mode,t.state),r,t.lookAhead):new zt(e,Dt(e.mode,t),r)},zt.prototype.save=function(e){var t=!1!==e?Dt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Wt(t,this.maxLookAhead):t};var Bt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Vt(e,t,r,n){var i,o=e.doc,a=o.mode;t=Ce(o,t);var l,s=le(o,t.line),c=Ft(e,t.line,r),u=new Nt(s.text,e.options.tabSize,c);for(n&&(l=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=Rt(a,u,c.state),n&&l.push(new Bt(u,i,Dt(o.mode,c.state)));return n?l:new Bt(u,i,c.state)}function jt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}return e}function Ut(e,t,r,n,i,o,a){var l=r.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,c=0,u=null,d=new Nt(t,e.options.tabSize,n),f=e.options.addModeClass&&[null];for(""==t&&jt(Ht(r,n.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&_t(e,t,n,d.pos),d.pos=t.length,s=null):s=jt(Rt(r,d,n.state,f),o),f){var p=f[0].name;p&&(s="m-"+(s?p+" "+s:p))}if(!l||u!=s){for(;c<d.start;)c=Math.min(d.start,c+5e3),i(c,u);u=s}d.start=d.pos}for(;c<d.pos;){var h=Math.min(d.pos,c+5e3);i(h,u),c=h}}var Gt=function(e,t,r){this.text=e,Ne(this,t),this.height=r?r(this):1};function Kt(e){e.parent=null,Ae(e)}Gt.prototype.lineNo=function(){return de(this)},lt(Gt);var $t={},qt={};function Xt(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?qt:$t;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Yt(e,t){var r=P("span",null,null,s?"padding-right: .1px":null),n={pre:P("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;n.pos=0,n.addToken=Zt,yt(e.display.measure)&&(a=Ze(o,e.doc.direction))&&(n.addToken=Jt(n.addToken,a)),n.map=[];var l=t!=e.display.externalMeasured&&de(o);tr(o,n,It(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=z(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=z(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(vt(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var c=n.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return nt(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=z(n.pre.className,n.textClass||"")),n}function Qt(e){var t=D("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Zt(e,t,r,n,i,o,s){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/  /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}(t,e.trailingSpace):t,d=e.cm.state.specialChars,f=!1;if(d.test(t)){c=document.createDocumentFragment();for(var p=0;;){d.lastIndex=p;var h=d.exec(t),g=h?h.index-p:t.length-p;if(g){var m=document.createTextNode(u.slice(p,p+g));a&&l<9?c.appendChild(D("span",[m])):c.appendChild(m),e.map.push(e.pos,e.pos+g,m),e.col+=g,e.pos+=g}if(!h)break;p+=g+1;var v=void 0;if("\t"==h[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(v=c.appendChild(D("span",q(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==h[0]||"\n"==h[0]?((v=c.appendChild(D("span","\r"==h[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),a&&l<9?c.appendChild(D("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&l<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),r||n||i||f||s){var w=r||"";n&&(w+=n),i&&(w+=i);var x=D("span",[c],w,s);return o&&(x.title=o),e.content.appendChild(x)}e.content.appendChild(c)}}function Jt(e,t){return function(r,n,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var c=r.pos,u=c+n.length;;){for(var d=void 0,f=0;f<t.length&&!((d=t[f]).to>c&&d.from<=c);f++);if(d.to>=u)return e(r,n,i,o,a,l,s);e(r,n.slice(0,d.to-c),i,o,null,l,s),o=null,n=n.slice(d.to-c),c=d.to}}}function er(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function tr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var a,l,s,c,u,d,f,p=i.length,h=0,g=1,m="",v=0;;){if(v==h){s=c=u=d=l="",f=null,v=1/0;for(var y=[],b=void 0,w=0;w<n.length;++w){var x=n[w],C=x.marker;"bookmark"==C.type&&x.from==h&&C.widgetNode?y.push(C):x.from<=h&&(null==x.to||x.to>h||C.collapsed&&x.to==h&&x.from==h)?(null!=x.to&&x.to!=h&&v>x.to&&(v=x.to,c=""),C.className&&(s+=" "+C.className),C.css&&(l=(l?l+";":"")+C.css),C.startStyle&&x.from==h&&(u+=" "+C.startStyle),C.endStyle&&x.to==v&&(b||(b=[])).push(C.endStyle,x.to),C.title&&!d&&(d=C.title),C.collapsed&&(!f||Ee(f.marker,C)<0)&&(f=x)):x.from>h&&v>x.from&&(v=x.from)}if(b)for(var k=0;k<b.length;k+=2)b[k+1]==v&&(c+=" "+b[k]);if(!f||f.from==h)for(var M=0;M<y.length;++M)er(t,0,y[M]);if(f&&(f.from||0)==h){if(er(t,(null==f.to?p+1:f.to)-h,f.marker,null==f.from),null==f.to)return;f.to==h&&(f=!1)}}if(h>=p)break;for(var S=Math.min(p,v);;){if(m){var T=h+m.length;if(!f){var L=T>S?m.slice(0,S-h):m;t.addToken(t,L,a?a+s:s,u,h+L.length==v?c:"",d,l)}if(T>=S){m=m.slice(S-h),h=S;break}h=T,u=""}m=i.slice(o,o=r[g++]),a=Xt(r[g++],t.cm.options)}}else for(var O=1;O<r.length;O+=2)t.addToken(t,i.slice(o,o=r[O]),Xt(r[O+1],t.cm.options))}function rr(e,t,r){this.line=t,this.rest=function(e){for(var t,r;t=_e(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}(t),this.size=this.rest?de(X(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Ue(e,t)}function nr(e,t,r){for(var n,i=[],o=t;o<r;o=n){var a=new rr(e.doc,le(e.doc,o),o);n=o+a.size,i.push(a)}return i}var ir=null,or=null;function ar(e,t){var r=tt(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);ir?n=ir.delayedCallbacks:or?n=or:(n=or=[],setTimeout(lr,0));for(var o=function(e){n.push(function(){return r[e].apply(null,i)})},a=0;a<r.length;++a)o(a)}}function lr(){var e=or;or=null;for(var t=0;t<e.length;++t)e[t]()}function sr(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?dr(e,t):"gutter"==o?pr(e,t,r,n):"class"==o?fr(e,t):"widget"==o&&hr(e,t,n)}t.changes=null}function cr(e){return e.node==e.text&&(e.node=D("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&l<8&&(e.node.style.zIndex=2)),e.node}function ur(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Yt(e,t)}function dr(e,t){var r=t.text.className,n=ur(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,fr(e,t)):r&&(t.text.className=r)}function fr(e,t){!function(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=cr(t);t.background=n.insertBefore(D("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?cr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function pr(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=cr(t);t.gutterBackground=D("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=cr(t),l=t.gutter=D("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(D("div",he(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.options.gutters.length;++s){var c=e.options.gutters[s],u=o.hasOwnProperty(c)&&o[c];u&&l.appendChild(D("div",[u],"CodeMirror-gutter-elt","left: "+n.gutterLeft[c]+"px; width: "+n.gutterWidth[c]+"px"))}}}function hr(e,t,r){t.alignable&&(t.alignable=null);for(var n=t.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,"CodeMirror-linewidget"==n.className&&t.node.removeChild(n);mr(e,t,r)}function gr(e,t,r,n){var i=ur(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),fr(e,t),pr(e,t,r,n),mr(e,t,n),t.node}function mr(e,t,r){if(vr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)vr(e,t.rest[n],t,r,!1)}function vr(e,t,r,n,i){if(t.widgets)for(var o=cr(r),a=0,l=t.widgets;a<l.length;++a){var s=l[a],c=D("div",[s.node],"CodeMirror-linewidget");s.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),yr(s,c,r,n),e.display.input.setUneditable(c),i&&s.above?o.insertBefore(c,r.gutter||r.text):o.appendChild(c),ar(s,"redraw")}}function yr(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function br(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!A(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),O(t.display.measure,D("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function wr(e,t){for(var r=ft(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function xr(e){return e.lineSpace.offsetTop}function Cr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function kr(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=O(e.measure,D("pre","x")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function Mr(e){return B-e.display.nativeBarWidth}function Sr(e){return e.display.scroller.clientWidth-Mr(e)-e.display.barWidth}function Tr(e){return e.display.scroller.clientHeight-Mr(e)-e.display.barHeight}function Lr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(de(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Or(e,t,r,n){return Ar(e,Pr(e,t),r,n)}function Dr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ln(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Pr(e,t){var r=de(t),n=Dr(e,r);n&&!n.text?n=null:n&&n.changes&&(sr(e,n,r,tn(e)),e.curOp.forceUpdate=!0),n||(n=function(e,t){var r=de(t=Be(t)),n=e.display.externalMeasured=new rr(e.doc,t,r);n.lineN=r;var i=n.built=Yt(e,n);return n.text=i.pre,O(e.display.lineMeasure,i.pre),n}(e,t));var i=Lr(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Ar(e,t,r,n,i){t.before&&(r=-1);var o,s=r+(n||"");return t.cache.hasOwnProperty(s)?o=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,r){var n=e.options.lineWrapping,i=n&&Sr(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],c=a[l+1];Math.abs(s.bottom-c.bottom)>2&&o.push((s.bottom+c.top)/2-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,r,n){var i,o=zr(t.map,r,n),s=o.node,c=o.start,u=o.end,d=o.collapse;if(3==s.nodeType){for(var f=0;f<4;f++){for(;c&&ie(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&ie(t.line.text.charAt(o.coverStart+u));)++u;if((i=a&&l<9&&0==c&&u==o.coverEnd-o.coverStart?s.parentNode.getBoundingClientRect():Er(S(s,c,u).getClientRects(),n)).left||i.right||0==c)break;u=c,c-=1,d="right"}a&&l<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Ct)return Ct;var t=O(e,D("span","x")),r=t.getBoundingClientRect(),n=S(t,0,1).getBoundingClientRect();return Ct=Math.abs(r.left-n.left)>1}(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,i))}else{var p;c>0&&(d=n="right"),i=e.options.lineWrapping&&(p=s.getClientRects()).length>1?p["right"==n?p.length-1:0]:s.getBoundingClientRect()}if(a&&l<9&&!c&&(!i||!i.left&&!i.right)){var h=s.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+en(e.display),top:h.top,bottom:h.bottom}:Wr}for(var g=i.top-t.rect.top,m=i.bottom-t.rect.top,v=(g+m)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(v<y[b]);b++);var w=b?y[b-1]:0,x=y[b],C={left:("right"==d?i.right:i.left)-t.rect.left,right:("left"==d?i.left:i.right)-t.rect.left,top:w,bottom:x};return i.left||i.right||(C.bogus=!0),e.options.singleCursorHeightPerLine||(C.rtop=g,C.rbottom=m),C}(e,t,r,n)).bogus||(t.cache[s]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Nr,Wr={left:0,right:0,top:0,bottom:0};function zr(e,t,r){for(var n,i,o,a,l,s,c=0;c<e.length;c+=3)if(l=e[c],s=e[c+1],t<l?(i=0,o=1,a="left"):t<s?o=1+(i=t-l):(c==e.length-3||t==s&&e[c+3]>t)&&(i=(o=s-l)-1,t>=s&&(a="right")),null!=i){if(n=e[c+2],l==s&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)n=e[2+(c-=3)],a="left";if("right"==r&&i==s-l)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)n=e[(c+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function Er(e,t){var r=Wr;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function Ir(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 Fr(e){e.display.externalMeasure=null,L(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Ir(e.display.view[t])}function _r(e){Fr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Hr(){return u&&m?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Rr(){return u&&m?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Br(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=br(e.widgets[r]));return t}function Vr(e,t,r,n,i){if(!i){var o=Br(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var a=Ke(t);if("local"==n?a+=xr(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==n?0:Rr());var s=l.left+("window"==n?0:Hr());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function jr(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=Hr(),i-=Rr();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:i-a.top}}function Ur(e,t,r,n,i){return n||(n=le(e.doc,t.line)),Vr(e,n,Or(e,n,t.ch,i),r)}function Gr(e,t,r,n,i,o){function a(t,a){var l=Ar(e,i,t,a?"right":"left",o);return a?l.left=l.right:l.right=l.left,Vr(e,n,l,r)}n=n||le(e.doc,t.line),i||(i=Pr(e,n));var l=Ze(n,e.doc.direction),s=t.ch,c=t.sticky;if(s>=n.text.length?(s=n.text.length,c="before"):s<=0&&(s=0,c="after"),!l)return a("before"==c?s-1:s,"before"==c);function u(e,t,r){var n=l[t],i=1==n.level;return a(r?e-1:e,i!=r)}var d=Ye(l,s,c),f=Xe,p=u(s,d,"before"==c);return null!=f&&(p.other=u(s,f,"before"!=c)),p}function Kr(e,t){var r=0;t=Ce(e.doc,t),e.options.lineWrapping||(r=en(e.display)*t.ch);var n=le(e.doc,t.line),i=Ke(n)+xr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function $r(e,t,r,n,i){var o=ge(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function qr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return $r(n.first,0,null,!0,-1);var i=fe(n,r),o=n.first+n.size-1;if(i>o)return $r(n.first+n.size-1,le(n,o).text.length,null,!0,1);t<0&&(t=0);for(var a=le(n,i);;){var l=Zr(e,a,i,t,r),s=He(a,l.ch+(l.xRel>0?1:0));if(!s)return l;var c=s.find(1);if(c.line==i)return c;a=le(n,i=c.line)}}function Xr(e,t,r,n){n-=Br(t);var i=t.text.length,o=ae(function(t){return Ar(e,r,t-1).bottom<=n},i,0);return i=ae(function(t){return Ar(e,r,t).top>n},o,i),{begin:o,end:i}}function Yr(e,t,r,n){r||(r=Pr(e,t));var i=Vr(e,t,Ar(e,r,n),"line").top;return Xr(e,t,r,i)}function Qr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Zr(e,t,r,n,i){i-=Ke(t);var o=Pr(e,t),a=Br(t),l=0,s=t.text.length,c=!0,u=Ze(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?function(e,t,r,n,i,o,a){var l=Xr(e,t,n,a),s=l.begin,c=l.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f<i.length;f++){var p=i[f];if(!(p.from>=c||p.to<=s)){var h=1!=p.level,g=Ar(e,n,h?Math.min(c,p.to)-1:Math.max(s,p.from)).right,m=g<o?o-g+1e9:g-o;(!u||d>m)&&(u=p,d=m)}}return u||(u=i[i.length-1]),u.from<s&&(u={from:s,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}:function(e,t,r,n,i,o,a){var l=ae(function(l){var s=i[l],c=1!=s.level;return Qr(Gr(e,ge(r,c?s.to:s.from,c?"before":"after"),"line",t,n),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var c=1!=s.level,u=Gr(e,ge(r,c?s.from:s.to,c?"after":"before"),"line",t,n);Qr(u,o,a,!0)&&u.top>a&&(s=i[l-1])}return s})(e,t,r,o,u,n,i);c=1!=d.level,l=c?d.from:d.to-1,s=c?d.to:d.from-1}var f,p,h=null,g=null,m=ae(function(t){var r=Ar(e,o,t);return r.top+=a,r.bottom+=a,!!Qr(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(h=t,g=r),!0)},l,s),v=!1;if(g){var y=n-g.left<g.right-n,b=y==c;m=h+(b?0:1),p=b?"after":"before",f=y?g.left:g.right}else{c||m!=s&&m!=l||m++,p=0==m?"after":m==t.text.length?"before":Ar(e,o,m-(c?1:0)).bottom+a<=i==c?"after":"before";var w=Gr(e,ge(r,m,p),"line",t,o);f=w.left,v=i<w.top||i>=w.bottom}return m=oe(t.text,m,1),$r(r,m,p,v,n-f)}function Jr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Nr){Nr=D("pre");for(var t=0;t<49;++t)Nr.appendChild(document.createTextNode("x")),Nr.appendChild(D("br"));Nr.appendChild(document.createTextNode("x"))}O(e.measure,Nr);var r=Nr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),L(e.measure),r||1}function en(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=D("span","xxxxxxxxxx"),r=D("pre",[t]);O(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function tn(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)r[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[a]]=o.clientWidth;return{fixedPos:rn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function rn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function nn(e){var t=Jr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/en(e.display)-3);return function(i){if(Ue(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function on(e){var t=e.doc,r=nn(e);t.iter(function(e){var t=r(e);t!=e.height&&ue(e,t)})}function an(e,t,r,n){var i=e.display;if(!r&&"true"==ft(t).getAttribute("cm-not-content"))return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(t){return null}var s,c=qr(e,o,a);if(n&&1==c.xRel&&(s=le(e.doc,c.line).text).length==c.ch){var u=_(s,s.length,e.options.tabSize)-s.length;c=ge(c.line,Math.max(0,Math.round((o-kr(e.display).left)/en(e.display))-u))}return c}function ln(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function sn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function cn(e,t){void 0===t&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=0;a<r.sel.ranges.length;a++)if(t||a!=r.sel.primIndex){var l=r.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&un(e,l.head,i),s||fn(e,l,o)}}return n}function un(e,t,r){var n=Gr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(D("div"," ","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var o=r.appendChild(D("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=n.other.left+"px",o.style.top=n.other.top+"px",o.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function dn(e,t){return e.top-t.top||e.left-t.left}function fn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),a=kr(e.display),l=a.left,s=Math.max(n.sizerWidth,Sr(e)-n.sizer.offsetLeft)-a.right,c="ltr"==i.direction;function u(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(D("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n                             top: "+t+"px; width: "+(null==r?s-e:r)+"px;\n                             height: "+(n-t)+"px"))}function d(t,r,n){var o,a,d=le(i,t),f=d.text.length;function p(r,n){return Ur(e,ge(t,r),"div",d,n)}function h(t,r,n){var i=Yr(e,d,null,t),o="ltr"==r==("after"==n)?"left":"right",a="after"==n?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1);return p(a,o)[o]}var g=Ze(d,i.direction);return function(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}(g,r||0,null==n?f:n,function(e,t,i,d){var m="ltr"==i,v=p(e,m?"left":"right"),y=p(t-1,m?"right":"left"),b=null==r&&0==e,w=null==n&&t==f,x=0==d,C=!g||d==g.length-1;if(y.top-v.top<=3){var k=(c?b:w)&&x,M=(c?w:b)&&C,S=k?l:(m?v:y).left,T=M?s:(m?y:v).right;u(S,v.top,T-S,v.bottom)}else{var L,O,D,P;m?(L=c&&b&&x?l:v.left,O=c?s:h(e,i,"before"),D=c?l:h(t,i,"after"),P=c&&w&&C?s:y.right):(L=c?h(e,i,"before"):l,O=!c&&b&&x?s:v.right,D=!c&&w&&C?l:y.left,P=c?h(t,i,"after"):s),u(L,v.top,O-L,v.bottom),v.bottom<y.top&&u(l,v.bottom,null,y.top),u(D,y.top,P-D,y.bottom)}(!o||dn(v,o)<0)&&(o=v),dn(y,o)<0&&(o=y),(!a||dn(v,a)<0)&&(a=v),dn(y,a)<0&&(a=y)}),{start:o,end:a}}var f=t.from(),p=t.to();if(f.line==p.line)d(f.line,f.ch,p.ch);else{var h=le(i,f.line),g=le(i,p.line),m=Be(h)==Be(g),v=d(f.line,f.ch,m?h.text.length+1:null).end,y=d(p.line,m?0:null,p.ch).start;m&&(v.top<y.top-2?(u(v.right,v.top,null,v.bottom),u(l,y.top,y.left,y.bottom)):u(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&u(l,v.bottom,null,y.top)}r.appendChild(o)}function pn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function hn(e){e.state.focused||(e.display.input.focus(),mn(e))}function gn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,vn(e))},100)}function mn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(nt(e,"focus",e,t),e.state.focused=!0,W(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),pn(e))}function vn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(nt(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function yn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=void 0;if(!i.hidden){if(a&&l<8){var s=i.node.offsetTop+i.node.offsetHeight;o=s-r,r=s}else{var c=i.node.getBoundingClientRect();o=c.bottom-c.top}var u=i.line.height-o;if(o<2&&(o=Jr(t)),(u>.005||u<-.005)&&(ue(i.line,o),bn(i.line),i.rest))for(var d=0;d<i.rest.length;d++)bn(i.rest[d])}}}function bn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function wn(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-xr(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=fe(t,n),a=fe(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=fe(t,Ke(le(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=fe(t,Ke(le(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function xn(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=rn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=o),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o));var l=r[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function Cn(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=he(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(D("div",[D("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-a)+1,n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",si(e),!0}return!1}function kn(e,t){var r=e.display,n=Jr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Tr(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+Cr(r),s=t.top<n,c=t.bottom>l-n;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?l:t.bottom)-o);u!=i&&(a.scrollTop=u)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,f=Sr(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.left<d?a.scrollLeft=Math.max(0,t.left-(p?0:10)):t.right>f+d-3&&(a.scrollLeft=t.right+(p?0:10)-f),a}function Mn(e,t){null!=t&&(Ln(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Sn(e){Ln(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Tn(e,t,r){null==t&&null==r||Ln(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function Ln(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=Kr(e,t.from),n=Kr(e,t.to);On(e,r,n,t.margin)}}function On(e,t,r,n){var i=kn(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Tn(e,i.scrollLeft,i.scrollTop)}function Dn(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||li(e,{top:t}),Pn(e,t,!0),r&&li(e),ri(e,100))}function Pn(e,t,r){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function An(e,t,r,n){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,xn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Nn(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Cr(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?r:0,docHeight:n,scrollHeight:n+Mr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Wn=function(e,t,r){this.cm=r;var n=this.vert=D("div",[D("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=D("div",[D("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),et(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),et(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,a&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Wn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n: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=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Wn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Wn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Wn.prototype.zeroWidthHack=function(){var e=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new H,this.disableVert=new H},Wn.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto",t.set(1e3,function n(){var i=e.getBoundingClientRect(),o="vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.pointerEvents="none":t.set(1e3,n)})},Wn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var zn=function(){};function En(e,t){t||(t=Nn(e));var r=e.display.barWidth,n=e.display.barHeight;In(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&yn(e),In(e,Nn(e)),r=e.display.barWidth,n=e.display.barHeight}function In(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}zn.prototype.update=function(){return{bottom:0,right:0}},zn.prototype.setScrollLeft=function(){},zn.prototype.setScrollTop=function(){},zn.prototype.clear=function(){};var Fn={native:Wn,null:zn};function _n(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Fn[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),et(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?An(e,t):Dn(e,t)},e),e.display.scrollbars.addClass&&W(e.display.wrapper,e.display.scrollbars.addClass)}var Hn=0;function Rn(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:++Hn},function(e){ir?ir.ops.push(e):e.ownsGroup=ir={ops:[e],delayedCallbacks:[]}}(e.curOp)}function Bn(e){var t=e.curOp;!function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}(r)}finally{ir=null,t(r)}}(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,r=0;r<t.length;r++)Vn(t[r]);for(var n=0;n<t.length;n++)jn(t[n]);for(var i=0;i<t.length;i++)Un(t[i]);for(var o=0;o<t.length;o++)Gn(t[o]);for(var a=0;a<t.length;a++)Kn(t[a])}(e)})}function Vn(e){var t=e.cm,r=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Mr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Mr(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&qe(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ii(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function jn(e){e.updatedDisplay=e.mustUpdate&&oi(e.cm,e.update)}function Un(e){var t=e.cm,r=t.display;e.updatedDisplay&&yn(t),e.barMeasure=Nn(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Or(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Mr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Sr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Gn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&An(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==N();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&En(t,e.barMeasure),e.updatedDisplay&&ci(t,e.barMeasure),e.selectionChanged&&pn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&hn(e.cm)}function Kn(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&ai(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&Pn(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&An(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=function(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(t=t.ch?ge(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t,r="before"==t.sticky?ge(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=Gr(e,t),s=r&&r!=t?Gr(e,r):l;i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-n,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+n};var c=kn(e,i),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(Dn(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(An(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}(t,Ce(n,e.scrollToPos.from),Ce(n,e.scrollToPos.to),e.scrollToPos.margin);!function(e,t){if(!it(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!h){var o=D("div","​",null,"position: absolute;\n                         top: "+(t.top-r.viewOffset-xr(e.display))+"px;\n                         height: "+(t.bottom-t.top+Mr(e)+r.barHeight)+"px;\n                         left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||nt(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&nt(a[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&nt(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function $n(e,t){if(e.curOp)return t();Rn(e);try{return t()}finally{Bn(e)}}function qn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Rn(e);try{return t.apply(e,arguments)}finally{Bn(e)}}}function Xn(e){return function(){if(this.curOp)return e.apply(this,arguments);Rn(this);try{return e.apply(this,arguments)}finally{Bn(this)}}}function Yn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Rn(t);try{return e.apply(this,arguments)}finally{Bn(t)}}}function Qn(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Se&&Ve(e.doc,t)<i.viewTo&&Jn(e);else if(r<=i.viewFrom)Se&&je(e.doc,r+n)>i.viewFrom?Jn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Jn(e);else if(t<=i.viewFrom){var o=ei(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Jn(e)}else if(r>=i.viewTo){var a=ei(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Jn(e)}else{var l=ei(e,t,t,-1),s=ei(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(nr(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):Jn(e)}var c=i.externalMeasured;c&&(r<c.lineN?c.lineN+=n:t<c.lineN+c.size&&(i.externalMeasured=null))}function Zn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[ln(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==R(a,r)&&a.push(r)}}}function Jn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ei(e,t,r,n){var i,o=ln(e,t),a=e.display.view;if(!Se||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var l=e.display.viewFrom,s=0;s<o;s++)l+=a[s].size;if(l!=t){if(n>0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,r+=i}for(;Ve(e.doc,r)!=r;){if(o==(n<0?0:a.length-1))return null;r+=n*a[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function ti(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function ri(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,I(ni,e))}function ni(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=Ft(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?Dt(t.mode,n.state):null,s=Et(e,o,n,!0);l&&(n.state=l),o.styles=s.styles;var c=o.styleClasses,u=s.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&f<a.length;++f)d=a[f]!=o.styles[f];d&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&_t(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return ri(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&$n(e,function(){for(var t=0;t<i.length;t++)Zn(e,i[t],"text")})}}var ii=function(e,t,r){var n=e.display;this.viewport=t,this.visible=wn(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Sr(e),this.force=r,this.dims=tn(e),this.events=[]};function oi(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Jn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==ti(e))return!1;Cn(e)&&(Jn(e),t.dims=tn(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>a&&r.viewTo-a<20&&(a=Math.min(i,r.viewTo)),Se&&(o=Ve(e.doc,o),a=je(e.doc,a));var l=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;!function(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=nr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=nr(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(ln(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(nr(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,ln(e,r)))),n.viewTo=r}(e,o,a),r.viewOffset=Ke(le(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var c=ti(e);if(!l&&0==c&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=N();if(!t||!A(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&A(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return c>4&&(r.lineDiv.style.display="none"),function(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,a=o.firstChild;function l(t){var r=t.nextSibling;return s&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var c=n.view,u=n.viewFrom,d=0;d<c.length;d++){var f=c[d];if(f.hidden);else if(f.node&&f.node.parentNode==o){for(;a!=f.node;)a=l(a);var p=i&&null!=t&&t<=u&&f.lineNumber;f.changes&&(R(f.changes,"gutter")>-1&&(p=!1),sr(e,f,u,r)),p&&(L(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(he(e.options,u)))),a=f.node.nextSibling}else{var h=gr(e,f,u,r);o.insertBefore(h,a)}u+=f.size}for(;a;)a=l(a)}(e,r.updateLineNumbers,t.dims),c>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=N()&&(e.activeElt.focus(),e.anchorNode&&A(document.body,e.anchorNode)&&A(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(u),L(r.cursorDiv),L(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ri(e,400)),r.updateLineNumbers=null,!0}function ai(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Sr(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Cr(e.display)-Tr(e),r.top)}),t.visible=wn(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&oi(e,t);n=!1){yn(e);var i=Nn(e);sn(e),En(e,i),ci(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function li(e,t){var r=new ii(e,t);if(oi(e,r)){yn(e),ai(e,r);var n=Nn(e);sn(e),En(e,n),ci(e,n),r.finish()}}function si(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function ci(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+Mr(e)+"px"}function ui(e){var t=e.display.gutters,r=e.options.gutters;L(t);for(var n=0;n<r.length;++n){var i=r[n],o=t.appendChild(D("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=n?"":"none",si(e)}function di(e){var t=R(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))}ii.prototype.signal=function(e,t){at(e,t)&&this.events.push(arguments)},ii.prototype.finish=function(){for(var e=0;e<this.events.length;e++)nt.apply(null,this.events[e])};var fi=0,pi=null;function hi(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function gi(e){var t=hi(e);return t.x*=pi,t.y*=pi,t}function mi(e,t){var n=hi(t),i=n.x,o=n.y,a=e.display,l=a.scroller,c=l.scrollWidth>l.clientWidth,u=l.scrollHeight>l.clientHeight;if(i&&c||o&&u){if(o&&y&&s)e:for(var f=t.target,p=a.view;f!=l;f=f.parentNode)for(var h=0;h<p.length;h++)if(p[h].node==f){e.display.currentWheelTarget=f;break e}if(i&&!r&&!d&&null!=pi)return o&&u&&Dn(e,Math.max(0,l.scrollTop+o*pi)),An(e,Math.max(0,l.scrollLeft+i*pi)),(!o||o&&u)&&st(t),void(a.wheelStartX=null);if(o&&null!=pi){var g=o*pi,m=e.doc.scrollTop,v=m+a.wrapper.clientHeight;g<0?m=Math.max(0,m+g-50):v=Math.min(e.doc.height,v+g+50),li(e,{top:m,bottom:v})}fi<20&&(null==a.wheelStartX?(a.wheelStartX=l.scrollLeft,a.wheelStartY=l.scrollTop,a.wheelDX=i,a.wheelDY=o,setTimeout(function(){if(null!=a.wheelStartX){var e=l.scrollLeft-a.wheelStartX,t=l.scrollTop-a.wheelStartY,r=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null,r&&(pi=(pi*fi+r)/(fi+1),++fi)}},200)):(a.wheelDX+=i,a.wheelDY+=o))}}a?pi=-.53:r?pi=15:u?pi=-.7:f&&(pi=-1/3);var vi=function(e,t){this.ranges=e,this.primIndex=t};vi.prototype.primary=function(){return this.ranges[this.primIndex]},vi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!ve(r.anchor,n.anchor)||!ve(r.head,n.head))return!1}return!0},vi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new yi(ye(this.ranges[t].anchor),ye(this.ranges[t].head));return new vi(e,this.primIndex)},vi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},vi.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(me(t,n.from())>=0&&me(e,n.to())<=0)return r}return-1};var yi=function(e,t){this.anchor=e,this.head=t};function bi(e,t){var r=e[t];e.sort(function(e,t){return me(e.from(),t.from())}),t=R(e,r);for(var n=1;n<e.length;n++){var i=e[n],o=e[n-1];if(me(o.to(),i.from())>=0){var a=we(o.from(),i.from()),l=be(o.to(),i.to()),s=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new yi(s?l:a,s?a:l))}}return new vi(e,t)}function wi(e,t){return new vi([new yi(e,t||e)],0)}function xi(e){return e.text?ge(e.from.line+e.text.length-1,X(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ci(e,t){if(me(e,t.from)<0)return e;if(me(e,t.to)<=0)return xi(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=xi(t).ch-t.to.ch),ge(r,n)}function ki(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new yi(Ci(i.anchor,t),Ci(i.head,t)))}return bi(r,e.sel.primIndex)}function Mi(e,t,r){return e.line==t.line?ge(r.line,e.ch-t.ch+r.ch):ge(r.line+(e.line-t.line),e.ch)}function Si(e){e.doc.mode=Tt(e.options,e.doc.modeOption),Ti(e)}function Ti(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ri(e,100),e.state.modeGen++,e.curOp&&Qn(e)}function Li(e,t){return 0==t.from.ch&&0==t.to.ch&&""==X(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Oi(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){!function(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Ae(e),Ne(e,r);var i=n?n(e):1;i!=e.height&&ue(e,i)}(e,r,i,n),ar(e,"change",e,t)}function a(e,t){for(var r=[],o=e;o<t;++o)r.push(new Gt(c[o],i(o),n));return r}var l=t.from,s=t.to,c=t.text,u=le(e,l.line),d=le(e,s.line),f=X(c),p=i(c.length-1),h=s.line-l.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Li(e,t)){var g=a(0,c.length-1);o(d,d.text,p),h&&e.remove(l.line,h),g.length&&e.insert(l.line,g)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,l.ch)+f+u.text.slice(s.ch),p);else{var m=a(1,c.length-1);m.push(new Gt(f+u.text.slice(s.ch),p,n)),o(u,u.text.slice(0,l.ch)+c[0],i(0)),e.insert(l.line+1,m)}else if(1==c.length)o(u,u.text.slice(0,l.ch)+c[0]+d.text.slice(s.ch),i(0)),e.remove(l.line+1,h);else{o(u,u.text.slice(0,l.ch)+c[0],i(0)),o(d,f+d.text.slice(s.ch),p);var v=a(1,c.length-1);h>1&&e.remove(l.line+1,h-1),e.insert(l.line+1,v)}ar(e,"change",e,t)}function Di(e,t,r){!function e(n,i,o){if(n.linked)for(var a=0;a<n.linked.length;++a){var l=n.linked[a];if(l.doc!=i){var s=o&&l.sharedHist;r&&!s||(t(l.doc,s),e(l.doc,n,s))}}}(e,null,!0)}function Pi(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,on(e),Si(e),Ai(e),e.options.lineWrapping||qe(e),e.options.mode=t.modeOption,Qn(e)}function Ai(e){("rtl"==e.doc.direction?W:T)(e.display.lineDiv,"CodeMirror-rtl")}function Ni(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 Wi(e,t){var r={from:ye(t.from),to:xi(t),text:se(e,t.from,t.to)};return _i(e,r,t.from.line,t.to.line+1),Di(e,function(e){return _i(e,r,t.from.line,t.to.line+1)},!0),r}function zi(e){for(;e.length;){var t=X(e);if(!t.ranges)break;e.pop()}}function Ei(e,t,r,n){var i=e.history;i.undone.length=0;var o,a,l=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(zi(e.done),X(e.done)):e.done.length&&!X(e.done).ranges?X(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),X(e.done)):void 0}(i,i.lastOp==n)))a=X(o.changes),0==me(t.from,t.to)&&0==me(t.from,a.to)?a.to=xi(t):o.changes.push(Wi(e,t));else{var s=X(i.done);for(s&&s.ranges||Fi(e.sel,i.done),o={changes:[Wi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,a||nt(e,"historyAdded")}function Ii(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,X(i.done),t))?i.done[i.done.length-1]=t:Fi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&zi(i.undone)}function Fi(e,t){var r=X(t);r&&r.ranges&&r.equals(e)||t.push(e)}function _i(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function Hi(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function Ri(e,t){var r=function(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(Hi(r[i]));return n}(e,t),n=De(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],c=0;c<o.length;++c)if(o[c].marker==s.marker)continue e;o.push(s)}else a&&(r[i]=a)}return r}function Bi(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?vi.prototype.deepCopy.call(o):o);else{var a=o.changes,l=[];n.push({changes:l});for(var s=0;s<a.length;++s){var c=a[s],u=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&R(t,Number(u[1]))>-1&&(X(l)[d]=c[d],delete c[d])}}}return n}function Vi(e,t,r,n){if(n){var i=e.anchor;if(r){var o=me(t,i)<0;o!=me(r,i)<0?(i=t,t=r):o!=me(t,r)<0&&(t=r)}return new yi(i,t)}return new yi(r||t,t)}function ji(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),qi(e,new vi([Vi(e.sel.primary(),t,r,i)],0),n)}function Ui(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=Vi(e.sel.ranges[o],t[o],null,i);var a=bi(n,e.sel.primIndex);qi(e,a,r)}function Gi(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,qi(e,bi(i,e.sel.primIndex),n)}function Ki(e,t,r,n){qi(e,wi(t,r),n)}function $i(e,t,r){var n=e.history.done,i=X(n);i&&i.ranges?(n[n.length-1]=t,Xi(e,t,r)):qi(e,t,r)}function qi(e,t,r){Xi(e,t,r),Ii(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Xi(e,t,r){(at(e,"beforeSelectionChange")||e.cm&&at(e.cm,"beforeSelectionChange"))&&(t=function(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new yi(Ce(e,t[r].anchor),Ce(e,t[r].head))},origin:r&&r.origin};return nt(e,"beforeSelectionChange",e,n),e.cm&&nt(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?bi(n.ranges,n.ranges.length-1):t}(e,t,r));var n=r&&r.bias||(me(t.primary().head,e.sel.primary().head)<0?-1:1);Yi(e,Zi(e,t,n,!0)),r&&!1===r.scroll||!e.cm||Sn(e.cm)}function Yi(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,ot(e.cm)),ar(e,"cursorActivity",e))}function Qi(e){Yi(e,Zi(e,e.sel,null,!1))}function Zi(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=eo(e,a.anchor,l&&l.anchor,r,n),c=eo(e,a.head,l&&l.head,r,n);(i||s!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new yi(s,c))}return i?bi(i,t.primIndex):t}function Ji(e,t,r,n,i){var o=le(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker;if((null==l.from||(s.inclusiveLeft?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(s.inclusiveRight?l.to>=t.ch:l.to>t.ch))){if(i&&(nt(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(r){var c=s.find(n<0?1:-1),u=void 0;if((n<0?s.inclusiveRight:s.inclusiveLeft)&&(c=to(e,c,-n,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=me(c,r))&&(n<0?u<0:u>0))return Ji(e,c,t,n,i)}var d=s.find(n<0?-1:1);return(n<0?s.inclusiveLeft:s.inclusiveRight)&&(d=to(e,d,n,d.line==t.line?o:null)),d?Ji(e,d,t,n,i):null}}return t}function eo(e,t,r,n,i){var o=n||1,a=Ji(e,t,r,o,i)||!i&&Ji(e,t,r,o,!0)||Ji(e,t,r,-o,i)||!i&&Ji(e,t,r,-o,!0);return a||(e.cantEdit=!0,ge(e.first,0))}function to(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?Ce(e,ge(t.line-1)):null:r>0&&t.ch==(n||le(e,t.line)).text.length?t.line<e.first+e.size-1?ge(t.line+1,0):null:new ge(t.line,t.ch+r)}function ro(e){e.setSelection(ge(e.firstLine(),0),ge(e.lastLine()),j)}function no(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,i,o){t&&(n.from=Ce(e,t)),r&&(n.to=Ce(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),nt(e,"beforeChange",e,n),e.cm&&nt(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function io(e,t,r){if(e.cm){if(!e.cm.curOp)return qn(e.cm,io)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(at(e,"beforeChange")||e.cm&&at(e.cm,"beforeChange"))||(t=no(e,t,!0))){var n=Me&&!r&&function(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=R(n,r)||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[o],l=a.find(0),s=0;s<i.length;++s){var c=i[s];if(!(me(c.to,l.from)<0||me(c.from,l.to)>0)){var u=[s,1],d=me(c.from,l.from),f=me(c.to,l.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:l.from}),(f>0||!a.inclusiveRight&&!f)&&u.push({from:l.to,to:c.to}),i.splice.apply(i,u),s+=u.length-3}}return i}(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)oo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else oo(e,t)}}function oo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=me(t.from,t.to)){var r=ki(e,t);Ei(e,t,r,e.cm?e.cm.curOp.id:NaN),so(e,t,r,De(e,t));var n=[];Di(e,function(e,r){r||-1!=R(n,e.history)||(po(e.history,t),n.push(e.history)),so(e,t,null,De(e,t))})}}function ao(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var i,o=e.history,a=e.sel,l="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,c=0;c<l.length&&(i=l[c],r?!i.ranges||i.equals(e.sel):i.ranges);c++);if(c!=l.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=l.pop()).ranges){if(n)return void l.push(i);break}if(Fi(i,s),r&&!i.equals(e.sel))return void qi(e,i,{clearRedo:!1});a=i}var u=[];Fi(a,s),s.push({changes:u,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var d=at(e,"beforeChange")||e.cm&&at(e.cm,"beforeChange"),f=function(r){var n=i.changes[r];if(n.origin=t,d&&!no(e,n,!1))return l.length=0,{};u.push(Wi(e,n));var o=r?ki(e,n):X(l);so(e,n,o,Ri(e,n)),!r&&e.cm&&e.cm.scrollIntoView({from:n.from,to:xi(n)});var a=[];Di(e,function(e,t){t||-1!=R(a,e.history)||(po(e.history,n),a.push(e.history)),so(e,n,null,Ri(e,n))})},p=i.changes.length-1;p>=0;--p){var h=f(p);if(h)return h.v}}}}function lo(e,t){if(0!=t&&(e.first+=t,e.sel=new vi(Y(e.sel.ranges,function(e){return new yi(ge(e.anchor.line+t,e.anchor.ch),ge(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Qn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Zn(e.cm,n,"gutter")}}function so(e,t,r,n){if(e.cm&&!e.cm.curOp)return qn(e.cm,so)(e,t,r,n);if(t.to.line<e.first)lo(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);lo(e,i),t={from:ge(e.first,0),to:ge(t.to.line+i,t.to.ch),text:[X(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:ge(o,le(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=se(e,t.from,t.to),r||(r=ki(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=de(Be(le(n,o.line))),n.iter(s,a.line+1,function(e){if(e==i.maxLine)return l=!0,!0})),n.sel.contains(t.from,t.to)>-1&&ot(e),Oi(n,t,r,nn(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,function(e){var t=$e(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=le(e,n).stateAfter;if(i&&(!(i instanceof Wt)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}(n,o.line),ri(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?Qn(e):o.line!=a.line||1!=t.text.length||Li(e.doc,t)?Qn(e,o.line,a.line+1,c):Zn(e,o.line,"text");var u=at(e,"changes"),d=at(e,"change");if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&ar(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}(e.cm,t,n):Oi(e,t,n),Xi(e,r,j)}}function co(e,t,r,n,i){var o;n||(n=r),me(n,r)<0&&(r=(o=[n,r])[0],n=o[1]),"string"==typeof t&&(t=e.splitLines(t)),io(e,{from:r,to:n,text:t,origin:i})}function uo(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function fo(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var l=0;l<o.ranges.length;l++)uo(o.ranges[l].anchor,t,r,n),uo(o.ranges[l].head,t,r,n)}else{for(var s=0;s<o.changes.length;++s){var c=o.changes[s];if(r<c.from.line)c.from=ge(c.from.line+n,c.from.ch),c.to=ge(c.to.line+n,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function po(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;fo(e.done,r,n,i),fo(e.undone,r,n,i)}function ho(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=le(e,xe(e,t)):i=de(t),null==i?null:(n(o,i)&&e.cm&&Zn(e.cm,i,r),o)}function go(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function mo(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}yi.prototype.from=function(){return we(this.anchor,this.head)},yi.prototype.to=function(){return be(this.anchor,this.head)},yi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},go.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,Kt(i),ar(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},mo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),a=n.height;if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof go))){var l=[];this.collapse(l),this.children=[new go(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new go(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++n,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new mo(t);if(e.parent){e.size-=r.size,e.height-=r.height;var n=R(e.parent.children,e);e.parent.children.splice(n+1,0,r)}else{var i=new mo(e.children);i.parent=e,e.children=[i,r],e=i}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,r))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var vo=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};function yo(e,t,r){Ke(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Mn(e,r)}vo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=de(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=br(this);ue(r,Math.max(0,r.height-o)),e&&($n(e,function(){yo(e,r,-o),Zn(e,n,"widget")}),ar(e,"lineWidgetCleared",e,this,n))}},vo.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=br(this)-t;i&&(Ue(this.doc,n)||ue(n,n.height+i),r&&$n(r,function(){r.curOp.forceUpdate=!0,yo(r,n,i),ar(r,"lineWidgetChanged",r,e,de(n))}))},lt(vo);var bo=0,wo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++bo};function xo(e,t,r,n,i){if(n&&n.shared)return function(e,t,r,n,i){(n=F(n)).shared=!1;var o=[xo(e,t,r,n,i)],a=o[0],l=n.widgetNode;return Di(e,function(e){l&&(n.widgetNode=l.cloneNode(!0)),o.push(xo(e,Ce(e,t),Ce(e,r),n,i));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=X(o)}),new Co(o,a)}(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return qn(e.cm,xo)(e,t,r,n,i);var o=new wo(e,i),a=me(t,r);if(n&&F(n,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=P("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Re(e,t.line,t,r,o)||t.line!=r.line&&Re(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Se=!0}o.addToHistory&&Ei(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l,s=t.line,c=e.cm;if(e.iter(s,r.line+1,function(e){c&&o.collapsed&&!c.options.lineWrapping&&Be(e)==c.display.maxLine&&(l=!0),o.collapsed&&s!=t.line&&ue(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Te(o,s==t.line?t.ch:null,s==r.line?r.ch:null)),++s}),o.collapsed&&e.iter(t.line,r.line+1,function(t){Ue(e,t)&&ue(t,0)}),o.clearOnEnter&&et(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Me=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++bo,o.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),o.collapsed)Qn(c,t.line,r.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var u=t.line;u<=r.line;u++)Zn(c,u,"text");o.atomic&&Qi(c.doc),ar(c,"markerAdded",c,o)}return o}wo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Rn(e),at(this,"clear")){var r=this.find();r&&ar(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=Le(a.markedSpans,this);e&&!this.collapsed?Zn(e,de(a),"text"):e&&(null!=l.to&&(i=de(a)),null!=l.from&&(n=de(a))),a.markedSpans=Oe(a.markedSpans,l),null==l.from&&this.collapsed&&!Ue(this.doc,a)&&e&&ue(a,Jr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=Be(this.lines[s]),u=$e(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&Qn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Qi(e.doc)),e&&ar(e,"markerCleared",e,this,n,i),t&&Bn(e),this.parent&&this.parent.clear()}},wo.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=Le(o.markedSpans,this);if(null!=a.from&&(r=ge(t?o:de(o),a.from),-1==e))return r;if(null!=a.to&&(n=ge(t?o:de(o),a.to),1==e))return n}return r&&{from:r,to:n}},wo.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&$n(n,function(){var i=t.line,o=de(t.line),a=Dr(n,o);if(a&&(Ir(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Ue(r.doc,i)&&null!=r.height){var l=r.height;r.height=null;var s=br(r)-l;s&&ue(i,i.height+s)}ar(n,"markerChanged",n,e)})},wo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=R(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},wo.prototype.detachLine=function(e){if(this.lines.splice(R(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},lt(wo);var Co=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};function ko(e){return e.findMarks(ge(e.first,0),e.clipPos(ge(e.lastLine())),function(e){return e.parent})}function Mo(e){for(var t=function(t){var r=e[t],n=[r.primary.doc];Di(r.primary.doc,function(e){return n.push(e)});for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==R(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}},r=0;r<e.length;r++)t(r)}Co.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ar(this,"clear")}},Co.prototype.find=function(e,t){return this.primary.find(e,t)},lt(Co);var So=0,To=function(e,t,r,n,i){if(!(this instanceof To))return new To(e,t,r,n,i);null==r&&(r=0),mo.call(this,[new go([new Gt("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=ge(r,0);this.sel=wi(o),this.history=new Ni(null),this.id=++So,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Oi(this,{from:o,to:o,text:e}),qi(this,wi(o),j)};To.prototype=Z(mo.prototype,{constructor:To,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=ce(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Yn(function(e){var t=ge(this.first,0),r=this.first+this.size-1;io(this,{from:t,to:ge(r,le(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Tn(this.cm,0,0),qi(this,wi(t),j)}),replaceRange:function(e,t,r,n){t=Ce(this,t),r=r?Ce(this,r):t,co(this,e,t,r,n)},getRange:function(e,t,r){var n=se(this,Ce(this,e),Ce(this,t));return!1===r?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(pe(this,e))return le(this,e)},getLineNumber:function(e){return de(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=le(this,e)),Be(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Ce(this,e)},getCursor:function(e){var t=this.sel.primary();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:Yn(function(e,t,r){Ki(this,Ce(this,"number"==typeof e?ge(e,t||0):e),null,r)}),setSelection:Yn(function(e,t,r){Ki(this,Ce(this,e),Ce(this,t||e),r)}),extendSelection:Yn(function(e,t,r){ji(this,Ce(this,e),t&&Ce(this,t),r)}),extendSelections:Yn(function(e,t){Ui(this,ke(this,e),t)}),extendSelectionsBy:Yn(function(e,t){var r=Y(this.sel.ranges,e);Ui(this,ke(this,r),t)}),setSelections:Yn(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new yi(Ce(this,e[i].anchor),Ce(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),qi(this,bi(n,t),r)}}),addSelection:Yn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new yi(Ce(this,e),Ce(this,t||e))),qi(this,bi(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=se(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=se(this,r[n].from(),r[n].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Yn(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];n[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:r}}for(var l=t&&"end"!=t&&function(e,t,r){for(var n=[],i=ge(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=Mi(l.from,i,o),c=Mi(xi(l),i,o);if(i=l.to,o=c,"around"==r){var u=e.sel.ranges[a],d=me(u.head,u.anchor)<0;n[a]=new yi(d?c:s,d?s:c)}else n[a]=new yi(s,s)}return new vi(n,e.sel.primIndex)}(this,n,t),s=n.length-1;s>=0;s--)io(this,n[s]);l?$i(this,l):this.cm&&Sn(this.cm)}),undo:Yn(function(){ao(this,"undo")}),redo:Yn(function(){ao(this,"redo")}),undoSelection:Yn(function(){ao(this,"undo",!0)}),redoSelection:Yn(function(){ao(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new Ni(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:Bi(this.history.done),undone:Bi(this.history.undone)}},setHistory:function(e){var t=this.history=new Ni(this.history.maxGeneration);t.done=Bi(e.done.slice(0),null,!0),t.undone=Bi(e.undone.slice(0),null,!0)},setGutterMarker:Yn(function(e,t,r){return ho(this,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&re(n)&&(e.gutterMarkers=null),!0})}),clearGutter:Yn(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&ho(t,r,"gutter",function(){return r.gutterMarkers[e]=null,re(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!pe(this,e))return null;if(t=e,!(e=le(this,e)))return null}else if(null==(t=de(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Yn(function(e,t,r){return ho(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(M(r).test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0})}),removeLineClass:Yn(function(e,t,r){return ho(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[n];if(!i)return!1;if(null==r)e[n]=null;else{var o=i.match(M(r));if(!o)return!1;var a=o.index+o[0].length;e[n]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0})}),addLineWidget:Yn(function(e,t,r){return function(e,t,r,n){var i=new vo(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),ho(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!Ue(e,t)){var n=Ke(t)<e.scrollTop;ue(t,t.height+br(i)),n&&Mn(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&ar(o,"lineWidgetAdded",o,i,"number"==typeof t?t:de(t)),i}(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return xo(this,Ce(this,e),Ce(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return xo(this,e=Ce(this,e),e,r,"bookmark")},findMarksAt:function(e){var t=[],r=le(this,(e=Ce(this,e)).line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=Ce(this,e),t=Ce(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];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||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r}),Ce(this,ge(r,t))},indexFromPos:function(e){var t=(e=Ce(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+r}),t},copy:function(e){var t=new To(ce(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new To(ce(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(me(o,a)){var l=xo(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}(n,ko(this)),n},unlinkDoc:function(e){if(e instanceof Ma&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Mo(ko(this));break}}if(e.history==this.history){var n=[e.id];Di(e,function(e){return n.push(e.id)},!0),e.history=new Ni(null),e.history.done=Bi(this.history.done,n),e.history.undone=Bi(this.history.undone,n)}},iterLinkedDocs:function(e){Di(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):bt(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Yn(function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&function(e){$n(e,function(){Ai(e),Qn(e)})}(this.cm))})}),To.prototype.eachLine=To.prototype.iter;var Lo=0;function Oo(e){var t=this;if(Do(t),!it(t,e)&&!wr(t.display,e)){st(e),a&&(Lo=+new Date);var r=an(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),l=0,s=function(e,n){if(!t.options.allowDropFileTypes||-1!=R(t.options.allowDropFileTypes,e.type)){var a=new FileReader;a.onload=qn(t,function(){var e=a.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[n]=e,++l==i){var s={from:r=Ce(t.doc,r),to:r,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};io(t.doc,s),$i(t.doc,wi(r,xi(s)))}}),a.readAsText(e)}},c=0;c<i;++c)s(n[c],c);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var u=e.dataTransfer.getData("Text");if(u){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),Xi(t.doc,wi(r,r)),d)for(var f=0;f<d.length;++f)co(t.doc,"",d[f].anchor,d[f].head,"drag");t.replaceSelection(u,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Do(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Po(e){if(document.getElementsByClassName)for(var t=document.getElementsByClassName("CodeMirror"),r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&e(n)}}var Ao=!1;function No(){Ao||(function(){var e;et(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Po(Wo)},100))}),et(window,"blur",function(){return Po(vn)})}(),Ao=!0)}function Wo(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var zo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",145:"ScrollLock",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"},Eo=0;Eo<10;Eo++)zo[Eo+48]=zo[Eo+96]=String(Eo);for(var Io=65;Io<=90;Io++)zo[Io]=String.fromCharCode(Io);for(var Fo=1;Fo<=12;Fo++)zo[Fo+111]=zo[Fo+63235]="F"+Fo;var _o={};function Ho(e){var t,r,n,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var l=o[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Ro(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=Y(r.split(" "),Ho),o=0;o<i.length;o++){var a=void 0,l=void 0;o==i.length-1?(l=i.join(" "),a=n):(l=i.slice(0,o+1).join(" "),a="...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[r]}for(var c in t)e[c]=t[c];return e}function Bo(e,t,r,n){var i=(t=Go(t)).call?t.call(e,n):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Bo(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Bo(e,t.fallthrough[o],r,n);if(a)return a}}}function Vo(e){var t="string"==typeof e?e:zo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function jo(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(C?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(C?t.ctrlKey:t.metaKey)&&"Cmd"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function Uo(e,t){if(d&&34==e.keyCode&&e.char)return!1;var r=zo[e.keyCode];return null!=r&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(r=e.code),jo(r,e,t))}function Go(e){return"string"==typeof e?_o[e]:e}function Ko(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&me(o.from,X(n).to)<=0;){var a=n.pop();if(me(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}$n(e,function(){for(var t=n.length-1;t>=0;t--)co(e.doc,"",n[t].from,n[t].to,"+delete");Sn(e)})}function $o(e,t,r){var n=oe(e.text,t+r,r);return n<0||n>e.text.length?null:n}function qo(e,t,r){var n=$o(e,t.ch,r);return null==n?null:new ge(t.line,n,r<0?"after":"before")}function Xo(e,t,r,n,i){if(e){var o=Ze(r,t.doc.direction);if(o){var a,l=i<0?X(o):o[0],s=i<0==(1==l.level),c=s?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var u=Pr(t,r);a=i<0?r.text.length-1:0;var d=Ar(t,u,a).top;a=ae(function(e){return Ar(t,u,e).top==d},i<0==(1==l.level)?l.from:l.to-1,a),"before"==c&&(a=$o(r,a,1))}else a=i<0?l.to:l.from;return new ge(n,a,c)}}return new ge(n,i<0?r.text.length:0,i<0?"before":"after")}_o.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"},_o.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"},_o.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","Ctrl-O":"openLine"},_o.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"]},_o.default=y?_o.macDefault:_o.pcDefault;var Yo={selectAll:ro,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),j)},killLine:function(e){return Ko(e,function(t){if(t.empty()){var r=le(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:ge(t.head.line+1,0)}:{from:t.head,to:ge(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Ko(e,function(t){return{from:ge(t.from().line,0),to:Ce(e.doc,ge(t.to().line+1,0))}})},delLineLeft:function(e){return Ko(e,function(e){return{from:ge(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return Ko(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return Ko(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ge(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ge(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Qo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Zo(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return function(e,t){var r=le(e.doc,t),n=function(e){for(var t;t=_e(e);)e=t.find(1,!0).line;return e}(r);return n!=r&&(t=de(n)),Xo(!0,e,r,t,-1)}(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},G)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},G)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?Zo(e,t.head):n},G)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=_(e.getLine(o.line),o.ch,n);t.push(q(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return $n(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=le(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new ge(i.line,i.ch-1)),i.ch>0)i=new ge(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ge(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=le(e.doc,i.line-1).text;a&&(i=new ge(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),ge(i.line-1,a.length-1),i,"+transpose"))}r.push(new yi(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return $n(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Sn(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Qo(e,t){var r=le(e.doc,t),n=Be(r);return n!=r&&(t=de(n)),Xo(!0,e,n,t,1)}function Zo(e,t){var r=Qo(e,t.line),n=le(e.doc,r.line),i=Ze(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return ge(r.line,a?0:o,r.sticky)}return r}function Jo(e,t,r){if("string"==typeof t&&!(t=Yo[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=V}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}var ea=new H;function ta(e,t,r,n){var i=e.state.keySeq;if(i){if(Vo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:ea.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),ra(e,i+" "+t,r,n))return!0}return ra(e,t,r,n)}function ra(e,t,r,n){var i=function(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Bo(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Bo(t,e.options.extraKeys,r,e)||Bo(t,e.options.keyMap,r,e)}(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&ar(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(st(r),pn(e)),!!i}function na(e,t){var r=Uo(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?ta(e,"Shift-"+r,t,function(t){return Jo(e,t,!0)})||ta(e,r,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return Jo(e,t)}):ta(e,r,t,function(t){return Jo(e,t)}))}var ia=null;function oa(e){var t=this;if(t.curOp.focus=N(),!it(t,e)){a&&l<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=na(t,e);d&&(ia=n?r:null,!n&&88==r&&!xt&&(y?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.altKey||(T(t,"CodeMirror-crosshair"),rt(document,"keyup",r),rt(document,"mouseover",r))}W(t,"CodeMirror-crosshair"),et(document,"keyup",r),et(document,"mouseover",r)}(t)}}function aa(e){16==e.keyCode&&(this.doc.sel.shift=!1),it(this,e)}function la(e){var t=this;if(!(wr(t.display,e)||it(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(d&&r==ia)return ia=null,void st(e);if(!d||e.which&&!(e.which<10)||!na(t,e)){var i=String.fromCharCode(null==n?r:n);"\b"!=i&&(function(e,t,r){return ta(e,"'"+r+"'",t,function(t){return Jo(e,t,!0)})}(t,e,i)||t.display.input.onKeyPress(e))}}}var sa,ca,ua=function(e,t,r){this.time=e,this.pos=t,this.button=r};function da(e){var t=this,r=t.display;if(!(it(t,e)||r.activeTouch&&r.input.supportsTouch()))if(r.input.ensurePolled(),r.shift=e.shiftKey,wr(r,e))s||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));else{var n=pt(e);if(3==n&&k?!ma(t,e):!ha(t,e)){var i=an(t,e),o=i?function(e,t){var r=+new Date;return ca&&ca.compare(r,e,t)?(sa=ca=null,"triple"):sa&&sa.compare(r,e,t)?(ca=new ua(r,e,t),sa=null,"double"):(sa=new ua(r,e,t),ca=null,"single")}(i,n):"single";window.focus(),1==n&&t.state.selectingText&&t.state.selectingText(e),i&&function(e,t,r,n,i){var o="Click";return"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o),ta(e,jo(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,function(t){if("string"==typeof t&&(t=Yo[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=V}finally{e.state.suppressEdits=!1}return n})}(t,n,i,o,e)||(1==n?i?function(e,t,r,n){a?setTimeout(I(hn,e),0):e.curOp.focus=N();var i,o=function(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=b?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),null==i.addNew&&(i.addNew=y?r.metaKey:r.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(y?r.altKey:r.ctrlKey)),i}(e,r,n),c=e.doc.sel;e.options.dragDrop&&mt&&!e.isReadOnly()&&"single"==r&&(i=c.contains(t))>-1&&(me((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(me(i.to(),t)>0||t.xRel<0)?function(e,t,r,n){var i=e.display,o=!1,c=qn(e,function(t){s&&(i.scroller.draggable=!1),e.state.draggingText=!1,rt(i.wrapper.ownerDocument,"mouseup",c),rt(i.wrapper.ownerDocument,"mousemove",u),rt(i.scroller,"dragstart",d),rt(i.scroller,"drop",c),o||(st(t),n.addNew||ji(e.doc,r,null,null,n.extend),s||a&&9==l?setTimeout(function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()},20):i.input.focus())}),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};s&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),et(i.wrapper.ownerDocument,"mouseup",c),et(i.wrapper.ownerDocument,"mousemove",u),et(i.scroller,"dragstart",d),et(i.scroller,"drop",c),gn(e),setTimeout(function(){return i.input.focus()},20)}(e,n,t,o):function(e,t,r,n){var i=e.display,o=e.doc;st(t);var a,l,s=o.sel,c=s.ranges;if(n.addNew&&!n.extend?(l=o.sel.contains(r),a=l>-1?c[l]:new yi(r,r)):(a=o.sel.primary(),l=o.sel.primIndex),"rectangle"==n.unit)n.addNew||(a=new yi(r,r)),r=an(e,t,!0,!0),l=-1;else{var u=fa(e,r,n.unit);a=n.extend?Vi(a,u.anchor,u.head,n.extend):u}n.addNew?-1==l?(l=c.length,qi(o,bi(c.concat([a]),l),{scroll:!1,origin:"*mouse"})):c.length>1&&c[l].empty()&&"char"==n.unit&&!n.extend?(qi(o,bi(c.slice(0,l).concat(c.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):Gi(o,l,a,U):(l=0,qi(o,new vi([a],0),U),s=o.sel);var d=r;function f(t){if(0!=me(d,t))if(d=t,"rectangle"==n.unit){for(var i=[],c=e.options.tabSize,u=_(le(o,r.line).text,r.ch,c),f=_(le(o,t.line).text,t.ch,c),p=Math.min(u,f),h=Math.max(u,f),g=Math.min(r.line,t.line),m=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=m;g++){var v=le(o,g).text,y=K(v,p,c);p==h?i.push(new yi(ge(g,y),ge(g,y))):v.length>y&&i.push(new yi(ge(g,y),ge(g,K(v,h,c))))}i.length||i.push(new yi(r,r)),qi(o,bi(s.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=a,x=fa(e,t,n.unit),C=w.anchor;me(x.anchor,C)>0?(b=x.head,C=we(w.from(),x.anchor)):(b=x.anchor,C=be(w.to(),x.head));var k=s.ranges.slice(0);k[l]=function(e,t){var r=t.anchor,n=t.head,i=le(e.doc,r.line);if(0==me(r,n)&&r.sticky==n.sticky)return t;var o=Ze(i);if(!o)return t;var a=Ye(o,r.ch,r.sticky),l=o[a];if(l.from!=r.ch&&l.to!=r.ch)return t;var s,c=a+(l.from==r.ch==(1!=l.level)?0:1);if(0==c||c==o.length)return t;if(n.line!=r.line)s=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=Ye(o,n.ch,n.sticky),d=u-a||(n.ch-r.ch)*(1==l.level?-1:1);s=u==c-1||u==c?d<0:d>0}var f=o[c+(s?-1:0)],p=s==(1==f.level),h=p?f.from:f.to,g=p?"after":"before";return r.ch==h&&r.sticky==g?t:new yi(new ge(r.line,h,g),n)}(e,new yi(Ce(o,C),b)),qi(o,bi(k,l),U)}}var p=i.wrapper.getBoundingClientRect(),h=0;function g(t){e.state.selectingText=!1,h=1/0,st(t),i.input.focus(),rt(i.wrapper.ownerDocument,"mousemove",m),rt(i.wrapper.ownerDocument,"mouseup",v),o.history.lastSelOrigin=null}var m=qn(e,function(t){0!==t.buttons&&pt(t)?function t(r){var a=++h,l=an(e,r,!0,"rectangle"==n.unit);if(l)if(0!=me(l,d)){e.curOp.focus=N(),f(l);var s=wn(i,o);(l.line>=s.to||l.line<s.from)&&setTimeout(qn(e,function(){h==a&&t(r)}),150)}else{var c=r.clientY<p.top?-20:r.clientY>p.bottom?20:0;c&&setTimeout(qn(e,function(){h==a&&(i.scroller.scrollTop+=c,t(r))}),50)}}(t):g(t)}),v=qn(e,g);e.state.selectingText=v,et(i.wrapper.ownerDocument,"mousemove",m),et(i.wrapper.ownerDocument,"mouseup",v)}(e,n,t,o)}(t,i,o,e):ft(e)==r.scroller&&st(e):2==n?(i&&ji(t.doc,i),setTimeout(function(){return r.input.focus()},20)):3==n&&(k?ga(t,e):gn(t)))}}}function fa(e,t,r){if("char"==r)return new yi(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new yi(ge(t.line,0),Ce(e.doc,ge(t.line+1,0)));var n=r(e,t);return new yi(n.from,n.to)}function pa(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&st(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!at(e,r))return ut(t);o-=l.top-a.viewOffset;for(var s=0;s<e.options.gutters.length;++s){var c=a.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=i){var u=fe(e.doc,o),d=e.options.gutters[s];return nt(e,r,e,u,d,t),ut(t)}}}function ha(e,t){return pa(e,t,"gutterClick",!0)}function ga(e,t){wr(e.display,t)||ma(e,t)||it(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function ma(e,t){return!!at(e,"gutterContextMenu")&&pa(e,t,"gutterContextMenu",!1)}function va(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),_r(e)}ua.prototype.compare=function(e,t,r){return this.time+400>e&&0==me(t,this.pos)&&r==this.button};var ya={toString:function(){return"CodeMirror.Init"}},ba={},wa={};function xa(e){ui(e),Qn(e),xn(e)}function Ca(e,t,r){var n=r&&r!=ya;if(!t!=!n){var i=e.display.dragFunctions,o=t?et:rt;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function ka(e){e.options.lineWrapping?(W(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),qe(e)),on(e),Qn(e),_r(e),setTimeout(function(){return En(e)},100)}function Ma(e,t){var n=this;if(!(this instanceof Ma))return new Ma(e,t);this.options=t=t?F(t):{},F(ba,t,!1),di(t);var i=t.value;"string"==typeof i?i=new To(i,t.mode,null,t.lineSeparator,t.direction):t.mode&&(i.modeOption=t.mode),this.doc=i;var o=new Ma.inputStyles[t.inputStyle](this),c=this.display=new function(e,t,n){var i=this;this.input=n,i.scrollbarFiller=D("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=D("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=P("div",null,"CodeMirror-code"),i.selectionDiv=D("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=D("div",null,"CodeMirror-cursors"),i.measure=D("div",null,"CodeMirror-measure"),i.lineMeasure=D("div",null,"CodeMirror-measure"),i.lineSpace=P("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=P("div",[i.lineSpace],"CodeMirror-lines");i.mover=D("div",[o],null,"position: relative"),i.sizer=D("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=D("div",null,null,"position: absolute; height: "+B+"px; width: 1px;"),i.gutters=D("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=D("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=D("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),a&&l<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),s||r&&v||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,n.init(i)}(e,i,o);for(var u in c.wrapper.CodeMirror=this,ui(this),va(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),_n(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 H,keySeq:null,specialChars:null},t.autofocus&&!v&&c.input.focus(),a&&l<11&&setTimeout(function(){return n.display.input.reset(!0)},20),function(e){var t=e.display;et(t.scroller,"mousedown",qn(e,da)),et(t.scroller,"dblclick",a&&l<11?qn(e,function(t){if(!it(e,t)){var r=an(e,t);if(r&&!ha(e,t)&&!wr(e.display,t)){st(t);var n=e.findWordAt(r);ji(e.doc,n.anchor,n.head)}}}):function(t){return it(e,t)||st(t)}),k||et(t.scroller,"contextmenu",function(t){return ga(e,t)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),(n=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}et(t.scroller,"touchstart",function(i){if(!it(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!ha(e,i)){t.input.ensurePolled(),clearTimeout(r);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),et(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),et(t.scroller,"touchend",function(r){var n=t.activeTouch;if(n&&!wr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var a,l=e.coordsChar(t.activeTouch,"page");a=!n.prev||o(n,n.prev)?new yi(l,l):!n.prev.prev||o(n,n.prev.prev)?e.findWordAt(l):new yi(ge(l.line,0),Ce(e.doc,ge(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),st(r)}i()}),et(t.scroller,"touchcancel",i),et(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Dn(e,t.scroller.scrollTop),An(e,t.scroller.scrollLeft,!0),nt(e,"scroll",e))}),et(t.scroller,"mousewheel",function(t){return mi(e,t)}),et(t.scroller,"DOMMouseScroll",function(t){return mi(e,t)}),et(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){it(e,t)||dt(t)},over:function(t){it(e,t)||(function(e,t){var r=an(e,t);if(r){var n=document.createDocumentFragment();un(e,r,n),e.display.dragCursor||(e.display.dragCursor=D("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),O(e.display.dragCursor,n)}}(e,t),dt(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Lo<100))dt(t);else if(!it(e,t)&&!wr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var r=D("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),d&&r.parentNode.removeChild(r)}}(e,t)},drop:qn(e,Oo),leave:function(t){it(e,t)||Do(e)}};var s=t.input.getField();et(s,"keyup",function(t){return aa.call(e,t)}),et(s,"keydown",qn(e,oa)),et(s,"keypress",qn(e,la)),et(s,"focus",function(t){return mn(e,t)}),et(s,"blur",function(t){return vn(e,t)})}(this),No(),Rn(this),this.curOp.forceUpdate=!0,Pi(this,i),t.autofocus&&!v||this.hasFocus()?setTimeout(I(mn,this),20):vn(this),wa)wa.hasOwnProperty(u)&&wa[u](n,t[u],ya);Cn(this),t.finishInit&&t.finishInit(this);for(var p=0;p<Sa.length;++p)Sa[p](n);Bn(this),s&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(c.lineDiv).textRendering&&(c.lineDiv.style.textRendering="auto")}Ma.defaults=ba,Ma.optionHandlers=wa;var Sa=[];function Ta(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=Ft(e,t).state:r="prev");var a=e.options.tabSize,l=le(o,t),s=_(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var c,u=l.text.match(/^\s*/)[0];if(n||/\S/.test(l.text)){if("smart"==r&&((c=o.mode.indent(i,l.text.slice(u.length),l.text))==V||c>150)){if(!n)return;r="prev"}}else c=0,r="not";"prev"==r?c=t>o.first?_(le(o,t-1).text,null,a):0:"add"==r?c=s+e.options.indentUnit:"subtract"==r?c=s-e.options.indentUnit:"number"==typeof r&&(c=s+r),c=Math.max(0,c);var d="",f=0;if(e.options.indentWithTabs)for(var p=Math.floor(c/a);p;--p)f+=a,d+="\t";if(f<c&&(d+=q(c-f)),d!=u)return co(o,d,ge(t,0),ge(t,u.length),"+input"),l.stateAfter=null,!0;for(var h=0;h<o.sel.ranges.length;h++){var g=o.sel.ranges[h];if(g.head.line==t&&g.head.ch<u.length){var m=ge(t,u.length);Gi(o,h,new yi(m,m));break}}}Ma.defineInitHook=function(e){return Sa.push(e)};var La=null;function Oa(e){La=e}function Da(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a,l=e.state.pasteIncoming||"paste"==i,s=bt(t),c=null;if(l&&n.ranges.length>1)if(La&&La.text.join("\n")==t){if(n.ranges.length%La.text.length==0){c=[];for(var u=0;u<La.text.length;u++)c.push(o.splitLines(La.text[u]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(c=Y(s,function(e){return[e]}));for(var d=n.ranges.length-1;d>=0;d--){var f=n.ranges[d],p=f.from(),h=f.to();f.empty()&&(r&&r>0?p=ge(p.line,p.ch-r):e.state.overwrite&&!l?h=ge(h.line,Math.min(le(o,h.line).text.length,h.ch+X(s).length)):La&&La.lineWise&&La.text.join("\n")==t&&(p=h=ge(p.line,0))),a=e.curOp.updateInput;var g={from:p,to:h,text:c?c[d%c.length]:s,origin:i||(l?"paste":e.state.cutIncoming?"cut":"+input")};io(e.doc,g),ar(e,"inputRead",e,g)}t&&!l&&Aa(e,t),Sn(e),e.curOp.updateInput=a,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Pa(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||$n(t,function(){return Da(t,r,0,null,"paste")}),!0}function Aa(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=Ta(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(le(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Ta(e,i.head.line,"smart"));a&&ar(e,"electricInput",e,i.head.line)}}}function Na(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:ge(i,0),head:ge(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function Wa(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function za(){var e=D("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=D("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return s?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),Wa(e),t}function Ea(e,t,r,n,i){var o=t,a=r,l=le(e,t.line);function s(n){var o;if(null==(o=i?function(e,t,r,n){var i=Ze(t,e.doc.direction);if(!i)return qo(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=Ye(i,r.ch,r.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return qo(t,r,n);var l,s=function(e,r){return $o(t,e instanceof ge?e.ch:e,r)},c=function(r){return e.options.lineWrapping?(l=l||Pr(e,t),Yr(e,t,l,r)):{begin:0,end:t.text.length}},u=c("before"==r.sticky?s(r,-1):r.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==n<0,f=s(r,d?1:-1);if(null!=f&&(d?f<=a.to&&f<=u.end:f>=a.from&&f>=u.begin)){var p=d?"before":"after";return new ge(r.line,f,p)}}var h=function(e,t,n){for(var o=function(e,t){return t?new ge(r.line,s(e,1),"before"):new ge(r.line,e,"after")};e>=0&&e<i.length;e+=t){var a=i[e],l=t>0==(1!=a.level),c=l?n.begin:s(n.end,-1);if(a.from<=c&&c<a.to)return o(c,l);if(c=l?a.from:s(a.to,-1),n.begin<=c&&c<n.end)return o(c,l)}},g=h(o+n,n,u);if(g)return g;var m=n>0?u.end:s(u.begin,-1);return null==m||n>0&&m==t.text.length||!(g=h(n>0?0:i.length-1,n,c(m)))?null:g}(e.cm,l,t,r):qo(l,t,r))){if(n||!function(){var n=t.line+r;return!(n<e.first||n>=e.first+e.size)&&(t=new ge(n,t.ch,t.sticky),l=le(e,n))}())return!1;t=Xo(i,e.cm,l,t.line,r)}else t=o;return!0}if("char"==n)s();else if("column"==n)s(!0);else if("word"==n||"group"==n)for(var c=null,u="group"==n,d=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(r<0)||s(!f);f=!1){var p=l.text.charAt(t.ch)||"\n",h=te(p,d)?"w":u&&"\n"==p?"n":!u||/\s/.test(p)?null:"p";if(!u||f||h||(h="s"),c&&c!=h){r<0&&(r=1,s(),t.sticky="after");break}if(h&&(c=h),r>0&&!s(!f))break}var g=eo(e,t,o,a,!0);return ve(o,g)&&(g.hitSide=!0),g}function Ia(e,t,r,n){var i,o,a=e.doc,l=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(s-.5*Jr(e.display),3);i=(r>0?t.bottom:t.top)+r*c}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=qr(e,l,i)).outside;){if(r<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*r}return o}var Fa=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new H,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function _a(e,t){var r=Dr(e,t.line);if(!r||r.hidden)return null;var n=le(e.doc,t.line),i=Lr(r,n,t.line),o=Ze(n,e.doc.direction),a="left";if(o){var l=Ye(o,t.ch);a=l%2?"right":"left"}var s=zr(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Ha(e,t){return t&&(e.bad=!0),e}function Ra(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return Ha(e.clipPos(ge(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return Ba(o,t,r)}}function Ba(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!A(n,t))return Ha(ge(de(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?X(e.rest):e.line;return Ha(ge(de(o),o.text.length),i)}var a=3==t.nodeType?t:null,l=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,r&&(r=a.nodeValue.length));l.parentNode!=n;)l=l.parentNode;var s=e.measure,c=s.maps;function u(t,r,n){for(var i=-1;i<(c?c.length:0);i++)for(var o=i<0?s.map:c[i],a=0;a<o.length;a+=3){var l=o[a+2];if(l==t||l==r){var u=de(i<0?e.line:e.rest[i]),d=o[a]+n;return(n<0||l!=t)&&(d=o[a+(n?1:0)]),ge(u,d)}}}var d=u(a,l,r);if(d)return Ha(d,i);for(var f=l.nextSibling,p=a?a.nodeValue.length-r:0;f;f=f.nextSibling){if(d=u(f,f.firstChild,0))return Ha(ge(d.line,d.ch-p),i);p+=f.textContent.length}for(var h=l.previousSibling,g=r;h;h=h.previousSibling){if(d=u(h,h.firstChild,-1))return Ha(ge(d.line,d.ch+g),i);g+=h.textContent.length}}Fa.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;function o(e){if(!it(n,e)){if(n.somethingSelected())Oa({lineWise:!1,text:n.getSelections()}),"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=Na(n);Oa({lineWise:!0,text:t.text}),"cut"==e.type&&n.operation(function(){n.setSelections(t.ranges,0,j),n.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var o=La.text.join("\n");if(e.clipboardData.setData("Text",o),e.clipboardData.getData("Text")==o)return void e.preventDefault()}var a=za(),l=a.firstChild;n.display.lineSpace.insertBefore(a,n.display.lineSpace.firstChild),l.value=La.text.join("\n");var s=document.activeElement;E(l),setTimeout(function(){n.display.lineSpace.removeChild(a),s.focus(),s==i&&r.showPrimarySelection()},50)}}Wa(i,n.options.spellcheck),et(i,"paste",function(e){it(n,e)||Pa(e,n)||l<=11&&setTimeout(qn(n,function(){return t.updateFromDOM()}),20)}),et(i,"compositionstart",function(e){t.composing={data:e.data,done:!1}}),et(i,"compositionupdate",function(e){t.composing||(t.composing={data:e.data,done:!1})}),et(i,"compositionend",function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),et(i,"touchstart",function(){return r.forceCompositionEnd()}),et(i,"input",function(){t.composing||t.readFromDOMSoon()}),et(i,"copy",o),et(i,"cut",o)},Fa.prototype.prepareSelection=function(){var e=cn(this.cm,!1);return e.focus=this.cm.state.focused,e},Fa.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Fa.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Fa.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),i=n.from(),o=n.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var a=Ra(t,e.anchorNode,e.anchorOffset),l=Ra(t,e.focusNode,e.focusOffset);if(!a||a.bad||!l||l.bad||0!=me(we(a,l),i)||0!=me(be(a,l),o)){var s=t.display.view,c=i.line>=t.display.viewFrom&&_a(t,i)||{node:s[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&_a(t,o);if(!u){var d=s[s.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(c&&u){var p,h=e.rangeCount&&e.getRangeAt(0);try{p=S(c.node,c.offset,u.offset,u.node)}catch(e){}p&&(!r&&t.state.focused?(e.collapse(c.node,c.offset),p.collapsed||(e.removeAllRanges(),e.addRange(p))):(e.removeAllRanges(),e.addRange(p)),h&&null==e.anchorNode?e.addRange(h):r&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Fa.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Fa.prototype.showMultipleSelections=function(e){O(this.cm.display.cursorDiv,e.cursors),O(this.cm.display.selectionDiv,e.selection)},Fa.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Fa.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return A(this.div,t)},Fa.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Fa.prototype.blur=function(){this.div.blur()},Fa.prototype.getField=function(){return this.div},Fa.prototype.supportsTouch=function(){return!0},Fa.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():$n(this.cm,function(){return e.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))})},Fa.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Fa.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(m&&u&&this.cm.options.gutters.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=Ra(t,e.anchorNode,e.anchorOffset),n=Ra(t,e.focusNode,e.focusOffset);r&&n&&$n(t,function(){qi(t.doc,wi(r,n),j),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},Fa.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,r,n=this.cm,i=n.display,o=n.doc.sel.primary(),a=o.from(),l=o.to();if(0==a.ch&&a.line>n.firstLine()&&(a=ge(a.line-1,le(n.doc,a.line-1).length)),l.ch==le(n.doc,l.line).text.length&&l.line<n.lastLine()&&(l=ge(l.line+1,0)),a.line<i.viewFrom||l.line>i.viewTo-1)return!1;a.line==i.viewFrom||0==(e=ln(n,a.line))?(t=de(i.view[0].line),r=i.view[0].node):(t=de(i.view[e].line),r=i.view[e-1].node.nextSibling);var s,c,u=ln(n,l.line);if(u==i.view.length-1?(s=i.viewTo-1,c=i.lineDiv.lastChild):(s=de(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!r)return!1;for(var d=n.doc.splitLines(function(e,t,r,n,i){var o="",a=!1,l=e.doc.lineSeparator(),s=!1;function c(){a&&(o+=l,s&&(o+=l),a=s=!1)}function u(e){e&&(c(),o+=e)}function d(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void u(r);var o,f=t.getAttribute("cm-marker");if(f){var p=e.findMarks(ge(n,0),ge(i+1,0),function(e){return function(t){return t.id==e}}(+f));return void(p.length&&(o=p[0].find(0))&&u(se(e.doc,o.from,o.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&c();for(var g=0;g<t.childNodes.length;g++)d(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(s=!0),h&&(a=!0)}else 3==t.nodeType&&u(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;d(t),t!=r;)t=t.nextSibling,s=!1;return o}(n,r,c,t,s)),f=se(n.doc,ge(t,0),ge(s,le(n.doc,s).text.length));d.length>1&&f.length>1;)if(X(d)==X(f))d.pop(),f.pop(),s--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var p=0,h=0,g=d[0],m=f[0],v=Math.min(g.length,m.length);p<v&&g.charCodeAt(p)==m.charCodeAt(p);)++p;for(var y=X(d),b=X(f),w=Math.min(y.length-(1==d.length?p:0),b.length-(1==f.length?p:0));h<w&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)++h;if(1==d.length&&1==f.length&&t==a.line)for(;p&&p>a.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)p--,h++;d[d.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var x=ge(t,p),C=ge(s,f.length?X(f).length-h:0);return d.length>1||d[0]||me(x,C)?(co(n.doc,d,x,C,"+input"),!0):void 0},Fa.prototype.ensurePolled=function(){this.forceCompositionEnd()},Fa.prototype.reset=function(){this.forceCompositionEnd()},Fa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Fa.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},Fa.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||$n(this.cm,function(){return Qn(e.cm)})},Fa.prototype.setUneditable=function(e){e.contentEditable="false"},Fa.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||qn(this.cm,Da)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Fa.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Fa.prototype.onContextMenu=function(){},Fa.prototype.resetPosition=function(){},Fa.prototype.needsContentAttribute=!0;var Va=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new H,this.hasSelection=!1,this.composing=null};Va.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!it(n,e)){if(n.somethingSelected())Oa({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Na(n);Oa({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,j):(r.prevInput="",i.value=t.text.join("\n"),E(i))}"cut"==e.type&&(n.state.cutIncoming=!0)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),et(i,"input",function(){a&&l>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),et(i,"paste",function(e){it(n,e)||Pa(e,n)||(n.state.pasteIncoming=!0,r.fastPoll())}),et(i,"cut",o),et(i,"copy",o),et(e.scroller,"paste",function(t){wr(e,t)||it(n,t)||(n.state.pasteIncoming=!0,r.focus())}),et(e.lineSpace,"selectstart",function(t){wr(e,t)||st(t)}),et(i,"compositionstart",function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}}),et(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Va.prototype.createField=function(e){this.wrapper=za(),this.textarea=this.wrapper.firstChild},Va.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=cn(e);if(e.options.moveInputWithCursor){var i=Gr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},Va.prototype.showSelection=function(e){var t=this.cm,r=t.display;O(r.cursorDiv,e.cursors),O(r.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Va.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&E(this.textarea),a&&l>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",a&&l>=9&&(this.hasSelection=null))}},Va.prototype.getField=function(){return this.textarea},Va.prototype.supportsTouch=function(){return!1},Va.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||N()!=this.textarea))try{this.textarea.focus()}catch(e){}},Va.prototype.blur=function(){this.textarea.blur()},Va.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Va.prototype.receivedFocus=function(){this.slowPoll()},Va.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Va.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function r(){var n=t.poll();n||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))})},Va.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||wt(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(a&&l>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var s=0,c=Math.min(n.length,i.length);s<c&&n.charCodeAt(s)==i.charCodeAt(s);)++s;return $n(t,function(){Da(t,i.slice(s),n.length-s,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Va.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Va.prototype.onKeyPress=function(){a&&l>=9&&(this.hasSelection=null),this.fastPoll()},Va.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea,o=an(r,e),c=n.scroller.scrollTop;if(o&&!d){var u=r.options.resetSelectionOnContextMenu;u&&-1==r.doc.sel.contains(o)&&qn(r,qi)(r.doc,wi(o),j);var f=i.style.cssText,p=t.wrapper.style.cssText;t.wrapper.style.cssText="position: absolute";var h,g=t.wrapper.getBoundingClientRect();if(i.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(e.clientY-g.top-5)+"px; left: "+(e.clientX-g.left-5)+"px;\n      z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(h=window.scrollY),n.input.focus(),s&&window.scrollTo(null,h),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=!0,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),a&&l>=9&&v(),k){dt(e);var m=function(){rt(window,"mouseup",m),setTimeout(y,20)};et(window,"mouseup",m)}else setTimeout(y,50)}function v(){if(null!=i.selectionStart){var e=r.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function y(){if(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=f,a&&l<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=c),null!=i.selectionStart){(!a||a&&l<9)&&v();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?qn(r,ro)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},Va.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Va.prototype.setUneditable=function(){},Va.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=ya&&i(e,t,r)}:i)}e.defineOption=r,e.Init=ya,r("value","",function(e,t){return e.setValue(t)},!0),r("mode",null,function(e,t){e.doc.modeOption=t,Si(e)},!0),r("indentUnit",2,Si,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(e){Ti(e),_r(e),Qn(e)},!0),r("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=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,r.push(ge(n,o))}n++});for(var i=r.length-1;i>=0;i--)co(e.doc,t,r[i],ge(r[i].line,r[i].ch+t.length))}}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=ya&&e.refresh()}),r("specialCharPlaceholder",Qt,function(e){return e.refresh()},!0),r("electricChars",!0),r("inputStyle",v?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),r("rtlMoveVisually",!w),r("wholeLineUpdateBefore",!0),r("theme","default",function(e){va(e),xa(e)},!0),r("keyMap","default",function(e,t,r){var n=Go(t),i=r!=ya&&Go(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,ka,!0),r("gutters",[],function(e){di(e.options),xa(e)},!0),r("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?rn(e.display)+"px":"0",e.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(e){return En(e)},!0),r("scrollbarStyle","native",function(e){_n(e),En(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),r("lineNumbers",!1,function(e){di(e.options),xa(e)},!0),r("firstLineNumber",1,xa,!0),r("lineNumberFormatter",function(e){return e},xa,!0),r("showCursorWhenSelecting",!1,sn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("readOnly",!1,function(e,t){"nocursor"==t&&(vn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),r("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),r("dragDrop",!0,Ca),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,sn,!0),r("singleCursorHeightPerLine",!0,sn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Ti,!0),r("addModeClass",!1,Ti,!0),r("pollInterval",100),r("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),r("historyEventDelay",1250),r("viewportMargin",10,function(e){return e.refresh()},!0),r("maxHighlightLength",1e4,Ti,!0),r("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),r("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),r("autofocus",null),r("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),r("phrases",null)}(Ma),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&qn(this,t[e])(this,r,i),nt(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Go(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:Xn(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");!function(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},function(e){return e.priority}),this.state.modeGen++,Qn(this)}),removeOverlay:Xn(function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void Qn(this)}}),indentLine:Xn(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),pe(this.doc,e)&&Ta(this,e,t,r)}),indentSelection:Xn(function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(Ta(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&Sn(this));else{var o=i.from(),a=i.to(),l=Math.max(r,o.line);r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s<r;++s)Ta(this,s,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[n].from().ch>0&&Gi(this.doc,n,new yi(o,c[n].to()),j)}}}),getTokenAt:function(e,t){return Vt(this,e,t)},getLineTokens:function(e,t){return Vt(this,ge(e),t,!0)},getTokenTypeAt:function(e){e=Ce(this.doc,e);var t,r=It(this,le(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var a=n+i>>1;if((a?r[2*a-1]:0)>=o)i=a;else{if(!(r[2*a+1]<o)){t=r[2*a+2];break}n=a+1}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!r.hasOwnProperty(t))return n;var i=r[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&n.push(i[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var l=i[o[t][a]];l&&n.push(l)}else o.helperType&&i[o.helperType]?n.push(i[o.helperType]):i[o.name]&&n.push(i[o.name]);for(var s=0;s<i._global.length;s++){var c=i._global[s];c.pred(o,this)&&-1==R(n,c.val)&&n.push(c.val)}return n},getStateAfter:function(e,t){var r=this.doc;return Ft(this,(e=xe(r,null==e?r.first+r.size-1:e))+1,t).state},cursorCoords:function(e,t){var r=this.doc.sel.primary();return Gr(this,null==e?r.head:"object"==typeof e?Ce(this.doc,e):e?r.from():r.to(),t||"page")},charCoords:function(e,t){return Ur(this,Ce(this.doc,e),t||"page")},coordsChar:function(e,t){return qr(this,(e=jr(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=jr(this,{top:e,left:0},t||"page").top,fe(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),n=le(this.doc,e)}else n=e;return Vr(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-Ke(n):0)},defaultTextHeight:function(){return Jr(this.display)},defaultCharWidth:function(){return en(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display,a=(e=Gr(this,Ce(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),r&&function(e,t){var r=kn(e,t);null!=r.scrollTop&&Dn(e,r.scrollTop),null!=r.scrollLeft&&An(e,r.scrollLeft)}(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Xn(oa),triggerOnKeyPress:Xn(la),triggerOnKeyUp:aa,triggerOnMouseDown:Xn(da),execCommand:function(e){if(Yo.hasOwnProperty(e))return Yo[e].call(null,this)},triggerElectric:Xn(function(e){Aa(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=Ce(this.doc,e),a=0;a<t&&!(o=Ea(this.doc,o,i,r,n)).hitSide;++a);return o},moveH:Xn(function(e,t){var r=this;this.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?Ea(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()},G)}),deleteH:Xn(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):Ko(this,function(r){var i=Ea(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}})}),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var a=Ce(this.doc,e),l=0;l<t;++l){var s=Gr(this,a,"div");if(null==o?o=s.left:s.left=o,(a=Ia(this,s,i,r)).hitSide)break}return a},moveV:Xn(function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(a){if(o)return e<0?a.from():a.to();var l=Gr(r,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),i.push(l.left);var s=Ia(r,l,e,t);return"page"==t&&a==n.sel.primary()&&Mn(r,Ur(r,s,"div").top-l.top),s},G),i.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=i[a]}),findWordAt:function(e){var t=this.doc,r=le(t,e.line).text,n=e.ch,i=e.ch;if(r){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&i!=r.length||!n?++i:--n;for(var a=r.charAt(n),l=te(a,o)?function(e){return te(e,o)}:/\s/.test(a)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!te(e)};n>0&&l(r.charAt(n-1));)--n;for(;i<r.length&&l(r.charAt(i));)++i}return new yi(ge(e.line,n),ge(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?W(this.display.cursorDiv,"CodeMirror-overwrite"):T(this.display.cursorDiv,"CodeMirror-overwrite"),nt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==N()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Xn(function(e,t){Tn(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Mr(this)-this.display.barHeight,width:e.scrollWidth-Mr(this)-this.display.barWidth,clientHeight:Tr(this),clientWidth:Sr(this)}},scrollIntoView:Xn(function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:ge(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?function(e,t){Ln(e),e.curOp.scrollToPos=t}(this,e):On(this,e.from,e.to,e.margin)}),setSize:Xn(function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&Fr(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Zn(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,nt(this,"refresh",this)}),operation:function(e){return $n(this,e)},startOperation:function(){return Rn(this)},endOperation:function(){return Bn(this)},refresh:Xn(function(){var e=this.display.cachedTextHeight;Qn(this),this.curOp.forceUpdate=!0,_r(this),Tn(this,this.doc.scrollLeft,this.doc.scrollTop),si(this),(null==e||Math.abs(e-Jr(this.display))>.5)&&on(this),nt(this,"refresh",this)}),swapDoc:Xn(function(e){var t=this.doc;return t.cm=null,Pi(this,e),_r(this),this.display.input.reset(),Tn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ar(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},lt(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(Ma);var ja="iter insert remove copy getEditor constructor".split(" ");for(var Ua in To.prototype)To.prototype.hasOwnProperty(Ua)&&R(ja,Ua)<0&&(Ma.prototype[Ua]=function(e){return function(){return e.apply(this.doc,arguments)}}(To.prototype[Ua]));return lt(To),Ma.inputStyles={textarea:Va,contenteditable:Fa},Ma.defineMode=function(e){Ma.defaults.mode||"null"==e||(Ma.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),kt[e]=t}.apply(this,arguments)},Ma.defineMIME=function(e,t){Mt[e]=t},Ma.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ma.defineMIME("text/plain","null"),Ma.defineExtension=function(e,t){Ma.prototype[e]=t},Ma.defineDocExtension=function(e,t){To.prototype[e]=t},Ma.fromTextArea=function(e,t){if((t=t?F(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=N();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=l.getValue()}var i;if(e.form&&(et(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(t){t.save=n,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,n(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(rt(e.form,"submit",n),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var l=Ma(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return l},function(e){e.off=rt,e.on=et,e.wheelEventPixels=gi,e.Doc=To,e.splitLines=bt,e.countColumn=_,e.findColumn=K,e.isWordChar=ee,e.Pass=V,e.signal=nt,e.Line=Gt,e.changeEnd=xi,e.scrollbarModel=Fn,e.Pos=ge,e.cmpPos=me,e.modes=kt,e.mimeModes=Mt,e.resolveMode=St,e.getMode=Tt,e.modeExtensions=Lt,e.extendMode=Ot,e.copyState=Dt,e.startState=At,e.innerMode=Pt,e.commands=Yo,e.keyMap=_o,e.keyName=Uo,e.isModifierKey=Vo,e.lookupKey=Bo,e.normalizeKeyMap=Ro,e.StringStream=Nt,e.SharedTextMarker=Co,e.TextMarker=wo,e.LineWidget=vo,e.e_preventDefault=st,e.e_stopPropagation=ct,e.e_stop=dt,e.addClass=W,e.contains=A,e.rmClass=T,e.keyNames=zo}(Ma),Ma.version="5.40.2",Ma}()},465:function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},466:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),o=u(i),a=u(r(1)),l=r(467),s=r(433),c=u(r(468));function u(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(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)}(t,i.Component),n(t,[{key:"componentDidMount",value:function(){(0,c.default)()}},{key:"render",value:function(){var e=this.props,t=e.ranges,r=e.order,n=e.options,i=e.children,a=t.length;return o.default.createElement(s.Sequence,{order:r,steps:a},function(e,r,a){return o.default.createElement(l.UnControlled,{className:"__dekk-code__",value:"function"==typeof i?i(e,r,a):i,options:n,selection:{ranges:t[e]}})})}}],[{key:"defaultProps",get:function(){return{order:0,ranges:void 0,options:void 0,children:'const foo = "foo"'}}},{key:"propTypes",get:function(){return{order:a.default.number,ranges:a.default.array,options:a.default.object,children:a.default.oneOfType([a.default.string,a.default.func])}}}]),t}();t.default=d},467:function(e,t,r){"use strict";(function(e){var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var a,l=r(0),s="undefined"==typeof navigator||!0===e.PREVENT_CODEMIRROR_RENDER;s||(a=r(454));var c=function(){function e(){}return e.equals=function(e,t){var r=this,n=Object.keys,o=void 0===e?"undefined":i(e),a=void 0===t?"undefined":i(t);return e&&t&&"object"===o&&o===a?n(e).length===n(t).length&&n(e).every(function(n){return r.equals(e[n],t[n])}):e===t},e}(),u=function(){function e(e,t){this.editor=e,this.props=t}return e.prototype.delegateCursor=function(e,t,r){var n=this.editor.getDoc();r&&this.editor.focus(),t?n.setCursor(e):n.setCursor(e,null,{scroll:!1})},e.prototype.delegateScroll=function(e){this.editor.scrollTo(e.x,e.y)},e.prototype.delegateSelection=function(e,t){this.editor.setSelections(e),t&&this.editor.focus()},e.prototype.apply=function(e){e&&e.selection&&e.selection.ranges&&this.delegateSelection(e.selection.ranges,e.selection.focus||!1),e&&e.cursor&&this.delegateCursor(e.cursor,e.autoScroll||!1,e.autoFocus||!1),e&&e.scroll&&this.delegateScroll(e.scroll)},e.prototype.applyNext=function(e,t,r){e&&e.selection&&e.selection.ranges&&t&&t.selection&&t.selection.ranges&&!c.equals(e.selection.ranges,t.selection.ranges)&&this.delegateSelection(t.selection.ranges,t.selection.focus||!1),e&&e.cursor&&t&&t.cursor&&!c.equals(e.cursor,t.cursor)&&this.delegateCursor(r.cursor||t.cursor,t.autoScroll||!1,t.autoCursor||!1),e&&e.scroll&&t&&t.scroll&&!c.equals(e.scroll,t.scroll)&&this.delegateScroll(t.scroll)},e.prototype.applyUserDefined=function(e,t){t&&t.cursor&&this.delegateCursor(t.cursor,e.autoScroll||!1,e.autoFocus||!1)},e.prototype.wire=function(e){var t=this;Object.keys(e||{}).filter(function(e){return/^on/.test(e)}).forEach(function(e){switch(e){case"onBlur":t.editor.on("blur",function(e,r){t.props.onBlur(t.editor,r)});break;case"onContextMenu":t.editor.on("contextmenu",function(e,r){t.props.onContextMenu(t.editor,r)});break;case"onCopy":t.editor.on("copy",function(e,r){t.props.onCopy(t.editor,r)});break;case"onCursor":t.editor.on("cursorActivity",function(e){t.props.onCursor(t.editor,t.editor.getCursor())});break;case"onCursorActivity":t.editor.on("cursorActivity",function(e){t.props.onCursorActivity(t.editor)});break;case"onCut":t.editor.on("cut",function(e){t.props.onCut(t.editor,event)});break;case"onDblClick":t.editor.on("dblclick",function(e){t.props.onDblClick(t.editor,event)});break;case"onDragEnter":t.editor.on("dragenter",function(e,r){t.props.onDragEnter(t.editor,r)});break;case"onDragLeave":t.editor.on("dragleave",function(e){t.props.onDragLeave(t.editor,event)});break;case"onDragOver":t.editor.on("dragover",function(e,r){t.props.onDragOver(t.editor,r)});break;case"onDragStart":t.editor.on("dragstart",function(e){t.props.onDragStart(t.editor,event)});break;case"onDrop":t.editor.on("drop",function(e,r){t.props.onDrop(t.editor,r)});break;case"onFocus":t.editor.on("focus",function(e,r){t.props.onFocus(t.editor,r)});break;case"onGutterClick":t.editor.on("gutterClick",function(e,r,n,i){t.props.onGutterClick(t.editor,r,n,i)});break;case"onKeyDown":t.editor.on("keydown",function(e,r){t.props.onKeyDown(t.editor,r)});break;case"onKeyPress":t.editor.on("keypress",function(e,r){t.props.onKeyPress(t.editor,r)});break;case"onKeyUp":t.editor.on("keyup",function(e,r){t.props.onKeyUp(t.editor,r)});break;case"onMouseDown":t.editor.on("mousedown",function(e){t.props.onMouseDown(t.editor,event)});break;case"onPaste":t.editor.on("paste",function(e){t.props.onPaste(t.editor,event)});break;case"onScroll":t.editor.on("scroll",function(e){t.props.onScroll(t.editor,t.editor.getScrollInfo())});break;case"onSelection":t.editor.on("beforeSelectionChange",function(e,r){t.props.onSelection(t.editor,r)});break;case"onTouchStart":t.editor.on("touchstart",function(e){t.props.onTouchStart(t.editor,event)});break;case"onUpdate":t.editor.on("update",function(e){t.props.onUpdate(t.editor)});break;case"onViewportChange":t.editor.on("viewportChange",function(e,r,n){t.props.onViewportChange(t.editor,r,n)})}})},e}(),d=function(e){function t(t){var r=e.call(this,t)||this;return s?r:(r.applied=!1,r.appliedNext=!1,r.appliedUserDefined=!1,r.deferred=null,r.emulating=!1,r.hydrated=!1,r.initCb=function(){r.props.editorDidConfigure&&r.props.editorDidConfigure(r.editor)},r.mounted=!1,r)}return o(t,e),t.prototype.hydrate=function(e){var t=this,r=n({},a.defaults,this.editor.options,e.options||{});Object.keys(r).some(function(e){return t.editor.getOption(e)!==r[e]})&&Object.keys(r).forEach(function(n){e.options.hasOwnProperty(n)&&t.editor.getOption(n)!==r[n]&&(t.editor.setOption(n,r[n]),t.mirror.setOption(n,r[n]))}),this.hydrated||(this.mounted&&this.deferred?this.resolveChange():this.initChange(e.value||"")),this.hydrated=!0},t.prototype.initChange=function(e){this.emulating=!0;var t=this.editor.lastLine(),r=this.editor.getLine(this.editor.lastLine()).length;this.editor.replaceRange(e||"",{line:0,ch:0},{line:t,ch:r}),this.mirror.setValue(e),this.editor.clearHistory(),this.mirror.clearHistory(),this.emulating=!1},t.prototype.resolveChange=function(){this.emulating=!0,"undo"===this.deferred.origin?this.editor.undo():"redo"===this.deferred.origin?this.editor.redo():this.editor.replaceRange(this.deferred.text,this.deferred.from,this.deferred.to,this.deferred.origin),this.emulating=!1,this.deferred=null},t.prototype.mirrorChange=function(e){return"undo"===e.origin?(this.editor.setHistory(this.mirror.getHistory()),this.mirror.undo()):"redo"===e.origin?(this.editor.setHistory(this.mirror.getHistory()),this.mirror.redo()):this.mirror.replaceRange(e.text,e.from,e.to,e.origin),this.mirror.getValue()},t.prototype.componentWillMount=function(){s||this.props.editorWillMount&&this.props.editorWillMount()},t.prototype.componentDidMount=function(){var e=this;s||(this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&a.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=a(this.ref),this.shared=new u(this.editor,this.props),this.mirror=a(function(){}),this.editor.on("electricInput",function(){e.mirror.setHistory(e.editor.getHistory())}),this.editor.on("cursorActivity",function(){e.mirror.setCursor(e.editor.getCursor())}),this.editor.on("beforeChange",function(t,r){if(!e.emulating){r.cancel(),e.deferred=r;var n=e.mirrorChange(e.deferred);e.props.onBeforeChange&&e.props.onBeforeChange(e.editor,e.deferred,n)}}),this.editor.on("change",function(t,r){e.mounted&&e.props.onChange&&e.props.onChange(e.editor,r,e.editor.getValue())}),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},t.prototype.componentWillReceiveProps=function(e){if(!s){var t={cursor:null};e.value!==this.props.value&&(this.hydrated=!1),this.props.autoCursor||void 0===this.props.autoCursor||(t.cursor=this.editor.getCursor()),this.hydrate(e),this.appliedNext||(this.shared.applyNext(this.props,e,t),this.appliedNext=!0),this.shared.applyUserDefined(this.props,t),this.appliedUserDefined=!0}},t.prototype.componentWillUnmount=function(){s||this.props.editorWillUnmount&&this.props.editorWillUnmount(a)},t.prototype.shouldComponentUpdate=function(e,t){return!s},t.prototype.render=function(){var e=this;if(s)return null;var t=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return l.createElement("div",{className:t,ref:function(t){return e.ref=t}})},t}(l.Component);t.Controlled=d;var f=function(e){function t(t){var r=e.call(this,t)||this;return s?r:(r.applied=!1,r.appliedUserDefined=!1,r.continueChange=!1,r.detached=!1,r.hydrated=!1,r.initCb=function(){r.props.editorDidConfigure&&r.props.editorDidConfigure(r.editor)},r.mounted=!1,r.onBeforeChangeCb=function(){r.continueChange=!0},r)}return o(t,e),t.prototype.hydrate=function(e){var t=this,r=n({},a.defaults,this.editor.options,e.options||{});if(Object.keys(r).some(function(e){return t.editor.getOption(e)!==r[e]})&&Object.keys(r).forEach(function(n){e.options.hasOwnProperty(n)&&t.editor.getOption(n)!==r[n]&&t.editor.setOption(n,r[n])}),!this.hydrated){var i=this.editor.lastLine(),o=this.editor.getLine(this.editor.lastLine()).length;this.editor.replaceRange(e.value||"",{line:0,ch:0},{line:i,ch:o})}this.hydrated=!0},t.prototype.componentWillMount=function(){s||this.props.editorWillMount&&this.props.editorWillMount()},t.prototype.componentDidMount=function(){var e=this;s||(this.detached=!0===this.props.detach,this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&a.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=a(this.ref),this.shared=new u(this.editor,this.props),this.editor.on("beforeChange",function(t,r){e.props.onBeforeChange&&e.props.onBeforeChange(e.editor,r,e.editor.getValue(),e.onBeforeChangeCb)}),this.editor.on("change",function(t,r){e.mounted&&e.props.onChange&&(e.props.onBeforeChange?e.continueChange&&e.props.onChange(e.editor,r,e.editor.getValue()):e.props.onChange(e.editor,r,e.editor.getValue()))}),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.clearHistory(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},t.prototype.componentWillReceiveProps=function(e){if(this.detached&&!1===e.detach&&(this.detached=!1,this.props.editorDidAttach&&this.props.editorDidAttach(this.editor)),this.detached||!0!==e.detach||(this.detached=!0,this.props.editorDidDetach&&this.props.editorDidDetach(this.editor)),!s&&!this.detached){var t={cursor:null};e.value!==this.props.value&&(this.hydrated=!1,this.applied=!1,this.appliedUserDefined=!1),this.props.autoCursor||void 0===this.props.autoCursor||(t.cursor=this.editor.getCursor()),this.hydrate(e),this.applied||(this.shared.apply(this.props),this.applied=!0),this.appliedUserDefined||(this.shared.applyUserDefined(this.props,t),this.appliedUserDefined=!0)}},t.prototype.componentWillUnmount=function(){s||this.props.editorWillUnmount&&this.props.editorWillUnmount(a)},t.prototype.shouldComponentUpdate=function(e,t){var r=!0;return s&&(r=!1),this.detached&&(r=!1),r},t.prototype.render=function(){var e=this;if(s)return null;var t=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return l.createElement("div",{className:t,ref:function(t){return e.ref=t}})},t}(l.Component);t.UnControlled=f}).call(this,r(41))},468:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n    .CodeMirror {\n    font-family: monospace;\n    font-size: var(--font-size, 1em);\n    height: 100%;\n    min-height: 300px;\n    color: black;\n    direction: ltr;\n    }\n\n\n    .CodeMirror-lines {\n    padding: 4px 0;\n    }\n    .CodeMirror pre {\n    padding: 0 4px; \n    }\n\n    .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n    background-color: white;\n    }\n\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\n    .CodeMirror-cursor {\n    border-left: 1px solid black;\n    border-right: none;\n    width: 0;\n    }\n    .CodeMirror div.CodeMirror-secondarycursor {\n    border-left: 1px solid silver;\n    }\n    .cm-fat-cursor .CodeMirror-cursor {\n    width: auto;\n    border: 0 !important;\n    background: #7e7;\n    }\n    .cm-fat-cursor div.CodeMirror-cursors {\n    z-index: 1;\n    }\n    .cm-fat-cursor-mark {\n    background-color: rgba(20, 255, 20, 0.5);\n    animation: "," 1.06s steps(1) infinite;\n    }\n    .cm-animate-fat-cursor {\n    width: auto;\n    border: 0;\n    animation: "," 1.06s steps(1) infinite;\n    background-color: #7e7;\n    }\n\n    .CodeMirror-overwrite .CodeMirror-cursor {}\n\n    .cm-tab { display: inline-block; text-decoration: inherit; }\n\n    .CodeMirror-rulers {\n    position: absolute;\n    left: 0; right: 0; top: -50px; bottom: -20px;\n    overflow: hidden;\n    }\n    .CodeMirror-ruler {\n    border-left: 1px solid #ccc;\n    top: 0; bottom: 0;\n    position: absolute;\n    }\n\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, .cm-s-default .cm-type {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\n    div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}\n    div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}\n    .CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }\n    .CodeMirror-activeline-background {background: #e8f2ff;}\n\n\n\n    .CodeMirror {\n    position: relative;\n    overflow: hidden;\n    background: white;\n    }\n\n    .CodeMirror-scroll {\n    overflow: scroll !important;\n\n    margin-bottom: -30px; margin-right: -30px;\n    padding-bottom: 30px;\n    height: 100%;\n    outline: none; \n    position: relative;\n    }\n    .CodeMirror-sizer {\n    position: relative;\n    border-right: 30px solid transparent;\n    }\n\n\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    }\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 ::selection { background-color: transparent }\n    .CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }\n\n    .CodeMirror-lines {\n    cursor: text;\n    min-height: 1px;\n    }\n    .CodeMirror pre {\n    \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: contextual;\n    font-variant-ligatures: contextual;\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    padding: 0.1px;\n    }\n\n    .CodeMirror-widget {}\n\n    .CodeMirror-rtl pre { direction: rtl; }\n\n    .CodeMirror-code {\n    outline: none;\n    }\n\n\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 {\n    position: absolute;\n    pointer-events: none;\n    }\n    .CodeMirror-measure pre { position: static; }\n\n    div.CodeMirror-cursors {\n    visibility: hidden;\n    position: relative;\n    z-index: 3;\n    }\n    div.CodeMirror-dragcursors {\n    visibility: visible;\n    }\n\n    .CodeMirror-focused div.CodeMirror-cursors {\n    visibility: visible;\n    }\n\n    .CodeMirror-selected { background: rgba(0,0,0,0.4); }\n    .CodeMirror-focused .CodeMirror-selected { background: rgba(0,0,0,0.4); }\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-color: #ffa;\n    background-color: rgba(255, 255, 0, .4);\n    }\n\n    .cm-force-border { padding-right: .1px; }\n\n    @media print {\n    .CodeMirror div.CodeMirror-cursors {\n        visibility: hidden;\n    }\n    }\n\n    .cm-tab-wrap-hack:after { content: ''; }\n\n    span.CodeMirror-selectedtext { background: none; }\n\n\n    .__dekk-code__ {\n    width: 100%;\n    height: 100%;\n    flex: 1 1 100%;\n    display: flex;\n\n        .CodeMirror {\n            flex: 1;\n        }\n    }\n"],["\n    .CodeMirror {\n    font-family: monospace;\n    font-size: var(--font-size, 1em);\n    height: 100%;\n    min-height: 300px;\n    color: black;\n    direction: ltr;\n    }\n\n\n    .CodeMirror-lines {\n    padding: 4px 0;\n    }\n    .CodeMirror pre {\n    padding: 0 4px; \n    }\n\n    .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n    background-color: white;\n    }\n\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\n    .CodeMirror-cursor {\n    border-left: 1px solid black;\n    border-right: none;\n    width: 0;\n    }\n    .CodeMirror div.CodeMirror-secondarycursor {\n    border-left: 1px solid silver;\n    }\n    .cm-fat-cursor .CodeMirror-cursor {\n    width: auto;\n    border: 0 !important;\n    background: #7e7;\n    }\n    .cm-fat-cursor div.CodeMirror-cursors {\n    z-index: 1;\n    }\n    .cm-fat-cursor-mark {\n    background-color: rgba(20, 255, 20, 0.5);\n    animation: "," 1.06s steps(1) infinite;\n    }\n    .cm-animate-fat-cursor {\n    width: auto;\n    border: 0;\n    animation: "," 1.06s steps(1) infinite;\n    background-color: #7e7;\n    }\n\n    .CodeMirror-overwrite .CodeMirror-cursor {}\n\n    .cm-tab { display: inline-block; text-decoration: inherit; }\n\n    .CodeMirror-rulers {\n    position: absolute;\n    left: 0; right: 0; top: -50px; bottom: -20px;\n    overflow: hidden;\n    }\n    .CodeMirror-ruler {\n    border-left: 1px solid #ccc;\n    top: 0; bottom: 0;\n    position: absolute;\n    }\n\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, .cm-s-default .cm-type {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\n    div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}\n    div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}\n    .CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }\n    .CodeMirror-activeline-background {background: #e8f2ff;}\n\n\n\n    .CodeMirror {\n    position: relative;\n    overflow: hidden;\n    background: white;\n    }\n\n    .CodeMirror-scroll {\n    overflow: scroll !important;\n\n    margin-bottom: -30px; margin-right: -30px;\n    padding-bottom: 30px;\n    height: 100%;\n    outline: none; \n    position: relative;\n    }\n    .CodeMirror-sizer {\n    position: relative;\n    border-right: 30px solid transparent;\n    }\n\n\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    }\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 ::selection { background-color: transparent }\n    .CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }\n\n    .CodeMirror-lines {\n    cursor: text;\n    min-height: 1px;\n    }\n    .CodeMirror pre {\n    \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: contextual;\n    font-variant-ligatures: contextual;\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    padding: 0.1px;\n    }\n\n    .CodeMirror-widget {}\n\n    .CodeMirror-rtl pre { direction: rtl; }\n\n    .CodeMirror-code {\n    outline: none;\n    }\n\n\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 {\n    position: absolute;\n    pointer-events: none;\n    }\n    .CodeMirror-measure pre { position: static; }\n\n    div.CodeMirror-cursors {\n    visibility: hidden;\n    position: relative;\n    z-index: 3;\n    }\n    div.CodeMirror-dragcursors {\n    visibility: visible;\n    }\n\n    .CodeMirror-focused div.CodeMirror-cursors {\n    visibility: visible;\n    }\n\n    .CodeMirror-selected { background: rgba(0,0,0,0.4); }\n    .CodeMirror-focused .CodeMirror-selected { background: rgba(0,0,0,0.4); }\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-color: #ffa;\n    background-color: rgba(255, 255, 0, .4);\n    }\n\n    .cm-force-border { padding-right: .1px; }\n\n    @media print {\n    .CodeMirror div.CodeMirror-cursors {\n        visibility: hidden;\n    }\n    }\n\n    .cm-tab-wrap-hack:after { content: ''; }\n\n    span.CodeMirror-selectedtext { background: none; }\n\n\n    .__dekk-code__ {\n    width: 100%;\n    height: 100%;\n    flex: 1 1 100%;\n    display: flex;\n\n        .CodeMirror {\n            flex: 1;\n        }\n    }\n"]),i=r(2);var o=!1;t.default=function(){if(!o){o=!0;var e=(0,i.keyframes)(["50%{background-color:transparent;}"]);(0,i.injectGlobal)(n,e,e)}}}}]);
  //# sourceMappingURL=1.js.map