return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Ve(this)-this.display.barHeight,width:e.scrollWidth-Ve(this)-this.display.barWidth,clientHeight:Xe(this),clientWidth:Ke(this)}},scrollIntoView:Ht(function(e,t){if(null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeofe?e={from:Fo(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line)Bn(this),this.curOp.scrollToPos=e;else{varn=zn(this,Math.min(e.from.left,e.to.left),Math.min(e.from.top,e.to.top)-e.margin,Math.max(e.from.right,e.to.right),Math.max(e.from.bottom,e.to.bottom)+e.margin);this.scrollTo(n.scrollLeft,n.scrollTop)}}),setSize:Ht(function(e,t){functionn(e){return"number"==typeofe||/^\d+$/.test(String(e))?e+"px":e}varr=this;null!=e&&(r.display.wrapper.style.width=n(e)),null!=t&&(r.display.wrapper.style.height=n(t)),r.options.lineWrapping&&at(this);vari=r.display.viewFrom;r.doc.iter(i,r.display.viewTo,function(e){if(e.widgets)for(vart=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){zt(r,i,"widget");break}++i}),r.curOp.forceUpdate=!0,Dl(r,"refresh",this)}),operation:function(e){returnOt(this,e)},refresh:Ht(function(){vare=this.display.cachedTextHeight;Pt(this),this.curOp.forceUpdate=!0,st(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),u(this),(null==e||Math.abs(e-xt(this.display))>.5)&&l(this),Dl(this,"refresh",this)}),swapDoc:Ht(function(e){vart=this.doc;returnt.cm=null,Zr(this,e),st(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Li(this,"swapDoc",this,t),t}),getInputField:function(){returnthis.display.input.getField()},getWrapperElement:function(){returnthis.display.wrapper},getScrollerElement:function(){returnthis.display.scroller},getGutterElement:function(){returnthis.display.gutters}},Oi(e);varel=e.defaults={},tl=e.optionHandlers={},nl=e.Init={toString:function(){return"CodeMirror.Init"}};$n("value","",function(e,t){e.setValue(t)},!0),$n("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),$n("indentUnit",2,n,!0),$n("indentWithTabs",!1),$n("smartIndent",!0),$n("tabSize",4,function(e){r(e),st(e),Pt(e)},!0),$n("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){varn=[],r=e.doc.first;e.doc.iter(function(e){for(vari=0;;){varo=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(Fo(r,o))}r++});for(vari=n.length-1;i>=0;i--)Dn(e.doc,t,n[i],Fo(n[i].line,n[i].ch+t.length))}}),$n("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,r){t.state.specialChars=newRegExp(n.source+(n.test(" ")?"":"| "),"g"),r!=e.Init&&t.refresh()}),$n("specialCharPlaceholder",Br,function(e){e.refresh()},!0),$n("electricChars",!0),$n("inputStyle",Oo?"contenteditable":"textarea",function(){thrownewError("inputStyle can not (yet) be changed in a running editor")},!0),$n("rtlMoveVisually",!Ho),$n("wholeLineUpdateBefore",!0),$n("theme","default",function(e){a(e),s(e)},!0),$n("keyMap","default",function(t,n,r){vari=Kn(n),o=r!=e.Init&&Kn(r);o&&o.detach&&o.detach(t,i),i.attach&&i.attach(t,o||null)}),$n("extraKeys",null),$n("lineWrapping",!1,i,!0),$n("gutters",[],function(e){f(e.options),s(e)},!0),$n("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?S(e.display)+"px":"0",e.refresh()},!0),$n("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),$n("scrollbarStyle","native",function(e){v(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),$n("lineNumbers",!1,function(e){f(e.options),s(e)},!0),$n("firstLineNumber",1,s,!0),$n("lineNumberFormatter",function(e){returne},s,!0),$n("showCursorWhenSelecting",!1,Ie,!0),$n("resetSelectionOnContextMenu",!0),$n("lineWiseCopyCut",!0),$n("readOnly",!1,function(e,t){"nocursor"==t?(xn(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),$n("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),$n("dragDrop",!0,Gt),$n("allowDropFileTypes",null),$n("cursorBlinkRate",530),$n("cursorSc
v;if("endTag"==e||"selfcloseTag"==e){varr=n.tagName,i=n.tagStart;returnn.tagName=n.tagStart=null,"selfcloseTag"==e||L.autoSelfClosers.hasOwnProperty(r)?u(n,r):(u(n,r),n.context=news(n,r,i==n.indented)),d}returnS="error",g}functionv(e,t,n){return"equals"==e?y:(L.allowMissing||(S="error"),g(e,t,n))}functiony(e,t,n){return"string"==e?x:"word"==e&&L.allowUnquoted?(S="string",g):(S="error",g(e,t,n))}functionx(e,t,n){return"string"==e?x:g(e,t,n)}varb=t.indentUnit,w=n.multilineTagIndentFactor||1,k=n.multilineTagIndentPastTag;null==k&&(k=!0);varC,S,L=n.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1},T=n.alignCDATA;returnr.isInText=!0,{startState:function(){return{tokenize:r,state:d,indented:0,tagName:null,tagStart:null,context:null}},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())returnnull;C=null;varn=t.tokenize(e,t);return(n||C)&&"comment"!=n&&(S=null,t.state=t.state(C||n,e,t),S&&(n="error"==S?n+" error":S)),n},indent:function(t,n,o){varl=t.context;if(t.tokenize.isInAttribute)returnt.tagStart==t.indented?t.stringStartCol+1:t.indented+b;if(l&&l.noIndent)returne.Pass;if(t.tokenize!=i&&t.tokenize!=r)returno?o.match(/^(\s*)/)[0].length:0;if(t.tagName)returnk?t.tagStart+t.tagName.length+2:t.tagStart+b*w;if(T&&/<!\[CDATA\[/.test(n))return0;vara=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(a&&a[1])for(;l;){if(l.tagName==a[2]){l=l.prev;break}if(!L.implicitlyClosed.hasOwnProperty(l.tagName))break;l=l.prev}elseif(a)for(;l;){vars=L.contextGrabbers[l.tagName];if(!s||!s.hasOwnProperty(a[2]))break;l=l.prev}for(;l&&!l.startOfLine;)l=l.prev;returnl?l.indent+b:0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:n.htmlMode?"html":"xml",helperType:n.htmlMode?"html":"xml"}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},{"../../lib/codemirror":6}],11:[function(t,n,r){(function(t){(function(){functiont(e){this.tokens=[],this.tokens.links={},this.options=e||h.defaults,this.rules=f.normal,this.options.gfm&&(this.options.tables?this.rules=f.tables:this.rules=f.gfm)}functioni(e,t){if(this.options=t||h.defaults,this.links=e,this.rules=p.normal,this.renderer=this.options.renderer||newo,this.renderer.options=this.options,!this.links)thrownewError("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=p.breaks:this.rules=p.gfm:this.options.pedantic&&(this.rules=p.pedantic)}functiono(e){this.options=e||{}}functionl(e){this.tokens=[],this.token=null,this.options=e||h.defaults,this.options.renderer=this.options.renderer||newo,this.renderer=this.options.renderer,this.renderer.options=this.options}functiona(e,t){returne.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}functions(e){returne.replace(/&([#\w]+);/g,function(e,t){returnt=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}functionc(e,t){returne=e.source,t=t||"",fun
className:"fa fa-list-ul",title:"Generic List (Ctrl+L)","default":!0},"ordered-list":{name:"ordered-list",action:x,className:"fa fa-list-ol",title:"Numbered List (Ctrl+Alt+L)","default":!0},"separator-2":{name:"separator-2"},link:{name:"link",action:b,className:"fa fa-link",title:"Create Link (Ctrl+K)","default":!0},image:{name:"image",action:w,className:"fa fa-picture-o",title:"Insert Image (Ctrl+Alt+I)","default":!0},table:{name:"table",action:k,className:"fa fa-table",title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:C,className:"fa fa-minus",title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:M,className:"fa fa-eye no-disable",title:"Toggle Preview (Ctrl+P)","default":!0},"side-by-side":{name:"side-by-side",action:T,className:"fa fa-columns no-disable no-mobile",title:"Toggle Side by Side (F9)","default":!0},fullscreen:{name:"fullscreen",action:a,className:"fa fa-arrows-alt no-disable no-mobile",title:"Toggle Fullscreen (F11)","default":!0},guide:{name:"guide",action:"http://nextstepwebs.github.io/simplemde-markdown-editor/markdown-guide",className:"fa fa-question-circle",title:"Markdown Guide","default":!0}},q={link:["[","](http://)"],image:["![](http://",")"],table:["","\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],horizontalRule:["","\n\n-----\n\n"]},G={bold:"**",italic:"*"};I.prototype.markdown=function(e){if(z){vart={};returnthis.options&&this.options.renderingConfig&&this.options.renderingConfig.singleLineBreaks!==!1&&(t.breaks=!0),this.options&&this.options.renderingConfig&&this.options.renderingConfig.codeSyntaxHighlighting===!0&&window.hljs&&(t.highlight=function(e){returnwindow.hljs.highlightAuto(e).value}),z.setOptions(t),z(e)}},I.prototype.render=function(e){if(e||(e=this.element||document.getElementsByTagName("textarea")[0]),!this._rendered||this._rendered!==e){this.element=e;vart=this.options,n=this,i={};for(varoinR)!function(e){i[r(e)]=function(){R[e](n)}}(o);i.Enter="newlineAndIndentContinueMarkdownList",i.Tab="tabAndIndentMarkdownList",i["Shift-Tab"]="shiftTabAndUnindentMarkdownList",i.F11=function(){a(n)},i.F9=function(){T(n)},i.Esc=function(e){e.getOption("fullScreen")&&a(n)},document.addEventListener("keydown",function(e){e=e||window.event,27==e.keyCode&&n.codemirror.getOption("fullScreen")&&a(n)},!1);varl,s;t.spellChecker!==!1?(l="spell-checker",s=t.parsingConfig,s.name="gfm",s.gitHubSpice=!1):(l=t.parsingConfig,l.name="gfm",l.gitHubSpice=!1),this.codemirror=P.fromTextArea(e,{mode:l,backdrop:s,theme:"paper",tabSize:void0!=t.tabSize?t.tabSize:2,indentUnit:void0!=t.tabSize?t.tabSize:2,indentWithTabs:t.indentWithTabs===!1?!1:!0,lineNumbers:!1,autofocus:t.autofocus===!0?!0:!1,extraKeys:i,lineWrapping:t.lineWrapping===!1?!1:!0,allowDropFileTypes:["text/plain"]}),t.toolbar!==!1&&this.createToolbar(),t.status!==!1&&this.createStatusbar(),void0!=t.autosave&&t.autosave.enabled===!0&&this.autosave(),this.createSideBySide(),this._rendered=this.element}},I.prototype.autosave=function(){if(localStorage){vare=this;if(void0==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)returnvoidconsole.log("SimpleMDE: You must set a uniqueId to use the autosave feature");null!=e.element.form&&void0!=e.element.form&&e.element.form.addEventListener("submit",function(){localStorage.removeItem("smde_"+e.options.autosave.uniqueId)}),this.options.autosave.loaded!==!0&&("string"==typeoflocalStorage.getItem("smde_"+this.options.autosave.uniqueId)&&""!=localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0),localStorage.setItem("smde_"+this.options.autosave.uniqueId,e.value());vart=document.getElementById("autosaved");if(null!=t&&void0!=t&&""!=t){varn=newDate,r=n.getHours(),i=n.getMinutes(),o="am",l=r;l>=12&&(l=r-12,o="pm"),0==l&&(l=12),i=10>i?"0"+i:i,t.innerHTML="Autosaved: "+l+":"+i+" "+o