From f5b491545535dab95aff3feb746024f9d2ccd358 Mon Sep 17 00:00:00 2001 From: gsw945 Date: Wed, 27 Mar 2024 16:26:01 +0800 Subject: [PATCH 1/4] upgrade editor.md(many bug exists) --- static/editor.md/css/editormd.css | 351 +- static/editor.md/css/editormd.logo.css | 17 +- static/editor.md/css/editormd.logo.min.css | 4 +- static/editor.md/css/editormd.min.css | 6 +- static/editor.md/css/editormd.preview.css | 184 +- static/editor.md/css/editormd.preview.min.css | 4 +- static/editor.md/editormd.amd.js | 3114 +-- static/editor.md/editormd.amd.min.js | 6 +- static/editor.md/editormd.js | 969 +- static/editor.md/editormd.min.js | 3 +- static/editor.md/languages/en.js | 32 +- static/editor.md/languages/zh-tw.js | 8 +- static/editor.md/lib/codemirror/AUTHORS | 521 +- static/editor.md/lib/codemirror/LICENSE | 4 +- static/editor.md/lib/codemirror/README.md | 53 +- .../lib/codemirror/addon/comment/comment.js | 76 +- .../addon/comment/continuecomment.js | 91 +- .../lib/codemirror/addon/dialog/dialog.css | 4 +- .../lib/codemirror/addon/dialog/dialog.js | 18 +- .../codemirror/addon/display/autorefresh.js | 47 + .../codemirror/addon/display/fullscreen.js | 2 +- .../lib/codemirror/addon/display/panel.js | 95 +- .../codemirror/addon/display/placeholder.js | 26 +- .../lib/codemirror/addon/display/rulers.js | 43 +- .../codemirror/addon/edit/closebrackets.js | 306 +- .../lib/codemirror/addon/edit/closetag.js | 71 +- .../lib/codemirror/addon/edit/continuelist.js | 78 +- .../codemirror/addon/edit/matchbrackets.js | 78 +- .../lib/codemirror/addon/edit/matchtags.js | 2 +- .../codemirror/addon/edit/trailingspace.js | 2 +- .../lib/codemirror/addon/fold/brace-fold.js | 110 +- .../lib/codemirror/addon/fold/comment-fold.js | 6 +- .../lib/codemirror/addon/fold/foldcode.js | 28 +- .../lib/codemirror/addon/fold/foldgutter.js | 43 +- .../lib/codemirror/addon/fold/indent-fold.js | 36 +- .../codemirror/addon/fold/markdown-fold.js | 2 +- .../lib/codemirror/addon/fold/xml-fold.js | 22 +- .../lib/codemirror/addon/hint/anyword-hint.js | 4 +- .../lib/codemirror/addon/hint/css-hint.js | 18 +- .../lib/codemirror/addon/hint/html-hint.js | 5 +- .../lib/codemirror/addon/hint/show-hint.css | 2 - .../lib/codemirror/addon/hint/show-hint.js | 399 +- .../lib/codemirror/addon/hint/sql-hint.js | 206 +- .../lib/codemirror/addon/hint/xml-hint.js | 58 +- .../addon/lint/coffeescript-lint.js | 8 +- .../lib/codemirror/addon/lint/css-lint.js | 13 +- .../lib/codemirror/addon/lint/html-lint.js | 59 + .../lib/codemirror/addon/lint/json-lint.js | 11 +- .../lib/codemirror/addon/lint/lint.css | 36 +- .../lib/codemirror/addon/lint/lint.js | 164 +- .../lib/codemirror/addon/lint/yaml-lint.js | 21 +- .../lib/codemirror/addon/merge/merge.css | 7 + .../lib/codemirror/addon/merge/merge.js | 466 +- .../lib/codemirror/addon/mode/loadmode.js | 24 +- .../lib/codemirror/addon/mode/multiplex.js | 58 +- .../codemirror/addon/mode/multiplex_test.js | 20 +- .../lib/codemirror/addon/mode/overlay.js | 15 +- .../lib/codemirror/addon/mode/simple.js | 21 +- .../lib/codemirror/addon/runmode/colorize.js | 2 +- .../addon/runmode/runmode-standalone.js | 445 +- .../lib/codemirror/addon/runmode/runmode.js | 20 +- .../codemirror/addon/runmode/runmode.node.js | 385 +- .../addon/scroll/annotatescrollbar.js | 44 +- .../codemirror/addon/scroll/scrollpastend.js | 4 +- .../addon/scroll/simplescrollbars.js | 39 +- .../codemirror/addon/search/jump-to-line.js | 53 + .../addon/search/match-highlighter.js | 109 +- .../addon/search/matchesonscrollbar.js | 8 +- .../lib/codemirror/addon/search/search.js | 208 +- .../codemirror/addon/search/searchcursor.js | 426 +- .../codemirror/addon/selection/active-line.js | 29 +- .../addon/selection/mark-selection.js | 9 +- .../addon/selection/selection-pointer.js | 2 +- .../lib/codemirror/addon/tern/tern.css | 1 + .../lib/codemirror/addon/tern/tern.js | 113 +- .../lib/codemirror/addon/tern/worker.js | 4 +- .../lib/codemirror/addon/wrap/hardwrap.js | 53 +- static/editor.md/lib/codemirror/addons.min.js | 6 +- .../lib/codemirror/codemirror.min.css | 5 +- .../lib/codemirror/codemirror.min.js | 56 +- .../lib/codemirror/lib/codemirror.css | 179 +- .../lib/codemirror/lib/codemirror.js | 15716 +++++++++------- .../editor.md/lib/codemirror/mode/apl/apl.js | 5 +- .../lib/codemirror/mode/apl/index.html | 2 +- .../codemirror/mode/asciiarmor/asciiarmor.js | 74 + .../lib/codemirror/mode/asciiarmor/index.html | 46 + .../lib/codemirror/mode/asn.1/asn.1.js | 204 + .../lib/codemirror/mode/asn.1/index.html | 78 + .../lib/codemirror/mode/asterisk/asterisk.js | 36 +- .../lib/codemirror/mode/asterisk/index.html | 5 +- .../codemirror/mode/brainfuck/brainfuck.js | 85 + .../lib/codemirror/mode/brainfuck/index.html | 85 + .../lib/codemirror/mode/clike/clike.js | 672 +- .../lib/codemirror/mode/clike/index.html | 145 +- .../lib/codemirror/mode/clike/scala.html | 2 +- .../lib/codemirror/mode/clike/test.js | 165 + .../lib/codemirror/mode/clojure/clojure.js | 471 +- .../lib/codemirror/mode/clojure/index.html | 93 +- .../lib/codemirror/mode/clojure/test.js | 384 + .../lib/codemirror/mode/cmake/cmake.js | 97 + .../lib/codemirror/mode/cmake/index.html | 129 + .../lib/codemirror/mode/cobol/cobol.js | 4 +- .../lib/codemirror/mode/cobol/index.html | 2 +- .../mode/coffeescript/coffeescript.js | 46 +- .../codemirror/mode/coffeescript/index.html | 4 +- .../codemirror/mode/commonlisp/commonlisp.js | 7 +- .../lib/codemirror/mode/commonlisp/index.html | 2 +- .../lib/codemirror/mode/crystal/crystal.js | 433 + .../lib/codemirror/mode/crystal/index.html | 116 + .../editor.md/lib/codemirror/mode/css/css.js | 446 +- .../lib/codemirror/mode/css/gss.html | 104 + .../lib/codemirror/mode/css/gss_test.js | 17 + .../lib/codemirror/mode/css/index.html | 10 +- .../lib/codemirror/mode/css/less.html | 8 +- .../lib/codemirror/mode/css/less_test.js | 13 +- .../lib/codemirror/mode/css/scss.html | 5 +- .../lib/codemirror/mode/css/scss_test.js | 14 +- .../editor.md/lib/codemirror/mode/css/test.js | 86 +- .../lib/codemirror/mode/cypher/cypher.js | 21 +- .../lib/codemirror/mode/cypher/index.html | 5 +- .../lib/codemirror/mode/cypher/test.js | 37 + static/editor.md/lib/codemirror/mode/d/d.js | 11 +- .../lib/codemirror/mode/d/index.html | 2 +- .../editor.md/lib/codemirror/mode/d/test.js | 11 + .../lib/codemirror/mode/dart/dart.js | 130 +- .../lib/codemirror/mode/dart/index.html | 2 +- .../lib/codemirror/mode/diff/diff.js | 2 +- .../lib/codemirror/mode/diff/index.html | 2 +- .../lib/codemirror/mode/django/django.js | 341 +- .../lib/codemirror/mode/django/index.html | 48 +- .../codemirror/mode/dockerfile/dockerfile.js | 169 +- .../lib/codemirror/mode/dockerfile/index.html | 4 +- .../lib/codemirror/mode/dockerfile/test.js | 128 + .../editor.md/lib/codemirror/mode/dtd/dtd.js | 18 +- .../lib/codemirror/mode/dtd/index.html | 4 +- .../lib/codemirror/mode/dylan/dylan.js | 141 +- .../lib/codemirror/mode/dylan/index.html | 4 +- .../lib/codemirror/mode/dylan/test.js | 88 + .../lib/codemirror/mode/ebnf/ebnf.js | 18 +- .../lib/codemirror/mode/ebnf/index.html | 4 +- .../editor.md/lib/codemirror/mode/ecl/ecl.js | 5 +- .../lib/codemirror/mode/ecl/index.html | 2 +- .../lib/codemirror/mode/eiffel/eiffel.js | 4 +- .../lib/codemirror/mode/eiffel/index.html | 2 +- .../editor.md/lib/codemirror/mode/elm/elm.js | 243 + .../lib/codemirror/mode/elm/index.html | 61 + .../lib/codemirror/mode/erlang/erlang.js | 15 +- .../lib/codemirror/mode/erlang/index.html | 4 +- .../lib/codemirror/mode/factor/factor.js | 85 + .../lib/codemirror/mode/factor/index.html | 77 + .../editor.md/lib/codemirror/mode/fcl/fcl.js | 173 + .../lib/codemirror/mode/fcl/index.html | 108 + .../lib/codemirror/mode/forth/forth.js | 2 +- .../lib/codemirror/mode/forth/index.html | 4 +- .../lib/codemirror/mode/fortran/fortran.js | 4 +- .../lib/codemirror/mode/fortran/index.html | 6 +- .../editor.md/lib/codemirror/mode/gas/gas.js | 14 +- .../lib/codemirror/mode/gas/index.html | 2 +- .../editor.md/lib/codemirror/mode/gfm/gfm.js | 50 +- .../lib/codemirror/mode/gfm/index.html | 53 +- .../editor.md/lib/codemirror/mode/gfm/test.js | 95 +- .../lib/codemirror/mode/gherkin/gherkin.js | 2 +- .../lib/codemirror/mode/gherkin/index.html | 2 +- static/editor.md/lib/codemirror/mode/go/go.js | 14 +- .../lib/codemirror/mode/go/index.html | 2 +- .../lib/codemirror/mode/groovy/groovy.js | 27 +- .../lib/codemirror/mode/groovy/index.html | 2 +- .../lib/codemirror/mode/haml/haml.js | 16 +- .../lib/codemirror/mode/haml/index.html | 2 +- .../lib/codemirror/mode/haml/test.js | 2 +- .../codemirror/mode/handlebars/handlebars.js | 70 + .../lib/codemirror/mode/handlebars/index.html | 82 + .../mode/haskell-literate/haskell-literate.js | 43 + .../mode/haskell-literate/index.html | 282 + .../lib/codemirror/mode/haskell/haskell.js | 21 +- .../lib/codemirror/mode/haskell/index.html | 4 +- .../lib/codemirror/mode/haxe/haxe.js | 169 +- .../lib/codemirror/mode/haxe/index.html | 4 +- .../mode/htmlembedded/htmlembedded.js | 105 +- .../codemirror/mode/htmlembedded/index.html | 14 +- .../codemirror/mode/htmlmixed/htmlmixed.js | 226 +- .../lib/codemirror/mode/htmlmixed/index.html | 33 +- .../lib/codemirror/mode/http/http.js | 2 +- .../lib/codemirror/mode/http/index.html | 4 +- .../editor.md/lib/codemirror/mode/idl/idl.js | 4 +- .../lib/codemirror/mode/idl/index.html | 5 +- .../editor.md/lib/codemirror/mode/index.html | 48 +- .../lib/codemirror/mode/javascript/index.html | 10 +- .../codemirror/mode/javascript/javascript.js | 606 +- .../codemirror/mode/javascript/json-ld.html | 4 +- .../lib/codemirror/mode/javascript/test.js | 385 +- .../mode/javascript/typescript.html | 21 +- .../lib/codemirror/mode/jinja2/index.html | 4 +- .../lib/codemirror/mode/jinja2/jinja2.js | 10 +- .../lib/codemirror/mode/jsx/index.html | 89 + .../editor.md/lib/codemirror/mode/jsx/jsx.js | 148 + .../editor.md/lib/codemirror/mode/jsx/test.js | 98 + .../lib/codemirror/mode/julia/index.html | 5 +- .../lib/codemirror/mode/julia/julia.js | 427 +- .../lib/codemirror/mode/livescript/index.html | 2 +- .../codemirror/mode/livescript/livescript.js | 8 +- .../lib/codemirror/mode/lua/index.html | 4 +- .../editor.md/lib/codemirror/mode/lua/lua.js | 3 +- .../lib/codemirror/mode/markdown/index.html | 105 +- .../lib/codemirror/mode/markdown/markdown.js | 635 +- .../lib/codemirror/mode/markdown/test.js | 725 +- .../codemirror/mode/mathematica/index.html | 72 + .../mode/mathematica/mathematica.js | 176 + .../lib/codemirror/mode/mbox/index.html | 44 + .../lib/codemirror/mode/mbox/mbox.js | 129 + static/editor.md/lib/codemirror/mode/meta.js | 102 +- .../lib/codemirror/mode/mirc/index.html | 3 +- .../lib/codemirror/mode/mirc/mirc.js | 4 +- .../lib/codemirror/mode/mllike/index.html | 21 +- .../lib/codemirror/mode/mllike/mllike.js | 248 +- .../lib/codemirror/mode/modelica/index.html | 2 +- .../lib/codemirror/mode/modelica/modelica.js | 8 +- .../lib/codemirror/mode/mscgen/index.html | 151 + .../lib/codemirror/mode/mscgen/mscgen.js | 175 + .../lib/codemirror/mode/mscgen/mscgen_test.js | 84 + .../codemirror/mode/mscgen/msgenny_test.js | 77 + .../lib/codemirror/mode/mscgen/xu_test.js | 87 + .../lib/codemirror/mode/mumps/index.html | 85 + .../lib/codemirror/mode/mumps/mumps.js | 148 + .../lib/codemirror/mode/nginx/index.html | 10 +- .../lib/codemirror/mode/nginx/nginx.js | 4 +- .../lib/codemirror/mode/nsis/index.html | 80 + .../lib/codemirror/mode/nsis/nsis.js | 95 + .../lib/codemirror/mode/ntriples/index.html | 37 +- .../lib/codemirror/mode/ntriples/ntriples.js | 17 +- .../lib/codemirror/mode/octave/index.html | 7 +- .../lib/codemirror/mode/octave/octave.js | 14 +- .../lib/codemirror/mode/oz/index.html | 59 + static/editor.md/lib/codemirror/mode/oz/oz.js | 252 + .../lib/codemirror/mode/pascal/index.html | 4 +- .../lib/codemirror/mode/pascal/pascal.js | 37 +- .../lib/codemirror/mode/pegjs/index.html | 4 +- .../lib/codemirror/mode/pegjs/pegjs.js | 20 +- .../lib/codemirror/mode/perl/index.html | 4 +- .../lib/codemirror/mode/perl/perl.js | 17 +- .../lib/codemirror/mode/php/index.html | 4 +- .../editor.md/lib/codemirror/mode/php/php.js | 66 +- .../editor.md/lib/codemirror/mode/php/test.js | 2 +- .../lib/codemirror/mode/pig/index.html | 6 +- .../editor.md/lib/codemirror/mode/pig/pig.js | 42 +- .../lib/codemirror/mode/powershell/index.html | 209 + .../codemirror/mode/powershell/powershell.js | 398 + .../lib/codemirror/mode/powershell/test.js | 74 + .../lib/codemirror/mode/properties/index.html | 2 +- .../codemirror/mode/properties/properties.js | 6 +- .../lib/codemirror/mode/protobuf/index.html | 104 + .../lib/codemirror/mode/protobuf/protobuf.js | 72 + .../lib/codemirror/mode/pug/index.html | 70 + .../editor.md/lib/codemirror/mode/pug/pug.js | 591 + .../lib/codemirror/mode/puppet/index.html | 2 +- .../lib/codemirror/mode/puppet/puppet.js | 6 +- .../lib/codemirror/mode/python/index.html | 19 +- .../lib/codemirror/mode/python/python.js | 293 +- .../lib/codemirror/mode/python/test.js | 74 + .../lib/codemirror/mode/q/index.html | 4 +- static/editor.md/lib/codemirror/mode/q/q.js | 16 +- .../lib/codemirror/mode/r/index.html | 67 +- static/editor.md/lib/codemirror/mode/r/r.js | 70 +- .../codemirror/mode/rpm/changes/index.html | 4 +- .../lib/codemirror/mode/rpm/index.html | 4 +- .../editor.md/lib/codemirror/mode/rpm/rpm.js | 36 +- .../lib/codemirror/mode/rst/index.html | 4 +- .../editor.md/lib/codemirror/mode/rst/rst.js | 2 +- .../lib/codemirror/mode/ruby/index.html | 4 +- .../lib/codemirror/mode/ruby/ruby.js | 106 +- .../lib/codemirror/mode/ruby/test.js | 11 +- .../lib/codemirror/mode/rust/index.html | 34 +- .../lib/codemirror/mode/rust/rust.js | 487 +- .../lib/codemirror/mode/rust/test.js | 39 + .../lib/codemirror/mode/sas/index.html | 81 + .../editor.md/lib/codemirror/mode/sas/sas.js | 303 + .../lib/codemirror/mode/sass/index.html | 6 +- .../lib/codemirror/mode/sass/sass.js | 107 +- .../lib/codemirror/mode/sass/test.js | 122 + .../lib/codemirror/mode/scheme/index.html | 2 +- .../lib/codemirror/mode/scheme/scheme.js | 74 +- .../lib/codemirror/mode/shell/index.html | 4 +- .../lib/codemirror/mode/shell/shell.js | 99 +- .../lib/codemirror/mode/shell/test.js | 24 +- .../lib/codemirror/mode/sieve/index.html | 2 +- .../lib/codemirror/mode/sieve/sieve.js | 6 +- .../lib/codemirror/mode/slim/index.html | 8 +- .../lib/codemirror/mode/slim/slim.js | 10 +- .../lib/codemirror/mode/slim/test.js | 2 +- .../lib/codemirror/mode/smalltalk/index.html | 2 +- .../codemirror/mode/smalltalk/smalltalk.js | 2 +- .../lib/codemirror/mode/smarty/index.html | 80 +- .../lib/codemirror/mode/smarty/smarty.js | 220 +- .../lib/codemirror/mode/solr/index.html | 4 +- .../lib/codemirror/mode/solr/solr.js | 6 +- .../lib/codemirror/mode/soy/index.html | 4 +- .../editor.md/lib/codemirror/mode/soy/soy.js | 593 +- .../editor.md/lib/codemirror/mode/soy/test.js | 322 + .../lib/codemirror/mode/sparql/index.html | 2 +- .../lib/codemirror/mode/sparql/sparql.js | 30 +- .../codemirror/mode/spreadsheet/index.html | 4 +- .../mode/spreadsheet/spreadsheet.js | 7 +- .../lib/codemirror/mode/sql/index.html | 15 +- .../editor.md/lib/codemirror/mode/sql/sql.js | 240 +- .../lib/codemirror/mode/stex/index.html | 8 +- .../lib/codemirror/mode/stex/stex.js | 23 +- .../lib/codemirror/mode/stex/test.js | 11 +- .../lib/codemirror/mode/stylus/index.html | 10 +- .../lib/codemirror/mode/stylus/stylus.js | 999 +- .../lib/codemirror/mode/swift/index.html | 70 + .../lib/codemirror/mode/swift/swift.js | 223 + .../lib/codemirror/mode/swift/test.js | 162 + .../lib/codemirror/mode/tcl/index.html | 2 +- .../editor.md/lib/codemirror/mode/tcl/tcl.js | 37 +- .../lib/codemirror/mode/textile/index.html | 2 +- .../lib/codemirror/mode/textile/test.js | 6 +- .../lib/codemirror/mode/textile/textile.js | 4 +- .../lib/codemirror/mode/tiddlywiki/index.html | 4 +- .../codemirror/mode/tiddlywiki/tiddlywiki.js | 279 +- .../lib/codemirror/mode/tiki/index.html | 6 +- .../lib/codemirror/mode/tiki/tiki.css | 2 +- .../lib/codemirror/mode/tiki/tiki.js | 45 +- .../lib/codemirror/mode/toml/index.html | 4 +- .../lib/codemirror/mode/toml/toml.js | 2 +- .../lib/codemirror/mode/tornado/index.html | 4 +- .../lib/codemirror/mode/tornado/tornado.js | 2 +- .../lib/codemirror/mode/troff/index.html | 146 + .../lib/codemirror/mode/troff/troff.js | 84 + .../lib/codemirror/mode/ttcn-cfg/index.html | 116 + .../lib/codemirror/mode/ttcn-cfg/ttcn-cfg.js | 214 + .../lib/codemirror/mode/ttcn/index.html | 119 + .../lib/codemirror/mode/ttcn/ttcn.js | 283 + .../lib/codemirror/mode/turtle/index.html | 3 +- .../lib/codemirror/mode/turtle/turtle.js | 2 +- .../lib/codemirror/mode/twig/index.html | 47 + .../lib/codemirror/mode/twig/twig.js | 141 + .../lib/codemirror/mode/vb/index.html | 85 +- static/editor.md/lib/codemirror/mode/vb/vb.js | 27 +- .../lib/codemirror/mode/vbscript/index.html | 4 +- .../lib/codemirror/mode/vbscript/vbscript.js | 6 +- .../lib/codemirror/mode/velocity/index.html | 4 +- .../lib/codemirror/mode/velocity/velocity.js | 9 +- .../lib/codemirror/mode/verilog/index.html | 6 +- .../lib/codemirror/mode/verilog/test.js | 174 +- .../lib/codemirror/mode/verilog/verilog.js | 554 +- .../lib/codemirror/mode/vhdl/index.html | 95 + .../lib/codemirror/mode/vhdl/vhdl.js | 189 + .../lib/codemirror/mode/vue/index.html | 69 + .../editor.md/lib/codemirror/mode/vue/vue.js | 77 + .../lib/codemirror/mode/wast/index.html | 73 + .../lib/codemirror/mode/wast/test.js | 424 + .../lib/codemirror/mode/wast/wast.js | 132 + .../lib/codemirror/mode/webidl/index.html | 71 + .../lib/codemirror/mode/webidl/webidl.js | 195 + .../lib/codemirror/mode/xml/index.html | 10 +- .../editor.md/lib/codemirror/mode/xml/test.js | 2 +- .../editor.md/lib/codemirror/mode/xml/xml.js | 181 +- .../lib/codemirror/mode/xquery/index.html | 5 +- .../lib/codemirror/mode/xquery/test.js | 12 +- .../lib/codemirror/mode/xquery/xquery.js | 131 +- .../lib/codemirror/mode/yacas/index.html | 87 + .../lib/codemirror/mode/yacas/yacas.js | 204 + .../mode/yaml-frontmatter/index.html | 121 + .../mode/yaml-frontmatter/yaml-frontmatter.js | 72 + .../lib/codemirror/mode/yaml/index.html | 2 +- .../lib/codemirror/mode/yaml/yaml.js | 15 +- .../lib/codemirror/mode/z80/index.html | 19 +- .../editor.md/lib/codemirror/mode/z80/z80.js | 54 +- static/editor.md/lib/codemirror/modes.min.js | 12 +- static/editor.md/lib/codemirror/package.json | 66 +- .../lib/codemirror/theme/3024-day.css | 45 +- .../lib/codemirror/theme/3024-night.css | 44 +- .../editor.md/lib/codemirror/theme/abbott.css | 268 + .../editor.md/lib/codemirror/theme/abcdef.css | 32 + .../lib/codemirror/theme/ambiance.css | 25 +- .../lib/codemirror/theme/ayu-dark.css | 44 + .../lib/codemirror/theme/ayu-mirage.css | 45 + .../lib/codemirror/theme/base16-dark.css | 56 +- .../lib/codemirror/theme/base16-light.css | 54 +- .../editor.md/lib/codemirror/theme/bespin.css | 34 + .../lib/codemirror/theme/blackboard.css | 14 +- .../editor.md/lib/codemirror/theme/cobalt.css | 14 +- .../lib/codemirror/theme/colorforth.css | 8 +- .../lib/codemirror/theme/darcula.css | 53 + .../lib/codemirror/theme/dracula.css | 40 + .../lib/codemirror/theme/duotone-dark.css | 35 + .../lib/codemirror/theme/duotone-light.css | 36 + .../lib/codemirror/theme/eclipse.css | 42 +- .../lib/codemirror/theme/elegant.css | 24 +- .../lib/codemirror/theme/erlang-dark.css | 16 +- .../lib/codemirror/theme/gruvbox-dark.css | 39 + .../lib/codemirror/theme/hopscotch.css | 34 + .../lib/codemirror/theme/icecoder.css | 43 + .../editor.md/lib/codemirror/theme/idea.css | 42 + .../lib/codemirror/theme/isotope.css | 34 + .../editor.md/lib/codemirror/theme/juejin.css | 30 + .../lib/codemirror/theme/lesser-dark.css | 34 +- .../lib/codemirror/theme/liquibyte.css | 95 + .../lib/codemirror/theme/lucario.css | 37 + .../lib/codemirror/theme/material-darker.css | 135 + .../lib/codemirror/theme/material-ocean.css | 141 + .../codemirror/theme/material-palenight.css | 141 + .../lib/codemirror/theme/material.css | 141 + static/editor.md/lib/codemirror/theme/mbo.css | 50 +- .../lib/codemirror/theme/mdn-like.css | 20 +- .../lib/codemirror/theme/midnight.css | 54 +- .../lib/codemirror/theme/monokai.css | 50 +- .../editor.md/lib/codemirror/theme/moxer.css | 143 + .../editor.md/lib/codemirror/theme/neat.css | 6 +- static/editor.md/lib/codemirror/theme/neo.css | 14 +- .../editor.md/lib/codemirror/theme/night.css | 17 +- .../editor.md/lib/codemirror/theme/nord.css | 42 + .../lib/codemirror/theme/oceanic-next.css | 46 + .../lib/codemirror/theme/panda-syntax.css | 85 + .../lib/codemirror/theme/paraiso-dark.css | 52 +- .../lib/codemirror/theme/paraiso-light.css | 52 +- .../lib/codemirror/theme/pastel-on-dark.css | 13 +- .../lib/codemirror/theme/railscasts.css | 34 + .../lib/codemirror/theme/rubyblue.css | 12 +- .../editor.md/lib/codemirror/theme/seti.css | 44 + .../lib/codemirror/theme/shadowfox.css | 52 + .../lib/codemirror/theme/solarized.css | 70 +- .../editor.md/lib/codemirror/theme/ssms.css | 16 + .../lib/codemirror/theme/the-matrix.css | 46 +- .../theme/tomorrow-night-bright.css | 48 +- .../theme/tomorrow-night-eighties.css | 52 +- .../editor.md/lib/codemirror/theme/ttcn.css | 64 + .../lib/codemirror/theme/twilight.css | 20 +- .../lib/codemirror/theme/vibrant-ink.css | 24 +- .../lib/codemirror/theme/xq-dark.css | 44 +- .../lib/codemirror/theme/xq-light.css | 36 +- .../editor.md/lib/codemirror/theme/yeti.css | 44 + .../editor.md/lib/codemirror/theme/yonce.css | 59 + .../lib/codemirror/theme/zenburn.css | 8 +- static/editor.md/lib/flowchart.min.js | 7 +- static/editor.md/lib/jquery.flowchart.min.js | 63 +- static/editor.md/lib/marked.min.js | 6 +- static/editor.md/lib/marked.umd.js | 2454 +++ static/editor.md/lib/raphael.min.js | 14 +- static/editor.md/lib/underscore.min.js | 9 +- static/editor.md/lib/xss.js | 1726 ++ .../code-block-dialog/code-block-dialog.js | 60 +- .../plugins/emoji-dialog/emoji-dialog.js | 64 +- .../plugins/help-dialog/help-dialog.js | 2 +- static/editor.md/plugins/help-dialog/help.md | 10 +- .../plugins/link-dialog/link-dialog.js | 27 +- .../preformatted-text-dialog.js | 2 +- .../plugins/table-dialog/table-dialog.js | 42 +- 448 files changed, 42272 insertions(+), 16000 deletions(-) create mode 100644 static/editor.md/lib/codemirror/addon/display/autorefresh.js create mode 100644 static/editor.md/lib/codemirror/addon/lint/html-lint.js create mode 100644 static/editor.md/lib/codemirror/addon/search/jump-to-line.js create mode 100644 static/editor.md/lib/codemirror/mode/asciiarmor/asciiarmor.js create mode 100644 static/editor.md/lib/codemirror/mode/asciiarmor/index.html create mode 100644 static/editor.md/lib/codemirror/mode/asn.1/asn.1.js create mode 100644 static/editor.md/lib/codemirror/mode/asn.1/index.html create mode 100644 static/editor.md/lib/codemirror/mode/brainfuck/brainfuck.js create mode 100644 static/editor.md/lib/codemirror/mode/brainfuck/index.html create mode 100644 static/editor.md/lib/codemirror/mode/clike/test.js create mode 100644 static/editor.md/lib/codemirror/mode/clojure/test.js create mode 100644 static/editor.md/lib/codemirror/mode/cmake/cmake.js create mode 100644 static/editor.md/lib/codemirror/mode/cmake/index.html create mode 100644 static/editor.md/lib/codemirror/mode/crystal/crystal.js create mode 100644 static/editor.md/lib/codemirror/mode/crystal/index.html create mode 100644 static/editor.md/lib/codemirror/mode/css/gss.html create mode 100644 static/editor.md/lib/codemirror/mode/css/gss_test.js create mode 100644 static/editor.md/lib/codemirror/mode/cypher/test.js create mode 100644 static/editor.md/lib/codemirror/mode/d/test.js create mode 100644 static/editor.md/lib/codemirror/mode/dockerfile/test.js create mode 100644 static/editor.md/lib/codemirror/mode/dylan/test.js create mode 100644 static/editor.md/lib/codemirror/mode/elm/elm.js create mode 100644 static/editor.md/lib/codemirror/mode/elm/index.html create mode 100644 static/editor.md/lib/codemirror/mode/factor/factor.js create mode 100644 static/editor.md/lib/codemirror/mode/factor/index.html create mode 100644 static/editor.md/lib/codemirror/mode/fcl/fcl.js create mode 100644 static/editor.md/lib/codemirror/mode/fcl/index.html create mode 100644 static/editor.md/lib/codemirror/mode/handlebars/handlebars.js create mode 100644 static/editor.md/lib/codemirror/mode/handlebars/index.html create mode 100644 static/editor.md/lib/codemirror/mode/haskell-literate/haskell-literate.js create mode 100644 static/editor.md/lib/codemirror/mode/haskell-literate/index.html create mode 100644 static/editor.md/lib/codemirror/mode/jsx/index.html create mode 100644 static/editor.md/lib/codemirror/mode/jsx/jsx.js create mode 100644 static/editor.md/lib/codemirror/mode/jsx/test.js create mode 100644 static/editor.md/lib/codemirror/mode/mathematica/index.html create mode 100644 static/editor.md/lib/codemirror/mode/mathematica/mathematica.js create mode 100644 static/editor.md/lib/codemirror/mode/mbox/index.html create mode 100644 static/editor.md/lib/codemirror/mode/mbox/mbox.js create mode 100644 static/editor.md/lib/codemirror/mode/mscgen/index.html create mode 100644 static/editor.md/lib/codemirror/mode/mscgen/mscgen.js create mode 100644 static/editor.md/lib/codemirror/mode/mscgen/mscgen_test.js create mode 100644 static/editor.md/lib/codemirror/mode/mscgen/msgenny_test.js create mode 100644 static/editor.md/lib/codemirror/mode/mscgen/xu_test.js create mode 100644 static/editor.md/lib/codemirror/mode/mumps/index.html create mode 100644 static/editor.md/lib/codemirror/mode/mumps/mumps.js create mode 100644 static/editor.md/lib/codemirror/mode/nsis/index.html create mode 100644 static/editor.md/lib/codemirror/mode/nsis/nsis.js create mode 100644 static/editor.md/lib/codemirror/mode/oz/index.html create mode 100644 static/editor.md/lib/codemirror/mode/oz/oz.js create mode 100644 static/editor.md/lib/codemirror/mode/powershell/index.html create mode 100644 static/editor.md/lib/codemirror/mode/powershell/powershell.js create mode 100644 static/editor.md/lib/codemirror/mode/powershell/test.js create mode 100644 static/editor.md/lib/codemirror/mode/protobuf/index.html create mode 100644 static/editor.md/lib/codemirror/mode/protobuf/protobuf.js create mode 100644 static/editor.md/lib/codemirror/mode/pug/index.html create mode 100644 static/editor.md/lib/codemirror/mode/pug/pug.js create mode 100644 static/editor.md/lib/codemirror/mode/python/test.js create mode 100644 static/editor.md/lib/codemirror/mode/rust/test.js create mode 100644 static/editor.md/lib/codemirror/mode/sas/index.html create mode 100644 static/editor.md/lib/codemirror/mode/sas/sas.js create mode 100644 static/editor.md/lib/codemirror/mode/sass/test.js create mode 100644 static/editor.md/lib/codemirror/mode/soy/test.js create mode 100644 static/editor.md/lib/codemirror/mode/swift/index.html create mode 100644 static/editor.md/lib/codemirror/mode/swift/swift.js create mode 100644 static/editor.md/lib/codemirror/mode/swift/test.js create mode 100644 static/editor.md/lib/codemirror/mode/troff/index.html create mode 100644 static/editor.md/lib/codemirror/mode/troff/troff.js create mode 100644 static/editor.md/lib/codemirror/mode/ttcn-cfg/index.html create mode 100644 static/editor.md/lib/codemirror/mode/ttcn-cfg/ttcn-cfg.js create mode 100644 static/editor.md/lib/codemirror/mode/ttcn/index.html create mode 100644 static/editor.md/lib/codemirror/mode/ttcn/ttcn.js create mode 100644 static/editor.md/lib/codemirror/mode/twig/index.html create mode 100644 static/editor.md/lib/codemirror/mode/twig/twig.js create mode 100644 static/editor.md/lib/codemirror/mode/vhdl/index.html create mode 100644 static/editor.md/lib/codemirror/mode/vhdl/vhdl.js create mode 100644 static/editor.md/lib/codemirror/mode/vue/index.html create mode 100644 static/editor.md/lib/codemirror/mode/vue/vue.js create mode 100644 static/editor.md/lib/codemirror/mode/wast/index.html create mode 100644 static/editor.md/lib/codemirror/mode/wast/test.js create mode 100644 static/editor.md/lib/codemirror/mode/wast/wast.js create mode 100644 static/editor.md/lib/codemirror/mode/webidl/index.html create mode 100644 static/editor.md/lib/codemirror/mode/webidl/webidl.js create mode 100644 static/editor.md/lib/codemirror/mode/yacas/index.html create mode 100644 static/editor.md/lib/codemirror/mode/yacas/yacas.js create mode 100644 static/editor.md/lib/codemirror/mode/yaml-frontmatter/index.html create mode 100644 static/editor.md/lib/codemirror/mode/yaml-frontmatter/yaml-frontmatter.js create mode 100644 static/editor.md/lib/codemirror/theme/abbott.css create mode 100644 static/editor.md/lib/codemirror/theme/abcdef.css create mode 100644 static/editor.md/lib/codemirror/theme/ayu-dark.css create mode 100644 static/editor.md/lib/codemirror/theme/ayu-mirage.css create mode 100644 static/editor.md/lib/codemirror/theme/bespin.css create mode 100644 static/editor.md/lib/codemirror/theme/darcula.css create mode 100644 static/editor.md/lib/codemirror/theme/dracula.css create mode 100644 static/editor.md/lib/codemirror/theme/duotone-dark.css create mode 100644 static/editor.md/lib/codemirror/theme/duotone-light.css create mode 100644 static/editor.md/lib/codemirror/theme/gruvbox-dark.css create mode 100644 static/editor.md/lib/codemirror/theme/hopscotch.css create mode 100644 static/editor.md/lib/codemirror/theme/icecoder.css create mode 100644 static/editor.md/lib/codemirror/theme/idea.css create mode 100644 static/editor.md/lib/codemirror/theme/isotope.css create mode 100644 static/editor.md/lib/codemirror/theme/juejin.css create mode 100644 static/editor.md/lib/codemirror/theme/liquibyte.css create mode 100644 static/editor.md/lib/codemirror/theme/lucario.css create mode 100644 static/editor.md/lib/codemirror/theme/material-darker.css create mode 100644 static/editor.md/lib/codemirror/theme/material-ocean.css create mode 100644 static/editor.md/lib/codemirror/theme/material-palenight.css create mode 100644 static/editor.md/lib/codemirror/theme/material.css create mode 100644 static/editor.md/lib/codemirror/theme/moxer.css create mode 100644 static/editor.md/lib/codemirror/theme/nord.css create mode 100644 static/editor.md/lib/codemirror/theme/oceanic-next.css create mode 100644 static/editor.md/lib/codemirror/theme/panda-syntax.css create mode 100644 static/editor.md/lib/codemirror/theme/railscasts.css create mode 100644 static/editor.md/lib/codemirror/theme/seti.css create mode 100644 static/editor.md/lib/codemirror/theme/shadowfox.css create mode 100644 static/editor.md/lib/codemirror/theme/ssms.css create mode 100644 static/editor.md/lib/codemirror/theme/ttcn.css create mode 100644 static/editor.md/lib/codemirror/theme/yeti.css create mode 100644 static/editor.md/lib/codemirror/theme/yonce.css create mode 100644 static/editor.md/lib/marked.umd.js create mode 100644 static/editor.md/lib/xss.js diff --git a/static/editor.md/css/editormd.css b/static/editor.md/css/editormd.css index cb475be87..fbe7e2da6 100644 --- a/static/editor.md/css/editormd.css +++ b/static/editor.md/css/editormd.css @@ -2,12 +2,12 @@ * Editor.md * * @file editormd.css - * @version v1.5.0 + * @version v1.7.17 * @description Open source online markdown editor. * @license MIT License - * @author Pandao - * {@link https://github.com/pandao/editor.md} - * @updateTime 2015-06-09 + * @author IBM Skills Network + * {@link https://github.com/ibm-skills-network/editor.md} + * @updateTime 2024-03-27 */ @charset "UTF-8"; @@ -47,9 +47,9 @@ .editormd .editormd-markdown-textarea { display: none; } -.editormd input[type="text"], -.editormd input[type="button"], -.editormd input[type="submit"], +.editormd input[type=text], +.editormd input[type=button], +.editormd input[type=submit], .editormd select, .editormd textarea, .editormd button { -webkit-appearance: none; -moz-appearance: none; @@ -73,16 +73,11 @@ border-radius: 6px; } .editormd ::-webkit-scrollbar-thumb:hover { - -webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); - /* Webkit browsers */ - -moz-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); - /* Firefox */ - -ms-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); - /* IE9 */ - -o-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); - /* Opera(Old) */ - box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); - /* IE9+, News */ + -webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); /* Webkit browsers */ + -moz-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); /* Firefox */ + -ms-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); /* IE9 */ + -o-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); /* Opera(Old) */ + box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); /* IE9+, News */ background-color: rgba(0, 0, 0, 0.4); } @@ -148,12 +143,9 @@ -o-border-radius: 2px; border-radius: 2px; border: 1px solid #fff; - -webkit-transition: all 300ms ease-out; - /* Safari, Chrome */ - -moz-transition: all 300ms ease-out; - /* Firefox 4.0~16.0 */ - transition: all 300ms ease-out; - /* IE >9, FF >15, Opera >12.0 */ + -webkit-transition: all 300ms ease-out; /* Safari, Chrome */ + -moz-transition: all 300ms ease-out; /* Firefox 4.0~16.0 */ + transition: all 300ms ease-out; /* IE >9, FF >15, Opera >12.0 */ } .editormd-menu > li > a:hover, .editormd-menu > li > a.active { border: 1px solid #ddd; @@ -186,16 +178,11 @@ top: 33px; left: 0; z-index: 100; - -webkit-box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15); - /* Webkit browsers */ - -moz-box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15); - /* Firefox */ - -ms-box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15); - /* IE9 */ - -o-box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15); - /* Opera(Old) */ - box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15); - /* IE9+, News */ + -webkit-box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15); /* Webkit browsers */ + -moz-box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15); /* Firefox */ + -ms-box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15); /* IE9 */ + -o-box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15); /* Opera(Old) */ + box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15); /* IE9+, News */ } .editormd-dropdown-menu:before, .editormd-dropdown-menu:after { width: 0; @@ -222,12 +209,9 @@ } .editormd-dropdown-menu > li > a:hover { background: #f6f6f6; - -webkit-transition: all 300ms ease-out; - /* Safari, Chrome */ - -moz-transition: all 300ms ease-out; - /* Firefox 4.0~16.0 */ - transition: all 300ms ease-out; - /* IE >9, FF >15, Opera >12.0 */ + -webkit-transition: all 300ms ease-out; /* Safari, Chrome */ + -moz-transition: all 300ms ease-out; /* Firefox 4.0~16.0 */ + transition: all 300ms ease-out; /* IE >9, FF >15, Opera >12.0 */ } .editormd-dropdown-menu > li + li { border-top: 1px solid #ddd; @@ -256,16 +240,11 @@ -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; - -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); - /* Webkit browsers */ - -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); - /* Firefox */ - -ms-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); - /* IE9 */ - -o-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); - /* Opera(Old) */ - box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); - /* IE9+, News */ + -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); /* Webkit browsers */ + -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); /* Firefox */ + -ms-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); /* IE9 */ + -o-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); /* Opera(Old) */ + box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); /* IE9+, News */ background: #fff; font-size: 14px; } @@ -301,12 +280,9 @@ right: 15px; font-size: 18px; color: #ccc; - -webkit-transition: color 300ms ease-out; - /* Safari, Chrome */ - -moz-transition: color 300ms ease-out; - /* Firefox 4.0~16.0 */ - transition: color 300ms ease-out; - /* IE >9, FF >15, Opera >12.0 */ + -webkit-transition: color 300ms ease-out; /* Safari, Chrome */ + -moz-transition: color 300ms ease-out; /* Firefox 4.0~16.0 */ + transition: color 300ms ease-out; /* IE >9, FF >15, Opera >12.0 */ } .editormd-dialog-close:hover { color: #999; @@ -315,12 +291,9 @@ .editormd-dialog-header { padding: 11px 20px; border-bottom: 1px solid #eee; - -webkit-transition: background 300ms ease-out; - /* Safari, Chrome */ - -moz-transition: background 300ms ease-out; - /* Firefox 4.0~16.0 */ - transition: background 300ms ease-out; - /* IE >9, FF >15, Opera >12.0 */ + -webkit-transition: background 300ms ease-out; /* Safari, Chrome */ + -moz-transition: background 300ms ease-out; /* Firefox 4.0~16.0 */ + transition: background 300ms ease-out; /* IE >9, FF >15, Opera >12.0 */ } .editormd-dialog-header:hover { background: #f6f6f6; @@ -385,24 +358,18 @@ .editormd-mask { position: fixed; background: #000; - opacity: 0.2; - /* W3C */ - filter: alpha(opacity=20); - /* IE */ + opacity: 0.2; /* W3C */ + filter: alpha(opacity=20); /* IE */ z-index: 99998; } .editormd-container-mask, .editormd-dialog-mask-con { background: url(../images/loading.gif) no-repeat center center; - -webkit-background-size: 32px 32px; - /* Chrome, iOS, Safari */ - -moz-background-size: 32px 32px; - /* Firefox 3.6~4.0 */ - -o-background-size: 32px 32px; - /* Opera 9.5 */ - background-size: 32px 32px; - /* IE9+, New */ + -webkit-background-size: 32px 32px; /* Chrome, iOS, Safari */ + -moz-background-size: 32px 32px; /* Firefox 3.6~4.0 */ + -o-background-size: 32px 32px; /* Opera 9.5 */ + background-size: 32px 32px; /* IE9+, New */ } .editormd-container-mask { @@ -462,12 +429,9 @@ vertical-align: middle; border: 1px solid #ddd; text-decoration: none; - -webkit-transition: background-color 300ms ease-out, color 100ms ease-in; - /* Safari, Chrome */ - -moz-transition: background-color 300ms ease-out, color 100ms ease-in; - /* Firefox 4.0~16.0 */ - transition: background-color 300ms ease-out, color 100ms ease-in; - /* IE >9, FF >15, Opera >12.0 */ + -webkit-transition: background-color 300ms ease-out, color 100ms ease-in; /* Safari, Chrome */ + -moz-transition: background-color 300ms ease-out, color 100ms ease-in; /* Firefox 4.0~16.0 */ + transition: background-color 300ms ease-out, color 100ms ease-in; /* IE >9, FF >15, Opera >12.0 */ } .editormd-grid-table-row a.selected { color: #666; @@ -504,12 +468,9 @@ -o-border-top-right-radius: 3px; border-top-right-radius: 3px; background: #f6f6f6; - -webkit-transition: all 300ms ease-out; - /* Safari, Chrome */ - -moz-transition: all 300ms ease-out; - /* Firefox 4.0~16.0 */ - transition: all 300ms ease-out; - /* IE >9, FF >15, Opera >12.0 */ + -webkit-transition: all 300ms ease-out; /* Safari, Chrome */ + -moz-transition: all 300ms ease-out; /* Firefox 4.0~16.0 */ + transition: all 300ms ease-out; /* IE >9, FF >15, Opera >12.0 */ } .editormd-tab-head li a:hover { color: #666; @@ -549,17 +510,17 @@ .editormd-form input:focus { outline: 0; } -.editormd-form input[type="text"], .editormd-form input[type="number"] { +.editormd-form input[type=text], .editormd-form input[type=number] { color: #999; padding: 8px; border: 1px solid #ddd; } -.editormd-form input[type="number"] { +.editormd-form input[type=number] { width: 40px; display: inline-block; padding: 6px 8px; } -.editormd-form input[type="text"] { +.editormd-form input[type=text] { display: inline-block; width: 264px; } @@ -585,11 +546,11 @@ cursor: pointer; } -.editormd-form input[type="submit"], .editormd-form .editormd-btn, .editormd-form button, -.editormd-dialog-container input[type="submit"], +.editormd-form input[type=submit], .editormd-form .editormd-btn, .editormd-form button, +.editormd-dialog-container input[type=submit], .editormd-dialog-container .editormd-btn, .editormd-dialog-container button, -.editormd-dialog-footer input[type="submit"], +.editormd-dialog-footer input[type=submit], .editormd-dialog-footer .editormd-btn, .editormd-dialog-footer button { color: #666; @@ -603,18 +564,15 @@ -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; - -webkit-transition: background 300ms ease-out; - /* Safari, Chrome */ - -moz-transition: background 300ms ease-out; - /* Firefox 4.0~16.0 */ - transition: background 300ms ease-out; - /* IE >9, FF >15, Opera >12.0 */ -} -.editormd-form input[type="submit"]:hover, .editormd-form .editormd-btn:hover, .editormd-form button:hover, -.editormd-dialog-container input[type="submit"]:hover, + -webkit-transition: background 300ms ease-out; /* Safari, Chrome */ + -moz-transition: background 300ms ease-out; /* Firefox 4.0~16.0 */ + transition: background 300ms ease-out; /* IE >9, FF >15, Opera >12.0 */ +} +.editormd-form input[type=submit]:hover, .editormd-form .editormd-btn:hover, .editormd-form button:hover, +.editormd-dialog-container input[type=submit]:hover, .editormd-dialog-container .editormd-btn:hover, .editormd-dialog-container button:hover, -.editormd-dialog-footer input[type="submit"]:hover, +.editormd-dialog-footer input[type=submit]:hover, .editormd-dialog-footer .editormd-btn:hover, .editormd-dialog-footer button:hover { background: #eee; @@ -622,7 +580,7 @@ .editormd-form .editormd-btn, .editormd-dialog-container .editormd-btn, .editormd-dialog-footer .editormd-btn { - padding: 5px 8px 4px\0; + padding: 5px 8px 4px\0 ; } .editormd-form .editormd-btn + .editormd-btn, .editormd-dialog-container .editormd-btn + .editormd-btn, @@ -637,7 +595,7 @@ position: relative; display: inline-block; } -.editormd-file-input input[type="file"] { +.editormd-file-input input[type=file] { width: 75px; height: 32px; opacity: 0; @@ -648,10 +606,10 @@ top: 0; right: 0; } -.editormd-file-input input[type="file"]::-webkit-file-upload-button { +.editormd-file-input input[type=file]::-webkit-file-upload-button { visibility: hidden; } -.editormd-file-input:hover input[type="submit"] { +.editormd-file-input:hover input[type=submit] { background: #eee; } @@ -670,11 +628,12 @@ position: absolute; top: 35px; right: 0; - right: -1px\0; + right: -1px\0 ; overflow: auto; line-height: 1.6; display: none; background: #fff; + z-index: 10; } .editormd .CodeMirror { @@ -735,7 +694,7 @@ /* FONT PATH * -------------------------- */ @font-face { - font-family: 'FontAwesome'; + font-family: "FontAwesome"; src: url("../fonts/fontawesome-webfont.eot?v=4.3.0"); src: url("../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0") format("embedded-opentype"), url("../fonts/fontawesome-webfont.woff2?v=4.3.0") format("woff2"), url("../fonts/fontawesome-webfont.woff?v=4.3.0") format("woff"), url("../fonts/fontawesome-webfont.ttf?v=4.3.0") format("truetype"), url("../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular") format("svg"); font-weight: normal; @@ -802,9 +761,9 @@ } .fa-border { - padding: .2em .25em .15em; + padding: 0.2em 0.25em 0.15em; border: solid 0.08em #eeeeee; - border-radius: .1em; + border-radius: 0.1em; } .pull-right { @@ -816,11 +775,11 @@ } .fa.pull-left { - margin-right: .3em; + margin-right: 0.3em; } .fa.pull-right { - margin-left: .3em; + margin-left: 0.3em; } .fa-spin { @@ -3079,9 +3038,9 @@ /*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */ @font-face { - font-family: 'editormd-logo'; + font-family: "editormd-logo"; src: url("../fonts/editormd-logo.eot?-5y8q6h"); - src: url(".../fonts/editormd-logo.eot?#iefix-5y8q6h") format("embedded-opentype"), url("../fonts/editormd-logo.woff?-5y8q6h") format("woff"), url("../fonts/editormd-logo.ttf?-5y8q6h") format("truetype"), url("../fonts/editormd-logo.svg?-5y8q6h#icomoon") format("svg"); + src: url("../fonts/editormd-logo.eot?#iefix-5y8q6h") format("embedded-opentype"), url("../fonts/editormd-logo.woff?-5y8q6h") format("woff"), url("../fonts/editormd-logo.ttf?-5y8q6h") format("truetype"), url("../fonts/editormd-logo.svg?-5y8q6h#icomoon") format("svg"); font-weight: normal; font-style: normal; } @@ -3094,7 +3053,7 @@ .editormd-logo-6x, .editormd-logo-7x, .editormd-logo-8x { - font-family: 'editormd-logo'; + font-family: "editormd-logo"; speak: none; font-style: normal; font-weight: normal; @@ -3233,7 +3192,7 @@ line-height: normal; } -.markdown-body input[type="checkbox"] { +.markdown-body input[type=checkbox] { -moz-box-sizing: border-box; box-sizing: border-box; padding: 0; @@ -3259,7 +3218,7 @@ } .markdown-body a { - color: #08c; + color: #4183c4; text-decoration: none; } @@ -3375,7 +3334,7 @@ } .markdown-body .octicon-link:before { - content: '\f05c'; + content: "\f05c"; } .markdown-body > *:first-child { @@ -3613,7 +3572,7 @@ .markdown-body code:before, .markdown-body code:after { letter-spacing: -0.2em; - content: "\00a0"; + content: " "; } .markdown-body pre > code { @@ -3636,6 +3595,7 @@ overflow: auto; font-size: 85%; line-height: 1.45; + background-color: #f7f7f7; border-radius: 3px; } @@ -3656,6 +3616,7 @@ overflow: initial; line-height: inherit; word-wrap: normal; + background-color: transparent; border: 0; } @@ -3834,36 +3795,12 @@ background-color: #fff; } .editormd-preview-container blockquote, .editormd-html-preview blockquote { - color: #2C3E50; - border-left: 5px solid #D6DBDF; + color: #666; + border-left: 4px solid #ddd; + padding-left: 20px; + margin-left: 0; font-size: 14px; - background: none repeat scroll 0 0 rgba(102,128,153,.05); - margin: 8px 0; - padding: 8px 16px; -} -.editormd-preview-container blockquote.default, .editormd-html-preview blockquote.default { - - -} -.editormd-preview-container blockquote.info, .editormd-html-preview blockquote.info { - border-left-color: #5bc0de; - color: #5bc0de; - background-color: #f4f8fa -} -.editormd-preview-container blockquote.warning, .editormd-html-preview blockquote.warning { - background-color: #fcf8f2; - border-color: #f0ad4e; - color: #f0ad4e -} -.editormd-preview-container blockquote.danger, .editormd-html-preview blockquote.danger { - color: #d9534f; - background-color: #fdf7f7; - border-color: #d9534f -} -.editormd-preview-container blockquote.success, .editormd-html-preview blockquote.success { - background-color: #f3f8f3; - border-color: #50af51; - color: #50af51 + font-style: italic; } .editormd-preview-container p code, .editormd-html-preview p code { margin-left: 5px; @@ -3887,6 +3824,7 @@ } .editormd-preview-container pre, .editormd-html-preview pre { border: 1px solid #ddd; + background: #f6f6f6; padding: 10px; -webkit-border-radius: 3px; -moz-border-radius: 3px; @@ -3932,104 +3870,73 @@ /* SPAN elements with the classes below are added by prettyprint. */ .pln { color: #000; -} - -/* plain text */ +} /* plain text */ @media screen { .str { color: #080; - } - - /* string content */ + } /* string content */ .kwd { color: #008; - } - - /* a keyword */ + } /* a keyword */ .com { color: #800; - } - - /* a comment */ + } /* a comment */ .typ { color: #606; - } - - /* a type name */ + } /* a type name */ .lit { color: #066; - } - - /* a literal value */ + } /* a literal value */ /* punctuation, lisp open bracket, lisp close bracket */ .pun, .opn, .clo { color: #660; } - .tag { color: #008; - } - - /* a markup tag name */ + } /* a markup tag name */ .atn { color: #606; - } - - /* a markup attribute name */ + } /* a markup attribute name */ .atv { color: #080; - } - - /* a markup attribute value */ + } /* a markup attribute value */ .dec, .var { color: #606; - } - - /* a declaration; a variable name */ + } /* a declaration; a variable name */ .fun { color: red; - } - - /* a function name */ + } /* a function name */ } /* Use higher contrast and text-weight for printable form. */ @media print, projection { .str { color: #060; } - .kwd { color: #006; font-weight: bold; } - .com { color: #600; font-style: italic; } - .typ { color: #404; font-weight: bold; } - .lit { color: #044; } - .pun, .opn, .clo { color: #440; } - .tag { color: #006; font-weight: bold; } - .atn { color: #404; } - .atv { color: #060; } @@ -4044,9 +3951,7 @@ pre.prettyprint { ol.linenums { margin-top: 0; margin-bottom: 0; -} - -/* IE indents via margin-left */ +} /* IE indents via margin-left */ li.L0, li.L1, li.L2, @@ -4117,16 +4022,11 @@ li.L9 { -ms-border-radius: 4px; -o-border-radius: 4px; border-radius: 4px; - -webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* Webkit browsers */ - -moz-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* Firefox */ - -ms-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* IE9 */ - -o-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* Opera(Old) */ - box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* IE9+, News */ + -webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* Webkit browsers */ + -moz-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* Firefox */ + -ms-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* IE9 */ + -o-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* Opera(Old) */ + box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* IE9+, News */ } .editormd-preview-container .editormd-toc-menu > .markdown-toc > ul > li ul, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul > li ul { width: 100%; @@ -4144,12 +4044,9 @@ li.L9 { color: #666; padding: 6px 10px; display: block; - -webkit-transition: background-color 500ms ease-out; - /* Safari, Chrome */ - -moz-transition: background-color 500ms ease-out; - /* Firefox 4.0~16.0 */ - transition: background-color 500ms ease-out; - /* IE >9, FF >15, Opera >12.0 */ + -webkit-transition: background-color 500ms ease-out; /* Safari, Chrome */ + -moz-transition: background-color 500ms ease-out; /* Firefox 4.0~16.0 */ + transition: background-color 500ms ease-out; /* IE >9, FF >15, Opera >12.0 */ } .editormd-preview-container .editormd-toc-menu > .markdown-toc > ul > li a:hover, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul > li a:hover { background-color: #f6f6f6; @@ -4162,16 +4059,11 @@ li.L9 { top: 32px; left: 10%; display: none; - -webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* Webkit browsers */ - -moz-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* Firefox */ - -ms-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* IE9 */ - -o-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* Opera(Old) */ - box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* IE9+, News */ + -webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* Webkit browsers */ + -moz-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* Firefox */ + -ms-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* IE9 */ + -o-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* Opera(Old) */ + box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* IE9+, News */ } .editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:before, .editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:after, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:before, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:after { pointer-events: pointer-events; @@ -4214,12 +4106,9 @@ li.L9 { padding: 5px 10px; border-radius: 4px; display: inline-block; - -webkit-transition: background-color 500ms ease-out; - /* Safari, Chrome */ - -moz-transition: background-color 500ms ease-out; - /* Firefox 4.0~16.0 */ - transition: background-color 500ms ease-out; - /* IE >9, FF >15, Opera >12.0 */ + -webkit-transition: background-color 500ms ease-out; /* Safari, Chrome */ + -moz-transition: background-color 500ms ease-out; /* Firefox 4.0~16.0 */ + transition: background-color 500ms ease-out; /* IE >9, FF >15, Opera >12.0 */ } .editormd-preview-container .editormd-toc-menu .toc-menu-btn:hover, .editormd-html-preview .editormd-toc-menu .toc-menu-btn:hover { background-color: #f6f6f6; @@ -4274,12 +4163,9 @@ hr.editormd-page-break { top: 25px; right: 35px; z-index: 19; - -webkit-transition: background-color 300ms ease-out; - /* Safari, Chrome */ - -moz-transition: background-color 300ms ease-out; - /* Firefox 4.0~16.0 */ - transition: background-color 300ms ease-out; - /* IE >9, FF >15, Opera >12.0 */ + -webkit-transition: background-color 300ms ease-out; /* Safari, Chrome */ + -moz-transition: background-color 300ms ease-out; /* Firefox 4.0~16.0 */ + transition: background-color 300ms ease-out; /* IE >9, FF >15, Opera >12.0 */ } .editormd-preview-close-btn:hover { background-color: #999; @@ -4382,8 +4268,7 @@ hr.editormd-page-break { } @media screen { - .editormd-preview-theme-dark { - /* string content */ + .editormd-preview-theme-dark { /* string content */ /* a keyword */ /* a comment */ /* a type name */ @@ -4468,4 +4353,4 @@ hr.editormd-page-break { } .editormd-theme-dark .CodeMirror { border-right: 1px solid rgba(0, 0, 0, 0.1); -} +} \ No newline at end of file diff --git a/static/editor.md/css/editormd.logo.css b/static/editor.md/css/editormd.logo.css index 5f901bfa5..996844010 100644 --- a/static/editor.md/css/editormd.logo.css +++ b/static/editor.md/css/editormd.logo.css @@ -2,19 +2,20 @@ * Editor.md * * @file editormd.logo.css - * @version v1.5.0 + * @version v1.7.17 * @description Open source online markdown editor. * @license MIT License - * @author Pandao - * {@link https://github.com/pandao/editor.md} - * @updateTime 2015-06-09 + * @author IBM Skills Network + * {@link https://github.com/ibm-skills-network/editor.md} + * @updateTime 2024-03-27 */ +@charset "UTF-8"; /*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */ @font-face { - font-family: 'editormd-logo'; + font-family: "editormd-logo"; src: url("../fonts/editormd-logo.eot?-5y8q6h"); - src: url(".../fonts/editormd-logo.eot?#iefix-5y8q6h") format("embedded-opentype"), url("../fonts/editormd-logo.woff?-5y8q6h") format("woff"), url("../fonts/editormd-logo.ttf?-5y8q6h") format("truetype"), url("../fonts/editormd-logo.svg?-5y8q6h#icomoon") format("svg"); + src: url("../fonts/editormd-logo.eot?#iefix-5y8q6h") format("embedded-opentype"), url("../fonts/editormd-logo.woff?-5y8q6h") format("woff"), url("../fonts/editormd-logo.ttf?-5y8q6h") format("truetype"), url("../fonts/editormd-logo.svg?-5y8q6h#icomoon") format("svg"); font-weight: normal; font-style: normal; } @@ -27,7 +28,7 @@ .editormd-logo-6x, .editormd-logo-7x, .editormd-logo-8x { - font-family: 'editormd-logo'; + font-family: "editormd-logo"; speak: none; font-style: normal; font-weight: normal; @@ -95,4 +96,4 @@ .editormd-logo-color { color: #2196F3; -} +} \ No newline at end of file diff --git a/static/editor.md/css/editormd.logo.min.css b/static/editor.md/css/editormd.logo.min.css index d1699782e..92d37bcc4 100644 --- a/static/editor.md/css/editormd.logo.min.css +++ b/static/editor.md/css/editormd.logo.min.css @@ -1,2 +1,2 @@ -/*! Editor.md v1.5.0 | editormd.logo.min.css | Open source online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-06-09 */ -/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */@font-face{font-family:editormd-logo;src:url(../fonts/editormd-logo.eot?-5y8q6h);src:url(.../fonts/editormd-logo.eot?#iefix-5y8q6h)format("embedded-opentype"),url(../fonts/editormd-logo.woff?-5y8q6h)format("woff"),url(../fonts/editormd-logo.ttf?-5y8q6h)format("truetype"),url(../fonts/editormd-logo.svg?-5y8q6h#icomoon)format("svg");font-weight:400;font-style:normal}.editormd-logo,.editormd-logo-1x,.editormd-logo-2x,.editormd-logo-3x,.editormd-logo-4x,.editormd-logo-5x,.editormd-logo-6x,.editormd-logo-7x,.editormd-logo-8x{font-family:editormd-logo;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;font-size:inherit;line-height:1;display:inline-block;text-rendering:auto;vertical-align:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.editormd-logo-1x:before,.editormd-logo-2x:before,.editormd-logo-3x:before,.editormd-logo-4x:before,.editormd-logo-5x:before,.editormd-logo-6x:before,.editormd-logo-7x:before,.editormd-logo-8x:before,.editormd-logo:before{content:"\e1987"}.editormd-logo-1x{font-size:1em}.editormd-logo-lg{font-size:1.2em}.editormd-logo-2x{font-size:2em}.editormd-logo-3x{font-size:3em}.editormd-logo-4x{font-size:4em}.editormd-logo-5x{font-size:5em}.editormd-logo-6x{font-size:6em}.editormd-logo-7x{font-size:7em}.editormd-logo-8x{font-size:8em}.editormd-logo-color{color:#2196F3} \ No newline at end of file +/*! Editor.md v1.7.17 | editormd.logo.min.css | Open source online markdown editor. | MIT License | By: IBM Skills Network | https://github.com/ibm-skills-network/editor.md | 2024-03-27 */ +@charset "UTF-8";/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */@font-face{font-family:editormd-logo;src:url(../fonts/editormd-logo.eot?-5y8q6h);src:url(../fonts/editormd-logo.eot?#iefix-5y8q6h) format("embedded-opentype"),url(../fonts/editormd-logo.woff?-5y8q6h) format("woff"),url(../fonts/editormd-logo.ttf?-5y8q6h) format("truetype"),url(../fonts/editormd-logo.svg?-5y8q6h#icomoon) format("svg");font-weight:400;font-style:normal}.editormd-logo,.editormd-logo-1x,.editormd-logo-2x,.editormd-logo-3x,.editormd-logo-4x,.editormd-logo-5x,.editormd-logo-6x,.editormd-logo-7x,.editormd-logo-8x{font-family:editormd-logo;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;font-size:inherit;line-height:1;display:inline-block;text-rendering:auto;vertical-align:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.editormd-logo-1x:before,.editormd-logo-2x:before,.editormd-logo-3x:before,.editormd-logo-4x:before,.editormd-logo-5x:before,.editormd-logo-6x:before,.editormd-logo-7x:before,.editormd-logo-8x:before,.editormd-logo:before{content:"󡦇"}.editormd-logo-1x{font-size:1em}.editormd-logo-lg{font-size:1.2em}.editormd-logo-2x{font-size:2em}.editormd-logo-3x{font-size:3em}.editormd-logo-4x{font-size:4em}.editormd-logo-5x{font-size:5em}.editormd-logo-6x{font-size:6em}.editormd-logo-7x{font-size:7em}.editormd-logo-8x{font-size:8em}.editormd-logo-color{color:#2196f3} \ No newline at end of file diff --git a/static/editor.md/css/editormd.min.css b/static/editor.md/css/editormd.min.css index 05abb501c..53126ddb7 100644 --- a/static/editor.md/css/editormd.min.css +++ b/static/editor.md/css/editormd.min.css @@ -1,5 +1,5 @@ -/*! Editor.md v1.5.0 | editormd.min.css | Open source online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-06-09 */ -@charset "UTF-8";/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */.fa-ul,.markdown-body .task-list-item,li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}.editormd-form br,.markdown-body hr:after{clear:both}.editormd{width:90%;height:640px;margin:0 auto 15px;text-align:left;overflow:hidden;position:relative;border:1px solid #ddd;font-family:"Meiryo UI","Microsoft YaHei","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,Monaco,monospace,Tahoma,STXihei,"华文细黑",STHeiti,"Helvetica Neue","Droid Sans","wenquanyi micro hei",FreeSans,Arimo,Arial,SimSun,"宋体",Heiti,"黑体",sans-serif}.editormd *,.editormd :after,.editormd :before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.editormd a{text-decoration:none}.editormd img{border:none;vertical-align:middle}.editormd .editormd-html-textarea,.editormd .editormd-markdown-textarea,.editormd>textarea{width:0;height:0;outline:0;resize:none}.editormd .editormd-html-textarea,.editormd .editormd-markdown-textarea{display:none}.editormd button,.editormd input[type=text],.editormd input[type=button],.editormd input[type=submit],.editormd select,.editormd textarea{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none}.editormd ::-webkit-scrollbar{height:10px;width:7px;background:rgba(0,0,0,.1)}.editormd ::-webkit-scrollbar:hover{background:rgba(0,0,0,.2)}.editormd ::-webkit-scrollbar-thumb{background:rgba(0,0,0,.3);-webkit-border-radius:6px;-moz-border-radius:6px;-ms-border-radius:6px;-o-border-radius:6px;border-radius:6px}.editormd ::-webkit-scrollbar-thumb:hover{-webkit-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-moz-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-ms-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-o-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);background-color:rgba(0,0,0,.4)}.editormd-user-unselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.editormd-toolbar{width:100%;min-height:37px;background:#fff;display:none;position:absolute;top:0;left:0;z-index:10;border-bottom:1px solid #ddd}.editormd-toolbar-container{padding:0 8px;min-height:35px;-o-user-select:none;user-select:none}.editormd-toolbar-container,.markdown-body .octicon{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.editormd-menu,.markdown-body ol,.markdown-body td,.markdown-body th,.markdown-body ul{padding:0}.editormd-menu{margin:0;list-style:none}.editormd-menu>li{margin:0;padding:5px 1px;display:inline-block;position:relative}.editormd-menu>li.divider{display:inline-block;text-indent:-9999px;margin:0 5px;height:65%;border-right:1px solid #ddd}.editormd-menu>li>a{outline:0;color:#666;display:inline-block;min-width:24px;font-size:16px;text-decoration:none;text-align:center;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;border:1px solid #fff;transition:all 300ms ease-out}.editormd-dropdown-menu>li>a:hover,.editormd-menu>li>a{-webkit-transition:all 300ms ease-out;-moz-transition:all 300ms ease-out}.editormd-menu>li>a.active,.editormd-menu>li>a:hover{border:1px solid #ddd;background:#eee}.editormd-menu>li>a>.fa{text-align:center;display:block;padding:5px}.editormd-menu>li>a>.editormd-bold{padding:5px 2px;display:inline-block;font-weight:700}.editormd-menu>li:hover .editormd-dropdown-menu{display:block}.editormd-menu>li+li>a{margin-left:3px}.editormd-dropdown-menu{display:none;background:#fff;border:1px solid #ddd;width:148px;list-style:none;position:absolute;top:33px;left:0;z-index:100;-webkit-box-shadow:1px 2px 6px rgba(0,0,0,.15);-moz-box-shadow:1px 2px 6px rgba(0,0,0,.15);-ms-box-shadow:1px 2px 6px rgba(0,0,0,.15);-o-box-shadow:1px 2px 6px rgba(0,0,0,.15);box-shadow:1px 2px 6px rgba(0,0,0,.15)}.editormd-dropdown-menu:after,.editormd-dropdown-menu:before{width:0;height:0;display:block;content:"";position:absolute;top:-11px;left:8px;border:5px solid transparent}.editormd-dropdown-menu:before{border-bottom-color:#ccc}.editormd-dropdown-menu:after{border-bottom-color:#fff;top:-10px}.editormd-dropdown-menu>li>a{color:#666;display:block;text-decoration:none;padding:8px 10px}.editormd-dropdown-menu>li>a:hover{background:#f6f6f6;transition:all 300ms ease-out}.editormd-dropdown-menu>li+li{border-top:1px solid #ddd}.editormd-container{margin:0;width:100%;height:100%;overflow:hidden;padding:35px 0 0;position:relative;background:#fff;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.editormd-dialog{color:#666;position:fixed;z-index:99999;display:none;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 0 10px rgba(0,0,0,.3);-moz-box-shadow:0 0 10px rgba(0,0,0,.3);-ms-box-shadow:0 0 10px rgba(0,0,0,.3);-o-box-shadow:0 0 10px rgba(0,0,0,.3);box-shadow:0 0 10px rgba(0,0,0,.3);background:#fff;font-size:14px}.editormd-dialog-container{position:relative;padding:20px;line-height:1.4}.editormd-dialog-container h1{font-size:24px;margin-bottom:10px}.editormd-dialog-container h1 .fa{color:#2C7EEA;padding-right:5px}.editormd-dialog-container h1 small{padding-left:5px;font-weight:400;font-size:12px;color:#999}.editormd-dialog-container select{color:#999;padding:3px 8px;border:1px solid #ddd}.editormd-dialog-close{position:absolute;top:12px;right:15px;font-size:18px;color:#ccc;-webkit-transition:color 300ms ease-out;-moz-transition:color 300ms ease-out;transition:color 300ms ease-out}.editormd-dialog-close:hover{color:#999}.editormd-dialog-header{padding:11px 20px;border-bottom:1px solid #eee;-webkit-transition:background 300ms ease-out;-moz-transition:background 300ms ease-out;transition:background 300ms ease-out}.editormd-dialog-header:hover{background:#f6f6f6}.editormd-dialog-title{font-size:14px}.editormd-dialog-footer{padding:10px 0 0;text-align:right}.editormd-dialog-info{width:420px}.editormd-dialog-info h1{font-weight:400}.editormd-dialog-info .editormd-dialog-container{padding:20px 25px 25px}.editormd-dialog-info .editormd-dialog-close{top:10px;right:10px}.editormd-dialog-info .hover-link:hover,.editormd-dialog-info p>a{color:#2196F3}.editormd-dialog-info .hover-link{color:#666}.editormd-dialog-info a .fa-external-link{display:none}.editormd-dialog-info a:hover{color:#2196F3}.editormd-dialog-info a:hover .fa-external-link{display:inline-block}.editormd-container-mask,.editormd-dialog-mask,.editormd-mask{display:none;width:100%;height:100%;position:absolute;top:0;left:0}.editormd-dialog-mask-bg,.editormd-mask{background:#fff;opacity:.5;filter:alpha(opacity=50)}.editormd-mask{position:fixed;background:#000;opacity:.2;filter:alpha(opacity=20);z-index:99998}.editormd-container-mask,.editormd-dialog-mask-con{background:url(../images/loading.gif)center center no-repeat;-webkit-background-size:32px 32px;-moz-background-size:32px 32px;-o-background-size:32px 32px;background-size:32px 32px}.editormd-container-mask{z-index:20;display:block;background-color:#fff}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2){.editormd-container-mask,.editormd-dialog-mask-con{background-image:url(../images/loading@2x.gif)}}@media only screen and (-webkit-min-device-pixel-ratio:3),only screen and (min-device-pixel-ratio:3){.editormd-container-mask,.editormd-dialog-mask-con{background-image:url(../images/loading@3x.gif)}}.editormd-code-block-dialog textarea,.editormd-preformatted-text-dialog textarea{width:100%;height:400px;margin-bottom:6px;overflow:auto;border:1px solid #eee;background:#fff;padding:15px;resize:none}.editormd-code-toolbar{color:#999;font-size:14px;margin:-5px 0 10px}.editormd-grid-table{width:99%;display:table;border:1px solid #ddd;border-collapse:collapse}.editormd-grid-table-row{width:100%;display:table-row}.editormd-grid-table-row a{font-size:1.4em;width:5%;height:36px;color:#999;text-align:center;display:table-cell;vertical-align:middle;border:1px solid #ddd;text-decoration:none;-webkit-transition:background-color 300ms ease-out,color 100ms ease-in;-moz-transition:background-color 300ms ease-out,color 100ms ease-in;transition:background-color 300ms ease-out,color 100ms ease-in}.editormd-grid-table-row a.selected{color:#666;background-color:#eee}.editormd-grid-table-row a:hover{color:#777;background-color:#f6f6f6}.editormd-tab-head{list-style:none;border-bottom:1px solid #ddd}.editormd-tab-head li{display:inline-block}.editormd-tab-head li a{color:#999;display:block;padding:6px 12px 5px;text-align:center;text-decoration:none;margin-bottom:-1px;border:1px solid #ddd;-webkit-border-top-left-radius:3px;-moz-border-top-left-radius:3px;-ms-border-top-left-radius:3px;-o-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-moz-border-top-right-radius:3px;-ms-border-top-right-radius:3px;-o-border-top-right-radius:3px;border-top-right-radius:3px;background:#f6f6f6;-webkit-transition:all 300ms ease-out;-moz-transition:all 300ms ease-out;transition:all 300ms ease-out}.editormd-tab-head li a:hover{color:#666;background:#eee}.editormd-tab-head li.active a{color:#666;background:#fff;border-bottom-color:#fff}.editormd-tab-head li+li{margin-left:3px}.editormd-tab-box{padding:20px 0}.editormd-form{color:#666}.editormd-form label{float:left;display:block;width:75px;text-align:left;padding:7px 0 15px 5px;margin:0 0 2px;font-weight:400}.editormd-form iframe{display:none}.editormd-form input:focus{outline:0}.editormd-form input[type=text],.editormd-form input[type=number]{color:#999;padding:8px;border:1px solid #ddd}.editormd-form input[type=number]{width:40px;display:inline-block;padding:6px 8px}.editormd-form input[type=text]{display:inline-block;width:264px}.editormd-form .fa-btns{display:inline-block}.editormd-form .fa-btns a{color:#999;padding:7px 10px 0 0;display:inline-block;text-decoration:none;text-align:center}.editormd-form .fa-btns .fa{font-size:1.3em}.editormd-form .fa-btns label{float:none;display:inline-block;width:auto;text-align:left;padding:0 0 0 5px;cursor:pointer}.fa-fw,.fa-li{text-align:center}.editormd-dialog-container .editormd-btn,.editormd-dialog-container button,.editormd-dialog-container input[type=submit],.editormd-dialog-footer .editormd-btn,.editormd-dialog-footer button,.editormd-dialog-footer input[type=submit],.editormd-form .editormd-btn,.editormd-form button,.editormd-form input[type=submit]{color:#666;min-width:75px;cursor:pointer;background:#fff;padding:7px 10px;border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-transition:background 300ms ease-out;-moz-transition:background 300ms ease-out;transition:background 300ms ease-out}.editormd-dialog-container .editormd-btn:hover,.editormd-dialog-container button:hover,.editormd-dialog-container input[type=submit]:hover,.editormd-dialog-footer .editormd-btn:hover,.editormd-dialog-footer button:hover,.editormd-dialog-footer input[type=submit]:hover,.editormd-form .editormd-btn:hover,.editormd-form button:hover,.editormd-form input[type=submit]:hover{background:#eee}.editormd-dialog-container .editormd-btn+.editormd-btn,.editormd-dialog-footer .editormd-btn+.editormd-btn,.editormd-form .editormd-btn+.editormd-btn{margin-left:8px}.editormd-file-input{width:75px;height:32px;margin-left:8px;position:relative;display:inline-block}.editormd-file-input input[type=file]{width:75px;height:32px;opacity:0;cursor:pointer;background:#000;display:inline-block;position:absolute;top:0;right:0}.editormd-file-input input[type=file]::-webkit-file-upload-button{visibility:hidden}.editormd-file-input:hover input[type=submit]{background:#eee}.editormd .CodeMirror,.editormd-preview{display:inline-block;width:50%;height:100%;vertical-align:top;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0}.editormd-preview{position:absolute;top:35px;right:0;overflow:auto;line-height:1.6;display:none;background:#fff}.fa,.fa-stack{display:inline-block}.editormd .CodeMirror{z-index:10;float:left;border-right:1px solid #ddd;font-size:14px;font-family:"YaHei Consolas Hybrid",Consolas,"微软雅黑","Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,Monaco,courier,monospace;line-height:1.6;margin-top:35px}.editormd .CodeMirror pre{font-size:14px;padding:0 12px}.editormd .CodeMirror-linenumbers{padding:0 5px}.editormd .CodeMirror-focused .CodeMirror-selected,.editormd .CodeMirror-selected{background:#70B7FF}.editormd .CodeMirror,.editormd .CodeMirror-scroll,.editormd .editormd-preview{-webkit-overflow-scrolling:touch}.editormd .styled-background{background-color:#ff7}.editormd .CodeMirror-focused .cm-matchhighlight{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);background-position:bottom;background-repeat:repeat-x}.editormd .CodeMirror-empty.CodeMirror-focused{outline:0}.editormd .CodeMirror pre.CodeMirror-placeholder{color:#999}.editormd .cm-trailingspace{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.editormd .cm-tab{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=)right no-repeat}/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 *//*! +/*! Editor.md v1.7.17 | editormd.min.css | Open source online markdown editor. | MIT License | By: IBM Skills Network | https://github.com/ibm-skills-network/editor.md | 2024-03-27 */ +@charset "UTF-8";/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */.editormd{width:90%;height:640px;margin:0 auto;text-align:left;overflow:hidden;position:relative;margin-bottom:15px;border:1px solid #ddd;font-family:"Meiryo UI","Microsoft YaHei","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,Monaco,monospace,Tahoma,STXihei,"华文细黑",STHeiti,"Helvetica Neue","Droid Sans","wenquanyi micro hei",FreeSans,Arimo,Arial,SimSun,"宋体",Heiti,"黑体",sans-serif}.editormd *,.editormd :after,.editormd :before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.editormd a{text-decoration:none}.editormd img{border:none;vertical-align:middle}.editormd .editormd-html-textarea,.editormd .editormd-markdown-textarea,.editormd>textarea{width:0;height:0;outline:0;resize:none}.editormd .editormd-html-textarea,.editormd .editormd-markdown-textarea{display:none}.editormd button,.editormd input[type=button],.editormd input[type=submit],.editormd input[type=text],.editormd select,.editormd textarea{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none}.editormd ::-webkit-scrollbar{height:10px;width:7px;background:rgba(0,0,0,.1)}.editormd ::-webkit-scrollbar:hover{background:rgba(0,0,0,.2)}.editormd ::-webkit-scrollbar-thumb{background:rgba(0,0,0,.3);-webkit-border-radius:6px;-moz-border-radius:6px;-ms-border-radius:6px;-o-border-radius:6px;border-radius:6px}.editormd ::-webkit-scrollbar-thumb:hover{-webkit-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-moz-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-ms-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-o-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);background-color:rgba(0,0,0,.4)}.editormd-user-unselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.editormd-toolbar{width:100%;min-height:37px;background:#fff;display:none;position:absolute;top:0;left:0;z-index:10;border-bottom:1px solid #ddd}.editormd-toolbar-container{padding:0 8px;min-height:35px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.editormd-menu{margin:0;padding:0;list-style:none}.editormd-menu>li{margin:0;padding:5px 1px;display:inline-block;position:relative}.editormd-menu>li.divider{display:inline-block;text-indent:-9999px;margin:0 5px;height:65%;border-right:1px solid #ddd}.editormd-menu>li>a{outline:0;color:#666;display:inline-block;min-width:24px;font-size:16px;text-decoration:none;text-align:center;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;border:1px solid #fff;-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;transition:all .3s ease-out}.editormd-menu>li>a.active,.editormd-menu>li>a:hover{border:1px solid #ddd;background:#eee}.editormd-menu>li>a>.fa{text-align:center;display:block;padding:5px}.editormd-menu>li>a>.editormd-bold{padding:5px 2px;display:inline-block;font-weight:700}.editormd-menu>li:hover .editormd-dropdown-menu{display:block}.editormd-menu>li+li>a{margin-left:3px}.editormd-dropdown-menu{display:none;background:#fff;border:1px solid #ddd;width:148px;list-style:none;position:absolute;top:33px;left:0;z-index:100;-webkit-box-shadow:1px 2px 6px rgba(0,0,0,.15);-moz-box-shadow:1px 2px 6px rgba(0,0,0,.15);-ms-box-shadow:1px 2px 6px rgba(0,0,0,.15);-o-box-shadow:1px 2px 6px rgba(0,0,0,.15);box-shadow:1px 2px 6px rgba(0,0,0,.15)}.editormd-dropdown-menu:after,.editormd-dropdown-menu:before{width:0;height:0;display:block;content:"";position:absolute;top:-11px;left:8px;border:5px solid transparent}.editormd-dropdown-menu:before{border-bottom-color:#ccc}.editormd-dropdown-menu:after{border-bottom-color:#fff;top:-10px}.editormd-dropdown-menu>li>a{color:#666;display:block;text-decoration:none;padding:8px 10px}.editormd-dropdown-menu>li>a:hover{background:#f6f6f6;-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;transition:all .3s ease-out}.editormd-dropdown-menu>li+li{border-top:1px solid #ddd}.editormd-container{margin:0;width:100%;height:100%;overflow:hidden;padding:35px 0 0;position:relative;background:#fff;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.editormd-dialog{color:#666;position:fixed;z-index:99999;display:none;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 0 10px rgba(0,0,0,.3);-moz-box-shadow:0 0 10px rgba(0,0,0,.3);-ms-box-shadow:0 0 10px rgba(0,0,0,.3);-o-box-shadow:0 0 10px rgba(0,0,0,.3);box-shadow:0 0 10px rgba(0,0,0,.3);background:#fff;font-size:14px}.editormd-dialog-container{position:relative;padding:20px;line-height:1.4}.editormd-dialog-container h1{font-size:24px;margin-bottom:10px}.editormd-dialog-container h1 .fa{color:#2c7eea;padding-right:5px}.editormd-dialog-container h1 small{padding-left:5px;font-weight:400;font-size:12px;color:#999}.editormd-dialog-container select{color:#999;padding:3px 8px;border:1px solid #ddd}.editormd-dialog-close{position:absolute;top:12px;right:15px;font-size:18px;color:#ccc;-webkit-transition:color .3s ease-out;-moz-transition:color .3s ease-out;transition:color .3s ease-out}.editormd-dialog-close:hover{color:#999}.editormd-dialog-header{padding:11px 20px;border-bottom:1px solid #eee;-webkit-transition:background .3s ease-out;-moz-transition:background .3s ease-out;transition:background .3s ease-out}.editormd-dialog-header:hover{background:#f6f6f6}.editormd-dialog-title{font-size:14px}.editormd-dialog-footer{padding:10px 0 0 0;text-align:right}.editormd-dialog-info{width:420px}.editormd-dialog-info h1{font-weight:400}.editormd-dialog-info .editormd-dialog-container{padding:20px 25px 25px}.editormd-dialog-info .editormd-dialog-close{top:10px;right:10px}.editormd-dialog-info .hover-link:hover,.editormd-dialog-info p>a{color:#2196f3}.editormd-dialog-info .hover-link{color:#666}.editormd-dialog-info a .fa-external-link{display:none}.editormd-dialog-info a:hover{color:#2196f3}.editormd-dialog-info a:hover .fa-external-link{display:inline-block}.editormd-container-mask,.editormd-dialog-mask,.editormd-mask{display:none;width:100%;height:100%;position:absolute;top:0;left:0}.editormd-dialog-mask-bg,.editormd-mask{background:#fff;opacity:.5;filter:alpha(opacity=50)}.editormd-mask{position:fixed;background:#000;opacity:.2;filter:alpha(opacity=20);z-index:99998}.editormd-container-mask,.editormd-dialog-mask-con{background:url(../images/loading.gif) no-repeat center center;-webkit-background-size:32px 32px;-moz-background-size:32px 32px;-o-background-size:32px 32px;background-size:32px 32px}.editormd-container-mask{z-index:20;display:block;background-color:#fff}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2){.editormd-container-mask,.editormd-dialog-mask-con{background-image:url(../images/loading@2x.gif)}}@media only screen and (-webkit-min-device-pixel-ratio:3),only screen and (min-device-pixel-ratio:3){.editormd-container-mask,.editormd-dialog-mask-con{background-image:url(../images/loading@3x.gif)}}.editormd-code-block-dialog textarea,.editormd-preformatted-text-dialog textarea{width:100%;height:400px;margin-bottom:6px;overflow:auto;border:1px solid #eee;background:#fff;padding:15px;resize:none}.editormd-code-toolbar{color:#999;font-size:14px;margin:-5px 0 10px}.editormd-grid-table{width:99%;display:table;border:1px solid #ddd;border-collapse:collapse}.editormd-grid-table-row{width:100%;display:table-row}.editormd-grid-table-row a{font-size:1.4em;width:5%;height:36px;color:#999;text-align:center;display:table-cell;vertical-align:middle;border:1px solid #ddd;text-decoration:none;-webkit-transition:background-color .3s ease-out,color .1s ease-in;-moz-transition:background-color .3s ease-out,color .1s ease-in;transition:background-color .3s ease-out,color .1s ease-in}.editormd-grid-table-row a.selected{color:#666;background-color:#eee}.editormd-grid-table-row a:hover{color:#777;background-color:#f6f6f6}.editormd-tab-head{list-style:none;border-bottom:1px solid #ddd}.editormd-tab-head li{display:inline-block}.editormd-tab-head li a{color:#999;display:block;padding:6px 12px 5px;text-align:center;text-decoration:none;margin-bottom:-1px;border:1px solid #ddd;-webkit-border-top-left-radius:3px;-moz-border-top-left-radius:3px;-ms-border-top-left-radius:3px;-o-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-moz-border-top-right-radius:3px;-ms-border-top-right-radius:3px;-o-border-top-right-radius:3px;border-top-right-radius:3px;background:#f6f6f6;-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;transition:all .3s ease-out}.editormd-tab-head li a:hover{color:#666;background:#eee}.editormd-tab-head li.active a{color:#666;background:#fff;border-bottom-color:#fff}.editormd-tab-head li+li{margin-left:3px}.editormd-tab-box{padding:20px 0}.editormd-form{color:#666}.editormd-form label{float:left;display:block;width:75px;text-align:left;padding:7px 0 15px 5px;margin:0 0 2px;font-weight:400}.editormd-form br{clear:both}.editormd-form iframe{display:none}.editormd-form input:focus{outline:0}.editormd-form input[type=number],.editormd-form input[type=text]{color:#999;padding:8px;border:1px solid #ddd}.editormd-form input[type=number]{width:40px;display:inline-block;padding:6px 8px}.editormd-form input[type=text]{display:inline-block;width:264px}.editormd-form .fa-btns{display:inline-block}.editormd-form .fa-btns a{color:#999;padding:7px 10px 0 0;display:inline-block;text-decoration:none;text-align:center}.editormd-form .fa-btns .fa{font-size:1.3em}.editormd-form .fa-btns label{float:none;display:inline-block;width:auto;text-align:left;padding:0 0 0 5px;cursor:pointer}.editormd-dialog-container .editormd-btn,.editormd-dialog-container button,.editormd-dialog-container input[type=submit],.editormd-dialog-footer .editormd-btn,.editormd-dialog-footer button,.editormd-dialog-footer input[type=submit],.editormd-form .editormd-btn,.editormd-form button,.editormd-form input[type=submit]{color:#666;min-width:75px;cursor:pointer;background:#fff;padding:7px 10px;border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-transition:background .3s ease-out;-moz-transition:background .3s ease-out;transition:background .3s ease-out}.editormd-dialog-container .editormd-btn:hover,.editormd-dialog-container button:hover,.editormd-dialog-container input[type=submit]:hover,.editormd-dialog-footer .editormd-btn:hover,.editormd-dialog-footer button:hover,.editormd-dialog-footer input[type=submit]:hover,.editormd-form .editormd-btn:hover,.editormd-form button:hover,.editormd-form input[type=submit]:hover{background:#eee}.editormd-dialog-container .editormd-btn,.editormd-dialog-footer .editormd-btn,.editormd-form .editormd-btn{padding:5px 8px 4px\0}.editormd-dialog-container .editormd-btn+.editormd-btn,.editormd-dialog-footer .editormd-btn+.editormd-btn,.editormd-form .editormd-btn+.editormd-btn{margin-left:8px}.editormd-file-input{width:75px;height:32px;margin-left:8px;position:relative;display:inline-block}.editormd-file-input input[type=file]{width:75px;height:32px;opacity:0;cursor:pointer;background:#000;display:inline-block;position:absolute;top:0;right:0}.editormd-file-input input[type=file]::-webkit-file-upload-button{visibility:hidden}.editormd-file-input:hover input[type=submit]{background:#eee}.editormd .CodeMirror,.editormd-preview{display:inline-block;width:50%;height:100%;vertical-align:top;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0}.editormd-preview{position:absolute;top:35px;right:0;right:-1px\0;overflow:auto;line-height:1.6;display:none;background:#fff;z-index:10}.editormd .CodeMirror{z-index:10;float:left;border-right:1px solid #ddd;font-size:14px;font-family:"YaHei Consolas Hybrid",Consolas,"微软雅黑","Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,Monaco,courier,monospace;line-height:1.6;margin-top:35px}.editormd .CodeMirror pre{font-size:14px;padding:0 12px}.editormd .CodeMirror-linenumbers{padding:0 5px}.editormd .CodeMirror-selected{background:#70b7ff}.editormd .CodeMirror-focused .CodeMirror-selected{background:#70b7ff}.editormd .CodeMirror,.editormd .CodeMirror-scroll,.editormd .editormd-preview{-webkit-overflow-scrolling:touch}.editormd .styled-background{background-color:#ff7}.editormd .CodeMirror-focused .cm-matchhighlight{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);background-position:bottom;background-repeat:repeat-x}.editormd .CodeMirror-empty.CodeMirror-focused{outline:0}.editormd .CodeMirror pre.CodeMirror-placeholder{color:#999}.editormd .cm-trailingspace{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.editormd .cm-tab{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=);background-position:right;background-repeat:no-repeat}/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 *//*! * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.3.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0)format("embedded-opentype"),url(../fonts/fontawesome-webfont.woff2?v=4.3.0)format("woff2"),url(../fonts/fontawesome-webfont.woff?v=4.3.0)format("woff"),url(../fonts/fontawesome-webfont.ttf?v=4.3.0)format("truetype"),url(../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular)format("svg");font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transform:translate(0,0)}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em}.fa-ul{padding-left:0;margin-left:2.14285714em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before,.fa-genderless:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */@font-face{font-family:editormd-logo;src:url(../fonts/editormd-logo.eot?-5y8q6h);src:url(.../fonts/editormd-logo.eot?#iefix-5y8q6h)format("embedded-opentype"),url(../fonts/editormd-logo.woff?-5y8q6h)format("woff"),url(../fonts/editormd-logo.ttf?-5y8q6h)format("truetype"),url(../fonts/editormd-logo.svg?-5y8q6h#icomoon)format("svg");font-weight:400;font-style:normal}.editormd-logo,.editormd-logo-1x,.editormd-logo-2x,.editormd-logo-3x,.editormd-logo-4x,.editormd-logo-5x,.editormd-logo-6x,.editormd-logo-7x,.editormd-logo-8x{font-family:editormd-logo;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;font-size:inherit;line-height:1;display:inline-block;text-rendering:auto;vertical-align:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.markdown-body hr:after,.markdown-body hr:before{content:"";display:table}.editormd-logo-1x:before,.editormd-logo-2x:before,.editormd-logo-3x:before,.editormd-logo-4x:before,.editormd-logo-5x:before,.editormd-logo-6x:before,.editormd-logo-7x:before,.editormd-logo-8x:before,.editormd-logo:before{content:"\e1987"}.editormd-logo-1x{font-size:1em}.editormd-logo-lg{font-size:1.2em}.editormd-logo-2x{font-size:2em}.editormd-logo-3x{font-size:3em}.editormd-logo-4x{font-size:4em}.editormd-logo-5x{font-size:5em}.editormd-logo-6x{font-size:6em}.editormd-logo-7x{font-size:7em}.editormd-logo-8x{font-size:8em}.editormd-logo-color{color:#2196F3}/*! github-markdown-css | The MIT License (MIT) | Copyright (c) Sindre Sorhus (sindresorhus.com) | https://github.com/sindresorhus/github-markdown-css */@font-face{font-family:octicons-anchor;src:url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSkdNhKFY3HF4lK69ExKslx7Xa+vPRVS43G98vG1DnkDMIBUgFN0MDXflU8tbaZOUkXUH0+U27RoRpOIyCKjbMCVejwypzJJG4jIwb43rfl6wbwanocrJm9XFYfskuVC5K/TPyczNU7b84CXcbxks1Un6H6tLH9vf2LRnn8Ax7A5WQAAAHicY2BkYGAA4teL1+yI57f5ysDNwgAC529f0kOmWRiYVgEpDgYmEA8AUzEKsQAAAHicY2BkYGB2+O/AEMPCAAJAkpEBFbAAADgKAe0EAAAiAAAAAAQAAAAEAAAAAAAAKgAqACoAiAAAeJxjYGRgYGBhsGFgYgABEMkFhAwM/xn0QAIAD6YBhwB4nI1Ty07cMBS9QwKlQapQW3VXySvEqDCZGbGaHULiIQ1FKgjWMxknMfLEke2A+IJu+wntrt/QbVf9gG75jK577Lg8K1qQPCfnnnt8fX1NRC/pmjrk/zprC+8D7tBy9DHgBXoWfQ44Av8t4Bj4Z8CLtBL9CniJluPXASf0Lm4CXqFX8Q84dOLnMB17N4c7tBo1AS/Qi+hTwBH4rwHHwN8DXqQ30XXAS7QaLwSc0Gn8NuAVWou/gFmnjLrEaEh9GmDdDGgL3B4JsrRPDU2hTOiMSuJUIdKQQayiAth69r6akSSFqIJuA19TrzCIaY8sIoxyrNIrL//pw7A2iMygkX5vDj+G+kuoLdX4GlGK/8Lnlz6/h9MpmoO9rafrz7ILXEHHaAx95s9lsI7AHNMBWEZHULnfAXwG9/ZqdzLI08iuwRloXE8kfhXYAvE23+23DU3t626rbs8/8adv+9DWknsHp3E17oCf+Z48rvEQNZ78paYM38qfk3v/u3l3u3GXN2Dmvmvpf1Srwk3pB/VSsp512bA/GG5i2WJ7wu430yQ5K3nFGiOqgtmSB5pJVSizwaacmUZzZhXLlZTq8qGGFY2YcSkqbth6aW1tRmlaCFs2016m5qn36SbJrqosG4uMV4aP2PHBmB3tjtmgN2izkGQyLWprekbIntJFing32a5rKWCN/SdSoga45EJykyQ7asZvHQ8PTm6cslIpwyeyjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==)format("woff")}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#333;overflow:hidden;font-family:"Microsoft YaHei",Helvetica,"Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Monaco,monospace,Tahoma,STXihei,"华文细黑",STHeiti,"Helvetica Neue","Droid Sans","wenquanyi micro hei",FreeSans,Arimo,Arial,SimSun,"宋体",Heiti,"黑体",sans-serif;font-size:16px;line-height:1.6;word-wrap:break-word}.markdown-body strong{font-weight:700}.markdown-body h1{margin:.67em 0}.markdown-body img{border:0}.markdown-body hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}.markdown-body input{color:inherit;margin:0;line-height:normal;font:13px/1.4 Helvetica,arial,freesans,clean,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"}.markdown-body html input[disabled]{cursor:default}.markdown-body input[type=checkbox]{-moz-box-sizing:border-box;box-sizing:border-box;padding:0}.markdown-body *{-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body a{background:0 0;color:#4183c4;text-decoration:none}.markdown-body a:active,.markdown-body a:hover{outline:0;text-decoration:underline}.markdown-body hr{margin:15px 0;overflow:hidden;background:0 0;border:0;border-bottom:1px solid #ddd}.markdown-body h1,.markdown-body h2{padding-bottom:.3em;border-bottom:1px solid #eee}.markdown-body blockquote{margin:0}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body code{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace}.markdown-body pre{font:12px Consolas,"Liberation Mono",Menlo,Courier,monospace;word-wrap:normal}.markdown-body .octicon{font:normal normal 16px octicons-anchor;line-height:1;display:inline-block;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;user-select:none}.markdown-body .octicon-link:before{content:'\f05c'}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdown-body .anchor{position:absolute;top:0;left:0;display:block;padding-right:6px;padding-left:30px;margin-left:-30px}.markdown-body .anchor:focus{outline:0}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{position:relative;margin-top:1em;margin-bottom:16px;font-weight:700;line-height:1.4}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{display:none;color:#000;vertical-align:middle}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{padding-left:8px;margin-left:-30px;text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{display:inline-block}.markdown-body h1{font-size:2.25em;line-height:1.2}.markdown-body h1 .anchor{line-height:1}.markdown-body h2{font-size:1.75em;line-height:1.225}.markdown-body h2 .anchor{line-height:1}.markdown-body h3{font-size:1.5em;line-height:1.43}.markdown-body h3 .anchor,.markdown-body h4 .anchor{line-height:1.2}.markdown-body h4{font-size:1.25em}.markdown-body h5 .anchor,.markdown-body h6 .anchor{line-height:1.1}.markdown-body h5{font-size:1em}.markdown-body h6{font-size:1em;color:#777}.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:16px}.markdown-body ol,.markdown-body ul{padding-left:2em}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:16px}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:700}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body blockquote{padding:0 15px;color:#777;border-left:4px solid #ddd}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body table{border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}.markdown-body table th{font-weight:700}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #ddd}.markdown-body table tr{background-color:#fff;border-top:1px solid #ccc}.markdown-body table tr:nth-child(2n){background-color:#f8f8f8}.markdown-body img{max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body code{padding:.2em 0;margin:0;font-size:85%;background-color:rgba(0,0,0,.04);border-radius:3px}.markdown-body code:after,.markdown-body code:before{letter-spacing:-.2em;content:"\00a0"}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:0 0;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;background-color:#f7f7f7;border-radius:3px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body pre code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body pre code:after,.markdown-body pre code:before{content:normal}.markdown-body .pl-c{color:#969896}.markdown-body .pl-c1,.markdown-body .pl-mdh,.markdown-body .pl-mm,.markdown-body .pl-mp,.markdown-body .pl-mr,.markdown-body .pl-s1 .pl-v,.markdown-body .pl-s3,.markdown-body .pl-sc,.markdown-body .pl-sv{color:#0086b3}.markdown-body .pl-e,.markdown-body .pl-en{color:#795da3}.markdown-body .pl-s1 .pl-s2,.markdown-body .pl-smi,.markdown-body .pl-smp,.markdown-body .pl-stj,.markdown-body .pl-vo,.markdown-body .pl-vpf{color:#333}.markdown-body .pl-ent{color:#63a35c}.markdown-body .pl-k,.markdown-body .pl-s,.markdown-body .pl-st{color:#a71d5d}.markdown-body .pl-pds,.markdown-body .pl-s1,.markdown-body .pl-s1 .pl-pse .pl-s2,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sra,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-src{color:#df5000}.markdown-body .pl-mo,.markdown-body .pl-v{color:#1d3e81}.markdown-body .pl-id{color:#b52a1d}.markdown-body .pl-ii{background-color:#b52a1d;color:#f8f8f8}.markdown-body .pl-sr .pl-cce{color:#63a35c;font-weight:700}.markdown-body .pl-ml{color:#693a17}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{color:#1d3e81;font-weight:700}.markdown-body .pl-mq{color:teal}.markdown-body .pl-mi{color:#333;font-style:italic}.markdown-body .pl-mb{color:#333;font-weight:700}.markdown-body .pl-md,.markdown-body .pl-mdhf{background-color:#ffecec;color:#bd2c00}.markdown-body .pl-mdht,.markdown-body .pl-mi1{background-color:#eaffea;color:#55a532}.markdown-body .pl-mdr{color:#795da3;font-weight:700}.markdown-body kbd{display:inline-block;padding:3px 5px;font:11px Consolas,"Liberation Mono",Menlo,Courier,monospace;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:1px solid #ccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.markdown-body .task-list-item+.task-list-item{margin-top:3px}.markdown-body .task-list-item input{float:left;margin:.3em 0 .25em -1.6em;vertical-align:middle}.markdown-body :checked+.radio-label{z-index:1;position:relative;border-color:#4183c4}.editormd-html-preview,.editormd-preview-container{text-align:left;font-size:14px;line-height:1.6;padding:20px;overflow:auto;width:100%;background-color:#fff}.editormd-html-preview blockquote,.editormd-preview-container blockquote{color:#666;border-left:4px solid #ddd;padding-left:20px;margin-left:0;font-size:14px;font-style:italic}.editormd-html-preview p code,.editormd-preview-container p code{margin-left:5px;margin-right:4px}.editormd-html-preview abbr,.editormd-preview-container abbr{background:#ffd}.editormd-html-preview hr,.editormd-preview-container hr{height:1px;border:none;border-top:1px solid #ddd;background:0 0}.editormd-html-preview code,.editormd-preview-container code{border:1px solid #ddd;background:#f6f6f6;padding:3px;border-radius:3px;font-size:14px}.editormd-html-preview pre,.editormd-preview-container pre{border:1px solid #ddd;background:#f6f6f6;padding:10px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px}.editormd-html-preview pre code,.editormd-preview-container pre code{padding:0}.editormd-html-preview code,.editormd-html-preview kbd,.editormd-html-preview pre,.editormd-preview-container code,.editormd-preview-container kbd,.editormd-preview-container pre{font-family:"YaHei Consolas Hybrid",Consolas,"Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,monospace,monospace}.editormd-html-preview table thead tr,.editormd-preview-container table thead tr{background-color:#F8F8F8}.editormd-html-preview p.editormd-tex,.editormd-preview-container p.editormd-tex{text-align:center}.editormd-html-preview span.editormd-tex,.editormd-preview-container span.editormd-tex{margin:0 5px}.editormd-html-preview .emoji,.editormd-preview-container .emoji{width:24px;height:24px}.editormd-html-preview .katex,.editormd-preview-container .katex{font-size:1.4em}.editormd-html-preview .flowchart,.editormd-html-preview .sequence-diagram,.editormd-preview-container .flowchart,.editormd-preview-container .sequence-diagram{margin:0 auto;text-align:center}.editormd-html-preview .flowchart svg,.editormd-html-preview .sequence-diagram svg,.editormd-preview-container .flowchart svg,.editormd-preview-container .sequence-diagram svg{margin:0 auto}.editormd-html-preview .flowchart text,.editormd-html-preview .sequence-diagram text,.editormd-preview-container .flowchart text,.editormd-preview-container .sequence-diagram text{font-size:15px!important;font-family:"YaHei Consolas Hybrid",Consolas,"Microsoft YaHei","Malgun Gothic","Segoe UI",Helvetica,Arial!important}/*! Pretty printing styles. Used with prettify.js. */.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.clo,.opn,.pun{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.kwd,.tag,.typ{font-weight:700}.str{color:#060}.kwd{color:#006}.com{color:#600;font-style:italic}.typ{color:#404}.lit{color:#044}.clo,.opn,.pun{color:#440}.tag{color:#006}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}.editormd-html-preview pre.prettyprint,.editormd-preview-container pre.prettyprint{padding:10px;border:1px solid #ddd;white-space:pre-wrap;word-wrap:break-word}.editormd-html-preview ol.linenums,.editormd-preview-container ol.linenums{color:#999;padding-left:2.5em}.editormd-html-preview ol.linenums li,.editormd-preview-container ol.linenums li{list-style-type:decimal}.editormd-html-preview ol.linenums li code,.editormd-preview-container ol.linenums li code{border:none;background:0 0;padding:0}.editormd-html-preview .editormd-toc-menu,.editormd-preview-container .editormd-toc-menu{margin:8px 0 12px;display:inline-block}.editormd-html-preview .editormd-toc-menu>.markdown-toc,.editormd-preview-container .editormd-toc-menu>.markdown-toc{position:relative;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;border:1px solid #ddd;display:inline-block;font-size:1em}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul{width:160%;min-width:180px;position:absolute;left:-1px;top:-2px;z-index:100;padding:0 10px 10px;display:none;background:#fff;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);-moz-box-shadow:0 3px 5px rgba(0,0,0,.2);-ms-box-shadow:0 3px 5px rgba(0,0,0,.2);-o-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li ul{width:100%;min-width:180px;border:1px solid #ddd;display:none;background:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.editormd-html-preview .editormd-toc-menu .toc-menu-btn:hover,.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li a:hover,.editormd-preview-container .editormd-toc-menu .toc-menu-btn:hover,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li a:hover{background-color:#f6f6f6}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li a,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li a{color:#666;padding:6px 10px;display:block;-webkit-transition:background-color 500ms ease-out;-moz-transition:background-color 500ms ease-out;transition:background-color 500ms ease-out}.editormd-html-preview .editormd-toc-menu>.markdown-toc li,.editormd-preview-container .editormd-toc-menu>.markdown-toc li{position:relative}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul{position:absolute;top:32px;left:10%;display:none;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);-moz-box-shadow:0 3px 5px rgba(0,0,0,.2);-ms-box-shadow:0 3px 5px rgba(0,0,0,.2);-o-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:before,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:before{pointer-events:pointer-events;position:absolute;left:15px;top:-6px;display:block;content:"";width:0;height:0;border:6px solid transparent;border-width:0 6px 6px;z-index:10}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:before,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:before{border-bottom-color:#ccc}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:after{border-bottom-color:#fff;top:-5px}.editormd-html-preview .editormd-toc-menu ul,.editormd-preview-container .editormd-toc-menu ul{list-style:none}.editormd-html-preview .editormd-toc-menu a,.editormd-preview-container .editormd-toc-menu a{text-decoration:none}.editormd-html-preview .editormd-toc-menu h1,.editormd-preview-container .editormd-toc-menu h1{font-size:16px;padding:5px 0 10px 10px;line-height:1;border-bottom:1px solid #eee}.editormd-html-preview .editormd-toc-menu h1 .fa,.editormd-preview-container .editormd-toc-menu h1 .fa{padding-left:10px}.editormd-html-preview .editormd-toc-menu .toc-menu-btn,.editormd-preview-container .editormd-toc-menu .toc-menu-btn{color:#666;min-width:180px;padding:5px 10px;border-radius:4px;display:inline-block;-webkit-transition:background-color 500ms ease-out;-moz-transition:background-color 500ms ease-out;transition:background-color 500ms ease-out}.editormd-html-preview textarea,.editormd-onlyread .editormd-toolbar{display:none}.editormd-html-preview .editormd-toc-menu .toc-menu-btn .fa,.editormd-preview-container .editormd-toc-menu .toc-menu-btn .fa{float:right;padding:3px 0 0 10px;font-size:1.3em}.markdown-body .editormd-toc-menu ul{padding-left:0}.markdown-body .highlight pre,.markdown-body pre{line-height:1.6}hr.editormd-page-break{border:1px dotted #ccc;font-size:0;height:2px}@media only print{hr.editormd-page-break{background:0 0;border:none;height:0}}.editormd-html-preview hr.editormd-page-break{background:0 0;border:none;height:0}.editormd-preview-close-btn{color:#fff;padding:4px 6px;font-size:18px;-webkit-border-radius:500px;-moz-border-radius:500px;-ms-border-radius:500px;-o-border-radius:500px;border-radius:500px;display:none;background-color:#ccc;position:absolute;top:25px;right:35px;z-index:19;-webkit-transition:background-color 300ms ease-out;-moz-transition:background-color 300ms ease-out;transition:background-color 300ms ease-out}.editormd-preview-close-btn:hover{background-color:#999}.editormd-preview-active{width:100%;padding:40px}.editormd-preview-theme-dark{color:#777;background:#2C2827}.editormd-preview-theme-dark .editormd-preview-container{color:#888;background-color:#2C2827}.editormd-preview-theme-dark .editormd-preview-container pre.prettyprint{border:none}.editormd-preview-theme-dark .editormd-preview-container blockquote{color:#555;padding:.5em;background:#222;border-color:#333}.editormd-preview-theme-dark .editormd-preview-container abbr{color:#fff;padding:1px 3px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;background:#f90}.editormd-preview-theme-dark .editormd-preview-container code{color:#fff;border:none;padding:1px 3px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;background:#5A9600}.editormd-preview-theme-dark .editormd-preview-container table{border:none}.editormd-preview-theme-dark .editormd-preview-container .fa-emoji{color:#B4BF42}.editormd-preview-theme-dark .editormd-preview-container .katex{color:#FEC93F}.editormd-preview-theme-dark .editormd-toc-menu>.markdown-toc{background:#fff;border:none}.editormd-preview-theme-dark .editormd-toc-menu>.markdown-toc h1{border-color:#ddd}.editormd-preview-theme-dark .markdown-body h1,.editormd-preview-theme-dark .markdown-body h2,.editormd-preview-theme-dark .markdown-body hr{border-color:#222}.editormd-preview-theme-dark pre{color:#999;background-color:#111;background-color:rgba(0,0,0,.4)}.editormd-preview-theme-dark pre .pln{color:#999}.editormd-preview-theme-dark li.L1,.editormd-preview-theme-dark li.L3,.editormd-preview-theme-dark li.L5,.editormd-preview-theme-dark li.L7,.editormd-preview-theme-dark li.L9{background:0 0}.editormd-preview-theme-dark [class*=editormd-logo]{color:#2196F3}.editormd-preview-theme-dark .sequence-diagram text{fill:#fff}.editormd-preview-theme-dark .sequence-diagram path,.editormd-preview-theme-dark .sequence-diagram rect{color:#fff;fill:#64D1CB;stroke:#64D1CB}.editormd-preview-theme-dark .flowchart path,.editormd-preview-theme-dark .flowchart rect{stroke:#A6C6FF}.editormd-preview-theme-dark .flowchart rect{fill:#A6C6FF}.editormd-preview-theme-dark .flowchart text{fill:#5879B4}@media screen{.editormd-preview-theme-dark .str{color:#080}.editormd-preview-theme-dark .kwd{color:#f90}.editormd-preview-theme-dark .com{color:#444}.editormd-preview-theme-dark .typ{color:#606}.editormd-preview-theme-dark .lit{color:#066}.editormd-preview-theme-dark .clo,.editormd-preview-theme-dark .opn,.editormd-preview-theme-dark .pun{color:#660}.editormd-preview-theme-dark .tag{color:#f90}.editormd-preview-theme-dark .atn{color:#6C95F5}.editormd-preview-theme-dark .atv{color:#080}.editormd-preview-theme-dark .dec,.editormd-preview-theme-dark .var{color:#008BA7}.editormd-preview-theme-dark .fun{color:red}}.editormd-onlyread .CodeMirror{margin-top:0}.editormd-onlyread .editormd-preview{top:0}.editormd-fullscreen{position:fixed;top:0;left:0;border:none;margin:0 auto}.editormd-theme-dark{border-color:#1a1a17}.editormd-theme-dark .editormd-toolbar{background:#1A1A17;border-color:#1a1a17}.editormd-theme-dark .editormd-menu>li>a{color:#777;border-color:#1a1a17}.editormd-theme-dark .editormd-menu>li>a.active,.editormd-theme-dark .editormd-menu>li>a:hover{border-color:#333;background:#333}.editormd-theme-dark .editormd-menu>li.divider{border-right:1px solid #111}.editormd-theme-dark .CodeMirror{border-right:1px solid rgba(0,0,0,.1)} \ No newline at end of file + */@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.3.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0) format("embedded-opentype"),url(../fonts/fontawesome-webfont.woff2?v=4.3.0) format("woff2"),url(../fonts/fontawesome-webfont.woff?v=4.3.0) format("woff"),url(../fonts/fontawesome-webfont.ttf?v=4.3.0) format("truetype"),url(../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transform:translate(0,0)}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before,.fa-genderless:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */@font-face{font-family:editormd-logo;src:url(../fonts/editormd-logo.eot?-5y8q6h);src:url(../fonts/editormd-logo.eot?#iefix-5y8q6h) format("embedded-opentype"),url(../fonts/editormd-logo.woff?-5y8q6h) format("woff"),url(../fonts/editormd-logo.ttf?-5y8q6h) format("truetype"),url(../fonts/editormd-logo.svg?-5y8q6h#icomoon) format("svg");font-weight:400;font-style:normal}.editormd-logo,.editormd-logo-1x,.editormd-logo-2x,.editormd-logo-3x,.editormd-logo-4x,.editormd-logo-5x,.editormd-logo-6x,.editormd-logo-7x,.editormd-logo-8x{font-family:editormd-logo;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;font-size:inherit;line-height:1;display:inline-block;text-rendering:auto;vertical-align:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.editormd-logo-1x:before,.editormd-logo-2x:before,.editormd-logo-3x:before,.editormd-logo-4x:before,.editormd-logo-5x:before,.editormd-logo-6x:before,.editormd-logo-7x:before,.editormd-logo-8x:before,.editormd-logo:before{content:"󡦇"}.editormd-logo-1x{font-size:1em}.editormd-logo-lg{font-size:1.2em}.editormd-logo-2x{font-size:2em}.editormd-logo-3x{font-size:3em}.editormd-logo-4x{font-size:4em}.editormd-logo-5x{font-size:5em}.editormd-logo-6x{font-size:6em}.editormd-logo-7x{font-size:7em}.editormd-logo-8x{font-size:8em}.editormd-logo-color{color:#2196f3}/*! github-markdown-css | The MIT License (MIT) | Copyright (c) Sindre Sorhus (sindresorhus.com) | https://github.com/sindresorhus/github-markdown-css */@font-face{font-family:octicons-anchor;src:url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSkdNhKFY3HF4lK69ExKslx7Xa+vPRVS43G98vG1DnkDMIBUgFN0MDXflU8tbaZOUkXUH0+U27RoRpOIyCKjbMCVejwypzJJG4jIwb43rfl6wbwanocrJm9XFYfskuVC5K/TPyczNU7b84CXcbxks1Un6H6tLH9vf2LRnn8Ax7A5WQAAAHicY2BkYGAA4teL1+yI57f5ysDNwgAC529f0kOmWRiYVgEpDgYmEA8AUzEKsQAAAHicY2BkYGB2+O/AEMPCAAJAkpEBFbAAADgKAe0EAAAiAAAAAAQAAAAEAAAAAAAAKgAqACoAiAAAeJxjYGRgYGBhsGFgYgABEMkFhAwM/xn0QAIAD6YBhwB4nI1Ty07cMBS9QwKlQapQW3VXySvEqDCZGbGaHULiIQ1FKgjWMxknMfLEke2A+IJu+wntrt/QbVf9gG75jK577Lg8K1qQPCfnnnt8fX1NRC/pmjrk/zprC+8D7tBy9DHgBXoWfQ44Av8t4Bj4Z8CLtBL9CniJluPXASf0Lm4CXqFX8Q84dOLnMB17N4c7tBo1AS/Qi+hTwBH4rwHHwN8DXqQ30XXAS7QaLwSc0Gn8NuAVWou/gFmnjLrEaEh9GmDdDGgL3B4JsrRPDU2hTOiMSuJUIdKQQayiAth69r6akSSFqIJuA19TrzCIaY8sIoxyrNIrL//pw7A2iMygkX5vDj+G+kuoLdX4GlGK/8Lnlz6/h9MpmoO9rafrz7ILXEHHaAx95s9lsI7AHNMBWEZHULnfAXwG9/ZqdzLI08iuwRloXE8kfhXYAvE23+23DU3t626rbs8/8adv+9DWknsHp3E17oCf+Z48rvEQNZ78paYM38qfk3v/u3l3u3GXN2Dmvmvpf1Srwk3pB/VSsp512bA/GG5i2WJ7wu430yQ5K3nFGiOqgtmSB5pJVSizwaacmUZzZhXLlZTq8qGGFY2YcSkqbth6aW1tRmlaCFs2016m5qn36SbJrqosG4uMV4aP2PHBmB3tjtmgN2izkGQyLWprekbIntJFing32a5rKWCN/SdSoga45EJykyQ7asZvHQ8PTm6cslIpwyeyjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==) format("woff")}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#333;overflow:hidden;font-family:"Microsoft YaHei",Helvetica,"Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Monaco,monospace,Tahoma,STXihei,"华文细黑",STHeiti,"Helvetica Neue","Droid Sans","wenquanyi micro hei",FreeSans,Arimo,Arial,SimSun,"宋体",Heiti,"黑体",sans-serif;font-size:16px;line-height:1.6;word-wrap:break-word}.markdown-body a{background:0 0}.markdown-body a:active,.markdown-body a:hover{outline:0}.markdown-body strong{font-weight:700}.markdown-body h1{font-size:2em;margin:.67em 0}.markdown-body img{border:0}.markdown-body hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}.markdown-body pre{overflow:auto}.markdown-body code,.markdown-body kbd,.markdown-body pre{font-family:"Meiryo UI","YaHei Consolas Hybrid",Consolas,"Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,monospace,monospace;font-size:1em}.markdown-body input{color:inherit;font:inherit;margin:0}.markdown-body html input[disabled]{cursor:default}.markdown-body input{line-height:normal}.markdown-body input[type=checkbox]{-moz-box-sizing:border-box;box-sizing:border-box;padding:0}.markdown-body table{border-collapse:collapse;border-spacing:0}.markdown-body td,.markdown-body th{padding:0}.markdown-body *{-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body input{font:13px/1.4 Helvetica,arial,freesans,clean,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"}.markdown-body a{color:#4183c4;text-decoration:none}.markdown-body a:active,.markdown-body a:hover{text-decoration:underline}.markdown-body hr{height:0;margin:15px 0;overflow:hidden;background:0 0;border:0;border-bottom:1px solid #ddd}.markdown-body hr:before{display:table;content:""}.markdown-body hr:after{display:table;clear:both;content:""}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:15px;margin-bottom:15px;line-height:1.1}.markdown-body h1{font-size:30px}.markdown-body h2{font-size:21px}.markdown-body h3{font-size:16px}.markdown-body h4{font-size:14px}.markdown-body h5{font-size:12px}.markdown-body h6{font-size:11px}.markdown-body blockquote{margin:0}.markdown-body ol,.markdown-body ul{padding:0;margin-top:0;margin-bottom:0}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body code{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0;font:12px Consolas,"Liberation Mono",Menlo,Courier,monospace}.markdown-body .octicon{font:normal normal 16px octicons-anchor;line-height:1;display:inline-block;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-body .octicon-link:before{content:"\f05c"}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdown-body .anchor{position:absolute;top:0;left:0;display:block;padding-right:6px;padding-left:30px;margin-left:-30px}.markdown-body .anchor:focus{outline:0}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{position:relative;margin-top:1em;margin-bottom:16px;font-weight:700;line-height:1.4}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{display:none;color:#000;vertical-align:middle}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{padding-left:8px;margin-left:-30px;text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{display:inline-block}.markdown-body h1{padding-bottom:.3em;font-size:2.25em;line-height:1.2;border-bottom:1px solid #eee}.markdown-body h1 .anchor{line-height:1}.markdown-body h2{padding-bottom:.3em;font-size:1.75em;line-height:1.225;border-bottom:1px solid #eee}.markdown-body h2 .anchor{line-height:1}.markdown-body h3{font-size:1.5em;line-height:1.43}.markdown-body h3 .anchor{line-height:1.2}.markdown-body h4{font-size:1.25em}.markdown-body h4 .anchor{line-height:1.2}.markdown-body h5{font-size:1em}.markdown-body h5 .anchor{line-height:1.1}.markdown-body h6{font-size:1em;color:#777}.markdown-body h6 .anchor{line-height:1.1}.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:16px}.markdown-body ol,.markdown-body ul{padding-left:2em}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:16px}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:700}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body blockquote{padding:0 15px;color:#777;border-left:4px solid #ddd}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body table{display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}.markdown-body table th{font-weight:700}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #ddd}.markdown-body table tr{background-color:#fff;border-top:1px solid #ccc}.markdown-body table tr:nth-child(2n){background-color:#f8f8f8}.markdown-body img{max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body code{padding:0;padding-top:.2em;padding-bottom:.2em;margin:0;font-size:85%;background-color:rgba(0,0,0,.04);border-radius:3px}.markdown-body code:after,.markdown-body code:before{letter-spacing:-.2em;content:" "}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:0 0;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f7f7f7;border-radius:3px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body pre{word-wrap:normal}.markdown-body pre code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body pre code:after,.markdown-body pre code:before{content:normal}.markdown-body kbd{display:inline-block;padding:3px 5px;font-size:11px;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:solid 1px #ccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.markdown-body .pl-c{color:#969896}.markdown-body .pl-c1,.markdown-body .pl-mdh,.markdown-body .pl-mm,.markdown-body .pl-mp,.markdown-body .pl-mr,.markdown-body .pl-s1 .pl-v,.markdown-body .pl-s3,.markdown-body .pl-sc,.markdown-body .pl-sv{color:#0086b3}.markdown-body .pl-e,.markdown-body .pl-en{color:#795da3}.markdown-body .pl-s1 .pl-s2,.markdown-body .pl-smi,.markdown-body .pl-smp,.markdown-body .pl-stj,.markdown-body .pl-vo,.markdown-body .pl-vpf{color:#333}.markdown-body .pl-ent{color:#63a35c}.markdown-body .pl-k,.markdown-body .pl-s,.markdown-body .pl-st{color:#a71d5d}.markdown-body .pl-pds,.markdown-body .pl-s1,.markdown-body .pl-s1 .pl-pse .pl-s2,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sra,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-src{color:#df5000}.markdown-body .pl-mo,.markdown-body .pl-v{color:#1d3e81}.markdown-body .pl-id{color:#b52a1d}.markdown-body .pl-ii{background-color:#b52a1d;color:#f8f8f8}.markdown-body .pl-sr .pl-cce{color:#63a35c;font-weight:700}.markdown-body .pl-ml{color:#693a17}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{color:#1d3e81;font-weight:700}.markdown-body .pl-mq{color:teal}.markdown-body .pl-mi{color:#333;font-style:italic}.markdown-body .pl-mb{color:#333;font-weight:700}.markdown-body .pl-md,.markdown-body .pl-mdhf{background-color:#ffecec;color:#bd2c00}.markdown-body .pl-mdht,.markdown-body .pl-mi1{background-color:#eaffea;color:#55a532}.markdown-body .pl-mdr{color:#795da3;font-weight:700}.markdown-body kbd{display:inline-block;padding:3px 5px;font:11px Consolas,"Liberation Mono",Menlo,Courier,monospace;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:solid 1px #ccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item+.task-list-item{margin-top:3px}.markdown-body .task-list-item input{float:left;margin:.3em 0 .25em -1.6em;vertical-align:middle}.markdown-body :checked+.radio-label{z-index:1;position:relative;border-color:#4183c4}.editormd-html-preview,.editormd-preview-container{text-align:left;font-size:14px;line-height:1.6;padding:20px;overflow:auto;width:100%;background-color:#fff}.editormd-html-preview blockquote,.editormd-preview-container blockquote{color:#666;border-left:4px solid #ddd;padding-left:20px;margin-left:0;font-size:14px;font-style:italic}.editormd-html-preview p code,.editormd-preview-container p code{margin-left:5px;margin-right:4px}.editormd-html-preview abbr,.editormd-preview-container abbr{background:#ffd}.editormd-html-preview hr,.editormd-preview-container hr{height:1px;border:none;border-top:1px solid #ddd;background:0 0}.editormd-html-preview code,.editormd-preview-container code{border:1px solid #ddd;background:#f6f6f6;padding:3px;border-radius:3px;font-size:14px}.editormd-html-preview pre,.editormd-preview-container pre{border:1px solid #ddd;background:#f6f6f6;padding:10px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px}.editormd-html-preview pre code,.editormd-preview-container pre code{padding:0}.editormd-html-preview code,.editormd-html-preview kbd,.editormd-html-preview pre,.editormd-preview-container code,.editormd-preview-container kbd,.editormd-preview-container pre{font-family:"YaHei Consolas Hybrid",Consolas,"Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,monospace,monospace}.editormd-html-preview table thead tr,.editormd-preview-container table thead tr{background-color:#f8f8f8}.editormd-html-preview p.editormd-tex,.editormd-preview-container p.editormd-tex{text-align:center}.editormd-html-preview span.editormd-tex,.editormd-preview-container span.editormd-tex{margin:0 5px}.editormd-html-preview .emoji,.editormd-preview-container .emoji{width:24px;height:24px}.editormd-html-preview .katex,.editormd-preview-container .katex{font-size:1.4em}.editormd-html-preview .flowchart,.editormd-html-preview .sequence-diagram,.editormd-preview-container .flowchart,.editormd-preview-container .sequence-diagram{margin:0 auto;text-align:center}.editormd-html-preview .flowchart svg,.editormd-html-preview .sequence-diagram svg,.editormd-preview-container .flowchart svg,.editormd-preview-container .sequence-diagram svg{margin:0 auto}.editormd-html-preview .flowchart text,.editormd-html-preview .sequence-diagram text,.editormd-preview-container .flowchart text,.editormd-preview-container .sequence-diagram text{font-size:15px!important;font-family:"YaHei Consolas Hybrid",Consolas,"Microsoft YaHei","Malgun Gothic","Segoe UI",Helvetica,Arial!important}/*! Pretty printing styles. Used with prettify.js. */.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.clo,.opn,.pun{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:700}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:700}.lit{color:#044}.clo,.opn,.pun{color:#440}.tag{color:#006;font-weight:700}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}.editormd-html-preview pre.prettyprint,.editormd-preview-container pre.prettyprint{padding:10px;border:1px solid #ddd;white-space:pre-wrap;word-wrap:break-word}.editormd-html-preview ol.linenums,.editormd-preview-container ol.linenums{color:#999;padding-left:2.5em}.editormd-html-preview ol.linenums li,.editormd-preview-container ol.linenums li{list-style-type:decimal}.editormd-html-preview ol.linenums li code,.editormd-preview-container ol.linenums li code{border:none;background:0 0;padding:0}.editormd-html-preview .editormd-toc-menu,.editormd-preview-container .editormd-toc-menu{margin:8px 0 12px 0;display:inline-block}.editormd-html-preview .editormd-toc-menu>.markdown-toc,.editormd-preview-container .editormd-toc-menu>.markdown-toc{position:relative;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;border:1px solid #ddd;display:inline-block;font-size:1em}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul{width:160%;min-width:180px;position:absolute;left:-1px;top:-2px;z-index:100;padding:0 10px 10px;display:none;background:#fff;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);-moz-box-shadow:0 3px 5px rgba(0,0,0,.2);-ms-box-shadow:0 3px 5px rgba(0,0,0,.2);-o-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li ul{width:100%;min-width:180px;border:1px solid #ddd;display:none;background:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li a,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li a{color:#666;padding:6px 10px;display:block;-webkit-transition:background-color .5s ease-out;-moz-transition:background-color .5s ease-out;transition:background-color .5s ease-out}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li a:hover,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li a:hover{background-color:#f6f6f6}.editormd-html-preview .editormd-toc-menu>.markdown-toc li,.editormd-preview-container .editormd-toc-menu>.markdown-toc li{position:relative}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul{position:absolute;top:32px;left:10%;display:none;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);-moz-box-shadow:0 3px 5px rgba(0,0,0,.2);-ms-box-shadow:0 3px 5px rgba(0,0,0,.2);-o-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:before,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:before{pointer-events:pointer-events;position:absolute;left:15px;top:-6px;display:block;content:"";width:0;height:0;border:6px solid transparent;border-width:0 6px 6px;z-index:10}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:before,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:before{border-bottom-color:#ccc}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:after{border-bottom-color:#fff;top:-5px}.editormd-html-preview .editormd-toc-menu ul,.editormd-preview-container .editormd-toc-menu ul{list-style:none}.editormd-html-preview .editormd-toc-menu a,.editormd-preview-container .editormd-toc-menu a{text-decoration:none}.editormd-html-preview .editormd-toc-menu h1,.editormd-preview-container .editormd-toc-menu h1{font-size:16px;padding:5px 0 10px 10px;line-height:1;border-bottom:1px solid #eee}.editormd-html-preview .editormd-toc-menu h1 .fa,.editormd-preview-container .editormd-toc-menu h1 .fa{padding-left:10px}.editormd-html-preview .editormd-toc-menu .toc-menu-btn,.editormd-preview-container .editormd-toc-menu .toc-menu-btn{color:#666;min-width:180px;padding:5px 10px;border-radius:4px;display:inline-block;-webkit-transition:background-color .5s ease-out;-moz-transition:background-color .5s ease-out;transition:background-color .5s ease-out}.editormd-html-preview .editormd-toc-menu .toc-menu-btn:hover,.editormd-preview-container .editormd-toc-menu .toc-menu-btn:hover{background-color:#f6f6f6}.editormd-html-preview .editormd-toc-menu .toc-menu-btn .fa,.editormd-preview-container .editormd-toc-menu .toc-menu-btn .fa{float:right;padding:3px 0 0 10px;font-size:1.3em}.markdown-body .editormd-toc-menu ul{padding-left:0}.markdown-body .highlight pre,.markdown-body pre{line-height:1.6}hr.editormd-page-break{border:1px dotted #ccc;font-size:0;height:2px}@media only print{hr.editormd-page-break{background:0 0;border:none;height:0}}.editormd-html-preview textarea{display:none}.editormd-html-preview hr.editormd-page-break{background:0 0;border:none;height:0}.editormd-preview-close-btn{color:#fff;padding:4px 6px;font-size:18px;-webkit-border-radius:500px;-moz-border-radius:500px;-ms-border-radius:500px;-o-border-radius:500px;border-radius:500px;display:none;background-color:#ccc;position:absolute;top:25px;right:35px;z-index:19;-webkit-transition:background-color .3s ease-out;-moz-transition:background-color .3s ease-out;transition:background-color .3s ease-out}.editormd-preview-close-btn:hover{background-color:#999}.editormd-preview-active{width:100%;padding:40px}.editormd-preview-theme-dark{color:#777;background:#2c2827}.editormd-preview-theme-dark .editormd-preview-container{color:#888;background-color:#2c2827}.editormd-preview-theme-dark .editormd-preview-container pre.prettyprint{border:none}.editormd-preview-theme-dark .editormd-preview-container blockquote{color:#555;padding:.5em;background:#222;border-color:#333}.editormd-preview-theme-dark .editormd-preview-container abbr{color:#fff;padding:1px 3px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;background:#f90}.editormd-preview-theme-dark .editormd-preview-container code{color:#fff;border:none;padding:1px 3px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;background:#5a9600}.editormd-preview-theme-dark .editormd-preview-container table{border:none}.editormd-preview-theme-dark .editormd-preview-container .fa-emoji{color:#b4bf42}.editormd-preview-theme-dark .editormd-preview-container .katex{color:#fec93f}.editormd-preview-theme-dark .editormd-toc-menu>.markdown-toc{background:#fff;border:none}.editormd-preview-theme-dark .editormd-toc-menu>.markdown-toc h1{border-color:#ddd}.editormd-preview-theme-dark .markdown-body h1,.editormd-preview-theme-dark .markdown-body h2,.editormd-preview-theme-dark .markdown-body hr{border-color:#222}.editormd-preview-theme-dark pre{color:#999;background-color:#111;background-color:rgba(0,0,0,.4)}.editormd-preview-theme-dark pre .pln{color:#999}.editormd-preview-theme-dark li.L1,.editormd-preview-theme-dark li.L3,.editormd-preview-theme-dark li.L5,.editormd-preview-theme-dark li.L7,.editormd-preview-theme-dark li.L9{background:0 0}.editormd-preview-theme-dark [class*=editormd-logo]{color:#2196f3}.editormd-preview-theme-dark .sequence-diagram text{fill:#fff}.editormd-preview-theme-dark .sequence-diagram path,.editormd-preview-theme-dark .sequence-diagram rect{color:#fff;fill:#64d1cb;stroke:#64d1cb}.editormd-preview-theme-dark .flowchart path,.editormd-preview-theme-dark .flowchart rect{stroke:#a6c6ff}.editormd-preview-theme-dark .flowchart rect{fill:#a6c6ff}.editormd-preview-theme-dark .flowchart text{fill:#5879b4}@media screen{.editormd-preview-theme-dark .str{color:#080}.editormd-preview-theme-dark .kwd{color:#f90}.editormd-preview-theme-dark .com{color:#444}.editormd-preview-theme-dark .typ{color:#606}.editormd-preview-theme-dark .lit{color:#066}.editormd-preview-theme-dark .clo,.editormd-preview-theme-dark .opn,.editormd-preview-theme-dark .pun{color:#660}.editormd-preview-theme-dark .tag{color:#f90}.editormd-preview-theme-dark .atn{color:#6c95f5}.editormd-preview-theme-dark .atv{color:#080}.editormd-preview-theme-dark .dec,.editormd-preview-theme-dark .var{color:#008ba7}.editormd-preview-theme-dark .fun{color:red}}.editormd-onlyread .editormd-toolbar{display:none}.editormd-onlyread .CodeMirror{margin-top:0}.editormd-onlyread .editormd-preview{top:0}.editormd-fullscreen{position:fixed;top:0;left:0;border:none;margin:0 auto}.editormd-theme-dark{border-color:#1a1a17}.editormd-theme-dark .editormd-toolbar{background:#1a1a17;border-color:#1a1a17}.editormd-theme-dark .editormd-menu>li>a{color:#777;border-color:#1a1a17}.editormd-theme-dark .editormd-menu>li>a.active,.editormd-theme-dark .editormd-menu>li>a:hover{border-color:#333;background:#333}.editormd-theme-dark .editormd-menu>li.divider{border-right:1px solid #111}.editormd-theme-dark .CodeMirror{border-right:1px solid rgba(0,0,0,.1)} \ No newline at end of file diff --git a/static/editor.md/css/editormd.preview.css b/static/editor.md/css/editormd.preview.css index 119bef90f..33b575d68 100644 --- a/static/editor.md/css/editormd.preview.css +++ b/static/editor.md/css/editormd.preview.css @@ -2,12 +2,12 @@ * Editor.md * * @file editormd.preview.css - * @version v1.5.0 + * @version v1.7.17 * @description Open source online markdown editor. * @license MIT License - * @author Pandao - * {@link https://github.com/pandao/editor.md} - * @updateTime 2015-06-09 + * @author IBM Skills Network + * {@link https://github.com/ibm-skills-network/editor.md} + * @updateTime 2024-03-27 */ @charset "UTF-8"; @@ -19,7 +19,7 @@ /* FONT PATH * -------------------------- */ @font-face { - font-family: 'FontAwesome'; + font-family: "FontAwesome"; src: url("../fonts/fontawesome-webfont.eot?v=4.3.0"); src: url("../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0") format("embedded-opentype"), url("../fonts/fontawesome-webfont.woff2?v=4.3.0") format("woff2"), url("../fonts/fontawesome-webfont.woff?v=4.3.0") format("woff"), url("../fonts/fontawesome-webfont.ttf?v=4.3.0") format("truetype"), url("../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular") format("svg"); font-weight: normal; @@ -86,9 +86,9 @@ } .fa-border { - padding: .2em .25em .15em; + padding: 0.2em 0.25em 0.15em; border: solid 0.08em #eeeeee; - border-radius: .1em; + border-radius: 0.1em; } .pull-right { @@ -100,11 +100,11 @@ } .fa.pull-left { - margin-right: .3em; + margin-right: 0.3em; } .fa.pull-right { - margin-left: .3em; + margin-left: 0.3em; } .fa-spin { @@ -2363,9 +2363,9 @@ /*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */ @font-face { - font-family: 'editormd-logo'; + font-family: "editormd-logo"; src: url("../fonts/editormd-logo.eot?-5y8q6h"); - src: url(".../fonts/editormd-logo.eot?#iefix-5y8q6h") format("embedded-opentype"), url("../fonts/editormd-logo.woff?-5y8q6h") format("woff"), url("../fonts/editormd-logo.ttf?-5y8q6h") format("truetype"), url("../fonts/editormd-logo.svg?-5y8q6h#icomoon") format("svg"); + src: url("../fonts/editormd-logo.eot?#iefix-5y8q6h") format("embedded-opentype"), url("../fonts/editormd-logo.woff?-5y8q6h") format("woff"), url("../fonts/editormd-logo.ttf?-5y8q6h") format("truetype"), url("../fonts/editormd-logo.svg?-5y8q6h#icomoon") format("svg"); font-weight: normal; font-style: normal; } @@ -2378,7 +2378,7 @@ .editormd-logo-6x, .editormd-logo-7x, .editormd-logo-8x { - font-family: 'editormd-logo'; + font-family: "editormd-logo"; speak: none; font-style: normal; font-weight: normal; @@ -2517,7 +2517,7 @@ line-height: normal; } -.markdown-body input[type="checkbox"] { +.markdown-body input[type=checkbox] { -moz-box-sizing: border-box; box-sizing: border-box; padding: 0; @@ -2659,7 +2659,7 @@ } .markdown-body .octicon-link:before { - content: '\f05c'; + content: "\f05c"; } .markdown-body > *:first-child { @@ -2898,7 +2898,7 @@ .markdown-body code:before, .markdown-body code:after { letter-spacing: -0.2em; - content: "\00a0"; + content: " "; } .markdown-body pre > code { @@ -2921,6 +2921,7 @@ overflow: auto; font-size: 85%; line-height: 1.45; + background-color: #f7f7f7; border-radius: 3px; } @@ -2941,6 +2942,7 @@ overflow: initial; line-height: inherit; word-wrap: normal; + background-color: transparent; border: 0; } @@ -3112,17 +3114,19 @@ .editormd-preview-container, .editormd-html-preview { text-align: left; font-size: 14px; + line-height: 1.6; padding: 20px; + overflow: auto; width: 100%; - line-height: 1.6em; + background-color: #fff; } .editormd-preview-container blockquote, .editormd-html-preview blockquote { - color: #2C3E50; - border-left: 4px solid #D6DBDF; + color: #666; + border-left: 4px solid #ddd; + padding-left: 20px; + margin-left: 0; font-size: 14px; - background: none repeat scroll 0 0 rgba(102,128,153,.05); - margin: 8px 0; - padding: 8px 16px; + font-style: italic; } .editormd-preview-container p code, .editormd-html-preview p code { margin-left: 5px; @@ -3146,6 +3150,7 @@ } .editormd-preview-container pre, .editormd-html-preview pre { border: 1px solid #ddd; + background: #f6f6f6; padding: 10px; -webkit-border-radius: 3px; -moz-border-radius: 3px; @@ -3187,129 +3192,77 @@ font-family: "YaHei Consolas Hybrid", Consolas, "Microsoft YaHei", "Malgun Gothic", "Segoe UI", Helvetica, Arial !important; } -.editormd-preview-container blockquote.info, .editormd-html-preview blockquote.info { - border-left-color: #5bc0de; - color: #5bc0de; - background-color: #f4f8fa -} -.editormd-preview-container blockquote.warning, .editormd-html-preview blockquote.warning { - background-color: #fcf8f2; - border-color: #f0ad4e; - color: #f0ad4e -} -.editormd-preview-container blockquote.danger, .editormd-html-preview blockquote.danger { - color: #d9534f; - background-color: #fdf7f7; - border-color: #d9534f -} -.editormd-preview-container blockquote.success, .editormd-html-preview blockquote.success { - background-color: #f3f8f3; - border-color: #50af51; - color: #50af51 -} - /*! Pretty printing styles. Used with prettify.js. */ /* SPAN elements with the classes below are added by prettyprint. */ .pln { color: #000; -} - -/* plain text */ +} /* plain text */ @media screen { .str { color: #080; - } - - /* string content */ + } /* string content */ .kwd { color: #008; - } - - /* a keyword */ + } /* a keyword */ .com { color: #800; - } - - /* a comment */ + } /* a comment */ .typ { color: #606; - } - - /* a type name */ + } /* a type name */ .lit { color: #066; - } - - /* a literal value */ + } /* a literal value */ /* punctuation, lisp open bracket, lisp close bracket */ .pun, .opn, .clo { color: #660; } - .tag { color: #008; - } - - /* a markup tag name */ + } /* a markup tag name */ .atn { color: #606; - } - - /* a markup attribute name */ + } /* a markup attribute name */ .atv { color: #080; - } - - /* a markup attribute value */ + } /* a markup attribute value */ .dec, .var { color: #606; - } - - /* a declaration; a variable name */ + } /* a declaration; a variable name */ .fun { color: red; - } - - /* a function name */ + } /* a function name */ } /* Use higher contrast and text-weight for printable form. */ @media print, projection { .str { color: #060; } - .kwd { color: #006; font-weight: bold; } - .com { color: #600; font-style: italic; } - .typ { color: #404; font-weight: bold; } - .lit { color: #044; } - .pun, .opn, .clo { color: #440; } - .tag { color: #006; font-weight: bold; } - .atn { color: #404; } - .atv { color: #060; } @@ -3324,9 +3277,7 @@ pre.prettyprint { ol.linenums { margin-top: 0; margin-bottom: 0; -} - -/* IE indents via margin-left */ +} /* IE indents via margin-left */ li.L0, li.L1, li.L2, @@ -3397,16 +3348,11 @@ li.L9 { -ms-border-radius: 4px; -o-border-radius: 4px; border-radius: 4px; - -webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* Webkit browsers */ - -moz-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* Firefox */ - -ms-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* IE9 */ - -o-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* Opera(Old) */ - box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* IE9+, News */ + -webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* Webkit browsers */ + -moz-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* Firefox */ + -ms-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* IE9 */ + -o-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* Opera(Old) */ + box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* IE9+, News */ } .editormd-preview-container .editormd-toc-menu > .markdown-toc > ul > li ul, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul > li ul { width: 100%; @@ -3424,12 +3370,9 @@ li.L9 { color: #666; padding: 6px 10px; display: block; - -webkit-transition: background-color 500ms ease-out; - /* Safari, Chrome */ - -moz-transition: background-color 500ms ease-out; - /* Firefox 4.0~16.0 */ - transition: background-color 500ms ease-out; - /* IE >9, FF >15, Opera >12.0 */ + -webkit-transition: background-color 500ms ease-out; /* Safari, Chrome */ + -moz-transition: background-color 500ms ease-out; /* Firefox 4.0~16.0 */ + transition: background-color 500ms ease-out; /* IE >9, FF >15, Opera >12.0 */ } .editormd-preview-container .editormd-toc-menu > .markdown-toc > ul > li a:hover, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul > li a:hover { background-color: #f6f6f6; @@ -3442,16 +3385,11 @@ li.L9 { top: 32px; left: 10%; display: none; - -webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* Webkit browsers */ - -moz-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* Firefox */ - -ms-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* IE9 */ - -o-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* Opera(Old) */ - box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); - /* IE9+, News */ + -webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* Webkit browsers */ + -moz-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* Firefox */ + -ms-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* IE9 */ + -o-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* Opera(Old) */ + box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); /* IE9+, News */ } .editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:before, .editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:after, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:before, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:after { pointer-events: pointer-events; @@ -3494,12 +3432,9 @@ li.L9 { padding: 5px 10px; border-radius: 4px; display: inline-block; - -webkit-transition: background-color 500ms ease-out; - /* Safari, Chrome */ - -moz-transition: background-color 500ms ease-out; - /* Firefox 4.0~16.0 */ - transition: background-color 500ms ease-out; - /* IE >9, FF >15, Opera >12.0 */ + -webkit-transition: background-color 500ms ease-out; /* Safari, Chrome */ + -moz-transition: background-color 500ms ease-out; /* Firefox 4.0~16.0 */ + transition: background-color 500ms ease-out; /* IE >9, FF >15, Opera >12.0 */ } .editormd-preview-container .editormd-toc-menu .toc-menu-btn:hover, .editormd-html-preview .editormd-toc-menu .toc-menu-btn:hover { background-color: #f6f6f6; @@ -3554,12 +3489,9 @@ hr.editormd-page-break { top: 25px; right: 35px; z-index: 19; - -webkit-transition: background-color 300ms ease-out; - /* Safari, Chrome */ - -moz-transition: background-color 300ms ease-out; - /* Firefox 4.0~16.0 */ - transition: background-color 300ms ease-out; - /* IE >9, FF >15, Opera >12.0 */ + -webkit-transition: background-color 300ms ease-out; /* Safari, Chrome */ + -moz-transition: background-color 300ms ease-out; /* Firefox 4.0~16.0 */ + transition: background-color 300ms ease-out; /* IE >9, FF >15, Opera >12.0 */ } .editormd-preview-close-btn:hover { background-color: #999; @@ -3568,4 +3500,4 @@ hr.editormd-page-break { .editormd-preview-active { width: 100%; padding: 40px; -} +} \ No newline at end of file diff --git a/static/editor.md/css/editormd.preview.min.css b/static/editor.md/css/editormd.preview.min.css index a0f22adae..5cc11d926 100644 --- a/static/editor.md/css/editormd.preview.min.css +++ b/static/editor.md/css/editormd.preview.min.css @@ -1,5 +1,5 @@ -/*! Editor.md v1.5.0 | editormd.preview.min.css | Open source online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-06-09 */ +/*! Editor.md v1.7.17 | editormd.preview.min.css | Open source online markdown editor. | MIT License | By: IBM Skills Network | https://github.com/ibm-skills-network/editor.md | 2024-03-27 */ @charset "UTF-8";/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 *//*! * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */.fa-ul,.markdown-body .task-list-item,li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}.fa-fw,.fa-li{text-align:center}.fa,.fa-stack{display:inline-block}.fa,.markdown-body .octicon{-moz-osx-font-smoothing:grayscale}@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.3.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0)format("embedded-opentype"),url(../fonts/fontawesome-webfont.woff2?v=4.3.0)format("woff2"),url(../fonts/fontawesome-webfont.woff?v=4.3.0)format("woff"),url(../fonts/fontawesome-webfont.ttf?v=4.3.0)format("truetype"),url(../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular)format("svg");font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;transform:translate(0,0)}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em}.fa-ul{padding-left:0;margin-left:2.14285714em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before,.fa-genderless:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */@font-face{font-family:editormd-logo;src:url(../fonts/editormd-logo.eot?-5y8q6h);src:url(.../fonts/editormd-logo.eot?#iefix-5y8q6h)format("embedded-opentype"),url(../fonts/editormd-logo.woff?-5y8q6h)format("woff"),url(../fonts/editormd-logo.ttf?-5y8q6h)format("truetype"),url(../fonts/editormd-logo.svg?-5y8q6h#icomoon)format("svg");font-weight:400;font-style:normal}.editormd-logo,.editormd-logo-1x,.editormd-logo-2x,.editormd-logo-3x,.editormd-logo-4x,.editormd-logo-5x,.editormd-logo-6x,.editormd-logo-7x,.editormd-logo-8x{font-family:editormd-logo;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;font-size:inherit;line-height:1;display:inline-block;text-rendering:auto;vertical-align:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.markdown-body hr:after,.markdown-body hr:before{content:"";display:table}.editormd-logo-1x:before,.editormd-logo-2x:before,.editormd-logo-3x:before,.editormd-logo-4x:before,.editormd-logo-5x:before,.editormd-logo-6x:before,.editormd-logo-7x:before,.editormd-logo-8x:before,.editormd-logo:before{content:"\e1987"}.editormd-logo-1x{font-size:1em}.editormd-logo-lg{font-size:1.2em}.editormd-logo-2x{font-size:2em}.editormd-logo-3x{font-size:3em}.editormd-logo-4x{font-size:4em}.editormd-logo-5x{font-size:5em}.editormd-logo-6x{font-size:6em}.editormd-logo-7x{font-size:7em}.editormd-logo-8x{font-size:8em}.editormd-logo-color{color:#2196F3}/*! github-markdown-css | The MIT License (MIT) | Copyright (c) Sindre Sorhus (sindresorhus.com) | https://github.com/sindresorhus/github-markdown-css */@font-face{font-family:octicons-anchor;src:url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSkdNhKFY3HF4lK69ExKslx7Xa+vPRVS43G98vG1DnkDMIBUgFN0MDXflU8tbaZOUkXUH0+U27RoRpOIyCKjbMCVejwypzJJG4jIwb43rfl6wbwanocrJm9XFYfskuVC5K/TPyczNU7b84CXcbxks1Un6H6tLH9vf2LRnn8Ax7A5WQAAAHicY2BkYGAA4teL1+yI57f5ysDNwgAC529f0kOmWRiYVgEpDgYmEA8AUzEKsQAAAHicY2BkYGB2+O/AEMPCAAJAkpEBFbAAADgKAe0EAAAiAAAAAAQAAAAEAAAAAAAAKgAqACoAiAAAeJxjYGRgYGBhsGFgYgABEMkFhAwM/xn0QAIAD6YBhwB4nI1Ty07cMBS9QwKlQapQW3VXySvEqDCZGbGaHULiIQ1FKgjWMxknMfLEke2A+IJu+wntrt/QbVf9gG75jK577Lg8K1qQPCfnnnt8fX1NRC/pmjrk/zprC+8D7tBy9DHgBXoWfQ44Av8t4Bj4Z8CLtBL9CniJluPXASf0Lm4CXqFX8Q84dOLnMB17N4c7tBo1AS/Qi+hTwBH4rwHHwN8DXqQ30XXAS7QaLwSc0Gn8NuAVWou/gFmnjLrEaEh9GmDdDGgL3B4JsrRPDU2hTOiMSuJUIdKQQayiAth69r6akSSFqIJuA19TrzCIaY8sIoxyrNIrL//pw7A2iMygkX5vDj+G+kuoLdX4GlGK/8Lnlz6/h9MpmoO9rafrz7ILXEHHaAx95s9lsI7AHNMBWEZHULnfAXwG9/ZqdzLI08iuwRloXE8kfhXYAvE23+23DU3t626rbs8/8adv+9DWknsHp3E17oCf+Z48rvEQNZ78paYM38qfk3v/u3l3u3GXN2Dmvmvpf1Srwk3pB/VSsp512bA/GG5i2WJ7wu430yQ5K3nFGiOqgtmSB5pJVSizwaacmUZzZhXLlZTq8qGGFY2YcSkqbth6aW1tRmlaCFs2016m5qn36SbJrqosG4uMV4aP2PHBmB3tjtmgN2izkGQyLWprekbIntJFing32a5rKWCN/SdSoga45EJykyQ7asZvHQ8PTm6cslIpwyeyjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==)format("woff")}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#333;overflow:hidden;font-family:"Microsoft YaHei",Helvetica,"Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Monaco,monospace,Tahoma,STXihei,"华文细黑",STHeiti,"Helvetica Neue","Droid Sans","wenquanyi micro hei",FreeSans,Arimo,Arial,SimSun,"宋体",Heiti,"黑体",sans-serif;font-size:16px;line-height:1.6;word-wrap:break-word}.markdown-body strong{font-weight:700}.markdown-body h1{margin:.67em 0}.markdown-body img{border:0}.markdown-body hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}.markdown-body input{color:inherit;margin:0;line-height:normal;font:13px/1.4 Helvetica,arial,freesans,clean,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"}.markdown-body html input[disabled]{cursor:default}.markdown-body input[type=checkbox]{-moz-box-sizing:border-box;box-sizing:border-box;padding:0}.markdown-body td,.markdown-body th{padding:0}.markdown-body *{-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body a{background:0 0;color:#4183c4;text-decoration:none}.markdown-body a:active,.markdown-body a:hover{outline:0;text-decoration:underline}.markdown-body hr{margin:15px 0;overflow:hidden;background:0 0;border:0;border-bottom:1px solid #ddd}.markdown-body h1,.markdown-body h2{padding-bottom:.3em;border-bottom:1px solid #eee}.markdown-body hr:after{clear:both}.markdown-body blockquote{margin:0}.markdown-body ol,.markdown-body ul{padding:0}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body code{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace}.markdown-body pre{font:12px Consolas,"Liberation Mono",Menlo,Courier,monospace;word-wrap:normal}.markdown-body .octicon{font:normal normal 16px octicons-anchor;line-height:1;display:inline-block;text-decoration:none;-webkit-font-smoothing:antialiased;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-body .octicon-link:before{content:'\f05c'}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdown-body .anchor{position:absolute;top:0;left:0;display:block;padding-right:6px;padding-left:30px;margin-left:-30px}.markdown-body .anchor:focus{outline:0}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{position:relative;margin-top:1em;margin-bottom:16px;font-weight:700;line-height:1.4}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{display:none;color:#000;vertical-align:middle}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{padding-left:8px;margin-left:-30px;text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{display:inline-block}.markdown-body h1{font-size:2.25em;line-height:1.2}.markdown-body h1 .anchor{line-height:1}.markdown-body h2{font-size:1.75em;line-height:1.225}.markdown-body h2 .anchor{line-height:1}.markdown-body h3{font-size:1.5em;line-height:1.43}.markdown-body h3 .anchor,.markdown-body h4 .anchor{line-height:1.2}.markdown-body h4{font-size:1.25em}.markdown-body h5 .anchor,.markdown-body h6 .anchor{line-height:1.1}.markdown-body h5{font-size:1em}.markdown-body h6{font-size:1em;color:#777}.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:16px}.markdown-body ol,.markdown-body ul{padding-left:2em}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:16px}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:700}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body blockquote{padding:0 15px;color:#777;border-left:4px solid #ddd}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body table{border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}.markdown-body table th{font-weight:700}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #ddd}.markdown-body table tr{background-color:#fff;border-top:1px solid #ccc}.markdown-body table tr:nth-child(2n){background-color:#f8f8f8}.markdown-body img{max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body code{padding:.2em 0;margin:0;font-size:85%;background-color:rgba(0,0,0,.04);border-radius:3px}.markdown-body code:after,.markdown-body code:before{letter-spacing:-.2em;content:"\00a0"}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:0 0;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;background-color:#f7f7f7;border-radius:3px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body pre code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body pre code:after,.markdown-body pre code:before{content:normal}.markdown-body .pl-c{color:#969896}.markdown-body .pl-c1,.markdown-body .pl-mdh,.markdown-body .pl-mm,.markdown-body .pl-mp,.markdown-body .pl-mr,.markdown-body .pl-s1 .pl-v,.markdown-body .pl-s3,.markdown-body .pl-sc,.markdown-body .pl-sv{color:#0086b3}.markdown-body .pl-e,.markdown-body .pl-en{color:#795da3}.markdown-body .pl-s1 .pl-s2,.markdown-body .pl-smi,.markdown-body .pl-smp,.markdown-body .pl-stj,.markdown-body .pl-vo,.markdown-body .pl-vpf{color:#333}.markdown-body .pl-ent{color:#63a35c}.markdown-body .pl-k,.markdown-body .pl-s,.markdown-body .pl-st{color:#a71d5d}.markdown-body .pl-pds,.markdown-body .pl-s1,.markdown-body .pl-s1 .pl-pse .pl-s2,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sra,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-src{color:#df5000}.markdown-body .pl-mo,.markdown-body .pl-v{color:#1d3e81}.markdown-body .pl-id{color:#b52a1d}.markdown-body .pl-ii{background-color:#b52a1d;color:#f8f8f8}.markdown-body .pl-sr .pl-cce{color:#63a35c;font-weight:700}.markdown-body .pl-ml{color:#693a17}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{color:#1d3e81;font-weight:700}.markdown-body .pl-mq{color:teal}.markdown-body .pl-mi{color:#333;font-style:italic}.markdown-body .pl-mb{color:#333;font-weight:700}.markdown-body .pl-md,.markdown-body .pl-mdhf{background-color:#ffecec;color:#bd2c00}.markdown-body .pl-mdht,.markdown-body .pl-mi1{background-color:#eaffea;color:#55a532}.markdown-body .pl-mdr{color:#795da3;font-weight:700}.markdown-body kbd{display:inline-block;padding:3px 5px;font:11px Consolas,"Liberation Mono",Menlo,Courier,monospace;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:1px solid #ccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.markdown-body .task-list-item+.task-list-item{margin-top:3px}.markdown-body .task-list-item input{float:left;margin:.3em 0 .25em -1.6em;vertical-align:middle}.markdown-body :checked+.radio-label{z-index:1;position:relative;border-color:#4183c4}.editormd-html-preview,.editormd-preview-container{text-align:left;font-size:14px;line-height:1.6;padding:20px;overflow:auto;width:100%;background-color:#fff}.editormd-html-preview blockquote,.editormd-preview-container blockquote{color:#666;border-left:4px solid #ddd;padding-left:20px;margin-left:0;font-size:14px;font-style:italic}.editormd-html-preview p code,.editormd-preview-container p code{margin-left:5px;margin-right:4px}.editormd-html-preview abbr,.editormd-preview-container abbr{background:#ffd}.editormd-html-preview hr,.editormd-preview-container hr{height:1px;border:none;border-top:1px solid #ddd;background:0 0}.editormd-html-preview code,.editormd-preview-container code{border:1px solid #ddd;background:#f6f6f6;padding:3px;border-radius:3px;font-size:14px}.editormd-html-preview pre,.editormd-preview-container pre{border:1px solid #ddd;background:#f6f6f6;padding:10px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px}.editormd-html-preview pre code,.editormd-preview-container pre code{padding:0}.editormd-html-preview code,.editormd-html-preview kbd,.editormd-html-preview pre,.editormd-preview-container code,.editormd-preview-container kbd,.editormd-preview-container pre{font-family:"YaHei Consolas Hybrid",Consolas,"Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,monospace,monospace}.editormd-html-preview table thead tr,.editormd-preview-container table thead tr{background-color:#F8F8F8}.editormd-html-preview p.editormd-tex,.editormd-preview-container p.editormd-tex{text-align:center}.editormd-html-preview span.editormd-tex,.editormd-preview-container span.editormd-tex{margin:0 5px}.editormd-html-preview .emoji,.editormd-preview-container .emoji{width:24px;height:24px}.editormd-html-preview .katex,.editormd-preview-container .katex{font-size:1.4em}.editormd-html-preview .flowchart,.editormd-html-preview .sequence-diagram,.editormd-preview-container .flowchart,.editormd-preview-container .sequence-diagram{margin:0 auto;text-align:center}.editormd-html-preview .flowchart svg,.editormd-html-preview .sequence-diagram svg,.editormd-preview-container .flowchart svg,.editormd-preview-container .sequence-diagram svg{margin:0 auto}.editormd-html-preview .flowchart text,.editormd-html-preview .sequence-diagram text,.editormd-preview-container .flowchart text,.editormd-preview-container .sequence-diagram text{font-size:15px!important;font-family:"YaHei Consolas Hybrid",Consolas,"Microsoft YaHei","Malgun Gothic","Segoe UI",Helvetica,Arial!important}/*! Pretty printing styles. Used with prettify.js. */.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.clo,.opn,.pun{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.kwd,.tag,.typ{font-weight:700}.str{color:#060}.kwd{color:#006}.com{color:#600;font-style:italic}.typ{color:#404}.lit{color:#044}.clo,.opn,.pun{color:#440}.tag{color:#006}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}.editormd-html-preview pre.prettyprint,.editormd-preview-container pre.prettyprint{padding:10px;border:1px solid #ddd;white-space:pre-wrap;word-wrap:break-word}.editormd-html-preview ol.linenums,.editormd-preview-container ol.linenums{color:#999;padding-left:2.5em}.editormd-html-preview ol.linenums li,.editormd-preview-container ol.linenums li{list-style-type:decimal}.editormd-html-preview ol.linenums li code,.editormd-preview-container ol.linenums li code{border:none;background:0 0;padding:0}.editormd-html-preview .editormd-toc-menu,.editormd-preview-container .editormd-toc-menu{margin:8px 0 12px;display:inline-block}.editormd-html-preview .editormd-toc-menu>.markdown-toc,.editormd-preview-container .editormd-toc-menu>.markdown-toc{position:relative;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;border:1px solid #ddd;display:inline-block;font-size:1em}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul{width:160%;min-width:180px;position:absolute;left:-1px;top:-2px;z-index:100;padding:0 10px 10px;display:none;background:#fff;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);-moz-box-shadow:0 3px 5px rgba(0,0,0,.2);-ms-box-shadow:0 3px 5px rgba(0,0,0,.2);-o-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li ul{width:100%;min-width:180px;border:1px solid #ddd;display:none;background:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.editormd-html-preview .editormd-toc-menu .toc-menu-btn:hover,.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li a:hover,.editormd-preview-container .editormd-toc-menu .toc-menu-btn:hover,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li a:hover{background-color:#f6f6f6}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li a,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li a{color:#666;padding:6px 10px;display:block;-webkit-transition:background-color 500ms ease-out;-moz-transition:background-color 500ms ease-out;transition:background-color 500ms ease-out}.editormd-html-preview .editormd-toc-menu>.markdown-toc li,.editormd-preview-container .editormd-toc-menu>.markdown-toc li{position:relative}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul{position:absolute;top:32px;left:10%;display:none;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);-moz-box-shadow:0 3px 5px rgba(0,0,0,.2);-ms-box-shadow:0 3px 5px rgba(0,0,0,.2);-o-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:before,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:before{pointer-events:pointer-events;position:absolute;left:15px;top:-6px;display:block;content:"";width:0;height:0;border:6px solid transparent;border-width:0 6px 6px;z-index:10}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:before,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:before{border-bottom-color:#ccc}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:after{border-bottom-color:#fff;top:-5px}.editormd-html-preview .editormd-toc-menu ul,.editormd-preview-container .editormd-toc-menu ul{list-style:none}.editormd-html-preview .editormd-toc-menu a,.editormd-preview-container .editormd-toc-menu a{text-decoration:none}.editormd-html-preview .editormd-toc-menu h1,.editormd-preview-container .editormd-toc-menu h1{font-size:16px;padding:5px 0 10px 10px;line-height:1;border-bottom:1px solid #eee}.editormd-html-preview .editormd-toc-menu h1 .fa,.editormd-preview-container .editormd-toc-menu h1 .fa{padding-left:10px}.editormd-html-preview .editormd-toc-menu .toc-menu-btn,.editormd-preview-container .editormd-toc-menu .toc-menu-btn{color:#666;min-width:180px;padding:5px 10px;border-radius:4px;display:inline-block;-webkit-transition:background-color 500ms ease-out;-moz-transition:background-color 500ms ease-out;transition:background-color 500ms ease-out}.editormd-html-preview .editormd-toc-menu .toc-menu-btn .fa,.editormd-preview-container .editormd-toc-menu .toc-menu-btn .fa{float:right;padding:3px 0 0 10px;font-size:1.3em}.markdown-body .editormd-toc-menu ul{padding-left:0}.markdown-body .highlight pre,.markdown-body pre{line-height:1.6}hr.editormd-page-break{border:1px dotted #ccc;font-size:0;height:2px}@media only print{hr.editormd-page-break{background:0 0;border:none;height:0}}.editormd-html-preview textarea{display:none}.editormd-html-preview hr.editormd-page-break{background:0 0;border:none;height:0}.editormd-preview-close-btn{color:#fff;padding:4px 6px;font-size:18px;-webkit-border-radius:500px;-moz-border-radius:500px;-ms-border-radius:500px;-o-border-radius:500px;border-radius:500px;display:none;background-color:#ccc;position:absolute;top:25px;right:35px;z-index:19;-webkit-transition:background-color 300ms ease-out;-moz-transition:background-color 300ms ease-out;transition:background-color 300ms ease-out}.editormd-preview-close-btn:hover{background-color:#999}.editormd-preview-active{width:100%;padding:40px} \ No newline at end of file + */@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.3.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0) format("embedded-opentype"),url(../fonts/fontawesome-webfont.woff2?v=4.3.0) format("woff2"),url(../fonts/fontawesome-webfont.woff?v=4.3.0) format("woff"),url(../fonts/fontawesome-webfont.ttf?v=4.3.0) format("truetype"),url(../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transform:translate(0,0)}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before,.fa-genderless:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */@font-face{font-family:editormd-logo;src:url(../fonts/editormd-logo.eot?-5y8q6h);src:url(../fonts/editormd-logo.eot?#iefix-5y8q6h) format("embedded-opentype"),url(../fonts/editormd-logo.woff?-5y8q6h) format("woff"),url(../fonts/editormd-logo.ttf?-5y8q6h) format("truetype"),url(../fonts/editormd-logo.svg?-5y8q6h#icomoon) format("svg");font-weight:400;font-style:normal}.editormd-logo,.editormd-logo-1x,.editormd-logo-2x,.editormd-logo-3x,.editormd-logo-4x,.editormd-logo-5x,.editormd-logo-6x,.editormd-logo-7x,.editormd-logo-8x{font-family:editormd-logo;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;font-size:inherit;line-height:1;display:inline-block;text-rendering:auto;vertical-align:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.editormd-logo-1x:before,.editormd-logo-2x:before,.editormd-logo-3x:before,.editormd-logo-4x:before,.editormd-logo-5x:before,.editormd-logo-6x:before,.editormd-logo-7x:before,.editormd-logo-8x:before,.editormd-logo:before{content:"󡦇"}.editormd-logo-1x{font-size:1em}.editormd-logo-lg{font-size:1.2em}.editormd-logo-2x{font-size:2em}.editormd-logo-3x{font-size:3em}.editormd-logo-4x{font-size:4em}.editormd-logo-5x{font-size:5em}.editormd-logo-6x{font-size:6em}.editormd-logo-7x{font-size:7em}.editormd-logo-8x{font-size:8em}.editormd-logo-color{color:#2196f3}/*! github-markdown-css | The MIT License (MIT) | Copyright (c) Sindre Sorhus (sindresorhus.com) | https://github.com/sindresorhus/github-markdown-css */@font-face{font-family:octicons-anchor;src:url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSkdNhKFY3HF4lK69ExKslx7Xa+vPRVS43G98vG1DnkDMIBUgFN0MDXflU8tbaZOUkXUH0+U27RoRpOIyCKjbMCVejwypzJJG4jIwb43rfl6wbwanocrJm9XFYfskuVC5K/TPyczNU7b84CXcbxks1Un6H6tLH9vf2LRnn8Ax7A5WQAAAHicY2BkYGAA4teL1+yI57f5ysDNwgAC529f0kOmWRiYVgEpDgYmEA8AUzEKsQAAAHicY2BkYGB2+O/AEMPCAAJAkpEBFbAAADgKAe0EAAAiAAAAAAQAAAAEAAAAAAAAKgAqACoAiAAAeJxjYGRgYGBhsGFgYgABEMkFhAwM/xn0QAIAD6YBhwB4nI1Ty07cMBS9QwKlQapQW3VXySvEqDCZGbGaHULiIQ1FKgjWMxknMfLEke2A+IJu+wntrt/QbVf9gG75jK577Lg8K1qQPCfnnnt8fX1NRC/pmjrk/zprC+8D7tBy9DHgBXoWfQ44Av8t4Bj4Z8CLtBL9CniJluPXASf0Lm4CXqFX8Q84dOLnMB17N4c7tBo1AS/Qi+hTwBH4rwHHwN8DXqQ30XXAS7QaLwSc0Gn8NuAVWou/gFmnjLrEaEh9GmDdDGgL3B4JsrRPDU2hTOiMSuJUIdKQQayiAth69r6akSSFqIJuA19TrzCIaY8sIoxyrNIrL//pw7A2iMygkX5vDj+G+kuoLdX4GlGK/8Lnlz6/h9MpmoO9rafrz7ILXEHHaAx95s9lsI7AHNMBWEZHULnfAXwG9/ZqdzLI08iuwRloXE8kfhXYAvE23+23DU3t626rbs8/8adv+9DWknsHp3E17oCf+Z48rvEQNZ78paYM38qfk3v/u3l3u3GXN2Dmvmvpf1Srwk3pB/VSsp512bA/GG5i2WJ7wu430yQ5K3nFGiOqgtmSB5pJVSizwaacmUZzZhXLlZTq8qGGFY2YcSkqbth6aW1tRmlaCFs2016m5qn36SbJrqosG4uMV4aP2PHBmB3tjtmgN2izkGQyLWprekbIntJFing32a5rKWCN/SdSoga45EJykyQ7asZvHQ8PTm6cslIpwyeyjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==) format("woff")}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#333;overflow:hidden;font-family:"Microsoft YaHei",Helvetica,"Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Monaco,monospace,Tahoma,STXihei,"华文细黑",STHeiti,"Helvetica Neue","Droid Sans","wenquanyi micro hei",FreeSans,Arimo,Arial,SimSun,"宋体",Heiti,"黑体",sans-serif;font-size:16px;line-height:1.6;word-wrap:break-word}.markdown-body a{background:0 0}.markdown-body a:active,.markdown-body a:hover{outline:0}.markdown-body strong{font-weight:700}.markdown-body h1{font-size:2em;margin:.67em 0}.markdown-body img{border:0}.markdown-body hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}.markdown-body pre{overflow:auto}.markdown-body code,.markdown-body kbd,.markdown-body pre{font-family:"Meiryo UI","YaHei Consolas Hybrid",Consolas,"Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,monospace,monospace;font-size:1em}.markdown-body input{color:inherit;font:inherit;margin:0}.markdown-body html input[disabled]{cursor:default}.markdown-body input{line-height:normal}.markdown-body input[type=checkbox]{-moz-box-sizing:border-box;box-sizing:border-box;padding:0}.markdown-body table{border-collapse:collapse;border-spacing:0}.markdown-body td,.markdown-body th{padding:0}.markdown-body *{-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body input{font:13px/1.4 Helvetica,arial,freesans,clean,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"}.markdown-body a{color:#4183c4;text-decoration:none}.markdown-body a:active,.markdown-body a:hover{text-decoration:underline}.markdown-body hr{height:0;margin:15px 0;overflow:hidden;background:0 0;border:0;border-bottom:1px solid #ddd}.markdown-body hr:before{display:table;content:""}.markdown-body hr:after{display:table;clear:both;content:""}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:15px;margin-bottom:15px;line-height:1.1}.markdown-body h1{font-size:30px}.markdown-body h2{font-size:21px}.markdown-body h3{font-size:16px}.markdown-body h4{font-size:14px}.markdown-body h5{font-size:12px}.markdown-body h6{font-size:11px}.markdown-body blockquote{margin:0}.markdown-body ol,.markdown-body ul{padding:0;margin-top:0;margin-bottom:0}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body code{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0;font:12px Consolas,"Liberation Mono",Menlo,Courier,monospace}.markdown-body .octicon{font:normal normal 16px octicons-anchor;line-height:1;display:inline-block;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-body .octicon-link:before{content:"\f05c"}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdown-body .anchor{position:absolute;top:0;left:0;display:block;padding-right:6px;padding-left:30px;margin-left:-30px}.markdown-body .anchor:focus{outline:0}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{position:relative;margin-top:1em;margin-bottom:16px;font-weight:700;line-height:1.4}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{display:none;color:#000;vertical-align:middle}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{padding-left:8px;margin-left:-30px;text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{display:inline-block}.markdown-body h1{padding-bottom:.3em;font-size:2.25em;line-height:1.2;border-bottom:1px solid #eee}.markdown-body h1 .anchor{line-height:1}.markdown-body h2{padding-bottom:.3em;font-size:1.75em;line-height:1.225;border-bottom:1px solid #eee}.markdown-body h2 .anchor{line-height:1}.markdown-body h3{font-size:1.5em;line-height:1.43}.markdown-body h3 .anchor{line-height:1.2}.markdown-body h4{font-size:1.25em}.markdown-body h4 .anchor{line-height:1.2}.markdown-body h5{font-size:1em}.markdown-body h5 .anchor{line-height:1.1}.markdown-body h6{font-size:1em;color:#777}.markdown-body h6 .anchor{line-height:1.1}.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:16px}.markdown-body ol,.markdown-body ul{padding-left:2em}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:16px}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:700}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body blockquote{padding:0 15px;color:#777;border-left:4px solid #ddd}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body table{display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}.markdown-body table th{font-weight:700}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #ddd}.markdown-body table tr{background-color:#fff;border-top:1px solid #ccc}.markdown-body table tr:nth-child(2n){background-color:#f8f8f8}.markdown-body img{max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body code{padding:0;padding-top:.2em;padding-bottom:.2em;margin:0;font-size:85%;background-color:rgba(0,0,0,.04);border-radius:3px}.markdown-body code:after,.markdown-body code:before{letter-spacing:-.2em;content:" "}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:0 0;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f7f7f7;border-radius:3px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body pre{word-wrap:normal}.markdown-body pre code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body pre code:after,.markdown-body pre code:before{content:normal}.markdown-body kbd{display:inline-block;padding:3px 5px;font-size:11px;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:solid 1px #ccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.markdown-body .pl-c{color:#969896}.markdown-body .pl-c1,.markdown-body .pl-mdh,.markdown-body .pl-mm,.markdown-body .pl-mp,.markdown-body .pl-mr,.markdown-body .pl-s1 .pl-v,.markdown-body .pl-s3,.markdown-body .pl-sc,.markdown-body .pl-sv{color:#0086b3}.markdown-body .pl-e,.markdown-body .pl-en{color:#795da3}.markdown-body .pl-s1 .pl-s2,.markdown-body .pl-smi,.markdown-body .pl-smp,.markdown-body .pl-stj,.markdown-body .pl-vo,.markdown-body .pl-vpf{color:#333}.markdown-body .pl-ent{color:#63a35c}.markdown-body .pl-k,.markdown-body .pl-s,.markdown-body .pl-st{color:#a71d5d}.markdown-body .pl-pds,.markdown-body .pl-s1,.markdown-body .pl-s1 .pl-pse .pl-s2,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sra,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-src{color:#df5000}.markdown-body .pl-mo,.markdown-body .pl-v{color:#1d3e81}.markdown-body .pl-id{color:#b52a1d}.markdown-body .pl-ii{background-color:#b52a1d;color:#f8f8f8}.markdown-body .pl-sr .pl-cce{color:#63a35c;font-weight:700}.markdown-body .pl-ml{color:#693a17}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{color:#1d3e81;font-weight:700}.markdown-body .pl-mq{color:teal}.markdown-body .pl-mi{color:#333;font-style:italic}.markdown-body .pl-mb{color:#333;font-weight:700}.markdown-body .pl-md,.markdown-body .pl-mdhf{background-color:#ffecec;color:#bd2c00}.markdown-body .pl-mdht,.markdown-body .pl-mi1{background-color:#eaffea;color:#55a532}.markdown-body .pl-mdr{color:#795da3;font-weight:700}.markdown-body kbd{display:inline-block;padding:3px 5px;font:11px Consolas,"Liberation Mono",Menlo,Courier,monospace;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:solid 1px #ccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item+.task-list-item{margin-top:3px}.markdown-body .task-list-item input{float:left;margin:.3em 0 .25em -1.6em;vertical-align:middle}.markdown-body :checked+.radio-label{z-index:1;position:relative;border-color:#4183c4}.editormd-html-preview,.editormd-preview-container{text-align:left;font-size:14px;line-height:1.6;padding:20px;overflow:auto;width:100%;background-color:#fff}.editormd-html-preview blockquote,.editormd-preview-container blockquote{color:#666;border-left:4px solid #ddd;padding-left:20px;margin-left:0;font-size:14px;font-style:italic}.editormd-html-preview p code,.editormd-preview-container p code{margin-left:5px;margin-right:4px}.editormd-html-preview abbr,.editormd-preview-container abbr{background:#ffd}.editormd-html-preview hr,.editormd-preview-container hr{height:1px;border:none;border-top:1px solid #ddd;background:0 0}.editormd-html-preview code,.editormd-preview-container code{border:1px solid #ddd;background:#f6f6f6;padding:3px;border-radius:3px;font-size:14px}.editormd-html-preview pre,.editormd-preview-container pre{border:1px solid #ddd;background:#f6f6f6;padding:10px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px}.editormd-html-preview pre code,.editormd-preview-container pre code{padding:0}.editormd-html-preview code,.editormd-html-preview kbd,.editormd-html-preview pre,.editormd-preview-container code,.editormd-preview-container kbd,.editormd-preview-container pre{font-family:"YaHei Consolas Hybrid",Consolas,"Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,monospace,monospace}.editormd-html-preview table thead tr,.editormd-preview-container table thead tr{background-color:#f8f8f8}.editormd-html-preview p.editormd-tex,.editormd-preview-container p.editormd-tex{text-align:center}.editormd-html-preview span.editormd-tex,.editormd-preview-container span.editormd-tex{margin:0 5px}.editormd-html-preview .emoji,.editormd-preview-container .emoji{width:24px;height:24px}.editormd-html-preview .katex,.editormd-preview-container .katex{font-size:1.4em}.editormd-html-preview .flowchart,.editormd-html-preview .sequence-diagram,.editormd-preview-container .flowchart,.editormd-preview-container .sequence-diagram{margin:0 auto;text-align:center}.editormd-html-preview .flowchart svg,.editormd-html-preview .sequence-diagram svg,.editormd-preview-container .flowchart svg,.editormd-preview-container .sequence-diagram svg{margin:0 auto}.editormd-html-preview .flowchart text,.editormd-html-preview .sequence-diagram text,.editormd-preview-container .flowchart text,.editormd-preview-container .sequence-diagram text{font-size:15px!important;font-family:"YaHei Consolas Hybrid",Consolas,"Microsoft YaHei","Malgun Gothic","Segoe UI",Helvetica,Arial!important}/*! Pretty printing styles. Used with prettify.js. */.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.clo,.opn,.pun{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:700}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:700}.lit{color:#044}.clo,.opn,.pun{color:#440}.tag{color:#006;font-weight:700}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}.editormd-html-preview pre.prettyprint,.editormd-preview-container pre.prettyprint{padding:10px;border:1px solid #ddd;white-space:pre-wrap;word-wrap:break-word}.editormd-html-preview ol.linenums,.editormd-preview-container ol.linenums{color:#999;padding-left:2.5em}.editormd-html-preview ol.linenums li,.editormd-preview-container ol.linenums li{list-style-type:decimal}.editormd-html-preview ol.linenums li code,.editormd-preview-container ol.linenums li code{border:none;background:0 0;padding:0}.editormd-html-preview .editormd-toc-menu,.editormd-preview-container .editormd-toc-menu{margin:8px 0 12px 0;display:inline-block}.editormd-html-preview .editormd-toc-menu>.markdown-toc,.editormd-preview-container .editormd-toc-menu>.markdown-toc{position:relative;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;border:1px solid #ddd;display:inline-block;font-size:1em}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul{width:160%;min-width:180px;position:absolute;left:-1px;top:-2px;z-index:100;padding:0 10px 10px;display:none;background:#fff;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);-moz-box-shadow:0 3px 5px rgba(0,0,0,.2);-ms-box-shadow:0 3px 5px rgba(0,0,0,.2);-o-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li ul{width:100%;min-width:180px;border:1px solid #ddd;display:none;background:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li a,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li a{color:#666;padding:6px 10px;display:block;-webkit-transition:background-color .5s ease-out;-moz-transition:background-color .5s ease-out;transition:background-color .5s ease-out}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li a:hover,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li a:hover{background-color:#f6f6f6}.editormd-html-preview .editormd-toc-menu>.markdown-toc li,.editormd-preview-container .editormd-toc-menu>.markdown-toc li{position:relative}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul{position:absolute;top:32px;left:10%;display:none;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);-moz-box-shadow:0 3px 5px rgba(0,0,0,.2);-ms-box-shadow:0 3px 5px rgba(0,0,0,.2);-o-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:before,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:before{pointer-events:pointer-events;position:absolute;left:15px;top:-6px;display:block;content:"";width:0;height:0;border:6px solid transparent;border-width:0 6px 6px;z-index:10}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:before,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:before{border-bottom-color:#ccc}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:after{border-bottom-color:#fff;top:-5px}.editormd-html-preview .editormd-toc-menu ul,.editormd-preview-container .editormd-toc-menu ul{list-style:none}.editormd-html-preview .editormd-toc-menu a,.editormd-preview-container .editormd-toc-menu a{text-decoration:none}.editormd-html-preview .editormd-toc-menu h1,.editormd-preview-container .editormd-toc-menu h1{font-size:16px;padding:5px 0 10px 10px;line-height:1;border-bottom:1px solid #eee}.editormd-html-preview .editormd-toc-menu h1 .fa,.editormd-preview-container .editormd-toc-menu h1 .fa{padding-left:10px}.editormd-html-preview .editormd-toc-menu .toc-menu-btn,.editormd-preview-container .editormd-toc-menu .toc-menu-btn{color:#666;min-width:180px;padding:5px 10px;border-radius:4px;display:inline-block;-webkit-transition:background-color .5s ease-out;-moz-transition:background-color .5s ease-out;transition:background-color .5s ease-out}.editormd-html-preview .editormd-toc-menu .toc-menu-btn:hover,.editormd-preview-container .editormd-toc-menu .toc-menu-btn:hover{background-color:#f6f6f6}.editormd-html-preview .editormd-toc-menu .toc-menu-btn .fa,.editormd-preview-container .editormd-toc-menu .toc-menu-btn .fa{float:right;padding:3px 0 0 10px;font-size:1.3em}.markdown-body .editormd-toc-menu ul{padding-left:0}.markdown-body .highlight pre,.markdown-body pre{line-height:1.6}hr.editormd-page-break{border:1px dotted #ccc;font-size:0;height:2px}@media only print{hr.editormd-page-break{background:0 0;border:none;height:0}}.editormd-html-preview textarea{display:none}.editormd-html-preview hr.editormd-page-break{background:0 0;border:none;height:0}.editormd-preview-close-btn{color:#fff;padding:4px 6px;font-size:18px;-webkit-border-radius:500px;-moz-border-radius:500px;-ms-border-radius:500px;-o-border-radius:500px;border-radius:500px;display:none;background-color:#ccc;position:absolute;top:25px;right:35px;z-index:19;-webkit-transition:background-color .3s ease-out;-moz-transition:background-color .3s ease-out;transition:background-color .3s ease-out}.editormd-preview-close-btn:hover{background-color:#999}.editormd-preview-active{width:100%;padding:40px} \ No newline at end of file diff --git a/static/editor.md/editormd.amd.js b/static/editor.md/editormd.amd.js index 0eb6b6038..d11e69243 100644 --- a/static/editor.md/editormd.amd.js +++ b/static/editor.md/editormd.amd.js @@ -2,20 +2,32 @@ * Editor.md * * @file editormd.amd.js - * @version v1.5.0 + * @version v1.7.17 * @description Open source online markdown editor. * @license MIT License - * @author Pandao - * {@link https://github.com/pandao/editor.md} - * @updateTime 2015-06-09 + * @author IBM Skills Network + * {@link https://github.com/ibm-skills-network/editor.md} + * @updateTime 2024-03-27 + */ + +/* + * Editor.md + * + * @file editormd.js + * @version v1.7.17 + * @description Open source online markdown editor. + * @license MIT License + * @author IBM Skills Network + * {@link https://github.com/ibm-skills-network/editor.md} + * @updateTime 2024-03-27 */ ;(function(factory) { "use strict"; - + // CommonJS/Node.js if (typeof require === "function" && typeof exports === "object" && typeof module === "object") - { + { module.exports = factory; } else if (typeof define === "function") // AMD/CMD/Sea.js @@ -26,10 +38,7 @@ var cmAddonPath = "codemirror/addon/"; var codeMirrorModules = [ - "jquery", "marked", - //"prettify", - "highlight/highlight", - "mermaid/mermaid", + "jquery", "marked", "prettify", "katex", "raphael", "underscore", "flowchart", "jqueryflowchart", "sequenceDiagram", "codemirror/lib/codemirror", @@ -87,18 +96,18 @@ ]; define(codeMirrorModules, factory); - } - else + } + else { define(["jquery"], factory); // for Sea.js } - } + } else - { + { window.editormd = factory(); } - -}(function() { + +}(function() { if (typeof define == "function" && define.amd) { $ = arguments[0]; @@ -110,70 +119,72 @@ flowchart = arguments[6]; CodeMirror = arguments[9]; } - + "use strict"; - + var $ = (typeof (jQuery) !== "undefined") ? jQuery : Zepto; if (typeof ($) === "undefined") { return ; } - + /** * editormd - * + * * @param {String} id 编辑器的ID * @param {Object} options 配置选项 Key/Value * @returns {Object} editormd 返回editormd对象 */ - - var editormd = function (id, options) { - return new editormd.fn.init(id, options); + + var editormd = function (id,author_ide_version, options) { + return new editormd.fn.init(id,author_ide_version, options); }; - + editormd.title = editormd.$name = "Editor.md"; - editormd.version = "1.5.0"; + editormd.version = "1.7.17"; editormd.homePage = "https://pandao.github.io/editor.md/"; editormd.classPrefix = "editormd-"; - + editormd.toolbarModes = { full : [ - "undo", "redo", "|", - "bold", "del", "italic", "quote", "ucwords", "uppercase", "lowercase", "|", - "h1", "h2", "h3", "h4", "h5", "h6", "|", + "undo", "redo", "|", + "bold", "del", "italic", "quote", "ucwords", "uppercase", "lowercase", "|", + "h1", "h2", "h3", "h4", "h5", "h6", "|", "list-ul", "list-ol", "hr", "|", "link", "reference-link", "image", "code", "preformatted-text", "code-block", "table", "datetime", "emoji", "html-entities", "pagebreak", "|", "goto-line", "watch", "preview", "fullscreen", "clear", "search", "|", - "help", "info" + "help", "changetheme", "info" ], simple : [ - "undo", "redo", "|", - "bold", "del", "italic", "quote", "uppercase", "lowercase", "|", - "h1", "h2", "h3", "h4", "h5", "h6", "|", + "undo", "redo", "|", + "bold", "del", "italic", "quote", "uppercase", "lowercase", "|", + "h1", "h2", "h3", "h4", "h5", "h6", "|", "list-ul", "list-ol", "hr", "|", "watch", "preview", "fullscreen", "|", - "help", "info" + "help", "changetheme", "info" ], mini : [ "undo", "redo", "|", "watch", "preview", "|", - "help", "info" + "help", "changetheme", "info" ] }; - + editormd.defaults = { + debug : false, mode : "gfm", //gfm or markdown name : "", // Form element name value : "", // value for CodeMirror, if mode not gfm/markdown theme : "", // Editor.md self themes, before v1.5.0 is CodeMirror theme, default empty editorTheme : "default", // Editor area, this is CodeMirror theme at v1.5.0 previewTheme : "", // Preview area theme, default empty - markdown : "", // Markdown source code + markdown : undefined, // Markdown source code appendMarkdown : "", // if in init textarea value not empty, append markdown to textarea width : "100%", height : "100%", path : "./lib/", // Dependents module file directory pluginPath : "", // If this empty, default use settings.path + "../plugins/" + customPluginPath : "", delay : 300, // Delay parse markdown to html, Uint : ms autoLoadModules : true, // Automatic load dependent module files watch : true, @@ -205,50 +216,55 @@ fontSize : "13px", saveHTMLToTextarea : false, disabledKeyMaps : [], - + onload : function() {}, onresize : function() {}, onchange : function() {}, onwatch : null, onunwatch : null, onpreviewing : function() {}, + onCmChange : null, + fixCodeBlocks : function() {}, // run after prettyprint(function to prettify code blocks) finished onpreviewed : function() {}, onfullscreen : function() {}, onfullscreenExit : function() {}, onscroll : function() {}, onpreviewscroll : function() {}, - + imageUpload : false, imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp"], imageUploadURL : "", crossDomainUpload : false, uploadCallbackURL : "", - + toc : true, // Table of contents tocm : false, // Using [TOCM], auto create ToC dropdown menu tocTitle : "", // for ToC dropdown menu btn tocDropdown : false, tocContainer : "", tocStartLevel : 1, // Said from H1 to create ToC - htmlDecode : false, // Open the HTML tag identification + htmlDecode : false, // Open the HTML tag identification pageBreak : true, // Enable parse page break [========] atLink : true, // for @link emailLink : true, // for email address auto link taskList : false, // Enable Github Flavored Markdown task lists - emoji : false, // :emoji: , Support Github emoji, Twitter Emoji (Twemoji); + emoji : true, // :emoji: , Support Github emoji, Twitter Emoji (Twemoji); // Support FontAwesome icon emoji :fa-xxx: > Using fontAwesome icon web fonts; // Support Editor.md logo icon emoji :editormd-logo: :editormd-logo-1x: > 1~8x; tex : false, // TeX(LaTeX), based on KaTeX flowChart : false, // flowChart.js only support IE9+ sequenceDiagram : false, // sequenceDiagram.js only support IE9+ - mermaidGantt : false, //mermaid/mermaid.js - mermaidSequence : false, - mermaidFlowChat : false, + mermaid : true, + mindMap : true, // 脑图 previewCodeHighlight : true, - highlightStyle : "github", - + toolbar : true, // show/hide toolbar toolbarAutoFixed : true, // on window scroll auto fixed position + titlebar : { + left: {}, + center: {}, + right: {} + }, toolbarIcons : "full", toolbarTitles : {}, toolbarHandlers : { @@ -260,9 +276,10 @@ } }, toolbarCustomIcons : { // using html tag create toolbar icon, unused default tag. - lowercase : "a", - "ucwords" : "Aa" - }, + lowercase : "a", + "ucwords" : "Aa", + "fontcase" : "Aa" + }, toolbarIconsClass : { undo : "fa-undo", redo : "fa-repeat", @@ -271,6 +288,7 @@ italic : "fa-italic", quote : "fa-quote-left", uppercase : "fa-font", + heading : "fa-header", h1 : editormd.classPrefix + "bold", h2 : editormd.classPrefix + "bold", h3 : editormd.classPrefix + "bold", @@ -299,10 +317,22 @@ fullscreen : "fa-arrows-alt", clear : "fa-eraser", help : "fa-question-circle", + changetheme : "fa-info-circle", info : "fa-info-circle" - }, - toolbarIconTexts : {}, - + }, + toolbarIconTexts : { + "ucwords" : "Capitalize", + uppercase : "Uppercase", + lowercase : "Lowercase", + h1 : "Heading 1", + h2 : "Heading 2", + h3 : "Heading 3", + h4 : "Heading 4", + h5 : "Heading 5", + h6 : "Heading 6" + }, + + // Support for other languaages (see README) lang : { name : "zh-cn", description : "开源在线Markdown编辑器
Open source online Markdown editor.", @@ -345,6 +375,7 @@ clear : "清空", search : "搜索", help : "使用帮助", + changetheme : "切换编辑主题", info : "关于" + editormd.title }, buttons : { @@ -380,11 +411,11 @@ formatNotAllowed : "错误:只允许上传图片文件,允许上传的图片文件格式有:" }, preformattedText : { - title : "添加预格式文本或代码块", + title : "添加预格式文本或代码块", emptyAlert : "错误:请填写预格式文本或代码的内容。" }, codeBlock : { - title : "添加代码块", + title : "添加代码块", selectLabel : "代码语言:", selectDefaultText : "请选择代码语言", otherLanguage : "其他语言", @@ -396,22 +427,27 @@ }, help : { title : "使用帮助" - } + }, + changetheme : { + title : "切换编辑主题" + }, } } }; - + editormd.classNames = { - tex : editormd.classPrefix + "tex" + tex : editormd.classPrefix + "tex", + texDisplay : editormd.classPrefix + "texDisaply" }; editormd.dialogZindex = 99999; - + editormd.$katex = null; editormd.$marked = null; + editormd.$filterXSS = null; editormd.$CodeMirror = null; editormd.$prettyPrint = null; - + var timer, flowchartTimer; editormd.prototype = editormd.fn = { @@ -421,76 +457,76 @@ preview : false, fullscreen : false }, - + /** * 构造函数/实例初始化 * Constructor / instance initialization - * + * * @param {String} id 编辑器的ID * @param {Object} [options={}] 配置选项 Key/Value * @returns {editormd} 返回editormd的实例对象 */ - - init : function (id, options) { - + + init : function (id, author_ide_version, options) { + options = options || {}; - + if (typeof id === "object") { options = id; } - - var _this = this; - var classPrefix = this.classPrefix = editormd.classPrefix; - var settings = this.settings = $.extend(true, editormd.defaults, options); - + + var classPrefix = this.classPrefix = editormd.classPrefix; + var settings = this.settings = $.extend(true, {}, editormd.defaults, options); + id = (typeof id === "object") ? settings.id : id; - + var editor = this.editor = $("#" + id); - + this.id = id; + this.author_ide_version = author_ide_version || editor.version; this.lang = settings.lang; - + var classNames = this.classNames = { textarea : { html : classPrefix + "html-textarea", markdown : classPrefix + "markdown-textarea" } }; - - settings.pluginPath = (settings.pluginPath === "") ? settings.path + "../plugins/" : settings.pluginPath; - + + settings.pluginPath = (settings.pluginPath === "") ? settings.path + "../plugins/" : settings.pluginPath; + this.state.watching = (settings.watch) ? true : false; - + if ( !editor.hasClass("editormd") ) { editor.addClass("editormd"); } - + editor.css({ width : (typeof settings.width === "number") ? settings.width + "px" : settings.width, height : (typeof settings.height === "number") ? settings.height + "px" : settings.height }); - + if (settings.autoHeight) { editor.css("height", "auto"); } - + var markdownTextarea = this.markdownTextarea = editor.children("textarea"); - + if (markdownTextarea.length < 1) { editor.append(""); markdownTextarea = this.markdownTextarea = editor.children("textarea"); } - + markdownTextarea.addClass(classNames.textarea.markdown).attr("placeholder", settings.placeholder); - + if (typeof markdownTextarea.attr("name") === "undefined" || markdownTextarea.attr("name") === "") { markdownTextarea.attr("name", (settings.name !== "") ? settings.name : id + "-markdown-doc"); } - + var appendElements = [ (!settings.readOnly) ? "" : "", ( (settings.saveHTMLToTextarea) ? "" : "" ), @@ -498,119 +534,115 @@ "
", "
" ].join("\n"); - + editor.append(appendElements).addClass(classPrefix + "vertical"); - - if (settings.theme !== "") + + if (settings.theme !== "") { editor.addClass(classPrefix + "theme-" + settings.theme); } - - this.mask = editor.children("." + classPrefix + "mask"); + + this.mask = editor.children("." + classPrefix + "mask"); this.containerMask = editor.children("." + classPrefix + "container-mask"); - - if (settings.markdown !== "") + + if (settings.markdown !== undefined) { markdownTextarea.val(settings.markdown); } - + if (settings.appendMarkdown !== "") { markdownTextarea.val(markdownTextarea.val() + settings.appendMarkdown); } - - this.htmlTextarea = editor.children("." + classNames.textarea.html); + + this.htmlTextarea = editor.children("." + classNames.textarea.html); this.preview = editor.children("." + classPrefix + "preview"); this.previewContainer = this.preview.children("." + classPrefix + "preview-container"); - - if (settings.previewTheme !== "") + + if (settings.previewTheme !== "") { this.preview.addClass(classPrefix + "preview-theme-" + settings.previewTheme); } - + if (typeof define === "function" && define.amd) { - if (typeof katex !== "undefined") + if (typeof katex !== "undefined") { editormd.$katex = katex; } - - if (settings.searchReplace && !settings.readOnly) + + if (settings.searchReplace && !settings.readOnly) { editormd.loadCSS(settings.path + "codemirror/addon/dialog/dialog"); editormd.loadCSS(settings.path + "codemirror/addon/search/matchesonscrollbar"); } } - + if ((typeof define === "function" && define.amd) || !settings.autoLoadModules) { if (typeof CodeMirror !== "undefined") { editormd.$CodeMirror = CodeMirror; } - + if (typeof marked !== "undefined") { editormd.$marked = marked; } - + this.setCodeMirror().setToolbar().loadedDisplay(); - } - else + } + else { this.loadQueues(); } return this; }, - + /** * 所需组件加载队列 * Required components loading queue - * + * * @returns {editormd} 返回editormd的实例对象 */ - + loadQueues : function() { - var _this = this; - var settings = this.settings; - var loadPath = settings.path; - + var _this = this; + var settings = this.settings; + var loadPath = settings.path; + var isLoadedDisplay = false; + var loadFlowChartOrSequenceDiagram = function() { - - if (editormd.isIE8) + + if (editormd.isIE8) { _this.loadedDisplay(); - + return ; } - if (settings.mermaidGantt || settings.mermaidFlowChat || settings.mermaidSequence) { - console.log("aa") - editormd.loadScript(loadPath + "mermaid/mermaid.min", function () { - _this.loadedDisplay(); - }); - } - if (settings.flowChart || settings.sequenceDiagram) + + if (settings.flowChart || settings.sequenceDiagram) { editormd.loadScript(loadPath + "raphael.min", function() { - editormd.loadScript(loadPath + "underscore.min", function() { + editormd.loadScript(loadPath + "underscore.min", function() { - if (!settings.flowChart && settings.sequenceDiagram) + if (!settings.flowChart && settings.sequenceDiagram) { editormd.loadScript(loadPath + "sequence-diagram.min", function() { _this.loadedDisplay(); }); } - else if (settings.flowChart && !settings.sequenceDiagram) - { - editormd.loadScript(loadPath + "flowchart.min", function() { + else if (settings.flowChart && !settings.sequenceDiagram) + { + editormd.loadScript(loadPath + "flowchart.min", function() { editormd.loadScript(loadPath + "jquery.flowchart.min", function() { _this.loadedDisplay(); }); }); } - else if (settings.flowChart && settings.sequenceDiagram) - { - editormd.loadScript(loadPath + "flowchart.min", function() { + else if (settings.flowChart && settings.sequenceDiagram) + { + editormd.loadScript(loadPath + "flowchart.min", function() { editormd.loadScript(loadPath + "jquery.flowchart.min", function() { editormd.loadScript(loadPath + "sequence-diagram.min", function() { _this.loadedDisplay(); @@ -621,160 +653,168 @@ }); }); - } + } else { _this.loadedDisplay(); } - }; + }; + + editormd.loadScript(loadPath + "xss", function () { + editormd.$filterXSS = filterXSS + }); editormd.loadCSS(loadPath + "codemirror/codemirror.min"); - + if (settings.searchReplace && !settings.readOnly) { editormd.loadCSS(loadPath + "codemirror/addon/dialog/dialog"); editormd.loadCSS(loadPath + "codemirror/addon/search/matchesonscrollbar"); } - + if (settings.codeFold) { - editormd.loadCSS(loadPath + "codemirror/addon/fold/foldgutter"); + editormd.loadCSS(loadPath + "codemirror/addon/fold/foldgutter"); } - + editormd.loadScript(loadPath + "codemirror/codemirror.min", function() { editormd.$CodeMirror = CodeMirror; - + editormd.loadScript(loadPath + "codemirror/modes.min", function() { - + editormd.loadScript(loadPath + "codemirror/addons.min", function() { - + _this.setCodeMirror(); - - if (settings.mode !== "gfm" && settings.mode !== "markdown") + + if (settings.mode !== "gfm" && settings.mode !== "markdown") { _this.loadedDisplay(); - + return false; } - + _this.setToolbar(); editormd.loadScript(loadPath + "marked.min", function() { editormd.$marked = marked; - - if (settings.previewCodeHighlight) + + if(!settings.highlightStyle){ + settings.highlightStyle = "github"; + } + if (settings.previewCodeHighlight) { // editormd.loadScript(loadPath + "prettify.min", function() { // loadFlowChartOrSequenceDiagram(); // }); + editormd.loadCSS(loadPath + "highlight/styles/" + settings.highlightStyle); editormd.loadScript(loadPath + "highlight/highlight", function() { loadFlowChartOrSequenceDiagram(); }); - } + } else - { + { loadFlowChartOrSequenceDiagram(); } }); - + }); - + }); - + }); return this; }, - + /** * 设置 Editor.md 的整体主题,主要是工具栏 * Setting Editor.md theme - * + * * @returns {editormd} 返回editormd的实例对象 */ - + setTheme : function(theme) { var editor = this.editor; var oldTheme = this.settings.theme; var themePrefix = this.classPrefix + "theme-"; - + editor.removeClass(themePrefix + oldTheme).addClass(themePrefix + theme); - + this.settings.theme = theme; - + return this; }, - + /** * 设置 CodeMirror(编辑区)的主题 * Setting CodeMirror (Editor area) theme - * + * * @returns {editormd} 返回editormd的实例对象 */ - - setEditorTheme : function(theme) { - var settings = this.settings; - settings.editorTheme = theme; - + + setEditorTheme : function(theme) { + var settings = this.settings; + settings.editorTheme = theme; + if (theme !== "default") { editormd.loadCSS(settings.path + "codemirror/theme/" + settings.editorTheme); } - + this.cm.setOption("theme", theme); - + return this; }, - + /** * setEditorTheme() 的别名 * setEditorTheme() alias - * + * * @returns {editormd} 返回editormd的实例对象 */ - - setCodeMirrorTheme : function (theme) { + + setCodeMirrorTheme : function (theme) { this.setEditorTheme(theme); - + return this; }, - + /** * 设置 Editor.md 的主题 * Setting Editor.md theme - * + * * @returns {editormd} 返回editormd的实例对象 */ - - setPreviewTheme : function(theme) { + + setPreviewTheme : function(theme) { var preview = this.preview; var oldTheme = this.settings.previewTheme; var themePrefix = this.classPrefix + "preview-theme-"; - + preview.removeClass(themePrefix + oldTheme).addClass(themePrefix + theme); - + this.settings.previewTheme = theme; - + return this; }, - + /** * 配置和初始化CodeMirror组件 * CodeMirror initialization - * + * * @returns {editormd} 返回editormd的实例对象 */ - - setCodeMirror : function() { + + setCodeMirror : function() { var settings = this.settings; var editor = this.editor; - + if (settings.editorTheme !== "default") { editormd.loadCSS(settings.path + "codemirror/theme/" + settings.editorTheme); } - + var codeMirrorConfig = { mode : settings.mode, theme : settings.editorTheme, @@ -787,8 +827,8 @@ lineNumbers : settings.lineNumbers, lineWrapping : settings.lineWrapping, extraKeys : { - "Ctrl-Q": function(cm) { - cm.foldCode(cm.getCursor()); + "Ctrl-Q": function(cm) { + cm.foldCode(cm.getCursor()); } }, foldGutter : settings.codeFold, @@ -801,10 +841,10 @@ showTrailingSpace : settings.showTrailingSpace, highlightSelectionMatches : ( (!settings.matchWordHighlight) ? false : { showToken: (settings.matchWordHighlight === "onselected") ? false : /\w/ } ) }; - + this.codeEditor = this.cm = editormd.$CodeMirror.fromTextArea(this.markdownTextarea[0], codeMirrorConfig); this.codeMirror = this.cmElement = editor.children(".CodeMirror"); - + if (settings.value !== "") { this.cm.setValue(settings.value); @@ -814,13 +854,13 @@ fontSize : settings.fontSize, width : (!settings.watch) ? "100%" : "50%" }); - + if (settings.autoHeight) { this.codeMirror.css("height", "auto"); this.cm.setOption("viewportMargin", Infinity); } - + if (!settings.lineNumbers) { this.codeMirror.find(".CodeMirror-gutters").css("border-right", "none"); @@ -828,149 +868,149 @@ return this; }, - + /** * 获取CodeMirror的配置选项 * Get CodeMirror setting options - * + * * @returns {Mixed} return CodeMirror setting option value */ - - getCodeMirrorOption : function(key) { + + getCodeMirrorOption : function(key) { return this.cm.getOption(key); }, - + /** * 配置和重配置CodeMirror的选项 * CodeMirror setting options / resettings - * + * * @returns {editormd} 返回editormd的实例对象 */ - + setCodeMirrorOption : function(key, value) { - + this.cm.setOption(key, value); - + return this; }, - + /** * 添加 CodeMirror 键盘快捷键 * Add CodeMirror keyboard shortcuts key map - * + * * @returns {editormd} 返回editormd的实例对象 */ - + addKeyMap : function(map, bottom) { this.cm.addKeyMap(map, bottom); - + return this; }, - + /** * 移除 CodeMirror 键盘快捷键 * Remove CodeMirror keyboard shortcuts key map - * + * * @returns {editormd} 返回editormd的实例对象 */ - + removeKeyMap : function(map) { this.cm.removeKeyMap(map); - + return this; }, - + /** * 跳转到指定的行 * Goto CodeMirror line - * + * * @param {String|Intiger} line line number or "first"|"last" * @returns {editormd} 返回editormd的实例对象 */ - + gotoLine : function (line) { - + var settings = this.settings; - + if (!settings.gotoLine) { return this; } - + var cm = this.cm; var editor = this.editor; var count = cm.lineCount(); var preview = this.preview; - + if (typeof line === "string") { if(line === "last") { line = count; } - + if (line === "first") { line = 1; } } - - if (typeof line !== "number") - { + + if (typeof line !== "number") + { alert("Error: The line number must be an integer."); return this; } - + line = parseInt(line) - 1; - + if (line > count) { alert("Error: The line number range 1-" + count); - + return this; } - + cm.setCursor( {line : line, ch : 0} ); - + var scrollInfo = cm.getScrollInfo(); - var clientHeight = scrollInfo.clientHeight; + var clientHeight = scrollInfo.clientHeight; var coords = cm.charCoords({line : line, ch : 0}, "local"); - + cm.scrollTo(null, (coords.top + coords.bottom - clientHeight) / 2); - + if (settings.watch) - { + { var cmScroll = this.codeMirror.find(".CodeMirror-scroll")[0]; - var height = $(cmScroll).height(); - var scrollTop = cmScroll.scrollTop; + var height = $(cmScroll).height(); + var scrollTop = cmScroll.scrollTop; var percent = (scrollTop / cmScroll.scrollHeight); if (scrollTop === 0) { preview.scrollTop(0); - } + } else if (scrollTop + height >= cmScroll.scrollHeight - 16) - { - preview.scrollTop(preview[0].scrollHeight); - } + { + preview.scrollTop(preview[0].scrollHeight); + } else - { + { preview.scrollTop(preview[0].scrollHeight * percent); } } cm.focus(); - + return this; }, - + /** * 扩展当前实例对象,可同时设置多个或者只设置一个 * Extend editormd instance object, can mutil setting. - * + * * @returns {editormd} this(editormd instance object.) */ - + extend : function() { if (typeof arguments[1] !== "undefined") { @@ -981,7 +1021,7 @@ this[arguments[0]] = arguments[1]; } - + if (typeof arguments[0] === "object" && typeof arguments[0].length === "undefined") { $.extend(true, this, arguments[0]); @@ -989,168 +1029,168 @@ return this; }, - + /** * 设置或扩展当前实例对象,单个设置 * Extend editormd instance object, one by one - * + * * @param {String|Object} key option key * @param {String|Object} value option value * @returns {editormd} this(editormd instance object.) */ - + set : function (key, value) { - + if (typeof value !== "undefined" && typeof value === "function") { value = $.proxy(value, this); } - + this[key] = value; return this; }, - + /** * 重新配置 * Resetting editor options - * + * * @param {String|Object} key option key * @param {String|Object} value option value * @returns {editormd} this(editormd instance object.) */ - + config : function(key, value) { var settings = this.settings; - + if (typeof key === "object") { settings = $.extend(true, settings, key); } - + if (typeof key === "string") { settings[key] = value; } - + this.settings = settings; this.recreate(); - + return this; }, - + /** * 注册事件处理方法 * Bind editor event handle - * + * * @param {String} eventType event type * @param {Function} callback 回调函数 * @returns {editormd} this(editormd instance object.) */ - + on : function(eventType, callback) { var settings = this.settings; - - if (typeof settings["on" + eventType] !== "undefined") - { - settings["on" + eventType] = $.proxy(callback, this); + + if (typeof settings["on" + eventType] !== "undefined") + { + settings["on" + eventType] = $.proxy(callback, this); } return this; }, - + /** * 解除事件处理方法 * Unbind editor event handle - * + * * @param {String} eventType event type * @returns {editormd} this(editormd instance object.) */ - + off : function(eventType) { var settings = this.settings; - - if (typeof settings["on" + eventType] !== "undefined") + + if (typeof settings["on" + eventType] !== "undefined") { settings["on" + eventType] = function(){}; } - + return this; }, - + /** * 显示工具栏 * Display toolbar - * + * * @param {Function} [callback=function(){}] 回调函数 * @returns {editormd} 返回editormd的实例对象 */ - + showToolbar : function(callback) { var settings = this.settings; - + if(settings.readOnly) { return this; } - + if (settings.toolbar && (this.toolbar.length < 1 || this.toolbar.find("." + this.classPrefix + "menu").html() === "") ) { this.setToolbar(); } - - settings.toolbar = true; - + + settings.toolbar = true; + this.toolbar.show(); this.resize(); - + $.proxy(callback || function(){}, this)(); return this; }, - + /** * 隐藏工具栏 * Hide toolbar - * + * * @param {Function} [callback=function(){}] 回调函数 * @returns {editormd} this(editormd instance object.) */ - - hideToolbar : function(callback) { + + hideToolbar : function(callback) { var settings = this.settings; - - settings.toolbar = false; + + settings.toolbar = false; this.toolbar.hide(); this.resize(); - + $.proxy(callback || function(){}, this)(); return this; }, - + /** * 页面滚动时工具栏的固定定位 * Set toolbar in window scroll auto fixed position - * + * * @returns {editormd} 返回editormd的实例对象 */ - + setToolbarAutoFixed : function(fixed) { - + var state = this.state; var editor = this.editor; var toolbar = this.toolbar; var settings = this.settings; - + if (typeof fixed !== "undefined") { settings.toolbarAutoFixed = fixed; } - + var autoFixedHandle = function(){ var $window = $(window); var top = $window.scrollTop(); - + if (!settings.toolbarAutoFixed) { return false; @@ -1173,7 +1213,7 @@ }); } }; - + if (!state.fullscreen && !state.preview && settings.toolbar && settings.toolbarAutoFixed) { $(window).bind("scroll", autoFixedHandle); @@ -1181,158 +1221,279 @@ return this; }, - + /** * 配置和初始化工具栏 * Set toolbar and Initialization - * + * * @returns {editormd} 返回editormd的实例对象 */ - + setToolbar : function() { - var settings = this.settings; - + var settings = this.settings; + if(settings.readOnly) { return this; } - - var editor = this.editor; - var preview = this.preview; - var classPrefix = this.classPrefix; - + + var editor = this.editor; + var preview = this.preview; + var classPrefix = this.classPrefix; // this.classPrefix = "editormd-" + var titlebarModes = (typeof settings.titlebar === "function") ? settings.titlebar() : settings.titlebar; + var toolbar = this.toolbar = editor.children("." + classPrefix + "toolbar"); - + if (settings.toolbar && toolbar.length < 1) - { - var toolbarHTML = "
    "; - + { + var toolbarHTML = "
    \ +
    \ +
    \ +
    \ +
      \ +
      \ +
      "; + editor.append(toolbarHTML); toolbar = this.toolbar = editor.children("." + classPrefix + "toolbar"); } - - if (!settings.toolbar) + + if (!settings.toolbar) { toolbar.hide(); - + return this; } - + + // Store html for titlebar + var titlebarContent = ""; + + // for each titlebar section + Object.entries(titlebarModes).forEach(([titlebarSection, sectionButtons]) => { + + var sectionHtml = ""; + + if (titlebarSection === "left") { + // set logo and Author IDE title + sectionHtml = "Skills Network Author IDE"; + } else { + // for each item in the section, add HTML to sectionHTML + for (var name in sectionButtons) { + var htmlSafeName = name.replace(/\s+/g, '-').toLowerCase(); + var hoverTitle = (typeof settings.lang.titlebar[name] === "string") ? settings.lang.titlebar[name] : ""; + + switch (sectionButtons[name]) { + case "dropdown": + sectionHtml += "
      \ + \ +
      \ +
      "; + break; + case "button": + sectionHtml += ""; + break; + default: + sectionHtml += "" + + name + ""; + }; + } + } + + // add generated html for the section to the titlebar + titlebarContent += "
      " + sectionHtml + "
      "; + + }); + + // Set html for titlebar + toolbar.find("div." + classPrefix + "titlebar-container").html(titlebarContent); + + + // Set toolbar icons toolbar.show(); - - var icons = (typeof settings.toolbarIcons === "function") ? settings.toolbarIcons() + + var icons = (typeof settings.toolbarIcons === "function") ? settings.toolbarIcons() : ((typeof settings.toolbarIcons === "string") ? editormd.toolbarModes[settings.toolbarIcons] : settings.toolbarIcons); - + var toolbarMenu = toolbar.find("." + this.classPrefix + "menu"), menu = ""; var pullRight = false; - + for (var i = 0, len = icons.length; i < len; i++) { var name = icons[i]; - if (name === "||") - { + if (name === "||") + { pullRight = true; - } + } else if (name === "|") { - menu += "
    • |
    • "; + menu += "
    • "; } else { - var isHeader = (/h(\d)/.test(name)); - var index = name; - - if (name === "watch" && !settings.watch) { - index = "unwatch"; + var isDropdown = name.includes("dropdown"); + + // add classes for menu item + var menuClasses = [] + if (pullRight) { + menuClasses.push("pull-right"); } - - var title = settings.lang.toolbar[index]; - var iconTexts = settings.toolbarIconTexts[index]; - var iconClass = settings.toolbarIconsClass[index]; - - title = (typeof title === "undefined") ? "" : title; - iconTexts = (typeof iconTexts === "undefined") ? "" : iconTexts; - iconClass = (typeof iconClass === "undefined") ? "" : iconClass; - - var menuItem = pullRight ? "
    • " : "
    • "; - - if (typeof settings.toolbarCustomIcons[name] !== "undefined" && typeof settings.toolbarCustomIcons[name] !== "function") - { - menuItem += settings.toolbarCustomIcons[name]; + if (isDropdown) { + menuClasses.push("dropdown"); } - else - { - menuItem += ""; - menuItem += ""+((isHeader) ? name.toUpperCase() : ( (iconClass === "") ? iconTexts : "") ) + ""; + + // stores HTML for current menu item; add opening tag + var menuItem = (menuClasses.length > 0) ? "
    • " : "
    • "; + + // list of icons in menu item (usually just one unless dropdown) + var selections = [] + + if (isDropdown) { + var info = name.split(":"); + var dropdownType = info[0]; // "dropdown", "dropdownIcon" + name = info[1]; // set name to actual parsed name from info + var dropdownContent = info[2].split(","); + selections = [name].concat(dropdownContent); + // set isDropdown to false if no dropdown content + if (!dropdownContent.length) { + isDropdown = false; + } + } else { + selections.push(name) + } + + for (var j = 0, len = selections.length; j < len; j++) { + name = selections[j].trim(); + + // insert dropdown opening tag + if (isDropdown && j === 1) { + menuItem += "
      "; + } + + // default "dropdown" has no icons in content, use "dropdownIcon" for icon+text options + var hasIcon = !(isDropdown && dropdownType !== "dropdownIcon" && menuItem.includes("toolbar-dropdown-content")); + var isHeader = (/h(\d)/.test(name)); + var index = name; + + if (name === "watch" && !settings.watch) { + index = "unwatch"; + } + + var title = settings.lang.toolbar[index]; // hover text + var iconTexts = settings.toolbarIconTexts[index]; // placeholder text if icon is empty + var iconClass = settings.toolbarIconsClass[index]; // font awesome icon class + + title = (typeof title === "undefined" || isDropdown) ? "" : title; + iconTexts = (typeof iconTexts === "undefined") ? "" : iconTexts; + iconClass = (typeof iconClass === "undefined" || !hasIcon) ? "" : iconClass; + + + menuItem += ""; + + // add custom icon + if (hasIcon && typeof settings.toolbarCustomIcons[name] !== "undefined" && typeof settings.toolbarCustomIcons[name] !== "function") + { + menuItem += settings.toolbarCustomIcons[name]; + } + // add icon content + else + { + menuItem += ""; + + if (typeof settings.toolbarIcons !== "function" && isHeader) { + menuItem += "" + name.toUpperCase() + ""; + } else if (dropdownType && dropdownType === "dropdownIcon" && menuItem.includes("toolbar-dropdown-content")) { + menuItem += "" + (iconTexts ? iconTexts : name) + ""; + } else if (iconClass === "" || !hasIcon) { + menuItem += "" + (iconTexts ? iconTexts : name) + ""; + } + + menuItem += ""; + } + menuItem += ""; + + // insert dropdown closing tag + if (isDropdown && j === len - 1 && menuItem.includes("toolbar-dropdown-content")) { + menuItem += "
      "; + dropdownType = ""; + } } + // add closing tag and append to toolbar menuItem += "
    • "; - menu = pullRight ? menuItem + menu : menu + menuItem; } } toolbarMenu.html(menu); - + toolbarMenu.find("[title=\"Lowercase\"]").attr("title", settings.lang.toolbar.lowercase); toolbarMenu.find("[title=\"ucwords\"]").attr("title", settings.lang.toolbar.ucwords); - + this.setToolbarHandler(); this.setToolbarAutoFixed(); return this; }, - + /** * 工具栏图标事件处理对象序列 * Get toolbar icons event handlers - * + * * @param {Object} cm CodeMirror的实例对象 * @param {String} name 要获取的事件处理器名称 * @returns {Object} 返回处理对象序列 */ - + dialogLockScreen : function() { $.proxy(editormd.dialogLockScreen, this)(); - + return this; }, dialogShowMask : function(dialog) { $.proxy(editormd.dialogShowMask, this)(dialog); - + + return this; + }, + positionDialog : function(dialog, position) { + $.proxy(editormd.positionDialog, this)(dialog, position); + return this; }, - - getToolbarHandles : function(name) { + + getToolbarHandles : function(name) { var toolbarHandlers = this.toolbarHandlers = editormd.toolbarHandlers; - + return (name && typeof toolbarIconHandlers[name] !== "undefined") ? toolbarHandlers[name] : toolbarHandlers; }, - + /** * 工具栏图标事件处理器 - * Bind toolbar icons event handle - * + * Bind toolbar icons to their event handlers + * * @returns {editormd} 返回editormd的实例对象 */ - + setToolbarHandler : function() { var _this = this; var settings = this.settings; - + if (!settings.toolbar || settings.readOnly) { return this; } - + var toolbar = this.toolbar; var cm = this.cm; - var classPrefix = this.classPrefix; - var toolbarIcons = this.toolbarIcons = toolbar.find("." + classPrefix + "menu > li > a"); - var toolbarIconHandlers = this.getToolbarHandles(); - - toolbarIcons.bind(editormd.mouseOrTouch("click", "touchend"), function(event) { + var classPrefix = this.classPrefix; + var toolbarIcons = this.toolbarIcons = toolbar.find("." + classPrefix + "menu > li a"); + var toolbarIconHandlers = this.getToolbarHandles(); + + toolbarIcons.bind(editormd.mouseOrTouch("click", "touchend"), function() { var icon = $(this).children(".fa"); var name = icon.attr("name"); @@ -1342,23 +1503,23 @@ if (name === "") { return ; } - + _this.activeIcon = icon; - if (typeof toolbarIconHandlers[name] !== "undefined") + if (typeof toolbarIconHandlers[name] !== "undefined") { $.proxy(toolbarIconHandlers[name], _this)(cm); } - else + else { - if (typeof settings.toolbarHandlers[name] !== "undefined") + if (typeof settings.toolbarHandlers[name] !== "undefined") { $.proxy(settings.toolbarHandlers[name], _this)(cm, icon, cursor, selection); } } - - if (name !== "link" && name !== "reference-link" && name !== "image" && name !== "code-block" && - name !== "preformatted-text" && name !== "watch" && name !== "preview" && name !== "search" && name !== "fullscreen" && name !== "info") + + if (name !== "link" && name !== "reference-link" && name !== "image" && name !== "code-block" && + name !== "preformatted-text" && name !== "watch" && name !== "preview" && name !== "search" && name !== "fullscreen" && name !== "info") { cm.focus(); } @@ -1369,31 +1530,31 @@ return this; }, - + /** * 动态创建对话框 * Creating custom dialogs - * + * * @param {Object} options 配置项键值对 Key/Value * @returns {dialog} 返回创建的dialog的jQuery实例对象 */ - - createDialog : function(options) { + + createDialog : function(options) { return $.proxy(editormd.createDialog, this)(options); }, - + /** * 创建关于Editor.md的对话框 * Create about Editor.md dialog - * + * * @returns {editormd} 返回editormd的实例对象 */ - + createInfoDialog : function() { var _this = this; - var editor = this.editor; - var classPrefix = this.classPrefix; - + var editor = this.editor; + var classPrefix = this.classPrefix; + var infoDialogHTML = [ "
      ", "
      ", @@ -1407,30 +1568,30 @@ ].join("\n"); editor.append(infoDialogHTML); - + var infoDialog = this.infoDialog = editor.children("." + classPrefix + "dialog-info"); infoDialog.find("." + classPrefix + "dialog-close").bind(editormd.mouseOrTouch("click", "touchend"), function() { _this.hideInfoDialog(); }); - + infoDialog.css("border", (editormd.isIE8) ? "1px solid #ddd" : "").css("z-index", editormd.dialogZindex).show(); - + this.infoDialogPosition(); return this; }, - + /** * 关于Editor.md对话居中定位 * Editor.md dialog position handle - * + * * @returns {editormd} 返回editormd的实例对象 */ - + infoDialogPosition : function() { var infoDialog = this.infoDialog; - + var _infoDialogPosition = function() { infoDialog.css({ top : ($(window).height() - infoDialog.height()) / 2 + "px", @@ -1441,33 +1602,33 @@ _infoDialogPosition(); $(window).resize(_infoDialogPosition); - + return this; }, - + /** * 显示关于Editor.md * Display about Editor.md dialog - * + * * @returns {editormd} 返回editormd的实例对象 */ - + showInfoDialog : function() { $("html,body").css("overflow-x", "hidden"); - + var _this = this; - var editor = this.editor; - var settings = this.settings; + var editor = this.editor; + var settings = this.settings; var infoDialog = this.infoDialog = editor.children("." + this.classPrefix + "dialog-info"); - + if (infoDialog.length < 1) { this.createInfoDialog(); } - + this.lockScreen(true); - + this.mask.css({ opacity : settings.dialogMaskOpacity, backgroundColor : settings.dialogMaskBgColor @@ -1479,15 +1640,15 @@ return this; }, - + /** * 隐藏关于Editor.md * Hide about Editor.md dialog - * + * * @returns {editormd} 返回editormd的实例对象 */ - - hideInfoDialog : function() { + + hideInfoDialog : function() { $("html,body").css("overflow-x", ""); this.infoDialog.hide(); this.mask.hide(); @@ -1495,143 +1656,186 @@ return this; }, - + /** * 锁屏 * lock screen - * + * * @param {Boolean} lock Boolean 布尔值,是否锁屏 * @returns {editormd} 返回editormd的实例对象 */ - + lockScreen : function(lock) { editormd.lockScreen(lock); this.resize(); return this; }, - + /** * 编辑器界面重建,用于动态语言包或模块加载等 * Recreate editor - * + * * @returns {editormd} 返回editormd的实例对象 */ - + recreate : function() { var _this = this; var editor = this.editor; var settings = this.settings; - + this.codeMirror.remove(); - + this.setCodeMirror(); - if (!settings.readOnly) + if (!settings.readOnly) { if (editor.find(".editormd-dialog").length > 0) { editor.find(".editormd-dialog").remove(); } - - if (settings.toolbar) - { - this.getToolbarHandles(); + + if (settings.toolbar) + { + this.getToolbarHandles(); this.setToolbar(); } } - + this.loadedDisplay(true); return this; }, - + /** * 高亮预览HTML的pre代码部分 * highlight of preview codes - * + * * @returns {editormd} 返回editormd的实例对象 */ - - previewCodeHighlight : function() { + + previewCodeHighlight : function() { var settings = this.settings; var previewContainer = this.previewContainer; - - if (settings.previewCodeHighlight) + + if (settings.previewCodeHighlight) { - // previewContainer.find("pre").addClass("prettyprint"); - // - // if (typeof prettyPrint !== "undefined") - // { - // prettyPrint(); - // } - if (typeof hljs !== "undefined") { - previewContainer.find('pre').each(function (i, block) { - hljs.highlightBlock(block); - }); + previewContainer.find("pre").addClass("prettyprint linenums"); + + if (typeof prettyPrint !== "undefined") + { + prettyPrint($.proxy(settings.fixCodeBlocks,this)); } + previewContainer.find("pre").each(function (i, block) { + hljs.highlightBlock(block); + }); } return this; }, - + /** * 解析TeX(KaTeX)科学公式 * TeX(KaTeX) Renderer - * + * * @returns {editormd} 返回editormd的实例对象 */ - + katexRender : function() { - + if (timer === null) { return this; } - + this.previewContainer.find("." + editormd.classNames.tex).each(function(){ var tex = $(this); - editormd.$katex.render(tex.text(), tex[0]); - + editormd.$katex.render(tex.text(), tex[0],{ + throwOnError: false, + }); + + tex.find(".katex").css("font-size", "1.6em"); + }); + + this.previewContainer.find("." + editormd.classNames.texDisplay).each(function(){ + var tex = $(this); + editormd.$katex.render(tex.text(), tex[0],{ + throwOnError: false, + displayMode: true, + }); + tex.find(".katex").css("font-size", "1.6em"); - }); + }); + + return this; + }, + + + /** + * 解析思维导图 - 2020-04-12 + * + * @returns {editormd} 返回editormd的实例对象 + */ + mindmapRender:function(){ + this.previewContainer.find(".mindmap").each(function(){ + var mmap = $(this); + var md_data = window.markmap.transform(mmap.text().trim()); + window.markmap.markmap("svg#"+this.id,md_data) + }); return this; }, - + /** * 解析和渲染流程图及时序图 * FlowChart and SequenceDiagram Renderer - * + * * @returns {editormd} 返回editormd的实例对象 */ - + flowChartAndSequenceDiagramRender : function() { var $this = this; var settings = this.settings; var previewContainer = this.previewContainer; - + if (editormd.isIE8) { return this; } + if (settings.mermaid) { + var mermaid = previewContainer.find(".lang-mermaid"); + if (mermaid) { + try { + window.mermaid.init(void 0, mermaid.removeClass("hide")); + }catch (e) { + console.log(e); + } + } + } if (settings.flowChart) { if (flowchartTimer === null) { return this; } - - previewContainer.find(".flowchart").flowChart(); + try { + previewContainer.find(".flowchart").flowChart(); + }catch (e) { + console.log(e); + } } if (settings.sequenceDiagram) { - previewContainer.find(".sequence-diagram").sequenceDiagram({theme: "simple"}); + try { + previewContainer.find(".sequence-diagram").sequenceDiagram({theme: "simple"}); + }catch (e) { + console.log(e); + } } - + var preview = $this.preview; var codeMirror = $this.codeMirror; var codeView = codeMirror.find(".CodeMirror-scroll"); var height = codeView.height(); - var scrollTop = codeView.scrollTop(); + var scrollTop = codeView.scrollTop(); var percent = (scrollTop / codeView[0].scrollHeight); var tocHeight = 0; @@ -1639,43 +1843,43 @@ tocHeight += $(this).height(); }); - var tocMenuHeight = preview.find(".editormd-toc-menu").height(); + var tocMenuHeight = preview.find(".editormd-toc-menu").height(); tocMenuHeight = (!tocMenuHeight) ? 0 : tocMenuHeight; - if (scrollTop === 0) + if (scrollTop === 0) { preview.scrollTop(0); - } + } else if (scrollTop + height >= codeView[0].scrollHeight - 16) - { - preview.scrollTop(preview[0].scrollHeight); - } + { + preview.scrollTop(preview[0].scrollHeight); + } else - { + { preview.scrollTop((preview[0].scrollHeight + tocHeight + tocMenuHeight) * percent); } return this; }, - + /** * 注册键盘快捷键处理 * Register CodeMirror keyMaps (keyboard shortcuts). - * + * * @param {Object} keyMap KeyMap key/value {"(Ctrl/Shift/Alt)-Key" : function(){}} * @returns {editormd} return this */ - + registerKeyMaps : function(keyMap) { - + var _this = this; var cm = this.cm; var settings = this.settings; var toolbarHandlers = editormd.toolbarHandlers; var disabledKeyMaps = settings.disabledKeyMaps; - + keyMap = keyMap || null; - + if (keyMap) { for (var i in keyMap) @@ -1695,7 +1899,7 @@ { var _keyMap = editormd.keyMaps[k]; var handle = (typeof _keyMap === "string") ? $.proxy(toolbarHandlers[_keyMap], _this) : $.proxy(_keyMap, _this); - + if ($.inArray(k, ["F9", "F10", "F11"]) < 0 && $.inArray(k, disabledKeyMaps) < 0) { var _map = {}; @@ -1704,15 +1908,15 @@ cm.addKeyMap(_map); } } - + $(window).keydown(function(event) { - + var keymaps = { "120" : "F9", "121" : "F10", "122" : "F11" }; - + if ( $.inArray(keymaps[event.keyCode], disabledKeyMaps) < 0 ) { switch (event.keyCode) @@ -1721,17 +1925,17 @@ $.proxy(toolbarHandlers["watch"], _this)(); return false; break; - + case 121: $.proxy(toolbarHandlers["preview"], _this)(); return false; - break; - + break; + case 122: - $.proxy(toolbarHandlers["fullscreen"], _this)(); + $.proxy(toolbarHandlers["fullscreen"], _this)(); return false; - break; - + break; + default: break; } @@ -1741,54 +1945,57 @@ return this; }, - + /** * 绑定同步滚动 - * + * * @returns {editormd} return this */ - + bindScrollEvent : function() { - + var _this = this; - var preview = this.preview; + // var preview = this.preview; + var preview = this.previewContainer; var settings = this.settings; var codeMirror = this.codeMirror; var mouseOrTouch = editormd.mouseOrTouch; - + if (!settings.syncScrolling) { return this; } - - var cmBindScroll = function() { + + var cmBindScroll = function() { codeMirror.find(".CodeMirror-scroll").bind(mouseOrTouch("scroll", "touchmove"), function(event) { - var height = $(this).height(); - var scrollTop = $(this).scrollTop(); - var percent = (scrollTop / $(this)[0].scrollHeight); - - var tocHeight = 0; - - preview.find(".markdown-toc-list").each(function(){ - tocHeight += $(this).height(); - }); - - var tocMenuHeight = preview.find(".editormd-toc-menu").height(); - tocMenuHeight = (!tocMenuHeight) ? 0 : tocMenuHeight; + if (timer == null){ + var height = $(this).height(); + var scrollTop = $(this).scrollTop(); + var percent = (scrollTop / $(this)[0].scrollHeight); - if (scrollTop === 0) - { - preview.scrollTop(0); - } - else if (scrollTop + height >= $(this)[0].scrollHeight - 16) - { - preview.scrollTop(preview[0].scrollHeight); - } - else - { - preview.scrollTop((preview[0].scrollHeight + tocHeight + tocMenuHeight) * percent); + var tocHeight = 0; + + preview.find(".markdown-toc-list").each(function(){ + tocHeight += $(this).height(); + }); + + var tocMenuHeight = preview.find(".editormd-toc-menu").height(); + tocMenuHeight = (!tocMenuHeight) ? 0 : tocMenuHeight; + + if (scrollTop === 0) + { + preview.scrollTop(0); + } + else if (scrollTop + height >= $(this)[0].scrollHeight - 16) + { + preview.scrollTop(preview[0].scrollHeight); + } + else + { + preview.scrollTop((preview[0].scrollHeight + tocHeight + tocMenuHeight) * percent); + } + + $.proxy(settings.onscroll, _this)(event); } - - $.proxy(settings.onscroll, _this)(event); }); }; @@ -1797,34 +2004,34 @@ }; var previewBindScroll = function() { - + preview.bind(mouseOrTouch("scroll", "touchmove"), function(event) { - var height = $(this).height(); - var scrollTop = $(this).scrollTop(); - var percent = (scrollTop / $(this)[0].scrollHeight); - var codeView = codeMirror.find(".CodeMirror-scroll"); + if (timer == null){ + var height = $(this).height(); + var scrollTop = $(this).scrollTop(); + var percent = (scrollTop / $(this)[0].scrollHeight); + var codeView = codeMirror.find(".CodeMirror-scroll"); - if(scrollTop === 0) - { - codeView.scrollTop(0); - } - else if (scrollTop + height >= $(this)[0].scrollHeight) - { - codeView.scrollTop(codeView[0].scrollHeight); - } - else - { - codeView.scrollTop(codeView[0].scrollHeight * percent); + if(scrollTop === 0) + { + codeView.scrollTop(0); + } + else if (scrollTop + height >= $(this)[0].scrollHeight) + { + codeView.scrollTop(codeView[0].scrollHeight); + } + else + { + codeView.scrollTop(codeView[0].scrollHeight * percent); + } + $.proxy(settings.onpreviewscroll, _this)(event); } - - $.proxy(settings.onpreviewscroll, _this)(event); }); }; - var previewUnbindScroll = function() { preview.unbind(mouseOrTouch("scroll", "touchmove")); - }; + }; codeMirror.bind({ mouseover : cmBindScroll, @@ -1832,12 +2039,14 @@ touchstart : cmBindScroll, touchend : cmUnbindScroll }); - + if (settings.syncScrolling === "single") { + // cmBindScroll(); return this; } - - preview.bind({ + + // previewBindScroll(); + preview.bind({ mouseover : previewBindScroll, mouseout : previewUnbindScroll, touchstart : previewBindScroll, @@ -1846,26 +2055,27 @@ return this; }, - + bindChangeEvent : function() { - + var _this = this; var cm = this.cm; var settings = this.settings; - - if (!settings.syncScrolling) { - return this; - } - + + // if (!settings.syncScrolling) { + // return this; + // } + cm.on("change", function(_cm, changeObj) { - + // console.log("cmChange") if (settings.watch) { _this.previewContainer.css("padding", settings.autoHeight ? "20px 20px 50px 40px" : "20px"); } - + if (timer) clearTimeout(timer); + if (settings.onCmChange) $.proxy(settings.onCmChange, _this)(); timer = setTimeout(function() { - clearTimeout(timer); + // console.log("cmChangeinsideTimeout") _this.save(); timer = null; }, settings.delay); @@ -1873,528 +2083,549 @@ return this; }, - + /** * 加载队列完成之后的显示处理 * Display handle of the module queues loaded after. - * + * * @param {Boolean} recreate 是否为重建编辑器 * @returns {editormd} 返回editormd的实例对象 */ - + loadedDisplay : function(recreate) { - + // console.log("loadedDisplay") recreate = recreate || false; - + var _this = this; var editor = this.editor; var preview = this.preview; var settings = this.settings; - + this.containerMask.hide(); - + this.save(); - + if (settings.watch) { preview.show(); } - + editor.data("oldWidth", editor.width()).data("oldHeight", editor.height()); // 为了兼容Zepto - + this.resize(); this.registerKeyMaps(); - + $(window).resize(function(){ _this.resize(); }); - + this.bindScrollEvent().bindChangeEvent(); - + if (!recreate) { $.proxy(settings.onload, this)(); } - + this.state.loaded = true; + if (settings.watch) { + this.save(); + preview.show(); + } + return this; }, - + /** * 设置编辑器的宽度 * Set editor width - * + * * @param {Number|String} width 编辑器宽度值 * @returns {editormd} 返回editormd的实例对象 */ - + width : function(width) { - - this.editor.css("width", (typeof width === "number") ? width + "px" : width); + + this.editor.css("width", (typeof width === "number") ? width + "px" : width); this.resize(); - + return this; }, - + /** * 设置编辑器的高度 * Set editor height - * + * * @param {Number|String} height 编辑器高度值 * @returns {editormd} 返回editormd的实例对象 */ - + height : function(height) { - - this.editor.css("height", (typeof height === "number") ? height + "px" : height); + + this.editor.css("height", (typeof height === "number") ? height + "px" : height); this.resize(); - + return this; }, - + /** * 调整编辑器的尺寸和布局 * Resize editor layout - * + * * @param {Number|String} [width=null] 编辑器宽度值 * @param {Number|String} [height=null] 编辑器高度值 * @returns {editormd} 返回editormd的实例对象 */ - + resize : function(width, height) { - + // console.log("resize") width = width || null; height = height || null; - + var state = this.state; var editor = this.editor; var preview = this.preview; var toolbar = this.toolbar; var settings = this.settings; var codeMirror = this.codeMirror; - + if (width) { editor.css("width", (typeof width === "number") ? width + "px" : width); } - + if (settings.autoHeight && !state.fullscreen && !state.preview) { editor.css("height", "auto"); codeMirror.css("height", "auto"); - } - else + } + else { - if (height) + if (height) { editor.css("height", (typeof height === "number") ? height + "px" : height); } - + if (state.fullscreen) { editor.height($(window).height()); } - if (settings.toolbar && !settings.readOnly) + if (settings.toolbar && !settings.readOnly) { codeMirror.css("margin-top", toolbar.height() + 1).height(editor.height() - toolbar.height()); - } + } else { codeMirror.css("margin-top", 0).height(editor.height()); } } - - if(settings.watch) + + if(settings.watch) { codeMirror.width(editor.width() / 2); preview.width((!state.preview) ? editor.width() / 2 : editor.width()); - + this.previewContainer.css("padding", settings.autoHeight ? "20px 20px 50px 40px" : "20px"); - - if (settings.toolbar && !settings.readOnly) + + if (settings.toolbar && !settings.readOnly) { preview.css("top", toolbar.height() + 1); - } - else + } + else { preview.css("top", 0); } - + if (settings.autoHeight && !state.fullscreen && !state.preview) { preview.height(""); } else - { + { var previewHeight = (settings.toolbar && !settings.readOnly) ? editor.height() - toolbar.height() : editor.height(); - + preview.height(previewHeight); } - } - else + } + else { codeMirror.width(editor.width()); preview.hide(); } - - if (state.loaded) + + if (state.loaded) { $.proxy(settings.onresize, this)(); } return this; }, - + /** * 解析和保存Markdown代码 * Parse & Saving Markdown source code - * + * * @returns {editormd} 返回editormd的实例对象 */ - + save : function() { - - if (timer === null) - { - return this; - } - + // console.log("saving") var _this = this; var state = this.state; var settings = this.settings; - var cm = this.cm; + var cm = this.cm; var cmValue = cm.getValue(); var previewContainer = this.previewContainer; - if (settings.mode !== "gfm" && settings.mode !== "markdown") + if (timer === null && !(!settings.watch && state.preview)) { - this.markdownTextarea.val(cmValue); - return this; } - - var marked = editormd.$marked; - var markdownToC = this.markdownToC = []; - var rendererOptions = this.markedRendererOptions = { - toc : settings.toc, - tocm : settings.tocm, - tocStartLevel : settings.tocStartLevel, - pageBreak : settings.pageBreak, - taskList : settings.taskList, - emoji : settings.emoji, - tex : settings.tex, - atLink : settings.atLink, // for @link - emailLink : settings.emailLink, // for mail address auto link - flowChart : settings.flowChart, - sequenceDiagram : settings.sequenceDiagram, - previewCodeHighlight : settings.previewCodeHighlight, - }; - - var markedOptions = this.markedOptions = { - renderer : editormd.markedRenderer(markdownToC, rendererOptions), - gfm : true, - tables : true, - breaks : true, - pedantic : false, - sanitize : (settings.htmlDecode) ? false : true, // 关闭忽略HTML标签,即开启识别HTML标签,默认为false - smartLists : true, - smartypants : true - }; - - marked.setOptions(markedOptions); - - var newMarkdownDoc = editormd.$marked(cmValue, markedOptions); - - //console.info("cmValue", cmValue, newMarkdownDoc); - - newMarkdownDoc = editormd.filterHTMLTags(newMarkdownDoc, settings.htmlDecode); - - //console.error("cmValue", cmValue, newMarkdownDoc); - - this.markdownTextarea.text(cmValue); - - cm.save(); - - if (settings.saveHTMLToTextarea) + + if (settings.mode !== "gfm" && settings.mode !== "markdown") { - this.htmlTextarea.text(newMarkdownDoc); + this.markdownTextarea.val(cmValue); + + return this; } - - if(settings.watch || (!settings.watch && state.preview)) - { - previewContainer.html(newMarkdownDoc); - this.previewCodeHighlight(); - - if (settings.toc) + cm.save(); + + if (settings.saveHTMLToTextarea || settings.watch || (!settings.watch && state.preview)){ + // console.log("rendering") + var marked = editormd.$marked; + var markdownToC = this.markdownToC = []; + var rendererOptions = this.markedRendererOptions = { + toc : settings.toc, + tocm : settings.tocm, + tocStartLevel : settings.tocStartLevel, + pageBreak : settings.pageBreak, + taskList : settings.taskList, + emoji : settings.emoji, + tex : settings.tex, + atLink : settings.atLink, // for @link + emailLink : settings.emailLink, // for mail address auto link + flowChart : settings.flowChart, + sequenceDiagram : settings.sequenceDiagram, + previewCodeHighlight : settings.previewCodeHighlight, + mermaid : settings.mermaid, + mindMap : settings.mindMap, // 思维导图 + }; + + var markedOptions = this.markedOptions = { + renderer : editormd.markedRenderer(markdownToC, rendererOptions), + gfm : true, + tables : true, + breaks : true, + pedantic : false, + sanitize : (settings.htmlDecode) ? false : true, // 关闭忽略HTML标签,即开启识别HTML标签,默认为false + smartLists : true, + smartypants : true + }; + + marked.setOptions(markedOptions); + + var newMarkdownDoc = editormd.$marked.parse(cmValue, markedOptions); + + if(settings.debug) { + console.info("cmValue", cmValue, newMarkdownDoc); + } + newMarkdownDoc = editormd.$filterXSS(newMarkdownDoc); + + //console.error("cmValue", cmValue, newMarkdownDoc); + + this.markdownTextarea.text(cmValue); + + cm.save(); + + if (settings.saveHTMLToTextarea) + { + this.htmlTextarea.text(newMarkdownDoc); + } + + if(settings.watch || (!settings.watch && state.preview)) { - var tocContainer = (settings.tocContainer === "") ? previewContainer : $(settings.tocContainer); - var tocMenu = tocContainer.find("." + this.classPrefix + "toc-menu"); - - tocContainer.attr("previewContainer", (settings.tocContainer === "") ? "true" : "false"); - - if (settings.tocContainer !== "" && tocMenu.length > 0) + previewContainer.html(newMarkdownDoc); + + this.previewCodeHighlight(); + + if (settings.toc) { - tocMenu.remove(); + var tocContainer = (settings.tocContainer === "") ? previewContainer : $(settings.tocContainer); + var tocMenu = tocContainer.find("." + this.classPrefix + "toc-menu"); + + tocContainer.attr("previewContainer", (settings.tocContainer === "") ? "true" : "false"); + + if (settings.tocContainer !== "" && tocMenu.length > 0) + { + tocMenu.remove(); + } + + editormd.markdownToCRenderer(markdownToC, tocContainer, settings.tocDropdown, settings.tocStartLevel); + + if (settings.tocDropdown || tocContainer.find("." + this.classPrefix + "toc-menu").length > 0) + { + editormd.tocDropdownMenu(tocContainer, (settings.tocTitle !== "") ? settings.tocTitle : this.lang.tocTitle); + } + + if (settings.tocContainer !== "") + { + previewContainer.find(".markdown-toc").css("border", "none"); + } } - - editormd.markdownToCRenderer(markdownToC, tocContainer, settings.tocDropdown, settings.tocStartLevel); - - if (settings.tocDropdown || tocContainer.find("." + this.classPrefix + "toc-menu").length > 0) + + if (settings.tex) { - editormd.tocDropdownMenu(tocContainer, (settings.tocTitle !== "") ? settings.tocTitle : this.lang.tocTitle); + if (!editormd.kaTeXLoaded && settings.autoLoadModules) + { + editormd.loadKaTeX(function() { + editormd.$katex = katex; + editormd.kaTeXLoaded = true; + _this.katexRender(); + }); + } + else + { + editormd.$katex = katex; + this.katexRender(); + } } - - if (settings.tocContainer !== "") - { - previewContainer.find(".markdown-toc").css("border", "none"); + + // 渲染脑图 + if(settings.mindMap){ + setTimeout(function(){ + _this.mindmapRender(); + },10) + } - } - - if (settings.tex) - { - if (!editormd.kaTeXLoaded && settings.autoLoadModules) + + if (settings.flowChart || settings.sequenceDiagram || settings.mermaid) { - editormd.loadKaTeX(function() { - editormd.$katex = katex; - editormd.kaTeXLoaded = true; - _this.katexRender(); - }); - } - else + flowchartTimer = setTimeout(function(){ + clearTimeout(flowchartTimer); + _this.flowChartAndSequenceDiagramRender(); + flowchartTimer = null; + }, 10); + } + + if (state.loaded) { - editormd.$katex = katex; - this.katexRender(); + $.proxy(settings.onchange, this)(); } - } - - if (settings.flowChart || settings.sequenceDiagram) - { - flowchartTimer = setTimeout(function(){ - clearTimeout(flowchartTimer); - _this.flowChartAndSequenceDiagramRender(); - flowchartTimer = null; - }, 10); } - if (state.loaded) - { - $.proxy(settings.onchange, this)(); - } } - return this; }, - + /** * 聚焦光标位置 * Focusing the cursor position - * + * * @returns {editormd} 返回editormd的实例对象 */ - + focus : function() { this.cm.focus(); return this; }, - + /** * 设置光标的位置 * Set cursor position - * + * * @param {Object} cursor 要设置的光标位置键值对象,例:{line:1, ch:0} * @returns {editormd} 返回editormd的实例对象 */ - + setCursor : function(cursor) { this.cm.setCursor(cursor); return this; }, - + /** * 获取当前光标的位置 * Get the current position of the cursor - * + * * @returns {Cursor} 返回一个光标Cursor对象 */ - + getCursor : function() { return this.cm.getCursor(); }, - + /** * 设置光标选中的范围 * Set cursor selected ranges - * + * * @param {Object} from 开始位置的光标键值对象,例:{line:1, ch:0} * @param {Object} to 结束位置的光标键值对象,例:{line:1, ch:0} * @returns {editormd} 返回editormd的实例对象 */ - + setSelection : function(from, to) { - + this.cm.setSelection(from, to); - + return this; }, - + /** * 获取光标选中的文本 * Get the texts from cursor selected - * + * * @returns {String} 返回选中文本的字符串形式 */ - + getSelection : function() { return this.cm.getSelection(); }, - + /** * 设置光标选中的文本范围 * Set the cursor selection ranges - * + * * @param {Array} ranges cursor selection ranges array * @returns {Array} return this */ - + setSelections : function(ranges) { this.cm.setSelections(ranges); - + return this; }, - + /** * 获取光标选中的文本范围 * Get the cursor selection ranges - * + * * @returns {Array} return selection ranges array */ - + getSelections : function() { return this.cm.getSelections(); }, - + /** * 替换当前光标选中的文本或在当前光标处插入新字符 * Replace the text at the current cursor selected or insert a new character at the current cursor position - * + * * @param {String} value 要插入的字符值 * @returns {editormd} 返回editormd的实例对象 */ - + replaceSelection : function(value) { this.cm.replaceSelection(value); return this; }, - + /** * 在当前光标处插入新字符 * Insert a new character at the current cursor position * * 同replaceSelection()方法 * With the replaceSelection() method - * + * * @param {String} value 要插入的字符值 * @returns {editormd} 返回editormd的实例对象 */ - + insertValue : function(value) { this.replaceSelection(value); return this; }, - + /** * 追加markdown * append Markdown to editor - * + * * @param {String} md 要追加的markdown源文档 * @returns {editormd} 返回editormd的实例对象 */ - + appendMarkdown : function(md) { var settings = this.settings; var cm = this.cm; - + cm.setValue(cm.getValue() + md); - + return this; }, - + /** * 设置和传入编辑器的markdown源文档 * Set Markdown source document - * + * * @param {String} md 要传入的markdown源文档 * @returns {editormd} 返回editormd的实例对象 */ - + setMarkdown : function(md) { this.cm.setValue(md || this.settings.markdown); - + return this; }, - + /** * 获取编辑器的markdown源文档 * Set Editor.md markdown/CodeMirror value - * + * * @returns {editormd} 返回editormd的实例对象 */ - + getMarkdown : function() { return this.cm.getValue(); }, - + /** * 获取编辑器的源文档 * Get CodeMirror value - * + * * @returns {editormd} 返回editormd的实例对象 */ - + getValue : function() { return this.cm.getValue(); }, - + /** * 设置编辑器的源文档 * Set CodeMirror value - * + * * @param {String} value set code/value/string/text * @returns {editormd} 返回editormd的实例对象 */ - + setValue : function(value) { this.cm.setValue(value); - + return this; }, - + /** * 清空编辑器 * Empty CodeMirror editor container - * + * * @returns {editormd} 返回editormd的实例对象 */ - + clear : function() { this.cm.setValue(""); - + return this; }, - + /** * 获取解析后存放在Textarea的HTML源码 * Get parsed html code from Textarea - * + * * @returns {String} 返回HTML源码 */ - + getHTML : function() { if (!this.settings.saveHTMLToTextarea) { @@ -2402,28 +2633,28 @@ return false; } - + return this.htmlTextarea.val(); }, - + /** * getHTML()的别名 * getHTML (alias) - * + * * @returns {String} Return html code 返回HTML源码 */ - + getTextareaSavedHTML : function() { return this.getHTML(); }, - + /** * 获取预览窗口的HTML源码 * Get html from preview container - * + * * @returns {editormd} 返回editormd的实例对象 */ - + getPreviewedHTML : function() { if (!this.settings.watch) { @@ -2431,137 +2662,137 @@ return false; } - + return this.previewContainer.html(); }, - + /** * 开启实时预览 * Enable real-time watching - * + * * @returns {editormd} 返回editormd的实例对象 */ - - watch : function(callback) { + + watch : function(callback) { var settings = this.settings; - + if ($.inArray(settings.mode, ["gfm", "markdown"]) < 0) { return this; } - + this.state.watching = settings.watch = true; this.preview.show(); - + if (this.toolbar) { var watchIcon = settings.toolbarIconsClass.watch; var unWatchIcon = settings.toolbarIconsClass.unwatch; - + var icon = this.toolbar.find(".fa[name=watch]"); icon.parent().attr("title", settings.lang.toolbar.watch); icon.removeClass(unWatchIcon).addClass(watchIcon); } - - this.codeMirror.css("border-right", "1px solid #ddd").width(this.editor.width() / 2); - + + this.codeMirror.css("border-right", "1px solid #ddd").width(this.editor.width() / 2); + timer = 0; - + this.save().resize(); - + if (!settings.onwatch) { settings.onwatch = callback || function() {}; } - + $.proxy(settings.onwatch, this)(); - + return this; }, - + /** * 关闭实时预览 * Disable real-time watching - * + * * @returns {editormd} 返回editormd的实例对象 */ - + unwatch : function(callback) { var settings = this.settings; this.state.watching = settings.watch = false; this.preview.hide(); - - if (this.toolbar) + + if (this.toolbar) { var watchIcon = settings.toolbarIconsClass.watch; var unWatchIcon = settings.toolbarIconsClass.unwatch; - + var icon = this.toolbar.find(".fa[name=watch]"); icon.parent().attr("title", settings.lang.toolbar.unwatch); icon.removeClass(watchIcon).addClass(unWatchIcon); } - + this.codeMirror.css("border-right", "none").width(this.editor.width()); - + this.resize(); - + if (!settings.onunwatch) { settings.onunwatch = callback || function() {}; } - + $.proxy(settings.onunwatch, this)(); - + return this; }, - + /** * 显示编辑器 * Show editor - * + * * @param {Function} [callback=function()] 回调函数 * @returns {editormd} 返回editormd的实例对象 */ - + show : function(callback) { callback = callback || function() {}; - + var _this = this; this.editor.show(0, function() { $.proxy(callback, _this)(); }); - + return this; }, - + /** * 隐藏编辑器 * Hide editor - * + * * @param {Function} [callback=function()] 回调函数 * @returns {editormd} 返回editormd的实例对象 */ - + hide : function(callback) { callback = callback || function() {}; - + var _this = this; this.editor.hide(0, function() { $.proxy(callback, _this)(); }); - + return this; }, - + /** * 隐藏编辑器部分,只预览HTML * Enter preview html state - * + * * @returns {editormd} 返回editormd的实例对象 */ - + previewing : function() { - + var _this = this; var editor = this.editor; var preview = this.preview; @@ -2569,18 +2800,19 @@ var settings = this.settings; var codeMirror = this.codeMirror; var previewContainer = this.previewContainer; - + if ($.inArray(settings.mode, ["gfm", "markdown"]) < 0) { return this; } - + if (settings.toolbar && toolbar) { toolbar.toggle(); toolbar.find(".fa[name=preview]").toggleClass("active"); } - + + // codeMirror.hide(); codeMirror.toggle(); - + var escHandle = function(event) { if (event.shiftKey && event.keyCode === 27) { _this.previewed(); @@ -2594,20 +2826,20 @@ if (this.state.fullscreen) { preview.css("background", "#fff"); } - + editor.find("." + this.classPrefix + "preview-close-btn").show().bind(editormd.mouseOrTouch("click", "touchend"), function(){ _this.previewed(); }); - + if (!settings.watch) { this.save(); - } - else + } + else { previewContainer.css("padding", ""); } - + previewContainer.addClass(this.classPrefix + "preview-active"); preview.show().css({ @@ -2616,30 +2848,30 @@ width : editor.width(), height : (settings.autoHeight && !this.state.fullscreen) ? "auto" : editor.height() }); - + if (this.state.loaded) { $.proxy(settings.onpreviewing, this)(); } $(window).bind("keyup", escHandle); - } - else + } + else { $(window).unbind("keyup", escHandle); this.previewed(); } }, - + /** * 显示编辑器部分,退出只预览HTML * Exit preview html state - * + * * @returns {editormd} 返回editormd的实例对象 */ - + previewed : function() { - + var editor = this.editor; var preview = this.preview; var toolbar = this.toolbar; @@ -2648,49 +2880,51 @@ var previewCloseBtn = editor.find("." + this.classPrefix + "preview-close-btn"); this.state.preview = false; - + this.codeMirror.show(); - + if (settings.toolbar) { toolbar.show(); } - + preview[(settings.watch) ? "show" : "hide"](); - + previewCloseBtn.hide().unbind(editormd.mouseOrTouch("click", "touchend")); - + previewContainer.removeClass(this.classPrefix + "preview-active"); - + if (settings.watch) { previewContainer.css("padding", "20px"); } - - preview.css({ + + const toolbarHeight = (settings.toolbar) ? toolbar.height() : 0; + + preview.css({ background : null, position : "absolute", width : editor.width() / 2, - height : (settings.autoHeight && !this.state.fullscreen) ? "auto" : editor.height() - toolbar.height(), - top : (settings.toolbar) ? toolbar.height() : 0 + height : (settings.autoHeight && !this.state.fullscreen) ? "auto" : editor.height() - toolbarHeight, + top : (settings.toolbar) ? toolbarHeight : 0 }); if (this.state.loaded) { $.proxy(settings.onpreviewed, this)(); } - + return this; }, - + /** * 编辑器全屏显示 * Fullscreen show - * + * * @returns {editormd} 返回editormd的实例对象 */ - + fullscreen : function() { - + var _this = this; var state = this.state; var editor = this.editor; @@ -2698,13 +2932,13 @@ var toolbar = this.toolbar; var settings = this.settings; var fullscreenClass = this.classPrefix + "fullscreen"; - + if (toolbar) { - toolbar.find(".fa[name=fullscreen]").parent().toggleClass("active"); + toolbar.find(".fa[name=fullscreen]").parent().toggleClass("active"); } - + var escHandle = function(event) { - if (!event.shiftKey && event.keyCode === 27) + if (!event.shiftKey && event.keyCode === 27) { if (state.fullscreen) { @@ -2713,50 +2947,50 @@ } }; - if (!editor.hasClass(fullscreenClass)) + if (!editor.hasClass(fullscreenClass)) { state.fullscreen = true; $("html,body").css("overflow", "hidden"); - + editor.css({ width : $(window).width(), height : $(window).height() }).addClass(fullscreenClass); this.resize(); - + $.proxy(settings.onfullscreen, this)(); $(window).bind("keyup", escHandle); } else - { - $(window).unbind("keyup", escHandle); + { + $(window).unbind("keyup", escHandle); this.fullscreenExit(); } return this; }, - + /** * 编辑器退出全屏显示 * Exit fullscreen state - * + * * @returns {editormd} 返回editormd的实例对象 */ - + fullscreenExit : function() { - + var editor = this.editor; var settings = this.settings; var toolbar = this.toolbar; - var fullscreenClass = this.classPrefix + "fullscreen"; - + var fullscreenClass = this.classPrefix + "fullscreen"; + this.state.fullscreen = false; - + if (toolbar) { - toolbar.find(".fa[name=fullscreen]").parent().removeClass("active"); + toolbar.find(".fa[name=fullscreen]").parent().removeClass("active"); } $("html,body").css("overflow", ""); @@ -2767,127 +3001,166 @@ }).removeClass(fullscreenClass); this.resize(); - + $.proxy(settings.onfullscreenExit, this)(); return this; }, - + /** * 加载并执行插件 * Load and execute the plugin - * + * * @param {String} name plugin name / function name * @param {String} path plugin load path * @returns {editormd} 返回editormd的实例对象 */ - - executePlugin : function(name, path) { - + + executePlugin : function(name, path, customPlugin = false, optionalParams= {"proxy": false}) { var _this = this; var cm = this.cm; var settings = this.settings; - - path = settings.pluginPath + path; - - if (typeof define === "function") - { + + path = (customPlugin ? settings.customPluginPath : settings.pluginPath) + path; + + if (typeof define === "function") + { if (typeof this[name] === "undefined") { alert("Error: " + name + " plugin is not found, you are not load this plugin."); - + + return this; + } + + if (optionalParams["proxy"]) { + return this[name](cm); + } else { + this[name](cm); return this; } - - this[name](cm); - - return this; } - + if ($.inArray(path, editormd.loadFiles.plugin) < 0) { - editormd.loadPlugin(path, function() { - editormd.loadPlugins[name] = _this[name]; - _this[name](cm); - }); + if (optionalParams["proxy"]){ + return new Promise((res)=>{ + editormd.loadPlugin(path, function() { + editormd.loadPlugins[name] = _this[name]; + res(_this[name](cm, optionalParams)) + }, "head", (customPlugin ? _this.author_ide_version : editormd.version) ); + }); + } + else{ + editormd.loadPlugin(path, function() { + editormd.loadPlugins[name] = _this[name]; + _this[name](cm, optionalParams); + }, "head", (customPlugin ? _this.author_ide_version : editormd.version) ); + } } else { - $.proxy(editormd.loadPlugins[name], this)(cm); + if (optionalParams["proxy"]) return $.proxy(editormd.loadPlugins[name], this)(cm, optionalParams); + $.proxy(editormd.loadPlugins[name], this)(cm, optionalParams); } - + return this; }, - + /** * 搜索替换 * Search & replace - * + * * @param {String} command CodeMirror serach commands, "find, fintNext, fintPrev, clearSearch, replace, replaceAll" * @returns {editormd} return this */ - + search : function(command) { var settings = this.settings; - + if (!settings.searchReplace) { alert("Error: settings.searchReplace == false"); return this; } - + if (!settings.readOnly) { this.cm.execCommand(command || "find"); } - + return this; }, - - searchReplace : function() { + + searchReplace : function() { this.search("replace"); - + return this; }, - - searchReplaceAll : function() { + + searchReplaceAll : function() { this.search("replaceAll"); - + return this; } }; - - editormd.fn.init.prototype = editormd.fn; - + + editormd.fn.init.prototype = editormd.fn; + /** * 锁屏 * lock screen when dialog opening - * + * * @returns {void} */ editormd.dialogLockScreen = function() { var settings = this.settings || {dialogLockScreen : true}; - - if (settings.dialogLockScreen) - { + + if (settings.dialogLockScreen) + { $("html,body").css("overflow", "hidden"); this.resize(); } }; - + + + editormd.positionDialog = function(dialog, position="center") { + var left, top; + + switch (position) { + case "center": + left = ($(window).width() - dialog.width()) / 2 + "px"; + top = ($(window).height() - dialog.height()) / 2 + "px"; + break; + case "center-left": + left = ($(window).width() / 4 - dialog.width() / 2) + "px"; + top = ($(window).height() - dialog.height()) / 2 + "px"; + break; + case "center-right": + left = ($(window).width() * 3 / 4 - dialog.width() / 2) + "px"; + top = ($(window).height() - dialog.height()) / 2 + "px"; + break; + default: + console.warn(`Unsupported dialog position: ${position}`); + left = ($(window).width() - dialog.width()) / 2 + "px"; + top = ($(window).height() - dialog.height()) / 2 + "px"; + } + + dialog.css({ top, left }); + }; + /** * 显示透明背景层 * Display mask layer when dialog opening - * + * * @param {Object} dialog dialog jQuery object * @returns {void} */ - + editormd.dialogShowMask = function(dialog) { var editor = this.editor; var settings = this.settings || {dialogShowMask : true}; - + dialog.css({ top : ($(window).height() - dialog.height()) / 2 + "px", left : ($(window).width() - dialog.width()) / 2 + "px" @@ -2902,11 +3175,11 @@ undo : function() { this.cm.undo(); }, - + redo : function() { this.cm.redo(); }, - + bold : function() { var cm = this.cm; var cursor = cm.getCursor(); @@ -2918,7 +3191,7 @@ cm.setCursor(cursor.line, cursor.ch + 2); } }, - + del : function() { var cm = this.cm; var cursor = cm.getCursor(); @@ -2962,7 +3235,7 @@ //cm.replaceSelection("> " + selection); //cm.setCursor(cursor.line, (selection === "") ? cursor.ch + 2 : cursor.ch + selection.length + 2); }, - + ucfirst : function() { var cm = this.cm; var selection = cm.getSelection(); @@ -2971,7 +3244,7 @@ cm.replaceSelection(editormd.firstUpperCase(selection)); cm.setSelections(selections); }, - + ucwords : function() { var cm = this.cm; var selection = cm.getSelection(); @@ -2980,7 +3253,7 @@ cm.replaceSelection(editormd.wordsFirstUpperCase(selection)); cm.setSelections(selections); }, - + uppercase : function() { var cm = this.cm; var selection = cm.getSelection(); @@ -2989,13 +3262,13 @@ cm.replaceSelection(selection.toUpperCase()); cm.setSelections(selections); }, - + lowercase : function() { var cm = this.cm; var cursor = cm.getCursor(); var selection = cm.getSelection(); var selections = cm.listSelections(); - + cm.replaceSelection(selection.toLowerCase()); cm.setSelections(selections); }, @@ -3003,102 +3276,176 @@ h1 : function() { var cm = this.cm; var cursor = cm.getCursor(); + // var selection = cm.getLine(cursor.line); var selection = cm.getSelection(); - - if (cursor.ch !== 0) - { - cm.setCursor(cursor.line, 0); - cm.replaceSelection("# " + selection); - cm.setCursor(cursor.line, cursor.ch + 2); - } - else + var patt1=new RegExp("^#{1}[ ]");//如果存在H1 + var patt2=new RegExp("^#{1,6}[ ]");//如果存在H2-H6 + //如果存在H1,取消H1的设置 + if (patt1.test(selection)===true){ + selection=selection.replace(/^#{1}[ ]/,""); + cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); + cm.replaceSelection(selection+"\n"); + cm.setCursor(cursor.line, cursor.ch -2); + } + //如果存在H1-H6,取消H2-H6,并替换为H1 + else if(patt2.test(selection)===true){ + selection=selection.replace(/^#{1,6}[ ]/,""); + cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); + cm.replaceSelection("# "+selection+"\n"); + cm.setCursor(cursor.line, cursor.ch +2); + + }else + //设置为H1 { - cm.replaceSelection("# " + selection); + cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); + cm.replaceSelection("# "+selection+"\n"); + cm.setCursor(cursor.line, cursor.ch +2); } }, h2 : function() { var cm = this.cm; var cursor = cm.getCursor(); + // var selection = cm.getLine(cursor.line); var selection = cm.getSelection(); - - if (cursor.ch !== 0) - { - cm.setCursor(cursor.line, 0); - cm.replaceSelection("## " + selection); - cm.setCursor(cursor.line, cursor.ch + 3); - } - else - { - cm.replaceSelection("## " + selection); + var patt1=new RegExp("^#{2}[ ]");//如果存在H1 + var patt2=new RegExp("^#{1,6}[ ]");//如果存在H1-H6 + //如果存在H2,取消H2的设置 + if (patt1.test(selection)===true){ + selection=selection.replace(/^#{2}[ ]/,""); + cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); + cm.replaceSelection(selection+"\n"); + cm.setCursor(cursor.line, cursor.ch -3); + }else if(patt2.test(selection)===true){ + selection=selection.replace(/^#{1,6}[ ]/,""); + cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); + cm.replaceSelection("## "+selection+"\n"); + cm.setCursor(cursor.line, cursor.ch +3); + + }else{ + cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); + cm.replaceSelection("## "+selection+"\n"); + cm.setCursor(cursor.line, cursor.ch +3); } }, h3 : function() { var cm = this.cm; var cursor = cm.getCursor(); + // var selection = cm.getLine(cursor.line); var selection = cm.getSelection(); - - if (cursor.ch !== 0) - { - cm.setCursor(cursor.line, 0); - cm.replaceSelection("### " + selection); - cm.setCursor(cursor.line, cursor.ch + 4); - } - else + var patt1=new RegExp("^#{3}[ ]");//如果存在H3 + var patt2=new RegExp("^#{1,6}[ ]");//如果存在H1-H6 + //如果存在H3,取消H3的设置 + if (patt1.test(selection)===true){ + selection=selection.replace(/^#{3}[ ]/,""); + cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); + cm.replaceSelection(selection+"\n"); + cm.setCursor(cursor.line, cursor.ch -4); + } + //如果存在H1-H6,取消H1-H6,并替换为H3 + else if(patt2.test(selection)===true){ + selection=selection.replace(/^#{1,6}[ ]/,""); + cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); + cm.replaceSelection("### "+selection+"\n"); + cm.setCursor(cursor.line, cursor.ch +4); + + }else + //设置为H3 { - cm.replaceSelection("### " + selection); + cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); + cm.replaceSelection("### "+selection+"\n"); + cm.setCursor(cursor.line, cursor.ch +4); } }, h4 : function() { var cm = this.cm; var cursor = cm.getCursor(); + // var selection = cm.getLine(cursor.line); var selection = cm.getSelection(); - - if (cursor.ch !== 0) - { - cm.setCursor(cursor.line, 0); - cm.replaceSelection("#### " + selection); - cm.setCursor(cursor.line, cursor.ch + 5); - } - else + var patt1=new RegExp("^#{4}[ ]");//如果存在H4 + var patt2=new RegExp("^#{1,6}[ ]");//如果存在H1-H6 + //如果存在H4,取消H4的设置 + if (patt1.test(selection)===true){ + selection=selection.replace(/^#{4}[ ]/,""); + cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); + cm.replaceSelection(selection+"\n"); + cm.setCursor(cursor.line, cursor.ch -5); + } + //如果存在H1-H6,取消H1-H6,并替换为H4 + else if(patt2.test(selection)===true){ + selection=selection.replace(/^#{1,6}[ ]/,""); + cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); + cm.replaceSelection("#### "+selection+"\n"); + cm.setCursor(cursor.line, cursor.ch +5); + + }else + //设置为H4 { - cm.replaceSelection("#### " + selection); + cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); + cm.replaceSelection("#### "+selection+"\n"); + cm.setCursor(cursor.line, cursor.ch +5); } }, h5 : function() { var cm = this.cm; var cursor = cm.getCursor(); + // var selection = cm.getLine(cursor.line); var selection = cm.getSelection(); - - if (cursor.ch !== 0) - { - cm.setCursor(cursor.line, 0); - cm.replaceSelection("##### " + selection); - cm.setCursor(cursor.line, cursor.ch + 6); - } - else + var patt1=new RegExp("^#{5}[ ]");//如果存在H5 + var patt2=new RegExp("^#{1,6}[ ]");//如果存在H1-H6 + //如果存在H5,取消H5的设置 + if (patt1.test(selection)===true){ + selection=selection.replace(/^#{5}[ ]/,""); + cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); + cm.replaceSelection(selection+"\n"); + cm.setCursor(cursor.line, cursor.ch -6); + } + //如果存在H1-H6,取消H1-H6,并替换为H5 + else if(patt2.test(selection)===true){ + selection=selection.replace(/^#{1,6}[ ]/,""); + cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); + cm.replaceSelection("##### "+selection+"\n"); + cm.setCursor(cursor.line, cursor.ch +6); + + }else + //设置为H5 { - cm.replaceSelection("##### " + selection); + cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); + cm.replaceSelection("##### "+selection+"\n"); + cm.setCursor(cursor.line, cursor.ch +6); } }, h6 : function() { var cm = this.cm; var cursor = cm.getCursor(); + // var selection = cm.getLine(cursor.line); var selection = cm.getSelection(); - - if (cursor.ch !== 0) - { - cm.setCursor(cursor.line, 0); - cm.replaceSelection("###### " + selection); - cm.setCursor(cursor.line, cursor.ch + 7); - } - else + var patt1=new RegExp("^#{6}[ ]");//如果存在H6 + var patt2=new RegExp("^#{1,6}[ ]");//如果存在H1-H6 + //如果存在H6,取消H6的设置 + if (patt1.test(selection)===true){ + selection=selection.replace(/^#{6}[ ]/,""); + cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); + cm.replaceSelection(selection+"\n"); + cm.setCursor(cursor.line, cursor.ch -7); + } + //如果存在H1-H6,取消H1-H6,并替换为H6 + else if(patt2.test(selection)===true){ + selection=selection.replace(/^#{1,6}[ ]/,""); + cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); + cm.replaceSelection("###### "+selection+"\n"); + cm.setCursor(cursor.line, cursor.ch +7); + + }else + //设置为H6 { - cm.replaceSelection("###### " + selection); + cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); + cm.replaceSelection("###### "+selection+"\n"); + cm.setCursor(cursor.line, cursor.ch +7); } }, @@ -3106,20 +3453,35 @@ var cm = this.cm; var cursor = cm.getCursor(); var selection = cm.getSelection(); - - if (selection === "") + var patt1=new RegExp("^-{1}[ ]"); + var cnt =0; + //如果未选择,将该行设置为无序列表 + if (selection === "") { + cm.setCursor(cursor.line, 0); cm.replaceSelection("- " + selection); - } - else + cm.setCursor(cursor.line, cursor.ch + 2); + } + else { var selectionText = selection.split("\n"); - - for (var i = 0, len = selectionText.length; i < len; i++) + //判断取中内容是否已作无序列表标记 + for (var i = 0, len = selectionText.length; i < len; i++) { - selectionText[i] = (selectionText[i] === "") ? "" : "- " + selectionText[i]; + if (patt1.test(selectionText[i])===true ){cnt++;} + } + //如果全作了无序列表标记,取消标记 + if(cnt===selectionText.length){ + for (var i = 0, len = selectionText.length; i < len; i++){ + selectionText[i] = (selectionText[i] === "") ? "" : selectionText[i].replace(patt1,""); + } + }else + //对未打上无序列表标记,打上标记 + { + for (var i = 0, len = selectionText.length; i < len; i++){ + selectionText[i] = (selectionText[i] === "") ? "" : "- " + selectionText[i].replace(patt1,""); + } } - cm.replaceSelection(selectionText.join("\n")); } }, @@ -3128,20 +3490,34 @@ var cm = this.cm; var cursor = cm.getCursor(); var selection = cm.getSelection(); - - if(selection === "") + var patt1=new RegExp("^[0-9]+[\.][ ]"); + var cnt =0; + //如果未选择,将该行设置为有序列表 + if (selection === "") { + cm.setCursor(cursor.line, 0); cm.replaceSelection("1. " + selection); + cm.setCursor(cursor.line, cursor.ch + 3); } else { var selectionText = selection.split("\n"); - - for (var i = 0, len = selectionText.length; i < len; i++) + //判断取中内容是否已作有序列表标记 + for (var i = 0, len = selectionText.length; i < len; i++) { - selectionText[i] = (selectionText[i] === "") ? "" : (i+1) + ". " + selectionText[i]; + if (patt1.test(selectionText[i])===true ){cnt++;} + } + //如果全作了有序列表标记,取消标记 + if(cnt===selectionText.length){ + for (var i = 0, len = selectionText.length; i < len; i++){ + selectionText[i] = (selectionText[i] === "") ? "" : selectionText[i].replace(/^[0-9]+[\.][ ]/,""); + } + } else { + //对未打上有序列表标记,打上标记 + for (var i = 0, len = selectionText.length; i < len; i++){ + selectionText[i] = (selectionText[i] === "") ? "" : (i+1) + ". " + selectionText[i].replace(patt1,""); + } } - cm.replaceSelection(selectionText.join("\n")); } }, @@ -3160,7 +3536,7 @@ alert("settings.tex === false"); return this; } - + var cm = this.cm; var cursor = cm.getCursor(); var selection = cm.getSelection(); @@ -3186,7 +3562,7 @@ alert("settings.pageBreak === false"); return this; } - + var cm = this.cm; var selection = cm.getSelection(); @@ -3196,7 +3572,7 @@ image : function() { this.executePlugin("imageDialog", "image-dialog/image-dialog"); }, - + code : function() { var cm = this.cm; var cursor = cm.getCursor(); @@ -3210,17 +3586,17 @@ }, "code-block" : function() { - this.executePlugin("codeBlockDialog", "code-block-dialog/code-block-dialog"); + this.executePlugin("codeBlockDialog", "code-block-dialog/code-block-dialog"); }, "preformatted-text" : function() { this.executePlugin("preformattedTextDialog", "preformatted-text-dialog/preformatted-text-dialog"); }, - + table : function() { - this.executePlugin("tableDialog", "table-dialog/table-dialog"); + this.executePlugin("tableDialog", "table-dialog/table-dialog"); }, - + datetime : function() { var cm = this.cm; var selection = cm.getSelection(); @@ -3230,20 +3606,20 @@ cm.replaceSelection(datefmt); }, - + emoji : function() { this.executePlugin("emojiDialog", "emoji-dialog/emoji-dialog"); }, - + "html-entities" : function() { this.executePlugin("htmlEntitiesDialog", "html-entities-dialog/html-entities-dialog"); }, - + "goto-line" : function() { this.executePlugin("gotoLineDialog", "goto-line-dialog/goto-line-dialog"); }, - watch : function() { + watch : function() { this[this.settings.watch ? "unwatch" : "watch"](); }, @@ -3258,7 +3634,7 @@ clear : function() { this.clear(); }, - + search : function() { this.search(); }, @@ -3267,26 +3643,34 @@ this.executePlugin("helpDialog", "help-dialog/help-dialog"); }, + changetheme : function() { + this.setEditorTheme((this.settings.editorTheme=="default")?"pastel-on-dark":"default"); + this.setPreviewTheme((this.settings.previewTheme=="")?"dark":""); + }, + info : function() { this.showInfoDialog(); } }; - + + var isMac = navigator.platform.toUpperCase().indexOf('MAC')>=0; + var key = isMac ? "Cmd" : "Ctrl"; + editormd.keyMaps = { - "Ctrl-1" : "h1", - "Ctrl-2" : "h2", - "Ctrl-3" : "h3", - "Ctrl-4" : "h4", - "Ctrl-5" : "h5", - "Ctrl-6" : "h6", - "Ctrl-B" : "bold", // if this is string == editormd.toolbarHandlers.xxxx - "Ctrl-D" : "datetime", - - "Ctrl-E" : function() { // emoji + [key + "-1"] : "h1", + [key + "-2"] : "h2", + [key + "-3"] : "h3", + [key + "-4"] : "h4", + [key + "-5"] : "h5", + [key + "-6"] : "h6", + [key + "-B"] : "bold", // if this is string == editormd.toolbarHandlers.xxxx + [key + "-D"] : "datetime", + + [key + "-E"] : function() { // emoji var cm = this.cm; var cursor = cm.getCursor(); var selection = cm.getSelection(); - + if (!this.settings.emoji) { alert("Error: settings.emoji == false"); @@ -3299,16 +3683,16 @@ cm.setCursor(cursor.line, cursor.ch + 1); } }, - "Ctrl-Alt-G" : "goto-line", - "Ctrl-H" : "hr", - "Ctrl-I" : "italic", - "Ctrl-K" : "code", - - "Ctrl-L" : function() { + [key + "-Alt-G"] : "goto-line", + [key + "-H"] : "hr", + [key + "-I"] : "italic", + [key + "-K"] : "code", + + [key + "-L"] : function() { var cm = this.cm; var cursor = cm.getCursor(); var selection = cm.getSelection(); - + var title = (selection === "") ? "" : " \""+selection+"\""; cm.replaceSelection("[" + selection + "]("+title+")"); @@ -3317,13 +3701,13 @@ cm.setCursor(cursor.line, cursor.ch + 1); } }, - "Ctrl-U" : "list-ul", - - "Shift-Ctrl-A" : function() { + [key + "-U"] : "list-ul", + + ["Shift-" + key + "-A"] : function() { var cm = this.cm; var cursor = cm.getCursor(); var selection = cm.getSelection(); - + if (!this.settings.atLink) { alert("Error: settings.atLink == false"); @@ -3336,38 +3720,38 @@ cm.setCursor(cursor.line, cursor.ch + 1); } }, - - "Shift-Ctrl-C" : "code", - "Shift-Ctrl-Q" : "quote", - "Shift-Ctrl-S" : "del", - "Shift-Ctrl-K" : "tex", // KaTeX - + + ["Shift" + key + "-C"] : "code", + ["Shift" + key + "Q"] : "quote", + ["Shift" + key + "S"] : "del", + ["Shift" + key + "K"] : "tex", // KaTeX + "Shift-Alt-C" : function() { var cm = this.cm; var cursor = cm.getCursor(); var selection = cm.getSelection(); - + cm.replaceSelection(["```", selection, "```"].join("\n")); if (selection === "") { cm.setCursor(cursor.line, cursor.ch + 3); - } + } }, - - "Shift-Ctrl-Alt-C" : "code-block", - "Shift-Ctrl-H" : "html-entities", - "Shift-Alt-H" : "help", - "Shift-Ctrl-E" : "emoji", - "Shift-Ctrl-U" : "uppercase", - "Shift-Alt-U" : "ucwords", - "Shift-Ctrl-Alt-U" : "ucfirst", - "Shift-Alt-L" : "lowercase", - - "Shift-Ctrl-I" : function() { + + ["Shift-" + key + "-Alt-C"] : "code-block", + ["Shift-" + key + "-H"] : "html-entities", + "Shift-Alt-H" : "help", + ["Shift-" + key + "-E"] : "emoji", + ["Shift-" + key + "-U"] : "uppercase", + "Shift-Alt-U" : "ucwords", + ["Shift-" + key + "-Alt-U"] : "ucfirst", + "Shift-Alt-L" : "lowercase", + + ["Shift-" + key + "-I"] : function() { var cm = this.cm; var cursor = cm.getCursor(); var selection = cm.getSelection(); - + var title = (selection === "") ? "" : " \""+selection+"\""; cm.replaceSelection("![" + selection + "]("+title+")"); @@ -3376,76 +3760,76 @@ cm.setCursor(cursor.line, cursor.ch + 4); } }, - - "Shift-Ctrl-Alt-I" : "image", - "Shift-Ctrl-L" : "link", - "Shift-Ctrl-O" : "list-ol", - "Shift-Ctrl-P" : "preformatted-text", - "Shift-Ctrl-T" : "table", - "Shift-Alt-P" : "pagebreak", - "F9" : "watch", - "F10" : "preview", - "F11" : "fullscreen", + + ["Shift-" + key + "-Alt-I"] : "image", + ["Shift-" + key + "-L"] : "link", + ["Shift-" + key + "-O"] : "list-ol", + ["Shift-" + key + "-P"] : "preformatted-text", + ["Shift-" + key + "-T"] : "table", + "Shift-Alt-P" : "pagebreak", + "F9" : "watch", + "F10" : "preview", + "F11" : "fullscreen", }; - + /** * 清除字符串两边的空格 * Clear the space of strings both sides. - * + * * @param {String} str string - * @returns {String} trimed string + * @returns {String} trimed string */ - + var trim = function(str) { return (!String.prototype.trim) ? str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "") : str.trim(); }; - + editormd.trim = trim; - + /** * 所有单词首字母大写 * Words first to uppercase - * + * * @param {String} str string * @returns {String} string */ - + var ucwords = function (str) { - return str.toLowerCase().replace(/\b(\w)|\s(\w)/g, function($1) { + return str.toLowerCase().replace(/\b(\w)|\s(\w)/g, function($1) { return $1.toUpperCase(); }); }; - + editormd.ucwords = editormd.wordsFirstUpperCase = ucwords; - + /** * 字符串首字母大写 * Only string first char to uppercase - * + * * @param {String} str string * @returns {String} string */ - - var firstUpperCase = function(str) { + + var firstUpperCase = function(str) { return str.toLowerCase().replace(/\b(\w)/, function($1){ return $1.toUpperCase(); }); }; - + var ucfirst = firstUpperCase; - + editormd.firstUpperCase = editormd.ucfirst = firstUpperCase; - + editormd.urls = { atLinkBase : "https://github.com/" }; - + editormd.regexs = { atLink : /@(\w+)/g, email : /(\w+)@(\w+)\.(\w+)\.?(\w+)?/g, emailLink : /(mailto:)?([\w\.\_]+)@(\w+)\.(\w+)\.?(\w+)?/g, emoji : /:([\w\+-]+):/g, - emojiDatetime : /(\d{2}:\d{2}:\d{2})/g, + emojiDatetime : /(\d{1,2}:\d{1,2}:\d{1,2})/g, twemoji : /:(tw-([\w]+)-?(\w+)?):/g, fontAwesome : /:(fa-([\w]+)(-(\w+)){0,}):/g, editormdLogo : /:(editormd-logo-?(\w+)?):/g, @@ -3454,11 +3838,12 @@ // Emoji graphics files url path editormd.emoji = { - path : "http://www.emoji-cheat-sheet.com/graphics/emojis/", + // path : "http://www.emoji-cheat-sheet.com/graphics/emojis/", + path: "https://www.webpagefx.com/tools/emoji-cheat-sheet/graphics/emojis/", ext : ".png" }; - // Twitter Emoji (Twemoji) graphics files url path + // Twitter Emoji (Twemoji) graphics files url path editormd.twemoji = { path : "http://twemoji.maxcdn.com/36x36/", ext : ".png" @@ -3467,7 +3852,7 @@ /** * 自定义marked的解析器 * Custom Marked renderer rules - * + * * @param {Array} markdownToC 传入用于接收TOC的数组 * @returns {Renderer} markedRenderer 返回marked的Renderer自定义对象 */ @@ -3476,7 +3861,7 @@ var defaults = { toc : true, // Table of contents tocm : false, - tocStartLevel : 1, // Said from H1 to create ToC + tocStartLevel : 1, // Said from H1 to create ToC pageBreak : true, atLink : true, // for @link emailLink : true, // for mail address auto link @@ -3485,13 +3870,14 @@ tex : false, // TeX(LaTeX), based on KaTeX flowChart : false, // flowChart.js only support IE9+ sequenceDiagram : false, // sequenceDiagram.js only support IE9+ + mermaid : true, }; - - var settings = $.extend(defaults, options || {}); + + var settings = $.extend(defaults, options || {}); var marked = editormd.$marked; var markedRenderer = new marked.Renderer(); - markdownToC = markdownToC || []; - + markdownToC = markdownToC || []; + var regexs = editormd.regexs; var atLinkReg = regexs.atLink; var emojiReg = regexs.emoji; @@ -3502,12 +3888,83 @@ var editormdLogoReg = regexs.editormdLogo; var pageBreakReg = regexs.pageBreak; + markedRenderer.blockquote = function($quote) { + + var quoteBegin = ""; + + var ps = $quote.match(//i); + if(ps !== null) { + quoteBegin = ps[0]; + $quote = $quote.substr(quoteBegin.length); + } + var $class = "default"; + + if($quote.indexOf("[info]") === 0){ + $class = "info"; + $quote = $quote.substr(6); + }else if($quote.indexOf("[warning]") === 0){ + $class = "warning"; + $quote = $quote.substr(9); + }else if($quote.indexOf("[success]") === 0){ + $class = "success"; + $quote = $quote.substr(9); + }else if($quote.indexOf("[danger]") === 0){ + $class = "danger"; + $quote = $quote.substr(8); + } + + return '
      \n' + quoteBegin + $quote + '
      \n'; + }; + + markedRenderer.image = function(href,title,text) { + var attr = ""; + var begin = ""; + var end = ""; + + if(href && href !== ""){ + var a = document.createElement('a'); + a.href = href; + var attrs = a.hash.match(/size=\d+x\d+/i); + if(attrs !== null) { + a.hash = a.hash.replace(attrs[0],""); + href = a.href; + attrs = attrs[0].replace("size=","").split("x"); + if(attrs[0] > 0) { + attr += " width=\"" + attrs[0] + "\"" + } + if(attrs[1] > 0) { + attr += " height=\"" + attrs[1] + "\"" + } + } + attrs = a.hash.match(/align=(center|left|right)/i) + if (attrs !== null) { + var hash = a.hash.replace(attrs[0],""); + if (hash.indexOf("#&") === 0) { + hash = "#" + hash.substr(2); + } + a.hash = hash; + + href = a.href; + attrs = attrs[0].replace("align=",""); + end = "

      "; + if(attrs === "center"){ + begin = '

      '; + }else if (attrs === "left") { + begin = '

      '; + }else if (attrs === "right") { + begin = '

      '; + } + } + } + return begin + "\""+text+"\"" + end; + }; + markedRenderer.emoji = function(text) { - - text = text.replace(editormd.regexs.emojiDatetime, function($1) { + + text = text.replace(editormd.regexs.emojiDatetime, function($1) { return $1.replace(/:/g, ":"); }); - + var matchs = text.match(emojiReg); if (!matchs || !settings.emoji) { @@ -3515,7 +3972,7 @@ } for (var i = 0, len = matchs.length; i < len; i++) - { + { if (matchs[i] === ":+1:") { matchs[i] = ":\\+1:"; } @@ -3525,11 +3982,11 @@ var name = $1.replace(/:/g, ""); if (faMatchs) - { + { for (var fa = 0, len1 = faMatchs.length; fa < len1; fa++) { var faName = faMatchs[fa].replace(/:/g, ""); - + return ""; } } @@ -3538,15 +3995,15 @@ var emdlogoMathcs = $1.match(editormdLogoReg); var twemojiMatchs = $1.match(twemojiReg); - if (emdlogoMathcs) - { + if (emdlogoMathcs) + { for (var x = 0, len2 = emdlogoMathcs.length; x < len2; x++) { var logoName = emdlogoMathcs[x].replace(/:/g, ""); return ""; } } - else if (twemojiMatchs) + else if (twemojiMatchs) { for (var t = 0, len3 = twemojiMatchs.length; t < len3; t++) { @@ -3572,18 +4029,18 @@ markedRenderer.atLink = function(text) { if (atLinkReg.test(text)) - { - if (settings.atLink) + { + if (settings.atLink) { text = text.replace(emailReg, function($1, $2, $3, $4) { return $1.replace(/@/g, "_#_@_#_"); }); text = text.replace(atLinkReg, function($1, $2) { - return "" + $1 + ""; + return "" + $1 + ""; }).replace(/_#_@_#_/g, "@"); } - + if (settings.emailLink) { text = text.replace(emailLinkReg, function($1, $2, $3, $4, $5) { @@ -3596,7 +4053,7 @@ return text; }; - + markedRenderer.link = function (href, title, text) { if (this.options.sanitize) { @@ -3610,16 +4067,22 @@ return ""; } } + if(href.indexOf("@") === 0){ + return ''; + } + + var out = "" + text.replace(/@/g, "@") + ""; } @@ -3631,14 +4094,14 @@ return out; }; - + markedRenderer.heading = function(text, level, raw) { - + var linkText = text; var hasLinkReg = /\s*\]*)\>(.*)\<\/a\>\s*/; var getLinkTextReg = /\s*\]+)\>([^\>]*)\<\/a\>\s*/g; - if (hasLinkReg.test(text)) + if (hasLinkReg.test(text)) { var tempText = []; text = text.split(/\]+)\>([^\>]*)\<\/a\>/); @@ -3650,83 +4113,113 @@ text = tempText.join(" "); } - + text = trim(text); - + var escapedText = text.toLowerCase().replace(/[^\w]+/g, "-"); var toc = { text : text, level : level, - slug : escapedText + slug : escapedText, + id : id }; - + var isChinese = /^[\u4e00-\u9fa5]+$/.test(text); - var id = (isChinese) ? escape(text).replace(/\%/g, "") : text.toLowerCase().replace(/[^\w]+/g, "-"); + var id = (isChinese) ? encodeURIComponent(text).replace(/\%/g, "") : text.toLowerCase().replace(/[^\w]+/g, "-"); + // var id = Math.floor(Math.random() * 1000000000 ).toString(36); markdownToC.push(toc); - + var headingHTML = ""; - - headingHTML += ""; + headingHTML += ""; headingHTML += (hasLinkReg) ? this.atLink(this.emoji(linkText)) : this.atLink(this.emoji(text)); headingHTML += ""; return headingHTML; }; - + markedRenderer.pageBreak = function(text) { if (pageBreakReg.test(text) && settings.pageBreak) { text = "


      "; } - + return text; }; markedRenderer.paragraph = function(text) { - var isTeXInline = /\$\$(.*)\$\$/g.test(text); - var isTeXLine = /^\$\$(.*)\$\$$/.test(text); + var isTeXInline = /\$\$(.+?)\$\$/g.test(text); + var isTeXLine = /^(?!\$\$.+?(?:\$\$).+?\$\$)(\$\$(.+?)\$\$)$/.test(text); var isTeXAddClass = (isTeXLine) ? " class=\"" + editormd.classNames.tex + "\"" : ""; var isToC = (settings.tocm) ? /^(\[TOC\]|\[TOCM\])$/.test(text) : /^\[TOC\]$/.test(text); var isToCMenu = /^\[TOCM\]$/.test(text); - - if (!isTeXLine && isTeXInline) + + if (!isTeXLine && isTeXInline) { - text = text.replace(/(\$\$([^\$]*)\$\$)+/g, function($1, $2) { - return "" + $2.replace(/\$/g, "") + ""; + text = text.replaceAll(/(\$\$(.+?)\$\$)/g, function(match, $1, $2) { + return "" + $2.replaceAll(/\/g,"") + ""; }); - } - else + } + else { - text = (isTeXLine) ? text.replace(/\$/g, "") : text; + text = (isTeXLine) ? text.replace(/^(?!\$\$.+?(?:\$\$).+?\$\$)(\$\$(.+?)\$\$)$/, (match, $1, $2) => $2) : text; } - + var tocHTML = "
      " + text + "
      "; - + return (isToC) ? ( (isToCMenu) ? "
      " + tocHTML + "

      " : tocHTML ) : ( (pageBreakReg.test(text)) ? this.pageBreak(text) : "" + this.atLink(this.emoji(text)) + "

      \n" ); }; - markedRenderer.code = function (code, lang, escaped) { + markedRenderer.code = function (code, lang, escaped) { if (lang === "seq" || lang === "sequence") { return "
      " + code + "
      "; - } else if (lang === "gantt"){ - return "
      + code + "
      " + } + else if (lang === "mermaid"){ + var $chars = 'ABCDEFGHJKLMNOPQRSTUVWXYZabcdefhijlkmnopqrstuvwxyz012345678'; + + var maxPos = $chars.length; + var id = ''; + for (var i = 0; i < 4; i++) { + id += $chars.charAt(Math.floor(Math.random() * maxPos)); + } + + return "
      " + code + "
      "; } else if ( lang === "flow") { return "
      " + code + "
      "; - } + } else if ( lang === "math" || lang === "latex" || lang === "katex") { - return "

      " + code + "

      "; - } - else + return "

      " + code + "

      "; + } + else if (/^mindmap/i.test(lang)){ + var len = 9 || 32; + var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; + var maxPos = $chars.length; + var map_id = ''; + var custom_height; + var h = lang.split('>')[1]; + if (h != undefined) { + custom_height = h; + } else { + custom_height = 150; + } + for (var i = 0; i < len; i++) { + map_id += $chars.charAt(Math.floor(Math.random() * maxPos)); + } + return ""+code+""; + } + if (lang === "drawio") { + var svgCode = decodeURIComponent(escape(window.atob(code))) + return "
      " + svgCode + "
      " + } + else { - return marked.Renderer.prototype.code.apply(this, arguments); } }; @@ -3734,109 +4227,113 @@ markedRenderer.tablecell = function(content, flags) { var type = (flags.header) ? "th" : "td"; var tag = (flags.align) ? "<" + type +" style=\"text-align:" + flags.align + "\">" : "<" + type + ">"; - + return tag + this.atLink(this.emoji(content)) + "\n"; }; markedRenderer.listitem = function(text) { - if (settings.taskList && /^\s*\[[x\s]\]\s*/.test(text)) + if (settings.taskList && /^\s*\[[x\s]\]\s*/.test(text)) { text = text.replace(/^\s*\[\s\]\s*/, " ") .replace(/^\s*\[x\]\s*/, " "); return "
    • " + this.atLink(this.emoji(text)) + "
    • "; } - else + else { return "
    • " + this.atLink(this.emoji(text)) + "
    • "; } }; - + markedRenderer.checkbox = function(checked){ + return checked ? ' ' : ' '; + }; + return markedRenderer; }; - + /** * * 生成TOC(Table of Contents) * Creating ToC (Table of Contents) - * + * * @param {Array} toc 从marked获取的TOC数组列表 * @param {Element} container 插入TOC的容器元素 * @param {Integer} startLevel Hx 起始层级 * @returns {Object} tocContainer 返回ToC列表容器层的jQuery对象元素 */ - + editormd.markdownToCRenderer = function(toc, container, tocDropdown, startLevel) { - - var html = ""; + + var html = ""; var lastLevel = 0; var classPrefix = this.classPrefix; - + startLevel = startLevel || 1; - - for (var i = 0, len = toc.length; i < len; i++) + + for (var i = 0, len = toc.length; i < len; i++) { var text = toc[i].text; var level = toc[i].level; - + var id = toc[i].id; + if (level < startLevel) { continue; } - - if (level > lastLevel) + + if (level > lastLevel) { html += ""; } - else if (level < lastLevel) + else if (level < lastLevel) { html += (new Array(lastLevel - level + 2)).join(""); - } - else + } + else { html += ""; } - html += "
    • " + text + "
        "; + html += "
      • " + text + "
          "; lastLevel = level; } - + var tocContainer = container.find(".markdown-toc"); - + if ((tocContainer.length < 1 && container.attr("previewContainer") === "false")) { var tocHTML = "
          "; - + tocHTML = (tocDropdown) ? "
          " + tocHTML + "
          " : tocHTML; - + container.html(tocHTML); - + tocContainer = container.find(".markdown-toc"); } - + if (tocDropdown) { tocContainer.wrap("

          "); } - + tocContainer.html("
            ").children(".markdown-toc-list").html(html.replace(/\r?\n?\\<\/ul\>/g, "")); - + return tocContainer; }; - + /** * * 生成TOC下拉菜单 * Creating ToC dropdown menu - * + * * @param {Object} container 插入TOC的容器jQuery对象元素 * @param {String} tocTitle ToC title * @returns {Object} return toc-menu object */ - + editormd.tocDropdownMenu = function(container, tocTitle) { - + tocTitle = tocTitle || "Table of Contents"; - + var zindex = 400; var tocMenus = container.find("." + this.classPrefix + "toc-menu"); @@ -3845,13 +4342,13 @@ var toc = $this.children(".markdown-toc"); var icon = ""; var btn = "" + icon + tocTitle + ""; - var menu = toc.children("ul"); + var menu = toc.children("ul"); var list = menu.find("li"); - + toc.append(btn); - + list.first().before("
          • " + tocTitle + " " + icon + "

          • "); - + $this.mouseover(function(){ menu.show(); @@ -3883,27 +4380,27 @@ }); }).mouseleave(function(){ menu.hide(); - }); - }); - + }); + }); + return tocMenus; }; - + /** * 简单地过滤指定的HTML标签 * Filter custom html tags - * + * * @param {String} html 要过滤HTML * @param {String} filters 要过滤的标签 * @returns {String} html 返回过滤的HTML */ - + editormd.filterHTMLTags = function(html, filters) { - + if (typeof html !== "string") { html = new String(html); } - + if (typeof filters !== "string") { return html; } @@ -3918,7 +4415,7 @@ html = html.replace(new RegExp("\<\s*" + tag + "\s*([^\>]*)\>([^\>]*)\<\s*\/" + tag + "\s*\>", "igm"), ""); } - + //return html; if (typeof attrs !== "undefined") @@ -3929,7 +4426,7 @@ { html = html.replace(htmlTagRegex, function($1, $2, $3, $4, $5) { return "<" + $2 + ">" + $4 + ""; - }); + }); } else if (attrs === "on*") { @@ -3937,19 +4434,19 @@ var el = $("<" + $2 + ">" + $4 + ""); var _attrs = $($1)[0].attributes; var $attrs = {}; - + $.each(_attrs, function(i, e) { if (e.nodeName !== '"') $attrs[e.nodeName] = e.nodeValue; }); - - $.each($attrs, function(i) { + + $.each($attrs, function(i) { if (i.indexOf("on") === 0) { delete $attrs[i]; } }); - + el.attr($attrs); - + var text = (typeof el[1] !== "undefined") ? $(el[1]).text() : ""; return el[0].outerHTML + text; @@ -3970,19 +4467,20 @@ }); } } - + return html; }; - + editormd.$filterXSS = editormd.filterHTMLTags; + /** * 将Markdown文档解析为HTML用于前台显示 * Parse Markdown to HTML for Font-end preview. - * + * * @param {String} id 用于显示HTML的对象ID * @param {Object} [options={}] 配置选项,可选 * @returns {Object} div 返回jQuery对象元素 */ - + editormd.markdownToHTML = function(id, options) { var defaults = { gfm : true, @@ -4004,25 +4502,27 @@ emoji : false, flowChart : false, sequenceDiagram : false, - previewCodeHighlight : true + previewCodeHighlight : true, + mermaid : true, + mindMap : true, //思维导图 }; - + editormd.$marked = marked; var div = $("#" + id); var settings = div.settings = $.extend(true, defaults, options || {}); var saveTo = div.find("textarea"); - + if (saveTo.length < 1) { div.append(""); saveTo = div.find("textarea"); - } - - var markdownDoc = (settings.markdown === "") ? saveTo.val() : settings.markdown; + } + + var markdownDoc = (settings.markdown === undefined) ? saveTo.val() : settings.markdown; var markdownToC = []; - var rendererOptions = { + var rendererOptions = { toc : settings.toc, tocm : settings.tocm, tocStartLevel : settings.tocStartLevel, @@ -4034,6 +4534,8 @@ emailLink : settings.emailLink, // for mail address auto link flowChart : settings.flowChart, sequenceDiagram : settings.sequenceDiagram, + mermaid : settings.mermaid, + mindMap : settings.mindMap, // 思维导图 previewCodeHighlight : settings.previewCodeHighlight, }; @@ -4047,73 +4549,75 @@ smartLists : true, smartypants : true }; - + markdownDoc = new String(markdownDoc); - - var markdownParsed = marked(markdownDoc, markedOptions); - - markdownParsed = editormd.filterHTMLTags(markdownParsed, settings.htmlDecode); - + + var markdownParsed = marked.parse(markdownDoc, markedOptions); + + markdownParsed = editormd.$filterXSS(markdownParsed); + if (settings.markdownSourceCode) { saveTo.text(markdownDoc); } else { saveTo.remove(); } - + div.addClass("markdown-body " + this.classPrefix + "html-preview").append(markdownParsed); - + var tocContainer = (settings.tocContainer !== "") ? $(settings.tocContainer) : div; - + if (settings.tocContainer !== "") { tocContainer.attr("previewContainer", false); } - - if (settings.toc) + + if (settings.toc) { div.tocContainer = this.markdownToCRenderer(markdownToC, tocContainer, settings.tocDropdown, settings.tocStartLevel); - + if (settings.tocDropdown || div.find("." + this.classPrefix + "toc-menu").length > 0) { this.tocDropdownMenu(div, settings.tocTitle); } - + if (settings.tocContainer !== "") { div.find(".editormd-toc-menu, .editormd-markdown-toc").remove(); } } - - if (settings.previewCodeHighlight) + + if (settings.previewCodeHighlight) { - //div.find("pre").addClass("prettyprint"); - //prettyPrint(); - div.find("pre").each(function (i, block) { - hljs.highlightBlock(block); - }); + div.find("pre").addClass("prettyprint linenums"); + //TODO: fix later if we decide to generate html + prettyPrint(); + // prettyPrint($.proxy(editormd.settings.fixCodeBlocks, editormd)); } - - if (!editormd.isIE8) + + if (!editormd.isIE8) { if (settings.flowChart) { - div.find(".flowchart").flowChart(); + div.find(".flowchart").flowChart(); } if (settings.sequenceDiagram) { div.find(".sequence-diagram").sequenceDiagram({theme: "simple"}); } + if (settings.mermaid) { + window.mermaid.init(void 0, div.find(".lang-mermaid")); + } } if (settings.tex) { var katexHandle = function() { div.find("." + editormd.classNames.tex).each(function(){ - var tex = $(this); - katex.render(tex.html().replace(/</g, "<").replace(/>/g, ">"), tex[0]); + var tex = $(this); + katex.render(tex.html().replace(/</g, "<").replace(/>/g, ">"), tex[0]); tex.find(".katex").css("font-size", "1.6em"); }); }; - + if (settings.autoLoadKaTeX && !editormd.$katex && !editormd.kaTeXLoaded) { this.loadKaTeX(function() { @@ -4127,22 +4631,34 @@ katexHandle(); } } - - div.getMarkdown = function() { + + // 前台渲染脑图 + if(settings.mindMap){ + var mindmapHandle = function(){ + div.find(".mindmap").each(function(){ + var mmap = $(this); + var md_data = window.markmap.transform(mmap.text().trim()); + window.markmap.markmap("svg#"+this.id,md_data) + }); + } + mindmapHandle(); + } + + div.getMarkdown = function() { return saveTo.val(); }; - + return div; }; - + // Editor.md themes, change toolbar themes etc. // added @1.5.0 editormd.themes = ["default", "dark"]; - + // Preview area themes // added @1.5.0 editormd.previewThemes = ["default", "dark"]; - + // CodeMirror / editor area themes // @1.5.0 rename -> editorThemes, old version -> themes editormd.editorThemes = [ @@ -4163,44 +4679,47 @@ ]; editormd.loadPlugins = {}; - + editormd.loadFiles = { js : [], css : [], plugin : [] }; - + /** * 动态加载Editor.md插件,但不立即执行 * Load editor.md plugins - * + * * @param {String} fileName 插件文件路径 * @param {Function} [callback=function()] 加载成功后执行的回调函数 * @param {String} [into="head"] 嵌入页面的位置 + * @param {String} [version=editormd.version] */ - - editormd.loadPlugin = function(fileName, callback, into) { + + editormd.loadPlugin = function(fileName, callback, into, version) { callback = callback || function() {}; - + this.loadScript(fileName, function() { editormd.loadFiles.plugin.push(fileName); callback(); - }, into); + }, into, version); }; - + /** * 动态加载CSS文件的方法 * Load css file method - * + * * @param {String} fileName CSS文件名 * @param {Function} [callback=function()] 加载成功后执行的回调函数 * @param {String} [into="head"] 嵌入页面的位置 + * @param {String} [version=editormd.version] */ - - editormd.loadCSS = function(fileName, callback, into) { - into = into || "head"; + + editormd.loadCSS = function(fileName, callback, into, version=editormd.version) { + into = into || "head"; callback = callback || function() {}; - + version = version || editormd.version + var css = document.createElement("link"); css.type = "text/css"; css.rel = "stylesheet"; @@ -4209,7 +4728,7 @@ callback(); }; - css.href = fileName + ".css"; + css.href = fileName + `.css?editormd_version=${version}`; if(into === "head") { document.getElementsByTagName("head")[0].appendChild(css); @@ -4217,42 +4736,43 @@ document.body.appendChild(css); } }; - + editormd.isIE = (navigator.appName == "Microsoft Internet Explorer"); editormd.isIE8 = (editormd.isIE && navigator.appVersion.match(/8./i) == "8."); /** * 动态加载JS文件的方法 * Load javascript file method - * + * * @param {String} fileName JS文件名 * @param {Function} [callback=function()] 加载成功后执行的回调函数 * @param {String} [into="head"] 嵌入页面的位置 */ - editormd.loadScript = function(fileName, callback, into) { - + editormd.loadScript = function(fileName, callback, into, version) { + into = into || "head"; + version = version || editormd.version callback = callback || function() {}; - - var script = null; + + var script = null; script = document.createElement("script"); script.id = fileName.replace(/[\./]+/g, "-"); - script.type = "text/javascript"; - script.src = fileName + ".js"; - - if (editormd.isIE8) - { + script.type = "text/javascript"; + script.src = fileName + `.js?editormd_version=${version}`; + + if (editormd.isIE8) + { script.onreadystatechange = function() { - if(script.readyState) + if(script.readyState) { - if (script.readyState === "loaded" || script.readyState === "complete") + if (script.readyState === "loaded" || script.readyState === "complete") { - script.onreadystatechange = null; + script.onreadystatechange = null; editormd.loadFiles.js.push(fileName); callback(); } - } + } }; } else @@ -4269,45 +4789,48 @@ document.body.appendChild(script); } }; - - // 使用国外的CDN,加载速度有时会很慢,或者自定义URL + + // 使用国内的CDN,或者自定义URL // You can custom KaTeX load url. editormd.katexURL = { - css : "//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min", - js : "//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min" + css: "https://cdn.bootcdn.net/ajax/libs/KaTeX/0.16.8/katex.min", + jsmain: "https://cdn.bootcdn.net/ajax/libs/KaTeX/0.16.8/katex.min", + jsauto: "https://cdn.bootcdn.net/ajax/libs/KaTeX/0.16.8/contrib/auto-render.min" }; - + editormd.kaTeXLoaded = false; - + /** * 加载KaTeX文件 * load KaTeX files - * + * * @param {Function} [callback=function()] 加载成功后执行的回调函数 */ - + editormd.loadKaTeX = function (callback) { editormd.loadCSS(editormd.katexURL.css, function(){ - editormd.loadScript(editormd.katexURL.js, callback || function(){}); + editormd.loadScript(editormd.katexURL.jsmain, function() { + editormd.loadScript(editormd.katexURL.jsauto, callback || function() {}) + }) }); }; - + /** * 锁屏 * lock screen - * + * * @param {Boolean} lock Boolean 布尔值,是否锁屏 * @returns {void} */ - + editormd.lockScreen = function(lock) { $("html,body").css("overflow", (lock) ? "hidden" : ""); }; - + /** * 动态创建对话框 * Creating custom dialogs - * + * * @param {Object} options 配置项键值对 Key/Value * @returns {dialog} 返回创建的dialog的jQuery实例对象 */ @@ -4316,7 +4839,7 @@ var defaults = { name : "", width : 420, - height: 240, + height: "auto", title : "", drag : true, closed : true, @@ -4326,13 +4849,20 @@ backgroundColor : "#fff", opacity : 0.1 }, + removeDialogOnClose: false, + resizeableX: false, + resizeableY: false, + minWidth: 0, + minHeight: 0, + maxWidth: "none", + maxHeight: "none", lockScreen : true, footer : true, buttons : false }; options = $.extend(true, defaults, options); - + var $this = this; var editor = this.editor; var classPrefix = editormd.classPrefix; @@ -4345,18 +4875,17 @@ if (options.title !== "") { html += "
            "; - html += "" + options.title + ""; + html += "" + options.title + ""; + if (options.closed) + { + html += ""; + } html += "
            "; } - if (options.closed) - { - html += ""; - } + html += "
            " + options.content; - html += "
            " + options.content; - - if (options.footer || typeof options.footer === "string") + if (options.footer || typeof options.footer === "string") { html += "
            " + ( (typeof options.footer === "boolean") ? "" : options.footer) + "
            "; } @@ -4373,7 +4902,7 @@ dialog.lockScreen = function(lock) { if (options.lockScreen) - { + { $("html,body").css("overflow", (lock) ? "hidden" : ""); $this.resize(); } @@ -4398,7 +4927,7 @@ return dialog; }; - dialog.loading = function(show) { + dialog.loading = function(show) { var loading = dialog.find("." + classPrefix + "dialog-mask"); loading[(show) ? "show" : "hide"](); @@ -4411,7 +4940,14 @@ zIndex : editormd.dialogZindex, border : (editormd.isIE8) ? "1px solid #ddd" : "", width : (typeof options.width === "number") ? options.width + "px" : options.width, - height : (typeof options.height === "number") ? options.height + "px" : options.height + height : (typeof options.height === "number") ? options.height + "px" : options.height, + "min-width": (typeof options.minWidth === "number") ? options.minWidth + "px" : options.minWidth, + "min-height": (typeof options.minHeight === "number") ? options.minHeight + "px" : options.minHeight, + "max-width": (typeof options.maxWidth === "number") ? options.maxWidth + "px" : options.maxWidth, + "max-height": (typeof options.maxHeight === "number") ? options.maxHeight + "px" : options.maxHeight, + ...((options.resizeableX || options.resizeableY) ? { overflow: 'hidden', + resize: (options.resizeableX && options.resizeableY) ? "both" : ((options.resizeableX) ? "horizontal" : "vertical") + } : {}) }); var dialogPosition = function(){ @@ -4425,8 +4961,9 @@ $(window).resize(dialogPosition); - dialog.children("." + classPrefix + "dialog-close").bind(mouseOrTouch("click", "touchend"), function() { + dialog.find("." + classPrefix + "dialog-close").bind(mouseOrTouch("click", "touchend"), function() { dialog.hide().lockScreen(false).hideMask(); + if (options.removeDialogOnClose) dialog.remove() }); if (typeof options.buttons === "object") @@ -4445,7 +4982,7 @@ } if (options.title !== "" && options.drag) - { + { var posX, posY; var dialogHeader = dialog.children("." + classPrefix + "dialog-header"); @@ -4461,7 +4998,7 @@ posX = e.clientX - parseInt(dialog[0].style.left); posY = e.clientY - parseInt(dialog[0].style.top); - document.onmousemove = moveAction; + document.onmousemove = moveAction; }); var userCanSelect = function (obj) { @@ -4469,7 +5006,7 @@ }; var userUnselect = function (obj) { - obj.addClass(classPrefix + "user-unselect").on("selectstart", function(event) { // selectstart for IE + obj.addClass(classPrefix + "user-unselect").on("selectstart", function(event) { // selectstart for IE return false; }); }; @@ -4482,7 +5019,7 @@ if( nowLeft >= 0 ) { if( nowLeft + dialog.width() <= $(window).width()) { left = e.clientX - posX; - } else { + } else { left = $(window).width() - dialog.width(); document.onmousemove = null; } @@ -4509,18 +5046,18 @@ dialog[0].style.top = top + "px"; }; - document.onmouseup = function() { + document.onmouseup = function() { userCanSelect($("body")); userCanSelect(dialog); - document.onselectstart = null; + document.onselectstart = null; document.onmousemove = null; }; dialogHeader.touchDraggable = function() { var offset = null; var start = function(e) { - var orig = e.originalEvent; + var orig = e.originalEvent; var pos = $(this).parent().position(); offset = { @@ -4549,20 +5086,20 @@ return dialog; }; - + /** * 鼠标和触摸事件的判断/选择方法 * MouseEvent or TouchEvent type switch - * + * * @param {String} [mouseEventType="click"] 供选择的鼠标事件 * @param {String} [touchEventType="touchend"] 供选择的触摸事件 * @returns {String} EventType 返回事件类型名称 */ - + editormd.mouseOrTouch = function(mouseEventType, touchEventType) { mouseEventType = mouseEventType || "click"; touchEventType = touchEventType || "touchend"; - + var eventType = mouseEventType; try { @@ -4572,23 +5109,23 @@ return eventType; }; - + /** * 日期时间的格式化方法 * Datetime format method - * + * * @param {String} [format=""] 日期时间的格式,类似PHP的格式 * @returns {String} datefmt 返回格式化后的日期时间字符串 */ - - editormd.dateFormat = function(format) { + + editormd.dateFormat = function(format) { format = format || ""; var addZero = function(d) { return (d < 10) ? "0" + d : d; }; - var date = new Date(); + var date = new Date(); var year = date.getFullYear(); var year2 = year.toString().slice(2, 4); var month = addZero(date.getMonth() + 1); @@ -4597,14 +5134,14 @@ var hour = addZero(date.getHours()); var min = addZero(date.getMinutes()); var second = addZero(date.getSeconds()); - var ms = addZero(date.getMilliseconds()); + var ms = addZero(date.getMilliseconds()); var datefmt = ""; var ymd = year2 + "-" + month + "-" + day; var fymd = year + "-" + month + "-" + day; var hms = hour + ":" + min + ":" + second; - switch (format) + switch (format) { case "UNIX Time" : datefmt = date.getTime(); @@ -4612,11 +5149,11 @@ case "UTC" : datefmt = date.toUTCString(); - break; + break; case "yy" : datefmt = year2; - break; + break; case "year" : case "yyyy" : @@ -4626,7 +5163,7 @@ case "month" : case "mm" : datefmt = month; - break; + break; case "cn-week-day" : case "cn-wd" : @@ -4673,7 +5210,7 @@ break; case "yyyy-mm-dd h:i:s ms" : - case "full + ms" : + case "full + ms" : datefmt = fymd + " " + hms + " " + ms; break; @@ -4686,7 +5223,14 @@ return datefmt; }; - + /** + * 获取指定行的内容 + * @param n + * @returns {*} + */ + editormd.getLine = function(n) { + return this.cm.getLine(n); + }; return editormd; })); diff --git a/static/editor.md/editormd.amd.min.js b/static/editor.md/editormd.amd.min.js index 230136927..3abc86f9f 100644 --- a/static/editor.md/editormd.amd.min.js +++ b/static/editor.md/editormd.amd.min.js @@ -1,4 +1,2 @@ -/*! Editor.md v1.5.0 | editormd.amd.min.js | Open source online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-06-09 */ -!function(e){"use strict";if("function"==typeof require&&"object"==typeof exports&&"object"==typeof module)module.exports=e;else if("function"==typeof define)if(define.amd){var t="codemirror/mode/",i="codemirror/addon/",o=["jquery","marked","prettify","katex","raphael","underscore","flowchart","jqueryflowchart","sequenceDiagram","codemirror/lib/codemirror",t+"css/css",t+"sass/sass",t+"shell/shell",t+"sql/sql",t+"clike/clike",t+"php/php",t+"xml/xml",t+"markdown/markdown",t+"javascript/javascript",t+"htmlmixed/htmlmixed",t+"gfm/gfm",t+"http/http",t+"go/go",t+"dart/dart",t+"coffeescript/coffeescript",t+"nginx/nginx",t+"python/python",t+"perl/perl",t+"lua/lua",t+"r/r",t+"ruby/ruby",t+"rst/rst",t+"smartymixed/smartymixed",t+"vb/vb",t+"vbscript/vbscript",t+"velocity/velocity",t+"xquery/xquery",t+"yaml/yaml",t+"erlang/erlang",t+"jade/jade",i+"edit/trailingspace",i+"dialog/dialog",i+"search/searchcursor",i+"search/search",i+"scroll/annotatescrollbar",i+"search/matchesonscrollbar",i+"display/placeholder",i+"edit/closetag",i+"fold/foldcode",i+"fold/foldgutter",i+"fold/indent-fold",i+"fold/brace-fold",i+"fold/xml-fold",i+"fold/markdown-fold",i+"fold/comment-fold",i+"mode/overlay",i+"selection/active-line",i+"edit/closebrackets",i+"display/fullscreen",i+"search/match-highlighter"];define(o,e)}else define(["jquery"],e);else window.editormd=e()}(function(){"function"==typeof define&&define.amd&&(e=arguments[0],marked=arguments[1],prettify=arguments[2],katex=arguments[3],Raphael=arguments[4],_=arguments[5],flowchart=arguments[6],CodeMirror=arguments[9]);var e="undefined"!=typeof jQuery?jQuery:Zepto;if("undefined"!=typeof e){var t=function(e,i){return new t.fn.init(e,i)};t.title=t.$name="Editor.md",t.version="1.5.0",t.homePage="https://pandao.github.io/editor.md/",t.classPrefix="editormd-",t.toolbarModes={full:["undo","redo","|","bold","del","italic","quote","ucwords","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","link","reference-link","image","code","preformatted-text","code-block","table","datetime","emoji","html-entities","pagebreak","|","goto-line","watch","preview","fullscreen","clear","search","|","help","info"],simple:["undo","redo","|","bold","del","italic","quote","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","watch","preview","fullscreen","|","help","info"],mini:["undo","redo","|","watch","preview","|","help","info"]},t.defaults={mode:"gfm",name:"",value:"",theme:"",editorTheme:"default",previewTheme:"",markdown:"",appendMarkdown:"",width:"100%",height:"100%",path:"./lib/",pluginPath:"",delay:300,autoLoadModules:!0,watch:!0,placeholder:"Enjoy Markdown! coding now...",gotoLine:!0,codeFold:!1,autoHeight:!1,autoFocus:!0,autoCloseTags:!0,searchReplace:!0,syncScrolling:!0,readOnly:!1,tabSize:4,indentUnit:4,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,showTrailingSpace:!0,matchBrackets:!0,indentWithTabs:!0,styleSelectedText:!0,matchWordHighlight:!0,styleActiveLine:!0,dialogLockScreen:!0,dialogShowMask:!0,dialogDraggable:!0,dialogMaskBgColor:"#fff",dialogMaskOpacity:.1,fontSize:"13px",saveHTMLToTextarea:!1,disabledKeyMaps:[],onload:function(){},onresize:function(){},onchange:function(){},onwatch:null,onunwatch:null,onpreviewing:function(){},onpreviewed:function(){},onfullscreen:function(){},onfullscreenExit:function(){},onscroll:function(){},onpreviewscroll:function(){},imageUpload:!1,imageFormats:["jpg","jpeg","gif","png","bmp","webp"],imageUploadURL:"",crossDomainUpload:!1,uploadCallbackURL:"",toc:!0,tocm:!1,tocTitle:"",tocDropdown:!1,tocContainer:"",tocStartLevel:1,htmlDecode:!1,pageBreak:!0,atLink:!0,emailLink:!0,taskList:!1,emoji:!1,tex:!1,flowChart:!1,sequenceDiagram:!1,previewCodeHighlight:!0,toolbar:!0,toolbarAutoFixed:!0,toolbarIcons:"full",toolbarTitles:{},toolbarHandlers:{ucwords:function(){return t.toolbarHandlers.ucwords},lowercase:function(){return t.toolbarHandlers.lowercase}},toolbarCustomIcons:{lowercase:'a',ucwords:'Aa'},toolbarIconsClass:{undo:"fa-undo",redo:"fa-repeat",bold:"fa-bold",del:"fa-strikethrough",italic:"fa-italic",quote:"fa-quote-left",uppercase:"fa-font",h1:t.classPrefix+"bold",h2:t.classPrefix+"bold",h3:t.classPrefix+"bold",h4:t.classPrefix+"bold",h5:t.classPrefix+"bold",h6:t.classPrefix+"bold","list-ul":"fa-list-ul","list-ol":"fa-list-ol",hr:"fa-minus",link:"fa-link","reference-link":"fa-anchor",image:"fa-picture-o",code:"fa-code","preformatted-text":"fa-file-code-o","code-block":"fa-file-code-o",table:"fa-table",datetime:"fa-clock-o",emoji:"fa-smile-o","html-entities":"fa-copyright",pagebreak:"fa-newspaper-o","goto-line":"fa-terminal",watch:"fa-eye-slash",unwatch:"fa-eye",preview:"fa-desktop",search:"fa-search",fullscreen:"fa-arrows-alt",clear:"fa-eraser",help:"fa-question-circle",info:"fa-info-circle"},toolbarIconTexts:{},lang:{name:"zh-cn",description:"开源在线Markdown编辑器
            Open source online Markdown editor.",tocTitle:"目录",toolbar:{undo:"撤销(Ctrl+Z)",redo:"重做(Ctrl+Y)",bold:"粗体",del:"删除线",italic:"斜体",quote:"引用",ucwords:"将每个单词首字母转成大写",uppercase:"将所选转换成大写",lowercase:"将所选转换成小写",h1:"标题1",h2:"标题2",h3:"标题3",h4:"标题4",h5:"标题5",h6:"标题6","list-ul":"无序列表","list-ol":"有序列表",hr:"横线",link:"链接","reference-link":"引用链接",image:"添加图片",code:"行内代码","preformatted-text":"预格式文本 / 代码块(缩进风格)","code-block":"代码块(多语言风格)",table:"添加表格",datetime:"日期时间",emoji:"Emoji表情","html-entities":"HTML实体字符",pagebreak:"插入分页符","goto-line":"跳转到行",watch:"关闭实时预览",unwatch:"开启实时预览",preview:"全窗口预览HTML(按 Shift + ESC还原)",fullscreen:"全屏(按ESC还原)",clear:"清空",search:"搜索",help:"使用帮助",info:"关于"+t.title},buttons:{enter:"确定",cancel:"取消",close:"关闭"},dialog:{link:{title:"添加链接",url:"链接地址",urlTitle:"链接标题",urlEmpty:"错误:请填写链接地址。"},referenceLink:{title:"添加引用链接",name:"引用名称",url:"链接地址",urlId:"链接ID",urlTitle:"链接标题",nameEmpty:"错误:引用链接的名称不能为空。",idEmpty:"错误:请填写引用链接的ID。",urlEmpty:"错误:请填写引用链接的URL地址。"},image:{title:"添加图片",url:"图片地址",link:"图片链接",alt:"图片描述",uploadButton:"本地上传",imageURLEmpty:"错误:图片地址不能为空。",uploadFileEmpty:"错误:上传的图片不能为空。",formatNotAllowed:"错误:只允许上传图片文件,允许上传的图片文件格式有:"},preformattedText:{title:"添加预格式文本或代码块",emptyAlert:"错误:请填写预格式文本或代码的内容。"},codeBlock:{title:"添加代码块",selectLabel:"代码语言:",selectDefaultText:"请选择代码语言",otherLanguage:"其他语言",unselectedLanguageAlert:"错误:请选择代码所属的语言类型。",codeEmptyAlert:"错误:请填写代码内容。"},htmlEntities:{title:"HTML 实体字符"},help:{title:"使用帮助"}}}},t.classNames={tex:t.classPrefix+"tex"},t.dialogZindex=99999,t.$katex=null,t.$marked=null,t.$CodeMirror=null,t.$prettyPrint=null;var i,o;t.prototype=t.fn={state:{watching:!1,loaded:!1,preview:!1,fullscreen:!1},init:function(i,o){o=o||{},"object"==typeof i&&(o=i);var r=this.classPrefix=t.classPrefix,n=this.settings=e.extend(!0,t.defaults,o);i="object"==typeof i?n.id:i;var a=this.editor=e("#"+i);this.id=i,this.lang=n.lang;var s=this.classNames={textarea:{html:r+"html-textarea",markdown:r+"markdown-textarea"}};n.pluginPath=""===n.pluginPath?n.path+"../plugins/":n.pluginPath,this.state.watching=n.watch?!0:!1,a.hasClass("editormd")||a.addClass("editormd"),a.css({width:"number"==typeof n.width?n.width+"px":n.width,height:"number"==typeof n.height?n.height+"px":n.height}),n.autoHeight&&a.css("height","auto");var l=this.markdownTextarea=a.children("textarea");l.length<1&&(a.append(""),l=this.markdownTextarea=a.children("textarea")),l.addClass(s.textarea.markdown).attr("placeholder",n.placeholder),("undefined"==typeof l.attr("name")||""===l.attr("name"))&&l.attr("name",""!==n.name?n.name:i+"-markdown-doc");var c=[n.readOnly?"":'',n.saveHTMLToTextarea?'':"",'
            ','
            ','
            '].join("\n");return a.append(c).addClass(r+"vertical"),""!==n.theme&&a.addClass(r+"theme-"+n.theme),this.mask=a.children("."+r+"mask"),this.containerMask=a.children("."+r+"container-mask"),""!==n.markdown&&l.val(n.markdown),""!==n.appendMarkdown&&l.val(l.val()+n.appendMarkdown),this.htmlTextarea=a.children("."+s.textarea.html),this.preview=a.children("."+r+"preview"),this.previewContainer=this.preview.children("."+r+"preview-container"),""!==n.previewTheme&&this.preview.addClass(r+"preview-theme-"+n.previewTheme),"function"==typeof define&&define.amd&&("undefined"!=typeof katex&&(t.$katex=katex),n.searchReplace&&!n.readOnly&&(t.loadCSS(n.path+"codemirror/addon/dialog/dialog"),t.loadCSS(n.path+"codemirror/addon/search/matchesonscrollbar"))),"function"==typeof define&&define.amd||!n.autoLoadModules?("undefined"!=typeof CodeMirror&&(t.$CodeMirror=CodeMirror),"undefined"!=typeof marked&&(t.$marked=marked),this.setCodeMirror().setToolbar().loadedDisplay()):this.loadQueues(),this},loadQueues:function(){var e=this,i=this.settings,o=i.path,r=function(){return t.isIE8?void e.loadedDisplay():void(i.flowChart||i.sequenceDiagram?t.loadScript(o+"raphael.min",function(){t.loadScript(o+"underscore.min",function(){!i.flowChart&&i.sequenceDiagram?t.loadScript(o+"sequence-diagram.min",function(){e.loadedDisplay()}):i.flowChart&&!i.sequenceDiagram?t.loadScript(o+"flowchart.min",function(){t.loadScript(o+"jquery.flowchart.min",function(){e.loadedDisplay()})}):i.flowChart&&i.sequenceDiagram&&t.loadScript(o+"flowchart.min",function(){t.loadScript(o+"jquery.flowchart.min",function(){t.loadScript(o+"sequence-diagram.min",function(){e.loadedDisplay()})})})})}):e.loadedDisplay())};return t.loadCSS(o+"codemirror/codemirror.min"),i.searchReplace&&!i.readOnly&&(t.loadCSS(o+"codemirror/addon/dialog/dialog"),t.loadCSS(o+"codemirror/addon/search/matchesonscrollbar")),i.codeFold&&t.loadCSS(o+"codemirror/addon/fold/foldgutter"),t.loadScript(o+"codemirror/codemirror.min",function(){t.$CodeMirror=CodeMirror,t.loadScript(o+"codemirror/modes.min",function(){t.loadScript(o+"codemirror/addons.min",function(){return e.setCodeMirror(),"gfm"!==i.mode&&"markdown"!==i.mode?(e.loadedDisplay(),!1):(e.setToolbar(),void t.loadScript(o+"marked.min",function(){t.$marked=marked,i.previewCodeHighlight?t.loadScript(o+"prettify.min",function(){r()}):r()}))})})}),this},setTheme:function(e){var t=this.editor,i=this.settings.theme,o=this.classPrefix+"theme-";return t.removeClass(o+i).addClass(o+e),this.settings.theme=e,this},setEditorTheme:function(e){var i=this.settings;return i.editorTheme=e,"default"!==e&&t.loadCSS(i.path+"codemirror/theme/"+i.editorTheme),this.cm.setOption("theme",e),this},setCodeMirrorTheme:function(e){return this.setEditorTheme(e),this},setPreviewTheme:function(e){var t=this.preview,i=this.settings.previewTheme,o=this.classPrefix+"preview-theme-";return t.removeClass(o+i).addClass(o+e),this.settings.previewTheme=e,this},setCodeMirror:function(){var e=this.settings,i=this.editor;"default"!==e.editorTheme&&t.loadCSS(e.path+"codemirror/theme/"+e.editorTheme);var o={mode:e.mode,theme:e.editorTheme,tabSize:e.tabSize,dragDrop:!1,autofocus:e.autoFocus,autoCloseTags:e.autoCloseTags,readOnly:e.readOnly?"nocursor":!1,indentUnit:e.indentUnit,lineNumbers:e.lineNumbers,lineWrapping:e.lineWrapping,extraKeys:{"Ctrl-Q":function(e){e.foldCode(e.getCursor())}},foldGutter:e.codeFold,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],matchBrackets:e.matchBrackets,indentWithTabs:e.indentWithTabs,styleActiveLine:e.styleActiveLine,styleSelectedText:e.styleSelectedText,autoCloseBrackets:e.autoCloseBrackets,showTrailingSpace:e.showTrailingSpace,highlightSelectionMatches:e.matchWordHighlight?{showToken:"onselected"===e.matchWordHighlight?!1:/\w/}:!1};return this.codeEditor=this.cm=t.$CodeMirror.fromTextArea(this.markdownTextarea[0],o),this.codeMirror=this.cmElement=i.children(".CodeMirror"),""!==e.value&&this.cm.setValue(e.value),this.codeMirror.css({fontSize:e.fontSize,width:e.watch?"50%":"100%"}),e.autoHeight&&(this.codeMirror.css("height","auto"),this.cm.setOption("viewportMargin",1/0)),e.lineNumbers||this.codeMirror.find(".CodeMirror-gutters").css("border-right","none"),this},getCodeMirrorOption:function(e){return this.cm.getOption(e)},setCodeMirrorOption:function(e,t){return this.cm.setOption(e,t),this},addKeyMap:function(e,t){return this.cm.addKeyMap(e,t),this},removeKeyMap:function(e){return this.cm.removeKeyMap(e),this},gotoLine:function(t){var i=this.settings;if(!i.gotoLine)return this;var o=this.cm,r=(this.editor,o.lineCount()),n=this.preview;if("string"==typeof t&&("last"===t&&(t=r),"first"===t&&(t=1)),"number"!=typeof t)return alert("Error: The line number must be an integer."),this;if(t=parseInt(t)-1,t>r)return alert("Error: The line number range 1-"+r),this;o.setCursor({line:t,ch:0});var a=o.getScrollInfo(),s=a.clientHeight,l=o.charCoords({line:t,ch:0},"local");if(o.scrollTo(null,(l.top+l.bottom-s)/2),i.watch){var c=this.codeMirror.find(".CodeMirror-scroll")[0],h=e(c).height(),d=c.scrollTop,u=d/c.scrollHeight;n.scrollTop(0===d?0:d+h>=c.scrollHeight-16?n[0].scrollHeight:n[0].scrollHeight*u)}return o.focus(),this},extend:function(){return"undefined"!=typeof arguments[1]&&("function"==typeof arguments[1]&&(arguments[1]=e.proxy(arguments[1],this)),this[arguments[0]]=arguments[1]),"object"==typeof arguments[0]&&"undefined"==typeof arguments[0].length&&e.extend(!0,this,arguments[0]),this},set:function(t,i){return"undefined"!=typeof i&&"function"==typeof i&&(i=e.proxy(i,this)),this[t]=i,this},config:function(t,i){var o=this.settings;return"object"==typeof t&&(o=e.extend(!0,o,t)),"string"==typeof t&&(o[t]=i),this.settings=o,this.recreate(),this},on:function(t,i){var o=this.settings;return"undefined"!=typeof o["on"+t]&&(o["on"+t]=e.proxy(i,this)),this},off:function(e){var t=this.settings;return"undefined"!=typeof t["on"+e]&&(t["on"+e]=function(){}),this},showToolbar:function(t){var i=this.settings;return i.readOnly?this:(i.toolbar&&(this.toolbar.length<1||""===this.toolbar.find("."+this.classPrefix+"menu").html())&&this.setToolbar(),i.toolbar=!0,this.toolbar.show(),this.resize(),e.proxy(t||function(){},this)(),this)},hideToolbar:function(t){var i=this.settings;return i.toolbar=!1,this.toolbar.hide(),this.resize(),e.proxy(t||function(){},this)(),this},setToolbarAutoFixed:function(t){var i=this.state,o=this.editor,r=this.toolbar,n=this.settings;"undefined"!=typeof t&&(n.toolbarAutoFixed=t);var a=function(){var t=e(window),i=t.scrollTop();return n.toolbarAutoFixed?void r.css(i-o.offset().top>10&&i
              ';i.append(n),r=this.toolbar=i.children("."+o+"toolbar")}if(!e.toolbar)return r.hide(),this;r.show();for(var a="function"==typeof e.toolbarIcons?e.toolbarIcons():"string"==typeof e.toolbarIcons?t.toolbarModes[e.toolbarIcons]:e.toolbarIcons,s=r.find("."+this.classPrefix+"menu"),l="",c=!1,h=0,d=a.length;d>h;h++){var u=a[h];if("||"===u)c=!0;else if("|"===u)l+='
            • |
            • ';else{var f=/h(\d)/.test(u),g=u;"watch"!==u||e.watch||(g="unwatch");var p=e.lang.toolbar[g],m=e.toolbarIconTexts[g],w=e.toolbarIconsClass[g];p="undefined"==typeof p?"":p,m="undefined"==typeof m?"":m,w="undefined"==typeof w?"":w;var v=c?'
            • ':"
            • ";"undefined"!=typeof e.toolbarCustomIcons[u]&&"function"!=typeof e.toolbarCustomIcons[u]?v+=e.toolbarCustomIcons[u]:(v+='',v+=''+(f?u.toUpperCase():""===w?m:"")+"",v+=""),v+="
            • ",l=c?v+l:l+v}}return s.html(l),s.find('[title="Lowercase"]').attr("title",e.lang.toolbar.lowercase),s.find('[title="ucwords"]').attr("title",e.lang.toolbar.ucwords),this.setToolbarHandler(),this.setToolbarAutoFixed(),this},dialogLockScreen:function(){return e.proxy(t.dialogLockScreen,this)(),this},dialogShowMask:function(i){return e.proxy(t.dialogShowMask,this)(i),this},getToolbarHandles:function(e){var i=this.toolbarHandlers=t.toolbarHandlers;return e&&"undefined"!=typeof toolbarIconHandlers[e]?i[e]:i},setToolbarHandler:function(){var i=this,o=this.settings;if(!o.toolbar||o.readOnly)return this;var r=this.toolbar,n=this.cm,a=this.classPrefix,s=this.toolbarIcons=r.find("."+a+"menu > li > a"),l=this.getToolbarHandles();return s.bind(t.mouseOrTouch("click","touchend"),function(t){var r=e(this).children(".fa"),a=r.attr("name"),s=n.getCursor(),c=n.getSelection();return""!==a?(i.activeIcon=r,"undefined"!=typeof l[a]?e.proxy(l[a],i)(n):"undefined"!=typeof o.toolbarHandlers[a]&&e.proxy(o.toolbarHandlers[a],i)(n,r,s,c),"link"!==a&&"reference-link"!==a&&"image"!==a&&"code-block"!==a&&"preformatted-text"!==a&&"watch"!==a&&"preview"!==a&&"search"!==a&&"fullscreen"!==a&&"info"!==a&&n.focus(),!1):void 0}),this},createDialog:function(i){return e.proxy(t.createDialog,this)(i)},createInfoDialog:function(){var e=this,i=this.editor,o=this.classPrefix,r=['
              ','
              ','

              '+t.title+"v"+t.version+"

              ","

              "+this.lang.description+"

              ",'

              '+t.homePage+'

              ','

              Copyright © 2015 Pandao, The MIT License.

              ',"
              ",'',"
              "].join("\n");i.append(r);var n=this.infoDialog=i.children("."+o+"dialog-info");return n.find("."+o+"dialog-close").bind(t.mouseOrTouch("click","touchend"),function(){e.hideInfoDialog()}),n.css("border",t.isIE8?"1px solid #ddd":"").css("z-index",t.dialogZindex).show(),this.infoDialogPosition(),this},infoDialogPosition:function(){var t=this.infoDialog,i=function(){t.css({top:(e(window).height()-t.height())/2+"px",left:(e(window).width()-t.width())/2+"px"})};return i(),e(window).resize(i),this},showInfoDialog:function(){e("html,body").css("overflow-x","hidden");var i=this.editor,o=this.settings,r=this.infoDialog=i.children("."+this.classPrefix+"dialog-info");return r.length<1&&this.createInfoDialog(),this.lockScreen(!0),this.mask.css({opacity:o.dialogMaskOpacity,backgroundColor:o.dialogMaskBgColor}).show(),r.css("z-index",t.dialogZindex).show(),this.infoDialogPosition(),this},hideInfoDialog:function(){return e("html,body").css("overflow-x",""),this.infoDialog.hide(),this.mask.hide(),this.lockScreen(!1),this},lockScreen:function(e){return t.lockScreen(e),this.resize(),this},recreate:function(){var e=this.editor,t=this.settings;return this.codeMirror.remove(),this.setCodeMirror(),t.readOnly||(e.find(".editormd-dialog").length>0&&e.find(".editormd-dialog").remove(),t.toolbar&&(this.getToolbarHandles(),this.setToolbar())),this.loadedDisplay(!0),this},previewCodeHighlight:function(){var e=this.settings,t=this.previewContainer;return e.previewCodeHighlight&&(t.find("pre").addClass("prettyprint linenums"),"undefined"!=typeof prettyPrint&&prettyPrint()),this},katexRender:function(){return null===i?this:(this.previewContainer.find("."+t.classNames.tex).each(function(){var i=e(this);t.$katex.render(i.text(),i[0]),i.find(".katex").css("font-size","1.6em")}),this)},flowChartAndSequenceDiagramRender:function(){var i=this,r=this.settings,n=this.previewContainer;if(t.isIE8)return this;if(r.flowChart){if(null===o)return this;n.find(".flowchart").flowChart()}r.sequenceDiagram&&n.find(".sequence-diagram").sequenceDiagram({theme:"simple"});var a=i.preview,s=i.codeMirror,l=s.find(".CodeMirror-scroll"),c=l.height(),h=l.scrollTop(),d=h/l[0].scrollHeight,u=0;a.find(".markdown-toc-list").each(function(){u+=e(this).height()});var f=a.find(".editormd-toc-menu").height();return f=f?f:0,a.scrollTop(0===h?0:h+c>=l[0].scrollHeight-16?a[0].scrollHeight:(a[0].scrollHeight+u+f)*d),this},registerKeyMaps:function(i){var o=this,r=this.cm,n=this.settings,a=t.toolbarHandlers,s=n.disabledKeyMaps;if(i=i||null){for(var l in i)if(e.inArray(l,s)<0){var c={};c[l]=i[l],r.addKeyMap(i)}}else{for(var h in t.keyMaps){var d=t.keyMaps[h],u="string"==typeof d?e.proxy(a[d],o):e.proxy(d,o);if(e.inArray(h,["F9","F10","F11"])<0&&e.inArray(h,s)<0){var f={};f[h]=u,r.addKeyMap(f)}}e(window).keydown(function(t){var i={120:"F9",121:"F10",122:"F11"};if(e.inArray(i[t.keyCode],s)<0)switch(t.keyCode){case 120:return e.proxy(a.watch,o)(),!1;case 121:return e.proxy(a.preview,o)(),!1;case 122:return e.proxy(a.fullscreen,o)(),!1}})}return this},bindScrollEvent:function(){var i=this,o=this.preview,r=this.settings,n=this.codeMirror,a=t.mouseOrTouch;if(!r.syncScrolling)return this;var s=function(){n.find(".CodeMirror-scroll").bind(a("scroll","touchmove"),function(t){var n=e(this).height(),a=e(this).scrollTop(),s=a/e(this)[0].scrollHeight,l=0;o.find(".markdown-toc-list").each(function(){l+=e(this).height()});var c=o.find(".editormd-toc-menu").height();c=c?c:0,o.scrollTop(0===a?0:a+n>=e(this)[0].scrollHeight-16?o[0].scrollHeight:(o[0].scrollHeight+l+c)*s),e.proxy(r.onscroll,i)(t)})},l=function(){n.find(".CodeMirror-scroll").unbind(a("scroll","touchmove"))},c=function(){o.bind(a("scroll","touchmove"),function(t){var o=e(this).height(),a=e(this).scrollTop(),s=a/e(this)[0].scrollHeight,l=n.find(".CodeMirror-scroll");l.scrollTop(0===a?0:a+o>=e(this)[0].scrollHeight?l[0].scrollHeight:l[0].scrollHeight*s),e.proxy(r.onpreviewscroll,i)(t)})},h=function(){o.unbind(a("scroll","touchmove"))};return n.bind({mouseover:s,mouseout:l,touchstart:s,touchend:l}),"single"===r.syncScrolling?this:(o.bind({mouseover:c,mouseout:h,touchstart:c,touchend:h}),this)},bindChangeEvent:function(){var e=this,t=this.cm,o=this.settings;return o.syncScrolling?(t.on("change",function(t,r){o.watch&&e.previewContainer.css("padding",o.autoHeight?"20px 20px 50px 40px":"20px"),i=setTimeout(function(){clearTimeout(i),e.save(),i=null},o.delay)}),this):this},loadedDisplay:function(t){t=t||!1;var i=this,o=this.editor,r=this.preview,n=this.settings;return this.containerMask.hide(),this.save(),n.watch&&r.show(),o.data("oldWidth",o.width()).data("oldHeight",o.height()),this.resize(),this.registerKeyMaps(),e(window).resize(function(){i.resize()}),this.bindScrollEvent().bindChangeEvent(),t||e.proxy(n.onload,this)(),this.state.loaded=!0,this},width:function(e){return this.editor.css("width","number"==typeof e?e+"px":e),this.resize(),this},height:function(e){return this.editor.css("height","number"==typeof e?e+"px":e),this.resize(),this},resize:function(t,i){t=t||null,i=i||null;var o=this.state,r=this.editor,n=this.preview,a=this.toolbar,s=this.settings,l=this.codeMirror;if(t&&r.css("width","number"==typeof t?t+"px":t),!s.autoHeight||o.fullscreen||o.preview?(i&&r.css("height","number"==typeof i?i+"px":i),o.fullscreen&&r.height(e(window).height()),s.toolbar&&!s.readOnly?l.css("margin-top",a.height()+1).height(r.height()-a.height()):l.css("margin-top",0).height(r.height())):(r.css("height","auto"),l.css("height","auto")),s.watch)if(l.width(r.width()/2),n.width(o.preview?r.width():r.width()/2),this.previewContainer.css("padding",s.autoHeight?"20px 20px 50px 40px":"20px"),s.toolbar&&!s.readOnly?n.css("top",a.height()+1):n.css("top",0),!s.autoHeight||o.fullscreen||o.preview){var c=s.toolbar&&!s.readOnly?r.height()-a.height():r.height();n.height(c)}else n.height("");else l.width(r.width()),n.hide();return o.loaded&&e.proxy(s.onresize,this)(),this},save:function(){if(null===i)return this;var r=this,n=this.state,a=this.settings,s=this.cm,l=s.getValue(),c=this.previewContainer;if("gfm"!==a.mode&&"markdown"!==a.mode)return this.markdownTextarea.val(l),this;var h=t.$marked,d=this.markdownToC=[],u=this.markedRendererOptions={toc:a.toc,tocm:a.tocm,tocStartLevel:a.tocStartLevel,pageBreak:a.pageBreak,taskList:a.taskList,emoji:a.emoji,tex:a.tex,atLink:a.atLink,emailLink:a.emailLink,flowChart:a.flowChart,sequenceDiagram:a.sequenceDiagram,previewCodeHighlight:a.previewCodeHighlight},f=this.markedOptions={renderer:t.markedRenderer(d,u),gfm:!0,tables:!0,breaks:!0,pedantic:!1,sanitize:a.htmlDecode?!1:!0,smartLists:!0,smartypants:!0};h.setOptions(f);var g=t.$marked(l,f);if(g=t.filterHTMLTags(g,a.htmlDecode),this.markdownTextarea.text(l),s.save(),a.saveHTMLToTextarea&&this.htmlTextarea.text(g),a.watch||!a.watch&&n.preview){if(c.html(g),this.previewCodeHighlight(),a.toc){var p=""===a.tocContainer?c:e(a.tocContainer),m=p.find("."+this.classPrefix+"toc-menu");p.attr("previewContainer",""===a.tocContainer?"true":"false"),""!==a.tocContainer&&m.length>0&&m.remove(),t.markdownToCRenderer(d,p,a.tocDropdown,a.tocStartLevel),(a.tocDropdown||p.find("."+this.classPrefix+"toc-menu").length>0)&&t.tocDropdownMenu(p,""!==a.tocTitle?a.tocTitle:this.lang.tocTitle),""!==a.tocContainer&&c.find(".markdown-toc").css("border","none")}a.tex&&(!t.kaTeXLoaded&&a.autoLoadModules?t.loadKaTeX(function(){t.$katex=katex,t.kaTeXLoaded=!0,r.katexRender()}):(t.$katex=katex,this.katexRender())),(a.flowChart||a.sequenceDiagram)&&(o=setTimeout(function(){clearTimeout(o),r.flowChartAndSequenceDiagramRender(),o=null},10)),n.loaded&&e.proxy(a.onchange,this)()}return this},focus:function(){return this.cm.focus(),this},setCursor:function(e){return this.cm.setCursor(e),this},getCursor:function(){return this.cm.getCursor()},setSelection:function(e,t){return this.cm.setSelection(e,t),this},getSelection:function(){return this.cm.getSelection()},setSelections:function(e){return this.cm.setSelections(e),this},getSelections:function(){return this.cm.getSelections()},replaceSelection:function(e){return this.cm.replaceSelection(e),this},insertValue:function(e){return this.replaceSelection(e),this},appendMarkdown:function(e){var t=(this.settings,this.cm);return t.setValue(t.getValue()+e),this},setMarkdown:function(e){return this.cm.setValue(e||this.settings.markdown),this},getMarkdown:function(){return this.cm.getValue()},getValue:function(){return this.cm.getValue()},setValue:function(e){return this.cm.setValue(e),this},clear:function(){return this.cm.setValue(""),this},getHTML:function(){return this.settings.saveHTMLToTextarea?this.htmlTextarea.val():(alert("Error: settings.saveHTMLToTextarea == false"),!1)},getTextareaSavedHTML:function(){return this.getHTML()},getPreviewedHTML:function(){return this.settings.watch?this.previewContainer.html():(alert("Error: settings.watch == false"),!1)},watch:function(t){var o=this.settings;if(e.inArray(o.mode,["gfm","markdown"])<0)return this;if(this.state.watching=o.watch=!0,this.preview.show(),this.toolbar){var r=o.toolbarIconsClass.watch,n=o.toolbarIconsClass.unwatch,a=this.toolbar.find(".fa[name=watch]");a.parent().attr("title",o.lang.toolbar.watch),a.removeClass(n).addClass(r)}return this.codeMirror.css("border-right","1px solid #ddd").width(this.editor.width()/2),i=0,this.save().resize(),o.onwatch||(o.onwatch=t||function(){}),e.proxy(o.onwatch,this)(),this},unwatch:function(t){var i=this.settings;if(this.state.watching=i.watch=!1,this.preview.hide(),this.toolbar){var o=i.toolbarIconsClass.watch,r=i.toolbarIconsClass.unwatch,n=this.toolbar.find(".fa[name=watch]");n.parent().attr("title",i.lang.toolbar.unwatch),n.removeClass(o).addClass(r)}return this.codeMirror.css("border-right","none").width(this.editor.width()),this.resize(),i.onunwatch||(i.onunwatch=t||function(){}),e.proxy(i.onunwatch,this)(),this},show:function(t){t=t||function(){};var i=this;return this.editor.show(0,function(){e.proxy(t,i)()}),this},hide:function(t){t=t||function(){};var i=this;return this.editor.hide(0,function(){e.proxy(t,i)()}),this},previewing:function(){var i=this,o=this.editor,r=this.preview,n=this.toolbar,a=this.settings,s=this.codeMirror,l=this.previewContainer;if(e.inArray(a.mode,["gfm","markdown"])<0)return this;a.toolbar&&n&&(n.toggle(),n.find(".fa[name=preview]").toggleClass("active")),s.toggle();var c=function(e){e.shiftKey&&27===e.keyCode&&i.previewed()};"none"===s.css("display")?(this.state.preview=!0,this.state.fullscreen&&r.css("background","#fff"),o.find("."+this.classPrefix+"preview-close-btn").show().bind(t.mouseOrTouch("click","touchend"),function(){i.previewed()}),a.watch?l.css("padding",""):this.save(),l.addClass(this.classPrefix+"preview-active"),r.show().css({position:"",top:0,width:o.width(),height:a.autoHeight&&!this.state.fullscreen?"auto":o.height()}),this.state.loaded&&e.proxy(a.onpreviewing,this)(),e(window).bind("keyup",c)):(e(window).unbind("keyup",c),this.previewed())},previewed:function(){var i=this.editor,o=this.preview,r=this.toolbar,n=this.settings,a=this.previewContainer,s=i.find("."+this.classPrefix+"preview-close-btn");return this.state.preview=!1,this.codeMirror.show(),n.toolbar&&r.show(),o[n.watch?"show":"hide"](),s.hide().unbind(t.mouseOrTouch("click","touchend")),a.removeClass(this.classPrefix+"preview-active"),n.watch&&a.css("padding","20px"),o.css({background:null,position:"absolute",width:i.width()/2,height:n.autoHeight&&!this.state.fullscreen?"auto":i.height()-r.height(),top:n.toolbar?r.height():0}),this.state.loaded&&e.proxy(n.onpreviewed,this)(),this},fullscreen:function(){var t=this,i=this.state,o=this.editor,r=(this.preview,this.toolbar),n=this.settings,a=this.classPrefix+"fullscreen";r&&r.find(".fa[name=fullscreen]").parent().toggleClass("active");var s=function(e){e.shiftKey||27!==e.keyCode||i.fullscreen&&t.fullscreenExit()};return o.hasClass(a)?(e(window).unbind("keyup",s),this.fullscreenExit()):(i.fullscreen=!0,e("html,body").css("overflow","hidden"),o.css({width:e(window).width(),height:e(window).height()}).addClass(a),this.resize(),e.proxy(n.onfullscreen,this)(),e(window).bind("keyup",s)),this},fullscreenExit:function(){var t=this.editor,i=this.settings,o=this.toolbar,r=this.classPrefix+"fullscreen";return this.state.fullscreen=!1,o&&o.find(".fa[name=fullscreen]").parent().removeClass("active"),e("html,body").css("overflow",""),t.css({width:t.data("oldWidth"),height:t.data("oldHeight")}).removeClass(r),this.resize(),e.proxy(i.onfullscreenExit,this)(),this},executePlugin:function(i,o){var r=this,n=this.cm,a=this.settings;return o=a.pluginPath+o,"function"==typeof define?"undefined"==typeof this[i]?(alert("Error: "+i+" plugin is not found, you are not load this plugin."),this):(this[i](n),this):(e.inArray(o,t.loadFiles.plugin)<0?t.loadPlugin(o,function(){t.loadPlugins[i]=r[i],r[i](n)}):e.proxy(t.loadPlugins[i],this)(n),this)},search:function(e){var t=this.settings;return t.searchReplace?(t.readOnly||this.cm.execCommand(e||"find"),this):(alert("Error: settings.searchReplace == false"),this)},searchReplace:function(){return this.search("replace"),this},searchReplaceAll:function(){return this.search("replaceAll"),this}},t.fn.init.prototype=t.fn,t.dialogLockScreen=function(){var t=this.settings||{dialogLockScreen:!0};t.dialogLockScreen&&(e("html,body").css("overflow","hidden"),this.resize())},t.dialogShowMask=function(t){var i=this.editor,o=this.settings||{dialogShowMask:!0};t.css({top:(e(window).height()-t.height())/2+"px",left:(e(window).width()-t.width())/2+"px"}),o.dialogShowMask&&i.children("."+this.classPrefix+"mask").css("z-index",parseInt(t.css("z-index"))-1).show()},t.toolbarHandlers={undo:function(){this.cm.undo()},redo:function(){this.cm.redo()},bold:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(); - -e.replaceSelection("**"+i+"**"),""===i&&e.setCursor(t.line,t.ch+2)},del:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection("~~"+i+"~~"),""===i&&e.setCursor(t.line,t.ch+2)},italic:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection("*"+i+"*"),""===i&&e.setCursor(t.line,t.ch+1)},quote:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("> "+i),e.setCursor(t.line,t.ch+2)):e.replaceSelection("> "+i)},ucfirst:function(){var e=this.cm,i=e.getSelection(),o=e.listSelections();e.replaceSelection(t.firstUpperCase(i)),e.setSelections(o)},ucwords:function(){var e=this.cm,i=e.getSelection(),o=e.listSelections();e.replaceSelection(t.wordsFirstUpperCase(i)),e.setSelections(o)},uppercase:function(){var e=this.cm,t=e.getSelection(),i=e.listSelections();e.replaceSelection(t.toUpperCase()),e.setSelections(i)},lowercase:function(){var e=this.cm,t=(e.getCursor(),e.getSelection()),i=e.listSelections();e.replaceSelection(t.toLowerCase()),e.setSelections(i)},h1:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("# "+i),e.setCursor(t.line,t.ch+2)):e.replaceSelection("# "+i)},h2:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("## "+i),e.setCursor(t.line,t.ch+3)):e.replaceSelection("## "+i)},h3:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("### "+i),e.setCursor(t.line,t.ch+4)):e.replaceSelection("### "+i)},h4:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("#### "+i),e.setCursor(t.line,t.ch+5)):e.replaceSelection("#### "+i)},h5:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("##### "+i),e.setCursor(t.line,t.ch+6)):e.replaceSelection("##### "+i)},h6:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("###### "+i),e.setCursor(t.line,t.ch+7)):e.replaceSelection("###### "+i)},"list-ul":function(){var e=this.cm,t=(e.getCursor(),e.getSelection());if(""===t)e.replaceSelection("- "+t);else{for(var i=t.split("\n"),o=0,r=i.length;r>o;o++)i[o]=""===i[o]?"":"- "+i[o];e.replaceSelection(i.join("\n"))}},"list-ol":function(){var e=this.cm,t=(e.getCursor(),e.getSelection());if(""===t)e.replaceSelection("1. "+t);else{for(var i=t.split("\n"),o=0,r=i.length;r>o;o++)i[o]=""===i[o]?"":o+1+". "+i[o];e.replaceSelection(i.join("\n"))}},hr:function(){{var e=this.cm,t=e.getCursor();e.getSelection()}e.replaceSelection((0!==t.ch?"\n\n":"\n")+"------------\n\n")},tex:function(){if(!this.settings.tex)return alert("settings.tex === false"),this;var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection("$$"+i+"$$"),""===i&&e.setCursor(t.line,t.ch+2)},link:function(){this.executePlugin("linkDialog","link-dialog/link-dialog")},"reference-link":function(){this.executePlugin("referenceLinkDialog","reference-link-dialog/reference-link-dialog")},pagebreak:function(){if(!this.settings.pageBreak)return alert("settings.pageBreak === false"),this;{var e=this.cm;e.getSelection()}e.replaceSelection("\r\n[========]\r\n")},image:function(){this.executePlugin("imageDialog","image-dialog/image-dialog")},code:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection("`"+i+"`"),""===i&&e.setCursor(t.line,t.ch+1)},"code-block":function(){this.executePlugin("codeBlockDialog","code-block-dialog/code-block-dialog")},"preformatted-text":function(){this.executePlugin("preformattedTextDialog","preformatted-text-dialog/preformatted-text-dialog")},table:function(){this.executePlugin("tableDialog","table-dialog/table-dialog")},datetime:function(){var e=this.cm,i=(e.getSelection(),new Date,this.settings.lang.name),o=t.dateFormat()+" "+t.dateFormat("zh-cn"===i||"zh-tw"===i?"cn-week-day":"week-day");e.replaceSelection(o)},emoji:function(){this.executePlugin("emojiDialog","emoji-dialog/emoji-dialog")},"html-entities":function(){this.executePlugin("htmlEntitiesDialog","html-entities-dialog/html-entities-dialog")},"goto-line":function(){this.executePlugin("gotoLineDialog","goto-line-dialog/goto-line-dialog")},watch:function(){this[this.settings.watch?"unwatch":"watch"]()},preview:function(){this.previewing()},fullscreen:function(){this.fullscreen()},clear:function(){this.clear()},search:function(){this.search()},help:function(){this.executePlugin("helpDialog","help-dialog/help-dialog")},info:function(){this.showInfoDialog()}},t.keyMaps={"Ctrl-1":"h1","Ctrl-2":"h2","Ctrl-3":"h3","Ctrl-4":"h4","Ctrl-5":"h5","Ctrl-6":"h6","Ctrl-B":"bold","Ctrl-D":"datetime","Ctrl-E":function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();return this.settings.emoji?(e.replaceSelection(":"+i+":"),void(""===i&&e.setCursor(t.line,t.ch+1))):void alert("Error: settings.emoji == false")},"Ctrl-Alt-G":"goto-line","Ctrl-H":"hr","Ctrl-I":"italic","Ctrl-K":"code","Ctrl-L":function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=""===i?"":' "'+i+'"';e.replaceSelection("["+i+"]("+o+")"),""===i&&e.setCursor(t.line,t.ch+1)},"Ctrl-U":"list-ul","Shift-Ctrl-A":function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();return this.settings.atLink?(e.replaceSelection("@"+i),void(""===i&&e.setCursor(t.line,t.ch+1))):void alert("Error: settings.atLink == false")},"Shift-Ctrl-C":"code","Shift-Ctrl-Q":"quote","Shift-Ctrl-S":"del","Shift-Ctrl-K":"tex","Shift-Alt-C":function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection(["```",i,"```"].join("\n")),""===i&&e.setCursor(t.line,t.ch+3)},"Shift-Ctrl-Alt-C":"code-block","Shift-Ctrl-H":"html-entities","Shift-Alt-H":"help","Shift-Ctrl-E":"emoji","Shift-Ctrl-U":"uppercase","Shift-Alt-U":"ucwords","Shift-Ctrl-Alt-U":"ucfirst","Shift-Alt-L":"lowercase","Shift-Ctrl-I":function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=""===i?"":' "'+i+'"';e.replaceSelection("!["+i+"]("+o+")"),""===i&&e.setCursor(t.line,t.ch+4)},"Shift-Ctrl-Alt-I":"image","Shift-Ctrl-L":"link","Shift-Ctrl-O":"list-ol","Shift-Ctrl-P":"preformatted-text","Shift-Ctrl-T":"table","Shift-Alt-P":"pagebreak",F9:"watch",F10:"preview",F11:"fullscreen"};var r=function(e){return String.prototype.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};t.trim=r;var n=function(e){return e.toLowerCase().replace(/\b(\w)|\s(\w)/g,function(e){return e.toUpperCase()})};t.ucwords=t.wordsFirstUpperCase=n;var a=function(e){return e.toLowerCase().replace(/\b(\w)/,function(e){return e.toUpperCase()})};return t.firstUpperCase=t.ucfirst=a,t.urls={atLinkBase:"https://github.com/"},t.regexs={atLink:/@(\w+)/g,email:/(\w+)@(\w+)\.(\w+)\.?(\w+)?/g,emailLink:/(mailto:)?([\w\.\_]+)@(\w+)\.(\w+)\.?(\w+)?/g,emoji:/:([\w\+-]+):/g,emojiDatetime:/(\d{2}:\d{2}:\d{2})/g,twemoji:/:(tw-([\w]+)-?(\w+)?):/g,fontAwesome:/:(fa-([\w]+)(-(\w+)){0,}):/g,editormdLogo:/:(editormd-logo-?(\w+)?):/g,pageBreak:/^\[[=]{8,}\]$/},t.emoji={path:"http://www.emoji-cheat-sheet.com/graphics/emojis/",ext:".png"},t.twemoji={path:"http://twemoji.maxcdn.com/36x36/",ext:".png"},t.markedRenderer=function(i,o){var n={toc:!0,tocm:!1,tocStartLevel:1,pageBreak:!0,atLink:!0,emailLink:!0,taskList:!1,emoji:!1,tex:!1,flowChart:!1,sequenceDiagram:!1},a=e.extend(n,o||{}),s=t.$marked,l=new s.Renderer;i=i||[];var c=t.regexs,h=c.atLink,d=c.emoji,u=c.email,f=c.emailLink,g=c.twemoji,p=c.fontAwesome,m=c.editormdLogo,w=c.pageBreak;return l.emoji=function(e){e=e.replace(t.regexs.emojiDatetime,function(e){return e.replace(/:/g,":")});var i=e.match(d);if(!i||!a.emoji)return e;for(var o=0,r=i.length;r>o;o++)":+1:"===i[o]&&(i[o]=":\\+1:"),e=e.replace(new RegExp(i[o]),function(e,i){var o=e.match(p),r=e.replace(/:/g,"");if(o)for(var n=0,a=o.length;a>n;n++){var s=o[n].replace(/:/g,"");return''}else{var l=e.match(m),c=e.match(g);if(l)for(var h=0,d=l.length;d>h;h++){var u=l[h].replace(/:/g,"");return''}else{if(!c){var f="+1"===r?"plus1":r;return f="black_large_square"===f?"black_square":f,f="moon"===f?"waxing_gibbous_moon":f,':'+r+':'}for(var w=0,v=c.length;v>w;w++){var k=c[w].replace(/:/g,"").replace("tw-","");return'twemoji-'+k+''}}}});return e},l.atLink=function(i){return h.test(i)?(a.atLink&&(i=i.replace(u,function(e,t,i,o){return e.replace(/@/g,"_#_@_#_")}),i=i.replace(h,function(e,i){return''+e+""}).replace(/_#_@_#_/g,"@")),a.emailLink&&(i=i.replace(f,function(t,i,o,r,n){return!i&&e.inArray(n,"jpg|jpeg|png|gif|webp|ico|icon|pdf".split("|"))<0?''+t+"":t})),i):i},l.link=function(e,t,i){if(this.options.sanitize){try{var o=decodeURIComponent(unescape(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(r){return""}if(0===o.indexOf("javascript:"))return""}var n=''+i.replace(/@/g,"@")+""):(t&&(n+=' title="'+t+'"'),n+=">"+i+"")},l.heading=function(e,t,o){var n=e,a=/\s*\]*)\>(.*)\<\/a\>\s*/;if(a.test(e)){var s=[];e=e.split(/\]+)\>([^\>]*)\<\/a\>/);for(var l=0,c=e.length;c>l;l++)s.push(e[l].replace(/\s*href\=\"(.*)\"\s*/g,""));e=s.join(" ")}e=r(e);var h=e.toLowerCase().replace(/[^\w]+/g,"-"),d={text:e,level:t,slug:h},u=/^[\u4e00-\u9fa5]+$/.test(e),f=u?escape(e).replace(/\%/g,""):e.toLowerCase().replace(/[^\w]+/g,"-");i.push(d);var g="';return g+='',g+='',g+=this.atLink(a?this.emoji(n):this.emoji(e)),g+=""},l.pageBreak=function(e){return w.test(e)&&a.pageBreak&&(e='
              '),e},l.paragraph=function(e){var i=/\$\$(.*)\$\$/g.test(e),o=/^\$\$(.*)\$\$$/.test(e),r=o?' class="'+t.classNames.tex+'"':"",n=a.tocm?/^(\[TOC\]|\[TOCM\])$/.test(e):/^\[TOC\]$/.test(e),s=/^\[TOCM\]$/.test(e);e=!o&&i?e.replace(/(\$\$([^\$]*)\$\$)+/g,function(e,i){return''+i.replace(/\$/g,"")+""}):o?e.replace(/\$/g,""):e;var l='
              '+e+"
              ";return n?s?'
              '+l+"

              ":l:w.test(e)?this.pageBreak(e):""+this.atLink(this.emoji(e))+"

              \n"},l.code=function(e,i,o){return"seq"===i||"sequence"===i?'
              '+e+"
              ":"flow"===i?'
              '+e+"
              ":"math"===i||"latex"===i||"katex"===i?'

              '+e+"

              ":s.Renderer.prototype.code.apply(this,arguments)},l.tablecell=function(e,t){var i=t.header?"th":"td",o=t.align?"<"+i+' style="text-align:'+t.align+'">':"<"+i+">";return o+this.atLink(this.emoji(e))+"\n"},l.listitem=function(e){return a.taskList&&/^\s*\[[x\s]\]\s*/.test(e)?(e=e.replace(/^\s*\[\s\]\s*/,' ').replace(/^\s*\[x\]\s*/,' '),'
            • '+this.atLink(this.emoji(e))+"
            • "):"
            • "+this.atLink(this.emoji(e))+"
            • "},l},t.markdownToCRenderer=function(e,t,i,o){var r="",n=0,a=this.classPrefix;o=o||1;for(var s=0,l=e.length;l>s;s++){var c=e[s].text,h=e[s].level;o>h||(r+=h>n?"":n>h?new Array(n-h+2).join("
          • "):"
        • ",r+='
        • '+c+"
            ",n=h)}var d=t.find(".markdown-toc");if(d.length<1&&"false"===t.attr("previewContainer")){var u='
            ';u=i?'
            '+u+"
            ":u,t.html(u),d=t.find(".markdown-toc")}return i&&d.wrap('

            '),d.html('
              ').children(".markdown-toc-list").html(r.replace(/\r?\n?\\<\/ul\>/g,"")),d},t.tocDropdownMenu=function(t,i){i=i||"Table of Contents";var o=400,r=t.find("."+this.classPrefix+"toc-menu");return r.each(function(){var t=e(this),r=t.children(".markdown-toc"),n='',a=''+n+i+"",s=r.children("ul"),l=s.find("li");r.append(a),l.first().before("
            • "+i+" "+n+"

            • "),t.mouseover(function(){s.show(),l.each(function(){var t=e(this),i=t.children("ul");if(""===i.html()&&i.remove(),i.length>0&&""!==i.html()){var r=t.children("a").first();r.children(".fa").length<1&&r.append(e(n).css({"float":"right",paddingTop:"4px"}))}t.mouseover(function(){i.css("z-index",o).show(),o+=1}).mouseleave(function(){i.hide()})})}).mouseleave(function(){s.hide()})}),r},t.filterHTMLTags=function(t,i){if("string"!=typeof t&&(t=new String(t)),"string"!=typeof i)return t;for(var o=i.split("|"),r=o[0].split(","),n=o[1],a=0,s=r.length;s>a;a++){var l=r[a];t=t.replace(new RegExp("]*)>([^>]*)","igm"),"")}if("undefined"!=typeof n){var c=/\<(\w+)\s*([^\>]*)\>([^\>]*)\<\/(\w+)\>/gi;t="*"===n?t.replace(c,function(e,t,i,o,r){return"<"+t+">"+o+""}):"on*"===n?t.replace(c,function(t,i,o,r,n){var a=e("<"+i+">"+r+""),s=e(t)[0].attributes,l={};e.each(s,function(e,t){'"'!==t.nodeName&&(l[t.nodeName]=t.nodeValue)}),e.each(l,function(e){0===e.indexOf("on")&&delete l[e]}),a.attr(l);var c="undefined"!=typeof a[1]?e(a[1]).text():"";return a[0].outerHTML+c}):t.replace(c,function(t,i,o,r){var a=n.split(","),s=e(t);return s.html(r),e.each(a,function(e){s.attr(a[e],null)}),s[0].outerHTML})}return t},t.markdownToHTML=function(i,o){var r={gfm:!0,toc:!0,tocm:!1,tocStartLevel:1,tocTitle:"目录",tocDropdown:!1,tocContainer:"",markdown:"",markdownSourceCode:!1,htmlDecode:!1,autoLoadKaTeX:!0,pageBreak:!0,atLink:!0,emailLink:!0,tex:!1,taskList:!1,emoji:!1,flowChart:!1,sequenceDiagram:!1,previewCodeHighlight:!0};t.$marked=marked;var n=e("#"+i),a=n.settings=e.extend(!0,r,o||{}),s=n.find("textarea");s.length<1&&(n.append(""),s=n.find("textarea"));var l=""===a.markdown?s.val():a.markdown,c=[],h={toc:a.toc,tocm:a.tocm,tocStartLevel:a.tocStartLevel,taskList:a.taskList,emoji:a.emoji,tex:a.tex,pageBreak:a.pageBreak,atLink:a.atLink,emailLink:a.emailLink,flowChart:a.flowChart,sequenceDiagram:a.sequenceDiagram,previewCodeHighlight:a.previewCodeHighlight},d={renderer:t.markedRenderer(c,h),gfm:a.gfm,tables:!0,breaks:!0,pedantic:!1,sanitize:a.htmlDecode?!1:!0,smartLists:!0,smartypants:!0};l=new String(l);var u=marked(l,d);u=t.filterHTMLTags(u,a.htmlDecode),a.markdownSourceCode?s.text(l):s.remove(),n.addClass("markdown-body "+this.classPrefix+"html-preview").append(u);var f=""!==a.tocContainer?e(a.tocContainer):n;if(""!==a.tocContainer&&f.attr("previewContainer",!1),a.toc&&(n.tocContainer=this.markdownToCRenderer(c,f,a.tocDropdown,a.tocStartLevel),(a.tocDropdown||n.find("."+this.classPrefix+"toc-menu").length>0)&&this.tocDropdownMenu(n,a.tocTitle),""!==a.tocContainer&&n.find(".editormd-toc-menu, .editormd-markdown-toc").remove()),a.previewCodeHighlight&&(n.find("pre").addClass("prettyprint linenums"),prettyPrint()),t.isIE8||(a.flowChart&&n.find(".flowchart").flowChart(),a.sequenceDiagram&&n.find(".sequence-diagram").sequenceDiagram({theme:"simple"})),a.tex){var g=function(){n.find("."+t.classNames.tex).each(function(){var t=e(this);katex.render(t.html().replace(/</g,"<").replace(/>/g,">"),t[0]),t.find(".katex").css("font-size","1.6em")})};!a.autoLoadKaTeX||t.$katex||t.kaTeXLoaded?g():this.loadKaTeX(function(){t.$katex=katex,t.kaTeXLoaded=!0,g()})}return n.getMarkdown=function(){return s.val()},n},t.themes=["default","dark"],t.previewThemes=["default","dark"],t.editorThemes=["default","3024-day","3024-night","ambiance","ambiance-mobile","base16-dark","base16-light","blackboard","cobalt","eclipse","elegant","erlang-dark","lesser-dark","mbo","mdn-like","midnight","monokai","neat","neo","night","paraiso-dark","paraiso-light","pastel-on-dark","rubyblue","solarized","the-matrix","tomorrow-night-eighties","twilight","vibrant-ink","xq-dark","xq-light"],t.loadPlugins={},t.loadFiles={js:[],css:[],plugin:[]},t.loadPlugin=function(e,i,o){i=i||function(){},this.loadScript(e,function(){t.loadFiles.plugin.push(e),i()},o)},t.loadCSS=function(e,i,o){o=o||"head",i=i||function(){};var r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.onload=r.onreadystatechange=function(){t.loadFiles.css.push(e),i()},r.href=e+".css","head"===o?document.getElementsByTagName("head")[0].appendChild(r):document.body.appendChild(r)},t.isIE="Microsoft Internet Explorer"==navigator.appName,t.isIE8=t.isIE&&"8."==navigator.appVersion.match(/8./i),t.loadScript=function(e,i,o){o=o||"head",i=i||function(){};var r=null;r=document.createElement("script"),r.id=e.replace(/[\./]+/g,"-"),r.type="text/javascript",r.src=e+".js",t.isIE8?r.onreadystatechange=function(){r.readyState&&("loaded"===r.readyState||"complete"===r.readyState)&&(r.onreadystatechange=null,t.loadFiles.js.push(e),i())}:r.onload=function(){t.loadFiles.js.push(e),i()},"head"===o?document.getElementsByTagName("head")[0].appendChild(r):document.body.appendChild(r)},t.katexURL={css:"//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min",js:"//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min"},t.kaTeXLoaded=!1,t.loadKaTeX=function(e){t.loadCSS(t.katexURL.css,function(){t.loadScript(t.katexURL.js,e||function(){})})},t.lockScreen=function(t){e("html,body").css("overflow",t?"hidden":"")},t.createDialog=function(i){var o={name:"",width:420,height:240,title:"",drag:!0,closed:!0,content:"",mask:!0,maskStyle:{backgroundColor:"#fff",opacity:.1},lockScreen:!0,footer:!0,buttons:!1};i=e.extend(!0,o,i);var r=this,n=this.editor,a=t.classPrefix,s=(new Date).getTime(),l=""===i.name?a+"dialog-"+s:i.name,c=t.mouseOrTouch,h='
              ';""!==i.title&&(h+='
              ",h+=''+i.title+"",h+="
              "),i.closed&&(h+=''),h+='
              '+i.content,(i.footer||"string"==typeof i.footer)&&(h+='"),h+="
              ",h+='
              ',h+='
              ',h+="
              ",n.append(h);var d=n.find("."+l);d.lockScreen=function(t){return i.lockScreen&&(e("html,body").css("overflow",t?"hidden":""),r.resize()),d},d.showMask=function(){return i.mask&&n.find("."+a+"mask").css(i.maskStyle).css("z-index",t.dialogZindex-1).show(),d},d.hideMask=function(){return i.mask&&n.find("."+a+"mask").hide(),d},d.loading=function(e){var t=d.find("."+a+"dialog-mask");return t[e?"show":"hide"](),d},d.lockScreen(!0).showMask(),d.show().css({zIndex:t.dialogZindex,border:t.isIE8?"1px solid #ddd":"",width:"number"==typeof i.width?i.width+"px":i.width,height:"number"==typeof i.height?i.height+"px":i.height});var u=function(){d.css({top:(e(window).height()-d.height())/2+"px",left:(e(window).width()-d.width())/2+"px"})};if(u(),e(window).resize(u),d.children("."+a+"dialog-close").bind(c("click","touchend"),function(){d.hide().lockScreen(!1).hideMask()}),"object"==typeof i.buttons){var f=d.footer=d.find("."+a+"dialog-footer");for(var g in i.buttons){var p=i.buttons[g],m=a+g+"-btn";f.append('"),p[1]=e.proxy(p[1],d),f.children("."+m).bind(c("click","touchend"),p[1])}}if(""!==i.title&&i.drag){var w,v,k=d.children("."+a+"dialog-header");i.mask||k.bind(c("click","touchend"),function(){t.dialogZindex+=2,d.css("z-index",t.dialogZindex)}),k.mousedown(function(e){e=e||window.event,w=e.clientX-parseInt(d[0].style.left),v=e.clientY-parseInt(d[0].style.top),document.onmousemove=y});var b=function(e){e.removeClass(a+"user-unselect").off("selectstart")},x=function(e){e.addClass(a+"user-unselect").on("selectstart",function(e){return!1})},y=function(t){t=t||window.event;var i,o,r=parseInt(d[0].style.left),n=parseInt(d[0].style.top);r>=0?r+d.width()<=e(window).width()?i=t.clientX-w:(i=e(window).width()-d.width(),document.onmousemove=null):(i=0,document.onmousemove=null),n>=0?o=t.clientY-v:(o=0,document.onmousemove=null),document.onselectstart=function(){return!1},x(e("body")),x(d),d[0].style.left=i+"px",d[0].style.top=o+"px"};document.onmouseup=function(){b(e("body")),b(d),document.onselectstart=null,document.onmousemove=null},k.touchDraggable=function(){var t=null,i=function(i){var o=i.originalEvent,r=e(this).parent().position();t={x:o.changedTouches[0].pageX-r.left,y:o.changedTouches[0].pageY-r.top}},o=function(i){i.preventDefault();var o=i.originalEvent;e(this).parent().css({top:o.changedTouches[0].pageY-t.y,left:o.changedTouches[0].pageX-t.x})};this.bind("touchstart",i).bind("touchmove",o)},k.touchDraggable()}return t.dialogZindex+=2,d},t.mouseOrTouch=function(e,t){e=e||"click",t=t||"touchend";var i=e;try{document.createEvent("TouchEvent"),i=t}catch(o){}return i},t.dateFormat=function(e){e=e||"";var t=function(e){return 10>e?"0"+e:e},i=new Date,o=i.getFullYear(),r=o.toString().slice(2,4),n=t(i.getMonth()+1),a=t(i.getDate()),s=i.getDay(),l=t(i.getHours()),c=t(i.getMinutes()),h=t(i.getSeconds()),d=t(i.getMilliseconds()),u="",f=r+"-"+n+"-"+a,g=o+"-"+n+"-"+a,p=l+":"+c+":"+h;switch(e){case"UNIX Time":u=i.getTime();break;case"UTC":u=i.toUTCString();break;case"yy":u=r;break;case"year":case"yyyy":u=o;break;case"month":case"mm":u=n;break;case"cn-week-day":case"cn-wd":var m=["日","一","二","三","四","五","六"];u="星期"+m[s];break;case"week-day":case"wd":var w=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];u=w[s];break;case"day":case"dd":u=a;break;case"hour":case"hh":u=l;break;case"min":case"ii":u=c;break;case"second":case"ss":u=h;break;case"ms":u=d;break;case"yy-mm-dd":u=f;break;case"yyyy-mm-dd":u=g;break;case"yyyy-mm-dd h:i:s ms":case"full + ms":u=g+" "+p+" "+d;break;case"full":case"yyyy-mm-dd h:i:s":default:u=g+" "+p}return u},t}}); \ No newline at end of file +/*! Editor.md v1.7.17 | editormd.amd.min.js | Open source online markdown editor. | MIT License | By: IBM Skills Network | https://github.com/ibm-skills-network/editor.md | 2024-03-27 */ +!function(e){"use strict";var t;"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?module.exports=e:"function"==typeof define?define.amd?define(["jquery","marked","prettify","katex","raphael","underscore","flowchart","jqueryflowchart","sequenceDiagram","codemirror/lib/codemirror",(t="codemirror/mode/")+"css/css",t+"sass/sass",t+"shell/shell",t+"sql/sql",t+"clike/clike",t+"php/php",t+"xml/xml",t+"markdown/markdown",t+"javascript/javascript",t+"htmlmixed/htmlmixed",t+"gfm/gfm",t+"http/http",t+"go/go",t+"dart/dart",t+"coffeescript/coffeescript",t+"nginx/nginx",t+"python/python",t+"perl/perl",t+"lua/lua",t+"r/r",t+"ruby/ruby",t+"rst/rst",t+"smartymixed/smartymixed",t+"vb/vb",t+"vbscript/vbscript",t+"velocity/velocity",t+"xquery/xquery",t+"yaml/yaml",t+"erlang/erlang",t+"jade/jade",(t="codemirror/addon/")+"edit/trailingspace",t+"dialog/dialog",t+"search/searchcursor",t+"search/search",t+"scroll/annotatescrollbar",t+"search/matchesonscrollbar",t+"display/placeholder",t+"edit/closetag",t+"fold/foldcode",t+"fold/foldgutter",t+"fold/indent-fold",t+"fold/brace-fold",t+"fold/xml-fold",t+"fold/markdown-fold",t+"fold/comment-fold",t+"mode/overlay",t+"selection/active-line",t+"edit/closebrackets",t+"display/fullscreen",t+"search/match-highlighter"],e):define(["jquery"],e):window.editormd=e()}(function(){"function"==typeof define&&define.amd&&(v=arguments[0],marked=arguments[1],prettify=arguments[2],katex=arguments[3],Raphael=arguments[4],_=arguments[5],flowchart=arguments[6],CodeMirror=arguments[9]);var C,c,h,e,d,v="undefined"!=typeof jQuery?jQuery:Zepto;if(void 0!==v)return(C=function(e,t,i){return new C.fn.init(e,t,i)}).title=C.$name="Editor.md",C.version="1.7.17",C.homePage="https://pandao.github.io/editor.md/",C.classPrefix="editormd-",C.toolbarModes={full:["undo","redo","|","bold","del","italic","quote","ucwords","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","link","reference-link","image","code","preformatted-text","code-block","table","datetime","emoji","html-entities","pagebreak","|","goto-line","watch","preview","fullscreen","clear","search","|","help","changetheme","info"],simple:["undo","redo","|","bold","del","italic","quote","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","watch","preview","fullscreen","|","help","changetheme","info"],mini:["undo","redo","|","watch","preview","|","help","changetheme","info"]},C.defaults={debug:!1,mode:"gfm",name:"",value:"",theme:"",editorTheme:"default",previewTheme:"",markdown:void 0,appendMarkdown:"",width:"100%",height:"100%",path:"./lib/",pluginPath:"",customPluginPath:"",delay:300,autoLoadModules:!0,watch:!0,placeholder:"Enjoy Markdown! coding now...",gotoLine:!0,codeFold:!1,autoHeight:!1,autoFocus:!0,autoCloseTags:!0,searchReplace:!0,syncScrolling:!0,readOnly:!1,tabSize:4,indentUnit:4,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,showTrailingSpace:!0,matchBrackets:!0,indentWithTabs:!0,styleSelectedText:!0,matchWordHighlight:!0,styleActiveLine:!0,dialogLockScreen:!0,dialogShowMask:!0,dialogDraggable:!0,dialogMaskBgColor:"#fff",dialogMaskOpacity:.1,fontSize:"13px",saveHTMLToTextarea:!1,disabledKeyMaps:[],onload:function(){},onresize:function(){},onchange:function(){},onwatch:null,onunwatch:null,onpreviewing:function(){},onCmChange:null,fixCodeBlocks:function(){},onpreviewed:function(){},onfullscreen:function(){},onfullscreenExit:function(){},onscroll:function(){},onpreviewscroll:function(){},imageUpload:!1,imageFormats:["jpg","jpeg","gif","png","bmp","webp"],imageUploadURL:"",crossDomainUpload:!1,uploadCallbackURL:"",toc:!0,tocm:!1,tocTitle:"",tocDropdown:!1,tocContainer:"",tocStartLevel:1,htmlDecode:!1,pageBreak:!0,atLink:!0,emailLink:!0,taskList:!1,emoji:!0,tex:!1,flowChart:!1,sequenceDiagram:!1,mermaid:!0,mindMap:!0,previewCodeHighlight:!0,toolbar:!0,toolbarAutoFixed:!0,titlebar:{left:{},center:{},right:{}},toolbarIcons:"full",toolbarTitles:{},toolbarHandlers:{ucwords:function(){return C.toolbarHandlers.ucwords},lowercase:function(){return C.toolbarHandlers.lowercase}},toolbarCustomIcons:{lowercase:'a',ucwords:'Aa',fontcase:'Aa'},toolbarIconsClass:{undo:"fa-undo",redo:"fa-repeat",bold:"fa-bold",del:"fa-strikethrough",italic:"fa-italic",quote:"fa-quote-left",uppercase:"fa-font",heading:"fa-header",h1:C.classPrefix+"bold",h2:C.classPrefix+"bold",h3:C.classPrefix+"bold",h4:C.classPrefix+"bold",h5:C.classPrefix+"bold",h6:C.classPrefix+"bold","list-ul":"fa-list-ul","list-ol":"fa-list-ol",hr:"fa-minus",link:"fa-link","reference-link":"fa-anchor",image:"fa-picture-o",code:"fa-code","preformatted-text":"fa-file-code-o","code-block":"fa-file-code-o",table:"fa-table",datetime:"fa-clock-o",emoji:"fa-smile-o","html-entities":"fa-copyright",pagebreak:"fa-newspaper-o","goto-line":"fa-terminal",watch:"fa-eye-slash",unwatch:"fa-eye",preview:"fa-desktop",search:"fa-search",fullscreen:"fa-arrows-alt",clear:"fa-eraser",help:"fa-question-circle",changetheme:"fa-info-circle",info:"fa-info-circle"},toolbarIconTexts:{ucwords:"Capitalize",uppercase:"Uppercase",lowercase:"Lowercase",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6"},lang:{name:"zh-cn",description:"开源在线Markdown编辑器
              Open source online Markdown editor.",tocTitle:"目录",toolbar:{undo:"撤销(Ctrl+Z)",redo:"重做(Ctrl+Y)",bold:"粗体",del:"删除线",italic:"斜体",quote:"引用",ucwords:"将每个单词首字母转成大写",uppercase:"将所选转换成大写",lowercase:"将所选转换成小写",h1:"标题1",h2:"标题2",h3:"标题3",h4:"标题4",h5:"标题5",h6:"标题6","list-ul":"无序列表","list-ol":"有序列表",hr:"横线",link:"链接","reference-link":"引用链接",image:"添加图片",code:"行内代码","preformatted-text":"预格式文本 / 代码块(缩进风格)","code-block":"代码块(多语言风格)",table:"添加表格",datetime:"日期时间",emoji:"Emoji表情","html-entities":"HTML实体字符",pagebreak:"插入分页符","goto-line":"跳转到行",watch:"关闭实时预览",unwatch:"开启实时预览",preview:"全窗口预览HTML(按 Shift + ESC还原)",fullscreen:"全屏(按ESC还原)",clear:"清空",search:"搜索",help:"使用帮助",changetheme:"切换编辑主题",info:"关于"+C.title},buttons:{enter:"确定",cancel:"取消",close:"关闭"},dialog:{link:{title:"添加链接",url:"链接地址",urlTitle:"链接标题",urlEmpty:"错误:请填写链接地址。"},referenceLink:{title:"添加引用链接",name:"引用名称",url:"链接地址",urlId:"链接ID",urlTitle:"链接标题",nameEmpty:"错误:引用链接的名称不能为空。",idEmpty:"错误:请填写引用链接的ID。",urlEmpty:"错误:请填写引用链接的URL地址。"},image:{title:"添加图片",url:"图片地址",link:"图片链接",alt:"图片描述",uploadButton:"本地上传",imageURLEmpty:"错误:图片地址不能为空。",uploadFileEmpty:"错误:上传的图片不能为空。",formatNotAllowed:"错误:只允许上传图片文件,允许上传的图片文件格式有:"},preformattedText:{title:"添加预格式文本或代码块",emptyAlert:"错误:请填写预格式文本或代码的内容。"},codeBlock:{title:"添加代码块",selectLabel:"代码语言:",selectDefaultText:"请选择代码语言",otherLanguage:"其他语言",unselectedLanguageAlert:"错误:请选择代码所属的语言类型。",codeEmptyAlert:"错误:请填写代码内容。"},htmlEntities:{title:"HTML 实体字符"},help:{title:"使用帮助"},changetheme:{title:"切换编辑主题"}}}},C.classNames={tex:C.classPrefix+"tex",texDisplay:C.classPrefix+"texDisaply"},C.dialogZindex=99999,C.$katex=null,C.$marked=null,C.$filterXSS=null,C.$CodeMirror=null,C.$prettyPrint=null,C.prototype=C.fn={state:{watching:!1,loaded:!1,preview:!1,fullscreen:!1},init:function(e,t,i){i="object"==typeof e?e:i||{};var o=this.classPrefix=C.classPrefix,i=this.settings=v.extend(!0,{},C.defaults,i),n=(e="object"==typeof e?i.id:e,this.editor=v("#"+e)),t=(this.id=e,this.author_ide_version=t||n.version,this.lang=i.lang,this.classNames={textarea:{html:o+"html-textarea",markdown:o+"markdown-textarea"}}),r=(i.pluginPath=""===i.pluginPath?i.path+"../plugins/":i.pluginPath,this.state.watching=!!i.watch,n.hasClass("editormd")||n.addClass("editormd"),n.css({width:"number"==typeof i.width?i.width+"px":i.width,height:"number"==typeof i.height?i.height+"px":i.height}),i.autoHeight&&n.css("height","auto"),this.markdownTextarea=n.children("textarea")),e=(r.length<1&&(n.append(""),r=this.markdownTextarea=n.children("textarea")),r.addClass(t.textarea.markdown).attr("placeholder",i.placeholder),void 0!==r.attr("name")&&""!==r.attr("name")||r.attr("name",""!==i.name?i.name:e+"-markdown-doc"),[i.readOnly?"":'',i.saveHTMLToTextarea?'':"",'
              ','
              ','
              '].join("\n"));return n.append(e).addClass(o+"vertical"),""!==i.theme&&n.addClass(o+"theme-"+i.theme),this.mask=n.children("."+o+"mask"),this.containerMask=n.children("."+o+"container-mask"),void 0!==i.markdown&&r.val(i.markdown),""!==i.appendMarkdown&&r.val(r.val()+i.appendMarkdown),this.htmlTextarea=n.children("."+t.textarea.html),this.preview=n.children("."+o+"preview"),this.previewContainer=this.preview.children("."+o+"preview-container"),""!==i.previewTheme&&this.preview.addClass(o+"preview-theme-"+i.previewTheme),"function"==typeof define&&define.amd&&("undefined"!=typeof katex&&(C.$katex=katex),i.searchReplace)&&!i.readOnly&&(C.loadCSS(i.path+"codemirror/addon/dialog/dialog"),C.loadCSS(i.path+"codemirror/addon/search/matchesonscrollbar")),"function"==typeof define&&define.amd||!i.autoLoadModules?("undefined"!=typeof CodeMirror&&(C.$CodeMirror=CodeMirror),"undefined"!=typeof marked&&(C.$marked=marked),this.setCodeMirror().setToolbar().loadedDisplay()):this.loadQueues(),this},loadQueues:function(){function e(){!C.isIE8&&(i.flowChart||i.sequenceDiagram)?C.loadScript(o+"raphael.min",function(){C.loadScript(o+"underscore.min",function(){!i.flowChart&&i.sequenceDiagram?C.loadScript(o+"sequence-diagram.min",function(){t.loadedDisplay()}):i.flowChart&&!i.sequenceDiagram?C.loadScript(o+"flowchart.min",function(){C.loadScript(o+"jquery.flowchart.min",function(){t.loadedDisplay()})}):i.flowChart&&i.sequenceDiagram&&C.loadScript(o+"flowchart.min",function(){C.loadScript(o+"jquery.flowchart.min",function(){C.loadScript(o+"sequence-diagram.min",function(){t.loadedDisplay()})})})})}):t.loadedDisplay()}var t=this,i=this.settings,o=i.path;return C.loadScript(o+"xss",function(){C.$filterXSS=filterXSS}),C.loadCSS(o+"codemirror/codemirror.min"),i.searchReplace&&!i.readOnly&&(C.loadCSS(o+"codemirror/addon/dialog/dialog"),C.loadCSS(o+"codemirror/addon/search/matchesonscrollbar")),i.codeFold&&C.loadCSS(o+"codemirror/addon/fold/foldgutter"),C.loadScript(o+"codemirror/codemirror.min",function(){C.$CodeMirror=CodeMirror,C.loadScript(o+"codemirror/modes.min",function(){C.loadScript(o+"codemirror/addons.min",function(){if(t.setCodeMirror(),"gfm"!==i.mode&&"markdown"!==i.mode)return t.loadedDisplay(),!1;t.setToolbar(),C.loadScript(o+"marked.min",function(){C.$marked=marked,i.highlightStyle||(i.highlightStyle="github"),i.previewCodeHighlight?(C.loadCSS(o+"highlight/styles/"+i.highlightStyle),C.loadScript(o+"highlight/highlight",function(){e()})):e()})})})}),this},setTheme:function(e){var t=this.editor,i=this.settings.theme,o=this.classPrefix+"theme-";return t.removeClass(o+i).addClass(o+e),this.settings.theme=e,this},setEditorTheme:function(e){var t=this.settings;return"default"!==(t.editorTheme=e)&&C.loadCSS(t.path+"codemirror/theme/"+t.editorTheme),this.cm.setOption("theme",e),this},setCodeMirrorTheme:function(e){return this.setEditorTheme(e),this},setPreviewTheme:function(e){var t=this.preview,i=this.settings.previewTheme,o=this.classPrefix+"preview-theme-";return t.removeClass(o+i).addClass(o+e),this.settings.previewTheme=e,this},setCodeMirror:function(){var e=this.settings,t=this.editor,i=("default"!==e.editorTheme&&C.loadCSS(e.path+"codemirror/theme/"+e.editorTheme),{mode:e.mode,theme:e.editorTheme,tabSize:e.tabSize,dragDrop:!1,autofocus:e.autoFocus,autoCloseTags:e.autoCloseTags,readOnly:!!e.readOnly&&"nocursor",indentUnit:e.indentUnit,lineNumbers:e.lineNumbers,lineWrapping:e.lineWrapping,extraKeys:{"Ctrl-Q":function(e){e.foldCode(e.getCursor())}},foldGutter:e.codeFold,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],matchBrackets:e.matchBrackets,indentWithTabs:e.indentWithTabs,styleActiveLine:e.styleActiveLine,styleSelectedText:e.styleSelectedText,autoCloseBrackets:e.autoCloseBrackets,showTrailingSpace:e.showTrailingSpace,highlightSelectionMatches:!!e.matchWordHighlight&&{showToken:"onselected"!==e.matchWordHighlight&&/\w/}});return this.codeEditor=this.cm=C.$CodeMirror.fromTextArea(this.markdownTextarea[0],i),this.codeMirror=this.cmElement=t.children(".CodeMirror"),""!==e.value&&this.cm.setValue(e.value),this.codeMirror.css({fontSize:e.fontSize,width:e.watch?"50%":"100%"}),e.autoHeight&&(this.codeMirror.css("height","auto"),this.cm.setOption("viewportMargin",1/0)),e.lineNumbers||this.codeMirror.find(".CodeMirror-gutters").css("border-right","none"),this},getCodeMirrorOption:function(e){return this.cm.getOption(e)},setCodeMirrorOption:function(e,t){return this.cm.setOption(e,t),this},addKeyMap:function(e,t){return this.cm.addKeyMap(e,t),this},removeKeyMap:function(e){return this.cm.removeKeyMap(e),this},gotoLine:function(e){var t,i,o,n,r=this.settings;return r.gotoLine&&(t=this.cm,this.editor,o=t.lineCount(),i=this.preview,"number"!=typeof(e="string"==typeof e&&"first"===(e="last"===e?o:e)?1:e)?alert("Error: The line number must be an integer."):o<(e=parseInt(e)-1)?alert("Error: The line number range 1-"+o):(t.setCursor({line:e,ch:0}),o=t.getScrollInfo().clientHeight,e=t.charCoords({line:e,ch:0},"local"),t.scrollTo(null,(e.top+e.bottom-o)/2),r.watch&&(e=this.codeMirror.find(".CodeMirror-scroll")[0],o=v(e).height(),n=(r=e.scrollTop)/e.scrollHeight,0===r?i.scrollTop(0):r+o>=e.scrollHeight-16?i.scrollTop(i[0].scrollHeight):i.scrollTop(i[0].scrollHeight*n)),t.focus())),this},extend:function(){return void 0!==arguments[1]&&("function"==typeof arguments[1]&&(arguments[1]=v.proxy(arguments[1],this)),this[arguments[0]]=arguments[1]),"object"==typeof arguments[0]&&void 0===arguments[0].length&&v.extend(!0,this,arguments[0]),this},set:function(e,t){return void 0!==t&&"function"==typeof t&&(t=v.proxy(t,this)),this[e]=t,this},config:function(e,t){var i=this.settings;return"object"==typeof e&&(i=v.extend(!0,i,e)),"string"==typeof e&&(i[e]=t),this.settings=i,this.recreate(),this},on:function(e,t){var i=this.settings;return void 0!==i["on"+e]&&(i["on"+e]=v.proxy(t,this)),this},off:function(e){var t=this.settings;return void 0!==t["on"+e]&&(t["on"+e]=function(){}),this},showToolbar:function(e){var t=this.settings;return t.readOnly||(t.toolbar&&(this.toolbar.length<1||""===this.toolbar.find("."+this.classPrefix+"menu").html())&&this.setToolbar(),t.toolbar=!0,this.toolbar.show(),this.resize(),v.proxy(e||function(){},this)()),this},hideToolbar:function(e){return this.settings.toolbar=!1,this.toolbar.hide(),this.resize(),v.proxy(e||function(){},this)(),this},setToolbarAutoFixed:function(e){var t=this.state,i=this.editor,o=this.toolbar,n=this.settings;void 0!==e&&(n.toolbarAutoFixed=e);return!t.fullscreen&&!t.preview&&n.toolbar&&n.toolbarAutoFixed&&v(window).bind("scroll",function(){var e=v(window),t=e.scrollTop();if(!n.toolbarAutoFixed)return!1;10
            • '),i=this.toolbar=e.children("."+s+"toolbar")),a.toolbar){for(var l="",o=(Object.entries(t).forEach(([e,t])=>{var i="";if("left"===e)i='Skills Network Author IDE';else for(var o in t){var n=o.replace(/\s+/g,"-").toLowerCase(),r="string"==typeof a.lang.titlebar[o]?a.lang.titlebar[o]:"";switch(t[o]){case"dropdown":i+='
              ';break;case"button":i+='";break;default:i+=''+o+""}}l+='
              '+i+"
              "}),i.find("div."+s+"titlebar-container").html(l),i.show(),"function"==typeof a.toolbarIcons?a.toolbarIcons():"string"==typeof a.toolbarIcons?C.toolbarModes[a.toolbarIcons]:a.toolbarIcons),e=i.find("."+this.classPrefix+"menu"),n="",r=!1,c=0,h=o.length;c';else{var d,u,f=u.includes("dropdown"),p=[],g=(r&&p.push("pull-right"),f&&p.push("dropdown"),0':"
            • "),m=[];f?(d=(p=u.split(":"))[0],u=p[1],p=p[2].split(","),m=[u].concat(p),p.length||(f=!1)):m.push(u);for(var w=0,h=m.length;w');var v=!(f&&"dropdownIcon"!==d&&g.includes("toolbar-dropdown-content")),b=/h(\d)/.test(u),x=u,k=("watch"!==u||a.watch||(x="unwatch"),a.lang.toolbar[x]),y=void 0===(y=a.toolbarIconTexts[x])?"":y,x=void 0!==(x=a.toolbarIconsClass[x])&&v?x:"";g+='',v&&void 0!==a.toolbarCustomIcons[u]&&"function"!=typeof a.toolbarCustomIcons[u]?g+=a.toolbarCustomIcons[u]:(g+='',"function"!=typeof a.toolbarIcons&&b?g+=''+u.toUpperCase()+"":d&&"dropdownIcon"===d&&g.includes("toolbar-dropdown-content")?g+=''+(y||u)+"":""!==x&&v||(g+=''+(y||u)+""),g+=""),g+="",f&&w===h-1&&g.includes("toolbar-dropdown-content")&&(g+="
            • ",d="")}g+="",n=r?g+n:n+g}e.html(n),e.find('[title="Lowercase"]').attr("title",a.lang.toolbar.lowercase),e.find('[title="ucwords"]').attr("title",a.lang.toolbar.ucwords),this.setToolbarHandler(),this.setToolbarAutoFixed()}else i.hide()}return this},dialogLockScreen:function(){return v.proxy(C.dialogLockScreen,this)(),this},dialogShowMask:function(e){return v.proxy(C.dialogShowMask,this)(e),this},positionDialog:function(e,t){return v.proxy(C.positionDialog,this)(e,t),this},getToolbarHandles:function(e){var t=this.toolbarHandlers=C.toolbarHandlers;return e&&void 0!==toolbarIconHandlers[e]?t[e]:t},setToolbarHandler:function(){var n,e,t,r,a=this,s=this.settings;return s.toolbar&&!s.readOnly&&(t=this.toolbar,n=this.cm,e=this.classPrefix,t=this.toolbarIcons=t.find("."+e+"menu > li a"),r=this.getToolbarHandles(),t.bind(C.mouseOrTouch("click","touchend"),function(){var e=v(this).children(".fa"),t=e.attr("name"),i=n.getCursor(),o=n.getSelection();if(""!==t)return a.activeIcon=e,void 0!==r[t]?v.proxy(r[t],a)(n):void 0!==s.toolbarHandlers[t]&&v.proxy(s.toolbarHandlers[t],a)(n,e,i,o),"link"!==t&&"reference-link"!==t&&"image"!==t&&"code-block"!==t&&"preformatted-text"!==t&&"watch"!==t&&"preview"!==t&&"search"!==t&&"fullscreen"!==t&&"info"!==t&&n.focus(),!1})),this},createDialog:function(e){return v.proxy(C.createDialog,this)(e)},createInfoDialog:function(){var e=this,t=this.editor,i=this.classPrefix,o=['
              ','
              ','

              '+C.title+"v"+C.version+"

              ","

              "+this.lang.description+"

              ",'

              '+C.homePage+'

              ','

              Copyright © 2015 Pandao, The MIT License.

              ',"
              ",'',"
              "].join("\n"),o=(t.append(o),this.infoDialog=t.children("."+i+"dialog-info"));return o.find("."+i+"dialog-close").bind(C.mouseOrTouch("click","touchend"),function(){e.hideInfoDialog()}),o.css("border",C.isIE8?"1px solid #ddd":"").css("z-index",C.dialogZindex).show(),this.infoDialogPosition(),this},infoDialogPosition:function(){function e(){t.css({top:(v(window).height()-t.height())/2+"px",left:(v(window).width()-t.width())/2+"px"})}var t=this.infoDialog;return e(),v(window).resize(e),this},showInfoDialog:function(){v("html,body").css("overflow-x","hidden");var e=this.editor,t=this.settings,e=this.infoDialog=e.children("."+this.classPrefix+"dialog-info");return e.length<1&&this.createInfoDialog(),this.lockScreen(!0),this.mask.css({opacity:t.dialogMaskOpacity,backgroundColor:t.dialogMaskBgColor}).show(),e.css("z-index",C.dialogZindex).show(),this.infoDialogPosition(),this},hideInfoDialog:function(){return v("html,body").css("overflow-x",""),this.infoDialog.hide(),this.mask.hide(),this.lockScreen(!1),this},lockScreen:function(e){return C.lockScreen(e),this.resize(),this},recreate:function(){var e=this.editor,t=this.settings;return this.codeMirror.remove(),this.setCodeMirror(),t.readOnly||(0=e[0].scrollHeight-16?i.scrollTop(i[0].scrollHeight):i.scrollTop((i[0].scrollHeight+r+a)*n)}return this},registerKeyMaps:function(e){var t=this,i=this.cm,o=this.settings,n=C.toolbarHandlers,r=o.disabledKeyMaps;if(e=e||null)for(var a in e)v.inArray(a,r)<0&&(e[a],i.addKeyMap(e));else{for(var s in C.keyMaps){var l,c=C.keyMaps[s],c="string"==typeof c?v.proxy(n[c],t):v.proxy(c,t);v.inArray(s,["F9","F10","F11"])<0&&v.inArray(s,r)<0&&((l={})[s]=c,i.addKeyMap(l))}v(window).keydown(function(e){if(v.inArray({120:"F9",121:"F10",122:"F11"}[e.keyCode],r)<0)switch(e.keyCode){case 120:return v.proxy(n.watch,t)(),!1;case 121:return v.proxy(n.preview,t)(),!1;case 122:return v.proxy(n.fullscreen,t)(),!1}})}return this},bindScrollEvent:function(){var e,t,i,o,a=this,s=this.previewContainer,l=this.settings,r=this.codeMirror,n=C.mouseOrTouch;return l.syncScrolling&&(i=function(){s.bind(n("scroll","touchmove"),function(e){var t,i,o,n;null==c&&(t=v(this).height(),o=(i=v(this).scrollTop())/v(this)[0].scrollHeight,n=r.find(".CodeMirror-scroll"),0===i?n.scrollTop(0):i+t>=v(this)[0].scrollHeight?n.scrollTop(n[0].scrollHeight):n.scrollTop(n[0].scrollHeight*o),v.proxy(l.onpreviewscroll,a)(e))})},o=function(){s.unbind(n("scroll","touchmove"))},r.bind({mouseover:e=function(){r.find(".CodeMirror-scroll").bind(n("scroll","touchmove"),function(e){var t,i,o,n,r;null==c&&(t=v(this).height(),o=(i=v(this).scrollTop())/v(this)[0].scrollHeight,n=0,s.find(".markdown-toc-list").each(function(){n+=v(this).height()}),r=(r=s.find(".editormd-toc-menu").height())||0,0===i?s.scrollTop(0):i+t>=v(this)[0].scrollHeight-16?s.scrollTop(s[0].scrollHeight):s.scrollTop((s[0].scrollHeight+n+r)*o),v.proxy(l.onscroll,a)(e))})},mouseout:t=function(){r.find(".CodeMirror-scroll").unbind(n("scroll","touchmove"))},touchstart:e,touchend:t}),"single"!==l.syncScrolling)&&s.bind({mouseover:i,mouseout:o,touchstart:i,touchend:o}),this},bindChangeEvent:function(){var i=this,e=this.cm,o=this.settings;return e.on("change",function(e,t){o.watch&&i.previewContainer.css("padding",o.autoHeight?"20px 20px 50px 40px":"20px"),c&&clearTimeout(c),o.onCmChange&&v.proxy(o.onCmChange,i)(),c=setTimeout(function(){i.save(),c=null},o.delay)}),this},loadedDisplay:function(e){e=e||!1;var t=this,i=this.editor,o=this.preview,n=this.settings;return this.containerMask.hide(),this.save(),n.watch&&o.show(),i.data("oldWidth",i.width()).data("oldHeight",i.height()),this.resize(),this.registerKeyMaps(),v(window).resize(function(){t.resize()}),this.bindScrollEvent().bindChangeEvent(),e||v.proxy(n.onload,this)(),this.state.loaded=!0,n.watch&&(this.save(),o.show()),this},width:function(e){return this.editor.css("width","number"==typeof e?e+"px":e),this.resize(),this},height:function(e){return this.editor.css("height","number"==typeof e?e+"px":e),this.resize(),this},resize:function(e,t){t=t||null;var i=this.state,o=this.editor,n=this.preview,r=this.toolbar,a=this.settings,s=this.codeMirror;return(e=e||null)&&o.css("width","number"==typeof e?e+"px":e),!a.autoHeight||i.fullscreen||i.preview?(t&&o.css("height","number"==typeof t?t+"px":t),i.fullscreen&&o.height(v(window).height()),a.toolbar&&!a.readOnly?s.css("margin-top",r.height()+1).height(o.height()-r.height()):s.css("margin-top",0).height(o.height())):(o.css("height","auto"),s.css("height","auto")),a.watch?(s.width(o.width()/2),n.width(i.preview?o.width():o.width()/2),this.previewContainer.css("padding",a.autoHeight?"20px 20px 50px 40px":"20px"),a.toolbar&&!a.readOnly?n.css("top",r.height()+1):n.css("top",0),!a.autoHeight||i.fullscreen||i.preview?(e=a.toolbar&&!a.readOnly?o.height()-r.height():o.height(),n.height(e)):n.height("")):(s.width(o.width()),n.hide()),i.loaded&&v.proxy(a.onresize,this)(),this},save:function(){var e,t,i,o=this,n=this.state,r=this.settings,a=this.cm,s=a.getValue(),l=this.previewContainer;return(null!==c||!r.watch&&n.preview)&&("gfm"!==r.mode&&"markdown"!==r.mode?this.markdownTextarea.val(s):(a.save(),(r.saveHTMLToTextarea||r.watch||!r.watch&&n.preview)&&(t=C.$marked,e=this.markdownToC=[],i=this.markedRendererOptions={toc:r.toc,tocm:r.tocm,tocStartLevel:r.tocStartLevel,pageBreak:r.pageBreak,taskList:r.taskList,emoji:r.emoji,tex:r.tex,atLink:r.atLink,emailLink:r.emailLink,flowChart:r.flowChart,sequenceDiagram:r.sequenceDiagram,previewCodeHighlight:r.previewCodeHighlight,mermaid:r.mermaid,mindMap:r.mindMap},i=this.markedOptions={renderer:C.markedRenderer(e,i),gfm:!0,tables:!0,breaks:!0,pedantic:!1,sanitize:!r.htmlDecode,smartLists:!0,smartypants:!0},t.setOptions(i),t=C.$marked.parse(s,i),r.debug&&console.info("cmValue",s,t),t=C.$filterXSS(t),this.markdownTextarea.text(s),a.save(),r.saveHTMLToTextarea&&this.htmlTextarea.text(t),r.watch||!r.watch&&n.preview)&&(l.html(t),this.previewCodeHighlight(),r.toc&&(s=(i=""===r.tocContainer?l:v(r.tocContainer)).find("."+this.classPrefix+"toc-menu"),i.attr("previewContainer",""===r.tocContainer?"true":"false"),""!==r.tocContainer&&0{C.loadPlugin(i,function(){C.loadPlugins[t]=r[t],e(r[t](a,n))},"head",o?r.author_ide_version:C.version)});C.loadPlugin(i,function(){C.loadPlugins[t]=r[t],r[t](a,n)},"head",o?r.author_ide_version:C.version)}else{if(n.proxy)return v.proxy(C.loadPlugins[t],this)(a,n);v.proxy(C.loadPlugins[t],this)(a,n)}return this},search:function(e){var t=this.settings;return t.searchReplace?t.readOnly||this.cm.execCommand(e||"find"):alert("Error: settings.searchReplace == false"),this},searchReplace:function(){return this.search("replace"),this},searchReplaceAll:function(){return this.search("replaceAll"),this}},C.fn.init.prototype=C.fn,C.dialogLockScreen=function(){(this.settings||{dialogLockScreen:!0}).dialogLockScreen&&(v("html,body").css("overflow","hidden"),this.resize())},C.positionDialog=function(e,t="center"){var i,o;switch(t){case"center":i=(v(window).width()-e.width())/2+"px",o=(v(window).height()-e.height())/2+"px";break;case"center-left":i=v(window).width()/4-e.width()/2+"px",o=(v(window).height()-e.height())/2+"px";break;case"center-right":i=3*v(window).width()/4-e.width()/2+"px",o=(v(window).height()-e.height())/2+"px";break;default:console.warn("Unsupported dialog position: "+t),i=(v(window).width()-e.width())/2+"px",o=(v(window).height()-e.height())/2+"px"}e.css({top:o,left:i})},C.dialogShowMask=function(e){var t=this.editor,i=this.settings||{dialogShowMask:!0};e.css({top:(v(window).height()-e.height())/2+"px",left:(v(window).width()-e.width())/2+"px"}),i.dialogShowMask&&t.children("."+this.classPrefix+"mask").css("z-index",parseInt(e.css("z-index"))-1).show()},C.toolbarHandlers={undo:function(){this.cm.undo()},redo:function(){this.cm.redo()},bold:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection("**"+i+"**"),""===i&&e.setCursor(t.line,t.ch+2)},del:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection("~~"+i+"~~"),""===i&&e.setCursor(t.line,t.ch+2)},italic:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection("*"+i+"*"),""===i&&e.setCursor(t.line,t.ch+1)},quote:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("> "+i),e.setCursor(t.line,t.ch+2)):e.replaceSelection("> "+i)},ucfirst:function(){var e=this.cm,t=e.getSelection(),i=e.listSelections();e.replaceSelection(C.firstUpperCase(t)),e.setSelections(i)},ucwords:function(){var e=this.cm,t=e.getSelection(),i=e.listSelections();e.replaceSelection(C.wordsFirstUpperCase(t)),e.setSelections(i)},uppercase:function(){var e=this.cm,t=e.getSelection(),i=e.listSelections();e.replaceSelection(t.toUpperCase()),e.setSelections(i)},lowercase:function(){var e=this.cm,t=(e.getCursor(),e.getSelection()),i=e.listSelections();e.replaceSelection(t.toLowerCase()),e.setSelections(i)},h1:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=new RegExp("^#{1}[ ]"),n=new RegExp("^#{1,6}[ ]");!0===o.test(i)?(i=i.replace(/^#{1}[ ]/,""),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection(i+"\n"),e.setCursor(t.line,t.ch-2)):(!0===n.test(i)&&(i=i.replace(/^#{1,6}[ ]/,"")),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection("# "+i+"\n"),e.setCursor(t.line,t.ch+2))},h2:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=new RegExp("^#{2}[ ]"),n=new RegExp("^#{1,6}[ ]");!0===o.test(i)?(i=i.replace(/^#{2}[ ]/,""),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection(i+"\n"),e.setCursor(t.line,t.ch-3)):(!0===n.test(i)&&(i=i.replace(/^#{1,6}[ ]/,"")),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection("## "+i+"\n"),e.setCursor(t.line,t.ch+3))},h3:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=new RegExp("^#{3}[ ]"),n=new RegExp("^#{1,6}[ ]");!0===o.test(i)?(i=i.replace(/^#{3}[ ]/,""),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection(i+"\n"),e.setCursor(t.line,t.ch-4)):(!0===n.test(i)&&(i=i.replace(/^#{1,6}[ ]/,"")),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection("### "+i+"\n"),e.setCursor(t.line,t.ch+4))},h4:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=new RegExp("^#{4}[ ]"),n=new RegExp("^#{1,6}[ ]");!0===o.test(i)?(i=i.replace(/^#{4}[ ]/,""),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection(i+"\n"),e.setCursor(t.line,t.ch-5)):(!0===n.test(i)&&(i=i.replace(/^#{1,6}[ ]/,"")),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection("#### "+i+"\n"),e.setCursor(t.line,t.ch+5))},h5:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=new RegExp("^#{5}[ ]"),n=new RegExp("^#{1,6}[ ]");!0===o.test(i)?(i=i.replace(/^#{5}[ ]/,""),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection(i+"\n"),e.setCursor(t.line,t.ch-6)):(!0===n.test(i)&&(i=i.replace(/^#{1,6}[ ]/,"")),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection("##### "+i+"\n"),e.setCursor(t.line,t.ch+6))},h6:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=new RegExp("^#{6}[ ]"),n=new RegExp("^#{1,6}[ ]");!0===o.test(i)?(i=i.replace(/^#{6}[ ]/,""),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection(i+"\n"),e.setCursor(t.line,t.ch-7)):(!0===n.test(i)&&(i=i.replace(/^#{1,6}[ ]/,"")),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection("###### "+i+"\n"),e.setCursor(t.line,t.ch+7))},"list-ul":function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=new RegExp("^-{1}[ ]"),n=0;if(""===i)e.setCursor(t.line,0),e.replaceSelection("- "+i),e.setCursor(t.line,t.ch+2);else{for(var r=i.split("\n"),a=0,s=r.length;a/i),i=(null!==i&&(t=i[0],e=e.substr(t.length)),"default");return 0===e.indexOf("[info]")?(i="info",e=e.substr(6)):0===e.indexOf("[warning]")?(i="warning",e=e.substr(9)):0===e.indexOf("[success]")?(i="success",e=e.substr(9)):0===e.indexOf("[danger]")&&(i="danger",e=e.substr(8)),'
              \n'+t+e+"
              \n"},e.image=function(e,t,i){var o,n,r,a="",s="",l="";return e&&""!==e&&((o=document.createElement("a")).href=e,null!==(n=o.hash.match(/size=\d+x\d+/i))&&(o.hash=o.hash.replace(n[0],""),e=o.href,0<(n=n[0].replace("size=","").split("x"))[0]&&(a+=' width="'+n[0]+'"'),0","center"===(n=n[0].replace("align=",""))?s='

              ':"left"===n?s='

              ':"right"===n&&(s='

              ')),s+''+i+'"+l},e.emoji=function(e){var t=(e=e.replace(C.regexs.emojiDatetime,function(e){return e.replace(/:/g,":")})).match(r);if(t&&a.emoji)for(var i=0,o=t.length;i'}else{var s=e.match(w),l=e.match(g);if(s)for(var c=0,h=s.length;c'}else{if(!l)return':'+o+':';for(var u=0,f=l.length;u'}}}});return e},e.atLink=function(e){return n.test(e)&&(a.atLink&&(e=(e=e.replace(i,function(e,t,i,o){return e.replace(/@/g,"_#_@_#_")})).replace(n,function(e,t){return''+e+""}).replace(/_#_@_#_/g,"@")),a.emailLink)?e.replace(o,function(e,t,i,o,n){return!t&&v.inArray(n,"jpg|jpeg|png|gif|webp|ico|icon|pdf".split("|"))<0?''+e+"":e}):e},e.link=function(e,t,i){if(this.options.sanitize){try{var o=decodeURIComponent(unescape(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===o.indexOf("javascript:"))return""}return 0===e.indexOf("@")?'':(o=''+i.replace(/@/g,"@")+""):(t&&(o+=' title="'+t+'"'),o+">"+i+""))},e.heading=function(e,t,i){var o=e,n=/\s*\]*)\>(.*)\<\/a\>\s*/;if(n.test(e)){for(var r=[],a=0,s=(e=e.split(/\]+)\>([^\>]*)\<\/a\>/)).length;a');return(l+='')+(n?this.atLink(this.emoji(o)):this.atLink(this.emoji(e)))+("")},e.pageBreak=function(e){return e=s.test(e)&&a.pageBreak?'


              ':e},e.paragraph=function(e){var t=/\$\$(.+?)\$\$/g.test(e),i=/^(?!\$\$.+?(?:\$\$).+?\$\$)(\$\$(.+?)\$\$)$/.test(e),o=i?' class="'+C.classNames.tex+'"':"",n=(a.tocm?/^(\[TOC\]|\[TOCM\])$/:/^\[TOC\]$/).test(e),r=/^\[TOCM\]$/.test(e),t='
              '+(e=!i&&t?e.replaceAll(/(\$\$(.+?)\$\$)/g,function(e,t,i){return''+i.replaceAll(/\/g,"")+""}):i?e.replace(/^(?!\$\$.+?(?:\$\$).+?\$\$)(\$\$(.+?)\$\$)$/,(e,t,i)=>i):e)+"
              ";return n?r?'
              '+t+"

              ":t:s.test(e)?this.pageBreak(e):""+this.atLink(this.emoji(e))+"

              \n"},e.code=function(e,t,i){if("seq"===t||"sequence"===t)return'
              '+e+"
              ";if("mermaid"===t){for(var o=(a="ABCDEFGHJKLMNOPQRSTUVWXYZabcdefhijlkmnopqrstuvwxyz012345678").length,n="",r=0;r<4;r++)n+=a.charAt(Math.floor(Math.random()*o));return'
              '+e+"
              "}if("flow"===t)return'
              '+e+"
              ";if("math"===t||"latex"===t||"katex"===t)return'

              '+e+"

              ";if(/^mindmap/i.test(t)){for(var a,o=(a="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678").length,s="",l=t.split(">")[1],l=null!=l?l:150,r=0;r<9;r++)s+=a.charAt(Math.floor(Math.random()*o));return""+e+""}return"drawio"===t?'
              '+decodeURIComponent(escape(window.atob(e)))+"
              ":c.Renderer.prototype.code.apply(this,arguments)},e.tablecell=function(e,t){var i=t.header?"th":"td";return(t.align?"<"+i+' style="text-align:'+t.align+'">':"<"+i+">")+this.atLink(this.emoji(e))+"\n"},e.listitem=function(e){return a.taskList&&/^\s*\[[x\s]\]\s*/.test(e)?(e=e.replace(/^\s*\[\s\]\s*/,' ').replace(/^\s*\[x\]\s*/,' '),'
            • '+this.atLink(this.emoji(e))+"
            • "):"
            • "+this.atLink(this.emoji(e))+"
            • "},e.checkbox=function(e){return e?' ':' '},e},C.markdownToCRenderer=function(e,t,i,o){var n="",r=0,a=this.classPrefix;o=o||1;for(var s=0,l=e.length;s"):"")+'
            • '+c+"
                ",r=h)}var u,f=t.find(".markdown-toc");return f.length<1&&"false"===t.attr("previewContainer")&&(u='
                ',t.html(u=i?'
                '+u+"
                ":u),f=t.find(".markdown-toc")),i&&f.wrap('

                '),f.html('
                  ').children(".markdown-toc-list").html(n.replace(/\r?\n?\\<\/ul\>/g,"")),f},C.tocDropdownMenu=function(e,a){a=a||"Table of Contents";var s=400,e=e.find("."+this.classPrefix+"toc-menu");return e.each(function(){var e=v(this),t=e.children(".markdown-toc"),o='',i=''+o+a+"",n=t.children("ul"),r=n.find("li");t.append(i),r.first().before("
                • "+a+" "+o+"

                • "),e.mouseover(function(){n.show(),r.each(function(){var e,t=v(this),i=t.children("ul");""===i.html()&&i.remove(),0]*)>([^>]*)","igm"),"")}void 0!==a&&(t=/\<(\w+)\s*([^\>]*)\>([^\>]*)\<\/(\w+)\>/gi,e="*"===a?e.replace(t,function(e,t,i,o,n){return"<"+t+">"+o+""}):"on*"===a?e.replace(t,function(e,t,i,o,n){var t=v("<"+t+">"+o+""),o=v(e)[0].attributes,r={},n=(v.each(o,function(e,t){'"'!==t.nodeName&&(r[t.nodeName]=t.nodeValue)}),v.each(r,function(e){0===e.indexOf("on")&&delete r[e]}),t.attr(r),void 0!==t[1]?v(t[1]).text():"");return t[0].outerHTML+n}):e.replace(t,function(e,t,i,o){var n=a.split(","),r=v(e);return r.html(o),v.each(n,function(e){r.attr(n[e],null)}),r[0].outerHTML}))}return e},C.markdownToHTML=function(e,t){C.$marked=marked;var i,o=v("#"+e),e=o.settings=v.extend(!0,{gfm:!0,toc:!0,tocm:!1,tocStartLevel:1,tocTitle:"目录",tocDropdown:!1,tocContainer:"",markdown:"",markdownSourceCode:!1,htmlDecode:!1,autoLoadKaTeX:!0,pageBreak:!0,atLink:!0,emailLink:!0,tex:!1,taskList:!1,emoji:!1,flowChart:!1,sequenceDiagram:!1,previewCodeHighlight:!0,mermaid:!0,mindMap:!0},t||{}),n=o.find("textarea"),t=(n.length<1&&(o.append(""),n=o.find("textarea")),void 0===e.markdown?n.val():e.markdown),r=[],a={toc:e.toc,tocm:e.tocm,tocStartLevel:e.tocStartLevel,taskList:e.taskList,emoji:e.emoji,tex:e.tex,pageBreak:e.pageBreak,atLink:e.atLink,emailLink:e.emailLink,flowChart:e.flowChart,sequenceDiagram:e.sequenceDiagram,mermaid:e.mermaid,mindMap:e.mindMap,previewCodeHighlight:e.previewCodeHighlight},a={renderer:C.markedRenderer(r,a),gfm:e.gfm,tables:!0,breaks:!0,pedantic:!1,sanitize:!e.htmlDecode,smartLists:!0,smartypants:!0},t=new String(t),a=marked.parse(t,a),a=C.$filterXSS(a),t=(e.markdownSourceCode?n.text(t):n.remove(),o.addClass("markdown-body "+this.classPrefix+"html-preview").append(a),""!==e.tocContainer?v(e.tocContainer):o);return""!==e.tocContainer&&t.attr("previewContainer",!1),e.toc&&(o.tocContainer=this.markdownToCRenderer(r,t,e.tocDropdown,e.tocStartLevel),(e.tocDropdown||0"),e[0]),e.find(".katex").css("font-size","1.6em")})},!e.autoLoadKaTeX||C.$katex||C.kaTeXLoaded?i():this.loadKaTeX(function(){C.$katex=katex,C.kaTeXLoaded=!0,i()})),e.mindMap&&o.find(".mindmap").each(function(){var e=v(this),e=window.markmap.transform(e.text().trim());window.markmap.markmap("svg#"+this.id,e)}),o.getMarkdown=function(){return n.val()},o},C.themes=["default","dark"],C.previewThemes=["default","dark"],C.editorThemes=["default","3024-day","3024-night","ambiance","ambiance-mobile","base16-dark","base16-light","blackboard","cobalt","eclipse","elegant","erlang-dark","lesser-dark","mbo","mdn-like","midnight","monokai","neat","neo","night","paraiso-dark","paraiso-light","pastel-on-dark","rubyblue","solarized","the-matrix","tomorrow-night-eighties","twilight","vibrant-ink","xq-dark","xq-light"],C.loadPlugins={},C.loadFiles={js:[],css:[],plugin:[]},C.loadPlugin=function(e,t,i,o){t=t||function(){},this.loadScript(e,function(){C.loadFiles.plugin.push(e),t()},i,o)},C.loadCSS=function(e,t,i,o=C.version){i=i||"head",t=t||function(){},o=o||C.version;var n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.onload=n.onreadystatechange=function(){C.loadFiles.css.push(e),t()},n.href=e+".css?editormd_version="+o,("head"===i?document.getElementsByTagName("head")[0]:document.body).appendChild(n)},C.isIE="Microsoft Internet Explorer"==navigator.appName,C.isIE8=C.isIE&&"8."==navigator.appVersion.match(/8./i),C.loadScript=function(e,t,i,o){i=i||"head",o=o||C.version,t=t||function(){};var n=null;(n=document.createElement("script")).id=e.replace(/[\./]+/g,"-"),n.type="text/javascript",n.src=e+".js?editormd_version="+o,C.isIE8?n.onreadystatechange=function(){!n.readyState||"loaded"!==n.readyState&&"complete"!==n.readyState||(n.onreadystatechange=null,C.loadFiles.js.push(e),t())}:n.onload=function(){C.loadFiles.js.push(e),t()},("head"===i?document.getElementsByTagName("head")[0]:document.body).appendChild(n)},C.katexURL={css:"https://cdn.bootcdn.net/ajax/libs/KaTeX/0.16.8/katex.min",jsmain:"https://cdn.bootcdn.net/ajax/libs/KaTeX/0.16.8/katex.min",jsauto:"https://cdn.bootcdn.net/ajax/libs/KaTeX/0.16.8/contrib/auto-render.min"},C.kaTeXLoaded=!1,C.loadKaTeX=function(e){C.loadCSS(C.katexURL.css,function(){C.loadScript(C.katexURL.jsmain,function(){C.loadScript(C.katexURL.jsauto,e||function(){})})})},C.lockScreen=function(e){v("html,body").css("overflow",e?"hidden":"")},C.createDialog=function(t){function e(){f.css({top:(v(window).height()-f.height())/2+"px",left:(v(window).width()-f.width())/2+"px"})}t=v.extend(!0,{name:"",width:420,height:"auto",title:"",drag:!0,closed:!0,content:"",mask:!0,maskStyle:{backgroundColor:"#fff",opacity:.1},removeDialogOnClose:!1,resizeableX:!1,resizeableY:!1,minWidth:0,minHeight:0,maxWidth:"none",maxHeight:"none",lockScreen:!0,footer:!0,buttons:!1},t);var r,a,i,s,o,n=this,l=this.editor,c=C.classPrefix,h=(new Date).getTime(),h=""===t.name?c+"dialog-"+h:t.name,d=C.mouseOrTouch,u='
                  ',f=(""!==t.title&&(u=(u+='
                  ")+''+t.title+"",t.closed&&(u+=''),u+="
                  "),u+='
                  '+t.content,!t.footer&&"string"!=typeof t.footer||(u+='"),l.append(u=(u=u+"
                  "+('
                  '))+('
                  ')+"
                  "),l.find("."+h));f.lockScreen=function(e){return t.lockScreen&&(v("html,body").css("overflow",e?"hidden":""),n.resize()),f},f.showMask=function(){return t.mask&&l.find("."+c+"mask").css(t.maskStyle).css("z-index",C.dialogZindex-1).show(),f},f.hideMask=function(){return t.mask&&l.find("."+c+"mask").hide(),f},f.loading=function(e){return f.find("."+c+"dialog-mask")[e?"show":"hide"](),f},f.lockScreen(!0).showMask(),f.show().css({zIndex:C.dialogZindex,border:C.isIE8?"1px solid #ddd":"",width:"number"==typeof t.width?t.width+"px":t.width,height:"number"==typeof t.height?t.height+"px":t.height,"min-width":"number"==typeof t.minWidth?t.minWidth+"px":t.minWidth,"min-height":"number"==typeof t.minHeight?t.minHeight+"px":t.minHeight,"max-width":"number"==typeof t.maxWidth?t.maxWidth+"px":t.maxWidth,"max-height":"number"==typeof t.maxHeight?t.maxHeight+"px":t.maxHeight,...t.resizeableX||t.resizeableY?{overflow:"hidden",resize:t.resizeableX&&t.resizeableY?"both":t.resizeableX?"horizontal":"vertical"}:{}});if(e(),v(window).resize(e),f.find("."+c+"dialog-close").bind(d("click","touchend"),function(){f.hide().lockScreen(!1).hideMask(),t.removeDialogOnClose&&f.remove()}),"object"==typeof t.buttons){var p,g=f.footer=f.find("."+c+"dialog-footer");for(p in t.buttons){var m=t.buttons[p],w=c+p+"-btn";g.append('"),m[1]=v.proxy(m[1],f),g.children("."+w).bind(d("click","touchend"),m[1])}}return""!==t.title&&t.drag&&(u=f.children("."+c+"dialog-header"),t.mask||u.bind(d("click","touchend"),function(){C.dialogZindex+=2,f.css("z-index",C.dialogZindex)}),u.mousedown(function(e){e=e||window.event,r=e.clientX-parseInt(f[0].style.left),a=e.clientY-parseInt(f[0].style.top),document.onmousemove=o}),i=function(e){e.removeClass(c+"user-unselect").off("selectstart")},s=function(e){e.addClass(c+"user-unselect").on("selectstart",function(e){return!1})},o=function(e){e=e||window.event;var t,i,o=parseInt(f[0].style.left),n=parseInt(f[0].style.top);0<=o?o+f.width()<=v(window).width()?t=e.clientX-r:(t=v(window).width()-f.width(),document.onmousemove=null):(t=0,document.onmousemove=null),0<=n?i=e.clientY-a:(i=0,document.onmousemove=null),document.onselectstart=function(){return!1},s(v("body")),s(f),f[0].style.left=t+"px",f[0].style.top=i+"px"},document.onmouseup=function(){i(v("body")),i(f),document.onselectstart=null,document.onmousemove=null},u.touchDraggable=function(){var i=null;this.bind("touchstart",function(e){var e=e.originalEvent,t=v(this).parent().position();i={x:e.changedTouches[0].pageX-t.left,y:e.changedTouches[0].pageY-t.top}}).bind("touchmove",function(e){e.preventDefault();e=e.originalEvent;v(this).parent().css({top:e.changedTouches[0].pageY-i.y,left:e.changedTouches[0].pageX-i.x})})},u.touchDraggable()),C.dialogZindex+=2,f},C.mouseOrTouch=function(e,t){t=t||"touchend";e=e||"click";try{document.createEvent("TouchEvent"),e=t}catch(e){}return e},C.dateFormat=function(e){e=e||"";function t(e){return e<10?"0"+e:e}var i=new Date,o=i.getFullYear(),n=o.toString().slice(2,4),r=t(i.getMonth()+1),a=t(i.getDate()),s=i.getDay(),l=t(i.getHours()),c=t(i.getMinutes()),h=t(i.getSeconds()),d=t(i.getMilliseconds()),u="",f=n+"-"+r+"-"+a,p=o+"-"+r+"-"+a,g=l+":"+c+":"+h;switch(e){case"UNIX Time":u=i.getTime();break;case"UTC":u=i.toUTCString();break;case"yy":u=n;break;case"year":case"yyyy":u=o;break;case"month":case"mm":u=r;break;case"cn-week-day":case"cn-wd":u="星期"+["日","一","二","三","四","五","六"][s];break;case"week-day":case"wd":u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][s];break;case"day":case"dd":u=a;break;case"hour":case"hh":u=l;break;case"min":case"ii":u=c;break;case"second":case"ss":u=h;break;case"ms":u=d;break;case"yy-mm-dd":u=f;break;case"yyyy-mm-dd":u=p;break;case"yyyy-mm-dd h:i:s ms":case"full + ms":u=p+" "+g+" "+d;break;default:u=p+" "+g}return u},C.getLine=function(e){return this.cm.getLine(e)},C}); \ No newline at end of file diff --git a/static/editor.md/editormd.js b/static/editor.md/editormd.js index 980f7cac0..c6ee6dc26 100755 --- a/static/editor.md/editormd.js +++ b/static/editor.md/editormd.js @@ -1,13 +1,25 @@ /* * Editor.md * - * @file editormd.js - * @version v1.5.0 + * @file editormd.js + * @version v1.7.17 * @description Open source online markdown editor. * @license MIT License - * @author Pandao - * {@link https://github.com/pandao/editor.md} - * @updateTime 2015-06-09 + * @author IBM Skills Network + * {@link https://github.com/ibm-skills-network/editor.md} + * @updateTime 2024-03-27 + */ + +/* + * Editor.md + * + * @file editormd.js + * @version v1.7.17 + * @description Open source online markdown editor. + * @license MIT License + * @author IBM Skills Network + * {@link https://github.com/ibm-skills-network/editor.md} + * @updateTime 2024-03-27 */ ;(function(factory) { @@ -54,12 +66,13 @@ * @returns {Object} editormd 返回editormd对象 */ - var editormd = function (id, options) { - return new editormd.fn.init(id, options); + var editormd = function (id,author_ide_version, options) { + return new editormd.fn.init(id,author_ide_version, options); }; + editormd.URL_ROOT = document.currentScript.src.replace(/\/[^\/]+$/ig, '') + "/" editormd.title = editormd.$name = "Editor.md"; - editormd.version = "1.5.0"; + editormd.version = "1.7.17"; editormd.homePage = "https://pandao.github.io/editor.md/"; editormd.classPrefix = "editormd-"; @@ -94,15 +107,16 @@ name : "", // Form element name value : "", // value for CodeMirror, if mode not gfm/markdown theme : "", // Editor.md self themes, before v1.5.0 is CodeMirror theme, default empty - editorTheme : "pastel-on-dark", //"default", // Editor area, this is CodeMirror theme at v1.5.0 - previewTheme : "dark", //"", // Preview area theme, default empty - markdown : "", // Markdown source code + editorTheme : "default", // Editor area, this is CodeMirror theme at v1.5.0 + previewTheme : "", // Preview area theme, default empty + markdown : undefined, // Markdown source code appendMarkdown : "", // if in init textarea value not empty, append markdown to textarea width : "100%", height : "100%", path : "./lib/", // Dependents module file directory pluginPath : "", // If this empty, default use settings.path + "../plugins/" - delay : 500, // Delay parse markdown to html, Uint : ms + customPluginPath : "", + delay : 300, // Delay parse markdown to html, Uint : ms autoLoadModules : true, // Automatic load dependent module files watch : true, placeholder : "Enjoy Markdown! coding now...", @@ -140,6 +154,8 @@ onwatch : null, onunwatch : null, onpreviewing : function() {}, + onCmChange : null, + fixCodeBlocks : function() {}, // run after prettyprint(function to prettify code blocks) finished onpreviewed : function() {}, onfullscreen : function() {}, onfullscreenExit : function() {}, @@ -163,7 +179,7 @@ atLink : true, // for @link emailLink : true, // for email address auto link taskList : false, // Enable Github Flavored Markdown task lists - emoji : false, // :emoji: , Support Github emoji, Twitter Emoji (Twemoji); + emoji : true, // :emoji: , Support Github emoji, Twitter Emoji (Twemoji); // Support FontAwesome icon emoji :fa-xxx: > Using fontAwesome icon web fonts; // Support Editor.md logo icon emoji :editormd-logo: :editormd-logo-1x: > 1~8x; tex : false, // TeX(LaTeX), based on KaTeX @@ -173,8 +189,13 @@ mindMap : true, // 脑图 previewCodeHighlight : true, - toolbar : true, // show/hide toolbar + toolbar : false, // show/hide toolbar toolbarAutoFixed : true, // on window scroll auto fixed position + titlebar : { + left: {}, + center: {}, + right: {} + }, toolbarIcons : "full", toolbarTitles : {}, toolbarHandlers : { @@ -186,8 +207,9 @@ } }, toolbarCustomIcons : { // using html tag create toolbar icon, unused default tag. - lowercase : "a", - "ucwords" : "Aa" + lowercase : "a", + "ucwords" : "Aa", + "fontcase" : "Aa" }, toolbarIconsClass : { undo : "fa-undo", @@ -197,6 +219,7 @@ italic : "fa-italic", quote : "fa-quote-left", uppercase : "fa-font", + heading : "fa-header", h1 : editormd.classPrefix + "bold", h2 : editormd.classPrefix + "bold", h3 : editormd.classPrefix + "bold", @@ -228,8 +251,19 @@ changetheme : "fa-info-circle", info : "fa-info-circle" }, - toolbarIconTexts : {}, + toolbarIconTexts : { + "ucwords" : "Capitalize", + uppercase : "Uppercase", + lowercase : "Lowercase", + h1 : "Heading 1", + h2 : "Heading 2", + h3 : "Heading 3", + h4 : "Heading 4", + h5 : "Heading 5", + h6 : "Heading 6" + }, + // Support for other languaages (see README) lang : { name : "zh-cn", description : "开源在线Markdown编辑器
                  Open source online Markdown editor.", @@ -333,13 +367,15 @@ }; editormd.classNames = { - tex : editormd.classPrefix + "tex" + tex : editormd.classPrefix + "tex", + texDisplay : editormd.classPrefix + "texDisaply" }; editormd.dialogZindex = 99999; editormd.$katex = null; editormd.$marked = null; + editormd.$filterXSS = null; editormd.$CodeMirror = null; editormd.$prettyPrint = null; @@ -362,7 +398,7 @@ * @returns {editormd} 返回editormd的实例对象 */ - init : function (id, options) { + init : function (id, author_ide_version, options) { options = options || {}; @@ -371,15 +407,19 @@ options = id; } - var _this = this; var classPrefix = this.classPrefix = editormd.classPrefix; - var settings = this.settings = $.extend(true, editormd.defaults, options); + var settings = this.settings = $.extend(true, {}, editormd.defaults, options); + if (settings.path.startsWith('.')) { + settings.path = editormd.URL_ROOT + settings.path + } + console.log(settings.path) id = (typeof id === "object") ? settings.id : id; var editor = this.editor = $("#" + id); this.id = id; + this.author_ide_version = author_ide_version || editor.version; this.lang = settings.lang; var classNames = this.classNames = { @@ -440,7 +480,7 @@ this.mask = editor.children("." + classPrefix + "mask"); this.containerMask = editor.children("." + classPrefix + "container-mask"); - if (settings.markdown !== "") + if (settings.markdown !== undefined) { markdownTextarea.val(settings.markdown); } @@ -515,91 +555,38 @@ return ; } - - if (settings.mermaid) { - editormd.loadScript(loadPath + "mermaid/mermaid.min", function () { - window.mermaid.initialize({ - theme: 'default', - logLevel: 3, - securityLevel: 'loose', - flowchart: { curve: 'basis' }, - gantt: { axisFormat: '%m/%d/%Y' }, - sequence: { actorMargin: 50 }, - }); - mermaid.ganttConfig = { - axisFormatter: [ - // Within a day - ['%I:%M', function (d) { - return d.getHours(); - }], - // Monday a week - ['%m/%d', function (d) { // redefine date here as '%m/%d'instead of 'w. %U', search mermaid.js - return d.getDay() == 1; - }], - // Day within a week (not monday) - ['%a %d', function (d) { - return d.getDay() && d.getDate() != 1; - }], - // within a month - ['%b %d', function (d) { - return d.getDate() != 1; - }], - // Month - ['%m-%y', function (d) { - return d.getMonth(); - }],[ "%m-%Y", function () { - return d.getFullYear(); - }]] - }; - - if (!isLoadedDisplay){ - isLoadedDisplay = true; - _this.loadedDisplay(); - } - }); - } - if (settings.flowChart) + if (settings.flowChart || settings.sequenceDiagram) { editormd.loadScript(loadPath + "raphael.min", function() { - editormd.loadScript(loadPath + "flowchart.min", function() { - editormd.loadScript(loadPath + "jquery.flowchart.min", function() { - if (!isLoadedDisplay){ - isLoadedDisplay = true; - _this.loadedDisplay(); - } - }); - }); - }); - } - if (settings.mindMap) - { - editormd.loadScript(loadPath + "mindmap/transform.min", function() { - editormd.loadScript(loadPath + "mindmap/d3@5", function() { - editormd.loadScript(loadPath + "mindmap/view.min", function() { - if (!isLoadedDisplay){ - isLoadedDisplay = true; - _this.loadedDisplay(); - } - }); - }); - }); - } + editormd.loadScript(loadPath + "underscore.min", function() { - if(settings.sequenceDiagram) { - editormd.loadCSS(loadPath + "sequence/sequence-diagram-min", function () { - editormd.loadScript(loadPath + "sequence/webfont", function() { - editormd.loadScript(loadPath + "sequence/snap.svg-min", function() { - editormd.loadScript(loadPath + "sequence/underscore-min", function() { - editormd.loadScript(loadPath + "sequence/sequence-diagram-min", function() { - if (!isLoadedDisplay){ - isLoadedDisplay = true; + if (!settings.flowChart && settings.sequenceDiagram) + { + editormd.loadScript(loadPath + "sequence-diagram.min", function() { + _this.loadedDisplay(); + }); + } + else if (settings.flowChart && !settings.sequenceDiagram) + { + editormd.loadScript(loadPath + "flowchart.min", function() { + editormd.loadScript(loadPath + "jquery.flowchart.min", function() { + _this.loadedDisplay(); + }); + }); + } + else if (settings.flowChart && settings.sequenceDiagram) + { + editormd.loadScript(loadPath + "flowchart.min", function() { + editormd.loadScript(loadPath + "jquery.flowchart.min", function() { + editormd.loadScript(loadPath + "sequence-diagram.min", function() { _this.loadedDisplay(); - } + }); }); }); - }); + } }); + }); } else @@ -608,6 +595,10 @@ } }; + // editormd.loadScript(loadPath + "xss", function () { + // editormd.$filterXSS = filterXSS + // }); + editormd.loadCSS(loadPath + "codemirror/codemirror.min"); if (settings.searchReplace && !settings.readOnly) @@ -639,7 +630,7 @@ _this.setToolbar(); - editormd.loadScript(loadPath + "marked", function() { + editormd.loadScript(loadPath + "marked.umd", function() { editormd.$marked = marked; @@ -648,6 +639,9 @@ } if (settings.previewCodeHighlight) { + // editormd.loadScript(loadPath + "prettify.min", function() { + // loadFlowChartOrSequenceDiagram(); + // }); editormd.loadCSS(loadPath + "highlight/styles/" + settings.highlightStyle); editormd.loadScript(loadPath + "highlight/highlight", function() { loadFlowChartOrSequenceDiagram(); @@ -1177,15 +1171,22 @@ return this; } - var editor = this.editor; - var preview = this.preview; - var classPrefix = this.classPrefix; + var editor = this.editor; + var preview = this.preview; + var classPrefix = this.classPrefix; // this.classPrefix = "editormd-" + var titlebarModes = (typeof settings.titlebar === "function") ? settings.titlebar() : settings.titlebar; var toolbar = this.toolbar = editor.children("." + classPrefix + "toolbar"); if (settings.toolbar && toolbar.length < 1) { - var toolbarHTML = "
                    "; + var toolbarHTML = "
                    \ +
                    \ +
                    \ +
                    \ +
                      \ +
                      \ +
                      "; editor.append(toolbarHTML); toolbar = this.toolbar = editor.children("." + classPrefix + "toolbar"); @@ -1198,6 +1199,7 @@ return this; } + // Set toolbar icons toolbar.show(); var icons = (typeof settings.toolbarIcons === "function") ? settings.toolbarIcons() @@ -1216,40 +1218,101 @@ } else if (name === "|") { - menu += "
                    • |
                    • "; + menu += "
                    • "; } else { - var isHeader = (/h(\d)/.test(name)); - var index = name; + var isDropdown = name.includes("dropdown"); - if (name === "watch" && !settings.watch) { - index = "unwatch"; + // add classes for menu item + var menuClasses = [] + if (pullRight) { + menuClasses.push("pull-right"); + } + if (isDropdown) { + menuClasses.push("dropdown"); } - var title = settings.lang.toolbar[index]; - var iconTexts = settings.toolbarIconTexts[index]; - var iconClass = settings.toolbarIconsClass[index]; + // stores HTML for current menu item; add opening tag + var menuItem = (menuClasses.length > 0) ? "
                    • " : "
                    • "; + + // list of icons in menu item (usually just one unless dropdown) + var selections = [] + + if (isDropdown) { + var info = name.split(":"); + var dropdownType = info[0]; // "dropdown", "dropdownIcon" + name = info[1]; // set name to actual parsed name from info + var dropdownContent = info[2].split(","); + selections = [name].concat(dropdownContent); + // set isDropdown to false if no dropdown content + if (!dropdownContent.length) { + isDropdown = false; + } + } else { + selections.push(name) + } - title = (typeof title === "undefined") ? "" : title; - iconTexts = (typeof iconTexts === "undefined") ? "" : iconTexts; - iconClass = (typeof iconClass === "undefined") ? "" : iconClass; + for (var j = 0, len = selections.length; j < len; j++) { + name = selections[j].trim(); - var menuItem = pullRight ? "
                    • " : "
                    • "; + // insert dropdown opening tag + if (isDropdown && j === 1) { + menuItem += "
                      "; + } + + // default "dropdown" has no icons in content, use "dropdownIcon" for icon+text options + var hasIcon = !(isDropdown && dropdownType !== "dropdownIcon" && menuItem.includes("toolbar-dropdown-content")); + var isHeader = (/h(\d)/.test(name)); + var index = name; + + if (name === "watch" && !settings.watch) { + index = "unwatch"; + } + + var title = settings.lang.toolbar[index]; // hover text + var iconTexts = settings.toolbarIconTexts[index]; // placeholder text if icon is empty + var iconClass = settings.toolbarIconsClass[index]; // font awesome icon class + + title = (typeof title === "undefined" || isDropdown) ? "" : title; + iconTexts = (typeof iconTexts === "undefined") ? "" : iconTexts; + iconClass = (typeof iconClass === "undefined" || !hasIcon) ? "" : iconClass; + + + menuItem += ""; + + // add custom icon + if (hasIcon && typeof settings.toolbarCustomIcons[name] !== "undefined" && typeof settings.toolbarCustomIcons[name] !== "function") + { + menuItem += settings.toolbarCustomIcons[name]; + } + // add icon content + else + { + menuItem += ""; + + if (typeof settings.toolbarIcons !== "function" && isHeader) { + menuItem += "" + name.toUpperCase() + ""; + } else if (dropdownType && dropdownType === "dropdownIcon" && menuItem.includes("toolbar-dropdown-content")) { + menuItem += "" + (iconTexts ? iconTexts : name) + ""; + } else if (iconClass === "" || !hasIcon) { + menuItem += "" + (iconTexts ? iconTexts : name) + ""; + } + + menuItem += ""; + } - if (typeof settings.toolbarCustomIcons[name] !== "undefined" && typeof settings.toolbarCustomIcons[name] !== "function") - { - menuItem += settings.toolbarCustomIcons[name]; - } - else - { - menuItem += ""; - menuItem += ""+((isHeader) ? name.toUpperCase() : ( (iconClass === "") ? iconTexts : "") ) + ""; menuItem += ""; + + // insert dropdown closing tag + if (isDropdown && j === len - 1 && menuItem.includes("toolbar-dropdown-content")) { + menuItem += "
                      "; + dropdownType = ""; + } } + // add closing tag and append to toolbar menuItem += "
                    • "; - menu = pullRight ? menuItem + menu : menu + menuItem; } } @@ -1285,6 +1348,11 @@ return this; }, + positionDialog : function(dialog, position) { + $.proxy(editormd.positionDialog, this)(dialog, position); + + return this; + }, getToolbarHandles : function(name) { var toolbarHandlers = this.toolbarHandlers = editormd.toolbarHandlers; @@ -1294,7 +1362,7 @@ /** * 工具栏图标事件处理器 - * Bind toolbar icons event handle + * Bind toolbar icons to their event handlers * * @returns {editormd} 返回editormd的实例对象 */ @@ -1310,10 +1378,10 @@ var toolbar = this.toolbar; var cm = this.cm; var classPrefix = this.classPrefix; - var toolbarIcons = this.toolbarIcons = toolbar.find("." + classPrefix + "menu > li > a"); + var toolbarIcons = this.toolbarIcons = toolbar.find("." + classPrefix + "menu > li a"); var toolbarIconHandlers = this.getToolbarHandles(); - toolbarIcons.bind(editormd.mouseOrTouch("click", "touchend"), function(event) { + toolbarIcons.bind(editormd.mouseOrTouch("click", "touchend"), function() { var icon = $(this).children(".fa"); var name = icon.attr("name"); @@ -1372,7 +1440,7 @@ createInfoDialog : function() { var _this = this; - var editor = this.editor; + var editor = this.editor; var classPrefix = this.classPrefix; var infoDialogHTML = [ @@ -1438,7 +1506,7 @@ $("html,body").css("overflow-x", "hidden"); var _this = this; - var editor = this.editor; + var editor = this.editor; var settings = this.settings; var infoDialog = this.infoDialog = editor.children("." + this.classPrefix + "dialog-info"); @@ -1539,12 +1607,12 @@ if (settings.previewCodeHighlight) { - // previewContainer.find("pre").addClass("prettyprint"); - // - // if (typeof prettyPrint !== "undefined") - // { - // prettyPrint(); - // } + previewContainer.find("pre").addClass("prettyprint linenums"); + + if (typeof prettyPrint !== "undefined") + { + prettyPrint($.proxy(settings.fixCodeBlocks,this)); + } previewContainer.find("pre").each(function (i, block) { hljs.highlightBlock(block); }); @@ -1569,7 +1637,19 @@ this.previewContainer.find("." + editormd.classNames.tex).each(function(){ var tex = $(this); - editormd.$katex.render(tex.text(), tex[0]); + editormd.$katex.render(tex.text(), tex[0],{ + throwOnError: false, + }); + + tex.find(".katex").css("font-size", "1.6em"); + }); + + this.previewContainer.find("." + editormd.classNames.texDisplay).each(function(){ + var tex = $(this); + editormd.$katex.render(tex.text(), tex[0],{ + throwOnError: false, + displayMode: true, + }); tex.find(".katex").css("font-size", "1.6em"); }); @@ -1612,7 +1692,7 @@ var mermaid = previewContainer.find(".lang-mermaid"); if (mermaid) { try { - window.mermaid.init(void 0, mermaid.removeClass("hide")); + mermaid.init(void 0, mermaid.removeClass("hide")); }catch (e) { console.log(e); } @@ -1737,12 +1817,12 @@ case 121: $.proxy(toolbarHandlers["preview"], _this)(); return false; - break; + break; case 122: $.proxy(toolbarHandlers["fullscreen"], _this)(); return false; - break; + break; default: break; @@ -1763,7 +1843,8 @@ bindScrollEvent : function() { var _this = this; - var preview = this.preview; + // var preview = this.preview; + var preview = this.previewContainer; var settings = this.settings; var codeMirror = this.codeMirror; var mouseOrTouch = editormd.mouseOrTouch; @@ -1774,33 +1855,35 @@ var cmBindScroll = function() { codeMirror.find(".CodeMirror-scroll").bind(mouseOrTouch("scroll", "touchmove"), function(event) { - var height = $(this).height(); - var scrollTop = $(this).scrollTop(); - var percent = (scrollTop / $(this)[0].scrollHeight); + if (timer == null){ + var height = $(this).height(); + var scrollTop = $(this).scrollTop(); + var percent = (scrollTop / $(this)[0].scrollHeight); - var tocHeight = 0; + var tocHeight = 0; - preview.find(".markdown-toc-list").each(function(){ - tocHeight += $(this).height(); - }); + preview.find(".markdown-toc-list").each(function(){ + tocHeight += $(this).height(); + }); - var tocMenuHeight = preview.find(".editormd-toc-menu").height(); - tocMenuHeight = (!tocMenuHeight) ? 0 : tocMenuHeight; + var tocMenuHeight = preview.find(".editormd-toc-menu").height(); + tocMenuHeight = (!tocMenuHeight) ? 0 : tocMenuHeight; - if (scrollTop === 0) - { - preview.scrollTop(0); - } - else if (scrollTop + height >= $(this)[0].scrollHeight - 16) - { - preview.scrollTop(preview[0].scrollHeight); - } - else - { - preview.scrollTop((preview[0].scrollHeight + tocHeight + tocMenuHeight) * percent); - } + if (scrollTop === 0) + { + preview.scrollTop(0); + } + else if (scrollTop + height >= $(this)[0].scrollHeight - 16) + { + preview.scrollTop(preview[0].scrollHeight); + } + else + { + preview.scrollTop((preview[0].scrollHeight + tocHeight + tocMenuHeight) * percent); + } - $.proxy(settings.onscroll, _this)(event); + $.proxy(settings.onscroll, _this)(event); + } }); }; @@ -1811,29 +1894,29 @@ var previewBindScroll = function() { preview.bind(mouseOrTouch("scroll", "touchmove"), function(event) { - var height = $(this).height(); - var scrollTop = $(this).scrollTop(); - var percent = (scrollTop / $(this)[0].scrollHeight); - var codeView = codeMirror.find(".CodeMirror-scroll"); + if (timer == null){ + var height = $(this).height(); + var scrollTop = $(this).scrollTop(); + var percent = (scrollTop / $(this)[0].scrollHeight); + var codeView = codeMirror.find(".CodeMirror-scroll"); - if(scrollTop === 0) - { - codeView.scrollTop(0); - } - else if (scrollTop + height >= $(this)[0].scrollHeight) - { - codeView.scrollTop(codeView[0].scrollHeight); - } - else - { - codeView.scrollTop(codeView[0].scrollHeight * percent); + if(scrollTop === 0) + { + codeView.scrollTop(0); + } + else if (scrollTop + height >= $(this)[0].scrollHeight) + { + codeView.scrollTop(codeView[0].scrollHeight); + } + else + { + codeView.scrollTop(codeView[0].scrollHeight * percent); + } + $.proxy(settings.onpreviewscroll, _this)(event); } - - $.proxy(settings.onpreviewscroll, _this)(event); }); }; - var previewUnbindScroll = function() { preview.unbind(mouseOrTouch("scroll", "touchmove")); }; @@ -1846,10 +1929,12 @@ }); if (settings.syncScrolling === "single") { + // cmBindScroll(); return this; } - preview.bind({ + // previewBindScroll(); + preview.bind({ mouseover : previewBindScroll, mouseout : previewUnbindScroll, touchstart : previewBindScroll, @@ -1865,19 +1950,20 @@ var cm = this.cm; var settings = this.settings; - if (!settings.syncScrolling) { - return this; - } + // if (!settings.syncScrolling) { + // return this; + // } cm.on("change", function(_cm, changeObj) { - + // console.log("cmChange") if (settings.watch) { _this.previewContainer.css("padding", settings.autoHeight ? "20px 20px 50px 40px" : "20px"); } - + if (timer) clearTimeout(timer); + if (settings.onCmChange) $.proxy(settings.onCmChange, _this)(); timer = setTimeout(function() { - clearTimeout(timer); + // console.log("cmChangeinsideTimeout") _this.save(); timer = null; }, settings.delay); @@ -1895,7 +1981,7 @@ */ loadedDisplay : function(recreate) { - + // console.log("loadedDisplay") recreate = recreate || false; var _this = this; @@ -1929,6 +2015,11 @@ this.state.loaded = true; + if (settings.watch) { + this.save(); + preview.show(); + } + return this; }, @@ -1974,7 +2065,7 @@ */ resize : function(width, height) { - + // console.log("resize") width = width || null; height = height || null; @@ -2066,12 +2157,7 @@ */ save : function() { - - if (timer === null) - { - return this; - } - + // console.log("saving") var _this = this; var state = this.state; var settings = this.settings; @@ -2079,6 +2165,11 @@ var cmValue = cm.getValue(); var previewContainer = this.previewContainer; + if (timer === null && !(!settings.watch && state.preview)) + { + return this; + } + if (settings.mode !== "gfm" && settings.mode !== "markdown") { this.markdownTextarea.val(cmValue); @@ -2086,127 +2177,131 @@ return this; } - var marked = editormd.$marked; - var markdownToC = this.markdownToC = []; - var rendererOptions = this.markedRendererOptions = { - toc : settings.toc, - tocm : settings.tocm, - tocStartLevel : settings.tocStartLevel, - pageBreak : settings.pageBreak, - taskList : settings.taskList, - emoji : settings.emoji, - tex : settings.tex, - atLink : settings.atLink, // for @link - emailLink : settings.emailLink, // for mail address auto link - flowChart : settings.flowChart, - sequenceDiagram : settings.sequenceDiagram, - previewCodeHighlight : settings.previewCodeHighlight, - mermaid : settings.mermaid, - mindMap : settings.mindMap, // 思维导图 - }; - - var markedOptions = this.markedOptions = { - renderer : editormd.markedRenderer(markdownToC, rendererOptions), - gfm : true, - tables : true, - breaks : true, - pedantic : false, - sanitize : (settings.htmlDecode) ? false : true, // 关闭忽略HTML标签,即开启识别HTML标签,默认为false - smartLists : true, - smartypants : true - }; + cm.save(); - marked.setOptions(markedOptions); + if (settings.saveHTMLToTextarea || settings.watch || (!settings.watch && state.preview)){ + // console.log("rendering") + var marked = editormd.$marked; + var markdownToC = this.markdownToC = []; + var rendererOptions = this.markedRendererOptions = { + toc : settings.toc, + tocm : settings.tocm, + tocStartLevel : settings.tocStartLevel, + pageBreak : settings.pageBreak, + taskList : settings.taskList, + emoji : settings.emoji, + tex : settings.tex, + atLink : settings.atLink, // for @link + emailLink : settings.emailLink, // for mail address auto link + flowChart : settings.flowChart, + sequenceDiagram : settings.sequenceDiagram, + previewCodeHighlight : settings.previewCodeHighlight, + mermaid : settings.mermaid, + mindMap : settings.mindMap, // 思维导图 + }; - var newMarkdownDoc = editormd.$marked(cmValue, markedOptions); + var markedOptions = this.markedOptions = { + renderer : editormd.markedRenderer(markdownToC, rendererOptions), + gfm : true, + tables : true, + breaks : true, + pedantic : false, + smartLists : true, + smartypants : true + }; - if(settings.debug) { - console.info("cmValue", cmValue, newMarkdownDoc); - } - newMarkdownDoc = editormd.filterHTMLTags(newMarkdownDoc, settings.htmlDecode); + marked.setOptions(markedOptions); - //console.error("cmValue", cmValue, newMarkdownDoc); + var newMarkdownDoc = editormd.$marked.parse(cmValue, markedOptions); - this.markdownTextarea.text(cmValue); + if(settings.debug) { + console.info("cmValue", cmValue, newMarkdownDoc); + } + newMarkdownDoc = editormd.$filterXSS(newMarkdownDoc); - cm.save(); + //console.error("cmValue", cmValue, newMarkdownDoc); - if (settings.saveHTMLToTextarea) - { - this.htmlTextarea.text(newMarkdownDoc); - } + this.markdownTextarea.text(cmValue); - if(settings.watch || (!settings.watch && state.preview)) - { - previewContainer.html(newMarkdownDoc); + cm.save(); - this.previewCodeHighlight(); + if (settings.saveHTMLToTextarea) + { + this.htmlTextarea.text(newMarkdownDoc); + } - if (settings.toc) + if(settings.watch || (!settings.watch && state.preview)) { - var tocContainer = (settings.tocContainer === "") ? previewContainer : $(settings.tocContainer); - var tocMenu = tocContainer.find("." + this.classPrefix + "toc-menu"); + previewContainer.html(newMarkdownDoc); - tocContainer.attr("previewContainer", (settings.tocContainer === "") ? "true" : "false"); + this.previewCodeHighlight(); - if (settings.tocContainer !== "" && tocMenu.length > 0) + if (settings.toc) { - tocMenu.remove(); - } + var tocContainer = (settings.tocContainer === "") ? previewContainer : $(settings.tocContainer); + var tocMenu = tocContainer.find("." + this.classPrefix + "toc-menu"); - editormd.markdownToCRenderer(markdownToC, tocContainer, settings.tocDropdown, settings.tocStartLevel); + tocContainer.attr("previewContainer", (settings.tocContainer === "") ? "true" : "false"); - if (settings.tocDropdown || tocContainer.find("." + this.classPrefix + "toc-menu").length > 0) - { - editormd.tocDropdownMenu(tocContainer, (settings.tocTitle !== "") ? settings.tocTitle : this.lang.tocTitle); - } + if (settings.tocContainer !== "" && tocMenu.length > 0) + { + tocMenu.remove(); + } - if (settings.tocContainer !== "") - { - previewContainer.find(".markdown-toc").css("border", "none"); + editormd.markdownToCRenderer(markdownToC, tocContainer, settings.tocDropdown, settings.tocStartLevel); + + if (settings.tocDropdown || tocContainer.find("." + this.classPrefix + "toc-menu").length > 0) + { + editormd.tocDropdownMenu(tocContainer, (settings.tocTitle !== "") ? settings.tocTitle : this.lang.tocTitle); + } + + if (settings.tocContainer !== "") + { + previewContainer.find(".markdown-toc").css("border", "none"); + } } - } - if (settings.tex) - { - if (!editormd.kaTeXLoaded && settings.autoLoadModules) + if (settings.tex) { - editormd.loadKaTeX(function() { + if (!editormd.kaTeXLoaded && settings.autoLoadModules) + { + editormd.loadKaTeX(function() { + editormd.$katex = katex; + editormd.kaTeXLoaded = true; + _this.katexRender(); + }); + } + else + { editormd.$katex = katex; - editormd.kaTeXLoaded = true; - _this.katexRender(); - }); - } - else - { - editormd.$katex = katex; - this.katexRender(); + this.katexRender(); + } } - } - // 渲染脑图 - if(settings.mindMap){ - setTimeout(function(){ - _this.mindmapRender(); - },10) + // 渲染脑图 + if(settings.mindMap){ + setTimeout(function(){ + _this.mindmapRender(); + },10) - } + } - if (settings.flowChart || settings.sequenceDiagram || settings.mermaid) - { - flowchartTimer = setTimeout(function(){ - clearTimeout(flowchartTimer); - _this.flowChartAndSequenceDiagramRender(); - flowchartTimer = null; - }, 10); - } + if (settings.flowChart || settings.sequenceDiagram || settings.mermaid) + { + flowchartTimer = setTimeout(function(){ + clearTimeout(flowchartTimer); + _this.flowChartAndSequenceDiagramRender(); + flowchartTimer = null; + }, 10); + } - if (state.loaded) - { - $.proxy(settings.onchange, this)(); + if (state.loaded) + { + $.proxy(settings.onchange, this)(); + } } - } + } return this; }, @@ -2602,6 +2697,7 @@ toolbar.find(".fa[name=preview]").toggleClass("active"); } + // codeMirror.hide(); codeMirror.toggle(); var escHandle = function(event) { @@ -2689,12 +2785,14 @@ previewContainer.css("padding", "20px"); } + const toolbarHeight = (settings.toolbar) ? toolbar.height() : 0; + preview.css({ background : null, position : "absolute", width : editor.width() / 2, - height : (settings.autoHeight && !this.state.fullscreen) ? "auto" : editor.height() - toolbar.height(), - top : (settings.toolbar) ? toolbar.height() : 0 + height : (settings.autoHeight && !this.state.fullscreen) ? "auto" : editor.height() - toolbarHeight, + top : (settings.toolbar) ? toolbarHeight : 0 }); if (this.state.loaded) @@ -2805,13 +2903,12 @@ * @returns {editormd} 返回editormd的实例对象 */ - executePlugin : function(name, path) { - + executePlugin : function(name, path, customPlugin = false, optionalParams= {"proxy": false}) { var _this = this; var cm = this.cm; var settings = this.settings; - path = settings.pluginPath + path; + path = (customPlugin ? settings.customPluginPath : settings.pluginPath) + path; if (typeof define === "function") { @@ -2822,21 +2919,35 @@ return this; } - this[name](cm); - - return this; + if (optionalParams["proxy"]) { + return this[name](cm); + } else { + this[name](cm); + return this; + } } if ($.inArray(path, editormd.loadFiles.plugin) < 0) { - editormd.loadPlugin(path, function() { - editormd.loadPlugins[name] = _this[name]; - _this[name](cm); - }); + if (optionalParams["proxy"]){ + return new Promise((res)=>{ + editormd.loadPlugin(path, function() { + editormd.loadPlugins[name] = _this[name]; + res(_this[name](cm, optionalParams)) + }, "head", (customPlugin ? _this.author_ide_version : editormd.version) ); + }); + } + else{ + editormd.loadPlugin(path, function() { + editormd.loadPlugins[name] = _this[name]; + _this[name](cm, optionalParams); + }, "head", (customPlugin ? _this.author_ide_version : editormd.version) ); + } } else { - $.proxy(editormd.loadPlugins[name], this)(cm); + if (optionalParams["proxy"]) return $.proxy(editormd.loadPlugins[name], this)(cm, optionalParams); + $.proxy(editormd.loadPlugins[name], this)(cm, optionalParams); } return this; @@ -2899,6 +3010,32 @@ } }; + + editormd.positionDialog = function(dialog, position="center") { + var left, top; + + switch (position) { + case "center": + left = ($(window).width() - dialog.width()) / 2 + "px"; + top = ($(window).height() - dialog.height()) / 2 + "px"; + break; + case "center-left": + left = ($(window).width() / 4 - dialog.width() / 2) + "px"; + top = ($(window).height() - dialog.height()) / 2 + "px"; + break; + case "center-right": + left = ($(window).width() * 3 / 4 - dialog.width() / 2) + "px"; + top = ($(window).height() - dialog.height()) / 2 + "px"; + break; + default: + console.warn(`Unsupported dialog position: ${position}`); + left = ($(window).width() - dialog.width()) / 2 + "px"; + top = ($(window).height() - dialog.height()) / 2 + "px"; + } + + dialog.css({ top, left }); + }; + /** * 显示透明背景层 * Display mask layer when dialog opening @@ -3026,7 +3163,8 @@ h1 : function() { var cm = this.cm; var cursor = cm.getCursor(); - var selection = cm.getLine(cursor.line); + // var selection = cm.getLine(cursor.line); + var selection = cm.getSelection(); var patt1=new RegExp("^#{1}[ ]");//如果存在H1 var patt2=new RegExp("^#{1,6}[ ]");//如果存在H2-H6 //如果存在H1,取消H1的设置 @@ -3055,7 +3193,8 @@ h2 : function() { var cm = this.cm; var cursor = cm.getCursor(); - var selection = cm.getLine(cursor.line); + // var selection = cm.getLine(cursor.line); + var selection = cm.getSelection(); var patt1=new RegExp("^#{2}[ ]");//如果存在H1 var patt2=new RegExp("^#{1,6}[ ]");//如果存在H1-H6 //如果存在H2,取消H2的设置 @@ -3069,7 +3208,7 @@ cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); cm.replaceSelection("## "+selection+"\n"); cm.setCursor(cursor.line, cursor.ch +3); - + }else{ cm.setSelection({line:cursor.line, ch:0}, {line:cursor.line+1, ch:0 }); cm.replaceSelection("## "+selection+"\n"); @@ -3080,7 +3219,8 @@ h3 : function() { var cm = this.cm; var cursor = cm.getCursor(); - var selection = cm.getLine(cursor.line); + // var selection = cm.getLine(cursor.line); + var selection = cm.getSelection(); var patt1=new RegExp("^#{3}[ ]");//如果存在H3 var patt2=new RegExp("^#{1,6}[ ]");//如果存在H1-H6 //如果存在H3,取消H3的设置 @@ -3109,7 +3249,8 @@ h4 : function() { var cm = this.cm; var cursor = cm.getCursor(); - var selection = cm.getLine(cursor.line); + // var selection = cm.getLine(cursor.line); + var selection = cm.getSelection(); var patt1=new RegExp("^#{4}[ ]");//如果存在H4 var patt2=new RegExp("^#{1,6}[ ]");//如果存在H1-H6 //如果存在H4,取消H4的设置 @@ -3138,7 +3279,8 @@ h5 : function() { var cm = this.cm; var cursor = cm.getCursor(); - var selection = cm.getLine(cursor.line); + // var selection = cm.getLine(cursor.line); + var selection = cm.getSelection(); var patt1=new RegExp("^#{5}[ ]");//如果存在H5 var patt2=new RegExp("^#{1,6}[ ]");//如果存在H1-H6 //如果存在H5,取消H5的设置 @@ -3167,7 +3309,8 @@ h6 : function() { var cm = this.cm; var cursor = cm.getCursor(); - var selection = cm.getLine(cursor.line); + // var selection = cm.getLine(cursor.line); + var selection = cm.getSelection(); var patt1=new RegExp("^#{6}[ ]");//如果存在H6 var patt2=new RegExp("^#{1,6}[ ]");//如果存在H1-H6 //如果存在H6,取消H6的设置 @@ -3217,15 +3360,14 @@ //如果全作了无序列表标记,取消标记 if(cnt===selectionText.length){ for (var i = 0, len = selectionText.length; i < len; i++){ - selectionText[i] = (selectionText[i] === "") ? "" : selectionText[i].replace(/^-{1}[ ]/,""); + selectionText[i] = (selectionText[i] === "") ? "" : selectionText[i].replace(patt1,""); } }else //对未打上无序列表标记,打上标记 { for (var i = 0, len = selectionText.length; i < len; i++){ - selectionText[i] = (selectionText[i] === "") ? "" : "- "+selectionText[i].replace(/^-{1}[ ]/,""); + selectionText[i] = (selectionText[i] === "") ? "" : "- " + selectionText[i].replace(patt1,""); } - } cm.replaceSelection(selectionText.join("\n")); } @@ -3257,13 +3399,11 @@ for (var i = 0, len = selectionText.length; i < len; i++){ selectionText[i] = (selectionText[i] === "") ? "" : selectionText[i].replace(/^[0-9]+[\.][ ]/,""); } - }else - //对未打上有序列表标记,打上标记 - { + } else { + //对未打上有序列表标记,打上标记 for (var i = 0, len = selectionText.length; i < len; i++){ - selectionText[i] = (selectionText[i] === "") ? "" : (i+1)+". "+selectionText[i].replace(/^[0-9]+[\.][ ]/,""); + selectionText[i] = (selectionText[i] === "") ? "" : (i+1) + ". " + selectionText[i].replace(patt1,""); } - } cm.replaceSelection(selectionText.join("\n")); } @@ -3400,17 +3540,20 @@ } }; + var isMac = navigator.platform.toUpperCase().indexOf('MAC')>=0; + var key = isMac ? "Cmd" : "Ctrl"; + editormd.keyMaps = { - "Ctrl-1" : "h1", - "Ctrl-2" : "h2", - "Ctrl-3" : "h3", - "Ctrl-4" : "h4", - "Ctrl-5" : "h5", - "Ctrl-6" : "h6", - "Ctrl-B" : "bold", // if this is string == editormd.toolbarHandlers.xxxx - "Ctrl-D" : "datetime", - - "Ctrl-E" : function() { // emoji + [key + "-1"] : "h1", + [key + "-2"] : "h2", + [key + "-3"] : "h3", + [key + "-4"] : "h4", + [key + "-5"] : "h5", + [key + "-6"] : "h6", + [key + "-B"] : "bold", // if this is string == editormd.toolbarHandlers.xxxx + [key + "-D"] : "datetime", + + [key + "-E"] : function() { // emoji var cm = this.cm; var cursor = cm.getCursor(); var selection = cm.getSelection(); @@ -3427,12 +3570,12 @@ cm.setCursor(cursor.line, cursor.ch + 1); } }, - "Ctrl-Alt-G" : "goto-line", - "Ctrl-H" : "hr", - "Ctrl-I" : "italic", - "Ctrl-K" : "code", + [key + "-Alt-G"] : "goto-line", + [key + "-H"] : "hr", + [key + "-I"] : "italic", + [key + "-K"] : "code", - "Ctrl-L" : function() { + [key + "-L"] : function() { var cm = this.cm; var cursor = cm.getCursor(); var selection = cm.getSelection(); @@ -3445,9 +3588,9 @@ cm.setCursor(cursor.line, cursor.ch + 1); } }, - "Ctrl-U" : "list-ul", + [key + "-U"] : "list-ul", - "Shift-Ctrl-A" : function() { + ["Shift-" + key + "-A"] : function() { var cm = this.cm; var cursor = cm.getCursor(); var selection = cm.getSelection(); @@ -3465,10 +3608,10 @@ } }, - "Shift-Ctrl-C" : "code", - "Shift-Ctrl-Q" : "quote", - "Shift-Ctrl-S" : "del", - "Shift-Ctrl-K" : "tex", // KaTeX + ["Shift" + key + "-C"] : "code", + ["Shift" + key + "Q"] : "quote", + ["Shift" + key + "S"] : "del", + ["Shift" + key + "K"] : "tex", // KaTeX "Shift-Alt-C" : function() { var cm = this.cm; @@ -3482,16 +3625,16 @@ } }, - "Shift-Ctrl-Alt-C" : "code-block", - "Shift-Ctrl-H" : "html-entities", - "Shift-Alt-H" : "help", - "Shift-Ctrl-E" : "emoji", - "Shift-Ctrl-U" : "uppercase", - "Shift-Alt-U" : "ucwords", - "Shift-Ctrl-Alt-U" : "ucfirst", - "Shift-Alt-L" : "lowercase", + ["Shift-" + key + "-Alt-C"] : "code-block", + ["Shift-" + key + "-H"] : "html-entities", + "Shift-Alt-H" : "help", + ["Shift-" + key + "-E"] : "emoji", + ["Shift-" + key + "-U"] : "uppercase", + "Shift-Alt-U" : "ucwords", + ["Shift-" + key + "-Alt-U"] : "ucfirst", + "Shift-Alt-L" : "lowercase", - "Shift-Ctrl-I" : function() { + ["Shift-" + key + "-I"] : function() { var cm = this.cm; var cursor = cm.getCursor(); var selection = cm.getSelection(); @@ -3505,15 +3648,15 @@ } }, - "Shift-Ctrl-Alt-I" : "image", - "Shift-Ctrl-L" : "link", - "Shift-Ctrl-O" : "list-ol", - "Shift-Ctrl-P" : "preformatted-text", - "Shift-Ctrl-T" : "table", - "Shift-Alt-P" : "pagebreak", - "F9" : "watch", - "F10" : "preview", - "F11" : "fullscreen", + ["Shift-" + key + "-Alt-I"] : "image", + ["Shift-" + key + "-L"] : "link", + ["Shift-" + key + "-O"] : "list-ol", + ["Shift-" + key + "-P"] : "preformatted-text", + ["Shift-" + key + "-T"] : "table", + "Shift-Alt-P" : "pagebreak", + "F9" : "watch", + "F10" : "preview", + "F11" : "fullscreen", }; /** @@ -3573,7 +3716,7 @@ email : /(\w+)@(\w+)\.(\w+)\.?(\w+)?/g, emailLink : /(mailto:)?([\w\.\_]+)@(\w+)\.(\w+)\.?(\w+)?/g, emoji : /:([\w\+-]+):/g, - emojiDatetime : /(\d{2}:\d{2}:\d{2})/g, + emojiDatetime : /(\d{1,2}:\d{1,2}:\d{1,2})/g, twemoji : /:(tw-([\w]+)-?(\w+)?):/g, fontAwesome : /:(fa-([\w]+)(-(\w+)){0,}):/g, editormdLogo : /:(editormd-logo-?(\w+)?):/g, @@ -3582,7 +3725,8 @@ // Emoji graphics files url path editormd.emoji = { - path : "http://www.emoji-cheat-sheet.com/graphics/emojis/", + // path : "http://www.emoji-cheat-sheet.com/graphics/emojis/", + path: "https://www.webpagefx.com/tools/emoji-cheat-sheet/graphics/emojis/", ext : ".png" }; @@ -3814,7 +3958,7 @@ return ''; } - var out = ""; + var headingHTML = ""; - headingHTML += ""; headingHTML += ""; headingHTML += (hasLinkReg) ? this.atLink(this.emoji(linkText)) : this.atLink(this.emoji(text)); headingHTML += ""; @@ -3895,21 +4036,21 @@ }; markedRenderer.paragraph = function(text) { - var isTeXInline = /\$\$(.*)\$\$/g.test(text); - var isTeXLine = /^\$\$(.*)\$\$$/.test(text); - var isTeXAddClass = (isTeXLine) ? " class=\"" + editormd.classNames.tex + "\"" : " class=\"line\""; + var isTeXInline = /\$\$(.+?)\$\$/g.test(text); + var isTeXLine = /^(?!\$\$.+?(?:\$\$).+?\$\$)(\$\$(.+?)\$\$)$/.test(text); + var isTeXAddClass = (isTeXLine) ? " class=\"" + editormd.classNames.tex + "\"" : ""; var isToC = (settings.tocm) ? /^(\[TOC\]|\[TOCM\])$/.test(text) : /^\[TOC\]$/.test(text); var isToCMenu = /^\[TOCM\]$/.test(text); if (!isTeXLine && isTeXInline) { - text = text.replace(/(\$\$([^\$]*)\$\$)+/g, function($1, $2) { - return "" + $2.replace(/\$/g, "") + ""; + text = text.replaceAll(/(\$\$(.+?)\$\$)/g, function(match, $1, $2) { + return "" + $2.replaceAll(/\/g,"") + ""; }); } else { - text = (isTeXLine) ? text.replace(/\$/g, "") : text; + text = (isTeXLine) ? text.replace(/^(?!\$\$.+?(?:\$\$).+?\$\$)(\$\$(.+?)\$\$)$/, (match, $1, $2) => $2) : text; } var tocHTML = "
                      " + text + "
                      "; @@ -3941,7 +4082,7 @@ } else if ( lang === "math" || lang === "latex" || lang === "katex") { - return "

                      " + code + "

                      "; + return "

                      " + code + "

                      "; } else if (/^mindmap/i.test(lang)){ var len = 9 || 32; @@ -3963,7 +4104,7 @@ if (lang === "drawio") { var svgCode = decodeURIComponent(escape(window.atob(code))) return "
                      " + svgCode + "
                      " - } + } else { return marked.Renderer.prototype.code.apply(this, arguments); @@ -4032,14 +4173,14 @@ } else if (level < lastLevel) { - // html += (new Array(lastLevel - level + 2)).join("
                  • "); + html += (new Array(lastLevel - level + 2)).join(""); } else { - // html += ""; + html += ""; } - html += "
                  • " + text + "
                  • "; + html += "
                  • " + text + "
                      "; lastLevel = level; } @@ -4216,6 +4357,7 @@ return html; }; + editormd.$filterXSS = editormd.filterHTMLTags; /** * 将Markdown文档解析为HTML用于前台显示 @@ -4237,7 +4379,6 @@ tocContainer : "", markdown : "", markdownSourceCode : false, - htmlDecode : false, autoLoadKaTeX : true, pageBreak : true, atLink : true, // for @link @@ -4264,7 +4405,7 @@ saveTo = div.find("textarea"); } - var markdownDoc = (settings.markdown === "") ? saveTo.val() : settings.markdown; + var markdownDoc = (settings.markdown === undefined) ? saveTo.val() : settings.markdown; var markdownToC = []; var rendererOptions = { @@ -4290,16 +4431,15 @@ tables : true, breaks : true, pedantic : false, - sanitize : (settings.htmlDecode) ? false : true, // 是否忽略HTML标签,即是否开启HTML标签解析,为了安全性,默认不开启 smartLists : true, smartypants : true }; markdownDoc = new String(markdownDoc); - var markdownParsed = marked(markdownDoc, markedOptions); + var markdownParsed = marked.parse(markdownDoc, markedOptions); - markdownParsed = editormd.filterHTMLTags(markdownParsed, settings.htmlDecode); + markdownParsed = editormd.$filterXSS(markdownParsed); if (settings.markdownSourceCode) { saveTo.text(markdownDoc); @@ -4333,8 +4473,10 @@ if (settings.previewCodeHighlight) { - div.find("pre").addClass("prettyprint"); + div.find("pre").addClass("prettyprint linenums"); + //TODO: fix later if we decide to generate html prettyPrint(); + // prettyPrint($.proxy(editormd.settings.fixCodeBlocks, editormd)); } if (!editormd.isIE8) @@ -4436,15 +4578,16 @@ * @param {String} fileName 插件文件路径 * @param {Function} [callback=function()] 加载成功后执行的回调函数 * @param {String} [into="head"] 嵌入页面的位置 + * @param {String} [version=editormd.version] */ - editormd.loadPlugin = function(fileName, callback, into) { + editormd.loadPlugin = function(fileName, callback, into, version) { callback = callback || function() {}; this.loadScript(fileName, function() { editormd.loadFiles.plugin.push(fileName); callback(); - }, into); + }, into, version); }; /** @@ -4454,11 +4597,13 @@ * @param {String} fileName CSS文件名 * @param {Function} [callback=function()] 加载成功后执行的回调函数 * @param {String} [into="head"] 嵌入页面的位置 + * @param {String} [version=editormd.version] */ - editormd.loadCSS = function(fileName, callback, into) { + editormd.loadCSS = function(fileName, callback, into, version=editormd.version) { into = into || "head"; callback = callback || function() {}; + version = version || editormd.version var css = document.createElement("link"); css.type = "text/css"; @@ -4468,7 +4613,7 @@ callback(); }; - css.href = fileName + ".css"; + css.href = fileName + `.css?editormd_version=${version}`; if(into === "head") { document.getElementsByTagName("head")[0].appendChild(css); @@ -4489,16 +4634,17 @@ * @param {String} [into="head"] 嵌入页面的位置 */ - editormd.loadScript = function(fileName, callback, into) { + editormd.loadScript = function(fileName, callback, into, version) { into = into || "head"; + version = version || editormd.version callback = callback || function() {}; var script = null; script = document.createElement("script"); script.id = fileName.replace(/[\./]+/g, "-"); script.type = "text/javascript"; - script.src = fileName + ".js"; + script.src = fileName + `.js?editormd_version=${version}`; if (editormd.isIE8) { @@ -4529,11 +4675,12 @@ } }; - // 使用国外的CDN,加载速度有时会很慢,或者自定义URL + // 使用国内的CDN,或者自定义URL // You can custom KaTeX load url. editormd.katexURL = { - css : "//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min", - js : "//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min" + css: "https://cdn.bootcdn.net/ajax/libs/KaTeX/0.16.8/katex.min", + jsmain: "https://cdn.bootcdn.net/ajax/libs/KaTeX/0.16.8/katex.min", + jsauto: "https://cdn.bootcdn.net/ajax/libs/KaTeX/0.16.8/contrib/auto-render.min" }; editormd.kaTeXLoaded = false; @@ -4547,7 +4694,9 @@ editormd.loadKaTeX = function (callback) { editormd.loadCSS(editormd.katexURL.css, function(){ - editormd.loadScript(editormd.katexURL.js, callback || function(){}); + editormd.loadScript(editormd.katexURL.jsmain, function() { + editormd.loadScript(editormd.katexURL.jsauto, callback || function() {}) + }) }); }; @@ -4575,7 +4724,7 @@ var defaults = { name : "", width : 420, - height: 240, + height: "auto", title : "", drag : true, closed : true, @@ -4585,6 +4734,13 @@ backgroundColor : "#fff", opacity : 0.1 }, + removeDialogOnClose: false, + resizeableX: false, + resizeableY: false, + minWidth: 0, + minHeight: 0, + maxWidth: "none", + maxHeight: "none", lockScreen : true, footer : true, buttons : false @@ -4604,15 +4760,14 @@ if (options.title !== "") { html += "
                      "; - html += "" + options.title + ""; + html += "" + options.title + ""; + if (options.closed) + { + html += ""; + } html += "
                      "; } - if (options.closed) - { - html += ""; - } - html += "
                      " + options.content; if (options.footer || typeof options.footer === "string") @@ -4670,7 +4825,14 @@ zIndex : editormd.dialogZindex, border : (editormd.isIE8) ? "1px solid #ddd" : "", width : (typeof options.width === "number") ? options.width + "px" : options.width, - height : (typeof options.height === "number") ? options.height + "px" : options.height + height : (typeof options.height === "number") ? options.height + "px" : options.height, + "min-width": (typeof options.minWidth === "number") ? options.minWidth + "px" : options.minWidth, + "min-height": (typeof options.minHeight === "number") ? options.minHeight + "px" : options.minHeight, + "max-width": (typeof options.maxWidth === "number") ? options.maxWidth + "px" : options.maxWidth, + "max-height": (typeof options.maxHeight === "number") ? options.maxHeight + "px" : options.maxHeight, + ...((options.resizeableX || options.resizeableY) ? { overflow: 'hidden', + resize: (options.resizeableX && options.resizeableY) ? "both" : ((options.resizeableX) ? "horizontal" : "vertical") + } : {}) }); var dialogPosition = function(){ @@ -4684,8 +4846,9 @@ $(window).resize(dialogPosition); - dialog.children("." + classPrefix + "dialog-close").bind(mouseOrTouch("click", "touchend"), function() { + dialog.find("." + classPrefix + "dialog-close").bind(mouseOrTouch("click", "touchend"), function() { dialog.hide().lockScreen(false).hideMask(); + if (options.removeDialogOnClose) dialog.remove() }); if (typeof options.buttons === "object") diff --git a/static/editor.md/editormd.min.js b/static/editor.md/editormd.min.js index f264e9a12..e62253624 100644 --- a/static/editor.md/editormd.min.js +++ b/static/editor.md/editormd.min.js @@ -1 +1,2 @@ -(function(factory){"use strict";if(typeof require==="function"&&typeof exports==="object"&&typeof module==="object"){module.exports=factory}else if(typeof define==="function"){if(define.amd){}else{define(["jquery"],factory)}}else{window.editormd=factory()}})(function(){"use strict";var $=typeof jQuery!=="undefined"?jQuery:Zepto;if(typeof $==="undefined"){return}var editormd=function(id,options){return new editormd.fn.init(id,options)};editormd.title=editormd.$name="Editor.md";editormd.version="1.5.0";editormd.homePage="https://pandao.github.io/editor.md/";editormd.classPrefix="editormd-";editormd.toolbarModes={full:["undo","redo","|","bold","del","italic","quote","ucwords","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","link","reference-link","image","code","preformatted-text","code-block","table","datetime","emoji","html-entities","pagebreak","|","goto-line","watch","preview","fullscreen","clear","search","|","help","info"],simple:["undo","redo","|","bold","del","italic","quote","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","watch","preview","fullscreen","|","help","info"],mini:["undo","redo","|","watch","preview","|","help","info"]};editormd.defaults={debug:false,mode:"gfm",name:"",value:"",theme:"",editorTheme:"default",previewTheme:"",markdown:"",appendMarkdown:"",width:"100%",height:"100%",path:"./lib/",pluginPath:"",delay:500,autoLoadModules:true,watch:true,placeholder:"Enjoy Markdown! coding now...",gotoLine:true,codeFold:false,autoHeight:false,autoFocus:true,autoCloseTags:true,searchReplace:true,syncScrolling:true,readOnly:false,tabSize:4,indentUnit:4,lineNumbers:true,lineWrapping:true,autoCloseBrackets:true,showTrailingSpace:true,matchBrackets:true,indentWithTabs:true,styleSelectedText:true,matchWordHighlight:true,styleActiveLine:true,dialogLockScreen:true,dialogShowMask:true,dialogDraggable:true,dialogMaskBgColor:"#fff",dialogMaskOpacity:.1,fontSize:"13px",saveHTMLToTextarea:false,disabledKeyMaps:[],onload:function(){},onresize:function(){},onchange:function(){},onwatch:null,onunwatch:null,onpreviewing:function(){},onpreviewed:function(){},onfullscreen:function(){},onfullscreenExit:function(){},onscroll:function(){},onpreviewscroll:function(){},imageUpload:false,imageFormats:["jpg","jpeg","gif","png","bmp","webp"],imageUploadURL:"",crossDomainUpload:false,uploadCallbackURL:"",toc:true,tocm:false,tocTitle:"",tocDropdown:false,tocContainer:"",tocStartLevel:1,htmlDecode:false,pageBreak:true,atLink:true,emailLink:true,taskList:false,emoji:false,tex:false,flowChart:false,sequenceDiagram:false,mermaid:true,mindMap:true,previewCodeHighlight:true,toolbar:true,toolbarAutoFixed:true,toolbarIcons:"full",toolbarTitles:{},toolbarHandlers:{ucwords:function(){return editormd.toolbarHandlers.ucwords},lowercase:function(){return editormd.toolbarHandlers.lowercase}},toolbarCustomIcons:{lowercase:'a',ucwords:'Aa'},toolbarIconsClass:{undo:"fa-undo",redo:"fa-repeat",bold:"fa-bold",del:"fa-strikethrough",italic:"fa-italic",quote:"fa-quote-left",uppercase:"fa-font",h1:editormd.classPrefix+"bold",h2:editormd.classPrefix+"bold",h3:editormd.classPrefix+"bold",h4:editormd.classPrefix+"bold",h5:editormd.classPrefix+"bold",h6:editormd.classPrefix+"bold","list-ul":"fa-list-ul","list-ol":"fa-list-ol",hr:"fa-minus",link:"fa-link","reference-link":"fa-anchor",image:"fa-picture-o",code:"fa-code","preformatted-text":"fa-file-code-o","code-block":"fa-file-code-o",table:"fa-table",datetime:"fa-clock-o",emoji:"fa-smile-o","html-entities":"fa-copyright",pagebreak:"fa-newspaper-o","goto-line":"fa-terminal",watch:"fa-eye-slash",unwatch:"fa-eye",preview:"fa-desktop",search:"fa-search",fullscreen:"fa-arrows-alt",clear:"fa-eraser",help:"fa-question-circle",info:"fa-info-circle"},toolbarIconTexts:{},lang:{name:"zh-cn",description:"开源在线Markdown编辑器
                      Open source online Markdown editor.",tocTitle:"目录",toolbar:{undo:"撤销(Ctrl+Z)",redo:"重做(Ctrl+Y)",bold:"粗体",del:"删除线",italic:"斜体",quote:"引用",ucwords:"将每个单词首字母转成大写",uppercase:"将所选转换成大写",lowercase:"将所选转换成小写",h1:"标题1",h2:"标题2",h3:"标题3",h4:"标题4",h5:"标题5",h6:"标题6","list-ul":"无序列表","list-ol":"有序列表",hr:"横线",link:"链接","reference-link":"引用链接",image:"添加图片",code:"行内代码","preformatted-text":"预格式文本 / 代码块(缩进风格)","code-block":"代码块(多语言风格)",table:"添加表格",datetime:"日期时间",emoji:"Emoji表情","html-entities":"HTML实体字符",pagebreak:"插入分页符","goto-line":"跳转到行",watch:"关闭实时预览",unwatch:"开启实时预览",preview:"全窗口预览HTML(按 Shift + ESC还原)",fullscreen:"全屏(按ESC还原)",clear:"清空",search:"搜索",help:"使用帮助",info:"关于"+editormd.title},buttons:{enter:"确定",cancel:"取消",close:"关闭"},dialog:{link:{title:"添加链接",url:"链接地址",urlTitle:"链接标题",urlEmpty:"错误:请填写链接地址。"},referenceLink:{title:"添加引用链接",name:"引用名称",url:"链接地址",urlId:"链接ID",urlTitle:"链接标题",nameEmpty:"错误:引用链接的名称不能为空。",idEmpty:"错误:请填写引用链接的ID。",urlEmpty:"错误:请填写引用链接的URL地址。"},image:{title:"添加图片",url:"图片地址",link:"图片链接",alt:"图片描述",uploadButton:"本地上传",imageURLEmpty:"错误:图片地址不能为空。",uploadFileEmpty:"错误:上传的图片不能为空。",formatNotAllowed:"错误:只允许上传图片文件,允许上传的图片文件格式有:"},preformattedText:{title:"添加预格式文本或代码块",emptyAlert:"错误:请填写预格式文本或代码的内容。"},codeBlock:{title:"添加代码块",selectLabel:"代码语言:",selectDefaultText:"请选择代码语言",otherLanguage:"其他语言",unselectedLanguageAlert:"错误:请选择代码所属的语言类型。",codeEmptyAlert:"错误:请填写代码内容。"},htmlEntities:{title:"HTML 实体字符"},help:{title:"使用帮助"}}}};editormd.classNames={tex:editormd.classPrefix+"tex"};editormd.dialogZindex=99999;editormd.$katex=null;editormd.$marked=null;editormd.$CodeMirror=null;editormd.$prettyPrint=null;var timer,flowchartTimer;editormd.prototype=editormd.fn={state:{watching:false,loaded:false,preview:false,fullscreen:false},init:function(id,options){options=options||{};if(typeof id==="object"){options=id}var _this=this;var classPrefix=this.classPrefix=editormd.classPrefix;var settings=this.settings=$.extend(true,editormd.defaults,options);id=typeof id==="object"?settings.id:id;var editor=this.editor=$("#"+id);this.id=id;this.lang=settings.lang;var classNames=this.classNames={textarea:{html:classPrefix+"html-textarea",markdown:classPrefix+"markdown-textarea"}};settings.pluginPath=settings.pluginPath===""?settings.path+"../plugins/":settings.pluginPath;this.state.watching=settings.watch?true:false;if(!editor.hasClass("editormd")){editor.addClass("editormd")}editor.css({width:typeof settings.width==="number"?settings.width+"px":settings.width,height:typeof settings.height==="number"?settings.height+"px":settings.height});if(settings.autoHeight){editor.css("height","auto")}var markdownTextarea=this.markdownTextarea=editor.children("textarea");if(markdownTextarea.length<1){editor.append("");markdownTextarea=this.markdownTextarea=editor.children("textarea")}markdownTextarea.addClass(classNames.textarea.markdown).attr("placeholder",settings.placeholder);if(typeof markdownTextarea.attr("name")==="undefined"||markdownTextarea.attr("name")===""){markdownTextarea.attr("name",settings.name!==""?settings.name:id+"-markdown-doc")}var appendElements=[!settings.readOnly?'':"",settings.saveHTMLToTextarea?'':"",'
                      ','
                      ','
                      '].join("\n");editor.append(appendElements).addClass(classPrefix+"vertical");if(settings.theme!==""){editor.addClass(classPrefix+"theme-"+settings.theme)}this.mask=editor.children("."+classPrefix+"mask");this.containerMask=editor.children("."+classPrefix+"container-mask");if(settings.markdown!==""){markdownTextarea.val(settings.markdown)}if(settings.appendMarkdown!==""){markdownTextarea.val(markdownTextarea.val()+settings.appendMarkdown)}this.htmlTextarea=editor.children("."+classNames.textarea.html);this.preview=editor.children("."+classPrefix+"preview");this.previewContainer=this.preview.children("."+classPrefix+"preview-container");if(settings.previewTheme!==""){this.preview.addClass(classPrefix+"preview-theme-"+settings.previewTheme)}if(typeof define==="function"&&define.amd){if(typeof katex!=="undefined"){editormd.$katex=katex}if(settings.searchReplace&&!settings.readOnly){editormd.loadCSS(settings.path+"codemirror/addon/dialog/dialog");editormd.loadCSS(settings.path+"codemirror/addon/search/matchesonscrollbar")}}if(typeof define==="function"&&define.amd||!settings.autoLoadModules){if(typeof CodeMirror!=="undefined"){editormd.$CodeMirror=CodeMirror}if(typeof marked!=="undefined"){editormd.$marked=marked}this.setCodeMirror().setToolbar().loadedDisplay()}else{this.loadQueues()}return this},loadQueues:function(){var _this=this;var settings=this.settings;var loadPath=settings.path;var isLoadedDisplay=false;var loadFlowChartOrSequenceDiagram=function(){if(editormd.isIE8){_this.loadedDisplay();return}if(settings.mermaid){editormd.loadScript(loadPath+"mermaid/mermaid.min",function(){window.mermaid.initialize({theme:"default",logLevel:3,securityLevel:"loose",flowchart:{curve:"basis"},gantt:{axisFormat:"%m/%d/%Y"},sequence:{actorMargin:50}});mermaid.ganttConfig={axisFormatter:[["%I:%M",function(d){return d.getHours()}],["%m/%d",function(d){return d.getDay()==1}],["%a %d",function(d){return d.getDay()&&d.getDate()!=1}],["%b %d",function(d){return d.getDate()!=1}],["%m-%y",function(d){return d.getMonth()}],["%m-%Y",function(){return d.getFullYear()}]]};if(!isLoadedDisplay){isLoadedDisplay=true;_this.loadedDisplay()}})}if(settings.flowChart){editormd.loadScript(loadPath+"raphael.min",function(){editormd.loadScript(loadPath+"flowchart.min",function(){editormd.loadScript(loadPath+"jquery.flowchart.min",function(){if(!isLoadedDisplay){isLoadedDisplay=true;_this.loadedDisplay()}})})})}if(settings.mindMap){editormd.loadScript(loadPath+"mindmap/transform.min",function(){editormd.loadScript(loadPath+"mindmap/d3@5",function(){editormd.loadScript(loadPath+"mindmap/view.min",function(){if(!isLoadedDisplay){isLoadedDisplay=true;_this.loadedDisplay()}})})})}if(settings.sequenceDiagram){editormd.loadCSS(loadPath+"sequence/sequence-diagram-min",function(){editormd.loadScript(loadPath+"sequence/webfont",function(){editormd.loadScript(loadPath+"sequence/snap.svg-min",function(){editormd.loadScript(loadPath+"sequence/underscore-min",function(){editormd.loadScript(loadPath+"sequence/sequence-diagram-min",function(){if(!isLoadedDisplay){isLoadedDisplay=true;_this.loadedDisplay()}})})})})})}else{_this.loadedDisplay()}};editormd.loadCSS(loadPath+"codemirror/codemirror.min");if(settings.searchReplace&&!settings.readOnly){editormd.loadCSS(loadPath+"codemirror/addon/dialog/dialog");editormd.loadCSS(loadPath+"codemirror/addon/search/matchesonscrollbar")}if(settings.codeFold){editormd.loadCSS(loadPath+"codemirror/addon/fold/foldgutter")}editormd.loadScript(loadPath+"codemirror/codemirror.min",function(){editormd.$CodeMirror=CodeMirror;editormd.loadScript(loadPath+"codemirror/modes.min",function(){editormd.loadScript(loadPath+"codemirror/addons.min",function(){_this.setCodeMirror();if(settings.mode!=="gfm"&&settings.mode!=="markdown"){_this.loadedDisplay();return false}_this.setToolbar();editormd.loadScript(loadPath+"marked",function(){editormd.$marked=marked;if(!settings.highlightStyle){settings.highlightStyle="github"}if(settings.previewCodeHighlight){editormd.loadCSS(loadPath+"highlight/styles/"+settings.highlightStyle);editormd.loadScript(loadPath+"highlight/highlight",function(){loadFlowChartOrSequenceDiagram()})}else{loadFlowChartOrSequenceDiagram()}})})})});return this},setTheme:function(theme){var editor=this.editor;var oldTheme=this.settings.theme;var themePrefix=this.classPrefix+"theme-";editor.removeClass(themePrefix+oldTheme).addClass(themePrefix+theme);this.settings.theme=theme;return this},setEditorTheme:function(theme){var settings=this.settings;settings.editorTheme=theme;if(theme!=="default"){editormd.loadCSS(settings.path+"codemirror/theme/"+settings.editorTheme)}this.cm.setOption("theme",theme);return this},setCodeMirrorTheme:function(theme){this.setEditorTheme(theme);return this},setPreviewTheme:function(theme){var preview=this.preview;var oldTheme=this.settings.previewTheme;var themePrefix=this.classPrefix+"preview-theme-";preview.removeClass(themePrefix+oldTheme).addClass(themePrefix+theme);this.settings.previewTheme=theme;return this},setCodeMirror:function(){var settings=this.settings;var editor=this.editor;if(settings.editorTheme!=="default"){editormd.loadCSS(settings.path+"codemirror/theme/"+settings.editorTheme)}var codeMirrorConfig={mode:settings.mode,theme:settings.editorTheme,tabSize:settings.tabSize,dragDrop:false,autofocus:settings.autoFocus,autoCloseTags:settings.autoCloseTags,readOnly:settings.readOnly?"nocursor":false,indentUnit:settings.indentUnit,lineNumbers:settings.lineNumbers,lineWrapping:settings.lineWrapping,extraKeys:{"Ctrl-Q":function(cm){cm.foldCode(cm.getCursor())}},foldGutter:settings.codeFold,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],matchBrackets:settings.matchBrackets,indentWithTabs:settings.indentWithTabs,styleActiveLine:settings.styleActiveLine,styleSelectedText:settings.styleSelectedText,autoCloseBrackets:settings.autoCloseBrackets,showTrailingSpace:settings.showTrailingSpace,highlightSelectionMatches:!settings.matchWordHighlight?false:{showToken:settings.matchWordHighlight==="onselected"?false:/\w/}};this.codeEditor=this.cm=editormd.$CodeMirror.fromTextArea(this.markdownTextarea[0],codeMirrorConfig);this.codeMirror=this.cmElement=editor.children(".CodeMirror");if(settings.value!==""){this.cm.setValue(settings.value)}this.codeMirror.css({fontSize:settings.fontSize,width:!settings.watch?"100%":"50%"});if(settings.autoHeight){this.codeMirror.css("height","auto");this.cm.setOption("viewportMargin",Infinity)}if(!settings.lineNumbers){this.codeMirror.find(".CodeMirror-gutters").css("border-right","none")}return this},getCodeMirrorOption:function(key){return this.cm.getOption(key)},setCodeMirrorOption:function(key,value){this.cm.setOption(key,value);return this},addKeyMap:function(map,bottom){this.cm.addKeyMap(map,bottom);return this},removeKeyMap:function(map){this.cm.removeKeyMap(map);return this},gotoLine:function(line){var settings=this.settings;if(!settings.gotoLine){return this}var cm=this.cm;var editor=this.editor;var count=cm.lineCount();var preview=this.preview;if(typeof line==="string"){if(line==="last"){line=count}if(line==="first"){line=1}}if(typeof line!=="number"){alert("Error: The line number must be an integer.");return this}line=parseInt(line)-1;if(line>count){alert("Error: The line number range 1-"+count);return this}cm.setCursor({line:line,ch:0});var scrollInfo=cm.getScrollInfo();var clientHeight=scrollInfo.clientHeight;var coords=cm.charCoords({line:line,ch:0},"local");cm.scrollTo(null,(coords.top+coords.bottom-clientHeight)/2);if(settings.watch){var cmScroll=this.codeMirror.find(".CodeMirror-scroll")[0];var height=$(cmScroll).height();var scrollTop=cmScroll.scrollTop;var percent=scrollTop/cmScroll.scrollHeight;if(scrollTop===0){preview.scrollTop(0)}else if(scrollTop+height>=cmScroll.scrollHeight-16){preview.scrollTop(preview[0].scrollHeight)}else{preview.scrollTop(preview[0].scrollHeight*percent)}}cm.focus();return this},extend:function(){if(typeof arguments[1]!=="undefined"){if(typeof arguments[1]==="function"){arguments[1]=$.proxy(arguments[1],this)}this[arguments[0]]=arguments[1]}if(typeof arguments[0]==="object"&&typeof arguments[0].length==="undefined"){$.extend(true,this,arguments[0])}return this},set:function(key,value){if(typeof value!=="undefined"&&typeof value==="function"){value=$.proxy(value,this)}this[key]=value;return this},config:function(key,value){var settings=this.settings;if(typeof key==="object"){settings=$.extend(true,settings,key)}if(typeof key==="string"){settings[key]=value}this.settings=settings;this.recreate();return this},on:function(eventType,callback){var settings=this.settings;if(typeof settings["on"+eventType]!=="undefined"){settings["on"+eventType]=$.proxy(callback,this)}return this},off:function(eventType){var settings=this.settings;if(typeof settings["on"+eventType]!=="undefined"){settings["on"+eventType]=function(){}}return this},showToolbar:function(callback){var settings=this.settings;if(settings.readOnly){return this}if(settings.toolbar&&(this.toolbar.length<1||this.toolbar.find("."+this.classPrefix+"menu").html()==="")){this.setToolbar()}settings.toolbar=true;this.toolbar.show();this.resize();$.proxy(callback||function(){},this)();return this},hideToolbar:function(callback){var settings=this.settings;settings.toolbar=false;this.toolbar.hide();this.resize();$.proxy(callback||function(){},this)();return this},setToolbarAutoFixed:function(fixed){var state=this.state;var editor=this.editor;var toolbar=this.toolbar;var settings=this.settings;if(typeof fixed!=="undefined"){settings.toolbarAutoFixed=fixed}var autoFixedHandle=function(){var $window=$(window);var top=$window.scrollTop();if(!settings.toolbarAutoFixed){return false}if(top-editor.offset().top>10&&top
                        ';editor.append(toolbarHTML);toolbar=this.toolbar=editor.children("."+classPrefix+"toolbar")}if(!settings.toolbar){toolbar.hide();return this}toolbar.show();var icons=typeof settings.toolbarIcons==="function"?settings.toolbarIcons():typeof settings.toolbarIcons==="string"?editormd.toolbarModes[settings.toolbarIcons]:settings.toolbarIcons;var toolbarMenu=toolbar.find("."+this.classPrefix+"menu"),menu="";var pullRight=false;for(var i=0,len=icons.length;i|'}else{var isHeader=/h(\d)/.test(name);var index=name;if(name==="watch"&&!settings.watch){index="unwatch"}var title=settings.lang.toolbar[index];var iconTexts=settings.toolbarIconTexts[index];var iconClass=settings.toolbarIconsClass[index];title=typeof title==="undefined"?"":title;iconTexts=typeof iconTexts==="undefined"?"":iconTexts;iconClass=typeof iconClass==="undefined"?"":iconClass;var menuItem=pullRight?'
                      • ':"
                      • ";if(typeof settings.toolbarCustomIcons[name]!=="undefined"&&typeof settings.toolbarCustomIcons[name]!=="function"){menuItem+=settings.toolbarCustomIcons[name]}else{menuItem+='';menuItem+=''+(isHeader?name.toUpperCase():iconClass===""?iconTexts:"")+"";menuItem+=""}menuItem+="
                      • ";menu=pullRight?menuItem+menu:menu+menuItem}}toolbarMenu.html(menu);toolbarMenu.find('[title="Lowercase"]').attr("title",settings.lang.toolbar.lowercase);toolbarMenu.find('[title="ucwords"]').attr("title",settings.lang.toolbar.ucwords);this.setToolbarHandler();this.setToolbarAutoFixed();return this},dialogLockScreen:function(){$.proxy(editormd.dialogLockScreen,this)();return this},dialogShowMask:function(dialog){$.proxy(editormd.dialogShowMask,this)(dialog);return this},getToolbarHandles:function(name){var toolbarHandlers=this.toolbarHandlers=editormd.toolbarHandlers;return name&&typeof toolbarIconHandlers[name]!=="undefined"?toolbarHandlers[name]:toolbarHandlers},setToolbarHandler:function(){var _this=this;var settings=this.settings;if(!settings.toolbar||settings.readOnly){return this}var toolbar=this.toolbar;var cm=this.cm;var classPrefix=this.classPrefix;var toolbarIcons=this.toolbarIcons=toolbar.find("."+classPrefix+"menu > li > a");var toolbarIconHandlers=this.getToolbarHandles();toolbarIcons.bind(editormd.mouseOrTouch("click","touchend"),function(event){var icon=$(this).children(".fa");var name=icon.attr("name");var cursor=cm.getCursor();var selection=cm.getSelection();if(name===""){return}_this.activeIcon=icon;if(typeof toolbarIconHandlers[name]!=="undefined"){$.proxy(toolbarIconHandlers[name],_this)(cm)}else{if(typeof settings.toolbarHandlers[name]!=="undefined"){$.proxy(settings.toolbarHandlers[name],_this)(cm,icon,cursor,selection)}}if(name!=="link"&&name!=="reference-link"&&name!=="image"&&name!=="code-block"&&name!=="preformatted-text"&&name!=="watch"&&name!=="preview"&&name!=="search"&&name!=="fullscreen"&&name!=="info"){cm.focus()}return false});return this},createDialog:function(options){return $.proxy(editormd.createDialog,this)(options)},createInfoDialog:function(){var _this=this;var editor=this.editor;var classPrefix=this.classPrefix;var infoDialogHTML=['
                        ','
                        ','

                        '+editormd.title+"v"+editormd.version+"

                        ","

                        "+this.lang.description+"

                        ",'

                        '+editormd.homePage+'

                        ','

                        Copyright © 2015 Pandao, The MIT License.

                        ',"
                        ",'',"
                        "].join("\n");editor.append(infoDialogHTML);var infoDialog=this.infoDialog=editor.children("."+classPrefix+"dialog-info");infoDialog.find("."+classPrefix+"dialog-close").bind(editormd.mouseOrTouch("click","touchend"),function(){_this.hideInfoDialog()});infoDialog.css("border",editormd.isIE8?"1px solid #ddd":"").css("z-index",editormd.dialogZindex).show();this.infoDialogPosition();return this},infoDialogPosition:function(){var infoDialog=this.infoDialog;var _infoDialogPosition=function(){infoDialog.css({top:($(window).height()-infoDialog.height())/2+"px",left:($(window).width()-infoDialog.width())/2+"px"})};_infoDialogPosition();$(window).resize(_infoDialogPosition);return this},showInfoDialog:function(){$("html,body").css("overflow-x","hidden");var _this=this;var editor=this.editor;var settings=this.settings;var infoDialog=this.infoDialog=editor.children("."+this.classPrefix+"dialog-info");if(infoDialog.length<1){this.createInfoDialog()}this.lockScreen(true);this.mask.css({opacity:settings.dialogMaskOpacity,backgroundColor:settings.dialogMaskBgColor}).show();infoDialog.css("z-index",editormd.dialogZindex).show();this.infoDialogPosition();return this},hideInfoDialog:function(){$("html,body").css("overflow-x","");this.infoDialog.hide();this.mask.hide();this.lockScreen(false);return this},lockScreen:function(lock){editormd.lockScreen(lock);this.resize();return this},recreate:function(){var _this=this;var editor=this.editor;var settings=this.settings;this.codeMirror.remove();this.setCodeMirror();if(!settings.readOnly){if(editor.find(".editormd-dialog").length>0){editor.find(".editormd-dialog").remove()}if(settings.toolbar){this.getToolbarHandles();this.setToolbar()}}this.loadedDisplay(true);return this},previewCodeHighlight:function(){var settings=this.settings;var previewContainer=this.previewContainer;if(settings.previewCodeHighlight){previewContainer.find("pre").each(function(i,block){hljs.highlightBlock(block)})}return this},katexRender:function(){if(timer===null){return this}this.previewContainer.find("."+editormd.classNames.tex).each(function(){var tex=$(this);editormd.$katex.render(tex.text(),tex[0]);tex.find(".katex").css("font-size","1.6em")});return this},mindmapRender:function(){this.previewContainer.find(".mindmap").each(function(){var mmap=$(this);var md_data=window.markmap.transform(mmap.text().trim());window.markmap.markmap("svg#"+this.id,md_data)});return this},flowChartAndSequenceDiagramRender:function(){var $this=this;var settings=this.settings;var previewContainer=this.previewContainer;if(editormd.isIE8){return this}if(settings.mermaid){var mermaid=previewContainer.find(".lang-mermaid");if(mermaid){try{window.mermaid.init(void 0,mermaid.removeClass("hide"))}catch(e){console.log(e)}}}if(settings.flowChart){if(flowchartTimer===null){return this}try{previewContainer.find(".flowchart").flowChart()}catch(e){console.log(e)}}if(settings.sequenceDiagram){try{previewContainer.find(".sequence-diagram").sequenceDiagram({theme:"simple"})}catch(e){console.log(e)}}var preview=$this.preview;var codeMirror=$this.codeMirror;var codeView=codeMirror.find(".CodeMirror-scroll");var height=codeView.height();var scrollTop=codeView.scrollTop();var percent=scrollTop/codeView[0].scrollHeight;var tocHeight=0;preview.find(".markdown-toc-list").each(function(){tocHeight+=$(this).height()});var tocMenuHeight=preview.find(".editormd-toc-menu").height();tocMenuHeight=!tocMenuHeight?0:tocMenuHeight;if(scrollTop===0){preview.scrollTop(0)}else if(scrollTop+height>=codeView[0].scrollHeight-16){preview.scrollTop(preview[0].scrollHeight)}else{preview.scrollTop((preview[0].scrollHeight+tocHeight+tocMenuHeight)*percent)}return this},registerKeyMaps:function(keyMap){var _this=this;var cm=this.cm;var settings=this.settings;var toolbarHandlers=editormd.toolbarHandlers;var disabledKeyMaps=settings.disabledKeyMaps;keyMap=keyMap||null;if(keyMap){for(var i in keyMap){if($.inArray(i,disabledKeyMaps)<0){var map={};map[i]=keyMap[i];cm.addKeyMap(keyMap)}}}else{for(var k in editormd.keyMaps){var _keyMap=editormd.keyMaps[k];var handle=typeof _keyMap==="string"?$.proxy(toolbarHandlers[_keyMap],_this):$.proxy(_keyMap,_this);if($.inArray(k,["F9","F10","F11"])<0&&$.inArray(k,disabledKeyMaps)<0){var _map={};_map[k]=handle;cm.addKeyMap(_map)}}$(window).keydown(function(event){var keymaps={120:"F9",121:"F10",122:"F11"};if($.inArray(keymaps[event.keyCode],disabledKeyMaps)<0){switch(event.keyCode){case 120:$.proxy(toolbarHandlers["watch"],_this)();return false;break;case 121:$.proxy(toolbarHandlers["preview"],_this)();return false;break;case 122:$.proxy(toolbarHandlers["fullscreen"],_this)();return false;break;default:break}}})}return this},bindScrollEvent:function(){var _this=this;var preview=this.preview;var settings=this.settings;var codeMirror=this.codeMirror;var mouseOrTouch=editormd.mouseOrTouch;if(!settings.syncScrolling){return this}var cmBindScroll=function(){codeMirror.find(".CodeMirror-scroll").bind(mouseOrTouch("scroll","touchmove"),function(event){var height=$(this).height();var scrollTop=$(this).scrollTop();var percent=scrollTop/$(this)[0].scrollHeight;var tocHeight=0;preview.find(".markdown-toc-list").each(function(){tocHeight+=$(this).height()});var tocMenuHeight=preview.find(".editormd-toc-menu").height();tocMenuHeight=!tocMenuHeight?0:tocMenuHeight;if(scrollTop===0){preview.scrollTop(0)}else if(scrollTop+height>=$(this)[0].scrollHeight-16){preview.scrollTop(preview[0].scrollHeight)}else{preview.scrollTop((preview[0].scrollHeight+tocHeight+tocMenuHeight)*percent)}$.proxy(settings.onscroll,_this)(event)})};var cmUnbindScroll=function(){codeMirror.find(".CodeMirror-scroll").unbind(mouseOrTouch("scroll","touchmove"))};var previewBindScroll=function(){preview.bind(mouseOrTouch("scroll","touchmove"),function(event){var height=$(this).height();var scrollTop=$(this).scrollTop();var percent=scrollTop/$(this)[0].scrollHeight;var codeView=codeMirror.find(".CodeMirror-scroll");if(scrollTop===0){codeView.scrollTop(0)}else if(scrollTop+height>=$(this)[0].scrollHeight){codeView.scrollTop(codeView[0].scrollHeight)}else{codeView.scrollTop(codeView[0].scrollHeight*percent)}$.proxy(settings.onpreviewscroll,_this)(event)})};var previewUnbindScroll=function(){preview.unbind(mouseOrTouch("scroll","touchmove"))};codeMirror.bind({mouseover:cmBindScroll,mouseout:cmUnbindScroll,touchstart:cmBindScroll,touchend:cmUnbindScroll});if(settings.syncScrolling==="single"){return this}preview.bind({mouseover:previewBindScroll,mouseout:previewUnbindScroll,touchstart:previewBindScroll,touchend:previewUnbindScroll});return this},bindChangeEvent:function(){var _this=this;var cm=this.cm;var settings=this.settings;if(!settings.syncScrolling){return this}cm.on("change",function(_cm,changeObj){if(settings.watch){_this.previewContainer.css("padding",settings.autoHeight?"20px 20px 50px 40px":"20px")}timer=setTimeout(function(){clearTimeout(timer);_this.save();timer=null},settings.delay)});return this},loadedDisplay:function(recreate){recreate=recreate||false;var _this=this;var editor=this.editor;var preview=this.preview;var settings=this.settings;this.containerMask.hide();this.save();if(settings.watch){preview.show()}editor.data("oldWidth",editor.width()).data("oldHeight",editor.height());this.resize();this.registerKeyMaps();$(window).resize(function(){_this.resize()});this.bindScrollEvent().bindChangeEvent();if(!recreate){$.proxy(settings.onload,this)()}this.state.loaded=true;return this},width:function(width){this.editor.css("width",typeof width==="number"?width+"px":width);this.resize();return this},height:function(height){this.editor.css("height",typeof height==="number"?height+"px":height);this.resize();return this},resize:function(width,height){width=width||null;height=height||null;var state=this.state;var editor=this.editor;var preview=this.preview;var toolbar=this.toolbar;var settings=this.settings;var codeMirror=this.codeMirror;if(width){editor.css("width",typeof width==="number"?width+"px":width)}if(settings.autoHeight&&!state.fullscreen&&!state.preview){editor.css("height","auto");codeMirror.css("height","auto")}else{if(height){editor.css("height",typeof height==="number"?height+"px":height)}if(state.fullscreen){editor.height($(window).height())}if(settings.toolbar&&!settings.readOnly){codeMirror.css("margin-top",toolbar.height()+1).height(editor.height()-toolbar.height())}else{codeMirror.css("margin-top",0).height(editor.height())}}if(settings.watch){codeMirror.width(editor.width()/2);preview.width(!state.preview?editor.width()/2:editor.width());this.previewContainer.css("padding",settings.autoHeight?"20px 20px 50px 40px":"20px");if(settings.toolbar&&!settings.readOnly){preview.css("top",toolbar.height()+1)}else{preview.css("top",0)}if(settings.autoHeight&&!state.fullscreen&&!state.preview){preview.height("")}else{var previewHeight=settings.toolbar&&!settings.readOnly?editor.height()-toolbar.height():editor.height();preview.height(previewHeight)}}else{codeMirror.width(editor.width());preview.hide()}if(state.loaded){$.proxy(settings.onresize,this)()}return this},save:function(){if(timer===null){return this}var _this=this;var state=this.state;var settings=this.settings;var cm=this.cm;var cmValue=cm.getValue();var previewContainer=this.previewContainer;if(settings.mode!=="gfm"&&settings.mode!=="markdown"){this.markdownTextarea.val(cmValue);return this}var marked=editormd.$marked;var markdownToC=this.markdownToC=[];var rendererOptions=this.markedRendererOptions={toc:settings.toc,tocm:settings.tocm,tocStartLevel:settings.tocStartLevel,pageBreak:settings.pageBreak,taskList:settings.taskList,emoji:settings.emoji,tex:settings.tex,atLink:settings.atLink,emailLink:settings.emailLink,flowChart:settings.flowChart,sequenceDiagram:settings.sequenceDiagram,previewCodeHighlight:settings.previewCodeHighlight,mermaid:settings.mermaid,mindMap:settings.mindMap};var markedOptions=this.markedOptions={renderer:editormd.markedRenderer(markdownToC,rendererOptions),gfm:true,tables:true,breaks:true,pedantic:false,sanitize:settings.htmlDecode?false:true,smartLists:true,smartypants:true};marked.setOptions(markedOptions);var newMarkdownDoc=editormd.$marked(cmValue,markedOptions);if(settings.debug){console.info("cmValue",cmValue,newMarkdownDoc)}newMarkdownDoc=editormd.filterHTMLTags(newMarkdownDoc,settings.htmlDecode);this.markdownTextarea.text(cmValue);cm.save();if(settings.saveHTMLToTextarea){this.htmlTextarea.text(newMarkdownDoc)}if(settings.watch||!settings.watch&&state.preview){previewContainer.html(newMarkdownDoc);this.previewCodeHighlight();if(settings.toc){var tocContainer=settings.tocContainer===""?previewContainer:$(settings.tocContainer);var tocMenu=tocContainer.find("."+this.classPrefix+"toc-menu");tocContainer.attr("previewContainer",settings.tocContainer===""?"true":"false");if(settings.tocContainer!==""&&tocMenu.length>0){tocMenu.remove()}editormd.markdownToCRenderer(markdownToC,tocContainer,settings.tocDropdown,settings.tocStartLevel);if(settings.tocDropdown||tocContainer.find("."+this.classPrefix+"toc-menu").length>0){editormd.tocDropdownMenu(tocContainer,settings.tocTitle!==""?settings.tocTitle:this.lang.tocTitle)}if(settings.tocContainer!==""){previewContainer.find(".markdown-toc").css("border","none")}}if(settings.tex){if(!editormd.kaTeXLoaded&&settings.autoLoadModules){editormd.loadKaTeX(function(){editormd.$katex=katex;editormd.kaTeXLoaded=true;_this.katexRender()})}else{editormd.$katex=katex;this.katexRender()}}if(settings.mindMap){setTimeout(function(){_this.mindmapRender()},10)}if(settings.flowChart||settings.sequenceDiagram||settings.mermaid){flowchartTimer=setTimeout(function(){clearTimeout(flowchartTimer);_this.flowChartAndSequenceDiagramRender();flowchartTimer=null},10)}if(state.loaded){$.proxy(settings.onchange,this)()}}return this},focus:function(){this.cm.focus();return this},setCursor:function(cursor){this.cm.setCursor(cursor);return this},getCursor:function(){return this.cm.getCursor()},setSelection:function(from,to){this.cm.setSelection(from,to);return this},getSelection:function(){return this.cm.getSelection()},setSelections:function(ranges){this.cm.setSelections(ranges);return this},getSelections:function(){return this.cm.getSelections()},replaceSelection:function(value){this.cm.replaceSelection(value);return this},insertValue:function(value){this.replaceSelection(value);return this},appendMarkdown:function(md){var settings=this.settings;var cm=this.cm;cm.setValue(cm.getValue()+md);return this},setMarkdown:function(md){this.cm.setValue(md||this.settings.markdown);return this},getMarkdown:function(){return this.cm.getValue()},getValue:function(){return this.cm.getValue()},setValue:function(value){this.cm.setValue(value);return this},clear:function(){this.cm.setValue("");return this},getHTML:function(){if(!this.settings.saveHTMLToTextarea){alert("Error: settings.saveHTMLToTextarea == false");return false}return this.htmlTextarea.val()},getTextareaSavedHTML:function(){return this.getHTML()},getPreviewedHTML:function(){if(!this.settings.watch){alert("Error: settings.watch == false");return false}return this.previewContainer.html()},watch:function(callback){var settings=this.settings;if($.inArray(settings.mode,["gfm","markdown"])<0){return this}this.state.watching=settings.watch=true;this.preview.show();if(this.toolbar){var watchIcon=settings.toolbarIconsClass.watch;var unWatchIcon=settings.toolbarIconsClass.unwatch;var icon=this.toolbar.find(".fa[name=watch]");icon.parent().attr("title",settings.lang.toolbar.watch);icon.removeClass(unWatchIcon).addClass(watchIcon)}this.codeMirror.css("border-right","1px solid #ddd").width(this.editor.width()/2);timer=0;this.save().resize();if(!settings.onwatch){settings.onwatch=callback||function(){}}$.proxy(settings.onwatch,this)();return this},unwatch:function(callback){var settings=this.settings;this.state.watching=settings.watch=false;this.preview.hide();if(this.toolbar){var watchIcon=settings.toolbarIconsClass.watch;var unWatchIcon=settings.toolbarIconsClass.unwatch;var icon=this.toolbar.find(".fa[name=watch]");icon.parent().attr("title",settings.lang.toolbar.unwatch);icon.removeClass(watchIcon).addClass(unWatchIcon)}this.codeMirror.css("border-right","none").width(this.editor.width());this.resize();if(!settings.onunwatch){settings.onunwatch=callback||function(){}}$.proxy(settings.onunwatch,this)();return this},show:function(callback){callback=callback||function(){};var _this=this;this.editor.show(0,function(){$.proxy(callback,_this)()});return this},hide:function(callback){callback=callback||function(){};var _this=this;this.editor.hide(0,function(){$.proxy(callback,_this)()});return this},previewing:function(){var _this=this;var editor=this.editor;var preview=this.preview;var toolbar=this.toolbar;var settings=this.settings;var codeMirror=this.codeMirror;var previewContainer=this.previewContainer;if($.inArray(settings.mode,["gfm","markdown"])<0){return this}if(settings.toolbar&&toolbar){toolbar.toggle();toolbar.find(".fa[name=preview]").toggleClass("active")}codeMirror.toggle();var escHandle=function(event){if(event.shiftKey&&event.keyCode===27){_this.previewed()}};if(codeMirror.css("display")==="none"){this.state.preview=true;if(this.state.fullscreen){preview.css("background","#fff")}editor.find("."+this.classPrefix+"preview-close-btn").show().bind(editormd.mouseOrTouch("click","touchend"),function(){_this.previewed()});if(!settings.watch){this.save()}else{previewContainer.css("padding","")}previewContainer.addClass(this.classPrefix+"preview-active");preview.show().css({position:"",top:0,width:editor.width(),height:settings.autoHeight&&!this.state.fullscreen?"auto":editor.height()});if(this.state.loaded){$.proxy(settings.onpreviewing,this)()}$(window).bind("keyup",escHandle)}else{$(window).unbind("keyup",escHandle);this.previewed()}},previewed:function(){var editor=this.editor;var preview=this.preview;var toolbar=this.toolbar;var settings=this.settings;var previewContainer=this.previewContainer;var previewCloseBtn=editor.find("."+this.classPrefix+"preview-close-btn");this.state.preview=false;this.codeMirror.show();if(settings.toolbar){toolbar.show()}preview[settings.watch?"show":"hide"]();previewCloseBtn.hide().unbind(editormd.mouseOrTouch("click","touchend"));previewContainer.removeClass(this.classPrefix+"preview-active");if(settings.watch){previewContainer.css("padding","20px")}preview.css({background:null,position:"absolute",width:editor.width()/2,height:settings.autoHeight&&!this.state.fullscreen?"auto":editor.height()-toolbar.height(),top:settings.toolbar?toolbar.height():0});if(this.state.loaded){$.proxy(settings.onpreviewed,this)()}return this},fullscreen:function(){var _this=this;var state=this.state;var editor=this.editor;var preview=this.preview;var toolbar=this.toolbar;var settings=this.settings;var fullscreenClass=this.classPrefix+"fullscreen";if(toolbar){toolbar.find(".fa[name=fullscreen]").parent().toggleClass("active")}var escHandle=function(event){if(!event.shiftKey&&event.keyCode===27){if(state.fullscreen){_this.fullscreenExit()}}};if(!editor.hasClass(fullscreenClass)){state.fullscreen=true;$("html,body").css("overflow","hidden");editor.css({width:$(window).width(),height:$(window).height()}).addClass(fullscreenClass);this.resize();$.proxy(settings.onfullscreen,this)();$(window).bind("keyup",escHandle)}else{$(window).unbind("keyup",escHandle);this.fullscreenExit()}return this},fullscreenExit:function(){var editor=this.editor;var settings=this.settings;var toolbar=this.toolbar;var fullscreenClass=this.classPrefix+"fullscreen";this.state.fullscreen=false;if(toolbar){toolbar.find(".fa[name=fullscreen]").parent().removeClass("active")}$("html,body").css("overflow","");editor.css({width:editor.data("oldWidth"),height:editor.data("oldHeight")}).removeClass(fullscreenClass);this.resize();$.proxy(settings.onfullscreenExit,this)();return this},executePlugin:function(name,path){var _this=this;var cm=this.cm;var settings=this.settings;path=settings.pluginPath+path;if(typeof define==="function"){if(typeof this[name]==="undefined"){alert("Error: "+name+" plugin is not found, you are not load this plugin.");return this}this[name](cm);return this}if($.inArray(path,editormd.loadFiles.plugin)<0){editormd.loadPlugin(path,function(){editormd.loadPlugins[name]=_this[name];_this[name](cm)})}else{$.proxy(editormd.loadPlugins[name],this)(cm)}return this},search:function(command){var settings=this.settings;if(!settings.searchReplace){alert("Error: settings.searchReplace == false");return this}if(!settings.readOnly){this.cm.execCommand(command||"find")}return this},searchReplace:function(){this.search("replace");return this},searchReplaceAll:function(){this.search("replaceAll");return this}};editormd.fn.init.prototype=editormd.fn;editormd.dialogLockScreen=function(){var settings=this.settings||{dialogLockScreen:true};if(settings.dialogLockScreen){$("html,body").css("overflow","hidden");this.resize()}};editormd.dialogShowMask=function(dialog){var editor=this.editor;var settings=this.settings||{dialogShowMask:true};dialog.css({top:($(window).height()-dialog.height())/2+"px",left:($(window).width()-dialog.width())/2+"px"});if(settings.dialogShowMask){editor.children("."+this.classPrefix+"mask").css("z-index",parseInt(dialog.css("z-index"))-1).show()}};editormd.toolbarHandlers={undo:function(){this.cm.undo()},redo:function(){this.cm.redo()},bold:function(){var cm=this.cm;var cursor=cm.getCursor();var selection=cm.getSelection();cm.replaceSelection("**"+selection+"**");if(selection===""){cm.setCursor(cursor.line,cursor.ch+2)}},del:function(){var cm=this.cm;var cursor=cm.getCursor();var selection=cm.getSelection();cm.replaceSelection("~~"+selection+"~~");if(selection===""){cm.setCursor(cursor.line,cursor.ch+2)}},italic:function(){var cm=this.cm;var cursor=cm.getCursor();var selection=cm.getSelection();cm.replaceSelection("*"+selection+"*");if(selection===""){cm.setCursor(cursor.line,cursor.ch+1)}},quote:function(){var cm=this.cm;var cursor=cm.getCursor();var selection=cm.getSelection();if(cursor.ch!==0){cm.setCursor(cursor.line,0);cm.replaceSelection("> "+selection);cm.setCursor(cursor.line,cursor.ch+2)}else{cm.replaceSelection("> "+selection)}},ucfirst:function(){var cm=this.cm;var selection=cm.getSelection();var selections=cm.listSelections();cm.replaceSelection(editormd.firstUpperCase(selection));cm.setSelections(selections)},ucwords:function(){var cm=this.cm;var selection=cm.getSelection();var selections=cm.listSelections();cm.replaceSelection(editormd.wordsFirstUpperCase(selection));cm.setSelections(selections)},uppercase:function(){var cm=this.cm;var selection=cm.getSelection();var selections=cm.listSelections();cm.replaceSelection(selection.toUpperCase());cm.setSelections(selections)},lowercase:function(){var cm=this.cm;var cursor=cm.getCursor();var selection=cm.getSelection();var selections=cm.listSelections();cm.replaceSelection(selection.toLowerCase());cm.setSelections(selections)},h1:function(){var cm=this.cm;var cursor=cm.getCursor();var selection=cm.getLine(cursor.line);var patt1=new RegExp("^#{1}[ ]");var patt2=new RegExp("^#{1,6}[ ]");if(patt1.test(selection)===true){selection=selection.replace(/^#{1}[ ]/,"");cm.setSelection({line:cursor.line,ch:0},{line:cursor.line+1,ch:0});cm.replaceSelection(selection+"\n");cm.setCursor(cursor.line,cursor.ch-2)}else if(patt2.test(selection)===true){selection=selection.replace(/^#{1,6}[ ]/,"");cm.setSelection({line:cursor.line,ch:0},{line:cursor.line+1,ch:0});cm.replaceSelection("# "+selection+"\n");cm.setCursor(cursor.line,cursor.ch+2)}else{cm.setSelection({line:cursor.line,ch:0},{line:cursor.line+1,ch:0});cm.replaceSelection("# "+selection+"\n");cm.setCursor(cursor.line,cursor.ch+2)}},h2:function(){var cm=this.cm;var cursor=cm.getCursor();var selection=cm.getLine(cursor.line);var patt1=new RegExp("^#{2}[ ]");var patt2=new RegExp("^#{1,6}[ ]");if(patt1.test(selection)===true){selection=selection.replace(/^#{2}[ ]/,"");cm.setSelection({line:cursor.line,ch:0},{line:cursor.line+1,ch:0});cm.replaceSelection(selection+"\n");cm.setCursor(cursor.line,cursor.ch-3)}else if(patt2.test(selection)===true){selection=selection.replace(/^#{1,6}[ ]/,"");cm.setSelection({line:cursor.line,ch:0},{line:cursor.line+1,ch:0});cm.replaceSelection("## "+selection+"\n");cm.setCursor(cursor.line,cursor.ch+3)}else{cm.setSelection({line:cursor.line,ch:0},{line:cursor.line+1,ch:0});cm.replaceSelection("## "+selection+"\n");cm.setCursor(cursor.line,cursor.ch+3)}},h3:function(){var cm=this.cm;var cursor=cm.getCursor();var selection=cm.getLine(cursor.line);var patt1=new RegExp("^#{3}[ ]");var patt2=new RegExp("^#{1,6}[ ]");if(patt1.test(selection)===true){selection=selection.replace(/^#{3}[ ]/,"");cm.setSelection({line:cursor.line,ch:0},{line:cursor.line+1,ch:0});cm.replaceSelection(selection+"\n");cm.setCursor(cursor.line,cursor.ch-4)}else if(patt2.test(selection)===true){selection=selection.replace(/^#{1,6}[ ]/,"");cm.setSelection({line:cursor.line,ch:0},{line:cursor.line+1,ch:0});cm.replaceSelection("### "+selection+"\n");cm.setCursor(cursor.line,cursor.ch+4)}else{cm.setSelection({line:cursor.line,ch:0},{line:cursor.line+1,ch:0});cm.replaceSelection("### "+selection+"\n");cm.setCursor(cursor.line,cursor.ch+4)}},h4:function(){var cm=this.cm;var cursor=cm.getCursor();var selection=cm.getLine(cursor.line);var patt1=new RegExp("^#{4}[ ]");var patt2=new RegExp("^#{1,6}[ ]");if(patt1.test(selection)===true){selection=selection.replace(/^#{4}[ ]/,"");cm.setSelection({line:cursor.line,ch:0},{line:cursor.line+1,ch:0});cm.replaceSelection(selection+"\n");cm.setCursor(cursor.line,cursor.ch-5)}else if(patt2.test(selection)===true){selection=selection.replace(/^#{1,6}[ ]/,"");cm.setSelection({line:cursor.line,ch:0},{line:cursor.line+1,ch:0});cm.replaceSelection("#### "+selection+"\n");cm.setCursor(cursor.line,cursor.ch+5)}else{cm.setSelection({line:cursor.line,ch:0},{line:cursor.line+1,ch:0});cm.replaceSelection("#### "+selection+"\n");cm.setCursor(cursor.line,cursor.ch+5)}},h5:function(){var cm=this.cm;var cursor=cm.getCursor();var selection=cm.getLine(cursor.line);var patt1=new RegExp("^#{5}[ ]");var patt2=new RegExp("^#{1,6}[ ]");if(patt1.test(selection)===true){selection=selection.replace(/^#{5}[ ]/,"");cm.setSelection({line:cursor.line,ch:0},{line:cursor.line+1,ch:0});cm.replaceSelection(selection+"\n");cm.setCursor(cursor.line,cursor.ch-6)}else if(patt2.test(selection)===true){selection=selection.replace(/^#{1,6}[ ]/,"");cm.setSelection({line:cursor.line,ch:0},{line:cursor.line+1,ch:0});cm.replaceSelection("##### "+selection+"\n");cm.setCursor(cursor.line,cursor.ch+6)}else{cm.setSelection({line:cursor.line,ch:0},{line:cursor.line+1,ch:0});cm.replaceSelection("##### "+selection+"\n");cm.setCursor(cursor.line,cursor.ch+6)}},h6:function(){var cm=this.cm;var cursor=cm.getCursor();var selection=cm.getLine(cursor.line);var patt1=new RegExp("^#{6}[ ]");var patt2=new RegExp("^#{1,6}[ ]");if(patt1.test(selection)===true){selection=selection.replace(/^#{6}[ ]/,"");cm.setSelection({line:cursor.line,ch:0},{line:cursor.line+1,ch:0});cm.replaceSelection(selection+"\n");cm.setCursor(cursor.line,cursor.ch-7)}else if(patt2.test(selection)===true){selection=selection.replace(/^#{1,6}[ ]/,"");cm.setSelection({line:cursor.line,ch:0},{line:cursor.line+1,ch:0});cm.replaceSelection("###### "+selection+"\n");cm.setCursor(cursor.line,cursor.ch+7)}else{cm.setSelection({line:cursor.line,ch:0},{line:cursor.line+1,ch:0});cm.replaceSelection("###### "+selection+"\n");cm.setCursor(cursor.line,cursor.ch+7)}},"list-ul":function(){var cm=this.cm;var cursor=cm.getCursor();var selection=cm.getSelection();var patt1=new RegExp("^-{1}[ ]");var cnt=0;if(selection===""){cm.setCursor(cursor.line,0);cm.replaceSelection("- "+selection);cm.setCursor(cursor.line,cursor.ch+2)}else{var selectionText=selection.split("\n");for(var i=0,len=selectionText.length;i/i);if(ps!==null){quoteBegin=ps[0];$quote=$quote.substr(quoteBegin.length)}var $class="default";if($quote.indexOf("[info]")===0){$class="info";$quote=$quote.substr(6)}else if($quote.indexOf("[warning]")===0){$class="warning";$quote=$quote.substr(9)}else if($quote.indexOf("[success]")===0){$class="success";$quote=$quote.substr(9)}else if($quote.indexOf("[danger]")===0){$class="danger";$quote=$quote.substr(8)}return'
                        \n'+quoteBegin+$quote+"
                        \n"};markedRenderer.image=function(href,title,text){var attr="";var begin="";var end="";if(href&&href!==""){var a=document.createElement("a");a.href=href;var attrs=a.hash.match(/size=\d+x\d+/i);if(attrs!==null){a.hash=a.hash.replace(attrs[0],"");href=a.href;attrs=attrs[0].replace("size=","").split("x");if(attrs[0]>0){attr+=' width="'+attrs[0]+'"'}if(attrs[1]>0){attr+=' height="'+attrs[1]+'"'}}attrs=a.hash.match(/align=(center|left|right)/i);if(attrs!==null){var hash=a.hash.replace(attrs[0],"");if(hash.indexOf("#&")===0){hash="#"+hash.substr(2)}a.hash=hash;href=a.href;attrs=attrs[0].replace("align=","");end="

                        ";if(attrs==="center"){begin='

                        '}else if(attrs==="left"){begin='

                        '}else if(attrs==="right"){begin='

                        '}}}return begin+''+text+'"+end};markedRenderer.emoji=function(text){text=text.replace(editormd.regexs.emojiDatetime,function($1){return $1.replace(/:/g,":")});var matchs=text.match(emojiReg);if(!matchs||!settings.emoji){return text}for(var i=0,len=matchs.length;i'}}else{var emdlogoMathcs=$1.match(editormdLogoReg);var twemojiMatchs=$1.match(twemojiReg);if(emdlogoMathcs){for(var x=0,len2=emdlogoMathcs.length;x'}}else if(twemojiMatchs){for(var t=0,len3=twemojiMatchs.length;t'}}else{var src=name==="+1"?"plus1":name;src=src==="black_large_square"?"black_square":src;src=src==="moon"?"waxing_gibbous_moon":src;return':'+name+':'}}})}return text};markedRenderer.atLink=function(text){if(atLinkReg.test(text)){if(settings.atLink){text=text.replace(emailReg,function($1,$2,$3,$4){return $1.replace(/@/g,"_#_@_#_")});text=text.replace(atLinkReg,function($1,$2){return''+$1+""}).replace(/_#_@_#_/g,"@")}if(settings.emailLink){text=text.replace(emailLinkReg,function($1,$2,$3,$4,$5){return!$2&&$.inArray($5,"jpg|jpeg|png|gif|webp|ico|icon|pdf".split("|"))<0?''+$1+"":$1})}return text}return text};markedRenderer.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0){return""}}if(href.indexOf("@")===0){return''}var out=''+text.replace(/@/g,"@")+""}if(title){out+=' title="'+title+'"'}out+=">"+text+"";return out};markedRenderer.heading=function(text,level,raw){var linkText=text;var hasLinkReg=/\s*\]*)\>(.*)\<\/a\>\s*/;var getLinkTextReg=/\s*\]+)\>([^\>]*)\<\/a\>\s*/g;if(hasLinkReg.test(text)){var tempText=[];text=text.split(/\]+)\>([^\>]*)\<\/a\>/);for(var i=0,len=text.length;i';headingHTML+='';headingHTML+='';headingHTML+=hasLinkReg?this.atLink(this.emoji(linkText)):this.atLink(this.emoji(text));headingHTML+="";return headingHTML};markedRenderer.pageBreak=function(text){if(pageBreakReg.test(text)&&settings.pageBreak){text='


                        '}return text};markedRenderer.paragraph=function(text){var isTeXInline=/\$\$(.*)\$\$/g.test(text);var isTeXLine=/^\$\$(.*)\$\$$/.test(text);var isTeXAddClass=isTeXLine?' class="'+editormd.classNames.tex+'"':' class="line"';var isToC=settings.tocm?/^(\[TOC\]|\[TOCM\])$/.test(text):/^\[TOC\]$/.test(text);var isToCMenu=/^\[TOCM\]$/.test(text);if(!isTeXLine&&isTeXInline){text=text.replace(/(\$\$([^\$]*)\$\$)+/g,function($1,$2){return''+$2.replace(/\$/g,"")+""})}else{text=isTeXLine?text.replace(/\$/g,""):text}var tocHTML='
                        '+text+"
                        ";return isToC?isToCMenu?'
                        '+tocHTML+"

                        ":tocHTML:pageBreakReg.test(text)?this.pageBreak(text):""+this.atLink(this.emoji(text))+"

                        \n"};markedRenderer.code=function(code,lang,escaped){if(lang==="seq"||lang==="sequence"){return'
                        '+code+"
                        "}else if(lang==="mermaid"){var $chars="ABCDEFGHJKLMNOPQRSTUVWXYZabcdefhijlkmnopqrstuvwxyz012345678";var maxPos=$chars.length;var id="";for(var i=0;i<4;i++){id+=$chars.charAt(Math.floor(Math.random()*maxPos))}return'
                        '+code+"
                        "}else if(lang==="flow"){return'
                        '+code+"
                        "}else if(lang==="math"||lang==="latex"||lang==="katex"){return'

                        '+code+"

                        "}else if(/^mindmap/i.test(lang)){var len=9||32;var $chars="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678";var maxPos=$chars.length;var map_id="";var custom_height;var h=lang.split(">")[1];if(h!=undefined){custom_height=h}else{custom_height=150}for(var i=0;i"+code+""}else{return marked.Renderer.prototype.code.apply(this,arguments)}};markedRenderer.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+this.atLink(this.emoji(content))+"\n"};markedRenderer.listitem=function(text){if(settings.taskList&&/^\s*\[[x\s]\]\s*/.test(text)){text=text.replace(/^\s*\[\s\]\s*/,' ').replace(/^\s*\[x\]\s*/,' ');return'
                      • '+this.atLink(this.emoji(text))+"
                      • "}else{return"
                      • "+this.atLink(this.emoji(text))+"
                      • "}};markedRenderer.checkbox=function(checked){return checked?' ':' '};return markedRenderer};editormd.markdownToCRenderer=function(toc,container,tocDropdown,startLevel){var html="";var lastLevel=0;var classPrefix=this.classPrefix;startLevel=startLevel||1;for(var i=0,len=toc.length;ilastLevel){html+=""}else if(level'+text+"";lastLevel=level}console.log(html);var tocContainer=container.find(".markdown-toc");if(tocContainer.length<1&&container.attr("previewContainer")==="false"){var tocHTML='
                        ';tocHTML=tocDropdown?'
                        '+tocHTML+"
                        ":tocHTML;container.html(tocHTML);tocContainer=container.find(".markdown-toc")}if(tocDropdown){tocContainer.wrap('

                        ')}tocContainer.html('
                          ').children(".markdown-toc-list").html(html.replace(/\r?\n?\\<\/ul\>/g,""));return tocContainer};editormd.tocDropdownMenu=function(container,tocTitle){tocTitle=tocTitle||"Table of Contents";var zindex=400;var tocMenus=container.find("."+this.classPrefix+"toc-menu");tocMenus.each(function(){var $this=$(this);var toc=$this.children(".markdown-toc");var icon='';var btn=''+icon+tocTitle+"";var menu=toc.children("ul");var list=menu.find("li");toc.append(btn);list.first().before("
                        • "+tocTitle+" "+icon+"

                        • ");$this.mouseover(function(){menu.show();list.each(function(){var li=$(this);var ul=li.children("ul");if(ul.html()===""){ul.remove()}if(ul.length>0&&ul.html()!==""){var firstA=li.children("a").first();if(firstA.children(".fa").length<1){firstA.append($(icon).css({float:"right",paddingTop:"4px"}))}}li.mouseover(function(){ul.css("z-index",zindex).show();zindex+=1}).mouseleave(function(){ul.hide()})})}).mouseleave(function(){menu.hide()})});return tocMenus};editormd.filterHTMLTags=function(html,filters){if(typeof html!=="string"){html=new String(html)}if(typeof filters!=="string"){return html}var expression=filters.split("|");var filterTags=expression[0].split(",");var attrs=expression[1];for(var i=0,len=filterTags.length;i]*)>([^>]*)","igm"),"")}if(typeof attrs!=="undefined"){var htmlTagRegex=/\<(\w+)\s*([^\>]*)\>([^\>]*)\<\/(\w+)\>/gi;if(attrs==="*"){html=html.replace(htmlTagRegex,function($1,$2,$3,$4,$5){return"<"+$2+">"+$4+""})}else if(attrs==="on*"){html=html.replace(htmlTagRegex,function($1,$2,$3,$4,$5){var el=$("<"+$2+">"+$4+"");var _attrs=$($1)[0].attributes;var $attrs={};$.each(_attrs,function(i,e){if(e.nodeName!=='"')$attrs[e.nodeName]=e.nodeValue});$.each($attrs,function(i){if(i.indexOf("on")===0){delete $attrs[i]}});el.attr($attrs);var text=typeof el[1]!=="undefined"?$(el[1]).text():"";return el[0].outerHTML+text})}else{html=html.replace(htmlTagRegex,function($1,$2,$3,$4){var filterAttrs=attrs.split(",");var el=$($1);el.html($4);$.each(filterAttrs,function(i){el.attr(filterAttrs[i],null)});return el[0].outerHTML})}}return html};editormd.markdownToHTML=function(id,options){var defaults={gfm:true,toc:true,tocm:false,tocStartLevel:1,tocTitle:"目录",tocDropdown:false,tocContainer:"",markdown:"",markdownSourceCode:false,htmlDecode:false,autoLoadKaTeX:true,pageBreak:true,atLink:true,emailLink:true,tex:false,taskList:false,emoji:false,flowChart:false,sequenceDiagram:false,previewCodeHighlight:true,mermaid:true,mindMap:true};editormd.$marked=marked;var div=$("#"+id);var settings=div.settings=$.extend(true,defaults,options||{});var saveTo=div.find("textarea");if(saveTo.length<1){div.append("");saveTo=div.find("textarea")}var markdownDoc=settings.markdown===""?saveTo.val():settings.markdown;var markdownToC=[];var rendererOptions={toc:settings.toc,tocm:settings.tocm,tocStartLevel:settings.tocStartLevel,taskList:settings.taskList,emoji:settings.emoji,tex:settings.tex,pageBreak:settings.pageBreak,atLink:settings.atLink,emailLink:settings.emailLink,flowChart:settings.flowChart,sequenceDiagram:settings.sequenceDiagram,mermaid:settings.mermaid,mindMap:settings.mindMap,previewCodeHighlight:settings.previewCodeHighlight};var markedOptions={renderer:editormd.markedRenderer(markdownToC,rendererOptions),gfm:settings.gfm,tables:true,breaks:true,pedantic:false,sanitize:settings.htmlDecode?false:true,smartLists:true,smartypants:true};markdownDoc=new String(markdownDoc);var markdownParsed=marked(markdownDoc,markedOptions);markdownParsed=editormd.filterHTMLTags(markdownParsed,settings.htmlDecode);if(settings.markdownSourceCode){saveTo.text(markdownDoc)}else{saveTo.remove()}div.addClass("markdown-body "+this.classPrefix+"html-preview").append(markdownParsed);var tocContainer=settings.tocContainer!==""?$(settings.tocContainer):div;if(settings.tocContainer!==""){tocContainer.attr("previewContainer",false)}if(settings.toc){div.tocContainer=this.markdownToCRenderer(markdownToC,tocContainer,settings.tocDropdown,settings.tocStartLevel);if(settings.tocDropdown||div.find("."+this.classPrefix+"toc-menu").length>0){this.tocDropdownMenu(div,settings.tocTitle)}if(settings.tocContainer!==""){div.find(".editormd-toc-menu, .editormd-markdown-toc").remove()}}if(settings.previewCodeHighlight){div.find("pre").addClass("prettyprint");prettyPrint()}if(!editormd.isIE8){if(settings.flowChart){div.find(".flowchart").flowChart()}if(settings.sequenceDiagram){div.find(".sequence-diagram").sequenceDiagram({theme:"simple"})}if(settings.mermaid){window.mermaid.init(void 0,div.find(".lang-mermaid"))}}if(settings.tex){var katexHandle=function(){div.find("."+editormd.classNames.tex).each(function(){var tex=$(this);katex.render(tex.html().replace(/</g,"<").replace(/>/g,">"),tex[0]);tex.find(".katex").css("font-size","1.6em")})};if(settings.autoLoadKaTeX&&!editormd.$katex&&!editormd.kaTeXLoaded){this.loadKaTeX(function(){editormd.$katex=katex;editormd.kaTeXLoaded=true;katexHandle()})}else{katexHandle()}}if(settings.mindMap){var mindmapHandle=function(){div.find(".mindmap").each(function(){var mmap=$(this);var md_data=window.markmap.transform(mmap.text().trim());window.markmap.markmap("svg#"+this.id,md_data)})};mindmapHandle()}div.getMarkdown=function(){return saveTo.val()};return div};editormd.themes=["default","dark"];editormd.previewThemes=["default","dark"];editormd.editorThemes=["default","3024-day","3024-night","ambiance","ambiance-mobile","base16-dark","base16-light","blackboard","cobalt","eclipse","elegant","erlang-dark","lesser-dark","mbo","mdn-like","midnight","monokai","neat","neo","night","paraiso-dark","paraiso-light","pastel-on-dark","rubyblue","solarized","the-matrix","tomorrow-night-eighties","twilight","vibrant-ink","xq-dark","xq-light"];editormd.loadPlugins={};editormd.loadFiles={js:[],css:[],plugin:[]};editormd.loadPlugin=function(fileName,callback,into){callback=callback||function(){};this.loadScript(fileName,function(){editormd.loadFiles.plugin.push(fileName);callback()},into)};editormd.loadCSS=function(fileName,callback,into){into=into||"head";callback=callback||function(){};var css=document.createElement("link");css.type="text/css";css.rel="stylesheet";css.onload=css.onreadystatechange=function(){editormd.loadFiles.css.push(fileName);callback()};css.href=fileName+".css";if(into==="head"){document.getElementsByTagName("head")[0].appendChild(css)}else{document.body.appendChild(css)}};editormd.isIE=navigator.appName=="Microsoft Internet Explorer";editormd.isIE8=editormd.isIE&&navigator.appVersion.match(/8./i)=="8.";editormd.loadScript=function(fileName,callback,into){into=into||"head";callback=callback||function(){};var script=null;script=document.createElement("script");script.id=fileName.replace(/[\./]+/g,"-");script.type="text/javascript";script.src=fileName+".js";if(editormd.isIE8){script.onreadystatechange=function(){if(script.readyState){if(script.readyState==="loaded"||script.readyState==="complete"){script.onreadystatechange=null;editormd.loadFiles.js.push(fileName);callback()}}}}else{script.onload=function(){editormd.loadFiles.js.push(fileName);callback()}}if(into==="head"){document.getElementsByTagName("head")[0].appendChild(script)}else{document.body.appendChild(script)}};editormd.katexURL={css:"//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min",js:"//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min"};editormd.kaTeXLoaded=false;editormd.loadKaTeX=function(callback){editormd.loadCSS(editormd.katexURL.css,function(){editormd.loadScript(editormd.katexURL.js,callback||function(){})})};editormd.lockScreen=function(lock){$("html,body").css("overflow",lock?"hidden":"")};editormd.createDialog=function(options){var defaults={name:"",width:420,height:240,title:"",drag:true,closed:true,content:"",mask:true,maskStyle:{backgroundColor:"#fff",opacity:.1},lockScreen:true,footer:true,buttons:false};options=$.extend(true,defaults,options);var $this=this;var editor=this.editor;var classPrefix=editormd.classPrefix;var guid=(new Date).getTime();var dialogName=options.name===""?classPrefix+"dialog-"+guid:options.name;var mouseOrTouch=editormd.mouseOrTouch;var html='
                          ';if(options.title!==""){html+='
                          ";html+=''+options.title+"";html+="
                          "}if(options.closed){html+=''}html+='
                          '+options.content;if(options.footer||typeof options.footer==="string"){html+='"}html+="
                          ";html+='
                          ';html+='
                          ';html+="
                          ";editor.append(html);var dialog=editor.find("."+dialogName);dialog.lockScreen=function(lock){if(options.lockScreen){$("html,body").css("overflow",lock?"hidden":"");$this.resize()}return dialog};dialog.showMask=function(){if(options.mask){editor.find("."+classPrefix+"mask").css(options.maskStyle).css("z-index",editormd.dialogZindex-1).show()}return dialog};dialog.hideMask=function(){if(options.mask){editor.find("."+classPrefix+"mask").hide()}return dialog};dialog.loading=function(show){var loading=dialog.find("."+classPrefix+"dialog-mask");loading[show?"show":"hide"]();return dialog};dialog.lockScreen(true).showMask();dialog.show().css({zIndex:editormd.dialogZindex,border:editormd.isIE8?"1px solid #ddd":"",width:typeof options.width==="number"?options.width+"px":options.width,height:typeof options.height==="number"?options.height+"px":options.height});var dialogPosition=function(){dialog.css({top:($(window).height()-dialog.height())/2+"px",left:($(window).width()-dialog.width())/2+"px"})};dialogPosition();$(window).resize(dialogPosition);dialog.children("."+classPrefix+"dialog-close").bind(mouseOrTouch("click","touchend"),function(){dialog.hide().lockScreen(false).hideMask()});if(typeof options.buttons==="object"){var footer=dialog.footer=dialog.find("."+classPrefix+"dialog-footer");for(var key in options.buttons){var btn=options.buttons[key];var btnClassName=classPrefix+key+"-btn";footer.append('");btn[1]=$.proxy(btn[1],dialog);footer.children("."+btnClassName).bind(mouseOrTouch("click","touchend"),btn[1])}}if(options.title!==""&&options.drag){var posX,posY;var dialogHeader=dialog.children("."+classPrefix+"dialog-header");if(!options.mask){dialogHeader.bind(mouseOrTouch("click","touchend"),function(){editormd.dialogZindex+=2;dialog.css("z-index",editormd.dialogZindex)})}dialogHeader.mousedown(function(e){e=e||window.event;posX=e.clientX-parseInt(dialog[0].style.left);posY=e.clientY-parseInt(dialog[0].style.top);document.onmousemove=moveAction});var userCanSelect=function(obj){obj.removeClass(classPrefix+"user-unselect").off("selectstart")};var userUnselect=function(obj){obj.addClass(classPrefix+"user-unselect").on("selectstart",function(event){return false})};var moveAction=function(e){e=e||window.event;var left,top,nowLeft=parseInt(dialog[0].style.left),nowTop=parseInt(dialog[0].style.top);if(nowLeft>=0){if(nowLeft+dialog.width()<=$(window).width()){left=e.clientX-posX}else{left=$(window).width()-dialog.width();document.onmousemove=null}}else{left=0;document.onmousemove=null}if(nowTop>=0){top=e.clientY-posY}else{top=0;document.onmousemove=null}document.onselectstart=function(){return false};userUnselect($("body"));userUnselect(dialog);dialog[0].style.left=left+"px";dialog[0].style.top=top+"px"};document.onmouseup=function(){userCanSelect($("body"));userCanSelect(dialog);document.onselectstart=null;document.onmousemove=null};dialogHeader.touchDraggable=function(){var offset=null;var start=function(e){var orig=e.originalEvent;var pos=$(this).parent().position();offset={x:orig.changedTouches[0].pageX-pos.left,y:orig.changedTouches[0].pageY-pos.top}};var move=function(e){e.preventDefault();var orig=e.originalEvent;$(this).parent().css({top:orig.changedTouches[0].pageY-offset.y,left:orig.changedTouches[0].pageX-offset.x})};this.bind("touchstart",start).bind("touchmove",move)};dialogHeader.touchDraggable()}editormd.dialogZindex+=2;return dialog};editormd.mouseOrTouch=function(mouseEventType,touchEventType){mouseEventType=mouseEventType||"click";touchEventType=touchEventType||"touchend";var eventType=mouseEventType;try{document.createEvent("TouchEvent");eventType=touchEventType}catch(e){}return eventType};editormd.dateFormat=function(format){format=format||"";var addZero=function(d){return d<10?"0"+d:d};var date=new Date;var year=date.getFullYear();var year2=year.toString().slice(2,4);var month=addZero(date.getMonth()+1);var day=addZero(date.getDate());var weekDay=date.getDay();var hour=addZero(date.getHours());var min=addZero(date.getMinutes());var second=addZero(date.getSeconds());var ms=addZero(date.getMilliseconds());var datefmt="";var ymd=year2+"-"+month+"-"+day;var fymd=year+"-"+month+"-"+day;var hms=hour+":"+min+":"+second;switch(format){case"UNIX Time":datefmt=date.getTime();break;case"UTC":datefmt=date.toUTCString();break;case"yy":datefmt=year2;break;case"year":case"yyyy":datefmt=year;break;case"month":case"mm":datefmt=month;break;case"cn-week-day":case"cn-wd":var cnWeekDays=["日","一","二","三","四","五","六"];datefmt="星期"+cnWeekDays[weekDay];break;case"week-day":case"wd":var weekDays=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];datefmt=weekDays[weekDay];break;case"day":case"dd":datefmt=day;break;case"hour":case"hh":datefmt=hour;break;case"min":case"ii":datefmt=min;break;case"second":case"ss":datefmt=second;break;case"ms":datefmt=ms;break;case"yy-mm-dd":datefmt=ymd;break;case"yyyy-mm-dd":datefmt=fymd;break;case"yyyy-mm-dd h:i:s ms":case"full + ms":datefmt=fymd+" "+hms+" "+ms;break;case"full":case"yyyy-mm-dd h:i:s":default:datefmt=fymd+" "+hms;break}return datefmt};editormd.getLine=function(n){return this.cm.getLine(n)};return editormd}); \ No newline at end of file +/*! Editor.md v1.7.17 | editormd.min.js | Open source online markdown editor. | MIT License | By: IBM Skills Network | https://github.com/ibm-skills-network/editor.md | 2024-03-27 */ +!function(e){"use strict";"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?module.exports=e:"function"==typeof define?define.amd||define(["jquery"],e):window.editormd=e()}(function(){"use strict";var C,c,h,e,d,v="undefined"!=typeof jQuery?jQuery:Zepto;if(void 0!==v)return(C=function(e,t,i){return new C.fn.init(e,t,i)}).title=C.$name="Editor.md",C.version="1.7.17",C.homePage="https://pandao.github.io/editor.md/",C.classPrefix="editormd-",C.toolbarModes={full:["undo","redo","|","bold","del","italic","quote","ucwords","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","link","reference-link","image","code","preformatted-text","code-block","table","datetime","emoji","html-entities","pagebreak","|","goto-line","watch","preview","fullscreen","clear","search","|","help","changetheme","info"],simple:["undo","redo","|","bold","del","italic","quote","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","watch","preview","fullscreen","|","help","changetheme","info"],mini:["undo","redo","|","watch","preview","|","help","changetheme","info"]},C.defaults={debug:!1,mode:"gfm",name:"",value:"",theme:"",editorTheme:"default",previewTheme:"",markdown:void 0,appendMarkdown:"",width:"100%",height:"100%",path:"./lib/",pluginPath:"",customPluginPath:"",delay:300,autoLoadModules:!0,watch:!0,placeholder:"Enjoy Markdown! coding now...",gotoLine:!0,codeFold:!1,autoHeight:!1,autoFocus:!0,autoCloseTags:!0,searchReplace:!0,syncScrolling:!0,readOnly:!1,tabSize:4,indentUnit:4,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,showTrailingSpace:!0,matchBrackets:!0,indentWithTabs:!0,styleSelectedText:!0,matchWordHighlight:!0,styleActiveLine:!0,dialogLockScreen:!0,dialogShowMask:!0,dialogDraggable:!0,dialogMaskBgColor:"#fff",dialogMaskOpacity:.1,fontSize:"13px",saveHTMLToTextarea:!1,disabledKeyMaps:[],onload:function(){},onresize:function(){},onchange:function(){},onwatch:null,onunwatch:null,onpreviewing:function(){},onCmChange:null,fixCodeBlocks:function(){},onpreviewed:function(){},onfullscreen:function(){},onfullscreenExit:function(){},onscroll:function(){},onpreviewscroll:function(){},imageUpload:!1,imageFormats:["jpg","jpeg","gif","png","bmp","webp"],imageUploadURL:"",crossDomainUpload:!1,uploadCallbackURL:"",toc:!0,tocm:!1,tocTitle:"",tocDropdown:!1,tocContainer:"",tocStartLevel:1,htmlDecode:!1,pageBreak:!0,atLink:!0,emailLink:!0,taskList:!1,emoji:!0,tex:!1,flowChart:!1,sequenceDiagram:!1,mermaid:!0,mindMap:!0,previewCodeHighlight:!0,toolbar:!0,toolbarAutoFixed:!0,titlebar:{left:{},center:{},right:{}},toolbarIcons:"full",toolbarTitles:{},toolbarHandlers:{ucwords:function(){return C.toolbarHandlers.ucwords},lowercase:function(){return C.toolbarHandlers.lowercase}},toolbarCustomIcons:{lowercase:'a',ucwords:'Aa',fontcase:'Aa'},toolbarIconsClass:{undo:"fa-undo",redo:"fa-repeat",bold:"fa-bold",del:"fa-strikethrough",italic:"fa-italic",quote:"fa-quote-left",uppercase:"fa-font",heading:"fa-header",h1:C.classPrefix+"bold",h2:C.classPrefix+"bold",h3:C.classPrefix+"bold",h4:C.classPrefix+"bold",h5:C.classPrefix+"bold",h6:C.classPrefix+"bold","list-ul":"fa-list-ul","list-ol":"fa-list-ol",hr:"fa-minus",link:"fa-link","reference-link":"fa-anchor",image:"fa-picture-o",code:"fa-code","preformatted-text":"fa-file-code-o","code-block":"fa-file-code-o",table:"fa-table",datetime:"fa-clock-o",emoji:"fa-smile-o","html-entities":"fa-copyright",pagebreak:"fa-newspaper-o","goto-line":"fa-terminal",watch:"fa-eye-slash",unwatch:"fa-eye",preview:"fa-desktop",search:"fa-search",fullscreen:"fa-arrows-alt",clear:"fa-eraser",help:"fa-question-circle",changetheme:"fa-info-circle",info:"fa-info-circle"},toolbarIconTexts:{ucwords:"Capitalize",uppercase:"Uppercase",lowercase:"Lowercase",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6"},lang:{name:"zh-cn",description:"开源在线Markdown编辑器
                          Open source online Markdown editor.",tocTitle:"目录",toolbar:{undo:"撤销(Ctrl+Z)",redo:"重做(Ctrl+Y)",bold:"粗体",del:"删除线",italic:"斜体",quote:"引用",ucwords:"将每个单词首字母转成大写",uppercase:"将所选转换成大写",lowercase:"将所选转换成小写",h1:"标题1",h2:"标题2",h3:"标题3",h4:"标题4",h5:"标题5",h6:"标题6","list-ul":"无序列表","list-ol":"有序列表",hr:"横线",link:"链接","reference-link":"引用链接",image:"添加图片",code:"行内代码","preformatted-text":"预格式文本 / 代码块(缩进风格)","code-block":"代码块(多语言风格)",table:"添加表格",datetime:"日期时间",emoji:"Emoji表情","html-entities":"HTML实体字符",pagebreak:"插入分页符","goto-line":"跳转到行",watch:"关闭实时预览",unwatch:"开启实时预览",preview:"全窗口预览HTML(按 Shift + ESC还原)",fullscreen:"全屏(按ESC还原)",clear:"清空",search:"搜索",help:"使用帮助",changetheme:"切换编辑主题",info:"关于"+C.title},buttons:{enter:"确定",cancel:"取消",close:"关闭"},dialog:{link:{title:"添加链接",url:"链接地址",urlTitle:"链接标题",urlEmpty:"错误:请填写链接地址。"},referenceLink:{title:"添加引用链接",name:"引用名称",url:"链接地址",urlId:"链接ID",urlTitle:"链接标题",nameEmpty:"错误:引用链接的名称不能为空。",idEmpty:"错误:请填写引用链接的ID。",urlEmpty:"错误:请填写引用链接的URL地址。"},image:{title:"添加图片",url:"图片地址",link:"图片链接",alt:"图片描述",uploadButton:"本地上传",imageURLEmpty:"错误:图片地址不能为空。",uploadFileEmpty:"错误:上传的图片不能为空。",formatNotAllowed:"错误:只允许上传图片文件,允许上传的图片文件格式有:"},preformattedText:{title:"添加预格式文本或代码块",emptyAlert:"错误:请填写预格式文本或代码的内容。"},codeBlock:{title:"添加代码块",selectLabel:"代码语言:",selectDefaultText:"请选择代码语言",otherLanguage:"其他语言",unselectedLanguageAlert:"错误:请选择代码所属的语言类型。",codeEmptyAlert:"错误:请填写代码内容。"},htmlEntities:{title:"HTML 实体字符"},help:{title:"使用帮助"},changetheme:{title:"切换编辑主题"}}}},C.classNames={tex:C.classPrefix+"tex",texDisplay:C.classPrefix+"texDisaply"},C.dialogZindex=99999,C.$katex=null,C.$marked=null,C.$filterXSS=null,C.$CodeMirror=null,C.$prettyPrint=null,C.prototype=C.fn={state:{watching:!1,loaded:!1,preview:!1,fullscreen:!1},init:function(e,t,i){i="object"==typeof e?e:i||{};var o=this.classPrefix=C.classPrefix,i=this.settings=v.extend(!0,{},C.defaults,i),n=(e="object"==typeof e?i.id:e,this.editor=v("#"+e)),t=(this.id=e,this.author_ide_version=t||n.version,this.lang=i.lang,this.classNames={textarea:{html:o+"html-textarea",markdown:o+"markdown-textarea"}}),r=(i.pluginPath=""===i.pluginPath?i.path+"../plugins/":i.pluginPath,this.state.watching=!!i.watch,n.hasClass("editormd")||n.addClass("editormd"),n.css({width:"number"==typeof i.width?i.width+"px":i.width,height:"number"==typeof i.height?i.height+"px":i.height}),i.autoHeight&&n.css("height","auto"),this.markdownTextarea=n.children("textarea")),e=(r.length<1&&(n.append(""),r=this.markdownTextarea=n.children("textarea")),r.addClass(t.textarea.markdown).attr("placeholder",i.placeholder),void 0!==r.attr("name")&&""!==r.attr("name")||r.attr("name",""!==i.name?i.name:e+"-markdown-doc"),[i.readOnly?"":'',i.saveHTMLToTextarea?'':"",'
                          ','
                          ','
                          '].join("\n"));return n.append(e).addClass(o+"vertical"),""!==i.theme&&n.addClass(o+"theme-"+i.theme),this.mask=n.children("."+o+"mask"),this.containerMask=n.children("."+o+"container-mask"),void 0!==i.markdown&&r.val(i.markdown),""!==i.appendMarkdown&&r.val(r.val()+i.appendMarkdown),this.htmlTextarea=n.children("."+t.textarea.html),this.preview=n.children("."+o+"preview"),this.previewContainer=this.preview.children("."+o+"preview-container"),""!==i.previewTheme&&this.preview.addClass(o+"preview-theme-"+i.previewTheme),"function"==typeof define&&define.amd&&("undefined"!=typeof katex&&(C.$katex=katex),i.searchReplace)&&!i.readOnly&&(C.loadCSS(i.path+"codemirror/addon/dialog/dialog"),C.loadCSS(i.path+"codemirror/addon/search/matchesonscrollbar")),"function"==typeof define&&define.amd||!i.autoLoadModules?("undefined"!=typeof CodeMirror&&(C.$CodeMirror=CodeMirror),"undefined"!=typeof marked&&(C.$marked=marked),this.setCodeMirror().setToolbar().loadedDisplay()):this.loadQueues(),this},loadQueues:function(){function e(){!C.isIE8&&(i.flowChart||i.sequenceDiagram)?C.loadScript(o+"raphael.min",function(){C.loadScript(o+"underscore.min",function(){!i.flowChart&&i.sequenceDiagram?C.loadScript(o+"sequence-diagram.min",function(){t.loadedDisplay()}):i.flowChart&&!i.sequenceDiagram?C.loadScript(o+"flowchart.min",function(){C.loadScript(o+"jquery.flowchart.min",function(){t.loadedDisplay()})}):i.flowChart&&i.sequenceDiagram&&C.loadScript(o+"flowchart.min",function(){C.loadScript(o+"jquery.flowchart.min",function(){C.loadScript(o+"sequence-diagram.min",function(){t.loadedDisplay()})})})})}):t.loadedDisplay()}var t=this,i=this.settings,o=i.path;return C.loadScript(o+"xss",function(){C.$filterXSS=filterXSS}),C.loadCSS(o+"codemirror/codemirror.min"),i.searchReplace&&!i.readOnly&&(C.loadCSS(o+"codemirror/addon/dialog/dialog"),C.loadCSS(o+"codemirror/addon/search/matchesonscrollbar")),i.codeFold&&C.loadCSS(o+"codemirror/addon/fold/foldgutter"),C.loadScript(o+"codemirror/codemirror.min",function(){C.$CodeMirror=CodeMirror,C.loadScript(o+"codemirror/modes.min",function(){C.loadScript(o+"codemirror/addons.min",function(){if(t.setCodeMirror(),"gfm"!==i.mode&&"markdown"!==i.mode)return t.loadedDisplay(),!1;t.setToolbar(),C.loadScript(o+"marked.min",function(){C.$marked=marked,i.highlightStyle||(i.highlightStyle="github"),i.previewCodeHighlight?(C.loadCSS(o+"highlight/styles/"+i.highlightStyle),C.loadScript(o+"highlight/highlight",function(){e()})):e()})})})}),this},setTheme:function(e){var t=this.editor,i=this.settings.theme,o=this.classPrefix+"theme-";return t.removeClass(o+i).addClass(o+e),this.settings.theme=e,this},setEditorTheme:function(e){var t=this.settings;return"default"!==(t.editorTheme=e)&&C.loadCSS(t.path+"codemirror/theme/"+t.editorTheme),this.cm.setOption("theme",e),this},setCodeMirrorTheme:function(e){return this.setEditorTheme(e),this},setPreviewTheme:function(e){var t=this.preview,i=this.settings.previewTheme,o=this.classPrefix+"preview-theme-";return t.removeClass(o+i).addClass(o+e),this.settings.previewTheme=e,this},setCodeMirror:function(){var e=this.settings,t=this.editor,i=("default"!==e.editorTheme&&C.loadCSS(e.path+"codemirror/theme/"+e.editorTheme),{mode:e.mode,theme:e.editorTheme,tabSize:e.tabSize,dragDrop:!1,autofocus:e.autoFocus,autoCloseTags:e.autoCloseTags,readOnly:!!e.readOnly&&"nocursor",indentUnit:e.indentUnit,lineNumbers:e.lineNumbers,lineWrapping:e.lineWrapping,extraKeys:{"Ctrl-Q":function(e){e.foldCode(e.getCursor())}},foldGutter:e.codeFold,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],matchBrackets:e.matchBrackets,indentWithTabs:e.indentWithTabs,styleActiveLine:e.styleActiveLine,styleSelectedText:e.styleSelectedText,autoCloseBrackets:e.autoCloseBrackets,showTrailingSpace:e.showTrailingSpace,highlightSelectionMatches:!!e.matchWordHighlight&&{showToken:"onselected"!==e.matchWordHighlight&&/\w/}});return this.codeEditor=this.cm=C.$CodeMirror.fromTextArea(this.markdownTextarea[0],i),this.codeMirror=this.cmElement=t.children(".CodeMirror"),""!==e.value&&this.cm.setValue(e.value),this.codeMirror.css({fontSize:e.fontSize,width:e.watch?"50%":"100%"}),e.autoHeight&&(this.codeMirror.css("height","auto"),this.cm.setOption("viewportMargin",1/0)),e.lineNumbers||this.codeMirror.find(".CodeMirror-gutters").css("border-right","none"),this},getCodeMirrorOption:function(e){return this.cm.getOption(e)},setCodeMirrorOption:function(e,t){return this.cm.setOption(e,t),this},addKeyMap:function(e,t){return this.cm.addKeyMap(e,t),this},removeKeyMap:function(e){return this.cm.removeKeyMap(e),this},gotoLine:function(e){var t,i,o,n,r=this.settings;return r.gotoLine&&(t=this.cm,this.editor,o=t.lineCount(),i=this.preview,"number"!=typeof(e="string"==typeof e&&"first"===(e="last"===e?o:e)?1:e)?alert("Error: The line number must be an integer."):o<(e=parseInt(e)-1)?alert("Error: The line number range 1-"+o):(t.setCursor({line:e,ch:0}),o=t.getScrollInfo().clientHeight,e=t.charCoords({line:e,ch:0},"local"),t.scrollTo(null,(e.top+e.bottom-o)/2),r.watch&&(e=this.codeMirror.find(".CodeMirror-scroll")[0],o=v(e).height(),n=(r=e.scrollTop)/e.scrollHeight,0===r?i.scrollTop(0):r+o>=e.scrollHeight-16?i.scrollTop(i[0].scrollHeight):i.scrollTop(i[0].scrollHeight*n)),t.focus())),this},extend:function(){return void 0!==arguments[1]&&("function"==typeof arguments[1]&&(arguments[1]=v.proxy(arguments[1],this)),this[arguments[0]]=arguments[1]),"object"==typeof arguments[0]&&void 0===arguments[0].length&&v.extend(!0,this,arguments[0]),this},set:function(e,t){return void 0!==t&&"function"==typeof t&&(t=v.proxy(t,this)),this[e]=t,this},config:function(e,t){var i=this.settings;return"object"==typeof e&&(i=v.extend(!0,i,e)),"string"==typeof e&&(i[e]=t),this.settings=i,this.recreate(),this},on:function(e,t){var i=this.settings;return void 0!==i["on"+e]&&(i["on"+e]=v.proxy(t,this)),this},off:function(e){var t=this.settings;return void 0!==t["on"+e]&&(t["on"+e]=function(){}),this},showToolbar:function(e){var t=this.settings;return t.readOnly||(t.toolbar&&(this.toolbar.length<1||""===this.toolbar.find("."+this.classPrefix+"menu").html())&&this.setToolbar(),t.toolbar=!0,this.toolbar.show(),this.resize(),v.proxy(e||function(){},this)()),this},hideToolbar:function(e){return this.settings.toolbar=!1,this.toolbar.hide(),this.resize(),v.proxy(e||function(){},this)(),this},setToolbarAutoFixed:function(e){var t=this.state,i=this.editor,o=this.toolbar,n=this.settings;void 0!==e&&(n.toolbarAutoFixed=e);return!t.fullscreen&&!t.preview&&n.toolbar&&n.toolbarAutoFixed&&v(window).bind("scroll",function(){var e=v(window),t=e.scrollTop();if(!n.toolbarAutoFixed)return!1;10
                            '),i=this.toolbar=e.children("."+s+"toolbar")),a.toolbar){for(var l="",o=(Object.entries(t).forEach(([e,t])=>{var i="";if("left"===e)i='Skills Network Author IDE';else for(var o in t){var n=o.replace(/\s+/g,"-").toLowerCase(),r="string"==typeof a.lang.titlebar[o]?a.lang.titlebar[o]:"";switch(t[o]){case"dropdown":i+='
                            ';break;case"button":i+='";break;default:i+=''+o+""}}l+='
                            '+i+"
                            "}),i.find("div."+s+"titlebar-container").html(l),i.show(),"function"==typeof a.toolbarIcons?a.toolbarIcons():"string"==typeof a.toolbarIcons?C.toolbarModes[a.toolbarIcons]:a.toolbarIcons),e=i.find("."+this.classPrefix+"menu"),n="",r=!1,c=0,h=o.length;c';else{var d,u,f=u.includes("dropdown"),p=[],g=(r&&p.push("pull-right"),f&&p.push("dropdown"),0':"
                          • "),m=[];f?(d=(p=u.split(":"))[0],u=p[1],p=p[2].split(","),m=[u].concat(p),p.length||(f=!1)):m.push(u);for(var w=0,h=m.length;w');var v=!(f&&"dropdownIcon"!==d&&g.includes("toolbar-dropdown-content")),b=/h(\d)/.test(u),x=u,k=("watch"!==u||a.watch||(x="unwatch"),a.lang.toolbar[x]),y=void 0===(y=a.toolbarIconTexts[x])?"":y,x=void 0!==(x=a.toolbarIconsClass[x])&&v?x:"";g+='',v&&void 0!==a.toolbarCustomIcons[u]&&"function"!=typeof a.toolbarCustomIcons[u]?g+=a.toolbarCustomIcons[u]:(g+='',"function"!=typeof a.toolbarIcons&&b?g+=''+u.toUpperCase()+"":d&&"dropdownIcon"===d&&g.includes("toolbar-dropdown-content")?g+=''+(y||u)+"":""!==x&&v||(g+=''+(y||u)+""),g+=""),g+="",f&&w===h-1&&g.includes("toolbar-dropdown-content")&&(g+="",d="")}g+="
                          • ",n=r?g+n:n+g}e.html(n),e.find('[title="Lowercase"]').attr("title",a.lang.toolbar.lowercase),e.find('[title="ucwords"]').attr("title",a.lang.toolbar.ucwords),this.setToolbarHandler(),this.setToolbarAutoFixed()}else i.hide()}return this},dialogLockScreen:function(){return v.proxy(C.dialogLockScreen,this)(),this},dialogShowMask:function(e){return v.proxy(C.dialogShowMask,this)(e),this},positionDialog:function(e,t){return v.proxy(C.positionDialog,this)(e,t),this},getToolbarHandles:function(e){var t=this.toolbarHandlers=C.toolbarHandlers;return e&&void 0!==toolbarIconHandlers[e]?t[e]:t},setToolbarHandler:function(){var n,e,t,r,a=this,s=this.settings;return s.toolbar&&!s.readOnly&&(t=this.toolbar,n=this.cm,e=this.classPrefix,t=this.toolbarIcons=t.find("."+e+"menu > li a"),r=this.getToolbarHandles(),t.bind(C.mouseOrTouch("click","touchend"),function(){var e=v(this).children(".fa"),t=e.attr("name"),i=n.getCursor(),o=n.getSelection();if(""!==t)return a.activeIcon=e,void 0!==r[t]?v.proxy(r[t],a)(n):void 0!==s.toolbarHandlers[t]&&v.proxy(s.toolbarHandlers[t],a)(n,e,i,o),"link"!==t&&"reference-link"!==t&&"image"!==t&&"code-block"!==t&&"preformatted-text"!==t&&"watch"!==t&&"preview"!==t&&"search"!==t&&"fullscreen"!==t&&"info"!==t&&n.focus(),!1})),this},createDialog:function(e){return v.proxy(C.createDialog,this)(e)},createInfoDialog:function(){var e=this,t=this.editor,i=this.classPrefix,o=['
                            ','
                            ','

                            '+C.title+"v"+C.version+"

                            ","

                            "+this.lang.description+"

                            ",'

                            '+C.homePage+'

                            ','

                            Copyright © 2015 Pandao, The MIT License.

                            ',"
                            ",'',"
                            "].join("\n"),o=(t.append(o),this.infoDialog=t.children("."+i+"dialog-info"));return o.find("."+i+"dialog-close").bind(C.mouseOrTouch("click","touchend"),function(){e.hideInfoDialog()}),o.css("border",C.isIE8?"1px solid #ddd":"").css("z-index",C.dialogZindex).show(),this.infoDialogPosition(),this},infoDialogPosition:function(){function e(){t.css({top:(v(window).height()-t.height())/2+"px",left:(v(window).width()-t.width())/2+"px"})}var t=this.infoDialog;return e(),v(window).resize(e),this},showInfoDialog:function(){v("html,body").css("overflow-x","hidden");var e=this.editor,t=this.settings,e=this.infoDialog=e.children("."+this.classPrefix+"dialog-info");return e.length<1&&this.createInfoDialog(),this.lockScreen(!0),this.mask.css({opacity:t.dialogMaskOpacity,backgroundColor:t.dialogMaskBgColor}).show(),e.css("z-index",C.dialogZindex).show(),this.infoDialogPosition(),this},hideInfoDialog:function(){return v("html,body").css("overflow-x",""),this.infoDialog.hide(),this.mask.hide(),this.lockScreen(!1),this},lockScreen:function(e){return C.lockScreen(e),this.resize(),this},recreate:function(){var e=this.editor,t=this.settings;return this.codeMirror.remove(),this.setCodeMirror(),t.readOnly||(0=e[0].scrollHeight-16?i.scrollTop(i[0].scrollHeight):i.scrollTop((i[0].scrollHeight+r+a)*n)}return this},registerKeyMaps:function(e){var t=this,i=this.cm,o=this.settings,n=C.toolbarHandlers,r=o.disabledKeyMaps;if(e=e||null)for(var a in e)v.inArray(a,r)<0&&(e[a],i.addKeyMap(e));else{for(var s in C.keyMaps){var l,c=C.keyMaps[s],c="string"==typeof c?v.proxy(n[c],t):v.proxy(c,t);v.inArray(s,["F9","F10","F11"])<0&&v.inArray(s,r)<0&&((l={})[s]=c,i.addKeyMap(l))}v(window).keydown(function(e){if(v.inArray({120:"F9",121:"F10",122:"F11"}[e.keyCode],r)<0)switch(e.keyCode){case 120:return v.proxy(n.watch,t)(),!1;case 121:return v.proxy(n.preview,t)(),!1;case 122:return v.proxy(n.fullscreen,t)(),!1}})}return this},bindScrollEvent:function(){var e,t,i,o,a=this,s=this.previewContainer,l=this.settings,r=this.codeMirror,n=C.mouseOrTouch;return l.syncScrolling&&(i=function(){s.bind(n("scroll","touchmove"),function(e){var t,i,o,n;null==c&&(t=v(this).height(),o=(i=v(this).scrollTop())/v(this)[0].scrollHeight,n=r.find(".CodeMirror-scroll"),0===i?n.scrollTop(0):i+t>=v(this)[0].scrollHeight?n.scrollTop(n[0].scrollHeight):n.scrollTop(n[0].scrollHeight*o),v.proxy(l.onpreviewscroll,a)(e))})},o=function(){s.unbind(n("scroll","touchmove"))},r.bind({mouseover:e=function(){r.find(".CodeMirror-scroll").bind(n("scroll","touchmove"),function(e){var t,i,o,n,r;null==c&&(t=v(this).height(),o=(i=v(this).scrollTop())/v(this)[0].scrollHeight,n=0,s.find(".markdown-toc-list").each(function(){n+=v(this).height()}),r=(r=s.find(".editormd-toc-menu").height())||0,0===i?s.scrollTop(0):i+t>=v(this)[0].scrollHeight-16?s.scrollTop(s[0].scrollHeight):s.scrollTop((s[0].scrollHeight+n+r)*o),v.proxy(l.onscroll,a)(e))})},mouseout:t=function(){r.find(".CodeMirror-scroll").unbind(n("scroll","touchmove"))},touchstart:e,touchend:t}),"single"!==l.syncScrolling)&&s.bind({mouseover:i,mouseout:o,touchstart:i,touchend:o}),this},bindChangeEvent:function(){var i=this,e=this.cm,o=this.settings;return e.on("change",function(e,t){o.watch&&i.previewContainer.css("padding",o.autoHeight?"20px 20px 50px 40px":"20px"),c&&clearTimeout(c),o.onCmChange&&v.proxy(o.onCmChange,i)(),c=setTimeout(function(){i.save(),c=null},o.delay)}),this},loadedDisplay:function(e){e=e||!1;var t=this,i=this.editor,o=this.preview,n=this.settings;return this.containerMask.hide(),this.save(),n.watch&&o.show(),i.data("oldWidth",i.width()).data("oldHeight",i.height()),this.resize(),this.registerKeyMaps(),v(window).resize(function(){t.resize()}),this.bindScrollEvent().bindChangeEvent(),e||v.proxy(n.onload,this)(),this.state.loaded=!0,n.watch&&(this.save(),o.show()),this},width:function(e){return this.editor.css("width","number"==typeof e?e+"px":e),this.resize(),this},height:function(e){return this.editor.css("height","number"==typeof e?e+"px":e),this.resize(),this},resize:function(e,t){t=t||null;var i=this.state,o=this.editor,n=this.preview,r=this.toolbar,a=this.settings,s=this.codeMirror;return(e=e||null)&&o.css("width","number"==typeof e?e+"px":e),!a.autoHeight||i.fullscreen||i.preview?(t&&o.css("height","number"==typeof t?t+"px":t),i.fullscreen&&o.height(v(window).height()),a.toolbar&&!a.readOnly?s.css("margin-top",r.height()+1).height(o.height()-r.height()):s.css("margin-top",0).height(o.height())):(o.css("height","auto"),s.css("height","auto")),a.watch?(s.width(o.width()/2),n.width(i.preview?o.width():o.width()/2),this.previewContainer.css("padding",a.autoHeight?"20px 20px 50px 40px":"20px"),a.toolbar&&!a.readOnly?n.css("top",r.height()+1):n.css("top",0),!a.autoHeight||i.fullscreen||i.preview?(e=a.toolbar&&!a.readOnly?o.height()-r.height():o.height(),n.height(e)):n.height("")):(s.width(o.width()),n.hide()),i.loaded&&v.proxy(a.onresize,this)(),this},save:function(){var e,t,i,o=this,n=this.state,r=this.settings,a=this.cm,s=a.getValue(),l=this.previewContainer;return(null!==c||!r.watch&&n.preview)&&("gfm"!==r.mode&&"markdown"!==r.mode?this.markdownTextarea.val(s):(a.save(),(r.saveHTMLToTextarea||r.watch||!r.watch&&n.preview)&&(t=C.$marked,e=this.markdownToC=[],i=this.markedRendererOptions={toc:r.toc,tocm:r.tocm,tocStartLevel:r.tocStartLevel,pageBreak:r.pageBreak,taskList:r.taskList,emoji:r.emoji,tex:r.tex,atLink:r.atLink,emailLink:r.emailLink,flowChart:r.flowChart,sequenceDiagram:r.sequenceDiagram,previewCodeHighlight:r.previewCodeHighlight,mermaid:r.mermaid,mindMap:r.mindMap},i=this.markedOptions={renderer:C.markedRenderer(e,i),gfm:!0,tables:!0,breaks:!0,pedantic:!1,sanitize:!r.htmlDecode,smartLists:!0,smartypants:!0},t.setOptions(i),t=C.$marked.parse(s,i),r.debug&&console.info("cmValue",s,t),t=C.$filterXSS(t),this.markdownTextarea.text(s),a.save(),r.saveHTMLToTextarea&&this.htmlTextarea.text(t),r.watch||!r.watch&&n.preview)&&(l.html(t),this.previewCodeHighlight(),r.toc&&(s=(i=""===r.tocContainer?l:v(r.tocContainer)).find("."+this.classPrefix+"toc-menu"),i.attr("previewContainer",""===r.tocContainer?"true":"false"),""!==r.tocContainer&&0{C.loadPlugin(i,function(){C.loadPlugins[t]=r[t],e(r[t](a,n))},"head",o?r.author_ide_version:C.version)});C.loadPlugin(i,function(){C.loadPlugins[t]=r[t],r[t](a,n)},"head",o?r.author_ide_version:C.version)}else{if(n.proxy)return v.proxy(C.loadPlugins[t],this)(a,n);v.proxy(C.loadPlugins[t],this)(a,n)}return this},search:function(e){var t=this.settings;return t.searchReplace?t.readOnly||this.cm.execCommand(e||"find"):alert("Error: settings.searchReplace == false"),this},searchReplace:function(){return this.search("replace"),this},searchReplaceAll:function(){return this.search("replaceAll"),this}},C.fn.init.prototype=C.fn,C.dialogLockScreen=function(){(this.settings||{dialogLockScreen:!0}).dialogLockScreen&&(v("html,body").css("overflow","hidden"),this.resize())},C.positionDialog=function(e,t="center"){var i,o;switch(t){case"center":i=(v(window).width()-e.width())/2+"px",o=(v(window).height()-e.height())/2+"px";break;case"center-left":i=v(window).width()/4-e.width()/2+"px",o=(v(window).height()-e.height())/2+"px";break;case"center-right":i=3*v(window).width()/4-e.width()/2+"px",o=(v(window).height()-e.height())/2+"px";break;default:console.warn("Unsupported dialog position: "+t),i=(v(window).width()-e.width())/2+"px",o=(v(window).height()-e.height())/2+"px"}e.css({top:o,left:i})},C.dialogShowMask=function(e){var t=this.editor,i=this.settings||{dialogShowMask:!0};e.css({top:(v(window).height()-e.height())/2+"px",left:(v(window).width()-e.width())/2+"px"}),i.dialogShowMask&&t.children("."+this.classPrefix+"mask").css("z-index",parseInt(e.css("z-index"))-1).show()},C.toolbarHandlers={undo:function(){this.cm.undo()},redo:function(){this.cm.redo()},bold:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection("**"+i+"**"),""===i&&e.setCursor(t.line,t.ch+2)},del:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection("~~"+i+"~~"),""===i&&e.setCursor(t.line,t.ch+2)},italic:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection("*"+i+"*"),""===i&&e.setCursor(t.line,t.ch+1)},quote:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("> "+i),e.setCursor(t.line,t.ch+2)):e.replaceSelection("> "+i)},ucfirst:function(){var e=this.cm,t=e.getSelection(),i=e.listSelections();e.replaceSelection(C.firstUpperCase(t)),e.setSelections(i)},ucwords:function(){var e=this.cm,t=e.getSelection(),i=e.listSelections();e.replaceSelection(C.wordsFirstUpperCase(t)),e.setSelections(i)},uppercase:function(){var e=this.cm,t=e.getSelection(),i=e.listSelections();e.replaceSelection(t.toUpperCase()),e.setSelections(i)},lowercase:function(){var e=this.cm,t=(e.getCursor(),e.getSelection()),i=e.listSelections();e.replaceSelection(t.toLowerCase()),e.setSelections(i)},h1:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=new RegExp("^#{1}[ ]"),n=new RegExp("^#{1,6}[ ]");!0===o.test(i)?(i=i.replace(/^#{1}[ ]/,""),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection(i+"\n"),e.setCursor(t.line,t.ch-2)):(!0===n.test(i)&&(i=i.replace(/^#{1,6}[ ]/,"")),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection("# "+i+"\n"),e.setCursor(t.line,t.ch+2))},h2:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=new RegExp("^#{2}[ ]"),n=new RegExp("^#{1,6}[ ]");!0===o.test(i)?(i=i.replace(/^#{2}[ ]/,""),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection(i+"\n"),e.setCursor(t.line,t.ch-3)):(!0===n.test(i)&&(i=i.replace(/^#{1,6}[ ]/,"")),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection("## "+i+"\n"),e.setCursor(t.line,t.ch+3))},h3:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=new RegExp("^#{3}[ ]"),n=new RegExp("^#{1,6}[ ]");!0===o.test(i)?(i=i.replace(/^#{3}[ ]/,""),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection(i+"\n"),e.setCursor(t.line,t.ch-4)):(!0===n.test(i)&&(i=i.replace(/^#{1,6}[ ]/,"")),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection("### "+i+"\n"),e.setCursor(t.line,t.ch+4))},h4:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=new RegExp("^#{4}[ ]"),n=new RegExp("^#{1,6}[ ]");!0===o.test(i)?(i=i.replace(/^#{4}[ ]/,""),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection(i+"\n"),e.setCursor(t.line,t.ch-5)):(!0===n.test(i)&&(i=i.replace(/^#{1,6}[ ]/,"")),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection("#### "+i+"\n"),e.setCursor(t.line,t.ch+5))},h5:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=new RegExp("^#{5}[ ]"),n=new RegExp("^#{1,6}[ ]");!0===o.test(i)?(i=i.replace(/^#{5}[ ]/,""),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection(i+"\n"),e.setCursor(t.line,t.ch-6)):(!0===n.test(i)&&(i=i.replace(/^#{1,6}[ ]/,"")),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection("##### "+i+"\n"),e.setCursor(t.line,t.ch+6))},h6:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=new RegExp("^#{6}[ ]"),n=new RegExp("^#{1,6}[ ]");!0===o.test(i)?(i=i.replace(/^#{6}[ ]/,""),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection(i+"\n"),e.setCursor(t.line,t.ch-7)):(!0===n.test(i)&&(i=i.replace(/^#{1,6}[ ]/,"")),e.setSelection({line:t.line,ch:0},{line:t.line+1,ch:0}),e.replaceSelection("###### "+i+"\n"),e.setCursor(t.line,t.ch+7))},"list-ul":function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=new RegExp("^-{1}[ ]"),n=0;if(""===i)e.setCursor(t.line,0),e.replaceSelection("- "+i),e.setCursor(t.line,t.ch+2);else{for(var r=i.split("\n"),a=0,s=r.length;a/i),i=(null!==i&&(t=i[0],e=e.substr(t.length)),"default");return 0===e.indexOf("[info]")?(i="info",e=e.substr(6)):0===e.indexOf("[warning]")?(i="warning",e=e.substr(9)):0===e.indexOf("[success]")?(i="success",e=e.substr(9)):0===e.indexOf("[danger]")&&(i="danger",e=e.substr(8)),'
                            \n'+t+e+"
                            \n"},e.image=function(e,t,i){var o,n,r,a="",s="",l="";return e&&""!==e&&((o=document.createElement("a")).href=e,null!==(n=o.hash.match(/size=\d+x\d+/i))&&(o.hash=o.hash.replace(n[0],""),e=o.href,0<(n=n[0].replace("size=","").split("x"))[0]&&(a+=' width="'+n[0]+'"'),0","center"===(n=n[0].replace("align=",""))?s='

                            ':"left"===n?s='

                            ':"right"===n&&(s='

                            ')),s+''+i+'"+l},e.emoji=function(e){var t=(e=e.replace(C.regexs.emojiDatetime,function(e){return e.replace(/:/g,":")})).match(r);if(t&&a.emoji)for(var i=0,o=t.length;i'}else{var s=e.match(w),l=e.match(g);if(s)for(var c=0,h=s.length;c'}else{if(!l)return':'+o+':';for(var u=0,f=l.length;u'}}}});return e},e.atLink=function(e){return n.test(e)&&(a.atLink&&(e=(e=e.replace(i,function(e,t,i,o){return e.replace(/@/g,"_#_@_#_")})).replace(n,function(e,t){return''+e+""}).replace(/_#_@_#_/g,"@")),a.emailLink)?e.replace(o,function(e,t,i,o,n){return!t&&v.inArray(n,"jpg|jpeg|png|gif|webp|ico|icon|pdf".split("|"))<0?''+e+"":e}):e},e.link=function(e,t,i){if(this.options.sanitize){try{var o=decodeURIComponent(unescape(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===o.indexOf("javascript:"))return""}return 0===e.indexOf("@")?'':(o=''+i.replace(/@/g,"@")+""):(t&&(o+=' title="'+t+'"'),o+">"+i+""))},e.heading=function(e,t,i){var o=e,n=/\s*\]*)\>(.*)\<\/a\>\s*/;if(n.test(e)){for(var r=[],a=0,s=(e=e.split(/\]+)\>([^\>]*)\<\/a\>/)).length;a');return(l+='')+(n?this.atLink(this.emoji(o)):this.atLink(this.emoji(e)))+("")},e.pageBreak=function(e){return e=s.test(e)&&a.pageBreak?'


                            ':e},e.paragraph=function(e){var t=/\$\$(.+?)\$\$/g.test(e),i=/^(?!\$\$.+?(?:\$\$).+?\$\$)(\$\$(.+?)\$\$)$/.test(e),o=i?' class="'+C.classNames.tex+'"':"",n=(a.tocm?/^(\[TOC\]|\[TOCM\])$/:/^\[TOC\]$/).test(e),r=/^\[TOCM\]$/.test(e),t='
                            '+(e=!i&&t?e.replaceAll(/(\$\$(.+?)\$\$)/g,function(e,t,i){return''+i.replaceAll(/\/g,"")+""}):i?e.replace(/^(?!\$\$.+?(?:\$\$).+?\$\$)(\$\$(.+?)\$\$)$/,(e,t,i)=>i):e)+"
                            ";return n?r?'
                            '+t+"

                            ":t:s.test(e)?this.pageBreak(e):""+this.atLink(this.emoji(e))+"

                            \n"},e.code=function(e,t,i){if("seq"===t||"sequence"===t)return'
                            '+e+"
                            ";if("mermaid"===t){for(var o=(a="ABCDEFGHJKLMNOPQRSTUVWXYZabcdefhijlkmnopqrstuvwxyz012345678").length,n="",r=0;r<4;r++)n+=a.charAt(Math.floor(Math.random()*o));return'
                            '+e+"
                            "}if("flow"===t)return'
                            '+e+"
                            ";if("math"===t||"latex"===t||"katex"===t)return'

                            '+e+"

                            ";if(/^mindmap/i.test(t)){for(var a,o=(a="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678").length,s="",l=t.split(">")[1],l=null!=l?l:150,r=0;r<9;r++)s+=a.charAt(Math.floor(Math.random()*o));return""+e+""}return"drawio"===t?'
                            '+decodeURIComponent(escape(window.atob(e)))+"
                            ":c.Renderer.prototype.code.apply(this,arguments)},e.tablecell=function(e,t){var i=t.header?"th":"td";return(t.align?"<"+i+' style="text-align:'+t.align+'">':"<"+i+">")+this.atLink(this.emoji(e))+"\n"},e.listitem=function(e){return a.taskList&&/^\s*\[[x\s]\]\s*/.test(e)?(e=e.replace(/^\s*\[\s\]\s*/,' ').replace(/^\s*\[x\]\s*/,' '),'
                          • '+this.atLink(this.emoji(e))+"
                          • "):"
                          • "+this.atLink(this.emoji(e))+"
                          • "},e.checkbox=function(e){return e?' ':' '},e},C.markdownToCRenderer=function(e,t,i,o){var n="",r=0,a=this.classPrefix;o=o||1;for(var s=0,l=e.length;s"):"
                        • ")+'
                        • '+c+"