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IACnB8S,SAAQ,KACPJ,EAAiB5G,YAAY,WAAW,KAGrC,IAEf,GDvBAiH,SAAUA,EACVC,aAAcA,EACdC,GAAIC,EACJC,KAAMrL,EACNuB,cAAewB,EAEfuI,sBAAuBA,KAEnB,IADA,IAAIC,EAAK/P,EAAE,WACFzmI,EAAI,EAAGA,EAAIw2I,EAAG12I,OAAQE,IAAK,CAChC,IAAIy2I,EAAMhQ,EAAE+P,EAAGx2I,IACXy2I,EAAIn4E,KAAK,QAAQv7D,QAAQ,QAAU,IAAM0jI,EAAE+P,EAAGx2I,IAAIs+D,KAAK,YACvDm4E,EAAIn4E,KAAK,SAAU,UACnBm4E,EAAI/wF,SAAS,iBAErB,CAEK5W,OAAOq+F,IAAImD,KAAKC,QACU,yCAA3BzhG,OAAOq+F,IAAImD,KAAKC,SAIhBzhG,OAAOq+F,IAAIU,UAAUD,yBACrB9+F,OAAOq+F,IAAIX,cAAcH,qBAE7B,EAGJwB,UAAW6I,EAEX3iG,OAAQ4iG,GAKZ7nG,OAAOq+F,IAAMA","sources":["webpack:///./wwwroot/js/app/showdown.min.js","webpack:///./node_modules/codemirror-spell-checker/src/js/spell-checker.js","webpack:///./node_modules/codemirror/addon/display/autorefresh.js","webpack:///./node_modules/codemirror/addon/display/fullscreen.js","webpack:///./node_modules/codemirror/addon/display/placeholder.js","webpack:///./node_modules/codemirror/addon/edit/continuelist.js","webpack:///./node_modules/codemirror/addon/mode/overlay.js","webpack:///./node_modules/codemirror/addon/search/searchcursor.js","webpack:///./node_modules/codemirror/addon/selection/mark-selection.js","webpack:///./node_modules/codemirror/lib/codemirror.js","webpack:///./node_modules/codemirror/mode/gfm/gfm.js","webpack:///./node_modules/codemirror/mode/markdown/markdown.js","webpack:///./node_modules/codemirror/mode/meta.js","webpack:///./node_modules/codemirror/mode/xml/xml.js","webpack:///./node_modules/easymde/src/js/codemirror/tablist.js","webpack:///./node_modules/easymde/src/js/easymde.js","webpack:///./node_modules/typo-js/typo.js","webpack:///./node_modules/marked/lib/marked.cjs","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///./wwwroot/js/app/UserContactsService.js","webpack:///./wwwroot/js/app/UserBlog.js","webpack:///./wwwroot/js/app/Util.js","webpack:///./wwwroot/js/app/UserBlogEdit.js","webpack:///./wwwroot/js/app/UI.js","webpack:///./wwwroot/js/app/Notifications.js","webpack:///./wwwroot/js/app/Messaging.js","webpack:///./wwwroot/js/app/Stream.js","webpack:///./wwwroot/js/app/ndc.js","webpack:///./wwwroot/js/app/UserContacts.js"],"sourcesContent":["/*! showdown v 1.9.1 - 02-11-2019 */\n(function(){function e(e){\"use strict\";var r={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:\"Omit the default extra whiteline added to code blocks\",type:\"boolean\"},noHeaderId:{defaultValue:!1,describe:\"Turn on/off generated header id\",type:\"boolean\"},prefixHeaderId:{defaultValue:!1,describe:\"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix\",type:\"string\"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the \" char is used in the prefix)',type:\"boolean\"},ghCompatibleHeaderId:{defaultValue:!1,describe:\"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)\",type:\"boolean\"},rawHeaderId:{defaultValue:!1,describe:\"Remove only spaces, ' and \\\" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids\",type:\"boolean\"},headerLevelStart:{defaultValue:!1,describe:\"The header blocks level start\",type:\"integer\"},parseImgDimensions:{defaultValue:!1,describe:\"Turn on/off image dimension parsing\",type:\"boolean\"},simplifiedAutoLink:{defaultValue:!1,describe:\"Turn on/off GFM autolink style\",type:\"boolean\"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:\"Excludes trailing punctuation from links generated with autoLinking\",type:\"boolean\"},literalMidWordUnderscores:{defaultValue:!1,describe:\"Parse midword underscores as literal underscores\",type:\"boolean\"},literalMidWordAsterisks:{defaultValue:!1,describe:\"Parse midword asterisks as literal asterisks\",type:\"boolean\"},strikethrough:{defaultValue:!1,describe:\"Turn on/off strikethrough support\",type:\"boolean\"},tables:{defaultValue:!1,describe:\"Turn on/off tables support\",type:\"boolean\"},tablesHeaderId:{defaultValue:!1,describe:\"Add an id to table headers\",type:\"boolean\"},ghCodeBlocks:{defaultValue:!0,describe:\"Turn on/off GFM fenced code blocks support\",type:\"boolean\"},tasklists:{defaultValue:!1,describe:\"Turn on/off GFM tasklist support\",type:\"boolean\"},smoothLivePreview:{defaultValue:!1,describe:\"Prevents weird effects in live previews due to incomplete input\",type:\"boolean\"},smartIndentationFix:{defaultValue:!1,description:\"Tries to smartly fix indentation in es6 strings\",type:\"boolean\"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:\"Disables the requirement of indenting nested sublists by 4 spaces\",type:\"boolean\"},simpleLineBreaks:{defaultValue:!1,description:\"Parses simple line breaks as
(GFM Style)\",type:\"boolean\"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:\"Makes adding a space between `#` and the header text mandatory (GFM Style)\",type:\"boolean\"},ghMentions:{defaultValue:!1,description:\"Enables github @mentions\",type:\"boolean\"},ghMentionsLink:{defaultValue:\"https://github.com/{u}\",description:\"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.\",type:\"string\"},encodeEmails:{defaultValue:!0,description:\"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities\",type:\"boolean\"},openLinksInNewWindow:{defaultValue:!1,description:\"Open all links in new windows\",type:\"boolean\"},backslashEscapesHTMLTags:{defaultValue:!1,description:\"Support for HTML Tag escaping. ex:
[^\\r]+?<\\/pre>)/gm,function(e,r){var t=r;return t=t.replace(/^ /gm,\"¨0\"),t=t.replace(/¨0/g,\"\")}),a.subParser(\"hashBlock\")(\"\",\"gim\"),e=t.converter._dispatch(\"hashPreCodeTags.after\",e,r,t)}),a.subParser(\"headers\",function(e,r,t){\"use strict\";function n(e){var n,s;if(r.customizedHeaderId){var o=e.match(/\\{([^{]+?)}\\s*$/);o&&o[1]&&(e=o[1])}return n=e,s=a.helper.isString(r.prefixHeaderId)?r.prefixHeaderId:!0===r.prefixHeaderId?\"section-\":\"\",r.rawPrefixHeaderId||(n=s+n),n=r.ghCompatibleHeaderId?n.replace(/ /g,\"-\").replace(/&/g,\"\").replace(/¨T/g,\"\").replace(/¨D/g,\"\").replace(/[&+$,\\/:;=?@\"#{}|^¨~\\[\\]`\\\\*)(%.!'<>]/g,\"\").toLowerCase():r.rawHeaderId?n.replace(/ /g,\"-\").replace(/&/g,\"&\").replace(/¨T/g,\"¨\").replace(/¨D/g,\"$\").replace(/[\"']/g,\"-\").toLowerCase():n.replace(/[^\\w]/g,\"\").toLowerCase(),r.rawPrefixHeaderId&&(n=s+n),t.hashLinkCounts[n]?n=n+\"-\"+t.hashLinkCounts[n]++:t.hashLinkCounts[n]=1,n}e=t.converter._dispatch(\"headers.before\",e,r,t);var s=isNaN(parseInt(r.headerLevelStart))?1:parseInt(r.headerLevelStart),o=r.smoothLivePreview?/^(.+)[ \\t]*\\n={2,}[ \\t]*\\n+/gm:/^(.+)[ \\t]*\\n=+[ \\t]*\\n+/gm,i=r.smoothLivePreview?/^(.+)[ \\t]*\\n-{2,}[ \\t]*\\n+/gm:/^(.+)[ \\t]*\\n-+[ \\t]*\\n+/gm;e=(e=e.replace(o,function(e,o){var i=a.subParser(\"spanGamut\")(o,r,t),l=r.noHeaderId?\"\":' id=\"'+n(o)+'\"',c=\"\\n\"+e+\"\\n\",r,t)}),e=t.converter._dispatch(\"blockQuotes.after\",e,r,t)}),a.subParser(\"codeBlocks\",function(e,r,t){\"use strict\";e=t.converter._dispatch(\"codeBlocks.before\",e,r,t);return e=(e+=\"¨0\").replace(/(?:\\n\\n|^)((?:(?:[ ]{4}|\\t).*\\n+)+)(\\n*[ ]{0,3}[^ \\t\\n]|(?=¨0))/g,function(e,n,s){var o=n,i=s,l=\"\\n\";return o=a.subParser(\"outdent\")(o,r,t),o=a.subParser(\"encodeCode\")(o,r,t),o=a.subParser(\"detab\")(o,r,t),o=o.replace(/^\\n+/g,\"\"),o=o.replace(/\\n+$/g,\"\"),r.omitExtraWLInCodeBlocks&&(l=\"\"),o=\"\",a.subParser(\"hashBlock\")(o,r,t)+i}),e=e.replace(/¨0/,\"\"),e=t.converter._dispatch(\"codeBlocks.after\",e,r,t)}),a.subParser(\"codeSpans\",function(e,r,t){\"use strict\";return void 0===(e=t.converter._dispatch(\"codeSpans.before\",e,r,t))&&(e=\"\"),e=e.replace(/(^|[^\\\\])(`+)([^\\r]*?[^`])\\2(?!`)/gm,function(e,n,s,o){var i=o;return i=i.replace(/^([ \\t]*)/g,\"\"),i=i.replace(/[ \\t]*$/g,\"\"),i=a.subParser(\"encodeCode\")(i,r,t),i=n+\"\"+o+l+\"
\"+i+\"
\",i=a.subParser(\"hashHTMLSpans\")(i,r,t)}),e=t.converter._dispatch(\"codeSpans.after\",e,r,t)}),a.subParser(\"completeHTMLDocument\",function(e,r,t){\"use strict\";if(!r.completeHTMLDocument)return e;e=t.converter._dispatch(\"completeHTMLDocument.before\",e,r,t);var a=\"html\",n=\"\\n\",s=\"\",o='\\n',i=\"\",l=\"\";void 0!==t.metadata.parsed.doctype&&(n=\"\\n\",\"html\"!==(a=t.metadata.parsed.doctype.toString().toLowerCase())&&\"html5\"!==a||(o=''));for(var c in t.metadata.parsed)if(t.metadata.parsed.hasOwnProperty(c))switch(c.toLowerCase()){case\"doctype\":break;case\"title\":s=\"\"+t.metadata.parsed.title+\" \\n\";break;case\"charset\":o=\"html\"===a||\"html5\"===a?'\\n':'\\n';break;case\"language\":case\"lang\":i=' lang=\"'+t.metadata.parsed[c]+'\"',l+='\\n';break;default:l+='\\n'}return e=n+\"\\n\\n\"+s+o+l+\"\\n\\n\"+e.trim()+\"\\n\\n\",e=t.converter._dispatch(\"completeHTMLDocument.after\",e,r,t)}),a.subParser(\"detab\",function(e,r,t){\"use strict\";return e=t.converter._dispatch(\"detab.before\",e,r,t),e=e.replace(/\\t(?=\\t)/g,\" \"),e=e.replace(/\\t/g,\"¨A¨B\"),e=e.replace(/¨B(.+?)¨A/g,function(e,r){for(var t=r,a=4-t.length%4,n=0;n/g,\">\"),e=t.converter._dispatch(\"encodeAmpsAndAngles.after\",e,r,t)}),a.subParser(\"encodeBackslashEscapes\",function(e,r,t){\"use strict\";return e=t.converter._dispatch(\"encodeBackslashEscapes.before\",e,r,t),e=e.replace(/\\\\(\\\\)/g,a.helper.escapeCharactersCallback),e=e.replace(/\\\\([`*_{}\\[\\]()>#+.!~=|-])/g,a.helper.escapeCharactersCallback),e=t.converter._dispatch(\"encodeBackslashEscapes.after\",e,r,t)}),a.subParser(\"encodeCode\",function(e,r,t){\"use strict\";return e=t.converter._dispatch(\"encodeCode.before\",e,r,t),e=e.replace(/&/g,\"&\").replace(//g,\">\").replace(/([*_{}\\[\\]\\\\=~-])/g,a.helper.escapeCharactersCallback),e=t.converter._dispatch(\"encodeCode.after\",e,r,t)}),a.subParser(\"escapeSpecialCharsWithinTagAttributes\",function(e,r,t){\"use strict\";return e=(e=t.converter._dispatch(\"escapeSpecialCharsWithinTagAttributes.before\",e,r,t)).replace(/<\\/?[a-z\\d_:-]+(?:[\\s]+[\\s\\S]+?)?>/gi,function(e){return e.replace(/(.)<\\/?code>(?=.)/g,\"$1`\").replace(/([\\\\`*_~=|])/g,a.helper.escapeCharactersCallback)}),e=e.replace(/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,function(e){return e.replace(/([\\\\`*_~=|])/g,a.helper.escapeCharactersCallback)}),e=t.converter._dispatch(\"escapeSpecialCharsWithinTagAttributes.after\",e,r,t)}),a.subParser(\"githubCodeBlocks\",function(e,r,t){\"use strict\";return r.ghCodeBlocks?(e=t.converter._dispatch(\"githubCodeBlocks.before\",e,r,t),e+=\"¨0\",e=e.replace(/(?:^|\\n)(?: {0,3})(```+|~~~+)(?: *)([^\\s`~]*)\\n([\\s\\S]*?)\\n(?: {0,3})\\1/g,function(e,n,s,o){var i=r.omitExtraWLInCodeBlocks?\"\":\"\\n\";return o=a.subParser(\"encodeCode\")(o,r,t),o=a.subParser(\"detab\")(o,r,t),o=o.replace(/^\\n+/g,\"\"),o=o.replace(/\\n+$/g,\"\"),o=\"\",o=a.subParser(\"hashBlock\")(o,r,t),\"\\n\\n¨G\"+(t.ghCodeBlocks.push({text:e,codeblock:o})-1)+\"G\\n\\n\"}),e=e.replace(/¨0/,\"\"),t.converter._dispatch(\"githubCodeBlocks.after\",e,r,t)):e}),a.subParser(\"hashBlock\",function(e,r,t){\"use strict\";return e=t.converter._dispatch(\"hashBlock.before\",e,r,t),e=e.replace(/(^\\n+|\\n+$)/g,\"\"),e=\"\\n\\n¨K\"+(t.gHtmlBlocks.push(e)-1)+\"K\\n\\n\",e=t.converter._dispatch(\"hashBlock.after\",e,r,t)}),a.subParser(\"hashCodeTags\",function(e,r,t){\"use strict\";e=t.converter._dispatch(\"hashCodeTags.before\",e,r,t);return e=a.helper.replaceRecursiveRegExp(e,function(e,n,s,o){var i=s+a.subParser(\"encodeCode\")(n,r,t)+o;return\"¨C\"+(t.gHtmlSpans.push(i)-1)+\"C\"},\"\"+o+i+\"
]*>\",\"
\",\"gim\"),e=t.converter._dispatch(\"hashCodeTags.after\",e,r,t)}),a.subParser(\"hashElement\",function(e,r,t){\"use strict\";return function(e,r){var a=r;return a=a.replace(/\\n\\n/g,\"\\n\"),a=a.replace(/^\\n/,\"\"),a=a.replace(/\\n+$/g,\"\"),a=\"\\n\\n¨K\"+(t.gHtmlBlocks.push(a)-1)+\"K\\n\\n\"}}),a.subParser(\"hashHTMLBlocks\",function(e,r,t){\"use strict\";e=t.converter._dispatch(\"hashHTMLBlocks.before\",e,r,t);var n=[\"pre\",\"div\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"blockquote\",\"table\",\"dl\",\"ol\",\"ul\",\"script\",\"noscript\",\"form\",\"fieldset\",\"iframe\",\"math\",\"style\",\"section\",\"header\",\"footer\",\"nav\",\"article\",\"aside\",\"address\",\"audio\",\"canvas\",\"figure\",\"hgroup\",\"output\",\"video\",\"p\"],s=function(e,r,a,n){var s=e;return-1!==a.search(/\\bmarkdown\\b/)&&(s=a+t.converter.makeHtml(r)+n),\"\\n\\n¨K\"+(t.gHtmlBlocks.push(s)-1)+\"K\\n\\n\"};r.backslashEscapesHTMLTags&&(e=e.replace(/\\\\<(\\/?[^>]+?)>/g,function(e,r){return\"<\"+r+\">\"}));for(var o=0;o]*>)\",\"im\"),c=\"<\"+n[o]+\"\\\\b[^>]*>\",u=\"\"+n[o]+\">\";-1!==(i=a.helper.regexIndexOf(e,l));){var d=a.helper.splitAtIndex(e,i),p=a.helper.replaceRecursiveRegExp(d[1],s,c,u,\"im\");if(p===d[1])break;e=d[0].concat(p)}return e=e.replace(/(\\n {0,3}(<(hr)\\b([^<>])*?\\/?>)[ \\t]*(?=\\n{2,}))/g,a.subParser(\"hashElement\")(e,r,t)),e=a.helper.replaceRecursiveRegExp(e,function(e){return\"\\n\\n¨K\"+(t.gHtmlBlocks.push(e)-1)+\"K\\n\\n\"},\"^ {0,3}\\x3c!--\",\"--\\x3e\",\"gm\"),e=e.replace(/(?:\\n\\n)( {0,3}(?:<([?%])[^\\r]*?\\2>)[ \\t]*(?=\\n{2,}))/g,a.subParser(\"hashElement\")(e,r,t)),e=t.converter._dispatch(\"hashHTMLBlocks.after\",e,r,t)}),a.subParser(\"hashHTMLSpans\",function(e,r,t){\"use strict\";function a(e){return\"¨C\"+(t.gHtmlSpans.push(e)-1)+\"C\"}return e=t.converter._dispatch(\"hashHTMLSpans.before\",e,r,t),e=e.replace(/<[^>]+?\\/>/gi,function(e){return a(e)}),e=e.replace(/<([^>]+?)>[\\s\\S]*?<\\/\\1>/g,function(e){return a(e)}),e=e.replace(/<([^>]+?)\\s[^>]+?>[\\s\\S]*?<\\/\\1>/g,function(e){return a(e)}),e=e.replace(/<[^>]+?>/gi,function(e){return a(e)}),e=t.converter._dispatch(\"hashHTMLSpans.after\",e,r,t)}),a.subParser(\"unhashHTMLSpans\",function(e,r,t){\"use strict\";e=t.converter._dispatch(\"unhashHTMLSpans.before\",e,r,t);for(var a=0;a ]*>\\\\s* ]*>\",\"^ {0,3}
\\\\s*
\"),l+=\"
\",s.push(l))}for(o=s.length,i=0;i]*>/.test(u)&&(d=!0)}s[i]=u}return e=s.join(\"\\n\"),e=e.replace(/^\\n+/g,\"\"),e=e.replace(/\\n+$/g,\"\"),t.converter._dispatch(\"paragraphs.after\",e,r,t)}),a.subParser(\"runExtension\",function(e,r,t,a){\"use strict\";if(e.filter)r=e.filter(r,a.converter,t);else if(e.regex){var n=e.regex;n instanceof RegExp||(n=new RegExp(n,\"g\")),r=r.replace(n,e.replace)}return r}),a.subParser(\"spanGamut\",function(e,r,t){\"use strict\";return e=t.converter._dispatch(\"spanGamut.before\",e,r,t),e=a.subParser(\"codeSpans\")(e,r,t),e=a.subParser(\"escapeSpecialCharsWithinTagAttributes\")(e,r,t),e=a.subParser(\"encodeBackslashEscapes\")(e,r,t),e=a.subParser(\"images\")(e,r,t),e=a.subParser(\"anchors\")(e,r,t),e=a.subParser(\"autoLinks\")(e,r,t),e=a.subParser(\"simplifiedAutoLinks\")(e,r,t),e=a.subParser(\"emoji\")(e,r,t),e=a.subParser(\"underline\")(e,r,t),e=a.subParser(\"italicsAndBold\")(e,r,t),e=a.subParser(\"strikethrough\")(e,r,t),e=a.subParser(\"ellipsis\")(e,r,t),e=a.subParser(\"hashHTMLSpans\")(e,r,t),e=a.subParser(\"encodeAmpsAndAngles\")(e,r,t),r.simpleLineBreaks?/\\n\\n¨K/.test(e)||(e=e.replace(/\\n+/g,\"
\\n\")):e=e.replace(/ +\\n/g,\"
\\n\"),e=t.converter._dispatch(\"spanGamut.after\",e,r,t)}),a.subParser(\"strikethrough\",function(e,r,t){\"use strict\";return r.strikethrough&&(e=(e=t.converter._dispatch(\"strikethrough.before\",e,r,t)).replace(/(?:~){2}([\\s\\S]+?)(?:~){2}/g,function(e,n){return function(e){return r.simplifiedAutoLink&&(e=a.subParser(\"simplifiedAutoLinks\")(e,r,t)),\"\"+e+\"\"}(n)}),e=t.converter._dispatch(\"strikethrough.after\",e,r,t)),e}),a.subParser(\"stripLinkDefinitions\",function(e,r,t){\"use strict\";var n=function(e,n,s,o,i,l,c){return n=n.toLowerCase(),s.match(/^data:.+?\\/.+?;base64,/)?t.gUrls[n]=s.replace(/\\s/g,\"\"):t.gUrls[n]=a.subParser(\"encodeAmpsAndAngles\")(s,r,t),l?l+c:(c&&(t.gTitles[n]=c.replace(/\"|'/g,\""\")),r.parseImgDimensions&&o&&i&&(t.gDimensions[n]={width:o,height:i}),\"\")};return e=(e+=\"¨0\").replace(/^ {0,3}\\[(.+)]:[ \\t]*\\n?[ \\t]*(data:.+?\\/.+?;base64,[A-Za-z0-9+/=\\n]+?)>?(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*\\n?[ \\t]*(?:(\\n*)[\"|'(](.+?)[\"|')][ \\t]*)?(?:\\n\\n|(?=¨0)|(?=\\n\\[))/gm,n),e=e.replace(/^ {0,3}\\[(.+)]:[ \\t]*\\n?[ \\t]*([^>\\s]+)>?(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*\\n?[ \\t]*(?:(\\n*)[\"|'(](.+?)[\"|')][ \\t]*)?(?:\\n+|(?=¨0))/gm,n),e=e.replace(/¨0/,\"\")}),a.subParser(\"tables\",function(e,r,t){\"use strict\";function n(e){return/^:[ \\t]*--*$/.test(e)?' style=\"text-align:left;\"':/^--*[ \\t]*:[ \\t]*$/.test(e)?' style=\"text-align:right;\"':/^:[ \\t]*--*[ \\t]*:$/.test(e)?' style=\"text-align:center;\"':\"\"}function s(e,n){var s=\"\";return e=e.trim(),(r.tablesHeaderId||r.tableHeaderId)&&(s=' id=\"'+e.replace(/ /g,\"_\").toLowerCase()+'\"'),e=a.subParser(\"spanGamut\")(e,r,t),\"\"+e+\" \\n\"}function o(e,n){return\"\"+a.subParser(\"spanGamut\")(e,r,t)+\" \\n\"}function i(e){var i,l=e.split(\"\\n\");for(i=0;i\\n\\n\\n\",a=e.length,n=0;n\\n \\n\\n\",n=0;n\\n\";for(var s=0;s\\n\"}return t+=\" \\n\\n\"}(p,_)}if(!r.tables)return e;return e=t.converter._dispatch(\"tables.before\",e,r,t),e=e.replace(/\\\\(\\|)/g,a.helper.escapeCharactersCallback),e=e.replace(/^ {0,3}\\|?.+\\|.+\\n {0,3}\\|?[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[\\s\\S]+?(?:\\n\\n|¨0)/gm,i),e=e.replace(/^ {0,3}\\|.+\\|[ \\t]*\\n {0,3}\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*\\n( {0,3}\\|.+\\|[ \\t]*\\n)*(?:\\n|¨0)/gm,i),e=t.converter._dispatch(\"tables.after\",e,r,t)}),a.subParser(\"underline\",function(e,r,t){\"use strict\";return r.underline?(e=t.converter._dispatch(\"underline.before\",e,r,t),e=r.literalMidWordUnderscores?(e=e.replace(/\\b___(\\S[\\s\\S]*?)___\\b/g,function(e,r){return\"\"+r+\"\"})).replace(/\\b__(\\S[\\s\\S]*?)__\\b/g,function(e,r){return\"\"+r+\"\"}):(e=e.replace(/___(\\S[\\s\\S]*?)___/g,function(e,r){return/\\S$/.test(r)?\"\"+r+\"\":e})).replace(/__(\\S[\\s\\S]*?)__/g,function(e,r){return/\\S$/.test(r)?\"\"+r+\"\":e}),e=e.replace(/(_)/g,a.helper.escapeCharactersCallback),e=t.converter._dispatch(\"underline.after\",e,r,t)):e}),a.subParser(\"unescapeSpecialChars\",function(e,r,t){\"use strict\";return e=t.converter._dispatch(\"unescapeSpecialChars.before\",e,r,t),e=e.replace(/¨E(\\d+)E/g,function(e,r){var t=parseInt(r);return String.fromCharCode(t)}),e=t.converter._dispatch(\"unescapeSpecialChars.after\",e,r,t)}),a.subParser(\"makeMarkdown.blockquote\",function(e,r){\"use strict\";var t=\"\";if(e.hasChildNodes())for(var n=e.childNodes,s=n.length,o=0;o \"+t.split(\"\\n\").join(\"\\n> \")}),a.subParser(\"makeMarkdown.codeBlock\",function(e,r){\"use strict\";var t=e.getAttribute(\"language\"),a=e.getAttribute(\"precodenum\");return\"```\"+t+\"\\n\"+r.preList[a]+\"\\n```\"}),a.subParser(\"makeMarkdown.codeSpan\",function(e){\"use strict\";return\"`\"+e.innerHTML+\"`\"}),a.subParser(\"makeMarkdown.emphasis\",function(e,r){\"use strict\";var t=\"\";if(e.hasChildNodes()){t+=\"*\";for(var n=e.childNodes,s=n.length,o=0;o\",e.hasAttribute(\"width\")&&e.hasAttribute(\"height\")&&(r+=\" =\"+e.getAttribute(\"width\")+\"x\"+e.getAttribute(\"height\")),e.hasAttribute(\"title\")&&(r+=' \"'+e.getAttribute(\"title\")+'\"'),r+=\")\"),r}),a.subParser(\"makeMarkdown.links\",function(e,r){\"use strict\";var t=\"\";if(e.hasChildNodes()&&e.hasAttribute(\"href\")){var n=e.childNodes,s=n.length;t=\"[\";for(var o=0;o\",e.hasAttribute(\"title\")&&(t+=' \"'+e.getAttribute(\"title\")+'\"'),t+=\")\"}return t}),a.subParser(\"makeMarkdown.list\",function(e,r,t){\"use strict\";var n=\"\";if(!e.hasChildNodes())return\"\";for(var s=e.childNodes,o=s.length,i=e.getAttribute(\"start\")||1,l=0;l\"+r.preList[t]+\"\"}),a.subParser(\"makeMarkdown.strikethrough\",function(e,r){\"use strict\";var t=\"\";if(e.hasChildNodes()){t+=\"~~\";for(var n=e.childNodes,s=n.length,o=0;otr>th\"),l=e.querySelectorAll(\"tbody>tr\");for(t=0;t_&&(_=g)}for(t=0;t/g,\"\\\\$1>\"),r=r.replace(/^#/gm,\"\\\\#\"),r=r.replace(/^(\\s*)([-=]{3,})(\\s*)$/,\"$1\\\\$2$3\"),r=r.replace(/^( {0,3}\\d+)\\./gm,\"$1\\\\.\"),r=r.replace(/^( {0,3})([+-])/gm,\"$1\\\\$2\"),r=r.replace(/]([\\s]*)\\(/g,\"\\\\]$1\\\\(\"),r=r.replace(/^ {0,3}\\[([\\S \\t]*?)]:/gm,\"\\\\[$1]:\")});\"function\"==typeof define&&define.amd?define(function(){\"use strict\";return a}):\"undefined\"!=typeof module&&module.exports?module.exports=a:(this||window).showdown=a}).call(this);\n//# sourceMappingURL=showdown.min.js.map\n","// Use strict mode (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode)\n\"use strict\";\n\n\n// Requires\nvar Typo = require(\"typo-js\");\n\n\n// Create function\nfunction CodeMirrorSpellChecker(options) {\n\t// Initialize\n\toptions = options || {};\n\n\n\t// Verify\n\tif(typeof options.codeMirrorInstance !== \"function\" || typeof options.codeMirrorInstance.defineMode !== \"function\") {\n\t\tconsole.log(\"CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`\");\n\t\treturn;\n\t}\n\n\n\t// Because some browsers don't support this functionality yet\n\tif(!String.prototype.includes) {\n\t\tString.prototype.includes = function() {\n\t\t\t\"use strict\";\n\t\t\treturn String.prototype.indexOf.apply(this, arguments) !== -1;\n\t\t};\n\t}\n\n\n\t// Define the new mode\n\toptions.codeMirrorInstance.defineMode(\"spell-checker\", function(config) {\n\t\t// Load AFF/DIC data\n\t\tif(!CodeMirrorSpellChecker.aff_loading) {\n\t\t\tCodeMirrorSpellChecker.aff_loading = true;\n\t\t\tvar xhr_aff = new XMLHttpRequest();\n\t\t\txhr_aff.open(\"GET\", \"https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff\", true);\n\t\t\txhr_aff.onload = function() {\n\t\t\t\tif(xhr_aff.readyState === 4 && xhr_aff.status === 200) {\n\t\t\t\t\tCodeMirrorSpellChecker.aff_data = xhr_aff.responseText;\n\t\t\t\t\tCodeMirrorSpellChecker.num_loaded++;\n\n\t\t\t\t\tif(CodeMirrorSpellChecker.num_loaded == 2) {\n\t\t\t\t\t\tCodeMirrorSpellChecker.typo = new Typo(\"en_US\", CodeMirrorSpellChecker.aff_data, CodeMirrorSpellChecker.dic_data, {\n\t\t\t\t\t\t\tplatform: \"any\"\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\txhr_aff.send(null);\n\t\t}\n\n\t\tif(!CodeMirrorSpellChecker.dic_loading) {\n\t\t\tCodeMirrorSpellChecker.dic_loading = true;\n\t\t\tvar xhr_dic = new XMLHttpRequest();\n\t\t\txhr_dic.open(\"GET\", \"https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic\", true);\n\t\t\txhr_dic.onload = function() {\n\t\t\t\tif(xhr_dic.readyState === 4 && xhr_dic.status === 200) {\n\t\t\t\t\tCodeMirrorSpellChecker.dic_data = xhr_dic.responseText;\n\t\t\t\t\tCodeMirrorSpellChecker.num_loaded++;\n\n\t\t\t\t\tif(CodeMirrorSpellChecker.num_loaded == 2) {\n\t\t\t\t\t\tCodeMirrorSpellChecker.typo = new Typo(\"en_US\", CodeMirrorSpellChecker.aff_data, CodeMirrorSpellChecker.dic_data, {\n\t\t\t\t\t\t\tplatform: \"any\"\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\txhr_dic.send(null);\n\t\t}\n\n\n\t\t// Define what separates a word\n\t\tvar rx_word = \"!\\\"#$%&()*+,-./:;<=>?@[\\\\]^_`{|}~ \";\n\n\n\t\t// Create the overlay and such\n\t\tvar overlay = {\n\t\t\ttoken: function(stream) {\n\t\t\t\tvar ch = stream.peek();\n\t\t\t\tvar word = \"\";\n\n\t\t\t\tif(rx_word.includes(ch)) {\n\t\t\t\t\tstream.next();\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\twhile((ch = stream.peek()) != null && !rx_word.includes(ch)) {\n\t\t\t\t\tword += ch;\n\t\t\t\t\tstream.next();\n\t\t\t\t}\n\n\t\t\t\tif(CodeMirrorSpellChecker.typo && !CodeMirrorSpellChecker.typo.check(word))\n\t\t\t\t\treturn \"spell-error\"; // CSS class: cm-spell-error\n\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\n\t\tvar mode = options.codeMirrorInstance.getMode(\n\t\t\tconfig, config.backdrop || \"text/plain\"\n\t\t);\n\n\t\treturn options.codeMirrorInstance.overlayMode(mode, overlay, true);\n\t});\n}\n\n\n// Initialize data globally to reduce memory consumption\nCodeMirrorSpellChecker.num_loaded = 0;\nCodeMirrorSpellChecker.aff_loading = false;\nCodeMirrorSpellChecker.dic_loading = false;\nCodeMirrorSpellChecker.aff_data = \"\";\nCodeMirrorSpellChecker.dic_data = \"\";\nCodeMirrorSpellChecker.typo;\n\n\n// Export\nmodule.exports = CodeMirrorSpellChecker;","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"))\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod)\n else // Plain browser env\n mod(CodeMirror)\n})(function(CodeMirror) {\n \"use strict\"\n\n CodeMirror.defineOption(\"autoRefresh\", false, function(cm, val) {\n if (cm.state.autoRefresh) {\n stopListening(cm, cm.state.autoRefresh)\n cm.state.autoRefresh = null\n }\n if (val && cm.display.wrapper.offsetHeight == 0)\n startListening(cm, cm.state.autoRefresh = {delay: val.delay || 250})\n })\n\n function startListening(cm, state) {\n function check() {\n if (cm.display.wrapper.offsetHeight) {\n stopListening(cm, state)\n if (cm.display.lastWrapHeight != cm.display.wrapper.clientHeight)\n cm.refresh()\n } else {\n state.timeout = setTimeout(check, state.delay)\n }\n }\n state.timeout = setTimeout(check, state.delay)\n state.hurry = function() {\n clearTimeout(state.timeout)\n state.timeout = setTimeout(check, 50)\n }\n CodeMirror.on(window, \"mouseup\", state.hurry)\n CodeMirror.on(window, \"keyup\", state.hurry)\n }\n\n function stopListening(_cm, state) {\n clearTimeout(state.timeout)\n CodeMirror.off(window, \"mouseup\", state.hurry)\n CodeMirror.off(window, \"keyup\", state.hurry)\n }\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n CodeMirror.defineOption(\"fullScreen\", false, function(cm, val, old) {\n if (old == CodeMirror.Init) old = false;\n if (!old == !val) return;\n if (val) setFullscreen(cm);\n else setNormal(cm);\n });\n\n function setFullscreen(cm) {\n var wrap = cm.getWrapperElement();\n cm.state.fullScreenRestore = {scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset,\n width: wrap.style.width, height: wrap.style.height};\n wrap.style.width = \"\";\n wrap.style.height = \"auto\";\n wrap.className += \" CodeMirror-fullscreen\";\n document.documentElement.style.overflow = \"hidden\";\n cm.refresh();\n }\n\n function setNormal(cm) {\n var wrap = cm.getWrapperElement();\n wrap.className = wrap.className.replace(/\\s*CodeMirror-fullscreen\\b/, \"\");\n document.documentElement.style.overflow = \"\";\n var info = cm.state.fullScreenRestore;\n wrap.style.width = info.width; wrap.style.height = info.height;\n window.scrollTo(info.scrollLeft, info.scrollTop);\n cm.refresh();\n }\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n CodeMirror.defineOption(\"placeholder\", \"\", function(cm, val, old) {\n var prev = old && old != CodeMirror.Init;\n if (val && !prev) {\n cm.on(\"blur\", onBlur);\n cm.on(\"change\", onChange);\n cm.on(\"swapDoc\", onChange);\n CodeMirror.on(cm.getInputField(), \"compositionupdate\", cm.state.placeholderCompose = function() { onComposition(cm) })\n onChange(cm);\n } else if (!val && prev) {\n cm.off(\"blur\", onBlur);\n cm.off(\"change\", onChange);\n cm.off(\"swapDoc\", onChange);\n CodeMirror.off(cm.getInputField(), \"compositionupdate\", cm.state.placeholderCompose)\n clearPlaceholder(cm);\n var wrapper = cm.getWrapperElement();\n wrapper.className = wrapper.className.replace(\" CodeMirror-empty\", \"\");\n }\n\n if (val && !cm.hasFocus()) onBlur(cm);\n });\n\n function clearPlaceholder(cm) {\n if (cm.state.placeholder) {\n cm.state.placeholder.parentNode.removeChild(cm.state.placeholder);\n cm.state.placeholder = null;\n }\n }\n function setPlaceholder(cm) {\n clearPlaceholder(cm);\n var elt = cm.state.placeholder = document.createElement(\"pre\");\n elt.style.cssText = \"height: 0; overflow: visible\";\n elt.style.direction = cm.getOption(\"direction\");\n elt.className = \"CodeMirror-placeholder CodeMirror-line-like\";\n var placeHolder = cm.getOption(\"placeholder\")\n if (typeof placeHolder == \"string\") placeHolder = document.createTextNode(placeHolder)\n elt.appendChild(placeHolder)\n cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild);\n }\n\n function onComposition(cm) {\n setTimeout(function() {\n var empty = false\n if (cm.lineCount() == 1) {\n var input = cm.getInputField()\n empty = input.nodeName == \"TEXTAREA\" ? !cm.getLine(0).length\n : !/[^\\u200b]/.test(input.querySelector(\".CodeMirror-line\").textContent)\n }\n if (empty) setPlaceholder(cm)\n else clearPlaceholder(cm)\n }, 20)\n }\n\n function onBlur(cm) {\n if (isEmpty(cm)) setPlaceholder(cm);\n }\n function onChange(cm) {\n var wrapper = cm.getWrapperElement(), empty = isEmpty(cm);\n wrapper.className = wrapper.className.replace(\" CodeMirror-empty\", \"\") + (empty ? \" CodeMirror-empty\" : \"\");\n\n if (empty) setPlaceholder(cm);\n else clearPlaceholder(cm);\n }\n\n function isEmpty(cm) {\n return (cm.lineCount() === 1) && (cm.getLine(0) === \"\");\n }\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n var listRE = /^(\\s*)(>[> ]*|[*+-] \\[[x ]\\]\\s|[*+-]\\s|(\\d+)([.)]))(\\s*)/,\n emptyListRE = /^(\\s*)(>[> ]*|[*+-] \\[[x ]\\]|[*+-]|(\\d+)[.)])(\\s*)$/,\n unorderedListRE = /[*+-]\\s/;\n\n CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) {\n if (cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n var ranges = cm.listSelections(), replacements = [];\n for (var i = 0; i < ranges.length; i++) {\n var pos = ranges[i].head;\n\n // If we're not in Markdown mode, fall back to normal newlineAndIndent\n var eolState = cm.getStateAfter(pos.line);\n var inner = CodeMirror.innerMode(cm.getMode(), eolState);\n if (inner.mode.name !== \"markdown\" && inner.mode.helperType !== \"markdown\") {\n cm.execCommand(\"newlineAndIndent\");\n return;\n } else {\n eolState = inner.state;\n }\n\n var inList = eolState.list !== false;\n var inQuote = eolState.quote !== 0;\n\n var line = cm.getLine(pos.line), match = listRE.exec(line);\n var cursorBeforeBullet = /^\\s*$/.test(line.slice(0, pos.ch));\n if (!ranges[i].empty() || (!inList && !inQuote) || !match || cursorBeforeBullet) {\n cm.execCommand(\"newlineAndIndent\");\n return;\n }\n if (emptyListRE.test(line)) {\n var endOfQuote = inQuote && />\\s*$/.test(line)\n var endOfList = !/>\\s*$/.test(line)\n if (endOfQuote || endOfList) cm.replaceRange(\"\", {\n line: pos.line, ch: 0\n }, {\n line: pos.line, ch: pos.ch + 1\n });\n replacements[i] = \"\\n\";\n } else {\n var indent = match[1], after = match[5];\n var numbered = !(unorderedListRE.test(match[2]) || match[2].indexOf(\">\") >= 0);\n var bullet = numbered ? (parseInt(match[3], 10) + 1) + match[4] : match[2].replace(\"x\", \" \");\n replacements[i] = \"\\n\" + indent + bullet + after;\n\n if (numbered) incrementRemainingMarkdownListNumbers(cm, pos);\n }\n }\n\n cm.replaceSelections(replacements);\n };\n\n // Auto-updating Markdown list numbers when a new item is added to the\n // middle of a list\n function incrementRemainingMarkdownListNumbers(cm, pos) {\n var startLine = pos.line, lookAhead = 0, skipCount = 0;\n var startItem = listRE.exec(cm.getLine(startLine)), startIndent = startItem[1];\n\n do {\n lookAhead += 1;\n var nextLineNumber = startLine + lookAhead;\n var nextLine = cm.getLine(nextLineNumber), nextItem = listRE.exec(nextLine);\n\n if (nextItem) {\n var nextIndent = nextItem[1];\n var newNumber = (parseInt(startItem[3], 10) + lookAhead - skipCount);\n var nextNumber = (parseInt(nextItem[3], 10)), itemNumber = nextNumber;\n\n if (startIndent === nextIndent && !isNaN(nextNumber)) {\n if (newNumber === nextNumber) itemNumber = nextNumber + 1;\n if (newNumber > nextNumber) itemNumber = newNumber + 1;\n cm.replaceRange(\n nextLine.replace(listRE, nextIndent + itemNumber + nextItem[4] + nextItem[5]),\n {\n line: nextLineNumber, ch: 0\n }, {\n line: nextLineNumber, ch: nextLine.length\n });\n } else {\n if (startIndent.length > nextIndent.length) return;\n // This doesn't run if the next line immediately indents, as it is\n // not clear of the users intention (new indented item or same level)\n if ((startIndent.length < nextIndent.length) && (lookAhead === 1)) return;\n skipCount += 1;\n }\n }\n } while (nextItem);\n }\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n// Utility function that allows modes to be combined. The mode given\n// as the base argument takes care of most of the normal mode\n// functionality, but a second (typically simple) mode is used, which\n// can override the style of text. Both modes get to parse all of the\n// text, but when both assign a non-null style to a piece of code, the\n// overlay wins, unless the combine argument was true and not overridden,\n// or state.overlay.combineTokens was true, in which case the styles are\n// combined.\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.overlayMode = function(base, overlay, combine) {\n return {\n startState: function() {\n return {\n base: CodeMirror.startState(base),\n overlay: CodeMirror.startState(overlay),\n basePos: 0, baseCur: null,\n overlayPos: 0, overlayCur: null,\n streamSeen: null\n };\n },\n copyState: function(state) {\n return {\n base: CodeMirror.copyState(base, state.base),\n overlay: CodeMirror.copyState(overlay, state.overlay),\n basePos: state.basePos, baseCur: null,\n overlayPos: state.overlayPos, overlayCur: null\n };\n },\n\n token: function(stream, state) {\n if (stream != state.streamSeen ||\n Math.min(state.basePos, state.overlayPos) < stream.start) {\n state.streamSeen = stream;\n state.basePos = state.overlayPos = stream.start;\n }\n\n if (stream.start == state.basePos) {\n state.baseCur = base.token(stream, state.base);\n state.basePos = stream.pos;\n }\n if (stream.start == state.overlayPos) {\n stream.pos = stream.start;\n state.overlayCur = overlay.token(stream, state.overlay);\n state.overlayPos = stream.pos;\n }\n stream.pos = Math.min(state.basePos, state.overlayPos);\n\n // state.overlay.combineTokens always takes precedence over combine,\n // unless set to null\n if (state.overlayCur == null) return state.baseCur;\n else if (state.baseCur != null &&\n state.overlay.combineTokens ||\n combine && state.overlay.combineTokens == null)\n return state.baseCur + \" \" + state.overlayCur;\n else return state.overlayCur;\n },\n\n indent: base.indent && function(state, textAfter, line) {\n return base.indent(state.base, textAfter, line);\n },\n electricChars: base.electricChars,\n\n innerMode: function(state) { return {state: state.base, mode: base}; },\n\n blankLine: function(state) {\n var baseToken, overlayToken;\n if (base.blankLine) baseToken = base.blankLine(state.base);\n if (overlay.blankLine) overlayToken = overlay.blankLine(state.overlay);\n\n return overlayToken == null ?\n baseToken :\n (combine && baseToken != null ? baseToken + \" \" + overlayToken : overlayToken);\n }\n };\n};\n\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"))\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod)\n else // Plain browser env\n mod(CodeMirror)\n})(function(CodeMirror) {\n \"use strict\"\n var Pos = CodeMirror.Pos\n\n function regexpFlags(regexp) {\n var flags = regexp.flags\n return flags != null ? flags : (regexp.ignoreCase ? \"i\" : \"\")\n + (regexp.global ? \"g\" : \"\")\n + (regexp.multiline ? \"m\" : \"\")\n }\n\n function ensureFlags(regexp, flags) {\n var current = regexpFlags(regexp), target = current\n for (var i = 0; i < flags.length; i++) if (target.indexOf(flags.charAt(i)) == -1)\n target += flags.charAt(i)\n return current == target ? regexp : new RegExp(regexp.source, target)\n }\n\n function maybeMultiline(regexp) {\n return /\\\\s|\\\\n|\\n|\\\\W|\\\\D|\\[\\^/.test(regexp.source)\n }\n\n function searchRegexpForward(doc, regexp, start) {\n regexp = ensureFlags(regexp, \"g\")\n for (var line = start.line, ch = start.ch, last = doc.lastLine(); line <= last; line++, ch = 0) {\n regexp.lastIndex = ch\n var string = doc.getLine(line), match = regexp.exec(string)\n if (match)\n return {from: Pos(line, match.index),\n to: Pos(line, match.index + match[0].length),\n match: match}\n }\n }\n\n function searchRegexpForwardMultiline(doc, regexp, start) {\n if (!maybeMultiline(regexp)) return searchRegexpForward(doc, regexp, start)\n\n regexp = ensureFlags(regexp, \"gm\")\n var string, chunk = 1\n for (var line = start.line, last = doc.lastLine(); line <= last;) {\n // This grows the search buffer in exponentially-sized chunks\n // between matches, so that nearby matches are fast and don't\n // require concatenating the whole document (in case we're\n // searching for something that has tons of matches), but at the\n // same time, the amount of retries is limited.\n for (var i = 0; i < chunk; i++) {\n if (line > last) break\n var curLine = doc.getLine(line++)\n string = string == null ? curLine : string + \"\\n\" + curLine\n }\n chunk = chunk * 2\n regexp.lastIndex = start.ch\n var match = regexp.exec(string)\n if (match) {\n var before = string.slice(0, match.index).split(\"\\n\"), inside = match[0].split(\"\\n\")\n var startLine = start.line + before.length - 1, startCh = before[before.length - 1].length\n return {from: Pos(startLine, startCh),\n to: Pos(startLine + inside.length - 1,\n inside.length == 1 ? startCh + inside[0].length : inside[inside.length - 1].length),\n match: match}\n }\n }\n }\n\n function lastMatchIn(string, regexp, endMargin) {\n var match, from = 0\n while (from <= string.length) {\n regexp.lastIndex = from\n var newMatch = regexp.exec(string)\n if (!newMatch) break\n var end = newMatch.index + newMatch[0].length\n if (end > string.length - endMargin) break\n if (!match || end > match.index + match[0].length)\n match = newMatch\n from = newMatch.index + 1\n }\n return match\n }\n\n function searchRegexpBackward(doc, regexp, start) {\n regexp = ensureFlags(regexp, \"g\")\n for (var line = start.line, ch = start.ch, first = doc.firstLine(); line >= first; line--, ch = -1) {\n var string = doc.getLine(line)\n var match = lastMatchIn(string, regexp, ch < 0 ? 0 : string.length - ch)\n if (match)\n return {from: Pos(line, match.index),\n to: Pos(line, match.index + match[0].length),\n match: match}\n }\n }\n\n function searchRegexpBackwardMultiline(doc, regexp, start) {\n if (!maybeMultiline(regexp)) return searchRegexpBackward(doc, regexp, start)\n regexp = ensureFlags(regexp, \"gm\")\n var string, chunkSize = 1, endMargin = doc.getLine(start.line).length - start.ch\n for (var line = start.line, first = doc.firstLine(); line >= first;) {\n for (var i = 0; i < chunkSize && line >= first; i++) {\n var curLine = doc.getLine(line--)\n string = string == null ? curLine : curLine + \"\\n\" + string\n }\n chunkSize *= 2\n\n var match = lastMatchIn(string, regexp, endMargin)\n if (match) {\n var before = string.slice(0, match.index).split(\"\\n\"), inside = match[0].split(\"\\n\")\n var startLine = line + before.length, startCh = before[before.length - 1].length\n return {from: Pos(startLine, startCh),\n to: Pos(startLine + inside.length - 1,\n inside.length == 1 ? startCh + inside[0].length : inside[inside.length - 1].length),\n match: match}\n }\n }\n }\n\n var doFold, noFold\n if (String.prototype.normalize) {\n doFold = function(str) { return str.normalize(\"NFD\").toLowerCase() }\n noFold = function(str) { return str.normalize(\"NFD\") }\n } else {\n doFold = function(str) { return str.toLowerCase() }\n noFold = function(str) { return str }\n }\n\n // Maps a position in a case-folded line back to a position in the original line\n // (compensating for codepoints increasing in number during folding)\n function adjustPos(orig, folded, pos, foldFunc) {\n if (orig.length == folded.length) return pos\n for (var min = 0, max = pos + Math.max(0, orig.length - folded.length);;) {\n if (min == max) return min\n var mid = (min + max) >> 1\n var len = foldFunc(orig.slice(0, mid)).length\n if (len == pos) return mid\n else if (len > pos) max = mid\n else min = mid + 1\n }\n }\n\n function searchStringForward(doc, query, start, caseFold) {\n // Empty string would match anything and never progress, so we\n // define it to match nothing instead.\n if (!query.length) return null\n var fold = caseFold ? doFold : noFold\n var lines = fold(query).split(/\\r|\\n\\r?/)\n\n search: for (var line = start.line, ch = start.ch, last = doc.lastLine() + 1 - lines.length; line <= last; line++, ch = 0) {\n var orig = doc.getLine(line).slice(ch), string = fold(orig)\n if (lines.length == 1) {\n var found = string.indexOf(lines[0])\n if (found == -1) continue search\n var start = adjustPos(orig, string, found, fold) + ch\n return {from: Pos(line, adjustPos(orig, string, found, fold) + ch),\n to: Pos(line, adjustPos(orig, string, found + lines[0].length, fold) + ch)}\n } else {\n var cutFrom = string.length - lines[0].length\n if (string.slice(cutFrom) != lines[0]) continue search\n for (var i = 1; i < lines.length - 1; i++)\n if (fold(doc.getLine(line + i)) != lines[i]) continue search\n var end = doc.getLine(line + lines.length - 1), endString = fold(end), lastLine = lines[lines.length - 1]\n if (endString.slice(0, lastLine.length) != lastLine) continue search\n return {from: Pos(line, adjustPos(orig, string, cutFrom, fold) + ch),\n to: Pos(line + lines.length - 1, adjustPos(end, endString, lastLine.length, fold))}\n }\n }\n }\n\n function searchStringBackward(doc, query, start, caseFold) {\n if (!query.length) return null\n var fold = caseFold ? doFold : noFold\n var lines = fold(query).split(/\\r|\\n\\r?/)\n\n search: for (var line = start.line, ch = start.ch, first = doc.firstLine() - 1 + lines.length; line >= first; line--, ch = -1) {\n var orig = doc.getLine(line)\n if (ch > -1) orig = orig.slice(0, ch)\n var string = fold(orig)\n if (lines.length == 1) {\n var found = string.lastIndexOf(lines[0])\n if (found == -1) continue search\n return {from: Pos(line, adjustPos(orig, string, found, fold)),\n to: Pos(line, adjustPos(orig, string, found + lines[0].length, fold))}\n } else {\n var lastLine = lines[lines.length - 1]\n if (string.slice(0, lastLine.length) != lastLine) continue search\n for (var i = 1, start = line - lines.length + 1; i < lines.length - 1; i++)\n if (fold(doc.getLine(start + i)) != lines[i]) continue search\n var top = doc.getLine(line + 1 - lines.length), topString = fold(top)\n if (topString.slice(topString.length - lines[0].length) != lines[0]) continue search\n return {from: Pos(line + 1 - lines.length, adjustPos(top, topString, top.length - lines[0].length, fold)),\n to: Pos(line, adjustPos(orig, string, lastLine.length, fold))}\n }\n }\n }\n\n function SearchCursor(doc, query, pos, options) {\n this.atOccurrence = false\n this.afterEmptyMatch = false\n this.doc = doc\n pos = pos ? doc.clipPos(pos) : Pos(0, 0)\n this.pos = {from: pos, to: pos}\n\n var caseFold\n if (typeof options == \"object\") {\n caseFold = options.caseFold\n } else { // Backwards compat for when caseFold was the 4th argument\n caseFold = options\n options = null\n }\n\n if (typeof query == \"string\") {\n if (caseFold == null) caseFold = false\n this.matches = function(reverse, pos) {\n return (reverse ? searchStringBackward : searchStringForward)(doc, query, pos, caseFold)\n }\n } else {\n query = ensureFlags(query, \"gm\")\n if (!options || options.multiline !== false)\n this.matches = function(reverse, pos) {\n return (reverse ? searchRegexpBackwardMultiline : searchRegexpForwardMultiline)(doc, query, pos)\n }\n else\n this.matches = function(reverse, pos) {\n return (reverse ? searchRegexpBackward : searchRegexpForward)(doc, query, pos)\n }\n }\n }\n\n SearchCursor.prototype = {\n findNext: function() {return this.find(false)},\n findPrevious: function() {return this.find(true)},\n\n find: function(reverse) {\n var head = this.doc.clipPos(reverse ? this.pos.from : this.pos.to);\n if (this.afterEmptyMatch && this.atOccurrence) {\n // do not return the same 0 width match twice\n head = Pos(head.line, head.ch)\n if (reverse) {\n head.ch--;\n if (head.ch < 0) {\n head.line--;\n head.ch = (this.doc.getLine(head.line) || \"\").length;\n }\n } else {\n head.ch++;\n if (head.ch > (this.doc.getLine(head.line) || \"\").length) {\n head.ch = 0;\n head.line++;\n }\n }\n if (CodeMirror.cmpPos(head, this.doc.clipPos(head)) != 0) {\n return this.atOccurrence = false\n }\n }\n var result = this.matches(reverse, head)\n this.afterEmptyMatch = result && CodeMirror.cmpPos(result.from, result.to) == 0\n\n if (result) {\n this.pos = result\n this.atOccurrence = true\n return this.pos.match || true\n } else {\n var end = Pos(reverse ? this.doc.firstLine() : this.doc.lastLine() + 1, 0)\n this.pos = {from: end, to: end}\n return this.atOccurrence = false\n }\n },\n\n from: function() {if (this.atOccurrence) return this.pos.from},\n to: function() {if (this.atOccurrence) return this.pos.to},\n\n replace: function(newText, origin) {\n if (!this.atOccurrence) return\n var lines = CodeMirror.splitLines(newText)\n this.doc.replaceRange(lines, this.pos.from, this.pos.to, origin)\n this.pos.to = Pos(this.pos.from.line + lines.length - 1,\n lines[lines.length - 1].length + (lines.length == 1 ? this.pos.from.ch : 0))\n }\n }\n\n CodeMirror.defineExtension(\"getSearchCursor\", function(query, pos, caseFold) {\n return new SearchCursor(this.doc, query, pos, caseFold)\n })\n CodeMirror.defineDocExtension(\"getSearchCursor\", function(query, pos, caseFold) {\n return new SearchCursor(this, query, pos, caseFold)\n })\n\n CodeMirror.defineExtension(\"selectMatches\", function(query, caseFold) {\n var ranges = []\n var cur = this.getSearchCursor(query, this.getCursor(\"from\"), caseFold)\n while (cur.findNext()) {\n if (CodeMirror.cmpPos(cur.to(), this.getCursor(\"to\")) > 0) break\n ranges.push({anchor: cur.from(), head: cur.to()})\n }\n if (ranges.length)\n this.setSelections(ranges, 0)\n })\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n// Because sometimes you need to mark the selected *text*.\n//\n// Adds an option 'styleSelectedText' which, when enabled, gives\n// selected text the CSS class given as option value, or\n// \"CodeMirror-selectedtext\" when the value is not a string.\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n CodeMirror.defineOption(\"styleSelectedText\", false, function(cm, val, old) {\n var prev = old && old != CodeMirror.Init;\n if (val && !prev) {\n cm.state.markedSelection = [];\n cm.state.markedSelectionStyle = typeof val == \"string\" ? val : \"CodeMirror-selectedtext\";\n reset(cm);\n cm.on(\"cursorActivity\", onCursorActivity);\n cm.on(\"change\", onChange);\n } else if (!val && prev) {\n cm.off(\"cursorActivity\", onCursorActivity);\n cm.off(\"change\", onChange);\n clear(cm);\n cm.state.markedSelection = cm.state.markedSelectionStyle = null;\n }\n });\n\n function onCursorActivity(cm) {\n if (cm.state.markedSelection)\n cm.operation(function() { update(cm); });\n }\n\n function onChange(cm) {\n if (cm.state.markedSelection && cm.state.markedSelection.length)\n cm.operation(function() { clear(cm); });\n }\n\n var CHUNK_SIZE = 8;\n var Pos = CodeMirror.Pos;\n var cmp = CodeMirror.cmpPos;\n\n function coverRange(cm, from, to, addAt) {\n if (cmp(from, to) == 0) return;\n var array = cm.state.markedSelection;\n var cls = cm.state.markedSelectionStyle;\n for (var line = from.line;;) {\n var start = line == from.line ? from : Pos(line, 0);\n var endLine = line + CHUNK_SIZE, atEnd = endLine >= to.line;\n var end = atEnd ? to : Pos(endLine, 0);\n var mark = cm.markText(start, end, {className: cls});\n if (addAt == null) array.push(mark);\n else array.splice(addAt++, 0, mark);\n if (atEnd) break;\n line = endLine;\n }\n }\n\n function clear(cm) {\n var array = cm.state.markedSelection;\n for (var i = 0; i < array.length; ++i) array[i].clear();\n array.length = 0;\n }\n\n function reset(cm) {\n clear(cm);\n var ranges = cm.listSelections();\n for (var i = 0; i < ranges.length; i++)\n coverRange(cm, ranges[i].from(), ranges[i].to());\n }\n\n function update(cm) {\n if (!cm.somethingSelected()) return clear(cm);\n if (cm.listSelections().length > 1) return reset(cm);\n\n var from = cm.getCursor(\"start\"), to = cm.getCursor(\"end\");\n\n var array = cm.state.markedSelection;\n if (!array.length) return coverRange(cm, from, to);\n\n var coverStart = array[0].find(), coverEnd = array[array.length - 1].find();\n if (!coverStart || !coverEnd || to.line - from.line <= CHUNK_SIZE ||\n cmp(from, coverEnd.to) >= 0 || cmp(to, coverStart.from) <= 0)\n return reset(cm);\n\n while (cmp(from, coverStart.from) > 0) {\n array.shift().clear();\n coverStart = array[0].find();\n }\n if (cmp(from, coverStart.from) < 0) {\n if (coverStart.to.line - from.line < CHUNK_SIZE) {\n array.shift().clear();\n coverRange(cm, from, coverStart.to, 0);\n } else {\n coverRange(cm, from, coverStart.from, 0);\n }\n }\n\n while (cmp(to, coverEnd.to) < 0) {\n array.pop().clear();\n coverEnd = array[array.length - 1].find();\n }\n if (cmp(to, coverEnd.to) > 0) {\n if (to.line - coverEnd.from.line < CHUNK_SIZE) {\n array.pop().clear();\n coverRange(cm, coverEnd.from, to);\n } else {\n coverRange(cm, coverEnd.to, to);\n }\n }\n }\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n// This is CodeMirror (https://codemirror.net/5), a code editor\n// implemented in JavaScript on top of the browser's DOM.\n//\n// You can find some technical background for some of the code below\n// at http://marijnhaverbeke.nl/blog/#cm-internals .\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, global.CodeMirror = factory());\n}(this, (function () { 'use strict';\n\n // Kludges for bugs and behavior differences that can't be feature\n // detected are enabled based on userAgent etc sniffing.\n var userAgent = navigator.userAgent;\n var platform = navigator.platform;\n\n var gecko = /gecko\\/\\d/i.test(userAgent);\n var ie_upto10 = /MSIE \\d/.test(userAgent);\n var ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(userAgent);\n var edge = /Edge\\/(\\d+)/.exec(userAgent);\n var ie = ie_upto10 || ie_11up || edge;\n var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);\n var webkit = !edge && /WebKit\\//.test(userAgent);\n var qtwebkit = webkit && /Qt\\/\\d+\\.\\d+/.test(userAgent);\n var chrome = !edge && /Chrome\\/(\\d+)/.exec(userAgent);\n var chrome_version = chrome && +chrome[1];\n var presto = /Opera\\//.test(userAgent);\n var safari = /Apple Computer/.test(navigator.vendor);\n var mac_geMountainLion = /Mac OS X 1\\d\\D([8-9]|\\d\\d)\\D/.test(userAgent);\n var phantom = /PhantomJS/.test(userAgent);\n\n var ios = safari && (/Mobile\\/\\w+/.test(userAgent) || navigator.maxTouchPoints > 2);\n var android = /Android/.test(userAgent);\n // This is woefully incomplete. Suggestions for alternative methods welcome.\n var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);\n var mac = ios || /Mac/.test(platform);\n var chromeOS = /\\bCrOS\\b/.test(userAgent);\n var windows = /win/i.test(platform);\n\n var presto_version = presto && userAgent.match(/Version\\/(\\d*\\.\\d*)/);\n if (presto_version) { presto_version = Number(presto_version[1]); }\n if (presto_version && presto_version >= 15) { presto = false; webkit = true; }\n // Some browsers use the wrong event properties to signal cmd/ctrl on OS X\n var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));\n var captureRightClick = gecko || (ie && ie_version >= 9);\n\n function classTest(cls) { return new RegExp(\"(^|\\\\s)\" + cls + \"(?:$|\\\\s)\\\\s*\") }\n\n var rmClass = function(node, cls) {\n var current = node.className;\n var match = classTest(cls).exec(current);\n if (match) {\n var after = current.slice(match.index + match[0].length);\n node.className = current.slice(0, match.index) + (after ? match[1] + after : \"\");\n }\n };\n\n function removeChildren(e) {\n for (var count = e.childNodes.length; count > 0; --count)\n { e.removeChild(e.firstChild); }\n return e\n }\n\n function removeChildrenAndAdd(parent, e) {\n return removeChildren(parent).appendChild(e)\n }\n\n function elt(tag, content, className, style) {\n var e = document.createElement(tag);\n if (className) { e.className = className; }\n if (style) { e.style.cssText = style; }\n if (typeof content == \"string\") { e.appendChild(document.createTextNode(content)); }\n else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } }\n return e\n }\n // wrapper for elt, which removes the elt from the accessibility tree\n function eltP(tag, content, className, style) {\n var e = elt(tag, content, className, style);\n e.setAttribute(\"role\", \"presentation\");\n return e\n }\n\n var range;\n if (document.createRange) { range = function(node, start, end, endNode) {\n var r = document.createRange();\n r.setEnd(endNode || node, end);\n r.setStart(node, start);\n return r\n }; }\n else { range = function(node, start, end) {\n var r = document.body.createTextRange();\n try { r.moveToElementText(node.parentNode); }\n catch(e) { return r }\n r.collapse(true);\n r.moveEnd(\"character\", end);\n r.moveStart(\"character\", start);\n return r\n }; }\n\n function contains(parent, child) {\n if (child.nodeType == 3) // Android browser always returns false when child is a textnode\n { child = child.parentNode; }\n if (parent.contains)\n { return parent.contains(child) }\n do {\n if (child.nodeType == 11) { child = child.host; }\n if (child == parent) { return true }\n } while (child = child.parentNode)\n }\n\n function activeElt(rootNode) {\n // IE and Edge may throw an \"Unspecified Error\" when accessing document.activeElement.\n // IE < 10 will throw when accessed while the page is loading or in an iframe.\n // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.\n var doc = rootNode.ownerDocument || rootNode;\n var activeElement;\n try {\n activeElement = rootNode.activeElement;\n } catch(e) {\n activeElement = doc.body || null;\n }\n while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement)\n { activeElement = activeElement.shadowRoot.activeElement; }\n return activeElement\n }\n\n function addClass(node, cls) {\n var current = node.className;\n if (!classTest(cls).test(current)) { node.className += (current ? \" \" : \"\") + cls; }\n }\n function joinClasses(a, b) {\n var as = a.split(\" \");\n for (var i = 0; i < as.length; i++)\n { if (as[i] && !classTest(as[i]).test(b)) { b += \" \" + as[i]; } }\n return b\n }\n\n var selectInput = function(node) { node.select(); };\n if (ios) // Mobile Safari apparently has a bug where select() is broken.\n { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; }\n else if (ie) // Suppress mysterious IE10 errors\n { selectInput = function(node) { try { node.select(); } catch(_e) {} }; }\n\n function doc(cm) { return cm.display.wrapper.ownerDocument }\n\n function root(cm) {\n return rootNode(cm.display.wrapper)\n }\n\n function rootNode(element) {\n // Detect modern browsers (2017+).\n return element.getRootNode ? element.getRootNode() : element.ownerDocument\n }\n\n function win(cm) { return doc(cm).defaultView }\n\n function bind(f) {\n var args = Array.prototype.slice.call(arguments, 1);\n return function(){return f.apply(null, args)}\n }\n\n function copyObj(obj, target, overwrite) {\n if (!target) { target = {}; }\n for (var prop in obj)\n { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))\n { target[prop] = obj[prop]; } }\n return target\n }\n\n // Counts the column offset in a string, taking tabs into account.\n // Used mostly to find indentation.\n function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) { end = string.length; }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n }\n\n var Delayed = function() {\n this.id = null;\n this.f = null;\n this.time = 0;\n this.handler = bind(this.onTimeout, this);\n };\n Delayed.prototype.onTimeout = function (self) {\n self.id = 0;\n if (self.time <= +new Date) {\n self.f();\n } else {\n setTimeout(self.handler, self.time - +new Date);\n }\n };\n Delayed.prototype.set = function (ms, f) {\n this.f = f;\n var time = +new Date + ms;\n if (!this.id || time < this.time) {\n clearTimeout(this.id);\n this.id = setTimeout(this.handler, ms);\n this.time = time;\n }\n };\n\n function indexOf(array, elt) {\n for (var i = 0; i < array.length; ++i)\n { if (array[i] == elt) { return i } }\n return -1\n }\n\n // Number of pixels added to scroller and sizer to hide scrollbar\n var scrollerGap = 50;\n\n // Returned or thrown by various protocols to signal 'I'm not\n // handling this'.\n var Pass = {toString: function(){return \"CodeMirror.Pass\"}};\n\n // Reused option objects for setSelection & friends\n var sel_dontScroll = {scroll: false}, sel_mouse = {origin: \"*mouse\"}, sel_move = {origin: \"+move\"};\n\n // The inverse of countColumn -- find the offset that corresponds to\n // a particular column.\n function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }\n\n var spaceStrs = [\"\"];\n function spaceStr(n) {\n while (spaceStrs.length <= n)\n { spaceStrs.push(lst(spaceStrs) + \" \"); }\n return spaceStrs[n]\n }\n\n function lst(arr) { return arr[arr.length-1] }\n\n function map(array, f) {\n var out = [];\n for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i); }\n return out\n }\n\n function insertSorted(array, value, score) {\n var pos = 0, priority = score(value);\n while (pos < array.length && score(array[pos]) <= priority) { pos++; }\n array.splice(pos, 0, value);\n }\n\n function nothing() {}\n\n function createObj(base, props) {\n var inst;\n if (Object.create) {\n inst = Object.create(base);\n } else {\n nothing.prototype = base;\n inst = new nothing();\n }\n if (props) { copyObj(props, inst); }\n return inst\n }\n\n var nonASCIISingleCaseWordChar = /[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/;\n function isWordCharBasic(ch) {\n return /\\w/.test(ch) || ch > \"\\x80\" &&\n (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch))\n }\n function isWordChar(ch, helper) {\n if (!helper) { return isWordCharBasic(ch) }\n if (helper.source.indexOf(\"\\\\w\") > -1 && isWordCharBasic(ch)) { return true }\n return helper.test(ch)\n }\n\n function isEmpty(obj) {\n for (var n in obj) { if (obj.hasOwnProperty(n) && obj[n]) { return false } }\n return true\n }\n\n // Extending unicode characters. A series of a non-extending char +\n // any number of extending chars is treated as a single unit as far\n // as editing and measuring is concerned. This is not fully correct,\n // since some scripts/fonts/browsers also treat other configurations\n // of code points as a group.\n var extendingChars = /[\\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]/;\n function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) }\n\n // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.\n function skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n return pos\n }\n\n // Returns the value from the range [`from`; `to`] that satisfies\n // `pred` and is closest to `from`. Assumes that at least `to`\n // satisfies `pred`. Supports `from` being greater than `to`.\n function findFirst(pred, from, to) {\n // At any point we are certain `to` satisfies `pred`, don't know\n // whether `from` does.\n var dir = from > to ? -1 : 1;\n for (;;) {\n if (from == to) { return from }\n var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n if (mid == from) { return pred(mid) ? from : to }\n if (pred(mid)) { to = mid; }\n else { from = mid + dir; }\n }\n }\n\n // BIDI HELPERS\n\n function iterateBidiSections(order, from, to, f) {\n if (!order) { return f(from, to, \"ltr\", 0) }\n var found = false;\n for (var i = 0; i < order.length; ++i) {\n var part = order[i];\n if (part.from < to && part.to > from || from == to && part.to == from) {\n f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? \"rtl\" : \"ltr\", i);\n found = true;\n }\n }\n if (!found) { f(from, to, \"ltr\"); }\n }\n\n var bidiOther = null;\n function getBidiPartAt(order, ch, sticky) {\n var found;\n bidiOther = null;\n for (var i = 0; i < order.length; ++i) {\n var cur = order[i];\n if (cur.from < ch && cur.to > ch) { return i }\n if (cur.to == ch) {\n if (cur.from != cur.to && sticky == \"before\") { found = i; }\n else { bidiOther = i; }\n }\n if (cur.from == ch) {\n if (cur.from != cur.to && sticky != \"before\") { found = i; }\n else { bidiOther = i; }\n }\n }\n return found != null ? found : bidiOther\n }\n\n // Bidirectional ordering algorithm\n // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm\n // that this (partially) implements.\n\n // One-char codes used for character types:\n // L (L): Left-to-Right\n // R (R): Right-to-Left\n // r (AL): Right-to-Left Arabic\n // 1 (EN): European Number\n // + (ES): European Number Separator\n // % (ET): European Number Terminator\n // n (AN): Arabic Number\n // , (CS): Common Number Separator\n // m (NSM): Non-Spacing Mark\n // b (BN): Boundary Neutral\n // s (B): Paragraph Separator\n // t (S): Segment Separator\n // w (WS): Whitespace\n // N (ON): Other Neutrals\n\n // Returns null if characters are ordered as they appear\n // (left-to-right), or an array of sections ({from, to, level}\n // objects) in the order in which they occur visually.\n var bidiOrdering = (function() {\n // Character types for codepoints 0 to 0xff\n var lowTypes = \"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN\";\n // Character types for codepoints 0x600 to 0x6f9\n var arabicTypes = \"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111\";\n function charType(code) {\n if (code <= 0xf7) { return lowTypes.charAt(code) }\n else if (0x590 <= code && code <= 0x5f4) { return \"R\" }\n else if (0x600 <= code && code <= 0x6f9) { return arabicTypes.charAt(code - 0x600) }\n else if (0x6ee <= code && code <= 0x8ac) { return \"r\" }\n else if (0x2000 <= code && code <= 0x200b) { return \"w\" }\n else if (code == 0x200c) { return \"b\" }\n else { return \"L\" }\n }\n\n var bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\n var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;\n\n function BidiSpan(level, from, to) {\n this.level = level;\n this.from = from; this.to = to;\n }\n\n return function(str, direction) {\n var outerType = direction == \"ltr\" ? \"L\" : \"R\";\n\n if (str.length == 0 || direction == \"ltr\" && !bidiRE.test(str)) { return false }\n var len = str.length, types = [];\n for (var i = 0; i < len; ++i)\n { types.push(charType(str.charCodeAt(i))); }\n\n // W1. Examine each non-spacing mark (NSM) in the level run, and\n // change the type of the NSM to the type of the previous\n // character. If the NSM is at the start of the level run, it will\n // get the type of sor.\n for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) {\n var type = types[i$1];\n if (type == \"m\") { types[i$1] = prev; }\n else { prev = type; }\n }\n\n // W2. Search backwards from each instance of a European number\n // until the first strong type (R, L, AL, or sor) is found. If an\n // AL is found, change the type of the European number to Arabic\n // number.\n // W3. Change all ALs to R.\n for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) {\n var type$1 = types[i$2];\n if (type$1 == \"1\" && cur == \"r\") { types[i$2] = \"n\"; }\n else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == \"r\") { types[i$2] = \"R\"; } }\n }\n\n // W4. A single European separator between two European numbers\n // changes to a European number. A single common separator between\n // two numbers of the same type changes to that type.\n for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) {\n var type$2 = types[i$3];\n if (type$2 == \"+\" && prev$1 == \"1\" && types[i$3+1] == \"1\") { types[i$3] = \"1\"; }\n else if (type$2 == \",\" && prev$1 == types[i$3+1] &&\n (prev$1 == \"1\" || prev$1 == \"n\")) { types[i$3] = prev$1; }\n prev$1 = type$2;\n }\n\n // W5. A sequence of European terminators adjacent to European\n // numbers changes to all European numbers.\n // W6. Otherwise, separators and terminators change to Other\n // Neutral.\n for (var i$4 = 0; i$4 < len; ++i$4) {\n var type$3 = types[i$4];\n if (type$3 == \",\") { types[i$4] = \"N\"; }\n else if (type$3 == \"%\") {\n var end = (void 0);\n for (end = i$4 + 1; end < len && types[end] == \"%\"; ++end) {}\n var replace = (i$4 && types[i$4-1] == \"!\") || (end < len && types[end] == \"1\") ? \"1\" : \"N\";\n for (var j = i$4; j < end; ++j) { types[j] = replace; }\n i$4 = end - 1;\n }\n }\n\n // W7. Search backwards from each instance of a European number\n // until the first strong type (R, L, or sor) is found. If an L is\n // found, then change the type of the European number to L.\n for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) {\n var type$4 = types[i$5];\n if (cur$1 == \"L\" && type$4 == \"1\") { types[i$5] = \"L\"; }\n else if (isStrong.test(type$4)) { cur$1 = type$4; }\n }\n\n // N1. A sequence of neutrals takes the direction of the\n // surrounding strong text if the text on both sides has the same\n // direction. European and Arabic numbers act as if they were R in\n // terms of their influence on neutrals. Start-of-level-run (sor)\n // and end-of-level-run (eor) are used at level run boundaries.\n // N2. Any remaining neutrals take the embedding direction.\n for (var i$6 = 0; i$6 < len; ++i$6) {\n if (isNeutral.test(types[i$6])) {\n var end$1 = (void 0);\n for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {}\n var before = (i$6 ? types[i$6-1] : outerType) == \"L\";\n var after = (end$1 < len ? types[end$1] : outerType) == \"L\";\n var replace$1 = before == after ? (before ? \"L\" : \"R\") : outerType;\n for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1; }\n i$6 = end$1 - 1;\n }\n }\n\n // Here we depart from the documented algorithm, in order to avoid\n // building up an actual levels array. Since there are only three\n // levels (0, 1, 2) in an implementation that doesn't take\n // explicit embedding into account, we can build up the order on\n // the fly, without following the level-based algorithm.\n var order = [], m;\n for (var i$7 = 0; i$7 < len;) {\n if (countsAsLeft.test(types[i$7])) {\n var start = i$7;\n for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}\n order.push(new BidiSpan(0, start, i$7));\n } else {\n var pos = i$7, at = order.length, isRTL = direction == \"rtl\" ? 1 : 0;\n for (++i$7; i$7 < len && types[i$7] != \"L\"; ++i$7) {}\n for (var j$2 = pos; j$2 < i$7;) {\n if (countsAsNum.test(types[j$2])) {\n if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); at += isRTL; }\n var nstart = j$2;\n for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}\n order.splice(at, 0, new BidiSpan(2, nstart, j$2));\n at += isRTL;\n pos = j$2;\n } else { ++j$2; }\n }\n if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)); }\n }\n }\n if (direction == \"ltr\") {\n if (order[0].level == 1 && (m = str.match(/^\\s+/))) {\n order[0].from = m[0].length;\n order.unshift(new BidiSpan(0, 0, m[0].length));\n }\n if (lst(order).level == 1 && (m = str.match(/\\s+$/))) {\n lst(order).to -= m[0].length;\n order.push(new BidiSpan(0, len - m[0].length, len));\n }\n }\n\n return direction == \"rtl\" ? order.reverse() : order\n }\n })();\n\n // Get the bidi ordering for the given line (and cache it). Returns\n // false for lines that are fully left-to-right, and an array of\n // BidiSpan objects otherwise.\n function getOrder(line, direction) {\n var order = line.order;\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n return order\n }\n\n // EVENT HANDLING\n\n // Lightweight event framework. on/off also work on DOM nodes,\n // registering native DOM handlers.\n\n var noHandlers = [];\n\n var on = function(emitter, type, f) {\n if (emitter.addEventListener) {\n emitter.addEventListener(type, f, false);\n } else if (emitter.attachEvent) {\n emitter.attachEvent(\"on\" + type, f);\n } else {\n var map = emitter._handlers || (emitter._handlers = {});\n map[type] = (map[type] || noHandlers).concat(f);\n }\n };\n\n function getHandlers(emitter, type) {\n return emitter._handlers && emitter._handlers[type] || noHandlers\n }\n\n function off(emitter, type, f) {\n if (emitter.removeEventListener) {\n emitter.removeEventListener(type, f, false);\n } else if (emitter.detachEvent) {\n emitter.detachEvent(\"on\" + type, f);\n } else {\n var map = emitter._handlers, arr = map && map[type];\n if (arr) {\n var index = indexOf(arr, f);\n if (index > -1)\n { map[type] = arr.slice(0, index).concat(arr.slice(index + 1)); }\n }\n }\n }\n\n function signal(emitter, type /*, values...*/) {\n var handlers = getHandlers(emitter, type);\n if (!handlers.length) { return }\n var args = Array.prototype.slice.call(arguments, 2);\n for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); }\n }\n\n // The DOM events that CodeMirror handles can be overridden by\n // registering a (non-DOM) handler on the editor for the event name,\n // and preventDefault-ing the event in that handler.\n function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore\n }\n\n function signalCursorActivity(cm) {\n var arr = cm._handlers && cm._handlers.cursorActivity;\n if (!arr) { return }\n var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);\n for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1)\n { set.push(arr[i]); } }\n }\n\n function hasHandler(emitter, type) {\n return getHandlers(emitter, type).length > 0\n }\n\n // Add on and off methods to a constructor's prototype, to make\n // registering events on such objects more convenient.\n function eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n }\n\n // Due to the fact that we still support jurassic IE versions, some\n // compatibility wrappers are needed.\n\n function e_preventDefault(e) {\n if (e.preventDefault) { e.preventDefault(); }\n else { e.returnValue = false; }\n }\n function e_stopPropagation(e) {\n if (e.stopPropagation) { e.stopPropagation(); }\n else { e.cancelBubble = true; }\n }\n function e_defaultPrevented(e) {\n return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false\n }\n function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}\n\n function e_target(e) {return e.target || e.srcElement}\n function e_button(e) {\n var b = e.which;\n if (b == null) {\n if (e.button & 1) { b = 1; }\n else if (e.button & 2) { b = 3; }\n else if (e.button & 4) { b = 2; }\n }\n if (mac && e.ctrlKey && b == 1) { b = 3; }\n return b\n }\n\n // Detect drag-and-drop\n var dragAndDrop = function() {\n // There is *some* kind of drag-and-drop support in IE6-8, but I\n // couldn't get it to work yet.\n if (ie && ie_version < 9) { return false }\n var div = elt('div');\n return \"draggable\" in div || \"dragDrop\" in div\n }();\n\n var zwspSupported;\n function zeroWidthElement(measure) {\n if (zwspSupported == null) {\n var test = elt(\"span\", \"\\u200b\");\n removeChildrenAndAdd(measure, elt(\"span\", [test, document.createTextNode(\"x\")]));\n if (measure.firstChild.offsetHeight != 0)\n { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); }\n }\n var node = zwspSupported ? elt(\"span\", \"\\u200b\") :\n elt(\"span\", \"\\u00a0\", null, \"display: inline-block; width: 1px; margin-right: -1px\");\n node.setAttribute(\"cm-text\", \"\");\n return node\n }\n\n // Feature-detect IE's crummy client rect reporting for bidi text\n var badBidiRects;\n function hasBadBidiRects(measure) {\n if (badBidiRects != null) { return badBidiRects }\n var txt = removeChildrenAndAdd(measure, document.createTextNode(\"A\\u062eA\"));\n var r0 = range(txt, 0, 1).getBoundingClientRect();\n var r1 = range(txt, 1, 2).getBoundingClientRect();\n removeChildren(measure);\n if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780)\n return badBidiRects = (r1.right - r0.right < 3)\n }\n\n // See if \"\".split is the broken IE version, if so, provide an\n // alternative way to split lines.\n var splitLinesAuto = \"\\n\\nb\".split(/\\n/).length != 3 ? function (string) {\n var pos = 0, result = [], l = string.length;\n while (pos <= l) {\n var nl = string.indexOf(\"\\n\", pos);\n if (nl == -1) { nl = string.length; }\n var line = string.slice(pos, string.charAt(nl - 1) == \"\\r\" ? nl - 1 : nl);\n var rt = line.indexOf(\"\\r\");\n if (rt != -1) {\n result.push(line.slice(0, rt));\n pos += rt + 1;\n } else {\n result.push(line);\n pos = nl + 1;\n }\n }\n return result\n } : function (string) { return string.split(/\\r\\n?|\\n/); };\n\n var hasSelection = window.getSelection ? function (te) {\n try { return te.selectionStart != te.selectionEnd }\n catch(e) { return false }\n } : function (te) {\n var range;\n try {range = te.ownerDocument.selection.createRange();}\n catch(e) {}\n if (!range || range.parentElement() != te) { return false }\n return range.compareEndPoints(\"StartToEnd\", range) != 0\n };\n\n var hasCopyEvent = (function () {\n var e = elt(\"div\");\n if (\"oncopy\" in e) { return true }\n e.setAttribute(\"oncopy\", \"return;\");\n return typeof e.oncopy == \"function\"\n })();\n\n var badZoomedRects = null;\n function hasBadZoomedRects(measure) {\n if (badZoomedRects != null) { return badZoomedRects }\n var node = removeChildrenAndAdd(measure, elt(\"span\", \"x\"));\n var normal = node.getBoundingClientRect();\n var fromRange = range(node, 0, 1).getBoundingClientRect();\n return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1\n }\n\n // Known modes, by name and by MIME\n var modes = {}, mimeModes = {};\n\n // Extra arguments are stored as the mode's dependencies, which is\n // used by (legacy) mechanisms like loadmode.js to automatically\n // load a mode. (Preferred mechanism is the require/define calls.)\n function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }\n\n function defineMIME(mime, spec) {\n mimeModes[mime] = spec;\n }\n\n // Given a MIME type, a {name, ...options} config object, or a name\n // string, return a mode config object.\n function resolveMode(spec) {\n if (typeof spec == \"string\" && mimeModes.hasOwnProperty(spec)) {\n spec = mimeModes[spec];\n } else if (spec && typeof spec.name == \"string\" && mimeModes.hasOwnProperty(spec.name)) {\n var found = mimeModes[spec.name];\n if (typeof found == \"string\") { found = {name: found}; }\n spec = createObj(found, spec);\n spec.name = found.name;\n } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+xml$/.test(spec)) {\n return resolveMode(\"application/xml\")\n } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+json$/.test(spec)) {\n return resolveMode(\"application/json\")\n }\n if (typeof spec == \"string\") { return {name: spec} }\n else { return spec || {name: \"null\"} }\n }\n\n // Given a mode spec (anything that resolveMode accepts), find and\n // initialize an actual mode object.\n function getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n return modeObj\n }\n\n // This can be used to attach properties to mode objects from\n // outside the actual mode definition.\n var modeExtensions = {};\n function extendMode(mode, properties) {\n var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});\n copyObj(properties, exts);\n }\n\n function copyState(mode, state) {\n if (state === true) { return state }\n if (mode.copyState) { return mode.copyState(state) }\n var nstate = {};\n for (var n in state) {\n var val = state[n];\n if (val instanceof Array) { val = val.concat([]); }\n nstate[n] = val;\n }\n return nstate\n }\n\n // Given a mode and a state (for that mode), find the inner mode and\n // state at the position that the state refers to.\n function innerMode(mode, state) {\n var info;\n while (mode.innerMode) {\n info = mode.innerMode(state);\n if (!info || info.mode == mode) { break }\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state}\n }\n\n function startState(mode, a1, a2) {\n return mode.startState ? mode.startState(a1, a2) : true\n }\n\n // STRING STREAM\n\n // Fed to the mode parsers, provides helper functions to make\n // parsers more succinct.\n\n var StringStream = function(string, tabSize, lineOracle) {\n this.pos = this.start = 0;\n this.string = string;\n this.tabSize = tabSize || 8;\n this.lastColumnPos = this.lastColumnValue = 0;\n this.lineStart = 0;\n this.lineOracle = lineOracle;\n };\n\n StringStream.prototype.eol = function () {return this.pos >= this.string.length};\n StringStream.prototype.sol = function () {return this.pos == this.lineStart};\n StringStream.prototype.peek = function () {return this.string.charAt(this.pos) || undefined};\n StringStream.prototype.next = function () {\n if (this.pos < this.string.length)\n { return this.string.charAt(this.pos++) }\n };\n StringStream.prototype.eat = function (match) {\n var ch = this.string.charAt(this.pos);\n var ok;\n if (typeof match == \"string\") { ok = ch == match; }\n else { ok = ch && (match.test ? match.test(ch) : match(ch)); }\n if (ok) {++this.pos; return ch}\n };\n StringStream.prototype.eatWhile = function (match) {\n var start = this.pos;\n while (this.eat(match)){}\n return this.pos > start\n };\n StringStream.prototype.eatSpace = function () {\n var start = this.pos;\n while (/[\\s\\u00a0]/.test(this.string.charAt(this.pos))) { ++this.pos; }\n return this.pos > start\n };\n StringStream.prototype.skipToEnd = function () {this.pos = this.string.length;};\n StringStream.prototype.skipTo = function (ch) {\n var found = this.string.indexOf(ch, this.pos);\n if (found > -1) {this.pos = found; return true}\n };\n StringStream.prototype.backUp = function (n) {this.pos -= n;};\n StringStream.prototype.column = function () {\n if (this.lastColumnPos < this.start) {\n this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);\n this.lastColumnPos = this.start;\n }\n return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n };\n StringStream.prototype.indentation = function () {\n return countColumn(this.string, null, this.tabSize) -\n (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n };\n StringStream.prototype.match = function (pattern, consume, caseInsensitive) {\n if (typeof pattern == \"string\") {\n var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; };\n var substr = this.string.substr(this.pos, pattern.length);\n if (cased(substr) == cased(pattern)) {\n if (consume !== false) { this.pos += pattern.length; }\n return true\n }\n } else {\n var match = this.string.slice(this.pos).match(pattern);\n if (match && match.index > 0) { return null }\n if (match && consume !== false) { this.pos += match[0].length; }\n return match\n }\n };\n StringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)};\n StringStream.prototype.hideFirstChars = function (n, inner) {\n this.lineStart += n;\n try { return inner() }\n finally { this.lineStart -= n; }\n };\n StringStream.prototype.lookAhead = function (n) {\n var oracle = this.lineOracle;\n return oracle && oracle.lookAhead(n)\n };\n StringStream.prototype.baseToken = function () {\n var oracle = this.lineOracle;\n return oracle && oracle.baseToken(this.pos)\n };\n\n // Find the line object corresponding to the given line number.\n function getLine(doc, n) {\n n -= doc.first;\n if (n < 0 || n >= doc.size) { throw new Error(\"There is no line \" + (n + doc.first) + \" in the document.\") }\n var chunk = doc;\n while (!chunk.lines) {\n for (var i = 0;; ++i) {\n var child = chunk.children[i], sz = child.chunkSize();\n if (n < sz) { chunk = child; break }\n n -= sz;\n }\n }\n return chunk.lines[n]\n }\n\n // Get the part of a document between two positions, as an array of\n // strings.\n function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }\n // Get the lines between from and to, as array of strings.\n function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }\n\n // Update the height of a line, propagating the height change\n // upwards to parent nodes.\n function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }\n\n // Given a line object, find its line number by walking up through\n // its parent links.\n function lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first\n }\n\n // Find the line at the given vertical position, using the height\n // information in the document tree.\n function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }\n\n function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size}\n\n function lineNumberFor(options, i) {\n return String(options.lineNumberFormatter(i + options.firstLineNumber))\n }\n\n // A Pos instance represents a position within the text.\n function Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line;\n this.ch = ch;\n this.sticky = sticky;\n }\n\n // Compare two positions, return 0 if they are the same, a negative\n // number when a is less, and a positive number otherwise.\n function cmp(a, b) { return a.line - b.line || a.ch - b.ch }\n\n function equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 }\n\n function copyPos(x) {return Pos(x.line, x.ch)}\n function maxPos(a, b) { return cmp(a, b) < 0 ? b : a }\n function minPos(a, b) { return cmp(a, b) < 0 ? a : b }\n\n // Most of the external API clips given positions to make sure they\n // actually exist within the document.\n function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))}\n function clipPos(doc, pos) {\n if (pos.line < doc.first) { return Pos(doc.first, 0) }\n var last = doc.first + doc.size - 1;\n if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) }\n return clipToLen(pos, getLine(doc, pos.line).text.length)\n }\n function clipToLen(pos, linelen) {\n var ch = pos.ch;\n if (ch == null || ch > linelen) { return Pos(pos.line, linelen) }\n else if (ch < 0) { return Pos(pos.line, 0) }\n else { return pos }\n }\n function clipPosArray(doc, array) {\n var out = [];\n for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]); }\n return out\n }\n\n var SavedContext = function(state, lookAhead) {\n this.state = state;\n this.lookAhead = lookAhead;\n };\n\n var Context = function(doc, state, line, lookAhead) {\n this.state = state;\n this.doc = doc;\n this.line = line;\n this.maxLookAhead = lookAhead || 0;\n this.baseTokens = null;\n this.baseTokenPos = 1;\n };\n\n Context.prototype.lookAhead = function (n) {\n var line = this.doc.getLine(this.line + n);\n if (line != null && n > this.maxLookAhead) { this.maxLookAhead = n; }\n return line\n };\n\n Context.prototype.baseToken = function (n) {\n if (!this.baseTokens) { return null }\n while (this.baseTokens[this.baseTokenPos] <= n)\n { this.baseTokenPos += 2; }\n var type = this.baseTokens[this.baseTokenPos + 1];\n return {type: type && type.replace(/( |^)overlay .*/, \"\"),\n size: this.baseTokens[this.baseTokenPos] - n}\n };\n\n Context.prototype.nextLine = function () {\n this.line++;\n if (this.maxLookAhead > 0) { this.maxLookAhead--; }\n };\n\n Context.fromSaved = function (doc, saved, line) {\n if (saved instanceof SavedContext)\n { return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) }\n else\n { return new Context(doc, copyState(doc.mode, saved), line) }\n };\n\n Context.prototype.save = function (copy) {\n var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state;\n return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state\n };\n\n\n // Compute a style array (an array starting with a mode generation\n // -- for invalidation -- followed by pairs of end positions and\n // style strings), which is used to highlight the tokens on the\n // line.\n function highlightLine(cm, line, context, forceToEnd) {\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var st = [cm.state.modeGen], lineClasses = {};\n // Compute the base array of styles\n runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd);\n var state = context.state;\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n context.baseTokens = st;\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n context.state = true;\n runMode(cm, line.text, overlay.mode, context, function (end, style) {\n var start = i;\n // Ensure there's a token end at the current position, and that i points at it\n while (at < end) {\n var i_end = st[i];\n if (i_end > end)\n { st.splice(i, 1, end, st[i+1], i_end); }\n i += 2;\n at = Math.min(end, i_end);\n }\n if (!style) { return }\n if (overlay.opaque) {\n st.splice(start, i - start, end, \"overlay \" + style);\n i = start + 2;\n } else {\n for (; start < i; start += 2) {\n var cur = st[start+1];\n st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n }\n }\n }, lineClasses);\n context.state = state;\n context.baseTokens = null;\n context.baseTokenPos = 1;\n };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n }\n\n function getLineStyles(cm, line, updateFrontier) {\n if (!line.styles || line.styles[0] != cm.state.modeGen) {\n var context = getContextBefore(cm, lineNo(line));\n var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state);\n var result = highlightLine(cm, line, context);\n if (resetState) { context.state = resetState; }\n line.stateAfter = context.save(!resetState);\n line.styles = result.styles;\n if (result.classes) { line.styleClasses = result.classes; }\n else if (line.styleClasses) { line.styleClasses = null; }\n if (updateFrontier === cm.doc.highlightFrontier)\n { cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier); }\n }\n return line.styles\n }\n\n function getContextBefore(cm, n, precise) {\n var doc = cm.doc, display = cm.display;\n if (!doc.mode.startState) { return new Context(doc, true, n) }\n var start = findStartLine(cm, n, precise);\n var saved = start > doc.first && getLine(doc, start - 1).stateAfter;\n var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start);\n\n doc.iter(start, n, function (line) {\n processLine(cm, line.text, context);\n var pos = context.line;\n line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null;\n context.nextLine();\n });\n if (precise) { doc.modeFrontier = context.line; }\n return context\n }\n\n // Lightweight form of highlight -- proceed over this line and\n // update state, but don't save a style array. Used for lines that\n // aren't currently visible.\n function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }\n\n function callBlankLine(mode, state) {\n if (mode.blankLine) { return mode.blankLine(state) }\n if (!mode.innerMode) { return }\n var inner = innerMode(mode, state);\n if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) }\n }\n\n function readToken(mode, stream, state, inner) {\n for (var i = 0; i < 10; i++) {\n if (inner) { inner[0] = innerMode(mode, state).mode; }\n var style = mode.token(stream, state);\n if (stream.pos > stream.start) { return style }\n }\n throw new Error(\"Mode \" + mode.name + \" failed to advance stream.\")\n }\n\n var Token = function(stream, type, state) {\n this.start = stream.start; this.end = stream.pos;\n this.string = stream.current();\n this.type = type || null;\n this.state = state;\n };\n\n // Utility for getTokenAt and getLineTokens\n function takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n if (asArray) { tokens = []; }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n }\n return asArray ? tokens : new Token(stream, style, context.state)\n }\n\n function extractLineClasses(type, output) {\n if (type) { for (;;) {\n var lineClass = type.match(/(?:^|\\s+)line-(background-)?(\\S+)/);\n if (!lineClass) { break }\n type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);\n var prop = lineClass[1] ? \"bgClass\" : \"textClass\";\n if (output[prop] == null)\n { output[prop] = lineClass[2]; }\n else if (!(new RegExp(\"(?:^|\\\\s)\" + lineClass[2] + \"(?:$|\\\\s)\")).test(output[prop]))\n { output[prop] += \" \" + lineClass[2]; }\n } }\n return type\n }\n\n // Run the given mode's parser over a line, calling f for each token.\n function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize, context), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000);\n f(pos, curStyle);\n curStart = pos;\n }\n }\n\n // Finds the line to start with when starting a parse. Tries to\n // find a line with a stateAfter, so that it can start with a\n // valid state. If that fails, it returns the line with the\n // smallest indentation, which tends to need the least context to\n // parse correctly.\n function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1), after = line.stateAfter;\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline\n }\n\n function retreatFrontier(doc, n) {\n doc.modeFrontier = Math.min(doc.modeFrontier, n);\n if (doc.highlightFrontier < n - 10) { return }\n var start = doc.first;\n for (var line = n - 1; line > start; line--) {\n var saved = getLine(doc, line).stateAfter;\n // change is on 3\n // state on line 1 looked ahead 2 -- so saw 3\n // test 1 + 2 < 3 should cover this\n if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) {\n start = line + 1;\n break\n }\n }\n doc.highlightFrontier = Math.min(doc.highlightFrontier, start);\n }\n\n // Optimize some code when these features are not used.\n var sawReadOnlySpans = false, sawCollapsedSpans = false;\n\n function seeReadOnlySpans() {\n sawReadOnlySpans = true;\n }\n\n function seeCollapsedSpans() {\n sawCollapsedSpans = true;\n }\n\n // TEXTMARKER SPANS\n\n function MarkedSpan(marker, from, to) {\n this.marker = marker;\n this.from = from; this.to = to;\n }\n\n // Search an array of spans for a span matching the given marker.\n function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }\n\n // Remove a span from an array, returning undefined if no spans are\n // left (we don't store arrays for lines without spans).\n function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }\n\n // Add a span to a line.\n function addMarkedSpan(line, span, op) {\n var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));\n if (inThisOp && line.markedSpans && inThisOp.has(line.markedSpans)) {\n line.markedSpans.push(span);\n } else {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n if (inThisOp) { inThisOp.add(line.markedSpans); }\n }\n span.marker.attachLine(line);\n }\n\n // Used for the algorithm that adjusts markers for a change in the\n // document. These functions cut an array of spans at a given\n // character position, returning an array of remaining chunks (or\n // undefined if nothing remains).\n function markedSpansBefore(old, startCh, isInsert) {\n var nw;\n if (old) { for (var i = 0; i < old.length; ++i) {\n var span = old[i], marker = span.marker;\n var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);\n if (startsBefore || span.from == startCh && marker.type == \"bookmark\" && (!isInsert || !span.marker.insertLeft)) {\n var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh)\n ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));\n }\n } }\n return nw\n }\n function markedSpansAfter(old, endCh, isInsert) {\n var nw;\n if (old) { for (var i = 0; i < old.length; ++i) {\n var span = old[i], marker = span.marker;\n var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);\n if (endsAfter || span.from == endCh && marker.type == \"bookmark\" && (!isInsert || span.marker.insertLeft)) {\n var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh)\n ;(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,\n span.to == null ? null : span.to - endCh));\n }\n } }\n return nw\n }\n\n // Given a change object, compute the new set of marker spans that\n // cover the line in which the change took place. Removes spans\n // entirely within the change, reconnects spans belonging to the\n // same marker that appear on both sides of the change, and cuts off\n // spans partially within the change. Returns an array of span\n // arrays with one element for each line in (after) the change.\n function stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) { span.to = startCh; }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n if (span$1.to != null) { span$1.to += offset; }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n if (!found$1) {\n span$1.from = offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n } else {\n span$1.from += offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first); }\n if (last && last != first) { last = clearEmptySpans(last); }\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers); }\n newMarkers.push(last);\n }\n return newMarkers\n }\n\n // Remove spans that are empty and don't have a clearWhenEmpty\n // option of false.\n function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n }\n\n // Used to 'clip' out readOnly ranges when making a change.\n function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark); }\n } }\n });\n if (!markers) { return null }\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}); }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}); }\n parts.splice.apply(parts, newParts);\n j += newParts.length - 3;\n }\n }\n return parts\n }\n\n // Connect or disconnect spans from a line.\n function detachMarkedSpans(line) {\n var spans = line.markedSpans;\n if (!spans) { return }\n for (var i = 0; i < spans.length; ++i)\n { spans[i].marker.detachLine(line); }\n line.markedSpans = null;\n }\n function attachMarkedSpans(line, spans) {\n if (!spans) { return }\n for (var i = 0; i < spans.length; ++i)\n { spans[i].marker.attachLine(line); }\n line.markedSpans = spans;\n }\n\n // Helpers used when computing which overlapping collapsed span\n // counts as the larger one.\n function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 }\n function extraRight(marker) { return marker.inclusiveRight ? 1 : 0 }\n\n // Returns a number indicating which of two overlapping collapsed\n // spans is larger (and thus includes the other). Falls back to\n // comparing ids when the spans cover exactly the same range.\n function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }\n\n // Find out whether a line ends or starts in a collapsed span. If\n // so, return the marker for that span.\n function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }\n function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }\n function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }\n\n function collapsedSpanAround(line, ch) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; }\n } }\n return found\n }\n\n // Test whether there exists a collapsed span that partially\n // overlaps (covers the start or end, but not both) of a new span.\n // Such overlap is not allowed.\n function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }\n\n // A visual line is a line as drawn on the screen. Folding, for\n // example, can cause multiple logical lines to appear on the same\n // visual line. This finds the start of the visual line that the\n // given line is part of (usually that is the line itself).\n function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }\n\n function visualLineEnd(line) {\n var merged;\n while (merged = collapsedSpanAtEnd(line))\n { line = merged.find(1, true).line; }\n return line\n }\n\n // Returns an array of logical lines that continue the visual line\n // started by the argument, or undefined if there are no such lines.\n function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }\n\n // Get the line number of the start of the visual line that the\n // given line number is part of.\n function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }\n\n // Get the line number of the start of the next visual line after\n // the given line.\n function visualLineEndNo(doc, lineN) {\n if (lineN > doc.lastLine()) { return lineN }\n var line = getLine(doc, lineN), merged;\n if (!lineIsHidden(doc, line)) { return lineN }\n while (merged = collapsedSpanAtEnd(line))\n { line = merged.find(1, true).line; }\n return lineNo(line) + 1\n }\n\n // Compute whether a line is hidden. Lines count as hidden when they\n // are part of a visual line that starts with another line, or when\n // they are entirely covered by collapsed, non-widget span.\n function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }\n function lineIsHiddenInner(doc, line, span) {\n if (span.to == null) {\n var end = span.marker.find(1, true);\n return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker))\n }\n if (span.marker.inclusiveRight && span.to == line.text.length)\n { return true }\n for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) {\n sp = line.markedSpans[i];\n if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&\n (sp.to == null || sp.to != span.from) &&\n (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&\n lineIsHiddenInner(doc, line, sp)) { return true }\n }\n }\n\n // Find the height above the given line.\n function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }\n\n // Compute the character length of a line, taking into account\n // collapsed ranges (see markText) that might hide parts, and join\n // other lines onto it.\n function lineLength(line) {\n if (line.height == 0) { return 0 }\n var len = line.text.length, merged, cur = line;\n while (merged = collapsedSpanAtStart(cur)) {\n var found = merged.find(0, true);\n cur = found.from.line;\n len += found.from.ch - found.to.ch;\n }\n cur = line;\n while (merged = collapsedSpanAtEnd(cur)) {\n var found$1 = merged.find(0, true);\n len -= cur.text.length - found$1.from.ch;\n cur = found$1.to.line;\n len += cur.text.length - found$1.to.ch;\n }\n return len\n }\n\n // Find the longest line in the document.\n function findMaxLine(cm) {\n var d = cm.display, doc = cm.doc;\n d.maxLine = getLine(doc, doc.first);\n d.maxLineLength = lineLength(d.maxLine);\n d.maxLineChanged = true;\n doc.iter(function (line) {\n var len = lineLength(line);\n if (len > d.maxLineLength) {\n d.maxLineLength = len;\n d.maxLine = line;\n }\n });\n }\n\n // LINE DATA STRUCTURE\n\n // Line objects. These hold state related to a line, including\n // highlighting info (the styles array).\n var Line = function(text, markedSpans, estimateHeight) {\n this.text = text;\n attachMarkedSpans(this, markedSpans);\n this.height = estimateHeight ? estimateHeight(this) : 1;\n };\n\n Line.prototype.lineNo = function () { return lineNo(this) };\n eventMixin(Line);\n\n // Change the content (text, markers) of a line. Automatically\n // invalidates cached information and tries to re-estimate the\n // line's height.\n function updateLine(line, text, markedSpans, estimateHeight) {\n line.text = text;\n if (line.stateAfter) { line.stateAfter = null; }\n if (line.styles) { line.styles = null; }\n if (line.order != null) { line.order = null; }\n detachMarkedSpans(line);\n attachMarkedSpans(line, markedSpans);\n var estHeight = estimateHeight ? estimateHeight(line) : 1;\n if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n }\n\n // Detach a line from the document tree and its markers.\n function cleanUpLine(line) {\n line.parent = null;\n detachMarkedSpans(line);\n }\n\n // Convert a style as returned by a mode (either null, or a string\n // containing one or more styles) to a CSS style. This is cached,\n // and also looks for line-wide styles.\n var styleToClassCache = {}, styleToClassCacheWithMode = {};\n function interpretTokenStyle(style, options) {\n if (!style || /^\\s*$/.test(style)) { return null }\n var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;\n return cache[style] ||\n (cache[style] = style.replace(/\\S+/g, \"cm-$&\"))\n }\n\n // Render the DOM representation of the text of a line. Also builds\n // up a 'line map', which points at the DOM nodes that represent\n // specific stretches of text, and is used by the measuring code.\n // The returned object contains the DOM node, this map, and\n // information about line-wide styles that were set by the mode.\n function buildLineContent(cm, lineView) {\n // The padding-right forces the element to have a 'border', which\n // is needed on Webkit to be able to get line-level bounding\n // rectangles for it (in measureChar).\n var content = eltP(\"span\", null, null, webkit ? \"padding-right: .1px\" : null);\n var builder = {pre: eltP(\"pre\", [content], \"CodeMirror-line\"), content: content,\n col: 0, pos: 0, cm: cm,\n trailingSpace: false,\n splitSpaces: cm.getOption(\"lineWrapping\")};\n lineView.measure = {};\n\n // Iterate over the logical lines that make up this visual line.\n for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {\n var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0);\n builder.pos = 0;\n builder.addToken = buildToken;\n // Optionally wire in some hacks into the token-rendering\n // algorithm, to deal with browser quirks.\n if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction)))\n { builder.addToken = buildTokenBadBidi(builder.addToken, order); }\n builder.map = [];\n var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);\n insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));\n if (line.styleClasses) {\n if (line.styleClasses.bgClass)\n { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || \"\"); }\n if (line.styleClasses.textClass)\n { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || \"\"); }\n }\n\n // Ensure at least a single node is present, for measuring.\n if (builder.map.length == 0)\n { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); }\n\n // Store the map and a cache object for the current logical line\n if (i == 0) {\n lineView.measure.map = builder.map;\n lineView.measure.cache = {};\n } else {\n (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map)\n ;(lineView.measure.caches || (lineView.measure.caches = [])).push({});\n }\n }\n\n // See issue #2901\n if (webkit) {\n var last = builder.content.lastChild;\n if (/\\bcm-tab\\b/.test(last.className) || (last.querySelector && last.querySelector(\".cm-tab\")))\n { builder.content.className = \"cm-tab-wrap-hack\"; }\n }\n\n signal(cm, \"renderLine\", cm, lineView.line, builder.pre);\n if (builder.pre.className)\n { builder.textClass = joinClasses(builder.pre.className, builder.textClass || \"\"); }\n\n return builder\n }\n\n function defaultSpecialCharPlaceholder(ch) {\n var token = elt(\"span\", \"\\u2022\", \"cm-invalidchar\");\n token.title = \"\\\\u\" + ch.charCodeAt(0).toString(16);\n token.setAttribute(\"aria-label\", token.title);\n return token\n }\n\n // Build up the DOM representation for a single token, and add it to\n // the line map. Takes care to render special characters separately.\n function buildToken(builder, text, style, startStyle, endStyle, css, attributes) {\n if (!text) { return }\n var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text;\n var special = builder.cm.state.specialChars, mustWrap = false;\n var content;\n if (!special.test(text)) {\n builder.col += text.length;\n content = document.createTextNode(displayText);\n builder.map.push(builder.pos, builder.pos + text.length, content);\n if (ie && ie_version < 9) { mustWrap = true; }\n builder.pos += text.length;\n } else {\n content = document.createDocumentFragment();\n var pos = 0;\n while (true) {\n special.lastIndex = pos;\n var m = special.exec(text);\n var skipped = m ? m.index - pos : text.length - pos;\n if (skipped) {\n var txt = document.createTextNode(displayText.slice(pos, pos + skipped));\n if (ie && ie_version < 9) { content.appendChild(elt(\"span\", [txt])); }\n else { content.appendChild(txt); }\n builder.map.push(builder.pos, builder.pos + skipped, txt);\n builder.col += skipped;\n builder.pos += skipped;\n }\n if (!m) { break }\n pos += skipped + 1;\n var txt$1 = (void 0);\n if (m[0] == \"\\t\") {\n var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;\n txt$1 = content.appendChild(elt(\"span\", spaceStr(tabWidth), \"cm-tab\"));\n txt$1.setAttribute(\"role\", \"presentation\");\n txt$1.setAttribute(\"cm-text\", \"\\t\");\n builder.col += tabWidth;\n } else if (m[0] == \"\\r\" || m[0] == \"\\n\") {\n txt$1 = content.appendChild(elt(\"span\", m[0] == \"\\r\" ? \"\\u240d\" : \"\\u2424\", \"cm-invalidchar\"));\n txt$1.setAttribute(\"cm-text\", m[0]);\n builder.col += 1;\n } else {\n txt$1 = builder.cm.options.specialCharPlaceholder(m[0]);\n txt$1.setAttribute(\"cm-text\", m[0]);\n if (ie && ie_version < 9) { content.appendChild(elt(\"span\", [txt$1])); }\n else { content.appendChild(txt$1); }\n builder.col += 1;\n }\n builder.map.push(builder.pos, builder.pos + 1, txt$1);\n builder.pos++;\n }\n }\n builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32;\n if (style || startStyle || endStyle || mustWrap || css || attributes) {\n var fullStyle = style || \"\";\n if (startStyle) { fullStyle += startStyle; }\n if (endStyle) { fullStyle += endStyle; }\n var token = elt(\"span\", [content], fullStyle, css);\n if (attributes) {\n for (var attr in attributes) { if (attributes.hasOwnProperty(attr) && attr != \"style\" && attr != \"class\")\n { token.setAttribute(attr, attributes[attr]); } }\n }\n return builder.content.appendChild(token)\n }\n builder.content.appendChild(content);\n }\n\n // Change some spaces to NBSP to prevent the browser from collapsing\n // trailing spaces at the end of a line when rendering text (issue #1362).\n function splitSpaces(text, trailingBefore) {\n if (text.length > 1 && !/ /.test(text)) { return text }\n var spaceBefore = trailingBefore, result = \"\";\n for (var i = 0; i < text.length; i++) {\n var ch = text.charAt(i);\n if (ch == \" \" && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32))\n { ch = \"\\u00a0\"; }\n result += ch;\n spaceBefore = ch == \" \";\n }\n return result\n }\n\n // Work around nonsense dimensions being reported for stretches of\n // right-to-left text.\n function buildTokenBadBidi(inner, order) {\n return function (builder, text, style, startStyle, endStyle, css, attributes) {\n style = style ? style + \" cm-force-border\" : \"cm-force-border\";\n var start = builder.pos, end = start + text.length;\n for (;;) {\n // Find the part that overlaps with the start of this text\n var part = (void 0);\n for (var i = 0; i < order.length; i++) {\n part = order[i];\n if (part.to > start && part.from <= start) { break }\n }\n if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, css, attributes) }\n inner(builder, text.slice(0, part.to - start), style, startStyle, null, css, attributes);\n startStyle = null;\n text = text.slice(part.to - start);\n start = part.to;\n }\n }\n }\n\n function buildCollapsedSpan(builder, size, marker, ignoreWidget) {\n var widget = !ignoreWidget && marker.widgetNode;\n if (widget) { builder.map.push(builder.pos, builder.pos + size, widget); }\n if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {\n if (!widget)\n { widget = builder.content.appendChild(document.createElement(\"span\")); }\n widget.setAttribute(\"cm-marker\", marker.id);\n }\n if (widget) {\n builder.cm.display.input.setUneditable(widget);\n builder.content.appendChild(widget);\n }\n builder.pos += size;\n builder.trailingSpace = false;\n }\n\n // Outputs a number of spans to make up a line, taking highlighting\n // and marked text into account.\n function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }\n\n\n // These objects are used to represent the visible (currently drawn)\n // part of the document. A LineView may correspond to multiple\n // logical lines, if those are connected by collapsed ranges.\n function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }\n\n // Create a range of LineView objects for the given lines.\n function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }\n\n var operationGroup = null;\n\n function pushOperation(op) {\n if (operationGroup) {\n operationGroup.ops.push(op);\n } else {\n op.ownsGroup = operationGroup = {\n ops: [op],\n delayedCallbacks: []\n };\n }\n }\n\n function fireCallbacksForOps(group) {\n // Calls delayed callbacks and cursorActivity handlers until no\n // new ones appear\n var callbacks = group.delayedCallbacks, i = 0;\n do {\n for (; i < callbacks.length; i++)\n { callbacks[i].call(null); }\n for (var j = 0; j < group.ops.length; j++) {\n var op = group.ops[j];\n if (op.cursorActivityHandlers)\n { while (op.cursorActivityCalled < op.cursorActivityHandlers.length)\n { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); } }\n }\n } while (i < callbacks.length)\n }\n\n function finishOperation(op, endCb) {\n var group = op.ownsGroup;\n if (!group) { return }\n\n try { fireCallbacksForOps(group); }\n finally {\n operationGroup = null;\n endCb(group);\n }\n }\n\n var orphanDelayedCallbacks = null;\n\n // Often, we want to signal events at a point where we are in the\n // middle of some work, but don't want the handler to start calling\n // other methods on the editor, which might be in an inconsistent\n // state or simply not expect any other events to happen.\n // signalLater looks whether there are any handlers, and schedules\n // them to be executed when the last operation ends, or, if no\n // operation is active, when a timeout fires.\n function signalLater(emitter, type /*, values...*/) {\n var arr = getHandlers(emitter, type);\n if (!arr.length) { return }\n var args = Array.prototype.slice.call(arguments, 2), list;\n if (operationGroup) {\n list = operationGroup.delayedCallbacks;\n } else if (orphanDelayedCallbacks) {\n list = orphanDelayedCallbacks;\n } else {\n list = orphanDelayedCallbacks = [];\n setTimeout(fireOrphanDelayed, 0);\n }\n var loop = function ( i ) {\n list.push(function () { return arr[i].apply(null, args); });\n };\n\n for (var i = 0; i < arr.length; ++i)\n loop( i );\n }\n\n function fireOrphanDelayed() {\n var delayed = orphanDelayedCallbacks;\n orphanDelayedCallbacks = null;\n for (var i = 0; i < delayed.length; ++i) { delayed[i](); }\n }\n\n // When an aspect of a line changes, a string is added to\n // lineView.changes. This updates the relevant part of the line's\n // DOM structure.\n function updateLineForChanges(cm, lineView, lineN, dims) {\n for (var j = 0; j < lineView.changes.length; j++) {\n var type = lineView.changes[j];\n if (type == \"text\") { updateLineText(cm, lineView); }\n else if (type == \"gutter\") { updateLineGutter(cm, lineView, lineN, dims); }\n else if (type == \"class\") { updateLineClasses(cm, lineView); }\n else if (type == \"widget\") { updateLineWidgets(cm, lineView, dims); }\n }\n lineView.changes = null;\n }\n\n // Lines with gutter elements, widgets or a background class need to\n // be wrapped, and have the extra elements added to the wrapper div\n function ensureLineWrapped(lineView) {\n if (lineView.node == lineView.text) {\n lineView.node = elt(\"div\", null, null, \"position: relative\");\n if (lineView.text.parentNode)\n { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); }\n lineView.node.appendChild(lineView.text);\n if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; }\n }\n return lineView.node\n }\n\n function updateLineBackground(cm, lineView) {\n var cls = lineView.bgClass ? lineView.bgClass + \" \" + (lineView.line.bgClass || \"\") : lineView.line.bgClass;\n if (cls) { cls += \" CodeMirror-linebackground\"; }\n if (lineView.background) {\n if (cls) { lineView.background.className = cls; }\n else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }\n } else if (cls) {\n var wrap = ensureLineWrapped(lineView);\n lineView.background = wrap.insertBefore(elt(\"div\", null, cls), wrap.firstChild);\n cm.display.input.setUneditable(lineView.background);\n }\n }\n\n // Wrapper around buildLineContent which will reuse the structure\n // in display.externalMeasured when possible.\n function getLineContent(cm, lineView) {\n var ext = cm.display.externalMeasured;\n if (ext && ext.line == lineView.line) {\n cm.display.externalMeasured = null;\n lineView.measure = ext.measure;\n return ext.built\n }\n return buildLineContent(cm, lineView)\n }\n\n // Redraw the line's text. Interacts with the background and text\n // classes because the mode may output tokens that influence these\n // classes.\n function updateLineText(cm, lineView) {\n var cls = lineView.text.className;\n var built = getLineContent(cm, lineView);\n if (lineView.text == lineView.node) { lineView.node = built.pre; }\n lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n lineView.text = built.pre;\n if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n lineView.bgClass = built.bgClass;\n lineView.textClass = built.textClass;\n updateLineClasses(cm, lineView);\n } else if (cls) {\n lineView.text.className = cls;\n }\n }\n\n function updateLineClasses(cm, lineView) {\n updateLineBackground(cm, lineView);\n if (lineView.line.wrapClass)\n { ensureLineWrapped(lineView).className = lineView.line.wrapClass; }\n else if (lineView.node != lineView.text)\n { lineView.node.className = \"\"; }\n var textClass = lineView.textClass ? lineView.textClass + \" \" + (lineView.line.textClass || \"\") : lineView.line.textClass;\n lineView.text.className = textClass || \"\";\n }\n\n function updateLineGutter(cm, lineView, lineN, dims) {\n if (lineView.gutter) {\n lineView.node.removeChild(lineView.gutter);\n lineView.gutter = null;\n }\n if (lineView.gutterBackground) {\n lineView.node.removeChild(lineView.gutterBackground);\n lineView.gutterBackground = null;\n }\n if (lineView.line.gutterClass) {\n var wrap = ensureLineWrapped(lineView);\n lineView.gutterBackground = elt(\"div\", null, \"CodeMirror-gutter-background \" + lineView.line.gutterClass,\n (\"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px; width: \" + (dims.gutterTotalWidth) + \"px\"));\n cm.display.input.setUneditable(lineView.gutterBackground);\n wrap.insertBefore(lineView.gutterBackground, lineView.text);\n }\n var markers = lineView.line.gutterMarkers;\n if (cm.options.lineNumbers || markers) {\n var wrap$1 = ensureLineWrapped(lineView);\n var gutterWrap = lineView.gutter = elt(\"div\", null, \"CodeMirror-gutter-wrapper\", (\"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px\"));\n gutterWrap.setAttribute(\"aria-hidden\", \"true\");\n cm.display.input.setUneditable(gutterWrap);\n wrap$1.insertBefore(gutterWrap, lineView.text);\n if (lineView.line.gutterClass)\n { gutterWrap.className += \" \" + lineView.line.gutterClass; }\n if (cm.options.lineNumbers && (!markers || !markers[\"CodeMirror-linenumbers\"]))\n { lineView.lineNumber = gutterWrap.appendChild(\n elt(\"div\", lineNumberFor(cm.options, lineN),\n \"CodeMirror-linenumber CodeMirror-gutter-elt\",\n (\"left: \" + (dims.gutterLeft[\"CodeMirror-linenumbers\"]) + \"px; width: \" + (cm.display.lineNumInnerWidth) + \"px\"))); }\n if (markers) { for (var k = 0; k < cm.display.gutterSpecs.length; ++k) {\n var id = cm.display.gutterSpecs[k].className, found = markers.hasOwnProperty(id) && markers[id];\n if (found)\n { gutterWrap.appendChild(elt(\"div\", [found], \"CodeMirror-gutter-elt\",\n (\"left: \" + (dims.gutterLeft[id]) + \"px; width: \" + (dims.gutterWidth[id]) + \"px\"))); }\n } }\n }\n }\n\n function updateLineWidgets(cm, lineView, dims) {\n if (lineView.alignable) { lineView.alignable = null; }\n var isWidget = classTest(\"CodeMirror-linewidget\");\n for (var node = lineView.node.firstChild, next = (void 0); node; node = next) {\n next = node.nextSibling;\n if (isWidget.test(node.className)) { lineView.node.removeChild(node); }\n }\n insertLineWidgets(cm, lineView, dims);\n }\n\n // Build a line's DOM representation from scratch\n function buildLineElement(cm, lineView, lineN, dims) {\n var built = getLineContent(cm, lineView);\n lineView.text = lineView.node = built.pre;\n if (built.bgClass) { lineView.bgClass = built.bgClass; }\n if (built.textClass) { lineView.textClass = built.textClass; }\n\n updateLineClasses(cm, lineView);\n updateLineGutter(cm, lineView, lineN, dims);\n insertLineWidgets(cm, lineView, dims);\n return lineView.node\n }\n\n // A lineView may contain multiple logical lines (when merged by\n // collapsed spans). The widgets for all of them need to be drawn.\n function insertLineWidgets(cm, lineView, dims) {\n insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);\n if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n { insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); } }\n }\n\n function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {\n if (!line.widgets) { return }\n var wrap = ensureLineWrapped(lineView);\n for (var i = 0, ws = line.widgets; i < ws.length; ++i) {\n var widget = ws[i], node = elt(\"div\", [widget.node], \"CodeMirror-linewidget\" + (widget.className ? \" \" + widget.className : \"\"));\n if (!widget.handleMouseEvents) { node.setAttribute(\"cm-ignore-events\", \"true\"); }\n positionLineWidget(widget, node, lineView, dims);\n cm.display.input.setUneditable(node);\n if (allowAbove && widget.above)\n { wrap.insertBefore(node, lineView.gutter || lineView.text); }\n else\n { wrap.appendChild(node); }\n signalLater(widget, \"redraw\");\n }\n }\n\n function positionLineWidget(widget, node, lineView, dims) {\n if (widget.noHScroll) {\n (lineView.alignable || (lineView.alignable = [])).push(node);\n var width = dims.wrapperWidth;\n node.style.left = dims.fixedPos + \"px\";\n if (!widget.coverGutter) {\n width -= dims.gutterTotalWidth;\n node.style.paddingLeft = dims.gutterTotalWidth + \"px\";\n }\n node.style.width = width + \"px\";\n }\n if (widget.coverGutter) {\n node.style.zIndex = 5;\n node.style.position = \"relative\";\n if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + \"px\"; }\n }\n }\n\n function widgetHeight(widget) {\n if (widget.height != null) { return widget.height }\n var cm = widget.doc.cm;\n if (!cm) { return 0 }\n if (!contains(document.body, widget.node)) {\n var parentStyle = \"position: relative;\";\n if (widget.coverGutter)\n { parentStyle += \"margin-left: -\" + cm.display.gutters.offsetWidth + \"px;\"; }\n if (widget.noHScroll)\n { parentStyle += \"width: \" + cm.display.wrapper.clientWidth + \"px;\"; }\n removeChildrenAndAdd(cm.display.measure, elt(\"div\", [widget.node], null, parentStyle));\n }\n return widget.height = widget.node.parentNode.offsetHeight\n }\n\n // Return true when the given mouse event happened in a widget\n function eventInWidget(display, e) {\n for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {\n if (!n || (n.nodeType == 1 && n.getAttribute(\"cm-ignore-events\") == \"true\") ||\n (n.parentNode == display.sizer && n != display.mover))\n { return true }\n }\n }\n\n // POSITION MEASUREMENT\n\n function paddingTop(display) {return display.lineSpace.offsetTop}\n function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight}\n function paddingH(display) {\n if (display.cachedPaddingH) { return display.cachedPaddingH }\n var e = removeChildrenAndAdd(display.measure, elt(\"pre\", \"x\", \"CodeMirror-line-like\"));\n var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;\n var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};\n if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; }\n return data\n }\n\n function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth }\n function displayWidth(cm) {\n return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth\n }\n function displayHeight(cm) {\n return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight\n }\n\n // Ensure the lineView.wrapping.heights array is populated. This is\n // an array of bottom offsets for the lines that make up a drawn\n // line. When lineWrapping is on, there might be more than one\n // height.\n function ensureLineHeights(cm, lineView, rect) {\n var wrapping = cm.options.lineWrapping;\n var curWidth = wrapping && displayWidth(cm);\n if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {\n var heights = lineView.measure.heights = [];\n if (wrapping) {\n lineView.measure.width = curWidth;\n var rects = lineView.text.firstChild.getClientRects();\n for (var i = 0; i < rects.length - 1; i++) {\n var cur = rects[i], next = rects[i + 1];\n if (Math.abs(cur.bottom - next.bottom) > 2)\n { heights.push((cur.bottom + next.top) / 2 - rect.top); }\n }\n }\n heights.push(rect.bottom - rect.top);\n }\n }\n\n // Find a line map (mapping character offsets to text nodes) and a\n // measurement cache for the given line number. (A line view might\n // contain multiple lines when collapsed ranges are present.)\n function mapFromLineView(lineView, line, lineN) {\n if (lineView.line == line)\n { return {map: lineView.measure.map, cache: lineView.measure.cache} }\n if (lineView.rest) {\n for (var i = 0; i < lineView.rest.length; i++)\n { if (lineView.rest[i] == line)\n { return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]} } }\n for (var i$1 = 0; i$1 < lineView.rest.length; i$1++)\n { if (lineNo(lineView.rest[i$1]) > lineN)\n { return {map: lineView.measure.maps[i$1], cache: lineView.measure.caches[i$1], before: true} } }\n }\n }\n\n // Render a line into the hidden node display.externalMeasured. Used\n // when measurement is needed for a line that's not in the viewport.\n function updateExternalMeasurement(cm, line) {\n line = visualLine(line);\n var lineN = lineNo(line);\n var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);\n view.lineN = lineN;\n var built = view.built = buildLineContent(cm, view);\n view.text = built.pre;\n removeChildrenAndAdd(cm.display.lineMeasure, built.pre);\n return view\n }\n\n // Get a {top, bottom, left, right} box (in line-local coordinates)\n // for a given character.\n function measureChar(cm, line, ch, bias) {\n return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias)\n }\n\n // Find a line view that corresponds to the given line number.\n function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }\n\n // Measurement can be split in two steps, the set-up work that\n // applies to the whole line, and the measurement of the actual\n // character. Functions like coordsChar, that need to do a lot of\n // measurements in a row, can thus ensure that the set-up work is\n // only done once.\n function prepareMeasureForLine(cm, line) {\n var lineN = lineNo(line);\n var view = findViewForLine(cm, lineN);\n if (view && !view.text) {\n view = null;\n } else if (view && view.changes) {\n updateLineForChanges(cm, view, lineN, getDimensions(cm));\n cm.curOp.forceUpdate = true;\n }\n if (!view)\n { view = updateExternalMeasurement(cm, line); }\n\n var info = mapFromLineView(view, line, lineN);\n return {\n line: line, view: view, rect: null,\n map: info.map, cache: info.cache, before: info.before,\n hasHeights: false\n }\n }\n\n // Given a prepared measurement object, measures the position of an\n // actual character (or fetches it from the cache).\n function measureCharPrepared(cm, prepared, ch, bias, varHeight) {\n if (prepared.before) { ch = -1; }\n var key = ch + (bias || \"\"), found;\n if (prepared.cache.hasOwnProperty(key)) {\n found = prepared.cache[key];\n } else {\n if (!prepared.rect)\n { prepared.rect = prepared.view.text.getBoundingClientRect(); }\n if (!prepared.hasHeights) {\n ensureLineHeights(cm, prepared.view, prepared.rect);\n prepared.hasHeights = true;\n }\n found = measureCharInner(cm, prepared, ch, bias);\n if (!found.bogus) { prepared.cache[key] = found; }\n }\n return {left: found.left, right: found.right,\n top: varHeight ? found.rtop : found.top,\n bottom: varHeight ? found.rbottom : found.bottom}\n }\n\n var nullRect = {left: 0, right: 0, top: 0, bottom: 0};\n\n function nodeAndOffsetInLineMap(map, ch, bias) {\n var node, start, end, collapse, mStart, mEnd;\n // First, search the line map for the text node corresponding to,\n // or closest to, the target character.\n for (var i = 0; i < map.length; i += 3) {\n mStart = map[i];\n mEnd = map[i + 1];\n if (ch < mStart) {\n start = 0; end = 1;\n collapse = \"left\";\n } else if (ch < mEnd) {\n start = ch - mStart;\n end = start + 1;\n } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) {\n end = mEnd - mStart;\n start = end - 1;\n if (ch >= mEnd) { collapse = \"right\"; }\n }\n if (start != null) {\n node = map[i + 2];\n if (mStart == mEnd && bias == (node.insertLeft ? \"left\" : \"right\"))\n { collapse = bias; }\n if (bias == \"left\" && start == 0)\n { while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) {\n node = map[(i -= 3) + 2];\n collapse = \"left\";\n } }\n if (bias == \"right\" && start == mEnd - mStart)\n { while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) {\n node = map[(i += 3) + 2];\n collapse = \"right\";\n } }\n break\n }\n }\n return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd}\n }\n\n function getUsefulRect(rects, bias) {\n var rect = nullRect;\n if (bias == \"left\") { for (var i = 0; i < rects.length; i++) {\n if ((rect = rects[i]).left != rect.right) { break }\n } } else { for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) {\n if ((rect = rects[i$1]).left != rect.right) { break }\n } }\n return rect\n }\n\n function measureCharInner(cm, prepared, ch, bias) {\n var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);\n var node = place.node, start = place.start, end = place.end, collapse = place.collapse;\n\n var rect;\n if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.\n for (var i$1 = 0; i$1 < 4; i$1++) { // Retry a maximum of 4 times when nonsense rectangles are returned\n while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { --start; }\n while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { ++end; }\n if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart)\n { rect = node.parentNode.getBoundingClientRect(); }\n else\n { rect = getUsefulRect(range(node, start, end).getClientRects(), bias); }\n if (rect.left || rect.right || start == 0) { break }\n end = start;\n start = start - 1;\n collapse = \"right\";\n }\n if (ie && ie_version < 11) { rect = maybeUpdateRectForZooming(cm.display.measure, rect); }\n } else { // If it is a widget, simply get the box for the whole widget.\n if (start > 0) { collapse = bias = \"right\"; }\n var rects;\n if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)\n { rect = rects[bias == \"right\" ? rects.length - 1 : 0]; }\n else\n { rect = node.getBoundingClientRect(); }\n }\n if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {\n var rSpan = node.parentNode.getClientRects()[0];\n if (rSpan)\n { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; }\n else\n { rect = nullRect; }\n }\n\n var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;\n var mid = (rtop + rbot) / 2;\n var heights = prepared.view.measure.heights;\n var i = 0;\n for (; i < heights.length - 1; i++)\n { if (mid < heights[i]) { break } }\n var top = i ? heights[i - 1] : 0, bot = heights[i];\n var result = {left: (collapse == \"right\" ? rect.right : rect.left) - prepared.rect.left,\n right: (collapse == \"left\" ? rect.left : rect.right) - prepared.rect.left,\n top: top, bottom: bot};\n if (!rect.left && !rect.right) { result.bogus = true; }\n if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }\n\n return result\n }\n\n // Work around problem with bounding client rects on ranges being\n // returned incorrectly when zoomed on IE10 and below.\n function maybeUpdateRectForZooming(measure, rect) {\n if (!window.screen || screen.logicalXDPI == null ||\n screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n { return rect }\n var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n return {left: rect.left * scaleX, right: rect.right * scaleX,\n top: rect.top * scaleY, bottom: rect.bottom * scaleY}\n }\n\n function clearLineMeasurementCacheFor(lineView) {\n if (lineView.measure) {\n lineView.measure.cache = {};\n lineView.measure.heights = null;\n if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n { lineView.measure.caches[i] = {}; } }\n }\n }\n\n function clearLineMeasurementCache(cm) {\n cm.display.externalMeasure = null;\n removeChildren(cm.display.lineMeasure);\n for (var i = 0; i < cm.display.view.length; i++)\n { clearLineMeasurementCacheFor(cm.display.view[i]); }\n }\n\n function clearCaches(cm) {\n clearLineMeasurementCache(cm);\n cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;\n if (!cm.options.lineWrapping) { cm.display.maxLineChanged = true; }\n cm.display.lineNumChars = null;\n }\n\n function pageScrollX(doc) {\n // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206\n // which causes page_Offset and bounding client rects to use\n // different reference viewports and invalidate our calculations.\n if (chrome && android) { return -(doc.body.getBoundingClientRect().left - parseInt(getComputedStyle(doc.body).marginLeft)) }\n return doc.defaultView.pageXOffset || (doc.documentElement || doc.body).scrollLeft\n }\n function pageScrollY(doc) {\n if (chrome && android) { return -(doc.body.getBoundingClientRect().top - parseInt(getComputedStyle(doc.body).marginTop)) }\n return doc.defaultView.pageYOffset || (doc.documentElement || doc.body).scrollTop\n }\n\n function widgetTopHeight(lineObj) {\n var ref = visualLine(lineObj);\n var widgets = ref.widgets;\n var height = 0;\n if (widgets) { for (var i = 0; i < widgets.length; ++i) { if (widgets[i].above)\n { height += widgetHeight(widgets[i]); } } }\n return height\n }\n\n // Converts a {top, bottom, left, right} box from line-local\n // coordinates into another coordinate system. Context may be one of\n // \"line\", \"div\" (display.lineDiv), \"local\"./null (editor), \"window\",\n // or \"page\".\n function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {\n if (!includeWidgets) {\n var height = widgetTopHeight(lineObj);\n rect.top += height; rect.bottom += height;\n }\n if (context == \"line\") { return rect }\n if (!context) { context = \"local\"; }\n var yOff = heightAtLine(lineObj);\n if (context == \"local\") { yOff += paddingTop(cm.display); }\n else { yOff -= cm.display.viewOffset; }\n if (context == \"page\" || context == \"window\") {\n var lOff = cm.display.lineSpace.getBoundingClientRect();\n yOff += lOff.top + (context == \"window\" ? 0 : pageScrollY(doc(cm)));\n var xOff = lOff.left + (context == \"window\" ? 0 : pageScrollX(doc(cm)));\n rect.left += xOff; rect.right += xOff;\n }\n rect.top += yOff; rect.bottom += yOff;\n return rect\n }\n\n // Coverts a box from \"div\" coords to another coordinate system.\n // Context may be \"window\", \"page\", \"div\", or \"local\"./null.\n function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX(doc(cm));\n top -= pageScrollY(doc(cm));\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }\n\n function charCoords(cm, pos, context, lineObj, bias) {\n if (!lineObj) { lineObj = getLine(cm.doc, pos.line); }\n return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context)\n }\n\n // Returns a box for a given cursor position, which may have an\n // 'other' property containing the position of the secondary cursor\n // on a bidi boundary.\n // A cursor Pos(line, char, \"before\") is on the same visual line as `char - 1`\n // and after `char - 1` in writing order of `char - 1`\n // A cursor Pos(line, char, \"after\") is on the same visual line as `char`\n // and before `char` in writing order of `char`\n // Examples (upper-case letters are RTL, lower-case are LTR):\n // Pos(0, 1, ...)\n // before after\n // ab a|b a|b\n // aB a|B aB|\n // Ab |Ab A|b\n // AB B|A B|A\n // Every position after the last character on a line is considered to stick\n // to the last character on the line.\n function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {\n lineObj = lineObj || getLine(cm.doc, pos.line);\n if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n function get(ch, right) {\n var m = measureCharPrepared(cm, preparedMeasure, ch, right ? \"right\" : \"left\", varHeight);\n if (right) { m.left = m.right; } else { m.right = m.left; }\n return intoCoordSystem(cm, lineObj, m, context)\n }\n var order = getOrder(lineObj, cm.doc.direction), ch = pos.ch, sticky = pos.sticky;\n if (ch >= lineObj.text.length) {\n ch = lineObj.text.length;\n sticky = \"before\";\n } else if (ch <= 0) {\n ch = 0;\n sticky = \"after\";\n }\n if (!order) { return get(sticky == \"before\" ? ch - 1 : ch, sticky == \"before\") }\n\n function getBidi(ch, partPos, invert) {\n var part = order[partPos], right = part.level == 1;\n return get(invert ? ch - 1 : ch, right != invert)\n }\n var partPos = getBidiPartAt(order, ch, sticky);\n var other = bidiOther;\n var val = getBidi(ch, partPos, sticky == \"before\");\n if (other != null) { val.other = getBidi(ch, other, sticky != \"before\"); }\n return val\n }\n\n // Used to cheaply estimate the coordinates for a position. Used for\n // intermediate scroll updates.\n function estimateCoords(cm, pos) {\n var left = 0;\n pos = clipPos(cm.doc, pos);\n if (!cm.options.lineWrapping) { left = charWidth(cm.display) * pos.ch; }\n var lineObj = getLine(cm.doc, pos.line);\n var top = heightAtLine(lineObj) + paddingTop(cm.display);\n return {left: left, right: left, top: top, bottom: top + lineObj.height}\n }\n\n // Positions returned by coordsChar contain some extra information.\n // xRel is the relative x position of the input coordinates compared\n // to the found position (so xRel > 0 means the coordinates are to\n // the right of the character position, for example). When outside\n // is true, that means the coordinates lie outside the line's\n // vertical range.\n function PosWithInfo(line, ch, sticky, outside, xRel) {\n var pos = Pos(line, ch, sticky);\n pos.xRel = xRel;\n if (outside) { pos.outside = outside; }\n return pos\n }\n\n // Compute the character position closest to the given coordinates.\n // Input must be lineSpace-local (\"div\" coordinate system).\n function coordsChar(cm, x, y) {\n var doc = cm.doc;\n y += cm.display.viewOffset;\n if (y < 0) { return PosWithInfo(doc.first, 0, null, -1, -1) }\n var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;\n if (lineN > last)\n { return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, 1, 1) }\n if (x < 0) { x = 0; }\n\n var lineObj = getLine(doc, lineN);\n for (;;) {\n var found = coordsCharInner(cm, lineObj, lineN, x, y);\n var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 || found.outside > 0 ? 1 : 0));\n if (!collapsed) { return found }\n var rangeEnd = collapsed.find(1);\n if (rangeEnd.line == lineN) { return rangeEnd }\n lineObj = getLine(doc, lineN = rangeEnd.line);\n }\n }\n\n function wrappedLineExtent(cm, lineObj, preparedMeasure, y) {\n y -= widgetTopHeight(lineObj);\n var end = lineObj.text.length;\n var begin = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y; }, end, 0);\n end = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch).top > y; }, begin, end);\n return {begin: begin, end: end}\n }\n\n function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {\n if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), \"line\").top;\n return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop)\n }\n\n // Returns true if the given side of a box is after the given\n // coordinates, in top-to-bottom, left-to-right order.\n function boxIsAfter(box, x, y, left) {\n return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x\n }\n\n function coordsCharInner(cm, lineObj, lineNo, x, y) {\n // Move y into line-local coordinate space\n y -= heightAtLine(lineObj);\n var preparedMeasure = prepareMeasureForLine(cm, lineObj);\n // When directly calling `measureCharPrepared`, we have to adjust\n // for the widgets at this line.\n var widgetHeight = widgetTopHeight(lineObj);\n var begin = 0, end = lineObj.text.length, ltr = true;\n\n var order = getOrder(lineObj, cm.doc.direction);\n // If the line isn't plain left-to-right text, first figure out\n // which bidi section the coordinates fall into.\n if (order) {\n var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart)\n (cm, lineObj, lineNo, preparedMeasure, order, x, y);\n ltr = part.level != 1;\n // The awkward -1 offsets are needed because findFirst (called\n // on these below) will treat its first bound as inclusive,\n // second as exclusive, but we want to actually address the\n // characters in the part's range\n begin = ltr ? part.from : part.to - 1;\n end = ltr ? part.to : part.from - 1;\n }\n\n // A binary search to find the first character whose bounding box\n // starts after the coordinates. If we run across any whose box wrap\n // the coordinates, store that.\n var chAround = null, boxAround = null;\n var ch = findFirst(function (ch) {\n var box = measureCharPrepared(cm, preparedMeasure, ch);\n box.top += widgetHeight; box.bottom += widgetHeight;\n if (!boxIsAfter(box, x, y, false)) { return false }\n if (box.top <= y && box.left <= x) {\n chAround = ch;\n boxAround = box;\n }\n return true\n }, begin, end);\n\n var baseX, sticky, outside = false;\n // If a box around the coordinates was found, use that\n if (boxAround) {\n // Distinguish coordinates nearer to the left or right side of the box\n var atLeft = x - boxAround.left < boxAround.right - x, atStart = atLeft == ltr;\n ch = chAround + (atStart ? 0 : 1);\n sticky = atStart ? \"after\" : \"before\";\n baseX = atLeft ? boxAround.left : boxAround.right;\n } else {\n // (Adjust for extended bound, if necessary.)\n if (!ltr && (ch == end || ch == begin)) { ch++; }\n // To determine which side to associate with, get the box to the\n // left of the character and compare it's vertical position to the\n // coordinates\n sticky = ch == 0 ? \"after\" : ch == lineObj.text.length ? \"before\" :\n (measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight <= y) == ltr ?\n \"after\" : \"before\";\n // Now get accurate coordinates for this place, in order to get a\n // base X position\n var coords = cursorCoords(cm, Pos(lineNo, ch, sticky), \"line\", lineObj, preparedMeasure);\n baseX = coords.left;\n outside = y < coords.top ? -1 : y >= coords.bottom ? 1 : 0;\n }\n\n ch = skipExtendingChars(lineObj.text, ch, 1);\n return PosWithInfo(lineNo, ch, sticky, outside, x - baseX)\n }\n\n function coordsBidiPart(cm, lineObj, lineNo, preparedMeasure, order, x, y) {\n // Bidi parts are sorted left-to-right, and in a non-line-wrapping\n // situation, we can take this ordering to correspond to the visual\n // ordering. This finds the first part whose end is after the given\n // coordinates.\n var index = findFirst(function (i) {\n var part = order[i], ltr = part.level != 1;\n return boxIsAfter(cursorCoords(cm, Pos(lineNo, ltr ? part.to : part.from, ltr ? \"before\" : \"after\"),\n \"line\", lineObj, preparedMeasure), x, y, true)\n }, 0, order.length - 1);\n var part = order[index];\n // If this isn't the first part, the part's start is also after\n // the coordinates, and the coordinates aren't on the same line as\n // that start, move one part back.\n if (index > 0) {\n var ltr = part.level != 1;\n var start = cursorCoords(cm, Pos(lineNo, ltr ? part.from : part.to, ltr ? \"after\" : \"before\"),\n \"line\", lineObj, preparedMeasure);\n if (boxIsAfter(start, x, y, true) && start.top > y)\n { part = order[index - 1]; }\n }\n return part\n }\n\n function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) {\n // In a wrapped line, rtl text on wrapping boundaries can do things\n // that don't correspond to the ordering in our `order` array at\n // all, so a binary search doesn't work, and we want to return a\n // part that only spans one line so that the binary search in\n // coordsCharInner is safe. As such, we first find the extent of the\n // wrapped line, and then do a flat search in which we discard any\n // spans that aren't on the line.\n var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y);\n var begin = ref.begin;\n var end = ref.end;\n if (/\\s/.test(lineObj.text.charAt(end - 1))) { end--; }\n var part = null, closestDist = null;\n for (var i = 0; i < order.length; i++) {\n var p = order[i];\n if (p.from >= end || p.to <= begin) { continue }\n var ltr = p.level != 1;\n var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right;\n // Weigh against spans ending before this, so that they are only\n // picked if nothing ends after\n var dist = endX < x ? x - endX + 1e9 : endX - x;\n if (!part || closestDist > dist) {\n part = p;\n closestDist = dist;\n }\n }\n if (!part) { part = order[order.length - 1]; }\n // Clip the part to the wrapped line.\n if (part.from < begin) { part = {from: begin, to: part.to, level: part.level}; }\n if (part.to > end) { part = {from: part.from, to: end, level: part.level}; }\n return part\n }\n\n var measureText;\n // Compute the default text height.\n function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\", null, \"CodeMirror-line-like\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }\n\n // Compute the default character width.\n function charWidth(display) {\n if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n var anchor = elt(\"span\", \"xxxxxxxxxx\");\n var pre = elt(\"pre\", [anchor], \"CodeMirror-line-like\");\n removeChildrenAndAdd(display.measure, pre);\n var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n if (width > 2) { display.cachedCharWidth = width; }\n return width || 10\n }\n\n // Do a bulk-read of the DOM positions and sizes needed to draw the\n // view, so that we don't interleave reading and writing to the DOM.\n function getDimensions(cm) {\n var d = cm.display, left = {}, width = {};\n var gutterLeft = d.gutters.clientLeft;\n for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {\n var id = cm.display.gutterSpecs[i].className;\n left[id] = n.offsetLeft + n.clientLeft + gutterLeft;\n width[id] = n.clientWidth;\n }\n return {fixedPos: compensateForHScroll(d),\n gutterTotalWidth: d.gutters.offsetWidth,\n gutterLeft: left,\n gutterWidth: width,\n wrapperWidth: d.wrapper.clientWidth}\n }\n\n // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,\n // but using getBoundingClientRect to get a sub-pixel-accurate\n // result.\n function compensateForHScroll(display) {\n return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left\n }\n\n // Returns a function that estimates the height of a line, to use as\n // first approximation until the line becomes visible (and is thus\n // properly measurable).\n function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n }\n\n function estimateLineHeights(cm) {\n var doc = cm.doc, est = estimateHeight(cm);\n doc.iter(function (line) {\n var estHeight = est(line);\n if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n });\n }\n\n // Given a mouse event, find the corresponding position. If liberal\n // is false, it checks whether a gutter or scrollbar was clicked,\n // and returns null if it was. forRect is used by rectangular\n // selections, and tries to estimate a character position even for\n // coordinates beyond the right of the text.\n function posFromMouse(cm, e, liberal, forRect) {\n var display = cm.display;\n if (!liberal && e_target(e).getAttribute(\"cm-not-content\") == \"true\") { return null }\n\n var x, y, space = display.lineSpace.getBoundingClientRect();\n // Fails unpredictably on IE[67] when mouse is dragged around quickly.\n try { x = e.clientX - space.left; y = e.clientY - space.top; }\n catch (e$1) { return null }\n var coords = coordsChar(cm, x, y), line;\n if (forRect && coords.xRel > 0 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {\n var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;\n coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));\n }\n return coords\n }\n\n // Find the view element corresponding to a given line. Return null\n // when the line isn't visible.\n function findViewIndex(cm, n) {\n if (n >= cm.display.viewTo) { return null }\n n -= cm.display.viewFrom;\n if (n < 0) { return null }\n var view = cm.display.view;\n for (var i = 0; i < view.length; i++) {\n n -= view[i].size;\n if (n < 0) { return i }\n }\n }\n\n // Updates the display.view data structure for a given change to the\n // document. From and to are in pre-change coordinates. Lendiff is\n // the amount of lines added or subtracted by the change. This is\n // used for changes that span multiple lines, or change the way\n // lines are divided into visual lines. regLineChange (below)\n // registers single-line changes.\n function regChange(cm, from, to, lendiff) {\n if (from == null) { from = cm.doc.first; }\n if (to == null) { to = cm.doc.first + cm.doc.size; }\n if (!lendiff) { lendiff = 0; }\n\n var display = cm.display;\n if (lendiff && to < display.viewTo &&\n (display.updateLineNumbers == null || display.updateLineNumbers > from))\n { display.updateLineNumbers = from; }\n\n cm.curOp.viewChanged = true;\n\n if (from >= display.viewTo) { // Change after\n if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)\n { resetView(cm); }\n } else if (to <= display.viewFrom) { // Change before\n if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {\n resetView(cm);\n } else {\n display.viewFrom += lendiff;\n display.viewTo += lendiff;\n }\n } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap\n resetView(cm);\n } else if (from <= display.viewFrom) { // Top overlap\n var cut = viewCuttingPoint(cm, to, to + lendiff, 1);\n if (cut) {\n display.view = display.view.slice(cut.index);\n display.viewFrom = cut.lineN;\n display.viewTo += lendiff;\n } else {\n resetView(cm);\n }\n } else if (to >= display.viewTo) { // Bottom overlap\n var cut$1 = viewCuttingPoint(cm, from, from, -1);\n if (cut$1) {\n display.view = display.view.slice(0, cut$1.index);\n display.viewTo = cut$1.lineN;\n } else {\n resetView(cm);\n }\n } else { // Gap in the middle\n var cutTop = viewCuttingPoint(cm, from, from, -1);\n var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);\n if (cutTop && cutBot) {\n display.view = display.view.slice(0, cutTop.index)\n .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))\n .concat(display.view.slice(cutBot.index));\n display.viewTo += lendiff;\n } else {\n resetView(cm);\n }\n }\n\n var ext = display.externalMeasured;\n if (ext) {\n if (to < ext.lineN)\n { ext.lineN += lendiff; }\n else if (from < ext.lineN + ext.size)\n { display.externalMeasured = null; }\n }\n }\n\n // Register a change to a single line. Type must be one of \"text\",\n // \"gutter\", \"class\", \"widget\"\n function regLineChange(cm, line, type) {\n cm.curOp.viewChanged = true;\n var display = cm.display, ext = cm.display.externalMeasured;\n if (ext && line >= ext.lineN && line < ext.lineN + ext.size)\n { display.externalMeasured = null; }\n\n if (line < display.viewFrom || line >= display.viewTo) { return }\n var lineView = display.view[findViewIndex(cm, line)];\n if (lineView.node == null) { return }\n var arr = lineView.changes || (lineView.changes = []);\n if (indexOf(arr, type) == -1) { arr.push(type); }\n }\n\n // Clear the view.\n function resetView(cm) {\n cm.display.viewFrom = cm.display.viewTo = cm.doc.first;\n cm.display.view = [];\n cm.display.viewOffset = 0;\n }\n\n function viewCuttingPoint(cm, oldN, newN, dir) {\n var index = findViewIndex(cm, oldN), diff, view = cm.display.view;\n if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)\n { return {index: index, lineN: newN} }\n var n = cm.display.viewFrom;\n for (var i = 0; i < index; i++)\n { n += view[i].size; }\n if (n != oldN) {\n if (dir > 0) {\n if (index == view.length - 1) { return null }\n diff = (n + view[index].size) - oldN;\n index++;\n } else {\n diff = n - oldN;\n }\n oldN += diff; newN += diff;\n }\n while (visualLineNo(cm.doc, newN) != newN) {\n if (index == (dir < 0 ? 0 : view.length - 1)) { return null }\n newN += dir * view[index - (dir < 0 ? 1 : 0)].size;\n index += dir;\n }\n return {index: index, lineN: newN}\n }\n\n // Force the view to cover a given range, adding empty view element\n // or clipping off existing ones as needed.\n function adjustView(cm, from, to) {\n var display = cm.display, view = display.view;\n if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {\n display.view = buildViewArray(cm, from, to);\n display.viewFrom = from;\n } else {\n if (display.viewFrom > from)\n { display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); }\n else if (display.viewFrom < from)\n { display.view = display.view.slice(findViewIndex(cm, from)); }\n display.viewFrom = from;\n if (display.viewTo < to)\n { display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); }\n else if (display.viewTo > to)\n { display.view = display.view.slice(0, findViewIndex(cm, to)); }\n }\n display.viewTo = to;\n }\n\n // Count the number of lines in the view whose DOM representation is\n // out of date (or nonexistent).\n function countDirtyView(cm) {\n var view = cm.display.view, dirty = 0;\n for (var i = 0; i < view.length; i++) {\n var lineView = view[i];\n if (!lineView.hidden && (!lineView.node || lineView.changes)) { ++dirty; }\n }\n return dirty\n }\n\n function updateSelection(cm) {\n cm.display.input.showSelection(cm.display.input.prepareSelection());\n }\n\n function prepareSelection(cm, primary) {\n if ( primary === void 0 ) primary = true;\n\n var doc = cm.doc, result = {};\n var curFragment = result.cursors = document.createDocumentFragment();\n var selFragment = result.selection = document.createDocumentFragment();\n\n var customCursor = cm.options.$customCursor;\n if (customCursor) { primary = true; }\n for (var i = 0; i < doc.sel.ranges.length; i++) {\n if (!primary && i == doc.sel.primIndex) { continue }\n var range = doc.sel.ranges[i];\n if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) { continue }\n var collapsed = range.empty();\n if (customCursor) {\n var head = customCursor(cm, range);\n if (head) { drawSelectionCursor(cm, head, curFragment); }\n } else if (collapsed || cm.options.showCursorWhenSelecting) {\n drawSelectionCursor(cm, range.head, curFragment);\n }\n if (!collapsed)\n { drawSelectionRange(cm, range, selFragment); }\n }\n return result\n }\n\n // Draws a cursor for the given range\n function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (/\\bcm-fat-cursor\\b/.test(cm.getWrapperElement().className)) {\n var charPos = charCoords(cm, head, \"div\", null, null);\n var width = charPos.right - charPos.left;\n cursor.style.width = (width > 0 ? width : cm.defaultCharWidth()) + \"px\";\n }\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }\n\n function cmpCoords(a, b) { return a.top - b.top || a.left - b.left }\n\n // Draws the given range as a highlighted selection\n function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range.from(), sTo = range.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n }\n\n // Cursor-blinking\n function restartBlink(cm) {\n if (!cm.state.focused) { return }\n var display = cm.display;\n clearInterval(display.blinker);\n var on = true;\n display.cursorDiv.style.visibility = \"\";\n if (cm.options.cursorBlinkRate > 0)\n { display.blinker = setInterval(function () {\n if (!cm.hasFocus()) { onBlur(cm); }\n display.cursorDiv.style.visibility = (on = !on) ? \"\" : \"hidden\";\n }, cm.options.cursorBlinkRate); }\n else if (cm.options.cursorBlinkRate < 0)\n { display.cursorDiv.style.visibility = \"hidden\"; }\n }\n\n function ensureFocus(cm) {\n if (!cm.hasFocus()) {\n cm.display.input.focus();\n if (!cm.state.focused) { onFocus(cm); }\n }\n }\n\n function delayBlurEvent(cm) {\n cm.state.delayingBlurEvent = true;\n setTimeout(function () { if (cm.state.delayingBlurEvent) {\n cm.state.delayingBlurEvent = false;\n if (cm.state.focused) { onBlur(cm); }\n } }, 100);\n }\n\n function onFocus(cm, e) {\n if (cm.state.delayingBlurEvent && !cm.state.draggingText) { cm.state.delayingBlurEvent = false; }\n\n if (cm.options.readOnly == \"nocursor\") { return }\n if (!cm.state.focused) {\n signal(cm, \"focus\", cm, e);\n cm.state.focused = true;\n addClass(cm.display.wrapper, \"CodeMirror-focused\");\n // This test prevents this from firing when a context\n // menu is closed (since the input reset would kill the\n // select-all detection hack)\n if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {\n cm.display.input.reset();\n if (webkit) { setTimeout(function () { return cm.display.input.reset(true); }, 20); } // Issue #1730\n }\n cm.display.input.receivedFocus();\n }\n restartBlink(cm);\n }\n function onBlur(cm, e) {\n if (cm.state.delayingBlurEvent) { return }\n\n if (cm.state.focused) {\n signal(cm, \"blur\", cm, e);\n cm.state.focused = false;\n rmClass(cm.display.wrapper, \"CodeMirror-focused\");\n }\n clearInterval(cm.display.blinker);\n setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false; } }, 150);\n }\n\n // Read the actual heights of the rendered lines, and update their\n // stored heights to match.\n function updateHeightsInViewport(cm) {\n var display = cm.display;\n var prevBottom = display.lineDiv.offsetTop;\n var viewTop = Math.max(0, display.scroller.getBoundingClientRect().top);\n var oldHeight = display.lineDiv.getBoundingClientRect().top;\n var mustScroll = 0;\n for (var i = 0; i < display.view.length; i++) {\n var cur = display.view[i], wrapping = cm.options.lineWrapping;\n var height = (void 0), width = 0;\n if (cur.hidden) { continue }\n oldHeight += cur.line.height;\n if (ie && ie_version < 8) {\n var bot = cur.node.offsetTop + cur.node.offsetHeight;\n height = bot - prevBottom;\n prevBottom = bot;\n } else {\n var box = cur.node.getBoundingClientRect();\n height = box.bottom - box.top;\n // Check that lines don't extend past the right of the current\n // editor width\n if (!wrapping && cur.text.firstChild)\n { width = cur.text.firstChild.getBoundingClientRect().right - box.left - 1; }\n }\n var diff = cur.line.height - height;\n if (diff > .005 || diff < -.005) {\n if (oldHeight < viewTop) { mustScroll -= diff; }\n updateLineHeight(cur.line, height);\n updateWidgetHeight(cur.line);\n if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)\n { updateWidgetHeight(cur.rest[j]); } }\n }\n if (width > cm.display.sizerWidth) {\n var chWidth = Math.ceil(width / charWidth(cm.display));\n if (chWidth > cm.display.maxLineLength) {\n cm.display.maxLineLength = chWidth;\n cm.display.maxLine = cur.line;\n cm.display.maxLineChanged = true;\n }\n }\n }\n if (Math.abs(mustScroll) > 2) { display.scroller.scrollTop += mustScroll; }\n }\n\n // Read and store the height of line widgets associated with the\n // given line.\n function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }\n\n // Compute the lines that are visible in a given viewport (defaults\n // the current scroll position). viewport may contain top,\n // height, and ensure (see op.scrollToPos) properties.\n function visibleLines(display, doc, viewport) {\n var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;\n top = Math.floor(top - paddingTop(display));\n var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;\n\n var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);\n // Ensure is a {from: {line, ch}, to: {line, ch}} object, and\n // forces those lines into the viewport (if possible).\n if (viewport && viewport.ensure) {\n var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;\n if (ensureFrom < from) {\n from = ensureFrom;\n to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);\n } else if (Math.min(ensureTo, doc.lastLine()) >= to) {\n from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);\n to = ensureTo;\n }\n }\n return {from: from, to: Math.max(to, from + 1)}\n }\n\n // SCROLLING THINGS INTO VIEW\n\n // If an editor sits on the top or bottom of the window, partially\n // scrolled out of view, this ensures that the cursor is visible.\n function maybeScrollWindow(cm, rect) {\n if (signalDOMEvent(cm, \"scrollCursorIntoView\")) { return }\n\n var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;\n var doc = display.wrapper.ownerDocument;\n if (rect.top + box.top < 0) { doScroll = true; }\n else if (rect.bottom + box.top > (doc.defaultView.innerHeight || doc.documentElement.clientHeight)) { doScroll = false; }\n if (doScroll != null && !phantom) {\n var scrollNode = elt(\"div\", \"\\u200b\", null, (\"position: absolute;\\n top: \" + (rect.top - display.viewOffset - paddingTop(cm.display)) + \"px;\\n height: \" + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + \"px;\\n left: \" + (rect.left) + \"px; width: \" + (Math.max(2, rect.right - rect.left)) + \"px;\"));\n cm.display.lineSpace.appendChild(scrollNode);\n scrollNode.scrollIntoView(doScroll);\n cm.display.lineSpace.removeChild(scrollNode);\n }\n }\n\n // Scroll a given position into view (immediately), verifying that\n // it actually became visible (as line heights are accurately\n // measured, the position of something may 'drift' during drawing).\n function scrollPosIntoView(cm, pos, end, margin) {\n if (margin == null) { margin = 0; }\n var rect;\n if (!cm.options.lineWrapping && pos == end) {\n // Set pos and end to the cursor positions around the character pos sticks to\n // If pos.sticky == \"before\", that is around pos.ch - 1, otherwise around pos.ch\n // If pos == Pos(_, 0, \"before\"), pos and end are unchanged\n end = pos.sticky == \"before\" ? Pos(pos.line, pos.ch + 1, \"before\") : pos;\n pos = pos.ch ? Pos(pos.line, pos.sticky == \"before\" ? pos.ch - 1 : pos.ch, \"after\") : pos;\n }\n for (var limit = 0; limit < 5; limit++) {\n var changed = false;\n var coords = cursorCoords(cm, pos);\n var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);\n rect = {left: Math.min(coords.left, endCoords.left),\n top: Math.min(coords.top, endCoords.top) - margin,\n right: Math.max(coords.left, endCoords.left),\n bottom: Math.max(coords.bottom, endCoords.bottom) + margin};\n var scrollPos = calculateScrollPos(cm, rect);\n var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;\n if (scrollPos.scrollTop != null) {\n updateScrollTop(cm, scrollPos.scrollTop);\n if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; }\n }\n if (scrollPos.scrollLeft != null) {\n setScrollLeft(cm, scrollPos.scrollLeft);\n if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; }\n }\n if (!changed) { break }\n }\n return rect\n }\n\n // Scroll a given set of coordinates into view (immediately).\n function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }\n\n // Calculate a new scroll position needed to scroll the given\n // rectangle into view. Returns an object with scrollTop and\n // scrollLeft properties. When these are undefined, the\n // vertical/horizontal position does not need to be adjusted.\n function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth;\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace;\n var screenw = displayWidth(cm) - display.gutters.offsetWidth;\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }\n\n // Store a relative adjustment to the scroll position in the current\n // operation (to be applied when the operation finishes).\n function addToScrollTop(cm, top) {\n if (top == null) { return }\n resolveScrollToPos(cm);\n cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;\n }\n\n // Make sure that at the end of the operation the current cursor is\n // shown.\n function ensureCursorVisible(cm) {\n resolveScrollToPos(cm);\n var cur = cm.getCursor();\n cm.curOp.scrollToPos = {from: cur, to: cur, margin: cm.options.cursorScrollMargin};\n }\n\n function scrollToCoords(cm, x, y) {\n if (x != null || y != null) { resolveScrollToPos(cm); }\n if (x != null) { cm.curOp.scrollLeft = x; }\n if (y != null) { cm.curOp.scrollTop = y; }\n }\n\n function scrollToRange(cm, range) {\n resolveScrollToPos(cm);\n cm.curOp.scrollToPos = range;\n }\n\n // When an operation has its scrollToPos property set, and another\n // scroll action is applied before the end of the operation, this\n // 'simulates' scrolling that position into view in a cheap way, so\n // that the effect of intermediate scroll commands is not ignored.\n function resolveScrollToPos(cm) {\n var range = cm.curOp.scrollToPos;\n if (range) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n scrollToCoordsRange(cm, from, to, range.margin);\n }\n }\n\n function scrollToCoordsRange(cm, from, to, margin) {\n var sPos = calculateScrollPos(cm, {\n left: Math.min(from.left, to.left),\n top: Math.min(from.top, to.top) - margin,\n right: Math.max(from.right, to.right),\n bottom: Math.max(from.bottom, to.bottom) + margin\n });\n scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop);\n }\n\n // Sync the scrollable area and scrollbars, ensure the viewport\n // covers the visible area.\n function updateScrollTop(cm, val) {\n if (Math.abs(cm.doc.scrollTop - val) < 2) { return }\n if (!gecko) { updateDisplaySimple(cm, {top: val}); }\n setScrollTop(cm, val, true);\n if (gecko) { updateDisplaySimple(cm); }\n startWorker(cm, 100);\n }\n\n function setScrollTop(cm, val, forceScroll) {\n val = Math.max(0, Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val));\n if (cm.display.scroller.scrollTop == val && !forceScroll) { return }\n cm.doc.scrollTop = val;\n cm.display.scrollbars.setScrollTop(val);\n if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; }\n }\n\n // Sync scroller and scrollbar, ensure the gutter elements are\n // aligned.\n function setScrollLeft(cm, val, isScroller, forceScroll) {\n val = Math.max(0, Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth));\n if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { return }\n cm.doc.scrollLeft = val;\n alignHorizontally(cm);\n if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; }\n cm.display.scrollbars.setScrollLeft(val);\n }\n\n // SCROLLBARS\n\n // Prepare DOM reads needed to update the scrollbars. Done in one\n // shot to minimize update/measure roundtrips.\n function measureForScrollbars(cm) {\n var d = cm.display, gutterW = d.gutters.offsetWidth;\n var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n return {\n clientHeight: d.scroller.clientHeight,\n viewHeight: d.wrapper.clientHeight,\n scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n viewWidth: d.wrapper.clientWidth,\n barLeft: cm.options.fixedGutter ? gutterW : 0,\n docHeight: docH,\n scrollHeight: docH + scrollGap(cm) + d.barHeight,\n nativeBarWidth: d.nativeBarWidth,\n gutterWidth: gutterW\n }\n }\n\n var NativeScrollbars = function(place, scroll, cm) {\n this.cm = cm;\n var vert = this.vert = elt(\"div\", [elt(\"div\", null, null, \"min-width: 1px\")], \"CodeMirror-vscrollbar\");\n var horiz = this.horiz = elt(\"div\", [elt(\"div\", null, null, \"height: 100%; min-height: 1px\")], \"CodeMirror-hscrollbar\");\n vert.tabIndex = horiz.tabIndex = -1;\n place(vert); place(horiz);\n\n on(vert, \"scroll\", function () {\n if (vert.clientHeight) { scroll(vert.scrollTop, \"vertical\"); }\n });\n on(horiz, \"scroll\", function () {\n if (horiz.clientWidth) { scroll(horiz.scrollLeft, \"horizontal\"); }\n });\n\n this.checkedZeroWidth = false;\n // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).\n if (ie && ie_version < 8) { this.horiz.style.minHeight = this.vert.style.minWidth = \"18px\"; }\n };\n\n NativeScrollbars.prototype.update = function (measure) {\n var needsH = measure.scrollWidth > measure.clientWidth + 1;\n var needsV = measure.scrollHeight > measure.clientHeight + 1;\n var sWidth = measure.nativeBarWidth;\n\n if (needsV) {\n this.vert.style.display = \"block\";\n this.vert.style.bottom = needsH ? sWidth + \"px\" : \"0\";\n var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);\n // A bug in IE8 can cause this value to be negative, so guard it.\n this.vert.firstChild.style.height =\n Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + \"px\";\n } else {\n this.vert.scrollTop = 0;\n this.vert.style.display = \"\";\n this.vert.firstChild.style.height = \"0\";\n }\n\n if (needsH) {\n this.horiz.style.display = \"block\";\n this.horiz.style.right = needsV ? sWidth + \"px\" : \"0\";\n this.horiz.style.left = measure.barLeft + \"px\";\n var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);\n this.horiz.firstChild.style.width =\n Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + \"px\";\n } else {\n this.horiz.style.display = \"\";\n this.horiz.firstChild.style.width = \"0\";\n }\n\n if (!this.checkedZeroWidth && measure.clientHeight > 0) {\n if (sWidth == 0) { this.zeroWidthHack(); }\n this.checkedZeroWidth = true;\n }\n\n return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}\n };\n\n NativeScrollbars.prototype.setScrollLeft = function (pos) {\n if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos; }\n if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz, \"horiz\"); }\n };\n\n NativeScrollbars.prototype.setScrollTop = function (pos) {\n if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos; }\n if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert, \"vert\"); }\n };\n\n NativeScrollbars.prototype.zeroWidthHack = function () {\n var w = mac && !mac_geMountainLion ? \"12px\" : \"18px\";\n this.horiz.style.height = this.vert.style.width = w;\n this.horiz.style.visibility = this.vert.style.visibility = \"hidden\";\n this.disableHoriz = new Delayed;\n this.disableVert = new Delayed;\n };\n\n NativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) {\n bar.style.visibility = \"\";\n function maybeDisable() {\n // To find out whether the scrollbar is still visible, we\n // check whether the element under the pixel in the bottom\n // right corner of the scrollbar box is the scrollbar box\n // itself (when the bar is still visible) or its filler child\n // (when the bar is hidden). If it is still visible, we keep\n // it enabled, if it's hidden, we disable pointer events.\n var box = bar.getBoundingClientRect();\n var elt = type == \"vert\" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2)\n : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1);\n if (elt != bar) { bar.style.visibility = \"hidden\"; }\n else { delay.set(1000, maybeDisable); }\n }\n delay.set(1000, maybeDisable);\n };\n\n NativeScrollbars.prototype.clear = function () {\n var parent = this.horiz.parentNode;\n parent.removeChild(this.horiz);\n parent.removeChild(this.vert);\n };\n\n var NullScrollbars = function () {};\n\n NullScrollbars.prototype.update = function () { return {bottom: 0, right: 0} };\n NullScrollbars.prototype.setScrollLeft = function () {};\n NullScrollbars.prototype.setScrollTop = function () {};\n NullScrollbars.prototype.clear = function () {};\n\n function updateScrollbars(cm, measure) {\n if (!measure) { measure = measureForScrollbars(cm); }\n var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;\n updateScrollbarsInner(cm, measure);\n for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {\n if (startWidth != cm.display.barWidth && cm.options.lineWrapping)\n { updateHeightsInViewport(cm); }\n updateScrollbarsInner(cm, measureForScrollbars(cm));\n startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;\n }\n }\n\n // Re-synchronize the fake scrollbars with the actual size of the\n // content.\n function updateScrollbarsInner(cm, measure) {\n var d = cm.display;\n var sizes = d.scrollbars.update(measure);\n\n d.sizer.style.paddingRight = (d.barWidth = sizes.right) + \"px\";\n d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + \"px\";\n d.heightForcer.style.borderBottom = sizes.bottom + \"px solid transparent\";\n\n if (sizes.right && sizes.bottom) {\n d.scrollbarFiller.style.display = \"block\";\n d.scrollbarFiller.style.height = sizes.bottom + \"px\";\n d.scrollbarFiller.style.width = sizes.right + \"px\";\n } else { d.scrollbarFiller.style.display = \"\"; }\n if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {\n d.gutterFiller.style.display = \"block\";\n d.gutterFiller.style.height = sizes.bottom + \"px\";\n d.gutterFiller.style.width = measure.gutterWidth + \"px\";\n } else { d.gutterFiller.style.display = \"\"; }\n }\n\n var scrollbarModel = {\"native\": NativeScrollbars, \"null\": NullScrollbars};\n\n function initScrollbars(cm) {\n if (cm.display.scrollbars) {\n cm.display.scrollbars.clear();\n if (cm.display.scrollbars.addClass)\n { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n }\n\n cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) {\n cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);\n // Prevent clicks in the scrollbars from killing focus\n on(node, \"mousedown\", function () {\n if (cm.state.focused) { setTimeout(function () { return cm.display.input.focus(); }, 0); }\n });\n node.setAttribute(\"cm-not-content\", \"true\");\n }, function (pos, axis) {\n if (axis == \"horizontal\") { setScrollLeft(cm, pos); }\n else { updateScrollTop(cm, pos); }\n }, cm);\n if (cm.display.scrollbars.addClass)\n { addClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n }\n\n // Operations are used to wrap a series of changes to the editor\n // state in such a way that each change won't have to update the\n // cursor and display (which would be awkward, slow, and\n // error-prone). Instead, display updates are batched and then all\n // combined and executed at once.\n\n var nextOpId = 0;\n // Start a new operation.\n function startOperation(cm) {\n cm.curOp = {\n cm: cm,\n viewChanged: false, // Flag that indicates that lines might need to be redrawn\n startHeight: cm.doc.height, // Used to detect need to update scrollbar\n forceUpdate: false, // Used to force a redraw\n updateInput: 0, // Whether to reset the input textarea\n typing: false, // Whether this reset should be careful to leave existing text (for compositing)\n changeObjs: null, // Accumulated changes, for firing change events\n cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on\n cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already\n selectionChanged: false, // Whether the selection needs to be redrawn\n updateMaxLine: false, // Set when the widest line needs to be determined anew\n scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet\n scrollToPos: null, // Used to scroll to a specific position\n focus: false,\n id: ++nextOpId, // Unique ID\n markArrays: null // Used by addMarkedSpan\n };\n pushOperation(cm.curOp);\n }\n\n // Finish an operation, updating the display and signalling delayed events\n function endOperation(cm) {\n var op = cm.curOp;\n if (op) { finishOperation(op, function (group) {\n for (var i = 0; i < group.ops.length; i++)\n { group.ops[i].cm.curOp = null; }\n endOperations(group);\n }); }\n }\n\n // The DOM updates done when an operation finishes are batched so\n // that the minimum number of relayouts are required.\n function endOperations(group) {\n var ops = group.ops;\n for (var i = 0; i < ops.length; i++) // Read DOM\n { endOperation_R1(ops[i]); }\n for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe)\n { endOperation_W1(ops[i$1]); }\n for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM\n { endOperation_R2(ops[i$2]); }\n for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe)\n { endOperation_W2(ops[i$3]); }\n for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM\n { endOperation_finish(ops[i$4]); }\n }\n\n function endOperation_R1(op) {\n var cm = op.cm, display = cm.display;\n maybeClipScrollbars(cm);\n if (op.updateMaxLine) { findMaxLine(cm); }\n\n op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||\n op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||\n op.scrollToPos.to.line >= display.viewTo) ||\n display.maxLineChanged && cm.options.lineWrapping;\n op.update = op.mustUpdate &&\n new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);\n }\n\n function endOperation_W1(op) {\n op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);\n }\n\n function endOperation_R2(op) {\n var cm = op.cm, display = cm.display;\n if (op.updatedDisplay) { updateHeightsInViewport(cm); }\n\n op.barMeasure = measureForScrollbars(cm);\n\n // If the max line changed since it was last measured, measure it,\n // and ensure the document's width matches it.\n // updateDisplay_W2 will use these properties to do the actual resizing\n if (display.maxLineChanged && !cm.options.lineWrapping) {\n op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;\n cm.display.sizerWidth = op.adjustWidthTo;\n op.barMeasure.scrollWidth =\n Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);\n op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));\n }\n\n if (op.updatedDisplay || op.selectionChanged)\n { op.preparedSelection = display.input.prepareSelection(); }\n }\n\n function endOperation_W2(op) {\n var cm = op.cm;\n\n if (op.adjustWidthTo != null) {\n cm.display.sizer.style.minWidth = op.adjustWidthTo + \"px\";\n if (op.maxScrollLeft < cm.doc.scrollLeft)\n { setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); }\n cm.display.maxLineChanged = false;\n }\n\n var takeFocus = op.focus && op.focus == activeElt(root(cm));\n if (op.preparedSelection)\n { cm.display.input.showSelection(op.preparedSelection, takeFocus); }\n if (op.updatedDisplay || op.startHeight != cm.doc.height)\n { updateScrollbars(cm, op.barMeasure); }\n if (op.updatedDisplay)\n { setDocumentHeight(cm, op.barMeasure); }\n\n if (op.selectionChanged) { restartBlink(cm); }\n\n if (cm.state.focused && op.updateInput)\n { cm.display.input.reset(op.typing); }\n if (takeFocus) { ensureFocus(op.cm); }\n }\n\n function endOperation_finish(op) {\n var cm = op.cm, display = cm.display, doc = cm.doc;\n\n if (op.updatedDisplay) { postUpdateDisplay(cm, op.update); }\n\n // Abort mouse wheel delta measurement, when scrolling explicitly\n if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))\n { display.wheelStartX = display.wheelStartY = null; }\n\n // Propagate the scroll position to the actual DOM scroller\n if (op.scrollTop != null) { setScrollTop(cm, op.scrollTop, op.forceScroll); }\n\n if (op.scrollLeft != null) { setScrollLeft(cm, op.scrollLeft, true, true); }\n // If we need to scroll a specific position into view, do so.\n if (op.scrollToPos) {\n var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),\n clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);\n maybeScrollWindow(cm, rect);\n }\n\n // Fire events for markers that are hidden/unidden by editing or\n // undoing\n var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;\n if (hidden) { for (var i = 0; i < hidden.length; ++i)\n { if (!hidden[i].lines.length) { signal(hidden[i], \"hide\"); } } }\n if (unhidden) { for (var i$1 = 0; i$1 < unhidden.length; ++i$1)\n { if (unhidden[i$1].lines.length) { signal(unhidden[i$1], \"unhide\"); } } }\n\n if (display.wrapper.offsetHeight)\n { doc.scrollTop = cm.display.scroller.scrollTop; }\n\n // Fire change events, and delayed event handlers\n if (op.changeObjs)\n { signal(cm, \"changes\", cm, op.changeObjs); }\n if (op.update)\n { op.update.finish(); }\n }\n\n // Run the given function in an operation\n function runInOp(cm, f) {\n if (cm.curOp) { return f() }\n startOperation(cm);\n try { return f() }\n finally { endOperation(cm); }\n }\n // Wraps a function in an operation. Returns the wrapped function.\n function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }\n // Used to add methods to editor and doc instances, wrapping them in\n // operations.\n function methodOp(f) {\n return function() {\n if (this.curOp) { return f.apply(this, arguments) }\n startOperation(this);\n try { return f.apply(this, arguments) }\n finally { endOperation(this); }\n }\n }\n function docMethodOp(f) {\n return function() {\n var cm = this.cm;\n if (!cm || cm.curOp) { return f.apply(this, arguments) }\n startOperation(cm);\n try { return f.apply(this, arguments) }\n finally { endOperation(cm); }\n }\n }\n\n // HIGHLIGHT WORKER\n\n function startWorker(cm, time) {\n if (cm.doc.highlightFrontier < cm.display.viewTo)\n { cm.state.highlight.set(time, bind(highlightWorker, cm)); }\n }\n\n function highlightWorker(cm) {\n var doc = cm.doc;\n if (doc.highlightFrontier >= cm.display.viewTo) { return }\n var end = +new Date + cm.options.workTime;\n var context = getContextBefore(cm, doc.highlightFrontier);\n var changedLines = [];\n\n doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function (line) {\n if (context.line >= cm.display.viewFrom) { // Visible\n var oldStyles = line.styles;\n var resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null;\n var highlighted = highlightLine(cm, line, context, true);\n if (resetState) { context.state = resetState; }\n line.styles = highlighted.styles;\n var oldCls = line.styleClasses, newCls = highlighted.classes;\n if (newCls) { line.styleClasses = newCls; }\n else if (oldCls) { line.styleClasses = null; }\n var ischange = !oldStyles || oldStyles.length != line.styles.length ||\n oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);\n for (var i = 0; !ischange && i < oldStyles.length; ++i) { ischange = oldStyles[i] != line.styles[i]; }\n if (ischange) { changedLines.push(context.line); }\n line.stateAfter = context.save();\n context.nextLine();\n } else {\n if (line.text.length <= cm.options.maxHighlightLength)\n { processLine(cm, line.text, context); }\n line.stateAfter = context.line % 5 == 0 ? context.save() : null;\n context.nextLine();\n }\n if (+new Date > end) {\n startWorker(cm, cm.options.workDelay);\n return true\n }\n });\n doc.highlightFrontier = context.line;\n doc.modeFrontier = Math.max(doc.modeFrontier, context.line);\n if (changedLines.length) { runInOp(cm, function () {\n for (var i = 0; i < changedLines.length; i++)\n { regLineChange(cm, changedLines[i], \"text\"); }\n }); }\n }\n\n // DISPLAY DRAWING\n\n var DisplayUpdate = function(cm, viewport, force) {\n var display = cm.display;\n\n this.viewport = viewport;\n // Store some values that we'll need later (but don't want to force a relayout for)\n this.visible = visibleLines(display, cm.doc, viewport);\n this.editorIsHidden = !display.wrapper.offsetWidth;\n this.wrapperHeight = display.wrapper.clientHeight;\n this.wrapperWidth = display.wrapper.clientWidth;\n this.oldDisplayWidth = displayWidth(cm);\n this.force = force;\n this.dims = getDimensions(cm);\n this.events = [];\n };\n\n DisplayUpdate.prototype.signal = function (emitter, type) {\n if (hasHandler(emitter, type))\n { this.events.push(arguments); }\n };\n DisplayUpdate.prototype.finish = function () {\n for (var i = 0; i < this.events.length; i++)\n { signal.apply(null, this.events[i]); }\n };\n\n function maybeClipScrollbars(cm) {\n var display = cm.display;\n if (!display.scrollbarsClipped && display.scroller.offsetWidth) {\n display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;\n display.heightForcer.style.height = scrollGap(cm) + \"px\";\n display.sizer.style.marginBottom = -display.nativeBarWidth + \"px\";\n display.sizer.style.borderRightWidth = scrollGap(cm) + \"px\";\n display.scrollbarsClipped = true;\n }\n }\n\n function selectionSnapshot(cm) {\n if (cm.hasFocus()) { return null }\n var active = activeElt(root(cm));\n if (!active || !contains(cm.display.lineDiv, active)) { return null }\n var result = {activeElt: active};\n if (window.getSelection) {\n var sel = win(cm).getSelection();\n if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) {\n result.anchorNode = sel.anchorNode;\n result.anchorOffset = sel.anchorOffset;\n result.focusNode = sel.focusNode;\n result.focusOffset = sel.focusOffset;\n }\n }\n return result\n }\n\n function restoreSelection(snapshot) {\n if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt(rootNode(snapshot.activeElt))) { return }\n snapshot.activeElt.focus();\n if (!/^(INPUT|TEXTAREA)$/.test(snapshot.activeElt.nodeName) &&\n snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) {\n var doc = snapshot.activeElt.ownerDocument;\n var sel = doc.defaultView.getSelection(), range = doc.createRange();\n range.setEnd(snapshot.anchorNode, snapshot.anchorOffset);\n range.collapse(false);\n sel.removeAllRanges();\n sel.addRange(range);\n sel.extend(snapshot.focusNode, snapshot.focusOffset);\n }\n }\n\n // Does the actual updating of the line display. Bails out\n // (returning false) when there is nothing to be done and forced is\n // false.\n function updateDisplayIfNeeded(cm, update) {\n var display = cm.display, doc = cm.doc;\n\n if (update.editorIsHidden) {\n resetView(cm);\n return false\n }\n\n // Bail out if the visible area is already rendered and nothing changed.\n if (!update.force &&\n update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo &&\n (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&\n display.renderedView == display.view && countDirtyView(cm) == 0)\n { return false }\n\n if (maybeUpdateLineNumberWidth(cm)) {\n resetView(cm);\n update.dims = getDimensions(cm);\n }\n\n // Compute a suitable new viewport (from & to)\n var end = doc.first + doc.size;\n var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);\n var to = Math.min(end, update.visible.to + cm.options.viewportMargin);\n if (display.viewFrom < from && from - display.viewFrom < 20) { from = Math.max(doc.first, display.viewFrom); }\n if (display.viewTo > to && display.viewTo - to < 20) { to = Math.min(end, display.viewTo); }\n if (sawCollapsedSpans) {\n from = visualLineNo(cm.doc, from);\n to = visualLineEndNo(cm.doc, to);\n }\n\n var different = from != display.viewFrom || to != display.viewTo ||\n display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;\n adjustView(cm, from, to);\n\n display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));\n // Position the mover div to align with the current scroll position\n cm.display.mover.style.top = display.viewOffset + \"px\";\n\n var toUpdate = countDirtyView(cm);\n if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&\n (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))\n { return false }\n\n // For big changes, we hide the enclosing element during the\n // update, since that speeds up the operations on most browsers.\n var selSnapshot = selectionSnapshot(cm);\n if (toUpdate > 4) { display.lineDiv.style.display = \"none\"; }\n patchDisplay(cm, display.updateLineNumbers, update.dims);\n if (toUpdate > 4) { display.lineDiv.style.display = \"\"; }\n display.renderedView = display.view;\n // There might have been a widget with a focused element that got\n // hidden or updated, if so re-focus it.\n restoreSelection(selSnapshot);\n\n // Prevent selection and cursors from interfering with the scroll\n // width and height.\n removeChildren(display.cursorDiv);\n removeChildren(display.selectionDiv);\n display.gutters.style.height = display.sizer.style.minHeight = 0;\n\n if (different) {\n display.lastWrapHeight = update.wrapperHeight;\n display.lastWrapWidth = update.wrapperWidth;\n startWorker(cm, 400);\n }\n\n display.updateLineNumbers = null;\n\n return true\n }\n\n function postUpdateDisplay(cm, update) {\n var viewport = update.viewport;\n\n for (var first = true;; first = false) {\n if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {\n // Clip forced viewport to actual scrollable area.\n if (viewport && viewport.top != null)\n { viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; }\n // Updated line heights might result in the drawn area not\n // actually covering the viewport. Keep looping until it does.\n update.visible = visibleLines(cm.display, cm.doc, viewport);\n if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)\n { break }\n } else if (first) {\n update.visible = visibleLines(cm.display, cm.doc, viewport);\n }\n if (!updateDisplayIfNeeded(cm, update)) { break }\n updateHeightsInViewport(cm);\n var barMeasure = measureForScrollbars(cm);\n updateSelection(cm);\n updateScrollbars(cm, barMeasure);\n setDocumentHeight(cm, barMeasure);\n update.force = false;\n }\n\n update.signal(cm, \"update\", cm);\n if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {\n update.signal(cm, \"viewportChange\", cm, cm.display.viewFrom, cm.display.viewTo);\n cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;\n }\n }\n\n function updateDisplaySimple(cm, viewport) {\n var update = new DisplayUpdate(cm, viewport);\n if (updateDisplayIfNeeded(cm, update)) {\n updateHeightsInViewport(cm);\n postUpdateDisplay(cm, update);\n var barMeasure = measureForScrollbars(cm);\n updateSelection(cm);\n updateScrollbars(cm, barMeasure);\n setDocumentHeight(cm, barMeasure);\n update.finish();\n }\n }\n\n // Sync the actual display DOM structure with display.view, removing\n // nodes for lines that are no longer in view, and creating the ones\n // that are not there yet, and updating the ones that are out of\n // date.\n function patchDisplay(cm, updateNumbersFrom, dims) {\n var display = cm.display, lineNumbers = cm.options.lineNumbers;\n var container = display.lineDiv, cur = container.firstChild;\n\n function rm(node) {\n var next = node.nextSibling;\n // Works around a throw-scroll bug in OS X Webkit\n if (webkit && mac && cm.display.currentWheelTarget == node)\n { node.style.display = \"none\"; }\n else\n { node.parentNode.removeChild(node); }\n return next\n }\n\n var view = display.view, lineN = display.viewFrom;\n // Loop over the elements in the view, syncing cur (the DOM nodes\n // in display.lineDiv) with the view as we go.\n for (var i = 0; i < view.length; i++) {\n var lineView = view[i];\n if (lineView.hidden) ; else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet\n var node = buildLineElement(cm, lineView, lineN, dims);\n container.insertBefore(node, cur);\n } else { // Already drawn\n while (cur != lineView.node) { cur = rm(cur); }\n var updateNumber = lineNumbers && updateNumbersFrom != null &&\n updateNumbersFrom <= lineN && lineView.lineNumber;\n if (lineView.changes) {\n if (indexOf(lineView.changes, \"gutter\") > -1) { updateNumber = false; }\n updateLineForChanges(cm, lineView, lineN, dims);\n }\n if (updateNumber) {\n removeChildren(lineView.lineNumber);\n lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));\n }\n cur = lineView.node.nextSibling;\n }\n lineN += lineView.size;\n }\n while (cur) { cur = rm(cur); }\n }\n\n function updateGutterSpace(display) {\n var width = display.gutters.offsetWidth;\n display.sizer.style.marginLeft = width + \"px\";\n // Send an event to consumers responding to changes in gutter width.\n signalLater(display, \"gutterChanged\", display);\n }\n\n function setDocumentHeight(cm, measure) {\n cm.display.sizer.style.minHeight = measure.docHeight + \"px\";\n cm.display.heightForcer.style.top = measure.docHeight + \"px\";\n cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + \"px\";\n }\n\n // Re-align line numbers and gutter marks to compensate for\n // horizontal scrolling.\n function alignHorizontally(cm) {\n var display = cm.display, view = display.view;\n if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return }\n var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;\n var gutterW = display.gutters.offsetWidth, left = comp + \"px\";\n for (var i = 0; i < view.length; i++) { if (!view[i].hidden) {\n if (cm.options.fixedGutter) {\n if (view[i].gutter)\n { view[i].gutter.style.left = left; }\n if (view[i].gutterBackground)\n { view[i].gutterBackground.style.left = left; }\n }\n var align = view[i].alignable;\n if (align) { for (var j = 0; j < align.length; j++)\n { align[j].style.left = left; } }\n } }\n if (cm.options.fixedGutter)\n { display.gutters.style.left = (comp + gutterW) + \"px\"; }\n }\n\n // Used to ensure that the line number gutter is still the right\n // size for the current document size. Returns true when an update\n // is needed.\n function maybeUpdateLineNumberWidth(cm) {\n if (!cm.options.lineNumbers) { return false }\n var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;\n if (last.length != display.lineNumChars) {\n var test = display.measure.appendChild(elt(\"div\", [elt(\"div\", last)],\n \"CodeMirror-linenumber CodeMirror-gutter-elt\"));\n var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;\n display.lineGutter.style.width = \"\";\n display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;\n display.lineNumWidth = display.lineNumInnerWidth + padding;\n display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;\n display.lineGutter.style.width = display.lineNumWidth + \"px\";\n updateGutterSpace(cm.display);\n return true\n }\n return false\n }\n\n function getGutters(gutters, lineNumbers) {\n var result = [], sawLineNumbers = false;\n for (var i = 0; i < gutters.length; i++) {\n var name = gutters[i], style = null;\n if (typeof name != \"string\") { style = name.style; name = name.className; }\n if (name == \"CodeMirror-linenumbers\") {\n if (!lineNumbers) { continue }\n else { sawLineNumbers = true; }\n }\n result.push({className: name, style: style});\n }\n if (lineNumbers && !sawLineNumbers) { result.push({className: \"CodeMirror-linenumbers\", style: null}); }\n return result\n }\n\n // Rebuild the gutter elements, ensure the margin to the left of the\n // code matches their width.\n function renderGutters(display) {\n var gutters = display.gutters, specs = display.gutterSpecs;\n removeChildren(gutters);\n display.lineGutter = null;\n for (var i = 0; i < specs.length; ++i) {\n var ref = specs[i];\n var className = ref.className;\n var style = ref.style;\n var gElt = gutters.appendChild(elt(\"div\", null, \"CodeMirror-gutter \" + className));\n if (style) { gElt.style.cssText = style; }\n if (className == \"CodeMirror-linenumbers\") {\n display.lineGutter = gElt;\n gElt.style.width = (display.lineNumWidth || 1) + \"px\";\n }\n }\n gutters.style.display = specs.length ? \"\" : \"none\";\n updateGutterSpace(display);\n }\n\n function updateGutters(cm) {\n renderGutters(cm.display);\n regChange(cm);\n alignHorizontally(cm);\n }\n\n // The display handles the DOM integration, both for input reading\n // and content drawing. It holds references to DOM nodes and\n // display-related state.\n\n function Display(place, doc, input, options) {\n var d = this;\n this.input = input;\n\n // Covers bottom-right square when both scrollbars are present.\n d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n d.scrollbarFiller.setAttribute(\"cm-not-content\", \"true\");\n // Covers bottom of gutter when coverGutterNextToScrollbar is on\n // and h scrollbar is present.\n d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n d.gutterFiller.setAttribute(\"cm-not-content\", \"true\");\n // Will contain the actual code, positioned to cover the viewport.\n d.lineDiv = eltP(\"div\", null, \"CodeMirror-code\");\n // Elements are added to these to represent selection and cursors.\n d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n // A visibility: hidden element used to find the size of things.\n d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n // When lines outside of the viewport are measured, they are drawn in this.\n d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n // Wraps everything that needs to exist inside the vertically-padded coordinate system\n d.lineSpace = eltP(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n null, \"position: relative; outline: none\");\n var lines = eltP(\"div\", [d.lineSpace], \"CodeMirror-lines\");\n // Moved around its parent to cover visible view.\n d.mover = elt(\"div\", [lines], null, \"position: relative\");\n // Set to the height of the document, allowing scrolling.\n d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n d.sizerWidth = null;\n // Behavior of elts with overflow: auto and padding is\n // inconsistent across browsers. This is used to ensure the\n // scrollable area is big enough.\n d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerGap + \"px; width: 1px;\");\n // Will contain the gutters, if any.\n d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n d.lineGutter = null;\n // Actual scrollable element.\n d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n d.scroller.setAttribute(\"tabIndex\", \"-1\");\n // The element in which the editor lives.\n d.wrapper = elt(\"div\", [d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n // See #6982. FIXME remove when this has been fixed for a while in Chrome\n if (chrome && chrome_version >= 105) { d.wrapper.style.clipPath = \"inset(0px)\"; }\n\n // This attribute is respected by automatic translation systems such as Google Translate,\n // and may also be respected by tools used by human translators.\n d.wrapper.setAttribute('translate', 'no');\n\n // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; }\n\n if (place) {\n if (place.appendChild) { place.appendChild(d.wrapper); }\n else { place(d.wrapper); }\n }\n\n // Current rendered range (may be bigger than the view window).\n d.viewFrom = d.viewTo = doc.first;\n d.reportedViewFrom = d.reportedViewTo = doc.first;\n // Information about the rendered lines.\n d.view = [];\n d.renderedView = null;\n // Holds info about a single rendered line when it was rendered\n // for measurement, while not in view.\n d.externalMeasured = null;\n // Empty space (in pixels) above the view\n d.viewOffset = 0;\n d.lastWrapHeight = d.lastWrapWidth = 0;\n d.updateLineNumbers = null;\n\n d.nativeBarWidth = d.barHeight = d.barWidth = 0;\n d.scrollbarsClipped = false;\n\n // Used to only resize the line number gutter when necessary (when\n // the amount of lines crosses a boundary that makes its width change)\n d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n // Set to true when a non-horizontal-scrolling line widget is\n // added. As an optimization, line widget aligning is skipped when\n // this is false.\n d.alignWidgets = false;\n\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n // Tracks the maximum line length so that the horizontal scrollbar\n // can be kept static when scrolling.\n d.maxLine = null;\n d.maxLineLength = 0;\n d.maxLineChanged = false;\n\n // Used for measuring wheel scrolling granularity\n d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n // True when shift is held down.\n d.shift = false;\n\n // Used to track whether anything happened since the context menu\n // was opened.\n d.selForContextMenu = null;\n\n d.activeTouch = null;\n\n d.gutterSpecs = getGutters(options.gutters, options.lineNumbers);\n renderGutters(d);\n\n input.init(d);\n }\n\n // Since the delta values reported on mouse wheel events are\n // unstandardized between browsers and even browser versions, and\n // generally horribly unpredictable, this code starts by measuring\n // the scroll effect that the first few mouse wheel events have,\n // and, from that, detects the way it can convert deltas to pixel\n // offsets afterwards.\n //\n // The reason we want to know the amount a wheel event will scroll\n // is that it gives us a chance to update the display before the\n // actual scrolling happens, reducing flickering.\n\n var wheelSamples = 0, wheelPixelsPerUnit = null;\n // Fill in a browser-detected starting value on browsers where we\n // know one. These don't have to be accurate -- the result of them\n // being wrong would just be a slight flicker on the first wheel\n // scroll (if it is large enough).\n if (ie) { wheelPixelsPerUnit = -.53; }\n else if (gecko) { wheelPixelsPerUnit = 15; }\n else if (chrome) { wheelPixelsPerUnit = -.7; }\n else if (safari) { wheelPixelsPerUnit = -1/3; }\n\n function wheelEventDelta(e) {\n var dx = e.wheelDeltaX, dy = e.wheelDeltaY;\n if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail; }\n if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail; }\n else if (dy == null) { dy = e.wheelDelta; }\n return {x: dx, y: dy}\n }\n function wheelEventPixels(e) {\n var delta = wheelEventDelta(e);\n delta.x *= wheelPixelsPerUnit;\n delta.y *= wheelPixelsPerUnit;\n return delta\n }\n\n function onScrollWheel(cm, e) {\n // On Chrome 102, viewport updates somehow stop wheel-based\n // scrolling. Turning off pointer events during the scroll seems\n // to avoid the issue.\n if (chrome && chrome_version == 102) {\n if (cm.display.chromeScrollHack == null) { cm.display.sizer.style.pointerEvents = \"none\"; }\n else { clearTimeout(cm.display.chromeScrollHack); }\n cm.display.chromeScrollHack = setTimeout(function () {\n cm.display.chromeScrollHack = null;\n cm.display.sizer.style.pointerEvents = \"\";\n }, 100);\n }\n var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;\n var pixelsPerUnit = wheelPixelsPerUnit;\n if (e.deltaMode === 0) {\n dx = e.deltaX;\n dy = e.deltaY;\n pixelsPerUnit = 1;\n }\n\n var display = cm.display, scroll = display.scroller;\n // Quit if there's nothing to scroll here\n var canScrollX = scroll.scrollWidth > scroll.clientWidth;\n var canScrollY = scroll.scrollHeight > scroll.clientHeight;\n if (!(dx && canScrollX || dy && canScrollY)) { return }\n\n // Webkit browsers on OS X abort momentum scrolls when the target\n // of the scroll event is removed from the scrollable element.\n // This hack (see related code in patchDisplay) makes sure the\n // element is kept around.\n if (dy && mac && webkit) {\n outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {\n for (var i = 0; i < view.length; i++) {\n if (view[i].node == cur) {\n cm.display.currentWheelTarget = cur;\n break outer\n }\n }\n }\n }\n\n // On some browsers, horizontal scrolling will cause redraws to\n // happen before the gutter has been realigned, causing it to\n // wriggle around in a most unseemly way. When we have an\n // estimated pixels/delta value, we just handle horizontal\n // scrolling entirely here. It'll be slightly off from native, but\n // better than glitching out.\n if (dx && !gecko && !presto && pixelsPerUnit != null) {\n if (dy && canScrollY)\n { updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * pixelsPerUnit)); }\n setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * pixelsPerUnit));\n // Only prevent default scrolling if vertical scrolling is\n // actually possible. Otherwise, it causes vertical scroll\n // jitter on OSX trackpads when deltaX is small and deltaY\n // is large (issue #3579)\n if (!dy || (dy && canScrollY))\n { e_preventDefault(e); }\n display.wheelStartX = null; // Abort measurement, if in progress\n return\n }\n\n // 'Project' the visible viewport to cover the area that is being\n // scrolled into view (if we know enough to estimate it).\n if (dy && pixelsPerUnit != null) {\n var pixels = dy * pixelsPerUnit;\n var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;\n if (pixels < 0) { top = Math.max(0, top + pixels - 50); }\n else { bot = Math.min(cm.doc.height, bot + pixels + 50); }\n updateDisplaySimple(cm, {top: top, bottom: bot});\n }\n\n if (wheelSamples < 20 && e.deltaMode !== 0) {\n if (display.wheelStartX == null) {\n display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;\n display.wheelDX = dx; display.wheelDY = dy;\n setTimeout(function () {\n if (display.wheelStartX == null) { return }\n var movedX = scroll.scrollLeft - display.wheelStartX;\n var movedY = scroll.scrollTop - display.wheelStartY;\n var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||\n (movedX && display.wheelDX && movedX / display.wheelDX);\n display.wheelStartX = display.wheelStartY = null;\n if (!sample) { return }\n wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);\n ++wheelSamples;\n }, 200);\n } else {\n display.wheelDX += dx; display.wheelDY += dy;\n }\n }\n }\n\n // Selection objects are immutable. A new one is created every time\n // the selection changes. A selection is one or more non-overlapping\n // (and non-touching) ranges, sorted, and an integer that indicates\n // which one is the primary selection (the one that's scrolled into\n // view, that getCursor returns, etc).\n var Selection = function(ranges, primIndex) {\n this.ranges = ranges;\n this.primIndex = primIndex;\n };\n\n Selection.prototype.primary = function () { return this.ranges[this.primIndex] };\n\n Selection.prototype.equals = function (other) {\n if (other == this) { return true }\n if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) { return false }\n for (var i = 0; i < this.ranges.length; i++) {\n var here = this.ranges[i], there = other.ranges[i];\n if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) { return false }\n }\n return true\n };\n\n Selection.prototype.deepCopy = function () {\n var out = [];\n for (var i = 0; i < this.ranges.length; i++)\n { out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head)); }\n return new Selection(out, this.primIndex)\n };\n\n Selection.prototype.somethingSelected = function () {\n for (var i = 0; i < this.ranges.length; i++)\n { if (!this.ranges[i].empty()) { return true } }\n return false\n };\n\n Selection.prototype.contains = function (pos, end) {\n if (!end) { end = pos; }\n for (var i = 0; i < this.ranges.length; i++) {\n var range = this.ranges[i];\n if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)\n { return i }\n }\n return -1\n };\n\n var Range = function(anchor, head) {\n this.anchor = anchor; this.head = head;\n };\n\n Range.prototype.from = function () { return minPos(this.anchor, this.head) };\n Range.prototype.to = function () { return maxPos(this.anchor, this.head) };\n Range.prototype.empty = function () { return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch };\n\n // Take an unsorted, potentially overlapping set of ranges, and\n // build a selection out of it. 'Consumes' ranges array (modifying\n // it).\n function normalizeSelection(cm, ranges, primIndex) {\n var mayTouch = cm && cm.options.selectionsMayTouch;\n var prim = ranges[primIndex];\n ranges.sort(function (a, b) { return cmp(a.from(), b.from()); });\n primIndex = indexOf(ranges, prim);\n for (var i = 1; i < ranges.length; i++) {\n var cur = ranges[i], prev = ranges[i - 1];\n var diff = cmp(prev.to(), cur.from());\n if (mayTouch && !cur.empty() ? diff > 0 : diff >= 0) {\n var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());\n var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;\n if (i <= primIndex) { --primIndex; }\n ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));\n }\n }\n return new Selection(ranges, primIndex)\n }\n\n function simpleSelection(anchor, head) {\n return new Selection([new Range(anchor, head || anchor)], 0)\n }\n\n // Compute the position of the end of a change (its 'to' property\n // refers to the pre-change end).\n function changeEnd(change) {\n if (!change.text) { return change.to }\n return Pos(change.from.line + change.text.length - 1,\n lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0))\n }\n\n // Adjust a position to refer to the post-change position of the\n // same text, or the end of the change if the change covers it.\n function adjustForChange(pos, change) {\n if (cmp(pos, change.from) < 0) { return pos }\n if (cmp(pos, change.to) <= 0) { return changeEnd(change) }\n\n var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;\n if (pos.line == change.to.line) { ch += changeEnd(change).ch - change.to.ch; }\n return Pos(line, ch)\n }\n\n function computeSelAfterChange(doc, change) {\n var out = [];\n for (var i = 0; i < doc.sel.ranges.length; i++) {\n var range = doc.sel.ranges[i];\n out.push(new Range(adjustForChange(range.anchor, change),\n adjustForChange(range.head, change)));\n }\n return normalizeSelection(doc.cm, out, doc.sel.primIndex)\n }\n\n function offsetPos(pos, old, nw) {\n if (pos.line == old.line)\n { return Pos(nw.line, pos.ch - old.ch + nw.ch) }\n else\n { return Pos(nw.line + (pos.line - old.line), pos.ch) }\n }\n\n // Used by replaceSelections to allow moving the selection to the\n // start or around the replaced test. Hint may be \"start\" or \"around\".\n function computeReplacedSel(doc, changes, hint) {\n var out = [];\n var oldPrev = Pos(doc.first, 0), newPrev = oldPrev;\n for (var i = 0; i < changes.length; i++) {\n var change = changes[i];\n var from = offsetPos(change.from, oldPrev, newPrev);\n var to = offsetPos(changeEnd(change), oldPrev, newPrev);\n oldPrev = change.to;\n newPrev = to;\n if (hint == \"around\") {\n var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0;\n out[i] = new Range(inv ? to : from, inv ? from : to);\n } else {\n out[i] = new Range(from, from);\n }\n }\n return new Selection(out, doc.sel.primIndex)\n }\n\n // Used to get the editor into a consistent state again when options change.\n\n function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }\n\n function resetModeState(cm) {\n cm.doc.iter(function (line) {\n if (line.stateAfter) { line.stateAfter = null; }\n if (line.styles) { line.styles = null; }\n });\n cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first;\n startWorker(cm, 100);\n cm.state.modeGen++;\n if (cm.curOp) { regChange(cm); }\n }\n\n // DOCUMENT DATA STRUCTURE\n\n // By default, updates that start and end at the beginning of a line\n // are treated specially, in order to make the association of line\n // widgets and marker elements with the text behave more intuitive.\n function isWholeLineUpdate(doc, change) {\n return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == \"\" &&\n (!doc.cm || doc.cm.options.wholeLineUpdateBefore)\n }\n\n // Perform a change on the document data structure.\n function updateDoc(doc, change, markedSpans, estimateHeight) {\n function spansFor(n) {return markedSpans ? markedSpans[n] : null}\n function update(line, text, spans) {\n updateLine(line, text, spans, estimateHeight);\n signalLater(line, \"change\", line, change);\n }\n function linesFor(start, end) {\n var result = [];\n for (var i = start; i < end; ++i)\n { result.push(new Line(text[i], spansFor(i), estimateHeight)); }\n return result\n }\n\n var from = change.from, to = change.to, text = change.text;\n var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);\n var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;\n\n // Adjust the line structure\n if (change.full) {\n doc.insert(0, linesFor(0, text.length));\n doc.remove(text.length, doc.size - text.length);\n } else if (isWholeLineUpdate(doc, change)) {\n // This is a whole-line replace. Treated specially to make\n // sure line objects move the way they are supposed to.\n var added = linesFor(0, text.length - 1);\n update(lastLine, lastLine.text, lastSpans);\n if (nlines) { doc.remove(from.line, nlines); }\n if (added.length) { doc.insert(from.line, added); }\n } else if (firstLine == lastLine) {\n if (text.length == 1) {\n update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);\n } else {\n var added$1 = linesFor(1, text.length - 1);\n added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n doc.insert(from.line + 1, added$1);\n }\n } else if (text.length == 1) {\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));\n doc.remove(from.line + 1, nlines);\n } else {\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);\n var added$2 = linesFor(1, text.length - 1);\n if (nlines > 1) { doc.remove(from.line + 1, nlines - 1); }\n doc.insert(from.line + 1, added$2);\n }\n\n signalLater(doc, \"change\", doc, change);\n }\n\n // Call f for all linked documents.\n function linkedDocs(doc, f, sharedHistOnly) {\n function propagate(doc, skip, sharedHist) {\n if (doc.linked) { for (var i = 0; i < doc.linked.length; ++i) {\n var rel = doc.linked[i];\n if (rel.doc == skip) { continue }\n var shared = sharedHist && rel.sharedHist;\n if (sharedHistOnly && !shared) { continue }\n f(rel.doc, shared);\n propagate(rel.doc, doc, shared);\n } }\n }\n propagate(doc, null, true);\n }\n\n // Attach a document to an editor.\n function attachDoc(cm, doc) {\n if (doc.cm) { throw new Error(\"This document is already in use.\") }\n cm.doc = doc;\n doc.cm = cm;\n estimateLineHeights(cm);\n loadMode(cm);\n setDirectionClass(cm);\n cm.options.direction = doc.direction;\n if (!cm.options.lineWrapping) { findMaxLine(cm); }\n cm.options.mode = doc.modeOption;\n regChange(cm);\n }\n\n function setDirectionClass(cm) {\n (cm.doc.direction == \"rtl\" ? addClass : rmClass)(cm.display.lineDiv, \"CodeMirror-rtl\");\n }\n\n function directionChanged(cm) {\n runInOp(cm, function () {\n setDirectionClass(cm);\n regChange(cm);\n });\n }\n\n function History(prev) {\n // Arrays of change events and selections. Doing something adds an\n // event to done and clears undo. Undoing moves events from done\n // to undone, redoing moves them in the other direction.\n this.done = []; this.undone = [];\n this.undoDepth = prev ? prev.undoDepth : Infinity;\n // Used to track when changes can be merged into a single undo\n // event\n this.lastModTime = this.lastSelTime = 0;\n this.lastOp = this.lastSelOp = null;\n this.lastOrigin = this.lastSelOrigin = null;\n // Used by the isClean() method\n this.generation = this.maxGeneration = prev ? prev.maxGeneration : 1;\n }\n\n // Create a history change event from an updateDoc-style change\n // object.\n function historyChangeFromChange(doc, change) {\n var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};\n attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);\n linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true);\n return histChange\n }\n\n // Pop all selection events off the end of a history array. Stop at\n // a change event.\n function clearSelectionEvents(array) {\n while (array.length) {\n var last = lst(array);\n if (last.ranges) { array.pop(); }\n else { break }\n }\n }\n\n // Find the top change event in the history. Pop off selection\n // events that are in the way.\n function lastChangeEvent(hist, force) {\n if (force) {\n clearSelectionEvents(hist.done);\n return lst(hist.done)\n } else if (hist.done.length && !lst(hist.done).ranges) {\n return lst(hist.done)\n } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {\n hist.done.pop();\n return lst(hist.done)\n }\n }\n\n // Register a change in the history. Merges changes that are within\n // a single operation, or are close together with an origin that\n // allows merging (starting with \"+\") into a single event.\n function addChangeToHistory(doc, change, selAfter, opId) {\n var hist = doc.history;\n hist.undone.length = 0;\n var time = +new Date, cur;\n var last;\n\n if ((hist.lastOp == opId ||\n hist.lastOrigin == change.origin && change.origin &&\n ((change.origin.charAt(0) == \"+\" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) ||\n change.origin.charAt(0) == \"*\")) &&\n (cur = lastChangeEvent(hist, hist.lastOp == opId))) {\n // Merge this change into the last event\n last = lst(cur.changes);\n if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {\n // Optimized case for simple insertion -- don't want to add\n // new changesets for every character typed\n last.to = changeEnd(change);\n } else {\n // Add new sub-event\n cur.changes.push(historyChangeFromChange(doc, change));\n }\n } else {\n // Can not be merged, start a new event.\n var before = lst(hist.done);\n if (!before || !before.ranges)\n { pushSelectionToHistory(doc.sel, hist.done); }\n cur = {changes: [historyChangeFromChange(doc, change)],\n generation: hist.generation};\n hist.done.push(cur);\n while (hist.done.length > hist.undoDepth) {\n hist.done.shift();\n if (!hist.done[0].ranges) { hist.done.shift(); }\n }\n }\n hist.done.push(selAfter);\n hist.generation = ++hist.maxGeneration;\n hist.lastModTime = hist.lastSelTime = time;\n hist.lastOp = hist.lastSelOp = opId;\n hist.lastOrigin = hist.lastSelOrigin = change.origin;\n\n if (!last) { signal(doc, \"historyAdded\"); }\n }\n\n function selectionEventCanBeMerged(doc, origin, prev, sel) {\n var ch = origin.charAt(0);\n return ch == \"*\" ||\n ch == \"+\" &&\n prev.ranges.length == sel.ranges.length &&\n prev.somethingSelected() == sel.somethingSelected() &&\n new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500)\n }\n\n // Called whenever the selection changes, sets the new selection as\n // the pending selection in the history, and pushes the old pending\n // selection into the 'done' array when it was significantly\n // different (in number of selected ranges, emptiness, or time).\n function addSelectionToHistory(doc, sel, opId, options) {\n var hist = doc.history, origin = options && options.origin;\n\n // A new event is started when the previous origin does not match\n // the current, or the origins don't allow matching. Origins\n // starting with * are always merged, those starting with + are\n // merged when similar and close together in time.\n if (opId == hist.lastSelOp ||\n (origin && hist.lastSelOrigin == origin &&\n (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||\n selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))\n { hist.done[hist.done.length - 1] = sel; }\n else\n { pushSelectionToHistory(sel, hist.done); }\n\n hist.lastSelTime = +new Date;\n hist.lastSelOrigin = origin;\n hist.lastSelOp = opId;\n if (options && options.clearRedo !== false)\n { clearSelectionEvents(hist.undone); }\n }\n\n function pushSelectionToHistory(sel, dest) {\n var top = lst(dest);\n if (!(top && top.ranges && top.equals(sel)))\n { dest.push(sel); }\n }\n\n // Used to store marked span information in the history.\n function attachLocalSpans(doc, change, from, to) {\n var existing = change[\"spans_\" + doc.id], n = 0;\n doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) {\n if (line.markedSpans)\n { (existing || (existing = change[\"spans_\" + doc.id] = {}))[n] = line.markedSpans; }\n ++n;\n });\n }\n\n // When un/re-doing restores text containing marked spans, those\n // that have been explicitly cleared should not be restored.\n function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }\n\n // Retrieve and filter the old marked spans stored in a change event.\n function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }\n\n // Used for un/re-doing changes from the history. Combines the\n // result of computing the existing spans with the set of spans that\n // existed in the history (so that deleting around a span and then\n // undoing brings back the span).\n function mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n if (!old) { return stretched }\n if (!stretched) { return old }\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i], stretchCur = stretched[i];\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n for (var k = 0; k < oldCur.length; ++k)\n { if (oldCur[k].marker == span.marker) { continue spans } }\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n return old\n }\n\n // Used both to provide a JSON-safe object in .getHistory, and, when\n // detaching a document, to split the history in two\n function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }\n\n // The 'scroll' parameter given to many of these indicated whether\n // the new cursor position should be scrolled into view after\n // modifying the selection.\n\n // If shift is held or the extend flag is set, extends a range to\n // include a given position (and optionally a second position).\n // Otherwise, simply returns the range between the given positions.\n // Used for cursor motion and such.\n function extendRange(range, head, other, extend) {\n if (extend) {\n var anchor = range.anchor;\n if (other) {\n var posBefore = cmp(head, anchor) < 0;\n if (posBefore != (cmp(other, anchor) < 0)) {\n anchor = head;\n head = other;\n } else if (posBefore != (cmp(head, other) < 0)) {\n head = other;\n }\n }\n return new Range(anchor, head)\n } else {\n return new Range(other || head, head)\n }\n }\n\n // Extend the primary selection range, discard the rest.\n function extendSelection(doc, head, other, options, extend) {\n if (extend == null) { extend = doc.cm && (doc.cm.display.shift || doc.extend); }\n setSelection(doc, new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), options);\n }\n\n // Extend all selections (pos is an array of selections with length\n // equal the number of selections)\n function extendSelections(doc, heads, options) {\n var out = [];\n var extend = doc.cm && (doc.cm.display.shift || doc.extend);\n for (var i = 0; i < doc.sel.ranges.length; i++)\n { out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend); }\n var newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex);\n setSelection(doc, newSel, options);\n }\n\n // Updates a single range in the selection.\n function replaceOneSelection(doc, i, range, options) {\n var ranges = doc.sel.ranges.slice(0);\n ranges[i] = range;\n setSelection(doc, normalizeSelection(doc.cm, ranges, doc.sel.primIndex), options);\n }\n\n // Reset the selection to a single range.\n function setSimpleSelection(doc, anchor, head, options) {\n setSelection(doc, simpleSelection(anchor, head), options);\n }\n\n // Give beforeSelectionChange handlers a change to influence a\n // selection update.\n function filterSelectionChange(doc, sel, options) {\n var obj = {\n ranges: sel.ranges,\n update: function(ranges) {\n this.ranges = [];\n for (var i = 0; i < ranges.length; i++)\n { this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n clipPos(doc, ranges[i].head)); }\n },\n origin: options && options.origin\n };\n signal(doc, \"beforeSelectionChange\", doc, obj);\n if (doc.cm) { signal(doc.cm, \"beforeSelectionChange\", doc.cm, obj); }\n if (obj.ranges != sel.ranges) { return normalizeSelection(doc.cm, obj.ranges, obj.ranges.length - 1) }\n else { return sel }\n }\n\n function setSelectionReplaceHistory(doc, sel, options) {\n var done = doc.history.done, last = lst(done);\n if (last && last.ranges) {\n done[done.length - 1] = sel;\n setSelectionNoUndo(doc, sel, options);\n } else {\n setSelection(doc, sel, options);\n }\n }\n\n // Set a new selection.\n function setSelection(doc, sel, options) {\n setSelectionNoUndo(doc, sel, options);\n addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);\n }\n\n function setSelectionNoUndo(doc, sel, options) {\n if (hasHandler(doc, \"beforeSelectionChange\") || doc.cm && hasHandler(doc.cm, \"beforeSelectionChange\"))\n { sel = filterSelectionChange(doc, sel, options); }\n\n var bias = options && options.bias ||\n (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);\n setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));\n\n if (!(options && options.scroll === false) && doc.cm && doc.cm.getOption(\"readOnly\") != \"nocursor\")\n { ensureCursorVisible(doc.cm); }\n }\n\n function setSelectionInner(doc, sel) {\n if (sel.equals(doc.sel)) { return }\n\n doc.sel = sel;\n\n if (doc.cm) {\n doc.cm.curOp.updateInput = 1;\n doc.cm.curOp.selectionChanged = true;\n signalCursorActivity(doc.cm);\n }\n signalLater(doc, \"cursorActivity\", doc);\n }\n\n // Verify that the selection does not partially select any atomic\n // marked ranges.\n function reCheckSelection(doc) {\n setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false));\n }\n\n // Return a selection that does not partially select any atomic\n // ranges.\n function skipAtomicInSelection(doc, sel, bias, mayClear) {\n var out;\n for (var i = 0; i < sel.ranges.length; i++) {\n var range = sel.ranges[i];\n var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];\n var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);\n var newHead = range.head == range.anchor ? newAnchor : skipAtomic(doc, range.head, old && old.head, bias, mayClear);\n if (out || newAnchor != range.anchor || newHead != range.head) {\n if (!out) { out = sel.ranges.slice(0, i); }\n out[i] = new Range(newAnchor, newHead);\n }\n }\n return out ? normalizeSelection(doc.cm, out, sel.primIndex) : sel\n }\n\n function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {\n var line = getLine(doc, pos.line);\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var sp = line.markedSpans[i], m = sp.marker;\n\n // Determine if we should prevent the cursor being placed to the left/right of an atomic marker\n // Historically this was determined using the inclusiveLeft/Right option, but the new way to control it\n // is with selectLeft/Right\n var preventCursorLeft = (\"selectLeft\" in m) ? !m.selectLeft : m.inclusiveLeft;\n var preventCursorRight = (\"selectRight\" in m) ? !m.selectRight : m.inclusiveRight;\n\n if ((sp.from == null || (preventCursorLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&\n (sp.to == null || (preventCursorRight ? sp.to >= pos.ch : sp.to > pos.ch))) {\n if (mayClear) {\n signal(m, \"beforeCursorEnter\");\n if (m.explicitlyCleared) {\n if (!line.markedSpans) { break }\n else {--i; continue}\n }\n }\n if (!m.atomic) { continue }\n\n if (oldPos) {\n var near = m.find(dir < 0 ? 1 : -1), diff = (void 0);\n if (dir < 0 ? preventCursorRight : preventCursorLeft)\n { near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null); }\n if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))\n { return skipAtomicInner(doc, near, pos, dir, mayClear) }\n }\n\n var far = m.find(dir < 0 ? -1 : 1);\n if (dir < 0 ? preventCursorLeft : preventCursorRight)\n { far = movePos(doc, far, dir, far.line == pos.line ? line : null); }\n return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null\n }\n } }\n return pos\n }\n\n // Ensure a given position is not inside an atomic range.\n function skipAtomic(doc, pos, oldPos, bias, mayClear) {\n var dir = bias || 1;\n var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) ||\n (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) ||\n skipAtomicInner(doc, pos, oldPos, -dir, mayClear) ||\n (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true));\n if (!found) {\n doc.cantEdit = true;\n return Pos(doc.first, 0)\n }\n return found\n }\n\n function movePos(doc, pos, dir, line) {\n if (dir < 0 && pos.ch == 0) {\n if (pos.line > doc.first) { return clipPos(doc, Pos(pos.line - 1)) }\n else { return null }\n } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) {\n if (pos.line < doc.first + doc.size - 1) { return Pos(pos.line + 1, 0) }\n else { return null }\n } else {\n return new Pos(pos.line, pos.ch + dir)\n }\n }\n\n function selectAll(cm) {\n cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);\n }\n\n // UPDATING\n\n // Allow \"beforeChange\" event handlers to influence a change\n function filterChange(doc, change, update) {\n var obj = {\n canceled: false,\n from: change.from,\n to: change.to,\n text: change.text,\n origin: change.origin,\n cancel: function () { return obj.canceled = true; }\n };\n if (update) { obj.update = function (from, to, text, origin) {\n if (from) { obj.from = clipPos(doc, from); }\n if (to) { obj.to = clipPos(doc, to); }\n if (text) { obj.text = text; }\n if (origin !== undefined) { obj.origin = origin; }\n }; }\n signal(doc, \"beforeChange\", doc, obj);\n if (doc.cm) { signal(doc.cm, \"beforeChange\", doc.cm, obj); }\n\n if (obj.canceled) {\n if (doc.cm) { doc.cm.curOp.updateInput = 2; }\n return null\n }\n return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}\n }\n\n // Apply a change to a document, and add it to the document's\n // history, and propagating it to all linked documents.\n function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }\n\n function makeChangeInner(doc, change) {\n if (change.text.length == 1 && change.text[0] == \"\" && cmp(change.from, change.to) == 0) { return }\n var selAfter = computeSelAfterChange(doc, change);\n addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);\n\n makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));\n var rebased = [];\n\n linkedDocs(doc, function (doc, sharedHist) {\n if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n rebaseHist(doc.history, change);\n rebased.push(doc.history);\n }\n makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));\n });\n }\n\n // Revert a change stored in a document's history.\n function makeChangeFromHistory(doc, type, allowSelectionOnly) {\n var suppress = doc.cm && doc.cm.state.suppressEdits;\n if (suppress && !allowSelectionOnly) { return }\n\n var hist = doc.history, event, selAfter = doc.sel;\n var source = type == \"undo\" ? hist.done : hist.undone, dest = type == \"undo\" ? hist.undone : hist.done;\n\n // Verify that there is a useable event (so that ctrl-z won't\n // needlessly clear selection events)\n var i = 0;\n for (; i < source.length; i++) {\n event = source[i];\n if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)\n { break }\n }\n if (i == source.length) { return }\n hist.lastOrigin = hist.lastSelOrigin = null;\n\n for (;;) {\n event = source.pop();\n if (event.ranges) {\n pushSelectionToHistory(event, dest);\n if (allowSelectionOnly && !event.equals(doc.sel)) {\n setSelection(doc, event, {clearRedo: false});\n return\n }\n selAfter = event;\n } else if (suppress) {\n source.push(event);\n return\n } else { break }\n }\n\n // Build up a reverse change object to add to the opposite history\n // stack (redo when undoing, and vice versa).\n var antiChanges = [];\n pushSelectionToHistory(selAfter, dest);\n dest.push({changes: antiChanges, generation: hist.generation});\n hist.generation = event.generation || ++hist.maxGeneration;\n\n var filter = hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\");\n\n var loop = function ( i ) {\n var change = event.changes[i];\n change.origin = type;\n if (filter && !filterChange(doc, change, false)) {\n source.length = 0;\n return {}\n }\n\n antiChanges.push(historyChangeFromChange(doc, change));\n\n var after = i ? computeSelAfterChange(doc, change) : lst(source);\n makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));\n if (!i && doc.cm) { doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); }\n var rebased = [];\n\n // Propagate to the linked documents\n linkedDocs(doc, function (doc, sharedHist) {\n if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n rebaseHist(doc.history, change);\n rebased.push(doc.history);\n }\n makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));\n });\n };\n\n for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) {\n var returned = loop( i$1 );\n\n if ( returned ) return returned.v;\n }\n }\n\n // Sub-views need their line numbers shifted when text is added\n // above or below them in the parent document.\n function shiftDoc(doc, distance) {\n if (distance == 0) { return }\n doc.first += distance;\n doc.sel = new Selection(map(doc.sel.ranges, function (range) { return new Range(\n Pos(range.anchor.line + distance, range.anchor.ch),\n Pos(range.head.line + distance, range.head.ch)\n ); }), doc.sel.primIndex);\n if (doc.cm) {\n regChange(doc.cm, doc.first, doc.first - distance, distance);\n for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)\n { regLineChange(doc.cm, l, \"gutter\"); }\n }\n }\n\n // More lower-level change function, handling only a single document\n // (not linked ones).\n function makeChangeSingleDoc(doc, change, selAfter, spans) {\n if (doc.cm && !doc.cm.curOp)\n { return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) }\n\n if (change.to.line < doc.first) {\n shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));\n return\n }\n if (change.from.line > doc.lastLine()) { return }\n\n // Clip the change to the size of this doc\n if (change.from.line < doc.first) {\n var shift = change.text.length - 1 - (doc.first - change.from.line);\n shiftDoc(doc, shift);\n change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),\n text: [lst(change.text)], origin: change.origin};\n }\n var last = doc.lastLine();\n if (change.to.line > last) {\n change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),\n text: [change.text[0]], origin: change.origin};\n }\n\n change.removed = getBetween(doc, change.from, change.to);\n\n if (!selAfter) { selAfter = computeSelAfterChange(doc, change); }\n if (doc.cm) { makeChangeSingleDocInEditor(doc.cm, change, spans); }\n else { updateDoc(doc, change, spans); }\n setSelectionNoUndo(doc, selAfter, sel_dontScroll);\n\n if (doc.cantEdit && skipAtomic(doc, Pos(doc.firstLine(), 0)))\n { doc.cantEdit = false; }\n }\n\n // Handle the interaction of a change to a document with the editor\n // that this document is part of.\n function makeChangeSingleDocInEditor(cm, change, spans) {\n var doc = cm.doc, display = cm.display, from = change.from, to = change.to;\n\n var recomputeMaxLength = false, checkWidthStart = from.line;\n if (!cm.options.lineWrapping) {\n checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));\n doc.iter(checkWidthStart, to.line + 1, function (line) {\n if (line == display.maxLine) {\n recomputeMaxLength = true;\n return true\n }\n });\n }\n\n if (doc.sel.contains(change.from, change.to) > -1)\n { signalCursorActivity(cm); }\n\n updateDoc(doc, change, spans, estimateHeight(cm));\n\n if (!cm.options.lineWrapping) {\n doc.iter(checkWidthStart, from.line + change.text.length, function (line) {\n var len = lineLength(line);\n if (len > display.maxLineLength) {\n display.maxLine = line;\n display.maxLineLength = len;\n display.maxLineChanged = true;\n recomputeMaxLength = false;\n }\n });\n if (recomputeMaxLength) { cm.curOp.updateMaxLine = true; }\n }\n\n retreatFrontier(doc, from.line);\n startWorker(cm, 400);\n\n var lendiff = change.text.length - (to.line - from.line) - 1;\n // Remember that these lines changed, for updating the display\n if (change.full)\n { regChange(cm); }\n else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))\n { regLineChange(cm, from.line, \"text\"); }\n else\n { regChange(cm, from.line, to.line + 1, lendiff); }\n\n var changesHandler = hasHandler(cm, \"changes\"), changeHandler = hasHandler(cm, \"change\");\n if (changeHandler || changesHandler) {\n var obj = {\n from: from, to: to,\n text: change.text,\n removed: change.removed,\n origin: change.origin\n };\n if (changeHandler) { signalLater(cm, \"change\", cm, obj); }\n if (changesHandler) { (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); }\n }\n cm.display.selForContextMenu = null;\n }\n\n function replaceRange(doc, code, from, to, origin) {\n var assign;\n\n if (!to) { to = from; }\n if (cmp(to, from) < 0) { (assign = [to, from], from = assign[0], to = assign[1]); }\n if (typeof code == \"string\") { code = doc.splitLines(code); }\n makeChange(doc, {from: from, to: to, text: code, origin: origin});\n }\n\n // Rebasing/resetting history to deal with externally-sourced changes\n\n function rebaseHistSelSingle(pos, from, to, diff) {\n if (to < pos.line) {\n pos.line += diff;\n } else if (from < pos.line) {\n pos.line = from;\n pos.ch = 0;\n }\n }\n\n // Tries to rebase an array of history events given a change in the\n // document. If the change touches the same lines as the event, the\n // event, and everything 'behind' it, is discarded. If the change is\n // before the event, the event's positions are updated. Uses a\n // copy-on-write scheme for the positions, to avoid having to\n // reallocate them all on every rebase, but also avoid problems with\n // shared position objects being unsafely updated.\n function rebaseHistArray(array, from, to, diff) {\n for (var i = 0; i < array.length; ++i) {\n var sub = array[i], ok = true;\n if (sub.ranges) {\n if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; }\n for (var j = 0; j < sub.ranges.length; j++) {\n rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);\n rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);\n }\n continue\n }\n for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) {\n var cur = sub.changes[j$1];\n if (to < cur.from.line) {\n cur.from = Pos(cur.from.line + diff, cur.from.ch);\n cur.to = Pos(cur.to.line + diff, cur.to.ch);\n } else if (from <= cur.to.line) {\n ok = false;\n break\n }\n }\n if (!ok) {\n array.splice(0, i + 1);\n i = 0;\n }\n }\n }\n\n function rebaseHist(hist, change) {\n var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;\n rebaseHistArray(hist.done, from, to, diff);\n rebaseHistArray(hist.undone, from, to, diff);\n }\n\n // Utility for applying a change to a line by handle or number,\n // returning the number and optionally registering the line as\n // changed.\n function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }\n\n // The document is represented as a BTree consisting of leaves, with\n // chunk of lines in them, and branches, with up to ten leaves or\n // other branch nodes below them. The top node is always a branch\n // node, and is the document object itself (meaning it has\n // additional methods and properties).\n //\n // All nodes have parent links. The tree is used both to go from\n // line numbers to line objects, and to go from objects to numbers.\n // It also indexes by height, and is used to convert between height\n // and line object, and to find the total height of the document.\n //\n // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html\n\n function LeafChunk(lines) {\n this.lines = lines;\n this.parent = null;\n var height = 0;\n for (var i = 0; i < lines.length; ++i) {\n lines[i].parent = this;\n height += lines[i].height;\n }\n this.height = height;\n }\n\n LeafChunk.prototype = {\n chunkSize: function() { return this.lines.length },\n\n // Remove the n lines at offset 'at'.\n removeInner: function(at, n) {\n for (var i = at, e = at + n; i < e; ++i) {\n var line = this.lines[i];\n this.height -= line.height;\n cleanUpLine(line);\n signalLater(line, \"delete\");\n }\n this.lines.splice(at, n);\n },\n\n // Helper used to collapse a small branch into a single leaf.\n collapse: function(lines) {\n lines.push.apply(lines, this.lines);\n },\n\n // Insert the given array of lines at offset 'at', count them as\n // having the given height.\n insertInner: function(at, lines, height) {\n this.height += height;\n this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));\n for (var i = 0; i < lines.length; ++i) { lines[i].parent = this; }\n },\n\n // Used to iterate over a part of the tree.\n iterN: function(at, n, op) {\n for (var e = at + n; at < e; ++at)\n { if (op(this.lines[at])) { return true } }\n }\n };\n\n function BranchChunk(children) {\n this.children = children;\n var size = 0, height = 0;\n for (var i = 0; i < children.length; ++i) {\n var ch = children[i];\n size += ch.chunkSize(); height += ch.height;\n ch.parent = this;\n }\n this.size = size;\n this.height = height;\n this.parent = null;\n }\n\n BranchChunk.prototype = {\n chunkSize: function() { return this.size },\n\n removeInner: function(at, n) {\n this.size -= n;\n for (var i = 0; i < this.children.length; ++i) {\n var child = this.children[i], sz = child.chunkSize();\n if (at < sz) {\n var rm = Math.min(n, sz - at), oldHeight = child.height;\n child.removeInner(at, rm);\n this.height -= oldHeight - child.height;\n if (sz == rm) { this.children.splice(i--, 1); child.parent = null; }\n if ((n -= rm) == 0) { break }\n at = 0;\n } else { at -= sz; }\n }\n // If the result is smaller than 25 lines, ensure that it is a\n // single leaf node.\n if (this.size - n < 25 &&\n (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {\n var lines = [];\n this.collapse(lines);\n this.children = [new LeafChunk(lines)];\n this.children[0].parent = this;\n }\n },\n\n collapse: function(lines) {\n for (var i = 0; i < this.children.length; ++i) { this.children[i].collapse(lines); }\n },\n\n insertInner: function(at, lines, height) {\n this.size += lines.length;\n this.height += height;\n for (var i = 0; i < this.children.length; ++i) {\n var child = this.children[i], sz = child.chunkSize();\n if (at <= sz) {\n child.insertInner(at, lines, height);\n if (child.lines && child.lines.length > 50) {\n // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced.\n // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest.\n var remaining = child.lines.length % 25 + 25;\n for (var pos = remaining; pos < child.lines.length;) {\n var leaf = new LeafChunk(child.lines.slice(pos, pos += 25));\n child.height -= leaf.height;\n this.children.splice(++i, 0, leaf);\n leaf.parent = this;\n }\n child.lines = child.lines.slice(0, remaining);\n this.maybeSpill();\n }\n break\n }\n at -= sz;\n }\n },\n\n // When a node has grown, check whether it should be split.\n maybeSpill: function() {\n if (this.children.length <= 10) { return }\n var me = this;\n do {\n var spilled = me.children.splice(me.children.length - 5, 5);\n var sibling = new BranchChunk(spilled);\n if (!me.parent) { // Become the parent node\n var copy = new BranchChunk(me.children);\n copy.parent = me;\n me.children = [copy, sibling];\n me = copy;\n } else {\n me.size -= sibling.size;\n me.height -= sibling.height;\n var myIndex = indexOf(me.parent.children, me);\n me.parent.children.splice(myIndex + 1, 0, sibling);\n }\n sibling.parent = me.parent;\n } while (me.children.length > 10)\n me.parent.maybeSpill();\n },\n\n iterN: function(at, n, op) {\n for (var i = 0; i < this.children.length; ++i) {\n var child = this.children[i], sz = child.chunkSize();\n if (at < sz) {\n var used = Math.min(n, sz - at);\n if (child.iterN(at, used, op)) { return true }\n if ((n -= used) == 0) { break }\n at = 0;\n } else { at -= sz; }\n }\n }\n };\n\n // Line widgets are block elements displayed above or below a line.\n\n var LineWidget = function(doc, node, options) {\n if (options) { for (var opt in options) { if (options.hasOwnProperty(opt))\n { this[opt] = options[opt]; } } }\n this.doc = doc;\n this.node = node;\n };\n\n LineWidget.prototype.clear = function () {\n var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);\n if (no == null || !ws) { return }\n for (var i = 0; i < ws.length; ++i) { if (ws[i] == this) { ws.splice(i--, 1); } }\n if (!ws.length) { line.widgets = null; }\n var height = widgetHeight(this);\n updateLineHeight(line, Math.max(0, line.height - height));\n if (cm) {\n runInOp(cm, function () {\n adjustScrollWhenAboveVisible(cm, line, -height);\n regLineChange(cm, no, \"widget\");\n });\n signalLater(cm, \"lineWidgetCleared\", cm, this, no);\n }\n };\n\n LineWidget.prototype.changed = function () {\n var this$1 = this;\n\n var oldH = this.height, cm = this.doc.cm, line = this.line;\n this.height = null;\n var diff = widgetHeight(this) - oldH;\n if (!diff) { return }\n if (!lineIsHidden(this.doc, line)) { updateLineHeight(line, line.height + diff); }\n if (cm) {\n runInOp(cm, function () {\n cm.curOp.forceUpdate = true;\n adjustScrollWhenAboveVisible(cm, line, diff);\n signalLater(cm, \"lineWidgetChanged\", cm, this$1, lineNo(line));\n });\n }\n };\n eventMixin(LineWidget);\n\n function adjustScrollWhenAboveVisible(cm, line, diff) {\n if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))\n { addToScrollTop(cm, diff); }\n }\n\n function addLineWidget(doc, handle, node, options) {\n var widget = new LineWidget(doc, node, options);\n var cm = doc.cm;\n if (cm && widget.noHScroll) { cm.display.alignWidgets = true; }\n changeLine(doc, handle, \"widget\", function (line) {\n var widgets = line.widgets || (line.widgets = []);\n if (widget.insertAt == null) { widgets.push(widget); }\n else { widgets.splice(Math.min(widgets.length, Math.max(0, widget.insertAt)), 0, widget); }\n widget.line = line;\n if (cm && !lineIsHidden(doc, line)) {\n var aboveVisible = heightAtLine(line) < doc.scrollTop;\n updateLineHeight(line, line.height + widgetHeight(widget));\n if (aboveVisible) { addToScrollTop(cm, widget.height); }\n cm.curOp.forceUpdate = true;\n }\n return true\n });\n if (cm) { signalLater(cm, \"lineWidgetAdded\", cm, widget, typeof handle == \"number\" ? handle : lineNo(handle)); }\n return widget\n }\n\n // TEXTMARKERS\n\n // Created with markText and setBookmark methods. A TextMarker is a\n // handle that can be used to clear or find a marked position in the\n // document. Line objects hold arrays (markedSpans) containing\n // {from, to, marker} object pointing to such marker objects, and\n // indicating that such a marker is present on that line. Multiple\n // lines may point to the same marker when it spans across lines.\n // The spans will have null for their from/to properties when the\n // marker continues beyond the start/end of the line. Markers have\n // links back to the lines they currently touch.\n\n // Collapsed markers have unique ids, in order to be able to order\n // them, which is needed for uniquely determining an outer marker\n // when they overlap (they may nest, but not partially overlap).\n var nextMarkerId = 0;\n\n var TextMarker = function(doc, type) {\n this.lines = [];\n this.type = type;\n this.doc = doc;\n this.id = ++nextMarkerId;\n };\n\n // Clear the marker.\n TextMarker.prototype.clear = function () {\n if (this.explicitlyCleared) { return }\n var cm = this.doc.cm, withOp = cm && !cm.curOp;\n if (withOp) { startOperation(cm); }\n if (hasHandler(this, \"clear\")) {\n var found = this.find();\n if (found) { signalLater(this, \"clear\", found.from, found.to); }\n }\n var min = null, max = null;\n for (var i = 0; i < this.lines.length; ++i) {\n var line = this.lines[i];\n var span = getMarkedSpanFor(line.markedSpans, this);\n if (cm && !this.collapsed) { regLineChange(cm, lineNo(line), \"text\"); }\n else if (cm) {\n if (span.to != null) { max = lineNo(line); }\n if (span.from != null) { min = lineNo(line); }\n }\n line.markedSpans = removeMarkedSpan(line.markedSpans, span);\n if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm)\n { updateLineHeight(line, textHeight(cm.display)); }\n }\n if (cm && this.collapsed && !cm.options.lineWrapping) { for (var i$1 = 0; i$1 < this.lines.length; ++i$1) {\n var visual = visualLine(this.lines[i$1]), len = lineLength(visual);\n if (len > cm.display.maxLineLength) {\n cm.display.maxLine = visual;\n cm.display.maxLineLength = len;\n cm.display.maxLineChanged = true;\n }\n } }\n\n if (min != null && cm && this.collapsed) { regChange(cm, min, max + 1); }\n this.lines.length = 0;\n this.explicitlyCleared = true;\n if (this.atomic && this.doc.cantEdit) {\n this.doc.cantEdit = false;\n if (cm) { reCheckSelection(cm.doc); }\n }\n if (cm) { signalLater(cm, \"markerCleared\", cm, this, min, max); }\n if (withOp) { endOperation(cm); }\n if (this.parent) { this.parent.clear(); }\n };\n\n // Find the position of the marker in the document. Returns a {from,\n // to} object by default. Side can be passed to get a specific side\n // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the\n // Pos objects returned contain a line object, rather than a line\n // number (used to prevent looking up the same line twice).\n TextMarker.prototype.find = function (side, lineObj) {\n if (side == null && this.type == \"bookmark\") { side = 1; }\n var from, to;\n for (var i = 0; i < this.lines.length; ++i) {\n var line = this.lines[i];\n var span = getMarkedSpanFor(line.markedSpans, this);\n if (span.from != null) {\n from = Pos(lineObj ? line : lineNo(line), span.from);\n if (side == -1) { return from }\n }\n if (span.to != null) {\n to = Pos(lineObj ? line : lineNo(line), span.to);\n if (side == 1) { return to }\n }\n }\n return from && {from: from, to: to}\n };\n\n // Signals that the marker's widget changed, and surrounding layout\n // should be recomputed.\n TextMarker.prototype.changed = function () {\n var this$1 = this;\n\n var pos = this.find(-1, true), widget = this, cm = this.doc.cm;\n if (!pos || !cm) { return }\n runInOp(cm, function () {\n var line = pos.line, lineN = lineNo(pos.line);\n var view = findViewForLine(cm, lineN);\n if (view) {\n clearLineMeasurementCacheFor(view);\n cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;\n }\n cm.curOp.updateMaxLine = true;\n if (!lineIsHidden(widget.doc, line) && widget.height != null) {\n var oldHeight = widget.height;\n widget.height = null;\n var dHeight = widgetHeight(widget) - oldHeight;\n if (dHeight)\n { updateLineHeight(line, line.height + dHeight); }\n }\n signalLater(cm, \"markerChanged\", cm, this$1);\n });\n };\n\n TextMarker.prototype.attachLine = function (line) {\n if (!this.lines.length && this.doc.cm) {\n var op = this.doc.cm.curOp;\n if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)\n { (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); }\n }\n this.lines.push(line);\n };\n\n TextMarker.prototype.detachLine = function (line) {\n this.lines.splice(indexOf(this.lines, line), 1);\n if (!this.lines.length && this.doc.cm) {\n var op = this.doc.cm.curOp\n ;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);\n }\n };\n eventMixin(TextMarker);\n\n // Create a marker, wire it up to the right lines, and\n function markText(doc, from, to, options, type) {\n // Shared markers (across linked documents) are handled separately\n // (markTextShared will call out to this again, once per\n // document).\n if (options && options.shared) { return markTextShared(doc, from, to, options, type) }\n // Ensure we are in an operation.\n if (doc.cm && !doc.cm.curOp) { return operation(doc.cm, markText)(doc, from, to, options, type) }\n\n var marker = new TextMarker(doc, type), diff = cmp(from, to);\n if (options) { copyObj(options, marker, false); }\n // Don't connect empty markers unless clearWhenEmpty is false\n if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)\n { return marker }\n if (marker.replacedWith) {\n // Showing up as a widget implies collapsed (widget replaces text)\n marker.collapsed = true;\n marker.widgetNode = eltP(\"span\", [marker.replacedWith], \"CodeMirror-widget\");\n if (!options.handleMouseEvents) { marker.widgetNode.setAttribute(\"cm-ignore-events\", \"true\"); }\n if (options.insertLeft) { marker.widgetNode.insertLeft = true; }\n }\n if (marker.collapsed) {\n if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||\n from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))\n { throw new Error(\"Inserting collapsed marker partially overlapping an existing one\") }\n seeCollapsedSpans();\n }\n\n if (marker.addToHistory)\n { addChangeToHistory(doc, {from: from, to: to, origin: \"markText\"}, doc.sel, NaN); }\n\n var curLine = from.line, cm = doc.cm, updateMaxLine;\n doc.iter(curLine, to.line + 1, function (line) {\n if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)\n { updateMaxLine = true; }\n if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0); }\n addMarkedSpan(line, new MarkedSpan(marker,\n curLine == from.line ? from.ch : null,\n curLine == to.line ? to.ch : null), doc.cm && doc.cm.curOp);\n ++curLine;\n });\n // lineIsHidden depends on the presence of the spans, so needs a second pass\n if (marker.collapsed) { doc.iter(from.line, to.line + 1, function (line) {\n if (lineIsHidden(doc, line)) { updateLineHeight(line, 0); }\n }); }\n\n if (marker.clearOnEnter) { on(marker, \"beforeCursorEnter\", function () { return marker.clear(); }); }\n\n if (marker.readOnly) {\n seeReadOnlySpans();\n if (doc.history.done.length || doc.history.undone.length)\n { doc.clearHistory(); }\n }\n if (marker.collapsed) {\n marker.id = ++nextMarkerId;\n marker.atomic = true;\n }\n if (cm) {\n // Sync editor state\n if (updateMaxLine) { cm.curOp.updateMaxLine = true; }\n if (marker.collapsed)\n { regChange(cm, from.line, to.line + 1); }\n else if (marker.className || marker.startStyle || marker.endStyle || marker.css ||\n marker.attributes || marker.title)\n { for (var i = from.line; i <= to.line; i++) { regLineChange(cm, i, \"text\"); } }\n if (marker.atomic) { reCheckSelection(cm.doc); }\n signalLater(cm, \"markerAdded\", cm, marker);\n }\n return marker\n }\n\n // SHARED TEXTMARKERS\n\n // A shared marker spans multiple linked documents. It is\n // implemented as a meta-marker-object controlling multiple normal\n // markers.\n var SharedTextMarker = function(markers, primary) {\n this.markers = markers;\n this.primary = primary;\n for (var i = 0; i < markers.length; ++i)\n { markers[i].parent = this; }\n };\n\n SharedTextMarker.prototype.clear = function () {\n if (this.explicitlyCleared) { return }\n this.explicitlyCleared = true;\n for (var i = 0; i < this.markers.length; ++i)\n { this.markers[i].clear(); }\n signalLater(this, \"clear\");\n };\n\n SharedTextMarker.prototype.find = function (side, lineObj) {\n return this.primary.find(side, lineObj)\n };\n eventMixin(SharedTextMarker);\n\n function markTextShared(doc, from, to, options, type) {\n options = copyObj(options);\n options.shared = false;\n var markers = [markText(doc, from, to, options, type)], primary = markers[0];\n var widget = options.widgetNode;\n linkedDocs(doc, function (doc) {\n if (widget) { options.widgetNode = widget.cloneNode(true); }\n markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));\n for (var i = 0; i < doc.linked.length; ++i)\n { if (doc.linked[i].isParent) { return } }\n primary = lst(markers);\n });\n return new SharedTextMarker(markers, primary)\n }\n\n function findSharedMarkers(doc) {\n return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function (m) { return m.parent; })\n }\n\n function copySharedMarkers(doc, markers) {\n for (var i = 0; i < markers.length; i++) {\n var marker = markers[i], pos = marker.find();\n var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to);\n if (cmp(mFrom, mTo)) {\n var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);\n marker.markers.push(subMark);\n subMark.parent = marker;\n }\n }\n }\n\n function detachSharedMarkers(markers) {\n var loop = function ( i ) {\n var marker = markers[i], linked = [marker.primary.doc];\n linkedDocs(marker.primary.doc, function (d) { return linked.push(d); });\n for (var j = 0; j < marker.markers.length; j++) {\n var subMarker = marker.markers[j];\n if (indexOf(linked, subMarker.doc) == -1) {\n subMarker.parent = null;\n marker.markers.splice(j--, 1);\n }\n }\n };\n\n for (var i = 0; i < markers.length; i++) loop( i );\n }\n\n var nextDocId = 0;\n var Doc = function(text, mode, firstLine, lineSep, direction) {\n if (!(this instanceof Doc)) { return new Doc(text, mode, firstLine, lineSep, direction) }\n if (firstLine == null) { firstLine = 0; }\n\n BranchChunk.call(this, [new LeafChunk([new Line(\"\", null)])]);\n this.first = firstLine;\n this.scrollTop = this.scrollLeft = 0;\n this.cantEdit = false;\n this.cleanGeneration = 1;\n this.modeFrontier = this.highlightFrontier = firstLine;\n var start = Pos(firstLine, 0);\n this.sel = simpleSelection(start);\n this.history = new History(null);\n this.id = ++nextDocId;\n this.modeOption = mode;\n this.lineSep = lineSep;\n this.direction = (direction == \"rtl\") ? \"rtl\" : \"ltr\";\n this.extend = false;\n\n if (typeof text == \"string\") { text = this.splitLines(text); }\n updateDoc(this, {from: start, to: start, text: text});\n setSelection(this, simpleSelection(start), sel_dontScroll);\n };\n\n Doc.prototype = createObj(BranchChunk.prototype, {\n constructor: Doc,\n // Iterate over the document. Supports two forms -- with only one\n // argument, it calls that for each line in the document. With\n // three, it iterates over the range given by the first two (with\n // the second being non-inclusive).\n iter: function(from, to, op) {\n if (op) { this.iterN(from - this.first, to - from, op); }\n else { this.iterN(this.first, this.first + this.size, from); }\n },\n\n // Non-public interface for adding and removing lines.\n insert: function(at, lines) {\n var height = 0;\n for (var i = 0; i < lines.length; ++i) { height += lines[i].height; }\n this.insertInner(at - this.first, lines, height);\n },\n remove: function(at, n) { this.removeInner(at - this.first, n); },\n\n // From here, the methods are part of the public interface. Most\n // are also available from CodeMirror (editor) instances.\n\n getValue: function(lineSep) {\n var lines = getLines(this, this.first, this.first + this.size);\n if (lineSep === false) { return lines }\n return lines.join(lineSep || this.lineSeparator())\n },\n setValue: docMethodOp(function(code) {\n var top = Pos(this.first, 0), last = this.first + this.size - 1;\n makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),\n text: this.splitLines(code), origin: \"setValue\", full: true}, true);\n if (this.cm) { scrollToCoords(this.cm, 0, 0); }\n setSelection(this, simpleSelection(top), sel_dontScroll);\n }),\n replaceRange: function(code, from, to, origin) {\n from = clipPos(this, from);\n to = to ? clipPos(this, to) : from;\n replaceRange(this, code, from, to, origin);\n },\n getRange: function(from, to, lineSep) {\n var lines = getBetween(this, clipPos(this, from), clipPos(this, to));\n if (lineSep === false) { return lines }\n if (lineSep === '') { return lines.join('') }\n return lines.join(lineSep || this.lineSeparator())\n },\n\n getLine: function(line) {var l = this.getLineHandle(line); return l && l.text},\n\n getLineHandle: function(line) {if (isLine(this, line)) { return getLine(this, line) }},\n getLineNumber: function(line) {return lineNo(line)},\n\n getLineHandleVisualStart: function(line) {\n if (typeof line == \"number\") { line = getLine(this, line); }\n return visualLine(line)\n },\n\n lineCount: function() {return this.size},\n firstLine: function() {return this.first},\n lastLine: function() {return this.first + this.size - 1},\n\n clipPos: function(pos) {return clipPos(this, pos)},\n\n getCursor: function(start) {\n var range = this.sel.primary(), pos;\n if (start == null || start == \"head\") { pos = range.head; }\n else if (start == \"anchor\") { pos = range.anchor; }\n else if (start == \"end\" || start == \"to\" || start === false) { pos = range.to(); }\n else { pos = range.from(); }\n return pos\n },\n listSelections: function() { return this.sel.ranges },\n somethingSelected: function() {return this.sel.somethingSelected()},\n\n setCursor: docMethodOp(function(line, ch, options) {\n setSimpleSelection(this, clipPos(this, typeof line == \"number\" ? Pos(line, ch || 0) : line), null, options);\n }),\n setSelection: docMethodOp(function(anchor, head, options) {\n setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);\n }),\n extendSelection: docMethodOp(function(head, other, options) {\n extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);\n }),\n extendSelections: docMethodOp(function(heads, options) {\n extendSelections(this, clipPosArray(this, heads), options);\n }),\n extendSelectionsBy: docMethodOp(function(f, options) {\n var heads = map(this.sel.ranges, f);\n extendSelections(this, clipPosArray(this, heads), options);\n }),\n setSelections: docMethodOp(function(ranges, primary, options) {\n if (!ranges.length) { return }\n var out = [];\n for (var i = 0; i < ranges.length; i++)\n { out[i] = new Range(clipPos(this, ranges[i].anchor),\n clipPos(this, ranges[i].head || ranges[i].anchor)); }\n if (primary == null) { primary = Math.min(ranges.length - 1, this.sel.primIndex); }\n setSelection(this, normalizeSelection(this.cm, out, primary), options);\n }),\n addSelection: docMethodOp(function(anchor, head, options) {\n var ranges = this.sel.ranges.slice(0);\n ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));\n setSelection(this, normalizeSelection(this.cm, ranges, ranges.length - 1), options);\n }),\n\n getSelection: function(lineSep) {\n var ranges = this.sel.ranges, lines;\n for (var i = 0; i < ranges.length; i++) {\n var sel = getBetween(this, ranges[i].from(), ranges[i].to());\n lines = lines ? lines.concat(sel) : sel;\n }\n if (lineSep === false) { return lines }\n else { return lines.join(lineSep || this.lineSeparator()) }\n },\n getSelections: function(lineSep) {\n var parts = [], ranges = this.sel.ranges;\n for (var i = 0; i < ranges.length; i++) {\n var sel = getBetween(this, ranges[i].from(), ranges[i].to());\n if (lineSep !== false) { sel = sel.join(lineSep || this.lineSeparator()); }\n parts[i] = sel;\n }\n return parts\n },\n replaceSelection: function(code, collapse, origin) {\n var dup = [];\n for (var i = 0; i < this.sel.ranges.length; i++)\n { dup[i] = code; }\n this.replaceSelections(dup, collapse, origin || \"+input\");\n },\n replaceSelections: docMethodOp(function(code, collapse, origin) {\n var changes = [], sel = this.sel;\n for (var i = 0; i < sel.ranges.length; i++) {\n var range = sel.ranges[i];\n changes[i] = {from: range.from(), to: range.to(), text: this.splitLines(code[i]), origin: origin};\n }\n var newSel = collapse && collapse != \"end\" && computeReplacedSel(this, changes, collapse);\n for (var i$1 = changes.length - 1; i$1 >= 0; i$1--)\n { makeChange(this, changes[i$1]); }\n if (newSel) { setSelectionReplaceHistory(this, newSel); }\n else if (this.cm) { ensureCursorVisible(this.cm); }\n }),\n undo: docMethodOp(function() {makeChangeFromHistory(this, \"undo\");}),\n redo: docMethodOp(function() {makeChangeFromHistory(this, \"redo\");}),\n undoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"undo\", true);}),\n redoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"redo\", true);}),\n\n setExtending: function(val) {this.extend = val;},\n getExtending: function() {return this.extend},\n\n historySize: function() {\n var hist = this.history, done = 0, undone = 0;\n for (var i = 0; i < hist.done.length; i++) { if (!hist.done[i].ranges) { ++done; } }\n for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone; } }\n return {undo: done, redo: undone}\n },\n clearHistory: function() {\n var this$1 = this;\n\n this.history = new History(this.history);\n linkedDocs(this, function (doc) { return doc.history = this$1.history; }, true);\n },\n\n markClean: function() {\n this.cleanGeneration = this.changeGeneration(true);\n },\n changeGeneration: function(forceSplit) {\n if (forceSplit)\n { this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; }\n return this.history.generation\n },\n isClean: function (gen) {\n return this.history.generation == (gen || this.cleanGeneration)\n },\n\n getHistory: function() {\n return {done: copyHistoryArray(this.history.done),\n undone: copyHistoryArray(this.history.undone)}\n },\n setHistory: function(histData) {\n var hist = this.history = new History(this.history);\n hist.done = copyHistoryArray(histData.done.slice(0), null, true);\n hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);\n },\n\n setGutterMarker: docMethodOp(function(line, gutterID, value) {\n return changeLine(this, line, \"gutter\", function (line) {\n var markers = line.gutterMarkers || (line.gutterMarkers = {});\n markers[gutterID] = value;\n if (!value && isEmpty(markers)) { line.gutterMarkers = null; }\n return true\n })\n }),\n\n clearGutter: docMethodOp(function(gutterID) {\n var this$1 = this;\n\n this.iter(function (line) {\n if (line.gutterMarkers && line.gutterMarkers[gutterID]) {\n changeLine(this$1, line, \"gutter\", function () {\n line.gutterMarkers[gutterID] = null;\n if (isEmpty(line.gutterMarkers)) { line.gutterMarkers = null; }\n return true\n });\n }\n });\n }),\n\n lineInfo: function(line) {\n var n;\n if (typeof line == \"number\") {\n if (!isLine(this, line)) { return null }\n n = line;\n line = getLine(this, line);\n if (!line) { return null }\n } else {\n n = lineNo(line);\n if (n == null) { return null }\n }\n return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,\n textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,\n widgets: line.widgets}\n },\n\n addLineClass: docMethodOp(function(handle, where, cls) {\n return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function (line) {\n var prop = where == \"text\" ? \"textClass\"\n : where == \"background\" ? \"bgClass\"\n : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n if (!line[prop]) { line[prop] = cls; }\n else if (classTest(cls).test(line[prop])) { return false }\n else { line[prop] += \" \" + cls; }\n return true\n })\n }),\n removeLineClass: docMethodOp(function(handle, where, cls) {\n return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function (line) {\n var prop = where == \"text\" ? \"textClass\"\n : where == \"background\" ? \"bgClass\"\n : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n var cur = line[prop];\n if (!cur) { return false }\n else if (cls == null) { line[prop] = null; }\n else {\n var found = cur.match(classTest(cls));\n if (!found) { return false }\n var end = found.index + found[0].length;\n line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? \"\" : \" \") + cur.slice(end) || null;\n }\n return true\n })\n }),\n\n addLineWidget: docMethodOp(function(handle, node, options) {\n return addLineWidget(this, handle, node, options)\n }),\n removeLineWidget: function(widget) { widget.clear(); },\n\n markText: function(from, to, options) {\n return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || \"range\")\n },\n setBookmark: function(pos, options) {\n var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),\n insertLeft: options && options.insertLeft,\n clearWhenEmpty: false, shared: options && options.shared,\n handleMouseEvents: options && options.handleMouseEvents};\n pos = clipPos(this, pos);\n return markText(this, pos, pos, realOpts, \"bookmark\")\n },\n findMarksAt: function(pos) {\n pos = clipPos(this, pos);\n var markers = [], spans = getLine(this, pos.line).markedSpans;\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if ((span.from == null || span.from <= pos.ch) &&\n (span.to == null || span.to >= pos.ch))\n { markers.push(span.marker.parent || span.marker); }\n } }\n return markers\n },\n findMarks: function(from, to, filter) {\n from = clipPos(this, from); to = clipPos(this, to);\n var found = [], lineNo = from.line;\n this.iter(from.line, to.line + 1, function (line) {\n var spans = line.markedSpans;\n if (spans) { for (var i = 0; i < spans.length; i++) {\n var span = spans[i];\n if (!(span.to != null && lineNo == from.line && from.ch >= span.to ||\n span.from == null && lineNo != from.line ||\n span.from != null && lineNo == to.line && span.from >= to.ch) &&\n (!filter || filter(span.marker)))\n { found.push(span.marker.parent || span.marker); }\n } }\n ++lineNo;\n });\n return found\n },\n getAllMarks: function() {\n var markers = [];\n this.iter(function (line) {\n var sps = line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i)\n { if (sps[i].from != null) { markers.push(sps[i].marker); } } }\n });\n return markers\n },\n\n posFromIndex: function(off) {\n var ch, lineNo = this.first, sepSize = this.lineSeparator().length;\n this.iter(function (line) {\n var sz = line.text.length + sepSize;\n if (sz > off) { ch = off; return true }\n off -= sz;\n ++lineNo;\n });\n return clipPos(this, Pos(lineNo, ch))\n },\n indexFromPos: function (coords) {\n coords = clipPos(this, coords);\n var index = coords.ch;\n if (coords.line < this.first || coords.ch < 0) { return 0 }\n var sepSize = this.lineSeparator().length;\n this.iter(this.first, coords.line, function (line) { // iter aborts when callback returns a truthy value\n index += line.text.length + sepSize;\n });\n return index\n },\n\n copy: function(copyHistory) {\n var doc = new Doc(getLines(this, this.first, this.first + this.size),\n this.modeOption, this.first, this.lineSep, this.direction);\n doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;\n doc.sel = this.sel;\n doc.extend = false;\n if (copyHistory) {\n doc.history.undoDepth = this.history.undoDepth;\n doc.setHistory(this.getHistory());\n }\n return doc\n },\n\n linkedDoc: function(options) {\n if (!options) { options = {}; }\n var from = this.first, to = this.first + this.size;\n if (options.from != null && options.from > from) { from = options.from; }\n if (options.to != null && options.to < to) { to = options.to; }\n var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction);\n if (options.sharedHist) { copy.history = this.history\n ; }(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});\n copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];\n copySharedMarkers(copy, findSharedMarkers(this));\n return copy\n },\n unlinkDoc: function(other) {\n if (other instanceof CodeMirror) { other = other.doc; }\n if (this.linked) { for (var i = 0; i < this.linked.length; ++i) {\n var link = this.linked[i];\n if (link.doc != other) { continue }\n this.linked.splice(i, 1);\n other.unlinkDoc(this);\n detachSharedMarkers(findSharedMarkers(this));\n break\n } }\n // If the histories were shared, split them again\n if (other.history == this.history) {\n var splitIds = [other.id];\n linkedDocs(other, function (doc) { return splitIds.push(doc.id); }, true);\n other.history = new History(null);\n other.history.done = copyHistoryArray(this.history.done, splitIds);\n other.history.undone = copyHistoryArray(this.history.undone, splitIds);\n }\n },\n iterLinkedDocs: function(f) {linkedDocs(this, f);},\n\n getMode: function() {return this.mode},\n getEditor: function() {return this.cm},\n\n splitLines: function(str) {\n if (this.lineSep) { return str.split(this.lineSep) }\n return splitLinesAuto(str)\n },\n lineSeparator: function() { return this.lineSep || \"\\n\" },\n\n setDirection: docMethodOp(function (dir) {\n if (dir != \"rtl\") { dir = \"ltr\"; }\n if (dir == this.direction) { return }\n this.direction = dir;\n this.iter(function (line) { return line.order = null; });\n if (this.cm) { directionChanged(this.cm); }\n })\n });\n\n // Public alias.\n Doc.prototype.eachLine = Doc.prototype.iter;\n\n // Kludge to work around strange IE behavior where it'll sometimes\n // re-fire a series of drag-related events right after the drop (#1551)\n var lastDrop = 0;\n\n function onDrop(e) {\n var cm = this;\n clearDragCursor(cm);\n if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))\n { return }\n e_preventDefault(e);\n if (ie) { lastDrop = +new Date; }\n var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;\n if (!pos || cm.isReadOnly()) { return }\n // Might be a file drop, in which case we simply extract the text\n // and insert it.\n if (files && files.length && window.FileReader && window.File) {\n var n = files.length, text = Array(n), read = 0;\n var markAsReadAndPasteIfAllFilesAreRead = function () {\n if (++read == n) {\n operation(cm, function () {\n pos = clipPos(cm.doc, pos);\n var change = {from: pos, to: pos,\n text: cm.doc.splitLines(\n text.filter(function (t) { return t != null; }).join(cm.doc.lineSeparator())),\n origin: \"paste\"};\n makeChange(cm.doc, change);\n setSelectionReplaceHistory(cm.doc, simpleSelection(clipPos(cm.doc, pos), clipPos(cm.doc, changeEnd(change))));\n })();\n }\n };\n var readTextFromFile = function (file, i) {\n if (cm.options.allowDropFileTypes &&\n indexOf(cm.options.allowDropFileTypes, file.type) == -1) {\n markAsReadAndPasteIfAllFilesAreRead();\n return\n }\n var reader = new FileReader;\n reader.onerror = function () { return markAsReadAndPasteIfAllFilesAreRead(); };\n reader.onload = function () {\n var content = reader.result;\n if (/[\\x00-\\x08\\x0e-\\x1f]{2}/.test(content)) {\n markAsReadAndPasteIfAllFilesAreRead();\n return\n }\n text[i] = content;\n markAsReadAndPasteIfAllFilesAreRead();\n };\n reader.readAsText(file);\n };\n for (var i = 0; i < files.length; i++) { readTextFromFile(files[i], i); }\n } else { // Normal drop\n // Don't do a replace if the drop happened inside of the selected text.\n if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {\n cm.state.draggingText(e);\n // Ensure the editor is re-focused\n setTimeout(function () { return cm.display.input.focus(); }, 20);\n return\n }\n try {\n var text$1 = e.dataTransfer.getData(\"Text\");\n if (text$1) {\n var selected;\n if (cm.state.draggingText && !cm.state.draggingText.copy)\n { selected = cm.listSelections(); }\n setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));\n if (selected) { for (var i$1 = 0; i$1 < selected.length; ++i$1)\n { replaceRange(cm.doc, \"\", selected[i$1].anchor, selected[i$1].head, \"drag\"); } }\n cm.replaceSelection(text$1, \"around\", \"paste\");\n cm.display.input.focus();\n }\n }\n catch(e$1){}\n }\n }\n\n function onDragStart(cm, e) {\n if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return }\n if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { return }\n\n e.dataTransfer.setData(\"Text\", cm.getSelection());\n e.dataTransfer.effectAllowed = \"copyMove\";\n\n // Use dummy image instead of default browsers image.\n // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.\n if (e.dataTransfer.setDragImage && !safari) {\n var img = elt(\"img\", null, null, \"position: fixed; left: 0; top: 0;\");\n img.src = \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\n if (presto) {\n img.width = img.height = 1;\n cm.display.wrapper.appendChild(img);\n // Force a relayout, or Opera won't use our image for some obscure reason\n img._top = img.offsetTop;\n }\n e.dataTransfer.setDragImage(img, 0, 0);\n if (presto) { img.parentNode.removeChild(img); }\n }\n }\n\n function onDragOver(cm, e) {\n var pos = posFromMouse(cm, e);\n if (!pos) { return }\n var frag = document.createDocumentFragment();\n drawSelectionCursor(cm, pos, frag);\n if (!cm.display.dragCursor) {\n cm.display.dragCursor = elt(\"div\", null, \"CodeMirror-cursors CodeMirror-dragcursors\");\n cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv);\n }\n removeChildrenAndAdd(cm.display.dragCursor, frag);\n }\n\n function clearDragCursor(cm) {\n if (cm.display.dragCursor) {\n cm.display.lineSpace.removeChild(cm.display.dragCursor);\n cm.display.dragCursor = null;\n }\n }\n\n // These must be handled carefully, because naively registering a\n // handler for each editor will cause the editors to never be\n // garbage collected.\n\n function forEachCodeMirror(f) {\n if (!document.getElementsByClassName) { return }\n var byClass = document.getElementsByClassName(\"CodeMirror\"), editors = [];\n for (var i = 0; i < byClass.length; i++) {\n var cm = byClass[i].CodeMirror;\n if (cm) { editors.push(cm); }\n }\n if (editors.length) { editors[0].operation(function () {\n for (var i = 0; i < editors.length; i++) { f(editors[i]); }\n }); }\n }\n\n var globalsRegistered = false;\n function ensureGlobalHandlers() {\n if (globalsRegistered) { return }\n registerGlobalHandlers();\n globalsRegistered = true;\n }\n function registerGlobalHandlers() {\n // When the window resizes, we need to refresh active editors.\n var resizeTimer;\n on(window, \"resize\", function () {\n if (resizeTimer == null) { resizeTimer = setTimeout(function () {\n resizeTimer = null;\n forEachCodeMirror(onResize);\n }, 100); }\n });\n // When the window loses focus, we want to show the editor as blurred\n on(window, \"blur\", function () { return forEachCodeMirror(onBlur); });\n }\n // Called when the window resizes\n function onResize(cm) {\n var d = cm.display;\n // Might be a text scaling operation, clear size caches.\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n d.scrollbarsClipped = false;\n cm.setSize();\n }\n\n var keyNames = {\n 3: \"Pause\", 8: \"Backspace\", 9: \"Tab\", 13: \"Enter\", 16: \"Shift\", 17: \"Ctrl\", 18: \"Alt\",\n 19: \"Pause\", 20: \"CapsLock\", 27: \"Esc\", 32: \"Space\", 33: \"PageUp\", 34: \"PageDown\", 35: \"End\",\n 36: \"Home\", 37: \"Left\", 38: \"Up\", 39: \"Right\", 40: \"Down\", 44: \"PrintScrn\", 45: \"Insert\",\n 46: \"Delete\", 59: \";\", 61: \"=\", 91: \"Mod\", 92: \"Mod\", 93: \"Mod\",\n 106: \"*\", 107: \"=\", 109: \"-\", 110: \".\", 111: \"/\", 145: \"ScrollLock\",\n 173: \"-\", 186: \";\", 187: \"=\", 188: \",\", 189: \"-\", 190: \".\", 191: \"/\", 192: \"`\", 219: \"[\", 220: \"\\\\\",\n 221: \"]\", 222: \"'\", 224: \"Mod\", 63232: \"Up\", 63233: \"Down\", 63234: \"Left\", 63235: \"Right\", 63272: \"Delete\",\n 63273: \"Home\", 63275: \"End\", 63276: \"PageUp\", 63277: \"PageDown\", 63302: \"Insert\"\n };\n\n // Number keys\n for (var i = 0; i < 10; i++) { keyNames[i + 48] = keyNames[i + 96] = String(i); }\n // Alphabetic keys\n for (var i$1 = 65; i$1 <= 90; i$1++) { keyNames[i$1] = String.fromCharCode(i$1); }\n // Function keys\n for (var i$2 = 1; i$2 <= 12; i$2++) { keyNames[i$2 + 111] = keyNames[i$2 + 63235] = \"F\" + i$2; }\n\n var keyMap = {};\n\n keyMap.basic = {\n \"Left\": \"goCharLeft\", \"Right\": \"goCharRight\", \"Up\": \"goLineUp\", \"Down\": \"goLineDown\",\n \"End\": \"goLineEnd\", \"Home\": \"goLineStartSmart\", \"PageUp\": \"goPageUp\", \"PageDown\": \"goPageDown\",\n \"Delete\": \"delCharAfter\", \"Backspace\": \"delCharBefore\", \"Shift-Backspace\": \"delCharBefore\",\n \"Tab\": \"defaultTab\", \"Shift-Tab\": \"indentAuto\",\n \"Enter\": \"newlineAndIndent\", \"Insert\": \"toggleOverwrite\",\n \"Esc\": \"singleSelection\"\n };\n // Note that the save and find-related commands aren't defined by\n // default. User code or addons can define them. Unknown commands\n // are simply ignored.\n keyMap.pcDefault = {\n \"Ctrl-A\": \"selectAll\", \"Ctrl-D\": \"deleteLine\", \"Ctrl-Z\": \"undo\", \"Shift-Ctrl-Z\": \"redo\", \"Ctrl-Y\": \"redo\",\n \"Ctrl-Home\": \"goDocStart\", \"Ctrl-End\": \"goDocEnd\", \"Ctrl-Up\": \"goLineUp\", \"Ctrl-Down\": \"goLineDown\",\n \"Ctrl-Left\": \"goGroupLeft\", \"Ctrl-Right\": \"goGroupRight\", \"Alt-Left\": \"goLineStart\", \"Alt-Right\": \"goLineEnd\",\n \"Ctrl-Backspace\": \"delGroupBefore\", \"Ctrl-Delete\": \"delGroupAfter\", \"Ctrl-S\": \"save\", \"Ctrl-F\": \"find\",\n \"Ctrl-G\": \"findNext\", \"Shift-Ctrl-G\": \"findPrev\", \"Shift-Ctrl-F\": \"replace\", \"Shift-Ctrl-R\": \"replaceAll\",\n \"Ctrl-[\": \"indentLess\", \"Ctrl-]\": \"indentMore\",\n \"Ctrl-U\": \"undoSelection\", \"Shift-Ctrl-U\": \"redoSelection\", \"Alt-U\": \"redoSelection\",\n \"fallthrough\": \"basic\"\n };\n // Very basic readline/emacs-style bindings, which are standard on Mac.\n keyMap.emacsy = {\n \"Ctrl-F\": \"goCharRight\", \"Ctrl-B\": \"goCharLeft\", \"Ctrl-P\": \"goLineUp\", \"Ctrl-N\": \"goLineDown\",\n \"Ctrl-A\": \"goLineStart\", \"Ctrl-E\": \"goLineEnd\", \"Ctrl-V\": \"goPageDown\", \"Shift-Ctrl-V\": \"goPageUp\",\n \"Ctrl-D\": \"delCharAfter\", \"Ctrl-H\": \"delCharBefore\", \"Alt-Backspace\": \"delWordBefore\", \"Ctrl-K\": \"killLine\",\n \"Ctrl-T\": \"transposeChars\", \"Ctrl-O\": \"openLine\"\n };\n keyMap.macDefault = {\n \"Cmd-A\": \"selectAll\", \"Cmd-D\": \"deleteLine\", \"Cmd-Z\": \"undo\", \"Shift-Cmd-Z\": \"redo\", \"Cmd-Y\": \"redo\",\n \"Cmd-Home\": \"goDocStart\", \"Cmd-Up\": \"goDocStart\", \"Cmd-End\": \"goDocEnd\", \"Cmd-Down\": \"goDocEnd\", \"Alt-Left\": \"goGroupLeft\",\n \"Alt-Right\": \"goGroupRight\", \"Cmd-Left\": \"goLineLeft\", \"Cmd-Right\": \"goLineRight\", \"Alt-Backspace\": \"delGroupBefore\",\n \"Ctrl-Alt-Backspace\": \"delGroupAfter\", \"Alt-Delete\": \"delGroupAfter\", \"Cmd-S\": \"save\", \"Cmd-F\": \"find\",\n \"Cmd-G\": \"findNext\", \"Shift-Cmd-G\": \"findPrev\", \"Cmd-Alt-F\": \"replace\", \"Shift-Cmd-Alt-F\": \"replaceAll\",\n \"Cmd-[\": \"indentLess\", \"Cmd-]\": \"indentMore\", \"Cmd-Backspace\": \"delWrappedLineLeft\", \"Cmd-Delete\": \"delWrappedLineRight\",\n \"Cmd-U\": \"undoSelection\", \"Shift-Cmd-U\": \"redoSelection\", \"Ctrl-Up\": \"goDocStart\", \"Ctrl-Down\": \"goDocEnd\",\n \"fallthrough\": [\"basic\", \"emacsy\"]\n };\n keyMap[\"default\"] = mac ? keyMap.macDefault : keyMap.pcDefault;\n\n // KEYMAP DISPATCH\n\n function normalizeKeyName(name) {\n var parts = name.split(/-(?!$)/);\n name = parts[parts.length - 1];\n var alt, ctrl, shift, cmd;\n for (var i = 0; i < parts.length - 1; i++) {\n var mod = parts[i];\n if (/^(cmd|meta|m)$/i.test(mod)) { cmd = true; }\n else if (/^a(lt)?$/i.test(mod)) { alt = true; }\n else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true; }\n else if (/^s(hift)?$/i.test(mod)) { shift = true; }\n else { throw new Error(\"Unrecognized modifier name: \" + mod) }\n }\n if (alt) { name = \"Alt-\" + name; }\n if (ctrl) { name = \"Ctrl-\" + name; }\n if (cmd) { name = \"Cmd-\" + name; }\n if (shift) { name = \"Shift-\" + name; }\n return name\n }\n\n // This is a kludge to keep keymaps mostly working as raw objects\n // (backwards compatibility) while at the same time support features\n // like normalization and multi-stroke key bindings. It compiles a\n // new normalized keymap, and then updates the old object to reflect\n // this.\n function normalizeKeyMap(keymap) {\n var copy = {};\n for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) {\n var value = keymap[keyname];\n if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue }\n if (value == \"...\") { delete keymap[keyname]; continue }\n\n var keys = map(keyname.split(\" \"), normalizeKeyName);\n for (var i = 0; i < keys.length; i++) {\n var val = (void 0), name = (void 0);\n if (i == keys.length - 1) {\n name = keys.join(\" \");\n val = value;\n } else {\n name = keys.slice(0, i + 1).join(\" \");\n val = \"...\";\n }\n var prev = copy[name];\n if (!prev) { copy[name] = val; }\n else if (prev != val) { throw new Error(\"Inconsistent bindings for \" + name) }\n }\n delete keymap[keyname];\n } }\n for (var prop in copy) { keymap[prop] = copy[prop]; }\n return keymap\n }\n\n function lookupKey(key, map, handle, context) {\n map = getKeyMap(map);\n var found = map.call ? map.call(key, context) : map[key];\n if (found === false) { return \"nothing\" }\n if (found === \"...\") { return \"multi\" }\n if (found != null && handle(found)) { return \"handled\" }\n\n if (map.fallthrough) {\n if (Object.prototype.toString.call(map.fallthrough) != \"[object Array]\")\n { return lookupKey(key, map.fallthrough, handle, context) }\n for (var i = 0; i < map.fallthrough.length; i++) {\n var result = lookupKey(key, map.fallthrough[i], handle, context);\n if (result) { return result }\n }\n }\n }\n\n // Modifier key presses don't count as 'real' key presses for the\n // purpose of keymap fallthrough.\n function isModifierKey(value) {\n var name = typeof value == \"string\" ? value : keyNames[value.keyCode];\n return name == \"Ctrl\" || name == \"Alt\" || name == \"Shift\" || name == \"Mod\"\n }\n\n function addModifierNames(name, event, noShift) {\n var base = name;\n if (event.altKey && base != \"Alt\") { name = \"Alt-\" + name; }\n if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != \"Ctrl\") { name = \"Ctrl-\" + name; }\n if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != \"Mod\") { name = \"Cmd-\" + name; }\n if (!noShift && event.shiftKey && base != \"Shift\") { name = \"Shift-\" + name; }\n return name\n }\n\n // Look up the name of a key as indicated by an event object.\n function keyName(event, noShift) {\n if (presto && event.keyCode == 34 && event[\"char\"]) { return false }\n var name = keyNames[event.keyCode];\n if (name == null || event.altGraphKey) { return false }\n // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,\n // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)\n if (event.keyCode == 3 && event.code) { name = event.code; }\n return addModifierNames(name, event, noShift)\n }\n\n function getKeyMap(val) {\n return typeof val == \"string\" ? keyMap[val] : val\n }\n\n // Helper for deleting text near the selection(s), used to implement\n // backspace, delete, and similar functionality.\n function deleteNearSelection(cm, compute) {\n var ranges = cm.doc.sel.ranges, kill = [];\n // Build up a set of ranges to kill first, merging overlapping\n // ranges.\n for (var i = 0; i < ranges.length; i++) {\n var toKill = compute(ranges[i]);\n while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {\n var replaced = kill.pop();\n if (cmp(replaced.from, toKill.from) < 0) {\n toKill.from = replaced.from;\n break\n }\n }\n kill.push(toKill);\n }\n // Next, remove those actual ranges.\n runInOp(cm, function () {\n for (var i = kill.length - 1; i >= 0; i--)\n { replaceRange(cm.doc, \"\", kill[i].from, kill[i].to, \"+delete\"); }\n ensureCursorVisible(cm);\n });\n }\n\n function moveCharLogically(line, ch, dir) {\n var target = skipExtendingChars(line.text, ch + dir, dir);\n return target < 0 || target > line.text.length ? null : target\n }\n\n function moveLogically(line, start, dir) {\n var ch = moveCharLogically(line, start.ch, dir);\n return ch == null ? null : new Pos(start.line, ch, dir < 0 ? \"after\" : \"before\")\n }\n\n function endOfLine(visually, cm, lineObj, lineNo, dir) {\n if (visually) {\n if (cm.doc.direction == \"rtl\") { dir = -dir; }\n var order = getOrder(lineObj, cm.doc.direction);\n if (order) {\n var part = dir < 0 ? lst(order) : order[0];\n var moveInStorageOrder = (dir < 0) == (part.level == 1);\n var sticky = moveInStorageOrder ? \"after\" : \"before\";\n var ch;\n // With a wrapped rtl chunk (possibly spanning multiple bidi parts),\n // it could be that the last bidi part is not on the last visual line,\n // since visual lines contain content order-consecutive chunks.\n // Thus, in rtl, we are looking for the first (content-order) character\n // in the rtl chunk that is on the last line (that is, the same line\n // as the last (content-order) character).\n if (part.level > 0 || cm.doc.direction == \"rtl\") {\n var prep = prepareMeasureForLine(cm, lineObj);\n ch = dir < 0 ? lineObj.text.length - 1 : 0;\n var targetTop = measureCharPrepared(cm, prep, ch).top;\n ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch);\n if (sticky == \"before\") { ch = moveCharLogically(lineObj, ch, 1); }\n } else { ch = dir < 0 ? part.to : part.from; }\n return new Pos(lineNo, ch, sticky)\n }\n }\n return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? \"before\" : \"after\")\n }\n\n function moveVisually(cm, line, start, dir) {\n var bidi = getOrder(line, cm.doc.direction);\n if (!bidi) { return moveLogically(line, start, dir) }\n if (start.ch >= line.text.length) {\n start.ch = line.text.length;\n start.sticky = \"before\";\n } else if (start.ch <= 0) {\n start.ch = 0;\n start.sticky = \"after\";\n }\n var partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos];\n if (cm.doc.direction == \"ltr\" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) {\n // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines,\n // nothing interesting happens.\n return moveLogically(line, start, dir)\n }\n\n var mv = function (pos, dir) { return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir); };\n var prep;\n var getWrappedLineExtent = function (ch) {\n if (!cm.options.lineWrapping) { return {begin: 0, end: line.text.length} }\n prep = prep || prepareMeasureForLine(cm, line);\n return wrappedLineExtentChar(cm, line, prep, ch)\n };\n var wrappedLineExtent = getWrappedLineExtent(start.sticky == \"before\" ? mv(start, -1) : start.ch);\n\n if (cm.doc.direction == \"rtl\" || part.level == 1) {\n var moveInStorageOrder = (part.level == 1) == (dir < 0);\n var ch = mv(start, moveInStorageOrder ? 1 : -1);\n if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) {\n // Case 2: We move within an rtl part or in an rtl editor on the same visual line\n var sticky = moveInStorageOrder ? \"before\" : \"after\";\n return new Pos(start.line, ch, sticky)\n }\n }\n\n // Case 3: Could not move within this bidi part in this visual line, so leave\n // the current bidi part\n\n var searchInVisualLine = function (partPos, dir, wrappedLineExtent) {\n var getRes = function (ch, moveInStorageOrder) { return moveInStorageOrder\n ? new Pos(start.line, mv(ch, 1), \"before\")\n : new Pos(start.line, ch, \"after\"); };\n\n for (; partPos >= 0 && partPos < bidi.length; partPos += dir) {\n var part = bidi[partPos];\n var moveInStorageOrder = (dir > 0) == (part.level != 1);\n var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1);\n if (part.from <= ch && ch < part.to) { return getRes(ch, moveInStorageOrder) }\n ch = moveInStorageOrder ? part.from : mv(part.to, -1);\n if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { return getRes(ch, moveInStorageOrder) }\n }\n };\n\n // Case 3a: Look for other bidi parts on the same visual line\n var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent);\n if (res) { return res }\n\n // Case 3b: Look for other bidi parts on the next visual line\n var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1);\n if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) {\n res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh));\n if (res) { return res }\n }\n\n // Case 4: Nowhere to move\n return null\n }\n\n // Commands are parameter-less actions that can be performed on an\n // editor, mostly used for keybindings.\n var commands = {\n selectAll: selectAll,\n singleSelection: function (cm) { return cm.setSelection(cm.getCursor(\"anchor\"), cm.getCursor(\"head\"), sel_dontScroll); },\n killLine: function (cm) { return deleteNearSelection(cm, function (range) {\n if (range.empty()) {\n var len = getLine(cm.doc, range.head.line).text.length;\n if (range.head.ch == len && range.head.line < cm.lastLine())\n { return {from: range.head, to: Pos(range.head.line + 1, 0)} }\n else\n { return {from: range.head, to: Pos(range.head.line, len)} }\n } else {\n return {from: range.from(), to: range.to()}\n }\n }); },\n deleteLine: function (cm) { return deleteNearSelection(cm, function (range) { return ({\n from: Pos(range.from().line, 0),\n to: clipPos(cm.doc, Pos(range.to().line + 1, 0))\n }); }); },\n delLineLeft: function (cm) { return deleteNearSelection(cm, function (range) { return ({\n from: Pos(range.from().line, 0), to: range.from()\n }); }); },\n delWrappedLineLeft: function (cm) { return deleteNearSelection(cm, function (range) {\n var top = cm.charCoords(range.head, \"div\").top + 5;\n var leftPos = cm.coordsChar({left: 0, top: top}, \"div\");\n return {from: leftPos, to: range.from()}\n }); },\n delWrappedLineRight: function (cm) { return deleteNearSelection(cm, function (range) {\n var top = cm.charCoords(range.head, \"div\").top + 5;\n var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\");\n return {from: range.from(), to: rightPos }\n }); },\n undo: function (cm) { return cm.undo(); },\n redo: function (cm) { return cm.redo(); },\n undoSelection: function (cm) { return cm.undoSelection(); },\n redoSelection: function (cm) { return cm.redoSelection(); },\n goDocStart: function (cm) { return cm.extendSelection(Pos(cm.firstLine(), 0)); },\n goDocEnd: function (cm) { return cm.extendSelection(Pos(cm.lastLine())); },\n goLineStart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStart(cm, range.head.line); },\n {origin: \"+move\", bias: 1}\n ); },\n goLineStartSmart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStartSmart(cm, range.head); },\n {origin: \"+move\", bias: 1}\n ); },\n goLineEnd: function (cm) { return cm.extendSelectionsBy(function (range) { return lineEnd(cm, range.head.line); },\n {origin: \"+move\", bias: -1}\n ); },\n goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, \"div\").top + 5;\n return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\")\n }, sel_move); },\n goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, \"div\").top + 5;\n return cm.coordsChar({left: 0, top: top}, \"div\")\n }, sel_move); },\n goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, \"div\").top + 5;\n var pos = cm.coordsChar({left: 0, top: top}, \"div\");\n if (pos.ch < cm.getLine(pos.line).search(/\\S/)) { return lineStartSmart(cm, range.head) }\n return pos\n }, sel_move); },\n goLineUp: function (cm) { return cm.moveV(-1, \"line\"); },\n goLineDown: function (cm) { return cm.moveV(1, \"line\"); },\n goPageUp: function (cm) { return cm.moveV(-1, \"page\"); },\n goPageDown: function (cm) { return cm.moveV(1, \"page\"); },\n goCharLeft: function (cm) { return cm.moveH(-1, \"char\"); },\n goCharRight: function (cm) { return cm.moveH(1, \"char\"); },\n goColumnLeft: function (cm) { return cm.moveH(-1, \"column\"); },\n goColumnRight: function (cm) { return cm.moveH(1, \"column\"); },\n goWordLeft: function (cm) { return cm.moveH(-1, \"word\"); },\n goGroupRight: function (cm) { return cm.moveH(1, \"group\"); },\n goGroupLeft: function (cm) { return cm.moveH(-1, \"group\"); },\n goWordRight: function (cm) { return cm.moveH(1, \"word\"); },\n delCharBefore: function (cm) { return cm.deleteH(-1, \"codepoint\"); },\n delCharAfter: function (cm) { return cm.deleteH(1, \"char\"); },\n delWordBefore: function (cm) { return cm.deleteH(-1, \"word\"); },\n delWordAfter: function (cm) { return cm.deleteH(1, \"word\"); },\n delGroupBefore: function (cm) { return cm.deleteH(-1, \"group\"); },\n delGroupAfter: function (cm) { return cm.deleteH(1, \"group\"); },\n indentAuto: function (cm) { return cm.indentSelection(\"smart\"); },\n indentMore: function (cm) { return cm.indentSelection(\"add\"); },\n indentLess: function (cm) { return cm.indentSelection(\"subtract\"); },\n insertTab: function (cm) { return cm.replaceSelection(\"\\t\"); },\n insertSoftTab: function (cm) {\n var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize;\n for (var i = 0; i < ranges.length; i++) {\n var pos = ranges[i].from();\n var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);\n spaces.push(spaceStr(tabSize - col % tabSize));\n }\n cm.replaceSelections(spaces);\n },\n defaultTab: function (cm) {\n if (cm.somethingSelected()) { cm.indentSelection(\"add\"); }\n else { cm.execCommand(\"insertTab\"); }\n },\n // Swap the two chars left and right of each selection's head.\n // Move cursor behind the two swapped characters afterwards.\n //\n // Doesn't consider line feeds a character.\n // Doesn't scan more than one line above to find a character.\n // Doesn't do anything on an empty line.\n // Doesn't do anything with non-empty selections.\n transposeChars: function (cm) { return runInOp(cm, function () {\n var ranges = cm.listSelections(), newSel = [];\n for (var i = 0; i < ranges.length; i++) {\n if (!ranges[i].empty()) { continue }\n var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;\n if (line) {\n if (cur.ch == line.length) { cur = new Pos(cur.line, cur.ch - 1); }\n if (cur.ch > 0) {\n cur = new Pos(cur.line, cur.ch + 1);\n cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),\n Pos(cur.line, cur.ch - 2), cur, \"+transpose\");\n } else if (cur.line > cm.doc.first) {\n var prev = getLine(cm.doc, cur.line - 1).text;\n if (prev) {\n cur = new Pos(cur.line, 1);\n cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() +\n prev.charAt(prev.length - 1),\n Pos(cur.line - 1, prev.length - 1), cur, \"+transpose\");\n }\n }\n }\n newSel.push(new Range(cur, cur));\n }\n cm.setSelections(newSel);\n }); },\n newlineAndIndent: function (cm) { return runInOp(cm, function () {\n var sels = cm.listSelections();\n for (var i = sels.length - 1; i >= 0; i--)\n { cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, \"+input\"); }\n sels = cm.listSelections();\n for (var i$1 = 0; i$1 < sels.length; i$1++)\n { cm.indentLine(sels[i$1].from().line, null, true); }\n ensureCursorVisible(cm);\n }); },\n openLine: function (cm) { return cm.replaceSelection(\"\\n\", \"start\"); },\n toggleOverwrite: function (cm) { return cm.toggleOverwrite(); }\n };\n\n\n function lineStart(cm, lineN) {\n var line = getLine(cm.doc, lineN);\n var visual = visualLine(line);\n if (visual != line) { lineN = lineNo(visual); }\n return endOfLine(true, cm, visual, lineN, 1)\n }\n function lineEnd(cm, lineN) {\n var line = getLine(cm.doc, lineN);\n var visual = visualLineEnd(line);\n if (visual != line) { lineN = lineNo(visual); }\n return endOfLine(true, cm, line, lineN, -1)\n }\n function lineStartSmart(cm, pos) {\n var start = lineStart(cm, pos.line);\n var line = getLine(cm.doc, start.line);\n var order = getOrder(line, cm.doc.direction);\n if (!order || order[0].level == 0) {\n var firstNonWS = Math.max(start.ch, line.text.search(/\\S/));\n var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;\n return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky)\n }\n return start\n }\n\n // Run a handler that was bound to a key.\n function doHandleBinding(cm, bound, dropShift) {\n if (typeof bound == \"string\") {\n bound = commands[bound];\n if (!bound) { return false }\n }\n // Ensure previous input has been read, so that the handler sees a\n // consistent view of the document\n cm.display.input.ensurePolled();\n var prevShift = cm.display.shift, done = false;\n try {\n if (cm.isReadOnly()) { cm.state.suppressEdits = true; }\n if (dropShift) { cm.display.shift = false; }\n done = bound(cm) != Pass;\n } finally {\n cm.display.shift = prevShift;\n cm.state.suppressEdits = false;\n }\n return done\n }\n\n function lookupKeyForEditor(cm, name, handle) {\n for (var i = 0; i < cm.state.keyMaps.length; i++) {\n var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);\n if (result) { return result }\n }\n return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))\n || lookupKey(name, cm.options.keyMap, handle, cm)\n }\n\n // Note that, despite the name, this function is also used to check\n // for bound mouse clicks.\n\n var stopSeq = new Delayed;\n\n function dispatchKey(cm, name, e, handle) {\n var seq = cm.state.keySeq;\n if (seq) {\n if (isModifierKey(name)) { return \"handled\" }\n if (/\\'$/.test(name))\n { cm.state.keySeq = null; }\n else\n { stopSeq.set(50, function () {\n if (cm.state.keySeq == seq) {\n cm.state.keySeq = null;\n cm.display.input.reset();\n }\n }); }\n if (dispatchKeyInner(cm, seq + \" \" + name, e, handle)) { return true }\n }\n return dispatchKeyInner(cm, name, e, handle)\n }\n\n function dispatchKeyInner(cm, name, e, handle) {\n var result = lookupKeyForEditor(cm, name, handle);\n\n if (result == \"multi\")\n { cm.state.keySeq = name; }\n if (result == \"handled\")\n { signalLater(cm, \"keyHandled\", cm, name, e); }\n\n if (result == \"handled\" || result == \"multi\") {\n e_preventDefault(e);\n restartBlink(cm);\n }\n\n return !!result\n }\n\n // Handle a key from the keydown event.\n function handleKeyBinding(cm, e) {\n var name = keyName(e, true);\n if (!name) { return false }\n\n if (e.shiftKey && !cm.state.keySeq) {\n // First try to resolve full name (including 'Shift-'). Failing\n // that, see if there is a cursor-motion command (starting with\n // 'go') bound to the keyname without 'Shift-'.\n return dispatchKey(cm, \"Shift-\" + name, e, function (b) { return doHandleBinding(cm, b, true); })\n || dispatchKey(cm, name, e, function (b) {\n if (typeof b == \"string\" ? /^go[A-Z]/.test(b) : b.motion)\n { return doHandleBinding(cm, b) }\n })\n } else {\n return dispatchKey(cm, name, e, function (b) { return doHandleBinding(cm, b); })\n }\n }\n\n // Handle a key from the keypress event\n function handleCharBinding(cm, e, ch) {\n return dispatchKey(cm, \"'\" + ch + \"'\", e, function (b) { return doHandleBinding(cm, b, true); })\n }\n\n var lastStoppedKey = null;\n function onKeyDown(e) {\n var cm = this;\n if (e.target && e.target != cm.display.input.getField()) { return }\n cm.curOp.focus = activeElt(root(cm));\n if (signalDOMEvent(cm, e)) { return }\n // IE does strange things with escape.\n if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; }\n var code = e.keyCode;\n cm.display.shift = code == 16 || e.shiftKey;\n var handled = handleKeyBinding(cm, e);\n if (presto) {\n lastStoppedKey = handled ? code : null;\n // Opera has no cut event... we try to at least catch the key combo\n if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))\n { cm.replaceSelection(\"\", null, \"cut\"); }\n }\n if (gecko && !mac && !handled && code == 46 && e.shiftKey && !e.ctrlKey && document.execCommand)\n { document.execCommand(\"cut\"); }\n\n // Turn mouse into crosshair when Alt is held on Mac.\n if (code == 18 && !/\\bCodeMirror-crosshair\\b/.test(cm.display.lineDiv.className))\n { showCrossHair(cm); }\n }\n\n function showCrossHair(cm) {\n var lineDiv = cm.display.lineDiv;\n addClass(lineDiv, \"CodeMirror-crosshair\");\n\n function up(e) {\n if (e.keyCode == 18 || !e.altKey) {\n rmClass(lineDiv, \"CodeMirror-crosshair\");\n off(document, \"keyup\", up);\n off(document, \"mouseover\", up);\n }\n }\n on(document, \"keyup\", up);\n on(document, \"mouseover\", up);\n }\n\n function onKeyUp(e) {\n if (e.keyCode == 16) { this.doc.sel.shift = false; }\n signalDOMEvent(this, e);\n }\n\n function onKeyPress(e) {\n var cm = this;\n if (e.target && e.target != cm.display.input.getField()) { return }\n if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return }\n var keyCode = e.keyCode, charCode = e.charCode;\n if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return}\n if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) { return }\n var ch = String.fromCharCode(charCode == null ? keyCode : charCode);\n // Some browsers fire keypress events for backspace\n if (ch == \"\\x08\") { return }\n if (handleCharBinding(cm, e, ch)) { return }\n cm.display.input.onKeyPress(e);\n }\n\n var DOUBLECLICK_DELAY = 400;\n\n var PastClick = function(time, pos, button) {\n this.time = time;\n this.pos = pos;\n this.button = button;\n };\n\n PastClick.prototype.compare = function (time, pos, button) {\n return this.time + DOUBLECLICK_DELAY > time &&\n cmp(pos, this.pos) == 0 && button == this.button\n };\n\n var lastClick, lastDoubleClick;\n function clickRepeat(pos, button) {\n var now = +new Date;\n if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) {\n lastClick = lastDoubleClick = null;\n return \"triple\"\n } else if (lastClick && lastClick.compare(now, pos, button)) {\n lastDoubleClick = new PastClick(now, pos, button);\n lastClick = null;\n return \"double\"\n } else {\n lastClick = new PastClick(now, pos, button);\n lastDoubleClick = null;\n return \"single\"\n }\n }\n\n // A mouse down can be a single click, double click, triple click,\n // start of selection drag, start of text drag, new cursor\n // (ctrl-click), rectangle drag (alt-drag), or xwin\n // middle-click-paste. Or it might be a click on something we should\n // not interfere with, such as a scrollbar or widget.\n function onMouseDown(e) {\n var cm = this, display = cm.display;\n if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return }\n display.input.ensurePolled();\n display.shift = e.shiftKey;\n\n if (eventInWidget(display, e)) {\n if (!webkit) {\n // Briefly turn off draggability, to allow widgets to do\n // normal dragging things.\n display.scroller.draggable = false;\n setTimeout(function () { return display.scroller.draggable = true; }, 100);\n }\n return\n }\n if (clickInGutter(cm, e)) { return }\n var pos = posFromMouse(cm, e), button = e_button(e), repeat = pos ? clickRepeat(pos, button) : \"single\";\n win(cm).focus();\n\n // #3261: make sure, that we're not starting a second selection\n if (button == 1 && cm.state.selectingText)\n { cm.state.selectingText(e); }\n\n if (pos && handleMappedButton(cm, button, pos, repeat, e)) { return }\n\n if (button == 1) {\n if (pos) { leftButtonDown(cm, pos, repeat, e); }\n else if (e_target(e) == display.scroller) { e_preventDefault(e); }\n } else if (button == 2) {\n if (pos) { extendSelection(cm.doc, pos); }\n setTimeout(function () { return display.input.focus(); }, 20);\n } else if (button == 3) {\n if (captureRightClick) { cm.display.input.onContextMenu(e); }\n else { delayBlurEvent(cm); }\n }\n }\n\n function handleMappedButton(cm, button, pos, repeat, event) {\n var name = \"Click\";\n if (repeat == \"double\") { name = \"Double\" + name; }\n else if (repeat == \"triple\") { name = \"Triple\" + name; }\n name = (button == 1 ? \"Left\" : button == 2 ? \"Middle\" : \"Right\") + name;\n\n return dispatchKey(cm, addModifierNames(name, event), event, function (bound) {\n if (typeof bound == \"string\") { bound = commands[bound]; }\n if (!bound) { return false }\n var done = false;\n try {\n if (cm.isReadOnly()) { cm.state.suppressEdits = true; }\n done = bound(cm, pos) != Pass;\n } finally {\n cm.state.suppressEdits = false;\n }\n return done\n })\n }\n\n function configureMouse(cm, repeat, event) {\n var option = cm.getOption(\"configureMouse\");\n var value = option ? option(cm, repeat, event) : {};\n if (value.unit == null) {\n var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey;\n value.unit = rect ? \"rectangle\" : repeat == \"single\" ? \"char\" : repeat == \"double\" ? \"word\" : \"line\";\n }\n if (value.extend == null || cm.doc.extend) { value.extend = cm.doc.extend || event.shiftKey; }\n if (value.addNew == null) { value.addNew = mac ? event.metaKey : event.ctrlKey; }\n if (value.moveOnDrag == null) { value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey); }\n return value\n }\n\n function leftButtonDown(cm, pos, repeat, event) {\n if (ie) { setTimeout(bind(ensureFocus, cm), 0); }\n else { cm.curOp.focus = activeElt(root(cm)); }\n\n var behavior = configureMouse(cm, repeat, event);\n\n var sel = cm.doc.sel, contained;\n if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&\n repeat == \"single\" && (contained = sel.contains(pos)) > -1 &&\n (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) &&\n (cmp(contained.to(), pos) > 0 || pos.xRel < 0))\n { leftButtonStartDrag(cm, event, pos, behavior); }\n else\n { leftButtonSelect(cm, event, pos, behavior); }\n }\n\n // Start a text drag. When it ends, see if any dragging actually\n // happen, and treat as a click if it didn't.\n function leftButtonStartDrag(cm, event, pos, behavior) {\n var display = cm.display, moved = false;\n var dragEnd = operation(cm, function (e) {\n if (webkit) { display.scroller.draggable = false; }\n cm.state.draggingText = false;\n if (cm.state.delayingBlurEvent) {\n if (cm.hasFocus()) { cm.state.delayingBlurEvent = false; }\n else { delayBlurEvent(cm); }\n }\n off(display.wrapper.ownerDocument, \"mouseup\", dragEnd);\n off(display.wrapper.ownerDocument, \"mousemove\", mouseMove);\n off(display.scroller, \"dragstart\", dragStart);\n off(display.scroller, \"drop\", dragEnd);\n if (!moved) {\n e_preventDefault(e);\n if (!behavior.addNew)\n { extendSelection(cm.doc, pos, null, null, behavior.extend); }\n // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)\n if ((webkit && !safari) || ie && ie_version == 9)\n { setTimeout(function () {display.wrapper.ownerDocument.body.focus({preventScroll: true}); display.input.focus();}, 20); }\n else\n { display.input.focus(); }\n }\n });\n var mouseMove = function(e2) {\n moved = moved || Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10;\n };\n var dragStart = function () { return moved = true; };\n // Let the drag handler handle this.\n if (webkit) { display.scroller.draggable = true; }\n cm.state.draggingText = dragEnd;\n dragEnd.copy = !behavior.moveOnDrag;\n on(display.wrapper.ownerDocument, \"mouseup\", dragEnd);\n on(display.wrapper.ownerDocument, \"mousemove\", mouseMove);\n on(display.scroller, \"dragstart\", dragStart);\n on(display.scroller, \"drop\", dragEnd);\n\n cm.state.delayingBlurEvent = true;\n setTimeout(function () { return display.input.focus(); }, 20);\n // IE's approach to draggable\n if (display.scroller.dragDrop) { display.scroller.dragDrop(); }\n }\n\n function rangeForUnit(cm, pos, unit) {\n if (unit == \"char\") { return new Range(pos, pos) }\n if (unit == \"word\") { return cm.findWordAt(pos) }\n if (unit == \"line\") { return new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) }\n var result = unit(cm, pos);\n return new Range(result.from, result.to)\n }\n\n // Normal selection, as opposed to text dragging.\n function leftButtonSelect(cm, event, start, behavior) {\n if (ie) { delayBlurEvent(cm); }\n var display = cm.display, doc = cm.doc;\n e_preventDefault(event);\n\n var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;\n if (behavior.addNew && !behavior.extend) {\n ourIndex = doc.sel.contains(start);\n if (ourIndex > -1)\n { ourRange = ranges[ourIndex]; }\n else\n { ourRange = new Range(start, start); }\n } else {\n ourRange = doc.sel.primary();\n ourIndex = doc.sel.primIndex;\n }\n\n if (behavior.unit == \"rectangle\") {\n if (!behavior.addNew) { ourRange = new Range(start, start); }\n start = posFromMouse(cm, event, true, true);\n ourIndex = -1;\n } else {\n var range = rangeForUnit(cm, start, behavior.unit);\n if (behavior.extend)\n { ourRange = extendRange(ourRange, range.anchor, range.head, behavior.extend); }\n else\n { ourRange = range; }\n }\n\n if (!behavior.addNew) {\n ourIndex = 0;\n setSelection(doc, new Selection([ourRange], 0), sel_mouse);\n startSel = doc.sel;\n } else if (ourIndex == -1) {\n ourIndex = ranges.length;\n setSelection(doc, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex),\n {scroll: false, origin: \"*mouse\"});\n } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == \"char\" && !behavior.extend) {\n setSelection(doc, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),\n {scroll: false, origin: \"*mouse\"});\n startSel = doc.sel;\n } else {\n replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);\n }\n\n var lastPos = start;\n function extendTo(pos) {\n if (cmp(lastPos, pos) == 0) { return }\n lastPos = pos;\n\n if (behavior.unit == \"rectangle\") {\n var ranges = [], tabSize = cm.options.tabSize;\n var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);\n var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);\n var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);\n for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n line <= end; line++) {\n var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);\n if (left == right)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }\n else if (text.length > leftPos)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }\n }\n if (!ranges.length) { ranges.push(new Range(start, start)); }\n setSelection(doc, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n {origin: \"*mouse\", scroll: false});\n cm.scrollIntoView(pos);\n } else {\n var oldRange = ourRange;\n var range = rangeForUnit(cm, pos, behavior.unit);\n var anchor = oldRange.anchor, head;\n if (cmp(range.anchor, anchor) > 0) {\n head = range.head;\n anchor = minPos(oldRange.from(), range.anchor);\n } else {\n head = range.anchor;\n anchor = maxPos(oldRange.to(), range.head);\n }\n var ranges$1 = startSel.ranges.slice(0);\n ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head));\n setSelection(doc, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse);\n }\n }\n\n var editorSize = display.wrapper.getBoundingClientRect();\n // Used to ensure timeout re-tries don't fire when another extend\n // happened in the meantime (clearTimeout isn't reliable -- at\n // least on Chrome, the timeouts still happen even when cleared,\n // if the clear happens after their scheduled firing time).\n var counter = 0;\n\n function extend(e) {\n var curCount = ++counter;\n var cur = posFromMouse(cm, e, true, behavior.unit == \"rectangle\");\n if (!cur) { return }\n if (cmp(cur, lastPos) != 0) {\n cm.curOp.focus = activeElt(root(cm));\n extendTo(cur);\n var visible = visibleLines(display, doc);\n if (cur.line >= visible.to || cur.line < visible.from)\n { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }\n } else {\n var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;\n if (outside) { setTimeout(operation(cm, function () {\n if (counter != curCount) { return }\n display.scroller.scrollTop += outside;\n extend(e);\n }), 50); }\n }\n }\n\n function done(e) {\n cm.state.selectingText = false;\n counter = Infinity;\n // If e is null or undefined we interpret this as someone trying\n // to explicitly cancel the selection rather than the user\n // letting go of the mouse button.\n if (e) {\n e_preventDefault(e);\n display.input.focus();\n }\n off(display.wrapper.ownerDocument, \"mousemove\", move);\n off(display.wrapper.ownerDocument, \"mouseup\", up);\n doc.history.lastSelOrigin = null;\n }\n\n var move = operation(cm, function (e) {\n if (e.buttons === 0 || !e_button(e)) { done(e); }\n else { extend(e); }\n });\n var up = operation(cm, done);\n cm.state.selectingText = up;\n on(display.wrapper.ownerDocument, \"mousemove\", move);\n on(display.wrapper.ownerDocument, \"mouseup\", up);\n }\n\n // Used when mouse-selecting to adjust the anchor to the proper side\n // of a bidi jump depending on the visual position of the head.\n function bidiSimplify(cm, range) {\n var anchor = range.anchor;\n var head = range.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range }\n var order = getOrder(anchorLine);\n if (!order) { return range }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head)\n }\n\n\n // Determines whether an event happened in the gutter, and fires the\n // handlers for the corresponding event.\n function gutterEvent(cm, e, type, prevent) {\n var mX, mY;\n if (e.touches) {\n mX = e.touches[0].clientX;\n mY = e.touches[0].clientY;\n } else {\n try { mX = e.clientX; mY = e.clientY; }\n catch(e$1) { return false }\n }\n if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false }\n if (prevent) { e_preventDefault(e); }\n\n var display = cm.display;\n var lineBox = display.lineDiv.getBoundingClientRect();\n\n if (mY > lineBox.bottom || !hasHandler(cm, type)) { return e_defaultPrevented(e) }\n mY -= lineBox.top - display.viewOffset;\n\n for (var i = 0; i < cm.display.gutterSpecs.length; ++i) {\n var g = display.gutters.childNodes[i];\n if (g && g.getBoundingClientRect().right >= mX) {\n var line = lineAtHeight(cm.doc, mY);\n var gutter = cm.display.gutterSpecs[i];\n signal(cm, type, cm, line, gutter.className, e);\n return e_defaultPrevented(e)\n }\n }\n }\n\n function clickInGutter(cm, e) {\n return gutterEvent(cm, e, \"gutterClick\", true)\n }\n\n // CONTEXT MENU HANDLING\n\n // To make the context menu work, we need to briefly unhide the\n // textarea (making it as unobtrusive as possible) to let the\n // right-click take effect on it.\n function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n if (!captureRightClick) { cm.display.input.onContextMenu(e); }\n }\n\n function contextMenuInGutter(cm, e) {\n if (!hasHandler(cm, \"gutterContextMenu\")) { return false }\n return gutterEvent(cm, e, \"gutterContextMenu\", false)\n }\n\n function themeChanged(cm) {\n cm.display.wrapper.className = cm.display.wrapper.className.replace(/\\s*cm-s-\\S+/g, \"\") +\n cm.options.theme.replace(/(^|\\s)\\s*/g, \" cm-s-\");\n clearCaches(cm);\n }\n\n var Init = {toString: function(){return \"CodeMirror.Init\"}};\n\n var defaults = {};\n var optionHandlers = {};\n\n function defineOptions(CodeMirror) {\n var optionHandlers = CodeMirror.optionHandlers;\n\n function option(name, deflt, handle, notOnInit) {\n CodeMirror.defaults[name] = deflt;\n if (handle) { optionHandlers[name] =\n notOnInit ? function (cm, val, old) {if (old != Init) { handle(cm, val, old); }} : handle; }\n }\n\n CodeMirror.defineOption = option;\n\n // Passed to option handlers when there is no old value.\n CodeMirror.Init = Init;\n\n // These two are, on init, called from the constructor because they\n // have to be initialized before the editor can start at all.\n option(\"value\", \"\", function (cm, val) { return cm.setValue(val); }, true);\n option(\"mode\", null, function (cm, val) {\n cm.doc.modeOption = val;\n loadMode(cm);\n }, true);\n\n option(\"indentUnit\", 2, loadMode, true);\n option(\"indentWithTabs\", false);\n option(\"smartIndent\", true);\n option(\"tabSize\", 4, function (cm) {\n resetModeState(cm);\n clearCaches(cm);\n regChange(cm);\n }, true);\n\n option(\"lineSeparator\", null, function (cm, val) {\n cm.doc.lineSep = val;\n if (!val) { return }\n var newBreaks = [], lineNo = cm.doc.first;\n cm.doc.iter(function (line) {\n for (var pos = 0;;) {\n var found = line.text.indexOf(val, pos);\n if (found == -1) { break }\n pos = found + val.length;\n newBreaks.push(Pos(lineNo, found));\n }\n lineNo++;\n });\n for (var i = newBreaks.length - 1; i >= 0; i--)\n { replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }\n });\n option(\"specialChars\", /[\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u061c\\u200b\\u200e\\u200f\\u2028\\u2029\\u202d\\u202e\\u2066\\u2067\\u2069\\ufeff\\ufff9-\\ufffc]/g, function (cm, val, old) {\n cm.state.specialChars = new RegExp(val.source + (val.test(\"\\t\") ? \"\" : \"|\\t\"), \"g\");\n if (old != Init) { cm.refresh(); }\n });\n option(\"specialCharPlaceholder\", defaultSpecialCharPlaceholder, function (cm) { return cm.refresh(); }, true);\n option(\"electricChars\", true);\n option(\"inputStyle\", mobile ? \"contenteditable\" : \"textarea\", function () {\n throw new Error(\"inputStyle can not (yet) be changed in a running editor\") // FIXME\n }, true);\n option(\"spellcheck\", false, function (cm, val) { return cm.getInputField().spellcheck = val; }, true);\n option(\"autocorrect\", false, function (cm, val) { return cm.getInputField().autocorrect = val; }, true);\n option(\"autocapitalize\", false, function (cm, val) { return cm.getInputField().autocapitalize = val; }, true);\n option(\"rtlMoveVisually\", !windows);\n option(\"wholeLineUpdateBefore\", true);\n\n option(\"theme\", \"default\", function (cm) {\n themeChanged(cm);\n updateGutters(cm);\n }, true);\n option(\"keyMap\", \"default\", function (cm, val, old) {\n var next = getKeyMap(val);\n var prev = old != Init && getKeyMap(old);\n if (prev && prev.detach) { prev.detach(cm, next); }\n if (next.attach) { next.attach(cm, prev || null); }\n });\n option(\"extraKeys\", null);\n option(\"configureMouse\", null);\n\n option(\"lineWrapping\", false, wrappingChanged, true);\n option(\"gutters\", [], function (cm, val) {\n cm.display.gutterSpecs = getGutters(val, cm.options.lineNumbers);\n updateGutters(cm);\n }, true);\n option(\"fixedGutter\", true, function (cm, val) {\n cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + \"px\" : \"0\";\n cm.refresh();\n }, true);\n option(\"coverGutterNextToScrollbar\", false, function (cm) { return updateScrollbars(cm); }, true);\n option(\"scrollbarStyle\", \"native\", function (cm) {\n initScrollbars(cm);\n updateScrollbars(cm);\n cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);\n cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);\n }, true);\n option(\"lineNumbers\", false, function (cm, val) {\n cm.display.gutterSpecs = getGutters(cm.options.gutters, val);\n updateGutters(cm);\n }, true);\n option(\"firstLineNumber\", 1, updateGutters, true);\n option(\"lineNumberFormatter\", function (integer) { return integer; }, updateGutters, true);\n option(\"showCursorWhenSelecting\", false, updateSelection, true);\n\n option(\"resetSelectionOnContextMenu\", true);\n option(\"lineWiseCopyCut\", true);\n option(\"pasteLinesPerSelection\", true);\n option(\"selectionsMayTouch\", false);\n\n option(\"readOnly\", false, function (cm, val) {\n if (val == \"nocursor\") {\n onBlur(cm);\n cm.display.input.blur();\n }\n cm.display.input.readOnlyChanged(val);\n });\n\n option(\"screenReaderLabel\", null, function (cm, val) {\n val = (val === '') ? null : val;\n cm.display.input.screenReaderLabelChanged(val);\n });\n\n option(\"disableInput\", false, function (cm, val) {if (!val) { cm.display.input.reset(); }}, true);\n option(\"dragDrop\", true, dragDropChanged);\n option(\"allowDropFileTypes\", null);\n\n option(\"cursorBlinkRate\", 530);\n option(\"cursorScrollMargin\", 0);\n option(\"cursorHeight\", 1, updateSelection, true);\n option(\"singleCursorHeightPerLine\", true, updateSelection, true);\n option(\"workTime\", 100);\n option(\"workDelay\", 100);\n option(\"flattenSpans\", true, resetModeState, true);\n option(\"addModeClass\", false, resetModeState, true);\n option(\"pollInterval\", 100);\n option(\"undoDepth\", 200, function (cm, val) { return cm.doc.history.undoDepth = val; });\n option(\"historyEventDelay\", 1250);\n option(\"viewportMargin\", 10, function (cm) { return cm.refresh(); }, true);\n option(\"maxHighlightLength\", 10000, resetModeState, true);\n option(\"moveInputWithCursor\", true, function (cm, val) {\n if (!val) { cm.display.input.resetPosition(); }\n });\n\n option(\"tabindex\", null, function (cm, val) { return cm.display.input.getField().tabIndex = val || \"\"; });\n option(\"autofocus\", null);\n option(\"direction\", \"ltr\", function (cm, val) { return cm.doc.setDirection(val); }, true);\n option(\"phrases\", null);\n }\n\n function dragDropChanged(cm, value, old) {\n var wasOn = old && old != Init;\n if (!value != !wasOn) {\n var funcs = cm.display.dragFunctions;\n var toggle = value ? on : off;\n toggle(cm.display.scroller, \"dragstart\", funcs.start);\n toggle(cm.display.scroller, \"dragenter\", funcs.enter);\n toggle(cm.display.scroller, \"dragover\", funcs.over);\n toggle(cm.display.scroller, \"dragleave\", funcs.leave);\n toggle(cm.display.scroller, \"drop\", funcs.drop);\n }\n }\n\n function wrappingChanged(cm) {\n if (cm.options.lineWrapping) {\n addClass(cm.display.wrapper, \"CodeMirror-wrap\");\n cm.display.sizer.style.minWidth = \"\";\n cm.display.sizerWidth = null;\n } else {\n rmClass(cm.display.wrapper, \"CodeMirror-wrap\");\n findMaxLine(cm);\n }\n estimateLineHeights(cm);\n regChange(cm);\n clearCaches(cm);\n setTimeout(function () { return updateScrollbars(cm); }, 100);\n }\n\n // A CodeMirror instance represents an editor. This is the object\n // that user code is usually dealing with.\n\n function CodeMirror(place, options) {\n var this$1 = this;\n\n if (!(this instanceof CodeMirror)) { return new CodeMirror(place, options) }\n\n this.options = options = options ? copyObj(options) : {};\n // Determine effective options based on given values and defaults.\n copyObj(defaults, options, false);\n\n var doc = options.value;\n if (typeof doc == \"string\") { doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction); }\n else if (options.mode) { doc.modeOption = options.mode; }\n this.doc = doc;\n\n var input = new CodeMirror.inputStyles[options.inputStyle](this);\n var display = this.display = new Display(place, doc, input, options);\n display.wrapper.CodeMirror = this;\n themeChanged(this);\n if (options.lineWrapping)\n { this.display.wrapper.className += \" CodeMirror-wrap\"; }\n initScrollbars(this);\n\n this.state = {\n keyMaps: [], // stores maps added by addKeyMap\n overlays: [], // highlighting overlays, as added by addOverlay\n modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info\n overwrite: false,\n delayingBlurEvent: false,\n focused: false,\n suppressEdits: false, // used to disable editing during key handlers when in readOnly mode\n pasteIncoming: -1, cutIncoming: -1, // help recognize paste/cut edits in input.poll\n selectingText: false,\n draggingText: false,\n highlight: new Delayed(), // stores highlight worker timeout\n keySeq: null, // Unfinished key sequence\n specialChars: null\n };\n\n if (options.autofocus && !mobile) { display.input.focus(); }\n\n // Override magic textarea content restore that IE sometimes does\n // on our hidden textarea on reload\n if (ie && ie_version < 11) { setTimeout(function () { return this$1.display.input.reset(true); }, 20); }\n\n registerEventHandlers(this);\n ensureGlobalHandlers();\n\n startOperation(this);\n this.curOp.forceUpdate = true;\n attachDoc(this, doc);\n\n if ((options.autofocus && !mobile) || this.hasFocus())\n { setTimeout(function () {\n if (this$1.hasFocus() && !this$1.state.focused) { onFocus(this$1); }\n }, 20); }\n else\n { onBlur(this); }\n\n for (var opt in optionHandlers) { if (optionHandlers.hasOwnProperty(opt))\n { optionHandlers[opt](this, options[opt], Init); } }\n maybeUpdateLineNumberWidth(this);\n if (options.finishInit) { options.finishInit(this); }\n for (var i = 0; i < initHooks.length; ++i) { initHooks[i](this); }\n endOperation(this);\n // Suppress optimizelegibility in Webkit, since it breaks text\n // measuring on line wrapping boundaries.\n if (webkit && options.lineWrapping &&\n getComputedStyle(display.lineDiv).textRendering == \"optimizelegibility\")\n { display.lineDiv.style.textRendering = \"auto\"; }\n }\n\n // The default configuration options.\n CodeMirror.defaults = defaults;\n // Functions to run when options are changed.\n CodeMirror.optionHandlers = optionHandlers;\n\n // Attach the necessary event handlers when initializing the editor\n function registerEventHandlers(cm) {\n var d = cm.display;\n on(d.scroller, \"mousedown\", operation(cm, onMouseDown));\n // Older IE's will not fire a second mousedown for a double click\n if (ie && ie_version < 11)\n { on(d.scroller, \"dblclick\", operation(cm, function (e) {\n if (signalDOMEvent(cm, e)) { return }\n var pos = posFromMouse(cm, e);\n if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) { return }\n e_preventDefault(e);\n var word = cm.findWordAt(pos);\n extendSelection(cm.doc, word.anchor, word.head);\n })); }\n else\n { on(d.scroller, \"dblclick\", function (e) { return signalDOMEvent(cm, e) || e_preventDefault(e); }); }\n // Some browsers fire contextmenu *after* opening the menu, at\n // which point we can't mess with it anymore. Context menu is\n // handled in onMouseDown for these browsers.\n on(d.scroller, \"contextmenu\", function (e) { return onContextMenu(cm, e); });\n on(d.input.getField(), \"contextmenu\", function (e) {\n if (!d.scroller.contains(e.target)) { onContextMenu(cm, e); }\n });\n\n // Used to suppress mouse event handling when a touch happens\n var touchFinished, prevTouch = {end: 0};\n function finishTouch() {\n if (d.activeTouch) {\n touchFinished = setTimeout(function () { return d.activeTouch = null; }, 1000);\n prevTouch = d.activeTouch;\n prevTouch.end = +new Date;\n }\n }\n function isMouseLikeTouchEvent(e) {\n if (e.touches.length != 1) { return false }\n var touch = e.touches[0];\n return touch.radiusX <= 1 && touch.radiusY <= 1\n }\n function farAway(touch, other) {\n if (other.left == null) { return true }\n var dx = other.left - touch.left, dy = other.top - touch.top;\n return dx * dx + dy * dy > 20 * 20\n }\n on(d.scroller, \"touchstart\", function (e) {\n if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) {\n d.input.ensurePolled();\n clearTimeout(touchFinished);\n var now = +new Date;\n d.activeTouch = {start: now, moved: false,\n prev: now - prevTouch.end <= 300 ? prevTouch : null};\n if (e.touches.length == 1) {\n d.activeTouch.left = e.touches[0].pageX;\n d.activeTouch.top = e.touches[0].pageY;\n }\n }\n });\n on(d.scroller, \"touchmove\", function () {\n if (d.activeTouch) { d.activeTouch.moved = true; }\n });\n on(d.scroller, \"touchend\", function (e) {\n var touch = d.activeTouch;\n if (touch && !eventInWidget(d, e) && touch.left != null &&\n !touch.moved && new Date - touch.start < 300) {\n var pos = cm.coordsChar(d.activeTouch, \"page\"), range;\n if (!touch.prev || farAway(touch, touch.prev)) // Single tap\n { range = new Range(pos, pos); }\n else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap\n { range = cm.findWordAt(pos); }\n else // Triple tap\n { range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); }\n cm.setSelection(range.anchor, range.head);\n cm.focus();\n e_preventDefault(e);\n }\n finishTouch();\n });\n on(d.scroller, \"touchcancel\", finishTouch);\n\n // Sync scrolling between fake scrollbars and real scrollable\n // area, ensure viewport is updated when scrolling.\n on(d.scroller, \"scroll\", function () {\n if (d.scroller.clientHeight) {\n updateScrollTop(cm, d.scroller.scrollTop);\n setScrollLeft(cm, d.scroller.scrollLeft, true);\n signal(cm, \"scroll\", cm);\n }\n });\n\n // Listen to wheel events in order to try and update the viewport on time.\n on(d.scroller, \"mousewheel\", function (e) { return onScrollWheel(cm, e); });\n on(d.scroller, \"DOMMouseScroll\", function (e) { return onScrollWheel(cm, e); });\n\n // Prevent wrapper from ever scrolling\n on(d.wrapper, \"scroll\", function () { return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });\n\n d.dragFunctions = {\n enter: function (e) {if (!signalDOMEvent(cm, e)) { e_stop(e); }},\n over: function (e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},\n start: function (e) { return onDragStart(cm, e); },\n drop: operation(cm, onDrop),\n leave: function (e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }}\n };\n\n var inp = d.input.getField();\n on(inp, \"keyup\", function (e) { return onKeyUp.call(cm, e); });\n on(inp, \"keydown\", operation(cm, onKeyDown));\n on(inp, \"keypress\", operation(cm, onKeyPress));\n on(inp, \"focus\", function (e) { return onFocus(cm, e); });\n on(inp, \"blur\", function (e) { return onBlur(cm, e); });\n }\n\n var initHooks = [];\n CodeMirror.defineInitHook = function (f) { return initHooks.push(f); };\n\n // Indent the given line. The how parameter can be \"smart\",\n // \"add\"/null, \"subtract\", or \"prev\". When aggressive is false\n // (typically set to true for forced single-line indents), empty\n // lines are not indented, and places where the mode returns Pass\n // are left alone.\n function indentLine(cm, n, how, aggressive) {\n var doc = cm.doc, state;\n if (how == null) { how = \"add\"; }\n if (how == \"smart\") {\n // Fall back to \"prev\" when the mode doesn't have an indentation\n // method.\n if (!doc.mode.indent) { how = \"prev\"; }\n else { state = getContextBefore(cm, n).state; }\n }\n\n var tabSize = cm.options.tabSize;\n var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);\n if (line.stateAfter) { line.stateAfter = null; }\n var curSpaceString = line.text.match(/^\\s*/)[0], indentation;\n if (!aggressive && !/\\S/.test(line.text)) {\n indentation = 0;\n how = \"not\";\n } else if (how == \"smart\") {\n indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);\n if (indentation == Pass || indentation > 150) {\n if (!aggressive) { return }\n how = \"prev\";\n }\n }\n if (how == \"prev\") {\n if (n > doc.first) { indentation = countColumn(getLine(doc, n-1).text, null, tabSize); }\n else { indentation = 0; }\n } else if (how == \"add\") {\n indentation = curSpace + cm.options.indentUnit;\n } else if (how == \"subtract\") {\n indentation = curSpace - cm.options.indentUnit;\n } else if (typeof how == \"number\") {\n indentation = curSpace + how;\n }\n indentation = Math.max(0, indentation);\n\n var indentString = \"\", pos = 0;\n if (cm.options.indentWithTabs)\n { for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += \"\\t\";} }\n if (pos < indentation) { indentString += spaceStr(indentation - pos); }\n\n if (indentString != curSpaceString) {\n replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), \"+input\");\n line.stateAfter = null;\n return true\n } else {\n // Ensure that, if the cursor was in the whitespace at the start\n // of the line, it is moved to the end of that space.\n for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) {\n var range = doc.sel.ranges[i$1];\n if (range.head.line == n && range.head.ch < curSpaceString.length) {\n var pos$1 = Pos(n, curSpaceString.length);\n replaceOneSelection(doc, i$1, new Range(pos$1, pos$1));\n break\n }\n }\n }\n }\n\n // This will be set to a {lineWise: bool, text: [string]} object, so\n // that, when pasting, we know what kind of selections the copied\n // text was made out of.\n var lastCopied = null;\n\n function setLastCopied(newLastCopied) {\n lastCopied = newLastCopied;\n }\n\n function applyTextInput(cm, inserted, deleted, sel, origin) {\n var doc = cm.doc;\n cm.display.shift = false;\n if (!sel) { sel = doc.sel; }\n\n var recent = +new Date - 200;\n var paste = origin == \"paste\" || cm.state.pasteIncoming > recent;\n var textLines = splitLinesAuto(inserted), multiPaste = null;\n // When pasting N lines into N selections, insert one line per selection\n if (paste && sel.ranges.length > 1) {\n if (lastCopied && lastCopied.text.join(\"\\n\") == inserted) {\n if (sel.ranges.length % lastCopied.text.length == 0) {\n multiPaste = [];\n for (var i = 0; i < lastCopied.text.length; i++)\n { multiPaste.push(doc.splitLines(lastCopied.text[i])); }\n }\n } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) {\n multiPaste = map(textLines, function (l) { return [l]; });\n }\n }\n\n var updateInput = cm.curOp.updateInput;\n // Normal behavior is to insert the new text into every selection\n for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) {\n var range = sel.ranges[i$1];\n var from = range.from(), to = range.to();\n if (range.empty()) {\n if (deleted && deleted > 0) // Handle deletion\n { from = Pos(from.line, from.ch - deleted); }\n else if (cm.state.overwrite && !paste) // Handle overwrite\n { to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); }\n else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join(\"\\n\") == textLines.join(\"\\n\"))\n { from = to = Pos(from.line, 0); }\n }\n var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,\n origin: origin || (paste ? \"paste\" : cm.state.cutIncoming > recent ? \"cut\" : \"+input\")};\n makeChange(cm.doc, changeEvent);\n signalLater(cm, \"inputRead\", cm, changeEvent);\n }\n if (inserted && !paste)\n { triggerElectric(cm, inserted); }\n\n ensureCursorVisible(cm);\n if (cm.curOp.updateInput < 2) { cm.curOp.updateInput = updateInput; }\n cm.curOp.typing = true;\n cm.state.pasteIncoming = cm.state.cutIncoming = -1;\n }\n\n function handlePaste(e, cm) {\n var pasted = e.clipboardData && e.clipboardData.getData(\"Text\");\n if (pasted) {\n e.preventDefault();\n if (!cm.isReadOnly() && !cm.options.disableInput && cm.hasFocus())\n { runInOp(cm, function () { return applyTextInput(cm, pasted, 0, null, \"paste\"); }); }\n return true\n }\n }\n\n function triggerElectric(cm, inserted) {\n // When an 'electric' character is inserted, immediately trigger a reindent\n if (!cm.options.electricChars || !cm.options.smartIndent) { return }\n var sel = cm.doc.sel;\n\n for (var i = sel.ranges.length - 1; i >= 0; i--) {\n var range = sel.ranges[i];\n if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) { continue }\n var mode = cm.getModeAt(range.head);\n var indented = false;\n if (mode.electricChars) {\n for (var j = 0; j < mode.electricChars.length; j++)\n { if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\n indented = indentLine(cm, range.head.line, \"smart\");\n break\n } }\n } else if (mode.electricInput) {\n if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch)))\n { indented = indentLine(cm, range.head.line, \"smart\"); }\n }\n if (indented) { signalLater(cm, \"electricInput\", cm, range.head.line); }\n }\n }\n\n function copyableRanges(cm) {\n var text = [], ranges = [];\n for (var i = 0; i < cm.doc.sel.ranges.length; i++) {\n var line = cm.doc.sel.ranges[i].head.line;\n var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};\n ranges.push(lineRange);\n text.push(cm.getRange(lineRange.anchor, lineRange.head));\n }\n return {text: text, ranges: ranges}\n }\n\n function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) {\n field.setAttribute(\"autocorrect\", autocorrect ? \"on\" : \"off\");\n field.setAttribute(\"autocapitalize\", autocapitalize ? \"on\" : \"off\");\n field.setAttribute(\"spellcheck\", !!spellcheck);\n }\n\n function hiddenTextarea() {\n var te = elt(\"textarea\", null, null, \"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none\");\n var div = elt(\"div\", [te], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n // The textarea is kept positioned near the cursor to prevent the\n // fact that it'll be scrolled into view on input from scrolling\n // our fake cursor out of view. On webkit, when wrap=off, paste is\n // very slow. So make the area wide instead.\n if (webkit) { te.style.width = \"1000px\"; }\n else { te.setAttribute(\"wrap\", \"off\"); }\n // If border: 0; -- iOS fails to open keyboard (issue #1287)\n if (ios) { te.style.border = \"1px solid black\"; }\n return div\n }\n\n // The publicly visible API. Note that methodOp(f) means\n // 'wrap f in an operation, performed on its `this` parameter'.\n\n // This is not the complete set of editor methods. Most of the\n // methods defined on the Doc type are also injected into\n // CodeMirror.prototype, for backwards compatibility and\n // convenience.\n\n function addEditorMethods(CodeMirror) {\n var optionHandlers = CodeMirror.optionHandlers;\n\n var helpers = CodeMirror.helpers = {};\n\n CodeMirror.prototype = {\n constructor: CodeMirror,\n focus: function(){win(this).focus(); this.display.input.focus();},\n\n setOption: function(option, value) {\n var options = this.options, old = options[option];\n if (options[option] == value && option != \"mode\") { return }\n options[option] = value;\n if (optionHandlers.hasOwnProperty(option))\n { operation(this, optionHandlers[option])(this, value, old); }\n signal(this, \"optionChange\", this, option);\n },\n\n getOption: function(option) {return this.options[option]},\n getDoc: function() {return this.doc},\n\n addKeyMap: function(map, bottom) {\n this.state.keyMaps[bottom ? \"push\" : \"unshift\"](getKeyMap(map));\n },\n removeKeyMap: function(map) {\n var maps = this.state.keyMaps;\n for (var i = 0; i < maps.length; ++i)\n { if (maps[i] == map || maps[i].name == map) {\n maps.splice(i, 1);\n return true\n } }\n },\n\n addOverlay: methodOp(function(spec, options) {\n var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);\n if (mode.startState) { throw new Error(\"Overlays may not be stateful.\") }\n insertSorted(this.state.overlays,\n {mode: mode, modeSpec: spec, opaque: options && options.opaque,\n priority: (options && options.priority) || 0},\n function (overlay) { return overlay.priority; });\n this.state.modeGen++;\n regChange(this);\n }),\n removeOverlay: methodOp(function(spec) {\n var overlays = this.state.overlays;\n for (var i = 0; i < overlays.length; ++i) {\n var cur = overlays[i].modeSpec;\n if (cur == spec || typeof spec == \"string\" && cur.name == spec) {\n overlays.splice(i, 1);\n this.state.modeGen++;\n regChange(this);\n return\n }\n }\n }),\n\n indentLine: methodOp(function(n, dir, aggressive) {\n if (typeof dir != \"string\" && typeof dir != \"number\") {\n if (dir == null) { dir = this.options.smartIndent ? \"smart\" : \"prev\"; }\n else { dir = dir ? \"add\" : \"subtract\"; }\n }\n if (isLine(this.doc, n)) { indentLine(this, n, dir, aggressive); }\n }),\n indentSelection: methodOp(function(how) {\n var ranges = this.doc.sel.ranges, end = -1;\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n if (!range.empty()) {\n var from = range.from(), to = range.to();\n var start = Math.max(end, from.line);\n end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;\n for (var j = start; j < end; ++j)\n { indentLine(this, j, how); }\n var newRanges = this.doc.sel.ranges;\n if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)\n { replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); }\n } else if (range.head.line > end) {\n indentLine(this, range.head.line, how, true);\n end = range.head.line;\n if (i == this.doc.sel.primIndex) { ensureCursorVisible(this); }\n }\n }\n }),\n\n // Fetch the parser token for a given character. Useful for hacks\n // that want to inspect the mode state (say, for completion).\n getTokenAt: function(pos, precise) {\n return takeToken(this, pos, precise)\n },\n\n getLineTokens: function(line, precise) {\n return takeToken(this, Pos(line), precise, true)\n },\n\n getTokenTypeAt: function(pos) {\n pos = clipPos(this.doc, pos);\n var styles = getLineStyles(this, getLine(this.doc, pos.line));\n var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;\n var type;\n if (ch == 0) { type = styles[2]; }\n else { for (;;) {\n var mid = (before + after) >> 1;\n if ((mid ? styles[mid * 2 - 1] : 0) >= ch) { after = mid; }\n else if (styles[mid * 2 + 1] < ch) { before = mid + 1; }\n else { type = styles[mid * 2 + 2]; break }\n } }\n var cut = type ? type.indexOf(\"overlay \") : -1;\n return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1)\n },\n\n getModeAt: function(pos) {\n var mode = this.doc.mode;\n if (!mode.innerMode) { return mode }\n return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode\n },\n\n getHelper: function(pos, type) {\n return this.getHelpers(pos, type)[0]\n },\n\n getHelpers: function(pos, type) {\n var found = [];\n if (!helpers.hasOwnProperty(type)) { return found }\n var help = helpers[type], mode = this.getModeAt(pos);\n if (typeof mode[type] == \"string\") {\n if (help[mode[type]]) { found.push(help[mode[type]]); }\n } else if (mode[type]) {\n for (var i = 0; i < mode[type].length; i++) {\n var val = help[mode[type][i]];\n if (val) { found.push(val); }\n }\n } else if (mode.helperType && help[mode.helperType]) {\n found.push(help[mode.helperType]);\n } else if (help[mode.name]) {\n found.push(help[mode.name]);\n }\n for (var i$1 = 0; i$1 < help._global.length; i$1++) {\n var cur = help._global[i$1];\n if (cur.pred(mode, this) && indexOf(found, cur.val) == -1)\n { found.push(cur.val); }\n }\n return found\n },\n\n getStateAfter: function(line, precise) {\n var doc = this.doc;\n line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);\n return getContextBefore(this, line + 1, precise).state\n },\n\n cursorCoords: function(start, mode) {\n var pos, range = this.doc.sel.primary();\n if (start == null) { pos = range.head; }\n else if (typeof start == \"object\") { pos = clipPos(this.doc, start); }\n else { pos = start ? range.from() : range.to(); }\n return cursorCoords(this, pos, mode || \"page\")\n },\n\n charCoords: function(pos, mode) {\n return charCoords(this, clipPos(this.doc, pos), mode || \"page\")\n },\n\n coordsChar: function(coords, mode) {\n coords = fromCoordSystem(this, coords, mode || \"page\");\n return coordsChar(this, coords.left, coords.top)\n },\n\n lineAtHeight: function(height, mode) {\n height = fromCoordSystem(this, {top: height, left: 0}, mode || \"page\").top;\n return lineAtHeight(this.doc, height + this.display.viewOffset)\n },\n heightAtLine: function(line, mode, includeWidgets) {\n var end = false, lineObj;\n if (typeof line == \"number\") {\n var last = this.doc.first + this.doc.size - 1;\n if (line < this.doc.first) { line = this.doc.first; }\n else if (line > last) { line = last; end = true; }\n lineObj = getLine(this.doc, line);\n } else {\n lineObj = line;\n }\n return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || \"page\", includeWidgets || end).top +\n (end ? this.doc.height - heightAtLine(lineObj) : 0)\n },\n\n defaultTextHeight: function() { return textHeight(this.display) },\n defaultCharWidth: function() { return charWidth(this.display) },\n\n getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo}},\n\n addWidget: function(pos, node, scroll, vert, horiz) {\n var display = this.display;\n pos = cursorCoords(this, clipPos(this.doc, pos));\n var top = pos.bottom, left = pos.left;\n node.style.position = \"absolute\";\n node.setAttribute(\"cm-ignore-events\", \"true\");\n this.display.input.setUneditable(node);\n display.sizer.appendChild(node);\n if (vert == \"over\") {\n top = pos.top;\n } else if (vert == \"above\" || vert == \"near\") {\n var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),\n hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);\n // Default to positioning above (if specified and possible); otherwise default to positioning below\n if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)\n { top = pos.top - node.offsetHeight; }\n else if (pos.bottom + node.offsetHeight <= vspace)\n { top = pos.bottom; }\n if (left + node.offsetWidth > hspace)\n { left = hspace - node.offsetWidth; }\n }\n node.style.top = top + \"px\";\n node.style.left = node.style.right = \"\";\n if (horiz == \"right\") {\n left = display.sizer.clientWidth - node.offsetWidth;\n node.style.right = \"0px\";\n } else {\n if (horiz == \"left\") { left = 0; }\n else if (horiz == \"middle\") { left = (display.sizer.clientWidth - node.offsetWidth) / 2; }\n node.style.left = left + \"px\";\n }\n if (scroll)\n { scrollIntoView(this, {left: left, top: top, right: left + node.offsetWidth, bottom: top + node.offsetHeight}); }\n },\n\n triggerOnKeyDown: methodOp(onKeyDown),\n triggerOnKeyPress: methodOp(onKeyPress),\n triggerOnKeyUp: onKeyUp,\n triggerOnMouseDown: methodOp(onMouseDown),\n\n execCommand: function(cmd) {\n if (commands.hasOwnProperty(cmd))\n { return commands[cmd].call(null, this) }\n },\n\n triggerElectric: methodOp(function(text) { triggerElectric(this, text); }),\n\n findPosH: function(from, amount, unit, visually) {\n var dir = 1;\n if (amount < 0) { dir = -1; amount = -amount; }\n var cur = clipPos(this.doc, from);\n for (var i = 0; i < amount; ++i) {\n cur = findPosH(this.doc, cur, dir, unit, visually);\n if (cur.hitSide) { break }\n }\n return cur\n },\n\n moveH: methodOp(function(dir, unit) {\n var this$1 = this;\n\n this.extendSelectionsBy(function (range) {\n if (this$1.display.shift || this$1.doc.extend || range.empty())\n { return findPosH(this$1.doc, range.head, dir, unit, this$1.options.rtlMoveVisually) }\n else\n { return dir < 0 ? range.from() : range.to() }\n }, sel_move);\n }),\n\n deleteH: methodOp(function(dir, unit) {\n var sel = this.doc.sel, doc = this.doc;\n if (sel.somethingSelected())\n { doc.replaceSelection(\"\", null, \"+delete\"); }\n else\n { deleteNearSelection(this, function (range) {\n var other = findPosH(doc, range.head, dir, unit, false);\n return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other}\n }); }\n }),\n\n findPosV: function(from, amount, unit, goalColumn) {\n var dir = 1, x = goalColumn;\n if (amount < 0) { dir = -1; amount = -amount; }\n var cur = clipPos(this.doc, from);\n for (var i = 0; i < amount; ++i) {\n var coords = cursorCoords(this, cur, \"div\");\n if (x == null) { x = coords.left; }\n else { coords.left = x; }\n cur = findPosV(this, coords, dir, unit);\n if (cur.hitSide) { break }\n }\n return cur\n },\n\n moveV: methodOp(function(dir, unit) {\n var this$1 = this;\n\n var doc = this.doc, goals = [];\n var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected();\n doc.extendSelectionsBy(function (range) {\n if (collapse)\n { return dir < 0 ? range.from() : range.to() }\n var headPos = cursorCoords(this$1, range.head, \"div\");\n if (range.goalColumn != null) { headPos.left = range.goalColumn; }\n goals.push(headPos.left);\n var pos = findPosV(this$1, headPos, dir, unit);\n if (unit == \"page\" && range == doc.sel.primary())\n { addToScrollTop(this$1, charCoords(this$1, pos, \"div\").top - headPos.top); }\n return pos\n }, sel_move);\n if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++)\n { doc.sel.ranges[i].goalColumn = goals[i]; } }\n }),\n\n // Find the word at the given position (as returned by coordsChar).\n findWordAt: function(pos) {\n var doc = this.doc, line = getLine(doc, pos.line).text;\n var start = pos.ch, end = pos.ch;\n if (line) {\n var helper = this.getHelper(pos, \"wordChars\");\n if ((pos.sticky == \"before\" || end == line.length) && start) { --start; } else { ++end; }\n var startChar = line.charAt(start);\n var check = isWordChar(startChar, helper)\n ? function (ch) { return isWordChar(ch, helper); }\n : /\\s/.test(startChar) ? function (ch) { return /\\s/.test(ch); }\n : function (ch) { return (!/\\s/.test(ch) && !isWordChar(ch)); };\n while (start > 0 && check(line.charAt(start - 1))) { --start; }\n while (end < line.length && check(line.charAt(end))) { ++end; }\n }\n return new Range(Pos(pos.line, start), Pos(pos.line, end))\n },\n\n toggleOverwrite: function(value) {\n if (value != null && value == this.state.overwrite) { return }\n if (this.state.overwrite = !this.state.overwrite)\n { addClass(this.display.cursorDiv, \"CodeMirror-overwrite\"); }\n else\n { rmClass(this.display.cursorDiv, \"CodeMirror-overwrite\"); }\n\n signal(this, \"overwriteToggle\", this, this.state.overwrite);\n },\n hasFocus: function() { return this.display.input.getField() == activeElt(root(this)) },\n isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) },\n\n scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y); }),\n getScrollInfo: function() {\n var scroller = this.display.scroller;\n return {left: scroller.scrollLeft, top: scroller.scrollTop,\n height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,\n width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,\n clientHeight: displayHeight(this), clientWidth: displayWidth(this)}\n },\n\n scrollIntoView: methodOp(function(range, margin) {\n if (range == null) {\n range = {from: this.doc.sel.primary().head, to: null};\n if (margin == null) { margin = this.options.cursorScrollMargin; }\n } else if (typeof range == \"number\") {\n range = {from: Pos(range, 0), to: null};\n } else if (range.from == null) {\n range = {from: range, to: null};\n }\n if (!range.to) { range.to = range.from; }\n range.margin = margin || 0;\n\n if (range.from.line != null) {\n scrollToRange(this, range);\n } else {\n scrollToCoordsRange(this, range.from, range.to, range.margin);\n }\n }),\n\n setSize: methodOp(function(width, height) {\n var this$1 = this;\n\n var interpret = function (val) { return typeof val == \"number\" || /^\\d+$/.test(String(val)) ? val + \"px\" : val; };\n if (width != null) { this.display.wrapper.style.width = interpret(width); }\n if (height != null) { this.display.wrapper.style.height = interpret(height); }\n if (this.options.lineWrapping) { clearLineMeasurementCache(this); }\n var lineNo = this.display.viewFrom;\n this.doc.iter(lineNo, this.display.viewTo, function (line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++)\n { if (line.widgets[i].noHScroll) { regLineChange(this$1, lineNo, \"widget\"); break } } }\n ++lineNo;\n });\n this.curOp.forceUpdate = true;\n signal(this, \"refresh\", this);\n }),\n\n operation: function(f){return runInOp(this, f)},\n startOperation: function(){return startOperation(this)},\n endOperation: function(){return endOperation(this)},\n\n refresh: methodOp(function() {\n var oldHeight = this.display.cachedTextHeight;\n regChange(this);\n this.curOp.forceUpdate = true;\n clearCaches(this);\n scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop);\n updateGutterSpace(this.display);\n if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5 || this.options.lineWrapping)\n { estimateLineHeights(this); }\n signal(this, \"refresh\", this);\n }),\n\n swapDoc: methodOp(function(doc) {\n var old = this.doc;\n old.cm = null;\n // Cancel the current text selection if any (#5821)\n if (this.state.selectingText) { this.state.selectingText(); }\n attachDoc(this, doc);\n clearCaches(this);\n this.display.input.reset();\n scrollToCoords(this, doc.scrollLeft, doc.scrollTop);\n this.curOp.forceScroll = true;\n signalLater(this, \"swapDoc\", this, old);\n return old\n }),\n\n phrase: function(phraseText) {\n var phrases = this.options.phrases;\n return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) ? phrases[phraseText] : phraseText\n },\n\n getInputField: function(){return this.display.input.getField()},\n getWrapperElement: function(){return this.display.wrapper},\n getScrollerElement: function(){return this.display.scroller},\n getGutterElement: function(){return this.display.gutters}\n };\n eventMixin(CodeMirror);\n\n CodeMirror.registerHelper = function(type, name, value) {\n if (!helpers.hasOwnProperty(type)) { helpers[type] = CodeMirror[type] = {_global: []}; }\n helpers[type][name] = value;\n };\n CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {\n CodeMirror.registerHelper(type, name, value);\n helpers[type]._global.push({pred: predicate, val: value});\n };\n }\n\n // Used for horizontal relative motion. Dir is -1 or 1 (left or\n // right), unit can be \"codepoint\", \"char\", \"column\" (like char, but\n // doesn't cross line boundaries), \"word\" (across next word), or\n // \"group\" (to the start of next group of word or\n // non-word-non-whitespace chars). The visually param controls\n // whether, in right-to-left text, direction 1 means to move towards\n // the next index in the string, or towards the character to the right\n // of the current position. The resulting position will have a\n // hitSide=true property if it reached the end of the document.\n function findPosH(doc, pos, dir, unit, visually) {\n var oldPos = pos;\n var origDir = dir;\n var lineObj = getLine(doc, pos.line);\n var lineDir = visually && doc.direction == \"rtl\" ? -dir : dir;\n function findNextLine() {\n var l = pos.line + lineDir;\n if (l < doc.first || l >= doc.first + doc.size) { return false }\n pos = new Pos(l, pos.ch, pos.sticky);\n return lineObj = getLine(doc, l)\n }\n function moveOnce(boundToLine) {\n var next;\n if (unit == \"codepoint\") {\n var ch = lineObj.text.charCodeAt(pos.ch + (dir > 0 ? 0 : -1));\n if (isNaN(ch)) {\n next = null;\n } else {\n var astral = dir > 0 ? ch >= 0xD800 && ch < 0xDC00 : ch >= 0xDC00 && ch < 0xDFFF;\n next = new Pos(pos.line, Math.max(0, Math.min(lineObj.text.length, pos.ch + dir * (astral ? 2 : 1))), -dir);\n }\n } else if (visually) {\n next = moveVisually(doc.cm, lineObj, pos, dir);\n } else {\n next = moveLogically(lineObj, pos, dir);\n }\n if (next == null) {\n if (!boundToLine && findNextLine())\n { pos = endOfLine(visually, doc.cm, lineObj, pos.line, lineDir); }\n else\n { return false }\n } else {\n pos = next;\n }\n return true\n }\n\n if (unit == \"char\" || unit == \"codepoint\") {\n moveOnce();\n } else if (unit == \"column\") {\n moveOnce(true);\n } else if (unit == \"word\" || unit == \"group\") {\n var sawType = null, group = unit == \"group\";\n var helper = doc.cm && doc.cm.getHelper(pos, \"wordChars\");\n for (var first = true;; first = false) {\n if (dir < 0 && !moveOnce(!first)) { break }\n var cur = lineObj.text.charAt(pos.ch) || \"\\n\";\n var type = isWordChar(cur, helper) ? \"w\"\n : group && cur == \"\\n\" ? \"n\"\n : !group || /\\s/.test(cur) ? null\n : \"p\";\n if (group && !first && !type) { type = \"s\"; }\n if (sawType && sawType != type) {\n if (dir < 0) {dir = 1; moveOnce(); pos.sticky = \"after\";}\n break\n }\n\n if (type) { sawType = type; }\n if (dir > 0 && !moveOnce(!first)) { break }\n }\n }\n var result = skipAtomic(doc, pos, oldPos, origDir, true);\n if (equalCursorPos(oldPos, result)) { result.hitSide = true; }\n return result\n }\n\n // For relative vertical movement. Dir may be -1 or 1. Unit can be\n // \"page\" or \"line\". The resulting position will have a hitSide=true\n // property if it reached the end of the document.\n function findPosV(cm, pos, dir, unit) {\n var doc = cm.doc, x = pos.left, y;\n if (unit == \"page\") {\n var pageSize = Math.min(cm.display.wrapper.clientHeight, win(cm).innerHeight || doc(cm).documentElement.clientHeight);\n var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);\n y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;\n\n } else if (unit == \"line\") {\n y = dir > 0 ? pos.bottom + 3 : pos.top - 3;\n }\n var target;\n for (;;) {\n target = coordsChar(cm, x, y);\n if (!target.outside) { break }\n if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break }\n y += dir * 5;\n }\n return target\n }\n\n // CONTENTEDITABLE INPUT STYLE\n\n var ContentEditableInput = function(cm) {\n this.cm = cm;\n this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;\n this.polling = new Delayed();\n this.composing = null;\n this.gracePeriod = false;\n this.readDOMTimeout = null;\n };\n\n ContentEditableInput.prototype.init = function (display) {\n var this$1 = this;\n\n var input = this, cm = input.cm;\n var div = input.div = display.lineDiv;\n div.contentEditable = true;\n disableBrowserMagic(div, cm.options.spellcheck, cm.options.autocorrect, cm.options.autocapitalize);\n\n function belongsToInput(e) {\n for (var t = e.target; t; t = t.parentNode) {\n if (t == div) { return true }\n if (/\\bCodeMirror-(?:line)?widget\\b/.test(t.className)) { break }\n }\n return false\n }\n\n on(div, \"paste\", function (e) {\n if (!belongsToInput(e) || signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }\n // IE doesn't fire input events, so we schedule a read for the pasted content in this way\n if (ie_version <= 11) { setTimeout(operation(cm, function () { return this$1.updateFromDOM(); }), 20); }\n });\n\n on(div, \"compositionstart\", function (e) {\n this$1.composing = {data: e.data, done: false};\n });\n on(div, \"compositionupdate\", function (e) {\n if (!this$1.composing) { this$1.composing = {data: e.data, done: false}; }\n });\n on(div, \"compositionend\", function (e) {\n if (this$1.composing) {\n if (e.data != this$1.composing.data) { this$1.readFromDOMSoon(); }\n this$1.composing.done = true;\n }\n });\n\n on(div, \"touchstart\", function () { return input.forceCompositionEnd(); });\n\n on(div, \"input\", function () {\n if (!this$1.composing) { this$1.readFromDOMSoon(); }\n });\n\n function onCopyCut(e) {\n if (!belongsToInput(e) || signalDOMEvent(cm, e)) { return }\n if (cm.somethingSelected()) {\n setLastCopied({lineWise: false, text: cm.getSelections()});\n if (e.type == \"cut\") { cm.replaceSelection(\"\", null, \"cut\"); }\n } else if (!cm.options.lineWiseCopyCut) {\n return\n } else {\n var ranges = copyableRanges(cm);\n setLastCopied({lineWise: true, text: ranges.text});\n if (e.type == \"cut\") {\n cm.operation(function () {\n cm.setSelections(ranges.ranges, 0, sel_dontScroll);\n cm.replaceSelection(\"\", null, \"cut\");\n });\n }\n }\n if (e.clipboardData) {\n e.clipboardData.clearData();\n var content = lastCopied.text.join(\"\\n\");\n // iOS exposes the clipboard API, but seems to discard content inserted into it\n e.clipboardData.setData(\"Text\", content);\n if (e.clipboardData.getData(\"Text\") == content) {\n e.preventDefault();\n return\n }\n }\n // Old-fashioned briefly-focus-a-textarea hack\n var kludge = hiddenTextarea(), te = kludge.firstChild;\n disableBrowserMagic(te);\n cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);\n te.value = lastCopied.text.join(\"\\n\");\n var hadFocus = activeElt(rootNode(div));\n selectInput(te);\n setTimeout(function () {\n cm.display.lineSpace.removeChild(kludge);\n hadFocus.focus();\n if (hadFocus == div) { input.showPrimarySelection(); }\n }, 50);\n }\n on(div, \"copy\", onCopyCut);\n on(div, \"cut\", onCopyCut);\n };\n\n ContentEditableInput.prototype.screenReaderLabelChanged = function (label) {\n // Label for screenreaders, accessibility\n if(label) {\n this.div.setAttribute('aria-label', label);\n } else {\n this.div.removeAttribute('aria-label');\n }\n };\n\n ContentEditableInput.prototype.prepareSelection = function () {\n var result = prepareSelection(this.cm, false);\n result.focus = activeElt(rootNode(this.div)) == this.div;\n return result\n };\n\n ContentEditableInput.prototype.showSelection = function (info, takeFocus) {\n if (!info || !this.cm.display.view.length) { return }\n if (info.focus || takeFocus) { this.showPrimarySelection(); }\n this.showMultipleSelections(info);\n };\n\n ContentEditableInput.prototype.getSelection = function () {\n return this.cm.display.wrapper.ownerDocument.getSelection()\n };\n\n ContentEditableInput.prototype.showPrimarySelection = function () {\n var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();\n var from = prim.from(), to = prim.to();\n\n if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {\n sel.removeAllRanges();\n return\n }\n\n var curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n var curFocus = domToPos(cm, sel.focusNode, sel.focusOffset);\n if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&\n cmp(minPos(curAnchor, curFocus), from) == 0 &&\n cmp(maxPos(curAnchor, curFocus), to) == 0)\n { return }\n\n var view = cm.display.view;\n var start = (from.line >= cm.display.viewFrom && posToDOM(cm, from)) ||\n {node: view[0].measure.map[2], offset: 0};\n var end = to.line < cm.display.viewTo && posToDOM(cm, to);\n if (!end) {\n var measure = view[view.length - 1].measure;\n var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;\n end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]};\n }\n\n if (!start || !end) {\n sel.removeAllRanges();\n return\n }\n\n var old = sel.rangeCount && sel.getRangeAt(0), rng;\n try { rng = range(start.node, start.offset, end.offset, end.node); }\n catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible\n if (rng) {\n if (!gecko && cm.state.focused) {\n sel.collapse(start.node, start.offset);\n if (!rng.collapsed) {\n sel.removeAllRanges();\n sel.addRange(rng);\n }\n } else {\n sel.removeAllRanges();\n sel.addRange(rng);\n }\n if (old && sel.anchorNode == null) { sel.addRange(old); }\n else if (gecko) { this.startGracePeriod(); }\n }\n this.rememberSelection();\n };\n\n ContentEditableInput.prototype.startGracePeriod = function () {\n var this$1 = this;\n\n clearTimeout(this.gracePeriod);\n this.gracePeriod = setTimeout(function () {\n this$1.gracePeriod = false;\n if (this$1.selectionChanged())\n { this$1.cm.operation(function () { return this$1.cm.curOp.selectionChanged = true; }); }\n }, 20);\n };\n\n ContentEditableInput.prototype.showMultipleSelections = function (info) {\n removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);\n removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);\n };\n\n ContentEditableInput.prototype.rememberSelection = function () {\n var sel = this.getSelection();\n this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;\n this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;\n };\n\n ContentEditableInput.prototype.selectionInEditor = function () {\n var sel = this.getSelection();\n if (!sel.rangeCount) { return false }\n var node = sel.getRangeAt(0).commonAncestorContainer;\n return contains(this.div, node)\n };\n\n ContentEditableInput.prototype.focus = function () {\n if (this.cm.options.readOnly != \"nocursor\") {\n if (!this.selectionInEditor() || activeElt(rootNode(this.div)) != this.div)\n { this.showSelection(this.prepareSelection(), true); }\n this.div.focus();\n }\n };\n ContentEditableInput.prototype.blur = function () { this.div.blur(); };\n ContentEditableInput.prototype.getField = function () { return this.div };\n\n ContentEditableInput.prototype.supportsTouch = function () { return true };\n\n ContentEditableInput.prototype.receivedFocus = function () {\n var this$1 = this;\n\n var input = this;\n if (this.selectionInEditor())\n { setTimeout(function () { return this$1.pollSelection(); }, 20); }\n else\n { runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }); }\n\n function poll() {\n if (input.cm.state.focused) {\n input.pollSelection();\n input.polling.set(input.cm.options.pollInterval, poll);\n }\n }\n this.polling.set(this.cm.options.pollInterval, poll);\n };\n\n ContentEditableInput.prototype.selectionChanged = function () {\n var sel = this.getSelection();\n return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||\n sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset\n };\n\n ContentEditableInput.prototype.pollSelection = function () {\n if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }\n var sel = this.getSelection(), cm = this.cm;\n // On Android Chrome (version 56, at least), backspacing into an\n // uneditable block element will put the cursor in that element,\n // and then, because it's not editable, hide the virtual keyboard.\n // Because Android doesn't allow us to actually detect backspace\n // presses in a sane way, this code checks for when that happens\n // and simulates a backspace press in this case.\n if (android && chrome && this.cm.display.gutterSpecs.length && isInGutter(sel.anchorNode)) {\n this.cm.triggerOnKeyDown({type: \"keydown\", keyCode: 8, preventDefault: Math.abs});\n this.blur();\n this.focus();\n return\n }\n if (this.composing) { return }\n this.rememberSelection();\n var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n var head = domToPos(cm, sel.focusNode, sel.focusOffset);\n if (anchor && head) { runInOp(cm, function () {\n setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);\n if (anchor.bad || head.bad) { cm.curOp.selectionChanged = true; }\n }); }\n };\n\n ContentEditableInput.prototype.pollContent = function () {\n if (this.readDOMTimeout != null) {\n clearTimeout(this.readDOMTimeout);\n this.readDOMTimeout = null;\n }\n\n var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary();\n var from = sel.from(), to = sel.to();\n if (from.ch == 0 && from.line > cm.firstLine())\n { from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length); }\n if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine())\n { to = Pos(to.line + 1, 0); }\n if (from.line < display.viewFrom || to.line > display.viewTo - 1) { return false }\n\n var fromIndex, fromLine, fromNode;\n if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {\n fromLine = lineNo(display.view[0].line);\n fromNode = display.view[0].node;\n } else {\n fromLine = lineNo(display.view[fromIndex].line);\n fromNode = display.view[fromIndex - 1].node.nextSibling;\n }\n var toIndex = findViewIndex(cm, to.line);\n var toLine, toNode;\n if (toIndex == display.view.length - 1) {\n toLine = display.viewTo - 1;\n toNode = display.lineDiv.lastChild;\n } else {\n toLine = lineNo(display.view[toIndex + 1].line) - 1;\n toNode = display.view[toIndex + 1].node.previousSibling;\n }\n\n if (!fromNode) { return false }\n var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));\n var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));\n while (newText.length > 1 && oldText.length > 1) {\n if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }\n else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; }\n else { break }\n }\n\n var cutFront = 0, cutEnd = 0;\n var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length);\n while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))\n { ++cutFront; }\n var newBot = lst(newText), oldBot = lst(oldText);\n var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),\n oldBot.length - (oldText.length == 1 ? cutFront : 0));\n while (cutEnd < maxCutEnd &&\n newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))\n { ++cutEnd; }\n // Try to move start of change to start of selection if ambiguous\n if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) {\n while (cutFront && cutFront > from.ch &&\n newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) {\n cutFront--;\n cutEnd++;\n }\n }\n\n newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\\u200b+/, \"\");\n newText[0] = newText[0].slice(cutFront).replace(/\\u200b+$/, \"\");\n\n var chFrom = Pos(fromLine, cutFront);\n var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);\n if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {\n replaceRange(cm.doc, newText, chFrom, chTo, \"+input\");\n return true\n }\n };\n\n ContentEditableInput.prototype.ensurePolled = function () {\n this.forceCompositionEnd();\n };\n ContentEditableInput.prototype.reset = function () {\n this.forceCompositionEnd();\n };\n ContentEditableInput.prototype.forceCompositionEnd = function () {\n if (!this.composing) { return }\n clearTimeout(this.readDOMTimeout);\n this.composing = null;\n this.updateFromDOM();\n this.div.blur();\n this.div.focus();\n };\n ContentEditableInput.prototype.readFromDOMSoon = function () {\n var this$1 = this;\n\n if (this.readDOMTimeout != null) { return }\n this.readDOMTimeout = setTimeout(function () {\n this$1.readDOMTimeout = null;\n if (this$1.composing) {\n if (this$1.composing.done) { this$1.composing = null; }\n else { return }\n }\n this$1.updateFromDOM();\n }, 80);\n };\n\n ContentEditableInput.prototype.updateFromDOM = function () {\n var this$1 = this;\n\n if (this.cm.isReadOnly() || !this.pollContent())\n { runInOp(this.cm, function () { return regChange(this$1.cm); }); }\n };\n\n ContentEditableInput.prototype.setUneditable = function (node) {\n node.contentEditable = \"false\";\n };\n\n ContentEditableInput.prototype.onKeyPress = function (e) {\n if (e.charCode == 0 || this.composing) { return }\n e.preventDefault();\n if (!this.cm.isReadOnly())\n { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }\n };\n\n ContentEditableInput.prototype.readOnlyChanged = function (val) {\n this.div.contentEditable = String(val != \"nocursor\");\n };\n\n ContentEditableInput.prototype.onContextMenu = function () {};\n ContentEditableInput.prototype.resetPosition = function () {};\n\n ContentEditableInput.prototype.needsContentAttribute = true;\n\n function posToDOM(cm, pos) {\n var view = findViewForLine(cm, pos.line);\n if (!view || view.hidden) { return null }\n var line = getLine(cm.doc, pos.line);\n var info = mapFromLineView(view, line, pos.line);\n\n var order = getOrder(line, cm.doc.direction), side = \"left\";\n if (order) {\n var partPos = getBidiPartAt(order, pos.ch);\n side = partPos % 2 ? \"right\" : \"left\";\n }\n var result = nodeAndOffsetInLineMap(info.map, pos.ch, side);\n result.offset = result.collapse == \"right\" ? result.end : result.start;\n return result\n }\n\n function isInGutter(node) {\n for (var scan = node; scan; scan = scan.parentNode)\n { if (/CodeMirror-gutter-wrapper/.test(scan.className)) { return true } }\n return false\n }\n\n function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }\n\n function domTextBetween(cm, from, to, fromLine, toLine) {\n var text = \"\", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false;\n function recognizeMarker(id) { return function (marker) { return marker.id == id; } }\n function close() {\n if (closing) {\n text += lineSep;\n if (extraLinebreak) { text += lineSep; }\n closing = extraLinebreak = false;\n }\n }\n function addText(str) {\n if (str) {\n close();\n text += str;\n }\n }\n function walk(node) {\n if (node.nodeType == 1) {\n var cmText = node.getAttribute(\"cm-text\");\n if (cmText) {\n addText(cmText);\n return\n }\n var markerID = node.getAttribute(\"cm-marker\"), range;\n if (markerID) {\n var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));\n if (found.length && (range = found[0].find(0)))\n { addText(getBetween(cm.doc, range.from, range.to).join(lineSep)); }\n return\n }\n if (node.getAttribute(\"contenteditable\") == \"false\") { return }\n var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName);\n if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return }\n\n if (isBlock) { close(); }\n for (var i = 0; i < node.childNodes.length; i++)\n { walk(node.childNodes[i]); }\n\n if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; }\n if (isBlock) { closing = true; }\n } else if (node.nodeType == 3) {\n addText(node.nodeValue.replace(/\\u200b/g, \"\").replace(/\\u00a0/g, \" \"));\n }\n }\n for (;;) {\n walk(from);\n if (from == to) { break }\n from = from.nextSibling;\n extraLinebreak = false;\n }\n return text\n }\n\n function domToPos(cm, node, offset) {\n var lineNode;\n if (node == cm.display.lineDiv) {\n lineNode = cm.display.lineDiv.childNodes[offset];\n if (!lineNode) { return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) }\n node = null; offset = 0;\n } else {\n for (lineNode = node;; lineNode = lineNode.parentNode) {\n if (!lineNode || lineNode == cm.display.lineDiv) { return null }\n if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) { break }\n }\n }\n for (var i = 0; i < cm.display.view.length; i++) {\n var lineView = cm.display.view[i];\n if (lineView.node == lineNode)\n { return locateNodeInLineView(lineView, node, offset) }\n }\n }\n\n function locateNodeInLineView(lineView, node, offset) {\n var wrapper = lineView.text.firstChild, bad = false;\n if (!node || !contains(wrapper, node)) { return badPos(Pos(lineNo(lineView.line), 0), true) }\n if (node == wrapper) {\n bad = true;\n node = wrapper.childNodes[offset];\n offset = 0;\n if (!node) {\n var line = lineView.rest ? lst(lineView.rest) : lineView.line;\n return badPos(Pos(lineNo(line), line.text.length), bad)\n }\n }\n\n var textNode = node.nodeType == 3 ? node : null, topNode = node;\n if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {\n textNode = node.firstChild;\n if (offset) { offset = textNode.nodeValue.length; }\n }\n while (topNode.parentNode != wrapper) { topNode = topNode.parentNode; }\n var measure = lineView.measure, maps = measure.maps;\n\n function find(textNode, topNode, offset) {\n for (var i = -1; i < (maps ? maps.length : 0); i++) {\n var map = i < 0 ? measure.map : maps[i];\n for (var j = 0; j < map.length; j += 3) {\n var curNode = map[j + 2];\n if (curNode == textNode || curNode == topNode) {\n var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);\n var ch = map[j] + offset;\n if (offset < 0 || curNode != textNode) { ch = map[j + (offset ? 1 : 0)]; }\n return Pos(line, ch)\n }\n }\n }\n }\n var found = find(textNode, topNode, offset);\n if (found) { return badPos(found, bad) }\n\n // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems\n for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {\n found = find(after, after.firstChild, 0);\n if (found)\n { return badPos(Pos(found.line, found.ch - dist), bad) }\n else\n { dist += after.textContent.length; }\n }\n for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) {\n found = find(before, before.firstChild, -1);\n if (found)\n { return badPos(Pos(found.line, found.ch + dist$1), bad) }\n else\n { dist$1 += before.textContent.length; }\n }\n }\n\n // TEXTAREA INPUT STYLE\n\n var TextareaInput = function(cm) {\n this.cm = cm;\n // See input.poll and input.reset\n this.prevInput = \"\";\n\n // Flag that indicates whether we expect input to appear real soon\n // now (after some event like 'keypress' or 'input') and are\n // polling intensively.\n this.pollingFast = false;\n // Self-resetting timeout for the poller\n this.polling = new Delayed();\n // Used to work around IE issue with selection being forgotten when focus moves away from textarea\n this.hasSelection = false;\n this.composing = null;\n this.resetting = false;\n };\n\n TextareaInput.prototype.init = function (display) {\n var this$1 = this;\n\n var input = this, cm = this.cm;\n this.createField(display);\n var te = this.textarea;\n\n display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild);\n\n // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)\n if (ios) { te.style.width = \"0px\"; }\n\n on(te, \"input\", function () {\n if (ie && ie_version >= 9 && this$1.hasSelection) { this$1.hasSelection = null; }\n input.poll();\n });\n\n on(te, \"paste\", function (e) {\n if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }\n\n cm.state.pasteIncoming = +new Date;\n input.fastPoll();\n });\n\n function prepareCopyCut(e) {\n if (signalDOMEvent(cm, e)) { return }\n if (cm.somethingSelected()) {\n setLastCopied({lineWise: false, text: cm.getSelections()});\n } else if (!cm.options.lineWiseCopyCut) {\n return\n } else {\n var ranges = copyableRanges(cm);\n setLastCopied({lineWise: true, text: ranges.text});\n if (e.type == \"cut\") {\n cm.setSelections(ranges.ranges, null, sel_dontScroll);\n } else {\n input.prevInput = \"\";\n te.value = ranges.text.join(\"\\n\");\n selectInput(te);\n }\n }\n if (e.type == \"cut\") { cm.state.cutIncoming = +new Date; }\n }\n on(te, \"cut\", prepareCopyCut);\n on(te, \"copy\", prepareCopyCut);\n\n on(display.scroller, \"paste\", function (e) {\n if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { return }\n if (!te.dispatchEvent) {\n cm.state.pasteIncoming = +new Date;\n input.focus();\n return\n }\n\n // Pass the `paste` event to the textarea so it's handled by its event listener.\n var event = new Event(\"paste\");\n event.clipboardData = e.clipboardData;\n te.dispatchEvent(event);\n });\n\n // Prevent normal selection in the editor (we handle our own)\n on(display.lineSpace, \"selectstart\", function (e) {\n if (!eventInWidget(display, e)) { e_preventDefault(e); }\n });\n\n on(te, \"compositionstart\", function () {\n var start = cm.getCursor(\"from\");\n if (input.composing) { input.composing.range.clear(); }\n input.composing = {\n start: start,\n range: cm.markText(start, cm.getCursor(\"to\"), {className: \"CodeMirror-composing\"})\n };\n });\n on(te, \"compositionend\", function () {\n if (input.composing) {\n input.poll();\n input.composing.range.clear();\n input.composing = null;\n }\n });\n };\n\n TextareaInput.prototype.createField = function (_display) {\n // Wraps and hides input textarea\n this.wrapper = hiddenTextarea();\n // The semihidden textarea that is focused when the editor is\n // focused, and receives input.\n this.textarea = this.wrapper.firstChild;\n var opts = this.cm.options;\n disableBrowserMagic(this.textarea, opts.spellcheck, opts.autocorrect, opts.autocapitalize);\n };\n\n TextareaInput.prototype.screenReaderLabelChanged = function (label) {\n // Label for screenreaders, accessibility\n if(label) {\n this.textarea.setAttribute('aria-label', label);\n } else {\n this.textarea.removeAttribute('aria-label');\n }\n };\n\n TextareaInput.prototype.prepareSelection = function () {\n // Redraw the selection and/or cursor\n var cm = this.cm, display = cm.display, doc = cm.doc;\n var result = prepareSelection(cm);\n\n // Move the hidden textarea near the cursor to prevent scrolling artifacts\n if (cm.options.moveInputWithCursor) {\n var headPos = cursorCoords(cm, doc.sel.primary().head, \"div\");\n var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();\n result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,\n headPos.top + lineOff.top - wrapOff.top));\n result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,\n headPos.left + lineOff.left - wrapOff.left));\n }\n\n return result\n };\n\n TextareaInput.prototype.showSelection = function (drawn) {\n var cm = this.cm, display = cm.display;\n removeChildrenAndAdd(display.cursorDiv, drawn.cursors);\n removeChildrenAndAdd(display.selectionDiv, drawn.selection);\n if (drawn.teTop != null) {\n this.wrapper.style.top = drawn.teTop + \"px\";\n this.wrapper.style.left = drawn.teLeft + \"px\";\n }\n };\n\n // Reset the input to correspond to the selection (or to be empty,\n // when not typing and nothing is selected)\n TextareaInput.prototype.reset = function (typing) {\n if (this.contextMenuPending || this.composing && typing) { return }\n var cm = this.cm;\n this.resetting = true;\n if (cm.somethingSelected()) {\n this.prevInput = \"\";\n var content = cm.getSelection();\n this.textarea.value = content;\n if (cm.state.focused) { selectInput(this.textarea); }\n if (ie && ie_version >= 9) { this.hasSelection = content; }\n } else if (!typing) {\n this.prevInput = this.textarea.value = \"\";\n if (ie && ie_version >= 9) { this.hasSelection = null; }\n }\n this.resetting = false;\n };\n\n TextareaInput.prototype.getField = function () { return this.textarea };\n\n TextareaInput.prototype.supportsTouch = function () { return false };\n\n TextareaInput.prototype.focus = function () {\n if (this.cm.options.readOnly != \"nocursor\" && (!mobile || activeElt(rootNode(this.textarea)) != this.textarea)) {\n try { this.textarea.focus(); }\n catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM\n }\n };\n\n TextareaInput.prototype.blur = function () { this.textarea.blur(); };\n\n TextareaInput.prototype.resetPosition = function () {\n this.wrapper.style.top = this.wrapper.style.left = 0;\n };\n\n TextareaInput.prototype.receivedFocus = function () { this.slowPoll(); };\n\n // Poll for input changes, using the normal rate of polling. This\n // runs as long as the editor is focused.\n TextareaInput.prototype.slowPoll = function () {\n var this$1 = this;\n\n if (this.pollingFast) { return }\n this.polling.set(this.cm.options.pollInterval, function () {\n this$1.poll();\n if (this$1.cm.state.focused) { this$1.slowPoll(); }\n });\n };\n\n // When an event has just come in that is likely to add or change\n // something in the input textarea, we poll faster, to ensure that\n // the change appears on the screen quickly.\n TextareaInput.prototype.fastPoll = function () {\n var missed = false, input = this;\n input.pollingFast = true;\n function p() {\n var changed = input.poll();\n if (!changed && !missed) {missed = true; input.polling.set(60, p);}\n else {input.pollingFast = false; input.slowPoll();}\n }\n input.polling.set(20, p);\n };\n\n // Read input from the textarea, and update the document to match.\n // When something is selected, it is present in the textarea, and\n // selected (unless it is huge, in which case a placeholder is\n // used). When nothing is selected, the cursor sits after previously\n // seen text (can be empty), which is stored in prevInput (we must\n // not reset the textarea when typing, because that breaks IME).\n TextareaInput.prototype.poll = function () {\n var this$1 = this;\n\n var cm = this.cm, input = this.textarea, prevInput = this.prevInput;\n // Since this is called a *lot*, try to bail out as cheaply as\n // possible when it is clear that nothing happened. hasSelection\n // will be the case when there is a lot of text in the textarea,\n // in which case reading its value would be expensive.\n if (this.contextMenuPending || this.resetting || !cm.state.focused ||\n (hasSelection(input) && !prevInput && !this.composing) ||\n cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)\n { return false }\n\n var text = input.value;\n // If nothing changed, bail.\n if (text == prevInput && !cm.somethingSelected()) { return false }\n // Work around nonsensical selection resetting in IE9/10, and\n // inexplicable appearance of private area unicode characters on\n // some key combos in Mac (#2689).\n if (ie && ie_version >= 9 && this.hasSelection === text ||\n mac && /[\\uf700-\\uf7ff]/.test(text)) {\n cm.display.input.reset();\n return false\n }\n\n if (cm.doc.sel == cm.display.selForContextMenu) {\n var first = text.charCodeAt(0);\n if (first == 0x200b && !prevInput) { prevInput = \"\\u200b\"; }\n if (first == 0x21da) { this.reset(); return this.cm.execCommand(\"undo\") }\n }\n // Find the part of the input that is actually new\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) { ++same; }\n\n runInOp(cm, function () {\n applyTextInput(cm, text.slice(same), prevInput.length - same,\n null, this$1.composing ? \"*compose\" : null);\n\n // Don't leave long text in the textarea, since it makes further polling slow\n if (text.length > 1000 || text.indexOf(\"\\n\") > -1) { input.value = this$1.prevInput = \"\"; }\n else { this$1.prevInput = text; }\n\n if (this$1.composing) {\n this$1.composing.range.clear();\n this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor(\"to\"),\n {className: \"CodeMirror-composing\"});\n }\n });\n return true\n };\n\n TextareaInput.prototype.ensurePolled = function () {\n if (this.pollingFast && this.poll()) { this.pollingFast = false; }\n };\n\n TextareaInput.prototype.onKeyPress = function () {\n if (ie && ie_version >= 9) { this.hasSelection = null; }\n this.fastPoll();\n };\n\n TextareaInput.prototype.onContextMenu = function (e) {\n var input = this, cm = input.cm, display = cm.display, te = input.textarea;\n if (input.contextMenuPending) { input.contextMenuPending(); }\n var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;\n if (!pos || presto) { return } // Opera is difficult.\n\n // Reset the current text selection only if the click is done outside of the selection\n // and 'resetSelectionOnContextMenu' option is true.\n var reset = cm.options.resetSelectionOnContextMenu;\n if (reset && cm.doc.sel.contains(pos) == -1)\n { operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); }\n\n var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText;\n var wrapperBox = input.wrapper.offsetParent.getBoundingClientRect();\n input.wrapper.style.cssText = \"position: static\";\n te.style.cssText = \"position: absolute; width: 30px; height: 30px;\\n top: \" + (e.clientY - wrapperBox.top - 5) + \"px; left: \" + (e.clientX - wrapperBox.left - 5) + \"px;\\n z-index: 1000; background: \" + (ie ? \"rgba(255, 255, 255, .05)\" : \"transparent\") + \";\\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);\";\n var oldScrollY;\n if (webkit) { oldScrollY = te.ownerDocument.defaultView.scrollY; } // Work around Chrome issue (#2712)\n display.input.focus();\n if (webkit) { te.ownerDocument.defaultView.scrollTo(null, oldScrollY); }\n display.input.reset();\n // Adds \"Select all\" to context menu in FF\n if (!cm.somethingSelected()) { te.value = input.prevInput = \" \"; }\n input.contextMenuPending = rehide;\n display.selForContextMenu = cm.doc.sel;\n clearTimeout(display.detectingSelectAll);\n\n // Select-all will be greyed out if there's nothing to select, so\n // this adds a zero-width space so that we can later check whether\n // it got selected.\n function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = \"\\u200b\" + (selected ? te.value : \"\");\n te.value = \"\\u21da\"; // Used to catch context-menu undo\n te.value = extval;\n input.prevInput = selected ? \"\" : \"\\u200b\";\n te.selectionStart = 1; te.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }\n function rehide() {\n if (input.contextMenuPending != rehide) { return }\n input.contextMenuPending = false;\n input.wrapper.style.cssText = oldWrapperCSS;\n te.style.cssText = oldCSS;\n if (ie && ie_version < 9) { display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); }\n\n // Try to detect the user choosing select-all\n if (te.selectionStart != null) {\n if (!ie || (ie && ie_version < 9)) { prepareSelectAllHack(); }\n var i = 0, poll = function () {\n if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&\n te.selectionEnd > 0 && input.prevInput == \"\\u200b\") {\n operation(cm, selectAll)(cm);\n } else if (i++ < 10) {\n display.detectingSelectAll = setTimeout(poll, 500);\n } else {\n display.selForContextMenu = null;\n display.input.reset();\n }\n };\n display.detectingSelectAll = setTimeout(poll, 200);\n }\n }\n\n if (ie && ie_version >= 9) { prepareSelectAllHack(); }\n if (captureRightClick) {\n e_stop(e);\n var mouseup = function () {\n off(window, \"mouseup\", mouseup);\n setTimeout(rehide, 20);\n };\n on(window, \"mouseup\", mouseup);\n } else {\n setTimeout(rehide, 50);\n }\n };\n\n TextareaInput.prototype.readOnlyChanged = function (val) {\n if (!val) { this.reset(); }\n this.textarea.disabled = val == \"nocursor\";\n this.textarea.readOnly = !!val;\n };\n\n TextareaInput.prototype.setUneditable = function () {};\n\n TextareaInput.prototype.needsContentAttribute = false;\n\n function fromTextArea(textarea, options) {\n options = options ? copyObj(options) : {};\n options.value = textarea.value;\n if (!options.tabindex && textarea.tabIndex)\n { options.tabindex = textarea.tabIndex; }\n if (!options.placeholder && textarea.placeholder)\n { options.placeholder = textarea.placeholder; }\n // Set autofocus to true if this textarea is focused, or if it has\n // autofocus and no other element is focused.\n if (options.autofocus == null) {\n var hasFocus = activeElt(rootNode(textarea));\n options.autofocus = hasFocus == textarea ||\n textarea.getAttribute(\"autofocus\") != null && hasFocus == document.body;\n }\n\n function save() {textarea.value = cm.getValue();}\n\n var realSubmit;\n if (textarea.form) {\n on(textarea.form, \"submit\", save);\n // Deplorable hack to make the submit method do the right thing.\n if (!options.leaveSubmitMethodAlone) {\n var form = textarea.form;\n realSubmit = form.submit;\n try {\n var wrappedSubmit = form.submit = function () {\n save();\n form.submit = realSubmit;\n form.submit();\n form.submit = wrappedSubmit;\n };\n } catch(e) {}\n }\n }\n\n options.finishInit = function (cm) {\n cm.save = save;\n cm.getTextArea = function () { return textarea; };\n cm.toTextArea = function () {\n cm.toTextArea = isNaN; // Prevent this from being ran twice\n save();\n textarea.parentNode.removeChild(cm.getWrapperElement());\n textarea.style.display = \"\";\n if (textarea.form) {\n off(textarea.form, \"submit\", save);\n if (!options.leaveSubmitMethodAlone && typeof textarea.form.submit == \"function\")\n { textarea.form.submit = realSubmit; }\n }\n };\n };\n\n textarea.style.display = \"none\";\n var cm = CodeMirror(function (node) { return textarea.parentNode.insertBefore(node, textarea.nextSibling); },\n options);\n return cm\n }\n\n function addLegacyProps(CodeMirror) {\n CodeMirror.off = off;\n CodeMirror.on = on;\n CodeMirror.wheelEventPixels = wheelEventPixels;\n CodeMirror.Doc = Doc;\n CodeMirror.splitLines = splitLinesAuto;\n CodeMirror.countColumn = countColumn;\n CodeMirror.findColumn = findColumn;\n CodeMirror.isWordChar = isWordCharBasic;\n CodeMirror.Pass = Pass;\n CodeMirror.signal = signal;\n CodeMirror.Line = Line;\n CodeMirror.changeEnd = changeEnd;\n CodeMirror.scrollbarModel = scrollbarModel;\n CodeMirror.Pos = Pos;\n CodeMirror.cmpPos = cmp;\n CodeMirror.modes = modes;\n CodeMirror.mimeModes = mimeModes;\n CodeMirror.resolveMode = resolveMode;\n CodeMirror.getMode = getMode;\n CodeMirror.modeExtensions = modeExtensions;\n CodeMirror.extendMode = extendMode;\n CodeMirror.copyState = copyState;\n CodeMirror.startState = startState;\n CodeMirror.innerMode = innerMode;\n CodeMirror.commands = commands;\n CodeMirror.keyMap = keyMap;\n CodeMirror.keyName = keyName;\n CodeMirror.isModifierKey = isModifierKey;\n CodeMirror.lookupKey = lookupKey;\n CodeMirror.normalizeKeyMap = normalizeKeyMap;\n CodeMirror.StringStream = StringStream;\n CodeMirror.SharedTextMarker = SharedTextMarker;\n CodeMirror.TextMarker = TextMarker;\n CodeMirror.LineWidget = LineWidget;\n CodeMirror.e_preventDefault = e_preventDefault;\n CodeMirror.e_stopPropagation = e_stopPropagation;\n CodeMirror.e_stop = e_stop;\n CodeMirror.addClass = addClass;\n CodeMirror.contains = contains;\n CodeMirror.rmClass = rmClass;\n CodeMirror.keyNames = keyNames;\n }\n\n // EDITOR CONSTRUCTOR\n\n defineOptions(CodeMirror);\n\n addEditorMethods(CodeMirror);\n\n // Set up methods on CodeMirror's prototype to redirect to the editor's document.\n var dontDelegate = \"iter insert remove copy getEditor constructor\".split(\" \");\n for (var prop in Doc.prototype) { if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)\n { CodeMirror.prototype[prop] = (function(method) {\n return function() {return method.apply(this.doc, arguments)}\n })(Doc.prototype[prop]); } }\n\n eventMixin(Doc);\n CodeMirror.inputStyles = {\"textarea\": TextareaInput, \"contenteditable\": ContentEditableInput};\n\n // Extra arguments are stored as the mode's dependencies, which is\n // used by (legacy) mechanisms like loadmode.js to automatically\n // load a mode. (Preferred mechanism is the require/define calls.)\n CodeMirror.defineMode = function(name/*, mode, …*/) {\n if (!CodeMirror.defaults.mode && name != \"null\") { CodeMirror.defaults.mode = name; }\n defineMode.apply(this, arguments);\n };\n\n CodeMirror.defineMIME = defineMIME;\n\n // Minimal default mode.\n CodeMirror.defineMode(\"null\", function () { return ({token: function (stream) { return stream.skipToEnd(); }}); });\n CodeMirror.defineMIME(\"text/plain\", \"null\");\n\n // EXTENSIONS\n\n CodeMirror.defineExtension = function (name, func) {\n CodeMirror.prototype[name] = func;\n };\n CodeMirror.defineDocExtension = function (name, func) {\n Doc.prototype[name] = func;\n };\n\n CodeMirror.fromTextArea = fromTextArea;\n\n addLegacyProps(CodeMirror);\n\n CodeMirror.version = \"5.65.18\";\n\n return CodeMirror;\n\n})));\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"), require(\"../markdown/markdown\"), require(\"../../addon/mode/overlay\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\", \"../markdown/markdown\", \"../../addon/mode/overlay\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nvar urlRE = /^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\\.beep|\\.lwz|\\.xpc|\\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\\.beeps?|xmpp|xri|ymsgr|z39\\.50[rs]?):(?:\\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]|\\([^\\s()<>]*\\))+(?:\\([^\\s()<>]*\\)|[^\\s`*!()\\[\\]{};:'\".,<>?«»“”‘’]))/i\n\nCodeMirror.defineMode(\"gfm\", function(config, modeConfig) {\n var codeDepth = 0;\n function blankLine(state) {\n state.code = false;\n return null;\n }\n var gfmOverlay = {\n startState: function() {\n return {\n code: false,\n codeBlock: false,\n ateSpace: false\n };\n },\n copyState: function(s) {\n return {\n code: s.code,\n codeBlock: s.codeBlock,\n ateSpace: s.ateSpace\n };\n },\n token: function(stream, state) {\n state.combineTokens = null;\n\n // Hack to prevent formatting override inside code blocks (block and inline)\n if (state.codeBlock) {\n if (stream.match(/^```+/)) {\n state.codeBlock = false;\n return null;\n }\n stream.skipToEnd();\n return null;\n }\n if (stream.sol()) {\n state.code = false;\n }\n if (stream.sol() && stream.match(/^```+/)) {\n stream.skipToEnd();\n state.codeBlock = true;\n return null;\n }\n // If this block is changed, it may need to be updated in Markdown mode\n if (stream.peek() === '`') {\n stream.next();\n var before = stream.pos;\n stream.eatWhile('`');\n var difference = 1 + stream.pos - before;\n if (!state.code) {\n codeDepth = difference;\n state.code = true;\n } else {\n if (difference === codeDepth) { // Must be exact\n state.code = false;\n }\n }\n return null;\n } else if (state.code) {\n stream.next();\n return null;\n }\n // Check if space. If so, links can be formatted later on\n if (stream.eatSpace()) {\n state.ateSpace = true;\n return null;\n }\n if (stream.sol() || state.ateSpace) {\n state.ateSpace = false;\n if (modeConfig.gitHubSpice !== false) {\n if(stream.match(/^(?:[a-zA-Z0-9\\-_]+\\/)?(?:[a-zA-Z0-9\\-_]+@)?(?=.{0,6}\\d)(?:[a-f0-9]{7,40}\\b)/)) {\n // User/Project@SHA\n // User@SHA\n // SHA\n state.combineTokens = true;\n return \"link\";\n } else if (stream.match(/^(?:[a-zA-Z0-9\\-_]+\\/)?(?:[a-zA-Z0-9\\-_]+)?#[0-9]+\\b/)) {\n // User/Project#Num\n // User#Num\n // #Num\n state.combineTokens = true;\n return \"link\";\n }\n }\n }\n if (stream.match(urlRE) &&\n stream.string.slice(stream.start - 2, stream.start) != \"](\" &&\n (stream.start == 0 || /\\W/.test(stream.string.charAt(stream.start - 1)))) {\n // URLs\n // Taken from http://daringfireball.net/2010/07/improved_regex_for_matching_urls\n // And then (issue #1160) simplified to make it not crash the Chrome Regexp engine\n // And then limited url schemes to the CommonMark list, so foo:bar isn't matched as a URL\n state.combineTokens = true;\n return \"link\";\n }\n stream.next();\n return null;\n },\n blankLine: blankLine\n };\n\n var markdownConfig = {\n taskLists: true,\n strikethrough: true,\n emoji: true\n };\n for (var attr in modeConfig) {\n markdownConfig[attr] = modeConfig[attr];\n }\n markdownConfig.name = \"markdown\";\n return CodeMirror.overlayMode(CodeMirror.getMode(config, markdownConfig), gfmOverlay);\n\n}, \"markdown\");\n\n CodeMirror.defineMIME(\"text/x-gfm\", \"gfm\");\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"), require(\"../xml/xml\"), require(\"../meta\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\", \"../xml/xml\", \"../meta\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"markdown\", function(cmCfg, modeCfg) {\n\n var htmlMode = CodeMirror.getMode(cmCfg, \"text/html\");\n var htmlModeMissing = htmlMode.name == \"null\"\n\n function getMode(name) {\n if (CodeMirror.findModeByName) {\n var found = CodeMirror.findModeByName(name);\n if (found) name = found.mime || found.mimes[0];\n }\n var mode = CodeMirror.getMode(cmCfg, name);\n return mode.name == \"null\" ? null : mode;\n }\n\n // Should characters that affect highlighting be highlighted separate?\n // Does not include characters that will be output (such as `1.` and `-` for lists)\n if (modeCfg.highlightFormatting === undefined)\n modeCfg.highlightFormatting = false;\n\n // Maximum number of nested blockquotes. Set to 0 for infinite nesting.\n // Excess `>` will emit `error` token.\n if (modeCfg.maxBlockquoteDepth === undefined)\n modeCfg.maxBlockquoteDepth = 0;\n\n // Turn on task lists? (\"- [ ] \" and \"- [x] \")\n if (modeCfg.taskLists === undefined) modeCfg.taskLists = false;\n\n // Turn on strikethrough syntax\n if (modeCfg.strikethrough === undefined)\n modeCfg.strikethrough = false;\n\n if (modeCfg.emoji === undefined)\n modeCfg.emoji = false;\n\n if (modeCfg.fencedCodeBlockHighlighting === undefined)\n modeCfg.fencedCodeBlockHighlighting = true;\n\n if (modeCfg.fencedCodeBlockDefaultMode === undefined)\n modeCfg.fencedCodeBlockDefaultMode = 'text/plain';\n\n if (modeCfg.xml === undefined)\n modeCfg.xml = true;\n\n // Allow token types to be overridden by user-provided token types.\n if (modeCfg.tokenTypeOverrides === undefined)\n modeCfg.tokenTypeOverrides = {};\n\n var tokenTypes = {\n header: \"header\",\n code: \"comment\",\n quote: \"quote\",\n list1: \"variable-2\",\n list2: \"variable-3\",\n list3: \"keyword\",\n hr: \"hr\",\n image: \"image\",\n imageAltText: \"image-alt-text\",\n imageMarker: \"image-marker\",\n formatting: \"formatting\",\n linkInline: \"link\",\n linkEmail: \"link\",\n linkText: \"link\",\n linkHref: \"string\",\n em: \"em\",\n strong: \"strong\",\n strikethrough: \"strikethrough\",\n emoji: \"builtin\"\n };\n\n for (var tokenType in tokenTypes) {\n if (tokenTypes.hasOwnProperty(tokenType) && modeCfg.tokenTypeOverrides[tokenType]) {\n tokenTypes[tokenType] = modeCfg.tokenTypeOverrides[tokenType];\n }\n }\n\n var hrRE = /^([*\\-_])(?:\\s*\\1){2,}\\s*$/\n , listRE = /^(?:[*\\-+]|^[0-9]+([.)]))\\s+/\n , taskListRE = /^\\[(x| )\\](?=\\s)/i // Must follow listRE\n , atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/\n , setextHeaderRE = /^ {0,3}(?:\\={1,}|-{2,})\\s*$/\n , textRE = /^[^#!\\[\\]*_\\\\<>` \"'(~:]+/\n , fencedCodeRE = /^(~~~+|```+)[ \\t]*([\\w\\/+#-]*)[^\\n`]*$/\n , linkDefRE = /^\\s*\\[[^\\]]+?\\]:.*$/ // naive link-definition\n , punctuation = /[!\"#$%&'()*+,\\-.\\/:;<=>?@\\[\\\\\\]^_`{|}~\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u0AF0\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166D\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E42\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]|\\uD800[\\uDD00-\\uDD02\\uDF9F\\uDFD0]|\\uD801\\uDD6F|\\uD802[\\uDC57\\uDD1F\\uDD3F\\uDE50-\\uDE58\\uDE7F\\uDEF0-\\uDEF6\\uDF39-\\uDF3F\\uDF99-\\uDF9C]|\\uD804[\\uDC47-\\uDC4D\\uDCBB\\uDCBC\\uDCBE-\\uDCC1\\uDD40-\\uDD43\\uDD74\\uDD75\\uDDC5-\\uDDC9\\uDDCD\\uDDDB\\uDDDD-\\uDDDF\\uDE38-\\uDE3D\\uDEA9]|\\uD805[\\uDCC6\\uDDC1-\\uDDD7\\uDE41-\\uDE43\\uDF3C-\\uDF3E]|\\uD809[\\uDC70-\\uDC74]|\\uD81A[\\uDE6E\\uDE6F\\uDEF5\\uDF37-\\uDF3B\\uDF44]|\\uD82F\\uDC9F|\\uD836[\\uDE87-\\uDE8B]/\n , expandedTab = \" \" // CommonMark specifies tab as 4 spaces\n\n function switchInline(stream, state, f) {\n state.f = state.inline = f;\n return f(stream, state);\n }\n\n function switchBlock(stream, state, f) {\n state.f = state.block = f;\n return f(stream, state);\n }\n\n function lineIsEmpty(line) {\n return !line || !/\\S/.test(line.string)\n }\n\n // Blocks\n\n function blankLine(state) {\n // Reset linkTitle state\n state.linkTitle = false;\n state.linkHref = false;\n state.linkText = false;\n // Reset EM state\n state.em = false;\n // Reset STRONG state\n state.strong = false;\n // Reset strikethrough state\n state.strikethrough = false;\n // Reset state.quote\n state.quote = 0;\n // Reset state.indentedCode\n state.indentedCode = false;\n if (state.f == htmlBlock) {\n var exit = htmlModeMissing\n if (!exit) {\n var inner = CodeMirror.innerMode(htmlMode, state.htmlState)\n exit = inner.mode.name == \"xml\" && inner.state.tagStart === null &&\n (!inner.state.context && inner.state.tokenize.isInText)\n }\n if (exit) {\n state.f = inlineNormal;\n state.block = blockNormal;\n state.htmlState = null;\n }\n }\n // Reset state.trailingSpace\n state.trailingSpace = 0;\n state.trailingSpaceNewLine = false;\n // Mark this line as blank\n state.prevLine = state.thisLine\n state.thisLine = {stream: null}\n return null;\n }\n\n function blockNormal(stream, state) {\n var firstTokenOnLine = stream.column() === state.indentation;\n var prevLineLineIsEmpty = lineIsEmpty(state.prevLine.stream);\n var prevLineIsIndentedCode = state.indentedCode;\n var prevLineIsHr = state.prevLine.hr;\n var prevLineIsList = state.list !== false;\n var maxNonCodeIndentation = (state.listStack[state.listStack.length - 1] || 0) + 3;\n\n state.indentedCode = false;\n\n var lineIndentation = state.indentation;\n // compute once per line (on first token)\n if (state.indentationDiff === null) {\n state.indentationDiff = state.indentation;\n if (prevLineIsList) {\n state.list = null;\n // While this list item's marker's indentation is less than the deepest\n // list item's content's indentation,pop the deepest list item\n // indentation off the stack, and update block indentation state\n while (lineIndentation < state.listStack[state.listStack.length - 1]) {\n state.listStack.pop();\n if (state.listStack.length) {\n state.indentation = state.listStack[state.listStack.length - 1];\n // less than the first list's indent -> the line is no longer a list\n } else {\n state.list = false;\n }\n }\n if (state.list !== false) {\n state.indentationDiff = lineIndentation - state.listStack[state.listStack.length - 1]\n }\n }\n }\n\n // not comprehensive (currently only for setext detection purposes)\n var allowsInlineContinuation = (\n !prevLineLineIsEmpty && !prevLineIsHr && !state.prevLine.header &&\n (!prevLineIsList || !prevLineIsIndentedCode) &&\n !state.prevLine.fencedCodeEnd\n );\n\n var isHr = (state.list === false || prevLineIsHr || prevLineLineIsEmpty) &&\n state.indentation <= maxNonCodeIndentation && stream.match(hrRE);\n\n var match = null;\n if (state.indentationDiff >= 4 && (prevLineIsIndentedCode || state.prevLine.fencedCodeEnd ||\n state.prevLine.header || prevLineLineIsEmpty)) {\n stream.skipToEnd();\n state.indentedCode = true;\n return tokenTypes.code;\n } else if (stream.eatSpace()) {\n return null;\n } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(atxHeaderRE)) && match[1].length <= 6) {\n state.quote = 0;\n state.header = match[1].length;\n state.thisLine.header = true;\n if (modeCfg.highlightFormatting) state.formatting = \"header\";\n state.f = state.inline;\n return getType(state);\n } else if (state.indentation <= maxNonCodeIndentation && stream.eat('>')) {\n state.quote = firstTokenOnLine ? 1 : state.quote + 1;\n if (modeCfg.highlightFormatting) state.formatting = \"quote\";\n stream.eatSpace();\n return getType(state);\n } else if (!isHr && !state.setext && firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(listRE))) {\n var listType = match[1] ? \"ol\" : \"ul\";\n\n state.indentation = lineIndentation + stream.current().length;\n state.list = true;\n state.quote = 0;\n\n // Add this list item's content's indentation to the stack\n state.listStack.push(state.indentation);\n // Reset inline styles which shouldn't propagate across list items\n state.em = false;\n state.strong = false;\n state.code = false;\n state.strikethrough = false;\n\n if (modeCfg.taskLists && stream.match(taskListRE, false)) {\n state.taskList = true;\n }\n state.f = state.inline;\n if (modeCfg.highlightFormatting) state.formatting = [\"list\", \"list-\" + listType];\n return getType(state);\n } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(fencedCodeRE, true))) {\n state.quote = 0;\n state.fencedEndRE = new RegExp(match[1] + \"+ *$\");\n // try switching mode\n state.localMode = modeCfg.fencedCodeBlockHighlighting && getMode(match[2] || modeCfg.fencedCodeBlockDefaultMode );\n if (state.localMode) state.localState = CodeMirror.startState(state.localMode);\n state.f = state.block = local;\n if (modeCfg.highlightFormatting) state.formatting = \"code-block\";\n state.code = -1\n return getType(state);\n // SETEXT has lowest block-scope precedence after HR, so check it after\n // the others (code, blockquote, list...)\n } else if (\n // if setext set, indicates line after ---/===\n state.setext || (\n // line before ---/===\n (!allowsInlineContinuation || !prevLineIsList) && !state.quote && state.list === false &&\n !state.code && !isHr && !linkDefRE.test(stream.string) &&\n (match = stream.lookAhead(1)) && (match = match.match(setextHeaderRE))\n )\n ) {\n if ( !state.setext ) {\n state.header = match[0].charAt(0) == '=' ? 1 : 2;\n state.setext = state.header;\n } else {\n state.header = state.setext;\n // has no effect on type so we can reset it now\n state.setext = 0;\n stream.skipToEnd();\n if (modeCfg.highlightFormatting) state.formatting = \"header\";\n }\n state.thisLine.header = true;\n state.f = state.inline;\n return getType(state);\n } else if (isHr) {\n stream.skipToEnd();\n state.hr = true;\n state.thisLine.hr = true;\n return tokenTypes.hr;\n } else if (stream.peek() === '[') {\n return switchInline(stream, state, footnoteLink);\n }\n\n return switchInline(stream, state, state.inline);\n }\n\n function htmlBlock(stream, state) {\n var style = htmlMode.token(stream, state.htmlState);\n if (!htmlModeMissing) {\n var inner = CodeMirror.innerMode(htmlMode, state.htmlState)\n if ((inner.mode.name == \"xml\" && inner.state.tagStart === null &&\n (!inner.state.context && inner.state.tokenize.isInText)) ||\n (state.md_inside && stream.current().indexOf(\">\") > -1)) {\n state.f = inlineNormal;\n state.block = blockNormal;\n state.htmlState = null;\n }\n }\n return style;\n }\n\n function local(stream, state) {\n var currListInd = state.listStack[state.listStack.length - 1] || 0;\n var hasExitedList = state.indentation < currListInd;\n var maxFencedEndInd = currListInd + 3;\n if (state.fencedEndRE && state.indentation <= maxFencedEndInd && (hasExitedList || stream.match(state.fencedEndRE))) {\n if (modeCfg.highlightFormatting) state.formatting = \"code-block\";\n var returnType;\n if (!hasExitedList) returnType = getType(state)\n state.localMode = state.localState = null;\n state.block = blockNormal;\n state.f = inlineNormal;\n state.fencedEndRE = null;\n state.code = 0\n state.thisLine.fencedCodeEnd = true;\n if (hasExitedList) return switchBlock(stream, state, state.block);\n return returnType;\n } else if (state.localMode) {\n return state.localMode.token(stream, state.localState);\n } else {\n stream.skipToEnd();\n return tokenTypes.code;\n }\n }\n\n // Inline\n function getType(state) {\n var styles = [];\n\n if (state.formatting) {\n styles.push(tokenTypes.formatting);\n\n if (typeof state.formatting === \"string\") state.formatting = [state.formatting];\n\n for (var i = 0; i < state.formatting.length; i++) {\n styles.push(tokenTypes.formatting + \"-\" + state.formatting[i]);\n\n if (state.formatting[i] === \"header\") {\n styles.push(tokenTypes.formatting + \"-\" + state.formatting[i] + \"-\" + state.header);\n }\n\n // Add `formatting-quote` and `formatting-quote-#` for blockquotes\n // Add `error` instead if the maximum blockquote nesting depth is passed\n if (state.formatting[i] === \"quote\") {\n if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {\n styles.push(tokenTypes.formatting + \"-\" + state.formatting[i] + \"-\" + state.quote);\n } else {\n styles.push(\"error\");\n }\n }\n }\n }\n\n if (state.taskOpen) {\n styles.push(\"meta\");\n return styles.length ? styles.join(' ') : null;\n }\n if (state.taskClosed) {\n styles.push(\"property\");\n return styles.length ? styles.join(' ') : null;\n }\n\n if (state.linkHref) {\n styles.push(tokenTypes.linkHref, \"url\");\n } else { // Only apply inline styles to non-url text\n if (state.strong) { styles.push(tokenTypes.strong); }\n if (state.em) { styles.push(tokenTypes.em); }\n if (state.strikethrough) { styles.push(tokenTypes.strikethrough); }\n if (state.emoji) { styles.push(tokenTypes.emoji); }\n if (state.linkText) { styles.push(tokenTypes.linkText); }\n if (state.code) { styles.push(tokenTypes.code); }\n if (state.image) { styles.push(tokenTypes.image); }\n if (state.imageAltText) { styles.push(tokenTypes.imageAltText, \"link\"); }\n if (state.imageMarker) { styles.push(tokenTypes.imageMarker); }\n }\n\n if (state.header) { styles.push(tokenTypes.header, tokenTypes.header + \"-\" + state.header); }\n\n if (state.quote) {\n styles.push(tokenTypes.quote);\n\n // Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth\n if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {\n styles.push(tokenTypes.quote + \"-\" + state.quote);\n } else {\n styles.push(tokenTypes.quote + \"-\" + modeCfg.maxBlockquoteDepth);\n }\n }\n\n if (state.list !== false) {\n var listMod = (state.listStack.length - 1) % 3;\n if (!listMod) {\n styles.push(tokenTypes.list1);\n } else if (listMod === 1) {\n styles.push(tokenTypes.list2);\n } else {\n styles.push(tokenTypes.list3);\n }\n }\n\n if (state.trailingSpaceNewLine) {\n styles.push(\"trailing-space-new-line\");\n } else if (state.trailingSpace) {\n styles.push(\"trailing-space-\" + (state.trailingSpace % 2 ? \"a\" : \"b\"));\n }\n\n return styles.length ? styles.join(' ') : null;\n }\n\n function handleText(stream, state) {\n if (stream.match(textRE, true)) {\n return getType(state);\n }\n return undefined;\n }\n\n function inlineNormal(stream, state) {\n var style = state.text(stream, state);\n if (typeof style !== 'undefined')\n return style;\n\n if (state.list) { // List marker (*, +, -, 1., etc)\n state.list = null;\n return getType(state);\n }\n\n if (state.taskList) {\n var taskOpen = stream.match(taskListRE, true)[1] === \" \";\n if (taskOpen) state.taskOpen = true;\n else state.taskClosed = true;\n if (modeCfg.highlightFormatting) state.formatting = \"task\";\n state.taskList = false;\n return getType(state);\n }\n\n state.taskOpen = false;\n state.taskClosed = false;\n\n if (state.header && stream.match(/^#+$/, true)) {\n if (modeCfg.highlightFormatting) state.formatting = \"header\";\n return getType(state);\n }\n\n var ch = stream.next();\n\n // Matches link titles present on next line\n if (state.linkTitle) {\n state.linkTitle = false;\n var matchCh = ch;\n if (ch === '(') {\n matchCh = ')';\n }\n matchCh = (matchCh+'').replace(/([.?*+^\\[\\]\\\\(){}|-])/g, \"\\\\$1\");\n var regex = '^\\\\s*(?:[^' + matchCh + '\\\\\\\\]+|\\\\\\\\\\\\\\\\|\\\\\\\\.)' + matchCh;\n if (stream.match(new RegExp(regex), true)) {\n return tokenTypes.linkHref;\n }\n }\n\n // If this block is changed, it may need to be updated in GFM mode\n if (ch === '`') {\n var previousFormatting = state.formatting;\n if (modeCfg.highlightFormatting) state.formatting = \"code\";\n stream.eatWhile('`');\n var count = stream.current().length\n if (state.code == 0 && (!state.quote || count == 1)) {\n state.code = count\n return getType(state)\n } else if (count == state.code) { // Must be exact\n var t = getType(state)\n state.code = 0\n return t\n } else {\n state.formatting = previousFormatting\n return getType(state)\n }\n } else if (state.code) {\n return getType(state);\n }\n\n if (ch === '\\\\') {\n stream.next();\n if (modeCfg.highlightFormatting) {\n var type = getType(state);\n var formattingEscape = tokenTypes.formatting + \"-escape\";\n return type ? type + \" \" + formattingEscape : formattingEscape;\n }\n }\n\n if (ch === '!' && stream.match(/\\[[^\\]]*\\] ?(?:\\(|\\[)/, false)) {\n state.imageMarker = true;\n state.image = true;\n if (modeCfg.highlightFormatting) state.formatting = \"image\";\n return getType(state);\n }\n\n if (ch === '[' && state.imageMarker && stream.match(/[^\\]]*\\](\\(.*?\\)| ?\\[.*?\\])/, false)) {\n state.imageMarker = false;\n state.imageAltText = true\n if (modeCfg.highlightFormatting) state.formatting = \"image\";\n return getType(state);\n }\n\n if (ch === ']' && state.imageAltText) {\n if (modeCfg.highlightFormatting) state.formatting = \"image\";\n var type = getType(state);\n state.imageAltText = false;\n state.image = false;\n state.inline = state.f = linkHref;\n return type;\n }\n\n if (ch === '[' && !state.image) {\n if (state.linkText && stream.match(/^.*?\\]/)) return getType(state)\n state.linkText = true;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n return getType(state);\n }\n\n if (ch === ']' && state.linkText) {\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var type = getType(state);\n state.linkText = false;\n state.inline = state.f = stream.match(/\\(.*?\\)| ?\\[.*?\\]/, false) ? linkHref : inlineNormal\n return type;\n }\n\n if (ch === '<' && stream.match(/^(https?|ftps?):\\/\\/(?:[^\\\\>]|\\\\.)+>/, false)) {\n state.f = state.inline = linkInline;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var type = getType(state);\n if (type){\n type += \" \";\n } else {\n type = \"\";\n }\n return type + tokenTypes.linkInline;\n }\n\n if (ch === '<' && stream.match(/^[^> \\\\]+@(?:[^\\\\>]|\\\\.)+>/, false)) {\n state.f = state.inline = linkInline;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var type = getType(state);\n if (type){\n type += \" \";\n } else {\n type = \"\";\n }\n return type + tokenTypes.linkEmail;\n }\n\n if (modeCfg.xml && ch === '<' && stream.match(/^(!--|\\?|!\\[CDATA\\[|[a-z][a-z0-9-]*(?:\\s+[a-z_:.\\-]+(?:\\s*=\\s*[^>]+)?)*\\s*(?:>|$))/i, false)) {\n var end = stream.string.indexOf(\">\", stream.pos);\n if (end != -1) {\n var atts = stream.string.substring(stream.start, end);\n if (/markdown\\s*=\\s*('|\"){0,1}1('|\"){0,1}/.test(atts)) state.md_inside = true;\n }\n stream.backUp(1);\n state.htmlState = CodeMirror.startState(htmlMode);\n return switchBlock(stream, state, htmlBlock);\n }\n\n if (modeCfg.xml && ch === '<' && stream.match(/^\\/\\w*?>/)) {\n state.md_inside = false;\n return \"tag\";\n } else if (ch === \"*\" || ch === \"_\") {\n var len = 1, before = stream.pos == 1 ? \" \" : stream.string.charAt(stream.pos - 2)\n while (len < 3 && stream.eat(ch)) len++\n var after = stream.peek() || \" \"\n // See http://spec.commonmark.org/0.27/#emphasis-and-strong-emphasis\n var leftFlanking = !/\\s/.test(after) && (!punctuation.test(after) || /\\s/.test(before) || punctuation.test(before))\n var rightFlanking = !/\\s/.test(before) && (!punctuation.test(before) || /\\s/.test(after) || punctuation.test(after))\n var setEm = null, setStrong = null\n if (len % 2) { // Em\n if (!state.em && leftFlanking && (ch === \"*\" || !rightFlanking || punctuation.test(before)))\n setEm = true\n else if (state.em == ch && rightFlanking && (ch === \"*\" || !leftFlanking || punctuation.test(after)))\n setEm = false\n }\n if (len > 1) { // Strong\n if (!state.strong && leftFlanking && (ch === \"*\" || !rightFlanking || punctuation.test(before)))\n setStrong = true\n else if (state.strong == ch && rightFlanking && (ch === \"*\" || !leftFlanking || punctuation.test(after)))\n setStrong = false\n }\n if (setStrong != null || setEm != null) {\n if (modeCfg.highlightFormatting) state.formatting = setEm == null ? \"strong\" : setStrong == null ? \"em\" : \"strong em\"\n if (setEm === true) state.em = ch\n if (setStrong === true) state.strong = ch\n var t = getType(state)\n if (setEm === false) state.em = false\n if (setStrong === false) state.strong = false\n return t\n }\n } else if (ch === ' ') {\n if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces\n if (stream.peek() === ' ') { // Surrounded by spaces, ignore\n return getType(state);\n } else { // Not surrounded by spaces, back up pointer\n stream.backUp(1);\n }\n }\n }\n\n if (modeCfg.strikethrough) {\n if (ch === '~' && stream.eatWhile(ch)) {\n if (state.strikethrough) {// Remove strikethrough\n if (modeCfg.highlightFormatting) state.formatting = \"strikethrough\";\n var t = getType(state);\n state.strikethrough = false;\n return t;\n } else if (stream.match(/^[^\\s]/, false)) {// Add strikethrough\n state.strikethrough = true;\n if (modeCfg.highlightFormatting) state.formatting = \"strikethrough\";\n return getType(state);\n }\n } else if (ch === ' ') {\n if (stream.match('~~', true)) { // Probably surrounded by space\n if (stream.peek() === ' ') { // Surrounded by spaces, ignore\n return getType(state);\n } else { // Not surrounded by spaces, back up pointer\n stream.backUp(2);\n }\n }\n }\n }\n\n if (modeCfg.emoji && ch === \":\" && stream.match(/^(?:[a-z_\\d+][a-z_\\d+-]*|\\-[a-z_\\d+][a-z_\\d+-]*):/)) {\n state.emoji = true;\n if (modeCfg.highlightFormatting) state.formatting = \"emoji\";\n var retType = getType(state);\n state.emoji = false;\n return retType;\n }\n\n if (ch === ' ') {\n if (stream.match(/^ +$/, false)) {\n state.trailingSpace++;\n } else if (state.trailingSpace) {\n state.trailingSpaceNewLine = true;\n }\n }\n\n return getType(state);\n }\n\n function linkInline(stream, state) {\n var ch = stream.next();\n\n if (ch === \">\") {\n state.f = state.inline = inlineNormal;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var type = getType(state);\n if (type){\n type += \" \";\n } else {\n type = \"\";\n }\n return type + tokenTypes.linkInline;\n }\n\n stream.match(/^[^>]+/, true);\n\n return tokenTypes.linkInline;\n }\n\n function linkHref(stream, state) {\n // Check if space, and return NULL if so (to avoid marking the space)\n if(stream.eatSpace()){\n return null;\n }\n var ch = stream.next();\n if (ch === '(' || ch === '[') {\n state.f = state.inline = getLinkHrefInside(ch === \"(\" ? \")\" : \"]\");\n if (modeCfg.highlightFormatting) state.formatting = \"link-string\";\n state.linkHref = true;\n return getType(state);\n }\n return 'error';\n }\n\n var linkRE = {\n \")\": /^(?:[^\\\\\\(\\)]|\\\\.|\\((?:[^\\\\\\(\\)]|\\\\.)*\\))*?(?=\\))/,\n \"]\": /^(?:[^\\\\\\[\\]]|\\\\.|\\[(?:[^\\\\\\[\\]]|\\\\.)*\\])*?(?=\\])/\n }\n\n function getLinkHrefInside(endChar) {\n return function(stream, state) {\n var ch = stream.next();\n\n if (ch === endChar) {\n state.f = state.inline = inlineNormal;\n if (modeCfg.highlightFormatting) state.formatting = \"link-string\";\n var returnState = getType(state);\n state.linkHref = false;\n return returnState;\n }\n\n stream.match(linkRE[endChar])\n state.linkHref = true;\n return getType(state);\n };\n }\n\n function footnoteLink(stream, state) {\n if (stream.match(/^([^\\]\\\\]|\\\\.)*\\]:/, false)) {\n state.f = footnoteLinkInside;\n stream.next(); // Consume [\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n state.linkText = true;\n return getType(state);\n }\n return switchInline(stream, state, inlineNormal);\n }\n\n function footnoteLinkInside(stream, state) {\n if (stream.match(']:', true)) {\n state.f = state.inline = footnoteUrl;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var returnType = getType(state);\n state.linkText = false;\n return returnType;\n }\n\n stream.match(/^([^\\]\\\\]|\\\\.)+/, true);\n\n return tokenTypes.linkText;\n }\n\n function footnoteUrl(stream, state) {\n // Check if space, and return NULL if so (to avoid marking the space)\n if(stream.eatSpace()){\n return null;\n }\n // Match URL\n stream.match(/^[^\\s]+/, true);\n // Check for link title\n if (stream.peek() === undefined) { // End of line, set flag to check next line\n state.linkTitle = true;\n } else { // More content on line, check if link title\n stream.match(/^(?:\\s+(?:\"(?:[^\"\\\\]|\\\\.)+\"|'(?:[^'\\\\]|\\\\.)+'|\\((?:[^)\\\\]|\\\\.)+\\)))?/, true);\n }\n state.f = state.inline = inlineNormal;\n return tokenTypes.linkHref + \" url\";\n }\n\n var mode = {\n startState: function() {\n return {\n f: blockNormal,\n\n prevLine: {stream: null},\n thisLine: {stream: null},\n\n block: blockNormal,\n htmlState: null,\n indentation: 0,\n\n inline: inlineNormal,\n text: handleText,\n\n formatting: false,\n linkText: false,\n linkHref: false,\n linkTitle: false,\n code: 0,\n em: false,\n strong: false,\n header: 0,\n setext: 0,\n hr: false,\n taskList: false,\n list: false,\n listStack: [],\n quote: 0,\n trailingSpace: 0,\n trailingSpaceNewLine: false,\n strikethrough: false,\n emoji: false,\n fencedEndRE: null\n };\n },\n\n copyState: function(s) {\n return {\n f: s.f,\n\n prevLine: s.prevLine,\n thisLine: s.thisLine,\n\n block: s.block,\n htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),\n indentation: s.indentation,\n\n localMode: s.localMode,\n localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,\n\n inline: s.inline,\n text: s.text,\n formatting: false,\n linkText: s.linkText,\n linkTitle: s.linkTitle,\n linkHref: s.linkHref,\n code: s.code,\n em: s.em,\n strong: s.strong,\n strikethrough: s.strikethrough,\n emoji: s.emoji,\n header: s.header,\n setext: s.setext,\n hr: s.hr,\n taskList: s.taskList,\n list: s.list,\n listStack: s.listStack.slice(0),\n quote: s.quote,\n indentedCode: s.indentedCode,\n trailingSpace: s.trailingSpace,\n trailingSpaceNewLine: s.trailingSpaceNewLine,\n md_inside: s.md_inside,\n fencedEndRE: s.fencedEndRE\n };\n },\n\n token: function(stream, state) {\n\n // Reset state.formatting\n state.formatting = false;\n\n if (stream != state.thisLine.stream) {\n state.header = 0;\n state.hr = false;\n\n if (stream.match(/^\\s*$/, true)) {\n blankLine(state);\n return null;\n }\n\n state.prevLine = state.thisLine\n state.thisLine = {stream: stream}\n\n // Reset state.taskList\n state.taskList = false;\n\n // Reset state.trailingSpace\n state.trailingSpace = 0;\n state.trailingSpaceNewLine = false;\n\n if (!state.localState) {\n state.f = state.block;\n if (state.f != htmlBlock) {\n var indentation = stream.match(/^\\s*/, true)[0].replace(/\\t/g, expandedTab).length;\n state.indentation = indentation;\n state.indentationDiff = null;\n if (indentation > 0) return null;\n }\n }\n }\n return state.f(stream, state);\n },\n\n innerMode: function(state) {\n if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode};\n if (state.localState) return {state: state.localState, mode: state.localMode};\n return {state: state, mode: mode};\n },\n\n indent: function(state, textAfter, line) {\n if (state.block == htmlBlock && htmlMode.indent) return htmlMode.indent(state.htmlState, textAfter, line)\n if (state.localState && state.localMode.indent) return state.localMode.indent(state.localState, textAfter, line)\n return CodeMirror.Pass\n },\n\n blankLine: blankLine,\n\n getType: getType,\n\n blockCommentStart: \"\",\n closeBrackets: \"()[]{}''\\\"\\\"``\",\n fold: \"markdown\"\n };\n return mode;\n}, \"xml\");\n\nCodeMirror.defineMIME(\"text/markdown\", \"markdown\");\n\nCodeMirror.defineMIME(\"text/x-markdown\", \"markdown\");\n\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n CodeMirror.modeInfo = [\n {name: \"APL\", mime: \"text/apl\", mode: \"apl\", ext: [\"dyalog\", \"apl\"]},\n {name: \"PGP\", mimes: [\"application/pgp\", \"application/pgp-encrypted\", \"application/pgp-keys\", \"application/pgp-signature\"], mode: \"asciiarmor\", ext: [\"asc\", \"pgp\", \"sig\"]},\n {name: \"ASN.1\", mime: \"text/x-ttcn-asn\", mode: \"asn.1\", ext: [\"asn\", \"asn1\"]},\n {name: \"Asterisk\", mime: \"text/x-asterisk\", mode: \"asterisk\", file: /^extensions\\.conf$/i},\n {name: \"Brainfuck\", mime: \"text/x-brainfuck\", mode: \"brainfuck\", ext: [\"b\", \"bf\"]},\n {name: \"C\", mime: \"text/x-csrc\", mode: \"clike\", ext: [\"c\", \"h\", \"ino\"]},\n {name: \"C++\", mime: \"text/x-c++src\", mode: \"clike\", ext: [\"cpp\", \"c++\", \"cc\", \"cxx\", \"hpp\", \"h++\", \"hh\", \"hxx\"], alias: [\"cpp\"]},\n {name: \"Cobol\", mime: \"text/x-cobol\", mode: \"cobol\", ext: [\"cob\", \"cpy\", \"cbl\"]},\n {name: \"C#\", mime: \"text/x-csharp\", mode: \"clike\", ext: [\"cs\"], alias: [\"csharp\", \"cs\"]},\n {name: \"Clojure\", mime: \"text/x-clojure\", mode: \"clojure\", ext: [\"clj\", \"cljc\", \"cljx\"]},\n {name: \"ClojureScript\", mime: \"text/x-clojurescript\", mode: \"clojure\", ext: [\"cljs\"]},\n {name: \"Closure Stylesheets (GSS)\", mime: \"text/x-gss\", mode: \"css\", ext: [\"gss\"]},\n {name: \"CMake\", mime: \"text/x-cmake\", mode: \"cmake\", ext: [\"cmake\", \"cmake.in\"], file: /^CMakeLists\\.txt$/},\n {name: \"CoffeeScript\", mimes: [\"application/vnd.coffeescript\", \"text/coffeescript\", \"text/x-coffeescript\"], mode: \"coffeescript\", ext: [\"coffee\"], alias: [\"coffee\", \"coffee-script\"]},\n {name: \"Common Lisp\", mime: \"text/x-common-lisp\", mode: \"commonlisp\", ext: [\"cl\", \"lisp\", \"el\"], alias: [\"lisp\"]},\n {name: \"Cypher\", mime: \"application/x-cypher-query\", mode: \"cypher\", ext: [\"cyp\", \"cypher\"]},\n {name: \"Cython\", mime: \"text/x-cython\", mode: \"python\", ext: [\"pyx\", \"pxd\", \"pxi\"]},\n {name: \"Crystal\", mime: \"text/x-crystal\", mode: \"crystal\", ext: [\"cr\"]},\n {name: \"CSS\", mime: \"text/css\", mode: \"css\", ext: [\"css\"]},\n {name: \"CQL\", mime: \"text/x-cassandra\", mode: \"sql\", ext: [\"cql\"]},\n {name: \"D\", mime: \"text/x-d\", mode: \"d\", ext: [\"d\"]},\n {name: \"Dart\", mimes: [\"application/dart\", \"text/x-dart\"], mode: \"dart\", ext: [\"dart\"]},\n {name: \"diff\", mime: \"text/x-diff\", mode: \"diff\", ext: [\"diff\", \"patch\"]},\n {name: \"Django\", mime: \"text/x-django\", mode: \"django\"},\n {name: \"Dockerfile\", mime: \"text/x-dockerfile\", mode: \"dockerfile\", file: /^Dockerfile$/},\n {name: \"DTD\", mime: \"application/xml-dtd\", mode: \"dtd\", ext: [\"dtd\"]},\n {name: \"Dylan\", mime: \"text/x-dylan\", mode: \"dylan\", ext: [\"dylan\", \"dyl\", \"intr\"]},\n {name: \"EBNF\", mime: \"text/x-ebnf\", mode: \"ebnf\"},\n {name: \"ECL\", mime: \"text/x-ecl\", mode: \"ecl\", ext: [\"ecl\"]},\n {name: \"edn\", mime: \"application/edn\", mode: \"clojure\", ext: [\"edn\"]},\n {name: \"Eiffel\", mime: \"text/x-eiffel\", mode: \"eiffel\", ext: [\"e\"]},\n {name: \"Elm\", mime: \"text/x-elm\", mode: \"elm\", ext: [\"elm\"]},\n {name: \"Embedded JavaScript\", mime: \"application/x-ejs\", mode: \"htmlembedded\", ext: [\"ejs\"]},\n {name: \"Embedded Ruby\", mime: \"application/x-erb\", mode: \"htmlembedded\", ext: [\"erb\"]},\n {name: \"Erlang\", mime: \"text/x-erlang\", mode: \"erlang\", ext: [\"erl\"]},\n {name: \"Esper\", mime: \"text/x-esper\", mode: \"sql\"},\n {name: \"Factor\", mime: \"text/x-factor\", mode: \"factor\", ext: [\"factor\"]},\n {name: \"FCL\", mime: \"text/x-fcl\", mode: \"fcl\"},\n {name: \"Forth\", mime: \"text/x-forth\", mode: \"forth\", ext: [\"forth\", \"fth\", \"4th\"]},\n {name: \"Fortran\", mime: \"text/x-fortran\", mode: \"fortran\", ext: [\"f\", \"for\", \"f77\", \"f90\", \"f95\"]},\n {name: \"F#\", mime: \"text/x-fsharp\", mode: \"mllike\", ext: [\"fs\"], alias: [\"fsharp\"]},\n {name: \"Gas\", mime: \"text/x-gas\", mode: \"gas\", ext: [\"s\"]},\n {name: \"Gherkin\", mime: \"text/x-feature\", mode: \"gherkin\", ext: [\"feature\"]},\n {name: \"GitHub Flavored Markdown\", mime: \"text/x-gfm\", mode: \"gfm\", file: /^(readme|contributing|history)\\.md$/i},\n {name: \"Go\", mime: \"text/x-go\", mode: \"go\", ext: [\"go\"]},\n {name: \"Groovy\", mime: \"text/x-groovy\", mode: \"groovy\", ext: [\"groovy\", \"gradle\"], file: /^Jenkinsfile$/},\n {name: \"HAML\", mime: \"text/x-haml\", mode: \"haml\", ext: [\"haml\"]},\n {name: \"Haskell\", mime: \"text/x-haskell\", mode: \"haskell\", ext: [\"hs\"]},\n {name: \"Haskell (Literate)\", mime: \"text/x-literate-haskell\", mode: \"haskell-literate\", ext: [\"lhs\"]},\n {name: \"Haxe\", mime: \"text/x-haxe\", mode: \"haxe\", ext: [\"hx\"]},\n {name: \"HXML\", mime: \"text/x-hxml\", mode: \"haxe\", ext: [\"hxml\"]},\n {name: \"ASP.NET\", mime: \"application/x-aspx\", mode: \"htmlembedded\", ext: [\"aspx\"], alias: [\"asp\", \"aspx\"]},\n {name: \"HTML\", mime: \"text/html\", mode: \"htmlmixed\", ext: [\"html\", \"htm\", \"handlebars\", \"hbs\"], alias: [\"xhtml\"]},\n {name: \"HTTP\", mime: \"message/http\", mode: \"http\"},\n {name: \"IDL\", mime: \"text/x-idl\", mode: \"idl\", ext: [\"pro\"]},\n {name: \"Pug\", mime: \"text/x-pug\", mode: \"pug\", ext: [\"jade\", \"pug\"], alias: [\"jade\"]},\n {name: \"Java\", mime: \"text/x-java\", mode: \"clike\", ext: [\"java\"]},\n {name: \"Java Server Pages\", mime: \"application/x-jsp\", mode: \"htmlembedded\", ext: [\"jsp\"], alias: [\"jsp\"]},\n {name: \"JavaScript\", mimes: [\"text/javascript\", \"text/ecmascript\", \"application/javascript\", \"application/x-javascript\", \"application/ecmascript\"],\n mode: \"javascript\", ext: [\"js\"], alias: [\"ecmascript\", \"js\", \"node\"]},\n {name: \"JSON\", mimes: [\"application/json\", \"application/x-json\"], mode: \"javascript\", ext: [\"json\", \"map\"], alias: [\"json5\"]},\n {name: \"JSON-LD\", mime: \"application/ld+json\", mode: \"javascript\", ext: [\"jsonld\"], alias: [\"jsonld\"]},\n {name: \"JSX\", mime: \"text/jsx\", mode: \"jsx\", ext: [\"jsx\"]},\n {name: \"Jinja2\", mime: \"text/jinja2\", mode: \"jinja2\", ext: [\"j2\", \"jinja\", \"jinja2\"]},\n {name: \"Julia\", mime: \"text/x-julia\", mode: \"julia\", ext: [\"jl\"], alias: [\"jl\"]},\n {name: \"Kotlin\", mime: \"text/x-kotlin\", mode: \"clike\", ext: [\"kt\"]},\n {name: \"LESS\", mime: \"text/x-less\", mode: \"css\", ext: [\"less\"]},\n {name: \"LiveScript\", mime: \"text/x-livescript\", mode: \"livescript\", ext: [\"ls\"], alias: [\"ls\"]},\n {name: \"Lua\", mime: \"text/x-lua\", mode: \"lua\", ext: [\"lua\"]},\n {name: \"Markdown\", mime: \"text/x-markdown\", mode: \"markdown\", ext: [\"markdown\", \"md\", \"mkd\"]},\n {name: \"mIRC\", mime: \"text/mirc\", mode: \"mirc\"},\n {name: \"MariaDB SQL\", mime: \"text/x-mariadb\", mode: \"sql\"},\n {name: \"Mathematica\", mime: \"text/x-mathematica\", mode: \"mathematica\", ext: [\"m\", \"nb\", \"wl\", \"wls\"]},\n {name: \"Modelica\", mime: \"text/x-modelica\", mode: \"modelica\", ext: [\"mo\"]},\n {name: \"MUMPS\", mime: \"text/x-mumps\", mode: \"mumps\", ext: [\"mps\"]},\n {name: \"MS SQL\", mime: \"text/x-mssql\", mode: \"sql\"},\n {name: \"mbox\", mime: \"application/mbox\", mode: \"mbox\", ext: [\"mbox\"]},\n {name: \"MySQL\", mime: \"text/x-mysql\", mode: \"sql\"},\n {name: \"Nginx\", mime: \"text/x-nginx-conf\", mode: \"nginx\", file: /nginx.*\\.conf$/i},\n {name: \"NSIS\", mime: \"text/x-nsis\", mode: \"nsis\", ext: [\"nsh\", \"nsi\"]},\n {name: \"NTriples\", mimes: [\"application/n-triples\", \"application/n-quads\", \"text/n-triples\"],\n mode: \"ntriples\", ext: [\"nt\", \"nq\"]},\n {name: \"Objective-C\", mime: \"text/x-objectivec\", mode: \"clike\", ext: [\"m\"], alias: [\"objective-c\", \"objc\"]},\n {name: \"Objective-C++\", mime: \"text/x-objectivec++\", mode: \"clike\", ext: [\"mm\"], alias: [\"objective-c++\", \"objc++\"]},\n {name: \"OCaml\", mime: \"text/x-ocaml\", mode: \"mllike\", ext: [\"ml\", \"mli\", \"mll\", \"mly\"]},\n {name: \"Octave\", mime: \"text/x-octave\", mode: \"octave\", ext: [\"m\"]},\n {name: \"Oz\", mime: \"text/x-oz\", mode: \"oz\", ext: [\"oz\"]},\n {name: \"Pascal\", mime: \"text/x-pascal\", mode: \"pascal\", ext: [\"p\", \"pas\"]},\n {name: \"PEG.js\", mime: \"null\", mode: \"pegjs\", ext: [\"jsonld\"]},\n {name: \"Perl\", mime: \"text/x-perl\", mode: \"perl\", ext: [\"pl\", \"pm\"]},\n {name: \"PHP\", mimes: [\"text/x-php\", \"application/x-httpd-php\", \"application/x-httpd-php-open\"], mode: \"php\", ext: [\"php\", \"php3\", \"php4\", \"php5\", \"php7\", \"phtml\"]},\n {name: \"Pig\", mime: \"text/x-pig\", mode: \"pig\", ext: [\"pig\"]},\n {name: \"Plain Text\", mime: \"text/plain\", mode: \"null\", ext: [\"txt\", \"text\", \"conf\", \"def\", \"list\", \"log\"]},\n {name: \"PLSQL\", mime: \"text/x-plsql\", mode: \"sql\", ext: [\"pls\"]},\n {name: \"PostgreSQL\", mime: \"text/x-pgsql\", mode: \"sql\"},\n {name: \"PowerShell\", mime: \"application/x-powershell\", mode: \"powershell\", ext: [\"ps1\", \"psd1\", \"psm1\"]},\n {name: \"Properties files\", mime: \"text/x-properties\", mode: \"properties\", ext: [\"properties\", \"ini\", \"in\"], alias: [\"ini\", \"properties\"]},\n {name: \"ProtoBuf\", mime: \"text/x-protobuf\", mode: \"protobuf\", ext: [\"proto\"]},\n {name: \"Python\", mime: \"text/x-python\", mode: \"python\", ext: [\"BUILD\", \"bzl\", \"py\", \"pyw\"], file: /^(BUCK|BUILD)$/},\n {name: \"Puppet\", mime: \"text/x-puppet\", mode: \"puppet\", ext: [\"pp\"]},\n {name: \"Q\", mime: \"text/x-q\", mode: \"q\", ext: [\"q\"]},\n {name: \"R\", mime: \"text/x-rsrc\", mode: \"r\", ext: [\"r\", \"R\"], alias: [\"rscript\"]},\n {name: \"reStructuredText\", mime: \"text/x-rst\", mode: \"rst\", ext: [\"rst\"], alias: [\"rst\"]},\n {name: \"RPM Changes\", mime: \"text/x-rpm-changes\", mode: \"rpm\"},\n {name: \"RPM Spec\", mime: \"text/x-rpm-spec\", mode: \"rpm\", ext: [\"spec\"]},\n {name: \"Ruby\", mime: \"text/x-ruby\", mode: \"ruby\", ext: [\"rb\"], alias: [\"jruby\", \"macruby\", \"rake\", \"rb\", \"rbx\"]},\n {name: \"Rust\", mime: \"text/x-rustsrc\", mode: \"rust\", ext: [\"rs\"]},\n {name: \"SAS\", mime: \"text/x-sas\", mode: \"sas\", ext: [\"sas\"]},\n {name: \"Sass\", mime: \"text/x-sass\", mode: \"sass\", ext: [\"sass\"]},\n {name: \"Scala\", mime: \"text/x-scala\", mode: \"clike\", ext: [\"scala\"]},\n {name: \"Scheme\", mime: \"text/x-scheme\", mode: \"scheme\", ext: [\"scm\", \"ss\"]},\n {name: \"SCSS\", mime: \"text/x-scss\", mode: \"css\", ext: [\"scss\"]},\n {name: \"Shell\", mimes: [\"text/x-sh\", \"application/x-sh\"], mode: \"shell\", ext: [\"sh\", \"ksh\", \"bash\"], alias: [\"bash\", \"sh\", \"zsh\"], file: /^PKGBUILD$/},\n {name: \"Sieve\", mime: \"application/sieve\", mode: \"sieve\", ext: [\"siv\", \"sieve\"]},\n {name: \"Slim\", mimes: [\"text/x-slim\", \"application/x-slim\"], mode: \"slim\", ext: [\"slim\"]},\n {name: \"Smalltalk\", mime: \"text/x-stsrc\", mode: \"smalltalk\", ext: [\"st\"]},\n {name: \"Smarty\", mime: \"text/x-smarty\", mode: \"smarty\", ext: [\"tpl\"]},\n {name: \"Solr\", mime: \"text/x-solr\", mode: \"solr\"},\n {name: \"SML\", mime: \"text/x-sml\", mode: \"mllike\", ext: [\"sml\", \"sig\", \"fun\", \"smackspec\"]},\n {name: \"Soy\", mime: \"text/x-soy\", mode: \"soy\", ext: [\"soy\"], alias: [\"closure template\"]},\n {name: \"SPARQL\", mime: \"application/sparql-query\", mode: \"sparql\", ext: [\"rq\", \"sparql\"], alias: [\"sparul\"]},\n {name: \"Spreadsheet\", mime: \"text/x-spreadsheet\", mode: \"spreadsheet\", alias: [\"excel\", \"formula\"]},\n {name: \"SQL\", mime: \"text/x-sql\", mode: \"sql\", ext: [\"sql\"]},\n {name: \"SQLite\", mime: \"text/x-sqlite\", mode: \"sql\"},\n {name: \"Squirrel\", mime: \"text/x-squirrel\", mode: \"clike\", ext: [\"nut\"]},\n {name: \"Stylus\", mime: \"text/x-styl\", mode: \"stylus\", ext: [\"styl\"]},\n {name: \"Swift\", mime: \"text/x-swift\", mode: \"swift\", ext: [\"swift\"]},\n {name: \"sTeX\", mime: \"text/x-stex\", mode: \"stex\"},\n {name: \"LaTeX\", mime: \"text/x-latex\", mode: \"stex\", ext: [\"text\", \"ltx\", \"tex\"], alias: [\"tex\"]},\n {name: \"SystemVerilog\", mime: \"text/x-systemverilog\", mode: \"verilog\", ext: [\"v\", \"sv\", \"svh\"]},\n {name: \"Tcl\", mime: \"text/x-tcl\", mode: \"tcl\", ext: [\"tcl\"]},\n {name: \"Textile\", mime: \"text/x-textile\", mode: \"textile\", ext: [\"textile\"]},\n {name: \"TiddlyWiki\", mime: \"text/x-tiddlywiki\", mode: \"tiddlywiki\"},\n {name: \"Tiki wiki\", mime: \"text/tiki\", mode: \"tiki\"},\n {name: \"TOML\", mime: \"text/x-toml\", mode: \"toml\", ext: [\"toml\"]},\n {name: \"Tornado\", mime: \"text/x-tornado\", mode: \"tornado\"},\n {name: \"troff\", mime: \"text/troff\", mode: \"troff\", ext: [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"]},\n {name: \"TTCN\", mime: \"text/x-ttcn\", mode: \"ttcn\", ext: [\"ttcn\", \"ttcn3\", \"ttcnpp\"]},\n {name: \"TTCN_CFG\", mime: \"text/x-ttcn-cfg\", mode: \"ttcn-cfg\", ext: [\"cfg\"]},\n {name: \"Turtle\", mime: \"text/turtle\", mode: \"turtle\", ext: [\"ttl\"]},\n {name: \"TypeScript\", mime: \"application/typescript\", mode: \"javascript\", ext: [\"ts\"], alias: [\"ts\"]},\n {name: \"TypeScript-JSX\", mime: \"text/typescript-jsx\", mode: \"jsx\", ext: [\"tsx\"], alias: [\"tsx\"]},\n {name: \"Twig\", mime: \"text/x-twig\", mode: \"twig\"},\n {name: \"Web IDL\", mime: \"text/x-webidl\", mode: \"webidl\", ext: [\"webidl\"]},\n {name: \"VB.NET\", mime: \"text/x-vb\", mode: \"vb\", ext: [\"vb\"]},\n {name: \"VBScript\", mime: \"text/vbscript\", mode: \"vbscript\", ext: [\"vbs\"]},\n {name: \"Velocity\", mime: \"text/velocity\", mode: \"velocity\", ext: [\"vtl\"]},\n {name: \"Verilog\", mime: \"text/x-verilog\", mode: \"verilog\", ext: [\"v\"]},\n {name: \"VHDL\", mime: \"text/x-vhdl\", mode: \"vhdl\", ext: [\"vhd\", \"vhdl\"]},\n {name: \"Vue.js Component\", mimes: [\"script/x-vue\", \"text/x-vue\"], mode: \"vue\", ext: [\"vue\"]},\n {name: \"XML\", mimes: [\"application/xml\", \"text/xml\"], mode: \"xml\", ext: [\"xml\", \"xsl\", \"xsd\", \"svg\"], alias: [\"rss\", \"wsdl\", \"xsd\"]},\n {name: \"XQuery\", mime: \"application/xquery\", mode: \"xquery\", ext: [\"xy\", \"xquery\"]},\n {name: \"Yacas\", mime: \"text/x-yacas\", mode: \"yacas\", ext: [\"ys\"]},\n {name: \"YAML\", mimes: [\"text/x-yaml\", \"text/yaml\"], mode: \"yaml\", ext: [\"yaml\", \"yml\"], alias: [\"yml\"]},\n {name: \"Z80\", mime: \"text/x-z80\", mode: \"z80\", ext: [\"z80\"]},\n {name: \"mscgen\", mime: \"text/x-mscgen\", mode: \"mscgen\", ext: [\"mscgen\", \"mscin\", \"msc\"]},\n {name: \"xu\", mime: \"text/x-xu\", mode: \"mscgen\", ext: [\"xu\"]},\n {name: \"msgenny\", mime: \"text/x-msgenny\", mode: \"mscgen\", ext: [\"msgenny\"]},\n {name: \"WebAssembly\", mime: \"text/webassembly\", mode: \"wast\", ext: [\"wat\", \"wast\"]},\n ];\n // Ensure all modes have a mime property for backwards compatibility\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.mimes) info.mime = info.mimes[0];\n }\n\n CodeMirror.findModeByMIME = function(mime) {\n mime = mime.toLowerCase();\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.mime == mime) return info;\n if (info.mimes) for (var j = 0; j < info.mimes.length; j++)\n if (info.mimes[j] == mime) return info;\n }\n if (/\\+xml$/.test(mime)) return CodeMirror.findModeByMIME(\"application/xml\")\n if (/\\+json$/.test(mime)) return CodeMirror.findModeByMIME(\"application/json\")\n };\n\n CodeMirror.findModeByExtension = function(ext) {\n ext = ext.toLowerCase();\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.ext) for (var j = 0; j < info.ext.length; j++)\n if (info.ext[j] == ext) return info;\n }\n };\n\n CodeMirror.findModeByFileName = function(filename) {\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.file && info.file.test(filename)) return info;\n }\n var dot = filename.lastIndexOf(\".\");\n var ext = dot > -1 && filename.substring(dot + 1, filename.length);\n if (ext) return CodeMirror.findModeByExtension(ext);\n };\n\n CodeMirror.findModeByName = function(name) {\n name = name.toLowerCase();\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.name.toLowerCase() == name) return info;\n if (info.alias) for (var j = 0; j < info.alias.length; j++)\n if (info.alias[j].toLowerCase() == name) return info;\n }\n };\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nvar htmlConfig = {\n autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,\n 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,\n 'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,\n 'track': true, 'wbr': true, 'menuitem': true},\n implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,\n 'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,\n 'th': true, 'tr': true},\n contextGrabbers: {\n 'dd': {'dd': true, 'dt': true},\n 'dt': {'dd': true, 'dt': true},\n 'li': {'li': true},\n 'option': {'option': true, 'optgroup': true},\n 'optgroup': {'optgroup': true},\n 'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,\n 'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,\n 'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,\n 'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,\n 'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},\n 'rp': {'rp': true, 'rt': true},\n 'rt': {'rp': true, 'rt': true},\n 'tbody': {'tbody': true, 'tfoot': true},\n 'td': {'td': true, 'th': true},\n 'tfoot': {'tbody': true},\n 'th': {'td': true, 'th': true},\n 'thead': {'tbody': true, 'tfoot': true},\n 'tr': {'tr': true}\n },\n doNotIndent: {\"pre\": true},\n allowUnquoted: true,\n allowMissing: true,\n caseFold: true\n}\n\nvar xmlConfig = {\n autoSelfClosers: {},\n implicitlyClosed: {},\n contextGrabbers: {},\n doNotIndent: {},\n allowUnquoted: false,\n allowMissing: false,\n allowMissingTagName: false,\n caseFold: false\n}\n\nCodeMirror.defineMode(\"xml\", function(editorConf, config_) {\n var indentUnit = editorConf.indentUnit\n var config = {}\n var defaults = config_.htmlMode ? htmlConfig : xmlConfig\n for (var prop in defaults) config[prop] = defaults[prop]\n for (var prop in config_) config[prop] = config_[prop]\n\n // Return variables for tokenizers\n var type, setStyle;\n\n function inText(stream, state) {\n function chain(parser) {\n state.tokenize = parser;\n return parser(stream, state);\n }\n\n var ch = stream.next();\n if (ch == \"<\") {\n if (stream.eat(\"!\")) {\n if (stream.eat(\"[\")) {\n if (stream.match(\"CDATA[\")) return chain(inBlock(\"atom\", \"]]>\"));\n else return null;\n } else if (stream.match(\"--\")) {\n return chain(inBlock(\"comment\", \"-->\"));\n } else if (stream.match(\"DOCTYPE\", true, true)) {\n stream.eatWhile(/[\\w\\._\\-]/);\n return chain(doctype(1));\n } else {\n return null;\n }\n } else if (stream.eat(\"?\")) {\n stream.eatWhile(/[\\w\\._\\-]/);\n state.tokenize = inBlock(\"meta\", \"?>\");\n return \"meta\";\n } else {\n type = stream.eat(\"/\") ? \"closeTag\" : \"openTag\";\n state.tokenize = inTag;\n return \"tag bracket\";\n }\n } else if (ch == \"&\") {\n var ok;\n if (stream.eat(\"#\")) {\n if (stream.eat(\"x\")) {\n ok = stream.eatWhile(/[a-fA-F\\d]/) && stream.eat(\";\");\n } else {\n ok = stream.eatWhile(/[\\d]/) && stream.eat(\";\");\n }\n } else {\n ok = stream.eatWhile(/[\\w\\.\\-:]/) && stream.eat(\";\");\n }\n return ok ? \"atom\" : \"error\";\n } else {\n stream.eatWhile(/[^&<]/);\n return null;\n }\n }\n inText.isInText = true;\n\n function inTag(stream, state) {\n var ch = stream.next();\n if (ch == \">\" || (ch == \"/\" && stream.eat(\">\"))) {\n state.tokenize = inText;\n type = ch == \">\" ? \"endTag\" : \"selfcloseTag\";\n return \"tag bracket\";\n } else if (ch == \"=\") {\n type = \"equals\";\n return null;\n } else if (ch == \"<\") {\n state.tokenize = inText;\n state.state = baseState;\n state.tagName = state.tagStart = null;\n var next = state.tokenize(stream, state);\n return next ? next + \" tag error\" : \"tag error\";\n } else if (/[\\'\\\"]/.test(ch)) {\n state.tokenize = inAttribute(ch);\n state.stringStartCol = stream.column();\n return state.tokenize(stream, state);\n } else {\n stream.match(/^[^\\s\\u00a0=<>\\\"\\']*[^\\s\\u00a0=<>\\\"\\'\\/]/);\n return \"word\";\n }\n }\n\n function inAttribute(quote) {\n var closure = function(stream, state) {\n while (!stream.eol()) {\n if (stream.next() == quote) {\n state.tokenize = inTag;\n break;\n }\n }\n return \"string\";\n };\n closure.isInAttribute = true;\n return closure;\n }\n\n function inBlock(style, terminator) {\n return function(stream, state) {\n while (!stream.eol()) {\n if (stream.match(terminator)) {\n state.tokenize = inText;\n break;\n }\n stream.next();\n }\n return style;\n }\n }\n\n function doctype(depth) {\n return function(stream, state) {\n var ch;\n while ((ch = stream.next()) != null) {\n if (ch == \"<\") {\n state.tokenize = doctype(depth + 1);\n return state.tokenize(stream, state);\n } else if (ch == \">\") {\n if (depth == 1) {\n state.tokenize = inText;\n break;\n } else {\n state.tokenize = doctype(depth - 1);\n return state.tokenize(stream, state);\n }\n }\n }\n return \"meta\";\n };\n }\n\n function lower(tagName) {\n return tagName && tagName.toLowerCase();\n }\n\n function Context(state, tagName, startOfLine) {\n this.prev = state.context;\n this.tagName = tagName || \"\";\n this.indent = state.indented;\n this.startOfLine = startOfLine;\n if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))\n this.noIndent = true;\n }\n function popContext(state) {\n if (state.context) state.context = state.context.prev;\n }\n function maybePopContext(state, nextTagName) {\n var parentTagName;\n while (true) {\n if (!state.context) {\n return;\n }\n parentTagName = state.context.tagName;\n if (!config.contextGrabbers.hasOwnProperty(lower(parentTagName)) ||\n !config.contextGrabbers[lower(parentTagName)].hasOwnProperty(lower(nextTagName))) {\n return;\n }\n popContext(state);\n }\n }\n\n function baseState(type, stream, state) {\n if (type == \"openTag\") {\n state.tagStart = stream.column();\n return tagNameState;\n } else if (type == \"closeTag\") {\n return closeTagNameState;\n } else {\n return baseState;\n }\n }\n function tagNameState(type, stream, state) {\n if (type == \"word\") {\n state.tagName = stream.current();\n setStyle = \"tag\";\n return attrState;\n } else if (config.allowMissingTagName && type == \"endTag\") {\n setStyle = \"tag bracket\";\n return attrState(type, stream, state);\n } else {\n setStyle = \"error\";\n return tagNameState;\n }\n }\n function closeTagNameState(type, stream, state) {\n if (type == \"word\") {\n var tagName = stream.current();\n if (state.context && state.context.tagName != tagName &&\n config.implicitlyClosed.hasOwnProperty(lower(state.context.tagName)))\n popContext(state);\n if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {\n setStyle = \"tag\";\n return closeState;\n } else {\n setStyle = \"tag error\";\n return closeStateErr;\n }\n } else if (config.allowMissingTagName && type == \"endTag\") {\n setStyle = \"tag bracket\";\n return closeState(type, stream, state);\n } else {\n setStyle = \"error\";\n return closeStateErr;\n }\n }\n\n function closeState(type, _stream, state) {\n if (type != \"endTag\") {\n setStyle = \"error\";\n return closeState;\n }\n popContext(state);\n return baseState;\n }\n function closeStateErr(type, stream, state) {\n setStyle = \"error\";\n return closeState(type, stream, state);\n }\n\n function attrState(type, _stream, state) {\n if (type == \"word\") {\n setStyle = \"attribute\";\n return attrEqState;\n } else if (type == \"endTag\" || type == \"selfcloseTag\") {\n var tagName = state.tagName, tagStart = state.tagStart;\n state.tagName = state.tagStart = null;\n if (type == \"selfcloseTag\" ||\n config.autoSelfClosers.hasOwnProperty(lower(tagName))) {\n maybePopContext(state, tagName);\n } else {\n maybePopContext(state, tagName);\n state.context = new Context(state, tagName, tagStart == state.indented);\n }\n return baseState;\n }\n setStyle = \"error\";\n return attrState;\n }\n function attrEqState(type, stream, state) {\n if (type == \"equals\") return attrValueState;\n if (!config.allowMissing) setStyle = \"error\";\n return attrState(type, stream, state);\n }\n function attrValueState(type, stream, state) {\n if (type == \"string\") return attrContinuedState;\n if (type == \"word\" && config.allowUnquoted) {setStyle = \"string\"; return attrState;}\n setStyle = \"error\";\n return attrState(type, stream, state);\n }\n function attrContinuedState(type, stream, state) {\n if (type == \"string\") return attrContinuedState;\n return attrState(type, stream, state);\n }\n\n return {\n startState: function(baseIndent) {\n var state = {tokenize: inText,\n state: baseState,\n indented: baseIndent || 0,\n tagName: null, tagStart: null,\n context: null}\n if (baseIndent != null) state.baseIndent = baseIndent\n return state\n },\n\n token: function(stream, state) {\n if (!state.tagName && stream.sol())\n state.indented = stream.indentation();\n\n if (stream.eatSpace()) return null;\n type = null;\n var style = state.tokenize(stream, state);\n if ((style || type) && style != \"comment\") {\n setStyle = null;\n state.state = state.state(type || style, stream, state);\n if (setStyle)\n style = setStyle == \"error\" ? style + \" error\" : setStyle;\n }\n return style;\n },\n\n indent: function(state, textAfter, fullLine) {\n var context = state.context;\n // Indent multi-line strings (e.g. css).\n if (state.tokenize.isInAttribute) {\n if (state.tagStart == state.indented)\n return state.stringStartCol + 1;\n else\n return state.indented + indentUnit;\n }\n if (context && context.noIndent) return CodeMirror.Pass;\n if (state.tokenize != inTag && state.tokenize != inText)\n return fullLine ? fullLine.match(/^(\\s*)/)[0].length : 0;\n // Indent the starts of attribute names.\n if (state.tagName) {\n if (config.multilineTagIndentPastTag !== false)\n return state.tagStart + state.tagName.length + 2;\n else\n return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);\n }\n if (config.alignCDATA && /$/,\n blockCommentStart: \"\",\n\n configuration: config.htmlMode ? \"html\" : \"xml\",\n helperType: config.htmlMode ? \"html\" : \"xml\",\n\n skipAttribute: function(state) {\n if (state.state == attrValueState)\n state.state = attrState\n },\n\n xmlCurrentTag: function(state) {\n return state.tagName ? {name: state.tagName, close: state.type == \"closeTag\"} : null\n },\n\n xmlCurrentContext: function(state) {\n var context = []\n for (var cx = state.context; cx; cx = cx.prev)\n context.push(cx.tagName)\n return context.reverse()\n }\n };\n});\n\nCodeMirror.defineMIME(\"text/xml\", \"xml\");\nCodeMirror.defineMIME(\"application/xml\", \"xml\");\nif (!CodeMirror.mimeModes.hasOwnProperty(\"text/html\"))\n CodeMirror.defineMIME(\"text/html\", {name: \"xml\", htmlMode: true});\n\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\nvar CodeMirror = require('codemirror');\n\nCodeMirror.commands.tabAndIndentMarkdownList = function (cm) {\n var ranges = cm.listSelections();\n var pos = ranges[0].head;\n var eolState = cm.getStateAfter(pos.line);\n var inList = eolState.list !== false;\n\n if (inList) {\n cm.execCommand('indentMore');\n return;\n }\n\n if (cm.options.indentWithTabs) {\n cm.execCommand('insertTab');\n } else {\n var spaces = Array(cm.options.tabSize + 1).join(' ');\n cm.replaceSelection(spaces);\n }\n};\n\nCodeMirror.commands.shiftTabAndUnindentMarkdownList = function (cm) {\n var ranges = cm.listSelections();\n var pos = ranges[0].head;\n var eolState = cm.getStateAfter(pos.line);\n var inList = eolState.list !== false;\n\n if (inList) {\n cm.execCommand('indentLess');\n return;\n }\n\n if (cm.options.indentWithTabs) {\n cm.execCommand('insertTab');\n } else {\n var spaces = Array(cm.options.tabSize + 1).join(' ');\n cm.replaceSelection(spaces);\n }\n};\n","'use strict';\nvar CodeMirror = require('codemirror');\nrequire('codemirror/addon/edit/continuelist.js');\nrequire('./codemirror/tablist');\nrequire('codemirror/addon/display/fullscreen.js');\nrequire('codemirror/mode/markdown/markdown.js');\nrequire('codemirror/addon/mode/overlay.js');\nrequire('codemirror/addon/display/placeholder.js');\nrequire('codemirror/addon/display/autorefresh.js');\nrequire('codemirror/addon/selection/mark-selection.js');\nrequire('codemirror/addon/search/searchcursor.js');\nrequire('codemirror/mode/gfm/gfm.js');\nrequire('codemirror/mode/xml/xml.js');\nvar CodeMirrorSpellChecker = require('codemirror-spell-checker');\nvar marked = require('marked').marked;\n\n\n// Some variables\nvar isMac = /Mac/.test(navigator.platform);\nvar anchorToExternalRegex = new RegExp(/()+?/g);\n\n// Mapping of actions that can be bound to keyboard shortcuts or toolbar buttons\nvar bindings = {\n 'toggleBold': toggleBold,\n 'toggleItalic': toggleItalic,\n 'drawLink': drawLink,\n 'toggleHeadingSmaller': toggleHeadingSmaller,\n 'toggleHeadingBigger': toggleHeadingBigger,\n 'drawImage': drawImage,\n 'toggleBlockquote': toggleBlockquote,\n 'toggleOrderedList': toggleOrderedList,\n 'toggleUnorderedList': toggleUnorderedList,\n 'toggleCodeBlock': toggleCodeBlock,\n 'togglePreview': togglePreview,\n 'toggleStrikethrough': toggleStrikethrough,\n 'toggleHeading1': toggleHeading1,\n 'toggleHeading2': toggleHeading2,\n 'toggleHeading3': toggleHeading3,\n 'toggleHeading4': toggleHeading4,\n 'toggleHeading5': toggleHeading5,\n 'toggleHeading6': toggleHeading6,\n 'cleanBlock': cleanBlock,\n 'drawTable': drawTable,\n 'drawHorizontalRule': drawHorizontalRule,\n 'undo': undo,\n 'redo': redo,\n 'toggleSideBySide': toggleSideBySide,\n 'toggleFullScreen': toggleFullScreen,\n};\n\nvar shortcuts = {\n 'toggleBold': 'Cmd-B',\n 'toggleItalic': 'Cmd-I',\n 'drawLink': 'Cmd-K',\n 'toggleHeadingSmaller': 'Cmd-H',\n 'toggleHeadingBigger': 'Shift-Cmd-H',\n 'toggleHeading1': 'Ctrl+Alt+1',\n 'toggleHeading2': 'Ctrl+Alt+2',\n 'toggleHeading3': 'Ctrl+Alt+3',\n 'toggleHeading4': 'Ctrl+Alt+4',\n 'toggleHeading5': 'Ctrl+Alt+5',\n 'toggleHeading6': 'Ctrl+Alt+6',\n 'cleanBlock': 'Cmd-E',\n 'drawImage': 'Cmd-Alt-I',\n 'toggleBlockquote': 'Cmd-\\'',\n 'toggleOrderedList': 'Cmd-Alt-L',\n 'toggleUnorderedList': 'Cmd-L',\n 'toggleCodeBlock': 'Cmd-Alt-C',\n 'togglePreview': 'Cmd-P',\n 'toggleSideBySide': 'F9',\n 'toggleFullScreen': 'F11',\n};\n\nvar getBindingName = function (f) {\n for (var key in bindings) {\n if (bindings[key] === f) {\n return key;\n }\n }\n return null;\n};\n\nvar isMobile = function () {\n var check = false;\n (function (a) {\n if (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(a.substr(0, 4))) check = true;\n })(navigator.userAgent || navigator.vendor || window.opera);\n return check;\n};\n\n/**\n * Modify HTML to add 'target=\"_blank\"' to links so they open in new tabs by default.\n * @param {string} htmlText - HTML to be modified.\n * @return {string} The modified HTML text.\n */\nfunction addAnchorTargetBlank(htmlText) {\n var match;\n while ((match = anchorToExternalRegex.exec(htmlText)) !== null) {\n // With only one capture group in the RegExp, we can safely take the first index from the match.\n var linkString = match[0];\n\n if (linkString.indexOf('target=') === -1) {\n var fixedLinkString = linkString.replace(/>$/, ' target=\"_blank\">');\n htmlText = htmlText.replace(linkString, fixedLinkString);\n }\n }\n return htmlText;\n}\n\n/**\n * Modify HTML to remove the list-style when rendering checkboxes.\n * @param {string} htmlText - HTML to be modified.\n * @return {string} The modified HTML text.\n */\nfunction removeListStyleWhenCheckbox(htmlText) {\n\n var parser = new DOMParser();\n var htmlDoc = parser.parseFromString(htmlText, 'text/html');\n var listItems = htmlDoc.getElementsByTagName('li');\n\n for (var i = 0; i < listItems.length; i++) {\n var listItem = listItems[i];\n\n for (var j = 0; j < listItem.children.length; j++) {\n var listItemChild = listItem.children[j];\n\n if (listItemChild instanceof HTMLInputElement && listItemChild.type === 'checkbox') {\n // From Github: margin: 0 .2em .25em -1.6em;\n listItem.style.marginLeft = '-1.5em';\n listItem.style.listStyleType = 'none';\n }\n }\n }\n\n return htmlDoc.documentElement.innerHTML;\n}\n\n/**\n * Fix shortcut. Mac use Command, others use Ctrl.\n */\nfunction fixShortcut(name) {\n if (isMac) {\n name = name.replace('Ctrl', 'Cmd');\n } else {\n name = name.replace('Cmd', 'Ctrl');\n }\n return name;\n}\n\n/**\n * Create dropdown block\n */\nfunction createToolbarDropdown(options, enableTooltips, shortcuts, parent) {\n var el = createToolbarButton(options, false, enableTooltips, shortcuts, 'button', parent);\n el.classList.add('easymde-dropdown');\n\n el.onclick = function () {\n el.focus();\n };\n\n var content = document.createElement('div');\n content.className = 'easymde-dropdown-content';\n for (var childrenIndex = 0; childrenIndex < options.children.length; childrenIndex++) {\n\n var child = options.children[childrenIndex];\n var childElement;\n\n if (typeof child === 'string' && child in toolbarBuiltInButtons) {\n childElement = createToolbarButton(toolbarBuiltInButtons[child], true, enableTooltips, shortcuts, 'button', parent);\n } else {\n childElement = createToolbarButton(child, true, enableTooltips, shortcuts, 'button', parent);\n }\n\n childElement.addEventListener('click', function (e) { e.stopPropagation(); }, false);\n content.appendChild(childElement);\n }\n el.appendChild(content);\n return el;\n}\n\n/**\n * Create button element for toolbar.\n */\nfunction createToolbarButton(options, enableActions, enableTooltips, shortcuts, markup, parent) {\n options = options || {};\n var el = document.createElement(markup);\n\n // Add 'custom' attributes as early as possible, so that 'official' attributes will never be overwritten.\n if (options.attributes) {\n for (var attribute in options.attributes) {\n if (Object.prototype.hasOwnProperty.call(options.attributes, attribute)) {\n el.setAttribute(attribute, options.attributes[attribute]);\n }\n }\n }\n\n var classNamePrefix = parent.options.toolbarButtonClassPrefix ? parent.options.toolbarButtonClassPrefix + '-' : '';\n el.className = classNamePrefix + options.name;\n el.setAttribute('type', markup);\n enableTooltips = (enableTooltips == undefined) ? true : enableTooltips;\n\n if (options.text) {\n el.innerText = options.text;\n }\n\n // Properly handle custom shortcuts\n if (options.name && options.name in shortcuts) {\n bindings[options.name] = options.action;\n }\n\n if (options.title && enableTooltips) {\n el.title = createTooltip(options.title, options.action, shortcuts);\n\n if (isMac) {\n el.title = el.title.replace('Ctrl', '⌘');\n el.title = el.title.replace('Alt', '⌥');\n }\n }\n\n if (options.title) {\n el.setAttribute('aria-label', options.title);\n }\n\n if (options.noDisable) {\n el.classList.add('no-disable');\n }\n\n if (options.noMobile) {\n el.classList.add('no-mobile');\n }\n\n // Prevent errors if there is no class name in custom options\n var classNameParts = [];\n if (typeof options.className !== 'undefined') {\n classNameParts = options.className.split(' ');\n }\n\n // Provide backwards compatibility with simple-markdown-editor by adding custom classes to the button.\n var iconClasses = [];\n for (var classNameIndex = 0; classNameIndex < classNameParts.length; classNameIndex++) {\n var classNamePart = classNameParts[classNameIndex];\n // Split icon classes from the button.\n // Regex will detect \"fa\", \"fas\", \"fa-something\" and \"fa-some-icon-1\", but not \"fanfare\".\n if (classNamePart.match(/^fa([srlb]|(-[\\w-]*)|$)/)) {\n iconClasses.push(classNamePart);\n } else {\n el.classList.add(classNamePart);\n }\n }\n\n el.tabIndex = -1;\n\n if (iconClasses.length > 0) {\n // Create icon element and append as a child to the button\n var icon = document.createElement('i');\n for (var iconClassIndex = 0; iconClassIndex < iconClasses.length; iconClassIndex++) {\n var iconClass = iconClasses[iconClassIndex];\n icon.classList.add(iconClass);\n }\n el.appendChild(icon);\n }\n\n // If there is a custom icon markup set, use that\n if (typeof options.icon !== 'undefined') {\n el.innerHTML = options.icon;\n }\n\n if (options.action && enableActions) {\n if (typeof options.action === 'function') {\n el.onclick = function (e) {\n e.preventDefault();\n options.action(parent);\n };\n } else if (typeof options.action === 'string') {\n el.onclick = function (e) {\n e.preventDefault();\n window.open(options.action, '_blank');\n };\n }\n }\n\n return el;\n}\n\nfunction createSep() {\n var el = document.createElement('i');\n el.className = 'separator';\n el.innerHTML = '|';\n return el;\n}\n\nfunction createTooltip(title, action, shortcuts) {\n var actionName;\n var tooltip = title;\n\n if (action) {\n actionName = getBindingName(action);\n if (shortcuts[actionName]) {\n tooltip += ' (' + fixShortcut(shortcuts[actionName]) + ')';\n }\n }\n\n return tooltip;\n}\n\n/**\n * The state of CodeMirror at the given position.\n */\nfunction getState(cm, pos) {\n pos = pos || cm.getCursor('start');\n var stat = cm.getTokenAt(pos);\n if (!stat.type) return {};\n\n var types = stat.type.split(' ');\n\n var ret = {},\n data, text;\n for (var i = 0; i < types.length; i++) {\n data = types[i];\n if (data === 'strong') {\n ret.bold = true;\n } else if (data === 'variable-2') {\n text = cm.getLine(pos.line);\n if (/^\\s*\\d+\\.\\s/.test(text)) {\n ret['ordered-list'] = true;\n } else {\n ret['unordered-list'] = true;\n }\n } else if (data === 'atom') {\n ret.quote = true;\n } else if (data === 'em') {\n ret.italic = true;\n } else if (data === 'quote') {\n ret.quote = true;\n } else if (data === 'strikethrough') {\n ret.strikethrough = true;\n } else if (data === 'comment') {\n ret.code = true;\n } else if (data === 'link' && !ret.image) {\n ret.link = true;\n } else if (data === 'image') {\n ret.image = true;\n } else if (data.match(/^header(-[1-6])?$/)) {\n ret[data.replace('header', 'heading')] = true;\n }\n }\n return ret;\n}\n\n\n// Saved overflow setting\nvar saved_overflow = '';\n\n/**\n * Toggle full screen of the editor.\n * @param {EasyMDE} editor\n */\nfunction toggleFullScreen(editor) {\n // Set fullscreen\n var cm = editor.codemirror;\n cm.setOption('fullScreen', !cm.getOption('fullScreen'));\n\n\n // Prevent scrolling on body during fullscreen active\n if (cm.getOption('fullScreen')) {\n saved_overflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n } else {\n document.body.style.overflow = saved_overflow;\n }\n\n var wrapper = cm.getWrapperElement();\n var sidebyside = wrapper.nextSibling;\n\n if (sidebyside.classList.contains('editor-preview-active-side')) {\n if (editor.options.sideBySideFullscreen === false) {\n // if side-by-side not-fullscreen ok, apply classes as needed\n var easyMDEContainer = wrapper.parentNode;\n if (cm.getOption('fullScreen')) {\n easyMDEContainer.classList.remove('sided--no-fullscreen');\n } else {\n easyMDEContainer.classList.add('sided--no-fullscreen');\n }\n } else {\n toggleSideBySide(editor);\n }\n }\n\n if (editor.options.onToggleFullScreen) {\n editor.options.onToggleFullScreen(cm.getOption('fullScreen') || false);\n }\n\n // Remove or set maxHeight\n if (typeof editor.options.maxHeight !== 'undefined') {\n if (cm.getOption('fullScreen')) {\n cm.getScrollerElement().style.removeProperty('height');\n sidebyside.style.removeProperty('height');\n } else {\n cm.getScrollerElement().style.height = editor.options.maxHeight;\n editor.setPreviewMaxHeight();\n }\n }\n\n // Update toolbar class\n editor.toolbar_div.classList.toggle('fullscreen');\n\n // Update toolbar button\n if (editor.toolbarElements && editor.toolbarElements.fullscreen) {\n var toolbarButton = editor.toolbarElements.fullscreen;\n toolbarButton.classList.toggle('active');\n }\n}\n\n\n/**\n * Action for toggling bold.\n * @param {EasyMDE} editor\n */\nfunction toggleBold(editor) {\n _toggleBlock(editor, 'bold', editor.options.blockStyles.bold);\n}\n\n\n/**\n * Action for toggling italic.\n * @param {EasyMDE} editor\n */\nfunction toggleItalic(editor) {\n _toggleBlock(editor, 'italic', editor.options.blockStyles.italic);\n}\n\n\n/**\n * Action for toggling strikethrough.\n * @param {EasyMDE} editor\n */\nfunction toggleStrikethrough(editor) {\n _toggleBlock(editor, 'strikethrough', '~~');\n}\n\n/**\n * Action for toggling code block.\n * @param {EasyMDE} editor\n */\nfunction toggleCodeBlock(editor) {\n var fenceCharsToInsert = editor.options.blockStyles.code;\n\n function fencing_line(line) {\n /* return true, if this is a ``` or ~~~ line */\n if (typeof line !== 'object') {\n throw 'fencing_line() takes a \\'line\\' object (not a line number, or line text). Got: ' + typeof line + ': ' + line;\n }\n return line.styles && line.styles[2] && line.styles[2].indexOf('formatting-code-block') !== -1;\n }\n\n function token_state(token) {\n // base goes an extra level deep when mode backdrops are used, e.g. spellchecker on\n return token.state.base.base || token.state.base;\n }\n\n function code_type(cm, line_num, line, firstTok, lastTok) {\n /*\n * Return \"single\", \"indented\", \"fenced\" or false\n *\n * cm and line_num are required. Others are optional for efficiency\n * To check in the middle of a line, pass in firstTok yourself.\n */\n line = line || cm.getLineHandle(line_num);\n firstTok = firstTok || cm.getTokenAt({\n line: line_num,\n ch: 1,\n });\n lastTok = lastTok || (!!line.text && cm.getTokenAt({\n line: line_num,\n ch: line.text.length - 1,\n }));\n var types = firstTok.type ? firstTok.type.split(' ') : [];\n if (lastTok && token_state(lastTok).indentedCode) {\n // have to check last char, since first chars of first line aren\"t marked as indented\n return 'indented';\n } else if (types.indexOf('comment') === -1) {\n // has to be after \"indented\" check, since first chars of first indented line aren\"t marked as such\n return false;\n } else if (token_state(firstTok).fencedChars || token_state(lastTok).fencedChars || fencing_line(line)) {\n return 'fenced';\n } else {\n return 'single';\n }\n }\n\n function insertFencingAtSelection(cm, cur_start, cur_end, fenceCharsToInsert) {\n var start_line_sel = cur_start.line + 1,\n end_line_sel = cur_end.line + 1,\n sel_multi = cur_start.line !== cur_end.line,\n repl_start = fenceCharsToInsert + '\\n',\n repl_end = '\\n' + fenceCharsToInsert;\n if (sel_multi) {\n end_line_sel++;\n }\n // handle last char including \\n or not\n if (sel_multi && cur_end.ch === 0) {\n repl_end = fenceCharsToInsert + '\\n';\n end_line_sel--;\n }\n _replaceSelection(cm, false, [repl_start, repl_end]);\n cm.setSelection({\n line: start_line_sel,\n ch: 0,\n }, {\n line: end_line_sel,\n ch: 0,\n });\n }\n\n var cm = editor.codemirror,\n cur_start = cm.getCursor('start'),\n cur_end = cm.getCursor('end'),\n tok = cm.getTokenAt({\n line: cur_start.line,\n ch: cur_start.ch || 1,\n }), // avoid ch 0 which is a cursor pos but not token\n line = cm.getLineHandle(cur_start.line),\n is_code = code_type(cm, cur_start.line, line, tok);\n var block_start, block_end, lineCount;\n\n if (is_code === 'single') {\n // similar to some EasyMDE _toggleBlock logic\n var start = line.text.slice(0, cur_start.ch).replace('`', ''),\n end = line.text.slice(cur_start.ch).replace('`', '');\n cm.replaceRange(start + end, {\n line: cur_start.line,\n ch: 0,\n }, {\n line: cur_start.line,\n ch: 99999999999999,\n });\n cur_start.ch--;\n if (cur_start !== cur_end) {\n cur_end.ch--;\n }\n cm.setSelection(cur_start, cur_end);\n cm.focus();\n } else if (is_code === 'fenced') {\n if (cur_start.line !== cur_end.line || cur_start.ch !== cur_end.ch) {\n // use selection\n\n // find the fenced line so we know what type it is (tilde, backticks, number of them)\n for (block_start = cur_start.line; block_start >= 0; block_start--) {\n line = cm.getLineHandle(block_start);\n if (fencing_line(line)) {\n break;\n }\n }\n var fencedTok = cm.getTokenAt({\n line: block_start,\n ch: 1,\n });\n var fence_chars = token_state(fencedTok).fencedChars;\n var start_text, start_line;\n var end_text, end_line;\n // check for selection going up against fenced lines, in which case we don't want to add more fencing\n if (fencing_line(cm.getLineHandle(cur_start.line))) {\n start_text = '';\n start_line = cur_start.line;\n } else if (fencing_line(cm.getLineHandle(cur_start.line - 1))) {\n start_text = '';\n start_line = cur_start.line - 1;\n } else {\n start_text = fence_chars + '\\n';\n start_line = cur_start.line;\n }\n if (fencing_line(cm.getLineHandle(cur_end.line))) {\n end_text = '';\n end_line = cur_end.line;\n if (cur_end.ch === 0) {\n end_line += 1;\n }\n } else if (cur_end.ch !== 0 && fencing_line(cm.getLineHandle(cur_end.line + 1))) {\n end_text = '';\n end_line = cur_end.line + 1;\n } else {\n end_text = fence_chars + '\\n';\n end_line = cur_end.line + 1;\n }\n if (cur_end.ch === 0) {\n // full last line selected, putting cursor at beginning of next\n end_line -= 1;\n }\n cm.operation(function () {\n // end line first, so that line numbers don't change\n cm.replaceRange(end_text, {\n line: end_line,\n ch: 0,\n }, {\n line: end_line + (end_text ? 0 : 1),\n ch: 0,\n });\n cm.replaceRange(start_text, {\n line: start_line,\n ch: 0,\n }, {\n line: start_line + (start_text ? 0 : 1),\n ch: 0,\n });\n });\n cm.setSelection({\n line: start_line + (start_text ? 1 : 0),\n ch: 0,\n }, {\n line: end_line + (start_text ? 1 : -1),\n ch: 0,\n });\n cm.focus();\n } else {\n // no selection, search for ends of this fenced block\n var search_from = cur_start.line;\n if (fencing_line(cm.getLineHandle(cur_start.line))) { // gets a little tricky if cursor is right on a fenced line\n if (code_type(cm, cur_start.line + 1) === 'fenced') {\n block_start = cur_start.line;\n search_from = cur_start.line + 1; // for searching for \"end\"\n } else {\n block_end = cur_start.line;\n search_from = cur_start.line - 1; // for searching for \"start\"\n }\n }\n if (block_start === undefined) {\n for (block_start = search_from; block_start >= 0; block_start--) {\n line = cm.getLineHandle(block_start);\n if (fencing_line(line)) {\n break;\n }\n }\n }\n if (block_end === undefined) {\n lineCount = cm.lineCount();\n for (block_end = search_from; block_end < lineCount; block_end++) {\n line = cm.getLineHandle(block_end);\n if (fencing_line(line)) {\n break;\n }\n }\n }\n cm.operation(function () {\n cm.replaceRange('', {\n line: block_start,\n ch: 0,\n }, {\n line: block_start + 1,\n ch: 0,\n });\n cm.replaceRange('', {\n line: block_end - 1,\n ch: 0,\n }, {\n line: block_end,\n ch: 0,\n });\n });\n cm.focus();\n }\n } else if (is_code === 'indented') {\n if (cur_start.line !== cur_end.line || cur_start.ch !== cur_end.ch) {\n // use selection\n block_start = cur_start.line;\n block_end = cur_end.line;\n if (cur_end.ch === 0) {\n block_end--;\n }\n } else {\n // no selection, search for ends of this indented block\n for (block_start = cur_start.line; block_start >= 0; block_start--) {\n line = cm.getLineHandle(block_start);\n if (line.text.match(/^\\s*$/)) {\n // empty or all whitespace - keep going\n continue;\n } else {\n if (code_type(cm, block_start, line) !== 'indented') {\n block_start += 1;\n break;\n }\n }\n }\n lineCount = cm.lineCount();\n for (block_end = cur_start.line; block_end < lineCount; block_end++) {\n line = cm.getLineHandle(block_end);\n if (line.text.match(/^\\s*$/)) {\n // empty or all whitespace - keep going\n continue;\n } else {\n if (code_type(cm, block_end, line) !== 'indented') {\n block_end -= 1;\n break;\n }\n }\n }\n }\n // if we are going to un-indent based on a selected set of lines, and the next line is indented too, we need to\n // insert a blank line so that the next line(s) continue to be indented code\n var next_line = cm.getLineHandle(block_end + 1),\n next_line_last_tok = next_line && cm.getTokenAt({\n line: block_end + 1,\n ch: next_line.text.length - 1,\n }),\n next_line_indented = next_line_last_tok && token_state(next_line_last_tok).indentedCode;\n if (next_line_indented) {\n cm.replaceRange('\\n', {\n line: block_end + 1,\n ch: 0,\n });\n }\n\n for (var i = block_start; i <= block_end; i++) {\n cm.indentLine(i, 'subtract'); // TODO: this doesn't get tracked in the history, so can't be undone :(\n }\n cm.focus();\n } else {\n // insert code formatting\n var no_sel_and_starting_of_line = (cur_start.line === cur_end.line && cur_start.ch === cur_end.ch && cur_start.ch === 0);\n var sel_multi = cur_start.line !== cur_end.line;\n if (no_sel_and_starting_of_line || sel_multi) {\n insertFencingAtSelection(cm, cur_start, cur_end, fenceCharsToInsert);\n } else {\n _replaceSelection(cm, false, ['`', '`']);\n }\n }\n}\n\n/**\n * Action for toggling blockquote.\n */\nfunction toggleBlockquote(editor) {\n _toggleLine(editor.codemirror, 'quote');\n}\n\n/**\n * Action for toggling heading size: normal -> h1 -> h2 -> h3 -> h4 -> h5 -> h6 -> normal\n */\nfunction toggleHeadingSmaller(editor) {\n _toggleHeading(editor.codemirror, 'smaller');\n}\n\n/**\n * Action for toggling heading size: normal -> h6 -> h5 -> h4 -> h3 -> h2 -> h1 -> normal\n */\nfunction toggleHeadingBigger(editor) {\n _toggleHeading(editor.codemirror, 'bigger');\n}\n\n/**\n * Action for toggling heading size 1\n */\nfunction toggleHeading1(editor) {\n _toggleHeading(editor.codemirror, undefined, 1);\n}\n\n/**\n * Action for toggling heading size 2\n */\nfunction toggleHeading2(editor) {\n _toggleHeading(editor.codemirror, undefined, 2);\n}\n\n/**\n * Action for toggling heading size 3\n */\nfunction toggleHeading3(editor) {\n _toggleHeading(editor.codemirror, undefined, 3);\n}\n\n/**\n * Action for toggling heading size 4\n */\nfunction toggleHeading4(editor) {\n _toggleHeading(editor.codemirror, undefined, 4);\n}\n\n/**\n * Action for toggling heading size 5\n */\nfunction toggleHeading5(editor) {\n _toggleHeading(editor.codemirror, undefined, 5);\n}\n\n/**\n * Action for toggling heading size 6\n */\nfunction toggleHeading6(editor) {\n _toggleHeading(editor.codemirror, undefined, 6);\n}\n\n\n/**\n * Action for toggling ul.\n */\nfunction toggleUnorderedList(editor) {\n var cm = editor.codemirror;\n\n var listStyle = '*'; // Default\n if (['-', '+', '*'].includes(editor.options.unorderedListStyle)) {\n listStyle = editor.options.unorderedListStyle;\n }\n\n _toggleLine(cm, 'unordered-list', listStyle);\n}\n\n\n/**\n * Action for toggling ol.\n */\nfunction toggleOrderedList(editor) {\n _toggleLine(editor.codemirror, 'ordered-list');\n}\n\n/**\n * Action for clean block (remove headline, list, blockquote code, markers)\n */\nfunction cleanBlock(editor) {\n _cleanBlock(editor.codemirror);\n}\n\n/**\n * Action for drawing a link.\n * @param {EasyMDE} editor\n */\nfunction drawLink(editor) {\n var options = editor.options;\n var url = 'https://';\n if (options.promptURLs) {\n var result = prompt(options.promptTexts.link, url);\n if (!result) {\n return false;\n }\n url = escapePromptURL(result);\n }\n _toggleLink(editor, 'link', options.insertTexts.link, url);\n}\n\n/**\n * Action for drawing an img.\n * @param {EasyMDE} editor\n */\nfunction drawImage(editor) {\n var options = editor.options;\n var url = 'https://';\n if (options.promptURLs) {\n var result = prompt(options.promptTexts.image, url);\n if (!result) {\n return false;\n }\n url = escapePromptURL(result);\n }\n _toggleLink(editor, 'image', options.insertTexts.image, url);\n}\n\n/**\n * Encode and escape URLs to prevent breaking up rendered Markdown links.\n * @param {string} url The url of the link or image\n */\nfunction escapePromptURL(url) {\n return encodeURI(url).replace(/([\\\\()])/g, '\\\\$1');\n}\n\n/**\n * Action for opening the browse-file window to upload an image to a server.\n * @param {EasyMDE} editor The EasyMDE object\n */\nfunction drawUploadedImage(editor) {\n // TODO: Draw the image template with a fake url? ie: ''\n editor.openBrowseFileWindow();\n}\n\n/**\n * Action executed after an image have been successfully imported on the server.\n * @param {EasyMDE} editor The EasyMDE object\n * @param {string} url The url of the uploaded image\n */\nfunction afterImageUploaded(editor, url) {\n var cm = editor.codemirror;\n var stat = getState(cm);\n var options = editor.options;\n var imageName = url.substr(url.lastIndexOf('/') + 1);\n var ext = imageName.substring(imageName.lastIndexOf('.') + 1).replace(/\\?.*$/, '').toLowerCase();\n\n // Check if media is an image\n if (['png', 'jpg', 'jpeg', 'gif', 'svg', 'apng', 'avif', 'webp'].includes(ext)) {\n _replaceSelection(cm, stat.image, options.insertTexts.uploadedImage, url);\n } else {\n var text_link = options.insertTexts.link;\n text_link[0] = '[' + imageName;\n _replaceSelection(cm, stat.link, text_link, url);\n }\n\n // show uploaded image filename for 1000ms\n editor.updateStatusBar('upload-image', editor.options.imageTexts.sbOnUploaded.replace('#image_name#', imageName));\n setTimeout(function () {\n editor.updateStatusBar('upload-image', editor.options.imageTexts.sbInit);\n }, 1000);\n}\n\n/**\n * Action for drawing a table.\n * @param {EasyMDE} editor\n */\nfunction drawTable(editor) {\n var cm = editor.codemirror;\n var stat = getState(cm);\n var options = editor.options;\n _replaceSelection(cm, stat.table, options.insertTexts.table);\n}\n\n/**\n * Action for drawing a horizontal rule.\n * @param {EasyMDE} editor\n */\nfunction drawHorizontalRule(editor) {\n var cm = editor.codemirror;\n var stat = getState(cm);\n var options = editor.options;\n _replaceSelection(cm, stat.image, options.insertTexts.horizontalRule);\n}\n\n\n/**\n * Undo action.\n * @param {EasyMDE} editor\n */\nfunction undo(editor) {\n var cm = editor.codemirror;\n cm.undo();\n cm.focus();\n}\n\n\n/**\n * Redo action.\n * @param {EasyMDE} editor\n */\nfunction redo(editor) {\n var cm = editor.codemirror;\n cm.redo();\n cm.focus();\n}\n\n\n/**\n * Toggle side by side preview\n * @param {EasyMDE} editor\n */\nfunction toggleSideBySide(editor) {\n var cm = editor.codemirror;\n var wrapper = cm.getWrapperElement();\n var preview = wrapper.nextSibling;\n var toolbarButton = editor.toolbarElements && editor.toolbarElements['side-by-side'];\n var useSideBySideListener = false;\n\n var easyMDEContainer = wrapper.parentNode;\n\n if (preview.classList.contains('editor-preview-active-side')) {\n if (editor.options.sideBySideFullscreen === false) {\n // if side-by-side not-fullscreen ok, remove classes when hiding side\n easyMDEContainer.classList.remove('sided--no-fullscreen');\n }\n preview.classList.remove('editor-preview-active-side');\n if (toolbarButton) toolbarButton.classList.remove('active');\n wrapper.classList.remove('CodeMirror-sided');\n } else {\n // When the preview button is clicked for the first time,\n // give some time for the transition from editor.css to fire and the view to slide from right to left,\n // instead of just appearing.\n setTimeout(function () {\n if (!cm.getOption('fullScreen')) {\n if (editor.options.sideBySideFullscreen === false) {\n // if side-by-side not-fullscreen ok, add classes when not fullscreen and showing side\n easyMDEContainer.classList.add('sided--no-fullscreen');\n } else {\n toggleFullScreen(editor);\n }\n }\n preview.classList.add('editor-preview-active-side');\n }, 1);\n if (toolbarButton) toolbarButton.classList.add('active');\n wrapper.classList.add('CodeMirror-sided');\n useSideBySideListener = true;\n }\n\n // Hide normal preview if active\n var previewNormal = wrapper.lastChild;\n if (previewNormal.classList.contains('editor-preview-active')) {\n previewNormal.classList.remove('editor-preview-active');\n var toolbar = editor.toolbarElements.preview;\n var toolbar_div = editor.toolbar_div;\n toolbar.classList.remove('active');\n toolbar_div.classList.remove('disabled-for-preview');\n }\n\n var sideBySideRenderingFunction = function () {\n var newValue = editor.options.previewRender(editor.value(), preview);\n if (newValue != null) {\n preview.innerHTML = newValue;\n }\n };\n\n if (!cm.sideBySideRenderingFunction) {\n cm.sideBySideRenderingFunction = sideBySideRenderingFunction;\n }\n\n if (useSideBySideListener) {\n var newValue = editor.options.previewRender(editor.value(), preview);\n if (newValue != null) {\n preview.innerHTML = newValue;\n }\n cm.on('update', cm.sideBySideRenderingFunction);\n } else {\n cm.off('update', cm.sideBySideRenderingFunction);\n }\n\n // Refresh to fix selection being off (#309)\n cm.refresh();\n}\n\n\n/**\n * Preview action.\n * @param {EasyMDE} editor\n */\nfunction togglePreview(editor) {\n var cm = editor.codemirror;\n var wrapper = cm.getWrapperElement();\n var toolbar_div = editor.toolbar_div;\n var toolbar = editor.options.toolbar ? editor.toolbarElements.preview : false;\n var preview = wrapper.lastChild;\n\n // Turn off side by side if needed\n var sidebyside = cm.getWrapperElement().nextSibling;\n if (sidebyside.classList.contains('editor-preview-active-side'))\n toggleSideBySide(editor);\n\n if (!preview || !preview.classList.contains('editor-preview-full')) {\n\n preview = document.createElement('div');\n preview.className = 'editor-preview-full';\n\n if (editor.options.previewClass) {\n\n if (Array.isArray(editor.options.previewClass)) {\n for (var i = 0; i < editor.options.previewClass.length; i++) {\n preview.classList.add(editor.options.previewClass[i]);\n }\n\n } else if (typeof editor.options.previewClass === 'string') {\n preview.classList.add(editor.options.previewClass);\n }\n }\n\n wrapper.appendChild(preview);\n }\n\n if (preview.classList.contains('editor-preview-active')) {\n preview.classList.remove('editor-preview-active');\n if (toolbar) {\n toolbar.classList.remove('active');\n toolbar_div.classList.remove('disabled-for-preview');\n }\n } else {\n // When the preview button is clicked for the first time,\n // give some time for the transition from editor.css to fire and the view to slide from right to left,\n // instead of just appearing.\n setTimeout(function () {\n preview.classList.add('editor-preview-active');\n }, 1);\n if (toolbar) {\n toolbar.classList.add('active');\n toolbar_div.classList.add('disabled-for-preview');\n }\n }\n\n var preview_result = editor.options.previewRender(editor.value(), preview);\n if (preview_result !== null) {\n preview.innerHTML = preview_result;\n }\n\n}\n\nfunction _replaceSelection(cm, active, startEnd, url) {\n if (cm.getWrapperElement().lastChild.classList.contains('editor-preview-active'))\n return;\n\n var text;\n var start = startEnd[0];\n var end = startEnd[1];\n var startPoint = {},\n endPoint = {};\n Object.assign(startPoint, cm.getCursor('start'));\n Object.assign(endPoint, cm.getCursor('end'));\n if (url) {\n start = start.replace('#url#', url); // url is in start for upload-image\n end = end.replace('#url#', url);\n }\n if (active) {\n text = cm.getLine(startPoint.line);\n start = text.slice(0, startPoint.ch);\n end = text.slice(startPoint.ch);\n cm.replaceRange(start + end, {\n line: startPoint.line,\n ch: 0,\n });\n } else {\n text = cm.getSelection();\n cm.replaceSelection(start + text + end);\n\n startPoint.ch += start.length;\n if (startPoint !== endPoint) {\n endPoint.ch += start.length;\n }\n }\n cm.setSelection(startPoint, endPoint);\n cm.focus();\n}\n\n\nfunction _toggleHeading(cm, direction, size) {\n if (cm.getWrapperElement().lastChild.classList.contains('editor-preview-active'))\n return;\n\n var startPoint = cm.getCursor('start');\n var endPoint = cm.getCursor('end');\n for (var i = startPoint.line; i <= endPoint.line; i++) {\n (function (i) {\n var text = cm.getLine(i);\n var currHeadingLevel = text.search(/[^#]/);\n\n if (direction !== undefined) {\n if (currHeadingLevel <= 0) {\n if (direction == 'bigger') {\n text = '###### ' + text;\n } else {\n text = '# ' + text;\n }\n } else if (currHeadingLevel == 6 && direction == 'smaller') {\n text = text.substr(7);\n } else if (currHeadingLevel == 1 && direction == 'bigger') {\n text = text.substr(2);\n } else {\n if (direction == 'bigger') {\n text = text.substr(1);\n } else {\n text = '#' + text;\n }\n }\n } else {\n if (currHeadingLevel <= 0) {\n text = '#'.repeat(size) + ' ' + text;\n } else if (currHeadingLevel == size) {\n text = text.substr(currHeadingLevel + 1);\n } else {\n text = '#'.repeat(size) + ' ' + text.substr(currHeadingLevel + 1);\n }\n }\n\n cm.replaceRange(text, {\n line: i,\n ch: 0,\n }, {\n line: i,\n ch: 99999999999999,\n });\n })(i);\n }\n cm.focus();\n}\n\n\nfunction _toggleLine(cm, name, liststyle) {\n if (cm.getWrapperElement().lastChild.classList.contains('editor-preview-active'))\n return;\n\n var listRegexp = /^(\\s*)(\\*|-|\\+|\\d*\\.)(\\s+)/;\n var whitespacesRegexp = /^\\s*/;\n\n var stat = getState(cm);\n var startPoint = cm.getCursor('start');\n var endPoint = cm.getCursor('end');\n var repl = {\n 'quote': /^(\\s*)>\\s+/,\n 'unordered-list': listRegexp,\n 'ordered-list': listRegexp,\n };\n\n var _getChar = function (name, i) {\n var map = {\n 'quote': '>',\n 'unordered-list': liststyle,\n 'ordered-list': '%%i.',\n };\n\n return map[name].replace('%%i', i);\n };\n\n var _checkChar = function (name, char) {\n var map = {\n 'quote': '>',\n 'unordered-list': '\\\\' + liststyle,\n 'ordered-list': '\\\\d+.',\n };\n var rt = new RegExp(map[name]);\n\n return char && rt.test(char);\n };\n\n var _toggle = function (name, text, untoggleOnly) {\n var arr = listRegexp.exec(text);\n var char = _getChar(name, line);\n if (arr !== null) {\n if (_checkChar(name, arr[2])) {\n char = '';\n }\n text = arr[1] + char + arr[3] + text.replace(whitespacesRegexp, '').replace(repl[name], '$1');\n } else if (untoggleOnly == false) {\n text = char + ' ' + text;\n }\n return text;\n };\n\n var line = 1;\n for (var i = startPoint.line; i <= endPoint.line; i++) {\n (function (i) {\n var text = cm.getLine(i);\n if (stat[name]) {\n text = text.replace(repl[name], '$1');\n } else {\n // If we're toggling unordered-list formatting, check if the current line\n // is part of an ordered-list, and if so, untoggle that first.\n // Workaround for https://github.com/Ionaru/easy-markdown-editor/issues/92\n if (name == 'unordered-list') {\n text = _toggle('ordered-list', text, true);\n }\n text = _toggle(name, text, false);\n line += 1;\n }\n cm.replaceRange(text, {\n line: i,\n ch: 0,\n }, {\n line: i,\n ch: 99999999999999,\n });\n })(i);\n }\n cm.focus();\n}\n\n/**\n * @param {EasyMDE} editor\n * @param {'link' | 'image'} type\n * @param {string} startEnd\n * @param {string} url\n */\nfunction _toggleLink(editor, type, startEnd, url) {\n if (!editor.codemirror || editor.isPreviewActive()) {\n return;\n }\n\n var cm = editor.codemirror;\n var stat = getState(cm);\n var active = stat[type];\n if (!active) {\n _replaceSelection(cm, active, startEnd, url);\n return;\n }\n\n var startPoint = cm.getCursor('start');\n var endPoint = cm.getCursor('end');\n var text = cm.getLine(startPoint.line);\n var start = text.slice(0, startPoint.ch);\n var end = text.slice(startPoint.ch);\n\n if (type == 'link') {\n start = start.replace(/(.*)[^!]\\[/, '$1');\n } else if (type == 'image') {\n start = start.replace(/(.*)!\\[$/, '$1');\n }\n end = end.replace(/]\\(.*?\\)/, '');\n\n cm.replaceRange(start + end, {\n line: startPoint.line,\n ch: 0,\n }, {\n line: startPoint.line,\n ch: 99999999999999,\n });\n\n startPoint.ch -= startEnd[0].length;\n if (startPoint !== endPoint) {\n endPoint.ch -= startEnd[0].length;\n }\n cm.setSelection(startPoint, endPoint);\n cm.focus();\n}\n\n/**\n * @param {EasyMDE} editor\n */\nfunction _toggleBlock(editor, type, start_chars, end_chars) {\n if (!editor.codemirror || editor.isPreviewActive()) {\n return;\n }\n\n end_chars = (typeof end_chars === 'undefined') ? start_chars : end_chars;\n var cm = editor.codemirror;\n var stat = getState(cm);\n\n var text;\n var start = start_chars;\n var end = end_chars;\n\n var startPoint = cm.getCursor('start');\n var endPoint = cm.getCursor('end');\n\n if (stat[type]) {\n text = cm.getLine(startPoint.line);\n start = text.slice(0, startPoint.ch);\n end = text.slice(startPoint.ch);\n if (type == 'bold') {\n start = start.replace(/(\\*\\*|__)(?![\\s\\S]*(\\*\\*|__))/, '');\n end = end.replace(/(\\*\\*|__)/, '');\n } else if (type == 'italic') {\n start = start.replace(/(\\*|_)(?![\\s\\S]*(\\*|_))/, '');\n end = end.replace(/(\\*|_)/, '');\n } else if (type == 'strikethrough') {\n start = start.replace(/(\\*\\*|~~)(?![\\s\\S]*(\\*\\*|~~))/, '');\n end = end.replace(/(\\*\\*|~~)/, '');\n }\n cm.replaceRange(start + end, {\n line: startPoint.line,\n ch: 0,\n }, {\n line: startPoint.line,\n ch: 99999999999999,\n });\n\n if (type == 'bold' || type == 'strikethrough') {\n startPoint.ch -= 2;\n if (startPoint !== endPoint) {\n endPoint.ch -= 2;\n }\n } else if (type == 'italic') {\n startPoint.ch -= 1;\n if (startPoint !== endPoint) {\n endPoint.ch -= 1;\n }\n }\n } else {\n text = cm.getSelection();\n if (type == 'bold') {\n text = text.split('**').join('');\n text = text.split('__').join('');\n } else if (type == 'italic') {\n text = text.split('*').join('');\n text = text.split('_').join('');\n } else if (type == 'strikethrough') {\n text = text.split('~~').join('');\n }\n cm.replaceSelection(start + text + end);\n\n startPoint.ch += start_chars.length;\n endPoint.ch = startPoint.ch + text.length;\n }\n\n cm.setSelection(startPoint, endPoint);\n cm.focus();\n}\n\nfunction _cleanBlock(cm) {\n if (cm.getWrapperElement().lastChild.classList.contains('editor-preview-active'))\n return;\n\n var startPoint = cm.getCursor('start');\n var endPoint = cm.getCursor('end');\n var text;\n\n for (var line = startPoint.line; line <= endPoint.line; line++) {\n text = cm.getLine(line);\n text = text.replace(/^[ ]*([# ]+|\\*|-|[> ]+|[0-9]+(.|\\)))[ ]*/, '');\n\n cm.replaceRange(text, {\n line: line,\n ch: 0,\n }, {\n line: line,\n ch: 99999999999999,\n });\n }\n}\n\n/**\n * Convert a number of bytes to a human-readable file size. If you desire\n * to add a space between the value and the unit, you need to add this space\n * to the given units.\n * @param bytes {number} A number of bytes, as integer. Ex: 421137\n * @param units {number[]} An array of human-readable units, ie. [' B', ' K', ' MB']\n * @returns string A human-readable file size. Ex: '412 KB'\n */\nfunction humanFileSize(bytes, units) {\n if (Math.abs(bytes) < 1024) {\n return '' + bytes + units[0];\n }\n var u = 0;\n do {\n bytes /= 1024;\n ++u;\n } while (Math.abs(bytes) >= 1024 && u < units.length);\n return '' + bytes.toFixed(1) + units[u];\n}\n\n// Merge the properties of one object into another.\nfunction _mergeProperties(target, source) {\n for (var property in source) {\n if (Object.prototype.hasOwnProperty.call(source, property)) {\n if (source[property] instanceof Array) {\n target[property] = source[property].concat(target[property] instanceof Array ? target[property] : []);\n } else if (\n source[property] !== null &&\n typeof source[property] === 'object' &&\n source[property].constructor === Object\n ) {\n target[property] = _mergeProperties(target[property] || {}, source[property]);\n } else {\n target[property] = source[property];\n }\n }\n }\n\n return target;\n}\n\n// Merge an arbitrary number of objects into one.\nfunction extend(target) {\n for (var i = 1; i < arguments.length; i++) {\n target = _mergeProperties(target, arguments[i]);\n }\n\n return target;\n}\n\n/* The right word count in respect for CJK. */\nfunction wordCount(data) {\n var pattern = /[a-zA-Z0-9_\\u00A0-\\u02AF\\u0392-\\u03c9\\u0410-\\u04F9]+|[\\u4E00-\\u9FFF\\u3400-\\u4dbf\\uf900-\\ufaff\\u3040-\\u309f\\uac00-\\ud7af]+/g;\n var m = data.match(pattern);\n var count = 0;\n if (m === null) return count;\n for (var i = 0; i < m.length; i++) {\n if (m[i].charCodeAt(0) >= 0x4E00) {\n count += m[i].length;\n } else {\n count += 1;\n }\n }\n return count;\n}\n\nvar iconClassMap = {\n 'bold': 'fa fa-bold',\n 'italic': 'fa fa-italic',\n 'strikethrough': 'fa fa-strikethrough',\n 'heading': 'fa fa-header fa-heading',\n 'heading-smaller': 'fa fa-header fa-heading header-smaller',\n 'heading-bigger': 'fa fa-header fa-heading header-bigger',\n 'heading-1': 'fa fa-header fa-heading header-1',\n 'heading-2': 'fa fa-header fa-heading header-2',\n 'heading-3': 'fa fa-header fa-heading header-3',\n 'code': 'fa fa-code',\n 'quote': 'fa fa-quote-left',\n 'ordered-list': 'fa fa-list-ol',\n 'unordered-list': 'fa fa-list-ul',\n 'clean-block': 'fa fa-eraser',\n 'link': 'fa fa-link',\n 'image': 'fa fa-image',\n 'upload-image': 'fa fa-image',\n 'table': 'fa fa-table',\n 'horizontal-rule': 'fa fa-minus',\n 'preview': 'fa fa-eye',\n 'side-by-side': 'fa fa-columns',\n 'fullscreen': 'fa fa-arrows-alt',\n 'guide': 'fa fa-question-circle',\n 'undo': 'fa fa-undo',\n 'redo': 'fa fa-repeat fa-redo',\n};\n\nvar toolbarBuiltInButtons = {\n 'bold': {\n name: 'bold',\n action: toggleBold,\n className: iconClassMap['bold'],\n title: 'Bold',\n default: true,\n },\n 'italic': {\n name: 'italic',\n action: toggleItalic,\n className: iconClassMap['italic'],\n title: 'Italic',\n default: true,\n },\n 'strikethrough': {\n name: 'strikethrough',\n action: toggleStrikethrough,\n className: iconClassMap['strikethrough'],\n title: 'Strikethrough',\n },\n 'heading': {\n name: 'heading',\n action: toggleHeadingSmaller,\n className: iconClassMap['heading'],\n title: 'Heading',\n default: true,\n },\n 'heading-smaller': {\n name: 'heading-smaller',\n action: toggleHeadingSmaller,\n className: iconClassMap['heading-smaller'],\n title: 'Smaller Heading',\n },\n 'heading-bigger': {\n name: 'heading-bigger',\n action: toggleHeadingBigger,\n className: iconClassMap['heading-bigger'],\n title: 'Bigger Heading',\n },\n 'heading-1': {\n name: 'heading-1',\n action: toggleHeading1,\n className: iconClassMap['heading-1'],\n title: 'Big Heading',\n },\n 'heading-2': {\n name: 'heading-2',\n action: toggleHeading2,\n className: iconClassMap['heading-2'],\n title: 'Medium Heading',\n },\n 'heading-3': {\n name: 'heading-3',\n action: toggleHeading3,\n className: iconClassMap['heading-3'],\n title: 'Small Heading',\n },\n 'separator-1': {\n name: 'separator-1',\n },\n 'code': {\n name: 'code',\n action: toggleCodeBlock,\n className: iconClassMap['code'],\n title: 'Code',\n },\n 'quote': {\n name: 'quote',\n action: toggleBlockquote,\n className: iconClassMap['quote'],\n title: 'Quote',\n default: true,\n },\n 'unordered-list': {\n name: 'unordered-list',\n action: toggleUnorderedList,\n className: iconClassMap['unordered-list'],\n title: 'Generic List',\n default: true,\n },\n 'ordered-list': {\n name: 'ordered-list',\n action: toggleOrderedList,\n className: iconClassMap['ordered-list'],\n title: 'Numbered List',\n default: true,\n },\n 'clean-block': {\n name: 'clean-block',\n action: cleanBlock,\n className: iconClassMap['clean-block'],\n title: 'Clean block',\n },\n 'separator-2': {\n name: 'separator-2',\n },\n 'link': {\n name: 'link',\n action: drawLink,\n className: iconClassMap['link'],\n title: 'Create Link',\n default: true,\n },\n 'image': {\n name: 'image',\n action: drawImage,\n className: iconClassMap['image'],\n title: 'Insert Image',\n default: true,\n },\n 'upload-image': {\n name: 'upload-image',\n action: drawUploadedImage,\n className: iconClassMap['upload-image'],\n title: 'Import an image',\n },\n 'table': {\n name: 'table',\n action: drawTable,\n className: iconClassMap['table'],\n title: 'Insert Table',\n },\n 'horizontal-rule': {\n name: 'horizontal-rule',\n action: drawHorizontalRule,\n className: iconClassMap['horizontal-rule'],\n title: 'Insert Horizontal Line',\n },\n 'separator-3': {\n name: 'separator-3',\n },\n 'preview': {\n name: 'preview',\n action: togglePreview,\n className: iconClassMap['preview'],\n noDisable: true,\n title: 'Toggle Preview',\n default: true,\n },\n 'side-by-side': {\n name: 'side-by-side',\n action: toggleSideBySide,\n className: iconClassMap['side-by-side'],\n noDisable: true,\n noMobile: true,\n title: 'Toggle Side by Side',\n default: true,\n },\n 'fullscreen': {\n name: 'fullscreen',\n action: toggleFullScreen,\n className: iconClassMap['fullscreen'],\n noDisable: true,\n noMobile: true,\n title: 'Toggle Fullscreen',\n default: true,\n },\n 'separator-4': {\n name: 'separator-4',\n },\n 'guide': {\n name: 'guide',\n action: 'https://www.markdownguide.org/basic-syntax/',\n className: iconClassMap['guide'],\n noDisable: true,\n title: 'Markdown Guide',\n default: true,\n },\n 'separator-5': {\n name: 'separator-5',\n },\n 'undo': {\n name: 'undo',\n action: undo,\n className: iconClassMap['undo'],\n noDisable: true,\n title: 'Undo',\n },\n 'redo': {\n name: 'redo',\n action: redo,\n className: iconClassMap['redo'],\n noDisable: true,\n title: 'Redo',\n },\n};\n\nvar insertTexts = {\n link: ['[', '](#url#)'],\n image: [''],\n uploadedImage: ['', ''],\n // uploadedImage: ['\\n', ''], // TODO: New line insertion doesn't work here.\n table: ['', '\\n\\n| Column 1 | Column 2 | Column 3 |\\n| -------- | -------- | -------- |\\n| Text | Text | Text |\\n\\n'],\n horizontalRule: ['', '\\n\\n-----\\n\\n'],\n};\n\nvar promptTexts = {\n link: 'URL for the link:',\n image: 'URL of the image:',\n};\n\nvar timeFormat = {\n locale: 'en-US',\n format: {\n hour: '2-digit',\n minute: '2-digit',\n },\n};\n\nvar blockStyles = {\n 'bold': '**',\n 'code': '```',\n 'italic': '*',\n};\n\n/**\n * Texts displayed to the user (mainly on the status bar) for the import image\n * feature. Can be used for customization or internationalization.\n */\nvar imageTexts = {\n sbInit: 'Attach files by drag and dropping or pasting from clipboard.',\n sbOnDragEnter: 'Drop image to upload it.',\n sbOnDrop: 'Uploading image #images_names#...',\n sbProgress: 'Uploading #file_name#: #progress#%',\n sbOnUploaded: 'Uploaded #image_name#',\n sizeUnits: ' B, KB, MB',\n};\n\n/**\n * Errors displayed to the user, using the `errorCallback` option. Can be used for\n * customization or internationalization.\n */\nvar errorMessages = {\n noFileGiven: 'You must select a file.',\n typeNotAllowed: 'This image type is not allowed.',\n fileTooLarge: 'Image #image_name# is too big (#image_size#).\\n' +\n 'Maximum file size is #image_max_size#.',\n importError: 'Something went wrong when uploading the image #image_name#.',\n};\n\n/**\n * Interface of EasyMDE.\n */\nfunction EasyMDE(options) {\n // Handle options parameter\n options = options || {};\n\n // Used later to refer to it\"s parent\n options.parent = this;\n\n // Check if Font Awesome needs to be auto downloaded\n var autoDownloadFA = true;\n\n if (options.autoDownloadFontAwesome === false) {\n autoDownloadFA = false;\n }\n\n if (options.autoDownloadFontAwesome !== true) {\n var styleSheets = document.styleSheets;\n for (var i = 0; i < styleSheets.length; i++) {\n if (!styleSheets[i].href)\n continue;\n\n if (styleSheets[i].href.indexOf('//maxcdn.bootstrapcdn.com/font-awesome/') > -1) {\n autoDownloadFA = false;\n }\n }\n }\n\n if (autoDownloadFA) {\n var link = document.createElement('link');\n link.rel = 'stylesheet';\n link.href = 'https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css';\n document.getElementsByTagName('head')[0].appendChild(link);\n }\n\n\n // Find the textarea to use\n if (options.element) {\n this.element = options.element;\n } else if (options.element === null) {\n // This means that the element option was specified, but no element was found\n console.log('EasyMDE: Error. No element was found.');\n return;\n }\n\n\n // Handle toolbar\n if (options.toolbar === undefined) {\n // Initialize\n options.toolbar = [];\n\n\n // Loop over the built in buttons, to get the preferred order\n for (var key in toolbarBuiltInButtons) {\n if (Object.prototype.hasOwnProperty.call(toolbarBuiltInButtons, key)) {\n if (key.indexOf('separator-') != -1) {\n options.toolbar.push('|');\n }\n\n if (toolbarBuiltInButtons[key].default === true || (options.showIcons && options.showIcons.constructor === Array && options.showIcons.indexOf(key) != -1)) {\n options.toolbar.push(key);\n }\n }\n }\n }\n\n // Editor preview styling class.\n if (!Object.prototype.hasOwnProperty.call(options, 'previewClass')) {\n options.previewClass = 'editor-preview';\n }\n\n // Handle status bar\n if (!Object.prototype.hasOwnProperty.call(options, 'status')) {\n options.status = ['autosave', 'lines', 'words', 'cursor'];\n\n if (options.uploadImage) {\n options.status.unshift('upload-image');\n }\n }\n\n\n // Add default preview rendering function\n if (!options.previewRender) {\n options.previewRender = function (plainText) {\n // Note: \"this\" refers to the options object\n return this.parent.markdown(plainText);\n };\n }\n\n\n // Set default options for parsing config\n options.parsingConfig = extend({\n highlightFormatting: true, // needed for toggleCodeBlock to detect types of code\n }, options.parsingConfig || {});\n\n\n // Merging the insertTexts, with the given options\n options.insertTexts = extend({}, insertTexts, options.insertTexts || {});\n\n\n // Merging the promptTexts, with the given options\n options.promptTexts = extend({}, promptTexts, options.promptTexts || {});\n\n\n // Merging the blockStyles, with the given options\n options.blockStyles = extend({}, blockStyles, options.blockStyles || {});\n\n\n if (options.autosave != undefined) {\n // Merging the Autosave timeFormat, with the given options\n options.autosave.timeFormat = extend({}, timeFormat, options.autosave.timeFormat || {});\n }\n\n options.iconClassMap = extend({}, iconClassMap, options.iconClassMap || {});\n\n // Merging the shortcuts, with the given options\n options.shortcuts = extend({}, shortcuts, options.shortcuts || {});\n\n options.maxHeight = options.maxHeight || undefined;\n\n options.direction = options.direction || 'ltr';\n\n if (typeof options.maxHeight !== 'undefined') {\n // Min and max height are equal if maxHeight is set\n options.minHeight = options.maxHeight;\n } else {\n options.minHeight = options.minHeight || '300px';\n }\n\n options.errorCallback = options.errorCallback || function (errorMessage) {\n alert(errorMessage);\n };\n\n // Import-image default configuration\n options.uploadImage = options.uploadImage || false;\n options.imageMaxSize = options.imageMaxSize || 2097152; // 1024 * 1024 * 2\n options.imageAccept = options.imageAccept || 'image/png, image/jpeg, image/gif, image/avif';\n options.imageTexts = extend({}, imageTexts, options.imageTexts || {});\n options.errorMessages = extend({}, errorMessages, options.errorMessages || {});\n options.imagePathAbsolute = options.imagePathAbsolute || false;\n options.imageCSRFName = options.imageCSRFName || 'csrfmiddlewaretoken';\n options.imageCSRFHeader = options.imageCSRFHeader || false;\n\n\n // Change unique_id to uniqueId for backwards compatibility\n if (options.autosave != undefined && options.autosave.unique_id != undefined && options.autosave.unique_id != '')\n options.autosave.uniqueId = options.autosave.unique_id;\n\n // If overlay mode is specified and combine is not provided, default it to true\n if (options.overlayMode && options.overlayMode.combine === undefined) {\n options.overlayMode.combine = true;\n }\n\n // Update this options\n this.options = options;\n\n\n // Auto render\n this.render();\n\n\n // The codemirror component is only available after rendering\n // so, the setter for the initialValue can only run after\n // the element has been rendered\n if (options.initialValue && (!this.options.autosave || this.options.autosave.foundSavedValue !== true)) {\n this.value(options.initialValue);\n }\n\n if (options.uploadImage) {\n var self = this;\n\n this.codemirror.on('dragenter', function (cm, event) {\n self.updateStatusBar('upload-image', self.options.imageTexts.sbOnDragEnter);\n event.stopPropagation();\n event.preventDefault();\n });\n this.codemirror.on('dragend', function (cm, event) {\n self.updateStatusBar('upload-image', self.options.imageTexts.sbInit);\n event.stopPropagation();\n event.preventDefault();\n });\n this.codemirror.on('dragleave', function (cm, event) {\n self.updateStatusBar('upload-image', self.options.imageTexts.sbInit);\n event.stopPropagation();\n event.preventDefault();\n });\n\n this.codemirror.on('dragover', function (cm, event) {\n self.updateStatusBar('upload-image', self.options.imageTexts.sbOnDragEnter);\n event.stopPropagation();\n event.preventDefault();\n });\n\n this.codemirror.on('drop', function (cm, event) {\n event.stopPropagation();\n event.preventDefault();\n if (options.imageUploadFunction) {\n self.uploadImagesUsingCustomFunction(options.imageUploadFunction, event.dataTransfer.files);\n } else {\n self.uploadImages(event.dataTransfer.files);\n }\n });\n\n this.codemirror.on('paste', function (cm, event) {\n if (options.imageUploadFunction) {\n self.uploadImagesUsingCustomFunction(options.imageUploadFunction, event.clipboardData.files);\n } else {\n self.uploadImages(event.clipboardData.files);\n }\n });\n }\n}\n\n/**\n * Upload asynchronously a list of images to a server.\n *\n * Can be triggered by:\n * - drag&drop;\n * - copy-paste;\n * - the browse-file window (opened when the user clicks on the *upload-image* icon).\n * @param {FileList} files The files to upload the the server.\n * @param [onSuccess] {function} see EasyMDE.prototype.uploadImage\n * @param [onError] {function} see EasyMDE.prototype.uploadImage\n */\nEasyMDE.prototype.uploadImages = function (files, onSuccess, onError) {\n if (files.length === 0) {\n return;\n }\n var names = [];\n for (var i = 0; i < files.length; i++) {\n names.push(files[i].name);\n this.uploadImage(files[i], onSuccess, onError);\n }\n this.updateStatusBar('upload-image', this.options.imageTexts.sbOnDrop.replace('#images_names#', names.join(', ')));\n};\n\n/**\n * Upload asynchronously a list of images to a server.\n *\n * Can be triggered by:\n * - drag&drop;\n * - copy-paste;\n * - the browse-file window (opened when the user clicks on the *upload-image* icon).\n * @param imageUploadFunction {Function} The custom function to upload the image passed in options.\n * @param {FileList} files The files to upload the the server.\n */\nEasyMDE.prototype.uploadImagesUsingCustomFunction = function (imageUploadFunction, files) {\n if (files.length === 0) {\n return;\n }\n var names = [];\n for (var i = 0; i < files.length; i++) {\n names.push(files[i].name);\n this.uploadImageUsingCustomFunction(imageUploadFunction, files[i]);\n }\n this.updateStatusBar('upload-image', this.options.imageTexts.sbOnDrop.replace('#images_names#', names.join(', ')));\n};\n\n/**\n * Update an item in the status bar.\n * @param itemName {string} The name of the item to update (ie. 'upload-image', 'autosave', etc.).\n * @param content {string} the new content of the item to write in the status bar.\n */\nEasyMDE.prototype.updateStatusBar = function (itemName, content) {\n if (!this.gui.statusbar) {\n return;\n }\n\n var matchingClasses = this.gui.statusbar.getElementsByClassName(itemName);\n if (matchingClasses.length === 1) {\n this.gui.statusbar.getElementsByClassName(itemName)[0].textContent = content;\n } else if (matchingClasses.length === 0) {\n console.log('EasyMDE: status bar item ' + itemName + ' was not found.');\n } else {\n console.log('EasyMDE: Several status bar items named ' + itemName + ' was found.');\n }\n};\n\n/**\n * Default markdown render.\n */\nEasyMDE.prototype.markdown = function (text) {\n if (marked) {\n // Initialize\n var markedOptions;\n if (this.options && this.options.renderingConfig && this.options.renderingConfig.markedOptions) {\n markedOptions = this.options.renderingConfig.markedOptions;\n } else {\n markedOptions = {};\n }\n\n // Update options\n if (this.options && this.options.renderingConfig && this.options.renderingConfig.singleLineBreaks === false) {\n markedOptions.breaks = false;\n } else {\n markedOptions.breaks = true;\n }\n\n if (this.options && this.options.renderingConfig && this.options.renderingConfig.codeSyntaxHighlighting === true) {\n\n /* Get HLJS from config or window */\n var hljs = this.options.renderingConfig.hljs || window.hljs;\n\n /* Check if HLJS loaded */\n if (hljs) {\n markedOptions.highlight = function (code, language) {\n if (language && hljs.getLanguage(language)) {\n return hljs.highlight(language, code).value;\n } else {\n return hljs.highlightAuto(code).value;\n }\n };\n }\n }\n\n // Set options\n marked.setOptions(markedOptions);\n\n // Convert the markdown to HTML\n var htmlText = marked.parse(text);\n\n // Sanitize HTML\n if (this.options.renderingConfig && typeof this.options.renderingConfig.sanitizerFunction === 'function') {\n htmlText = this.options.renderingConfig.sanitizerFunction.call(this, htmlText);\n }\n\n // Edit the HTML anchors to add 'target=\"_blank\"' by default.\n htmlText = addAnchorTargetBlank(htmlText);\n\n // Remove list-style when rendering checkboxes\n htmlText = removeListStyleWhenCheckbox(htmlText);\n\n return htmlText;\n }\n};\n\n/**\n * Render editor to the given element.\n */\nEasyMDE.prototype.render = function (el) {\n if (!el) {\n el = this.element || document.getElementsByTagName('textarea')[0];\n }\n\n if (this._rendered && this._rendered === el) {\n // Already rendered.\n return;\n }\n\n this.element = el;\n var options = this.options;\n\n var self = this;\n var keyMaps = {};\n\n for (var key in options.shortcuts) {\n // null stands for \"do not bind this command\"\n if (options.shortcuts[key] !== null && bindings[key] !== null) {\n (function (key) {\n keyMaps[fixShortcut(options.shortcuts[key])] = function () {\n var action = bindings[key];\n if (typeof action === 'function') {\n action(self);\n } else if (typeof action === 'string') {\n window.open(action, '_blank');\n }\n };\n })(key);\n }\n }\n\n keyMaps['Enter'] = 'newlineAndIndentContinueMarkdownList';\n keyMaps['Tab'] = 'tabAndIndentMarkdownList';\n keyMaps['Shift-Tab'] = 'shiftTabAndUnindentMarkdownList';\n keyMaps['Esc'] = function (cm) {\n if (cm.getOption('fullScreen')) toggleFullScreen(self);\n };\n\n this.documentOnKeyDown = function (e) {\n e = e || window.event;\n\n if (e.keyCode == 27) {\n if (self.codemirror.getOption('fullScreen')) toggleFullScreen(self);\n }\n };\n document.addEventListener('keydown', this.documentOnKeyDown, false);\n\n var mode, backdrop;\n\n // CodeMirror overlay mode\n if (options.overlayMode) {\n CodeMirror.defineMode('overlay-mode', function (config) {\n return CodeMirror.overlayMode(CodeMirror.getMode(config, options.spellChecker !== false ? 'spell-checker' : 'gfm'), options.overlayMode.mode, options.overlayMode.combine);\n });\n\n mode = 'overlay-mode';\n backdrop = options.parsingConfig;\n backdrop.gitHubSpice = false;\n } else {\n mode = options.parsingConfig;\n mode.name = 'gfm';\n mode.gitHubSpice = false;\n }\n if (options.spellChecker !== false) {\n mode = 'spell-checker';\n backdrop = options.parsingConfig;\n backdrop.name = 'gfm';\n backdrop.gitHubSpice = false;\n\n if (typeof options.spellChecker === 'function') {\n options.spellChecker({\n codeMirrorInstance: CodeMirror,\n });\n } else {\n CodeMirrorSpellChecker({\n codeMirrorInstance: CodeMirror,\n });\n }\n }\n\n // eslint-disable-next-line no-unused-vars\n function configureMouse(cm, repeat, event) {\n return {\n addNew: false,\n };\n }\n\n this.codemirror = CodeMirror.fromTextArea(el, {\n mode: mode,\n backdrop: backdrop,\n theme: (options.theme != undefined) ? options.theme : 'easymde',\n tabSize: (options.tabSize != undefined) ? options.tabSize : 2,\n indentUnit: (options.tabSize != undefined) ? options.tabSize : 2,\n indentWithTabs: (options.indentWithTabs === false) ? false : true,\n lineNumbers: (options.lineNumbers === true) ? true : false,\n autofocus: (options.autofocus === true) ? true : false,\n extraKeys: keyMaps,\n direction: options.direction,\n lineWrapping: (options.lineWrapping === false) ? false : true,\n allowDropFileTypes: ['text/plain'],\n placeholder: options.placeholder || el.getAttribute('placeholder') || '',\n styleSelectedText: (options.styleSelectedText != undefined) ? options.styleSelectedText : !isMobile(),\n scrollbarStyle: (options.scrollbarStyle != undefined) ? options.scrollbarStyle : 'native',\n configureMouse: configureMouse,\n inputStyle: (options.inputStyle != undefined) ? options.inputStyle : isMobile() ? 'contenteditable' : 'textarea',\n spellcheck: (options.nativeSpellcheck != undefined) ? options.nativeSpellcheck : true,\n autoRefresh: (options.autoRefresh != undefined) ? options.autoRefresh : false,\n });\n\n this.codemirror.getScrollerElement().style.minHeight = options.minHeight;\n\n if (typeof options.maxHeight !== 'undefined') {\n this.codemirror.getScrollerElement().style.height = options.maxHeight;\n }\n\n if (options.forceSync === true) {\n var cm = this.codemirror;\n cm.on('change', function () {\n cm.save();\n });\n }\n\n this.gui = {};\n\n // Wrap Codemirror with container before create toolbar, etc,\n // to use with sideBySideFullscreen option.\n var easyMDEContainer = document.createElement('div');\n easyMDEContainer.classList.add('EasyMDEContainer');\n easyMDEContainer.setAttribute('role', 'application');\n var cmWrapper = this.codemirror.getWrapperElement();\n cmWrapper.parentNode.insertBefore(easyMDEContainer, cmWrapper);\n easyMDEContainer.appendChild(cmWrapper);\n\n if (options.toolbar !== false) {\n this.gui.toolbar = this.createToolbar();\n }\n if (options.status !== false) {\n this.gui.statusbar = this.createStatusbar();\n }\n if (options.autosave != undefined && options.autosave.enabled === true) {\n this.autosave(); // use to load localstorage content\n this.codemirror.on('change', function () {\n clearTimeout(self._autosave_timeout);\n self._autosave_timeout = setTimeout(function () {\n self.autosave();\n }, self.options.autosave.submit_delay || self.options.autosave.delay || 1000);\n });\n }\n\n function calcHeight(naturalWidth, naturalHeight) {\n var height;\n var viewportWidth = window.getComputedStyle(document.querySelector('.CodeMirror-sizer')).width.replace('px', '');\n if (naturalWidth < viewportWidth) {\n height = naturalHeight + 'px';\n } else {\n height = (naturalHeight / naturalWidth * 100) + '%';\n }\n return height;\n }\n\n var _vm = this;\n\n\n function assignImageBlockAttributes(parentEl, img) {\n parentEl.setAttribute('data-img-src', img.url);\n parentEl.setAttribute('style', '--bg-image:url(' + img.url + ');--width:' + img.naturalWidth + 'px;--height:' + calcHeight(img.naturalWidth, img.naturalHeight));\n _vm.codemirror.setSize();\n }\n\n function handleImages() {\n if (!options.previewImagesInEditor) {\n return;\n }\n\n easyMDEContainer.querySelectorAll('.cm-image-marker').forEach(function (e) {\n var parentEl = e.parentElement;\n if (!parentEl.innerText.match(/^!\\[.*?\\]\\(.*\\)/g)) {\n // if img pasted on the same line with other text, don't preview, preview only images on separate line\n return;\n }\n if (!parentEl.hasAttribute('data-img-src')) {\n var srcAttr = parentEl.innerText.match('\\\\((.*)\\\\)'); // might require better parsing according to markdown spec\n if (!window.EMDEimagesCache) {\n window.EMDEimagesCache = {};\n }\n\n if (srcAttr && srcAttr.length >= 2) {\n var keySrc = srcAttr[1];\n\n if (options.imagesPreviewHandler) {\n var newSrc = options.imagesPreviewHandler(srcAttr[1]);\n // defensive check making sure the handler provided by the user returns a string\n if (typeof newSrc === 'string') {\n keySrc = newSrc;\n }\n }\n\n if (!window.EMDEimagesCache[keySrc]) {\n var img = document.createElement('img');\n img.onload = function () {\n window.EMDEimagesCache[keySrc] = {\n naturalWidth: img.naturalWidth,\n naturalHeight: img.naturalHeight,\n url: keySrc,\n };\n assignImageBlockAttributes(parentEl, window.EMDEimagesCache[keySrc]);\n };\n img.src = keySrc;\n } else {\n assignImageBlockAttributes(parentEl, window.EMDEimagesCache[keySrc]);\n }\n }\n }\n });\n }\n\n this.codemirror.on('update', function () {\n handleImages();\n });\n\n this.gui.sideBySide = this.createSideBySide();\n this._rendered = this.element;\n\n if (options.autofocus === true || el.autofocus) {\n this.codemirror.focus();\n }\n\n // Fixes CodeMirror bug (#344)\n var temp_cm = this.codemirror;\n setTimeout(function () {\n temp_cm.refresh();\n }.bind(temp_cm), 0);\n};\n\nEasyMDE.prototype.cleanup = function () {\n document.removeEventListener('keydown', this.documentOnKeyDown);\n};\n\n// Safari, in Private Browsing Mode, looks like it supports localStorage but all calls to setItem throw QuotaExceededError. We're going to detect this and set a variable accordingly.\nfunction isLocalStorageAvailable() {\n if (typeof localStorage === 'object') {\n try {\n localStorage.setItem('smde_localStorage', 1);\n localStorage.removeItem('smde_localStorage');\n } catch (e) {\n return false;\n }\n } else {\n return false;\n }\n\n return true;\n}\n\nEasyMDE.prototype.autosave = function () {\n if (isLocalStorageAvailable()) {\n var easyMDE = this;\n\n if (this.options.autosave.uniqueId == undefined || this.options.autosave.uniqueId == '') {\n console.log('EasyMDE: You must set a uniqueId to use the autosave feature');\n return;\n }\n\n if (this.options.autosave.binded !== true) {\n if (easyMDE.element.form != null && easyMDE.element.form != undefined) {\n easyMDE.element.form.addEventListener('submit', function () {\n clearTimeout(easyMDE.autosaveTimeoutId);\n easyMDE.autosaveTimeoutId = undefined;\n\n localStorage.removeItem('smde_' + easyMDE.options.autosave.uniqueId);\n });\n }\n\n this.options.autosave.binded = true;\n }\n\n if (this.options.autosave.loaded !== true) {\n if (typeof localStorage.getItem('smde_' + this.options.autosave.uniqueId) == 'string' && localStorage.getItem('smde_' + this.options.autosave.uniqueId) != '') {\n this.codemirror.setValue(localStorage.getItem('smde_' + this.options.autosave.uniqueId));\n this.options.autosave.foundSavedValue = true;\n }\n\n this.options.autosave.loaded = true;\n }\n\n var value = easyMDE.value();\n if (value !== '') {\n localStorage.setItem('smde_' + this.options.autosave.uniqueId, value);\n } else {\n localStorage.removeItem('smde_' + this.options.autosave.uniqueId);\n }\n\n var el = document.getElementById('autosaved');\n if (el != null && el != undefined && el != '') {\n var d = new Date();\n var dd = new Intl.DateTimeFormat([this.options.autosave.timeFormat.locale, 'en-US'], this.options.autosave.timeFormat.format).format(d);\n var save = this.options.autosave.text == undefined ? 'Autosaved: ' : this.options.autosave.text;\n\n el.innerHTML = save + dd;\n }\n } else {\n console.log('EasyMDE: localStorage not available, cannot autosave');\n }\n};\n\nEasyMDE.prototype.clearAutosavedValue = function () {\n if (isLocalStorageAvailable()) {\n if (this.options.autosave == undefined || this.options.autosave.uniqueId == undefined || this.options.autosave.uniqueId == '') {\n console.log('EasyMDE: You must set a uniqueId to clear the autosave value');\n return;\n }\n\n localStorage.removeItem('smde_' + this.options.autosave.uniqueId);\n } else {\n console.log('EasyMDE: localStorage not available, cannot autosave');\n }\n};\n\n/**\n * Open the browse-file window to upload an image to a server.\n * @param [onSuccess] {function} see EasyMDE.prototype.uploadImage\n * @param [onError] {function} see EasyMDE.prototype.uploadImage\n */\nEasyMDE.prototype.openBrowseFileWindow = function (onSuccess, onError) {\n var self = this;\n var imageInput = this.gui.toolbar.getElementsByClassName('imageInput')[0];\n imageInput.click(); //dispatchEvent(new MouseEvent('click')); // replaced with click() for IE11 compatibility.\n function onChange(event) {\n if (self.options.imageUploadFunction) {\n self.uploadImagesUsingCustomFunction(self.options.imageUploadFunction, event.target.files);\n } else {\n self.uploadImages(event.target.files, onSuccess, onError);\n }\n imageInput.removeEventListener('change', onChange);\n }\n\n imageInput.addEventListener('change', onChange);\n};\n\n/**\n * Upload an image to the server.\n *\n * @param file {File} The image to upload, as a HTML5 File object (https://developer.mozilla.org/en-US/docs/Web/API/File)\n * @param [onSuccess] {function} A callback function to execute after the image has been successfully uploaded, with one parameter:\n * - url (string): The URL of the uploaded image.\n * @param [onError] {function} A callback function to execute when the image upload fails, with one parameter:\n * - error (string): the detailed error to display to the user (based on messages from options.errorMessages).\n */\nEasyMDE.prototype.uploadImage = function (file, onSuccess, onError) {\n var self = this;\n onSuccess = onSuccess || function onSuccess(imageUrl) {\n afterImageUploaded(self, imageUrl);\n };\n\n function onErrorSup(errorMessage) {\n // show error on status bar and reset after 10000ms\n self.updateStatusBar('upload-image', errorMessage);\n\n setTimeout(function () {\n self.updateStatusBar('upload-image', self.options.imageTexts.sbInit);\n }, 10000);\n\n // run custom error handler\n if (onError && typeof onError === 'function') {\n onError(errorMessage);\n }\n // run error handler from options, this alerts the message.\n self.options.errorCallback(errorMessage);\n }\n\n function fillErrorMessage(errorMessage) {\n var units = self.options.imageTexts.sizeUnits.split(',');\n return errorMessage\n .replace('#image_name#', file.name)\n .replace('#image_size#', humanFileSize(file.size, units))\n .replace('#image_max_size#', humanFileSize(self.options.imageMaxSize, units));\n }\n\n if (file.size > this.options.imageMaxSize) {\n onErrorSup(fillErrorMessage(this.options.errorMessages.fileTooLarge));\n return;\n }\n\n var formData = new FormData();\n formData.append('image', file);\n\n // insert CSRF body token if provided in config.\n if (self.options.imageCSRFToken && !self.options.imageCSRFHeader) {\n formData.append(self.options.imageCSRFName, self.options.imageCSRFToken);\n }\n\n var request = new XMLHttpRequest();\n request.upload.onprogress = function (event) {\n if (event.lengthComputable) {\n var progress = '' + Math.round((event.loaded * 100) / event.total);\n self.updateStatusBar('upload-image', self.options.imageTexts.sbProgress.replace('#file_name#', file.name).replace('#progress#', progress));\n }\n };\n request.open('POST', this.options.imageUploadEndpoint);\n\n // insert CSRF header token if provided in config.\n if (self.options.imageCSRFToken && self.options.imageCSRFHeader) {\n request.setRequestHeader(self.options.imageCSRFName, self.options.imageCSRFToken);\n }\n\n request.onload = function () {\n try {\n var response = JSON.parse(this.responseText);\n } catch (error) {\n console.error('EasyMDE: The server did not return a valid json.');\n onErrorSup(fillErrorMessage(self.options.errorMessages.importError));\n return;\n }\n if (this.status === 200 && response && !response.error && response.data && response.data.filePath) {\n onSuccess((self.options.imagePathAbsolute ? '' : (window.location.origin + '/')) + response.data.filePath);\n } else {\n if (response.error && response.error in self.options.errorMessages) { // preformatted error message\n onErrorSup(fillErrorMessage(self.options.errorMessages[response.error]));\n } else if (response.error) { // server side generated error message\n onErrorSup(fillErrorMessage(response.error));\n } else { //unknown error\n console.error('EasyMDE: Received an unexpected response after uploading the image.'\n + this.status + ' (' + this.statusText + ')');\n onErrorSup(fillErrorMessage(self.options.errorMessages.importError));\n }\n }\n };\n\n request.onerror = function (event) {\n console.error('EasyMDE: An unexpected error occurred when trying to upload the image.'\n + event.target.status + ' (' + event.target.statusText + ')');\n onErrorSup(self.options.errorMessages.importError);\n };\n\n request.send(formData);\n\n};\n\n/**\n * Upload an image to the server using a custom upload function.\n *\n * @param imageUploadFunction {Function} The custom function to upload the image passed in options\n * @param file {File} The image to upload, as a HTML5 File object (https://developer.mozilla.org/en-US/docs/Web/API/File).\n */\nEasyMDE.prototype.uploadImageUsingCustomFunction = function (imageUploadFunction, file) {\n var self = this;\n\n function onSuccess(imageUrl) {\n afterImageUploaded(self, imageUrl);\n }\n\n function onError(errorMessage) {\n var filledErrorMessage = fillErrorMessage(errorMessage);\n // show error on status bar and reset after 10000ms\n self.updateStatusBar('upload-image', filledErrorMessage);\n\n setTimeout(function () {\n self.updateStatusBar('upload-image', self.options.imageTexts.sbInit);\n }, 10000);\n\n // run error handler from options, this alerts the message.\n self.options.errorCallback(filledErrorMessage);\n }\n\n function fillErrorMessage(errorMessage) {\n var units = self.options.imageTexts.sizeUnits.split(',');\n return errorMessage\n .replace('#image_name#', file.name)\n .replace('#image_size#', humanFileSize(file.size, units))\n .replace('#image_max_size#', humanFileSize(self.options.imageMaxSize, units));\n }\n\n imageUploadFunction.apply(this, [file, onSuccess, onError]);\n};\n\nEasyMDE.prototype.setPreviewMaxHeight = function () {\n var cm = this.codemirror;\n var wrapper = cm.getWrapperElement();\n var preview = wrapper.nextSibling;\n\n // Calc preview max height\n var paddingTop = parseInt(window.getComputedStyle(wrapper).paddingTop);\n var borderTopWidth = parseInt(window.getComputedStyle(wrapper).borderTopWidth);\n var optionsMaxHeight = parseInt(this.options.maxHeight);\n var wrapperMaxHeight = optionsMaxHeight + paddingTop * 2 + borderTopWidth * 2;\n var previewMaxHeight = wrapperMaxHeight.toString() + 'px';\n\n preview.style.height = previewMaxHeight;\n};\n\nEasyMDE.prototype.createSideBySide = function () {\n var cm = this.codemirror;\n var wrapper = cm.getWrapperElement();\n var preview = wrapper.nextSibling;\n\n if (!preview || !preview.classList.contains('editor-preview-side')) {\n preview = document.createElement('div');\n preview.className = 'editor-preview-side';\n\n if (this.options.previewClass) {\n\n if (Array.isArray(this.options.previewClass)) {\n for (var i = 0; i < this.options.previewClass.length; i++) {\n preview.classList.add(this.options.previewClass[i]);\n }\n\n } else if (typeof this.options.previewClass === 'string') {\n preview.classList.add(this.options.previewClass);\n }\n }\n\n wrapper.parentNode.insertBefore(preview, wrapper.nextSibling);\n }\n\n if (typeof this.options.maxHeight !== 'undefined') {\n this.setPreviewMaxHeight();\n }\n\n if (this.options.syncSideBySidePreviewScroll === false) return preview;\n // Syncs scroll editor -> preview\n var cScroll = false;\n var pScroll = false;\n cm.on('scroll', function (v) {\n if (cScroll) {\n cScroll = false;\n return;\n }\n pScroll = true;\n var height = v.getScrollInfo().height - v.getScrollInfo().clientHeight;\n var ratio = parseFloat(v.getScrollInfo().top) / height;\n var move = (preview.scrollHeight - preview.clientHeight) * ratio;\n preview.scrollTop = move;\n });\n\n // Syncs scroll preview -> editor\n preview.onscroll = function () {\n if (pScroll) {\n pScroll = false;\n return;\n }\n cScroll = true;\n var height = preview.scrollHeight - preview.clientHeight;\n var ratio = parseFloat(preview.scrollTop) / height;\n var move = (cm.getScrollInfo().height - cm.getScrollInfo().clientHeight) * ratio;\n cm.scrollTo(0, move);\n };\n return preview;\n};\n\nEasyMDE.prototype.createToolbar = function (items) {\n items = items || this.options.toolbar;\n\n if (!items || items.length === 0) {\n return;\n }\n var i;\n for (i = 0; i < items.length; i++) {\n if (toolbarBuiltInButtons[items[i]] != undefined) {\n items[i] = toolbarBuiltInButtons[items[i]];\n }\n }\n\n var bar = document.createElement('div');\n bar.className = 'editor-toolbar';\n bar.setAttribute('role', 'toolbar');\n\n var self = this;\n\n var toolbarData = {};\n self.toolbar = items;\n\n for (i = 0; i < items.length; i++) {\n if (items[i].name == 'guide' && self.options.toolbarGuideIcon === false)\n continue;\n\n if (self.options.hideIcons && self.options.hideIcons.indexOf(items[i].name) != -1)\n continue;\n\n // Fullscreen does not work well on mobile devices (even tablets)\n // In the future, hopefully this can be resolved\n if ((items[i].name == 'fullscreen' || items[i].name == 'side-by-side') && isMobile())\n continue;\n\n\n // Don't include trailing separators\n if (items[i] === '|') {\n var nonSeparatorIconsFollow = false;\n\n for (var x = (i + 1); x < items.length; x++) {\n if (items[x] !== '|' && (!self.options.hideIcons || self.options.hideIcons.indexOf(items[x].name) == -1)) {\n nonSeparatorIconsFollow = true;\n }\n }\n\n if (!nonSeparatorIconsFollow)\n continue;\n }\n\n\n // Create the icon and append to the toolbar\n (function (item) {\n var el;\n if (item === '|') {\n el = createSep();\n } else if (item.children) {\n el = createToolbarDropdown(item, self.options.toolbarTips, self.options.shortcuts, self);\n } else {\n el = createToolbarButton(item, true, self.options.toolbarTips, self.options.shortcuts, 'button', self);\n }\n\n\n toolbarData[item.name || item] = el;\n bar.appendChild(el);\n\n // Create the input element (ie. ), used among\n // with the 'import-image' icon to open the browse-file window.\n if (item.name === 'upload-image') {\n var imageInput = document.createElement('input');\n imageInput.className = 'imageInput';\n imageInput.type = 'file';\n imageInput.multiple = true;\n imageInput.name = 'image';\n imageInput.accept = self.options.imageAccept;\n imageInput.style.display = 'none';\n imageInput.style.opacity = 0;\n bar.appendChild(imageInput);\n }\n })(items[i]);\n }\n\n self.toolbar_div = bar;\n self.toolbarElements = toolbarData;\n\n var cm = this.codemirror;\n cm.on('cursorActivity', function () {\n var stat = getState(cm);\n\n for (var key in toolbarData) {\n (function (key) {\n var el = toolbarData[key];\n if (stat[key]) {\n el.classList.add('active');\n } else if (key != 'fullscreen' && key != 'side-by-side') {\n el.classList.remove('active');\n }\n })(key);\n }\n });\n\n var cmWrapper = cm.getWrapperElement();\n cmWrapper.parentNode.insertBefore(bar, cmWrapper);\n return bar;\n};\n\nEasyMDE.prototype.createStatusbar = function (status) {\n // Initialize\n status = status || this.options.status;\n var options = this.options;\n var cm = this.codemirror;\n\n // Make sure the status variable is valid\n if (!status || status.length === 0) {\n return;\n }\n\n // Set up the built-in items\n var items = [];\n var i, onUpdate, onActivity, defaultValue;\n\n for (i = 0; i < status.length; i++) {\n // Reset some values\n onUpdate = undefined;\n onActivity = undefined;\n defaultValue = undefined;\n\n\n // Handle if custom or not\n if (typeof status[i] === 'object') {\n items.push({\n className: status[i].className,\n defaultValue: status[i].defaultValue,\n onUpdate: status[i].onUpdate,\n onActivity: status[i].onActivity,\n });\n } else {\n var name = status[i];\n\n if (name === 'words') {\n defaultValue = function (el) {\n el.innerHTML = wordCount(cm.getValue());\n };\n onUpdate = function (el) {\n el.innerHTML = wordCount(cm.getValue());\n };\n } else if (name === 'lines') {\n defaultValue = function (el) {\n el.innerHTML = cm.lineCount();\n };\n onUpdate = function (el) {\n el.innerHTML = cm.lineCount();\n };\n } else if (name === 'cursor') {\n defaultValue = function (el) {\n el.innerHTML = '1:1';\n };\n onActivity = function (el) {\n var pos = cm.getCursor();\n var posLine = pos.line + 1;\n var posColumn = pos.ch + 1;\n el.innerHTML = posLine + ':' + posColumn;\n };\n } else if (name === 'autosave') {\n defaultValue = function (el) {\n if (options.autosave != undefined && options.autosave.enabled === true) {\n el.setAttribute('id', 'autosaved');\n }\n };\n } else if (name === 'upload-image') {\n defaultValue = function (el) {\n el.innerHTML = options.imageTexts.sbInit;\n };\n }\n\n items.push({\n className: name,\n defaultValue: defaultValue,\n onUpdate: onUpdate,\n onActivity: onActivity,\n });\n }\n }\n\n\n // Create element for the status bar\n var bar = document.createElement('div');\n bar.className = 'editor-statusbar';\n\n\n // Create a new span for each item\n for (i = 0; i < items.length; i++) {\n // Store in temporary variable\n var item = items[i];\n\n\n // Create span element\n var el = document.createElement('span');\n el.className = item.className;\n\n\n // Ensure the defaultValue is a function\n if (typeof item.defaultValue === 'function') {\n item.defaultValue(el);\n }\n\n\n // Ensure the onUpdate is a function\n if (typeof item.onUpdate === 'function') {\n // Create a closure around the span of the current action, then execute the onUpdate handler\n this.codemirror.on('update', (function (el, item) {\n return function () {\n item.onUpdate(el);\n };\n }(el, item)));\n }\n if (typeof item.onActivity === 'function') {\n // Create a closure around the span of the current action, then execute the onActivity handler\n this.codemirror.on('cursorActivity', (function (el, item) {\n return function () {\n item.onActivity(el);\n };\n }(el, item)));\n }\n\n\n // Append the item to the status bar\n bar.appendChild(el);\n }\n\n\n // Insert the status bar into the DOM\n var cmWrapper = this.codemirror.getWrapperElement();\n cmWrapper.parentNode.insertBefore(bar, cmWrapper.nextSibling);\n return bar;\n};\n\n/**\n * Get or set the text content.\n */\nEasyMDE.prototype.value = function (val) {\n var cm = this.codemirror;\n if (val === undefined) {\n return cm.getValue();\n } else {\n cm.getDoc().setValue(val);\n if (this.isPreviewActive()) {\n var wrapper = cm.getWrapperElement();\n var preview = wrapper.lastChild;\n var preview_result = this.options.previewRender(val, preview);\n if (preview_result !== null) {\n preview.innerHTML = preview_result;\n }\n\n }\n return this;\n }\n};\n\n\n/**\n * Bind static methods for exports.\n */\nEasyMDE.toggleBold = toggleBold;\nEasyMDE.toggleItalic = toggleItalic;\nEasyMDE.toggleStrikethrough = toggleStrikethrough;\nEasyMDE.toggleBlockquote = toggleBlockquote;\nEasyMDE.toggleHeadingSmaller = toggleHeadingSmaller;\nEasyMDE.toggleHeadingBigger = toggleHeadingBigger;\nEasyMDE.toggleHeading1 = toggleHeading1;\nEasyMDE.toggleHeading2 = toggleHeading2;\nEasyMDE.toggleHeading3 = toggleHeading3;\nEasyMDE.toggleHeading4 = toggleHeading4;\nEasyMDE.toggleHeading5 = toggleHeading5;\nEasyMDE.toggleHeading6 = toggleHeading6;\nEasyMDE.toggleCodeBlock = toggleCodeBlock;\nEasyMDE.toggleUnorderedList = toggleUnorderedList;\nEasyMDE.toggleOrderedList = toggleOrderedList;\nEasyMDE.cleanBlock = cleanBlock;\nEasyMDE.drawLink = drawLink;\nEasyMDE.drawImage = drawImage;\nEasyMDE.drawUploadedImage = drawUploadedImage;\nEasyMDE.drawTable = drawTable;\nEasyMDE.drawHorizontalRule = drawHorizontalRule;\nEasyMDE.undo = undo;\nEasyMDE.redo = redo;\nEasyMDE.togglePreview = togglePreview;\nEasyMDE.toggleSideBySide = toggleSideBySide;\nEasyMDE.toggleFullScreen = toggleFullScreen;\n\n/**\n * Bind instance methods for exports.\n */\nEasyMDE.prototype.toggleBold = function () {\n toggleBold(this);\n};\nEasyMDE.prototype.toggleItalic = function () {\n toggleItalic(this);\n};\nEasyMDE.prototype.toggleStrikethrough = function () {\n toggleStrikethrough(this);\n};\nEasyMDE.prototype.toggleBlockquote = function () {\n toggleBlockquote(this);\n};\nEasyMDE.prototype.toggleHeadingSmaller = function () {\n toggleHeadingSmaller(this);\n};\nEasyMDE.prototype.toggleHeadingBigger = function () {\n toggleHeadingBigger(this);\n};\nEasyMDE.prototype.toggleHeading1 = function () {\n toggleHeading1(this);\n};\nEasyMDE.prototype.toggleHeading2 = function () {\n toggleHeading2(this);\n};\nEasyMDE.prototype.toggleHeading3 = function () {\n toggleHeading3(this);\n};\nEasyMDE.prototype.toggleHeading4 = function () {\n toggleHeading4(this);\n};\nEasyMDE.prototype.toggleHeading5 = function () {\n toggleHeading5(this);\n};\nEasyMDE.prototype.toggleHeading6 = function () {\n toggleHeading6(this);\n};\nEasyMDE.prototype.toggleCodeBlock = function () {\n toggleCodeBlock(this);\n};\nEasyMDE.prototype.toggleUnorderedList = function () {\n toggleUnorderedList(this);\n};\nEasyMDE.prototype.toggleOrderedList = function () {\n toggleOrderedList(this);\n};\nEasyMDE.prototype.cleanBlock = function () {\n cleanBlock(this);\n};\nEasyMDE.prototype.drawLink = function () {\n drawLink(this);\n};\nEasyMDE.prototype.drawImage = function () {\n drawImage(this);\n};\nEasyMDE.prototype.drawUploadedImage = function () {\n drawUploadedImage(this);\n};\nEasyMDE.prototype.drawTable = function () {\n drawTable(this);\n};\nEasyMDE.prototype.drawHorizontalRule = function () {\n drawHorizontalRule(this);\n};\nEasyMDE.prototype.undo = function () {\n undo(this);\n};\nEasyMDE.prototype.redo = function () {\n redo(this);\n};\nEasyMDE.prototype.togglePreview = function () {\n togglePreview(this);\n};\nEasyMDE.prototype.toggleSideBySide = function () {\n toggleSideBySide(this);\n};\nEasyMDE.prototype.toggleFullScreen = function () {\n toggleFullScreen(this);\n};\n\nEasyMDE.prototype.isPreviewActive = function () {\n var cm = this.codemirror;\n var wrapper = cm.getWrapperElement();\n var preview = wrapper.lastChild;\n\n return preview.classList.contains('editor-preview-active');\n};\n\nEasyMDE.prototype.isSideBySideActive = function () {\n var cm = this.codemirror;\n var wrapper = cm.getWrapperElement();\n var preview = wrapper.nextSibling;\n\n return preview.classList.contains('editor-preview-active-side');\n};\n\nEasyMDE.prototype.isFullscreenActive = function () {\n var cm = this.codemirror;\n\n return cm.getOption('fullScreen');\n};\n\nEasyMDE.prototype.getState = function () {\n var cm = this.codemirror;\n\n return getState(cm);\n};\n\nEasyMDE.prototype.toTextArea = function () {\n var cm = this.codemirror;\n var wrapper = cm.getWrapperElement();\n var easyMDEContainer = wrapper.parentNode;\n\n if (easyMDEContainer) {\n if (this.gui.toolbar) {\n easyMDEContainer.removeChild(this.gui.toolbar);\n }\n if (this.gui.statusbar) {\n easyMDEContainer.removeChild(this.gui.statusbar);\n }\n if (this.gui.sideBySide) {\n easyMDEContainer.removeChild(this.gui.sideBySide);\n }\n }\n\n // Unwrap easyMDEcontainer before codemirror toTextArea() call\n easyMDEContainer.parentNode.insertBefore(wrapper, easyMDEContainer);\n easyMDEContainer.remove();\n\n cm.toTextArea();\n\n if (this.autosaveTimeoutId) {\n clearTimeout(this.autosaveTimeoutId);\n this.autosaveTimeoutId = undefined;\n this.clearAutosavedValue();\n }\n};\n\nmodule.exports = EasyMDE;\n","/* globals chrome: false */\n/* globals __dirname: false */\n/* globals require: false */\n/* globals Buffer: false */\n/* globals module: false */\n\n/**\n * Typo is a JavaScript implementation of a spellchecker using hunspell-style \n * dictionaries.\n */\n\nvar Typo;\n\n(function () {\n\"use strict\";\n\n/**\n * Typo constructor.\n *\n * @param {String} [dictionary] The locale code of the dictionary being used. e.g.,\n * \"en_US\". This is only used to auto-load dictionaries.\n * @param {String} [affData] The data from the dictionary's .aff file. If omitted\n * and Typo.js is being used in a Chrome extension, the .aff\n * file will be loaded automatically from\n * lib/typo/dictionaries/[dictionary]/[dictionary].aff\n * In other environments, it will be loaded from\n * [settings.dictionaryPath]/dictionaries/[dictionary]/[dictionary].aff\n * @param {String} [wordsData] The data from the dictionary's .dic file. If omitted\n * and Typo.js is being used in a Chrome extension, the .dic\n * file will be loaded automatically from\n * lib/typo/dictionaries/[dictionary]/[dictionary].dic\n * In other environments, it will be loaded from\n * [settings.dictionaryPath]/dictionaries/[dictionary]/[dictionary].dic\n * @param {Object} [settings] Constructor settings. Available properties are:\n * {String} [dictionaryPath]: path to load dictionary from in non-chrome\n * environment.\n * {Object} [flags]: flag information.\n * {Boolean} [asyncLoad]: If true, affData and wordsData will be loaded\n * asynchronously.\n * {Function} [loadedCallback]: Called when both affData and wordsData\n * have been loaded. Only used if asyncLoad is set to true. The parameter\n * is the instantiated Typo object.\n *\n * @returns {Typo} A Typo object.\n */\n\nTypo = function (dictionary, affData, wordsData, settings) {\n\tsettings = settings || {};\n\n\tthis.dictionary = null;\n\t\n\tthis.rules = {};\n\tthis.dictionaryTable = {};\n\t\n\tthis.compoundRules = [];\n\tthis.compoundRuleCodes = {};\n\t\n\tthis.replacementTable = [];\n\t\n\tthis.flags = settings.flags || {}; \n\t\n\tthis.memoized = {};\n\n\tthis.loaded = false;\n\t\n\tvar self = this;\n\t\n\tvar path;\n\t\n\t// Loop-control variables.\n\tvar i, j, _len, _jlen;\n\t\n\tif (dictionary) {\n\t\tself.dictionary = dictionary;\n\t\t\n\t\t// If the data is preloaded, just setup the Typo object.\n\t\tif (affData && wordsData) {\n\t\t\tsetup();\n\t\t}\n\t\t// Loading data for Chrome extentions.\n\t\telse if (typeof window !== 'undefined' && 'chrome' in window && 'extension' in window.chrome && 'getURL' in window.chrome.extension) {\n\t\t\tif (settings.dictionaryPath) {\n\t\t\t\tpath = settings.dictionaryPath;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpath = \"typo/dictionaries\";\n\t\t\t}\n\t\t\t\n\t\t\tif (!affData) readDataFile(chrome.extension.getURL(path + \"/\" + dictionary + \"/\" + dictionary + \".aff\"), setAffData);\n\t\t\tif (!wordsData) readDataFile(chrome.extension.getURL(path + \"/\" + dictionary + \"/\" + dictionary + \".dic\"), setWordsData);\n\t\t}\n\t\telse {\n\t\t\tif (settings.dictionaryPath) {\n\t\t\t\tpath = settings.dictionaryPath;\n\t\t\t}\n\t\t\telse if (typeof __dirname !== 'undefined') {\n\t\t\t\tpath = __dirname + '/dictionaries';\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpath = './dictionaries';\n\t\t\t}\n\t\t\t\n\t\t\tif (!affData) readDataFile(path + \"/\" + dictionary + \"/\" + dictionary + \".aff\", setAffData);\n\t\t\tif (!wordsData) readDataFile(path + \"/\" + dictionary + \"/\" + dictionary + \".dic\", setWordsData);\n\t\t}\n\t}\n\t\n\tfunction readDataFile(url, setFunc) {\n\t\tvar response = self._readFile(url, null, settings.asyncLoad);\n\t\t\n\t\tif (settings.asyncLoad) {\n\t\t\tresponse.then(function(data) {\n\t\t\t\tsetFunc(data);\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tsetFunc(response);\n\t\t}\n\t}\n\n\tfunction setAffData(data) {\n\t\taffData = data;\n\n\t\tif (wordsData) {\n\t\t\tsetup();\n\t\t}\n\t}\n\n\tfunction setWordsData(data) {\n\t\twordsData = data;\n\n\t\tif (affData) {\n\t\t\tsetup();\n\t\t}\n\t}\n\n\tfunction setup() {\n\t\tself.rules = self._parseAFF(affData);\n\t\t\n\t\t// Save the rule codes that are used in compound rules.\n\t\tself.compoundRuleCodes = {};\n\t\t\n\t\tfor (i = 0, _len = self.compoundRules.length; i < _len; i++) {\n\t\t\tvar rule = self.compoundRules[i];\n\t\t\t\n\t\t\tfor (j = 0, _jlen = rule.length; j < _jlen; j++) {\n\t\t\t\tself.compoundRuleCodes[rule[j]] = [];\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If we add this ONLYINCOMPOUND flag to self.compoundRuleCodes, then _parseDIC\n\t\t// will do the work of saving the list of words that are compound-only.\n\t\tif (\"ONLYINCOMPOUND\" in self.flags) {\n\t\t\tself.compoundRuleCodes[self.flags.ONLYINCOMPOUND] = [];\n\t\t}\n\t\t\n\t\tself.dictionaryTable = self._parseDIC(wordsData);\n\t\t\n\t\t// Get rid of any codes from the compound rule codes that are never used \n\t\t// (or that were special regex characters). Not especially necessary... \n\t\tfor (i in self.compoundRuleCodes) {\n\t\t\tif (self.compoundRuleCodes[i].length === 0) {\n\t\t\t\tdelete self.compoundRuleCodes[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Build the full regular expressions for each compound rule.\n\t\t// I have a feeling (but no confirmation yet) that this method of \n\t\t// testing for compound words is probably slow.\n\t\tfor (i = 0, _len = self.compoundRules.length; i < _len; i++) {\n\t\t\tvar ruleText = self.compoundRules[i];\n\t\t\t\n\t\t\tvar expressionText = \"\";\n\t\t\t\n\t\t\tfor (j = 0, _jlen = ruleText.length; j < _jlen; j++) {\n\t\t\t\tvar character = ruleText[j];\n\t\t\t\t\n\t\t\t\tif (character in self.compoundRuleCodes) {\n\t\t\t\t\texpressionText += \"(\" + self.compoundRuleCodes[character].join(\"|\") + \")\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\texpressionText += character;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tself.compoundRules[i] = new RegExp(expressionText, \"i\");\n\t\t}\n\t\t\n\t\tself.loaded = true;\n\t\t\n\t\tif (settings.asyncLoad && settings.loadedCallback) {\n\t\t\tsettings.loadedCallback(self);\n\t\t}\n\t}\n\t\n\treturn this;\n};\n\nTypo.prototype = {\n\t/**\n\t * Loads a Typo instance from a hash of all of the Typo properties.\n\t *\n\t * @param object obj A hash of Typo properties, probably gotten from a JSON.parse(JSON.stringify(typo_instance)).\n\t */\n\t\n\tload : function (obj) {\n\t\tfor (var i in obj) {\n\t\t\tif (obj.hasOwnProperty(i)) {\n\t\t\t\tthis[i] = obj[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn this;\n\t},\n\t\n\t/**\n\t * Read the contents of a file.\n\t * \n\t * @param {String} path The path (relative) to the file.\n\t * @param {String} [charset=\"ISO8859-1\"] The expected charset of the file\n\t * @param {Boolean} async If true, the file will be read asynchronously. For node.js this does nothing, all\n\t * files are read synchronously.\n\t * @returns {String} The file data if async is false, otherwise a promise object. If running node.js, the data is\n\t * always returned.\n\t */\n\t\n\t_readFile : function (path, charset, async) {\n\t\tcharset = charset || \"utf8\";\n\t\t\n\t\tif (typeof XMLHttpRequest !== 'undefined') {\n\t\t\tvar promise;\n\t\t\tvar req = new XMLHttpRequest();\n\t\t\treq.open(\"GET\", path, async);\n\t\t\t\n\t\t\tif (async) {\n\t\t\t\tpromise = new Promise(function(resolve, reject) {\n\t\t\t\t\treq.onload = function() {\n\t\t\t\t\t\tif (req.status === 200) {\n\t\t\t\t\t\t\tresolve(req.responseText);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\treject(req.statusText);\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t\n\t\t\t\t\treq.onerror = function() {\n\t\t\t\t\t\treject(req.statusText);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\n\t\t\tif (req.overrideMimeType)\n\t\t\t\treq.overrideMimeType(\"text/plain; charset=\" + charset);\n\t\t\n\t\t\treq.send(null);\n\t\t\t\n\t\t\treturn async ? promise : req.responseText;\n\t\t}\n\t\telse if (typeof require !== 'undefined') {\n\t\t\t// Node.js\n\t\t\tvar fs = require(\"fs\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\tif (fs.existsSync(path)) {\n\t\t\t\t\treturn fs.readFileSync(path, charset);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tconsole.log(\"Path \" + path + \" does not exist.\");\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.log(e);\n\t\t\t\treturn '';\n\t\t\t}\n\t\t}\n\t},\n\t\n\t/**\n\t * Parse the rules out from a .aff file.\n\t *\n\t * @param {String} data The contents of the affix file.\n\t * @returns object The rules from the file.\n\t */\n\t\n\t_parseAFF : function (data) {\n\t\tvar rules = {};\n\t\t\n\t\tvar line, subline, numEntries, lineParts;\n\t\tvar i, j, _len, _jlen;\n\t\t\n\t\tvar lines = data.split(/\\r?\\n/);\n\t\t\n\t\tfor (i = 0, _len = lines.length; i < _len; i++) {\n\t\t\t// Remove comment lines\n\t\t\tline = this._removeAffixComments(lines[i]);\n\t\t\tline = line.trim();\n\t\t\t\n\t\t\tif ( ! line ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tvar definitionParts = line.split(/\\s+/);\n\t\t\t\n\t\t\tvar ruleType = definitionParts[0];\n\t\t\t\n\t\t\tif (ruleType == \"PFX\" || ruleType == \"SFX\") {\n\t\t\t\tvar ruleCode = definitionParts[1];\n\t\t\t\tvar combineable = definitionParts[2];\n\t\t\t\tnumEntries = parseInt(definitionParts[3], 10);\n\t\t\t\t\n\t\t\t\tvar entries = [];\n\t\t\t\t\n\t\t\t\tfor (j = i + 1, _jlen = i + 1 + numEntries; j < _jlen; j++) {\n\t\t\t\t\tsubline = lines[j];\n\t\t\t\t\t\n\t\t\t\t\tlineParts = subline.split(/\\s+/);\n\t\t\t\t\tvar charactersToRemove = lineParts[2];\n\t\t\t\t\t\n\t\t\t\t\tvar additionParts = lineParts[3].split(\"/\");\n\t\t\t\t\t\n\t\t\t\t\tvar charactersToAdd = additionParts[0];\n\t\t\t\t\tif (charactersToAdd === \"0\") charactersToAdd = \"\";\n\t\t\t\t\t\n\t\t\t\t\tvar continuationClasses = this.parseRuleCodes(additionParts[1]);\n\t\t\t\t\t\n\t\t\t\t\tvar regexToMatch = lineParts[4];\n\t\t\t\t\t\n\t\t\t\t\tvar entry = {};\n\t\t\t\t\tentry.add = charactersToAdd;\n\t\t\t\t\t\n\t\t\t\t\tif (continuationClasses.length > 0) entry.continuationClasses = continuationClasses;\n\t\t\t\t\t\n\t\t\t\t\tif (regexToMatch !== \".\") {\n\t\t\t\t\t\tif (ruleType === \"SFX\") {\n\t\t\t\t\t\t\tentry.match = new RegExp(regexToMatch + \"$\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tentry.match = new RegExp(\"^\" + regexToMatch);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (charactersToRemove != \"0\") {\n\t\t\t\t\t\tif (ruleType === \"SFX\") {\n\t\t\t\t\t\t\tentry.remove = new RegExp(charactersToRemove + \"$\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tentry.remove = charactersToRemove;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tentries.push(entry);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\trules[ruleCode] = { \"type\" : ruleType, \"combineable\" : (combineable == \"Y\"), \"entries\" : entries };\n\t\t\t\t\n\t\t\t\ti += numEntries;\n\t\t\t}\n\t\t\telse if (ruleType === \"COMPOUNDRULE\") {\n\t\t\t\tnumEntries = parseInt(definitionParts[1], 10);\n\t\t\t\t\n\t\t\t\tfor (j = i + 1, _jlen = i + 1 + numEntries; j < _jlen; j++) {\n\t\t\t\t\tline = lines[j];\n\t\t\t\t\t\n\t\t\t\t\tlineParts = line.split(/\\s+/);\n\t\t\t\t\tthis.compoundRules.push(lineParts[1]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ti += numEntries;\n\t\t\t}\n\t\t\telse if (ruleType === \"REP\") {\n\t\t\t\tlineParts = line.split(/\\s+/);\n\t\t\t\t\n\t\t\t\tif (lineParts.length === 3) {\n\t\t\t\t\tthis.replacementTable.push([ lineParts[1], lineParts[2] ]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// ONLYINCOMPOUND\n\t\t\t\t// COMPOUNDMIN\n\t\t\t\t// FLAG\n\t\t\t\t// KEEPCASE\n\t\t\t\t// NEEDAFFIX\n\t\t\t\t\n\t\t\t\tthis.flags[ruleType] = definitionParts[1];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn rules;\n\t},\n\t\n\t/**\n\t * Removes comments.\n\t *\n\t * @param {String} data A line from an affix file.\n\t * @return {String} The cleaned-up line.\n\t */\n\t\n\t_removeAffixComments : function (line) {\n\t\t// This used to remove any string starting with '#' up to the end of the line,\n\t\t// but some COMPOUNDRULE definitions include '#' as part of the rule.\n\t\t// So, only remove lines that begin with a comment, optionally preceded by whitespace.\n\t\tif ( line.match( /^\\s*#/, \"\" ) ) {\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\treturn line;\n\t},\n\t\n\t/**\n\t * Parses the words out from the .dic file.\n\t *\n\t * @param {String} data The data from the dictionary file.\n\t * @returns object The lookup table containing all of the words and\n\t * word forms from the dictionary.\n\t */\n\t\n\t_parseDIC : function (data) {\n\t\tdata = this._removeDicComments(data);\n\t\t\n\t\tvar lines = data.split(/\\r?\\n/);\n\t\tvar dictionaryTable = {};\n\t\t\n\t\tfunction addWord(word, rules) {\n\t\t\t// Some dictionaries will list the same word multiple times with different rule sets.\n\t\t\tif (!dictionaryTable.hasOwnProperty(word)) {\n\t\t\t\tdictionaryTable[word] = null;\n\t\t\t}\n\t\t\t\n\t\t\tif (rules.length > 0) {\n\t\t\t\tif (dictionaryTable[word] === null) {\n\t\t\t\t\tdictionaryTable[word] = [];\n\t\t\t\t}\n\n\t\t\t\tdictionaryTable[word].push(rules);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// The first line is the number of words in the dictionary.\n\t\tfor (var i = 1, _len = lines.length; i < _len; i++) {\n\t\t\tvar line = lines[i];\n\t\t\t\n\t\t\tif (!line) {\n\t\t\t\t// Ignore empty lines.\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tvar parts = line.split(\"/\", 2);\n\t\t\t\n\t\t\tvar word = parts[0];\n\n\t\t\t// Now for each affix rule, generate that form of the word.\n\t\t\tif (parts.length > 1) {\n\t\t\t\tvar ruleCodesArray = this.parseRuleCodes(parts[1]);\n\t\t\t\t\n\t\t\t\t// Save the ruleCodes for compound word situations.\n\t\t\t\tif (!(\"NEEDAFFIX\" in this.flags) || ruleCodesArray.indexOf(this.flags.NEEDAFFIX) == -1) {\n\t\t\t\t\taddWord(word, ruleCodesArray);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (var j = 0, _jlen = ruleCodesArray.length; j < _jlen; j++) {\n\t\t\t\t\tvar code = ruleCodesArray[j];\n\t\t\t\t\t\n\t\t\t\t\tvar rule = this.rules[code];\n\t\t\t\t\t\n\t\t\t\t\tif (rule) {\n\t\t\t\t\t\tvar newWords = this._applyRule(word, rule);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (var ii = 0, _iilen = newWords.length; ii < _iilen; ii++) {\n\t\t\t\t\t\t\tvar newWord = newWords[ii];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\taddWord(newWord, []);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (rule.combineable) {\n\t\t\t\t\t\t\t\tfor (var k = j + 1; k < _jlen; k++) {\n\t\t\t\t\t\t\t\t\tvar combineCode = ruleCodesArray[k];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tvar combineRule = this.rules[combineCode];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (combineRule) {\n\t\t\t\t\t\t\t\t\t\tif (combineRule.combineable && (rule.type != combineRule.type)) {\n\t\t\t\t\t\t\t\t\t\t\tvar otherNewWords = this._applyRule(newWord, combineRule);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tfor (var iii = 0, _iiilen = otherNewWords.length; iii < _iiilen; iii++) {\n\t\t\t\t\t\t\t\t\t\t\t\tvar otherNewWord = otherNewWords[iii];\n\t\t\t\t\t\t\t\t\t\t\t\taddWord(otherNewWord, []);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (code in this.compoundRuleCodes) {\n\t\t\t\t\t\tthis.compoundRuleCodes[code].push(word);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\taddWord(word.trim(), []);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn dictionaryTable;\n\t},\n\t\n\t\n\t/**\n\t * Removes comment lines and then cleans up blank lines and trailing whitespace.\n\t *\n\t * @param {String} data The data from a .dic file.\n\t * @return {String} The cleaned-up data.\n\t */\n\t\n\t_removeDicComments : function (data) {\n\t\t// I can't find any official documentation on it, but at least the de_DE\n\t\t// dictionary uses tab-indented lines as comments.\n\t\t\n\t\t// Remove comments\n\t\tdata = data.replace(/^\\t.*$/mg, \"\");\n\t\t\n\t\treturn data;\n\t},\n\t\n\tparseRuleCodes : function (textCodes) {\n\t\tif (!textCodes) {\n\t\t\treturn [];\n\t\t}\n\t\telse if (!(\"FLAG\" in this.flags)) {\n\t\t\t// The flag symbols are single characters\n\t\t\treturn textCodes.split(\"\");\n\t\t}\n\t\telse if (this.flags.FLAG === \"long\") {\n\t\t\t// The flag symbols are two characters long.\n\t\t\tvar flags = [];\n\t\t\t\n\t\t\tfor (var i = 0, _len = textCodes.length; i < _len; i += 2) {\n\t\t\t\tflags.push(textCodes.substr(i, 2));\n\t\t\t}\n\t\t\t\n\t\t\treturn flags;\n\t\t}\n\t\telse if (this.flags.FLAG === \"num\") {\n\t\t\t// The flag symbols are a CSV list of numbers.\n\t\t\treturn textCodes.split(\",\");\n\t\t}\n\t\telse if (this.flags.FLAG === \"UTF-8\") {\n\t\t\t// The flags are single UTF-8 characters.\n\t\t\t// @see https://github.com/cfinke/Typo.js/issues/57\n\t\t\treturn Array.from(textCodes);\n\t\t}\n\t\telse {\n\t\t\t// It's possible that this fallback case will not work for all FLAG values,\n\t\t\t// but I think it's more likely to work than not returning anything at all.\n\t\t\treturn textCodes.split(\"\");\n\t\t}\n\t},\n\t\n\t/**\n\t * Applies an affix rule to a word.\n\t *\n\t * @param {String} word The base word.\n\t * @param {Object} rule The affix rule.\n\t * @returns {String[]} The new words generated by the rule.\n\t */\n\t\n\t_applyRule : function (word, rule) {\n\t\tvar entries = rule.entries;\n\t\tvar newWords = [];\n\t\t\n\t\tfor (var i = 0, _len = entries.length; i < _len; i++) {\n\t\t\tvar entry = entries[i];\n\t\t\t\n\t\t\tif (!entry.match || word.match(entry.match)) {\n\t\t\t\tvar newWord = word;\n\t\t\t\t\n\t\t\t\tif (entry.remove) {\n\t\t\t\t\tnewWord = newWord.replace(entry.remove, \"\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (rule.type === \"SFX\") {\n\t\t\t\t\tnewWord = newWord + entry.add;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewWord = entry.add + newWord;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tnewWords.push(newWord);\n\t\t\t\t\n\t\t\t\tif (\"continuationClasses\" in entry) {\n\t\t\t\t\tfor (var j = 0, _jlen = entry.continuationClasses.length; j < _jlen; j++) {\n\t\t\t\t\t\tvar continuationRule = this.rules[entry.continuationClasses[j]];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (continuationRule) {\n\t\t\t\t\t\t\tnewWords = newWords.concat(this._applyRule(newWord, continuationRule));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/*\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// This shouldn't happen, but it does, at least in the de_DE dictionary.\n\t\t\t\t\t\t\t// I think the author mistakenly supplied lower-case rule codes instead \n\t\t\t\t\t\t\t// of upper-case.\n\t\t\t\t\t\t}\n\t\t\t\t\t\t*/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn newWords;\n\t},\n\t\n\t/**\n\t * Checks whether a word or a capitalization variant exists in the current dictionary.\n\t * The word is trimmed and several variations of capitalizations are checked.\n\t * If you want to check a word without any changes made to it, call checkExact()\n\t *\n\t * @see http://blog.stevenlevithan.com/archives/faster-trim-javascript re:trimming function\n\t *\n\t * @param {String} aWord The word to check.\n\t * @returns {Boolean}\n\t */\n\t\n\tcheck : function (aWord) {\n\t\tif (!this.loaded) {\n\t\t\tthrow \"Dictionary not loaded.\";\n\t\t}\n\t\t\n\t\tif (!aWord) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Remove leading and trailing whitespace\n\t\tvar trimmedWord = aWord.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n\t\t\n\t\tif (this.checkExact(trimmedWord)) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// The exact word is not in the dictionary.\n\t\tif (trimmedWord.toUpperCase() === trimmedWord) {\n\t\t\t// The word was supplied in all uppercase.\n\t\t\t// Check for a capitalized form of the word.\n\t\t\tvar capitalizedWord = trimmedWord[0] + trimmedWord.substring(1).toLowerCase();\n\t\t\t\n\t\t\tif (this.hasFlag(capitalizedWord, \"KEEPCASE\")) {\n\t\t\t\t// Capitalization variants are not allowed for this word.\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\tif (this.checkExact(capitalizedWord)) {\n\t\t\t\t// The all-caps word is a capitalized word spelled correctly.\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (this.checkExact(trimmedWord.toLowerCase())) {\n\t\t\t\t// The all-caps is a lowercase word spelled correctly.\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar uncapitalizedWord = trimmedWord[0].toLowerCase() + trimmedWord.substring(1);\n\t\t\n\t\tif (uncapitalizedWord !== trimmedWord) {\n\t\t\tif (this.hasFlag(uncapitalizedWord, \"KEEPCASE\")) {\n\t\t\t\t// Capitalization variants are not allowed for this word.\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// Check for an uncapitalized form\n\t\t\tif (this.checkExact(uncapitalizedWord)) {\n\t\t\t\t// The word is spelled correctly but with the first letter capitalized.\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t},\n\t\n\t/**\n\t * Checks whether a word exists in the current dictionary.\n\t *\n\t * @param {String} word The word to check.\n\t * @returns {Boolean}\n\t */\n\t\n\tcheckExact : function (word) {\n\t\tif (!this.loaded) {\n\t\t\tthrow \"Dictionary not loaded.\";\n\t\t}\n\n\t\tvar ruleCodes = this.dictionaryTable[word];\n\t\t\n\t\tvar i, _len;\n\t\t\n\t\tif (typeof ruleCodes === 'undefined') {\n\t\t\t// Check if this might be a compound word.\n\t\t\tif (\"COMPOUNDMIN\" in this.flags && word.length >= this.flags.COMPOUNDMIN) {\n\t\t\t\tfor (i = 0, _len = this.compoundRules.length; i < _len; i++) {\n\t\t\t\t\tif (word.match(this.compoundRules[i])) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (ruleCodes === null) {\n\t\t\t// a null (but not undefined) value for an entry in the dictionary table\n\t\t\t// means that the word is in the dictionary but has no flags.\n\t\t\treturn true;\n\t\t}\n\t\telse if (typeof ruleCodes === 'object') { // this.dictionary['hasOwnProperty'] will be a function.\n\t\t\tfor (i = 0, _len = ruleCodes.length; i < _len; i++) {\n\t\t\t\tif (!this.hasFlag(word, \"ONLYINCOMPOUND\", ruleCodes[i])) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\t\n\t/**\n\t * Looks up whether a given word is flagged with a given flag.\n\t *\n\t * @param {String} word The word in question.\n\t * @param {String} flag The flag in question.\n\t * @return {Boolean}\n\t */\n\t \n\thasFlag : function (word, flag, wordFlags) {\n\t\tif (!this.loaded) {\n\t\t\tthrow \"Dictionary not loaded.\";\n\t\t}\n\n\t\tif (flag in this.flags) {\n\t\t\tif (typeof wordFlags === 'undefined') {\n\t\t\t\twordFlags = Array.prototype.concat.apply([], this.dictionaryTable[word]);\n\t\t\t}\n\t\t\t\n\t\t\tif (wordFlags && wordFlags.indexOf(this.flags[flag]) !== -1) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t},\n\t\n\t/**\n\t * Returns a list of suggestions for a misspelled word.\n\t *\n\t * @see http://www.norvig.com/spell-correct.html for the basis of this suggestor.\n\t * This suggestor is primitive, but it works.\n\t *\n\t * @param {String} word The misspelling.\n\t * @param {Number} [limit=5] The maximum number of suggestions to return.\n\t * @returns {String[]} The array of suggestions.\n\t */\n\t\n\talphabet : \"\",\n\t\n\tsuggest : function (word, limit) {\n\t\tif (!this.loaded) {\n\t\t\tthrow \"Dictionary not loaded.\";\n\t\t}\n\n\t\tlimit = limit || 5;\n\n\t\tif (this.memoized.hasOwnProperty(word)) {\n\t\t\tvar memoizedLimit = this.memoized[word]['limit'];\n\n\t\t\t// Only return the cached list if it's big enough or if there weren't enough suggestions\n\t\t\t// to fill a smaller limit.\n\t\t\tif (limit <= memoizedLimit || this.memoized[word]['suggestions'].length < memoizedLimit) {\n\t\t\t\treturn this.memoized[word]['suggestions'].slice(0, limit);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (this.check(word)) return [];\n\t\t\n\t\t// Check the replacement table.\n\t\tfor (var i = 0, _len = this.replacementTable.length; i < _len; i++) {\n\t\t\tvar replacementEntry = this.replacementTable[i];\n\t\t\t\n\t\t\tif (word.indexOf(replacementEntry[0]) !== -1) {\n\t\t\t\tvar correctedWord = word.replace(replacementEntry[0], replacementEntry[1]);\n\t\t\t\t\n\t\t\t\tif (this.check(correctedWord)) {\n\t\t\t\t\treturn [ correctedWord ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!this.alphabet) {\n\t\t\t// Use the English alphabet as the default. Problematic, but backwards-compatible.\n\t\t\tthis.alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t\t\n\t\t\t// Any characters defined in the affix file as substitutions can go in the alphabet too.\n\t\t\t// Note that dictionaries do not include the entire alphabet in the TRY flag when it's there.\n\t\t\t// For example, Q is not in the default English TRY list; that's why having the default\n\t\t\t// alphabet above is useful.\n\t\t\tif ( 'TRY' in this.flags ) {\n\t\t\t\tthis.alphabet += this.flags['TRY'];\n\t\t\t}\n\t\t\t\n\t\t\t// Plus any additional characters specifically defined as being allowed in words.\n\t\t\tif ( 'WORDCHARS' in this.flags ) {\n\t\t\t\tthis.alphabet += this.flags['WORDCHARS'];\n\t\t\t}\n\t\t\t\n\t\t\t// Remove any duplicates.\n\t\t\tvar alphaArray = this.alphabet.split(\"\");\n\t\t\talphaArray.sort();\n\n\t\t\tvar alphaHash = {};\n\t\t\tfor ( var i = 0; i < alphaArray.length; i++ ) {\n\t\t\t\talphaHash[ alphaArray[i] ] = true;\n\t\t\t}\n\t\t\t\n\t\t\tthis.alphabet = '';\n\t\t\t\n\t\t\tfor ( var i in alphaHash ) {\n\t\t\t\tthis.alphabet += i;\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar self = this;\n\n\t\t/**\n\t\t * Returns a hash keyed by all of the strings that can be made by making a single edit to the word (or words in) `words`\n\t\t * The value of each entry is the number of unique ways that the resulting word can be made.\n\t\t *\n\t\t * @arg mixed words Either a hash keyed by words or a string word to operate on.\n\t\t * @arg bool known_only Whether this function should ignore strings that are not in the dictionary.\n\t\t */\n\t\tfunction edits1(words, known_only) {\n\t\t\tvar rv = {};\n\t\t\t\n\t\t\tvar i, j, _iilen, _len, _jlen, _edit;\n\n\t\t\tvar alphabetLength = self.alphabet.length;\n\t\t\t\n\t\t\tif (typeof words == 'string') {\n\t\t\t\tvar word = words;\n\t\t\t\twords = {};\n\t\t\t\twords[word] = true;\n\t\t\t}\n\n\t\t\tfor (var word in words) {\n\t\t\t\tfor (i = 0, _len = word.length + 1; i < _len; i++) {\n\t\t\t\t\tvar s = [ word.substring(0, i), word.substring(i) ];\n\t\t\t\t\n\t\t\t\t\t// Remove a letter.\n\t\t\t\t\tif (s[1]) {\n\t\t\t\t\t\t_edit = s[0] + s[1].substring(1);\n\n\t\t\t\t\t\tif (!known_only || self.check(_edit)) {\n\t\t\t\t\t\t\tif (!(_edit in rv)) {\n\t\t\t\t\t\t\t\trv[_edit] = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\trv[_edit] += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Transpose letters\n\t\t\t\t\t// Eliminate transpositions of identical letters\n\t\t\t\t\tif (s[1].length > 1 && s[1][1] !== s[1][0]) {\n\t\t\t\t\t\t_edit = s[0] + s[1][1] + s[1][0] + s[1].substring(2);\n\n\t\t\t\t\t\tif (!known_only || self.check(_edit)) {\n\t\t\t\t\t\t\tif (!(_edit in rv)) {\n\t\t\t\t\t\t\t\trv[_edit] = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\trv[_edit] += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (s[1]) {\n\t\t\t\t\t\t// Replace a letter with another letter.\n\n\t\t\t\t\t\tvar lettercase = (s[1].substring(0,1).toUpperCase() === s[1].substring(0,1)) ? 'uppercase' : 'lowercase';\n\n\t\t\t\t\t\tfor (j = 0; j < alphabetLength; j++) {\n\t\t\t\t\t\t\tvar replacementLetter = self.alphabet[j];\n\n\t\t\t\t\t\t\t// Set the case of the replacement letter to the same as the letter being replaced.\n\t\t\t\t\t\t\tif ( 'uppercase' === lettercase ) {\n\t\t\t\t\t\t\t\treplacementLetter = replacementLetter.toUpperCase();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Eliminate replacement of a letter by itself\n\t\t\t\t\t\t\tif (replacementLetter != s[1].substring(0,1)){\n\t\t\t\t\t\t\t\t_edit = s[0] + replacementLetter + s[1].substring(1);\n\n\t\t\t\t\t\t\t\tif (!known_only || self.check(_edit)) {\n\t\t\t\t\t\t\t\t\tif (!(_edit in rv)) {\n\t\t\t\t\t\t\t\t\t\trv[_edit] = 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\trv[_edit] += 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (s[1]) {\n\t\t\t\t\t\t// Add a letter between each letter.\n\t\t\t\t\t\tfor (j = 0; j < alphabetLength; j++) {\n\t\t\t\t\t\t\t// If the letters on each side are capitalized, capitalize the replacement.\n\t\t\t\t\t\t\tvar lettercase = (s[0].substring(-1).toUpperCase() === s[0].substring(-1) && s[1].substring(0,1).toUpperCase() === s[1].substring(0,1)) ? 'uppercase' : 'lowercase';\n\n\t\t\t\t\t\t\tvar replacementLetter = self.alphabet[j];\n\n\t\t\t\t\t\t\tif ( 'uppercase' === lettercase ) {\n\t\t\t\t\t\t\t\treplacementLetter = replacementLetter.toUpperCase();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t_edit = s[0] + replacementLetter + s[1];\n\n\t\t\t\t\t\t\tif (!known_only || self.check(_edit)) {\n\t\t\t\t\t\t\t\tif (!(_edit in rv)) {\n\t\t\t\t\t\t\t\t\trv[_edit] = 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\trv[_edit] += 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn rv;\n\t\t}\n\n\t\tfunction correct(word) {\n\t\t\t// Get the edit-distance-1 and edit-distance-2 forms of this word.\n\t\t\tvar ed1 = edits1(word);\n\t\t\tvar ed2 = edits1(ed1, true);\n\t\t\t\n\t\t\t// Sort the edits based on how many different ways they were created.\n\t\t\tvar weighted_corrections = ed2;\n\t\t\t\n\t\t\tfor (var ed1word in ed1) {\n\t\t\t\tif (!self.check(ed1word)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (ed1word in weighted_corrections) {\n\t\t\t\t\tweighted_corrections[ed1word] += ed1[ed1word];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tweighted_corrections[ed1word] = ed1[ed1word];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tvar i, _len;\n\n\t\t\tvar sorted_corrections = [];\n\t\t\t\n\t\t\tfor (i in weighted_corrections) {\n\t\t\t\tif (weighted_corrections.hasOwnProperty(i)) {\n\t\t\t\t\tsorted_corrections.push([ i, weighted_corrections[i] ]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction sorter(a, b) {\n\t\t\t\tvar a_val = a[1];\n\t\t\t\tvar b_val = b[1];\n\t\t\t\tif (a_val < b_val) {\n\t\t\t\t\treturn -1;\n\t\t\t\t} else if (a_val > b_val) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\t// @todo If a and b are equally weighted, add our own weight based on something like the key locations on this language's default keyboard.\n\t\t\t\treturn b[0].localeCompare(a[0]);\n\t\t\t}\n\t\t\t\n\t\t\tsorted_corrections.sort(sorter).reverse();\n\n\t\t\tvar rv = [];\n\n\t\t\tvar capitalization_scheme = \"lowercase\";\n\t\t\t\n\t\t\tif (word.toUpperCase() === word) {\n\t\t\t\tcapitalization_scheme = \"uppercase\";\n\t\t\t}\n\t\t\telse if (word.substr(0, 1).toUpperCase() + word.substr(1).toLowerCase() === word) {\n\t\t\t\tcapitalization_scheme = \"capitalized\";\n\t\t\t}\n\t\t\t\n\t\t\tvar working_limit = limit;\n\n\t\t\tfor (i = 0; i < Math.min(working_limit, sorted_corrections.length); i++) {\n\t\t\t\tif (\"uppercase\" === capitalization_scheme) {\n\t\t\t\t\tsorted_corrections[i][0] = sorted_corrections[i][0].toUpperCase();\n\t\t\t\t}\n\t\t\t\telse if (\"capitalized\" === capitalization_scheme) {\n\t\t\t\t\tsorted_corrections[i][0] = sorted_corrections[i][0].substr(0, 1).toUpperCase() + sorted_corrections[i][0].substr(1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!self.hasFlag(sorted_corrections[i][0], \"NOSUGGEST\") && rv.indexOf(sorted_corrections[i][0]) == -1) {\n\t\t\t\t\trv.push(sorted_corrections[i][0]);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// If one of the corrections is not eligible as a suggestion , make sure we still return the right number of suggestions.\n\t\t\t\t\tworking_limit++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn rv;\n\t\t}\n\t\t\n\t\tthis.memoized[word] = {\n\t\t\t'suggestions': correct(word),\n\t\t\t'limit': limit\n\t\t};\n\n\t\treturn this.memoized[word]['suggestions'];\n\t}\n};\n})();\n\n// Support for use as a node.js module.\nif (typeof module !== 'undefined') {\n\tmodule.exports = Typo;\n}\n","/**\n * marked v4.3.0 - a markdown parser\n * Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/markedjs/marked\n */\n\n/**\n * DO NOT EDIT THIS FILE\n * The code in this file is generated from files in ./src/\n */\n\n'use strict';\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (it) return (it = it.call(o)).next.bind(it);\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n return function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n return typeof key === \"symbol\" ? key : String(key);\n}\n\nfunction getDefaults() {\n return {\n async: false,\n baseUrl: null,\n breaks: false,\n extensions: null,\n gfm: true,\n headerIds: true,\n headerPrefix: '',\n highlight: null,\n hooks: null,\n langPrefix: 'language-',\n mangle: true,\n pedantic: false,\n renderer: null,\n sanitize: false,\n sanitizer: null,\n silent: false,\n smartypants: false,\n tokenizer: null,\n walkTokens: null,\n xhtml: false\n };\n}\nexports.defaults = getDefaults();\nfunction changeDefaults(newDefaults) {\n exports.defaults = newDefaults;\n}\n\n/**\n * Helpers\n */\nvar escapeTest = /[&<>\"']/;\nvar escapeReplace = new RegExp(escapeTest.source, 'g');\nvar escapeTestNoEncode = /[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/;\nvar escapeReplaceNoEncode = new RegExp(escapeTestNoEncode.source, 'g');\nvar escapeReplacements = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n};\nvar getEscapeReplacement = function getEscapeReplacement(ch) {\n return escapeReplacements[ch];\n};\nfunction escape(html, encode) {\n if (encode) {\n if (escapeTest.test(html)) {\n return html.replace(escapeReplace, getEscapeReplacement);\n }\n } else {\n if (escapeTestNoEncode.test(html)) {\n return html.replace(escapeReplaceNoEncode, getEscapeReplacement);\n }\n }\n return html;\n}\nvar unescapeTest = /&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig;\n\n/**\n * @param {string} html\n */\nfunction unescape(html) {\n // explicitly match decimal, hex, and named HTML entities\n return html.replace(unescapeTest, function (_, n) {\n n = n.toLowerCase();\n if (n === 'colon') return ':';\n if (n.charAt(0) === '#') {\n return n.charAt(1) === 'x' ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1));\n }\n return '';\n });\n}\nvar caret = /(^|[^\\[])\\^/g;\n\n/**\n * @param {string | RegExp} regex\n * @param {string} opt\n */\nfunction edit(regex, opt) {\n regex = typeof regex === 'string' ? regex : regex.source;\n opt = opt || '';\n var obj = {\n replace: function replace(name, val) {\n val = val.source || val;\n val = val.replace(caret, '$1');\n regex = regex.replace(name, val);\n return obj;\n },\n getRegex: function getRegex() {\n return new RegExp(regex, opt);\n }\n };\n return obj;\n}\nvar nonWordAndColonTest = /[^\\w:]/g;\nvar originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;\n\n/**\n * @param {boolean} sanitize\n * @param {string} base\n * @param {string} href\n */\nfunction cleanUrl(sanitize, base, href) {\n if (sanitize) {\n var prot;\n try {\n prot = decodeURIComponent(unescape(href)).replace(nonWordAndColonTest, '').toLowerCase();\n } catch (e) {\n return null;\n }\n if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) {\n return null;\n }\n }\n if (base && !originIndependentUrl.test(href)) {\n href = resolveUrl(base, href);\n }\n try {\n href = encodeURI(href).replace(/%25/g, '%');\n } catch (e) {\n return null;\n }\n return href;\n}\nvar baseUrls = {};\nvar justDomain = /^[^:]+:\\/*[^/]*$/;\nvar protocol = /^([^:]+:)[\\s\\S]*$/;\nvar domain = /^([^:]+:\\/*[^/]*)[\\s\\S]*$/;\n\n/**\n * @param {string} base\n * @param {string} href\n */\nfunction resolveUrl(base, href) {\n if (!baseUrls[' ' + base]) {\n // we can ignore everything in base after the last slash of its path component,\n // but we might need to add _that_\n // https://tools.ietf.org/html/rfc3986#section-3\n if (justDomain.test(base)) {\n baseUrls[' ' + base] = base + '/';\n } else {\n baseUrls[' ' + base] = rtrim(base, '/', true);\n }\n }\n base = baseUrls[' ' + base];\n var relativeBase = base.indexOf(':') === -1;\n if (href.substring(0, 2) === '//') {\n if (relativeBase) {\n return href;\n }\n return base.replace(protocol, '$1') + href;\n } else if (href.charAt(0) === '/') {\n if (relativeBase) {\n return href;\n }\n return base.replace(domain, '$1') + href;\n } else {\n return base + href;\n }\n}\nvar noopTest = {\n exec: function noopTest() {}\n};\nfunction splitCells(tableRow, count) {\n // ensure that every cell-delimiting pipe has a space\n // before it to distinguish it from an escaped pipe\n var row = tableRow.replace(/\\|/g, function (match, offset, str) {\n var escaped = false,\n curr = offset;\n while (--curr >= 0 && str[curr] === '\\\\') {\n escaped = !escaped;\n }\n if (escaped) {\n // odd number of slashes means | is escaped\n // so we leave it alone\n return '|';\n } else {\n // add space before unescaped |\n return ' |';\n }\n }),\n cells = row.split(/ \\|/);\n var i = 0;\n\n // First/last cell in a row cannot be empty if it has no leading/trailing pipe\n if (!cells[0].trim()) {\n cells.shift();\n }\n if (cells.length > 0 && !cells[cells.length - 1].trim()) {\n cells.pop();\n }\n if (cells.length > count) {\n cells.splice(count);\n } else {\n while (cells.length < count) {\n cells.push('');\n }\n }\n for (; i < cells.length; i++) {\n // leading or trailing whitespace is ignored per the gfm spec\n cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n }\n return cells;\n}\n\n/**\n * Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n * /c*$/ is vulnerable to REDOS.\n *\n * @param {string} str\n * @param {string} c\n * @param {boolean} invert Remove suffix of non-c chars instead. Default falsey.\n */\nfunction rtrim(str, c, invert) {\n var l = str.length;\n if (l === 0) {\n return '';\n }\n\n // Length of suffix matching the invert condition.\n var suffLen = 0;\n\n // Step left until we fail to match the invert condition.\n while (suffLen < l) {\n var currChar = str.charAt(l - suffLen - 1);\n if (currChar === c && !invert) {\n suffLen++;\n } else if (currChar !== c && invert) {\n suffLen++;\n } else {\n break;\n }\n }\n return str.slice(0, l - suffLen);\n}\nfunction findClosingBracket(str, b) {\n if (str.indexOf(b[1]) === -1) {\n return -1;\n }\n var l = str.length;\n var level = 0,\n i = 0;\n for (; i < l; i++) {\n if (str[i] === '\\\\') {\n i++;\n } else if (str[i] === b[0]) {\n level++;\n } else if (str[i] === b[1]) {\n level--;\n if (level < 0) {\n return i;\n }\n }\n }\n return -1;\n}\nfunction checkSanitizeDeprecation(opt) {\n if (opt && opt.sanitize && !opt.silent) {\n console.warn('marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options');\n }\n}\n\n// copied from https://stackoverflow.com/a/5450113/806777\n/**\n * @param {string} pattern\n * @param {number} count\n */\nfunction repeatString(pattern, count) {\n if (count < 1) {\n return '';\n }\n var result = '';\n while (count > 1) {\n if (count & 1) {\n result += pattern;\n }\n count >>= 1;\n pattern += pattern;\n }\n return result + pattern;\n}\n\nfunction outputLink(cap, link, raw, lexer) {\n var href = link.href;\n var title = link.title ? escape(link.title) : null;\n var text = cap[1].replace(/\\\\([\\[\\]])/g, '$1');\n if (cap[0].charAt(0) !== '!') {\n lexer.state.inLink = true;\n var token = {\n type: 'link',\n raw: raw,\n href: href,\n title: title,\n text: text,\n tokens: lexer.inlineTokens(text)\n };\n lexer.state.inLink = false;\n return token;\n }\n return {\n type: 'image',\n raw: raw,\n href: href,\n title: title,\n text: escape(text)\n };\n}\nfunction indentCodeCompensation(raw, text) {\n var matchIndentToCode = raw.match(/^(\\s+)(?:```)/);\n if (matchIndentToCode === null) {\n return text;\n }\n var indentToCode = matchIndentToCode[1];\n return text.split('\\n').map(function (node) {\n var matchIndentInNode = node.match(/^\\s+/);\n if (matchIndentInNode === null) {\n return node;\n }\n var indentInNode = matchIndentInNode[0];\n if (indentInNode.length >= indentToCode.length) {\n return node.slice(indentToCode.length);\n }\n return node;\n }).join('\\n');\n}\n\n/**\n * Tokenizer\n */\nvar Tokenizer = /*#__PURE__*/function () {\n function Tokenizer(options) {\n this.options = options || exports.defaults;\n }\n var _proto = Tokenizer.prototype;\n _proto.space = function space(src) {\n var cap = this.rules.block.newline.exec(src);\n if (cap && cap[0].length > 0) {\n return {\n type: 'space',\n raw: cap[0]\n };\n }\n };\n _proto.code = function code(src) {\n var cap = this.rules.block.code.exec(src);\n if (cap) {\n var text = cap[0].replace(/^ {1,4}/gm, '');\n return {\n type: 'code',\n raw: cap[0],\n codeBlockStyle: 'indented',\n text: !this.options.pedantic ? rtrim(text, '\\n') : text\n };\n }\n };\n _proto.fences = function fences(src) {\n var cap = this.rules.block.fences.exec(src);\n if (cap) {\n var raw = cap[0];\n var text = indentCodeCompensation(raw, cap[3] || '');\n return {\n type: 'code',\n raw: raw,\n lang: cap[2] ? cap[2].trim().replace(this.rules.inline._escapes, '$1') : cap[2],\n text: text\n };\n }\n };\n _proto.heading = function heading(src) {\n var cap = this.rules.block.heading.exec(src);\n if (cap) {\n var text = cap[2].trim();\n\n // remove trailing #s\n if (/#$/.test(text)) {\n var trimmed = rtrim(text, '#');\n if (this.options.pedantic) {\n text = trimmed.trim();\n } else if (!trimmed || / $/.test(trimmed)) {\n // CommonMark requires space before trailing #s\n text = trimmed.trim();\n }\n }\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[1].length,\n text: text,\n tokens: this.lexer.inline(text)\n };\n }\n };\n _proto.hr = function hr(src) {\n var cap = this.rules.block.hr.exec(src);\n if (cap) {\n return {\n type: 'hr',\n raw: cap[0]\n };\n }\n };\n _proto.blockquote = function blockquote(src) {\n var cap = this.rules.block.blockquote.exec(src);\n if (cap) {\n var text = cap[0].replace(/^ *>[ \\t]?/gm, '');\n var top = this.lexer.state.top;\n this.lexer.state.top = true;\n var tokens = this.lexer.blockTokens(text);\n this.lexer.state.top = top;\n return {\n type: 'blockquote',\n raw: cap[0],\n tokens: tokens,\n text: text\n };\n }\n };\n _proto.list = function list(src) {\n var cap = this.rules.block.list.exec(src);\n if (cap) {\n var raw, istask, ischecked, indent, i, blankLine, endsWithBlankLine, line, nextLine, rawLine, itemContents, endEarly;\n var bull = cap[1].trim();\n var isordered = bull.length > 1;\n var list = {\n type: 'list',\n raw: '',\n ordered: isordered,\n start: isordered ? +bull.slice(0, -1) : '',\n loose: false,\n items: []\n };\n bull = isordered ? \"\\\\d{1,9}\\\\\" + bull.slice(-1) : \"\\\\\" + bull;\n if (this.options.pedantic) {\n bull = isordered ? bull : '[*+-]';\n }\n\n // Get next list item\n var itemRegex = new RegExp(\"^( {0,3}\" + bull + \")((?:[\\t ][^\\\\n]*)?(?:\\\\n|$))\");\n\n // Check if current bullet point can start a new List Item\n while (src) {\n endEarly = false;\n if (!(cap = itemRegex.exec(src))) {\n break;\n }\n if (this.rules.block.hr.test(src)) {\n // End list if bullet was actually HR (possibly move into itemRegex?)\n break;\n }\n raw = cap[0];\n src = src.substring(raw.length);\n line = cap[2].split('\\n', 1)[0].replace(/^\\t+/, function (t) {\n return ' '.repeat(3 * t.length);\n });\n nextLine = src.split('\\n', 1)[0];\n if (this.options.pedantic) {\n indent = 2;\n itemContents = line.trimLeft();\n } else {\n indent = cap[2].search(/[^ ]/); // Find first non-space char\n indent = indent > 4 ? 1 : indent; // Treat indented code blocks (> 4 spaces) as having only 1 indent\n itemContents = line.slice(indent);\n indent += cap[1].length;\n }\n blankLine = false;\n if (!line && /^ *$/.test(nextLine)) {\n // Items begin with at most one blank line\n raw += nextLine + '\\n';\n src = src.substring(nextLine.length + 1);\n endEarly = true;\n }\n if (!endEarly) {\n var nextBulletRegex = new RegExp(\"^ {0,\" + Math.min(3, indent - 1) + \"}(?:[*+-]|\\\\d{1,9}[.)])((?:[ \\t][^\\\\n]*)?(?:\\\\n|$))\");\n var hrRegex = new RegExp(\"^ {0,\" + Math.min(3, indent - 1) + \"}((?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$)\");\n var fencesBeginRegex = new RegExp(\"^ {0,\" + Math.min(3, indent - 1) + \"}(?:```|~~~)\");\n var headingBeginRegex = new RegExp(\"^ {0,\" + Math.min(3, indent - 1) + \"}#\");\n\n // Check if following lines should be included in List Item\n while (src) {\n rawLine = src.split('\\n', 1)[0];\n nextLine = rawLine;\n\n // Re-align to follow commonmark nesting rules\n if (this.options.pedantic) {\n nextLine = nextLine.replace(/^ {1,4}(?=( {4})*[^ ])/g, ' ');\n }\n\n // End list item if found code fences\n if (fencesBeginRegex.test(nextLine)) {\n break;\n }\n\n // End list item if found start of new heading\n if (headingBeginRegex.test(nextLine)) {\n break;\n }\n\n // End list item if found start of new bullet\n if (nextBulletRegex.test(nextLine)) {\n break;\n }\n\n // Horizontal rule found\n if (hrRegex.test(src)) {\n break;\n }\n if (nextLine.search(/[^ ]/) >= indent || !nextLine.trim()) {\n // Dedent if possible\n itemContents += '\\n' + nextLine.slice(indent);\n } else {\n // not enough indentation\n if (blankLine) {\n break;\n }\n\n // paragraph continuation unless last line was a different block level element\n if (line.search(/[^ ]/) >= 4) {\n // indented code block\n break;\n }\n if (fencesBeginRegex.test(line)) {\n break;\n }\n if (headingBeginRegex.test(line)) {\n break;\n }\n if (hrRegex.test(line)) {\n break;\n }\n itemContents += '\\n' + nextLine;\n }\n if (!blankLine && !nextLine.trim()) {\n // Check if current line is blank\n blankLine = true;\n }\n raw += rawLine + '\\n';\n src = src.substring(rawLine.length + 1);\n line = nextLine.slice(indent);\n }\n }\n if (!list.loose) {\n // If the previous item ended with a blank line, the list is loose\n if (endsWithBlankLine) {\n list.loose = true;\n } else if (/\\n *\\n *$/.test(raw)) {\n endsWithBlankLine = true;\n }\n }\n\n // Check for task list items\n if (this.options.gfm) {\n istask = /^\\[[ xX]\\] /.exec(itemContents);\n if (istask) {\n ischecked = istask[0] !== '[ ] ';\n itemContents = itemContents.replace(/^\\[[ xX]\\] +/, '');\n }\n }\n list.items.push({\n type: 'list_item',\n raw: raw,\n task: !!istask,\n checked: ischecked,\n loose: false,\n text: itemContents\n });\n list.raw += raw;\n }\n\n // Do not consume newlines at end of final item. Alternatively, make itemRegex *start* with any newlines to simplify/speed up endsWithBlankLine logic\n list.items[list.items.length - 1].raw = raw.trimRight();\n list.items[list.items.length - 1].text = itemContents.trimRight();\n list.raw = list.raw.trimRight();\n var l = list.items.length;\n\n // Item child tokens handled here at end because we needed to have the final item to trim it first\n for (i = 0; i < l; i++) {\n this.lexer.state.top = false;\n list.items[i].tokens = this.lexer.blockTokens(list.items[i].text, []);\n if (!list.loose) {\n // Check if list should be loose\n var spacers = list.items[i].tokens.filter(function (t) {\n return t.type === 'space';\n });\n var hasMultipleLineBreaks = spacers.length > 0 && spacers.some(function (t) {\n return /\\n.*\\n/.test(t.raw);\n });\n list.loose = hasMultipleLineBreaks;\n }\n }\n\n // Set all items to loose if list is loose\n if (list.loose) {\n for (i = 0; i < l; i++) {\n list.items[i].loose = true;\n }\n }\n return list;\n }\n };\n _proto.html = function html(src) {\n var cap = this.rules.block.html.exec(src);\n if (cap) {\n var token = {\n type: 'html',\n raw: cap[0],\n pre: !this.options.sanitizer && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),\n text: cap[0]\n };\n if (this.options.sanitize) {\n var text = this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]);\n token.type = 'paragraph';\n token.text = text;\n token.tokens = this.lexer.inline(text);\n }\n return token;\n }\n };\n _proto.def = function def(src) {\n var cap = this.rules.block.def.exec(src);\n if (cap) {\n var tag = cap[1].toLowerCase().replace(/\\s+/g, ' ');\n var href = cap[2] ? cap[2].replace(/^<(.*)>$/, '$1').replace(this.rules.inline._escapes, '$1') : '';\n var title = cap[3] ? cap[3].substring(1, cap[3].length - 1).replace(this.rules.inline._escapes, '$1') : cap[3];\n return {\n type: 'def',\n tag: tag,\n raw: cap[0],\n href: href,\n title: title\n };\n }\n };\n _proto.table = function table(src) {\n var cap = this.rules.block.table.exec(src);\n if (cap) {\n var item = {\n type: 'table',\n header: splitCells(cap[1]).map(function (c) {\n return {\n text: c\n };\n }),\n align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n rows: cap[3] && cap[3].trim() ? cap[3].replace(/\\n[ \\t]*$/, '').split('\\n') : []\n };\n if (item.header.length === item.align.length) {\n item.raw = cap[0];\n var l = item.align.length;\n var i, j, k, row;\n for (i = 0; i < l; i++) {\n if (/^ *-+: *$/.test(item.align[i])) {\n item.align[i] = 'right';\n } else if (/^ *:-+: *$/.test(item.align[i])) {\n item.align[i] = 'center';\n } else if (/^ *:-+ *$/.test(item.align[i])) {\n item.align[i] = 'left';\n } else {\n item.align[i] = null;\n }\n }\n l = item.rows.length;\n for (i = 0; i < l; i++) {\n item.rows[i] = splitCells(item.rows[i], item.header.length).map(function (c) {\n return {\n text: c\n };\n });\n }\n\n // parse child tokens inside headers and cells\n\n // header child tokens\n l = item.header.length;\n for (j = 0; j < l; j++) {\n item.header[j].tokens = this.lexer.inline(item.header[j].text);\n }\n\n // cell child tokens\n l = item.rows.length;\n for (j = 0; j < l; j++) {\n row = item.rows[j];\n for (k = 0; k < row.length; k++) {\n row[k].tokens = this.lexer.inline(row[k].text);\n }\n }\n return item;\n }\n }\n };\n _proto.lheading = function lheading(src) {\n var cap = this.rules.block.lheading.exec(src);\n if (cap) {\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[2].charAt(0) === '=' ? 1 : 2,\n text: cap[1],\n tokens: this.lexer.inline(cap[1])\n };\n }\n };\n _proto.paragraph = function paragraph(src) {\n var cap = this.rules.block.paragraph.exec(src);\n if (cap) {\n var text = cap[1].charAt(cap[1].length - 1) === '\\n' ? cap[1].slice(0, -1) : cap[1];\n return {\n type: 'paragraph',\n raw: cap[0],\n text: text,\n tokens: this.lexer.inline(text)\n };\n }\n };\n _proto.text = function text(src) {\n var cap = this.rules.block.text.exec(src);\n if (cap) {\n return {\n type: 'text',\n raw: cap[0],\n text: cap[0],\n tokens: this.lexer.inline(cap[0])\n };\n }\n };\n _proto.escape = function escape$1(src) {\n var cap = this.rules.inline.escape.exec(src);\n if (cap) {\n return {\n type: 'escape',\n raw: cap[0],\n text: escape(cap[1])\n };\n }\n };\n _proto.tag = function tag(src) {\n var cap = this.rules.inline.tag.exec(src);\n if (cap) {\n if (!this.lexer.state.inLink && /^/i.test(cap[0])) {\n this.lexer.state.inLink = false;\n }\n if (!this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n this.lexer.state.inRawBlock = true;\n } else if (this.lexer.state.inRawBlock && /^<\\/(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n this.lexer.state.inRawBlock = false;\n }\n return {\n type: this.options.sanitize ? 'text' : 'html',\n raw: cap[0],\n inLink: this.lexer.state.inLink,\n inRawBlock: this.lexer.state.inRawBlock,\n text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]) : cap[0]\n };\n }\n };\n _proto.link = function link(src) {\n var cap = this.rules.inline.link.exec(src);\n if (cap) {\n var trimmedUrl = cap[2].trim();\n if (!this.options.pedantic && /^$/.test(trimmedUrl)) {\n return;\n }\n\n // ending angle bracket cannot be escaped\n var rtrimSlash = rtrim(trimmedUrl.slice(0, -1), '\\\\');\n if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {\n return;\n }\n } else {\n // find closing parenthesis\n var lastParenIndex = findClosingBracket(cap[2], '()');\n if (lastParenIndex > -1) {\n var start = cap[0].indexOf('!') === 0 ? 5 : 4;\n var linkLen = start + cap[1].length + lastParenIndex;\n cap[2] = cap[2].substring(0, lastParenIndex);\n cap[0] = cap[0].substring(0, linkLen).trim();\n cap[3] = '';\n }\n }\n var href = cap[2];\n var title = '';\n if (this.options.pedantic) {\n // split pedantic href and title\n var link = /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(href);\n if (link) {\n href = link[1];\n title = link[3];\n }\n } else {\n title = cap[3] ? cap[3].slice(1, -1) : '';\n }\n href = href.trim();\n if (/^$/.test(trimmedUrl)) {\n // pedantic allows starting angle bracket without ending angle bracket\n href = href.slice(1);\n } else {\n href = href.slice(1, -1);\n }\n }\n return outputLink(cap, {\n href: href ? href.replace(this.rules.inline._escapes, '$1') : href,\n title: title ? title.replace(this.rules.inline._escapes, '$1') : title\n }, cap[0], this.lexer);\n }\n };\n _proto.reflink = function reflink(src, links) {\n var cap;\n if ((cap = this.rules.inline.reflink.exec(src)) || (cap = this.rules.inline.nolink.exec(src))) {\n var link = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n link = links[link.toLowerCase()];\n if (!link) {\n var text = cap[0].charAt(0);\n return {\n type: 'text',\n raw: text,\n text: text\n };\n }\n return outputLink(cap, link, cap[0], this.lexer);\n }\n };\n _proto.emStrong = function emStrong(src, maskedSrc, prevChar) {\n if (prevChar === void 0) {\n prevChar = '';\n }\n var match = this.rules.inline.emStrong.lDelim.exec(src);\n if (!match) return;\n\n // _ can't be between two alphanumerics. \\p{L}\\p{N} includes non-english alphabet/numbers as well\n if (match[3] && prevChar.match(/(?:[0-9A-Za-z\\xAA\\xB2\\xB3\\xB5\\xB9\\xBA\\xBC-\\xBE\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u0660-\\u0669\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07C0-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0966-\\u096F\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09E6-\\u09F1\\u09F4-\\u09F9\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A6F\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AE6-\\u0AEF\\u0AF9\\u0B05-\\u0B0C\\u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\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u1090-\\u1099\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1369-\\u137C\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u17E0-\\u17E9\\u17F0-\\u17F9\\u1810-\\u1819\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B50-\\u1B59\\u1B83-\\u1BA0\\u1BAE-\\u1BE5\\u1C00-\\u1C23\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2070\\u2071\\u2074-\\u2079\\u207F-\\u2089\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2150-\\u2189\\u2460-\\u249B\\u24EA-\\u24FF\\u2776-\\u2793\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2CFD\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u3192-\\u3195\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3220-\\u3229\\u3248-\\u324F\\u3251-\\u325F\\u3280-\\u3289\\u32B1-\\u32BF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA830-\\uA835\\uA840-\\uA873\\uA882-\\uA8B3\\uA8D0-\\uA8D9\\uA8F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uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDDA0-\\uDDA9\\uDEE0-\\uDEF2\\uDFB0\\uDFC0-\\uDFD4]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|\\uD80B[\\uDF90-\\uDFF0]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE60-\\uDE69\\uDE70-\\uDEBE\\uDEC0-\\uDEC9\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF50-\\uDF59\\uDF5B-\\uDF61\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE96\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82B[\\uDFF0-\\uDFF3\\uDFF5-\\uDFFB\\uDFFD\\uDFFE]|\\uD82C[\\uDC00-\\uDD22\\uDD50-\\uDD52\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD834[\\uDEE0-\\uDEF3\\uDF60-\\uDF78]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\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DFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A])/)) return;\n var nextChar = match[1] || match[2] || '';\n if (!nextChar || nextChar && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar))) {\n var lLength = match[0].length - 1;\n var rDelim,\n rLength,\n delimTotal = lLength,\n midDelimTotal = 0;\n var endReg = match[0][0] === '*' ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;\n endReg.lastIndex = 0;\n\n // Clip maskedSrc to same section of string as src (move to lexer?)\n maskedSrc = maskedSrc.slice(-1 * src.length + lLength);\n while ((match = endReg.exec(maskedSrc)) != null) {\n rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];\n if (!rDelim) continue; // skip single * in __abc*abc__\n\n rLength = rDelim.length;\n if (match[3] || match[4]) {\n // found another Left Delim\n delimTotal += rLength;\n continue;\n } else if (match[5] || match[6]) {\n // either Left or Right Delim\n if (lLength % 3 && !((lLength + rLength) % 3)) {\n midDelimTotal += rLength;\n continue; // CommonMark Emphasis Rules 9-10\n }\n }\n\n delimTotal -= rLength;\n if (delimTotal > 0) continue; // Haven't found enough closing delimiters\n\n // Remove extra characters. *a*** -> *a*\n rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);\n var raw = src.slice(0, lLength + match.index + (match[0].length - rDelim.length) + rLength);\n\n // Create `em` if smallest delimiter has odd char count. *a***\n if (Math.min(lLength, rLength) % 2) {\n var _text = raw.slice(1, -1);\n return {\n type: 'em',\n raw: raw,\n text: _text,\n tokens: this.lexer.inlineTokens(_text)\n };\n }\n\n // Create 'strong' if smallest delimiter has even char count. **a***\n var text = raw.slice(2, -2);\n return {\n type: 'strong',\n raw: raw,\n text: text,\n tokens: this.lexer.inlineTokens(text)\n };\n }\n }\n };\n _proto.codespan = function codespan(src) {\n var cap = this.rules.inline.code.exec(src);\n if (cap) {\n var text = cap[2].replace(/\\n/g, ' ');\n var hasNonSpaceChars = /[^ ]/.test(text);\n var hasSpaceCharsOnBothEnds = /^ /.test(text) && / $/.test(text);\n if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {\n text = text.substring(1, text.length - 1);\n }\n text = escape(text, true);\n return {\n type: 'codespan',\n raw: cap[0],\n text: text\n };\n }\n };\n _proto.br = function br(src) {\n var cap = this.rules.inline.br.exec(src);\n if (cap) {\n return {\n type: 'br',\n raw: cap[0]\n };\n }\n };\n _proto.del = function del(src) {\n var cap = this.rules.inline.del.exec(src);\n if (cap) {\n return {\n type: 'del',\n raw: cap[0],\n text: cap[2],\n tokens: this.lexer.inlineTokens(cap[2])\n };\n }\n };\n _proto.autolink = function autolink(src, mangle) {\n var cap = this.rules.inline.autolink.exec(src);\n if (cap) {\n var text, href;\n if (cap[2] === '@') {\n text = escape(this.options.mangle ? mangle(cap[1]) : cap[1]);\n href = 'mailto:' + text;\n } else {\n text = escape(cap[1]);\n href = text;\n }\n return {\n type: 'link',\n raw: cap[0],\n text: text,\n href: href,\n tokens: [{\n type: 'text',\n raw: text,\n text: text\n }]\n };\n }\n };\n _proto.url = function url(src, mangle) {\n var cap;\n if (cap = this.rules.inline.url.exec(src)) {\n var text, href;\n if (cap[2] === '@') {\n text = escape(this.options.mangle ? mangle(cap[0]) : cap[0]);\n href = 'mailto:' + text;\n } else {\n // do extended autolink path validation\n var prevCapZero;\n do {\n prevCapZero = cap[0];\n cap[0] = this.rules.inline._backpedal.exec(cap[0])[0];\n } while (prevCapZero !== cap[0]);\n text = escape(cap[0]);\n if (cap[1] === 'www.') {\n href = 'http://' + cap[0];\n } else {\n href = cap[0];\n }\n }\n return {\n type: 'link',\n raw: cap[0],\n text: text,\n href: href,\n tokens: [{\n type: 'text',\n raw: text,\n text: text\n }]\n };\n }\n };\n _proto.inlineText = function inlineText(src, smartypants) {\n var cap = this.rules.inline.text.exec(src);\n if (cap) {\n var text;\n if (this.lexer.state.inRawBlock) {\n text = this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]) : cap[0];\n } else {\n text = escape(this.options.smartypants ? smartypants(cap[0]) : cap[0]);\n }\n return {\n type: 'text',\n raw: cap[0],\n text: text\n };\n }\n };\n return Tokenizer;\n}();\n\n/**\n * Block-Level Grammar\n */\nvar block = {\n newline: /^(?: *(?:\\n|$))+/,\n code: /^( {4}[^\\n]+(?:\\n(?: *(?:\\n|$))*)?)+/,\n fences: /^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/,\n hr: /^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/,\n heading: /^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,\n blockquote: /^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/,\n list: /^( {0,3}bull)([ \\t][^\\n]+?)?(?:\\n|$)/,\n html: '^ {0,3}(?:' // optional indentation\n + '<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:\\\\1>[^\\\\n]*\\\\n+|$)' // (1)\n + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n + '|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)' // (3)\n + '|\\\\n*|$)' // (4)\n + '|\\\\n*|$)' // (5)\n + '|?(tag)(?: +|\\\\n|/?>)[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (6)\n + '|<(?!script|pre|style|textarea)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) open tag\n + '|(?!script|pre|style|textarea)[a-z][\\\\w-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) closing tag\n + ')',\n def: /^ {0,3}\\[(label)\\]: *(?:\\n *)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n *)?| *\\n *)(title))? *(?:\\n+|$)/,\n table: noopTest,\n lheading: /^((?:.|\\n(?!\\n))+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n // regex template, placeholders will be replaced according to different paragraph\n // interruption rules of commonmark and the original markdown spec:\n _paragraph: /^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\n)[^\\n]+)*)/,\n text: /^[^\\n]+/\n};\nblock._label = /(?!\\s*\\])(?:\\\\.|[^\\[\\]\\\\])+/;\nblock._title = /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/;\nblock.def = edit(block.def).replace('label', block._label).replace('title', block._title).getRegex();\nblock.bullet = /(?:[*+-]|\\d{1,9}[.)])/;\nblock.listItemStart = edit(/^( *)(bull) */).replace('bull', block.bullet).getRegex();\nblock.list = edit(block.list).replace(/bull/g, block.bullet).replace('hr', '\\\\n+(?=\\\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$))').replace('def', '\\\\n+(?=' + block.def.source + ')').getRegex();\nblock._tag = 'address|article|aside|base|basefont|blockquote|body|caption' + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr' + '|track|ul';\nblock._comment = /|$)/;\nblock.html = edit(block.html, 'i').replace('comment', block._comment).replace('tag', block._tag).replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/).getRegex();\nblock.paragraph = edit(block._paragraph).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n.replace('|table', '').replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n.replace('html', '?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)').replace('tag', block._tag) // pars can be interrupted by type (6) html blocks\n.getRegex();\nblock.blockquote = edit(block.blockquote).replace('paragraph', block.paragraph).getRegex();\n\n/**\n * Normal Block Grammar\n */\n\nblock.normal = _extends({}, block);\n\n/**\n * GFM Block Grammar\n */\n\nblock.gfm = _extends({}, block.normal, {\n table: '^ *([^\\\\n ].*\\\\|.*)\\\\n' // Header\n + ' {0,3}(?:\\\\| *)?(:?-+:? *(?:\\\\| *:?-+:? *)*)(?:\\\\| *)?' // Align\n + '(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)' // Cells\n});\n\nblock.gfm.table = edit(block.gfm.table).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n.replace('html', '?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)').replace('tag', block._tag) // tables can be interrupted by type (6) html blocks\n.getRegex();\nblock.gfm.paragraph = edit(block._paragraph).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n.replace('table', block.gfm.table) // interrupt paragraphs with table\n.replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n.replace('html', '?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)').replace('tag', block._tag) // pars can be interrupted by type (6) html blocks\n.getRegex();\n/**\n * Pedantic grammar (original John Gruber's loose markdown specification)\n */\n\nblock.pedantic = _extends({}, block.normal, {\n html: edit('^ *(?:comment *(?:\\\\n|\\\\s*$)' + '|<(tag)[\\\\s\\\\S]+?\\\\1> *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n + '| \\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))').replace('comment', block._comment).replace(/tag/g, '(?!(?:' + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub' + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)' + '\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b').getRegex(),\n def: /^ *\\[([^\\]]+)\\]: *([^\\s>]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,\n heading: /^(#{1,6})(.*)(?:\\n+|$)/,\n fences: noopTest,\n // fences not supported\n lheading: /^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n paragraph: edit(block.normal._paragraph).replace('hr', block.hr).replace('heading', ' *#{1,6} *[^\\n]').replace('lheading', block.lheading).replace('blockquote', ' {0,3}>').replace('|fences', '').replace('|list', '').replace('|html', '').getRegex()\n});\n\n/**\n * Inline-Level Grammar\n */\nvar inline = {\n escape: /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,\n autolink: /^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/,\n url: noopTest,\n tag: '^comment' + '|^[a-zA-Z][\\\\w:-]*\\\\s*>' // self-closing tag\n + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. \n + '|^' // declaration, e.g. \n + '|^',\n // CDATA section\n link: /^!?\\[(label)\\]\\(\\s*(href)(?:\\s+(title))?\\s*\\)/,\n reflink: /^!?\\[(label)\\]\\[(ref)\\]/,\n nolink: /^!?\\[(ref)\\](?:\\[\\])?/,\n reflinkSearch: 'reflink|nolink(?!\\\\()',\n emStrong: {\n lDelim: /^(?:\\*+(?:([punct_])|[^\\s*]))|^_+(?:([punct*])|([^\\s_]))/,\n // (1) and (2) can only be a Right Delimiter. (3) and (4) can only be Left. (5) and (6) can be either Left or Right.\n // () Skip orphan inside strong () Consume to delim (1) #*** (2) a***#, a*** (3) #***a, ***a (4) ***# (5) #***# (6) a***a\n rDelimAst: /^(?:[^_*\\\\]|\\\\.)*?\\_\\_(?:[^_*\\\\]|\\\\.)*?\\*(?:[^_*\\\\]|\\\\.)*?(?=\\_\\_)|(?:[^*\\\\]|\\\\.)+(?=[^*])|[punct_](\\*+)(?=[\\s]|$)|(?:[^punct*_\\s\\\\]|\\\\.)(\\*+)(?=[punct_\\s]|$)|[punct_\\s](\\*+)(?=[^punct*_\\s])|[\\s](\\*+)(?=[punct_])|[punct_](\\*+)(?=[punct_])|(?:[^punct*_\\s\\\\]|\\\\.)(\\*+)(?=[^punct*_\\s])/,\n rDelimUnd: /^(?:[^_*\\\\]|\\\\.)*?\\*\\*(?:[^_*\\\\]|\\\\.)*?\\_(?:[^_*\\\\]|\\\\.)*?(?=\\*\\*)|(?:[^_\\\\]|\\\\.)+(?=[^_])|[punct*](\\_+)(?=[\\s]|$)|(?:[^punct*_\\s\\\\]|\\\\.)(\\_+)(?=[punct*\\s]|$)|[punct*\\s](\\_+)(?=[^punct*_\\s])|[\\s](\\_+)(?=[punct*])|[punct*](\\_+)(?=[punct*])/ // ^- Not allowed for _\n },\n\n code: /^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,\n br: /^( {2,}|\\\\)\\n(?!\\s*$)/,\n del: noopTest,\n text: /^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\?@\\\\[\\\\]`^{|}~';\ninline.punctuation = edit(inline.punctuation).replace(/punctuation/g, inline._punctuation).getRegex();\n\n// sequences em should skip over [title](link), `code`, \ninline.blockSkip = /\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>/g;\n// lookbehind is not available on Safari as of version 16\n// inline.escapedEmSt = /(?<=(?:^|[^\\\\)(?:\\\\[^])*)\\\\[*_]/g;\ninline.escapedEmSt = /(?:^|[^\\\\])(?:\\\\\\\\)*\\\\[*_]/g;\ninline._comment = edit(block._comment).replace('(?:-->|$)', '-->').getRegex();\ninline.emStrong.lDelim = edit(inline.emStrong.lDelim).replace(/punct/g, inline._punctuation).getRegex();\ninline.emStrong.rDelimAst = edit(inline.emStrong.rDelimAst, 'g').replace(/punct/g, inline._punctuation).getRegex();\ninline.emStrong.rDelimUnd = edit(inline.emStrong.rDelimUnd, 'g').replace(/punct/g, inline._punctuation).getRegex();\ninline._escapes = /\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/g;\ninline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;\ninline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;\ninline.autolink = edit(inline.autolink).replace('scheme', inline._scheme).replace('email', inline._email).getRegex();\ninline._attribute = /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/;\ninline.tag = edit(inline.tag).replace('comment', inline._comment).replace('attribute', inline._attribute).getRegex();\ninline._label = /(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/;\ninline._href = /<(?:\\\\.|[^\\n<>\\\\])+>|[^\\s\\x00-\\x1f]*/;\ninline._title = /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/;\ninline.link = edit(inline.link).replace('label', inline._label).replace('href', inline._href).replace('title', inline._title).getRegex();\ninline.reflink = edit(inline.reflink).replace('label', inline._label).replace('ref', block._label).getRegex();\ninline.nolink = edit(inline.nolink).replace('ref', block._label).getRegex();\ninline.reflinkSearch = edit(inline.reflinkSearch, 'g').replace('reflink', inline.reflink).replace('nolink', inline.nolink).getRegex();\n\n/**\n * Normal Inline Grammar\n */\n\ninline.normal = _extends({}, inline);\n\n/**\n * Pedantic Inline Grammar\n */\n\ninline.pedantic = _extends({}, inline.normal, {\n strong: {\n start: /^__|\\*\\*/,\n middle: /^__(?=\\S)([\\s\\S]*?\\S)__(?!_)|^\\*\\*(?=\\S)([\\s\\S]*?\\S)\\*\\*(?!\\*)/,\n endAst: /\\*\\*(?!\\*)/g,\n endUnd: /__(?!_)/g\n },\n em: {\n start: /^_|\\*/,\n middle: /^()\\*(?=\\S)([\\s\\S]*?\\S)\\*(?!\\*)|^_(?=\\S)([\\s\\S]*?\\S)_(?!_)/,\n endAst: /\\*(?!\\*)/g,\n endUnd: /_(?!_)/g\n },\n link: edit(/^!?\\[(label)\\]\\((.*?)\\)/).replace('label', inline._label).getRegex(),\n reflink: edit(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace('label', inline._label).getRegex()\n});\n\n/**\n * GFM Inline Grammar\n */\n\ninline.gfm = _extends({}, inline.normal, {\n escape: edit(inline.escape).replace('])', '~|])').getRegex(),\n _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,\n url: /^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/,\n _backpedal: /(?:[^?!.,:;*_'\"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\"~)]+(?!$))+/,\n del: /^(~~?)(?=[^\\s~])([\\s\\S]*?[^\\s~])\\1(?=[^~]|$)/,\n text: /^([`~]+|[^`~])(?:(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\ 0.5) {\n ch = 'x' + ch.toString(16);\n }\n out += '' + ch + ';';\n }\n return out;\n}\n\n/**\n * Block Lexer\n */\nvar Lexer = /*#__PURE__*/function () {\n function Lexer(options) {\n this.tokens = [];\n this.tokens.links = Object.create(null);\n this.options = options || exports.defaults;\n this.options.tokenizer = this.options.tokenizer || new Tokenizer();\n this.tokenizer = this.options.tokenizer;\n this.tokenizer.options = this.options;\n this.tokenizer.lexer = this;\n this.inlineQueue = [];\n this.state = {\n inLink: false,\n inRawBlock: false,\n top: true\n };\n var rules = {\n block: block.normal,\n inline: inline.normal\n };\n if (this.options.pedantic) {\n rules.block = block.pedantic;\n rules.inline = inline.pedantic;\n } else if (this.options.gfm) {\n rules.block = block.gfm;\n if (this.options.breaks) {\n rules.inline = inline.breaks;\n } else {\n rules.inline = inline.gfm;\n }\n }\n this.tokenizer.rules = rules;\n }\n\n /**\n * Expose Rules\n */\n /**\n * Static Lex Method\n */\n Lexer.lex = function lex(src, options) {\n var lexer = new Lexer(options);\n return lexer.lex(src);\n }\n\n /**\n * Static Lex Inline Method\n */;\n Lexer.lexInline = function lexInline(src, options) {\n var lexer = new Lexer(options);\n return lexer.inlineTokens(src);\n }\n\n /**\n * Preprocessing\n */;\n var _proto = Lexer.prototype;\n _proto.lex = function lex(src) {\n src = src.replace(/\\r\\n|\\r/g, '\\n');\n this.blockTokens(src, this.tokens);\n var next;\n while (next = this.inlineQueue.shift()) {\n this.inlineTokens(next.src, next.tokens);\n }\n return this.tokens;\n }\n\n /**\n * Lexing\n */;\n _proto.blockTokens = function blockTokens(src, tokens) {\n var _this = this;\n if (tokens === void 0) {\n tokens = [];\n }\n if (this.options.pedantic) {\n src = src.replace(/\\t/g, ' ').replace(/^ +$/gm, '');\n } else {\n src = src.replace(/^( *)(\\t+)/gm, function (_, leading, tabs) {\n return leading + ' '.repeat(tabs.length);\n });\n }\n var token, lastToken, cutSrc, lastParagraphClipped;\n while (src) {\n if (this.options.extensions && this.options.extensions.block && this.options.extensions.block.some(function (extTokenizer) {\n if (token = extTokenizer.call({\n lexer: _this\n }, src, tokens)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n return true;\n }\n return false;\n })) {\n continue;\n }\n\n // newline\n if (token = this.tokenizer.space(src)) {\n src = src.substring(token.raw.length);\n if (token.raw.length === 1 && tokens.length > 0) {\n // if there's a single \\n as a spacer, it's terminating the last line,\n // so move it there so that we don't get unecessary paragraph tags\n tokens[tokens.length - 1].raw += '\\n';\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // code\n if (token = this.tokenizer.code(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n // An indented code block cannot interrupt a paragraph.\n if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // fences\n if (token = this.tokenizer.fences(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // heading\n if (token = this.tokenizer.heading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // hr\n if (token = this.tokenizer.hr(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // blockquote\n if (token = this.tokenizer.blockquote(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // list\n if (token = this.tokenizer.list(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // html\n if (token = this.tokenizer.html(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // def\n if (token = this.tokenizer.def(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.raw;\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else if (!this.tokens.links[token.tag]) {\n this.tokens.links[token.tag] = {\n href: token.href,\n title: token.title\n };\n }\n continue;\n }\n\n // table (gfm)\n if (token = this.tokenizer.table(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // lheading\n if (token = this.tokenizer.lheading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // top-level paragraph\n // prevent paragraph consuming extensions by clipping 'src' to extension start\n cutSrc = src;\n if (this.options.extensions && this.options.extensions.startBlock) {\n (function () {\n var startIndex = Infinity;\n var tempSrc = src.slice(1);\n var tempStart = void 0;\n _this.options.extensions.startBlock.forEach(function (getStartIndex) {\n tempStart = getStartIndex.call({\n lexer: this\n }, tempSrc);\n if (typeof tempStart === 'number' && tempStart >= 0) {\n startIndex = Math.min(startIndex, tempStart);\n }\n });\n if (startIndex < Infinity && startIndex >= 0) {\n cutSrc = src.substring(0, startIndex + 1);\n }\n })();\n }\n if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {\n lastToken = tokens[tokens.length - 1];\n if (lastParagraphClipped && lastToken.type === 'paragraph') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue.pop();\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else {\n tokens.push(token);\n }\n lastParagraphClipped = cutSrc.length !== src.length;\n src = src.substring(token.raw.length);\n continue;\n }\n\n // text\n if (token = this.tokenizer.text(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue.pop();\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n if (src) {\n var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n this.state.top = true;\n return tokens;\n };\n _proto.inline = function inline(src, tokens) {\n if (tokens === void 0) {\n tokens = [];\n }\n this.inlineQueue.push({\n src: src,\n tokens: tokens\n });\n return tokens;\n }\n\n /**\n * Lexing/Compiling\n */;\n _proto.inlineTokens = function inlineTokens(src, tokens) {\n var _this2 = this;\n if (tokens === void 0) {\n tokens = [];\n }\n var token, lastToken, cutSrc;\n\n // String with links masked to avoid interference with em and strong\n var maskedSrc = src;\n var match;\n var keepPrevChar, prevChar;\n\n // Mask out reflinks\n if (this.tokens.links) {\n var links = Object.keys(this.tokens.links);\n if (links.length > 0) {\n while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {\n if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);\n }\n }\n }\n }\n // Mask out other blocks\n while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);\n }\n\n // Mask out escaped em & strong delimiters\n while ((match = this.tokenizer.rules.inline.escapedEmSt.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index + match[0].length - 2) + '++' + maskedSrc.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);\n this.tokenizer.rules.inline.escapedEmSt.lastIndex--;\n }\n while (src) {\n if (!keepPrevChar) {\n prevChar = '';\n }\n keepPrevChar = false;\n\n // extensions\n if (this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some(function (extTokenizer) {\n if (token = extTokenizer.call({\n lexer: _this2\n }, src, tokens)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n return true;\n }\n return false;\n })) {\n continue;\n }\n\n // escape\n if (token = this.tokenizer.escape(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // tag\n if (token = this.tokenizer.tag(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // link\n if (token = this.tokenizer.link(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // reflink, nolink\n if (token = this.tokenizer.reflink(src, this.tokens.links)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // em & strong\n if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // code\n if (token = this.tokenizer.codespan(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // br\n if (token = this.tokenizer.br(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // del (gfm)\n if (token = this.tokenizer.del(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // autolink\n if (token = this.tokenizer.autolink(src, mangle)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // url (gfm)\n if (!this.state.inLink && (token = this.tokenizer.url(src, mangle))) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // text\n // prevent inlineText consuming extensions by clipping 'src' to extension start\n cutSrc = src;\n if (this.options.extensions && this.options.extensions.startInline) {\n (function () {\n var startIndex = Infinity;\n var tempSrc = src.slice(1);\n var tempStart = void 0;\n _this2.options.extensions.startInline.forEach(function (getStartIndex) {\n tempStart = getStartIndex.call({\n lexer: this\n }, tempSrc);\n if (typeof tempStart === 'number' && tempStart >= 0) {\n startIndex = Math.min(startIndex, tempStart);\n }\n });\n if (startIndex < Infinity && startIndex >= 0) {\n cutSrc = src.substring(0, startIndex + 1);\n }\n })();\n }\n if (token = this.tokenizer.inlineText(cutSrc, smartypants)) {\n src = src.substring(token.raw.length);\n if (token.raw.slice(-1) !== '_') {\n // Track prevChar before string of ____ started\n prevChar = token.raw.slice(-1);\n }\n keepPrevChar = true;\n lastToken = tokens[tokens.length - 1];\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n if (src) {\n var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n return tokens;\n };\n _createClass(Lexer, null, [{\n key: \"rules\",\n get: function get() {\n return {\n block: block,\n inline: inline\n };\n }\n }]);\n return Lexer;\n}();\n\n/**\n * Renderer\n */\nvar Renderer = /*#__PURE__*/function () {\n function Renderer(options) {\n this.options = options || exports.defaults;\n }\n var _proto = Renderer.prototype;\n _proto.code = function code(_code, infostring, escaped) {\n var lang = (infostring || '').match(/\\S*/)[0];\n if (this.options.highlight) {\n var out = this.options.highlight(_code, lang);\n if (out != null && out !== _code) {\n escaped = true;\n _code = out;\n }\n }\n _code = _code.replace(/\\n$/, '') + '\\n';\n if (!lang) {\n return '' + (escaped ? _code : escape(_code, true)) + '
\\n';\n }\n return '' + (escaped ? _code : escape(_code, true)) + '
\\n';\n }\n\n /**\n * @param {string} quote\n */;\n _proto.blockquote = function blockquote(quote) {\n return \"\\n\" + quote + \"
\\n\";\n };\n _proto.html = function html(_html) {\n return _html;\n }\n\n /**\n * @param {string} text\n * @param {string} level\n * @param {string} raw\n * @param {any} slugger\n */;\n _proto.heading = function heading(text, level, raw, slugger) {\n if (this.options.headerIds) {\n var id = this.options.headerPrefix + slugger.slug(raw);\n return \"\" + text + \" \\n\";\n }\n\n // ignore IDs\n return \"\" + text + \" \\n\";\n };\n _proto.hr = function hr() {\n return this.options.xhtml ? '
\\n' : '
\\n';\n };\n _proto.list = function list(body, ordered, start) {\n var type = ordered ? 'ol' : 'ul',\n startatt = ordered && start !== 1 ? ' start=\"' + start + '\"' : '';\n return '<' + type + startatt + '>\\n' + body + '' + type + '>\\n';\n }\n\n /**\n * @param {string} text\n */;\n _proto.listitem = function listitem(text) {\n return \"\" + text + \" \\n\";\n };\n _proto.checkbox = function checkbox(checked) {\n return ' ';\n }\n\n /**\n * @param {string} text\n */;\n _proto.paragraph = function paragraph(text) {\n return \"\" + text + \"
\\n\";\n }\n\n /**\n * @param {string} header\n * @param {string} body\n */;\n _proto.table = function table(header, body) {\n if (body) body = \"\" + body + \"\";\n return '\\n' + '\\n' + header + '\\n' + body + '
\\n';\n }\n\n /**\n * @param {string} content\n */;\n _proto.tablerow = function tablerow(content) {\n return \"\\n\" + content + \" \\n\";\n };\n _proto.tablecell = function tablecell(content, flags) {\n var type = flags.header ? 'th' : 'td';\n var tag = flags.align ? \"<\" + type + \" align=\\\"\" + flags.align + \"\\\">\" : \"<\" + type + \">\";\n return tag + content + (\"\" + type + \">\\n\");\n }\n\n /**\n * span level renderer\n * @param {string} text\n */;\n _proto.strong = function strong(text) {\n return \"\" + text + \"\";\n }\n\n /**\n * @param {string} text\n */;\n _proto.em = function em(text) {\n return \"\" + text + \"\";\n }\n\n /**\n * @param {string} text\n */;\n _proto.codespan = function codespan(text) {\n return \"\" + text + \"
\";\n };\n _proto.br = function br() {\n return this.options.xhtml ? '
' : '
';\n }\n\n /**\n * @param {string} text\n */;\n _proto.del = function del(text) {\n return \"\" + text + \"\";\n }\n\n /**\n * @param {string} href\n * @param {string} title\n * @param {string} text\n */;\n _proto.link = function link(href, title, text) {\n href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n if (href === null) {\n return text;\n }\n var out = '' + text + '';\n return out;\n }\n\n /**\n * @param {string} href\n * @param {string} title\n * @param {string} text\n */;\n _proto.image = function image(href, title, text) {\n href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n if (href === null) {\n return text;\n }\n var out = \"
' : '>';\n return out;\n };\n _proto.text = function text(_text) {\n return _text;\n };\n return Renderer;\n}();\n\n/**\n * TextRenderer\n * returns only the textual part of the token\n */\nvar TextRenderer = /*#__PURE__*/function () {\n function TextRenderer() {}\n var _proto = TextRenderer.prototype;\n // no need for block level renderers\n _proto.strong = function strong(text) {\n return text;\n };\n _proto.em = function em(text) {\n return text;\n };\n _proto.codespan = function codespan(text) {\n return text;\n };\n _proto.del = function del(text) {\n return text;\n };\n _proto.html = function html(text) {\n return text;\n };\n _proto.text = function text(_text) {\n return _text;\n };\n _proto.link = function link(href, title, text) {\n return '' + text;\n };\n _proto.image = function image(href, title, text) {\n return '' + text;\n };\n _proto.br = function br() {\n return '';\n };\n return TextRenderer;\n}();\n\n/**\n * Slugger generates header id\n */\nvar Slugger = /*#__PURE__*/function () {\n function Slugger() {\n this.seen = {};\n }\n\n /**\n * @param {string} value\n */\n var _proto = Slugger.prototype;\n _proto.serialize = function serialize(value) {\n return value.toLowerCase().trim()\n // remove html tags\n .replace(/<[!\\/a-z].*?>/ig, '')\n // remove unwanted chars\n .replace(/[\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!\"#$%&()*+,./:;<=>?@[\\]^`{|}~]/g, '').replace(/\\s/g, '-');\n }\n\n /**\n * Finds the next safe (unique) slug to use\n * @param {string} originalSlug\n * @param {boolean} isDryRun\n */;\n _proto.getNextSafeSlug = function getNextSafeSlug(originalSlug, isDryRun) {\n var slug = originalSlug;\n var occurenceAccumulator = 0;\n if (this.seen.hasOwnProperty(slug)) {\n occurenceAccumulator = this.seen[originalSlug];\n do {\n occurenceAccumulator++;\n slug = originalSlug + '-' + occurenceAccumulator;\n } while (this.seen.hasOwnProperty(slug));\n }\n if (!isDryRun) {\n this.seen[originalSlug] = occurenceAccumulator;\n this.seen[slug] = 0;\n }\n return slug;\n }\n\n /**\n * Convert string to unique id\n * @param {object} [options]\n * @param {boolean} [options.dryrun] Generates the next unique slug without\n * updating the internal accumulator.\n */;\n _proto.slug = function slug(value, options) {\n if (options === void 0) {\n options = {};\n }\n var slug = this.serialize(value);\n return this.getNextSafeSlug(slug, options.dryrun);\n };\n return Slugger;\n}();\n\n/**\n * Parsing & Compiling\n */\nvar Parser = /*#__PURE__*/function () {\n function Parser(options) {\n this.options = options || exports.defaults;\n this.options.renderer = this.options.renderer || new Renderer();\n this.renderer = this.options.renderer;\n this.renderer.options = this.options;\n this.textRenderer = new TextRenderer();\n this.slugger = new Slugger();\n }\n\n /**\n * Static Parse Method\n */\n Parser.parse = function parse(tokens, options) {\n var parser = new Parser(options);\n return parser.parse(tokens);\n }\n\n /**\n * Static Parse Inline Method\n */;\n Parser.parseInline = function parseInline(tokens, options) {\n var parser = new Parser(options);\n return parser.parseInline(tokens);\n }\n\n /**\n * Parse Loop\n */;\n var _proto = Parser.prototype;\n _proto.parse = function parse(tokens, top) {\n if (top === void 0) {\n top = true;\n }\n var out = '',\n i,\n j,\n k,\n l2,\n l3,\n row,\n cell,\n header,\n body,\n token,\n ordered,\n start,\n loose,\n itemBody,\n item,\n checked,\n task,\n checkbox,\n ret;\n var l = tokens.length;\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n // Run any renderer extensions\n if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {\n ret = this.options.extensions.renderers[token.type].call({\n parser: this\n }, token);\n if (ret !== false || !['space', 'hr', 'heading', 'code', 'table', 'blockquote', 'list', 'html', 'paragraph', 'text'].includes(token.type)) {\n out += ret || '';\n continue;\n }\n }\n switch (token.type) {\n case 'space':\n {\n continue;\n }\n case 'hr':\n {\n out += this.renderer.hr();\n continue;\n }\n case 'heading':\n {\n out += this.renderer.heading(this.parseInline(token.tokens), token.depth, unescape(this.parseInline(token.tokens, this.textRenderer)), this.slugger);\n continue;\n }\n case 'code':\n {\n out += this.renderer.code(token.text, token.lang, token.escaped);\n continue;\n }\n case 'table':\n {\n header = '';\n\n // header\n cell = '';\n l2 = token.header.length;\n for (j = 0; j < l2; j++) {\n cell += this.renderer.tablecell(this.parseInline(token.header[j].tokens), {\n header: true,\n align: token.align[j]\n });\n }\n header += this.renderer.tablerow(cell);\n body = '';\n l2 = token.rows.length;\n for (j = 0; j < l2; j++) {\n row = token.rows[j];\n cell = '';\n l3 = row.length;\n for (k = 0; k < l3; k++) {\n cell += this.renderer.tablecell(this.parseInline(row[k].tokens), {\n header: false,\n align: token.align[k]\n });\n }\n body += this.renderer.tablerow(cell);\n }\n out += this.renderer.table(header, body);\n continue;\n }\n case 'blockquote':\n {\n body = this.parse(token.tokens);\n out += this.renderer.blockquote(body);\n continue;\n }\n case 'list':\n {\n ordered = token.ordered;\n start = token.start;\n loose = token.loose;\n l2 = token.items.length;\n body = '';\n for (j = 0; j < l2; j++) {\n item = token.items[j];\n checked = item.checked;\n task = item.task;\n itemBody = '';\n if (item.task) {\n checkbox = this.renderer.checkbox(checked);\n if (loose) {\n if (item.tokens.length > 0 && item.tokens[0].type === 'paragraph') {\n item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;\n if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {\n item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;\n }\n } else {\n item.tokens.unshift({\n type: 'text',\n text: checkbox\n });\n }\n } else {\n itemBody += checkbox;\n }\n }\n itemBody += this.parse(item.tokens, loose);\n body += this.renderer.listitem(itemBody, task, checked);\n }\n out += this.renderer.list(body, ordered, start);\n continue;\n }\n case 'html':\n {\n // TODO parse inline content if parameter markdown=1\n out += this.renderer.html(token.text);\n continue;\n }\n case 'paragraph':\n {\n out += this.renderer.paragraph(this.parseInline(token.tokens));\n continue;\n }\n case 'text':\n {\n body = token.tokens ? this.parseInline(token.tokens) : token.text;\n while (i + 1 < l && tokens[i + 1].type === 'text') {\n token = tokens[++i];\n body += '\\n' + (token.tokens ? this.parseInline(token.tokens) : token.text);\n }\n out += top ? this.renderer.paragraph(body) : body;\n continue;\n }\n default:\n {\n var errMsg = 'Token with \"' + token.type + '\" type was not found.';\n if (this.options.silent) {\n console.error(errMsg);\n return;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n return out;\n }\n\n /**\n * Parse Inline Tokens\n */;\n _proto.parseInline = function parseInline(tokens, renderer) {\n renderer = renderer || this.renderer;\n var out = '',\n i,\n token,\n ret;\n var l = tokens.length;\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n // Run any renderer extensions\n if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {\n ret = this.options.extensions.renderers[token.type].call({\n parser: this\n }, token);\n if (ret !== false || !['escape', 'html', 'link', 'image', 'strong', 'em', 'codespan', 'br', 'del', 'text'].includes(token.type)) {\n out += ret || '';\n continue;\n }\n }\n switch (token.type) {\n case 'escape':\n {\n out += renderer.text(token.text);\n break;\n }\n case 'html':\n {\n out += renderer.html(token.text);\n break;\n }\n case 'link':\n {\n out += renderer.link(token.href, token.title, this.parseInline(token.tokens, renderer));\n break;\n }\n case 'image':\n {\n out += renderer.image(token.href, token.title, token.text);\n break;\n }\n case 'strong':\n {\n out += renderer.strong(this.parseInline(token.tokens, renderer));\n break;\n }\n case 'em':\n {\n out += renderer.em(this.parseInline(token.tokens, renderer));\n break;\n }\n case 'codespan':\n {\n out += renderer.codespan(token.text);\n break;\n }\n case 'br':\n {\n out += renderer.br();\n break;\n }\n case 'del':\n {\n out += renderer.del(this.parseInline(token.tokens, renderer));\n break;\n }\n case 'text':\n {\n out += renderer.text(token.text);\n break;\n }\n default:\n {\n var errMsg = 'Token with \"' + token.type + '\" type was not found.';\n if (this.options.silent) {\n console.error(errMsg);\n return;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n return out;\n };\n return Parser;\n}();\n\nvar Hooks = /*#__PURE__*/function () {\n function Hooks(options) {\n this.options = options || exports.defaults;\n }\n var _proto = Hooks.prototype;\n /**\n * Process markdown before marked\n */\n _proto.preprocess = function preprocess(markdown) {\n return markdown;\n }\n\n /**\n * Process HTML after marked is finished\n */;\n _proto.postprocess = function postprocess(html) {\n return html;\n };\n return Hooks;\n}();\nHooks.passThroughHooks = new Set(['preprocess', 'postprocess']);\n\nfunction onError(silent, async, callback) {\n return function (e) {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n if (silent) {\n var msg = 'An error occurred:
' + escape(e.message + '', true) + '
';\n if (async) {\n return Promise.resolve(msg);\n }\n if (callback) {\n callback(null, msg);\n return;\n }\n return msg;\n }\n if (async) {\n return Promise.reject(e);\n }\n if (callback) {\n callback(e);\n return;\n }\n throw e;\n };\n}\nfunction parseMarkdown(lexer, parser) {\n return function (src, opt, callback) {\n if (typeof opt === 'function') {\n callback = opt;\n opt = null;\n }\n var origOpt = _extends({}, opt);\n opt = _extends({}, marked.defaults, origOpt);\n var throwError = onError(opt.silent, opt.async, callback);\n\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n return throwError(new Error('marked(): input parameter is undefined or null'));\n }\n if (typeof src !== 'string') {\n return throwError(new Error('marked(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected'));\n }\n checkSanitizeDeprecation(opt);\n if (opt.hooks) {\n opt.hooks.options = opt;\n }\n if (callback) {\n var highlight = opt.highlight;\n var tokens;\n try {\n if (opt.hooks) {\n src = opt.hooks.preprocess(src);\n }\n tokens = lexer(src, opt);\n } catch (e) {\n return throwError(e);\n }\n var done = function done(err) {\n var out;\n if (!err) {\n try {\n if (opt.walkTokens) {\n marked.walkTokens(tokens, opt.walkTokens);\n }\n out = parser(tokens, opt);\n if (opt.hooks) {\n out = opt.hooks.postprocess(out);\n }\n } catch (e) {\n err = e;\n }\n }\n opt.highlight = highlight;\n return err ? throwError(err) : callback(null, out);\n };\n if (!highlight || highlight.length < 3) {\n return done();\n }\n delete opt.highlight;\n if (!tokens.length) return done();\n var pending = 0;\n marked.walkTokens(tokens, function (token) {\n if (token.type === 'code') {\n pending++;\n setTimeout(function () {\n highlight(token.text, token.lang, function (err, code) {\n if (err) {\n return done(err);\n }\n if (code != null && code !== token.text) {\n token.text = code;\n token.escaped = true;\n }\n pending--;\n if (pending === 0) {\n done();\n }\n });\n }, 0);\n }\n });\n if (pending === 0) {\n done();\n }\n return;\n }\n if (opt.async) {\n return Promise.resolve(opt.hooks ? opt.hooks.preprocess(src) : src).then(function (src) {\n return lexer(src, opt);\n }).then(function (tokens) {\n return opt.walkTokens ? Promise.all(marked.walkTokens(tokens, opt.walkTokens)).then(function () {\n return tokens;\n }) : tokens;\n }).then(function (tokens) {\n return parser(tokens, opt);\n }).then(function (html) {\n return opt.hooks ? opt.hooks.postprocess(html) : html;\n })[\"catch\"](throwError);\n }\n try {\n if (opt.hooks) {\n src = opt.hooks.preprocess(src);\n }\n var _tokens = lexer(src, opt);\n if (opt.walkTokens) {\n marked.walkTokens(_tokens, opt.walkTokens);\n }\n var html = parser(_tokens, opt);\n if (opt.hooks) {\n html = opt.hooks.postprocess(html);\n }\n return html;\n } catch (e) {\n return throwError(e);\n }\n };\n}\n\n/**\n * Marked\n */\nfunction marked(src, opt, callback) {\n return parseMarkdown(Lexer.lex, Parser.parse)(src, opt, callback);\n}\n\n/**\n * Options\n */\n\nmarked.options = marked.setOptions = function (opt) {\n marked.defaults = _extends({}, marked.defaults, opt);\n changeDefaults(marked.defaults);\n return marked;\n};\nmarked.getDefaults = getDefaults;\nmarked.defaults = exports.defaults;\n\n/**\n * Use Extension\n */\n\nmarked.use = function () {\n var extensions = marked.defaults.extensions || {\n renderers: {},\n childTokens: {}\n };\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n args.forEach(function (pack) {\n // copy options to new object\n var opts = _extends({}, pack);\n\n // set async to true if it was set to true before\n opts.async = marked.defaults.async || opts.async || false;\n\n // ==-- Parse \"addon\" extensions --== //\n if (pack.extensions) {\n pack.extensions.forEach(function (ext) {\n if (!ext.name) {\n throw new Error('extension name required');\n }\n if (ext.renderer) {\n // Renderer extensions\n var prevRenderer = extensions.renderers[ext.name];\n if (prevRenderer) {\n // Replace extension with func to run new extension but fall back if false\n extensions.renderers[ext.name] = function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n var ret = ext.renderer.apply(this, args);\n if (ret === false) {\n ret = prevRenderer.apply(this, args);\n }\n return ret;\n };\n } else {\n extensions.renderers[ext.name] = ext.renderer;\n }\n }\n if (ext.tokenizer) {\n // Tokenizer Extensions\n if (!ext.level || ext.level !== 'block' && ext.level !== 'inline') {\n throw new Error(\"extension level must be 'block' or 'inline'\");\n }\n if (extensions[ext.level]) {\n extensions[ext.level].unshift(ext.tokenizer);\n } else {\n extensions[ext.level] = [ext.tokenizer];\n }\n if (ext.start) {\n // Function to check for start of token\n if (ext.level === 'block') {\n if (extensions.startBlock) {\n extensions.startBlock.push(ext.start);\n } else {\n extensions.startBlock = [ext.start];\n }\n } else if (ext.level === 'inline') {\n if (extensions.startInline) {\n extensions.startInline.push(ext.start);\n } else {\n extensions.startInline = [ext.start];\n }\n }\n }\n }\n if (ext.childTokens) {\n // Child tokens to be visited by walkTokens\n extensions.childTokens[ext.name] = ext.childTokens;\n }\n });\n opts.extensions = extensions;\n }\n\n // ==-- Parse \"overwrite\" extensions --== //\n if (pack.renderer) {\n (function () {\n var renderer = marked.defaults.renderer || new Renderer();\n var _loop = function _loop(prop) {\n var prevRenderer = renderer[prop];\n // Replace renderer with func to run extension, but fall back if false\n renderer[prop] = function () {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n var ret = pack.renderer[prop].apply(renderer, args);\n if (ret === false) {\n ret = prevRenderer.apply(renderer, args);\n }\n return ret;\n };\n };\n for (var prop in pack.renderer) {\n _loop(prop);\n }\n opts.renderer = renderer;\n })();\n }\n if (pack.tokenizer) {\n (function () {\n var tokenizer = marked.defaults.tokenizer || new Tokenizer();\n var _loop2 = function _loop2(prop) {\n var prevTokenizer = tokenizer[prop];\n // Replace tokenizer with func to run extension, but fall back if false\n tokenizer[prop] = function () {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n var ret = pack.tokenizer[prop].apply(tokenizer, args);\n if (ret === false) {\n ret = prevTokenizer.apply(tokenizer, args);\n }\n return ret;\n };\n };\n for (var prop in pack.tokenizer) {\n _loop2(prop);\n }\n opts.tokenizer = tokenizer;\n })();\n }\n\n // ==-- Parse Hooks extensions --== //\n if (pack.hooks) {\n (function () {\n var hooks = marked.defaults.hooks || new Hooks();\n var _loop3 = function _loop3(prop) {\n var prevHook = hooks[prop];\n if (Hooks.passThroughHooks.has(prop)) {\n hooks[prop] = function (arg) {\n if (marked.defaults.async) {\n return Promise.resolve(pack.hooks[prop].call(hooks, arg)).then(function (ret) {\n return prevHook.call(hooks, ret);\n });\n }\n var ret = pack.hooks[prop].call(hooks, arg);\n return prevHook.call(hooks, ret);\n };\n } else {\n hooks[prop] = function () {\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n args[_key5] = arguments[_key5];\n }\n var ret = pack.hooks[prop].apply(hooks, args);\n if (ret === false) {\n ret = prevHook.apply(hooks, args);\n }\n return ret;\n };\n }\n };\n for (var prop in pack.hooks) {\n _loop3(prop);\n }\n opts.hooks = hooks;\n })();\n }\n\n // ==-- Parse WalkTokens extensions --== //\n if (pack.walkTokens) {\n var _walkTokens = marked.defaults.walkTokens;\n opts.walkTokens = function (token) {\n var values = [];\n values.push(pack.walkTokens.call(this, token));\n if (_walkTokens) {\n values = values.concat(_walkTokens.call(this, token));\n }\n return values;\n };\n }\n marked.setOptions(opts);\n });\n};\n\n/**\n * Run callback for every token\n */\n\nmarked.walkTokens = function (tokens, callback) {\n var values = [];\n var _loop4 = function _loop4() {\n var token = _step.value;\n values = values.concat(callback.call(marked, token));\n switch (token.type) {\n case 'table':\n {\n for (var _iterator2 = _createForOfIteratorHelperLoose(token.header), _step2; !(_step2 = _iterator2()).done;) {\n var cell = _step2.value;\n values = values.concat(marked.walkTokens(cell.tokens, callback));\n }\n for (var _iterator3 = _createForOfIteratorHelperLoose(token.rows), _step3; !(_step3 = _iterator3()).done;) {\n var row = _step3.value;\n for (var _iterator4 = _createForOfIteratorHelperLoose(row), _step4; !(_step4 = _iterator4()).done;) {\n var _cell = _step4.value;\n values = values.concat(marked.walkTokens(_cell.tokens, callback));\n }\n }\n break;\n }\n case 'list':\n {\n values = values.concat(marked.walkTokens(token.items, callback));\n break;\n }\n default:\n {\n if (marked.defaults.extensions && marked.defaults.extensions.childTokens && marked.defaults.extensions.childTokens[token.type]) {\n // Walk any extensions\n marked.defaults.extensions.childTokens[token.type].forEach(function (childTokens) {\n values = values.concat(marked.walkTokens(token[childTokens], callback));\n });\n } else if (token.tokens) {\n values = values.concat(marked.walkTokens(token.tokens, callback));\n }\n }\n }\n };\n for (var _iterator = _createForOfIteratorHelperLoose(tokens), _step; !(_step = _iterator()).done;) {\n _loop4();\n }\n return values;\n};\n\n/**\n * Parse Inline\n * @param {string} src\n */\nmarked.parseInline = parseMarkdown(Lexer.lexInline, Parser.parseInline);\n\n/**\n * Expose\n */\nmarked.Parser = Parser;\nmarked.parser = Parser.parse;\nmarked.Renderer = Renderer;\nmarked.TextRenderer = TextRenderer;\nmarked.Lexer = Lexer;\nmarked.lexer = Lexer.lex;\nmarked.Tokenizer = Tokenizer;\nmarked.Slugger = Slugger;\nmarked.Hooks = Hooks;\nmarked.parse = marked;\nvar options = marked.options;\nvar setOptions = marked.setOptions;\nvar use = marked.use;\nvar walkTokens = marked.walkTokens;\nvar parseInline = marked.parseInline;\nvar parse = marked;\nvar parser = Parser.parse;\nvar lexer = Lexer.lex;\n\nexports.Hooks = Hooks;\nexports.Lexer = Lexer;\nexports.Parser = Parser;\nexports.Renderer = Renderer;\nexports.Slugger = Slugger;\nexports.TextRenderer = TextRenderer;\nexports.Tokenizer = Tokenizer;\nexports.getDefaults = getDefaults;\nexports.lexer = lexer;\nexports.marked = marked;\nexports.options = options;\nexports.parse = parse;\nexports.parseInline = parseInline;\nexports.parser = parser;\nexports.setOptions = setOptions;\nexports.use = use;\nexports.walkTokens = walkTokens;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","export default class UserContactsService {\n \n constructor(apiUrl) {\n this._apiUrl = apiUrl;\n this.addContact = this.addContact.bind(this);\n this.removeContact = this.removeContact.bind(this);\n }\n \n addContact(contactId) {\n const apiUrl = this._apiUrl;\n return new Promise ((res, rej) => {\n $.ajax({\n type: \"POST\", \n url: `${apiUrl}/${contactId}`, \n success: (data, textStatus, xhr)=> {\n res();\n },\n error: (xhr, textStatus, err) => {\n rej(err);\n }\n });\n });\n }\n \n removeContact(contactId) {\n const apiUrl = this._apiUrl;\n return new Promise ((res, rej) => {\n $.ajax({\n type: \"DELETE\",\n url: `${apiUrl}/${contactId}`,\n success: (data, textStatus, xhr)=> {\n res();\n },\n error: (xhr, textStatus, err) => {\n rej(err);\n }\n });\n });\n }\n}","\nexport default {\n\n onDocumentReady: function (window, document) {\n\n // Lazy load stylesheets\n requestAnimationFrame(function () {\n var stylesheets = document.querySelectorAll(\"link[as=style]\");\n\n for (var i = 0; i < stylesheets.length; i++) {\n var link = stylesheets[i];\n link.setAttribute(\"rel\", \"stylesheet\");\n link.removeAttribute(\"as\");\n }\n });\n\n // Lazy load images/iframes\n window.addEventListener(\"load\", function () {\n\n var timer,\n images,\n viewHeight;\n\n function init() {\n images = document.body.querySelectorAll(\"[data-src]\");\n viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight);\n\n lazyload(0);\n }\n\n function scroll() {\n lazyload(200);\n }\n\n function lazyload(delay) {\n if (timer) {\n return;\n }\n\n timer = setTimeout(function () {\n var changed = false;\n\n requestAnimationFrame(function () {\n for (var i = 0; i < images.length; i++) {\n var img = images[i];\n var rect = img.getBoundingClientRect();\n\n if (!(rect.bottom < 0 || rect.top - 100 - viewHeight >= 0)) {\n img.onload = function (e) {\n e.target.className = \"loaded\";\n };\n\n img.className = \"notloaded\";\n img.src = img.getAttribute(\"data-src\");\n img.removeAttribute(\"data-src\");\n changed = true;\n }\n }\n\n if (changed) {\n filterImages();\n }\n\n timer = null;\n });\n }, delay);\n }\n\n function filterImages() {\n images = Array.prototype.filter.call(\n images,\n function (img) {\n return img.hasAttribute('data-src');\n }\n );\n\n if (images.length === 0) {\n window.removeEventListener(\"scroll\", scroll);\n window.removeEventListener(\"resize\", init);\n return;\n }\n }\n\n // polyfill for older browsers\n window.requestAnimationFrame = (function () {\n return window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n function (callback) {\n window.setTimeout(callback, 1000 / 60);\n };\n })();\n\n window.addEventListener(\"scroll\", scroll);\n window.addEventListener(\"resize\", init);\n\n init();\n });\n\n $('#BlogSettings_BlogName').on('blur', syncBlogSettings);\n $('#BlogSettings_Description').on('blur', syncBlogSettings);\n\n function syncBlogSettings() {\n var content = JSON.stringify({\n blogName: $('#BlogSettings_BlogName').html(),\n description: $('#BlogSettings_Description').html(),\n //listView: $('#BlogSettings_ListView').val(),\n postsPerPage: parseInt($('#BlogSettings_PostsPerPage').val() || '4')\n });\n var url = window.location.href;\n if (url.indexOf('?') === -1) url += \"?\";\n else url += \"&\";\n url += \"handler=BlogSettings\";\n fetch(url,\n {\n method: \"POST\",\n body: content,\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n }\n\n }\n \n}\n\n","\nexport default {\n appurl: (u) =>{\n return u.replace(/\\~\\//g, window[\"~/\"]); // todo: support relative app root\n },\n\n auto_grow_textarea: (element) => {\n element.style.height = \"5px\";\n element.style.height = (element.scrollHeight + 5) + \"px\";\n },\n\n toProperCase: (s) => {\n if (!s) return s;\n if (s.length === 1) return s.toUpperCase();\n var sb = s[0].toUpperCase();\n sb += s.substr(1);\n return sb;\n },\n\n parseUrlParam: function(paramKey) {\n var url = window.location.href;\n var qs = url.indexOf('?') > -1 ? url.substring(url.indexOf('?') + 1) : null;\n if (!qs) return;\n var params = qs.split('&');\n for (var p = 0; p < params.length; p++) {\n params[p] = params[p].split('=');\n if (paramKey && params[p][0] === paramKey) return params[p][1];\n }\n return params;\n },\n\n exceedsLineCount:function exceedsLineCount(val, lineCount, charsPerLine) {\n if (!lineCount) lineCount = 4;\n if (!charsPerLine) charsPerLine = 40;\n var lines = val.split('\\n');\n if (lines.length > lineCount) return true;\n for (var i=0; i charsPerLine) {\n var newLines = [];\n for (var n=0; n lineCount)\n return true;\n }\n return lines.length > lineCount;\n } \n \n}","import Util from './Util.js'\n\n// Add EasyMDE import\nimport EasyMDE from 'easymde'\n\nexport default {\n onDocumentReady: function (window, document) {\n // File upload\n function handleFileSelect(event) {\n if (window.File && window.FileList && window.FileReader) {\n\n var files = event.target.files;\n\n for (var i = 0; i < files.length; i++) {\n var file = files[i];\n\n // Only image uploads supported\n if (!file.type.match('image'))\n continue;\n\n var reader = new FileReader();\n reader.addEventListener(\"load\", function (event) {\n var image = new Image();\n image.alt = file.name;\n image.onload = function (e) {\n image.setAttribute(\"data-filename\", file.name);\n image.setAttribute(\"width\", image.width.toString());\n image.setAttribute(\"height\", image.height.toString());\n window.tinymce.activeEditor.execCommand('mceInsertContent', false, image.outerHTML);\n };\n image.src = this.result;\n\n });\n\n reader.readAsDataURL(file);\n }\n\n document.body.removeChild(event.target);\n }\n else {\n console.log(\"Your browser does not support File API\");\n }\n }\n\n // remove empty strings\n function removeEmpty(item) {\n var trimmedItem = item.trim();\n if (trimmedItem.length > 0) {\n return trimmedItem;\n }\n }\n\n // edit form\n var edit = document.getElementById(\"EditForm\");\n var editPost = document.getElementById(\"BlogPost_Content_Html\");\n\n if (edit && editPost) {\n // Replace SimpleMDE with EasyMDE\n var markdownEditor = new EasyMDE({\n element: document.getElementById(\"BlogPost_Content_Markdown\"),\n spellChecker: false,\n autofocus: false,\n status: ['lines', 'words'],\n renderingConfig: {\n singleLineBreaks: false,\n codeSyntaxHighlighting: true,\n },\n toolbar: [\n 'bold', 'italic', 'heading', '|',\n 'quote', 'unordered-list', 'ordered-list', '|',\n 'link', 'image', '|',\n 'preview', 'side-by-side', 'fullscreen', '|',\n 'guide'\n ]\n });\n $('#BlogPost_Content_Markdown').data('editor', markdownEditor);\n\n // Mobile editor config remains the same\n if (typeof window.orientation !== \"undefined\" || navigator.userAgent.indexOf('IEMobile') !== -1) {\n window.tinymce.init({\n selector: '#BlogPost_Content_Html',\n theme: 'silver', // Updated from 'modern' to 'silver' for v6\n mobile: {\n theme: 'mobile',\n plugins: ['autosave', 'lists', 'autolink'],\n toolbar: ['undo', 'bold', 'italic', 'styleselect']\n }\n });\n } else {\n // Updated TinyMCE v6 configuration\n var imageUploadUrl = window.location.href;\n imageUploadUrl = imageUploadUrl.substr(0, imageUploadUrl.toLowerCase().indexOf(\"/blog\")) + \"/Blog/Image\";\n \n window.tinymce.init({\n selector: '#BlogPost_Content_Html',\n promotion: false, // Removes \"Powered by TinyMCE\" branding\n plugins: [\n 'preview', 'importcss', 'searchreplace', 'autolink', \n 'autoresize', 'autosave', 'save', 'directionality', \n 'code', 'visualblocks', 'visualchars', 'fullscreen',\n 'image', 'link', 'media', 'codesample', 'table',\n 'charmap', 'pagebreak', 'nonbreaking', 'anchor',\n 'insertdatetime', 'advlist', 'lists', 'wordcount',\n 'help', 'quickbars', 'emoticons'\n ],\n menubar: 'file edit view insert format tools table help',\n toolbar: [\n 'undo redo | formatselect | bold italic underline strikethrough |',\n 'alignleft aligncenter alignright alignjustify |',\n 'outdent indent | numlist bullist |',\n 'forecolor backcolor removeformat |',\n 'pagebreak | charmap emoticons |',\n 'fullscreen preview save print |',\n 'image media link codesample | ltr rtl'\n ].join(' '),\n toolbar_sticky: true,\n autoresize_bottom_margin: 100,\n font_formats: 'Patua One=Patua One;Lato=Lato;Times New Roman=times new roman;Monospace=Consolas,monospace;',\n content_style: '@import url(\\'https://fonts.googleapis.com/css?family=Patua+One\\');body { font-family: \\'Lato\\', sans-serif; } h1,h2,h3,h4,h5,h6 { font-family: \\'Patua One\\', sans-serif; } img {max-width: 100%;}',\n image_advtab: true,\n importcss_append: true,\n height: 600,\n image_caption: true,\n quickbars_selection_toolbar: 'bold italic | quicklink h2 h3 blockquote quickimage quicktable',\n quickbars_insert_toolbar: 'quickimage quicktable',\n contextmenu: 'link image table',\n images_upload_url: imageUploadUrl,\n images_upload_credentials: true,\n relative_urls: false,\n setup: function(editor) {\n editor.on('change', function(e) {\n onEditing('Html');\n });\n editor.on('init', () => {\n editor.editorManager.i18n.add('en', {\n 'System Font': 'Font'\n });\n });\n },\n init_instance_callback: function(editor) {\n $('#BlogPost_Content_Html').data('editor', editor);\n }\n });\n }\n\n // Delete post\n var deleteButton = edit.querySelector(\".delete\");\n if (deleteButton) {\n deleteButton.addEventListener(\"click\", function (e) {\n if (!confirm(\"Are you sure you want to delete the post?\")) {\n e.preventDefault();\n }\n });\n }\n }\n\n // Tag input enhancement - using autocomplete input\n var selecttag = document.getElementById(\"selecttag\");\n var categories = document.getElementById(\"BlogPost_Categories\");\n if (selecttag && categories) {\n\n selecttag.onchange = function () {\n\n var phv = selecttag.placeholder;\n var val = selecttag.value.toLowerCase();\n\n var phv_array = phv.split(\",\").map(function (item) {\n return removeEmpty(item);\n }).filter(function (item) { return !!item; });\n\n var val_array = val.split(\",\").map(function (item) {\n return removeEmpty(item);\n }).filter(function (item) { return !!item; });\n\n for (var j = val_array.length - 1; j >= 0; j--) {\n var v = val_array[j];\n var flag = false;\n for (var i = phv_array.length - 1; i >= 0; i--) {\n if (phv_array[i] === v) {\n phv_array.splice(i, 1);\n flag = true;\n }\n }\n if (!flag) {\n phv_array.push(v);\n }\n }\n\n selecttag.placeholder = phv_array.join(\",\");\n categories.value = selecttag.placeholder;\n selecttag.value = \"\";\n };\n }\n var mdeditor;\n var mceeditor;\n $('#BlogPost_Content_Plain').on('change keypress', function() { onEditing('Plain') });\n function onEditing(format) {\n if ($(\"#BlogPost_Format\").data('isChanging')) return;\n $('#FormatSelector').data('restoreValueMarkdown', null);\n $('#FormatSelector').data('restoreValueHtml', null);\n $('#FormatSelector').data('restoreValuePlain', null);\n }\n \n $('#BlogPost_Title').on('focus', function () { $(this).data('origval', $(this).val()) });\n function refineSlug(slugPre) {\n var slug = '';\n for (var i = 0; i < slugPre.length; i++) {\n var c = slugPre[i].toLowerCase();\n if ('abcdefghijklmnopqrstuvwxyz0123456789'.indexOf(c) > -1) slug += c;\n else slug += \"-\";\n }\n while (slug.indexOf('--') > -1) slug = slug.replace(/--/g, '-');\n return slug;\n }\n $('#BlogPost_Title').on('blur', function() {\n if ($(this).val() && (!$('#BlogPost_Slug').val() || $('#BlogPost_Slug').val() === refineSlug($(this).data('origval')))) {\n var slug = refineSlug($(this).val());\n $('#BlogPost_Slug').val(slug);\n }\n });\n\n var format = $(\"#BlogPost_Format\").val();\n var loading = true;\n $('#FormatSelector .nav-link[data-format=\"' + format + '\"]').tab('show');\n setTimeout(function() { loading = false; }, 250);\n $('#FormatSelector .nav-link').on('hide.bs.tab', function () {\n $(\"#BlogPost_Format\").data('isChanging', true);\n $('#FormatSelector').data('activeTab', $(this).data('format'));\n });\n\n var plain = $('#BlogPost_Content_Plain');\n setTimeout(function() { Util.auto_grow_textarea(plain[0]); }, 200);\n $('#FormatSelector .nav-link').on('show.bs.tab', function () {\n if (!mdeditor) {\n mdeditor = $('#BlogPost_Content_Markdown').data('editor');\n mdeditor.codemirror.on(\"change\", function () {\n onEditing('Markdown');\n });\n }\n mceeditor = mceeditor || $('#BlogPost_Content_Html').data('editor');\n if (loading) {\n loading = false;\n return;\n }\n\n var $prevTab = $('#FormatSelector .nav-link[data-format=\"' + $('#FormatSelector').data('activeTab') + '\"]');\n var prevFormat = $prevTab.data('format');\n var $selectedTab = $(this);\n var selectedFormat = $selectedTab.data('format');\n $('#FormatSelector').data('activeTab', $(this).data('format'));\n var valueMarkdown;\n var valueHtml;\n var valueText;\n var restoreValue;\n switch (prevFormat) {\n case \"Markdown\":\n valueMarkdown = mdeditor.value();\n mdeditor.restoreValue = restoreValue = valueMarkdown;\n valueHtml = mdeditor.options.previewRender(valueMarkdown);\n valueText = $(valueHtml).text();\n break;\n case \"Html\":\n valueHtml = mceeditor.getContent();\n mceeditor.restoreValue = restoreValue = valueHtml;\n valueMarkdown = valueHtml;\n valueText = $(valueHtml).text();\n break;\n case \"Plain\":\n valueText = plain.val();\n plain.data('restoreValue', restoreValue = valueText);\n valueMarkdown = valueText;\n valueHtml = valueText.replace(/\\n/g, '\\n
');\n break;\n\n }\n $('#FormatSelector').data('restoreValue' + prevFormat, restoreValue);\n switch (selectedFormat) {\n case 'Markdown':\n switch (prevFormat) {\n case 'Markdown':\n break;\n case 'Html':\n mdeditor.value($('#FormatSelector').data('restoreValueMarkdown') || valueText);\n break;\n case 'Plain':\n mdeditor.value($('#FormatSelector').data('restoreValueMarkdown') || valueText);\n break;\n }\n setTimeout(function () { mdeditor.codemirror.refresh(); }, 250);\n break;\n case 'Html':\n switch (prevFormat) {\n case 'Markdown':\n case 'Plain':\n mceeditor.setContent($('#FormatSelector').data('restoreValueHtml') || valueHtml);\n break;\n case 'Html':\n break;\n }\n break;\n case 'Plain':\n plain.val($('#FormatSelector').data('restoreValueText') || valueText);\n setTimeout(function() {Util.auto_grow_textarea(plain[0]);}, 250);\n break;\n }\n $(\"#BlogPost_Format\").data('isChanging', false);\n });\n\n var $excerpt = $('#BlogPost_Excerpt');\n function syncContent() {\n var format = $('#FormatSelector .active').data('format');\n $(\"#BlogPost_Format\").val(format);\n var source;\n var markup;\n switch (format) {\n case 'Markdown':\n mdeditor = mdeditor || $('#BlogPost_Content_Markdown').data('editor');\n source = mdeditor.value();\n markup = mdeditor.options.previewRender(source);\n break;\n case 'Html':\n mceeditor = mceeditor || $('#BlogPost_Content_Html').data('editor');\n source = mceeditor.getContent();\n markup = source;\n break;\n case 'Plain':\n source = $('#BlogPost_Content_Plain').val();\n markup = '' + source + '
';\n break;\n }\n $('#BlogPost_ContentSource').val(source);\n $('#BlogPost_Content').val(markup);\n if (!$excerpt.data('gen') && !$('' + $excerpt.val() + '').text())\n $('#ExcerptGenerate').click();\n }\n $('#EditForm').on('submit', function () {\n syncContent();\n });\n\n $(\"#ExcerptGenerate\").click(function() {\n $excerpt.data('gen', true);\n syncContent();\n let excerpt = $($('#BlogPost_Content').val()).text().replace(/\\s+/g, ' ');\n if (excerpt.length > 2000) {\n excerpt = excerpt.substr(0, 1997) + \"...\";\n if (excerpt.lastIndexOf('. ') > 1500) {\n excerpt = excerpt.substr(0, excerpt.lastIndexOf('. ')) + '.';\n }\n }\n $excerpt.val(excerpt);\n $excerpt.data('gen', null);\n });\n\n }\n}\n","export default {\n \n showAlert: (msg, title) => {\n title = title || \"Alert\";\n const $msgModal = $(`\n \n \n \n `);\n $msgModal.modal();\n }\n\n}","export default {\n playMessageSound: function() {\n const audio = document.getElementById(\"messageSound\");\n audio.play().catch((e) => {\n function pingOnInteract() {\n audio.play();\n $(document.body).unbind('click keydown keyup', pingOnInteract);\n }\n\n $(document.body).bind('click keydown keyup', pingOnInteract);\n });\n },\n \n setupNotifications: function() {\n const $notificationsTool = $('#NotificationsTool');\n const $notificationsPopup = $notificationsTool.find('.dropdown-menu');\n $notificationsTool.on('show.bs.dropdown', function() {\n const notifTemplate = ``;\n const noNotificationsTemplate = `No notifications`;\n let notifications = $notificationsTool.data('notifications');\n if (notifications && notifications.length > 0) {\n $notificationsPopup.html('');\n for (var n = 0; n < notifications.length; n++) {\n (function(notif) {\n var $notif = $(notifTemplate);\n $notif.data('notification', notif);\n $notif.html(notif.description);\n $notif.attr('data-created', notif.dateCreated);\n $notif.attr('href', notif.viewUrl);\n $notificationsPopup.append($notif);\n let $viewed = $('');\n if (notif.isRead) $viewed.prop('checked', true).attr('readonly', true).prop('disabled', true);\n function markAsViewed() {\n fetch(globalThis['~/'] + 'api/Notifications/markAsRead/' + notif.id, {method: \"POST\"});\n $(this).attr('readonly', true).prop('disabled', true);\n }\n $viewed.on('change', markAsViewed);\n $notif.find('a').on('click', markAsViewed);\n $notif.prepend($viewed);\n\n }(notifications[n]));\n }\n fetch(globalThis['~/'] + 'api/Notifications/clear', {method: 'POST'})\n .then(()=>{\n var $badge = $('#NotificationsTool span.badge');\n $badge.text('0').hide();\n });\n } else {\n $notificationsPopup.html('No notifications');\n }\n });\n\n window.ndc.notifications.updateNotificationsBadge();\n window.ndc.updateNotificationsBadgeInterval = setInterval(function() {\n window.ndc.notifications.updateNotificationsBadge();\n }, 30000);\n\n },\n getNotifications: function(p, callback) {\n var {count, id} = p;\n var url = globalThis['~/'] + 'api/Notifications';\n if (id) {\n url += '?bid=' + id + '&ack=1';\n }\n fetch(url).then(j=>j.json().then((d)=>callback(d)));\n },\n updateNotificationsBadge: function() {\n this.getNotifications({count: 5}, function(data) {\n const { unacknowledged, notifications } = data;\n const $notificationsTool = $('#NotificationsTool');\n const $badge = $('#NotificationsTool span.badge');\n\n $badge.data('username', data.username);\n var existingText = $badge.text();\n $badge.text(unacknowledged);\n if (unacknowledged===0) $badge.hide();\n else $badge.show();\n\n $notificationsTool.data('notifications', notifications);\n });\n }\n}","import Util from './Util.js';\nimport Notifications from \"./Notifications.js\";\n\nlet ndc = window.ndc;\n\nconst messaging = {\n\n setupChatNotifications: function() {\n var $MessagesTool = $('#MessagesTool');\n $MessagesTool.click(function () {\n var url = Util.appurl('~/Messages');\n var username = $(this).find('span.badge').data('username');\n if (username) url += \"?tu=\" + username;\n window.location.href = url;\n });\n $('#MessagesTool span.badge').hide();\n \n window.ndc.messaging.updateMessagesBadge();\n window.ndc.updateMessagesBadgeInterval = setInterval(function () {\n window.ndc.messaging.updateMessagesBadge();\n }, 30000);\n \n },\n \n updateMessagesBadge: function () {\n fetch(Util.appurl('/api/QuickMessage/Chat/UnreadNotif'))\n .then((x) => x.json().then((d) => {\n var c = d.count;\n var $badge = $('#MessagesTool span.badge');\n $badge.data('username', d.username);\n var existingText = $badge.text();\n if (existingText !== (c || 0).toString()) {\n $badge.text(c);\n if (c > 0) {\n $badge.show();\n if (localStorage.getItem(\"unreadNotifCount\") != c) {\n Notifications.playMessageSound();\n localStorage.setItem(\"unreadNotifCount\", c);\n }\n } else {\n localStorage.removeItem(\"unreadNotifCount\");\n $badge.hide();\n }\n }\n }));\n }\n};\n\nexport default messaging;","import Util from './Util.js';\nimport './showdown.min.js';\n\nlet showdown = window.showdown;\nlet ndc = window.ndc;\nconst anyUrlRegex = /(https?:\\/\\/)?(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,4}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)/;\nconst stream = {\n\n retrievalCount: 15,\n markdownConverter: null, // assigned in setupStream\n setupStream: function (form) {\n showdown = showdown || window.showdown;\n ndc = ndc || window.ndc;\n const $privacyLabel = $('#PrivacyLabel');\n const $privacy = $('#Privacy');\n const $form = $(form);\n const $textarea = $('#StreamTextInput');\n const $superbox = $('#SuperBox');\n stream.markdownConverter = new showdown.Converter();\n $textarea.attr('placeholder', stream.getInputPlaceholder());\n function onPrivacyLabelClick(e) {\n $(this).hide();\n $privacy.show();\n if (e.target === $privacy[0])\n $privacy.focus();\n }\n function onPrivacyBlur() {\n $(this).hide();\n $privacyLabel.show().text(Util.toProperCase($privacy.find('option:selected').text()));\n if ($privacyLabel.text().indexOf('(') > -1)\n $privacyLabel.text(Util.toProperCase($privacyLabel.text().match(/\\((.+)\\)/)[1]));\n else $privacyLabel.text(Util.toProperCase($privacyLabel.text().match(/([\\b\\w\\/]+)$/)[1]));\n }\n $privacyLabel.on('click', onPrivacyLabelClick);\n $privacy.on('blur', onPrivacyBlur);\n $privacy.blur();\n let frmAction = $form.attr('action');\n frmAction = window['~/'] + (frmAction || 'N/A').substr(1);\n $form.attr('action', frmAction);\n\n $textarea.on('focus', function (e) {\n $(this).data('placeholder', $(this).attr('placeholder')).attr('placeholder', '');\n onPrivacyLabelClick.call($privacyLabel[0], e);\n });\n $textarea.on('blur', function (e) {\n $(this).attr('placeholder', $(this).data('placeholder')).data('placeholder', null);\n setTimeout(function() {\n if (!$privacy.is(':focus'))\n onPrivacyBlur.call($privacy[0], e);\n }, 50)\n });\n const $submitbutton = $form.find('button[type=\"submit\"]');\n $submitbutton.on('mouseover', function () {\n $(this).data('ismouseover', true);\n });\n $submitbutton.on('mouseout', function () {\n $(this).data('ismouseover', false);\n });\n function handleSuperboxKeyPress(e) {\n let postType = $superbox.data('postType') || 'Microblog';\n var val = $(this).val();\n if (postType === 'Microblog') {\n if ($textarea.data('debounce')) clearTimeout($textarea.data('debounce'));\n $textarea.data('debounce', setTimeout(()=>{\n postType = $superbox.data('postType') || 'Microblog';\n if (postType !== 'Microblog') return;\n // check for URL link\n let urlMatch = anyUrlRegex.exec(val);\n if (urlMatch && urlMatch.length > 0) {\n let url = urlMatch[0];\n var lookup = window['~/'] + 'api/ExternalUrlLookup?url=' + encodeURIComponent(url);\n\n // ignore if previously rejected\n if ($superbox.data('linkMeta') && $superbox.data('linkMeta').url === url)\n {\n return;\n }\n else {\n renderSuperboxAsExternalLink(url, lookup);\n } \n }\n\n }, 750));\n }\n switch (postType) {\n case 'Microblog':\n handleMicroblogKeyPress();\n break;\n }\n setTimeout(function () {\n Util.auto_grow_textarea($textarea[0]);\n }, 500);\n }\n function handleMicroblogKeyPress() {\n var val = $textarea.val();\n Util.auto_grow_textarea($textarea[0]);\n if (!val) $textarea.removeClass('populated');\n else $textarea.addClass('populated');\n if (Util.exceedsLineCount(val)) $textarea.addClass('verbose');\n else $textarea.removeClass('verbose');\n }\n \n $textarea.on('keypress keyup change', handleSuperboxKeyPress);\n \n function renderSuperboxAsExternalLink(url, lookup) {\n var postType = 'ExternalLink';\n $superbox.data('postType', postType);\n $textarea.removeClass('verbose');\n $textarea.addClass('caption');\n Util.auto_grow_textarea($textarea[0]);\n\n let $urlPreview = $(`\n `);\n\n function revertToMicroblog() {\n $superbox.data('postType', 'Microblog');\n $urlPreview.remove();\n $textarea.removeClass('caption');\n handleMicroblogKeyPress();\n }\n\n $textarea.after($urlPreview);\n $urlPreview.find('.close').on('click', function(){revertToMicroblog();});\n fetch(lookup, {method: 'GET'})\n .then(extUrlContent=>extUrlContent.json().then(function(srcmeta){\n var data = {url: url};\n var images = [];\n for (var m=0; m 0 ? (data[\"og:image\"] = images[0].src) : null);\n if (!image) {\n image = ((data.contentType || '').split('/')[0] === 'image' ? url : image);\n if (image) data['og:image'] = image;\n }\n var imageWidth = data[\"og:image:width\"] || (images.length > 0 ? images[0].width : 100) || 100;\n var imageHeight = data[\"og:image:height\"] || (images.length > 0 ? images[0].height : 100) || 100;\n var type = data[\"og:type\"];\n var videoType = data[\"og:video:type\"];\n var videoUrl = data[\"og:video:url\"];\n var videoWidth = data[\"og:video:width\"];\n var videoHeight = data[\"og:video:height\"];\n\n $superbox.data('linkMeta', data);\n\n $superbox.find('.preview-placeholder').remove();\n $superbox.find('.external-link-content-title').show().find('input').val(title);\n $superbox.find('.external-link-content-description').show().find('textarea').val(description.replace(/\\n/g, '\\n
'));\n if (image) {\n var $imgcontainer = $superbox.find('.external-link-preview-thumb');\n var $img = $imgcontainer.find('img').attr('src', image);\n if (imageWidth > 100 || imageHeight > 100) {\n var ratio = imageWidth / imageHeight;\n imageWidth = 100;\n imageHeight = 100 / ratio;\n }\n $img.css('width', imageWidth);\n $img.css('height', imageHeight);\n \n if (!data[\"og:image:width\"] || !data[\"og:image:height\"]) {\n $img.css({width:'', height: ''}).on('load', function() {\n data[\"og:image:width\"] = imageWidth = $img.width().toString();\n data[\"og:image:height\"] = imageHeight = $img.height().toString();\n var ratio = imageWidth / imageHeight;\n imageWidth = 100;\n imageHeight = 100 / ratio;\n $img.css('width', imageWidth);\n $img.css('height', imageHeight);\n })\n \n }\n \n $imgcontainer.show();\n }\n }))\n .catch((error)=>{\n revertToMicroblog();\n })\n }\n\n function getFormSubmitStreamItemType() {\n return ndc.streamItemTypes[$superbox.data('postType') || 'Microblog'];\n }\n\n $form.on('submit', function (e) {\n e.preventDefault();\n e.stopPropagation();\n let textInputVal = $('#StreamTextInput').val();\n if (!textInputVal) return false;\n $privacy.show();\n $privacyLabel.hide();\n $form.find(':input').addClass('disabled').attr('disabled', true);\n const ownerType = 1;\n let streamItem = {\n streamItemType: getFormSubmitStreamItemType(),\n originatorId: ndc.user.userId,\n ownerId: ndc.user.userId,\n ownerType: ownerType,\n privacy: parseInt($('#Privacy').val())\n };\n switch (streamItem.streamItemType) {\n case ndc.streamItemTypes['Microblog']:\n streamItem.content = textInputVal;\n break;\n case ndc.streamItemTypes['ExternalLink']:\n var linkMeta = $superbox.data('linkMeta');\n streamItem.url = linkMeta.url;\n streamItem.userCaption = textInputVal;\n streamItem.contentTitle = $superbox.find('.external-link-content-title input').val();\n streamItem.contentDescription = $superbox.find('.external-link-content-description textarea').val();\n streamItem.linkType = linkMeta['contentType'] ? linkMeta.contentType : linkMeta['og:video:url'] ? 'video' : 'html';\n streamItem.imageUrl = linkMeta['og:image'];\n streamItem.imageHeight = linkMeta['og:image:height'];\n streamItem.imageWidth = linkMeta['og:image:width'];\n streamItem.videoUrl = linkMeta['og:video:url'];\n streamItem.videoType = linkMeta['og:video:type'];\n streamItem.videoHeight = linkMeta['og:video:height'];\n streamItem.videoWidth = linkMeta['og:video:width'];\n break;\n }\n stream.post(streamItem, function (streamItem) {\n stream.renderStreamItem($('#StreamItems'), streamItem, /*prepend*/true)\n $superbox.data('postType', null);\n $superbox.data('linkMeta', null);\n $superbox.find('.external-link-preview').remove();\n $form.find(':input').removeClass('disabled').removeAttr('disabled');\n $textarea.removeClass('populated').removeClass('verbose').removeClass('caption').val('');\n Util.auto_grow_textarea($textarea[0]);\n });\n $privacy.hide();\n $privacyLabel.show();\n\n return false;\n });\n\n $(window).scroll(function () {\n if ($(window).scrollTop() + $(window).height() >= $(document).height() - 50) {\n var $streamItemsContainer = $('.stream-items');\n if ($streamItemsContainer.data('querying')) return;\n try {\n $streamItemsContainer.data('querying', true);\n var $streamItems = $('.stream-items .stream-item');\n var $lastItem = $($streamItems[$streamItems.length - 1]);\n var lastStreamItem = $lastItem.data('streamItem');\n var streamType = stream.loadStream.streamType;\n var targetUserId = stream.loadStream.targetUserId;\n stream.loadStream(streamType, (lastStreamItem || {}).id, targetUserId, function () {\n $streamItemsContainer.data('querying', false);\n });\n } catch (error) {\n console.error(error);\n $streamItemsContainer.data('querying', false);\n }\n }\n });\n },\n\n loadProfileStream: function (from, targetUserId, callback) {\n stream.loadStream('profile', from, targetUserId, callback);\n },\n\n loadAggregateStream: function (from, callback) {\n stream.loadStream('aggregate', from, null, callback);\n },\n\n loadStream: function (streamType, from, targetUserId, callback) {\n stream.loadStream.streamType = streamType;\n stream.loadStream.targetUserId = targetUserId;\n const $streamItems = $('#StreamItems');\n let url, region;\n\n function prepToken(u) {\n if (u.indexOf('?') === -1) u += '?';\n else u += \"&\";\n return u;\n }\n\n switch (streamType) {\n case 'profile':\n url = window['~/'] + 'api/stream/user/' + targetUserId + '?count=' + stream.retrievalCount;\n const siid = Util.parseUrlParam('siid');\n if (!!siid) {\n url = prepToken(url) + \"id=\" + siid;\n } else if (!!from) {\n url = prepToken(url) + \"before=\" + from;\n }\n break;\n case 'aggregate':\n url = window['~/'] + 'api/stream?count=' + stream.retrievalCount;\n region = Util.parseUrlParam('region');\n if (!!from) {\n url = prepToken(url) + \"before=\" + from;\n }\n if (!!region) {\n url = prepToken(url) + \"region=\" + encodeURIComponent(region);\n }\n break;\n default:\n throw new Error(\"Unsupported streamType: \" + streamType);\n }\n url = prepToken(url) + \"_nocache=\" + new Date().valueOf();\n const siid = Util.parseUrlParam('siid');\n if (!!siid) {\n url = prepToken(url) + \"id=\" + siid;\n } else if (!!from) {\n url = prepToken(url) + \"before=\" + from;\n }\n\n url = prepToken(url) + \"_nocache=\" + new Date().valueOf()\n $streamItems.append($('
'));\n\n function renderStream(streamItems) {\n const $streamItems = $('#StreamItems');\n stream.renderStream($streamItems, streamItems);\n }\n\n fetch(url).then((x) => x.json().then((j) => {\n renderStream(j);\n if (j.length > 0) {\n $(\".not-a-member\").hide();\n }\n $streamItems.find('.loading-anim').remove();\n if (callback) callback();\n }));\n },\n\n getInputPlaceholder: function () {\n var options = [\n \"Today God's spirit showed me ......\",\n \"God has been so good to me .....\",\n \"Check out this quote from the Bible .....\"\n ];\n var rnd = Math.floor(Math.random() * options.length);\n return options[rnd];\n },\n\n renderStream: function _renderStream(container, streamItems) {\n var $streamItems = $(container);\n for (var i = 0; i < streamItems.length; i++) {\n stream.renderStreamItem($streamItems, streamItems[i]);\n }\n },\n\n renderStreamItem: function _renderStreamItem(container, streamItem, prepend) {\n ndc = ndc || window.ndc;\n var $streamItems = $(container);\n var streamItemType = ndc.streamItemTypes[streamItem.streamItemType];\n var $item;\n switch (streamItemType) {\n case 'Microblog':\n $item = stream.renderMicroblogItem(streamItem);\n break;\n case 'ExternalLink':\n $item = stream.renderExternalLink(streamItem);\n break;\n }\n if (!$item) return;\n $item.find('.stream-item-action-button').on('click', stream.$streamItemContextMenu);\n if (prepend) $streamItems.prepend($item);\n else $streamItems.append($item);\n stream.autoUpdateTimestamp($item);\n },\n\n renderMicroblogItem: function _renderMicroblogItem(streamItem) {\n var $container = $('');\n var $heading = stream.renderStreamItemHeading(streamItem);\n $container.append($heading);\n\n // content\n var $content = $('');\n $content.text(streamItem.content.replace(/\\r/g, '')\n .replace(/( *\\n)( *\\n)+/g, '\\n\\n')\n .replace(/( *\\n)( *\\n)+/g, '\\n\\n'));\n streamItem.contentSource = $content.html().replace(/\\n/g, '\\n
');\n let html = stream.markdownConverter.makeHtml($content.html());\n $content.html(html);\n if (Util.exceedsLineCount($content.text())) $content.addClass('verbose');\n\n\n $container.append($content);\n var $footer = stream.renderStreamItemFooter(streamItem);\n $container.append($footer);\n for (const prop in streamItem) {\n if (prop !== 'content') {\n $container.attr('data-' + prop, streamItem[prop]);\n }\n }\n $container.data('streamItem', streamItem);\n return $container\n },\n\n renderExternalLink: function _renderExternalLink(streamItem) {\n var $container = $('');\n var $heading = stream.renderStreamItemHeading(streamItem);\n $container.append($heading);\n\n // content\n var $content = $(`\n \n \n \n \n
\n \n \n \n \n `);\n var $caption = $content.find('.stream-item-caption');\n var caption = streamItem.userCaption;\n if (caption.length >= streamItem.url.length && caption.indexOf(streamItem.url) === caption.length - streamItem.url.length)\n caption = caption.substr(0, caption.length - streamItem.url.length);\n $caption.text(caption.replace(/\\r/g, '')\n .replace(/( *\\n)( *\\n)+/g, '\\n\\n')\n .replace(/( *\\n)( *\\n)+/g, '\\n\\n'));\n $caption.html($caption.html().replace(/\\n/g, '\\n
'));\n let $contentDescription = $content.find('.content-description');\n $contentDescription.html($contentDescription.html().replace(/\\n/g, '\\n
'));\n var $img = $content.find('.external-link-detail img');\n if (!streamItem.imageUrl) $img.remove();\n else if (streamItem.imageWidth && streamItem.imageHeight) {\n var ratio = streamItem.imageWidth / streamItem.imageHeight;\n var ratio = imageWidth / imageHeight;\n var imageWidth = 140;\n var imageHeight = 140 / ratio;\n $img.css('width', imageWidth);\n $img.css('height', imageHeight);\n }\n switch (streamItem.linkType.split('/')[0]) {\n case 'image':\n // todo: replace contents of external-link-detail with basically the whole image, fit to width\n break;\n case 'video':\n var $playbackOverlay = $('
');\n $img.before($playbackOverlay);\n break;\n }\n\n $container.append($content);\n var $footer = stream.renderStreamItemFooter(streamItem);\n $container.append($footer);\n for (const prop in streamItem) {\n if (prop !== 'content') {\n $container.attr('data-' + prop, streamItem[prop]);\n }\n }\n $container.data('streamItem', streamItem);\n return $container\n },\n\n renderStreamItemHeading: function renderStreamItemHeading(streamItem) {\n var timestamp = moment.utc(streamItem.timestamp).local();\n var ts = timestamp.fromNow() + \" (\" + timestamp.calendar() + \")\";\n var profileHref = window['~/'] + 'Users/' + (streamItem.originatorUsername.indexOf('@') === -1 ? streamItem.originatorUsername : streamItem.originatorId);\n var streamItemHref = window['~/'] + 'Users/' + streamItem.originatorId + '?siid=' + streamItem.id;\n var editDate = !!streamItem.editedDate ? `Edited` : '';\n var $heading = $(``);\n $heading.find('.stream-item-originator-name-link').text(streamItem.originatorFullName);\n return $heading;\n },\n\n renderStreamItemFooter: function renderStreamItemFooter(streamItem) {\n var $footer = $(' ');\n return $footer;\n },\n\n post: function (streamItem, success) {\n var url = window[\"~/\"] + \"api/stream\";\n fetch(url, {\n method: \"POST\",\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(streamItem)\n }).then((x) => x.json().then((j) => {\n if (success) success(j);\n }));\n },\n\n\n getStreamItem: function ($streamItem) {\n if (!$streamItem.data('streamItem')) {\n $streamItem.data('streamItem', $streamItem.data());\n }\n return $streamItem.data('streamItem');\n },\n\n\n $streamItemContextMenu: function () {\n var $streamItemCtxButton = $(this);\n var $streamItem = $streamItemCtxButton.parents('.stream-item');\n var streamItem = stream.getStreamItem($streamItem);\n var $ctxMenu = $('');\n $streamItem.parents('.stream-items').append($ctxMenu);\n\n function bodyClickHandler(e) {\n if ($(e.target).parent()[0] !== $ctxMenu[0]) {\n closeMenu();\n }\n }\n\n setTimeout(function () {\n $(document.body).on('click', bodyClickHandler);\n }, 0);\n\n function closeMenu() {\n $(document.body).unbind('click', bodyClickHandler);\n $ctxMenu.remove();\n }\n\n if (streamItem.originatorId === ndc.user.userId) {\n\n // edit menu\n var $mnuEdit = $('Edit');\n $ctxMenu.append($mnuEdit);\n $mnuEdit.on('click', function () {\n closeMenu();\n stream.editStreamItemInline($streamItem);\n });\n\n // delete menu\n var $mnuDelete = $('Delete');\n $ctxMenu.append($mnuDelete);\n $mnuDelete.on('click', function () {\n closeMenu();\n stream.showDeleteItemDialog($streamItem);\n });\n\n }\n else if (streamItem.ownerId === ndc.user.userId) {\n\n // delete menu\n var $mnuDelete = $('Delete');\n $ctxMenu.append($mnuDelete);\n $mnuDelete.on('click', function () {\n closeMenu();\n stream.showDeleteItemDialog($streamItem);\n });\n\n }\n else if (ndc.user.isSuperUser) {\n\n // delete menu\n var $mnuDelete = $('Delete');\n $ctxMenu.append($mnuDelete);\n $mnuDelete.on('click', function () {\n closeMenu();\n stream.showDeleteItemDialog($streamItem);\n });\n\n }\n if ($ctxMenu.children().length === 0) {\n $ctxMenu.append($('No actions available for this item'));\n }\n $ctxMenu\n .css('top', ($streamItemCtxButton.offset().top + $ctxMenu.height() - $(window).scrollTop() - 10) + 'px')\n .css('left', ($streamItemCtxButton.offset().left - $ctxMenu.width() + 20) + 'px');\n },\n\n editMicroblogUrl: window[\"~/\"] + 'api/stream/update',\n editExternalLinkStreamItemUrl: window[\"~/\"] + 'api/stream/update',\n\n postEdit: function (streamItem, success) {\n switch (streamItem.streamItemType) {\n case ndc.streamItemTypes[\"Microblog\"]:\n default:\n var url = stream.editMicroblogUrl;\n fetch(url, {\n method: \"POST\",\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(streamItem)\n }).then((x) => x.json().then((j) => {\n if (success) success(j);\n }));\n break;\n }\n },\n\n editStreamItemInline: function ($streamItem) {\n let streamItem = stream.getStreamItem($streamItem);\n let $content = $streamItem.find('.stream-item-content');\n var $ta;\n let $editForm;\n\n function closeEdit() {\n $editForm.before($streamItem);\n $editForm.remove();\n $formControls.remove();\n $content.removeAttr('contentEditable');\n }\n switch (streamItem.streamItemType) {\n case ndc.streamItemTypes[\"Microblog\"]:\n $content.data('rollback', $content.html());\n $ta = $('');\n $ta.attr('class', $content[0].getAttribute('class'));\n $ta.addClass('form-control').addClass('editing');\n $ta.val($('' + streamItem.contentSource + '').text());\n $content.before($ta);\n $content.hide();\n Util.auto_grow_textarea($ta[0]);\n $editForm = $('');\n $streamItem.before($editForm);\n $editForm.append($streamItem);\n var $formControls = $(\n `\n \n \n `);\n var $privacy = $('#Privacy');\n if ($privacy.length > 0 && $privacy[0].tagName.toLowerCase() === 'select') {\n $privacy = $($privacy[0].outerHTML.replace(/ id=/, \" class=\\\"content-privacy\\\" data-id=\"));\n $privacy.find('option[value=\"' + streamItem.privacy + '\"]').attr('selected', true);\n $formControls.find('button[type=\"submit\"]').before($privacy);\n $privacy.show();\n }\n $content.after($formControls);\n\n $formControls.find('button[data-action=\"cancel-edit\"]').on('click', function () {\n $content.html($content.data('rollback'));\n $content.show();\n $ta.remove();\n closeEdit();\n });\n $editForm.on('submit', function (e) {\n e.preventDefault();\n e.stopPropagation();\n $content.text(streamItem.content = $ta.val());\n $ta.remove();\n $content.show();\n let html = stream.markdownConverter.makeHtml($content.html());\n $content.html(html);\n $formControls.find('input,select,.btn').addClass('disabled').prop('disabled', true);\n let $privacy = $streamItem.find('select.content-privacy');\n if ($privacy.length > 0)\n streamItem.privacy = parseInt($privacy.val());\n stream.postEdit(streamItem, function (streamItem) {\n $streamItem.data('streamItem', streamItem);\n $streamItem.find('.stream-item-privacy').text(ndc.streamItemPrivacy[streamItem.privacy]);\n closeEdit();\n var $edited = $streamItem.find('.edited-annotation');\n if ($edited.length === 0) {\n $edited = $('Edited')\n $streamItem.find('.stream-item-timestamp-link').after($edited);\n }\n var timestamp = moment();\n var ts = timestamp.fromNow() + \" (\" + timestamp.calendar() + \")\";\n $edited.attr('title', ts);\n });\n return false;\n });\n $content.html(streamItem.contentSource);\n $content.attr('contentEditable', true);\n $content.focus();\n break;\n case ndc.streamItemTypes[\"ExternalLink\"]:\n var $caption = $content.find('.stream-item-caption');\n $caption.data('rollback', $caption.html());\n $ta = $('');\n $ta.attr('class', $caption[0].getAttribute('class'));\n $ta.addClass('form-control').addClass('editing');\n $ta.val(streamItem.userCaption);\n $caption.before($ta);\n $caption.hide();\n $editForm = $('');\n $streamItem.before($editForm);\n $editForm.append($streamItem);\n var $formControls = $(\n `\n \n \n `);\n var $privacy = $('#Privacy');\n if ($privacy.length > 0 && $privacy[0].tagName.toLowerCase() === 'select') {\n $privacy = $($privacy[0].outerHTML.replace(/ id=/, \" class=\\\"content-privacy\\\" data-id=\"));\n $privacy.find('option[value=\"' + streamItem.privacy + '\"]').attr('selected', true);\n $formControls.find('button[type=\"submit\"]').before($privacy);\n $privacy.show();\n }\n $caption.after($formControls);\n\n $formControls.find('button[data-action=\"cancel-edit\"]').on('click', function () {\n $caption.html($caption.data('rollback'));\n $caption.show();\n $ta.remove();\n closeEdit();\n });\n $editForm.on('submit', function (e) {\n e.preventDefault();\n e.stopPropagation();\n $caption.text(streamItem.userCaption = $ta.val());\n $caption.html($caption.html().replace(/\\n/g, '\\n
'));\n $ta.remove();\n $caption.show();\n $formControls.find('input,select,.btn').addClass('disabled').prop('disabled', true);\n let $privacy = $streamItem.find('select.content-privacy');\n if ($privacy.length > 0)\n streamItem.privacy = parseInt($privacy.val());\n stream.postEdit(streamItem, function (streamItem) {\n $streamItem.data('streamItem', streamItem);\n $streamItem.find('.stream-item-privacy').text(ndc.streamItemPrivacy[streamItem.privacy]);\n closeEdit();\n var $edited = $streamItem.find('.edited-annotation');\n if ($edited.length === 0) {\n $edited = $('Edited')\n $streamItem.find('.stream-item-timestamp-link').after($edited);\n }\n var timestamp = moment();\n var ts = timestamp.fromNow() + \" (\" + timestamp.calendar() + \")\";\n $edited.attr('title', ts);\n });\n return false;\n });\n $ta.focus();\n break;\n }\n },\n\n showDeleteItemDialog: function ($streamItem) {\n var streamItem = stream.getStreamItem($streamItem);\n var $deleteModal = $(`\n \n \n \n `);\n\n $deleteModal\n .find('.btn-danger')\n .on('click', function () {\n function errorHandler(err) {\n alert('An error occurred');\n $deleteModal.modal('hide').modal('dispose')\n }\n\n $deleteModal.find('.modal-content').hide();\n stream.deleteItem(streamItem, function (x) {\n if (!x.ok) {\n errorHandler(new Error(x.statusText));\n return;\n }\n $streamItem.remove();\n $deleteModal.modal('hide').modal('dispose')\n }, errorHandler);\n });\n $deleteModal.modal();\n },\n\n\n deleteItem: function (streamItem, callback, error) {\n fetch(window[\"~/\"] + \"api/stream/\" + streamItem.id, {\n method: 'DELETE'\n }).then(callback).catch(error);\n },\n\n updateTimeStamp: function ($streamItem) {\n var streamItem = stream.getStreamItem($streamItem);\n var timestamp = moment.utc(streamItem.timestamp).local();\n var ts = timestamp.fromNow() + \" (\" + timestamp.calendar() + \")\";\n $streamItem.find('.stream-item-timestamp-link').text(ts);\n },\n\n autoUpdateTimestamp: function ($streamItem) {\n setInterval(function () {\n stream.updateTimeStamp($streamItem);\n }, 30000);\n }\n\n};\n\nexport default stream;","import UserContacts from './UserContacts.js';\nimport UserBlog from './UserBlog.js';\nimport UserBlogEdit from './UserBlogEdit.js';\nimport Util from './Util.js';\nimport UI from './UI.js';\nimport Messaging from './Messaging.js';\nimport Stream from './Stream.js';\nimport Notifications from \"./Notifications.js\";\n\nvar ndc = {...window.ndc,\n \n UserContacts: UserContacts,\n UserBlog: UserBlog,\n UserBlogEdit: UserBlogEdit,\n ui: UI,\n util: Util,\n notifications: Notifications,\n\n onJQueryDocumentReady: () => {\n var $a = $('a[href]');\n for (var i = 0; i < $a.length; i++) {\n var $el = $($a[i]);\n if ($el.attr('href').indexOf('://') > -1 && !$($a[i]).attr('target')) {\n $el.attr('target', '_blank');\n $el.addClass('external-link');\n }\n }\n\n if (!window.ndc.user.userId ||\n window.ndc.user.userId === \"00000000-0000-0000-0000-000000000000\") {\n // anonymous user\n } else {\n \n window.ndc.messaging.setupChatNotifications();\n window.ndc.notifications.setupNotifications();\n \n }\n },\n \n messaging: Messaging,\n\n stream: Stream \n \n}\n\n/*Attach the final ndc object to the window namespace */\nwindow.ndc = ndc;","import UserContactsService from './UserContactsService.js'\n\nexport default class UserContacts\n{\n constructor({apiBaseUrl}) {\n this.userContactsService = new UserContactsService(apiBaseUrl);\n this.onDocumentReady = this.onDocumentReady.bind(this);\n }\n \n onDocumentReady(opts) {\n this._opts = opts || {};\n\n const $toggleContactEl = this._opts.$toggleContactEl = $(opts.toggleContactButtonSelector);\n if (!$toggleContactEl) return;\n\n let profileId = $toggleContactEl.data(\"profile-user\");\n let isAContact = ($toggleContactEl.data(\"is-contact\") || \"\").toLowerCase() === \"true\";\n $toggleContactEl.on(\"click\", (e) => {\n $toggleContactEl.addClass(\"disabled\");\n\n let toggleUserContact = isAContact ? this.userContactsService.removeContact : this.userContactsService.addContact;\n\n toggleUserContact(profileId).then(() => {\n isAContact = !isAContact;\n $toggleContactEl.text(isAContact ? \"Remove Contact\" : \"Add Contact\");\n //TODO: add toast notification with success message\n }).catch((err) => {\n //TODO: add alert dialg with error message\n console.error(err);\n }).finally(() => {\n $toggleContactEl.removeClass(\"disabled\");\n });\n \n return false;\n });\n }\n}"],"names":["e","r","omitExtraWLInCodeBlocks","defaultValue","describe","type","noHeaderId","prefixHeaderId","rawPrefixHeaderId","ghCompatibleHeaderId","rawHeaderId","headerLevelStart","parseImgDimensions","simplifiedAutoLink","excludeTrailingPunctuationFromURLs","literalMidWordUnderscores","literalMidWordAsterisks","strikethrough","tables","tablesHeaderId","ghCodeBlocks","tasklists","smoothLivePreview","smartIndentationFix","description","disableForced4SpacesIndentedSublists","simpleLineBreaks","requireSpaceBeforeHeadingText","ghMentions","ghMentionsLink","encodeEmails","openLinksInNewWindow","backslashEscapesHTMLTags","emoji","underline","completeHTMLDocument","metadata","splitAdjacentBlockquotes","JSON","parse","stringify","t","a","hasOwnProperty","n","valid","error","helper","isArray","s","length","o","i","isString","l","toLowerCase","isUndefined","listeners","filter","regex","c","RegExp","replace","charCodeAt","github","original","ghost","vanilla","allOn","extensions","setOption","this","getOption","getOptions","resetOptions","setFlavor","Error","getFlavor","getFlavorOptions","getDefaultOptions","subParser","extension","stdExtName","getAllExtensions","removeExtension","resetExtensions","validateExtension","console","warn","String","isFunction","toString","call","Array","forEach","escapeCharactersCallback","escapeCharacters","unescapeHTMLEntities","u","indexOf","d","p","h","exec","test","lastIndex","index","_","left","start","end","match","right","wholeMatch","push","matchRecursiveRegExp","slice","replaceRecursiveRegExp","join","regexIndexOf","substring","search","splitAtIndex","encodeEmailAddress","Math","floor","random","padEnd","repeat","alert","log","regexes","asteriskDashAndColon","emojis","ab","abc","abcd","accept","aerial_tramway","airplane","alarm_clock","alembic","alien","ambulance","amphora","anchor","angel","anger","angry","anguished","ant","apple","aquarius","aries","arrow_backward","arrow_double_down","arrow_double_up","arrow_down","arrow_down_small","arrow_forward","arrow_heading_down","arrow_heading_up","arrow_left","arrow_lower_left","arrow_lower_right","arrow_right","arrow_right_hook","arrow_up","arrow_up_down","arrow_up_small","arrow_upper_left","arrow_upper_right","arrows_clockwise","arrows_counterclockwise","art","articulated_lorry","artificial_satellite","astonished","athletic_shoe","atm","atom_symbol","avocado","b","baby","baby_bottle","baby_chick","baby_symbol","back","bacon","badminton","baggage_claim","baguette_bread","balance_scale","balloon","ballot_box","ballot_box_with_check","bamboo","banana","bangbang","bank","bar_chart","barber","baseball","basketball","basketball_man","basketball_woman","bat","bath","bathtub","battery","beach_umbrella","bear","bed","bee","beer","beers","beetle","beginner","bell","bellhop_bell","bento","biking_man","bike","biking_woman","bikini","biohazard","bird","birthday","black_circle","black_flag","black_heart","black_joker","black_large_square","black_medium_small_square","black_medium_square","black_nib","black_small_square","black_square_button","blonde_man","blonde_woman","blossom","blowfish","blue_book","blue_car","blue_heart","blush","boar","boat","bomb","book","bookmark","bookmark_tabs","books","boom","boot","bouquet","bowing_man","bow_and_arrow","bowing_woman","bowling","boxing_glove","boy","bread","bride_with_veil","bridge_at_night","briefcase","broken_heart","bug","building_construction","bulb","bullettrain_front","bullettrain_side","burrito","bus","business_suit_levitating","busstop","bust_in_silhouette","busts_in_silhouette","butterfly","cactus","cake","calendar","call_me_hand","calling","camel","camera","camera_flash","camping","cancer","candle","candy","canoe","capital_abcd","capricorn","car","card_file_box","card_index","card_index_dividers","carousel_horse","carrot","cat","cat2","cd","chains","champagne","chart","chart_with_downwards_trend","chart_with_upwards_trend","checkered_flag","cheese","cherries","cherry_blossom","chestnut","chicken","children_crossing","chipmunk","chocolate_bar","christmas_tree","church","cinema","circus_tent","city_sunrise","city_sunset","cityscape","cl","clamp","clap","clapper","classical_building","clinking_glasses","clipboard","clock1","clock10","clock1030","clock11","clock1130","clock12","clock1230","clock130","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","closed_book","closed_lock_with_key","closed_umbrella","cloud","cloud_with_lightning","cloud_with_lightning_and_rain","cloud_with_rain","cloud_with_snow","clown_face","clubs","cocktail","coffee","coffin","cold_sweat","comet","computer","computer_mouse","confetti_ball","confounded","confused","congratulations","construction","construction_worker_man","construction_worker_woman","control_knobs","convenience_store","cookie","cool","policeman","copyright","corn","couch_and_lamp","couple","couple_with_heart_woman_man","couple_with_heart_man_man","couple_with_heart_woman_woman","couplekiss_man_man","couplekiss_man_woman","couplekiss_woman_woman","cow","cow2","cowboy_hat_face","crab","crayon","credit_card","crescent_moon","cricket","crocodile","croissant","crossed_fingers","crossed_flags","crossed_swords","crown","cry","crying_cat_face","crystal_ball","cucumber","cupid","curly_loop","currency_exchange","curry","custard","customs","cyclone","dagger","dancer","dancing_women","dancing_men","dango","dark_sunglasses","dart","dash","date","deciduous_tree","deer","department_store","derelict_house","desert","desert_island","desktop_computer","male_detective","diamond_shape_with_a_dot_inside","diamonds","disappointed","disappointed_relieved","dizzy","dizzy_face","do_not_litter","dog","dog2","dollar","dolls","dolphin","door","doughnut","dove","dragon","dragon_face","dress","dromedary_camel","drooling_face","droplet","drum","duck","dvd","eagle","ear","ear_of_rice","earth_africa","earth_americas","earth_asia","egg","eggplant","eight_pointed_black_star","eight_spoked_asterisk","electric_plug","elephant","email","envelope_with_arrow","euro","european_castle","european_post_office","evergreen_tree","exclamation","expressionless","eye","eye_speech_bubble","eyeglasses","eyes","face_with_head_bandage","face_with_thermometer","fist_oncoming","factory","fallen_leaf","family_man_woman_boy","family_man_boy","family_man_boy_boy","family_man_girl","family_man_girl_boy","family_man_girl_girl","family_man_man_boy","family_man_man_boy_boy","family_man_man_girl","family_man_man_girl_boy","family_man_man_girl_girl","family_man_woman_boy_boy","family_man_woman_girl","family_man_woman_girl_boy","family_man_woman_girl_girl","family_woman_boy","family_woman_boy_boy","family_woman_girl","family_woman_girl_boy","family_woman_girl_girl","family_woman_woman_boy","family_woman_woman_boy_boy","family_woman_woman_girl","family_woman_woman_girl_boy","family_woman_woman_girl_girl","fast_forward","fax","fearful","feet","female_detective","ferris_wheel","ferry","field_hockey","file_cabinet","file_folder","film_projector","film_strip","fire","fire_engine","fireworks","first_quarter_moon","first_quarter_moon_with_face","fish","fish_cake","fishing_pole_and_fish","fist_raised","fist_left","fist_right","flags","flashlight","fleur_de_lis","flight_arrival","flight_departure","floppy_disk","flower_playing_cards","flushed","fog","foggy","football","footprints","fork_and_knife","fountain","fountain_pen","four_leaf_clover","fox_face","framed_picture","free","fried_egg","fried_shrimp","fries","frog","frowning","frowning_face","frowning_man","frowning_woman","middle_finger","fuelpump","full_moon","full_moon_with_face","funeral_urn","game_die","gear","gem","gemini","gift","gift_heart","girl","globe_with_meridians","goal_net","goat","golf","golfing_man","golfing_woman","gorilla","grapes","green_apple","green_book","green_heart","green_salad","grey_exclamation","grey_question","grimacing","grin","grinning","guardsman","guardswoman","guitar","gun","haircut_woman","haircut_man","hamburger","hammer","hammer_and_pick","hammer_and_wrench","hamster","hand","handbag","handshake","hankey","hatched_chick","hatching_chick","headphones","hear_no_evil","heart","heart_decoration","heart_eyes","heart_eyes_cat","heartbeat","heartpulse","hearts","heavy_check_mark","heavy_division_sign","heavy_dollar_sign","heavy_heart_exclamation","heavy_minus_sign","heavy_multiplication_x","heavy_plus_sign","helicopter","herb","hibiscus","high_brightness","high_heel","hocho","hole","honey_pot","horse","horse_racing","hospital","hot_pepper","hotdog","hotel","hotsprings","hourglass","hourglass_flowing_sand","house","house_with_garden","houses","hugs","hushed","ice_cream","ice_hockey","ice_skate","icecream","id","ideograph_advantage","imp","inbox_tray","incoming_envelope","tipping_hand_woman","information_source","innocent","interrobang","iphone","izakaya_lantern","jack_o_lantern","japan","japanese_castle","japanese_goblin","japanese_ogre","jeans","joy","joy_cat","joystick","kaaba","key","keyboard","keycap_ten","kick_scooter","kimono","kiss","kissing","kissing_cat","kissing_closed_eyes","kissing_heart","kissing_smiling_eyes","kiwi_fruit","koala","koko","label","large_blue_circle","large_blue_diamond","large_orange_diamond","last_quarter_moon","last_quarter_moon_with_face","latin_cross","laughing","leaves","ledger","left_luggage","left_right_arrow","leftwards_arrow_with_hook","lemon","leo","leopard","level_slider","libra","light_rail","link","lion","lips","lipstick","lizard","lock","lock_with_ink_pen","lollipop","loop","loud_sound","loudspeaker","love_hotel","love_letter","low_brightness","lying_face","m","mag","mag_right","mahjong","mailbox","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","man","man_artist","man_astronaut","man_cartwheeling","man_cook","man_dancing","man_facepalming","man_factory_worker","man_farmer","man_firefighter","man_health_worker","man_in_tuxedo","man_judge","man_juggling","man_mechanic","man_office_worker","man_pilot","man_playing_handball","man_playing_water_polo","man_scientist","man_shrugging","man_singer","man_student","man_teacher","man_technologist","man_with_gua_pi_mao","man_with_turban","tangerine","mans_shoe","mantelpiece_clock","maple_leaf","martial_arts_uniform","mask","massage_woman","massage_man","meat_on_bone","medal_military","medal_sports","mega","melon","memo","men_wrestling","menorah","mens","metal","metro","microphone","microscope","milk_glass","milky_way","minibus","minidisc","mobile_phone_off","money_mouth_face","money_with_wings","moneybag","monkey","monkey_face","monorail","moon","mortar_board","mosque","motor_boat","motor_scooter","motorcycle","motorway","mount_fuji","mountain","mountain_biking_man","mountain_biking_woman","mountain_cableway","mountain_railway","mountain_snow","mouse","mouse2","movie_camera","moyai","mrs_claus","muscle","mushroom","musical_keyboard","musical_note","musical_score","mute","nail_care","name_badge","national_park","nauseated_face","necktie","negative_squared_cross_mark","nerd_face","neutral_face","new","new_moon","new_moon_with_face","newspaper","newspaper_roll","next_track_button","ng","no_good_man","no_good_woman","night_with_stars","no_bell","no_bicycles","no_entry","no_entry_sign","no_mobile_phones","no_mouth","no_pedestrians","no_smoking","nose","notebook","notebook_with_decorative_cover","notes","nut_and_bolt","o2","ocean","octopus","oden","office","oil_drum","ok","ok_hand","ok_man","ok_woman","old_key","older_man","older_woman","om","on","oncoming_automobile","oncoming_bus","oncoming_police_car","oncoming_taxi","open_file_folder","open_hands","open_mouth","open_umbrella","ophiuchus","orange_book","orthodox_cross","outbox_tray","owl","ox","package","page_facing_up","page_with_curl","pager","paintbrush","palm_tree","pancakes","panda_face","paperclip","paperclips","parasol_on_ground","parking","part_alternation_mark","partly_sunny","passenger_ship","passport_control","pause_button","peace_symbol","peach","peanuts","pear","pen","pencil2","penguin","pensive","performing_arts","persevere","person_fencing","pouting_woman","phone","pick","pig","pig2","pig_nose","pill","pineapple","ping_pong","pisces","pizza","place_of_worship","plate_with_cutlery","play_or_pause_button","point_down","point_left","point_right","point_up","point_up_2","police_car","policewoman","poodle","popcorn","post_office","postal_horn","postbox","potable_water","potato","pouch","poultry_leg","pound","rage","pouting_cat","pouting_man","pray","prayer_beads","pregnant_woman","previous_track_button","prince","princess","printer","purple_heart","purse","pushpin","put_litter_in_its_place","question","rabbit","rabbit2","racehorse","racing_car","radio","radio_button","radioactive","railway_car","railway_track","rainbow","rainbow_flag","raised_back_of_hand","raised_hand_with_fingers_splayed","raised_hands","raising_hand_woman","raising_hand_man","ram","ramen","rat","record_button","recycle","red_circle","registered","relaxed","relieved","reminder_ribbon","repeat_one","rescue_worker_helmet","restroom","revolving_hearts","rewind","rhinoceros","ribbon","rice","rice_ball","rice_cracker","rice_scene","right_anger_bubble","ring","robot","rocket","rofl","roll_eyes","roller_coaster","rooster","rose","rosette","rotating_light","round_pushpin","rowing_man","rowing_woman","rugby_football","running_man","running_shirt_with_sash","running_woman","sa","sagittarius","sake","sandal","santa","satellite","saxophone","school","school_satchel","scissors","scorpion","scorpius","scream","scream_cat","scroll","seat","secret","see_no_evil","seedling","selfie","shallow_pan_of_food","shamrock","shark","shaved_ice","sheep","shell","shield","shinto_shrine","ship","shirt","shopping","shopping_cart","shower","shrimp","signal_strength","six_pointed_star","ski","skier","skull","skull_and_crossbones","sleeping","sleeping_bed","sleepy","slightly_frowning_face","slightly_smiling_face","slot_machine","small_airplane","small_blue_diamond","small_orange_diamond","small_red_triangle","small_red_triangle_down","smile","smile_cat","smiley","smiley_cat","smiling_imp","smirk","smirk_cat","smoking","snail","snake","sneezing_face","snowboarder","snowflake","snowman","snowman_with_snow","sob","soccer","soon","sos","sound","space_invader","spades","spaghetti","sparkle","sparkler","sparkles","sparkling_heart","speak_no_evil","speaker","speaking_head","speech_balloon","speedboat","spider","spider_web","spiral_calendar","spiral_notepad","spoon","squid","stadium","star","star2","star_and_crescent","star_of_david","stars","station","statue_of_liberty","steam_locomotive","stew","stop_button","stop_sign","stopwatch","straight_ruler","strawberry","stuck_out_tongue","stuck_out_tongue_closed_eyes","stuck_out_tongue_winking_eye","studio_microphone","stuffed_flatbread","sun_behind_large_cloud","sun_behind_rain_cloud","sun_behind_small_cloud","sun_with_face","sunflower","sunglasses","sunny","sunrise","sunrise_over_mountains","surfing_man","surfing_woman","sushi","suspension_railway","sweat","sweat_drops","sweat_smile","sweet_potato","swimming_man","swimming_woman","symbols","synagogue","syringe","taco","tada","tanabata_tree","taurus","taxi","tea","telephone_receiver","telescope","tennis","tent","thermometer","thinking","thought_balloon","ticket","tickets","tiger","tiger2","timer_clock","tipping_hand_man","tired_face","tm","toilet","tokyo_tower","tomato","tongue","top","tophat","tornado","trackball","tractor","traffic_light","train","train2","tram","triangular_flag_on_post","triangular_ruler","trident","triumph","trolleybus","trophy","tropical_drink","tropical_fish","truck","trumpet","tulip","tumbler_glass","turkey","turtle","tv","twisted_rightwards_arrows","two_hearts","two_men_holding_hands","two_women_holding_hands","u5272","u5408","u55b6","u6307","u6708","u6709","u6e80","u7121","u7533","u7981","u7a7a","umbrella","unamused","underage","unicorn","unlock","up","upside_down_face","v","vertical_traffic_light","vhs","vibration_mode","video_camera","video_game","violin","virgo","volcano","volleyball","vs","vulcan_salute","walking_man","walking_woman","waning_crescent_moon","waning_gibbous_moon","warning","wastebasket","watch","water_buffalo","watermelon","wave","wavy_dash","waxing_crescent_moon","wc","weary","wedding","weight_lifting_man","weight_lifting_woman","whale","whale2","wheel_of_dharma","wheelchair","white_check_mark","white_circle","white_flag","white_flower","white_large_square","white_medium_small_square","white_medium_square","white_small_square","white_square_button","wilted_flower","wind_chime","wind_face","wine_glass","wink","wolf","woman","woman_artist","woman_astronaut","woman_cartwheeling","woman_cook","woman_facepalming","woman_factory_worker","woman_farmer","woman_firefighter","woman_health_worker","woman_judge","woman_juggling","woman_mechanic","woman_office_worker","woman_pilot","woman_playing_handball","woman_playing_water_polo","woman_scientist","woman_shrugging","woman_singer","woman_student","woman_teacher","woman_technologist","woman_with_turban","womans_clothes","womans_hat","women_wrestling","womens","world_map","worried","wrench","writing_hand","x","yellow_heart","yen","yin_yang","yum","zap","zipper_mouth_face","zzz","octocat","showdown","Converter","parsed","raw","format","_dispatch","listen","makeHtml","gHtmlBlocks","gHtmlMdBlocks","gHtmlSpans","gUrls","gTitles","gDimensions","gListLevel","hashLinkCounts","langExtensions","outputModifiers","converter","makeMarkdown","makeMd","window","document","createElement","innerHTML","preList","querySelectorAll","childElementCount","firstChild","tagName","trim","getAttribute","className","split","outerHTML","setAttribute","childNodes","nodeType","nodeValue","removeChild","addExtension","useExtension","splice","language","output","getMetadata","getMetadataFormat","_setMetadataPair","_setMetadataFormat","_setMetadataRaw","g","doctype","title","charset","text","codeblock","concat","$1","customizedHeaderId","isNaN","parseInt","width","height","$2","tableHeaderId","map","shift","fromCharCode","hasChildNodes","hasAttribute","data","getElementsByTagName","define","Typo","CodeMirrorSpellChecker","options","codeMirrorInstance","defineMode","prototype","includes","apply","arguments","config","aff_loading","xhr_aff","XMLHttpRequest","open","onload","readyState","status","aff_data","responseText","num_loaded","typo","dic_data","platform","send","dic_loading","xhr_dic","rx_word","overlay","token","stream","ch","peek","word","next","check","mode","getMode","backdrop","overlayMode","module","exports","CodeMirror","stopListening","_cm","state","clearTimeout","timeout","off","hurry","defineOption","cm","val","autoRefresh","display","wrapper","offsetHeight","lastWrapHeight","clientHeight","refresh","setTimeout","delay","startListening","mod","old","Init","wrap","getWrapperElement","fullScreenRestore","scrollTop","pageYOffset","scrollLeft","pageXOffset","style","documentElement","overflow","setFullscreen","info","scrollTo","setNormal","clearPlaceholder","placeholder","parentNode","setPlaceholder","elt","cssText","direction","placeHolder","createTextNode","appendChild","lineSpace","insertBefore","onBlur","isEmpty","onChange","empty","lineCount","getLine","prev","getInputField","placeholderCompose","input","nodeName","querySelector","textContent","onComposition","hasFocus","listRE","emptyListRE","unorderedListRE","incrementRemainingMarkdownListNumbers","pos","startLine","line","lookAhead","skipCount","startItem","startIndent","nextLineNumber","nextLine","nextItem","nextIndent","newNumber","nextNumber","itemNumber","replaceRange","commands","newlineAndIndentContinueMarkdownList","Pass","ranges","listSelections","replacements","head","eolState","getStateAfter","inner","innerMode","name","helperType","execCommand","inList","list","inQuote","quote","cursorBeforeBullet","endOfQuote","endOfList","indent","after","numbered","bullet","replaceSelections","base","combine","startState","basePos","baseCur","overlayPos","overlayCur","streamSeen","copyState","min","combineTokens","textAfter","electricChars","blankLine","baseToken","overlayToken","doFold","noFold","Pos","ensureFlags","regexp","current","ignoreCase","global","multiline","regexpFlags","target","charAt","source","maybeMultiline","searchRegexpForward","doc","last","lastLine","string","from","to","searchRegexpForwardMultiline","chunk","curLine","before","inside","startCh","lastMatchIn","endMargin","newMatch","searchRegexpBackward","first","firstLine","searchRegexpBackwardMultiline","chunkSize","adjustPos","orig","folded","foldFunc","max","mid","len","searchStringForward","query","caseFold","fold","lines","found","cutFrom","endString","searchStringBackward","lastIndexOf","topString","SearchCursor","atOccurrence","afterEmptyMatch","clipPos","matches","reverse","normalize","str","findNext","find","findPrevious","cmpPos","result","newText","origin","splitLines","defineExtension","defineDocExtension","cur","getSearchCursor","getCursor","setSelections","onCursorActivity","markedSelection","operation","somethingSelected","clear","reset","array","coverRange","coverStart","coverEnd","CHUNK_SIZE","cmp","pop","update","markedSelectionStyle","addAt","cls","endLine","atEnd","mark","markText","userAgent","navigator","gecko","ie_upto10","ie_11up","edge","ie","ie_version","documentMode","webkit","qtwebkit","chrome","chrome_version","presto","safari","vendor","mac_geMountainLion","phantom","ios","maxTouchPoints","android","mobile","mac","chromeOS","windows","presto_version","Number","flipCtrlCmd","captureRightClick","classTest","range","rmClass","node","removeChildren","count","removeChildrenAndAdd","parent","tag","content","eltP","contains","child","host","activeElt","rootNode","activeElement","ownerDocument","body","shadowRoot","addClass","joinClasses","as","createRange","endNode","setEnd","setStart","createTextRange","moveToElementText","collapse","moveEnd","moveStart","selectInput","select","root","element","getRootNode","win","defaultView","bind","f","args","copyObj","obj","overwrite","prop","countColumn","tabSize","startIndex","startValue","nextTab","selectionStart","selectionEnd","value","_e","Delayed","time","handler","onTimeout","self","Date","set","ms","sel_dontScroll","sel_mouse","sel_move","findColumn","goal","col","skipped","spaceStrs","spaceStr","lst","arr","out","nothing","createObj","props","inst","Object","create","nonASCIISingleCaseWordChar","isWordCharBasic","toUpperCase","isWordChar","extendingChars","isExtendingChar","skipExtendingChars","dir","findFirst","pred","midF","ceil","bidiOther","getBidiPartAt","order","sticky","bidiOrdering","bidiRE","isNeutral","isStrong","countsAsLeft","countsAsNum","BidiSpan","level","code","outerType","types","i$1","i$2","type$1","i$3","prev$1","type$2","i$4","type$3","j","i$5","cur$1","type$4","i$6","end$1","replace$1","j$1","i$7","at","isRTL","j$2","nstart","unshift","getOrder","noHandlers","emitter","addEventListener","attachEvent","_handlers","getHandlers","removeEventListener","detachEvent","signal","handlers","signalDOMEvent","override","preventDefault","defaultPrevented","e_defaultPrevented","codemirrorIgnore","signalCursorActivity","cursorActivity","curOp","cursorActivityHandlers","hasHandler","eventMixin","ctor","e_preventDefault","returnValue","e_stopPropagation","stopPropagation","cancelBubble","e_stop","e_target","srcElement","e_button","which","button","ctrlKey","zwspSupported","badBidiRects","dragAndDrop","div","zeroWidthElement","measure","offsetWidth","hasBadBidiRects","txt","r0","getBoundingClientRect","r1","splitLinesAuto","nl","rt","hasSelection","getSelection","te","selection","parentElement","compareEndPoints","hasCopyEvent","oncopy","badZoomedRects","modes","mimeModes","dependencies","resolveMode","spec","mfactory","modeObj","modeExtensions","exts","modeProps","prop$1","extendMode","properties","nstate","a1","a2","StringStream","lineOracle","lastColumnPos","lastColumnValue","lineStart","size","children","sz","getBetween","iter","getLines","updateLineHeight","diff","lineNo","no","lineAtHeight","outer","lh","isLine","lineNumberFor","lineNumberFormatter","firstLineNumber","equalCursorPos","copyPos","maxPos","minPos","clipLine","linelen","clipToLen","clipPosArray","eol","sol","undefined","eat","eatWhile","eatSpace","skipToEnd","skipTo","backUp","column","indentation","pattern","consume","caseInsensitive","cased","substr","hideFirstChars","oracle","SavedContext","Context","maxLookAhead","baseTokens","baseTokenPos","highlightLine","context","forceToEnd","st","modeGen","lineClasses","runMode","overlays","i_end","opaque","styles","classes","bgClass","textClass","getLineStyles","updateFrontier","getContextBefore","resetState","maxHighlightLength","stateAfter","save","styleClasses","highlightFrontier","modeFrontier","precise","minindent","minline","lim","indented","findStartLine","saved","fromSaved","processLine","viewFrom","viewTo","startAt","callBlankLine","readToken","copy","Token","takeToken","asArray","tokens","extractLineClasses","lineClass","flattenSpans","curStart","curStyle","addModeClass","mName","sawReadOnlySpans","sawCollapsedSpans","MarkedSpan","marker","getMarkedSpanFor","spans","span","removeMarkedSpan","stretchSpansOverChange","change","full","oldFirst","markedSpans","oldLast","endCh","isInsert","nw","inclusiveLeft","insertLeft","endsAfter","inclusiveRight","markedSpansBefore","startsBefore","markedSpansAfter","sameLine","offset","span$1","clearEmptySpans","newMarkers","gapMarkers","gap","clearWhenEmpty","detachMarkedSpans","detachLine","attachMarkedSpans","attachLine","extraLeft","extraRight","compareCollapsedMarkers","lenDiff","aPos","bPos","fromCmp","collapsedSpanAtSide","sps","sp","collapsed","collapsedSpanAtStart","collapsedSpanAtEnd","collapsedSpanAround","conflictingCollapsedRange","toCmp","visualLine","merged","visualLineNo","lineN","vis","visualLineEndNo","lineIsHidden","widgetNode","lineIsHiddenInner","heightAtLine","lineObj","lineLength","found$1","findMaxLine","maxLine","maxLineLength","maxLineChanged","Line","estimateHeight","cleanUpLine","styleToClassCache","styleToClassCacheWithMode","interpretTokenStyle","cache","buildLineContent","lineView","builder","pre","trailingSpace","splitSpaces","rest","addToken","buildToken","buildTokenBadBidi","insertLineContent","externalMeasured","maps","caches","lastChild","defaultSpecialCharPlaceholder","startStyle","endStyle","css","attributes","displayText","trailingBefore","spaceBefore","special","specialChars","mustWrap","createDocumentFragment","txt$1","tabWidth","specialCharPlaceholder","fullStyle","attr","part","buildCollapsedSpan","ignoreWidget","widget","needsContentAttribute","setUneditable","allText","spanStyle","spanEndStyle","spanStartStyle","nextChange","Infinity","foundBookmarks","endStyles","upto","tokenText","LineView","visualLineContinued","hidden","buildViewArray","nextPos","view","operationGroup","orphanDelayedCallbacks","signalLater","delayedCallbacks","fireOrphanDelayed","delayed","updateLineForChanges","dims","changes","updateLineText","updateLineGutter","updateLineClasses","updateLineWidgets","ensureLineWrapped","replaceChild","zIndex","getLineContent","ext","built","background","updateLineBackground","wrapClass","gutter","gutterBackground","gutterClass","fixedGutter","fixedPos","gutterTotalWidth","markers","gutterMarkers","lineNumbers","wrap$1","gutterWrap","lineNumber","gutterLeft","k","gutterSpecs","gutterWidth","alignable","isWidget","nextSibling","insertLineWidgets","buildLineElement","insertLineWidgetsFor","allowAbove","widgets","ws","handleMouseEvents","positionLineWidget","above","noHScroll","wrapperWidth","coverGutter","paddingLeft","position","marginLeft","widgetHeight","parentStyle","gutters","clientWidth","eventInWidget","sizer","mover","paddingTop","offsetTop","paddingVert","paddingH","cachedPaddingH","getComputedStyle","currentStyle","paddingRight","scrollGap","nativeBarWidth","displayWidth","scroller","barWidth","displayHeight","barHeight","mapFromLineView","measureChar","bias","measureCharPrepared","prepareMeasureForLine","findViewForLine","findViewIndex","getDimensions","forceUpdate","lineMeasure","updateExternalMeasurement","rect","hasHeights","prepared","varHeight","wrapping","lineWrapping","curWidth","heights","rects","getClientRects","abs","bottom","ensureLineHeights","place","nodeAndOffsetInLineMap","getUsefulRect","screen","logicalXDPI","deviceXDPI","normal","fromRange","hasBadZoomedRects","scaleX","scaleY","logicalYDPI","deviceYDPI","maybeUpdateRectForZooming","rSpan","charWidth","nullRect","rtop","rbot","bot","bogus","singleCursorHeightPerLine","rbottom","measureCharInner","measureText","mStart","mEnd","clearLineMeasurementCacheFor","clearLineMeasurementCache","externalMeasure","clearCaches","cachedCharWidth","cachedTextHeight","lineNumChars","pageScrollX","pageScrollY","marginTop","widgetTopHeight","intoCoordSystem","includeWidgets","yOff","viewOffset","lOff","xOff","fromCoordSystem","coords","localBox","lineSpaceBox","charCoords","cursorCoords","preparedMeasure","get","getBidi","partPos","invert","other","estimateCoords","PosWithInfo","outside","xRel","coordsChar","y","coordsCharInner","rangeEnd","wrappedLineExtent","begin","wrappedLineExtentChar","boxIsAfter","box","ltr","coordsBidiPartWrapped","coordsBidiPart","baseX","chAround","boxAround","atLeft","atStart","_lineNo","ref","closestDist","endX","dist","textHeight","clientLeft","offsetLeft","compensateForHScroll","th","perLine","widgetsHeight","estimateLineHeights","est","estHeight","posFromMouse","liberal","forRect","space","clientX","clientY","e$1","colDiff","round","regChange","lendiff","updateLineNumbers","viewChanged","resetView","cut","viewCuttingPoint","cut$1","cutTop","cutBot","regLineChange","oldN","newN","countDirtyView","dirty","updateSelection","showSelection","prepareSelection","primary","curFragment","cursors","selFragment","customCursor","$customCursor","sel","primIndex","drawSelectionCursor","showCursorWhenSelecting","drawSelectionRange","cursor","cursorHeight","charPos","defaultCharWidth","otherCursor","cmpCoords","fragment","padding","leftSide","rightSide","sizerWidth","docLTR","add","drawForLine","fromArg","toArg","lineLen","wrapX","side","extent","iterateBidiSections","fromPos","toPos","openStart","openEnd","openRight","topLeft","topRight","botLeft","botRight","sFrom","sTo","fromLine","toLine","singleVLine","leftEnd","rightStart","restartBlink","focused","clearInterval","blinker","cursorDiv","visibility","cursorBlinkRate","setInterval","ensureFocus","focus","onFocus","delayBlurEvent","delayingBlurEvent","draggingText","readOnly","selForContextMenu","receivedFocus","updateHeightsInViewport","prevBottom","lineDiv","viewTop","oldHeight","mustScroll","updateWidgetHeight","chWidth","w","visibleLines","viewport","ensure","ensureFrom","ensureTo","calculateScrollPos","snapMargin","screentop","docBottom","atTop","atBottom","newTop","gutterSpace","screenleft","screenw","tooWide","addToScrollTop","resolveScrollToPos","ensureCursorVisible","scrollToPos","margin","cursorScrollMargin","scrollToCoords","scrollToCoordsRange","sPos","updateScrollTop","updateDisplaySimple","setScrollTop","startWorker","forceScroll","scrollHeight","scrollbars","setScrollLeft","isScroller","scrollWidth","alignHorizontally","measureForScrollbars","gutterW","docH","viewHeight","viewWidth","barLeft","docHeight","NativeScrollbars","vert","horiz","tabIndex","checkedZeroWidth","minHeight","minWidth","needsH","needsV","sWidth","totalHeight","totalWidth","zeroWidthHack","disableHoriz","enableZeroWidthBar","disableVert","bar","maybeDisable","elementFromPoint","NullScrollbars","updateScrollbars","startWidth","startHeight","updateScrollbarsInner","sizes","paddingBottom","heightForcer","borderBottom","scrollbarFiller","coverGutterNextToScrollbar","gutterFiller","scrollbarModel","initScrollbars","scrollbarStyle","axis","nextOpId","startOperation","op","updateInput","typing","changeObjs","cursorActivityCalled","selectionChanged","updateMaxLine","markArrays","ops","ownsGroup","endOperation","endCb","group","callbacks","fireCallbacksForOps","finishOperation","endOperation_R1","endOperation_W1","endOperation_R2","endOperation_W2","endOperation_finish","endOperations","scrollbarsClipped","marginBottom","borderRightWidth","maybeClipScrollbars","mustUpdate","DisplayUpdate","updatedDisplay","updateDisplayIfNeeded","barMeasure","adjustWidthTo","maxScrollLeft","preparedSelection","takeFocus","setDocumentHeight","postUpdateDisplay","wheelStartX","wheelStartY","doScroll","innerHeight","scrollNode","scrollIntoView","maybeScrollWindow","limit","changed","endCoords","scrollPos","startTop","startLeft","scrollPosIntoView","maybeHiddenMarkers","unhidden","maybeUnhiddenMarkers","finish","runInOp","methodOp","docMethodOp","highlight","highlightWorker","workTime","changedLines","oldStyles","highlighted","oldCls","newCls","ischange","workDelay","force","visible","editorIsHidden","wrapperHeight","oldDisplayWidth","events","renderedView","maybeUpdateLineNumberWidth","viewportMargin","different","lastWrapWidth","adjustView","toUpdate","selSnapshot","active","anchorNode","extend","anchorOffset","focusNode","focusOffset","selectionSnapshot","updateNumbersFrom","container","rm","currentWheelTarget","updateNumber","patchDisplay","snapshot","removeAllRanges","addRange","restoreSelection","selectionDiv","reportedViewFrom","reportedViewTo","updateGutterSpace","alignWidgets","comp","align","innerW","lineGutter","lineNumInnerWidth","lineNumWidth","getGutters","sawLineNumbers","renderGutters","specs","gElt","updateGutters","Display","clipPath","draggable","wheelDX","wheelDY","activeTouch","init","wheelSamples","wheelPixelsPerUnit","wheelEventDelta","dx","wheelDeltaX","dy","wheelDeltaY","detail","HORIZONTAL_AXIS","VERTICAL_AXIS","wheelDelta","wheelEventPixels","delta","onScrollWheel","chromeScrollHack","pointerEvents","pixelsPerUnit","deltaMode","deltaX","deltaY","canScrollX","canScrollY","pixels","movedX","movedY","sample","Selection","equals","here","there","deepCopy","Range","normalizeSelection","mayTouch","selectionsMayTouch","prim","sort","inv","simpleSelection","changeEnd","adjustForChange","computeSelAfterChange","offsetPos","loadMode","modeOption","resetModeState","isWholeLineUpdate","wholeLineUpdateBefore","updateDoc","spansFor","updateLine","linesFor","lastText","lastSpans","nlines","insert","remove","added","added$1","added$2","linkedDocs","sharedHistOnly","propagate","skip","sharedHist","linked","rel","shared","attachDoc","setDirectionClass","History","done","undone","undoDepth","lastModTime","lastSelTime","lastOp","lastSelOp","lastOrigin","lastSelOrigin","generation","maxGeneration","historyChangeFromChange","histChange","attachLocalSpans","clearSelectionEvents","addChangeToHistory","selAfter","opId","hist","history","historyEventDelay","lastChangeEvent","pushSelectionToHistory","addSelectionToHistory","selectionEventCanBeMerged","clearRedo","dest","existing","removeClearedSpans","explicitlyCleared","mergeOldSpans","getOldSpans","stretched","oldCur","stretchCur","copyHistoryArray","newGroup","instantiateSel","event","newChanges","extendRange","posBefore","extendSelection","setSelection","extendSelections","heads","replaceOneSelection","setSimpleSelection","setSelectionReplaceHistory","setSelectionNoUndo","NaN","filterSelectionChange","setSelectionInner","skipAtomicInSelection","reCheckSelection","mayClear","newAnchor","skipAtomic","newHead","skipAtomicInner","oldPos","preventCursorLeft","selectLeft","preventCursorRight","selectRight","atomic","near","movePos","far","cantEdit","selectAll","filterChange","canceled","cancel","makeChange","ignoreReadOnly","suppressEdits","parts","mk","newParts","dfrom","dto","removeReadOnlyRanges","makeChangeInner","makeChangeSingleDoc","rebased","rebaseHist","makeChangeFromHistory","allowSelectionOnly","suppress","antiChanges","returned","shiftDoc","distance","removed","recomputeMaxLength","checkWidthStart","retreatFrontier","changesHandler","changeHandler","makeChangeSingleDocInEditor","assign","rebaseHistSelSingle","rebaseHistArray","sub","copied","changeLine","handle","changeType","LeafChunk","BranchChunk","removeInner","insertInner","iterN","remaining","leaf","maybeSpill","me","sibling","myIndex","used","LineWidget","opt","adjustScrollWhenAboveVisible","this$1","oldH","nextMarkerId","TextMarker","cloneNode","isParent","SharedTextMarker","markTextShared","replacedWith","addToHistory","inThisOp","WeakSet","has","addMarkedSpan","clearOnEnter","clearHistory","withOp","visual","dHeight","findSharedMarkers","findMarks","detachSharedMarkers","subMarker","nextDocId","Doc","lineSep","cleanGeneration","constructor","getValue","lineSeparator","setValue","getRange","getLineHandle","getLineNumber","getLineHandleVisualStart","setCursor","extendSelectionsBy","addSelection","getSelections","replaceSelection","dup","newSel","hint","oldPrev","newPrev","computeReplacedSel","undo","redo","undoSelection","redoSelection","setExtending","getExtending","historySize","markClean","changeGeneration","forceSplit","isClean","gen","getHistory","setHistory","histData","setGutterMarker","gutterID","clearGutter","lineInfo","addLineClass","where","removeLineClass","addLineWidget","insertAt","aboveVisible","removeLineWidget","setBookmark","realOpts","findMarksAt","getAllMarks","posFromIndex","sepSize","indexFromPos","copyHistory","linkedDoc","mFrom","mTo","subMark","copySharedMarkers","unlinkDoc","splitIds","iterLinkedDocs","getEditor","setDirection","eachLine","lastDrop","onDrop","clearDragCursor","files","dataTransfer","isReadOnly","FileReader","File","read","markAsReadAndPasteIfAllFilesAreRead","readTextFromFile","file","allowDropFileTypes","reader","onerror","readAsText","text$1","getData","selected","dragCursor","forEachCodeMirror","getElementsByClassName","byClass","editors","globalsRegistered","ensureGlobalHandlers","resizeTimer","onResize","setSize","keyNames","keyMap","normalizeKeyName","alt","ctrl","cmd","normalizeKeyMap","keymap","keyname","keys","lookupKey","getKeyMap","fallthrough","isModifierKey","keyCode","addModifierNames","noShift","altKey","metaKey","shiftKey","keyName","altGraphKey","deleteNearSelection","compute","kill","toKill","replaced","moveCharLogically","moveLogically","endOfLine","visually","prep","targetTop","basic","pcDefault","emacsy","macDefault","singleSelection","killLine","deleteLine","delLineLeft","delWrappedLineLeft","delWrappedLineRight","rightPos","goDocStart","goDocEnd","goLineStart","goLineStartSmart","lineStartSmart","goLineEnd","visualLineEnd","lineEnd","goLineRight","goLineLeft","goLineLeftSmart","goLineUp","moveV","goLineDown","goPageUp","goPageDown","goCharLeft","moveH","goCharRight","goColumnLeft","goColumnRight","goWordLeft","goGroupRight","goGroupLeft","goWordRight","delCharBefore","deleteH","delCharAfter","delWordBefore","delWordAfter","delGroupBefore","delGroupAfter","indentAuto","indentSelection","indentMore","indentLess","insertTab","insertSoftTab","spaces","defaultTab","transposeChars","newlineAndIndent","sels","indentLine","openLine","toggleOverwrite","firstNonWS","inWS","doHandleBinding","bound","dropShift","ensurePolled","prevShift","stopSeq","dispatchKey","seq","keySeq","dispatchKeyInner","keyMaps","extraKeys","lookupKeyForEditor","handleKeyBinding","motion","lastStoppedKey","onKeyDown","getField","handled","showCrossHair","onKeyUp","onKeyPress","charCode","handleCharBinding","lastClick","lastDoubleClick","PastClick","onMouseDown","supportsTouch","clickInGutter","now","compare","clickRepeat","selectingText","handleMappedButton","contained","behavior","option","unit","addNew","moveOnDrag","configureMouse","dragDrop","moved","dragEnd","mouseMove","dragStart","preventScroll","e2","leftButtonStartDrag","ourRange","ourIndex","startSel","rangeForUnit","lastPos","extendTo","startCol","posCol","leftPos","oldRange","ranges$1","anchorLine","boundary","headIndex","usePart","bidiSimplify","editorSize","counter","curCount","move","buttons","leftButtonSelect","leftButtonDown","onContextMenu","findWordAt","gutterEvent","prevent","mX","mY","touches","lineBox","contextMenuInGutter","themeChanged","theme","defaults","optionHandlers","dragDropChanged","funcs","dragFunctions","toggle","enter","over","leave","drop","wrappingChanged","inputStyles","inputStyle","pasteIncoming","cutIncoming","autofocus","touchFinished","prevTouch","finishTouch","isMouseLikeTouchEvent","touch","radiusX","radiusY","farAway","pageX","pageY","frag","onDragOver","setData","effectAllowed","setDragImage","img","src","_top","onDragStart","inp","registerEventHandlers","finishInit","initHooks","textRendering","how","aggressive","curSpace","curSpaceString","indentUnit","indentString","indentWithTabs","pos$1","defineInitHook","lastCopied","setLastCopied","newLastCopied","applyTextInput","inserted","deleted","recent","paste","textLines","multiPaste","pasteLinesPerSelection","lineWise","changeEvent","triggerElectric","handlePaste","pasted","clipboardData","disableInput","smartIndent","getModeAt","electricInput","copyableRanges","lineRange","disableBrowserMagic","field","spellcheck","autocorrect","autocapitalize","hiddenTextarea","border","findPosH","origDir","lineDir","moveOnce","boundToLine","astral","bidi","mv","getWrappedLineExtent","moveInStorageOrder","searchInVisualLine","getRes","res","nextCh","moveVisually","sawType","getHelper","hitSide","findPosV","pageSize","moveAmount","ContentEditableInput","lastAnchorNode","lastAnchorOffset","lastFocusNode","lastFocusOffset","polling","composing","gracePeriod","readDOMTimeout","posToDOM","badPos","bad","domToPos","lineNode","locateNodeInLineView","textNode","topNode","curNode","previousSibling","dist$1","belongsToInput","onCopyCut","lineWiseCopyCut","clearData","kludge","hadFocus","showPrimarySelection","contentEditable","updateFromDOM","readFromDOMSoon","forceCompositionEnd","screenReaderLabelChanged","removeAttribute","showMultipleSelections","curAnchor","curFocus","rng","rangeCount","getRangeAt","startGracePeriod","rememberSelection","selectionInEditor","commonAncestorContainer","blur","pollSelection","pollInterval","poll","scan","isInGutter","triggerOnKeyDown","pollContent","fromIndex","fromNode","toNode","toIndex","closing","extraLinebreak","close","addText","walk","cmText","markerID","isBlock","domTextBetween","oldText","cutFront","cutEnd","oldTop","maxCutFront","newBot","oldBot","maxCutEnd","chFrom","chTo","readOnlyChanged","resetPosition","TextareaInput","prevInput","pollingFast","resetting","createField","textarea","prepareCopyCut","fastPoll","dispatchEvent","Event","_display","opts","moveInputWithCursor","headPos","wrapOff","lineOff","teTop","teLeft","drawn","contextMenuPending","slowPoll","missed","same","resetSelectionOnContextMenu","oldScrollY","oldCSS","oldWrapperCSS","wrapperBox","offsetParent","scrollY","rehide","detectingSelectAll","prepareSelectAllHack","mouseup","extval","disabled","deflt","notOnInit","newBreaks","detach","attach","integer","defineOptions","helpers","getDoc","addKeyMap","removeKeyMap","addOverlay","score","priority","insertSorted","modeSpec","removeOverlay","newRanges","getTokenAt","getLineTokens","getTokenTypeAt","getHelpers","help","_global","defaultTextHeight","getViewport","addWidget","vspace","hspace","triggerOnKeyPress","triggerOnKeyUp","triggerOnMouseDown","amount","rtlMoveVisually","goalColumn","goals","startChar","getScrollInfo","scrollToRange","interpret","swapDoc","phrase","phraseText","phrases","getScrollerElement","getGutterElement","registerHelper","registerGlobalHelper","predicate","addEditorMethods","dontDelegate","method","defineMIME","mime","func","fromTextArea","tabindex","realSubmit","form","leaveSubmitMethodAlone","submit","wrappedSubmit","getTextArea","toTextArea","addLegacyProps","version","urlRE","modeConfig","codeDepth","gfmOverlay","codeBlock","ateSpace","difference","gitHubSpice","markdownConfig","taskLists","cmCfg","modeCfg","htmlMode","htmlModeMissing","highlightFormatting","maxBlockquoteDepth","fencedCodeBlockHighlighting","fencedCodeBlockDefaultMode","xml","tokenTypeOverrides","tokenTypes","header","list1","list2","list3","hr","image","imageAltText","imageMarker","formatting","linkInline","linkEmail","linkText","linkHref","em","strong","tokenType","hrRE","taskListRE","atxHeaderRE","allowAtxHeaderWithoutSpace","setextHeaderRE","textRE","fencedCodeRE","linkDefRE","punctuation","switchInline","inline","switchBlock","block","linkTitle","indentedCode","htmlBlock","exit","htmlState","tagStart","tokenize","isInText","inlineNormal","blockNormal","trailingSpaceNewLine","prevLine","thisLine","firstTokenOnLine","prevLineLineIsEmpty","prevLineIsIndentedCode","prevLineIsHr","prevLineIsList","maxNonCodeIndentation","listStack","lineIndentation","indentationDiff","allowsInlineContinuation","fencedCodeEnd","isHr","getType","setext","listType","taskList","fencedEndRE","localMode","findModeByName","mimes","localState","local","footnoteLink","md_inside","returnType","currListInd","hasExitedList","maxFencedEndInd","taskOpen","taskClosed","listMod","handleText","matchCh","previousFormatting","formattingEscape","atts","leftFlanking","rightFlanking","setEm","setStrong","retType","endChar","returnState","linkRE","footnoteLinkInside","footnoteUrl","blockCommentStart","blockCommentEnd","closeBrackets","modeInfo","alias","findModeByMIME","findModeByExtension","findModeByFileName","filename","dot","htmlConfig","autoSelfClosers","implicitlyClosed","contextGrabbers","doNotIndent","allowUnquoted","allowMissing","xmlConfig","allowMissingTagName","editorConf","config_","setStyle","inText","chain","parser","inBlock","inTag","closure","baseState","isInAttribute","stringStartCol","terminator","depth","lower","startOfLine","noIndent","popContext","maybePopContext","nextTagName","parentTagName","tagNameState","closeTagNameState","attrState","matchClosing","closeState","closeStateErr","_stream","attrEqState","attrValueState","attrContinuedState","baseIndent","fullLine","multilineTagIndentPastTag","multilineTagIndentFactor","alignCDATA","tagAfter","grabbers","configuration","skipAttribute","xmlCurrentTag","xmlCurrentContext","cx","tabAndIndentMarkdownList","shiftTabAndUnindentMarkdownList","marked","isMac","anchorToExternalRegex","bindings","toggleBold","toggleItalic","drawLink","toggleHeadingSmaller","toggleHeadingBigger","drawImage","toggleBlockquote","toggleOrderedList","toggleUnorderedList","toggleCodeBlock","togglePreview","toggleStrikethrough","toggleHeading1","toggleHeading2","toggleHeading3","toggleHeading4","toggleHeading5","toggleHeading6","cleanBlock","drawTable","drawHorizontalRule","toggleSideBySide","toggleFullScreen","shortcuts","isMobile","opera","fixShortcut","createToolbarDropdown","enableTooltips","el","createToolbarButton","classList","onclick","childrenIndex","childElement","toolbarBuiltInButtons","enableActions","markup","attribute","classNamePrefix","toolbarButtonClassPrefix","innerText","action","actionName","tooltip","getBindingName","createTooltip","noDisable","noMobile","classNameParts","iconClasses","classNameIndex","classNamePart","icon","iconClassIndex","iconClass","createSep","getState","stat","ret","bold","italic","saved_overflow","editor","codemirror","sidebyside","sideBySideFullscreen","easyMDEContainer","onToggleFullScreen","maxHeight","removeProperty","setPreviewMaxHeight","toolbar_div","toolbarElements","fullscreen","_toggleBlock","blockStyles","fenceCharsToInsert","fencing_line","token_state","code_type","line_num","firstTok","lastTok","fencedChars","block_start","block_end","cur_start","cur_end","tok","is_code","start_text","start_line","end_text","end_line","fence_chars","search_from","next_line","next_line_last_tok","no_sel_and_starting_of_line","sel_multi","start_line_sel","end_line_sel","repl_start","repl_end","_replaceSelection","insertFencingAtSelection","_toggleLine","_toggleHeading","listStyle","unorderedListStyle","startPoint","endPoint","_cleanBlock","url","promptURLs","prompt","promptTexts","escapePromptURL","_toggleLink","insertTexts","encodeURI","drawUploadedImage","openBrowseFileWindow","afterImageUploaded","imageName","uploadedImage","text_link","updateStatusBar","imageTexts","sbOnUploaded","sbInit","table","horizontalRule","preview","toolbarButton","useSideBySideListener","previewNormal","toolbar","sideBySideRenderingFunction","newValue","previewRender","previewClass","preview_result","startEnd","currHeadingLevel","liststyle","listRegexp","whitespacesRegexp","repl","_toggle","untoggleOnly","char","_getChar","_checkChar","isPreviewActive","start_chars","end_chars","humanFileSize","bytes","units","toFixed","_mergeProperties","property","wordCount","iconClassMap","default","timeFormat","locale","hour","minute","sbOnDragEnter","sbOnDrop","sbProgress","sizeUnits","errorMessages","noFileGiven","typeNotAllowed","fileTooLarge","importError","EasyMDE","autoDownloadFA","autoDownloadFontAwesome","styleSheets","href","showIcons","uploadImage","plainText","markdown","parsingConfig","autosave","errorCallback","errorMessage","imageMaxSize","imageAccept","imagePathAbsolute","imageCSRFName","imageCSRFHeader","unique_id","uniqueId","render","initialValue","foundSavedValue","imageUploadFunction","uploadImagesUsingCustomFunction","uploadImages","isLocalStorageAvailable","localStorage","setItem","removeItem","onSuccess","onError","names","uploadImageUsingCustomFunction","itemName","gui","statusbar","matchingClasses","markedOptions","renderingConfig","singleLineBreaks","breaks","codeSyntaxHighlighting","hljs","getLanguage","highlightAuto","setOptions","htmlText","sanitizerFunction","htmlDoc","DOMParser","parseFromString","listItems","listItem","listItemChild","HTMLInputElement","listStyleType","removeListStyleWhenCheckbox","linkString","fixedLinkString","addAnchorTargetBlank","_rendered","documentOnKeyDown","spellChecker","styleSelectedText","nativeSpellcheck","forceSync","cmWrapper","createToolbar","createStatusbar","enabled","_autosave_timeout","submit_delay","_vm","previewImagesInEditor","parentEl","srcAttr","EMDEimagesCache","keySrc","imagesPreviewHandler","newSrc","assignImageBlockAttributes","naturalWidth","naturalHeight","sideBySide","createSideBySide","temp_cm","cleanup","easyMDE","binded","autosaveTimeoutId","loaded","getItem","getElementById","dd","Intl","DateTimeFormat","clearAutosavedValue","imageInput","click","onErrorSup","fillErrorMessage","imageUrl","formData","FormData","append","imageCSRFToken","request","upload","onprogress","lengthComputable","progress","total","imageUploadEndpoint","setRequestHeader","response","filePath","location","statusText","filledErrorMessage","borderTopWidth","previewMaxHeight","syncSideBySidePreviewScroll","cScroll","pScroll","ratio","parseFloat","onscroll","items","toolbarData","toolbarGuideIcon","hideIcons","nonSeparatorIconsFollow","item","toolbarTips","multiple","opacity","onUpdate","onActivity","posLine","posColumn","isSideBySideActive","isFullscreenActive","dictionary","affData","wordsData","settings","rules","dictionaryTable","compoundRules","compoundRuleCodes","replacementTable","memoized","path","_len","_jlen","readDataFile","setFunc","_readFile","asyncLoad","then","setAffData","setup","setWordsData","_parseAFF","rule","ONLYINCOMPOUND","_parseDIC","ruleText","expressionText","character","loadedCallback","dictionaryPath","getURL","__dirname","load","async","promise","req","Promise","resolve","reject","overrideMimeType","fs","existsSync","readFileSync","numEntries","lineParts","_removeAffixComments","definitionParts","ruleType","ruleCode","combineable","entries","charactersToRemove","additionParts","charactersToAdd","continuationClasses","parseRuleCodes","regexToMatch","entry","_removeDicComments","addWord","ruleCodesArray","NEEDAFFIX","newWords","_applyRule","ii","_iilen","newWord","combineCode","combineRule","otherNewWords","iii","_iiilen","textCodes","FLAG","continuationRule","aWord","trimmedWord","checkExact","capitalizedWord","hasFlag","uncapitalizedWord","ruleCodes","COMPOUNDMIN","flag","wordFlags","alphabet","suggest","memoizedLimit","replacementEntry","correctedWord","alphaArray","alphaHash","edits1","words","known_only","_edit","rv","alphabetLength","lettercase","replacementLetter","ed1","weighted_corrections","ed1word","sorted_corrections","a_val","b_val","localeCompare","capitalization_scheme","working_limit","correct","_defineProperties","descriptor","enumerable","configurable","writable","defineProperty","Symbol","toPrimitive","TypeError","_toPrimitive","_extends","_arrayLikeToArray","arr2","_createForOfIteratorHelperLoose","allowArrayLike","it","iterator","minLen","_unsupportedIterableToArray","baseUrl","gfm","headerIds","headerPrefix","hooks","langPrefix","mangle","pedantic","renderer","sanitize","sanitizer","silent","smartypants","tokenizer","walkTokens","xhtml","escapeTest","escapeReplace","escapeTestNoEncode","escapeReplaceNoEncode","escapeReplacements","getEscapeReplacement","escape","html","encode","unescapeTest","unescape","caret","edit","getRegex","nonWordAndColonTest","originIndependentUrl","cleanUrl","prot","decodeURIComponent","baseUrls","justDomain","rtrim","relativeBase","protocol","domain","resolveUrl","noopTest","splitCells","tableRow","cells","escaped","curr","suffLen","currChar","repeatString","outputLink","cap","lexer","inLink","inlineTokens","Tokenizer","_proto","newline","codeBlockStyle","fences","matchIndentToCode","indentToCode","matchIndentInNode","indentCodeCompensation","lang","_escapes","heading","trimmed","blockquote","blockTokens","istask","ischecked","endsWithBlankLine","rawLine","itemContents","endEarly","bull","isordered","ordered","loose","itemRegex","trimLeft","nextBulletRegex","hrRegex","fencesBeginRegex","headingBeginRegex","task","checked","trimRight","spacers","hasMultipleLineBreaks","some","def","rows","row","lheading","paragraph","inRawBlock","trimmedUrl","rtrimSlash","lastParenIndex","findClosingBracket","linkLen","reflink","links","nolink","emStrong","maskedSrc","prevChar","lDelim","nextChar","rDelim","rLength","lLength","delimTotal","midDelimTotal","endReg","rDelimAst","rDelimUnd","_text","codespan","hasNonSpaceChars","hasSpaceCharsOnBothEnds","br","del","autolink","prevCapZero","_backpedal","inlineText","_paragraph","_label","_title","listItemStart","_tag","_comment","reflinkSearch","_punctuation","blockSkip","escapedEmSt","_scheme","_email","_attribute","_href","middle","endAst","endUnd","_extended_email","Lexer","inlineQueue","lex","lexInline","Constructor","staticProps","lastToken","cutSrc","lastParagraphClipped","_this","leading","tabs","extTokenizer","startBlock","tempSrc","tempStart","getStartIndex","errMsg","_this2","keepPrevChar","startInline","Renderer","_code","infostring","_html","slugger","slug","listitem","checkbox","tablerow","tablecell","TextRenderer","Slugger","seen","serialize","getNextSafeSlug","originalSlug","isDryRun","occurenceAccumulator","dryrun","Parser","textRenderer","parseInline","l2","l3","cell","itemBody","renderers","Hooks","preprocess","postprocess","parseMarkdown","callback","origOpt","throwError","message","msg","checkSanitizeDeprecation","err","pending","all","_tokens","passThroughHooks","Set","newDefaults","getDefaults","use","childTokens","_key","pack","prevRenderer","_len2","_key2","_loop","_len3","_key3","_loop2","prevTokenizer","_len4","_key4","_loop3","prevHook","arg","_len5","_key5","_walkTokens","values","_step","_loop4","_step2","_iterator2","_step3","_iterator3","_step4","_iterator4","_cell","_iterator","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","definition","UserContactsService","apiUrl","_apiUrl","addContact","removeContact","contactId","rej","$","ajax","success","textStatus","xhr","onDocumentReady","syncBlogSettings","blogName","postsPerPage","fetch","headers","Headers","requestAnimationFrame","stylesheets","timer","images","lazyload","webkitRequestAnimationFrame","mozRequestAnimationFrame","appurl","auto_grow_textarea","toProperCase","parseUrlParam","paramKey","qs","params","exceedsLineCount","charsPerLine","newLines","removeEmpty","trimmedItem","editPost","markdownEditor","orientation","tinymce","selector","plugins","imageUploadUrl","promotion","menubar","toolbar_sticky","autoresize_bottom_margin","font_formats","content_style","image_advtab","importcss_append","image_caption","quickbars_selection_toolbar","quickbars_insert_toolbar","contextmenu","images_upload_url","images_upload_credentials","relative_urls","onEditing","editorManager","i18n","init_instance_callback","deleteButton","confirm","mdeditor","mceeditor","selecttag","categories","refineSlug","slugPre","onchange","phv","phv_array","val_array","loading","tab","plain","Util","valueMarkdown","valueHtml","valueText","restoreValue","prevFormat","selectedFormat","getContent","setContent","$excerpt","syncContent","excerpt","showAlert","modal","playMessageSound","audio","play","catch","pingOnInteract","unbind","setupNotifications","$notificationsTool","$notificationsPopup","notifications","notif","$notif","dateCreated","viewUrl","$viewed","markAsViewed","globalThis","isRead","prepend","hide","ndc","updateNotificationsBadge","updateNotificationsBadgeInterval","getNotifications","json","unacknowledged","$badge","username","show","setupChatNotifications","messaging","updateMessagesBadge","updateMessagesBadgeInterval","Notifications","anyUrlRegex","retrievalCount","markdownConverter","setupStream","$privacyLabel","$privacy","$form","$textarea","$superbox","onPrivacyLabelClick","onPrivacyBlur","getInputPlaceholder","frmAction","is","$submitbutton","handleMicroblogKeyPress","removeClass","postType","urlMatch","lookup","encodeURIComponent","$urlPreview","revertToMicroblog","extUrlContent","srcmeta","contentType","meta","imageWidth","imageHeight","$imgcontainer","$img","renderSuperboxAsExternalLink","textInputVal","streamItem","streamItemType","streamItemTypes","originatorId","user","userId","ownerId","ownerType","privacy","linkMeta","userCaption","contentTitle","contentDescription","linkType","videoUrl","videoType","videoHeight","videoWidth","post","renderStreamItem","removeAttr","$streamItemsContainer","$streamItems","lastStreamItem","streamType","loadStream","targetUserId","loadProfileStream","loadAggregateStream","region","prepToken","siid","valueOf","streamItems","renderStream","$item","renderMicroblogItem","renderExternalLink","$streamItemContextMenu","autoUpdateTimestamp","$container","$heading","renderStreamItemHeading","$content","contentSource","$footer","renderStreamItemFooter","$caption","caption","$contentDescription","$playbackOverlay","timestamp","moment","utc","ts","fromNow","profileHref","originatorUsername","streamItemHref","editDate","editedDate","streamItemPrivacy","originatorFullName","getStreamItem","$streamItem","$streamItemCtxButton","parents","$ctxMenu","bodyClickHandler","closeMenu","$mnuEdit","editStreamItemInline","$mnuDelete","showDeleteItemDialog","isSuperUser","editMicroblogUrl","editExternalLinkStreamItemUrl","postEdit","$ta","$editForm","closeEdit","$formControls","$edited","$deleteModal","errorHandler","deleteItem","updateTimeStamp","UserContacts","apiBaseUrl","userContactsService","_opts","$toggleContactEl","toggleContactButtonSelector","profileId","isAContact","finally","UserBlog","UserBlogEdit","ui","UI","util","onJQueryDocumentReady","$a","$el","Messaging","Stream"],"sourceRoot":""}