/ * *
* simplemde v1 . 11.2
* Copyright Next Step Webs , Inc .
* @ link https : //github.com/NextStepWebs/simplemde-markdown-editor
* @ license MIT
* /
! function ( e ) { if ( "object" == typeof exports && "undefined" != typeof module ) module . exports = e ( ) ; else if ( "function" == typeof define && define . amd ) define ( [ ] , e ) ; else { var t ; t = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this , t . SimpleMDE = e ( ) } } ( function ( ) { var e ; return function t ( e , n , r ) { function i ( a , l ) { if ( ! n [ a ] ) { if ( ! e [ a ] ) { var s = "function" == typeof require && require ; if ( ! l && s ) return s ( a , ! 0 ) ; if ( o ) return o ( a , ! 0 ) ; var c = new Error ( "Cannot find module '" + a + "'" ) ; throw c . code = "MODULE_NOT_FOUND" , c } var u = n [ a ] = { exports : { } } ; e [ a ] [ 0 ] . call ( u . exports , function ( t ) { var n = e [ a ] [ 1 ] [ t ] ; return i ( n ? n : t ) } , u , u . exports , t , e , n , r ) } return n [ a ] . exports } for ( var o = "function" == typeof require && require , a = 0 ; a < r . length ; a ++ ) i ( r [ a ] ) ; return i } ( { 1 : [ function ( e , t , n ) { "use strict" ; function r ( ) { for ( var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" , t = 0 , n = e . length ; t < n ; ++ t ) s [ t ] = e [ t ] , c [ e . charCodeAt ( t ) ] = t ; c [ "-" . charCodeAt ( 0 ) ] = 62 , c [ "_" . charCodeAt ( 0 ) ] = 63 } function i ( e ) { var t , n , r , i , o , a , l = e . length ; if ( l % 4 > 0 ) throw new Error ( "Invalid string. Length must be a multiple of 4" ) ; o = "=" === e [ l - 2 ] ? 2 : "=" === e [ l - 1 ] ? 1 : 0 , a = new u ( 3 * l / 4 - o ) , r = o > 0 ? l - 4 : l ; var s = 0 ; for ( t = 0 , n = 0 ; t < r ; t += 4 , n += 3 ) i = c [ e . charCodeAt ( t ) ] << 18 | c [ e . charCodeAt ( t + 1 ) ] << 12 | c [ e . charCodeAt ( t + 2 ) ] << 6 | c [ e . charCodeAt ( t + 3 ) ] , a [ s ++ ] = i >> 16 & 255 , a [ s ++ ] = i >> 8 & 255 , a [ s ++ ] = 255 & i ; return 2 === o ? ( i = c [ e . charCodeAt ( t ) ] << 2 | c [ e . charCodeAt ( t + 1 ) ] >> 4 , a [ s ++ ] = 255 & i ) : 1 === o && ( i = c [ e . charCodeAt ( t ) ] << 10 | c [ e . charCodeAt ( t + 1 ) ] << 4 | c [ e . charCodeAt ( t + 2 ) ] >> 2 , a [ s ++ ] = i >> 8 & 255 , a [ s ++ ] = 255 & i ) , a } function o ( e ) { return s [ e >> 18 & 63 ] + s [ e >> 12 & 63 ] + s [ e >> 6 & 63 ] + s [ 63 & e ] } function a ( e , t , n ) { for ( var r , i = [ ] , a = t ; a < n ; a += 3 ) r = ( e [ a ] << 16 ) + ( e [ a + 1 ] << 8 ) + e [ a + 2 ] , i . push ( o ( r ) ) ; return i . join ( "" ) } function l ( e ) { for ( var t , n = e . length , r = n % 3 , i = "" , o = [ ] , l = 16383 , c = 0 , u = n - r ; c < u ; c += l ) o . push ( a ( e , c , c + l > u ? u : c + l ) ) ; return 1 === r ? ( t = e [ n - 1 ] , i += s [ t >> 2 ] , i += s [ t << 4 & 63 ] , i += "==" ) : 2 === r && ( t = ( e [ n - 2 ] << 8 ) + e [ n - 1 ] , i += s [ t >> 10 ] , i += s [ t >> 4 & 63 ] , i += s [ t << 2 & 63 ] , i += "=" ) , o . push ( i ) , o . join ( "" ) } n . toByteArray = i , n . fromByteArray = l ; var s = [ ] , c = [ ] , u = "undefined" != typeof Uint8Array ? Uint8Array : Array ; r ( ) } , { } ] , 2 : [ function ( e , t , n ) { } , { } ] , 3 : [ function ( e , t , n ) { ( function ( t ) { "use strict" ; function r ( ) { try { var e = new Uint8Array ( 1 ) ; return e . _ _proto _ _ = { _ _proto _ _ : Uint8Array . prototype , foo : function ( ) { return 42 } } , 42 === e . foo ( ) && "function" == typeof e . subarray && 0 === e . subarray ( 1 , 1 ) . byteLength } catch ( t ) { return ! 1 } } function i ( ) { return a . TYPED _ARRAY _SUPPORT ? 2147483647 : 1073741823 } function o ( e , t ) { if ( i ( ) < t ) throw new RangeError ( "Invalid typed array length" ) ; return a . TYPED _ARRAY _SUPPORT ? ( e = new Uint8Array ( t ) , e . _ _proto _ _ = a . prototype ) : ( null === e && ( e = new a ( t ) ) , e . length = t ) , e } function a ( e , t , n ) { if ( ! ( a . TYPED _ARRAY _SUPPORT || this instanceof a ) ) return new a ( e , t , n ) ; if ( "number" == typeof e ) { if ( "string" == typeof t ) throw new Error ( "If encoding is specified then the first argument must be a string" ) ; return u ( this , e ) } return l ( this , e , t , n ) } function l ( e , t , n , r ) { if ( "number" == typeof t ) throw new TypeError ( '"value" argument must not be a number' ) ; return "undefined" != typeof ArrayBuffer && t instanceof ArrayBuffer ? d ( e , t , n , r ) : "string" == typeof t ? f ( e , t , n ) : p ( e , t ) } function s ( e ) { if ( "number" != typeof e ) throw new TypeError ( '"size" argument must be a number' ) } function c ( e , t , n , r ) { return s ( t ) , t <= 0 ? o ( e , t ) : void 0 !== n ? "string" == typeof r ? o ( e , t ) . fill ( n , r ) : o ( e , t ) . fill ( n ) : o ( e , t ) } function u ( e , t ) { if ( s ( t ) , e = o ( e , t < 0 ? 0 : 0 | m ( t ) ) , ! a . TYPED _ARRAY _SUPPORT ) for ( var n = 0 ; n < t ; ++ n ) e [ n ] = 0 ; return e } function f ( e , t , n ) { if ( "string" == typeof n && "" !== n || ( n = "utf8" ) , ! a . isEncoding ( n ) ) throw new TypeError ( '"encoding" must be a valid string encoding' ) ; var r = 0 | v ( t , n ) ; return e = o ( e , r ) , e . write ( t , n ) , e } function h ( e , t ) { var n = 0 | m ( t . length ) ; e = o ( e , n ) ; for ( var r = 0 ; r < n ; r += 1 ) e [ r ] = 255 & t [ r ] ; return e } function d ( e , t , n , r ) { if ( t . byteLength , n < 0 || t . byteLength < n ) throw new RangeError ( "'offset' is out of bounds" ) ; if ( t . byteLength < n + ( r || 0 ) ) throw new RangeError ( "'length' is out of bounds" ) ; return t = void 0 === n && void 0 === r ? new Uint8Array ( t ) : void 0 === r ? new Uint8Array ( t , n ) : new Uint8Array ( t , n , r ) , a . TYPED _ARRAY _SUPPORT ? ( e = t , e . _ _proto _ _ = a . prototype ) : e = h ( e , t ) , e } function p ( e , t ) { if ( a . isBuffer ( t ) ) { var n = 0 | m ( t . length ) ; return e = o ( e , n ) , 0 === e . length ? e : ( t . copy ( e , 0 , 0 , n ) , e ) } if ( t
r . alignWidgets = ! 1 , r . cachedCharWidth = r . cachedTextHeight = r . cachedPaddingH = null , r . maxLine = null , r . maxLineLength = 0 , r . maxLineChanged = ! 1 , r . wheelDX = r . wheelDY = r . wheelStartX = r . wheelStartY = null , r . shift = ! 1 , r . selForContextMenu = null , r . activeTouch = null , n . init ( r ) } function n ( t ) { t . doc . mode = e . getMode ( t . options , t . doc . modeOption ) , r ( t ) } function r ( e ) { e . doc . iter ( function ( e ) { e . stateAfter && ( e . stateAfter = null ) , e . styles && ( e . styles = null ) } ) , e . doc . frontier = e . doc . first , Be ( e , 100 ) , e . state . modeGen ++ , e . curOp && Dt ( e ) } function i ( e ) { e . options . lineWrapping ? ( Qa ( e . display . wrapper , "CodeMirror-wrap" ) , e . display . sizer . style . minWidth = "" , e . display . sizerWidth = null ) : ( Ja ( e . display . wrapper , "CodeMirror-wrap" ) , h ( e ) ) , a ( e ) , Dt ( e ) , st ( e ) , setTimeout ( function ( ) { y ( e ) } , 100 ) } function o ( e ) { var t = xt ( e . display ) , n = e . options . lineWrapping , r = n && Math . max ( 5 , e . display . scroller . clientWidth / bt ( e . display ) - 3 ) ; return function ( i ) { if ( Sr ( 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 n ? o + ( Math . ceil ( i . text . length / r ) || 1 ) * t : o + t } } function a ( e ) { var t = e . doc , n = o ( e ) ; t . iter ( function ( e ) { var t = n ( e ) ; t != e . height && ti ( e , t ) } ) } function l ( e ) { e . display . wrapper . className = e . display . wrapper . className . replace ( /\s*cm-s-\S+/g , "" ) + e . options . theme . replace ( /(^|\s)\s*/g , " cm-s-" ) , st ( e ) } function s ( e ) { c ( e ) , Dt ( e ) , setTimeout ( function ( ) { w ( e ) } , 20 ) } function c ( e ) { var t = e . display . gutters , n = e . options . gutters ; qi ( t ) ; for ( var r = 0 ; r < n . length ; ++ r ) { var i = n [ r ] , o = t . appendChild ( Ui ( "div" , null , "CodeMirror-gutter " + i ) ) ; "CodeMirror-linenumbers" == i && ( e . display . lineGutter = o , o . style . width = ( e . display . lineNumWidth || 1 ) + "px" ) } t . style . display = r ? "" : "none" , u ( e ) } function u ( e ) { var t = e . display . gutters . offsetWidth ; e . display . sizer . style . marginLeft = t + "px" } function f ( e ) { if ( 0 == e . height ) return 0 ; for ( var t , n = e . text . length , r = e ; t = gr ( r ) ; ) { var i = t . find ( 0 , ! 0 ) ; r = i . from . line , n += i . from . ch - i . to . ch } for ( r = e ; t = vr ( r ) ; ) { var i = t . find ( 0 , ! 0 ) ; n -= r . text . length - i . from . ch , r = i . to . line , n += r . text . length - i . to . ch } return n } function h ( e ) { var t = e . display , n = e . doc ; t . maxLine = Jr ( n , n . first ) , t . maxLineLength = f ( t . maxLine ) , t . maxLineChanged = ! 0 , n . iter ( function ( e ) { var n = f ( e ) ; n > t . maxLineLength && ( t . maxLineLength = n , t . maxLine = e ) } ) } function d ( e ) { var t = Ri ( e . gutters , "CodeMirror-linenumbers" ) ; t == - 1 && e . lineNumbers ? e . gutters = e . gutters . concat ( [ "CodeMirror-linenumbers" ] ) : t > - 1 && ! e . lineNumbers && ( e . gutters = e . gutters . slice ( 0 ) , e . gutters . splice ( t , 1 ) ) } function p ( e ) { var t = e . display , n = t . gutters . offsetWidth , r = Math . round ( e . doc . height + qe ( e . display ) ) ; return { clientHeight : t . scroller . clientHeight , viewHeight : t . wrapper . clientHeight , scrollWidth : t . scroller . scrollWidth , clientWidth : t . scroller . clientWidth , viewWidth : t . wrapper . clientWidth , barLeft : e . options . fixedGutter ? n : 0 , docHeight : r , scrollHeight : r + Ye ( e ) + t . barHeight , nativeBarWidth : t . nativeBarWidth , gutterWidth : n } } function m ( e , t , n ) { this . cm = n ; var r = this . vert = Ui ( "div" , [ Ui ( "div" , null , null , "min-width: 1px" ) ] , "CodeMirror-vscrollbar" ) , i = this . horiz = Ui ( "div" , [ Ui ( "div" , null , null , "height: 100%; min-height: 1px" ) ] , "CodeMirror-hscrollbar" ) ; e ( r ) , e ( i ) , Oa ( r , "scroll" , function ( ) { r . clientHeight && t ( r . scrollTop , "vertical" ) } ) , Oa ( i , "scroll" , function ( ) { i . clientWidth && t ( i . scrollLeft , "horizontal" ) } ) , this . checkedZeroWidth = ! 1 , bo && wo < 8 && ( this . horiz . style . minHeight = this . vert . style . minWidth = "18px" ) } function g ( ) { } function v ( t ) { t . display . scrollbars && ( t . display . scrollbars . clear ( ) , t . display . scrollbars . addClass && Ja ( t . display . wrapper , t . display . scrollbars . addClass ) ) , t . display . scrollbars = new e . scrollbarModel [ t . options . scrollbarStyle ] ( function ( e ) { t . display . wrapper . insertBefore ( e , t . display . scrollbarFiller ) , Oa ( e , "mousedown" , function ( ) { t . state . focused && setTimeout ( function ( ) { t . display . input . focus ( ) } , 0 ) } ) , e . setAttribute ( "cm-not-content" , "true" ) } , function ( e , n ) { "horizontal" == n ? an ( t , e ) : on ( t , e ) } , t ) , t . display . scrollbars . addClass && Qa ( t . display . wrapper , t . display . scrollbars . addClass ) } function y ( e , t ) { t || ( t = p ( e ) ) ; var n = e . display . barWidth , r = e . display . barHeight ; x ( e , t ) ; for ( var i = 0 ; i < 4 && n != e . display . barWidth || r != e . display . barHeight ; i ++ ) n != e . display . barWidth && e . options . lineWrapping && O ( e ) , x ( e , p ( e ) ) , n = e . display . barWidth , r = e . display . barHeight } function x ( e , t ) { var n = e . display , r = n . scrol
n . right += s } return n . top += a , n . bottom += a , n } function ht ( e , t , n ) { if ( "div" == n ) return t ; var r = t . left , i = t . top ; if ( "page" == n ) r -= ct ( ) , i -= ut ( ) ; else if ( "local" == n || ! n ) { var o = e . display . sizer . getBoundingClientRect ( ) ; r += o . left , i += o . top } var a = e . display . lineSpace . getBoundingClientRect ( ) ; return { left : r - a . left , top : i - a . top } } function dt ( e , t , n , r , i ) { return r || ( r = Jr ( e . doc , t . line ) ) , ft ( e , r , Je ( e , r , t . ch , i ) , n ) } function pt ( e , t , n , r , i , o ) { function a ( t , a ) { var l = tt ( e , i , t , a ? "right" : "left" , o ) ; return a ? l . left = l . right : l . right = l . left , ft ( e , r , l , n ) } function l ( e , t ) { var n = s [ t ] , r = n . level % 2 ; return e == no ( n ) && t && n . level < s [ t - 1 ] . level ? ( n = s [ -- t ] , e = ro ( n ) - ( n . level % 2 ? 0 : 1 ) , r = ! 0 ) : e == ro ( n ) && t < s . length - 1 && n . level < s [ t + 1 ] . level && ( n = s [ ++ t ] , e = no ( n ) - n . level % 2 , r = ! 1 ) , r && e == n . to && e > n . from ? a ( e - 1 ) : a ( e , r ) } r = r || Jr ( e . doc , t . line ) , i || ( i = et ( e , r ) ) ; var s = oi ( r ) , c = t . ch ; if ( ! s ) return a ( c ) ; var u = uo ( s , c ) , f = l ( c , u ) ; return null != ll && ( f . other = l ( c , ll ) ) , f } function mt ( e , t ) { var n = 0 , t = me ( e . doc , t ) ; e . options . lineWrapping || ( n = bt ( e . display ) * t . ch ) ; var r = Jr ( e . doc , t . line ) , i = ii ( r ) + Ue ( e . display ) ; return { left : n , right : n , top : i , bottom : i + r . height } } function gt ( e , t , n , r ) { var i = Bo ( e , t ) ; return i . xRel = r , n && ( i . outside = ! 0 ) , i } function vt ( e , t , n ) { var r = e . doc ; if ( n += e . display . viewOffset , n < 0 ) return gt ( r . first , 0 , ! 0 , - 1 ) ; var i = ri ( r , n ) , o = r . first + r . size - 1 ; if ( i > o ) return gt ( r . first + r . size - 1 , Jr ( r , o ) . text . length , ! 0 , 1 ) ; t < 0 && ( t = 0 ) ; for ( var a = Jr ( r , i ) ; ; ) { var l = yt ( e , a , i , t , n ) , s = vr ( a ) , c = s && s . find ( 0 , ! 0 ) ; if ( ! s || ! ( l . ch > c . from . ch || l . ch == c . from . ch && l . xRel > 0 ) ) return l ; i = ni ( a = c . to . line ) } } function yt ( e , t , n , r , i ) { function o ( r ) { var i = pt ( e , Bo ( n , r ) , "line" , t , c ) ; return l = ! 0 , a > i . bottom ? i . left - s : a < i . top ? i . left + s : ( l = ! 1 , i . left ) } var a = i - ii ( t ) , l = ! 1 , s = 2 * e . display . wrapper . clientWidth , c = et ( e , t ) , u = oi ( t ) , f = t . text . length , h = io ( t ) , d = oo ( t ) , p = o ( h ) , m = l , g = o ( d ) , v = l ; if ( r > g ) return gt ( n , d , v , 1 ) ; for ( ; ; ) { if ( u ? d == h || d == ho ( t , h , 1 ) : d - h <= 1 ) { var y = r < p || r - p <= g - r ? h : d , x = y == h ? m : v , b = r - ( y == h ? p : g ) ; if ( v && ! u && ! /\s/ . test ( t . text . charAt ( y ) ) && b > 0 && y < t . text . length && c . view . measure . heights . length > 1 ) { var w = tt ( e , c , y , "right" ) ; a <= w . bottom && a >= w . top && Math . abs ( r - w . right ) < b && ( x = ! 1 , y ++ , b = r - w . right ) } for ( ; ji ( t . text . charAt ( y ) ) ; ) ++ y ; var k = gt ( n , y , x , b < - 1 ? - 1 : b > 1 ? 1 : 0 ) ; return k } var S = Math . ceil ( f / 2 ) , C = h + S ; if ( u ) { C = h ; for ( var L = 0 ; L < S ; ++ L ) C = ho ( t , C , 1 ) } var T = o ( C ) ; T > r ? ( d = C , g = T , ( v = l ) && ( g += 1e3 ) , f = S ) : ( h = C , p = T , m = l , f -= S ) } } function xt ( e ) { if ( null != e . cachedTextHeight ) return e . cachedTextHeight ; if ( null == jo ) { jo = Ui ( "pre" ) ; for ( var t = 0 ; t < 49 ; ++ t ) jo . appendChild ( document . createTextNode ( "x" ) ) , jo . appendChild ( Ui ( "br" ) ) ; jo . appendChild ( document . createTextNode ( "x" ) ) } Gi ( e . measure , jo ) ; var n = jo . offsetHeight / 50 ; return n > 3 && ( e . cachedTextHeight = n ) , qi ( e . measure ) , n || 1 } function bt ( e ) { if ( null != e . cachedCharWidth ) return e . cachedCharWidth ; var t = Ui ( "span" , "xxxxxxxxxx" ) , n = Ui ( "pre" , [ t ] ) ; Gi ( e . measure , n ) ; var r = t . getBoundingClientRect ( ) , i = ( r . right - r . left ) / 10 ; return i > 2 && ( e . cachedCharWidth = i ) , i || 10 } function wt ( 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 : ++ $o } , Yo ? Yo . ops . push ( e . curOp ) : e . curOp . ownsGroup = Yo = { ops : [ e . curOp ] , delayedCallbacks : [ ] } } function kt ( e ) { var t = e . delayedCallbacks , n = 0 ; do { for ( ; n < t . length ; n ++ ) t [ n ] . call ( null ) ; for ( var r = 0 ; r < e . ops . length ; r ++ ) { var i = e . ops [ r ] ; if ( i . cursorActivityHandlers ) for ( ; i . cursorActivityCalled < i . cursorActivityHandlers . length ; ) i . cursorActivityHandlers [ i . cursorActivityCalled ++ ] . call ( null , i . cm ) } } while ( n < t . length ) } function St ( e ) { var t = e . curOp , n = t . ownsGroup ; if ( n ) try { kt ( n ) } finally { Yo = null ; for ( var r = 0 ; r < n . ops . length ; r ++ ) n . ops [ r ] . cm . curOp = null ; Ct ( n ) } } function Ct ( e ) { for ( var t = e . ops , n = 0 ; n < t . length ; n ++ ) Lt ( t [ n ] ) ; for ( var n = 0 ; n < t . length ; n ++ ) Tt ( t [ n ] ) ; for ( var n = 0 ; n < t . length ; n ++ ) Mt ( t [ n ] ) ; for ( var n = 0 ; n < t . length ; n ++ ) At ( t [ n ] ) ; for ( var n = 0 ; n < t . length ; n ++ ) Nt ( t [ n ] ) } function Lt ( e ) { var t = e . cm , n = t . display ; T ( t ) , e . updateMaxLine && h ( t ) , e . mustUpdate = e . viewChanged || e . forceUpdate || null != e . scrollTop || e . scrollToPos && ( e . scrollToPos . from . line < n . viewFrom || e . scrollToPos . to . line >= n . viewTo ) || n . maxLineChanged && t . options . lineWrapping , e . update = e . mustUpdate && new L ( t , e . mustUpdate && { top : e .
if ( ! s . outside ) break ; if ( n < 0 ? i <= 0 : i >= o . height ) { s . hitSide = ! 0 ; break } i += 5 * n } return s } function Yn ( t , n , r , i ) { e . defaults [ t ] = n , r && ( na [ t ] = i ? function ( e , t , n ) { n != ra && r ( e , t , n ) } : r ) } function $n ( e ) { for ( var t , n , r , i , o = e . split ( /-(?!$)/ ) , e = o [ o . length - 1 ] , 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 ) ) n = ! 0 ; else { if ( ! /^s(hift)$/i . test ( l ) ) throw new Error ( "Unrecognized modifier name: " + l ) ; r = ! 0 } } return t && ( e = "Alt-" + e ) , n && ( e = "Ctrl-" + e ) , i && ( e = "Cmd-" + e ) , r && ( e = "Shift-" + e ) , e } function Vn ( e ) { return "string" == typeof e ? ha [ e ] : e } function Kn ( e , t , n , r , i ) { if ( r && r . shared ) return Xn ( e , t , n , r , i ) ; if ( e . cm && ! e . cm . curOp ) return Ot ( e . cm , Kn ) ( e , t , n , r , i ) ; var o = new ya ( e , i ) , a = Fo ( t , n ) ; if ( r && _i ( r , o , ! 1 ) , a > 0 || 0 == a && o . clearWhenEmpty !== ! 1 ) return o ; if ( o . replacedWith && ( o . collapsed = ! 0 , o . widgetNode = Ui ( "span" , [ o . replacedWith ] , "CodeMirror-widget" ) , r . handleMouseEvents || o . widgetNode . setAttribute ( "cm-ignore-events" , "true" ) , r . insertLeft && ( o . widgetNode . insertLeft = ! 0 ) ) , o . collapsed ) { if ( yr ( e , t . line , t , n , o ) || t . line != n . line && yr ( e , n . line , t , n , o ) ) throw new Error ( "Inserting collapsed marker partially overlapping an existing one" ) ; _o = ! 0 } o . addToHistory && ui ( e , { from : t , to : n , origin : "markText" } , e . sel , NaN ) ; var l , s = t . line , c = e . cm ; if ( e . iter ( s , n . line + 1 , function ( e ) { c && o . collapsed && ! c . options . lineWrapping && xr ( e ) == c . display . maxLine && ( l = ! 0 ) , o . collapsed && s != t . line && ti ( e , 0 ) , rr ( e , new er ( o , s == t . line ? t . ch : null , s == n . line ? n . ch : null ) ) , ++ s } ) , o . collapsed && e . iter ( t . line , n . line + 1 , function ( t ) { Sr ( e , t ) && ti ( t , 0 ) } ) , o . clearOnEnter && Oa ( o , "beforeCursorEnter" , function ( ) { o . clear ( ) } ) , o . readOnly && ( Wo = ! 0 , ( e . history . done . length || e . history . undone . length ) && e . clearHistory ( ) ) , o . collapsed && ( o . id = ++ va , o . atomic = ! 0 ) , c ) { if ( l && ( c . curOp . updateMaxLine = ! 0 ) , o . collapsed ) Dt ( c , t . line , n . line + 1 ) ; else if ( o . className || o . title || o . startStyle || o . endStyle || o . css ) for ( var u = t . line ; u <= n . line ; u ++ ) Wt ( c , u , "text" ) ; o . atomic && Ne ( c . doc ) , Li ( c , "markerAdded" , c , o ) } return o } function Xn ( e , t , n , r , i ) { r = _i ( r ) , r . shared = ! 1 ; var o = [ Kn ( e , t , n , r , i ) ] , a = o [ 0 ] , l = r . widgetNode ; return Xr ( e , function ( e ) { l && ( r . widgetNode = l . cloneNode ( ! 0 ) ) , o . push ( Kn ( e , me ( e , t ) , me ( e , n ) , r , i ) ) ; for ( var s = 0 ; s < e . linked . length ; ++ s ) if ( e . linked [ s ] . isParent ) return ; a = Pi ( o ) } ) , new xa ( o , a ) } function Zn ( e ) { return e . findMarks ( Bo ( e . first , 0 ) , e . clipPos ( Bo ( e . lastLine ( ) ) ) , function ( e ) { return e . parent } ) } function Jn ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ] , i = r . find ( ) , o = e . clipPos ( i . from ) , a = e . clipPos ( i . to ) ; if ( Fo ( o , a ) ) { var l = Kn ( e , o , a , r . primary , r . primary . type ) ; r . markers . push ( l ) , l . parent = r } } } function Qn ( e ) { for ( var t = 0 ; t < e . length ; t ++ ) { var n = e [ t ] , r = [ n . primary . doc ] ; Xr ( n . primary . doc , function ( e ) { r . push ( e ) } ) ; for ( var i = 0 ; i < n . markers . length ; i ++ ) { var o = n . markers [ i ] ; Ri ( r , o . doc ) == - 1 && ( o . parent = null , n . markers . splice ( i -- , 1 ) ) } } } function er ( e , t , n ) { this . marker = e , this . from = t , this . to = n } function tr ( e , t ) { if ( e ) for ( var n = 0 ; n < e . length ; ++ n ) { var r = e [ n ] ; if ( r . marker == t ) return r } } function nr ( e , t ) { for ( var n , r = 0 ; r < e . length ; ++ r ) e [ r ] != t && ( n || ( n = [ ] ) ) . push ( e [ r ] ) ; return n } function rr ( e , t ) { e . markedSpans = e . markedSpans ? e . markedSpans . concat ( [ t ] ) : [ t ] , t . marker . attachLine ( e ) } function ir ( e , t , n ) { if ( e ) for ( var r , 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 && ( ! n || ! o . marker . insertLeft ) ) { var s = null == o . to || ( a . inclusiveRight ? o . to >= t : o . to > t ) ; ( r || ( r = [ ] ) ) . push ( new er ( a , o . from , s ? null : o . to ) ) } } return r } function or ( e , t , n ) { if ( e ) for ( var r , 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 && ( ! n || o . marker . insertLeft ) ) { var s = null == o . from || ( a . inclusiveLeft ? o . from <= t : o . from < t ) ; ( r || ( r = [ ] ) ) . push ( new er ( a , s ? null : o . from - t , null == o . to ? null : o . to - t ) ) } } return r } function ar ( e , t ) { if ( t . full ) return null ; var n = ve ( e , t . from . line ) && Jr ( e , t . from . line ) . markedSpans , r = ve ( e , t . to . line ) && Jr ( e , t . to . line ) . markedSpans ; if ( ! n && ! r ) return null ; var i = t . from . ch , o = t . to . ch , a = 0 == Fo ( t . from , t . to ) , l = ir ( n , i , a ) , s = or ( r , o , a ) , c = 1 == t . text . length , u = Pi ( t . text ) . length + ( c ? i : 0 ) ; if ( l ) for ( var f = 0 ; f < l . length ; ++ f ) { var h = l [ f ] ; if ( null == h . to ) { var d = tr ( s , h . marker ) ; d ? c && ( h . to = null == d . to ? null : d . to + u ) : h . to = i } } if ( s ) for ( var f = 0 ; f < s . l
var a = t ? "-" : n || r . getSelection ( ) ; this . textarea . value = a , r . state . focused && qa ( this . textarea ) , bo && wo >= 9 && ( this . hasSelection = a ) } else e || ( this . prevInput = this . textarea . value = "" , bo && wo >= 9 && ( this . hasSelection = null ) ) ; this . inaccurateSelection = t } } , getField : function ( ) { return this . textarea } , supportsTouch : function ( ) { return ! 1 } , focus : function ( ) { if ( "nocursor" != this . cm . options . readOnly && ( ! Eo || Yi ( ) != this . textarea ) ) try { this . textarea . focus ( ) } catch ( e ) { } } , blur : function ( ) { this . textarea . blur ( ) } , resetPosition : function ( ) { this . wrapper . style . top = this . wrapper . style . left = 0 } , receivedFocus : function ( ) { this . slowPoll ( ) } , slowPoll : function ( ) { var e = this ; e . pollingFast || e . polling . set ( this . cm . options . pollInterval , function ( ) { e . poll ( ) , e . cm . state . focused && e . slowPoll ( ) } ) } , fastPoll : function ( ) { function e ( ) { var r = n . poll ( ) ; r || t ? ( n . pollingFast = ! 1 , n . slowPoll ( ) ) : ( t = ! 0 , n . polling . set ( 60 , e ) ) } var t = ! 1 , n = this ; n . pollingFast = ! 0 , n . polling . set ( 20 , e ) } , poll : function ( ) { var e = this . cm , t = this . textarea , n = this . prevInput ; if ( this . contextMenuPending || ! e . state . focused || rl ( t ) && ! n && ! this . composing || e . isReadOnly ( ) || e . options . disableInput || e . state . keySeq ) return ! 1 ; var r = t . value ; if ( r == n && ! e . somethingSelected ( ) ) return ! 1 ; if ( bo && wo >= 9 && this . hasSelection === r || Oo && /[\uf700-\uf7ff]/ . test ( r ) ) return e . display . input . reset ( ) , ! 1 ; if ( e . doc . sel == e . display . selForContextMenu ) { var i = r . charCodeAt ( 0 ) ; if ( 8203 != i || n || ( n = " " ) , 8666 == i ) return this . reset ( ) , this . cm . execCommand ( "undo" ) } for ( var o = 0 , a = Math . min ( n . length , r . length ) ; o < a && n . charCodeAt ( o ) == r . charCodeAt ( o ) ; ) ++ o ; var l = this ; return Et ( e , function ( ) { Z ( e , r . slice ( o ) , n . length - o , null , l . composing ? "*compose" : null ) , r . length > 1e3 || r . indexOf ( "\n" ) > - 1 ? t . value = l . prevInput = "" : l . prevInput = r , l . composing && ( l . composing . range . clear ( ) , l . composing . range = e . markText ( l . composing . start , e . getCursor ( "to" ) , { className : "CodeMirror-composing" } ) ) } ) , ! 0 } , ensurePolled : function ( ) { this . pollingFast && this . poll ( ) && ( this . pollingFast = ! 1 ) } , onKeyPress : function ( ) { bo && wo >= 9 && ( this . hasSelection = null ) , this . fastPoll ( ) } , onContextMenu : function ( e ) { function t ( ) { if ( null != a . selectionStart ) { var e = i . somethingSelected ( ) , t = " " + ( e ? a . value : "" ) ; a . value = "⇚" , a . value = t , r . prevInput = e ? "" : " " , a . selectionStart = 1 , a . selectionEnd = t . length , o . selForContextMenu = i . doc . sel } } function n ( ) { if ( r . contextMenuPending = ! 1 , r . wrapper . style . cssText = f , a . style . cssText = u , bo && wo < 9 && o . scrollbars . setScrollTop ( o . scroller . scrollTop = s ) , null != a . selectionStart ) { ( ! bo || bo && wo < 9 ) && t ( ) ; var e = 0 , n = function ( ) { o . selForContextMenu == i . doc . sel && 0 == a . selectionStart && a . selectionEnd > 0 && " " == r . prevInput ? Ot ( i , fa . selectAll ) ( i ) : e ++ < 10 ? o . detectingSelectAll = setTimeout ( n , 500 ) : o . input . reset ( ) } ; o . detectingSelectAll = setTimeout ( n , 200 ) } } var r = this , i = r . cm , o = i . display , a = r . textarea , l = $t ( i , e ) , s = o . scroller . scrollTop ; if ( l && ! Lo ) { var c = i . options . resetSelectionOnContextMenu ; c && i . doc . sel . contains ( l ) == - 1 && Ot ( i , Te ) ( i . doc , de ( l ) , _a ) ; var u = a . style . cssText , f = r . wrapper . style . cssText ; r . wrapper . style . cssText = "position: absolute" ; var h = r . wrapper . getBoundingClientRect ( ) ; if ( a . style . cssText = "position: absolute; width: 30px; height: 30px; top: " + ( e . clientY - h . top - 5 ) + "px; left: " + ( e . clientX - h . left - 5 ) + "px; z-index: 1000; background: " + ( bo ? "rgba(255, 255, 255, .05)" : "transparent" ) + "; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);" , ko ) var d = window . scrollY ; if ( o . input . focus ( ) , ko && window . scrollTo ( null , d ) , o . input . reset ( ) , i . somethingSelected ( ) || ( a . value = r . prevInput = " " ) , r . contextMenuPending = ! 0 , o . selForContextMenu = i . doc . sel , clearTimeout ( o . detectingSelectAll ) , bo && wo >= 9 && t ( ) , Do ) { Ea ( e ) ; var p = function ( ) { Pa ( window , "mouseup" , p ) , setTimeout ( n , 20 ) } ; Oa ( window , "mouseup" , p ) } else setTimeout ( n , 50 ) } } , readOnlyChanged : function ( e ) { e || this . reset ( ) } , setUneditable : Di , needsContentAttribute : ! 1 } , ne . prototype ) , ie . prototype = _i ( { init : function ( e ) { function t ( e ) { if ( ! Mi ( r , e ) ) { if ( r . somethingSelected ( ) ) zo = { lineWise : ! 1 , text : r . getSelections ( ) } , "cut" == e . type && r . replaceSelection ( "" , null , "cut" ) ; else { if ( ! r . options . lineWiseCopyCut ) return ; var t = ee ( r ) ; zo = { lineWise : ! 0 , text : t . text } , "cut" == e . type && r . operation ( function ( ) { r . setSelections ( t . ranges , 0 , _a ) , r . replaceSelection ( "" , null , "cut" ) } ) } if ( e . clipboardData && ! N
a = r ) : ( 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 [ n ] } for ( var c in t ) e [ c ] = t [ c ] ; return e } ; var da = e . lookupKey = function ( e , t , n , r ) { t = Vn ( t ) ; var i = t . call ? t . call ( e , r ) : t [ e ] ; if ( i === ! 1 ) return "nothing" ; if ( "..." === i ) return "multi" ; if ( null != i && n ( i ) ) return "handled" ; if ( t . fallthrough ) { if ( "[object Array]" != Object . prototype . toString . call ( t . fallthrough ) ) return da ( e , t . fallthrough , n , r ) ; for ( var o = 0 ; o < t . fallthrough . length ; o ++ ) { var a = da ( e , t . fallthrough [ o ] , n , r ) ; if ( a ) return a } } } , pa = e . isModifierKey = function ( e ) { var t = "string" == typeof e ? e : al [ e . keyCode ] ; return "Ctrl" == t || "Alt" == t || "Shift" == t || "Mod" == t } , ma = e . keyName = function ( e , t ) { if ( Lo && 34 == e . keyCode && e [ "char" ] ) return ! 1 ; var n = al [ e . keyCode ] , r = n ; return null != r && ! e . altGraphKey && ( e . altKey && "Alt" != n && ( r = "Alt-" + r ) , ( Ho ? e . metaKey : e . ctrlKey ) && "Ctrl" != n && ( r = "Ctrl-" + r ) , ( Ho ? e . ctrlKey : e . metaKey ) && "Cmd" != n && ( r = "Cmd-" + r ) , ! t && e . shiftKey && "Shift" != n && ( r = "Shift-" + r ) , r ) } ; e . fromTextArea = function ( t , n ) { function r ( ) { t . value = c . getValue ( ) } if ( n = n ? _i ( n ) : { } , n . value = t . value , ! n . tabindex && t . tabIndex && ( n . tabindex = t . tabIndex ) , ! n . placeholder && t . placeholder && ( n . placeholder = t . placeholder ) , null == n . autofocus ) { var i = Yi ( ) ; n . autofocus = i == t || null != t . getAttribute ( "autofocus" ) && i == document . body } if ( t . form && ( Oa ( t . form , "submit" , r ) , ! n . leaveSubmitMethodAlone ) ) { var o = t . form , a = o . submit ; try { var l = o . submit = function ( ) { r ( ) , o . submit = a , o . submit ( ) , o . submit = l } } catch ( s ) { } } n . finishInit = function ( e ) { e . save = r , e . getTextArea = function ( ) { return t } , e . toTextArea = function ( ) { e . toTextArea = isNaN , r ( ) , t . parentNode . removeChild ( e . getWrapperElement ( ) ) , t . style . display = "" , t . form && ( Pa ( t . form , "submit" , r ) , "function" == typeof t . form . submit && ( t . form . submit = a ) ) } } , t . style . display = "none" ; var c = e ( function ( e ) { t . parentNode . insertBefore ( e , t . nextSibling ) } , n ) ; return c } ; var ga = e . StringStream = function ( e , t ) { this . pos = this . start = 0 , this . string = e , this . tabSize = t || 8 , this . lastColumnPos = this . lastColumnValue = 0 , this . lineStart = 0 } ; ga . prototype = { eol : function ( ) { return this . pos >= this . string . length } , sol : function ( ) { return this . pos == this . lineStart } , peek : function ( ) { return this . string . charAt ( this . pos ) || void 0 } , next : function ( ) { if ( this . pos < this . string . length ) return this . string . charAt ( this . pos ++ ) } , eat : function ( e ) { var t = this . string . charAt ( this . pos ) ; if ( "string" == typeof e ) var n = t == e ; else var n = t && ( e . test ? e . test ( t ) : e ( t ) ) ; if ( n ) return ++ this . pos , t } , eatWhile : function ( e ) { for ( var t = this . pos ; this . eat ( e ) ; ) ; return this . pos > t } , eatSpace : function ( ) { for ( var e = this . pos ; /[\s\u00a0]/ . test ( this . string . charAt ( this . pos ) ) ; ) ++ this . pos ; return this . pos > e } , skipToEnd : function ( ) { this . pos = this . string . length } , skipTo : function ( e ) { var t = this . string . indexOf ( e , this . pos ) ; if ( t > - 1 ) return this . pos = t , ! 0 } , backUp : function ( e ) { this . pos -= e } , column : function ( ) { return this . lastColumnPos < this . start && ( this . lastColumnValue = za ( this . string , this . start , this . tabSize , this . lastColumnPos , this . lastColumnValue ) , this . lastColumnPos = this . start ) , this . lastColumnValue - ( this . lineStart ? za ( this . string , this . lineStart , this . tabSize ) : 0 ) } , indentation : function ( ) { return za ( this . string , null , this . tabSize ) - ( this . lineStart ? za ( this . string , this . lineStart , this . tabSize ) : 0 ) } , match : function ( e , t , n ) { if ( "string" != typeof e ) { var r = this . string . slice ( this . pos ) . match ( e ) ; return r && r . index > 0 ? null : ( r && t !== ! 1 && ( this . pos += r [ 0 ] . length ) , r ) } var i = function ( e ) { return n ? e . toLowerCase ( ) : e } , o = this . string . substr ( this . pos , e . length ) ; if ( i ( o ) == i ( e ) ) return t !== ! 1 && ( this . pos += e . length ) , ! 0 } , current : function ( ) { return this . string . slice ( this . start , this . pos ) } , hideFirstChars : function ( e , t ) { this . lineStart += e ; try { return t ( ) } finally { this . lineStart -= e } } } ; var va = 0 , ya = e . TextMarker = function ( e , t ) { this . lines = [ ] , this . type = t , this . doc = e , this . id = ++ va } ; Ei ( ya ) , ya . prototype . clear = function ( ) { if ( ! this . explicitlyCleared ) { var e = this . doc . cm , t = e && ! e . curOp ; if ( t && wt ( e ) , Ni ( this , "clear" ) ) { var n = this . find ( ) ; n && Li ( this , "clear" , n . from , n . to ) } for ( var r = null , i = null , o = 0 ; o < this . lines . length ; ++ o ) { var a = this . lines [ o ] , l = tr ( a . markedSpans , this ) ; e && ! this . collapsed ? Wt ( e , ni ( a ) , "text" ) : e && ( null != l . to && ( i = ni ( a ) ) , null != l . from && ( r = ni ( a ) ) ) , a . markedSpans = nr ( a . markedSpans , l ) , null == l . from && this . collapsed && ! Sr (
i ? 1 === i ? t . push ( S . list2 ) : t . push ( S . list3 ) : t . push ( S . list1 ) } return e . trailingSpaceNewLine ? t . push ( "trailing-space-new-line" ) : e . trailingSpace && t . push ( "trailing-space-" + ( e . trailingSpace % 2 ? "a" : "b" ) ) , t . length ? t . join ( " " ) : null } function d ( e , t ) { if ( e . match ( O , ! 0 ) ) return h ( t ) } function p ( t , r ) { var i = r . text ( t , r ) ; if ( "undefined" != typeof i ) return i ; if ( r . list ) return r . list = null , h ( r ) ; if ( r . taskList ) { var a = "x" !== t . match ( A , ! 0 ) [ 1 ] ; return a ? r . taskOpen = ! 0 : r . taskClosed = ! 0 , n . highlightFormatting && ( r . formatting = "task" ) , r . taskList = ! 1 , h ( r ) } if ( r . taskOpen = ! 1 , r . taskClosed = ! 1 , r . header && t . match ( /^#+$/ , ! 0 ) ) return n . highlightFormatting && ( r . formatting = "header" ) , h ( r ) ; var l = t . sol ( ) , s = t . next ( ) ; if ( r . linkTitle ) { r . linkTitle = ! 1 ; var u = s ; "(" === s && ( u = ")" ) , u = ( u + "" ) . replace ( /([.?*+^$[\]\\(){}|-])/g , "\\$1" ) ; var f = "^\\s*(?:[^" + u + "\\\\]+|\\\\\\\\|\\\\.)" + u ; if ( t . match ( new RegExp ( f ) , ! 0 ) ) return S . linkHref } if ( "`" === s ) { var d = r . formatting ; n . highlightFormatting && ( r . formatting = "code" ) , t . eatWhile ( "`" ) ; var p = t . current ( ) . length ; if ( 0 == r . code ) return r . code = p , h ( r ) ; if ( p == r . code ) { var v = h ( r ) ; return r . code = 0 , v } return r . formatting = d , h ( r ) } if ( r . code ) return h ( r ) ; if ( "\\" === s && ( t . next ( ) , n . highlightFormatting ) ) { var y = h ( r ) , x = S . formatting + "-escape" ; return y ? y + " " + x : x } if ( "!" === s && t . match ( /\[[^\]]*\] ?(?:\(|\[)/ , ! 1 ) ) return r . imageMarker = ! 0 , r . image = ! 0 , n . highlightFormatting && ( r . formatting = "image" ) , h ( r ) ; if ( "[" === s && r . imageMarker ) return r . imageMarker = ! 1 , r . imageAltText = ! 0 , n . highlightFormatting && ( r . formatting = "image" ) , h ( r ) ; if ( "]" === s && r . imageAltText ) { n . highlightFormatting && ( r . formatting = "image" ) ; var y = h ( r ) ; return r . imageAltText = ! 1 , r . image = ! 1 , r . inline = r . f = g , y } if ( "[" === s && t . match ( /[^\]]*\](\(.*\)| ?\[.*?\])/ , ! 1 ) && ! r . image ) return r . linkText = ! 0 , n . highlightFormatting && ( r . formatting = "link" ) , h ( r ) ; if ( "]" === s && r . linkText && t . match ( /\(.*?\)| ?\[.*?\]/ , ! 1 ) ) { n . highlightFormatting && ( r . formatting = "link" ) ; var y = h ( r ) ; return r . linkText = ! 1 , r . inline = r . f = g , y } if ( "<" === s && t . match ( /^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/ , ! 1 ) ) { r . f = r . inline = m , n . highlightFormatting && ( r . formatting = "link" ) ; var y = h ( r ) ; return y ? y += " " : y = "" , y + S . linkInline } if ( "<" === s && t . match ( /^[^> \\]+@(?:[^\\>]|\\.)+>/ , ! 1 ) ) { r . f = r . inline = m , n . highlightFormatting && ( r . formatting = "link" ) ; var y = h ( r ) ; return y ? y += " " : y = "" , y + S . linkEmail } if ( "<" === s && t . match ( /^(!--|\w)/ , ! 1 ) ) { var b = t . string . indexOf ( ">" , t . pos ) ; if ( b != - 1 ) { var k = t . string . substring ( t . start , b ) ; /markdown\s*=\s*('|"){0,1}1('|"){0,1}/ . test ( k ) && ( r . md _inside = ! 0 ) } return t . backUp ( 1 ) , r . htmlState = e . startState ( w ) , o ( t , r , c ) } if ( "<" === s && t . match ( /^\/\w*?>/ ) ) return r . md _inside = ! 1 , "tag" ; var C = ! 1 ; if ( ! n . underscoresBreakWords && "_" === s && "_" !== t . peek ( ) && t . match ( /(\w)/ , ! 1 ) ) { var L = t . pos - 2 ; if ( L >= 0 ) { var T = t . string . charAt ( L ) ; "_" !== T && T . match ( /(\w)/ , ! 1 ) && ( C = ! 0 ) } } if ( "*" === s || "_" === s && ! C ) if ( l && " " === t . peek ( ) ) ; else { if ( r . strong === s && t . eat ( s ) ) { n . highlightFormatting && ( r . formatting = "strong" ) ; var v = h ( r ) ; return r . strong = ! 1 , v } if ( ! r . strong && t . eat ( s ) ) return r . strong = s , n . highlightFormatting && ( r . formatting = "strong" ) , h ( r ) ; if ( r . em === s ) { n . highlightFormatting && ( r . formatting = "em" ) ; var v = h ( r ) ; return r . em = ! 1 , v } if ( ! r . em ) return r . em = s , n . highlightFormatting && ( r . formatting = "em" ) , h ( r ) } else if ( " " === s && ( t . eat ( "*" ) || t . eat ( "_" ) ) ) { if ( " " === t . peek ( ) ) return h ( r ) ; t . backUp ( 1 ) } if ( n . strikethrough ) if ( "~" === s && t . eatWhile ( s ) ) { if ( r . strikethrough ) { n . highlightFormatting && ( r . formatting = "strikethrough" ) ; var v = h ( r ) ; return r . strikethrough = ! 1 , v } if ( t . match ( /^[^\s]/ , ! 1 ) ) return r . strikethrough = ! 0 , n . highlightFormatting && ( r . formatting = "strikethrough" ) , h ( r ) } else if ( " " === s && t . match ( /^~~/ , ! 0 ) ) { if ( " " === t . peek ( ) ) return h ( r ) ; t . backUp ( 2 ) } return " " === s && ( t . match ( / +$/ , ! 1 ) ? r . trailingSpace ++ : r . trailingSpace && ( r . trailingSpaceNewLine = ! 0 ) ) , h ( r ) } function m ( e , t ) { var r = e . next ( ) ; if ( ">" === r ) { t . f = t . inline = p , n . highlightFormatting && ( t . formatting = "link" ) ; var i = h ( t ) ; return i ? i += " " : i = "" , i + S . linkInline } return e . match ( /^[^>]+/ , ! 0 ) , S . linkInline } function g ( e , t ) { if ( e . eatSpace ( ) ) return null ; var r = e . next ( ) ; return "(" === r || "[" === r ? ( t . f = t . inline = v ( "(" === r ? ")" : "]" , 0 ) , n . highlightFormatting && ( t . formatting = "link-string" ) , t . linkHref = ! 0 , h ( t ) ) : "error" } function v ( e ) { return function ( t , r ) { var i = t . next ( ) ; if ( i === e ) { r . f = r . inline = p , n . highlightFormat
c = s . length , s = s . replace ( /^ *([*+-]|\d+\.) +/ , "" ) , ~ s . indexOf ( "\n " ) && ( c -= s . length , s = this . options . pedantic ? s . replace ( /^ {1,4}/gm , "" ) : s . replace ( new RegExp ( "^ {1," + c + "}" , "gm" ) , "" ) ) , this . options . smartLists && u !== f - 1 && ( l = d . bullet . exec ( o [ u + 1 ] ) [ 0 ] , a === l || a . length > 1 && l . length > 1 || ( e = o . slice ( u + 1 ) . join ( "\n" ) + e , u = f - 1 ) ) , i = r || /\n\n(?!\s*$)/ . test ( s ) , u !== f - 1 && ( r = "\n" === s . charAt ( s . length - 1 ) , i || ( i = r ) ) , this . tokens . push ( { type : i ? "loose_item_start" : "list_item_start" } ) , this . token ( s , ! 1 , n ) , this . tokens . push ( { type : "list_item_end" } ) ; this . tokens . push ( { type : "list_end" } ) } else if ( o = this . rules . html . exec ( e ) ) e = e . substring ( o [ 0 ] . length ) , this . tokens . push ( { type : this . options . sanitize ? "paragraph" : "html" , pre : ! this . options . sanitizer && ( "pre" === o [ 1 ] || "script" === o [ 1 ] || "style" === o [ 1 ] ) , text : o [ 0 ] } ) ; else if ( ! n && t && ( o = this . rules . def . exec ( e ) ) ) e = e . substring ( o [ 0 ] . length ) , this . tokens . links [ o [ 1 ] . toLowerCase ( ) ] = { href : o [ 2 ] , title : o [ 3 ] } ; else if ( t && ( o = this . rules . table . exec ( e ) ) ) { for ( e = e . substring ( o [ 0 ] . length ) , s = { type : "table" , header : o [ 1 ] . replace ( /^ *| *\| *$/g , "" ) . split ( / *\| */ ) , align : o [ 2 ] . replace ( /^ *|\| *$/g , "" ) . split ( / *\| */ ) , cells : o [ 3 ] . replace ( /(?: *\| *)?\n$/ , "" ) . split ( "\n" ) } , u = 0 ; u < s . align . length ; u ++ ) / ^ * - + : * $ / . test ( s . align [ u ] ) ? s . align [ u ] = "right" : /^ *:-+: *$/ . test ( s . align [ u ] ) ? s . align [ u ] = "center" : /^ *:-+ *$/ . test ( s . align [ u ] ) ? s . align [ u ] = "left" : s . align [ u ] = null ; for ( u = 0 ; u < s . cells . length ; u ++ ) s . cells [ u ] = s . cells [ u ] . replace ( /^ *\| *| *\| *$/g , "" ) . split ( / *\| */ ) ; this . tokens . push ( s ) } else if ( t && ( o = this . rules . paragraph . exec ( e ) ) ) e = e . substring ( o [ 0 ] . length ) , this . tokens . push ( { type : "paragraph" , text : "\n" === o [ 1 ] . charAt ( o [ 1 ] . length - 1 ) ? o [ 1 ] . slice ( 0 , - 1 ) : o [ 1 ] } ) ; else if ( o = this . rules . text . exec ( e ) ) e = e . substring ( o [ 0 ] . length ) , this . tokens . push ( { type : "text" , text : o [ 0 ] } ) ; else if ( e ) throw new Error ( "Infinite loop on byte: " + e . charCodeAt ( 0 ) ) ; return this . tokens } ; var p = { escape : /^\\([\\`*{}\[\]()#+\-.!_>])/ , autolink : /^<([^ >]+(@|:\/)[^ >]+)>/ , url : u , tag : /^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/ , link : /^!?\[(inside)\]\(href\)/ , reflink : /^!?\[(inside)\]\s*\[([^\]]*)\]/ , nolink : /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/ , strong : /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/ , em : /^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/ , code : /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/ , br : /^ {2,}\n(?!\s*$)/ , del : u , text : /^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/ } ; p . _inside = /(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/ , p . _href = /\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/ , p . link = c ( p . link ) ( "inside" , p . _inside ) ( "href" , p . _href ) ( ) , p . reflink = c ( p . reflink ) ( "inside" , p . _inside ) ( ) , p . normal = f ( { } , p ) , p . pedantic = f ( { } , p . normal , { strong : /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/ , em : /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/ } ) , p . gfm = f ( { } , p . normal , { escape : c ( p . escape ) ( "])" , "~|])" ) ( ) , url : /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/ , del : /^~~(?=\S)([\s\S]*?\S)~~/ , text : c ( p . text ) ( "]|" , "~]|" ) ( "|" , "|https?://|" ) ( ) } ) , p . breaks = f ( { } , p . gfm , { br : c ( p . br ) ( "{2,}" , "*" ) ( ) , text : c ( p . gfm . text ) ( "{2,}" , "*" ) ( ) } ) , i . rules = p , i . output = function ( e , t , n ) { var r = new i ( t , n ) ; return r . output ( e ) } , i . prototype . output = function ( e ) { for ( var t , n , r , i , o = "" ; e ; ) if ( i = this . rules . escape . exec ( e ) ) e = e . substring ( i [ 0 ] . length ) , o += i [ 1 ] ; else if ( i = this . rules . autolink . exec ( e ) ) e = e . substring ( i [ 0 ] . length ) , "@" === i [ 2 ] ? ( n = ":" === i [ 1 ] . charAt ( 6 ) ? this . mangle ( i [ 1 ] . substring ( 7 ) ) : this . mangle ( i [ 1 ] ) , r = this . mangle ( "mailto:" ) + n ) : ( n = l ( i [ 1 ] ) , r = n ) , o += this . renderer . link ( r , null , n ) ; else if ( this . inLink || ! ( i = this . rules . url . exec ( e ) ) ) { if ( i = this . rules . tag . exec ( e ) ) ! this . inLink && /^<a /i . test ( i [ 0 ] ) ? this . inLink = ! 0 : this . inLink && /^<\/a>/i . test ( i [ 0 ] ) && ( this . inLink = ! 1 ) , e = e . substring ( i [ 0 ] . length ) , o += this . options . sanitize ? this . options . sanitizer ? this . options . sanitizer ( i [ 0 ] ) : l ( i [ 0 ] ) : i [ 0 ] ; else if ( i = this . rules . link . exec ( e ) ) e = e . substring ( i [ 0 ] . length ) , this . inLink = ! 0 , o += this . outputLink ( i , { href : i [ 2 ] , title : i [ 3 ] } ) , this . inLink = ! 1 ; else if ( ( i = this . rules . reflink . exec ( e ) ) || ( i = this . rules . nolink . exec ( e ) ) ) { if ( e = e . substring ( i [ 0 ] . length ) , t = ( i [ 2 ] || i [ 1 ] ) . replace ( /\s+/g , " " ) , t = this . links [ t . toLowerCase ( ) ] , ! t || ! t . href ) { o += i [ 0 ] . charAt ( 0 ) , e = i [ 0 ] . substring ( 1 ) + e ; continue } this . inLink = ! 0 , o += this . outputLink ( i , t ) , this . inLink = ! 1 } else if ( i = this . rules . strong . ex
} ( navigator . userAgent || navigator . vendor || window . opera ) , e } , V = "" , K = { bold : { name : "bold" , action : c , className : "fa fa-bold" , title : "Bold" , "default" : ! 0 } , italic : { name : "italic" , action : u , className : "fa fa-italic" , title : "Italic" , "default" : ! 0 } , strikethrough : { name : "strikethrough" , action : f , className : "fa fa-strikethrough" , title : "Strikethrough" } , heading : { name : "heading" , action : p , className : "fa fa-header" , title : "Heading" , "default" : ! 0 } , "heading-smaller" : { name : "heading-smaller" , action : p , className : "fa fa-header fa-header-x fa-header-smaller" , title : "Smaller Heading" } , "heading-bigger" : { name : "heading-bigger" , action : m , className : "fa fa-header fa-header-x fa-header-bigger" , title : "Bigger Heading" } , "heading-1" : { name : "heading-1" , action : g , className : "fa fa-header fa-header-x fa-header-1" , title : "Big Heading" } , "heading-2" : { name : "heading-2" , action : v , className : "fa fa-header fa-header-x fa-header-2" , title : "Medium Heading" } , "heading-3" : { name : "heading-3" , action : y , className : "fa fa-header fa-header-x fa-header-3" , title : "Small Heading" } , "separator-1" : { name : "separator-1" } , code : { name : "code" , action : h , className : "fa fa-code" , title : "Code" } , quote : { name : "quote" , action : d , className : "fa fa-quote-left" , title : "Quote" , "default" : ! 0 } , "unordered-list" : { name : "unordered-list" , action : x , className : "fa fa-list-ul" , title : "Generic List" , "default" : ! 0 } , "ordered-list" : { name : "ordered-list" , action : b , className : "fa fa-list-ol" , title : "Numbered List" , "default" : ! 0 } , "clean-block" : { name : "clean-block" , action : w , className : "fa fa-eraser fa-clean-block" , title : "Clean block" } , "separator-2" : { name : "separator-2" } , link : { name : "link" , action : k , className : "fa fa-link" , title : "Create Link" , "default" : ! 0 } , image : { name : "image" , action : S , className : "fa fa-picture-o" , title : "Insert Image" , "default" : ! 0 } , table : { name : "table" , action : C , className : "fa fa-table" , title : "Insert Table" } , "horizontal-rule" : { name : "horizontal-rule" , action : L , className : "fa fa-minus" , title : "Insert Horizontal Line" } , "separator-3" : { name : "separator-3" } , preview : { name : "preview" , action : N , className : "fa fa-eye no-disable" , title : "Toggle Preview" , "default" : ! 0 } , "side-by-side" : { name : "side-by-side" , action : A , className : "fa fa-columns no-disable no-mobile" , title : "Toggle Side by Side" , "default" : ! 0 } , fullscreen : { name : "fullscreen" , action : s , className : "fa fa-arrows-alt no-disable no-mobile" , title : "Toggle Fullscreen" , "default" : ! 0 } , "separator-4" : { name : "separator-4" } , guide : { name : "guide" , action : "https://simplemde.com/markdown-guide" , className : "fa fa-question-circle" , title : "Markdown Guide" , "default" : ! 0 } , "separator-5" : { name : "separator-5" } , undo : { name : "undo" , action : T , className : "fa fa-undo no-disable" , title : "Undo" } , redo : { name : "redo" , action : M , className : "fa fa-repeat no-disable" , title : "Redo" } } , X = { link : [ "[" , "](#url#)" ] , image : [ "![](" , "#url#)" ] , table : [ "" , "\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n" ] , horizontalRule : [ "" , "\n\n-----\n\n" ] } , Z = { link : "URL for the link:" , image : "URL of the image:" } , J = { bold : "**" , code : "```" , italic : "*" } ; _ . prototype . markdown = function ( e ) { if ( j ) { var t ; if ( t = this . options && this . options . renderingConfig && this . options . renderingConfig . markedOptions ? this . options . renderingConfig . markedOptions : { } , this . options && this . options . renderingConfig && this . options . renderingConfig . singleLineBreaks === ! 1 ? t . breaks = ! 1 : t . breaks = ! 0 , this . options && this . options . renderingConfig && this . options . renderingConfig . codeSyntaxHighlighting === ! 0 ) { var n = this . options . renderingConfig . hljs || window . hljs ; n && ( t . highlight = function ( e ) { return n . highlightAuto ( e ) . value } ) } return j . setOptions ( t ) , j ( e ) } } , _ . prototype . render = function ( e ) { if ( e || ( e = this . element || document . getElementsByTagName ( "textarea" ) [ 0 ] ) , ! this . _rendered || this . _rendered !== e ) { this . element = e ; var t = this . options , n = this , i = { } ; for ( var o in t . shortcuts ) null !== t . shortcuts [ o ] && null !== q [ o ] && ! function ( e ) { i [ r ( t . shortcuts [ e ] ) ] = function ( ) { q [ e ] ( n ) } } ( o ) ; i . Enter = "newlineAndIndentContinueMarkdownList" , i . Tab = "tabAndIndentMarkdownList" , i [ "Shift-Tab" ] = "shiftTabAndUnindentMarkdownList" , i . Esc = function ( e ) { e . getOption ( "fullScreen" ) && s ( n ) } , document . addEventListener ( "keydown" , function ( e ) { e = e || window . event , 27 == e . keyCode && n . codemirror