[TASK] Update codemirror to 5.30 and drop codemirror-minified again 46/54346/4
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Tue, 10 Oct 2017 06:17:59 +0000 (08:17 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Wed, 11 Oct 2017 08:18:59 +0000 (10:18 +0200)
The package `codemirror-minified` used as a drop-in replacement of
`codemirror` is not maintained well and is replaced with the original
package again. To still get the benefits of page loading speed, at least
the JavaScript files are compressed by our own toolchain now.

CSS can't get compressed now as the original copyright gets replaced by
our own "banner".

Resolves: #82713
Releases: master
Change-Id: Ic12a7e9e70c63f2c0ae322e470453fe056c99155
Reviewed-on: https://review.typo3.org/54346
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
319 files changed:
Build/Gruntfile.js
Build/Resources/Public/Sass/editor.scss
Build/package-lock.json
Build/package.json
typo3/sysext/t3editor/Resources/Public/Css/t3editor.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/AUTHORS
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/CHANGELOG.md
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/LICENSE
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/README.md
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/comment/comment.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/comment/continuecomment.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/dialog/dialog.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/dialog/dialog.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/display/autorefresh.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/display/fullscreen.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/display/fullscreen.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/display/panel.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/display/placeholder.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/display/rulers.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/edit/closebrackets.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/edit/closetag.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/edit/continuelist.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/edit/matchbrackets.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/edit/matchtags.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/edit/trailingspace.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/fold/brace-fold.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/fold/comment-fold.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/fold/foldcode.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/fold/foldgutter.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/fold/foldgutter.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/fold/indent-fold.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/fold/markdown-fold.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/fold/xml-fold.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/hint/anyword-hint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/hint/css-hint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/hint/html-hint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/hint/javascript-hint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/hint/show-hint.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/hint/show-hint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/hint/sql-hint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/hint/xml-hint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/lint/coffeescript-lint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/lint/css-lint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/lint/html-lint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/lint/javascript-lint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/lint/json-lint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/lint/lint.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/lint/lint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/lint/yaml-lint.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/merge/merge.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/merge/merge.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/mode/loadmode.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/mode/multiplex.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/mode/multiplex_test.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/mode/overlay.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/mode/simple.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/runmode/colorize.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/runmode/runmode-standalone.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/runmode/runmode.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/runmode/runmode.node.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/scroll/annotatescrollbar.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/scroll/scrollpastend.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/scroll/simplescrollbars.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/scroll/simplescrollbars.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/search/jump-to-line.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/search/match-highlighter.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/search/matchesonscrollbar.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/search/matchesonscrollbar.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/search/search.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/search/searchcursor.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/selection/active-line.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/selection/mark-selection.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/selection/selection-pointer.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/tern/tern.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/tern/tern.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/tern/worker.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/addon/wrap/hardwrap.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/bower.json [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/keymap/emacs.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/keymap/sublime.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/keymap/vim.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/lib/codemirror.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/lib/codemirror.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/apl/apl.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/asciiarmor/asciiarmor.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/asn.1/asn.1.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/asterisk/asterisk.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/brainfuck/brainfuck.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/clike/clike.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/clojure/clojure.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/cmake/cmake.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/cobol/cobol.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/coffeescript/coffeescript.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/commonlisp/commonlisp.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/crystal/crystal.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/css/css.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/cypher/cypher.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/d/d.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/dart/dart.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/diff/diff.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/django/django.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/dockerfile/dockerfile.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/dtd/dtd.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/dylan/dylan.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/ebnf/ebnf.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/ecl/ecl.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/eiffel/eiffel.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/elm/elm.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/erlang/erlang.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/factor/factor.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/fcl/fcl.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/forth/forth.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/fortran/fortran.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/gas/gas.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/gfm/gfm.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/gherkin/gherkin.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/go/go.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/groovy/groovy.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/haml/haml.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/handlebars/handlebars.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/haskell-literate/haskell-literate.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/haskell/haskell.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/haxe/haxe.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/htmlembedded/htmlembedded.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/htmlmixed/htmlmixed.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/http/http.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/idl/idl.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/javascript/javascript.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/jinja2/jinja2.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/jsx/jsx.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/julia/julia.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/livescript/livescript.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/lua/lua.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/markdown/markdown.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/mathematica/mathematica.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/mbox/mbox.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/meta.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/mirc/mirc.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/mllike/mllike.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/modelica/modelica.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/mscgen/mscgen.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/mumps/mumps.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/nginx/nginx.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/nsis/nsis.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/ntriples/ntriples.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/octave/octave.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/oz/oz.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/pascal/pascal.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/pegjs/pegjs.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/perl/perl.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/php/php.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/pig/pig.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/powershell/powershell.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/properties/properties.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/protobuf/protobuf.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/pug/pug.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/puppet/puppet.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/python/python.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/q/q.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/r/r.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/rpm/rpm.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/rst/rst.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/ruby/ruby.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/rust/rust.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/sas/sas.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/sass/sass.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/scheme/scheme.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/shell/shell.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/sieve/sieve.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/slim/slim.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/smalltalk/smalltalk.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/smarty/smarty.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/solr/solr.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/soy/soy.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/sparql/sparql.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/spreadsheet/spreadsheet.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/sql/sql.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/stex/stex.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/stylus/stylus.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/swift/swift.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/tcl/tcl.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/textile/textile.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/tiddlywiki/tiddlywiki.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/tiddlywiki/tiddlywiki.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/tiki/tiki.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/tiki/tiki.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/toml/toml.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/tornado/tornado.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/troff/troff.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/ttcn-cfg/ttcn-cfg.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/ttcn/ttcn.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/turtle/turtle.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/twig/twig.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/vb/vb.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/vbscript/vbscript.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/velocity/velocity.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/verilog/verilog.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/vhdl/vhdl.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/vue/vue.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/webidl/webidl.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/xml/xml.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/xquery/xquery.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/yacas/yacas.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/yaml-frontmatter/yaml-frontmatter.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/yaml/yaml.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/mode/z80/z80.js
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/package.json
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/rollup.config.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/codemirror.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/display/Display.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/display/focus.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/display/gutters.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/display/highlight_worker.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/display/line_numbers.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/display/mode_state.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/display/operations.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/display/scroll_events.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/display/scrollbars.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/display/scrolling.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/display/selection.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/display/update_display.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/display/update_line.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/display/update_lines.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/display/view_tracking.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/edit/CodeMirror.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/edit/commands.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/edit/deleteNearSelection.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/edit/drop_events.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/edit/fromTextArea.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/edit/global_events.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/edit/key_events.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/edit/legacy.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/edit/main.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/edit/methods.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/edit/mouse_events.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/edit/options.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/edit/utils.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/input/ContentEditableInput.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/input/TextareaInput.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/input/indent.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/input/input.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/input/keymap.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/input/keynames.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/input/movement.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/line/highlight.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/line/line_data.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/line/pos.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/line/saw_special_spans.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/line/spans.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/line/utils_line.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/measurement/position_measurement.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/measurement/widgets.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/model/Doc.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/model/change_measurement.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/model/changes.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/model/chunk.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/model/document_data.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/model/history.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/model/line_widget.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/model/mark_text.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/model/selection.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/model/selection_updates.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/modes.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/util/StringStream.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/util/bidi.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/util/browser.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/util/dom.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/util/event.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/util/feature_detection.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/util/misc.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/src/util/operation_group.js [deleted file]
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/3024-day.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/3024-night.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/abcdef.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/ambiance-mobile.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/ambiance.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/base16-dark.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/base16-light.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/bespin.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/blackboard.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/cobalt.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/colorforth.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/dracula.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/duotone-dark.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/duotone-light.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/eclipse.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/elegant.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/erlang-dark.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/hopscotch.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/icecoder.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/isotope.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/lesser-dark.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/liquibyte.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/material.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/mbo.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/mdn-like.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/midnight.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/monokai.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/neat.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/neo.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/night.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/panda-syntax.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/paraiso-dark.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/paraiso-light.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/pastel-on-dark.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/railscasts.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/rubyblue.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/seti.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/solarized.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/the-matrix.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/tomorrow-night-bright.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/tomorrow-night-eighties.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/ttcn.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/twilight.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/vibrant-ink.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/xq-dark.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/xq-light.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/yeti.css
typo3/sysext/t3editor/Resources/Public/JavaScript/Contrib/cm/theme/zenburn.css

index 887f77a..6c5bf2d 100644 (file)
@@ -390,6 +390,16 @@ module.exports = function (grunt) {
                                                src: '<%= paths.npm %>font-awesome/fonts/fontawesome-webfont.woff2'
                                        }
                                ]
+                       },
+                       t3editor: {
+                               files: [
+                                       {
+                                               expand: true,
+                                               cwd: '<%= paths.npm %>codemirror',
+                                               dest: '<%= paths.t3editor %>Public/JavaScript/Contrib/cm',
+                                               src: ['**/*', '!**/src/**', '!rollup.config.js']
+                                       }
+                               ]
                        }
                },
                npmcopy: {
@@ -409,14 +419,6 @@ module.exports = function (grunt) {
                                        'lang/': 'ckeditor/lang/'
                                }
                        },
-                       t3editor: {
-                               options: {
-                                       destPrefix: "<%= paths.t3editor %>Public/JavaScript/Contrib"
-                               },
-                               files: {
-                                       'cm/': 'codemirror-minified/'
-                               }
-                       },
                        all: {
                                options: {
                                        destPrefix: "<%= paths.core %>Public/JavaScript/Contrib"
@@ -480,6 +482,22 @@ module.exports = function (grunt) {
                                        "<%= paths.install %>Public/JavaScript/chosen.jquery.min.js": ["<%= paths.npm %>chosen-js/chosen.jquery.js"],
                                        "<%= paths.core %>Public/JavaScript/Contrib/bootstrap-datetimepicker.js": ["<%= paths.core %>Public/JavaScript/Contrib/bootstrap-datetimepicker.js"]
                                }
+                       },
+                       t3editor: {
+                               files: [
+                                       {
+                                               expand: true,
+                                               src: [
+                                                       '<%= paths.t3editor %>Public/JavaScript/Contrib/cm/**/*.js',
+                                                       '!<%= paths.t3editor %>Public/JavaScript/Contrib/cm/**/*.min.js'
+                                               ],
+                                               dest: '<%= paths.t3editor %>Public/JavaScript/Contrib/cm',
+                                               cwd: '.',
+                                               rename: function(dest, src) {
+                                                       return src;
+                                               }
+                                       }
+                               ]
                        }
                }
        });
index 19e9cd2..35dff9d 100644 (file)
@@ -12,7 +12,7 @@ $panel-padding-horizontal: 6px;
 $color-matching-bracket: #6ca52b;
 
 .CodeMirror-fullscreen {
-    top: $fullscreen-top;
+    top: $fullscreen-top !important;
 }
 
 .CodeMirror-panel {
index 1519f4a..5a13868 100644 (file)
@@ -25,7 +25,7 @@
     "@types/ckeditor": {
       "version": "0.0.38",
       "resolved": "https://registry.npmjs.org/@types/ckeditor/-/ckeditor-0.0.38.tgz",
-      "integrity": "sha512-xclEOGCP/s9Qzfc1LdvyJwFqaqhlcG4+9RbdB7bsLY4WR1/S5bDajL4qXJwao/xiso+aiRwURHaC1AwRMsg6Pg==",
+      "integrity": "sha1-Fm/fN7pguixE8h5bq4T06ug9J8A=",
       "dev": true
     },
     "@types/imagesloaded": {
@@ -71,9 +71,9 @@
       "dev": true
     },
     "@typo3/icons": {
-      "version": "1.4.1",
-      "resolved": "https://registry.npmjs.org/@typo3/icons/-/icons-1.4.1.tgz",
-      "integrity": "sha512-FQT1CjcrX6b1W1fMu/Fmw/iItCd/tlG6UrUyosWA6y6SFGtGdXAkW7zjdqJ1bPld/8dvdoV1dIcFGVqgq5OjwQ==",
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/@typo3/icons/-/icons-1.5.1.tgz",
+      "integrity": "sha512-d7to7PZ31dMnm5a/n37uoKyR+ib3RhN4ms5Yrxn1a1q7AhavIMbS8mS02RfKwQ61h/Qg+h8l4HaKlycYulZkoA==",
       "dev": true
     },
     "JSONStream": {
       "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
       "dev": true
     },
-    "codemirror-minified": {
-      "version": "5.28.0",
-      "resolved": "https://registry.npmjs.org/codemirror-minified/-/codemirror-minified-5.28.0.tgz",
-      "integrity": "sha1-cWiy5Tfr/bJzySIdWNqNN/OKM6E=",
+    "codemirror": {
+      "version": "5.30.0",
+      "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.30.0.tgz",
+      "integrity": "sha512-pfJV/7fLAUUenuGK3iANkQu1AxNLuWpeF7HV6YFDjSBMp53F8FTa2F6oPs9NKAHFweT2m08usmXUIA+7sohdew==",
       "dev": true
     },
     "coffee-script": {
         "glob": {
           "version": "7.1.2",
           "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
-          "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
+          "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=",
           "dev": true,
           "requires": {
             "fs.realpath": "1.0.0",
           "requires": {
             "anymatch": "1.3.0",
             "async-each": "1.0.1",
+            "fsevents": "1.1.1",
             "glob-parent": "2.0.0",
             "inherits": "2.0.3",
             "is-binary-path": "1.0.1",
           "version": "1.1.1",
           "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.1.tgz",
           "integrity": "sha1-8Z/Sj0Pur3YWgOUZogPE0LPTGv8=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "nan": "2.6.2",
+            "node-pre-gyp": "0.6.33"
+          },
           "dependencies": {
             "abbrev": {
               "version": "1.1.0",
               "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz",
-              "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8="
+              "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=",
+              "dev": true,
+              "optional": true
             },
             "ansi-regex": {
               "version": "2.1.1",
               "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
-              "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
+              "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
+              "dev": true
             },
             "ansi-styles": {
               "version": "2.2.1",
               "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
-              "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
+              "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
+              "dev": true,
+              "optional": true
             },
             "aproba": {
               "version": "1.1.1",
               "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.1.tgz",
-              "integrity": "sha1-ldNgDwdxCqDpKYxyatXs8urLq6s="
+              "integrity": "sha1-ldNgDwdxCqDpKYxyatXs8urLq6s=",
+              "dev": true,
+              "optional": true
             },
             "are-we-there-yet": {
               "version": "1.1.2",
               "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz",
-              "integrity": "sha1-gORw6VoIR5T+GJkmLFZnxuiN4bM="
+              "integrity": "sha1-gORw6VoIR5T+GJkmLFZnxuiN4bM=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "delegates": "1.0.0",
+                "readable-stream": "2.2.2"
+              }
             },
             "asn1": {
               "version": "0.2.3",
               "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
-              "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y="
+              "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=",
+              "dev": true,
+              "optional": true
             },
             "assert-plus": {
               "version": "0.2.0",
               "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz",
-              "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ="
+              "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=",
+              "dev": true,
+              "optional": true
             },
             "asynckit": {
               "version": "0.4.0",
               "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
-              "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
+              "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
+              "dev": true,
+              "optional": true
             },
             "aws-sign2": {
               "version": "0.6.0",
               "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
-              "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8="
+              "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=",
+              "dev": true,
+              "optional": true
             },
             "aws4": {
               "version": "1.6.0",
               "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz",
-              "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4="
+              "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=",
+              "dev": true,
+              "optional": true
             },
             "balanced-match": {
               "version": "0.4.2",
               "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz",
-              "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg="
+              "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=",
+              "dev": true
             },
             "bcrypt-pbkdf": {
               "version": "1.0.1",
               "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
-              "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40="
+              "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "tweetnacl": "0.14.5"
+              }
             },
             "block-stream": {
               "version": "0.0.9",
               "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz",
-              "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo="
+              "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=",
+              "dev": true,
+              "requires": {
+                "inherits": "2.0.3"
+              }
             },
             "boom": {
               "version": "2.10.1",
               "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
-              "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8="
+              "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
+              "dev": true,
+              "requires": {
+                "hoek": "2.16.3"
+              }
             },
             "brace-expansion": {
               "version": "1.1.6",
               "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz",
-              "integrity": "sha1-cZfX6qm4fmSDkOph/GbIRCdCDfk="
+              "integrity": "sha1-cZfX6qm4fmSDkOph/GbIRCdCDfk=",
+              "dev": true,
+              "requires": {
+                "balanced-match": "0.4.2",
+                "concat-map": "0.0.1"
+              }
             },
             "buffer-shims": {
               "version": "1.0.0",
               "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz",
-              "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E="
+              "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=",
+              "dev": true
             },
             "caseless": {
               "version": "0.11.0",
               "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz",
-              "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c="
+              "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=",
+              "dev": true,
+              "optional": true
             },
             "chalk": {
               "version": "1.1.3",
               "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
-              "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg="
+              "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "ansi-styles": "2.2.1",
+                "escape-string-regexp": "1.0.5",
+                "has-ansi": "2.0.0",
+                "strip-ansi": "3.0.1",
+                "supports-color": "2.0.0"
+              }
             },
             "code-point-at": {
               "version": "1.1.0",
               "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
-              "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
+              "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
+              "dev": true
             },
             "combined-stream": {
               "version": "1.0.5",
               "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz",
-              "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk="
+              "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=",
+              "dev": true,
+              "requires": {
+                "delayed-stream": "1.0.0"
+              }
             },
             "commander": {
               "version": "2.9.0",
               "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz",
-              "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q="
+              "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "graceful-readlink": "1.0.1"
+              }
             },
             "concat-map": {
               "version": "0.0.1",
               "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
-              "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
+              "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
+              "dev": true
             },
             "console-control-strings": {
               "version": "1.1.0",
               "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
-              "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
+              "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
+              "dev": true
             },
             "core-util-is": {
               "version": "1.0.2",
               "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
-              "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
+              "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
+              "dev": true
             },
             "cryptiles": {
               "version": "2.0.5",
               "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
-              "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g="
+              "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "boom": "2.10.1"
+              }
             },
             "dashdash": {
               "version": "1.14.1",
               "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
               "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "assert-plus": "1.0.0"
+              },
               "dependencies": {
                 "assert-plus": {
                   "version": "1.0.0",
                   "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
-                  "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
+                  "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+                  "dev": true,
+                  "optional": true
                 }
               }
             },
             "debug": {
               "version": "2.2.0",
               "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
-              "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo="
+              "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "ms": "0.7.1"
+              }
             },
             "deep-extend": {
               "version": "0.4.1",
               "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.1.tgz",
-              "integrity": "sha1-7+QRPQgIX05vlod1mBD4B0aeIlM="
+              "integrity": "sha1-7+QRPQgIX05vlod1mBD4B0aeIlM=",
+              "dev": true,
+              "optional": true
             },
             "delayed-stream": {
               "version": "1.0.0",
               "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
-              "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
+              "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
+              "dev": true
             },
             "delegates": {
               "version": "1.0.0",
               "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
-              "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
+              "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
+              "dev": true,
+              "optional": true
             },
             "ecc-jsbn": {
               "version": "0.1.1",
               "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
-              "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU="
+              "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "jsbn": "0.1.1"
+              }
             },
             "escape-string-regexp": {
               "version": "1.0.5",
               "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
-              "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
+              "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+              "dev": true,
+              "optional": true
             },
             "extend": {
               "version": "3.0.0",
               "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz",
-              "integrity": "sha1-WkdDU7nzNT3dgXbf03uRyDpG8dQ="
+              "integrity": "sha1-WkdDU7nzNT3dgXbf03uRyDpG8dQ=",
+              "dev": true,
+              "optional": true
             },
             "extsprintf": {
               "version": "1.0.2",
               "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz",
-              "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA="
+              "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=",
+              "dev": true
             },
             "forever-agent": {
               "version": "0.6.1",
               "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
-              "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
+              "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
+              "dev": true,
+              "optional": true
             },
             "form-data": {
               "version": "2.1.2",
               "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.2.tgz",
-              "integrity": "sha1-icNTQAi5fq2ky7FX1Y9vXfAl6uQ="
+              "integrity": "sha1-icNTQAi5fq2ky7FX1Y9vXfAl6uQ=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "asynckit": "0.4.0",
+                "combined-stream": "1.0.5",
+                "mime-types": "2.1.14"
+              }
             },
             "fs.realpath": {
               "version": "1.0.0",
               "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
-              "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
+              "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
+              "dev": true
             },
             "fstream": {
               "version": "1.0.10",
               "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.10.tgz",
-              "integrity": "sha1-YE6Kkv4m/9n2+uMDmdSYThqyKCI="
+              "integrity": "sha1-YE6Kkv4m/9n2+uMDmdSYThqyKCI=",
+              "dev": true,
+              "requires": {
+                "graceful-fs": "4.1.11",
+                "inherits": "2.0.3",
+                "mkdirp": "0.5.1",
+                "rimraf": "2.5.4"
+              }
             },
             "fstream-ignore": {
               "version": "1.0.5",
               "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz",
-              "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU="
+              "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "fstream": "1.0.10",
+                "inherits": "2.0.3",
+                "minimatch": "3.0.3"
+              }
             },
             "gauge": {
               "version": "2.7.3",
               "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.3.tgz",
-              "integrity": "sha1-HCOFX5YvF7OtPQ3HRD8wRULt/gk="
+              "integrity": "sha1-HCOFX5YvF7OtPQ3HRD8wRULt/gk=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "aproba": "1.1.1",
+                "console-control-strings": "1.1.0",
+                "has-unicode": "2.0.1",
+                "object-assign": "4.1.1",
+                "signal-exit": "3.0.2",
+                "string-width": "1.0.2",
+                "strip-ansi": "3.0.1",
+                "wide-align": "1.1.0"
+              }
             },
             "generate-function": {
               "version": "2.0.0",
               "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz",
-              "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ="
+              "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=",
+              "dev": true,
+              "optional": true
             },
             "generate-object-property": {
               "version": "1.2.0",
               "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz",
-              "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA="
+              "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "is-property": "1.0.2"
+              }
             },
             "getpass": {
               "version": "0.1.6",
               "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz",
               "integrity": "sha1-KD/9n8ElaECHUxHBtg6MQBhxEOY=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "assert-plus": "1.0.0"
+              },
               "dependencies": {
                 "assert-plus": {
                   "version": "1.0.0",
                   "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
-                  "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
+                  "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+                  "dev": true,
+                  "optional": true
                 }
               }
             },
             "glob": {
               "version": "7.1.1",
               "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz",
-              "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg="
+              "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=",
+              "dev": true,
+              "requires": {
+                "fs.realpath": "1.0.0",
+                "inflight": "1.0.6",
+                "inherits": "2.0.3",
+                "minimatch": "3.0.3",
+                "once": "1.4.0",
+                "path-is-absolute": "1.0.1"
+              }
             },
             "graceful-fs": {
               "version": "4.1.11",
               "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
-              "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
+              "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
+              "dev": true
             },
             "graceful-readlink": {
               "version": "1.0.1",
               "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
-              "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU="
+              "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=",
+              "dev": true,
+              "optional": true
             },
             "har-validator": {
               "version": "2.0.6",
               "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz",
-              "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0="
+              "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "chalk": "1.1.3",
+                "commander": "2.9.0",
+                "is-my-json-valid": "2.15.0",
+                "pinkie-promise": "2.0.1"
+              }
             },
             "has-ansi": {
               "version": "2.0.0",
               "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
-              "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE="
+              "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "ansi-regex": "2.1.1"
+              }
             },
             "has-unicode": {
               "version": "2.0.1",
               "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
-              "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
+              "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
+              "dev": true,
+              "optional": true
             },
             "hawk": {
               "version": "3.1.3",
               "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
-              "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ="
+              "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "boom": "2.10.1",
+                "cryptiles": "2.0.5",
+                "hoek": "2.16.3",
+                "sntp": "1.0.9"
+              }
             },
             "hoek": {
               "version": "2.16.3",
               "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
-              "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0="
+              "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=",
+              "dev": true
             },
             "http-signature": {
               "version": "1.1.1",
               "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
-              "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8="
+              "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "assert-plus": "0.2.0",
+                "jsprim": "1.3.1",
+                "sshpk": "1.10.2"
+              }
             },
             "inflight": {
               "version": "1.0.6",
               "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
-              "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk="
+              "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+              "dev": true,
+              "requires": {
+                "once": "1.4.0",
+                "wrappy": "1.0.2"
+              }
             },
             "inherits": {
               "version": "2.0.3",
               "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
-              "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
+              "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
+              "dev": true
             },
             "ini": {
               "version": "1.3.4",
               "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz",
-              "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4="
+              "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=",
+              "dev": true,
+              "optional": true
             },
             "is-fullwidth-code-point": {
               "version": "1.0.0",
               "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
-              "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs="
+              "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
+              "dev": true,
+              "requires": {
+                "number-is-nan": "1.0.1"
+              }
             },
             "is-my-json-valid": {
               "version": "2.15.0",
               "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz",
-              "integrity": "sha1-k27do8o8IR/ZjzstPgjaQ/eykVs="
+              "integrity": "sha1-k27do8o8IR/ZjzstPgjaQ/eykVs=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "generate-function": "2.0.0",
+                "generate-object-property": "1.2.0",
+                "jsonpointer": "4.0.1",
+                "xtend": "4.0.1"
+              }
             },
             "is-property": {
               "version": "1.0.2",
               "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
-              "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ="
+              "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=",
+              "dev": true,
+              "optional": true
             },
             "is-typedarray": {
               "version": "1.0.0",
               "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
-              "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
+              "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
+              "dev": true,
+              "optional": true
             },
             "isarray": {
               "version": "1.0.0",
               "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
-              "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
+              "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+              "dev": true
             },
             "isstream": {
               "version": "0.1.2",
               "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
-              "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
+              "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
+              "dev": true,
+              "optional": true
             },
             "jodid25519": {
               "version": "1.0.2",
               "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz",
-              "integrity": "sha1-BtSRIlUJNBlHfUJWM2BuDpB4KWc="
+              "integrity": "sha1-BtSRIlUJNBlHfUJWM2BuDpB4KWc=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "jsbn": "0.1.1"
+              }
             },
             "jsbn": {
               "version": "0.1.1",
               "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
-              "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
+              "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
+              "dev": true,
+              "optional": true
             },
             "json-schema": {
               "version": "0.2.3",
               "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
-              "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
+              "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
+              "dev": true,
+              "optional": true
             },
             "json-stringify-safe": {
               "version": "5.0.1",
               "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
-              "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
+              "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
+              "dev": true,
+              "optional": true
             },
             "jsonpointer": {
               "version": "4.0.1",
               "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz",
-              "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk="
+              "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=",
+              "dev": true,
+              "optional": true
             },
             "jsprim": {
               "version": "1.3.1",
               "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.1.tgz",
-              "integrity": "sha1-KnJW9wQSop7jZwqspiWZTE3P8lI="
+              "integrity": "sha1-KnJW9wQSop7jZwqspiWZTE3P8lI=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "extsprintf": "1.0.2",
+                "json-schema": "0.2.3",
+                "verror": "1.3.6"
+              }
             },
             "mime-db": {
               "version": "1.26.0",
               "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.26.0.tgz",
-              "integrity": "sha1-6v/NDk/Gk1z4E02iRuLmw1MFrf8="
+              "integrity": "sha1-6v/NDk/Gk1z4E02iRuLmw1MFrf8=",
+              "dev": true
             },
             "mime-types": {
               "version": "2.1.14",
               "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.14.tgz",
-              "integrity": "sha1-9+99l1g/yvO30oK2+LVnnaselO4="
+              "integrity": "sha1-9+99l1g/yvO30oK2+LVnnaselO4=",
+              "dev": true,
+              "requires": {
+                "mime-db": "1.26.0"
+              }
             },
             "minimatch": {
               "version": "3.0.3",
               "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz",
-              "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q="
+              "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=",
+              "dev": true,
+              "requires": {
+                "brace-expansion": "1.1.6"
+              }
             },
             "minimist": {
               "version": "0.0.8",
               "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
-              "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
+              "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
+              "dev": true
             },
             "mkdirp": {
               "version": "0.5.1",
               "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
-              "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM="
+              "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
+              "dev": true,
+              "requires": {
+                "minimist": "0.0.8"
+              }
             },
             "ms": {
               "version": "0.7.1",
               "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
-              "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg="
+              "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=",
+              "dev": true,
+              "optional": true
             },
             "node-pre-gyp": {
               "version": "0.6.33",
               "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.33.tgz",
-              "integrity": "sha1-ZArFUZj2qSWXLgwWxKwmoDTV7Mk="
+              "integrity": "sha1-ZArFUZj2qSWXLgwWxKwmoDTV7Mk=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "mkdirp": "0.5.1",
+                "nopt": "3.0.6",
+                "npmlog": "4.0.2",
+                "rc": "1.1.7",
+                "request": "2.79.0",
+                "rimraf": "2.5.4",
+                "semver": "5.3.0",
+                "tar": "2.2.1",
+                "tar-pack": "3.3.0"
+              }
             },
             "nopt": {
               "version": "3.0.6",
               "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
-              "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k="
+              "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "abbrev": "1.1.0"
+              }
             },
             "npmlog": {
               "version": "4.0.2",
               "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.0.2.tgz",
-              "integrity": "sha1-0DlQ4OeM4VJ7om0qdZLpNIrD518="
+              "integrity": "sha1-0DlQ4OeM4VJ7om0qdZLpNIrD518=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "are-we-there-yet": "1.1.2",
+                "console-control-strings": "1.1.0",
+                "gauge": "2.7.3",
+                "set-blocking": "2.0.0"
+              }
             },
             "number-is-nan": {
               "version": "1.0.1",
               "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
-              "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
+              "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
+              "dev": true
             },
             "oauth-sign": {
               "version": "0.8.2",
               "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
-              "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM="
+              "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=",
+              "dev": true,
+              "optional": true
             },
             "object-assign": {
               "version": "4.1.1",
               "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
-              "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
+              "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
+              "dev": true,
+              "optional": true
             },
             "once": {
               "version": "1.4.0",
               "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
-              "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E="
+              "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+              "dev": true,
+              "requires": {
+                "wrappy": "1.0.2"
+              }
             },
             "path-is-absolute": {
               "version": "1.0.1",
               "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
-              "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
+              "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
+              "dev": true
             },
             "pinkie": {
               "version": "2.0.4",
               "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
-              "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA="
+              "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
+              "dev": true,
+              "optional": true
             },
             "pinkie-promise": {
               "version": "2.0.1",
               "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
-              "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o="
+              "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "pinkie": "2.0.4"
+              }
             },
             "process-nextick-args": {
               "version": "1.0.7",
               "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
-              "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M="
+              "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=",
+              "dev": true
             },
             "punycode": {
               "version": "1.4.1",
               "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
-              "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
+              "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
+              "dev": true,
+              "optional": true
             },
             "qs": {
               "version": "6.3.1",
               "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.1.tgz",
-              "integrity": "sha1-kYwLO802Z5dyuvE1say0wWUe150="
+              "integrity": "sha1-kYwLO802Z5dyuvE1say0wWUe150=",
+              "dev": true,
+              "optional": true
             },
             "rc": {
               "version": "1.1.7",
               "resolved": "https://registry.npmjs.org/rc/-/rc-1.1.7.tgz",
               "integrity": "sha1-xepWS7B6/5/TpbMukGwdOmWUD+o=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "deep-extend": "0.4.1",
+                "ini": "1.3.4",
+                "minimist": "1.2.0",
+                "strip-json-comments": "2.0.1"
+              },
               "dependencies": {
                 "minimist": {
                   "version": "1.2.0",
                   "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
-                  "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
+                  "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
+                  "dev": true,
+                  "optional": true
                 }
               }
             },
             "readable-stream": {
               "version": "2.2.2",
               "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz",
-              "integrity": "sha1-qeb+w8fdqF+LsbO6cChgRVb8gl4="
+              "integrity": "sha1-qeb+w8fdqF+LsbO6cChgRVb8gl4=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "buffer-shims": "1.0.0",
+                "core-util-is": "1.0.2",
+                "inherits": "2.0.3",
+                "isarray": "1.0.0",
+                "process-nextick-args": "1.0.7",
+                "string_decoder": "0.10.31",
+                "util-deprecate": "1.0.2"
+              }
             },
             "request": {
               "version": "2.79.0",
               "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz",
-              "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4="
+              "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "aws-sign2": "0.6.0",
+                "aws4": "1.6.0",
+                "caseless": "0.11.0",
+                "combined-stream": "1.0.5",
+                "extend": "3.0.0",
+                "forever-agent": "0.6.1",
+                "form-data": "2.1.2",
+                "har-validator": "2.0.6",
+                "hawk": "3.1.3",
+                "http-signature": "1.1.1",
+                "is-typedarray": "1.0.0",
+                "isstream": "0.1.2",
+                "json-stringify-safe": "5.0.1",
+                "mime-types": "2.1.14",
+                "oauth-sign": "0.8.2",
+                "qs": "6.3.1",
+                "stringstream": "0.0.5",
+                "tough-cookie": "2.3.2",
+                "tunnel-agent": "0.4.3",
+                "uuid": "3.0.1"
+              }
             },
             "rimraf": {
               "version": "2.5.4",
               "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz",
-              "integrity": "sha1-loAAk8vxoMhr2VtGJUZ1NcKd+gQ="
+              "integrity": "sha1-loAAk8vxoMhr2VtGJUZ1NcKd+gQ=",
+              "dev": true,
+              "requires": {
+                "glob": "7.1.1"
+              }
             },
             "semver": {
               "version": "5.3.0",
               "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
-              "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8="
+              "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
+              "dev": true,
+              "optional": true
             },
             "set-blocking": {
               "version": "2.0.0",
               "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
-              "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
+              "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
+              "dev": true,
+              "optional": true
             },
             "signal-exit": {
               "version": "3.0.2",
               "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
-              "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
+              "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
+              "dev": true,
+              "optional": true
             },
             "sntp": {
               "version": "1.0.9",
               "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
-              "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg="
+              "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "hoek": "2.16.3"
+              }
             },
             "sshpk": {
               "version": "1.10.2",
               "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.10.2.tgz",
               "integrity": "sha1-1agEziJpVRVjjnmNviMnPeBwpfo=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "asn1": "0.2.3",
+                "assert-plus": "1.0.0",
+                "bcrypt-pbkdf": "1.0.1",
+                "dashdash": "1.14.1",
+                "ecc-jsbn": "0.1.1",
+                "getpass": "0.1.6",
+                "jodid25519": "1.0.2",
+                "jsbn": "0.1.1",
+                "tweetnacl": "0.14.5"
+              },
               "dependencies": {
                 "assert-plus": {
                   "version": "1.0.0",
                   "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
-                  "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
+                  "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+                  "dev": true,
+                  "optional": true
                 }
               }
             },
             "string-width": {
               "version": "1.0.2",
               "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
-              "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M="
+              "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+              "dev": true,
+              "requires": {
+                "code-point-at": "1.1.0",
+                "is-fullwidth-code-point": "1.0.0",
+                "strip-ansi": "3.0.1"
+              }
             },
             "string_decoder": {
               "version": "0.10.31",
               "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
-              "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
+              "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
+              "dev": true
             },
             "stringstream": {
               "version": "0.0.5",
               "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
-              "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg="
+              "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=",
+              "dev": true,
+              "optional": true
             },
             "strip-ansi": {
               "version": "3.0.1",
               "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
-              "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8="
+              "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+              "dev": true,
+              "requires": {
+                "ansi-regex": "2.1.1"
+              }
             },
             "strip-json-comments": {
               "version": "2.0.1",
               "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
-              "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo="
+              "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
+              "dev": true,
+              "optional": true
             },
             "supports-color": {
               "version": "2.0.0",
               "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
-              "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
+              "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
+              "dev": true,
+              "optional": true
             },
             "tar": {
               "version": "2.2.1",
               "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
-              "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE="
+              "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=",
+              "dev": true,
+              "requires": {
+                "block-stream": "0.0.9",
+                "fstream": "1.0.10",
+                "inherits": "2.0.3"
+              }
             },
             "tar-pack": {
               "version": "3.3.0",
               "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.3.0.tgz",
               "integrity": "sha1-MJMYFkGPVa/E0hd1r91nIM7kXa4=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "debug": "2.2.0",
+                "fstream": "1.0.10",
+                "fstream-ignore": "1.0.5",
+                "once": "1.3.3",
+                "readable-stream": "2.1.5",
+                "rimraf": "2.5.4",
+                "tar": "2.2.1",
+                "uid-number": "0.0.6"
+              },
               "dependencies": {
                 "once": {
                   "version": "1.3.3",
                   "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz",
-                  "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA="
+                  "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=",
+                  "dev": true,
+                  "optional": true,
+                  "requires": {
+                    "wrappy": "1.0.2"
+                  }
                 },
                 "readable-stream": {
                   "version": "2.1.5",
                   "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz",
-                  "integrity": "sha1-ZvqLcg4UOLNkaB8q0aY8YYRIydA="
+                  "integrity": "sha1-ZvqLcg4UOLNkaB8q0aY8YYRIydA=",
+                  "dev": true,
+                  "optional": true,
+                  "requires": {
+                    "buffer-shims": "1.0.0",
+                    "core-util-is": "1.0.2",
+                    "inherits": "2.0.3",
+                    "isarray": "1.0.0",
+                    "process-nextick-args": "1.0.7",
+                    "string_decoder": "0.10.31",
+                    "util-deprecate": "1.0.2"
+                  }
                 }
               }
             },
             "tough-cookie": {
               "version": "2.3.2",
               "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz",
-              "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo="
+              "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "punycode": "1.4.1"
+              }
             },
             "tunnel-agent": {
               "version": "0.4.3",
               "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz",
-              "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us="
+              "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=",
+              "dev": true,
+              "optional": true
             },
             "tweetnacl": {
               "version": "0.14.5",
               "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
-              "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
+              "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
+              "dev": true,
+              "optional": true
             },
             "uid-number": {
               "version": "0.0.6",
               "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz",
-              "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE="
+              "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=",
+              "dev": true,
+              "optional": true
             },
             "util-deprecate": {
               "version": "1.0.2",
               "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
-              "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
+              "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
+              "dev": true
             },
             "uuid": {
               "version": "3.0.1",
               "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz",
-              "integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE="
+              "integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE=",
+              "dev": true,
+              "optional": true
             },
             "verror": {
               "version": "1.3.6",
               "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz",
-              "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw="
+              "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "extsprintf": "1.0.2"
+              }
             },
             "wide-align": {
               "version": "1.1.0",
               "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz",
-              "integrity": "sha1-QO3egCpx/qHwcNo+YtzaLnrdlq0="
+              "integrity": "sha1-QO3egCpx/qHwcNo+YtzaLnrdlq0=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "string-width": "1.0.2"
+              }
             },
             "wrappy": {
               "version": "1.0.2",
               "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
-              "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
+              "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
+              "dev": true
             },
             "xtend": {
               "version": "4.0.1",
               "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
-              "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68="
+              "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
+              "dev": true,
+              "optional": true
             }
           }
         },
         "glob": {
           "version": "7.1.2",
           "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
-          "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
+          "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=",
           "dev": true,
           "requires": {
             "fs.realpath": "1.0.0",
     "minimatch": {
       "version": "3.0.4",
       "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
-      "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+      "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=",
       "dev": true,
       "requires": {
         "brace-expansion": "1.1.7"
index b9d4b27..70f9c6b 100644 (file)
@@ -24,7 +24,7 @@
     "bootstrap-slider": "^9.8.0",
     "chosen-js": "^1.7.0",
     "ckeditor": "^4.7.2",
-    "codemirror-minified": "^5.28.0",
+    "codemirror": "^5.30.0",
     "cropper": "^2.3.4",
     "d3": "^4.10.0",
     "datatables": "^1.10.13",
index 366db35..fed9152 100644 (file)
@@ -10,4 +10,4 @@
  * 
  * The TYPO3 project - inspiring people to share!
  */
-.CodeMirror-fullscreen{top:64px}.CodeMirror-panel{background:#f7f7f7;padding:3px 6px;font-size:.85em}.CodeMirror-panel-bottom{border-top:1px solid #ddd}div.CodeMirror span.CodeMirror-matchingbracket{color:#6ca52b}
\ No newline at end of file
+.CodeMirror-fullscreen{top:64px!important}.CodeMirror-panel{background:#f7f7f7;padding:3px 6px;font-size:.85em}.CodeMirror-panel-bottom{border-top:1px solid #ddd}div.CodeMirror span.CodeMirror-matchingbracket{color:#6ca52b}
\ No newline at end of file
index 07b8fbd..1264357 100644 (file)
@@ -68,6 +68,7 @@ Anthony Grimes
 Anton Kovalyov
 Apollo Zhu
 AQNOUCH Mohammed
+Aram Shatakhtsyan
 areos
 Arnab Bose
 Arsène von Wyss
@@ -127,6 +128,7 @@ Chris Houseknecht
 Chris Lohfink
 Chris Morgan
 Chris Smith
+Christian Gruen
 Christian Oyarzun
 Christian Petrov
 Christopher Brown
@@ -136,6 +138,7 @@ Christopher Pfohl
 Chunliang Lyu
 ciaranj
 CodeAnimal
+CodeBitt
 coderaiser
 Cole R Lawrence
 ComFreek
@@ -153,6 +156,7 @@ Daniel Kesler
 Daniel KJ
 Daniel Neel
 Daniel Parnell
+Daniel Thwaites
 Danila Malyutin
 Danny Yoo
 darealshinji
@@ -211,7 +215,9 @@ ForbesLindesay
 Forbes Lindesay
 Ford_Lawnmower
 Forrest Oliphant
+Franco Catena
 Frank Wiegand
+Fredrik Borg
 Gabriel Gheorghian
 Gabriel Horner
 Gabriel Nahmias
@@ -253,6 +259,7 @@ hitsthings
 Hocdoc
 Hugues Malphettes
 Ian Beck
+Ian Davies
 Ian Dickinson
 Ian Wehrman
 Ian Wetherbee
@@ -293,6 +300,7 @@ Jason Siefken
 Jaydeep Solanki
 Jean Boussier
 Jeff Blaisdell
+Jeff Hanke
 Jeff Jenkins
 jeffkenton
 Jeff Pickhardt
@@ -314,6 +322,7 @@ John Snelson
 John Van Der Loo
 Jon Ander Peñalba
 Jonas Döbertin
+Jonas Helfer
 Jonathan Malmaud
 Jon Gacnik
 jongalloway
@@ -372,6 +381,7 @@ LloydMilligan
 LM
 lochel
 Lorenzo Stoakes
+Louis Mauchet
 Luca Fabbri
 Luciano Longo
 Lu Fangjian
@@ -438,6 +448,7 @@ Michael Goderbauer
 Michael Grey
 Michael Kaminsky
 Michael Lehenbauer
+Michael Walker
 Michael Zhou
 Michal Čihař
 Michal Dorner
@@ -456,6 +467,7 @@ misfo
 mkaminsky11
 mloginov
 Moritz Schwörer
+Moshe Wajnberg
 mps
 ms
 mtaran-google
@@ -518,6 +530,7 @@ Philipp A
 Philip Stadermann
 Pierre Gerold
 Piët Delport
+Pieter Ouwerkerk
 Pontus Melke
 prasanthj
 Prasanth J
@@ -558,6 +571,7 @@ sandeepshetty
 Sander AKA Redsandro
 Sander Verweij
 santec
+Sarah McAlear and Wenlin Zhang
 Sascha Peilicke
 satamas
 satchmorun
@@ -567,6 +581,7 @@ S. Chris Colbert
 SCLINIC\jdecker
 Scott Aikin
 Scott Goodhew
+Sebastian Wilzbach
 Sebastian Zaha
 Sergey Goder
 Sergey Tselovalnikov
@@ -594,6 +609,7 @@ Stas Kobzar
 Stefan Borsje
 Steffen Beyer
 Steffen Bruchmann
+Steffen Kowalski
 Stephen Lavelle
 Steve Champagne
 Steve Hoover
@@ -650,6 +666,7 @@ Weiyan Shao
 wenli
 Wes Cossick
 Wesley Wiser
+Weston Ruter
 Will Binns-Smith
 Will Dean
 William Jamieson
@@ -662,6 +679,7 @@ Yassin N. Hassan
 YNH Webdev
 Yunchi Luo
 Yuvi Panda
+Yvonnick Esnault
 Zac Anger
 Zachary Dremann
 Zeno Rocha
index 2c0887e..ff7d6e2 100644 (file)
@@ -1,3 +1,49 @@
+## 5.30.0 (2017-09-20)
+
+### Bug fixes
+
+Fixed a number of issues with drawing right-to-left selections and mouse selection in bidirectional text.
+
+[search addon](http://codemirror.net/demo/search/): Fix crash when restarting search after doing empty search.
+
+[mark-selection addon](http://cm/doc/manual.html#addon_mark-selection): Fix off-by-one bug.
+
+[tern addon](http://codemirror.net/demo/tern.html): Fix bad request made when editing at the bottom of a large document.
+
+[javascript mode](http://codemirror.net/mode/javascript/): Improve parsing in a number of corner cases.
+
+[markdown mode](http://codemirror.net/mode/markdown/): Fix crash when a sub-mode doesn't support indentation, allow uppercase X in task lists.
+
+[gfm mode](http://codemirror.net/mode/gfm/): Don't highlight SHA1 'hashes' without numbers to avoid false positives.
+
+[soy mode](http://codemirror.net/mode/soy/): Support injected data and `@param` in comments.
+
+### New features
+
+[simple mode addon](http://codemirror.net/demo/simplemode.html): Allow groups in regexps when `token` isn't an array.
+
+## 5.29.0 (2017-08-24)
+
+### Bug fixes
+
+Fix crash in contentEditable input style when editing near a bookmark.
+
+Make sure change origins are preserved when splitting changes on [read-only marks](http://codemirror.net/doc/manual.html#mark_readOnly).
+
+[javascript mode](http://codemirror.net/mode/javascript/): More support for TypeScript syntax.
+
+[d mode](http://codemirror.net/mode/d/): Support nested comments.
+
+[python mode](http://codemirror.net/mode/python/): Improve tokenizing of operators.
+
+[markdown mode](http://codemirror.net/mode/markdown/): Further improve CommonMark conformance.
+
+[css mode](http://codemirror.net/mode/css/): Don't run comment tokens through the mode's state machine.
+
+[shell mode](http://codemirror.net/mode/shell/): Allow strings to span lines.
+
+[search addon](http://codemirror.net/demo/search/): Fix crash in persistent search when `extraKeys` is null.
+
 ## 5.28.0 (2017-07-21)
 
 ### Bug fixes
@@ -32,7 +78,7 @@ Fix crash when using mode lookahead.
 
 ### Bug fixes
 
-Fix crash in the [simple mode](http://codemirror.net/demo/simplemode.html) addon.
+Fix crash in the [simple mode](http://codemirror.net/demo/simplemode.html)< addon.
 
 ## 5.27.0 (2017-06-22)
 
@@ -50,7 +96,7 @@ Calling the `Doc` constructor without `new` works again.
 
 [markdown mode](http://codemirror.net/mode/markdown/): Fix bug where markup was ignored on indented paragraph lines.
 
-[vim bindings](http://codemirror.net/mode/demo/vim.html): Referencing invalid registers no longer causes an uncaught exception.
+[vim bindings](http://codemirror.net/demo/vim.html): Referencing invalid registers no longer causes an uncaught exception.
 
 [rust mode](http://codemirror.net/mode/rust/): Add the correct MIME type.
 
@@ -90,7 +136,7 @@ More careful restoration of selections in widgets, during editor redraw.
 
 ### New features
 
-[vim bindings](http://codemirror.net/mode/demo/vim.html): Parse line offsets in line or range specs.
+[vim bindings](http://codemirror.net/demo/vim.html): Parse line offsets in line or range specs.
 
 ## 5.25.2 (2017-04-20)
 
@@ -148,7 +194,7 @@ Add `role=presentation` to more DOM elements to improve screen reader support.
 
 [continuelist addon](http://codemirror.net/doc/manual.html#addon_continuelist): Support continuing task lists.
 
-[vim bindings](http://codemirror.net/mode/demo/vim.html): Make Y behave like yy.
+[vim bindings](http://codemirror.net/demo/vim.html): Make Y behave like yy.
 
 [sql mode](http://codemirror.net/mode/sql/): Support sqlite dialect.
 
@@ -194,7 +240,7 @@ Fix bug in handling of read-only marked text.
 
 Positions now support a `sticky` property which determines whether they should be associated with the character before (value `"before"`) or after (value `"after"`) them.
 
-[vim bindings](http://codemirror.net/mode/demo/vim.html): Make it possible to remove built-in bindings through the API.
+[vim bindings](http://codemirror.net/demo/vim.html): Make it possible to remove built-in bindings through the API.
 
 [comment addon](http://codemirror.net/doc/manual.html#addon_comment): Support a per-mode <code>useInnerComments</code> option to optionally suppress descending to the inner modes to get comment strings.
 
index 89f2362..ff7db4b 100644 (file)
@@ -1,7 +1,6 @@
-The MIT License (MIT)
+MIT License
 
-Copyright (c) 2016 Marijn Haverbeke <marijnh@gmail.com> and others
-Copyright (c) 2016 Michael Zhou <zhoumotongxue008@gmail.com>
+Copyright (C) 2017 by Marijn Haverbeke <marijnh@gmail.com> and others
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
@@ -10,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:
 
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
 
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
index 6f61ded..a3a351b 100644 (file)
@@ -1,23 +1,35 @@
-# CodeMirror-minified
-[![Build Status](https://travis-ci.org/Dominator008/CodeMirror-minified.svg?branch=master)](https://travis-ci.org/Dominator008/CodeMirror-minified) [![npm version](https://badge.fury.io/js/codemirror-minified.svg)](https://badge.fury.io/js/codemirror-minified)
+# CodeMirror
+[![Build Status](https://travis-ci.org/codemirror/CodeMirror.svg)](https://travis-ci.org/codemirror/CodeMirror)
+[![NPM version](https://img.shields.io/npm/v/codemirror.svg)](https://www.npmjs.org/package/codemirror)
+[![Join the chat at https://gitter.im/codemirror/CodeMirror](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/codemirror/CodeMirror)  
+[Funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png?again)](https://marijnhaverbeke.nl/fund/)
 
-## About
-This is a minified [CodeMirror](https://codemirror.net) distribution. All JavaScript files have been minified with [Google Closure Compiler](https://github.com/google/closure-compiler) using `SIMPLE_OPTIMIZATIONS`, and all CSS files have been minified with [clean-css](https://github.com/jakubpawlowicz/clean-css). This projects has CodeMirror's main repository as a Git submodule and is released once per CodeMirror release using the same version number.
+CodeMirror is a versatile text editor implemented in JavaScript for
+the browser. It is specialized for editing code, and comes with over
+100 language modes and various addons that implement more advanced
+editing functionality. Every language comes with fully-featured code
+and syntax highlighting to help with reading and editing complex code.
 
-This distribution contains only the `addon`, `keymap`, `lib`, `mode` and `theme` directories. Within them, only non-test JavaScript and CSS files are included. See the ["files"](https://github.com/Dominator008/CodeMirror-minified/blob/master/package.json#L10-L22) section in `package.json` for the list of things included.
+A rich programming API and a CSS theming system are available for
+customizing CodeMirror to fit your application, and extending it with
+new functionality.
 
-## Instructions
-Just use this as if you were using the original CodeMirror library. All minified files retain their original name and location relative to CodeMirror's project root directory.
+You can find more information (and the
+[manual](http://codemirror.net/doc/manual.html)) on the [project
+page](http://codemirror.net). For questions and discussion, use the
+[discussion forum](https://discuss.codemirror.net/).
 
-An NPM package is available at https://www.npmjs.com/package/codemirror-minified. Install with:
-```sh
-npm install codemirror-minified
-```
+See
+[CONTRIBUTING.md](https://github.com/codemirror/CodeMirror/blob/master/CONTRIBUTING.md)
+for contributing guidelines.
 
-## Building it Yourself
-We use Gulp:
-```sh
-git submodule update --init
-npm install
-gulp
-```
+The CodeMirror community aims to be welcoming to everybody. We use the
+[Contributor Covenant
+(1.1)](http://contributor-covenant.org/version/1/1/0/) as our code of
+conduct.
+
+### Quickstart
+
+To build the project, make sure you have Node.js installed (at least version 6)
+and then `npm install`. To run, just open `index.html` in your
+browser (you don't need to run a webserver). Run the tests with `npm test`.
index 5b1bd7b..d6ccfdc 100644 (file)
@@ -1,8 +1 @@
-'use strict';(function(h){"object"==typeof exports&&"object"==typeof module?h(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],h):h(CodeMirror)})(function(h){function w(b){b=b.search(q);return-1==b?0:b}function E(b,d,a){return/\bstring\b/.test(b.getTokenTypeAt(k(d.line,0)))&&!/^[\'\"\`]/.test(a)}function C(b,d){var a=b.getMode();return!1!==a.useInnerComments&&a.innerMode?b.getModeAt(d):a}var A={},q=/[^\s\u00a0]/,k=h.Pos;h.commands.toggleComment=
-function(b){b.toggleComment()};h.defineExtension("toggleComment",function(b){b||(b=A);for(var d=Infinity,a=this.listSelections(),e=null,c=a.length-1;0<=c;c--){var f=a[c].from(),g=a[c].to();f.line>=d||(g.line>=d&&(g=k(d,0)),d=f.line,null==e?this.uncomment(f,g,b)?e="un":(this.lineComment(f,g,b),e="line"):"un"==e?this.uncomment(f,g,b):this.lineComment(f,g,b))}});h.defineExtension("lineComment",function(b,d,a){a||(a=A);var e=this,c=C(e,b),f=e.getLine(b.line);if(null!=f&&!E(e,b,f)){var g=a.lineComment||
-c.lineComment;if(g){var m=Math.min(0!=d.ch||d.line==b.line?d.line+1:d.line,e.lastLine()+1),h=null==a.padding?" ":a.padding,l=a.commentBlankLines||b.line==d.line;e.operation(function(){if(a.indent){for(var d=null,c=b.line;c<m;++c){var f=e.getLine(c);f=f.slice(0,w(f));if(null==d||d.length>f.length)d=f}for(c=b.line;c<m;++c){f=e.getLine(c);var n=d.length;if(l||q.test(f))f.slice(0,n)!=d&&(n=w(f)),e.replaceRange(d+g+h,k(c,0),k(c,n))}}else for(c=b.line;c<m;++c)(l||q.test(e.getLine(c)))&&e.replaceRange(g+
-h,k(c,0))})}else if(a.blockCommentStart||c.blockCommentStart)a.fullLines=!0,e.blockComment(b,d,a)}});h.defineExtension("blockComment",function(b,d,a){a||(a=A);var e=this,c=C(e,b),f=a.blockCommentStart||c.blockCommentStart,g=a.blockCommentEnd||c.blockCommentEnd;if(!f||!g)(a.lineComment||c.lineComment)&&0!=a.fullLines&&e.lineComment(b,d,a);else if(!/\bcomment\b/.test(e.getTokenTypeAt(k(b.line,0)))){var m=Math.min(d.line,e.lastLine());m!=b.line&&0==d.ch&&q.test(e.getLine(m))&&--m;var h=null==a.padding?
-" ":a.padding;b.line>m||e.operation(function(){if(0!=a.fullLines){var l=q.test(e.getLine(m));e.replaceRange(h+g,k(m));e.replaceRange(f+h,k(b.line,0));var x=a.blockCommentLead||c.blockCommentLead;if(null!=x)for(var p=b.line+1;p<=m;++p)(p!=m||l)&&e.replaceRange(x+h,k(p,0))}else e.replaceRange(g,d),e.replaceRange(f,b)})}});h.defineExtension("uncomment",function(b,d,a){a||(a=A);var e=this,c=C(e,b),f=Math.min(0!=d.ch||d.line==b.line?d.line:d.line-1,e.lastLine()),g=Math.min(b.line,f),h=a.lineComment||c.lineComment,
-w=[],l=null==a.padding?" ":a.padding,x;a:if(h){for(var p=g;p<=f;++p){var B=e.getLine(p),n=B.indexOf(h);-1<n&&!/comment/.test(e.getTokenTypeAt(k(p,n+1)))&&(n=-1);if(-1==n&&q.test(B))break a;if(-1<n&&q.test(B.slice(0,n)))break a;w.push(B)}e.operation(function(){for(var a=g;a<=f;++a){var b=w[a-g],c=b.indexOf(h),d=c+h.length;0>c||(b.slice(d,d+l.length)==l&&(d+=l.length),x=!0,e.replaceRange("",k(a,c),k(a,d)))}});if(x)return!0}var u=a.blockCommentStart||c.blockCommentStart,r=a.blockCommentEnd||c.blockCommentEnd;
-if(!u||!r)return!1;var D=a.blockCommentLead||c.blockCommentLead,y=e.getLine(g),z=y.indexOf(u);if(-1==z)return!1;var v=f==g?y:e.getLine(f),t=v.indexOf(r,f==g?z+u.length:0);-1==t&&g!=f&&(v=e.getLine(--f),t=v.indexOf(r));a=k(g,z+1);c=k(f,t+1);if(-1==t||!/comment/.test(e.getTokenTypeAt(a))||!/comment/.test(e.getTokenTypeAt(c))||-1<e.getRange(a,c,"\n").indexOf(r))return!1;c=y.lastIndexOf(u,b.ch);a=-1==c?-1:y.slice(0,b.ch).indexOf(r,c+u.length);if(-1!=c&&-1!=a&&a+r.length!=b.ch)return!1;a=v.indexOf(r,d.ch);
-b=v.slice(d.ch).lastIndexOf(u,a-d.ch);c=-1==a||-1==b?-1:d.ch+b;if(-1!=a&&-1!=c&&c!=d.ch)return!1;e.operation(function(){e.replaceRange("",k(f,t-(l&&v.slice(t-l.length,t)==l?l.length:0)),k(f,t+r.length));var a=z+u.length;l&&y.slice(a,a+l.length)==l&&(a+=l.length);e.replaceRange("",k(g,z),k(g,a));if(D)for(a=g+1;a<=f;++a){var b=e.getLine(a),c=b.indexOf(D);if(-1!=c&&!q.test(b.slice(0,c))){var d=c+D.length;l&&b.slice(d,d+l.length)==l&&(d+=l.length);e.replaceRange("",k(a,c),k(a,d))}}});return!0})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){var b=a.search(f);return b==-1?0:b}function c(a,b,c){return/\bstring\b/.test(a.getTokenTypeAt(g(b.line,0)))&&!/^[\'\"\`]/.test(c)}function d(a,b){var c=a.getMode();return c.useInnerComments!==!1&&c.innerMode?a.getModeAt(b):c}var e={},f=/[^\s\u00a0]/,g=a.Pos;a.commands.toggleComment=function(a){a.toggleComment()},a.defineExtension("toggleComment",function(a){a||(a=e);for(var b=this,c=1/0,d=this.listSelections(),f=null,h=d.length-1;h>=0;h--){var i=d[h].from(),j=d[h].to();i.line>=c||(j.line>=c&&(j=g(c,0)),c=i.line,null==f?b.uncomment(i,j,a)?f="un":(b.lineComment(i,j,a),f="line"):"un"==f?b.uncomment(i,j,a):b.lineComment(i,j,a))}}),a.defineExtension("lineComment",function(a,h,i){i||(i=e);var j=this,k=d(j,a),l=j.getLine(a.line);if(null!=l&&!c(j,a,l)){var m=i.lineComment||k.lineComment;if(!m)return void((i.blockCommentStart||k.blockCommentStart)&&(i.fullLines=!0,j.blockComment(a,h,i)));var n=Math.min(0!=h.ch||h.line==a.line?h.line+1:h.line,j.lastLine()+1),o=null==i.padding?" ":i.padding,p=i.commentBlankLines||a.line==h.line;j.operation(function(){if(i.indent){for(var c=null,d=a.line;d<n;++d){var e=j.getLine(d),h=e.slice(0,b(e));(null==c||c.length>h.length)&&(c=h)}for(var d=a.line;d<n;++d){var e=j.getLine(d),k=c.length;(p||f.test(e))&&(e.slice(0,k)!=c&&(k=b(e)),j.replaceRange(c+m+o,g(d,0),g(d,k)))}}else for(var d=a.line;d<n;++d)(p||f.test(j.getLine(d)))&&j.replaceRange(m+o,g(d,0))})}}),a.defineExtension("blockComment",function(a,b,c){c||(c=e);var h=this,i=d(h,a),j=c.blockCommentStart||i.blockCommentStart,k=c.blockCommentEnd||i.blockCommentEnd;if(!j||!k)return void((c.lineComment||i.lineComment)&&0!=c.fullLines&&h.lineComment(a,b,c));if(!/\bcomment\b/.test(h.getTokenTypeAt(g(a.line,0)))){var l=Math.min(b.line,h.lastLine());l!=a.line&&0==b.ch&&f.test(h.getLine(l))&&--l;var m=null==c.padding?" ":c.padding;a.line>l||h.operation(function(){if(0!=c.fullLines){var d=f.test(h.getLine(l));h.replaceRange(m+k,g(l)),h.replaceRange(j+m,g(a.line,0));var e=c.blockCommentLead||i.blockCommentLead;if(null!=e)for(var n=a.line+1;n<=l;++n)(n!=l||d)&&h.replaceRange(e+m,g(n,0))}else h.replaceRange(k,b),h.replaceRange(j,a)})}}),a.defineExtension("uncomment",function(a,b,c){c||(c=e);var h,i=this,j=d(i,a),k=Math.min(0!=b.ch||b.line==a.line?b.line:b.line-1,i.lastLine()),l=Math.min(a.line,k),m=c.lineComment||j.lineComment,n=[],o=null==c.padding?" ":c.padding;a:if(m){for(var p=l;p<=k;++p){var q=i.getLine(p),r=q.indexOf(m);if(r>-1&&!/comment/.test(i.getTokenTypeAt(g(p,r+1)))&&(r=-1),r==-1&&f.test(q))break a;if(r>-1&&f.test(q.slice(0,r)))break a;n.push(q)}if(i.operation(function(){for(var a=l;a<=k;++a){var b=n[a-l],c=b.indexOf(m),d=c+m.length;c<0||(b.slice(d,d+o.length)==o&&(d+=o.length),h=!0,i.replaceRange("",g(a,c),g(a,d)))}}),h)return!0}var s=c.blockCommentStart||j.blockCommentStart,t=c.blockCommentEnd||j.blockCommentEnd;if(!s||!t)return!1;var u=c.blockCommentLead||j.blockCommentLead,v=i.getLine(l),w=v.indexOf(s);if(w==-1)return!1;var x=k==l?v:i.getLine(k),y=x.indexOf(t,k==l?w+s.length:0);y==-1&&l!=k&&(x=i.getLine(--k),y=x.indexOf(t));var z=g(l,w+1),A=g(k,y+1);if(y==-1||!/comment/.test(i.getTokenTypeAt(z))||!/comment/.test(i.getTokenTypeAt(A))||i.getRange(z,A,"\n").indexOf(t)>-1)return!1;var B=v.lastIndexOf(s,a.ch),C=B==-1?-1:v.slice(0,a.ch).indexOf(t,B+s.length);if(B!=-1&&C!=-1&&C+t.length!=a.ch)return!1;C=x.indexOf(t,b.ch);var D=x.slice(b.ch).lastIndexOf(s,C-b.ch);return B=C==-1||D==-1?-1:b.ch+D,(C==-1||B==-1||B==b.ch)&&(i.operation(function(){i.replaceRange("",g(k,y-(o&&x.slice(y-o.length,y)==o?o.length:0)),g(k,y+t.length));var a=w+s.length;if(o&&v.slice(a,a+o.length)==o&&(a+=o.length),i.replaceRange("",g(l,w),g(l,a)),u)for(var b=l+1;b<=k;++b){var c=i.getLine(b),d=c.indexOf(u);if(d!=-1&&!f.test(c.slice(0,d))){var e=d+u.length;o&&c.slice(e,e+o.length)==o&&(e+=o.length),i.replaceRange("",g(b,d),g(b,e))}}}),!0)})});
\ No newline at end of file
index 7ac5577..786554d 100644 (file)
@@ -1,4 +1 @@
-'use strict';(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){function q(b){var a;if(b.getOption("disableInput"))return e.Pass;for(var f=b.listSelections(),d,l=[],m=0;m<f.length;m++){var g=f[m].head,h=b.getTokenAt(g);if("comment"!=h.type)return e.Pass;var c=e.innerMode(b.getMode(),h.state).mode;if(!d)d=c;else if(d!=c)return e.Pass;c=null;if(d.blockCommentStart&&
-d.blockCommentContinue){var k=h.string.indexOf(d.blockCommentEnd),n=b.getRange(e.Pos(g.line,0),e.Pos(g.line,h.end));if(!(-1!=k&&k==h.string.length-d.blockCommentEnd.length&&g.ch>=k))if(0==h.string.indexOf(d.blockCommentStart)){if(c=n.slice(0,h.start),!/^\s*$/.test(c))for(c="",k=0;k<h.start;++k)c+=" "}else-1!=(a=n.indexOf(d.blockCommentContinue))&&a+d.blockCommentContinue.length>h.start&&/^\s*$/.test(n.slice(0,a))&&(c=n.slice(0,a));null!=c&&(c+=d.blockCommentContinue)}null==c&&d.lineComment&&r(b)&&
-(g=b.getLine(g.line),a=g.indexOf(d.lineComment),-1<a&&(c=g.slice(0,a),c=/\S/.test(c)?null:c+(d.lineComment+g.slice(a+d.lineComment.length).match(/^\s*/)[0])));if(null==c)return e.Pass;l[m]="\n"+c}b.operation(function(){for(var a=f.length-1;0<=a;a--)b.replaceRange(l[a],f[a].from(),f[a].to(),"+insert")})}function r(b){return(b=b.getOption("continueComments"))&&"object"==typeof b?!1!==b.continueLineComment:!0}for(var p=["clike","css","javascript"],l=0;l<p.length;++l)e.extendMode(p[l],{blockCommentContinue:" * "});
-e.defineOption("continueComments",null,function(b,a,f){f&&f!=e.Init&&b.removeKeyMap("continueComment");a&&(f="Enter","string"==typeof a?f=a:"object"==typeof a&&a.key&&(f=a.key),a={name:"continueComment"},a[f]=q,b.addKeyMap(a))})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(b){if(b.getOption("disableInput"))return a.Pass;for(var d,e=b.listSelections(),f=[],g=0;g<e.length;g++){var h=e[g].head;if(!/\bcomment\b/.test(b.getTokenTypeAt(h)))return a.Pass;var i=b.getModeAt(h);if(d){if(d!=i)return a.Pass}else d=i;var j=null;if(d.blockCommentStart&&d.blockCommentContinue){var k,l=b.getLine(h.line).slice(0,h.ch),m=l.indexOf(d.blockCommentEnd);if(m!=-1&&m==h.ch-d.blockCommentEnd.length);else if((k=l.indexOf(d.blockCommentStart))>-1){if(j=l.slice(0,k),/\S/.test(j)){j="";for(var n=0;n<k;++n)j+=" "}}else(k=l.indexOf(d.blockCommentContinue))>-1&&!/\S/.test(l.slice(0,k))&&(j=l.slice(0,k));null!=j&&(j+=d.blockCommentContinue)}if(null==j&&d.lineComment&&c(b)){var l=b.getLine(h.line),k=l.indexOf(d.lineComment);k>-1&&(j=l.slice(0,k),/\S/.test(j)?j=null:j+=d.lineComment+l.slice(k+d.lineComment.length).match(/^\s*/)[0])}if(null==j)return a.Pass;f[g]="\n"+j}b.operation(function(){for(var a=e.length-1;a>=0;a--)b.replaceRange(f[a],e[a].from(),e[a].to(),"+insert")})}function c(a){var b=a.getOption("continueComments");return!b||"object"!=typeof b||b.continueLineComment!==!1}for(var d=["clike","css","javascript"],e=0;e<d.length;++e)a.extendMode(d[e],{blockCommentContinue:" * "});a.defineOption("continueComments",null,function(c,d,e){if(e&&e!=a.Init&&c.removeKeyMap("continueComment"),d){var f="Enter";"string"==typeof d?f=d:"object"==typeof d&&d.key&&(f=d.key);var g={name:"continueComment"};g[f]=b,c.addKeyMap(g)}})});
\ No newline at end of file
index 9f33bea..677c078 100644 (file)
@@ -1 +1,32 @@
-.CodeMirror-dialog{position:absolute;left:0;right:0;background:inherit;z-index:15;padding:.1em .8em;overflow:hidden;color:inherit}.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.CodeMirror-dialog input{border:none;outline:0;background:0 0;width:20em;color:inherit;font-family:monospace}.CodeMirror-dialog button{font-size:70%}
\ No newline at end of file
+.CodeMirror-dialog {
+  position: absolute;
+  left: 0; right: 0;
+  background: inherit;
+  z-index: 15;
+  padding: .1em .8em;
+  overflow: hidden;
+  color: inherit;
+}
+
+.CodeMirror-dialog-top {
+  border-bottom: 1px solid #eee;
+  top: 0;
+}
+
+.CodeMirror-dialog-bottom {
+  border-top: 1px solid #eee;
+  bottom: 0;
+}
+
+.CodeMirror-dialog input {
+  border: none;
+  outline: none;
+  background: transparent;
+  width: 20em;
+  color: inherit;
+  font-family: monospace;
+}
+
+.CodeMirror-dialog button {
+  font-size: 70%;
+}
index 1c01cbd..5f1f6af 100644 (file)
@@ -1,5 +1 @@
-'use strict';(function(c){"object"==typeof exports&&"object"==typeof module?c(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],c):c(CodeMirror)})(function(c){function l(a,c,b){a=a.getWrapperElement().appendChild(document.createElement("div"));a.className=b?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top";"string"==typeof c?a.innerHTML=c:a.appendChild(c);return a}function m(a,c){a.state.currentNotificationClose&&
-a.state.currentNotificationClose();a.state.currentNotificationClose=c}c.defineExtension("openDialog",function(a,g,b){function e(a){if("string"==typeof a)d.value=a;else if(!h&&(h=!0,f.parentNode.removeChild(f),k.focus(),b.onClose))b.onClose(f)}b||(b={});m(this,null);var f=l(this,a,b.bottom),h=!1,k=this,d=f.getElementsByTagName("input")[0];if(d){d.focus();b.value&&(d.value=b.value,!1!==b.selectValueOnOpen&&d.select());if(b.onInput)c.on(d,"input",function(a){b.onInput(a,d.value,e)});if(b.onKeyUp)c.on(d,
-"keyup",function(a){b.onKeyUp(a,d.value,e)});c.on(d,"keydown",function(a){if(!(b&&b.onKeyDown&&b.onKeyDown(a,d.value,e))){if(27==a.keyCode||!1!==b.closeOnEnter&&13==a.keyCode)d.blur(),c.e_stop(a),e();13==a.keyCode&&g(d.value,a)}});if(!1!==b.closeOnBlur)c.on(d,"blur",e)}else if(a=f.getElementsByTagName("button")[0]){c.on(a,"click",function(){e();k.focus()});if(!1!==b.closeOnBlur)c.on(a,"blur",e);a.focus()}return e});c.defineExtension("openConfirm",function(a,g,b){function e(){h||(h=!0,f.parentNode.removeChild(f),
-k.focus())}m(this,null);var f=l(this,a,b&&b.bottom);a=f.getElementsByTagName("button");var h=!1,k=this,d=1;a[0].focus();for(b=0;b<a.length;++b){var n=a[b];(function(a){c.on(n,"click",function(b){c.e_preventDefault(b);e();a&&a(k)})})(g[b]);c.on(n,"blur",function(){--d;setTimeout(function(){0>=d&&e()},200)});c.on(n,"focus",function(){++d})}});c.defineExtension("openNotification",function(a,g){function b(){f||(f=!0,clearTimeout(h),e.parentNode.removeChild(e))}m(this,b);var e=l(this,a,g&&g.bottom),f=
-!1,h;a=g&&"undefined"!==typeof g.duration?g.duration:5E3;c.on(e,"click",function(a){c.e_preventDefault(a);b()});a&&(h=setTimeout(b,a));return b})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a,b,c){var d,e=a.getWrapperElement();return d=e.appendChild(document.createElement("div")),c?d.className="CodeMirror-dialog CodeMirror-dialog-bottom":d.className="CodeMirror-dialog CodeMirror-dialog-top","string"==typeof b?d.innerHTML=b:d.appendChild(b),d}function c(a,b){a.state.currentNotificationClose&&a.state.currentNotificationClose(),a.state.currentNotificationClose=b}a.defineExtension("openDialog",function(d,e,f){function g(a){if("string"==typeof a)l.value=a;else{if(j)return;j=!0,i.parentNode.removeChild(i),k.focus(),f.onClose&&f.onClose(i)}}f||(f={}),c(this,null);var h,i=b(this,d,f.bottom),j=!1,k=this,l=i.getElementsByTagName("input")[0];return l?(l.focus(),f.value&&(l.value=f.value,f.selectValueOnOpen!==!1&&l.select()),f.onInput&&a.on(l,"input",function(a){f.onInput(a,l.value,g)}),f.onKeyUp&&a.on(l,"keyup",function(a){f.onKeyUp(a,l.value,g)}),a.on(l,"keydown",function(b){f&&f.onKeyDown&&f.onKeyDown(b,l.value,g)||((27==b.keyCode||f.closeOnEnter!==!1&&13==b.keyCode)&&(l.blur(),a.e_stop(b),g()),13==b.keyCode&&e(l.value,b))}),f.closeOnBlur!==!1&&a.on(l,"blur",g)):(h=i.getElementsByTagName("button")[0])&&(a.on(h,"click",function(){g(),k.focus()}),f.closeOnBlur!==!1&&a.on(h,"blur",g),h.focus()),g}),a.defineExtension("openConfirm",function(d,e,f){function g(){j||(j=!0,h.parentNode.removeChild(h),k.focus())}c(this,null);var h=b(this,d,f&&f.bottom),i=h.getElementsByTagName("button"),j=!1,k=this,l=1;i[0].focus();for(var m=0;m<i.length;++m){var n=i[m];!function(b){a.on(n,"click",function(c){a.e_preventDefault(c),g(),b&&b(k)})}(e[m]),a.on(n,"blur",function(){--l,setTimeout(function(){l<=0&&g()},200)}),a.on(n,"focus",function(){++l})}}),a.defineExtension("openNotification",function(d,e){function f(){i||(i=!0,clearTimeout(g),h.parentNode.removeChild(h))}c(this,f);var g,h=b(this,d,e&&e.bottom),i=!1,j=e&&"undefined"!=typeof e.duration?e.duration:5e3;return a.on(h,"click",function(b){a.e_preventDefault(b),f()}),j&&(g=setTimeout(f,j)),f})});
\ No newline at end of file
index a65ade5..c72c06b 100644 (file)
@@ -1,2 +1 @@
-'use strict';(function(c){"object"==typeof exports&&"object"==typeof module?c(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],c):c(CodeMirror)})(function(c){function f(b,a){function d(){b.display.wrapper.offsetHeight?(e(b,a),b.display.lastWrapHeight!=b.display.wrapper.clientHeight&&b.refresh()):a.timeout=setTimeout(d,a.delay)}a.timeout=setTimeout(d,a.delay);a.hurry=function(){clearTimeout(a.timeout);a.timeout=setTimeout(d,50)};c.on(window,"mouseup",
-a.hurry);c.on(window,"keyup",a.hurry)}function e(b,a){clearTimeout(a.timeout);c.off(window,"mouseup",a.hurry);c.off(window,"keyup",a.hurry)}c.defineOption("autoRefresh",!1,function(b,a){b.state.autoRefresh&&(e(b,b.state.autoRefresh),b.state.autoRefresh=null);a&&0==b.display.wrapper.offsetHeight&&f(b,b.state.autoRefresh={delay:a.delay||250})})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(b,d){function e(){b.display.wrapper.offsetHeight?(c(b,d),b.display.lastWrapHeight!=b.display.wrapper.clientHeight&&b.refresh()):d.timeout=setTimeout(e,d.delay)}d.timeout=setTimeout(e,d.delay),d.hurry=function(){clearTimeout(d.timeout),d.timeout=setTimeout(e,50)},a.on(window,"mouseup",d.hurry),a.on(window,"keyup",d.hurry)}function c(b,c){clearTimeout(c.timeout),a.off(window,"mouseup",c.hurry),a.off(window,"keyup",c.hurry)}a.defineOption("autoRefresh",!1,function(a,d){a.state.autoRefresh&&(c(a,a.state.autoRefresh),a.state.autoRefresh=null),d&&0==a.display.wrapper.offsetHeight&&b(a,a.state.autoRefresh={delay:d.delay||250})})});
\ No newline at end of file
index a414b02..437acd8 100644 (file)
@@ -1 +1,6 @@
-.CodeMirror-fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;height:auto;z-index:9}
\ No newline at end of file
+.CodeMirror-fullscreen {
+  position: fixed;
+  top: 0; left: 0; right: 0; bottom: 0;
+  height: auto;
+  z-index: 9;
+}
index a69e808..2c97706 100644 (file)
@@ -1,2 +1 @@
-'use strict';(function(c){"object"==typeof exports&&"object"==typeof module?c(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],c):c(CodeMirror)})(function(c){c.defineOption("fullScreen",!1,function(d,a,b){b==c.Init&&(b=!1);!b!=!a&&(a?(a=d.getWrapperElement(),d.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:a.style.width,height:a.style.height},a.style.width="",a.style.height="auto",a.className+=" CodeMirror-fullscreen",
-document.documentElement.style.overflow="hidden"):(a=d.getWrapperElement(),a.className=a.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="",b=d.state.fullScreenRestore,a.style.width=b.width,a.style.height=b.height,window.scrollTo(b.scrollLeft,b.scrollTop)),d.refresh())})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){var b=a.getWrapperElement();a.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:b.style.width,height:b.style.height},b.style.width="",b.style.height="auto",b.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",a.refresh()}function c(a){var b=a.getWrapperElement();b.className=b.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var c=a.state.fullScreenRestore;b.style.width=c.width,b.style.height=c.height,window.scrollTo(c.scrollLeft,c.scrollTop),a.refresh()}a.defineOption("fullScreen",!1,function(d,e,f){f==a.Init&&(f=!1),!f!=!e&&(e?b(d):c(d))})});
\ No newline at end of file
index 6c61932..c8c4819 100644 (file)
@@ -1,5 +1 @@
-'use strict';(function(g){"object"==typeof exports&&"object"==typeof module?g(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],g):g(CodeMirror)})(function(g){function f(b,a,c,d){this.cm=b;this.node=a;this.options=c;this.height=d;this.cleared=!1}function k(b){var a=b.getWrapperElement(),c=window.getComputedStyle?window.getComputedStyle(a):a.currentStyle,d=parseInt(c.height),e=b.state.panels={setHeight:a.style.height,heightLeft:d,panels:0,wrapper:document.createElement("div")};
-a.parentNode.insertBefore(e.wrapper,a);c=b.hasFocus();e.wrapper.appendChild(a);c&&b.focus();b._setSize=b.setSize;null!=d&&(b.setSize=function(a,c){if(null==c)return this._setSize(a,c);e.setHeight=c;if("number"!=typeof c){var f=/^(\d+\.?\d*)px$/.exec(c);f?c=Number(f[1]):(e.wrapper.style.height=c,c=e.wrapper.offsetHeight,e.wrapper.style.height="")}b._setSize(a,e.heightLeft+=c-d);d=c})}function h(b,a){for(a=a.nextSibling;a;a=a.nextSibling)if(a==b.getWrapperElement())return!0;return!1}g.defineExtension("addPanel",
-function(b,a){a=a||{};this.state.panels||k(this);var c=this.state.panels,d=c.wrapper,e=this.getWrapperElement();a.after instanceof f&&!a.after.cleared?d.insertBefore(b,a.before.node.nextSibling):a.before instanceof f&&!a.before.cleared?d.insertBefore(b,a.before.node):a.replace instanceof f&&!a.replace.cleared?(d.insertBefore(b,a.replace.node),a.replace.clear()):"bottom"==a.position?d.appendChild(b):"before-bottom"==a.position?d.insertBefore(b,e.nextSibling):"after-top"==a.position?d.insertBefore(b,
-e):d.insertBefore(b,d.firstChild);d=a&&a.height||b.offsetHeight;this._setSize(null,c.heightLeft-=d);c.panels++;a.stable&&h(this,b)&&this.scrollTo(null,this.getScrollInfo().top+d);return new f(this,b,a,d)});f.prototype.clear=function(){if(!this.cleared){this.cleared=!0;var b=this.cm.state.panels;this.cm._setSize(null,b.heightLeft+=this.height);this.options.stable&&h(this.cm,this.node)&&this.cm.scrollTo(null,this.cm.getScrollInfo().top-this.height);b.wrapper.removeChild(this.node);if(0==--b.panels){var b=
-this.cm,a=b.state.panels;b.state.panels=null;var c=b.getWrapperElement();a.wrapper.parentNode.replaceChild(c,a.wrapper);c.style.height=a.setHeight;b.setSize=b._setSize;b.setSize()}}};f.prototype.changed=function(b){b=null==b?this.node.offsetHeight:b;this.cm._setSize(null,this.cm.state.panels.heightLeft-=b-this.height);this.height=b}});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a,b,c,d){this.cm=a,this.node=b,this.options=c,this.height=d,this.cleared=!1}function c(a){var b=a.getWrapperElement(),c=window.getComputedStyle?window.getComputedStyle(b):b.currentStyle,d=parseInt(c.height),e=a.state.panels={setHeight:b.style.height,heightLeft:d,panels:0,wrapper:document.createElement("div")};b.parentNode.insertBefore(e.wrapper,b);var f=a.hasFocus();e.wrapper.appendChild(b),f&&a.focus(),a._setSize=a.setSize,null!=d&&(a.setSize=function(b,c){if(null==c)return this._setSize(b,c);if(e.setHeight=c,"number"!=typeof c){var f=/^(\d+\.?\d*)px$/.exec(c);f?c=Number(f[1]):(e.wrapper.style.height=c,c=e.wrapper.offsetHeight,e.wrapper.style.height="")}a._setSize(b,e.heightLeft+=c-d),d=c})}function d(a){var b=a.state.panels;a.state.panels=null;var c=a.getWrapperElement();b.wrapper.parentNode.replaceChild(c,b.wrapper),c.style.height=b.setHeight,a.setSize=a._setSize,a.setSize()}function e(a,b){for(var c=b.nextSibling;c;c=c.nextSibling)if(c==a.getWrapperElement())return!0;return!1}a.defineExtension("addPanel",function(a,d){d=d||{},this.state.panels||c(this);var f=this.state.panels,g=f.wrapper,h=this.getWrapperElement();d.after instanceof b&&!d.after.cleared?g.insertBefore(a,d.before.node.nextSibling):d.before instanceof b&&!d.before.cleared?g.insertBefore(a,d.before.node):d.replace instanceof b&&!d.replace.cleared?(g.insertBefore(a,d.replace.node),d.replace.clear()):"bottom"==d.position?g.appendChild(a):"before-bottom"==d.position?g.insertBefore(a,h.nextSibling):"after-top"==d.position?g.insertBefore(a,h):g.insertBefore(a,g.firstChild);var i=d&&d.height||a.offsetHeight;return this._setSize(null,f.heightLeft-=i),f.panels++,d.stable&&e(this,a)&&this.scrollTo(null,this.getScrollInfo().top+i),new b(this,a,d,i)}),b.prototype.clear=function(){if(!this.cleared){this.cleared=!0;var a=this.cm.state.panels;this.cm._setSize(null,a.heightLeft+=this.height),this.options.stable&&e(this.cm,this.node)&&this.cm.scrollTo(null,this.cm.getScrollInfo().top-this.height),a.wrapper.removeChild(this.node),0==--a.panels&&d(this.cm)}},b.prototype.changed=function(a){var b=null==a?this.node.offsetHeight:a,c=this.cm.state.panels;this.cm._setSize(null,c.heightLeft-=b-this.height),this.height=b}});
\ No newline at end of file
index 07c2090..6e7e9d0 100644 (file)
@@ -1,3 +1 @@
-'use strict';(function(d){"object"==typeof exports&&"object"==typeof module?d(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],d):d(CodeMirror)})(function(d){function f(a){a.state.placeholder&&(a.state.placeholder.parentNode.removeChild(a.state.placeholder),a.state.placeholder=null)}function h(a){f(a);var c=a.state.placeholder=document.createElement("pre");c.style.cssText="height: 0; overflow: visible";c.className="CodeMirror-placeholder";var b=
-a.getOption("placeholder");"string"==typeof b&&(b=document.createTextNode(b));c.appendChild(b);a.display.lineSpace.insertBefore(c,a.display.lineSpace.firstChild)}function g(a){k(a)&&h(a)}function e(a){var c=a.getWrapperElement(),b=k(a);c.className=c.className.replace(" CodeMirror-empty","")+(b?" CodeMirror-empty":"");b?h(a):f(a)}function k(a){return 1===a.lineCount()&&""===a.getLine(0)}d.defineOption("placeholder","",function(a,c,b){b=b&&b!=d.Init;c&&!b?(a.on("blur",g),a.on("change",e),a.on("swapDoc",
-e),e(a)):!c&&b&&(a.off("blur",g),a.off("change",e),a.off("swapDoc",e),f(a),b=a.getWrapperElement(),b.className=b.className.replace(" CodeMirror-empty",""));c&&!a.hasFocus()&&g(a)})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a){a.state.placeholder&&(a.state.placeholder.parentNode.removeChild(a.state.placeholder),a.state.placeholder=null)}function c(a){b(a);var c=a.state.placeholder=document.createElement("pre");c.style.cssText="height: 0; overflow: visible",c.className="CodeMirror-placeholder";var d=a.getOption("placeholder");"string"==typeof d&&(d=document.createTextNode(d)),c.appendChild(d),a.display.lineSpace.insertBefore(c,a.display.lineSpace.firstChild)}function d(a){f(a)&&c(a)}function e(a){var d=a.getWrapperElement(),e=f(a);d.className=d.className.replace(" CodeMirror-empty","")+(e?" CodeMirror-empty":""),e?c(a):b(a)}function f(a){return 1===a.lineCount()&&""===a.getLine(0)}a.defineOption("placeholder","",function(c,f,g){var h=g&&g!=a.Init;if(f&&!h)c.on("blur",d),c.on("change",e),c.on("swapDoc",e),e(c);else if(!f&&h){c.off("blur",d),c.off("change",e),c.off("swapDoc",e),b(c);var i=c.getWrapperElement();i.className=i.className.replace(" CodeMirror-empty","")}f&&!c.hasFocus()&&d(c)})});
\ No newline at end of file
index 9eddd08..2d965eb 100644 (file)
@@ -1,3 +1 @@
-'use strict';(function(c){"object"==typeof exports&&"object"==typeof module?c(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],c):c(CodeMirror)})(function(c){function e(a){a.state.rulerDiv.textContent="";var g=a.getOption("rulers"),e=a.defaultCharWidth(),k=a.charCoords(c.Pos(a.firstLine(),0),"div").left;a.state.rulerDiv.style.minHeight=a.display.scroller.offsetHeight+30+"px";for(var f=0;f<g.length;f++){var d=document.createElement("div");d.className=
-"CodeMirror-ruler";var b=g[f];if("number"==typeof b)var h=b;else h=b.column,b.className&&(d.className+=" "+b.className),b.color&&(d.style.borderColor=b.color),b.lineStyle&&(d.style.borderLeftStyle=b.lineStyle),b.width&&(d.style.borderLeftWidth=b.width);d.style.left=k+h*e+"px";a.state.rulerDiv.appendChild(d)}}c.defineOption("rulers",!1,function(a,c){a.state.rulerDiv&&(a.state.rulerDiv.parentElement.removeChild(a.state.rulerDiv),a.state.rulerDiv=null,a.off("refresh",e));c&&c.length&&(a.state.rulerDiv=
-a.display.lineSpace.parentElement.insertBefore(document.createElement("div"),a.display.lineSpace),a.state.rulerDiv.className="CodeMirror-rulers",e(a),a.on("refresh",e))})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(b){b.state.rulerDiv.textContent="";var c=b.getOption("rulers"),d=b.defaultCharWidth(),e=b.charCoords(a.Pos(b.firstLine(),0),"div").left;b.state.rulerDiv.style.minHeight=b.display.scroller.offsetHeight+30+"px";for(var f=0;f<c.length;f++){var g=document.createElement("div");g.className="CodeMirror-ruler";var h,i=c[f];"number"==typeof i?h=i:(h=i.column,i.className&&(g.className+=" "+i.className),i.color&&(g.style.borderColor=i.color),i.lineStyle&&(g.style.borderLeftStyle=i.lineStyle),i.width&&(g.style.borderLeftWidth=i.width)),g.style.left=e+h*d+"px",b.state.rulerDiv.appendChild(g)}}a.defineOption("rulers",!1,function(a,c){a.state.rulerDiv&&(a.state.rulerDiv.parentElement.removeChild(a.state.rulerDiv),a.state.rulerDiv=null,a.off("refresh",b)),c&&c.length&&(a.state.rulerDiv=a.display.lineSpace.parentElement.insertBefore(document.createElement("div"),a.display.lineSpace),a.state.rulerDiv.className="CodeMirror-rulers",b(a),a.on("refresh",b))})});
\ No newline at end of file
index ab24c8b..424a194 100644 (file)
@@ -1,7 +1 @@
-'use strict';(function(f){"object"==typeof exports&&"object"==typeof module?f(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],f):f(CodeMirror)})(function(f){function r(b,a){return"pairs"==a&&"string"==typeof b?b:"object"==typeof b&&null!=b[a]?b[a]:w[a]}function A(b){return function(a){return B(a,b)}}function v(b){var a=b.state.closeBrackets;return!a||a.override?a:b.getModeAt(b.getCursor()).closeBrackets||a}function B(b,a){var c=v(b);if(!c||b.getOption("disableInput"))return f.Pass;
-var d=r(c,"pairs"),e=d.indexOf(a);if(-1==e)return f.Pass;for(var c=r(c,"triples"),t=d.charAt(e+1)==a,x=b.listSelections(),m=0==e%2,l,p=0;p<x.length;p++){var h=x[p],g=h.head,u=b.getRange(g,k(g.line,g.ch+1));if(m&&!h.empty())h="surround";else if(!t&&m||u!=a)if(t&&1<g.ch&&0<=c.indexOf(a)&&b.getRange(k(g.line,g.ch-2),g)==a+a&&(2>=g.ch||b.getRange(k(g.line,g.ch-3),k(g.line,g.ch-2))!=a))h="addFour";else if(t)if(!f.isWordChar(u)&&C(b,g,a))h="both";else return f.Pass;else if(m&&(b.getLine(g.line).length==
-g.ch||D(u,d)||/\s/.test(u)))h="both";else return f.Pass;else h=t&&y(b,g)?"both":0<=c.indexOf(a)&&b.getRange(g,k(g.line,g.ch+3))==a+a+a?"skipThree":"skip";if(!l)l=h;else if(l!=h)return f.Pass}var n=e%2?d.charAt(e-1):a,q=e%2?a:d.charAt(e+1);b.operation(function(){if("skip"==l)b.execCommand("goCharRight");else if("skipThree"==l)for(var a=0;3>a;a++)b.execCommand("goCharRight");else if("surround"==l){for(var c=b.getSelections(),a=0;a<c.length;a++)c[a]=n+c[a]+q;b.replaceSelections(c,"around");c=b.listSelections().slice();
-for(a=0;a<c.length;a++){var d=c,g=a;var e=c[a];var h=0<f.cmpPos(e.anchor,e.head);e={anchor:new k(e.anchor.line,e.anchor.ch+(h?-1:1)),head:new k(e.head.line,e.head.ch+(h?1:-1))};d[g]=e}b.setSelections(c)}else"both"==l?(b.replaceSelection(n+q,null),b.triggerElectric(n+q),b.execCommand("goCharLeft")):"addFour"==l&&(b.replaceSelection(n+n+n+n,"before"),b.execCommand("goCharRight"))})}function D(b,a){b=a.lastIndexOf(b);return-1<b&&1==b%2}function z(b,a){b=b.getRange(k(a.line,a.ch-1),k(a.line,a.ch+1));
-return 2==b.length?b:null}function C(b,a,c){var d=b.getLine(a.line),e=b.getTokenAt(a);if(/\bstring2?\b/.test(e.type)||y(b,a))return!1;c=new f.StringStream(d.slice(0,a.ch)+c+d.slice(a.ch),4);for(c.pos=c.start=e.start;;){d=b.getMode().token(c,e.state);if(c.pos>=a.ch+1)return/\bstring2?\b/.test(d);c.start=c.pos}}function y(b,a){b=b.getTokenAt(k(a.line,a.ch+1));return/\bstring/.test(b.type)&&b.start==a.ch}var w={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},k=f.Pos;f.defineOption("autoCloseBrackets",
-!1,function(b,a,c){c&&c!=f.Init&&(b.removeKeyMap(p),b.state.closeBrackets=null);a&&(b.state.closeBrackets=a,b.addKeyMap(p))});for(var q=w.pairs+"`",p={Backspace:function(b){var a=v(b);if(!a||b.getOption("disableInput"))return f.Pass;for(var c=r(a,"pairs"),a=b.listSelections(),d=0;d<a.length;d++){if(!a[d].empty())return f.Pass;var e=z(b,a[d].head);if(!e||0!=c.indexOf(e)%2)return f.Pass}for(d=a.length-1;0<=d;d--)c=a[d].head,b.replaceRange("",k(c.line,c.ch-1),k(c.line,c.ch+1),"+delete")},Enter:function(b){var a=
-v(b),a=a&&r(a,"explode");if(!a||b.getOption("disableInput"))return f.Pass;for(var c=b.listSelections(),d=0;d<c.length;d++){if(!c[d].empty())return f.Pass;var e=z(b,c[d].head);if(!e||0!=a.indexOf(e)%2)return f.Pass}b.operation(function(){b.replaceSelection("\n\n",null);b.execCommand("goCharLeft");c=b.listSelections();for(var a=0;a<c.length;a++){var d=c[a].head.line;b.indentLine(d,null,!0);b.indentLine(d+1,null,!0)}})}},m=0;m<q.length;m++)p["'"+q.charAt(m)+"'"]=A(q.charAt(m))});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a,b){return"pairs"==b&&"string"==typeof a?a:"object"==typeof a&&null!=a[b]?a[b]:n[b]}function c(a){for(var b=0;b<a.length;b++){var c=a.charAt(b),e="'"+c+"'";p[e]||(p[e]=d(c))}}function d(a){return function(b){return i(b,a)}}function e(a){var b=a.state.closeBrackets;if(!b||b.override)return b;var c=a.getModeAt(a.getCursor());return c.closeBrackets||b}function f(c){var d=e(c);if(!d||c.getOption("disableInput"))return a.Pass;for(var f=b(d,"pairs"),g=c.listSelections(),h=0;h<g.length;h++){if(!g[h].empty())return a.Pass;var i=k(c,g[h].head);if(!i||f.indexOf(i)%2!=0)return a.Pass}for(var h=g.length-1;h>=0;h--){var j=g[h].head;c.replaceRange("",o(j.line,j.ch-1),o(j.line,j.ch+1),"+delete")}}function g(c){var d=e(c),f=d&&b(d,"explode");if(!f||c.getOption("disableInput"))return a.Pass;for(var g=c.listSelections(),h=0;h<g.length;h++){if(!g[h].empty())return a.Pass;var i=k(c,g[h].head);if(!i||f.indexOf(i)%2!=0)return a.Pass}c.operation(function(){c.replaceSelection("\n\n",null),c.execCommand("goCharLeft"),g=c.listSelections();for(var a=0;a<g.length;a++){var b=g[a].head.line;c.indentLine(b,null,!0),c.indentLine(b+1,null,!0)}})}function h(b){var c=a.cmpPos(b.anchor,b.head)>0;return{anchor:new o(b.anchor.line,b.anchor.ch+(c?-1:1)),head:new o(b.head.line,b.head.ch+(c?1:-1))}}function i(c,d){var f=e(c);if(!f||c.getOption("disableInput"))return a.Pass;var g=b(f,"pairs"),i=g.indexOf(d);if(i==-1)return a.Pass;for(var k,n=b(f,"triples"),p=g.charAt(i+1)==d,q=c.listSelections(),r=i%2==0,s=0;s<q.length;s++){var t,u=q[s],v=u.head,w=c.getRange(v,o(v.line,v.ch+1));if(r&&!u.empty())t="surround";else if(!p&&r||w!=d)if(p&&v.ch>1&&n.indexOf(d)>=0&&c.getRange(o(v.line,v.ch-2),v)==d+d&&(v.ch<=2||c.getRange(o(v.line,v.ch-3),o(v.line,v.ch-2))!=d))t="addFour";else if(p){if(a.isWordChar(w)||!l(c,v,d))return a.Pass;t="both"}else{if(!r||c.getLine(v.line).length!=v.ch&&!j(w,g)&&!/\s/.test(w))return a.Pass;t="both"}else t=p&&m(c,v)?"both":n.indexOf(d)>=0&&c.getRange(v,o(v.line,v.ch+3))==d+d+d?"skipThree":"skip";if(k){if(k!=t)return a.Pass}else k=t}var x=i%2?g.charAt(i-1):d,y=i%2?d:g.charAt(i+1);c.operation(function(){if("skip"==k)c.execCommand("goCharRight");else if("skipThree"==k)for(var a=0;a<3;a++)c.execCommand("goCharRight");else if("surround"==k){for(var b=c.getSelections(),a=0;a<b.length;a++)b[a]=x+b[a]+y;c.replaceSelections(b,"around"),b=c.listSelections().slice();for(var a=0;a<b.length;a++)b[a]=h(b[a]);c.setSelections(b)}else"both"==k?(c.replaceSelection(x+y,null),c.triggerElectric(x+y),c.execCommand("goCharLeft")):"addFour"==k&&(c.replaceSelection(x+x+x+x,"before"),c.execCommand("goCharRight"))})}function j(a,b){var c=b.lastIndexOf(a);return c>-1&&c%2==1}function k(a,b){var c=a.getRange(o(b.line,b.ch-1),o(b.line,b.ch+1));return 2==c.length?c:null}function l(b,c,d){var e=b.getLine(c.line),f=b.getTokenAt(c);if(/\bstring2?\b/.test(f.type)||m(b,c))return!1;var g=new a.StringStream(e.slice(0,c.ch)+d+e.slice(c.ch),4);for(g.pos=g.start=f.start;;){var h=b.getMode().token(g,f.state);if(g.pos>=c.ch+1)return/\bstring2?\b/.test(h);g.start=g.pos}}function m(a,b){var c=a.getTokenAt(o(b.line,b.ch+1));return/\bstring/.test(c.type)&&c.start==b.ch}var n={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},o=a.Pos;a.defineOption("autoCloseBrackets",!1,function(d,e,f){f&&f!=a.Init&&(d.removeKeyMap(p),d.state.closeBrackets=null),e&&(c(b(e,"pairs")),d.state.closeBrackets=e,d.addKeyMap(p))});var p={Backspace:f,Enter:g};c(n.pairs+"`")});
\ No newline at end of file
index 9409e68..eb8e337 100644 (file)
@@ -1,7 +1 @@
-'use strict';(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)})(function(e){function r(b){if(b.getOption("disableInput"))return e.Pass;for(var h=b.listSelections(),a=[],d=0;d<h.length;d++){if(!h[d].empty())return e.Pass;var f=h[d].head,c=b.getTokenAt(f),k=e.innerMode(b.getMode(),c.state),m=k.state;if("xml"!=k.mode.name||
-!m.tagName)return e.Pass;var g=b.getOption("autoCloseTags"),l="html"==k.mode.configuration,k="object"==typeof g&&g.dontCloseTags||l&&t,l="object"==typeof g&&g.indentTags||l&&u,g=m.tagName;c.end>f.ch&&(g=g.slice(0,g.length-c.end+f.ch));var n=g.toLowerCase();if(!g||"string"==c.type&&(c.end!=f.ch||!/[\"\']/.test(c.string.charAt(c.string.length-1))||1==c.string.length)||"tag"==c.type&&"closeTag"==m.type||c.string.indexOf("/")==c.string.length-1||k&&-1<p(k,n)||q(b,g,f,m,!0))return e.Pass;c=l&&-1<p(l,n);
-a[d]={indent:c,text:">"+(c?"\n\n":"")+"</"+g+">",newPos:c?e.Pos(f.line+1,0):e.Pos(f.line,f.ch+1)}}for(d=h.length-1;0<=d;d--)f=a[d],b.replaceRange(f.text,h[d].head,h[d].anchor,"+insert"),c=b.listSelections().slice(0),c[d]={head:f.newPos,anchor:f.newPos},b.setSelections(c),f.indent&&(b.indentLine(f.newPos.line,null,!0),b.indentLine(f.newPos.line+1,null,!0))}function n(b,h){for(var a=b.listSelections(),d=[],f=h?"/":"</",c=0;c<a.length;c++){if(!a[c].empty())return e.Pass;var k=a[c].head,m=b.getTokenAt(k),
-g=e.innerMode(b.getMode(),m.state),l=g.state;if(h&&("string"==m.type||"<"!=m.string.charAt(0)||m.start!=k.ch-1))return e.Pass;if("xml"!=g.mode.name)if("htmlmixed"==b.getMode().name&&"javascript"==g.mode.name)g=f+"script";else if("htmlmixed"==b.getMode().name&&"css"==g.mode.name)g=f+"style";else return e.Pass;else{if(!l.context||!l.context.tagName||q(b,l.context.tagName,k,l))return e.Pass;g=f+l.context.tagName}">"!=b.getLine(k.line).charAt(m.end)&&(g+=">");d[c]=g}b.replaceSelections(d);a=b.listSelections();
-for(c=0;c<a.length;c++)(c==a.length-1||a[c].head.line<a[c+1].head.line)&&b.indentLine(a[c].head.line)}function p(b,e){if(b.indexOf)return b.indexOf(e);for(var a=0,d=b.length;a<d;++a)if(b[a]==e)return a;return-1}function q(b,h,a,d,f){if(!e.scanForClosingTag)return!1;var c=Math.min(b.lastLine()+1,a.line+500);a=e.scanForClosingTag(b,a,null,c);if(!a||a.tag!=h)return!1;d=d.context;for(f=f?1:0;d&&d.tagName==h;d=d.prev)++f;a=a.to;for(d=1;d<f;d++){a=e.scanForClosingTag(b,a,null,c);if(!a||a.tag!=h)return!1;
-a=a.to}return!0}e.defineOption("autoCloseTags",!1,function(b,h,a){a!=e.Init&&a&&b.removeKeyMap("autoCloseTags");if(h){a={name:"autoCloseTags"};if("object"!=typeof h||h.whenClosing)a["'/'"]=function(a){a=a.getOption("disableInput")?e.Pass:n(a,!0);return a};if("object"!=typeof h||h.whenOpening)a["'>'"]=function(a){return r(a)};b.addKeyMap(a)}});var t="area base br col command embed hr img input keygen link meta param source track wbr".split(" "),u="applet blockquote body button div dl fieldset form frameset h1 h2 h3 h4 h5 h6 head html iframe layer legend object ol p select table ul".split(" ");
-e.commands.closeTag=function(b){return n(b)}});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],a):a(CodeMirror)}(function(a){function b(b){if(b.getOption("disableInput"))return a.Pass;for(var c=b.listSelections(),d=[],i=0;i<c.length;i++){if(!c[i].empty())return a.Pass;var j=c[i].head,k=b.getTokenAt(j),l=a.innerMode(b.getMode(),k.state),m=l.state;if("xml"!=l.mode.name||!m.tagName)return a.Pass;var n=b.getOption("autoCloseTags"),o="html"==l.mode.configuration,p="object"==typeof n&&n.dontCloseTags||o&&g,q="object"==typeof n&&n.indentTags||o&&h,r=m.tagName;k.end>j.ch&&(r=r.slice(0,r.length-k.end+j.ch));var s=r.toLowerCase();if(!r||"string"==k.type&&(k.end!=j.ch||!/[\"\']/.test(k.string.charAt(k.string.length-1))||1==k.string.length)||"tag"==k.type&&"closeTag"==m.type||k.string.indexOf("/")==k.string.length-1||p&&e(p,s)>-1||f(b,r,j,m,!0))return a.Pass;var t=q&&e(q,s)>-1;d[i]={indent:t,text:">"+(t?"\n\n":"")+"</"+r+">",newPos:t?a.Pos(j.line+1,0):a.Pos(j.line,j.ch+1)}}for(var i=c.length-1;i>=0;i--){var u=d[i];b.replaceRange(u.text,c[i].head,c[i].anchor,"+insert");var v=b.listSelections().slice(0);v[i]={head:u.newPos,anchor:u.newPos},b.setSelections(v),u.indent&&(b.indentLine(u.newPos.line,null,!0),b.indentLine(u.newPos.line+1,null,!0))}}function c(b,c){for(var d=b.listSelections(),e=[],g=c?"/":"</",h=0;h<d.length;h++){if(!d[h].empty())return a.Pass;var i=d[h].head,j=b.getTokenAt(i),k=a.innerMode(b.getMode(),j.state),l=k.state;if(c&&("string"==j.type||"<"!=j.string.charAt(0)||j.start!=i.ch-1))return a.Pass;var m;if("xml"!=k.mode.name)if("htmlmixed"==b.getMode().name&&"javascript"==k.mode.name)m=g+"script";else{if("htmlmixed"!=b.getMode().name||"css"!=k.mode.name)return a.Pass;m=g+"style"}else{if(!l.context||!l.context.tagName||f(b,l.context.tagName,i,l))return a.Pass;m=g+l.context.tagName}">"!=b.getLine(i.line).charAt(j.end)&&(m+=">"),e[h]=m}b.replaceSelections(e),d=b.listSelections();for(var h=0;h<d.length;h++)(h==d.length-1||d[h].head.line<d[h+1].head.line)&&b.indentLine(d[h].head.line)}function d(b){return b.getOption("disableInput")?a.Pass:c(b,!0)}function e(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;c<d;++c)if(a[c]==b)return c;return-1}function f(b,c,d,e,f){if(!a.scanForClosingTag)return!1;var g=Math.min(b.lastLine()+1,d.line+500),h=a.scanForClosingTag(b,d,null,g);if(!h||h.tag!=c)return!1;for(var i=e.context,j=f?1:0;i&&i.tagName==c;i=i.prev)++j;d=h.to;for(var k=1;k<j;k++){var l=a.scanForClosingTag(b,d,null,g);if(!l||l.tag!=c)return!1;d=l.to}return!0}a.defineOption("autoCloseTags",!1,function(c,e,f){if(f!=a.Init&&f&&c.removeKeyMap("autoCloseTags"),e){var g={name:"autoCloseTags"};("object"!=typeof e||e.whenClosing)&&(g["'/'"]=function(a){return d(a)}),("object"!=typeof e||e.whenOpening)&&(g["'>'"]=function(a){return b(a)}),c.addKeyMap(g)}});var g=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],h=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];a.commands.closeTag=function(a){return c(a)}});
\ No newline at end of file
index 42d1d79..76f5da7 100644 (file)
@@ -1,2 +1 @@
-'use strict';(function(d){"object"==typeof exports&&"object"==typeof module?d(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],d):d(CodeMirror)})(function(d){var l=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,m=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,n=/[*+-]\s/;d.commands.newlineAndIndentContinueMarkdownList=function(b){if(b.getOption("disableInput"))return d.Pass;for(var f=b.listSelections(),g=[],e=0;e<f.length;e++){var c=
-f[e].head,a=b.getStateAfter(c.line),h=!1!==a.list,p=0!==a.quote,k=b.getLine(c.line),a=l.exec(k);if(!f[e].empty()||!h&&!p||!a){b.execCommand("newlineAndIndent");return}m.test(k)?(/>\s*$/.test(k)||b.replaceRange("",{line:c.line,ch:0},{line:c.line,ch:c.ch+1}),g[e]="\n"):(c=a[1],h=a[5],a=n.test(a[2])||0<=a[2].indexOf(">")?a[2].replace("x"," "):parseInt(a[3],10)+1+a[4],g[e]="\n"+c+a+h)}b.replaceSelections(g)}});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";var b=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,c=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,d=/[*+-]\s/;a.commands.newlineAndIndentContinueMarkdownList=function(e){if(e.getOption("disableInput"))return a.Pass;for(var f=e.listSelections(),g=[],h=0;h<f.length;h++){var i=f[h].head,j=e.getStateAfter(i.line),k=j.list!==!1,l=0!==j.quote,m=e.getLine(i.line),n=b.exec(m);if(!f[h].empty()||!k&&!l||!n)return void e.execCommand("newlineAndIndent");if(c.test(m))/>\s*$/.test(m)||e.replaceRange("",{line:i.line,ch:0},{line:i.line,ch:i.ch+1}),g[h]="\n";else{var o=n[1],p=n[5],q=d.test(n[2])||n[2].indexOf(">")>=0?n[2].replace("x"," "):parseInt(n[3],10)+1+n[4];g[h]="\n"+o+q+p}}e.replaceSelections(g)}});
\ No newline at end of file
index 9ab0cc4..0351d34 100644 (file)
@@ -1,6 +1 @@
-'use strict';(function(d){"object"==typeof exports&&"object"==typeof module?d(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],d):d(CodeMirror)})(function(d){function q(a,c,b){var l=a.getLineHandle(c.line),e=c.ch-1,k=b&&b.afterCursor;null==k&&(k=/(^| )cm-fat-cursor($| )/.test(a.getWrapperElement().className));l=!k&&0<=e&&n[l.text.charAt(e)]||n[l.text.charAt(++e)];if(!l)return null;k=">"==l.charAt(1)?1:-1;if(b&&b.strict&&0<k!=(e==c.ch))return null;
-var h=a.getTokenTypeAt(m(c.line,e+1));a=t(a,m(c.line,e+(0<k?1:0)),k,h||null,b);return null==a?null:{from:m(c.line,e),to:a&&a.pos,match:a&&a.ch==l.charAt(0),forward:0<k}}function t(a,c,b,l,e){var k=e&&e.maxScanLineLength||1E4,h=e&&e.maxScanLines||1E3,g=[];e=e&&e.bracketRegex?e.bracketRegex:/[(){}[\]]/;for(var h=0<b?Math.min(c.line+h,a.lastLine()+1):Math.max(a.firstLine()-1,c.line-h),d=c.line;d!=h;d+=b){var p=a.getLine(d);if(p){var f=0<b?0:p.length-1,q=0<b?p.length:-1;if(!(p.length>k))for(d==c.line&&
-(f=c.ch-(0>b?1:0));f!=q;f+=b){var r=p.charAt(f);if(e.test(r)&&(void 0===l||a.getTokenTypeAt(m(d,f+1))==l))if(">"==n[r].charAt(1)==0<b)g.push(r);else if(g.length)g.pop();else return{pos:m(d,f),ch:r}}}}return d-b==(0<b?a.lastLine():a.firstLine())?!1:null}function u(a,c,b){for(var d=a.state.matchBrackets.maxHighlightLineLength||1E3,e=[],f=a.listSelections(),h=0;h<f.length;h++){var g=f[h].empty()&&q(a,f[h].head,b);if(g&&a.getLine(g.from.line).length<=d){var n=g.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";
-e.push(a.markText(g.from,m(g.from.line,g.from.ch+1),{className:n}));g.to&&a.getLine(g.to.line).length<=d&&e.push(a.markText(g.to,m(g.to.line,g.to.ch+1),{className:n}))}}if(e.length)if(w&&a.state.focused&&a.focus(),b=function(){a.operation(function(){for(var a=0;a<e.length;a++)e[a].clear()})},c)setTimeout(b,800);else return b}function v(a){a.operation(function(){f&&(f(),f=null);f=u(a,!1,a.state.matchBrackets)})}var w=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||8>document.documentMode),
-m=d.Pos,n={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},f=null;d.defineOption("matchBrackets",!1,function(a,c,b){b&&b!=d.Init&&(a.off("cursorActivity",v),f&&(f(),f=null));c&&(a.state.matchBrackets="object"==typeof c?c:{},a.on("cursorActivity",v))});d.defineExtension("matchBrackets",function(){u(this,!0)});d.defineExtension("findMatchingBracket",function(a,c,b){if(b||"boolean"==typeof c)b?(b.strict=c,c=b):c=c?{strict:!0}:null;return q(this,a,c)});d.defineExtension("scanForBracket",function(a,
-c,b,d){return t(this,a,c,b,d)})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a,b,d){var e=a.getLineHandle(b.line),f=b.ch-1,i=d&&d.afterCursor;null==i&&(i=/(^| )cm-fat-cursor($| )/.test(a.getWrapperElement().className));var j=!i&&f>=0&&h[e.text.charAt(f)]||h[e.text.charAt(++f)];if(!j)return null;var k=">"==j.charAt(1)?1:-1;if(d&&d.strict&&k>0!=(f==b.ch))return null;var l=a.getTokenTypeAt(g(b.line,f+1)),m=c(a,g(b.line,f+(k>0?1:0)),k,l||null,d);return null==m?null:{from:g(b.line,f),to:m&&m.pos,match:m&&m.ch==j.charAt(0),forward:k>0}}function c(a,b,c,d,e){for(var f=e&&e.maxScanLineLength||1e4,i=e&&e.maxScanLines||1e3,j=[],k=e&&e.bracketRegex?e.bracketRegex:/[(){}[\]]/,l=c>0?Math.min(b.line+i,a.lastLine()+1):Math.max(a.firstLine()-1,b.line-i),m=b.line;m!=l;m+=c){var n=a.getLine(m);if(n){var o=c>0?0:n.length-1,p=c>0?n.length:-1;if(!(n.length>f))for(m==b.line&&(o=b.ch-(c<0?1:0));o!=p;o+=c){var q=n.charAt(o);if(k.test(q)&&(void 0===d||a.getTokenTypeAt(g(m,o+1))==d)){var r=h[q];if(">"==r.charAt(1)==c>0)j.push(q);else{if(!j.length)return{pos:g(m,o),ch:q};j.pop()}}}}}return m-c!=(c>0?a.lastLine():a.firstLine())&&null}function d(a,c,d){for(var e=a.state.matchBrackets.maxHighlightLineLength||1e3,h=[],i=a.listSelections(),j=0;j<i.length;j++){var k=i[j].empty()&&b(a,i[j].head,d);if(k&&a.getLine(k.from.line).length<=e){var l=k.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";h.push(a.markText(k.from,g(k.from.line,k.from.ch+1),{className:l})),k.to&&a.getLine(k.to.line).length<=e&&h.push(a.markText(k.to,g(k.to.line,k.to.ch+1),{className:l}))}}if(h.length){f&&a.state.focused&&a.focus();var m=function(){a.operation(function(){for(var a=0;a<h.length;a++)h[a].clear()})};if(!c)return m;setTimeout(m,800)}}function e(a){a.operation(function(){i&&(i(),i=null),i=d(a,!1,a.state.matchBrackets)})}var f=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),g=a.Pos,h={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},i=null;a.defineOption("matchBrackets",!1,function(b,c,d){d&&d!=a.Init&&(b.off("cursorActivity",e),i&&(i(),i=null)),c&&(b.state.matchBrackets="object"==typeof c?c:{},b.on("cursorActivity",e))}),a.defineExtension("matchBrackets",function(){d(this,!0)}),a.defineExtension("findMatchingBracket",function(a,c,d){return(d||"boolean"==typeof c)&&(d?(d.strict=c,c=d):c=c?{strict:!0}:null),b(this,a,c)}),a.defineExtension("scanForBracket",function(a,b,d,e){return c(this,a,b,d,e)})});
\ No newline at end of file
index 3387092..ed9b892 100644 (file)
@@ -1,3 +1 @@
-'use strict';(function(d){"object"==typeof exports&&"object"==typeof module?d(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],d):d(CodeMirror)})(function(d){function f(a){a.state.tagHit&&a.state.tagHit.clear();a.state.tagOther&&a.state.tagOther.clear();a.state.tagHit=a.state.tagOther=null}function e(a){a.state.failedTagMatch=!1;a.operation(function(){f(a);if(!a.somethingSelected()){var b=a.getCursor(),
-c=a.getViewport();c.from=Math.min(c.from,b.line);c.to=Math.max(b.line+1,c.to);if(b=d.findMatchingTag(a,b,c))a.state.matchBothTags&&(c="open"==b.at?b.open:b.close)&&(a.state.tagHit=a.markText(c.from,c.to,{className:"CodeMirror-matchingtag"})),(b="close"==b.at?b.open:b.close)?a.state.tagOther=a.markText(b.from,b.to,{className:"CodeMirror-matchingtag"}):a.state.failedTagMatch=!0}})}function g(a){a.state.failedTagMatch&&e(a)}d.defineOption("matchTags",!1,function(a,b,c){c&&c!=d.Init&&(a.off("cursorActivity",
-e),a.off("viewportChange",g),f(a));b&&(a.state.matchBothTags="object"==typeof b&&b.bothTags,a.on("cursorActivity",e),a.on("viewportChange",g),e(a))});d.commands.toMatchingTag=function(a){var b=d.findMatchingTag(a,a.getCursor());b&&(b="close"==b.at?b.open:b.close)&&a.extendSelection(b.to,b.from)}});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],a):a(CodeMirror)}(function(a){"use strict";function b(a){a.state.tagHit&&a.state.tagHit.clear(),a.state.tagOther&&a.state.tagOther.clear(),a.state.tagHit=a.state.tagOther=null}function c(c){c.state.failedTagMatch=!1,c.operation(function(){if(b(c),!c.somethingSelected()){var d=c.getCursor(),e=c.getViewport();e.from=Math.min(e.from,d.line),e.to=Math.max(d.line+1,e.to);var f=a.findMatchingTag(c,d,e);if(f){if(c.state.matchBothTags){var g="open"==f.at?f.open:f.close;g&&(c.state.tagHit=c.markText(g.from,g.to,{className:"CodeMirror-matchingtag"}))}var h="close"==f.at?f.open:f.close;h?c.state.tagOther=c.markText(h.from,h.to,{className:"CodeMirror-matchingtag"}):c.state.failedTagMatch=!0}}})}function d(a){a.state.failedTagMatch&&c(a)}a.defineOption("matchTags",!1,function(e,f,g){g&&g!=a.Init&&(e.off("cursorActivity",c),e.off("viewportChange",d),b(e)),f&&(e.state.matchBothTags="object"==typeof f&&f.bothTags,e.on("cursorActivity",c),e.on("viewportChange",d),c(e))}),a.commands.toMatchingTag=function(b){var c=a.findMatchingTag(b,b.getCursor());if(c){var d="close"==c.at?c.open:c.close;d&&b.extendSelection(d.to,d.from)}}});
\ No newline at end of file
index d77ac72..3751c2c 100644 (file)
@@ -1 +1 @@
-'use strict';(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)})(function(a){a.defineOption("showTrailingSpace",!1,function(d,e,b){b==a.Init&&(b=!1);b&&!e?d.removeOverlay("trailingspace"):!b&&e&&d.addOverlay({token:function(a){for(var b=a.string.length,c=b;c&&/\s/.test(a.string.charAt(c-1));--c);if(c>a.pos)return a.pos=c,null;a.pos=b;return"trailingspace"},name:"trailingspace"})})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){a.defineOption("showTrailingSpace",!1,function(b,c,d){d==a.Init&&(d=!1),d&&!c?b.removeOverlay("trailingspace"):!d&&c&&b.addOverlay({token:function(a){for(var b=a.string.length,c=b;c&&/\s/.test(a.string.charAt(c-1));--c);return c>a.pos?(a.pos=c,null):(a.pos=b,"trailingspace")},name:"trailingspace"})})});
\ No newline at end of file
index 3e25787..03a402f 100644 (file)
@@ -1,4 +1 @@
-'use strict';(function(d){"object"==typeof exports&&"object"==typeof module?d(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],d):d(CodeMirror)})(function(d){d.registerHelper("fold","brace",function(e,a){function b(h){for(var c=a.ch,b=0;;)if(c=0>=c?-1:f.lastIndexOf(h,c-1),-1==c){if(1==b)break;b=1;c=f.length}else{if(1==b&&c<a.ch)break;k=e.getTokenTypeAt(d.Pos(g,c+1));if(!/^(comment|string)/.test(k))return c+1;--c}}var g=a.line,f=e.getLine(g),k,
-h="{",r="}",l=b("{");null==l&&(h="[",r="]",l=b("["));if(null!=l){var t=1,v=e.lastLine(),m=g;a:for(;m<=v;++m)for(var n=e.getLine(m),c=m==g?l:0;;){var p=n.indexOf(h,c),c=n.indexOf(r,c);0>p&&(p=n.length);0>c&&(c=n.length);c=Math.min(p,c);if(c==n.length)break;if(e.getTokenTypeAt(d.Pos(m,c+1))==k)if(c==p)++t;else if(!--t){var q=m;var u=c;break a}++c}if(null!=q&&(g!=q||u!=l))return{from:d.Pos(g,l),to:d.Pos(q,u)}}});d.registerHelper("fold","import",function(e,a){function b(h){if(h<e.firstLine()||h>e.lastLine())return null;
-var a=e.getTokenAt(d.Pos(h,1));/\S/.test(a.string)||(a=e.getTokenAt(d.Pos(h,a.end+1)));if("keyword"!=a.type||"import"!=a.string)return null;var b=h;for(h=Math.min(e.lastLine(),h+10);b<=h;++b){var f=e.getLine(b).indexOf(";");if(-1!=f)return{startCh:a.end,end:d.Pos(b,f)}}}a=a.line;var g=b(a),f;if(!g||b(a-1)||(f=b(a-2))&&f.end.line==a-1)return null;for(f=g.end;;){var k=b(f.line+1);if(null==k)break;f=k.end}return{from:e.clipPos(d.Pos(a,g.startCh+1)),to:f}});d.registerHelper("fold","include",function(e,
-a){function b(a){if(a<e.firstLine()||a>e.lastLine())return null;var b=e.getTokenAt(d.Pos(a,1));/\S/.test(b.string)||(b=e.getTokenAt(d.Pos(a,b.end+1)));if("meta"==b.type&&"#include"==b.string.slice(0,8))return b.start+8}a=a.line;var g=b(a);if(null==g||null!=b(a-1))return null;for(var f=a;null!=b(f+1);)++f;return{from:d.Pos(a,g+1),to:e.clipPos(d.Pos(f))}})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.registerHelper("fold","brace",function(b,c){function d(d){for(var h=c.ch,i=0;;){var j=h<=0?-1:g.lastIndexOf(d,h-1);if(j!=-1){if(1==i&&j<c.ch)break;if(e=b.getTokenTypeAt(a.Pos(f,j+1)),!/^(comment|string)/.test(e))return j+1;h=j-1}else{if(1==i)break;i=1,h=g.length}}}var e,f=c.line,g=b.getLine(f),h="{",i="}",j=d("{");if(null==j&&(h="[",i="]",j=d("[")),null!=j){var k,l,m=1,n=b.lastLine();a:for(var o=f;o<=n;++o)for(var p=b.getLine(o),q=o==f?j:0;;){var r=p.indexOf(h,q),s=p.indexOf(i,q);if(r<0&&(r=p.length),s<0&&(s=p.length),q=Math.min(r,s),q==p.length)break;if(b.getTokenTypeAt(a.Pos(o,q+1))==e)if(q==r)++m;else if(!--m){k=o,l=q;break a}++q}if(null!=k&&(f!=k||l!=j))return{from:a.Pos(f,j),to:a.Pos(k,l)}}}),a.registerHelper("fold","import",function(b,c){function d(c){if(c<b.firstLine()||c>b.lastLine())return null;var d=b.getTokenAt(a.Pos(c,1));if(/\S/.test(d.string)||(d=b.getTokenAt(a.Pos(c,d.end+1))),"keyword"!=d.type||"import"!=d.string)return null;for(var e=c,f=Math.min(b.lastLine(),c+10);e<=f;++e){var g=b.getLine(e),h=g.indexOf(";");if(h!=-1)return{startCh:d.end,end:a.Pos(e,h)}}}var e,f=c.line,g=d(f);if(!g||d(f-1)||(e=d(f-2))&&e.end.line==f-1)return null;for(var h=g.end;;){var i=d(h.line+1);if(null==i)break;h=i.end}return{from:b.clipPos(a.Pos(f,g.startCh+1)),to:h}}),a.registerHelper("fold","include",function(b,c){function d(c){if(c<b.firstLine()||c>b.lastLine())return null;var d=b.getTokenAt(a.Pos(c,1));return/\S/.test(d.string)||(d=b.getTokenAt(a.Pos(c,d.end+1))),"meta"==d.type&&"#include"==d.string.slice(0,8)?d.start+8:void 0}var e=c.line,f=d(e);if(null==f||null!=d(e-1))return null;for(var g=e;;){var h=d(g+1);if(null==h)break;++g}return{from:a.Pos(e,f+1),to:b.clipPos(a.Pos(g))}})});
\ No newline at end of file
index ed01f30..443526e 100644 (file)
@@ -1,2 +1 @@
-'use strict';(function(b){"object"==typeof exports&&"object"==typeof module?b(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],b):b(CodeMirror)})(function(b){b.registerGlobalHelper("fold","comment",function(b){return b.blockCommentStart&&b.blockCommentEnd},function(g,d){var e=g.getModeAt(d),m=e.blockCommentStart,e=e.blockCommentEnd;if(m&&e){for(var f=d.line,h=g.getLine(f),a=d.ch,k=0;;)if(a=0>=a?-1:h.lastIndexOf(m,a-1),-1==a){if(1==k)return;k=1;
-a=h.length}else{if(1==k&&a<d.ch)return;if(/comment/.test(g.getTokenTypeAt(b.Pos(f,a+1)))&&(0==a||h.slice(a-e.length,a)==e||!/comment/.test(g.getTokenTypeAt(b.Pos(f,a))))){d=a+m.length;break}--a}var h=1,k=g.lastLine(),a=f;a:for(;a<=k;++a)for(var l=g.getLine(a),c=a==f?d:0;;){var n=l.indexOf(m,c),c=l.indexOf(e,c);0>n&&(n=l.length);0>c&&(c=l.length);c=Math.min(n,c);if(c==l.length)break;if(c==n)++h;else if(!--h){var p=a;var q=c;break a}++c}if(null!=p&&(f!=p||q!=d))return{from:b.Pos(f,d),to:b.Pos(p,q)}}})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.registerGlobalHelper("fold","comment",function(a){return a.blockCommentStart&&a.blockCommentEnd},function(b,c){var d=b.getModeAt(c),e=d.blockCommentStart,f=d.blockCommentEnd;if(e&&f){for(var g,h=c.line,i=b.getLine(h),j=c.ch,k=0;;){var l=j<=0?-1:i.lastIndexOf(e,j-1);if(l!=-1){if(1==k&&l<c.ch)return;if(/comment/.test(b.getTokenTypeAt(a.Pos(h,l+1)))&&(0==l||i.slice(l-f.length,l)==f||!/comment/.test(b.getTokenTypeAt(a.Pos(h,l))))){g=l+e.length;break}j=l-1}else{if(1==k)return;k=1,j=i.length}}var m,n,o=1,p=b.lastLine();a:for(var q=h;q<=p;++q)for(var r=b.getLine(q),s=q==h?g:0;;){var t=r.indexOf(e,s),u=r.indexOf(f,s);if(t<0&&(t=r.length),u<0&&(u=r.length),s=Math.min(t,u),s==r.length)break;if(s==t)++o;else if(!--o){m=q,n=s;break a}++s}if(null!=m&&(h!=m||n!=g))return{from:a.Pos(h,g),to:a.Pos(m,n)}}})});
\ No newline at end of file
index 0334e94..553252f 100644 (file)
@@ -1,5 +1 @@
-'use strict';(function(b){"object"==typeof exports&&"object"==typeof module?b(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],b):b(CodeMirror)})(function(b){function k(a,c,d,g){function f(d){var b=k(a,c);if(!b||b.to.line-b.from.line<l)return null;for(var f=a.findMarksAt(b.from),e=0;e<f.length;++e)if(f[e].__isFold&&"fold"!==g){if(!d)return null;b.cleared=!0;f[e].clear()}return b}if(d&&d.call){var k=d;d=null}else k=h(a,d,"rangeFinder");"number"==
-typeof c&&(c=b.Pos(c,0));var l=h(a,d,"minFoldSize"),e=f(!0);if(h(a,d,"scanUp"))for(;!e&&c.line>a.firstLine();)c=b.Pos(c.line-1,0),e=f(!1);if(e&&!e.cleared&&"unfold"!==g){var m=p(a,d);b.on(m,"mousedown",function(a){n.clear();b.e_preventDefault(a)});var n=a.markText(e.from,e.to,{replacedWith:m,clearOnEnter:h(a,d,"clearOnEnter"),__isFold:!0});n.on("clear",function(c,d){b.signal(a,"unfold",a,c,d)});b.signal(a,"fold",a,e.from,e.to)}}function p(a,c){a=h(a,c,"widget");"string"==typeof a?(c=document.createTextNode(a),
-a=document.createElement("span"),a.appendChild(c),a.className="CodeMirror-foldmarker"):a&&(a=a.cloneNode(!0));return a}function h(a,c,b){return c&&void 0!==c[b]?c[b]:(a=a.options.foldOptions)&&void 0!==a[b]?a[b]:l[b]}b.newFoldFunction=function(a,c){return function(b,g){k(b,g,{rangeFinder:a,widget:c})}};b.defineExtension("foldCode",function(a,b,d){k(this,a,b,d)});b.defineExtension("isFolded",function(a){a=this.findMarksAt(a);for(var b=0;b<a.length;++b)if(a[b].__isFold)return!0});b.commands.toggleFold=
-function(a){a.foldCode(a.getCursor())};b.commands.fold=function(a){a.foldCode(a.getCursor(),null,"fold")};b.commands.unfold=function(a){a.foldCode(a.getCursor(),null,"unfold")};b.commands.foldAll=function(a){a.operation(function(){for(var c=a.firstLine(),d=a.lastLine();c<=d;c++)a.foldCode(b.Pos(c,0),null,"fold")})};b.commands.unfoldAll=function(a){a.operation(function(){for(var c=a.firstLine(),d=a.lastLine();c<=d;c++)a.foldCode(b.Pos(c,0),null,"unfold")})};b.registerHelper("fold","combine",function(){var a=
-Array.prototype.slice.call(arguments,0);return function(b,d){for(var c=0;c<a.length;++c){var f=a[c](b,d);if(f)return f}}});b.registerHelper("fold","auto",function(a,b){for(var c=a.getHelpers(b,"fold"),g=0;g<c.length;g++){var f=c[g](a,b);if(f)return f}});var l={rangeFinder:b.fold.auto,widget:"\u2194",minFoldSize:0,scanUp:!1,clearOnEnter:!0};b.defineOption("foldOptions",null);b.defineExtension("foldOption",function(a,b){return h(this,a,b)})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(b,e,f,g){function h(a){var c=i(b,e);if(!c||c.to.line-c.from.line<j)return null;for(var d=b.findMarksAt(c.from),f=0;f<d.length;++f)if(d[f].__isFold&&"fold"!==g){if(!a)return null;c.cleared=!0,d[f].clear()}return c}if(f&&f.call){var i=f;f=null}else var i=d(b,f,"rangeFinder");"number"==typeof e&&(e=a.Pos(e,0));var j=d(b,f,"minFoldSize"),k=h(!0);if(d(b,f,"scanUp"))for(;!k&&e.line>b.firstLine();)e=a.Pos(e.line-1,0),k=h(!1);if(k&&!k.cleared&&"unfold"!==g){var l=c(b,f);a.on(l,"mousedown",function(b){m.clear(),a.e_preventDefault(b)});var m=b.markText(k.from,k.to,{replacedWith:l,clearOnEnter:d(b,f,"clearOnEnter"),__isFold:!0});m.on("clear",function(c,d){a.signal(b,"unfold",b,c,d)}),a.signal(b,"fold",b,k.from,k.to)}}function c(a,b){var c=d(a,b,"widget");if("string"==typeof c){var e=document.createTextNode(c);c=document.createElement("span"),c.appendChild(e),c.className="CodeMirror-foldmarker"}else c&&(c=c.cloneNode(!0));return c}function d(a,b,c){if(b&&void 0!==b[c])return b[c];var d=a.options.foldOptions;return d&&void 0!==d[c]?d[c]:e[c]}a.newFoldFunction=function(a,c){return function(d,e){b(d,e,{rangeFinder:a,widget:c})}},a.defineExtension("foldCode",function(a,c,d){b(this,a,c,d)}),a.defineExtension("isFolded",function(a){for(var b=this.findMarksAt(a),c=0;c<b.length;++c)if(b[c].__isFold)return!0}),a.commands.toggleFold=function(a){a.foldCode(a.getCursor())},a.commands.fold=function(a){a.foldCode(a.getCursor(),null,"fold")},a.commands.unfold=function(a){a.foldCode(a.getCursor(),null,"unfold")},a.commands.foldAll=function(b){b.operation(function(){for(var c=b.firstLine(),d=b.lastLine();c<=d;c++)b.foldCode(a.Pos(c,0),null,"fold")})},a.commands.unfoldAll=function(b){b.operation(function(){for(var c=b.firstLine(),d=b.lastLine();c<=d;c++)b.foldCode(a.Pos(c,0),null,"unfold")})},a.registerHelper("fold","combine",function(){var a=Array.prototype.slice.call(arguments,0);return function(b,c){for(var d=0;d<a.length;++d){var e=a[d](b,c);if(e)return e}}}),a.registerHelper("fold","auto",function(a,b){for(var c=a.getHelpers(b,"fold"),d=0;d<c.length;d++){var e=c[d](a,b);if(e)return e}});var e={rangeFinder:a.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};a.defineOption("foldOptions",null),a.defineExtension("foldOption",function(a,b){return d(this,a,b)})});
\ No newline at end of file
index 7ee0f2a..ad19ae2 100644 (file)
@@ -1 +1,20 @@
-.CodeMirror-foldmarker{color:#00f;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-foldgutter{width:.7em}.CodeMirror-foldgutter-folded,.CodeMirror-foldgutter-open{cursor:pointer}.CodeMirror-foldgutter-open:after{content:"\25BE"}.CodeMirror-foldgutter-folded:after{content:"\25B8"}
\ No newline at end of file
+.CodeMirror-foldmarker {
+  color: blue;
+  text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;
+  font-family: arial;
+  line-height: .3;
+  cursor: pointer;
+}
+.CodeMirror-foldgutter {
+  width: .7em;
+}
+.CodeMirror-foldgutter-open,
+.CodeMirror-foldgutter-folded {
+  cursor: pointer;
+}
+.CodeMirror-foldgutter-open:after {
+  content: "\25BE";
+}
+.CodeMirror-foldgutter-folded:after {
+  content: "\25B8";
+}
index 787e2c3..ec43cec 100644 (file)
@@ -1,8 +1 @@
-'use strict';var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,f,d){a instanceof String&&(a=String(a));for(var g=a.length,e=0;e<g;e++){var k=a[e];if(f.call(d,k,e,a))return{i:e,v:k}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,f,d){a!=Array.prototype&&a!=Object.prototype&&(a[f]=d.value)};
-$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,f,d,g){if(f){d=$jscomp.global;a=a.split(".");for(g=0;g<a.length-1;g++){var e=a[g];e in d||(d[e]={});d=d[e]}a=a[a.length-1];g=d[a];f=f(g);f!=g&&null!=f&&$jscomp.defineProperty(d,a,{configurable:!0,writable:!0,value:f})}};
-$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,d){return $jscomp.findInternal(this,a,d).v}},"es6-impl","es3");
-(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("./foldcode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./foldcode"],a):a(CodeMirror)})(function(a){function f(b){this.options=b;this.from=this.to=0}function d(b,c){b=b.findMarks(m(c,0),m(c+1,0));for(var a=0;a<b.length;++a)if(b[a].__isFold&&b[a].find().from.line==c)return b[a]}function g(b){if("string"==typeof b){var c=document.createElement("div");c.className=b+" CodeMirror-guttermarker-subtle";
-return c}return b.cloneNode(!0)}function e(b,c,a){var l=b.state.foldGutter.options,e=c,f=b.foldOption(l,"minFoldSize"),k=b.foldOption(l,"rangeFinder");b.eachLine(c,a,function(c){var a=null;if(d(b,e))a=g(l.indicatorFolded);else{var h=m(e,0);(h=k&&k(b,h))&&h.to.line-h.from.line>=f&&(a=g(l.indicatorOpen))}b.setGutterMarker(c,l.gutter,a);++e})}function k(b){var c=b.getViewport(),a=b.state.foldGutter;a&&(b.operation(function(){e(b,c.from,c.to)}),a.from=c.from,a.to=c.to)}function q(b,c,a){var h=b.state.foldGutter;
-h&&(h=h.options,a==h.gutter&&((a=d(b,c))?a.clear():b.foldCode(m(c,0),h.rangeFinder)))}function n(b){var c=b.state.foldGutter;if(c){var a=c.options;c.from=c.to=0;clearTimeout(c.changeUpdate);c.changeUpdate=setTimeout(function(){k(b)},a.foldOnChangeTimeSpan||600)}}function r(b){var a=b.state.foldGutter;if(a){var d=a.options;clearTimeout(a.changeUpdate);a.changeUpdate=setTimeout(function(){var c=b.getViewport();a.from==a.to||20<c.from-a.to||20<a.from-c.to?k(b):b.operation(function(){c.from<a.from&&(e(b,
-c.from,a.from),a.from=c.from);c.to>a.to&&(e(b,a.to,c.to),a.to=c.to)})},d.updateViewportTimeSpan||400)}}function p(a,c){var b=a.state.foldGutter;b&&(c=c.line,c>=b.from&&c<b.to&&e(a,c,c+1))}a.defineOption("foldGutter",!1,function(b,c,d){d&&d!=a.Init&&(b.clearGutter(b.state.foldGutter.options.gutter),b.state.foldGutter=null,b.off("gutterClick",q),b.off("change",n),b.off("viewportChange",r),b.off("fold",p),b.off("unfold",p),b.off("swapDoc",n));c&&(d=b.state,!0===c&&(c={}),null==c.gutter&&(c.gutter="CodeMirror-foldgutter"),
-null==c.indicatorOpen&&(c.indicatorOpen="CodeMirror-foldgutter-open"),null==c.indicatorFolded&&(c.indicatorFolded="CodeMirror-foldgutter-folded"),d.foldGutter=new f(c),k(b),b.on("gutterClick",q),b.on("change",n),b.on("viewportChange",r),b.on("fold",p),b.on("unfold",p),b.on("swapDoc",n))});var m=a.Pos});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("./foldcode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./foldcode"],a):a(CodeMirror)}(function(a){"use strict";function b(a){this.options=a,this.from=this.to=0}function c(a){return a===!0&&(a={}),null==a.gutter&&(a.gutter="CodeMirror-foldgutter"),null==a.indicatorOpen&&(a.indicatorOpen="CodeMirror-foldgutter-open"),null==a.indicatorFolded&&(a.indicatorFolded="CodeMirror-foldgutter-folded"),a}function d(a,b){for(var c=a.findMarks(l(b,0),l(b+1,0)),d=0;d<c.length;++d)if(c[d].__isFold&&c[d].find().from.line==b)return c[d]}function e(a){if("string"==typeof a){var b=document.createElement("div");return b.className=a+" CodeMirror-guttermarker-subtle",b}return a.cloneNode(!0)}function f(a,b,c){var f=a.state.foldGutter.options,g=b,h=a.foldOption(f,"minFoldSize"),i=a.foldOption(f,"rangeFinder");a.eachLine(b,c,function(b){var c=null;if(d(a,g))c=e(f.indicatorFolded);else{var j=l(g,0),k=i&&i(a,j);k&&k.to.line-k.from.line>=h&&(c=e(f.indicatorOpen))}a.setGutterMarker(b,f.gutter,c),++g})}function g(a){var b=a.getViewport(),c=a.state.foldGutter;c&&(a.operation(function(){f(a,b.from,b.to)}),c.from=b.from,c.to=b.to)}function h(a,b,c){var e=a.state.foldGutter;if(e){var f=e.options;if(c==f.gutter){var g=d(a,b);g?g.clear():a.foldCode(l(b,0),f.rangeFinder)}}}function i(a){var b=a.state.foldGutter;if(b){var c=b.options;b.from=b.to=0,clearTimeout(b.changeUpdate),b.changeUpdate=setTimeout(function(){g(a)},c.foldOnChangeTimeSpan||600)}}function j(a){var b=a.state.foldGutter;if(b){var c=b.options;clearTimeout(b.changeUpdate),b.changeUpdate=setTimeout(function(){var c=a.getViewport();b.from==b.to||c.from-b.to>20||b.from-c.to>20?g(a):a.operation(function(){c.from<b.from&&(f(a,c.from,b.from),b.from=c.from),c.to>b.to&&(f(a,b.to,c.to),b.to=c.to)})},c.updateViewportTimeSpan||400)}}function k(a,b){var c=a.state.foldGutter;if(c){var d=b.line;d>=c.from&&d<c.to&&f(a,d,d+1)}}a.defineOption("foldGutter",!1,function(d,e,f){f&&f!=a.Init&&(d.clearGutter(d.state.foldGutter.options.gutter),d.state.foldGutter=null,d.off("gutterClick",h),d.off("change",i),d.off("viewportChange",j),d.off("fold",k),d.off("unfold",k),d.off("swapDoc",i)),e&&(d.state.foldGutter=new b(c(e)),g(d),d.on("gutterClick",h),d.on("change",i),d.on("viewportChange",j),d.on("fold",k),d.on("unfold",k),d.on("swapDoc",i))});var l=a.Pos});
\ No newline at end of file
index f5237be..0526fbb 100644 (file)
@@ -1,2 +1 @@
-'use strict';(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)})(function(a){function g(b,c){var e=b.getLine(c),d=e.search(/\S/);return-1==d||/\bcomment\b/.test(b.getTokenTypeAt(a.Pos(c,d+1)))?-1:a.countColumn(e,null,b.getOption("tabSize"))}a.registerHelper("fold","indent",function(b,c){var e=g(b,c.line);if(!(0>e)){for(var d=null,f=c.line+1,k=b.lastLine();f<=k;++f){var h=
-g(b,f);if(-1!=h)if(h>e)d=f;else break}if(d)return{from:a.Pos(c.line,b.getLine(c.line).length),to:a.Pos(d,b.getLine(d).length)}}})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(b,c){var d=b.getLine(c),e=d.search(/\S/);return e==-1||/\bcomment\b/.test(b.getTokenTypeAt(a.Pos(c,e+1)))?-1:a.countColumn(d,null,b.getOption("tabSize"))}a.registerHelper("fold","indent",function(c,d){var e=b(c,d.line);if(!(e<0)){for(var f=null,g=d.line+1,h=c.lastLine();g<=h;++g){var i=b(c,g);if(i==-1);else{if(!(i>e))break;f=g}}return f?{from:a.Pos(d.line,c.getLine(d.line).length),to:a.Pos(f,c.getLine(f).length)}:void 0}})});
\ No newline at end of file
index 5e7b712..4e3988e 100644 (file)
@@ -1,2 +1 @@
-'use strict';(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)})(function(a){a.registerHelper("fold","markdown",function(c,d){function g(b){return(b=c.getTokenTypeAt(a.Pos(b,0)))&&/\bheader\b/.test(b)}function h(b,a,c){return(a=a&&a.match(/^#+/))&&g(b)?a[0].length:(a=c&&c.match(/^[=\-]+\s*$/))&&g(b+1)?"="==c[0]?1:2:100}var k=c.getLine(d.line),e=c.getLine(d.line+1),
-l=h(d.line,k,e);if(100!==l){for(var m=c.lastLine(),b=d.line,f=c.getLine(b+2);b<m&&!(h(b+1,e,f)<=l);)++b,e=f,f=c.getLine(b+2);return{from:a.Pos(d.line,k.length),to:a.Pos(b,c.getLine(b).length)}}})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.registerHelper("fold","markdown",function(b,c){function d(c){var d=b.getTokenTypeAt(a.Pos(c,0));return d&&/\bheader\b/.test(d)}function e(a,b,c){var e=b&&b.match(/^#+/);return e&&d(a)?e[0].length:(e=c&&c.match(/^[=\-]+\s*$/),e&&d(a+1)?"="==c[0]?1:2:f)}var f=100,g=b.getLine(c.line),h=b.getLine(c.line+1),i=e(c.line,g,h);if(i!==f){for(var j=b.lastLine(),k=c.line,l=b.getLine(k+2);k<j&&!(e(k+1,h,l)<=i);)++k,h=l,l=b.getLine(k+2);return{from:a.Pos(c.line,g.length),to:a.Pos(k,b.getLine(k).length)}}})});
\ No newline at end of file
index 57153f6..0e8cb3e 100644 (file)
@@ -1,7 +1 @@
-'use strict';(function(h){"object"==typeof exports&&"object"==typeof module?h(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],h):h(CodeMirror)})(function(h){function l(a,b,d,c){this.line=b;this.ch=d;this.cm=a;this.text=a.getLine(b);this.min=c?Math.max(c.from,a.firstLine()):a.firstLine();this.max=c?Math.min(c.to-1,a.lastLine()):a.lastLine()}function m(a,b){return(a=a.cm.getTokenTypeAt(k(a.line,b)))&&/\btag\b/.test(a)}function t(a){if(!(a.line>=
-a.max))return a.ch=0,a.text=a.cm.getLine(++a.line),!0}function u(a){if(!(a.line<=a.min))return a.text=a.cm.getLine(--a.line),a.ch=a.text.length,!0}function q(a){for(;;){var b=a.text.indexOf(">",a.ch);if(-1==b)if(t(a))continue;else break;if(m(a,b+1)){var d=a.text.lastIndexOf("/",b),d=-1<d&&!/\S/.test(a.text.slice(d+1,b));a.ch=b+1;return d?"selfClose":"regular"}a.ch=b+1}}function r(a){for(;;){var b=a.ch?a.text.lastIndexOf("<",a.ch-1):-1;if(-1==b)if(u(a))continue;else break;if(m(a,b+1)){n.lastIndex=
-b;a.ch=b;var d=n.exec(a.text);if(d&&d.index==b)return d}else a.ch=b}}function v(a){for(;;){n.lastIndex=a.ch;var b=n.exec(a.text);if(!b)if(t(a))continue;else break;if(m(a,b.index+1))return a.ch=b.index+b[0].length,b;a.ch=b.index+1}}function p(a,b){for(var d=[];;){var c=v(a),f,e=a.line,g=a.ch-(c?c[0].length:0);if(!c||!(f=q(a)))break;if("selfClose"!=f)if(c[1]){for(var h=d.length-1;0<=h;--h)if(d[h]==c[2]){d.length=h;break}if(0>h&&(!b||b==c[2]))return{tag:c[2],from:k(e,g),to:k(a.line,a.ch)}}else d.push(c[2])}}
-function w(a,b){for(var d=[];;){var c;a:for(c=a;;){var f=c.ch?c.text.lastIndexOf(">",c.ch-1):-1;if(-1==f)if(u(c))continue;else{c=void 0;break a}if(m(c,f+1)){var e=c.text.lastIndexOf("/",f),e=-1<e&&!/\S/.test(c.text.slice(e+1,f));c.ch=f+1;c=e?"selfClose":"regular";break a}else c.ch=f}if(!c)break;if("selfClose"==c)r(a);else{c=a.line;f=a.ch;e=r(a);if(!e)break;if(e[1])d.push(e[2]);else{for(var g=d.length-1;0<=g;--g)if(d[g]==e[2]){d.length=g;break}if(0>g&&(!b||b==e[2]))return{tag:e[2],from:k(a.line,a.ch),
-to:k(c,f)}}}}}var k=h.Pos,n=/<(\/?)([A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD-:.0-9\u00B7\u0300-\u036F\u203F-\u2040]*)/g;h.registerHelper("fold","xml",function(a,b){for(a=new l(a,b.line,0);;){var d=v(a),c;if(!d||a.line!=b.line||!(c=q(a)))break;
-if(!d[1]&&"selfClose"!=c)return b=k(a.line,a.ch),(a=p(a,d[2]))&&{from:b,to:a.from}}});h.findMatchingTag=function(a,b,d){var c=new l(a,b.line,b.ch,d);if(-1!=c.text.indexOf(">")||-1!=c.text.indexOf("<")){var f=q(c),e=f&&k(c.line,c.ch),g=f&&r(c);if(f&&g&&!(0<(c.line-b.line||c.ch-b.ch))){b={from:k(c.line,c.ch),to:e,tag:g[2]};if("selfClose"==f)return{open:b,close:null,at:"open"};if(g[1])return{open:w(c,g[2]),close:b,at:"close"};c=new l(a,e.line,e.ch,d);return{open:b,close:p(c,g[2]),at:"open"}}}};h.findEnclosingTag=
-function(a,b,d,c){for(var f=new l(a,b.line,b.ch,d);;){var e=w(f,c);if(!e)break;var g=new l(a,b.line,b.ch,d);if(g=p(g,e.tag))return{open:e,close:g}}};h.scanForClosingTag=function(a,b,d,c){a=new l(a,b.line,b.ch,c?{from:0,to:c}:null);return p(a,d)}});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){return a.line-b.line||a.ch-b.ch}function c(a,b,c,d){this.line=b,this.ch=c,this.cm=a,this.text=a.getLine(b),this.min=d?Math.max(d.from,a.firstLine()):a.firstLine(),this.max=d?Math.min(d.to-1,a.lastLine()):a.lastLine()}function d(a,b){var c=a.cm.getTokenTypeAt(m(a.line,b));return c&&/\btag\b/.test(c)}function e(a){if(!(a.line>=a.max))return a.ch=0,a.text=a.cm.getLine(++a.line),!0}function f(a){if(!(a.line<=a.min))return a.text=a.cm.getLine(--a.line),a.ch=a.text.length,!0}function g(a){for(;;){var b=a.text.indexOf(">",a.ch);if(b==-1){if(e(a))continue;return}{if(d(a,b+1)){var c=a.text.lastIndexOf("/",b),f=c>-1&&!/\S/.test(a.text.slice(c+1,b));return a.ch=b+1,f?"selfClose":"regular"}a.ch=b+1}}}function h(a){for(;;){var b=a.ch?a.text.lastIndexOf("<",a.ch-1):-1;if(b==-1){if(f(a))continue;return}if(d(a,b+1)){p.lastIndex=b,a.ch=b;var c=p.exec(a.text);if(c&&c.index==b)return c}else a.ch=b}}function i(a){for(;;){p.lastIndex=a.ch;var b=p.exec(a.text);if(!b){if(e(a))continue;return}{if(d(a,b.index+1))return a.ch=b.index+b[0].length,b;a.ch=b.index+1}}}function j(a){for(;;){var b=a.ch?a.text.lastIndexOf(">",a.ch-1):-1;if(b==-1){if(f(a))continue;return}{if(d(a,b+1)){var c=a.text.lastIndexOf("/",b),e=c>-1&&!/\S/.test(a.text.slice(c+1,b));return a.ch=b+1,e?"selfClose":"regular"}a.ch=b}}}function k(a,b){for(var c=[];;){var d,e=i(a),f=a.line,h=a.ch-(e?e[0].length:0);if(!e||!(d=g(a)))return;if("selfClose"!=d)if(e[1]){for(var j=c.length-1;j>=0;--j)if(c[j]==e[2]){c.length=j;break}if(j<0&&(!b||b==e[2]))return{tag:e[2],from:m(f,h),to:m(a.line,a.ch)}}else c.push(e[2])}}function l(a,b){for(var c=[];;){var d=j(a);if(!d)return;if("selfClose"!=d){var e=a.line,f=a.ch,g=h(a);if(!g)return;if(g[1])c.push(g[2]);else{for(var i=c.length-1;i>=0;--i)if(c[i]==g[2]){c.length=i;break}if(i<0&&(!b||b==g[2]))return{tag:g[2],from:m(a.line,a.ch),to:m(e,f)}}}else h(a)}}var m=a.Pos,n="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",o=n+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",p=new RegExp("<(/?)(["+n+"]["+o+"]*)","g");a.registerHelper("fold","xml",function(a,b){for(var d=new c(a,b.line,0);;){var e,f=i(d);if(!f||d.line!=b.line||!(e=g(d)))return;if(!f[1]&&"selfClose"!=e){var h=m(d.line,d.ch),j=k(d,f[2]);return j&&{from:h,to:j.from}}}}),a.findMatchingTag=function(a,d,e){var f=new c(a,d.line,d.ch,e);if(f.text.indexOf(">")!=-1||f.text.indexOf("<")!=-1){var i=g(f),j=i&&m(f.line,f.ch),n=i&&h(f);if(i&&n&&!(b(f,d)>0)){var o={from:m(f.line,f.ch),to:j,tag:n[2]};return"selfClose"==i?{open:o,close:null,at:"open"}:n[1]?{open:l(f,n[2]),close:o,at:"close"}:(f=new c(a,j.line,j.ch,e),{open:o,close:k(f,n[2]),at:"open"})}}},a.findEnclosingTag=function(a,b,d,e){for(var f=new c(a,b.line,b.ch,d);;){var g=l(f,e);if(!g)break;var h=new c(a,b.line,b.ch,d),i=k(h,g.tag);if(i)return{open:g,close:i}}},a.scanForClosingTag=function(a,b,d,e){var f=new c(a,b.line,b.ch,e?{from:0,to:e}:null);return k(f,d)}});
\ No newline at end of file
index 90615ed..85bf728 100644 (file)
@@ -1,2 +1 @@
-'use strict';(function(b){"object"==typeof exports&&"object"==typeof module?b(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],b):b(CodeMirror)})(function(b){var p=/[\w$]+/;b.registerHelper("hint","anyword",function(g,a){for(var l=a&&a.word||p,q=a&&a.range||500,c=g.getCursor(),d=g.getLine(c.line),m=c.ch,e=m;e&&l.test(d.charAt(e-1));)--e;d=e!=m&&d.slice(e,m);a=a&&a.list||[];for(var n={},l=new RegExp(l.source,"g"),h=-1;1>=h;h+=2)for(var k=c.line,
-r=Math.min(Math.max(k+h*q,g.firstLine()),g.lastLine())+h;k!=r;k+=h)for(var t=g.getLine(k),f;f=l.exec(t);)k==c.line&&f[0]===d||d&&0!=f[0].lastIndexOf(d,0)||Object.prototype.hasOwnProperty.call(n,f[0])||(n[f[0]]=!0,a.push(f[0]));return{list:a,from:b.Pos(c.line,e),to:b.Pos(c.line,m)}})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";var b=/[\w$]+/,c=500;a.registerHelper("hint","anyword",function(d,e){for(var f=e&&e.word||b,g=e&&e.range||c,h=d.getCursor(),i=d.getLine(h.line),j=h.ch,k=j;k&&f.test(i.charAt(k-1));)--k;for(var l=k!=j&&i.slice(k,j),m=e&&e.list||[],n={},o=new RegExp(f.source,"g"),p=-1;p<=1;p+=2)for(var q=h.line,r=Math.min(Math.max(q+p*g,d.firstLine()),d.lastLine())+p;q!=r;q+=p)for(var s,t=d.getLine(q);s=o.exec(t);)q==h.line&&s[0]===l||l&&0!=s[0].lastIndexOf(l,0)||Object.prototype.hasOwnProperty.call(n,s[0])||(n[s[0]]=!0,m.push(s[0]));return{list:m,from:a.Pos(h.line,k),to:a.Pos(h.line,j)}})});
\ No newline at end of file
index 1a65c99..1158adc 100644 (file)
@@ -1,3 +1 @@
-'use strict';(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../../mode/css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/css/css"],a):a(CodeMirror)})(function(a){var m={link:1,visited:1,active:1,hover:1,focus:1,"first-letter":1,"first-line":1,"first-child":1,before:1,after:1,lang:1};a.registerHelper("hint","css",function(d){function f(b){for(var a in b)h&&0!=a.lastIndexOf(h,0)||k.push(a)}var e=d.getCursor(),
-c=d.getTokenAt(e),b=a.innerMode(d.getMode(),c.state);if("css"==b.mode.name){if("keyword"==c.type&&0=="!important".indexOf(c.string))return{list:["!important"],from:a.Pos(e.line,c.start),to:a.Pos(e.line,c.end)};d=c.start;var l=e.ch,h=c.string.slice(0,l-d);/[^\w$_-]/.test(h)&&(h="",d=l=e.ch);var g=a.resolveMode("text/css"),k=[],b=b.state.state;if("pseudo"==b||"variable-3"==c.type)f(m);else if("block"==b||"maybeprop"==b)f(g.propertyKeywords);else if("prop"==b||"parens"==b||"at"==b||"params"==b)f(g.valueKeywords),
-f(g.colorKeywords);else if("media"==b||"media_parens"==b)f(g.mediaTypes),f(g.mediaFeatures);if(k.length)return{list:k,from:a.Pos(e.line,d),to:a.Pos(e.line,l)}}})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../../mode/css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/css/css"],a):a(CodeMirror)}(function(a){"use strict";var b={link:1,visited:1,active:1,hover:1,focus:1,"first-letter":1,"first-line":1,"first-child":1,before:1,after:1,lang:1};a.registerHelper("hint","css",function(c){function d(a){for(var b in a)j&&0!=b.lastIndexOf(j,0)||l.push(b)}var e=c.getCursor(),f=c.getTokenAt(e),g=a.innerMode(c.getMode(),f.state);if("css"==g.mode.name){if("keyword"==f.type&&0=="!important".indexOf(f.string))return{list:["!important"],from:a.Pos(e.line,f.start),to:a.Pos(e.line,f.end)};var h=f.start,i=e.ch,j=f.string.slice(0,i-h);/[^\w$_-]/.test(j)&&(j="",h=i=e.ch);var k=a.resolveMode("text/css"),l=[],m=g.state.state;return"pseudo"==m||"variable-3"==f.type?d(b):"block"==m||"maybeprop"==m?d(k.propertyKeywords):"prop"==m||"parens"==m||"at"==m||"params"==m?(d(k.valueKeywords),d(k.colorKeywords)):"media"!=m&&"media_parens"!=m||(d(k.mediaTypes),d(k.mediaFeatures)),l.length?{list:l,from:a.Pos(e.line,h),to:a.Pos(e.line,i)}:void 0}})});
\ No newline at end of file
index a13cf7f..31a7d4a 100644 (file)
@@ -1,14 +1 @@
-'use strict';(function(b){"object"==typeof exports&&"object"==typeof module?b(require("../../lib/codemirror"),require("./xml-hint")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./xml-hint"],b):b(CodeMirror)})(function(b){function n(a){for(var b in g)g.hasOwnProperty(b)&&(a.attrs[b]=g[b])}var d="ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" "),
-c=["_blank","_self","_top","_parent"],h=["ascii","utf-8","utf-16","latin1","latin1"],k=["get","post","put","delete"],l=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],e="all;screen;print;embossed;braille;handheld;print;projection;screen;tty;tv;speech;3d-glasses;resolution [>][<][=] [X];device-aspect-ratio: X/Y;orientation:portrait;orientation:landscape;device-height: [X];device-width: [X]".split(";"),a={attrs:{}},f={a:{attrs:{href:null,ping:null,type:null,media:e,target:c,
-hreflang:d}},abbr:a,acronym:a,address:a,applet:a,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:e,hreflang:d,type:null,shape:["default","rect","circle","poly"]}},article:a,aside:a,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:a,base:{attrs:{href:null,target:c}},basefont:a,bdi:a,bdo:a,big:a,blockquote:{attrs:{cite:null}},body:a,br:a,
-button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:l,formmethod:k,formnovalidate:["","novalidate"],formtarget:c,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:a,center:a,cite:a,code:a,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["","disabled"],checked:["","checked"]}},
-data:{attrs:{value:null}},datagrid:{attrs:{disabled:["","disabled"],multiple:["","multiple"]}},datalist:{attrs:{data:null}},dd:a,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:a,dir:a,div:a,dl:a,dt:a,em:a,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:a,figure:a,font:a,footer:a,form:{attrs:{action:null,name:null,"accept-charset":h,autocomplete:["on","off"],
-enctype:l,method:k,novalidate:["","novalidate"],target:c}},frame:a,frameset:a,h1:a,h2:a,h3:a,h4:a,h5:a,h6:a,head:{attrs:{},children:"title base link style meta script noscript command".split(" ")},header:a,hgroup:a,hr:a,html:{attrs:{manifest:null},children:["head","body"]},i:a,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["","seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,
-width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["","autofocus"],checked:["","checked"],disabled:["","disabled"],formenctype:l,formmethod:k,formnovalidate:["","novalidate"],formtarget:c,multiple:["",
-"multiple"],readonly:["","readonly"],required:["","required"],type:"hidden text search tel url email password datetime date month week time datetime-local number range color checkbox radio file submit image reset button".split(" ")}},ins:{attrs:{cite:null,datetime:null}},kbd:a,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{"for":null,form:null}},legend:a,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,
-hreflang:d,media:e,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:a,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:h,name:"viewport application-name author description generator keywords".split(" "),"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:a,noframes:a,noscript:a,object:{attrs:{data:null,type:null,
-name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["","typemustmatch"]}},ol:{attrs:{reversed:["","reversed"],start:null,type:["1","a","A","i","I"]}},optgroup:{attrs:{disabled:["","disabled"],label:null}},option:{attrs:{disabled:["","disabled"],label:null,selected:["","selected"],value:null}},output:{attrs:{"for":null,form:null,name:null}},p:a,param:{attrs:{name:null,value:null}},pre:a,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:a,rt:a,ruby:a,s:a,samp:a,script:{attrs:{type:["text/javascript"],
-src:null,async:["","async"],defer:["","defer"],charset:h}},section:a,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:a,source:{attrs:{src:null,type:null,media:null}},span:a,strike:a,strong:a,style:{attrs:{type:["text/css"],media:e,scoped:null}},sub:a,summary:a,sup:a,table:a,tbody:a,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,
-cols:null,autofocus:["","autofocus"],disabled:["","disabled"],readonly:["","readonly"],required:["","required"],wrap:["soft","hard"]}},tfoot:a,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:a,time:{attrs:{datetime:null}},title:a,tr:a,track:{attrs:{src:null,label:null,"default":null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:d}},tt:a,u:a,ul:a,"var":a,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous",
-"use-credentials"],preload:["auto","metadata","none"],autoplay:["","autoplay"],mediagroup:["movie"],muted:["","muted"],controls:["","controls"]}},wbr:a},g={accesskey:"abcdefghijklmnopqrstuvwxyz0123456789".split(""),"class":null,contenteditable:["true","false"],contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,
-lang:["en","es"],spellcheck:["true","false"],style:null,tabindex:"123456789".split(""),title:null,translate:["yes","no"],onclick:null,rel:"stylesheet alternate author bookmark help license next nofollow noreferrer prefetch prev search tag".split(" ")};n(a);for(var m in f)f.hasOwnProperty(m)&&f[m]!=a&&n(f[m]);b.htmlSchema=f;b.registerHelper("hint","html",function(a,c){var d={schemaInfo:f};if(c)for(var e in c)d[e]=c[e];return b.hint.xml(a,d)})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("./xml-hint")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./xml-hint"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b in l)l.hasOwnProperty(b)&&(a.attrs[b]=l[b])}function c(b,c){var d={schemaInfo:k};if(c)for(var e in c)d[e]=c[e];return a.hint.xml(b,d)}var d="ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" "),e=["_blank","_self","_top","_parent"],f=["ascii","utf-8","utf-16","latin1","latin1"],g=["get","post","put","delete"],h=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],i=["all","screen","print","embossed","braille","handheld","print","projection","screen","tty","tv","speech","3d-glasses","resolution [>][<][=] [X]","device-aspect-ratio: X/Y","orientation:portrait","orientation:landscape","device-height: [X]","device-width: [X]"],j={attrs:{}},k={a:{attrs:{href:null,ping:null,type:null,media:i,target:e,hreflang:d}},abbr:j,acronym:j,address:j,applet:j,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:i,hreflang:d,type:null,shape:["default","rect","circle","poly"]}},article:j,aside:j,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:j,base:{attrs:{href:null,target:e}},basefont:j,bdi:j,bdo:j,big:j,blockquote:{attrs:{cite:null}},body:j,br:j,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:h,formmethod:g,formnovalidate:["","novalidate"],formtarget:e,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:j,center:j,cite:j,code:j,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["","disabled"],checked:["","checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["","disabled"],multiple:["","multiple"]}},datalist:{attrs:{data:null}},dd:j,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:j,dir:j,div:j,dl:j,dt:j,em:j,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:j,figure:j,font:j,footer:j,form:{attrs:{action:null,name:null,"accept-charset":f,autocomplete:["on","off"],enctype:h,method:g,novalidate:["","novalidate"],target:e}},frame:j,frameset:j,h1:j,h2:j,h3:j,h4:j,h5:j,h6:j,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:j,hgroup:j,hr:j,html:{attrs:{manifest:null},children:["head","body"]},i:j,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["","seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["","autofocus"],checked:["","checked"],disabled:["","disabled"],formenctype:h,formmethod:g,formnovalidate:["","novalidate"],formtarget:e,multiple:["","multiple"],readonly:["","readonly"],required:["","required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:j,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:j,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:d,media:i,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:j,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:f,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:j,noframes:j,noscript:j,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["","typemustmatch"]}},ol:{attrs:{reversed:["","reversed"],start:null,type:["1","a","A","i","I"]}},optgroup:{attrs:{disabled:["","disabled"],label:null}},option:{attrs:{disabled:["","disabled"],label:null,selected:["","selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:j,param:{attrs:{name:null,value:null}},pre:j,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:j,rt:j,ruby:j,s:j,samp:j,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:f}},section:j,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:j,source:{attrs:{src:null,type:null,media:null}},span:j,strike:j,strong:j,style:{attrs:{type:["text/css"],media:i,scoped:null}},sub:j,summary:j,sup:j,table:j,tbody:j,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["","autofocus"],disabled:["","disabled"],readonly:["","readonly"],required:["","required"],wrap:["soft","hard"]}},tfoot:j,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:j,time:{attrs:{datetime:null}},title:j,tr:j,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:d}},tt:j,u:j,ul:j,var:j,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["","autoplay"],mediagroup:["movie"],muted:["","muted"],controls:["","controls"]}},wbr:j},l={accesskey:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"],class:null,contenteditable:["true","false"],contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["en","es"],spellcheck:["true","false"],style:null,tabindex:["1","2","3","4","5","6","7","8","9"],title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"]};b(j);for(var m in k)k.hasOwnProperty(m)&&k[m]!=j&&b(k[m]);a.htmlSchema=k,a.registerHelper("hint","html",c)});
\ No newline at end of file
index 357a083..166325f 100644 (file)
@@ -1,6 +1 @@
-'use strict';(function(d){"object"==typeof exports&&"object"==typeof module?d(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],d):d(CodeMirror)})(function(d){function m(a,b){for(var k=0,e=a.length;k<e;++k)b(a[k])}function p(a,b,k,e){var f,g=a.getCursor(),c=k(a,g);if(!/\b(?:string|comment)\b/.test(c.type)){c.state=d.innerMode(a.getMode(),c.state).state;/^[\w$_]*$/.test(c.string)?c.end>g.ch&&(c.end=g.ch,c.string=c.string.slice(0,g.ch-c.start)):c=
-{start:g.ch,end:g.ch,string:"",state:c.state,type:"."==c.string?"property":null};for(var l=c;"property"==l.type;){l=k(a,n(g.line,l.start));if("."!=l.string)return;l=k(a,n(g.line,l.start));f||(f=[]);f.push(l)}return{list:q(c,f,b,e),from:n(g.line,c.start),to:n(g.line,c.end)}}}function r(a,b){a=a.getTokenAt(b);b.ch==a.start+1&&"."==a.string.charAt(0)?(a.end=a.start,a.string=".",a.type="property"):/^\.[\w$_]*$/.test(a.string)&&(a.type="property",a.start++,a.string=a.string.replace(/\./,""));return a}
-function q(a,b,k,e){function f(a){var b;if(b=0==a.lastIndexOf(l,0)){a:if(Array.prototype.indexOf)b=-1!=c.indexOf(a);else{for(b=c.length;b--;)if(c[b]===a){b=!0;break a}b=!1}b=!b}b&&c.push(a)}function g(a){"string"==typeof a?m(t,f):a instanceof Array?m(u,f):a instanceof Function&&m(v,f);if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(;a;a=Object.getPrototypeOf(a))Object.getOwnPropertyNames(a).forEach(f);else for(var b in a)f(b)}var c=[],l=a.string,d=e&&e.globalScope||window;if(b&&b.length){a=
-b.pop();var h;a.type&&0===a.type.indexOf("variable")?(e&&e.additionalContext&&(h=e.additionalContext[a.string]),e&&!1===e.useGlobalScope||(h=h||d[a.string])):"string"==a.type?h="":"atom"==a.type?h=1:"function"==a.type&&(null==d.jQuery||"$"!=a.string&&"jQuery"!=a.string||"function"!=typeof d.jQuery?null!=d._&&"_"==a.string&&"function"==typeof d._&&(h=d._()):h=d.jQuery());for(;null!=h&&b.length;)h=h[b.pop().string];null!=h&&g(h)}else{for(b=a.state.localVars;b;b=b.next)f(b.name);for(b=a.state.globalVars;b;b=
-b.next)f(b.name);e&&!1===e.useGlobalScope||g(d);m(k,f)}return c}var n=d.Pos;d.registerHelper("hint","javascript",function(a,b){return p(a,w,function(a,b){return a.getTokenAt(b)},b)});d.registerHelper("hint","coffeescript",function(a,b){return p(a,x,r,b)});var t="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),u="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),
-v=["prototype","apply","call","bind"],w="break case catch continue debugger default delete do else false finally for function if in instanceof new null return switch throw true try typeof var void while with".split(" "),x="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ")});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a,b){for(var c=0,d=a.length;c<d;++c)b(a[c])}function c(a,b){if(!Array.prototype.indexOf){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1}return a.indexOf(b)!=-1}function d(b,c,d,e){var f=b.getCursor(),g=d(b,f);if(!/\b(?:string|comment)\b/.test(g.type)){g.state=a.innerMode(b.getMode(),g.state).state,/^[\w$_]*$/.test(g.string)?g.end>f.ch&&(g.end=f.ch,g.string=g.string.slice(0,f.ch-g.start)):g={start:f.ch,end:f.ch,string:"",state:g.state,type:"."==g.string?"property":null};for(var h=g;"property"==h.type;){if(h=d(b,j(f.line,h.start)),"."!=h.string)return;if(h=d(b,j(f.line,h.start)),!k)var k=[];k.push(h)}return{list:i(g,k,c,e),from:j(f.line,g.start),to:j(f.line,g.end)}}}function e(a,b){return d(a,n,function(a,b){return a.getTokenAt(b)},b)}function f(a,b){var c=a.getTokenAt(b);return b.ch==c.start+1&&"."==c.string.charAt(0)?(c.end=c.start,c.string=".",c.type="property"):/^\.[\w$_]*$/.test(c.string)&&(c.type="property",c.start++,c.string=c.string.replace(/\./,"")),c}function g(a,b){return d(a,o,f,b)}function h(a,b){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var c=a;c;c=Object.getPrototypeOf(c))Object.getOwnPropertyNames(c).forEach(b);else for(var d in a)b(d)}function i(a,d,e,f){function g(a){0!=a.lastIndexOf(n,0)||c(j,a)||j.push(a)}function i(a){"string"==typeof a?b(k,g):a instanceof Array?b(l,g):a instanceof Function&&b(m,g),h(a,g)}var j=[],n=a.string,o=f&&f.globalScope||window;if(d&&d.length){var p,q=d.pop();for(q.type&&0===q.type.indexOf("variable")?(f&&f.additionalContext&&(p=f.additionalContext[q.string]),f&&f.useGlobalScope===!1||(p=p||o[q.string])):"string"==q.type?p="":"atom"==q.type?p=1:"function"==q.type&&(null==o.jQuery||"$"!=q.string&&"jQuery"!=q.string||"function"!=typeof o.jQuery?null!=o._&&"_"==q.string&&"function"==typeof o._&&(p=o._()):p=o.jQuery());null!=p&&d.length;)p=p[d.pop().string];null!=p&&i(p)}else{for(var r=a.state.localVars;r;r=r.next)g(r.name);for(var r=a.state.globalVars;r;r=r.next)g(r.name);f&&f.useGlobalScope===!1||i(o),b(e,g)}return j}var j=a.Pos;a.registerHelper("hint","javascript",e),a.registerHelper("hint","coffeescript",g);var k="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),l="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),m="prototype apply call bind".split(" "),n="break case catch continue debugger default delete do else false finally for function if in instanceof new null return switch throw true try typeof var void while with".split(" "),o="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ")});
\ No newline at end of file
index 311e1c3..5617ccc 100644 (file)
@@ -1 +1,36 @@
-.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;white-space:pre;color:#000;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:#fff}
\ No newline at end of file
+.CodeMirror-hints {
+  position: absolute;
+  z-index: 10;
+  overflow: hidden;
+  list-style: none;
+
+  margin: 0;
+  padding: 2px;
+
+  -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
+  -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
+  box-shadow: 2px 3px 5px rgba(0,0,0,.2);
+  border-radius: 3px;
+  border: 1px solid silver;
+
+  background: white;
+  font-size: 90%;
+  font-family: monospace;
+
+  max-height: 20em;
+  overflow-y: auto;
+}
+
+.CodeMirror-hint {
+  margin: 0;
+  padding: 0 4px;
+  border-radius: 2px;
+  white-space: pre;
+  color: black;
+  cursor: pointer;
+}
+
+li.CodeMirror-hint-active {
+  background: #08f;
+  color: white;
+}
index 7c0d49d..eeade08 100644 (file)
@@ -1,17 +1 @@
-'use strict';(function(f){"object"==typeof exports&&"object"==typeof module?f(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],f):f(CodeMirror)})(function(f){function n(a,b){this.cm=a;this.options=b;this.widget=null;this.tick=this.debounce=0;this.startPos=this.cm.getCursor("start");this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var c=this;a.on("cursorActivity",this.activityFunc=function(){c.cursorActivity()})}
-function y(a,b){function c(a,d){var c="string"!=typeof d?function(a){return d(a,b)}:e.hasOwnProperty(d)?e[d]:d;f[a]=c}var e={Up:function(){b.moveFocus(-1)},Down:function(){b.moveFocus(1)},PageUp:function(){b.moveFocus(-b.menuSize()+1,!0)},PageDown:function(){b.moveFocus(b.menuSize()-1,!0)},Home:function(){b.setFocus(0)},End:function(){b.setFocus(b.length-1)},Enter:b.pick,Tab:b.pick,Esc:b.close},d=a.options.customKeys,f=d?{}:e;if(d)for(var g in d)d.hasOwnProperty(g)&&c(g,d[g]);if(a=a.options.extraKeys)for(g in a)a.hasOwnProperty(g)&&
-c(g,a[g]);return f}function w(a,b){for(;b&&b!=a;){if("LI"===b.nodeName.toUpperCase()&&b.parentNode==a)return b;b=b.parentNode}}function q(a,b){this.completion=a;this.data=b;this.picked=!1;var c=this,e=a.cm,d=this.hints=document.createElement("ul");d.className="CodeMirror-hints";this.selectedHint=b.selectedHint||0;for(var m=b.list,g=0;g<m.length;++g){var l=d.appendChild(document.createElement("li")),h=m[g],p="CodeMirror-hint"+(g!=this.selectedHint?"":" CodeMirror-hint-active");null!=h.className&&(p=
-h.className+" "+p);l.className=p;h.render?h.render(l,b,h):l.appendChild(document.createTextNode(h.displayText||("string"==typeof h?h:h.text)));l.hintId=g}var g=e.cursorCoords(a.options.alignWithWord?b.from:null),u=g.left,v=g.bottom,n=!0;d.style.left=u+"px";d.style.top=v+"px";var l=window.innerWidth||Math.max(document.body.offsetWidth,document.documentElement.offsetWidth),k=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);(a.options.container||document.body).appendChild(d);
-var h=d.getBoundingClientRect(),r=h.bottom-k,p=d.scrollHeight>d.clientHeight+1,q=e.getScrollInfo();0<r&&(r=h.bottom-h.top,0<g.top-(g.bottom-h.top)-r?(d.style.top=(v=g.top-r)+"px",n=!1):r>k&&(d.style.height=k-5+"px",d.style.top=(v=g.bottom-h.top)+"px",k=e.getCursor(),b.from.ch!=k.ch&&(g=e.cursorCoords(k),d.style.left=(u=g.left)+"px",h=d.getBoundingClientRect())));k=h.right-l;0<k&&(h.right-h.left>l&&(d.style.width=l-5+"px",k-=h.right-h.left-l),d.style.left=(u=g.left-k)+"px");if(p)for(g=d.firstChild;g;g=
-g.nextSibling)g.style.paddingRight=e.display.nativeBarWidth+"px";e.addKeyMap(this.keyMap=y(a,{moveFocus:function(a,b){c.changeActive(c.selectedHint+a,b)},setFocus:function(a){c.changeActive(a)},menuSize:function(){return c.screenAmount()},length:m.length,close:function(){a.close()},pick:function(){c.pick()},data:b}));if(a.options.closeOnUnfocus){var t;e.on("blur",this.onBlur=function(){t=setTimeout(function(){a.close()},100)});e.on("focus",this.onFocus=function(){clearTimeout(t)})}e.on("scroll",this.onScroll=
-function(){var b=e.getScrollInfo(),c=e.getWrapperElement().getBoundingClientRect(),g=v+q.top-b.top,f=g-(window.pageYOffset||(document.documentElement||document.body).scrollTop);n||(f+=d.offsetHeight);if(f<=c.top||f>=c.bottom)return a.close();d.style.top=g+"px";d.style.left=u+q.left-b.left+"px"});f.on(d,"dblclick",function(a){(a=w(d,a.target||a.srcElement))&&null!=a.hintId&&(c.changeActive(a.hintId),c.pick())});f.on(d,"click",function(b){(b=w(d,b.target||b.srcElement))&&null!=b.hintId&&(c.changeActive(b.hintId),
-a.options.completeOnSingleClick&&c.pick())});f.on(d,"mousedown",function(){setTimeout(function(){e.focus()},20)});f.signal(b,"select",m[0],d.firstChild);return!0}function z(a,b){if(!a.somethingSelected())return b;a=[];for(var c=0;c<b.length;c++)b[c].supportsSelection&&a.push(b[c]);return a}function t(a,b,c,e){a.async?a(b,e,c):(a=a(b,c))&&a.then?a.then(e):e(a)}f.showHint=function(a,b,c){if(!b)return a.showHint(c);c&&c.async&&(b.async=!0);b={hint:b};if(c)for(var e in c)b[e]=c[e];return a.showHint(b)};
-f.defineExtension("showHint",function(a){var b=this.getCursor("start"),c=this.options.hintOptions,e={},d;for(d in x)e[d]=x[d];if(c)for(d in c)void 0!==c[d]&&(e[d]=c[d]);if(a)for(d in a)void 0!==a[d]&&(e[d]=a[d]);e.hint.resolve&&(e.hint=e.hint.resolve(this,b));a=e;b=this.listSelections();if(!(1<b.length)){if(this.somethingSelected()){if(!a.hint.supportsSelection)return;for(d=0;d<b.length;d++)if(b[d].head.line!=b[d].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();
-b=this.state.completionActive=new n(this,a);b.options.hint&&(f.signal(this,"startCompletion",this),b.update(!0))}});var A=window.requestAnimationFrame||function(a){return setTimeout(a,1E3/60)},B=window.cancelAnimationFrame||clearTimeout;n.prototype={close:function(){this.active()&&(this.tick=this.cm.state.completionActive=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&f.signal(this.data,"close"),this.widget&&this.widget.close(),f.signal(this.cm,"endCompletion",this.cm))},
-active:function(){return this.cm.state.completionActive==this},pick:function(a,b){b=a.list[b];b.hint?b.hint(this.cm,a,b):this.cm.replaceRange("string"==typeof b?b:b.text,b.from||a.from,b.to||a.to,"complete");f.signal(a,"pick",b);this.close()},cursorActivity:function(){this.debounce&&(B(this.debounce),this.debounce=0);var a=this.cm.getCursor(),b=this.cm.getLine(a.line);if(a.line!=this.startPos.line||b.length-a.ch!=this.startLen-this.startPos.ch||a.ch<this.startPos.ch||this.cm.somethingSelected()||
-a.ch&&this.options.closeCharacters.test(b.charAt(a.ch-1)))this.close();else{var c=this;this.debounce=A(function(){c.update()});this.widget&&this.widget.disable()}},update:function(a){if(null!=this.tick){var b=this,c=++this.tick;t(this.options.hint,this.cm,this.options,function(e){b.tick==c&&b.finishUpdate(e,a)})}},finishUpdate:function(a,b){this.data&&f.signal(this.data,"update");b=this.widget&&this.widget.picked||b&&this.options.completeSingle;this.widget&&this.widget.close();var c;if(c=a&&this.data)c=
-this.data,c=0<f.cmpPos(a.from,c.from)&&c.to.ch-c.from.ch!=a.to.ch-a.from.ch;c||(this.data=a)&&a.list.length&&(b&&1==a.list.length?this.pick(a,0):(this.widget=new q(this,a),f.signal(a,"shown")))}};q.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null;this.hints.parentNode.removeChild(this.hints);this.completion.cm.removeKeyMap(this.keyMap);var a=this.completion.cm;this.completion.options.closeOnUnfocus&&(a.off("blur",this.onBlur),a.off("focus",this.onFocus));a.off("scroll",
-this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var a=this;this.keyMap={Enter:function(){a.picked=!0}};this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(a,b){a>=this.data.list.length?a=b?this.data.list.length-1:0:0>a&&(a=b?0:this.data.list.length-1);this.selectedHint!=a&&(b=this.hints.childNodes[this.selectedHint],b.className=b.className.replace(" CodeMirror-hint-active",""),b=this.hints.childNodes[this.selectedHint=
-a],b.className+=" CodeMirror-hint-active",b.offsetTop<this.hints.scrollTop?this.hints.scrollTop=b.offsetTop-3:b.offsetTop+b.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=b.offsetTop+b.offsetHeight-this.hints.clientHeight+3),f.signal(this.data,"select",this.data.list[this.selectedHint],b))},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}};f.registerHelper("hint","auto",{resolve:function(a,b){var c=a.getHelpers(b,
-"hint"),e;return c.length?(a=function(a,b,e){function d(c){if(c==f.length)return b(null);t(f[c],a,e,function(a){a&&0<a.list.length?b(a):d(c+1)})}var f=z(a,c);d(0)},a.async=!0,a.supportsSelection=!0,a):(e=a.getHelper(a.getCursor(),"hintWords"))?function(a){return f.hint.fromList(a,{words:e})}:f.hint.anyword?function(a,b){return f.hint.anyword(a,b)}:function(){}}});f.registerHelper("hint","fromList",function(a,b){var c=a.getCursor();var e=a.getTokenAt(c),d=f.Pos(c.line,e.end);e.string&&/\w/.test(e.string[e.string.length-
-1])?(a=e.string,c=f.Pos(c.line,e.start)):(a="",c=d);for(var e=[],m=0;m<b.words.length;m++){var g=b.words[m];g.slice(0,a.length)==a&&e.push(g)}if(e.length)return{list:e,from:c,to:d}});f.commands.autocomplete=f.showHint;var x={hint:f.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};f.defineOption("hintOptions",null)});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){this.cm=a,this.options=b,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var c=this;a.on("cursorActivity",this.activityFunc=function(){c.cursorActivity()})}function c(b,c){var d=a.cmpPos(c.from,b.from);return d>0&&b.to.ch-b.from.ch!=c.to.ch-c.from.ch}function d(a,b,c){var d=a.options.hintOptions,e={};for(var f in p)e[f]=p[f];if(d)for(var f in d)void 0!==d[f]&&(e[f]=d[f]);if(c)for(var f in c)void 0!==c[f]&&(e[f]=c[f]);return e.hint.resolve&&(e.hint=e.hint.resolve(a,b)),e}function e(a){return"string"==typeof a?a:a.text}function f(a,b){function c(a,c){var e;e="string"!=typeof c?function(a){return c(a,b)}:d.hasOwnProperty(c)?d[c]:c,f[a]=e}var d={Up:function(){b.moveFocus(-1)},Down:function(){b.moveFocus(1)},PageUp:function(){b.moveFocus(-b.menuSize()+1,!0)},PageDown:function(){b.moveFocus(b.menuSize()-1,!0)},Home:function(){b.setFocus(0)},End:function(){b.setFocus(b.length-1)},Enter:b.pick,Tab:b.pick,Esc:b.close},e=a.options.customKeys,f=e?{}:d;if(e)for(var g in e)e.hasOwnProperty(g)&&c(g,e[g]);var h=a.options.extraKeys;if(h)for(var g in h)h.hasOwnProperty(g)&&c(g,h[g]);return f}function g(a,b){for(;b&&b!=a;){if("LI"===b.nodeName.toUpperCase()&&b.parentNode==a)return b;b=b.parentNode}}function h(b,c){this.completion=b,this.data=c,this.picked=!1;var d=this,h=b.cm,i=this.hints=document.createElement("ul");i.className="CodeMirror-hints",this.selectedHint=c.selectedHint||0;for(var j=c.list,k=0;k<j.length;++k){var n=i.appendChild(document.createElement("li")),o=j[k],p=l+(k!=this.selectedHint?"":" "+m);null!=o.className&&(p=o.className+" "+p),n.className=p,o.render?o.render(n,c,o):n.appendChild(document.createTextNode(o.displayText||e(o))),n.hintId=k}var q=h.cursorCoords(b.options.alignWithWord?c.from:null),r=q.left,s=q.bottom,t=!0;i.style.left=r+"px",i.style.top=s+"px";var u=window.innerWidth||Math.max(document.body.offsetWidth,document.documentElement.offsetWidth),v=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);(b.options.container||document.body).appendChild(i);var w=i.getBoundingClientRect(),x=w.bottom-v,y=i.scrollHeight>i.clientHeight+1,z=h.getScrollInfo();if(x>0){var A=w.bottom-w.top,B=q.top-(q.bottom-w.top);if(B-A>0)i.style.top=(s=q.top-A)+"px",t=!1;else if(A>v){i.style.height=v-5+"px",i.style.top=(s=q.bottom-w.top)+"px";var C=h.getCursor();c.from.ch!=C.ch&&(q=h.cursorCoords(C),i.style.left=(r=q.left)+"px",w=i.getBoundingClientRect())}}var D=w.right-u;if(D>0&&(w.right-w.left>u&&(i.style.width=u-5+"px",D-=w.right-w.left-u),i.style.left=(r=q.left-D)+"px"),y)for(var E=i.firstChild;E;E=E.nextSibling)E.style.paddingRight=h.display.nativeBarWidth+"px";if(h.addKeyMap(this.keyMap=f(b,{moveFocus:function(a,b){d.changeActive(d.selectedHint+a,b)},setFocus:function(a){d.changeActive(a)},menuSize:function(){return d.screenAmount()},length:j.length,close:function(){b.close()},pick:function(){d.pick()},data:c})),b.options.closeOnUnfocus){var F;h.on("blur",this.onBlur=function(){F=setTimeout(function(){b.close()},100)}),h.on("focus",this.onFocus=function(){clearTimeout(F)})}return h.on("scroll",this.onScroll=function(){var a=h.getScrollInfo(),c=h.getWrapperElement().getBoundingClientRect(),d=s+z.top-a.top,e=d-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return t||(e+=i.offsetHeight),e<=c.top||e>=c.bottom?b.close():(i.style.top=d+"px",void(i.style.left=r+z.left-a.left+"px"))}),a.on(i,"dblclick",function(a){var b=g(i,a.target||a.srcElement);b&&null!=b.hintId&&(d.changeActive(b.hintId),d.pick())}),a.on(i,"click",function(a){var c=g(i,a.target||a.srcElement);c&&null!=c.hintId&&(d.changeActive(c.hintId),b.options.completeOnSingleClick&&d.pick())}),a.on(i,"mousedown",function(){setTimeout(function(){h.focus()},20)}),a.signal(c,"select",j[this.selectedHint],i.childNodes[this.selectedHint]),!0}function i(a,b){if(!a.somethingSelected())return b;for(var c=[],d=0;d<b.length;d++)b[d].supportsSelection&&c.push(b[d]);return c}function j(a,b,c,d){if(a.async)a(b,d,c);else{var e=a(b,c);e&&e.then?e.then(d):d(e)}}function k(b,c){var d,e=b.getHelpers(c,"hint");if(e.length){var f=function(a,b,c){function d(e){return e==f.length?b(null):void j(f[e],a,c,function(a){a&&a.list.length>0?b(a):d(e+1)})}var f=i(a,e);d(0)};return f.async=!0,f.supportsSelection=!0,f}return(d=b.getHelper(b.getCursor(),"hintWords"))?function(b){return a.hint.fromList(b,{words:d})}:a.hint.anyword?function(b,c){return a.hint.anyword(b,c)}:function(){}}var l="CodeMirror-hint",m="CodeMirror-hint-active";a.showHint=function(a,b,c){if(!b)return a.showHint(c);c&&c.async&&(b.async=!0);var d={hint:b};if(c)for(var e in c)d[e]=c[e];return a.showHint(d)},a.defineExtension("showHint",function(c){c=d(this,this.getCursor("start"),c);var e=this.listSelections();if(!(e.length>1)){if(this.somethingSelected()){if(!c.hint.supportsSelection)return;for(var f=0;f<e.length;f++)if(e[f].head.line!=e[f].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var g=this.state.completionActive=new b(this,c);g.options.hint&&(a.signal(this,"startCompletion",this),g.update(!0))}});var n=window.requestAnimationFrame||function(a){return setTimeout(a,1e3/60)},o=window.cancelAnimationFrame||clearTimeout;b.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&a.signal(this.data,"close"),this.widget&&this.widget.close(),a.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(b,c){var d=b.list[c];d.hint?d.hint(this.cm,b,d):this.cm.replaceRange(e(d),d.from||b.from,d.to||b.to,"complete"),a.signal(b,"pick",d),this.close()},cursorActivity:function(){this.debounce&&(o(this.debounce),this.debounce=0);var a=this.cm.getCursor(),b=this.cm.getLine(a.line);if(a.line!=this.startPos.line||b.length-a.ch!=this.startLen-this.startPos.ch||a.ch<this.startPos.ch||this.cm.somethingSelected()||a.ch&&this.options.closeCharacters.test(b.charAt(a.ch-1)))this.close();else{var c=this;this.debounce=n(function(){c.update()}),this.widget&&this.widget.disable()}},update:function(a){if(null!=this.tick){var b=this,c=++this.tick;j(this.options.hint,this.cm,this.options,function(d){b.tick==c&&b.finishUpdate(d,a)})}},finishUpdate:function(b,d){this.data&&a.signal(this.data,"update");var e=this.widget&&this.widget.picked||d&&this.options.completeSingle;this.widget&&this.widget.close(),b&&this.data&&c(this.data,b)||(this.data=b,b&&b.list.length&&(e&&1==b.list.length?this.pick(b,0):(this.widget=new h(this,b),a.signal(b,"shown"))))}},h.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var a=this.completion.cm;this.completion.options.closeOnUnfocus&&(a.off("blur",this.onBlur),a.off("focus",this.onFocus)),a.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var a=this;this.keyMap={Enter:function(){a.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(b,c){if(b>=this.data.list.length?b=c?this.data.list.length-1:0:b<0&&(b=c?0:this.data.list.length-1),this.selectedHint!=b){var d=this.hints.childNodes[this.selectedHint];d.className=d.className.replace(" "+m,""),d=this.hints.childNodes[this.selectedHint=b],d.className+=" "+m,d.offsetTop<this.hints.scrollTop?this.hints.scrollTop=d.offsetTop-3:d.offsetTop+d.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=d.offsetTop+d.offsetHeight-this.hints.clientHeight+3),a.signal(this.data,"select",this.data.list[this.selectedHint],d)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},a.registerHelper("hint","auto",{resolve:k}),a.registerHelper("hint","fromList",function(b,c){var d=b.getCursor(),e=b.getTokenAt(d),f=a.Pos(d.line,e.end);if(e.string&&/\w/.test(e.string[e.string.length-1]))var g=e.string,h=a.Pos(d.line,e.start);else var g="",h=f;for(var i=[],j=0;j<c.words.length;j++){var k=c.words[j];k.slice(0,g.length)==g&&i.push(k)}if(i.length)return{list:i,from:h,to:f}}),a.commands.autocomplete=a.showHint;var p={hint:a.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};a.defineOption("hintOptions",null)});
\ No newline at end of file
index ae64763..8277c4b 100644 (file)
@@ -1,7 +1 @@
-'use strict';(function(g){"object"==typeof exports&&"object"==typeof module?g(require("../../lib/codemirror"),require("../../mode/sql/sql")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/sql/sql"],g):g(CodeMirror)})(function(g){function r(a){return"[object Array]"==Object.prototype.toString.call(a)}function D(a){a=a.doc.modeOption;"sql"===a&&(a="text/x-sql");return g.resolveMode(a).keywords}function E(a){a=a.doc.modeOption;"sql"===a&&(a="text/x-sql");return g.resolveMode(a).identifierQuote||
-"`"}function m(a){return"string"==typeof a?a:a.text}function v(a,b){r(b)&&(b={columns:b});b.text||(b.text=a);return b}function F(a){var b={};if(r(a))for(var c=a.length-1;0<=c;c--){var d=a[c];b[m(d).toUpperCase()]=v(m(d),d)}else if(a)for(c in a)b[c.toUpperCase()]=v(c,a[c]);return b}function w(a){var b={},c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function x(a,b){var c=a.length;b=m(b).substr(0,c);return a.toUpperCase()===b.toUpperCase()}function q(a,b,c,d){if(r(c))for(var e=0;e<c.length;e++)x(b,
-c[e])&&a.push(d(c[e]));else for(e in c)if(c.hasOwnProperty(e)){var f=c[e],f=f&&!0!==f?f.displayText?{text:f.text,displayText:f.displayText}:f.text:e;x(b,f)&&a.push(d(f))}}function G(a){"."==a.charAt(0)&&(a=a.substr(1));a=a.split(k+k);for(var b=0;b<a.length;b++)a[b]=a[b].replace(new RegExp(k,"g"),"");return a.join(k)}function t(a){for(var b=m(a).split("."),c=0;c<b.length;c++)b[c]=k+b[c].replace(new RegExp(k,"g"),k+k)+k;b=b.join(".");if("string"==typeof a)return b;a=w(a);a.text=b;return a}function H(a,
-b,c,d){for(var e=!1,f=[],y=b.start,g=!0;g;)g="."==b.string.charAt(0),e=e||b.string.charAt(0)==k,y=b.start,f.unshift(G(b.string)),b=d.getTokenAt(n(a.line,b.start)),"."==b.string&&(g=!0,b=d.getTokenAt(n(a.line,b.start)));a=f.join(".");q(c,a,p,function(a){return e?t(a):a});q(c,a,h,function(a){return e?t(a):a});a=f.pop();var l=f.join("."),z=!1,m=l;p[l.toUpperCase()]||(f=l,l=A(l,d),l!==f&&(z=!0));(d=p[l.toUpperCase()])&&d.columns&&(d=d.columns);d&&q(c,a,d,function(a){var b=l;1==z&&(b=m);"string"==typeof a?
-a=b+"."+a:(a=w(a),a.text=b+"."+a.text);return e?t(a):a});return y}function I(a,b){a=a.split(/\s+/);for(var c=0;c<a.length;c++)a[c]&&b(a[c].replace(/[,;]/g,""))}function A(a,b){var c=b.doc,d=c.getValue(),e=a.toUpperCase(),f="",g="";a=[];for(var k=n(0,0),l=n(b.lastLine(),b.getLineHandle(b.lastLine()).length),h=d.indexOf(u.QUERY_DIV);-1!=h;)a.push(c.posFromIndex(h)),h=d.indexOf(u.QUERY_DIV,h+1);a.unshift(n(0,0));a.push(n(b.lastLine(),b.getLineHandle(b.lastLine()).text.length));d=null;h=b.getCursor();
-for(b=0;b<a.length;b++){if((null==d||0<B(h,d))&&0>=B(h,a[b])){k=d;l=a[b];break}d=a[b]}c=c.getRange(k,l,!1);for(b=0;b<c.length&&(I(c[b],function(a){var b=a.toUpperCase();b===e&&p[f.toUpperCase()]&&(g=f);b!==u.ALIAS_KEYWORD&&(f=a)}),!g);b++);return g}var p,h,C,k,u={QUERY_DIV:";",ALIAS_KEYWORD:"AS"},n=g.Pos,B=g.cmpPos;g.registerHelper("hint","sql",function(a,b){p=F(b&&b.tables);var c=b&&b.defaultTable;b=b&&b.disableKeywords;h=c&&p[c.toUpperCase()];C=D(a);k=E(a);c&&!h&&(h=A(c,a));h=h||[];h.columns&&(h=
-h.columns);var c=a.getCursor(),d=[],e=a.getTokenAt(c);e.end>c.ch&&(e.end=c.ch,e.string=e.string.slice(0,c.ch-e.start));if(e.string.match(/^[.`"\w@]\w*$/)){var f=e.string;var g=e.start;var m=e.end}else g=m=c.ch,f="";"."==f.charAt(0)||f.charAt(0)==k?g=H(c,e,d,a):(q(d,f,p,function(a){return a}),q(d,f,h,function(a){return a}),b||q(d,f,C,function(a){return a.toUpperCase()}));return{list:d,from:n(c.line,g),to:n(c.line,m)}})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../../mode/sql/sql")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/sql/sql"],a):a(CodeMirror)}(function(a){"use strict";function b(a){return"[object Array]"==Object.prototype.toString.call(a)}function c(b){var c=b.doc.modeOption;return"sql"===c&&(c="text/x-sql"),a.resolveMode(c).keywords}function d(b){var c=b.doc.modeOption;return"sql"===c&&(c="text/x-sql"),a.resolveMode(c).identifierQuote||"`"}function e(a){return"string"==typeof a?a:a.text}function f(a,c){return b(c)&&(c={columns:c}),c.text||(c.text=a),c}function g(a){var c={};if(b(a))for(var d=a.length-1;d>=0;d--){var g=a[d];c[e(g).toUpperCase()]=f(e(g),g)}else if(a)for(var h in a)c[h.toUpperCase()]=f(h,a[h]);return c}function h(a){return q[a.toUpperCase()]}function i(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function j(a,b){var c=a.length,d=e(b).substr(0,c);return a.toUpperCase()===d.toUpperCase()}function k(a,c,d,e){if(b(d))for(var f=0;f<d.length;f++)j(c,d[f])&&a.push(e(d[f]));else for(var g in d)if(d.hasOwnProperty(g)){var h=d[g];h=h&&h!==!0?h.displayText?{text:h.text,displayText:h.displayText}:h.text:g,j(c,h)&&a.push(e(h))}}function l(a){"."==a.charAt(0)&&(a=a.substr(1));for(var b=a.split(t+t),c=0;c<b.length;c++)b[c]=b[c].replace(new RegExp(t,"g"),"");return b.join(t)}function m(a){for(var b=e(a).split("."),c=0;c<b.length;c++)b[c]=t+b[c].replace(new RegExp(t,"g"),t+t)+t;var d=b.join(".");return"string"==typeof a?d:(a=i(a),a.text=d,a)}function n(a,b,c,d){for(var e=!1,f=[],g=b.start,j=!0;j;)j="."==b.string.charAt(0),e=e||b.string.charAt(0)==t,g=b.start,f.unshift(l(b.string)),b=d.getTokenAt(v(a.line,b.start)),"."==b.string&&(j=!0,b=d.getTokenAt(v(a.line,b.start)));var n=f.join(".");k(c,n,q,function(a){return e?m(a):a}),k(c,n,r,function(a){return e?m(a):a}),n=f.pop();var o=f.join("."),s=!1,u=o;if(!h(o)){var w=o;o=p(o,d),o!==w&&(s=!0)}var x=h(o);return x&&x.columns&&(x=x.columns),x&&k(c,n,x,function(a){var b=o;return 1==s&&(b=u),"string"==typeof a?a=b+"."+a:(a=i(a),a.text=b+"."+a.text),e?m(a):a}),g}function o(a,b){for(var c=a.split(/\s+/),d=0;d<c.length;d++)c[d]&&b(c[d].replace(/[,;]/g,""))}function p(a,b){for(var c=b.doc,d=c.getValue(),e=a.toUpperCase(),f="",g="",i=[],j={start:v(0,0),end:v(b.lastLine(),b.getLineHandle(b.lastLine()).length)},k=d.indexOf(u.QUERY_DIV);k!=-1;)i.push(c.posFromIndex(k)),k=d.indexOf(u.QUERY_DIV,k+1);i.unshift(v(0,0)),i.push(v(b.lastLine(),b.getLineHandle(b.lastLine()).text.length));for(var l=null,m=b.getCursor(),n=0;n<i.length;n++){if((null==l||w(m,l)>0)&&w(m,i[n])<=0){j={start:l,end:i[n]};break}l=i[n]}for(var p=c.getRange(j.start,j.end,!1),n=0;n<p.length;n++){var q=p[n];if(o(q,function(a){var b=a.toUpperCase();b===e&&h(f)&&(g=f),b!==u.ALIAS_KEYWORD&&(f=a)}),g)break}return g}var q,r,s,t,u={QUERY_DIV:";",ALIAS_KEYWORD:"AS"},v=a.Pos,w=a.cmpPos;a.registerHelper("hint","sql",function(a,b){q=g(b&&b.tables);var e=b&&b.defaultTable,f=b&&b.disableKeywords;r=e&&h(e),s=c(a),t=d(a),e&&!r&&(r=p(e,a)),r=r||[],r.columns&&(r=r.columns);var i,j,l,m=a.getCursor(),o=[],u=a.getTokenAt(m);return u.end>m.ch&&(u.end=m.ch,u.string=u.string.slice(0,m.ch-u.start)),u.string.match(/^[.`"\w@]\w*$/)?(l=u.string,i=u.start,j=u.end):(i=j=m.ch,l=""),"."==l.charAt(0)||l.charAt(0)==t?i=n(m,u,o,a):(k(o,l,q,function(a){return a}),k(o,l,r,function(a){return a}),f||k(o,l,s,function(a){return a.toUpperCase()})),{list:o,from:v(m.line,i),to:v(m.line,j)}})});
\ No newline at end of file
index c0a3526..3ea0a6e 100644 (file)
@@ -1,5 +1 @@
-'use strict';(function(n){"object"==typeof exports&&"object"==typeof module?n(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){var r=n.Pos;n.registerHelper("hint","xml",function(b,d){var c=d&&d.schemaInfo,l=d&&d.quoteChar||'"';if(c){d=b.getCursor();var a=b.getTokenAt(d);a.end>d.ch&&(a.end=d.ch,a.string=a.string.slice(0,d.ch-a.start));var k=n.innerMode(b.getMode(),a.state);if("xml"==k.mode.name){var q=[],m=!1,t=/\btag\b/.test(a.type)&&
-!/>$/.test(a.string),w=t&&/^\w/.test(a.string),u;if(w){var e=b.getLine(d.line).slice(Math.max(0,a.start-2),a.start);(e=/<\/$/.test(e)?"close":/<$/.test(e)?"open":null)&&(u=a.start-("close"==e?2:1))}else t&&"<"==a.string?e="open":t&&"</"==a.string&&(e="close");if(!t&&!k.state.tagName||e){if(w)var g=a.string;var m=e,h=k.state.context;k=h&&c[h.tagName];if((l=h?k&&k.children:c["!top"])&&"close"!=e)for(b=0;b<l.length;++b)g&&0!=l[b].lastIndexOf(g,0)||q.push("<"+l[b]);else if("close"!=e)for(var f in c)!c.hasOwnProperty(f)||
-"!top"==f||"!attrs"==f||g&&0!=f.lastIndexOf(g,0)||q.push("<"+f);h&&(!g||"close"==e&&0==h.tagName.lastIndexOf(g,0))&&q.push("</"+h.tagName+">")}else{f=(k=c[k.state.tagName])&&k.attrs;c=c["!attrs"];if(!f&&!c)return;if(!f)f=c;else if(c){e={};for(var p in c)c.hasOwnProperty(p)&&(e[p]=c[p]);for(p in f)f.hasOwnProperty(p)&&(e[p]=f[p]);f=e}if("string"==a.type||"="==a.string){e=b.getRange(r(d.line,Math.max(0,d.ch-60)),r(d.line,"string"==a.type?a.start:a.end));c=e.match(/([^\s\u00a0=<>\"\']+)=$/);if(!c||!f.hasOwnProperty(c[1])||
-!(h=f[c[1]]))return;"function"==typeof h&&(h=h.call(this,b));"string"==a.type&&(g=a.string,m=0,/['"]/.test(a.string.charAt(0))&&(l=a.string.charAt(0),g=a.string.slice(1),m++),b=a.string.length,/['"]/.test(a.string.charAt(b-1))&&(l=a.string.charAt(b-1),g=a.string.substr(m,b-2)),m=!0);for(b=0;b<h.length;++b)g&&0!=h[b].lastIndexOf(g,0)||q.push(l+h[b]+l)}else{"attribute"==a.type&&(g=a.string,m=!0);for(var v in f)!f.hasOwnProperty(v)||g&&0!=v.lastIndexOf(g,0)||q.push(v)}}return{list:q,from:m?r(d.line,
-null==u?a.start:u):d,to:m?r(d.line,a.end):d}}}})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(b,d){var e=d&&d.schemaInfo,f=d&&d.quoteChar||'"';if(e){var g=b.getCursor(),h=b.getTokenAt(g);h.end>g.ch&&(h.end=g.ch,h.string=h.string.slice(0,g.ch-h.start));var i=a.innerMode(b.getMode(),h.state);if("xml"==i.mode.name){var j,k,l=[],m=!1,n=/\btag\b/.test(h.type)&&!/>$/.test(h.string),o=n&&/^\w/.test(h.string);if(o){var p=b.getLine(g.line).slice(Math.max(0,h.start-2),h.start),q=/<\/$/.test(p)?"close":/<$/.test(p)?"open":null;q&&(k=h.start-("close"==q?2:1))}else n&&"<"==h.string?q="open":n&&"</"==h.string&&(q="close");if(!n&&!i.state.tagName||q){o&&(j=h.string),m=q;var r=i.state.context,s=r&&e[r.tagName],t=r?s&&s.children:e["!top"];if(t&&"close"!=q)for(var u=0;u<t.length;++u)j&&0!=t[u].lastIndexOf(j,0)||l.push("<"+t[u]);else if("close"!=q)for(var v in e)!e.hasOwnProperty(v)||"!top"==v||"!attrs"==v||j&&0!=v.lastIndexOf(j,0)||l.push("<"+v);r&&(!j||"close"==q&&0==r.tagName.lastIndexOf(j,0))&&l.push("</"+r.tagName+">")}else{var s=e[i.state.tagName],w=s&&s.attrs,x=e["!attrs"];if(!w&&!x)return;if(w){if(x){var y={};for(var z in x)x.hasOwnProperty(z)&&(y[z]=x[z]);for(var z in w)w.hasOwnProperty(z)&&(y[z]=w[z]);w=y}}else w=x;if("string"==h.type||"="==h.string){var A,p=b.getRange(c(g.line,Math.max(0,g.ch-60)),c(g.line,"string"==h.type?h.start:h.end)),B=p.match(/([^\s\u00a0=<>\"\']+)=$/);if(!B||!w.hasOwnProperty(B[1])||!(A=w[B[1]]))return;if("function"==typeof A&&(A=A.call(this,b)),"string"==h.type){j=h.string;var C=0;/['"]/.test(h.string.charAt(0))&&(f=h.string.charAt(0),j=h.string.slice(1),C++);var D=h.string.length;/['"]/.test(h.string.charAt(D-1))&&(f=h.string.charAt(D-1),j=h.string.substr(C,D-2)),m=!0}for(var u=0;u<A.length;++u)j&&0!=A[u].lastIndexOf(j,0)||l.push(f+A[u]+f)}else{"attribute"==h.type&&(j=h.string,m=!0);for(var E in w)!w.hasOwnProperty(E)||j&&0!=E.lastIndexOf(j,0)||l.push(E)}}return{list:l,from:m?c(g.line,null==k?h.start:k):g,to:m?c(g.line,h.end):g}}}}var c=a.Pos;a.registerHelper("hint","xml",b)});
\ No newline at end of file
index d32990c..3afa6bd 100644 (file)
@@ -1,2 +1 @@
-'use strict';(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)})(function(a){a.registerHelper("lint","coffeescript",function(b){var c=[];if(!window.coffeelint)return window.console&&window.console.error("Error: window.coffeelint not defined, CodeMirror CoffeeScript linting cannot run."),c;try{var f=coffeelint.lint(b);for(b=0;b<f.length;b++){var e=f[b],g=e.lineNumber;
-c.push({from:a.Pos(g-1,0),to:a.Pos(g,0),severity:e.level,message:e.message})}}catch(d){c.push({from:a.Pos(d.location.first_line,0),to:a.Pos(d.location.last_line,d.location.last_column),severity:"error",message:d.message})}return c})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.registerHelper("lint","coffeescript",function(b){var c=[];if(!window.coffeelint)return window.console&&window.console.error("Error: window.coffeelint not defined, CodeMirror CoffeeScript linting cannot run."),c;var d=function(b){var d=b.lineNumber;c.push({from:a.Pos(d-1,0),to:a.Pos(d,0),severity:b.level,message:b.message})};try{for(var e=coffeelint.lint(b),f=0;f<e.length;f++)d(e[f])}catch(b){c.push({from:a.Pos(b.location.first_line,0),to:a.Pos(b.location.last_line,b.location.last_column),severity:"error",message:b.message})}return c})});
\ No newline at end of file
index 3d53a17..7912591 100644 (file)
@@ -1,2 +1 @@
-'use strict';(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)})(function(a){a.registerHelper("lint","css",function(c){var d=[];if(!window.CSSLint)return window.console&&window.console.error("Error: window.CSSLint not defined, CodeMirror CSS linting cannot run."),d;c=CSSLint.verify(c).messages;for(var b,e=0;e<c.length;e++){b=c[e];var f=b.line-1,g=b.col;d.push({from:a.Pos(b.line-
-1,b.col-1),to:a.Pos(f,g),message:b.message,severity:b.type})}return d})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.registerHelper("lint","css",function(b,c){var d=[];if(!window.CSSLint)return window.console&&window.console.error("Error: window.CSSLint not defined, CodeMirror CSS linting cannot run."),d;for(var e=CSSLint.verify(b,c),f=e.messages,g=null,h=0;h<f.length;h++){g=f[h];var i=g.line-1,j=g.line-1,k=g.col-1,l=g.col;d.push({from:a.Pos(i,k),to:a.Pos(j,l),message:g.message,severity:g.type})}return d})});
\ No newline at end of file
index 26c857c..1f2dfd5 100644 (file)
@@ -1,2 +1 @@
-'use strict';(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("htmlhint")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","htmlhint"],a):a(CodeMirror)})(function(a){var f={"tagname-lowercase":!0,"attr-lowercase":!0,"attr-value-double-quotes":!0,"doctype-first":!1,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0};a.registerHelper("lint","html",function(d,b){var e=[];if(!window.HTMLHint)return window.console&&
-window.console.error("Error: window.HTMLHint not defined, CodeMirror HTML linting cannot run."),e;d=HTMLHint.verify(d,b&&b.rules||f);for(b=0;b<d.length;b++){var c=d[b],g=c.line-1,h=c.col;e.push({from:a.Pos(c.line-1,c.col-1),to:a.Pos(g,h),message:c.message,severity:c.type})}return e})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("htmlhint")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","htmlhint"],a):a(CodeMirror,window.HTMLHint)}(function(a,b){"use strict";var c={"tagname-lowercase":!0,"attr-lowercase":!0,"attr-value-double-quotes":!0,"doctype-first":!1,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0};a.registerHelper("lint","html",function(d,e){var f=[];if(b&&!b.verify&&(b=b.HTMLHint),b||(b=window.HTMLHint),!b)return window.console&&window.console.error("Error: HTMLHint not found, not defined on window, or not available through define/require, CodeMirror HTML linting cannot run."),f;for(var g=b.verify(d,e&&e.rules||c),h=0;h<g.length;h++){var i=g[h],j=i.line-1,k=i.line-1,l=i.col-1,m=i.col;f.push({from:a.Pos(j,l),to:a.Pos(k,m),message:i.message,severity:i.type})}return f})});
\ No newline at end of file
index 1fcb257..9796283 100644 (file)
@@ -1,4 +1 @@
-'use strict';(function(f){"object"==typeof exports&&"object"==typeof module?f(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],f):f(CodeMirror)})(function(f){function p(b){m(b,q,"warning",!0);m(b,r,"error");a:{var c=b.description;for(var g=0;g<n.length;g++)if(-1!==c.indexOf(n[g])){c=!0;break a}c=!1}return c?null:b}function m(b,c,g,a){var f=b.description;for(var e=0;e<c.length;e++){var d=c[e];var h="string"===typeof d?d:d[0];d="string"===typeof d?
-null:d[1];h=-1!==f.indexOf(h);if(a||h)b.severity=g;h&&d&&(b.description=d)}}function t(b,c){for(var g=0;g<b.length;g++){var a=b[g];if(a){var k=[];if(a.evidence){var e=k[a.line];if(!e){var d=a.evidence,e=[];Array.prototype.forEach.call(d,function(a,b){"\t"===a&&e.push(b+1)});k[a.line]=e}if(0<e.length){var h=a.character;e.forEach(function(a){h>a&&--h});a.character=h}}var d=a.character-1,l=d+1;a.evidence&&(k=a.evidence.substring(d).search(/.\b/),-1<k&&(l+=k));a.description=a.reason;a.start=a.character;
-a.end=l;(a=p(a))&&c.push({message:a.description,severity:a.severity,from:f.Pos(a.line-1,d),to:f.Pos(a.line-1,l)})}}}var n=["Dangerous comment"],q=[["Expected '{'","Statement body should be inside '{ }' braces."]],r="Missing semicolon;Extra comma;Missing property name;Unmatched ; and instead saw; is not defined;Unclosed string;Stopping, unable to continue".split(";");f.registerHelper("lint","javascript",function(b,c){if(!window.JSHINT)return window.console&&window.console.error("Error: window.JSHINT not defined, CodeMirror JavaScript linting cannot run."),
-[];JSHINT(b,c,c.globals);b=JSHINT.data().errors;c=[];b&&t(b,c);return c})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){if(!window.JSHINT)return window.console&&window.console.error("Error: window.JSHINT not defined, CodeMirror JavaScript linting cannot run."),[];JSHINT(a,b,b.globals);var c=JSHINT.data().errors,d=[];return c&&f(c,d),d}function c(a){return d(a,h,"warning",!0),d(a,i,"error"),e(a)?null:a}function d(a,b,c,d){var e,f,g,h,i;e=a.description;for(var j=0;j<b.length;j++)f=b[j],g="string"==typeof f?f:f[0],h="string"==typeof f?null:f[1],i=e.indexOf(g)!==-1,(d||i)&&(a.severity=c),i&&h&&(a.description=h)}function e(a){for(var b=a.description,c=0;c<g.length;c++)if(b.indexOf(g[c])!==-1)return!0;return!1}function f(b,d){for(var e=0;e<b.length;e++){var f=b[e];if(f){var g,h;if(g=[],f.evidence){var i=g[f.line];if(!i){var j=f.evidence;i=[],Array.prototype.forEach.call(j,function(a,b){"\t"===a&&i.push(b+1)}),g[f.line]=i}if(i.length>0){var k=f.character;i.forEach(function(a){k>a&&(k-=1)}),f.character=k}}var l=f.character-1,m=l+1;f.evidence&&(h=f.evidence.substring(l).search(/.\b/),h>-1&&(m+=h)),f.description=f.reason,f.start=f.character,f.end=m,f=c(f),f&&d.push({message:f.description,severity:f.severity,from:a.Pos(f.line-1,l),to:a.Pos(f.line-1,m)})}}}var g=["Dangerous comment"],h=[["Expected '{'","Statement body should be inside '{ }' braces."]],i=["Missing semicolon","Extra comma","Missing property name","Unmatched "," and instead saw"," is not defined","Unclosed string","Stopping, unable to continue"];a.registerHelper("lint","javascript",b)});
\ No newline at end of file
index 0a22d44..b6c5f0b 100644 (file)
@@ -1,2 +1 @@
-'use strict';(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)})(function(a){a.registerHelper("lint","json",function(e){var c=[];if(!window.jsonlint)return window.console&&window.console.error("Error: window.jsonlint not defined, CodeMirror JSON linting cannot run."),c;jsonlint.parseError=function(d,b){b=b.loc;c.push({from:a.Pos(b.first_line-1,b.first_column),to:a.Pos(b.last_line-
-1,b.last_column),message:d})};try{jsonlint.parse(e)}catch(d){}return c})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.registerHelper("lint","json",function(b){var c=[];if(!window.jsonlint)return window.console&&window.console.error("Error: window.jsonlint not defined, CodeMirror JSON linting cannot run."),c;jsonlint.parseError=function(b,d){var e=d.loc;c.push({from:a.Pos(e.first_line-1,e.first_column),to:a.Pos(e.last_line-1,e.last_column),message:b})};try{jsonlint.parse(b)}catch(a){}return c})});
\ No newline at end of file
index 2120ceb..f097cfe 100644 (file)
@@ -1 +1,73 @@
-.CodeMirror-lint-markers{width:16px}.CodeMirror-lint-tooltip{background-color:#ffd;border:1px solid #000;border-radius:4px 4px 4px 4px;color:#000;font-family:monospace;font-size:10pt;overflow:hidden;padding:2px 5px;position:fixed;white-space:pre;white-space:pre-wrap;z-index:100;max-width:600px;opacity:0;transition:opacity .4s;-moz-transition:opacity .4s;-webkit-transition:opacity .4s;-o-transition:opacity .4s;-ms-transition:opacity .4s}.CodeMirror-lint-mark-error,.CodeMirror-lint-mark-warning{background-position:left bottom;background-repeat:repeat-x}.CodeMirror-lint-mark-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==)}.CodeMirror-lint-mark-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=)}.CodeMirror-lint-marker-error,.CodeMirror-lint-marker-warning{background-position:center center;background-repeat:no-repeat;cursor:pointer;display:inline-block;height:16px;width:16px;vertical-align:middle;position:relative}.CodeMirror-lint-message-error,.CodeMirror-lint-message-warning{padding-left:18px;background-position:top left;background-repeat:no-repeat}.CodeMirror-lint-marker-error,.CodeMirror-lint-message-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=)}.CodeMirror-lint-marker-warning,.CodeMirror-lint-message-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=)}.CodeMirror-lint-marker-multiple{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-position:right bottom;width:100%;height:100%}
\ No newline at end of file
+/* The lint marker gutter */
+.CodeMirror-lint-markers {
+  width: 16px;
+}
+
+.CodeMirror-lint-tooltip {
+  background-color: #ffd;
+  border: 1px solid black;
+  border-radius: 4px 4px 4px 4px;
+  color: black;
+  font-family: monospace;
+  font-size: 10pt;
+  overflow: hidden;
+  padding: 2px 5px;
+  position: fixed;
+  white-space: pre;
+  white-space: pre-wrap;
+  z-index: 100;
+  max-width: 600px;
+  opacity: 0;
+  transition: opacity .4s;
+  -moz-transition: opacity .4s;
+  -webkit-transition: opacity .4s;
+  -o-transition: opacity .4s;
+  -ms-transition: opacity .4s;
+}
+
+.CodeMirror-lint-mark-error, .CodeMirror-lint-mark-warning {
+  background-position: left bottom;
+  background-repeat: repeat-x;
+}
+
+.CodeMirror-lint-mark-error {
+  background-image:
+  url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==")
+  ;
+}
+
+.CodeMirror-lint-mark-warning {
+  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=");
+}
+
+.CodeMirror-lint-marker-error, .CodeMirror-lint-marker-warning {
+  background-position: center center;
+  background-repeat: no-repeat;
+  cursor: pointer;
+  display: inline-block;
+  height: 16px;
+  width: 16px;
+  vertical-align: middle;
+  position: relative;
+}
+
+.CodeMirror-lint-message-error, .CodeMirror-lint-message-warning {
+  padding-left: 18px;
+  background-position: top left;
+  background-repeat: no-repeat;
+}
+
+.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {
+  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=");
+}
+
+.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning {
+  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=");
+}
+
+.CodeMirror-lint-marker-multiple {
+  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");
+  background-repeat: no-repeat;
+  background-position: right bottom;
+  width: 100%; height: 100%;
+}
index d1c9c45..12761f5 100644 (file)
@@ -1,8 +1 @@
-'use strict';(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){function v(a,c){function b(a){if(!d.parentNode)return e.off(document,"mousemove",b);d.style.top=Math.max(0,a.clientY-d.offsetHeight-5)+"px";d.style.left=a.clientX+5+"px"}var d=document.createElement("div");d.className="CodeMirror-lint-tooltip";d.appendChild(c.cloneNode(!0));document.body.appendChild(d);
-e.on(document,"mousemove",b);b(a);null!=d.style.opacity&&(d.style.opacity=1);return d}function w(a){a.parentNode&&(null==a.style.opacity&&a.parentNode&&a.parentNode.removeChild(a),a.style.opacity=0,setTimeout(function(){a.parentNode&&a.parentNode.removeChild(a)},600))}function q(a,c,b){function d(){e.off(b,"mouseout",d);g&&(w(g),g=null)}var g=v(a,c),f=setInterval(function(){if(g)for(var a=b;;a=a.parentNode){a&&11==a.nodeType&&(a=a.host);if(a==document.body)return;if(!a){d();break}}if(!g)return clearInterval(f)},
-400);e.on(b,"mouseout",d)}function x(a,c,b){this.marked=[];this.options=c;this.timeout=null;this.hasGutter=b;this.onMouseOver=function(c){var b=c.target||c.srcElement;if(/\bCodeMirror-lint-mark-/.test(b.className)){for(var b=b.getBoundingClientRect(),d=a.findMarksAt(a.coordsChar({left:(b.left+b.right)/2,top:(b.top+b.bottom)/2},"client")),b=[],h=0;h<d.length;++h){var e=d[h].__annotation;e&&b.push(e)}if(b.length){d=c.target||c.srcElement;h=document.createDocumentFragment();for(e=0;e<b.length;e++)h.appendChild(r(b[e]));
-q(c,h,d)}}};this.waitingFor=0}function t(a){var c=a.state.lint;c.hasGutter&&a.clearGutter("CodeMirror-lint-markers");for(a=0;a<c.marked.length;++a)c.marked[a].clear();c.marked.length=0}function y(a,c,b,d){var g=document.createElement("div"),f=g;g.className="CodeMirror-lint-marker-"+c;b&&(f=g.appendChild(document.createElement("div")),f.className="CodeMirror-lint-marker-multiple");if(0!=d)e.on(f,"mouseover",function(b){q(b,a,f)});return g}function r(a){var c=a.severity;c||(c="error");var b=document.createElement("div");
-b.className="CodeMirror-lint-message-"+c;"undefined"!=typeof a.messageHTML?b.innerHTML=a.messageHTML:b.appendChild(document.createTextNode(a.message));return b}function z(a,c,b){function d(){f=-1;a.off("change",d)}var g=a.state.lint,f=++g.waitingFor;a.on("change",d);c(a.getValue(),function(b,c){a.off("change",d);g.waitingFor==f&&(c&&b instanceof e&&(b=c),n(a,b))},b,a)}function l(a){var c=a.state.lint.options,b=c.options||c,d=c.getAnnotations||a.getHelper(e.Pos(0,0),"lint");d&&(c.async||d.async?z(a,
-d,b):(c=d(a.getValue(),b,a))&&(c.then?c.then(function(b){n(a,b)}):n(a,c)))}function n(a,c){t(a);for(var b=a.state.lint,d=b.options,e=[],f=0;f<c.length;++f){var h=c[f],m=h.from.line;(e[m]||(e[m]=[])).push(h)}for(f=0;f<e.length;++f)if(h=e[f]){for(var m=null,n=b.hasGutter&&document.createDocumentFragment(),l=0;l<h.length;++l){var k=h[l],p=k.severity;p||(p="error");"error"!=m&&(m=p);d.formatAnnotation&&(k=d.formatAnnotation(k));b.hasGutter&&n.appendChild(r(k));k.to&&b.marked.push(a.markText(k.from,k.to,
-{className:"CodeMirror-lint-mark-"+p,__annotation:k}))}b.hasGutter&&a.setGutterMarker(f,"CodeMirror-lint-markers",y(n,m,1<h.length,b.options.tooltips))}if(d.onUpdateLinting)d.onUpdateLinting(c,e,a)}function u(a){var c=a.state.lint;c&&(clearTimeout(c.timeout),c.timeout=setTimeout(function(){l(a)},c.options.delay||500))}e.defineOption("lint",!1,function(a,c,b){b&&b!=e.Init&&(t(a),!1!==a.state.lint.options.lintOnChange&&a.off("change",u),e.off(a.getWrapperElement(),"mouseover",a.state.lint.onMouseOver),
-clearTimeout(a.state.lint.timeout),delete a.state.lint);if(c){var d=a.getOption("gutters");b=!1;for(var g=0;g<d.length;++g)"CodeMirror-lint-markers"==d[g]&&(b=!0);d=a.state;c instanceof Function?c={getAnnotations:c}:c&&!0!==c||(c={});b=d.lint=new x(a,c,b);if(!1!==b.options.lintOnChange)a.on("change",u);if(0!=b.options.tooltips&&"gutter"!=b.options.tooltips)e.on(a.getWrapperElement(),"mouseover",b.onMouseOver);l(a)}});e.defineExtension("performLint",function(){this.state.lint&&l(this)})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(b,c){function d(b){return e.parentNode?(e.style.top=Math.max(0,b.clientY-e.offsetHeight-5)+"px",void(e.style.left=b.clientX+5+"px")):a.off(document,"mousemove",d)}var e=document.createElement("div");return e.className="CodeMirror-lint-tooltip",e.appendChild(c.cloneNode(!0)),document.body.appendChild(e),a.on(document,"mousemove",d),d(b),null!=e.style.opacity&&(e.style.opacity=1),e}function c(a){a.parentNode&&a.parentNode.removeChild(a)}function d(a){a.parentNode&&(null==a.style.opacity&&c(a),a.style.opacity=0,setTimeout(function(){c(a)},600))}function e(c,e,f){function g(){a.off(f,"mouseout",g),h&&(d(h),h=null)}var h=b(c,e),i=setInterval(function(){if(h)for(var a=f;;a=a.parentNode){if(a&&11==a.nodeType&&(a=a.host),a==document.body)return;if(!a){g();break}}if(!h)return clearInterval(i)},400);a.on(f,"mouseout",g)}function f(a,b,c){this.marked=[],this.options=b,this.timeout=null,this.hasGutter=c,this.onMouseOver=function(b){r(a,b)},this.waitingFor=0}function g(a,b){return b instanceof Function?{getAnnotations:b}:(b&&b!==!0||(b={}),b)}function h(a){var b=a.state.lint;b.hasGutter&&a.clearGutter(s);for(var c=0;c<b.marked.length;++c)b.marked[c].clear();b.marked.length=0}function i(b,c,d,f){var g=document.createElement("div"),h=g;return g.className="CodeMirror-lint-marker-"+c,d&&(h=g.appendChild(document.createElement("div")),h.className="CodeMirror-lint-marker-multiple"),0!=f&&a.on(h,"mouseover",function(a){e(a,b,h)}),g}function j(a,b){return"error"==a?a:b}function k(a){for(var b=[],c=0;c<a.length;++c){var d=a[c],e=d.from.line;(b[e]||(b[e]=[])).push(d)}return b}function l(a){var b=a.severity;b||(b="error");var c=document.createElement("div");return c.className="CodeMirror-lint-message-"+b,"undefined"!=typeof a.messageHTML?c.innerHTML=a.messageHTML:c.appendChild(document.createTextNode(a.message)),c}function m(b,c,d){function e(){g=-1,b.off("change",e)}var f=b.state.lint,g=++f.waitingFor;b.on("change",e),c(b.getValue(),function(c,d){b.off("change",e),f.waitingFor==g&&(d&&c instanceof a&&(c=d),o(b,c))},d,b)}function n(b){var c=b.state.lint,d=c.options,e=d.options||d,f=d.getAnnotations||b.getHelper(a.Pos(0,0),"lint");if(f)if(d.async||f.async)m(b,f,e);else{var g=f(b.getValue(),e,b);if(!g)return;g.then?g.then(function(a){o(b,a)}):o(b,g)}}function o(a,b){h(a);for(var c=a.state.lint,d=c.options,e=k(b),f=0;f<e.length;++f){var g=e[f];if(g){for(var m=null,n=c.hasGutter&&document.createDocumentFragment(),o=0;o<g.length;++o){var p=g[o],q=p.severity;q||(q="error"),m=j(m,q),d.formatAnnotation&&(p=d.formatAnnotation(p)),c.hasGutter&&n.appendChild(l(p)),p.to&&c.marked.push(a.markText(p.from,p.to,{className:"CodeMirror-lint-mark-"+q,__annotation:p}))}c.hasGutter&&a.setGutterMarker(f,s,i(n,m,g.length>1,c.options.tooltips))}}d.onUpdateLinting&&d.onUpdateLinting(b,e,a)}function p(a){var b=a.state.lint;b&&(clearTimeout(b.timeout),b.timeout=setTimeout(function(){n(a)},b.options.delay||500))}function q(a,b){for(var c=b.target||b.srcElement,d=document.createDocumentFragment(),f=0;f<a.length;f++){var g=a[f];d.appendChild(l(g))}e(b,d,c)}function r(a,b){var c=b.target||b.srcElement;if(/\bCodeMirror-lint-mark-/.test(c.className)){for(var d=c.getBoundingClientRect(),e=(d.left+d.right)/2,f=(d.top+d.bottom)/2,g=a.findMarksAt(a.coordsChar({left:e,top:f},"client")),h=[],i=0;i<g.length;++i){var j=g[i].__annotation;j&&h.push(j)}h.length&&q(h,b)}}var s="CodeMirror-lint-markers";a.defineOption("lint",!1,function(b,c,d){if(d&&d!=a.Init&&(h(b),b.state.lint.options.lintOnChange!==!1&&b.off("change",p),a.off(b.getWrapperElement(),"mouseover",b.state.lint.onMouseOver),clearTimeout(b.state.lint.timeout),delete b.state.lint),c){for(var e=b.getOption("gutters"),i=!1,j=0;j<e.length;++j)e[j]==s&&(i=!0);var k=b.state.lint=new f(b,g(b,c),i);k.options.lintOnChange!==!1&&b.on("change",p),0!=k.options.tooltips&&"gutter"!=k.options.tooltips&&a.on(b.getWrapperElement(),"mouseover",k.onMouseOver),n(b)}}),a.defineExtension("performLint",function(){this.state.lint&&n(this)})});
\ No newline at end of file
index 777cf9d..d0fc582 100644 (file)
@@ -1 +1 @@
-'use strict';(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)})(function(a){a.registerHelper("lint","yaml",function(b){var c=[];if(!window.jsyaml)return window.console&&window.console.error("Error: window.jsyaml not defined, CodeMirror YAML linting cannot run."),c;try{jsyaml.load(b)}catch(d){b=(b=d.mark)?a.Pos(b.line,b.column):a.Pos(0,0),c.push({from:b,to:b,message:d.message})}return c})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.registerHelper("lint","yaml",function(b){var c=[];if(!window.jsyaml)return window.console&&window.console.error("Error: window.jsyaml not defined, CodeMirror YAML linting cannot run."),c;try{jsyaml.load(b)}catch(b){var d=b.mark,e=d?a.Pos(d.line,d.column):a.Pos(0,0),f=e;c.push({from:e,to:f,message:b.message})}return c})});
\ No newline at end of file
index 48f0775..bda3d9f 100644 (file)
@@ -1 +1,113 @@
-.CodeMirror-merge{position:relative;border:1px solid #ddd;white-space:pre}.CodeMirror-merge,.CodeMirror-merge .CodeMirror{height:350px}.CodeMirror-merge-2pane .CodeMirror-merge-pane{width:47%}.CodeMirror-merge-2pane .CodeMirror-merge-gap{width:6%}.CodeMirror-merge-3pane .CodeMirror-merge-pane{width:31%}.CodeMirror-merge-3pane .CodeMirror-merge-gap{width:3.5%}.CodeMirror-merge-pane{display:inline-block;white-space:normal;vertical-align:top}.CodeMirror-merge-pane-rightmost{position:absolute;right:0;z-index:1}.CodeMirror-merge-gap{z-index:2;display:inline-block;height:100%;-moz-box-sizing:border-box;box-sizing:border-box;overflow:hidden;border-left:1px solid #ddd;border-right:1px solid #ddd;position:relative;background:#f8f8f8}.CodeMirror-merge-scrolllock-wrap{position:absolute;bottom:0;left:50%}.CodeMirror-merge-scrolllock{position:relative;left:-50%;cursor:pointer;color:#555;line-height:1}.CodeMirror-merge-copybuttons-left,.CodeMirror-merge-copybuttons-right{position:absolute;left:0;top:0;right:0;bottom:0;line-height:1}.CodeMirror-merge-copy{position:absolute;cursor:pointer;color:#44c;z-index:3}.CodeMirror-merge-copy-reverse{position:absolute;cursor:pointer;color:#44c}.CodeMirror-merge-copybuttons-left .CodeMirror-merge-copy{left:2px}.CodeMirror-merge-copybuttons-right .CodeMirror-merge-copy{right:2px}.CodeMirror-merge-l-inserted,.CodeMirror-merge-r-inserted{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12MwuCXy3+CWyH8GBgYGJgYkAABZbAQ9ELXurwAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.CodeMirror-merge-l-deleted,.CodeMirror-merge-r-deleted{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12M4Kyb2/6yY2H8GBgYGJgYkAABURgPz6Ks7wQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.CodeMirror-merge-r-chunk{background:#ffffe0}.CodeMirror-merge-r-chunk-start{border-top:1px solid #ee8}.CodeMirror-merge-r-chunk-end{border-bottom:1px solid #ee8}.CodeMirror-merge-r-connect{fill:#ffffe0;stroke:#ee8;stroke-width:1px}.CodeMirror-merge-l-chunk{background:#eef}.CodeMirror-merge-l-chunk-start{border-top:1px solid #88e}.CodeMirror-merge-l-chunk-end{border-bottom:1px solid #88e}.CodeMirror-merge-l-connect{fill:#eef;stroke:#88e;stroke-width:1px}.CodeMirror-merge-l-chunk.CodeMirror-merge-r-chunk{background:#dfd}.CodeMirror-merge-l-chunk-start.CodeMirror-merge-r-chunk-start{border-top:1px solid #4e4}.CodeMirror-merge-l-chunk-end.CodeMirror-merge-r-chunk-end{border-bottom:1px solid #4e4}.CodeMirror-merge-collapsed-widget:before{content:"(...)"}.CodeMirror-merge-collapsed-widget{cursor:pointer;color:#88b;background:#eef;border:1px solid #ddf;font-size:90%;padding:0 3px;border-radius:4px}.CodeMirror-merge-collapsed-line .CodeMirror-gutter-elt{display:none}
\ No newline at end of file
+.CodeMirror-merge {
+  position: relative;
+  border: 1px solid #ddd;
+  white-space: pre;
+}
+
+.CodeMirror-merge, .CodeMirror-merge .CodeMirror {
+  height: 350px;
+}
+
+.CodeMirror-merge-2pane .CodeMirror-merge-pane { width: 47%; }
+.CodeMirror-merge-2pane .CodeMirror-merge-gap { width: 6%; }
+.CodeMirror-merge-3pane .CodeMirror-merge-pane { width: 31%; }
+.CodeMirror-merge-3pane .CodeMirror-merge-gap { width: 3.5%; }
+
+.CodeMirror-merge-pane {
+  display: inline-block;
+  white-space: normal;
+  vertical-align: top;
+}
+.CodeMirror-merge-pane-rightmost {
+  position: absolute;
+  right: 0px;
+  z-index: 1;
+}
+
+.CodeMirror-merge-gap {
+  z-index: 2;
+  display: inline-block;
+  height: 100%;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+  overflow: hidden;
+  border-left: 1px solid #ddd;
+  border-right: 1px solid #ddd;
+  position: relative;
+  background: #f8f8f8;
+}
+
+.CodeMirror-merge-scrolllock-wrap {
+  position: absolute;
+  bottom: 0; left: 50%;
+}
+.CodeMirror-merge-scrolllock {
+  position: relative;
+  left: -50%;
+  cursor: pointer;
+  color: #555;
+  line-height: 1;
+}
+
+.CodeMirror-merge-copybuttons-left, .CodeMirror-merge-copybuttons-right {
+  position: absolute;
+  left: 0; top: 0;
+  right: 0; bottom: 0;
+  line-height: 1;
+}
+
+.CodeMirror-merge-copy {
+  position: absolute;
+  cursor: pointer;
+  color: #44c;
+  z-index: 3;
+}
+
+.CodeMirror-merge-copy-reverse {
+  position: absolute;
+  cursor: pointer;
+  color: #44c;
+}
+
+.CodeMirror-merge-copybuttons-left .CodeMirror-merge-copy { left: 2px; }
+.CodeMirror-merge-copybuttons-right .CodeMirror-merge-copy { right: 2px; }
+
+.CodeMirror-merge-r-inserted, .CodeMirror-merge-l-inserted {
+  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12MwuCXy3+CWyH8GBgYGJgYkAABZbAQ9ELXurwAAAABJRU5ErkJggg==);
+  background-position: bottom left;
+  background-repeat: repeat-x;
+}
+
+.CodeMirror-merge-r-deleted, .CodeMirror-merge-l-deleted {
+  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12M4Kyb2/6yY2H8GBgYGJgYkAABURgPz6Ks7wQAAAABJRU5ErkJggg==);
+  background-position: bottom left;
+  background-repeat: repeat-x;
+}
+
+.CodeMirror-merge-r-chunk { background: #ffffe0; }
+.CodeMirror-merge-r-chunk-start { border-top: 1px solid #ee8; }
+.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #ee8; }
+.CodeMirror-merge-r-connect { fill: #ffffe0; stroke: #ee8; stroke-width: 1px; }
+
+.CodeMirror-merge-l-chunk { background: #eef; }
+.CodeMirror-merge-l-chunk-start { border-top: 1px solid #88e; }
+.CodeMirror-merge-l-chunk-end { border-bottom: 1px solid #88e; }
+.CodeMirror-merge-l-connect { fill: #eef; stroke: #88e; stroke-width: 1px; }
+
+.CodeMirror-merge-l-chunk.CodeMirror-merge-r-chunk { background: #dfd; }
+.CodeMirror-merge-l-chunk-start.CodeMirror-merge-r-chunk-start { border-top: 1px solid #4e4; }
+.CodeMirror-merge-l-chunk-end.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #4e4; }
+
+.CodeMirror-merge-collapsed-widget:before {
+  content: "(...)";
+}
+.CodeMirror-merge-collapsed-widget {
+  cursor: pointer;
+  color: #88b;
+  background: #eef;
+  border: 1px solid #ddf;
+  font-size: 90%;
+  padding: 0 3px;
+  border-radius: 4px;
+}
+.CodeMirror-merge-collapsed-line .CodeMirror-gutter-elt { display: none; }
index af132cd..c8c8eb8 100644 (file)
@@ -1,39 +1 @@
-'use strict';var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(l,w,n){l instanceof String&&(l=String(l));for(var x=l.length,y=0;y<x;y++){var B=l[y];if(w.call(n,B,y,l))return{i:y,v:B}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(l,w,n){l!=Array.prototype&&l!=Object.prototype&&(l[w]=n.value)};
-$jscomp.getGlobal=function(l){return"undefined"!=typeof window&&window===l?l:"undefined"!=typeof global&&null!=global?global:l};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(l,w,n,x){if(w){n=$jscomp.global;l=l.split(".");for(x=0;x<l.length-1;x++){var y=l[x];y in n||(n[y]={});n=n[y]}l=l[l.length-1];x=n[l];w=w(x);w!=x&&null!=w&&$jscomp.defineProperty(n,l,{configurable:!0,writable:!0,value:w})}};
-$jscomp.polyfill("Array.prototype.find",function(l){return l?l:function(l,n){return $jscomp.findInternal(this,l,n).v}},"es6-impl","es3");
-(function(l){"object"==typeof exports&&"object"==typeof module?l(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","diff_match_patch"],l):l(CodeMirror)})(function(l){function w(a,b){this.mv=a;this.type=b;this.classes="left"==b?{chunk:"CodeMirror-merge-l-chunk",start:"CodeMirror-merge-l-chunk-start",end:"CodeMirror-merge-l-chunk-end",insert:"CodeMirror-merge-l-inserted",del:"CodeMirror-merge-l-deleted",connect:"CodeMirror-merge-l-connect"}:{chunk:"CodeMirror-merge-r-chunk",
-start:"CodeMirror-merge-r-chunk-start",end:"CodeMirror-merge-r-chunk-end",insert:"CodeMirror-merge-r-inserted",del:"CodeMirror-merge-r-deleted",connect:"CodeMirror-merge-r-connect"}}function n(a){a.diffOutOfDate&&(a.diff=R(a.orig.getValue(),a.edit.getValue(),a.mv.options.ignoreWhitespace),a.chunks=S(a.diff),a.diffOutOfDate=!1,l.signal(a.edit,"updateDiff",a.diff))}function x(a){function b(b){F=!0;m=!1;"full"==b&&(a.svg&&G(a.svg),a.copyButtons&&G(a.copyButtons),K(a.edit,h.marked,a.classes),K(a.orig,
-g.marked,a.classes),h.from=h.to=g.from=g.to=0);n(a);a.showDifferences&&(T(a.edit,a.diff,h,DIFF_INSERT,a.classes),T(a.orig,a.diff,g,DIFF_DELETE,a.classes));"align"==a.mv.options.connect&&L(a);C(a);null!=a.needsScrollSync&&B(a,a.needsScrollSync);F=!1}function c(b){F||(a.dealigned=!0,d(b))}function d(a){F||m||(clearTimeout(k),!0===a&&(m=!0),k=setTimeout(b,!0===a?20:250))}function f(b,d){a.diffOutOfDate||(a.diffOutOfDate=!0,h.from=h.to=g.from=g.to=0);c(d.text.length-1!=d.to.line-d.from.line)}function e(){a.diffOutOfDate=
-!0;a.dealigned=!0;b("full")}var h={from:0,to:0,marked:[]},g={from:0,to:0,marked:[]},k,m=!1;a.edit.on("change",f);a.orig.on("change",f);a.edit.on("swapDoc",e);a.orig.on("swapDoc",e);"align"==a.mv.options.connect&&(l.on(a.edit.state.trackAlignable,"realign",c),l.on(a.orig.state.trackAlignable,"realign",c));a.edit.on("viewportChange",function(){d(!1)});a.orig.on("viewportChange",function(){d(!1)});b();return b}function y(a,b){a.edit.on("scroll",function(){B(a,!0)&&C(a)});a.orig.on("scroll",function(){B(a,
-!1)&&C(a);b&&B(b,!0)&&C(b)})}function B(a,b){if(a.diffOutOfDate)return a.lockScroll&&null==a.needsScrollSync&&(a.needsScrollSync=b),!1;a.needsScrollSync=null;if(!a.lockScroll)return!0;var c=+new Date;if(b){var d=a.edit;var f=a.orig}else d=a.orig,f=a.edit;if(d.state.scrollSetBy==a&&(d.state.scrollSetAt||0)+250>c)return!1;var e=d.getScrollInfo();if("align"==a.mv.options.connect)var h=e.top;else{var g=.5*e.clientHeight;h=e.top+g;var k=d.lineAtHeight(h,"local");for(var m=a.chunks,l,r,n,t=0;t<m.length;t++){var p=
-m[t],q=b?p.editFrom:p.origFrom,u=b?p.editTo:p.origTo;null==r&&(q>k?(r=p.editFrom,n=p.origFrom):u>k&&(r=p.editTo,n=p.origTo));if(u<=k){l=p.editTo;var A=p.origTo}else q<=k&&(l=p.editFrom,A=p.origFrom)}k={before:l,after:r};A={before:A,after:n};d=U(d,b?k:A);b=U(f,b?A:k);h=b.top-g+(h-d.top)/(d.bot-d.top)*(b.bot-b.top);var E;h>e.top&&1>(E=e.top/g)?h=h*E+e.top*(1-E):(b=e.height-e.clientHeight-e.top)<g&&(d=f.getScrollInfo(),d.height-d.clientHeight-h>b&&1>(E=b/g)&&(h=h*E+(d.height-d.clientHeight-b)*(1-E)))}f.scrollTo(e.left,
-h);f.state.scrollSetAt=c;f.state.scrollSetBy=a;return!0}function U(a,b){var c=b.after;null==c&&(c=a.lastLine()+1);return{top:a.heightAtLine(b.before||0,"local"),bot:a.heightAtLine(c,"local")}}function V(a,b,c){(a.lockScroll=b)&&0!=c&&B(a,DIFF_INSERT)&&C(a);a.lockButton.innerHTML=b?"\u21db\u21da":"\u21db&nbsp;&nbsp;\u21da"}function K(a,b,c){for(var d=0;d<b.length;++d){var f=b[d];if(f instanceof l.TextMarker)f.clear();else if(f.parent)for(var e=a,h=c,g=h.classLocation,k=0;k<g.length;k++)e.removeLineClass(f,
-g[k],h.chunk),e.removeLineClass(f,g[k],h.start),e.removeLineClass(f,g[k],h.end)}b.length=0}function T(a,b,c,d,f){var e=a.getViewport();a.operation(function(){c.from==c.to||20<e.from-c.to||20<c.from-e.to?(K(a,c.marked,f),M(a,b,d,c.marked,e.from,e.to,f),c.from=e.from,c.to=e.to):(e.from<c.from&&(M(a,b,d,c.marked,e.from,c.from,f),c.from=e.from),e.to>c.to&&(M(a,b,d,c.marked,c.to,e.to,f),c.to=e.to))})}function N(a,b,c,d,f,e){var h=c.classLocation;b=a.getLineHandle(b);for(var g=0;g<h.length;g++)d&&a.addLineClass(b,
-h[g],c.chunk),f&&a.addLineClass(b,h[g],c.start),e&&a.addLineClass(b,h[g],c.end);return b}function M(a,b,c,d,f,e,h){function g(b,c){for(var g=Math.max(f,b),k=Math.min(e,c),m=g;m<k;++m)d.push(N(a,m,h,!0,m==b,m==c-1));b==c&&g==c&&k==c&&(g?d.push(N(a,g-1,h,!1,!1,!0)):d.push(N(a,g,h,!1,!0,!1)))}for(var k=v(0,0),m=v(f,0),l=a.clipPos(v(e-1)),r=c==DIFF_DELETE?h.del:h.insert,n=0,t=!1,p=0;p<b.length;++p){var q=b[p],u=q[0],q=q[1];u==DIFF_EQUAL?(u=k.line+(W(b,p)?0:1),H(k,q),q=k.line+(X(b,p)?1:0),q>u&&(t&&(g(n,
-u),t=!1),n=q)):(t=!0,u==c&&(u=H(k,q,!0),k=0<(m.line-k.line||m.ch-k.ch)?m:k,q=0>(l.line-u.line||l.ch-u.ch)?l:u,k.line==q.line&&k.ch==q.ch||d.push(a.markText(k,q,{className:r})),k=u))}t&&g(n,k.line+1)}function C(a){if(a.showDifferences){if(a.svg){G(a.svg);var b=a.gap.offsetWidth;Y(a.svg,"width",b,"height",a.gap.offsetHeight)}a.copyButtons&&G(a.copyButtons);for(var c=a.edit.getViewport(),d=a.orig.getViewport(),f=a.mv.wrap.getBoundingClientRect().top,e=f-a.edit.getScrollerElement().getBoundingClientRect().top+
-a.edit.getScrollInfo().top,f=f-a.orig.getScrollerElement().getBoundingClientRect().top+a.orig.getScrollInfo().top,h=0;h<a.chunks.length;h++){var g=a.chunks[h];if(g.editFrom<=c.to&&g.editTo>=c.from&&g.origFrom<=d.to&&g.origTo>=d.from){var k=a,m=f,l=e,r=b,n="left"==k.type,t=k.orig.heightAtLine(g.origFrom,"local",!0)-m;if(k.svg){var p=t,q=k.edit.heightAtLine(g.editFrom,"local",!0)-l;if(n){var u=p;p=q;q=u}var m=k.orig.heightAtLine(g.origTo,"local",!0)-m,A=k.edit.heightAtLine(g.editTo,"local",!0)-l;n&&
-(u=m,m=A,A=u);u=" C "+r/2+" "+q+" "+r/2+" "+p+" "+(r+2)+" "+p;n=" C "+r/2+" "+m+" "+r/2+" "+A+" -1 "+A;Y(k.svg.appendChild(document.createElementNS("http://www.w3.org/2000/svg","path")),"d","M -1 "+q+u+" L "+(r+2)+" "+m+n+" z","class",k.classes.connect)}k.copyButtons&&(r=k.copyButtons.appendChild(z("div","left"==k.type?"\u21dd":"\u21dc","CodeMirror-merge-copy")),q=k.mv.options.allowEditingOriginals,r.title=q?"Push to left":"Revert chunk",r.chunk=g,r.style.top=(g.origTo>g.origFrom?t:k.edit.heightAtLine(g.editFrom,
-"local")-l)+"px",q&&(l=k.edit.heightAtLine(g.editFrom,"local")-l,t=k.copyButtons.appendChild(z("div","right"==k.type?"\u21dd":"\u21dc","CodeMirror-merge-copy-reverse")),t.title="Push to right",t.chunk={editFrom:g.origFrom,editTo:g.origTo,origFrom:g.editFrom,origTo:g.editTo},t.style.top=l+"px","right"==k.type?t.style.left="2px":t.style.right="2px"))}}}}function Z(a,b){for(var c=0,d=0,f=0;f<b.length;f++){var e=b[f];if(e.editTo>a&&e.editFrom<=a)return null;if(e.editFrom>a)break;c=e.editTo;d=e.origTo}return d+
-(a-c)}function O(a,b,c){var d=a.state.trackAlignable;a=a.firstLine();for(var f=0,e=[],h=0;;h++){for(var g=b[h],k=g?c?g.origFrom:g.editFrom:1E9;f<d.alignable.length;f+=2){var m=d.alignable[f]+1;if(!(m<=a))if(m<=k)e.push(m);else break}if(!g)break;e.push(a=c?g.origTo:g.editTo)}return e}function aa(a,b,c,d){var f=0,e=0,h=0,g=0;a:for(;;f++){var k=a[f],m=b[e];if(!k&&null==m)break;for(var l=k?k[0]:1E9,m=null==m?1E9:m;h<c.length;){var n=c[h];if(n.origFrom<=m&&n.origTo>m){e++;f--;continue a}if(n.editTo>l){if(n.editFrom<=
-l)continue a;break}g+=n.origTo-n.origFrom-(n.editTo-n.editFrom);h++}l==m-g?(k[d]=m,e++):l<m-g?k[d]=l+g:(k=[m-g,null,null],k[d]=m,a.splice(f,0,k),e++)}}function ha(a,b){var c=O(a.edit,a.chunks,!1),d=[];if(b)for(var f=0,e=0;f<b.chunks.length;f++){for(var h=b.chunks[f].editTo;e<c.length&&c[e]<h;)e++;e!=c.length&&c[e]==h||c.splice(e++,0,h)}for(f=0;f<c.length;f++)d.push([c[f],null,null]);aa(d,O(a.orig,a.chunks,!0),a.chunks,1);b&&aa(d,O(b.orig,b.chunks,!0),b.chunks,2);return d}function L(a,b){if(a.dealigned||
-b){if(!a.orig.curOp)return a.orig.operation(function(){L(a,b)});a.dealigned=!1;var c=a.mv.left==a?a.mv.right:a.mv.left;c&&(n(c),c.dealigned=!1);for(var d=ha(a,c),f=a.mv.aligners,e=0;e<f.length;e++)f[e].clear();f.length=0;var h=[a.edit,a.orig],g=[];c&&h.push(c.orig);for(e=0;e<h.length;e++)g.push(h[e].getScrollInfo().top);for(c=0;c<d.length;c++)ia(h,d[c],f);for(e=0;e<h.length;e++)h[e].scrollTo(null,g[e])}}function ia(a,b,c){for(var d=0,f=[],e=0;e<a.length;e++)if(null!=b[e]){var h=a[e].heightAtLine(b[e],
-"local");f[e]=h;d=Math.max(d,h)}for(e=0;e<a.length;e++)null!=b[e]&&(h=d-f[e],1<h&&c.push(ja(a[e],b[e],h)))}function ja(a,b,c){var d=!0;b>a.lastLine()&&(b--,d=!1);var f=document.createElement("div");f.className="CodeMirror-merge-spacer";f.style.height=c+"px";f.style.minWidth="1px";return a.addLineWidget(b,f,{height:c,above:d,mergeSpacer:!0,handleMouseEvents:!0})}function ba(a,b,c,d){if(!a.diffOutOfDate){var f=d.origTo>c.lastLine()?v(d.origFrom-1):v(d.origFrom,0),e=v(d.origTo,0),h=d.editTo>b.lastLine()?
-v(d.editFrom-1):v(d.editFrom,0);d=v(d.editTo,0);var g=a.mv.options.revertChunk;g?g(a.mv,c,f,e,b,h,d):b.replaceRange(c.getRange(f,e),h,d)}}function ca(a){var b=a.lockButton=z("div",null,"CodeMirror-merge-scrolllock");b.title="Toggle locked scrolling";var c=z("div",[b],"CodeMirror-merge-scrolllock-wrap");l.on(b,"click",function(){V(a,!a.lockScroll)});b=[c];!1!==a.mv.options.revertButtons&&(a.copyButtons=z("div",null,"CodeMirror-merge-copybuttons-"+a.type),l.on(a.copyButtons,"click",function(b){b=b.target||
-b.srcElement;b.chunk&&("CodeMirror-merge-copy-reverse"==b.className?ba(a,a.orig,a.edit,b.chunk):ba(a,a.edit,a.orig,b.chunk))}),b.unshift(a.copyButtons));"align"!=a.mv.options.connect&&((c=document.createElementNS&&document.createElementNS("http://www.w3.org/2000/svg","svg"))&&!c.createSVGRect&&(c=null),(a.svg=c)&&b.push(c));return a.gap=z("div",b,"CodeMirror-merge-gap")}function da(a){return"string"==typeof a?a:a.getValue()}function R(a,b,c){a=ka.diff_main(a,b);for(b=0;b<a.length;++b){var d=a[b];
-(c?/[^ \t]/.test(d[1]):d[1])?b&&a[b-1][0]==d[0]&&(a.splice(b--,1),a[b][1]+=d[1]):a.splice(b--,1)}return a}function S(a){for(var b=[],c=0,d=0,f=v(0,0),e=v(0,0),h=0;h<a.length;++h){var g=a[h],k=g[0];if(k==DIFF_EQUAL){var l=!W(a,h)||f.line<c||e.line<d?1:0,k=f.line+l,l=e.line+l;H(f,g[1],null,e);var n=X(a,h)?1:0,g=f.line+n,n=e.line+n;g>k&&(h&&b.push({origFrom:d,origTo:l,editFrom:c,editTo:k}),c=g,d=n)}else H(k==DIFF_INSERT?f:e,g[1])}(c<=f.line||d<=e.line)&&b.push({origFrom:d,origTo:e.line+1,editFrom:c,
-editTo:f.line+1});return b}function X(a,b){if(b==a.length-1)return!0;var c=a[b+1][1];if(1==c.length&&b<a.length-2||10!=c.charCodeAt(0))return!1;if(b==a.length-2)return!0;c=a[b+2][1];return(1<c.length||b==a.length-3)&&10==c.charCodeAt(0)}function W(a,b){if(0==b)return!0;var c=a[b-1][1];if(10!=c.charCodeAt(c.length-1))return!1;if(1==b)return!0;c=a[b-2][1];return 10==c.charCodeAt(c.length-1)}function la(a,b,c){function d(){e.clear();a.removeLineClass(b,"wrap","CodeMirror-merge-collapsed-line")}a.addLineClass(b,
-"wrap","CodeMirror-merge-collapsed-line");var f=document.createElement("span");f.className="CodeMirror-merge-collapsed-widget";f.title="Identical text collapsed. Click to expand.";var e=a.markText(v(b,0),v(c-1),{inclusiveLeft:!0,inclusiveRight:!0,replacedWith:f,clearOnEnter:!0});l.on(f,"click",d);return{mark:e,clear:d}}function ma(a,b){function c(){for(var a=0;a<d.length;a++)d[a].clear()}for(var d=[],f=0;f<b.length;f++){var e=b[f],e=la(e.cm,e.line,e.line+a);d.push(e);e.mark.on("clear",c)}return d[0].mark}
-function ea(a,b,c,d){for(var f=0;f<a.chunks.length;f++)for(var e=a.chunks[f],h=e.editFrom-b;h<e.editTo+b;h++){var g=h+c;0<=g&&g<d.length&&(d[g]=!1)}}function z(a,b,c,d){a=document.createElement(a);c&&(a.className=c);d&&(a.style.cssText=d);if("string"==typeof b)a.appendChild(document.createTextNode(b));else if(b)for(c=0;c<b.length;++c)a.appendChild(b[c]);return a}function G(a){for(var b=a.childNodes.length;0<b;--b)a.removeChild(a.firstChild)}function Y(a){for(var b=1;b<arguments.length;b+=2)a.setAttribute(arguments[b],
-arguments[b+1])}function P(a,b){b||(b={});for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function H(a,b,c,d){a=c?v(a.line,a.ch):a;for(c=0;;){var f=b.indexOf("\n",c);if(-1==f)break;++a.line;d&&++d.line;c=f+1}a.ch=(c?0:a.ch)+(b.length-c);d&&(d.ch=(c?0:d.ch)+(b.length-c));return a}function Q(a){this.cm=a;this.alignable=[];this.height=a.doc.height;var b=this;a.on("markerAdded",function(a,d){d.collapsed&&(a=d.find(1),null!=a&&b.set(a.line,I))});a.on("markerCleared",function(a,d,f,e){null!=e&&
-d.collapsed&&b.check(e,I,b.hasMarker)});a.on("markerChanged",this.signal.bind(this));a.on("lineWidgetAdded",function(a,d,f){d.mergeSpacer||(d.above?b.set(f-1,D):b.set(f,fa))});a.on("lineWidgetCleared",function(a,d,f){d.mergeSpacer||(d.above?b.check(f-1,D,b.hasWidgetBelow):b.check(f,fa,b.hasWidget))});a.on("lineWidgetChanged",this.signal.bind(this));a.on("change",function(a,d){a=d.from.line;var c=d.to.line-d.from.line,e=d.text.length-1,h=a+e;(c||e)&&b.map(a,c,e);b.check(h,I,b.hasMarker);(c||e)&&b.check(d.from.line,
-I,b.hasMarker)});a.on("viewportChange",function(){b.cm.doc.height!=b.height&&b.signal()})}function ga(a,b){var c=null,d=a.state.diffViews,f=a.getCursor().line;if(d)for(var e=0;e<d.length;e++){var h=d[e],g=a==h.orig;n(h);if(0>b)a:{for(var h=h.chunks,k=h.length-1;0<=k;k--){var m=h[k],m=(g?m.origTo:m.editTo)-1;if(m<f){g=m;break a}}g=void 0}else a:{h=h.chunks;for(k=0;k<h.length;k++)if(m=h[k],m=g?m.origFrom:m.editFrom,m>f){g=m;break a}g=void 0}null!=g&&(null==c||(0>b?g>c:g<c))&&(c=g)}if(null!=c)a.setCursor(c,
-0);else return l.Pass}var v=l.Pos;w.prototype={constructor:w,init:function(a,b,c){this.edit=this.mv.edit;(this.edit.state.diffViews||(this.edit.state.diffViews=[])).push(this);this.orig=l(a,P({value:b,readOnly:!this.mv.options.allowEditingOriginals},P(c)));"align"==this.mv.options.connect&&(this.edit.state.trackAlignable||(this.edit.state.trackAlignable=new Q(this.edit)),this.orig.state.trackAlignable=new Q(this.orig));this.orig.state.diffViews=[this];a=c.chunkClassLocation||"background";"[object Array]"!=
-Object.prototype.toString.call(a)&&(a=[a]);this.classes.classLocation=a;this.diff=R(da(b),da(c.value),this.mv.options.ignoreWhitespace);this.chunks=S(this.diff);this.diffOutOfDate=this.dealigned=!1;this.needsScrollSync=null;this.showDifferences=!1!==c.showDifferences},registerEvents:function(a){this.forceUpdate=x(this);V(this,!0,!1);y(this,a)},setShowDifferences:function(a){a=!1!==a;a!=this.showDifferences&&(this.showDifferences=a,this.forceUpdate("full"))}};var F=!1,J=l.MergeView=function(a,b){if(!(this instanceof
-J))return new J(a,b);this.options=b;var c=b.origLeft,d=null==b.origRight?b.orig:b.origRight,f=null!=c,e=null!=d,h=1+(f?1:0)+(e?1:0),g=[],k=this.left=null,m=this.right=null,n=this;if(f){k=this.left=new w(this,"left");var r=z("div",null,"CodeMirror-merge-pane CodeMirror-merge-left");g.push(r);g.push(ca(k))}f=z("div",null,"CodeMirror-merge-pane CodeMirror-merge-editor");g.push(f);if(e){m=this.right=new w(this,"right");g.push(ca(m));var v=z("div",null,"CodeMirror-merge-pane CodeMirror-merge-right");g.push(v)}(e?
-v:f).className+=" CodeMirror-merge-pane-rightmost";g.push(z("div",null,null,"height: 0; clear: both;"));var t=this.wrap=a.appendChild(z("div",g,"CodeMirror-merge CodeMirror-merge-"+h+"pane"));this.edit=l(f,P(b));k&&k.init(r,c,b);m&&m.init(v,d,b);b.collapseIdentical&&this.editor().operation(function(){var a=b.collapseIdentical;"number"!=typeof a&&(a=2);for(var c=[],d=n.editor(),e=d.firstLine(),f=e,g=d.lastLine();f<=g;f++)c.push(!0);n.left&&ea(n.left,a,e,c);n.right&&ea(n.right,a,e,c);for(f=0;f<c.length;f++)if(c[f]){for(var g=
-f+e,h=1;f<c.length-1&&c[f+1];f++,h++);if(h>a){var k=[{line:g,cm:d}];n.left&&k.push({line:Z(g,n.left.chunks),cm:n.left.orig});n.right&&k.push({line:Z(g,n.right.chunks),cm:n.right.orig});k=ma(h,k);if(n.options.onCollapse)n.options.onCollapse(n,g,h,k)}}});"align"==b.connect&&(this.aligners=[],L(this.left||this.right,!0));k&&k.registerEvents(m);m&&m.registerEvents(k);var p=function(){k&&C(k);m&&C(m)};l.on(window,"resize",p);var q=setInterval(function(){for(var a=t.parentNode;a&&a!=document.body;a=a.parentNode);
-a||(clearInterval(q),l.off(window,"resize",p))},5E3)};J.prototype={constructor:J,editor:function(){return this.edit},rightOriginal:function(){return this.right&&this.right.orig},leftOriginal:function(){return this.left&&this.left.orig},setShowDifferences:function(a){this.right&&this.right.setShowDifferences(a);this.left&&this.left.setShowDifferences(a)},rightChunks:function(){if(this.right)return n(this.right),this.right.chunks},leftChunks:function(){if(this.left)return n(this.left),this.left.chunks}};
-var ka=new diff_match_patch,fa=1,D=2,I=4;Q.prototype={signal:function(){l.signal(this,"realign");this.height=this.cm.doc.height},set:function(a,b){for(var c=-1;c<this.alignable.length;c+=2){var d=this.alignable[c]-a;if(0==d){if((this.alignable[c+1]&b)==b)return;this.alignable[c+1]|=b;this.signal();return}if(0<d)break}this.signal();this.alignable.splice(c,0,a,b)},find:function(a){for(var b=0;b<this.alignable.length;b+=2)if(this.alignable[b]==a)return b;return-1},check:function(a,b,c){var d=this.find(a);
--1!=d&&this.alignable[d+1]&b&&!c.call(this,a)&&(this.signal(),(a=this.alignable[d+1]&~b)?this.alignable[d+1]=a:this.alignable.splice(d,2))},hasMarker:function(a){a=this.cm.getLineHandle(a);if(a.markedSpans)for(var b=0;b<a.markedSpans.length;b++)if(a.markedSpans[b].mark.collapsed&&null!=a.markedSpans[b].to)return!0;return!1},hasWidget:function(a){a=this.cm.getLineHandle(a);if(a.widgets)for(var b=0;b<a.widgets.length;b++)if(!a.widgets[b].above&&!a.widgets[b].mergeSpacer)return!0;return!1},hasWidgetBelow:function(a){if(a==
-this.cm.lastLine())return!1;a=this.cm.getLineHandle(a+1);if(a.widgets)for(var b=0;b<a.widgets.length;b++)if(a.widgets[b].above&&!a.widgets[b].mergeSpacer)return!0;return!1},map:function(a,b,c){for(var d=c-b,f=a+b,e=b=-1,h=0;h<this.alignable.length;h+=2){var g=this.alignable[h];g==a&&this.alignable[h+1]&D&&(b=h);g==f&&this.alignable[h+1]&D&&(e=h);g<=a||(g<f?this.alignable.splice(h--,2):this.alignable[h]+=d)}-1<b&&(d=this.alignable[b+1],d==D?this.alignable.splice(b,2):this.alignable[b+1]=d&~D);-1<e&&
-c&&this.set(a+c,D)}};l.commands.goNextDiff=function(a){return ga(a,1)};l.commands.goPrevDiff=function(a){return ga(a,-1)}});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","diff_match_patch"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){this.mv=a,this.type=b,this.classes="left"==b?{chunk:"CodeMirror-merge-l-chunk",start:"CodeMirror-merge-l-chunk-start",end:"CodeMirror-merge-l-chunk-end",insert:"CodeMirror-merge-l-inserted",del:"CodeMirror-merge-l-deleted",connect:"CodeMirror-merge-l-connect"}:{chunk:"CodeMirror-merge-r-chunk",start:"CodeMirror-merge-r-chunk-start",end:"CodeMirror-merge-r-chunk-end",insert:"CodeMirror-merge-r-inserted",del:"CodeMirror-merge-r-deleted",connect:"CodeMirror-merge-r-connect"}}function c(b){b.diffOutOfDate&&(b.diff=z(b.orig.getValue(),b.edit.getValue(),b.mv.options.ignoreWhitespace),b.chunks=A(b.diff),b.diffOutOfDate=!1,a.signal(b.edit,"updateDiff",b.diff))}function d(b){function d(a){W=!0,p=!1,"full"==a&&(b.svg&&J(b.svg),b.copyButtons&&J(b.copyButtons),j(b.edit,m.marked,b.classes),j(b.orig,o.marked,b.classes),m.from=m.to=o.from=o.to=0),c(b),b.showDifferences&&(k(b.edit,b.diff,m,DIFF_INSERT,b.classes),k(b.orig,b.diff,o,DIFF_DELETE,b.classes)),"align"==b.mv.options.connect&&s(b),n(b),null!=b.needsScrollSync&&f(b,b.needsScrollSync),W=!1}function e(a){W||(b.dealigned=!0,g(a))}function g(a){W||p||(clearTimeout(l),a===!0&&(p=!0),l=setTimeout(d,a===!0?20:250))}function h(a,c){b.diffOutOfDate||(b.diffOutOfDate=!0,m.from=m.to=o.from=o.to=0),e(c.text.length-1!=c.to.line-c.from.line)}function i(){b.diffOutOfDate=!0,b.dealigned=!0,d("full")}var l,m={from:0,to:0,marked:[]},o={from:0,to:0,marked:[]},p=!1;return b.edit.on("change",h),b.orig.on("change",h),b.edit.on("swapDoc",i),b.orig.on("swapDoc",i),"align"==b.mv.options.connect&&(a.on(b.edit.state.trackAlignable,"realign",e),a.on(b.orig.state.trackAlignable,"realign",e)),b.edit.on("viewportChange",function(){g(!1)}),b.orig.on("viewportChange",function(){g(!1)}),d(),d}function e(a,b){a.edit.on("scroll",function(){f(a,!0)&&n(a)}),a.orig.on("scroll",function(){f(a,!1)&&n(a),b&&f(b,!0)&&n(b)})}function f(a,b){if(a.diffOutOfDate)return a.lockScroll&&null==a.needsScrollSync&&(a.needsScrollSync=b),!1;if(a.needsScrollSync=null,!a.lockScroll)return!0;var c,d,e=+new Date;if(b?(c=a.edit,d=a.orig):(c=a.orig,d=a.edit),c.state.scrollSetBy==a&&(c.state.scrollSetAt||0)+250>e)return!1;var f=c.getScrollInfo();if("align"==a.mv.options.connect)q=f.top;else{var h,i,j=.5*f.clientHeight,k=f.top+j,l=c.lineAtHeight(k,"local"),m=D(a.chunks,l,b),n=g(c,b?m.edit:m.orig),o=g(d,b?m.orig:m.edit),p=(k-n.top)/(n.bot-n.top),q=o.top-j+p*(o.bot-o.top);if(q>f.top&&(i=f.top/j)<1)q=q*i+f.top*(1-i);else if((h=f.height-f.clientHeight-f.top)<j){var r=d.getScrollInfo(),s=r.height-r.clientHeight-q;s>h&&(i=h/j)<1&&(q=q*i+(r.height-r.clientHeight-h)*(1-i))}}return d.scrollTo(f.left,q),d.state.scrollSetAt=e,d.state.scrollSetBy=a,!0}function g(a,b){var c=b.after;return null==c&&(c=a.lastLine()+1),{top:a.heightAtLine(b.before||0,"local"),bot:a.heightAtLine(c,"local")}}function h(a,b,c){a.lockScroll=b,b&&0!=c&&f(a,DIFF_INSERT)&&n(a),a.lockButton.innerHTML=b?"⇛⇚":"⇛&nbsp;&nbsp;⇚"}function i(a,b,c){for(var d=c.classLocation,e=0;e<d.length;e++)a.removeLineClass(b,d[e],c.chunk),a.removeLineClass(b,d[e],c.start),a.removeLineClass(b,d[e],c.end)}function j(b,c,d){for(var e=0;e<c.length;++e){var f=c[e];f instanceof a.TextMarker?f.clear():f.parent&&i(b,f,d)}c.length=0}function k(a,b,c,d,e){var f=a.getViewport();a.operation(function(){c.from==c.to||f.from-c.to>20||c.from-f.to>20?(j(a,c.marked,e),m(a,b,d,c.marked,f.from,f.to,e),c.from=f.from,c.to=f.to):(f.from<c.from&&(m(a,b,d,c.marked,f.from,c.from,e),c.from=f.from),f.to>c.to&&(m(a,b,d,c.marked,c.to,f.to,e),c.to=f.to))})}function l(a,b,c,d,e,f){for(var g=c.classLocation,h=a.getLineHandle(b),i=0;i<g.length;i++)d&&a.addLineClass(h,g[i],c.chunk),e&&a.addLineClass(h,g[i],c.start),f&&a.addLineClass(h,g[i],c.end);return h}function m(a,b,c,d,e,f,g){function h(b,c){for(var h=Math.max(e,b),i=Math.min(f,c),j=h;j<i;++j)d.push(l(a,j,g,!0,j==b,j==c-1));b==c&&h==c&&i==c&&(h?d.push(l(a,h-1,g,!1,!1,!0)):d.push(l(a,h,g,!1,!0,!1)))}for(var i=U(0,0),j=U(e,0),k=a.clipPos(U(f-1)),m=c==DIFF_DELETE?g.del:g.insert,n=0,o=!1,p=0;p<b.length;++p){var q=b[p],r=q[0],s=q[1];if(r==DIFF_EQUAL){var t=i.line+(C(b,p)?0:1);M(i,s);var u=i.line+(B(b,p)?1:0);u>t&&(o&&(h(n,t),o=!1),n=u)}else if(o=!0,r==c){var v=M(i,s,!0),w=P(j,i),x=O(k,v);Q(w,x)||d.push(a.markText(w,x,{className:m})),i=v}}o&&h(n,i.line+1)}function n(a){if(a.showDifferences){if(a.svg){J(a.svg);var b=a.gap.offsetWidth;K(a.svg,"width",b,"height",a.gap.offsetHeight)}a.copyButtons&&J(a.copyButtons);for(var c=a.edit.getViewport(),d=a.orig.getViewport(),e=a.mv.wrap.getBoundingClientRect().top,f=e-a.edit.getScrollerElement().getBoundingClientRect().top+a.edit.getScrollInfo().top,g=e-a.orig.getScrollerElement().getBoundingClientRect().top+a.orig.getScrollInfo().top,h=0;h<a.chunks.length;h++){var i=a.chunks[h];i.editFrom<=c.to&&i.editTo>=c.from&&i.origFrom<=d.to&&i.origTo>=d.from&&v(a,i,g,f,b)}}}function o(a,b){for(var c=0,d=0,e=0;e<b.length;e++){var f=b[e];if(f.editTo>a&&f.editFrom<=a)return null;if(f.editFrom>a)break;c=f.editTo,d=f.origTo}return d+(a-c)}function p(a,b,c){for(var d=a.state.trackAlignable,e=a.firstLine(),f=0,g=[],h=0;;h++){for(var i=b[h],j=i?c?i.origFrom:i.editFrom:1e9;f<d.alignable.length;f+=2){var k=d.alignable[f]+1;if(!(k<=e)){if(!(k<=j))break;g.push(k)}}if(!i)break;g.push(e=c?i.origTo:i.editTo)}return g}function q(a,b,c,d){var e=0,f=0,g=0,h=0;a:for(;;e++){var i=a[e],j=b[f];if(!i&&null==j)break;for(var k=i?i[0]:1e9,l=null==j?1e9:j;g<c.length;){var m=c[g];if(m.origFrom<=l&&m.origTo>l){f++,e--;continue a}if(m.editTo>k){if(m.editFrom<=k)continue a;break}h+=m.origTo-m.origFrom-(m.editTo-m.editFrom),g++}if(k==l-h)i[d]=l,f++;else if(k<l-h)i[d]=k+h;else{var n=[l-h,null,null];n[d]=l,a.splice(e,0,n),f++}}}function r(a,b){var c=p(a.edit,a.chunks,!1),d=[];if(b)for(var e=0,f=0;e<b.chunks.length;e++){for(var g=b.chunks[e].editTo;f<c.length&&c[f]<g;)f++;f!=c.length&&c[f]==g||c.splice(f++,0,g)}for(var e=0;e<c.length;e++)d.push([c[e],null,null]);return q(d,p(a.orig,a.chunks,!0),a.chunks,1),b&&q(d,p(b.orig,b.chunks,!0),b.chunks,2),d}function s(a,b){if(a.dealigned||b){if(!a.orig.curOp)return a.orig.operation(function(){s(a,b)});a.dealigned=!1;var d=a.mv.left==a?a.mv.right:a.mv.left;d&&(c(d),d.dealigned=!1);for(var e=r(a,d),f=a.mv.aligners,g=0;g<f.length;g++)f[g].clear();f.length=0;var h=[a.edit,a.orig],i=[];d&&h.push(d.orig);for(var g=0;g<h.length;g++)i.push(h[g].getScrollInfo().top);for(var j=0;j<e.length;j++)t(h,e[j],f);for(var g=0;g<h.length;g++)h[g].scrollTo(null,i[g])}}function t(a,b,c){for(var d=0,e=[],f=0;f<a.length;f++)if(null!=b[f]){var g=a[f].heightAtLine(b[f],"local");e[f]=g,d=Math.max(d,g)}for(var f=0;f<a.length;f++)if(null!=b[f]){var h=d-e[f];h>1&&c.push(u(a[f],b[f],h))}}function u(a,b,c){var d=!0;b>a.lastLine()&&(b--,d=!1);var e=document.createElement("div");return e.className="CodeMirror-merge-spacer",e.style.height=c+"px",e.style.minWidth="1px",a.addLineWidget(b,e,{height:c,above:d,mergeSpacer:!0,handleMouseEvents:!0})}function v(a,b,c,d,e){var f="left"==a.type,g=a.orig.heightAtLine(b.origFrom,"local",!0)-c;if(a.svg){var h=g,i=a.edit.heightAtLine(b.editFrom,"local",!0)-d;if(f){var j=h;h=i,i=j}var k=a.orig.heightAtLine(b.origTo,"local",!0)-c,l=a.edit.heightAtLine(b.editTo,"local",!0)-d;if(f){var j=k;k=l,l=j}var m=" C "+e/2+" "+i+" "+e/2+" "+h+" "+(e+2)+" "+h,n=" C "+e/2+" "+k+" "+e/2+" "+l+" -1 "+l;K(a.svg.appendChild(document.createElementNS(V,"path")),"d","M -1 "+i+m+" L "+(e+2)+" "+k+n+" z","class",a.classes.connect)}if(a.copyButtons){var o=a.copyButtons.appendChild(I("div","left"==a.type?"⇝":"⇜","CodeMirror-merge-copy")),p=a.mv.options.allowEditingOriginals;if(o.title=p?"Push to left":"Revert chunk",o.chunk=b,o.style.top=(b.origTo>b.origFrom?g:a.edit.heightAtLine(b.editFrom,"local")-d)+"px",p){var q=a.edit.heightAtLine(b.editFrom,"local")-d,r=a.copyButtons.appendChild(I("div","right"==a.type?"⇝":"⇜","CodeMirror-merge-copy-reverse"));r.title="Push to right",r.chunk={editFrom:b.origFrom,editTo:b.origTo,origFrom:b.editFrom,origTo:b.editTo},r.style.top=q+"px","right"==a.type?r.style.left="2px":r.style.right="2px"}}}function w(a,b,c,d){if(!a.diffOutOfDate){var e=d.origTo>c.lastLine()?U(d.origFrom-1):U(d.origFrom,0),f=U(d.origTo,0),g=d.editTo>b.lastLine()?U(d.editFrom-1):U(d.editFrom,0),h=U(d.editTo,0),i=a.mv.options.revertChunk;i?i(a.mv,c,e,f,b,g,h):b.replaceRange(c.getRange(e,f),g,h)}}function x(b){var c=b.lockButton=I("div",null,"CodeMirror-merge-scrolllock");c.title="Toggle locked scrolling";var d=I("div",[c],"CodeMirror-merge-scrolllock-wrap");a.on(c,"click",function(){h(b,!b.lockScroll)});var e=[d];if(b.mv.options.revertButtons!==!1&&(b.copyButtons=I("div",null,"CodeMirror-merge-copybuttons-"+b.type),a.on(b.copyButtons,"click",function(a){var c=a.target||a.srcElement;if(c.chunk)return"CodeMirror-merge-copy-reverse"==c.className?void w(b,b.orig,b.edit,c.chunk):void w(b,b.edit,b.orig,c.chunk)}),e.unshift(b.copyButtons)),"align"!=b.mv.options.connect){var f=document.createElementNS&&document.createElementNS(V,"svg");f&&!f.createSVGRect&&(f=null),b.svg=f,f&&e.push(f)}return b.gap=I("div",e,"CodeMirror-merge-gap")}function y(a){return"string"==typeof a?a:a.getValue()}function z(a,b,c){Y||(Y=new diff_match_patch);for(var d=Y.diff_main(a,b),e=0;e<d.length;++e){var f=d[e];(c?/[^ \t]/.test(f[1]):f[1])?e&&d[e-1][0]==f[0]&&(d.splice(e--,1),d[e][1]+=f[1]):d.splice(e--,1)}return d}function A(a){for(var b=[],c=0,d=0,e=U(0,0),f=U(0,0),g=0;g<a.length;++g){var h=a[g],i=h[0];if(i==DIFF_EQUAL){var j=!C(a,g)||e.line<c||f.line<d?1:0,k=e.line+j,l=f.line+j;M(e,h[1],null,f);var m=B(a,g)?1:0,n=e.line+m,o=f.line+m;n>k&&(g&&b.push({origFrom:d,origTo:l,editFrom:c,editTo:k}),c=n,d=o)}else M(i==DIFF_INSERT?e:f,h[1])}return(c<=e.line||d<=f.line)&&b.push({origFrom:d,origTo:f.line+1,editFrom:c,editTo:e.line+1}),b}function B(a,b){if(b==a.length-1)return!0;var c=a[b+1][1];return!(1==c.length&&b<a.length-2||10!=c.charCodeAt(0))&&(b==a.length-2||(c=a[b+2][1],(c.length>1||b==a.length-3)&&10==c.charCodeAt(0)))}function C(a,b){if(0==b)return!0;var c=a[b-1][1];return 10==c.charCodeAt(c.length-1)&&(1==b||(c=a[b-2][1],10==c.charCodeAt(c.length-1)))}function D(a,b,c){for(var d,e,f,g,h=0;h<a.length;h++){var i=a[h],j=c?i.editFrom:i.origFrom,k=c?i.editTo:i.origTo;null==e&&(j>b?(e=i.editFrom,g=i.origFrom):k>b&&(e=i.editTo,g=i.origTo)),k<=b?(d=i.editTo,f=i.origTo):j<=b&&(d=i.editFrom,f=i.origFrom)}return{edit:{before:d,after:e},orig:{before:f,after:g}}}function E(b,c,d){function e(){g.clear(),b.removeLineClass(c,"wrap","CodeMirror-merge-collapsed-line")}b.addLineClass(c,"wrap","CodeMirror-merge-collapsed-line");var f=document.createElement("span");f.className="CodeMirror-merge-collapsed-widget",f.title="Identical text collapsed. Click to expand.";var g=b.markText(U(c,0),U(d-1),{inclusiveLeft:!0,inclusiveRight:!0,replacedWith:f,clearOnEnter:!0});return a.on(f,"click",e),{mark:g,clear:e}}function F(a,b){function c(){for(var a=0;a<d.length;a++)d[a].clear()}for(var d=[],e=0;e<b.length;e++){var f=b[e],g=E(f.cm,f.line,f.line+a);d.push(g),g.mark.on("clear",c)}return d[0].mark}function G(a,b,c,d){for(var e=0;e<a.chunks.length;e++)for(var f=a.chunks[e],g=f.editFrom-b;g<f.editTo+b;g++){var h=g+c;h>=0&&h<d.length&&(d[h]=!1)}}function H(a,b){"number"!=typeof b&&(b=2);for(var c=[],d=a.editor(),e=d.firstLine(),f=e,g=d.lastLine();f<=g;f++)c.push(!0);a.left&&G(a.left,b,e,c),a.right&&G(a.right,b,e,c);for(var h=0;h<c.length;h++)if(c[h]){for(var i=h+e,j=1;h<c.length-1&&c[h+1];h++,j++);if(j>b){var k=[{line:i,cm:d}];a.left&&k.push({line:o(i,a.left.chunks),cm:a.left.orig}),a.right&&k.push({line:o(i,a.right.chunks),cm:a.right.orig});var l=F(j,k);a.options.onCollapse&&a.options.onCollapse(a,i,j,l)}}}function I(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),"string"==typeof b)e.appendChild(document.createTextNode(b));else if(b)for(var f=0;f<b.length;++f)e.appendChild(b[f]);return e}function J(a){for(var b=a.childNodes.length;b>0;--b)a.removeChild(a.firstChild)}function K(a){for(var b=1;b<arguments.length;b+=2)a.setAttribute(arguments[b],arguments[b+1])}function L(a,b){b||(b={});for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function M(a,b,c,d){for(var e=c?U(a.line,a.ch):a,f=0;;){var g=b.indexOf("\n",f);if(g==-1)break;++e.line,d&&++d.line,f=g+1}return e.ch=(f?0:e.ch)+(b.length-f),d&&(d.ch=(f?0:d.ch)+(b.length-f)),e}function N(a){this.cm=a,this.alignable=[],this.height=a.doc.height;var b=this;a.on("markerAdded",function(a,c){if(c.collapsed){var d=c.find(1);null!=d&&b.set(d.line,_)}}),a.on("markerCleared",function(a,c,d,e){null!=e&&c.collapsed&&b.check(e,_,b.hasMarker)}),a.on("markerChanged",this.signal.bind(this)),a.on("lineWidgetAdded",function(a,c,d){c.mergeSpacer||(c.above?b.set(d-1,$):b.set(d,Z))}),a.on("lineWidgetCleared",function(a,c,d){c.mergeSpacer||(c.above?b.check(d-1,$,b.hasWidgetBelow):b.check(d,Z,b.hasWidget))}),a.on("lineWidgetChanged",this.signal.bind(this)),a.on("change",function(a,c){var d=c.from.line,e=c.to.line-c.from.line,f=c.text.length-1,g=d+f;(e||f)&&b.map(d,e,f),b.check(g,_,b.hasMarker),(e||f)&&b.check(c.from.line,_,b.hasMarker)}),a.on("viewportChange",function(){b.cm.doc.height!=b.height&&b.signal()})}function O(a,b){return(a.line-b.line||a.ch-b.ch)<0?a:b}function P(a,b){return(a.line-b.line||a.ch-b.ch)>0?a:b}function Q(a,b){return a.line==b.line&&a.ch==b.ch}function R(a,b,c){for(var d=a.length-1;d>=0;d--){var e=a[d],f=(c?e.origTo:e.editTo)-1;if(f<b)return f}}function S(a,b,c){for(var d=0;d<a.length;d++){var e=a[d],f=c?e.origFrom:e.editFrom;if(f>b)return f}}function T(b,d){var e=null,f=b.state.diffViews,g=b.getCursor().line;if(f)for(var h=0;h<f.length;h++){var i=f[h],j=b==i.orig;c(i);var k=d<0?R(i.chunks,g,j):S(i.chunks,g,j);null==k||null!=e&&!(d<0?k>e:k<e)||(e=k)}return null==e?a.Pass:void b.setCursor(e,0)}var U=a.Pos,V="http://www.w3.org/2000/svg";b.prototype={constructor:b,init:function(b,c,d){this.edit=this.mv.edit,(this.edit.state.diffViews||(this.edit.state.diffViews=[])).push(this),this.orig=a(b,L({value:c,readOnly:!this.mv.options.allowEditingOriginals},L(d))),"align"==this.mv.options.connect&&(this.edit.state.trackAlignable||(this.edit.state.trackAlignable=new N(this.edit)),this.orig.state.trackAlignable=new N(this.orig)),this.orig.state.diffViews=[this];var e=d.chunkClassLocation||"background";"[object Array]"!=Object.prototype.toString.call(e)&&(e=[e]),this.classes.classLocation=e,this.diff=z(y(c),y(d.value),this.mv.options.ignoreWhitespace),this.chunks=A(this.diff),this.diffOutOfDate=this.dealigned=!1,this.needsScrollSync=null,this.showDifferences=d.showDifferences!==!1},registerEvents:function(a){this.forceUpdate=d(this),h(this,!0,!1),e(this,a)},setShowDifferences:function(a){a=a!==!1,a!=this.showDifferences&&(this.showDifferences=a,this.forceUpdate("full"))}};var W=!1,X=a.MergeView=function(c,d){if(!(this instanceof X))return new X(c,d);this.options=d;var e=d.origLeft,f=null==d.origRight?d.orig:d.origRight,g=null!=e,h=null!=f,i=1+(g?1:0)+(h?1:0),j=[],k=this.left=null,l=this.right=null,m=this;if(g){k=this.left=new b(this,"left");var o=I("div",null,"CodeMirror-merge-pane CodeMirror-merge-left");j.push(o),j.push(x(k))}var p=I("div",null,"CodeMirror-merge-pane CodeMirror-merge-editor");if(j.push(p),h){l=this.right=new b(this,"right"),j.push(x(l));var q=I("div",null,"CodeMirror-merge-pane CodeMirror-merge-right");j.push(q)}(h?q:p).className+=" CodeMirror-merge-pane-rightmost",j.push(I("div",null,null,"height: 0; clear: both;"));var r=this.wrap=c.appendChild(I("div",j,"CodeMirror-merge CodeMirror-merge-"+i+"pane"));this.edit=a(p,L(d)),k&&k.init(o,e,d),l&&l.init(q,f,d),d.collapseIdentical&&this.editor().operation(function(){H(m,d.collapseIdentical)}),"align"==d.connect&&(this.aligners=[],s(this.left||this.right,!0)),k&&k.registerEvents(l),l&&l.registerEvents(k);var t=function(){k&&n(k),l&&n(l)};a.on(window,"resize",t);var u=setInterval(function(){for(var b=r.parentNode;b&&b!=document.body;b=b.parentNode);b||(clearInterval(u),a.off(window,"resize",t))},5e3)};X.prototype={constructor:X,editor:function(){return this.edit},rightOriginal:function(){return this.right&&this.right.orig},leftOriginal:function(){return this.left&&this.left.orig},setShowDifferences:function(a){this.right&&this.right.setShowDifferences(a),this.left&&this.left.setShowDifferences(a)},rightChunks:function(){if(this.right)return c(this.right),this.right.chunks},leftChunks:function(){if(this.left)return c(this.left),this.left.chunks}};var Y,Z=1,$=2,_=4;N.prototype={signal:function(){a.signal(this,"realign"),this.height=this.cm.doc.height},set:function(a,b){for(var c=-1;c<this.alignable.length;c+=2){var d=this.alignable[c]-a;if(0==d){if((this.alignable[c+1]&b)==b)return;return this.alignable[c+1]|=b,void this.signal()}if(d>0)break}this.signal(),this.alignable.splice(c,0,a,b)},find:function(a){for(var b=0;b<this.alignable.length;b+=2)if(this.alignable[b]==a)return b;return-1},check:function(a,b,c){var d=this.find(a);if(d!=-1&&this.alignable[d+1]&b&&!c.call(this,a)){this.signal();var e=this.alignable[d+1]&~b;e?this.alignable[d+1]=e:this.alignable.splice(d,2)}},hasMarker:function(a){var b=this.cm.getLineHandle(a);if(b.markedSpans)for(var c=0;c<b.markedSpans.length;c++)if(b.markedSpans[c].mark.collapsed&&null!=b.markedSpans[c].to)return!0;return!1},hasWidget:function(a){var b=this.cm.getLineHandle(a);if(b.widgets)for(var c=0;c<b.widgets.length;c++)if(!b.widgets[c].above&&!b.widgets[c].mergeSpacer)return!0;return!1},hasWidgetBelow:function(a){if(a==this.cm.lastLine())return!1;var b=this.cm.getLineHandle(a+1);if(b.widgets)for(var c=0;c<b.widgets.length;c++)if(b.widgets[c].above&&!b.widgets[c].mergeSpacer)return!0;return!1},map:function(a,b,c){for(var d=c-b,e=a+b,f=-1,g=-1,h=0;h<this.alignable.length;h+=2){var i=this.alignable[h];i==a&&this.alignable[h+1]&$&&(f=h),i==e&&this.alignable[h+1]&$&&(g=h),i<=a||(i<e?this.alignable.splice(h--,2):this.alignable[h]+=d)}if(f>-1){var j=this.alignable[f+1];j==$?this.alignable.splice(f,2):this.alignable[f+1]=j&~$}g>-1&&c&&this.set(a+c,$)}},a.commands.goNextDiff=function(a){return T(a,1)},a.commands.goPrevDiff=function(a){return T(a,-1)}});
\ No newline at end of file
index 92209d2..0434d34 100644 (file)
@@ -1,3 +1 @@
-'use strict';(function(b){"object"==typeof exports&&"object"==typeof module?b(require("../../lib/codemirror"),"cjs"):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],function(f){b(f,"amd")}):b(CodeMirror,"plain")})(function(b,f){function l(a,b){var c=b;return function(){0==--c&&a()}}function h(a,c){var e=b.modes[a].dependencies;if(!e)return c();a=[];for(var d=0;d<e.length;++d)b.modes.hasOwnProperty(e[d])||a.push(e[d]);if(!a.length)return c();c=l(c,a.length);for(d=0;d<a.length;++d)b.requireMode(a[d],
-c)}b.modeURL||(b.modeURL="../mode/%N/%N.js");var g={};b.requireMode=function(a,c){"string"!=typeof a&&(a=a.name);if(b.modes.hasOwnProperty(a))return h(a,c);if(g.hasOwnProperty(a))return g[a].push(c);var e=b.modeURL.replace(/%N/g,a);if("plain"==f){var d=document.createElement("script");d.src=e;var e=document.getElementsByTagName("script")[0],k=g[a]=[c];b.on(d,"load",function(){h(a,function(){for(var a=0;a<k.length;++a)k[a]()})});e.parentNode.insertBefore(d,e)}else"cjs"==f?(require(e),c()):"amd"==f&&
-requirejs([e],c)};b.autoLoadMode=function(a,c){b.modes.hasOwnProperty(c)||b.requireMode(c,function(){a.setOption("mode",a.getOption("mode"))})}});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),"cjs"):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],function(b){a(b,"amd")}):a(CodeMirror,"plain")}(function(a,b){function c(a,b){var c=b;return function(){0==--c&&a()}}function d(b,d){var e=a.modes[b].dependencies;if(!e)return d();for(var f=[],g=0;g<e.length;++g)a.modes.hasOwnProperty(e[g])||f.push(e[g]);if(!f.length)return d();for(var h=c(d,f.length),g=0;g<f.length;++g)a.requireMode(f[g],h)}a.modeURL||(a.modeURL="../mode/%N/%N.js");var e={};a.requireMode=function(c,f){if("string"!=typeof c&&(c=c.name),a.modes.hasOwnProperty(c))return d(c,f);if(e.hasOwnProperty(c))return e[c].push(f);var g=a.modeURL.replace(/%N/g,c);if("plain"==b){var h=document.createElement("script");h.src=g;var i=document.getElementsByTagName("script")[0],j=e[c]=[f];a.on(h,"load",function(){d(c,function(){for(var a=0;a<j.length;++a)j[a]()})}),i.parentNode.insertBefore(h,i)}else"cjs"==b?(require(g),f()):"amd"==b&&requirejs([g],f)},a.autoLoadMode=function(b,c){a.modes.hasOwnProperty(c)||a.requireMode(c,function(){b.setOption("mode",b.getOption("mode"))})}});
\ No newline at end of file
index 2e3bd0e..3796c3f 100644 (file)
@@ -1,5 +1 @@
-'use strict';(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){e.multiplexingMode=function(g){function m(a,c,b,d){return"string"==typeof c?(b=a.indexOf(c,b),d&&-1<b?b+c.length:b):(c=c.exec(b?a.slice(b):a))?c.index+b+(d?c[0].length:0):-1}var l=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(g),innerActive:null,
-inner:null}},copyState:function(a){return{outer:e.copyState(g,a.outer),innerActive:a.innerActive,inner:a.innerActive&&e.copyState(a.innerActive.mode,a.inner)}},token:function(a,c){if(c.innerActive){var b=c.innerActive;var d=a.string;if(!b.close&&a.sol())return c.innerActive=c.inner=null,this.token(a,c);var f=b.close?m(d,b.close,a.pos,b.parseDelimiters):-1;if(f==a.pos&&!b.parseDelimiters)return a.match(b.close),c.innerActive=c.inner=null,b.delimStyle&&b.delimStyle+" "+b.delimStyle+"-close";-1<f&&(a.string=
-d.slice(0,f));var h=b.mode.token(a,c.inner);-1<f&&(a.string=d);f==a.pos&&b.parseDelimiters&&(c.innerActive=c.inner=null);b.innerStyle&&(h=h?h+" "+b.innerStyle:b.innerStyle);return h}b=Infinity;d=a.string;for(h=0;h<l.length;++h){var k=l[h];f=m(d,k.open,a.pos);if(f==a.pos)return k.parseDelimiters||a.match(k.open),c.innerActive=k,c.inner=e.startState(k.mode,g.indent?g.indent(c.outer,""):0),k.delimStyle&&k.delimStyle+" "+k.delimStyle+"-open";-1!=f&&f<b&&(b=f)}Infinity!=b&&(a.string=d.slice(0,b));c=g.token(a,
-c.outer);Infinity!=b&&(a.string=d);return c},indent:function(a,c){var b=a.innerActive?a.innerActive.mode:g;return b.indent?b.indent(a.innerActive?a.inner:a.outer,c):e.Pass},blankLine:function(a){var c=a.innerActive?a.innerActive.mode:g;c.blankLine&&c.blankLine(a.innerActive?a.inner:a.outer);if(a.innerActive)"\n"===a.innerActive.close&&(a.innerActive=a.inner=null);else for(var b=0;b<l.length;++b){var d=l[b];"\n"===d.open&&(a.innerActive=d,a.inner=e.startState(d.mode,c.indent?c.indent(a.outer,""):0))}},
-electricChars:g.electricChars,innerMode:function(a){return a.inner?{state:a.inner,mode:a.innerActive.mode}:{state:a.outer,mode:g}}}}});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.multiplexingMode=function(b){function c(a,b,c,d){if("string"==typeof b){var e=a.indexOf(b,c);return d&&e>-1?e+b.length:e}var f=b.exec(c?a.slice(c):a);return f?f.index+c+(d?f[0].length:0):-1}var d=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:a.startState(b),innerActive:null,inner:null}},copyState:function(c){return{outer:a.copyState(b,c.outer),innerActive:c.innerActive,inner:c.innerActive&&a.copyState(c.innerActive.mode,c.inner)}},token:function(e,f){if(f.innerActive){var g=f.innerActive,h=e.string;if(!g.close&&e.sol())return f.innerActive=f.inner=null,this.token(e,f);var i=g.close?c(h,g.close,e.pos,g.parseDelimiters):-1;if(i==e.pos&&!g.parseDelimiters)return e.match(g.close),f.innerActive=f.inner=null,g.delimStyle&&g.delimStyle+" "+g.delimStyle+"-close";i>-1&&(e.string=h.slice(0,i));var j=g.mode.token(e,f.inner);return i>-1&&(e.string=h),i==e.pos&&g.parseDelimiters&&(f.innerActive=f.inner=null),g.innerStyle&&(j=j?j+" "+g.innerStyle:g.innerStyle),j}for(var k=1/0,h=e.string,l=0;l<d.length;++l){var m=d[l],i=c(h,m.open,e.pos);if(i==e.pos)return m.parseDelimiters||e.match(m.open),f.innerActive=m,f.inner=a.startState(m.mode,b.indent?b.indent(f.outer,""):0),m.delimStyle&&m.delimStyle+" "+m.delimStyle+"-open";i!=-1&&i<k&&(k=i)}k!=1/0&&(e.string=h.slice(0,k));var n=b.token(e,f.outer);return k!=1/0&&(e.string=h),n},indent:function(c,d){var e=c.innerActive?c.innerActive.mode:b;return e.indent?e.indent(c.innerActive?c.inner:c.outer,d):a.Pass},blankLine:function(c){var e=c.innerActive?c.innerActive.mode:b;if(e.blankLine&&e.blankLine(c.innerActive?c.inner:c.outer),c.innerActive)"\n"===c.innerActive.close&&(c.innerActive=c.inner=null);else for(var f=0;f<d.length;++f){var g=d[f];"\n"===g.open&&(c.innerActive=g,c.inner=a.startState(g.mode,e.indent?e.indent(c.outer,""):0))}},electricChars:b.electricChars,innerMode:function(a){return a.inner?{state:a.inner,mode:a.innerActive.mode}:{state:a.outer,mode:b}}}}});
\ No newline at end of file
index f73c9c2..0b643e8 100644 (file)
@@ -1 +1 @@
-'use strict';(function(){CodeMirror.defineMode("markdown_with_stex",function(){var a=CodeMirror.getMode({},"stex"),b=CodeMirror.getMode({},"markdown");return CodeMirror.multiplexingMode(b,{open:"$",close:"$",mode:a,delimStyle:"delim",innerStyle:"inner"})});var b=CodeMirror.getMode({},"markdown_with_stex");(function(a){test.mode(a,b,Array.prototype.slice.call(arguments,1),"multiplexing")})("stexInsideMarkdown","[strong **Equation:**] [delim&delim-open $][inner&tag \\pi][delim&delim-close $]")})();
+!function(){function a(a){test.mode(a,b,Array.prototype.slice.call(arguments,1),"multiplexing")}CodeMirror.defineMode("markdown_with_stex",function(){var a=CodeMirror.getMode({},"stex"),b=CodeMirror.getMode({},"markdown"),c={open:"$",close:"$",mode:a,delimStyle:"delim",innerStyle:"inner"};return CodeMirror.multiplexingMode(b,c)});var b=CodeMirror.getMode({},"markdown_with_stex");a("stexInsideMarkdown","[strong **Equation:**] [delim&delim-open $][inner&tag \\pi][delim&delim-close $]")}();
\ No newline at end of file
index f9e9f98..4eb745e 100644 (file)
@@ -1,3 +1 @@
-'use strict';(function(c){"object"==typeof exports&&"object"==typeof module?c(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],c):c(CodeMirror)})(function(c){c.overlayMode=function(d,e,f){return{startState:function(){return{base:c.startState(d),overlay:c.startState(e),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(b){return{base:c.copyState(d,b.base),overlay:c.copyState(e,b.overlay),basePos:b.basePos,baseCur:null,
-overlayPos:b.overlayPos,overlayCur:null}},token:function(b,a){if(b!=a.streamSeen||Math.min(a.basePos,a.overlayPos)<b.start)a.streamSeen=b,a.basePos=a.overlayPos=b.start;b.start==a.basePos&&(a.baseCur=d.token(b,a.base),a.basePos=b.pos);b.start==a.overlayPos&&(b.pos=b.start,a.overlayCur=e.token(b,a.overlay),a.overlayPos=b.pos);b.pos=Math.min(a.basePos,a.overlayPos);return null==a.overlayCur?a.baseCur:null!=a.baseCur&&a.overlay.combineTokens||f&&null==a.overlay.combineTokens?a.baseCur+" "+a.overlayCur:
-a.overlayCur},indent:d.indent&&function(b,a){return d.indent(b.base,a)},electricChars:d.electricChars,innerMode:function(b){return{state:b.base,mode:d}},blankLine:function(b){var a,c;d.blankLine&&(a=d.blankLine(b.base));e.blankLine&&(c=e.blankLine(b.overlay));return null==c?a:f&&null!=a?a+" "+c:c}}}});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.overlayMode=function(b,c,d){return{startState:function(){return{base:a.startState(b),overlay:a.startState(c),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(d){return{base:a.copyState(b,d.base),overlay:a.copyState(c,d.overlay),basePos:d.basePos,baseCur:null,overlayPos:d.overlayPos,overlayCur:null}},token:function(a,e){return(a!=e.streamSeen||Math.min(e.basePos,e.overlayPos)<a.start)&&(e.streamSeen=a,e.basePos=e.overlayPos=a.start),a.start==e.basePos&&(e.baseCur=b.token(a,e.base),e.basePos=a.pos),a.start==e.overlayPos&&(a.pos=a.start,e.overlayCur=c.token(a,e.overlay),e.overlayPos=a.pos),a.pos=Math.min(e.basePos,e.overlayPos),null==e.overlayCur?e.baseCur:null!=e.baseCur&&e.overlay.combineTokens||d&&null==e.overlay.combineTokens?e.baseCur+" "+e.overlayCur:e.overlayCur},indent:b.indent&&function(a,c){return b.indent(a.base,c)},electricChars:b.electricChars,innerMode:function(a){return{state:a.base,mode:b}},blankLine:function(a){var e,f;return b.blankLine&&(e=b.blankLine(a.base)),c.blankLine&&(f=c.blankLine(a.overlay)),null==f?e:d&&null!=e?e+" "+f:f}}}});
\ No newline at end of file
index 2ccea51..e6ba603 100644 (file)
@@ -1,8 +1 @@
-'use strict';(function(l){"object"==typeof exports&&"object"==typeof module?l(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],l):l(CodeMirror)})(function(l){function r(b,e){if(!b.hasOwnProperty(e))throw Error("Undefined state "+e+" in simple mode");}function q(b,e){if(!b)return/(?:)/;var c="";b instanceof RegExp?(b.ignoreCase&&(c="i"),b=b.source):b=String(b);return new RegExp((!1===e?"":"^")+"(?:"+b+")",c)}function u(b){if(!b)return null;if(b.apply)return b;
-if("string"==typeof b)return b.replace(/\./g," ");for(var e=[],c=0;c<b.length;c++)e.push(b[c]&&b[c].replace(/\./g," "));return e}function v(b,e){(b.next||b.push)&&r(e,b.next||b.push);this.regex=q(b.regex);this.token=u(b.token);this.data=b}function w(b,e){return function(c,a){if(a.pending){var d=a.pending.shift();0==a.pending.length&&(a.pending=null);c.pos+=d.text.length;return d.token}if(a.local){if(a.local.end&&c.match(a.local.end))d=a.local.endToken||null,a.local=a.localState=null;else{d=a.local.mode.token(c,
-a.localState);var g;a.local.endScan&&(g=a.local.endScan.exec(c.current()))&&(c.pos=c.start+g.index)}return d}for(var h=b[a.state],f=0;f<h.length;f++)if(d=h[f],g=(!d.data.sol||c.sol())&&c.match(d.regex)){d.data.next?a.state=d.data.next:d.data.push?((a.stack||(a.stack=[])).push(a.state),a.state=d.data.push):d.data.pop&&a.stack&&a.stack.length&&(a.state=a.stack.pop());if(d.data.mode){var h=void 0,m=e,f=a,k=d.data.mode,n=d.token;if(k.persistent)for(var p=f.persistentStates;p&&!h;p=p.next)if(k.spec?t(k.spec,
-p.spec):k.mode==p.mode)h=p;m=h?h.mode:k.mode||l.getMode(m,k.spec);p=h?h.state:l.startState(m);k.persistent&&!h&&(f.persistentStates={mode:m,spec:k.spec,state:p,next:f.persistentStates});f.localState=p;f.local={mode:m,end:k.end&&q(k.end),endScan:k.end&&!1!==k.forceEnd&&q(k.end,!1),endToken:n&&n.join?n[n.length-1]:n}}d.data.indent&&a.indent.push(c.indentation()+e.indentUnit);d.data.dedent&&a.indent.pop();(h=d.token)&&h.apply&&(h=h(g));if(2<g.length){a.pending=[];for(f=2;f<g.length;f++)g[f]&&a.pending.push({text:g[f],
-token:d.token[f-1]});c.backUp(g[0].length-(g[1]?g[1].length:0));return h[0]}return h&&h.join?h[0]:h}c.next();return null}}function t(b,e){if(b===e)return!0;if(!b||"object"!=typeof b||!e||"object"!=typeof e)return!1;var c=0,a;for(a in b)if(b.hasOwnProperty(a)){if(!e.hasOwnProperty(a)||!t(b[a],e[a]))return!1;c++}for(a in e)e.hasOwnProperty(a)&&c--;return 0==c}function x(b,e){return function(c,a,d){if(c.local&&c.local.mode.indent)return c.local.mode.indent(c.localState,a,d);if(!(d=null==c.indent||c.local)&&
-(d=e.dontIndentStates)){a:{d=e.dontIndentStates;for(var g=0;g<d.length;g++)if(d[g]===c.state){d=!0;break a}d=void 0}d=-1<d}if(d)return l.Pass;d=c.indent.length-1;g=b[c.state];a:for(;;){for(var h=0;h<g.length;h++){var f=g[h];if(f.data.dedent&&!1!==f.data.dedentIfLineStart){var m=f.regex.exec(a);if(m&&m[0]){d--;if(f.next||f.push)g=b[f.next||f.push];a=a.slice(m[0].length);continue a}}}break}return 0>d?0:c.indent[d]}}l.defineSimpleMode=function(b,e){l.defineMode(b,function(b){return l.simpleMode(b,e)})};
-l.simpleMode=function(b,e){r(e,"start");var c={},a=e.meta||{},d=!1,g;for(g in e)if(g!=a&&e.hasOwnProperty(g))for(var h=c[g]=[],f=e[g],m=0;m<f.length;m++){var k=f[m];h.push(new v(k,e));if(k.indent||k.dedent)d=!0}b={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:d?[]:null}},copyState:function(a){var b={state:a.state,pending:a.pending,local:a.local,localState:null,indent:a.indent&&a.indent.slice(0)};a.localState&&(b.localState=l.copyState(a.local.mode,a.localState));
-a.stack&&(b.stack=a.stack.slice(0));for(var c=a.persistentStates;c;c=c.next)b.persistentStates={mode:c.mode,spec:c.spec,state:c.state==a.localState?b.localState:l.copyState(c.mode,c.state),next:b.persistentStates};return b},token:w(c,b),innerMode:function(a){return a.local&&{mode:a.local.mode,state:a.localState}},indent:x(c,a)};if(a)for(var n in a)a.hasOwnProperty(n)&&(b[n]=a[n]);return b}});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){if(!a.hasOwnProperty(b))throw new Error("Undefined state "+b+" in simple mode")}function c(a,b){if(!a)return/(?:)/;var c="";return a instanceof RegExp?(a.ignoreCase&&(c="i"),a=a.source):a=String(a),new RegExp((b===!1?"":"^")+"(?:"+a+")",c)}function d(a){if(!a)return null;if(a.apply)return a;if("string"==typeof a)return a.replace(/\./g," ");for(var b=[],c=0;c<a.length;c++)b.push(a[c]&&a[c].replace(/\./g," "));return b}function e(a,e){(a.next||a.push)&&b(e,a.next||a.push),this.regex=c(a.regex),this.token=d(a.token),this.data=a}function f(a,b){return function(c,d){if(d.pending){var e=d.pending.shift();return 0==d.pending.length&&(d.pending=null),c.pos+=e.text.length,e.token}if(d.local){if(d.local.end&&c.match(d.local.end)){var f=d.local.endToken||null;return d.local=d.localState=null,f}var g,f=d.local.mode.token(c,d.localState);return d.local.endScan&&(g=d.local.endScan.exec(c.current()))&&(c.pos=c.start+g.index),f}for(var i=a[d.state],j=0;j<i.length;j++){var k=i[j],l=(!k.data.sol||c.sol())&&c.match(k.regex);if(l){k.data.next?d.state=k.data.next:k.data.push?((d.stack||(d.stack=[])).push(d.state),d.state=k.data.push):k.data.pop&&d.stack&&d.stack.length&&(d.state=d.stack.pop()),k.data.mode&&h(b,d,k.data.mode,k.token),k.data.indent&&d.indent.push(c.indentation()+b.indentUnit),k.data.dedent&&d.indent.pop();var m=k.token;if(m&&m.apply&&(m=m(l)),l.length>2&&k.token&&"string"!=typeof k.token){d.pending=[];for(var n=2;n<l.length;n++)l[n]&&d.pending.push({text:l[n],token:k.token[n-1]});return c.backUp(l[0].length-(l[1]?l[1].length:0)),m[0]}return m&&m.join?m[0]:m}}return c.next(),null}}function g(a,b){if(a===b)return!0;if(!a||"object"!=typeof a||!b||"object"!=typeof b)return!1;var c=0;for(var d in a)if(a.hasOwnProperty(d)){if(!b.hasOwnProperty(d)||!g(a[d],b[d]))return!1;c++}for(var d in b)b.hasOwnProperty(d)&&c--;return 0==c}function h(b,d,e,f){var h;if(e.persistent)for(var i=d.persistentStates;i&&!h;i=i.next)(e.spec?g(e.spec,i.spec):e.mode==i.mode)&&(h=i);var j=h?h.mode:e.mode||a.getMode(b,e.spec),k=h?h.state:a.startState(j);e.persistent&&!h&&(d.persistentStates={mode:j,spec:e.spec,state:k,next:d.persistentStates}),d.localState=k,d.local={mode:j,end:e.end&&c(e.end),endScan:e.end&&e.forceEnd!==!1&&c(e.end,!1),endToken:f&&f.join?f[f.length-1]:f}}function i(a,b){for(var c=0;c<b.length;c++)if(b[c]===a)return!0}function j(b,c){return function(d,e,f){if(d.local&&d.local.mode.indent)return d.local.mode.indent(d.localState,e,f);if(null==d.indent||d.local||c.dontIndentStates&&i(d.state,c.dontIndentStates)>-1)return a.Pass;var g=d.indent.length-1,h=b[d.state];a:for(;;){for(var j=0;j<h.length;j++){var k=h[j];if(k.data.dedent&&k.data.dedentIfLineStart!==!1){var l=k.regex.exec(e);if(l&&l[0]){g--,(k.next||k.push)&&(h=b[k.next||k.push]),e=e.slice(l[0].length);continue a}}}break}return g<0?0:d.indent[g]}}a.defineSimpleMode=function(b,c){a.defineMode(b,function(b){return a.simpleMode(b,c)})},a.simpleMode=function(c,d){b(d,"start");var g={},h=d.meta||{},i=!1;for(var k in d)if(k!=h&&d.hasOwnProperty(k))for(var l=g[k]=[],m=d[k],n=0;n<m.length;n++){var o=m[n];l.push(new e(o,d)),(o.indent||o.dedent)&&(i=!0)}var p={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:i?[]:null}},copyState:function(b){var c={state:b.state,pending:b.pending,local:b.local,localState:null,indent:b.indent&&b.indent.slice(0)};b.localState&&(c.localState=a.copyState(b.local.mode,b.localState)),b.stack&&(c.stack=b.stack.slice(0));for(var d=b.persistentStates;d;d=d.next)c.persistentStates={mode:d.mode,spec:d.spec,state:d.state==b.localState?c.localState:a.copyState(d.mode,d.state),next:c.persistentStates};return c},token:f(g,c),innerMode:function(a){return a.local&&{mode:a.local.mode,state:a.localState}},indent:j(g,h)};if(h)for(var q in h)h.hasOwnProperty(q)&&(p[q]=h[q]);return p}});
\ No newline at end of file
index 8610e42..25778d4 100644 (file)
@@ -1,2 +1 @@
-'use strict';(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("./runmode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./runmode"],a):a(CodeMirror)})(function(a){function f(b,a){if(3==b.nodeType)return a.push(b.nodeValue);for(var c=b.firstChild;c;c=c.nextSibling)f(c,a),e.test(b.nodeType)&&a.push("\n")}var e=/^(p|li|div|h\\d|pre|blockquote|td)$/;a.colorize=function(b,e){b||(b=document.body.getElementsByTagName("pre"));
-for(var c=0;c<b.length;++c){var d=b[c],g=d.getAttribute("data-lang")||e;if(g){var h=[];f(d,h);d.innerHTML="";a.runMode(h.join(""),g,d);d.className+=" cm-s-default"}}}});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("./runmode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./runmode"],a):a(CodeMirror)}(function(a){"use strict";function b(a,d){if(3==a.nodeType)return d.push(a.nodeValue);for(var e=a.firstChild;e;e=e.nextSibling)b(e,d),c.test(a.nodeType)&&d.push("\n")}var c=/^(p|li|div|h\\d|pre|blockquote|td)$/;a.colorize=function(c,d){c||(c=document.body.getElementsByTagName("pre"));for(var e=0;e<c.length;++e){var f=c[e],g=f.getAttribute("data-lang")||d;if(g){var h=[];b(f,h),f.innerHTML="",a.runMode(h.join(""),g,f),f.className+=" cm-s-default"}}}});
\ No newline at end of file
index 328e786..23886d9 100644 (file)
@@ -1,8 +1 @@
-'use strict';window.CodeMirror={};
-(function(){function k(a){this.pos=this.start=0;this.string=a;this.lineStart=0}k.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return 0==this.pos},peek:function(){return this.string.charAt(this.pos)||null},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(a){var b=this.string.charAt(this.pos);if("string"==typeof a?b==a:b&&(a.test?a.test(b):a(b)))return++this.pos,b},eatWhile:function(a){for(var b=this.pos;this.eat(a););
-return this.pos>b},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){a=this.string.indexOf(a,this.pos);if(-1<a)return this.pos=a,!0},backUp:function(a){this.pos-=a},column:function(){return this.start-this.lineStart},indentation:function(){return 0},match:function(a,b,d){if("string"==typeof a){var c=function(a){return d?a.toLowerCase():a},f=this.string.substr(this.pos,
-a.length);if(c(f)==c(a))return!1!==b&&(this.pos+=a.length),!0}else{if((a=this.string.slice(this.pos).match(a))&&0<a.index)return null;a&&!1!==b&&(this.pos+=a[0].length);return a}},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}},lookAhead:function(){return null}};CodeMirror.StringStream=k;CodeMirror.startState=function(a,b,d){return a.startState?a.startState(b,d):!0};var m=CodeMirror.modes={},
-f=CodeMirror.mimeModes={};CodeMirror.defineMode=function(a,b){2<arguments.length&&(b.dependencies=Array.prototype.slice.call(arguments,2));m[a]=b};CodeMirror.defineMIME=function(a,b){f[a]=b};CodeMirror.resolveMode=function(a){"string"==typeof a&&f.hasOwnProperty(a)?a=f[a]:a&&"string"==typeof a.name&&f.hasOwnProperty(a.name)&&(a=f[a.name]);return"string"==typeof a?{name:a}:a||{name:"null"}};CodeMirror.getMode=function(a,b){b=CodeMirror.resolveMode(b);var d=m[b.name];if(!d)throw Error("Unknown mode: "+
-b);return d(a,b)};CodeMirror.registerHelper=CodeMirror.registerGlobalHelper=Math.min;CodeMirror.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}});CodeMirror.defineMIME("text/plain","null");CodeMirror.runMode=function(a,b,d,c){b=CodeMirror.getMode({indentUnit:2},b);if(1==d.nodeType){var f=c&&c.tabSize||4,l=d,h=0;l.innerHTML="";d=function(a,b){if("\n"==a)l.appendChild(document.createElement("br")),h=0;else{for(var d="",c=0;;){var e=a.indexOf("\t",c);if(-1==e){d+=a.slice(c);h+=
-a.length-c;break}else{h+=e-c;d+=a.slice(c,e);c=f-h%f;h+=c;for(var g=0;g<c;++g)d+=" ";c=e+1}}b?(a=l.appendChild(document.createElement("span")),a.className="cm-"+b.replace(/ +/g," cm-"),a.appendChild(document.createTextNode(d))):l.appendChild(document.createTextNode(d))}}}a=a.split(/\r?\n|\r/);c=c&&c.state||CodeMirror.startState(b);for(var g=0,k=a.length;g<k;++g){g&&d("\n");var e=new CodeMirror.StringStream(a[g]);for(!e.string&&b.blankLine&&b.blankLine(c);!e.eol();){var m=b.token(e,c);d(e.current(),
-m,g,e.start,c);e.start=e.pos}}}})();
+window.CodeMirror={},function(){"use strict";function a(a){return a.split(/\r?\n|\r/)}function b(a){this.pos=this.start=0,this.string=a,this.lineStart=0}b.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return 0==this.pos},peek:function(){return this.string.charAt(this.pos)||null},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(a){var b=this.string.charAt(this.pos);if("string"==typeof a)var c=b==a;else var c=b&&(a.test?a.test(b):a(b));if(c)return++this.pos,b},eatWhile:function(a){for(var b=this.pos;this.eat(a););return this.pos>b},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){var b=this.string.indexOf(a,this.pos);if(b>-1)return this.pos=b,!0},backUp:function(a){this.pos-=a},column:function(){return this.start-this.lineStart},indentation:function(){return 0},match:function(a,b,c){if("string"!=typeof a){var d=this.string.slice(this.pos).match(a);return d&&d.index>0?null:(d&&b!==!1&&(this.pos+=d[0].length),d)}var e=function(a){return c?a.toLowerCase():a},f=this.string.substr(this.pos,a.length);if(e(f)==e(a))return b!==!1&&(this.pos+=a.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}},lookAhead:function(){return null}},CodeMirror.StringStream=b,CodeMirror.startState=function(a,b,c){return!a.startState||a.startState(b,c)};var c=CodeMirror.modes={},d=CodeMirror.mimeModes={};CodeMirror.defineMode=function(a,b){arguments.length>2&&(b.dependencies=Array.prototype.slice.call(arguments,2)),c[a]=b},CodeMirror.defineMIME=function(a,b){d[a]=b},CodeMirror.resolveMode=function(a){return"string"==typeof a&&d.hasOwnProperty(a)?a=d[a]:a&&"string"==typeof a.name&&d.hasOwnProperty(a.name)&&(a=d[a.name]),"string"==typeof a?{name:a}:a||{name:"null"}},CodeMirror.getMode=function(a,b){b=CodeMirror.resolveMode(b);var d=c[b.name];if(!d)throw new Error("Unknown mode: "+b);return d(a,b)},CodeMirror.registerHelper=CodeMirror.registerGlobalHelper=Math.min,CodeMirror.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}}),CodeMirror.defineMIME("text/plain","null"),CodeMirror.runMode=function(b,c,d,e){var f=CodeMirror.getMode({indentUnit:2},c);if(1==d.nodeType){var g=e&&e.tabSize||4,h=d,i=0;h.innerHTML="",d=function(a,b){if("\n"==a)return h.appendChild(document.createElement("br")),void(i=0);for(var c="",d=0;;){var e=a.indexOf("\t",d);if(e==-1){c+=a.slice(d),i+=a.length-d;break}i+=e-d,c+=a.slice(d,e);var f=g-i%g;i+=f;for(var j=0;j<f;++j)c+=" ";d=e+1}if(b){var k=h.appendChild(document.createElement("span"));k.className="cm-"+b.replace(/ +/g," cm-"),k.appendChild(document.createTextNode(c))}else h.appendChild(document.createTextNode(c))}}for(var j=a(b),k=e&&e.state||CodeMirror.startState(f),l=0,m=j.length;l<m;++l){l&&d("\n");var n=new CodeMirror.StringStream(j[l]);for(!n.string&&f.blankLine&&f.blankLine(k);!n.eol();){var o=f.token(n,k);d(n.current(),o,l,n.start,k),n.start=n.pos}}}}();
\ No newline at end of file
index 66658b1..d2703fb 100644 (file)
@@ -1,3 +1 @@
-'use strict';(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)})(function(a){a.runMode=function(k,c,f,d){c=a.getMode(a.defaults,c);var n=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||9>document.documentMode);if(f.appendChild){var m=d&&d.tabSize||a.defaults.tabSize,l=f,g=0;l.innerHTML="";f=function(a,d){if("\n"==a)l.appendChild(document.createTextNode(n?
-"\r":a)),g=0;else{for(var b="",e=0;;){var c=a.indexOf("\t",e);if(-1==c){b+=a.slice(e);g+=a.length-e;break}else{g+=c-e;b+=a.slice(e,c);e=m-g%m;g+=e;for(var f=0;f<e;++f)b+=" ";e=c+1}}d?(a=l.appendChild(document.createElement("span")),a.className="cm-"+d.replace(/ +/g," cm-"),a.appendChild(document.createTextNode(b))):l.appendChild(document.createTextNode(b))}}}k=a.splitLines(k);d=d&&d.state||a.startState(c);for(var h=0,p=k.length;h<p;++h){h&&f("\n");var b=new a.StringStream(k[h]);for(!b.string&&c.blankLine&&
-c.blankLine(d);!b.eol();){var q=c.token(b,d);f(b.current(),q,h,b.start,d);b.start=b.pos}}}});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.runMode=function(b,c,d,e){var f=a.getMode(a.defaults,c),g=/MSIE \d/.test(navigator.userAgent),h=g&&(null==document.documentMode||document.documentMode<9);if(d.appendChild){var i=e&&e.tabSize||a.defaults.tabSize,j=d,k=0;j.innerHTML="",d=function(a,b){if("\n"==a)return j.appendChild(document.createTextNode(h?"\r":a)),void(k=0);for(var c="",d=0;;){var e=a.indexOf("\t",d);if(e==-1){c+=a.slice(d),k+=a.length-d;break}k+=e-d,c+=a.slice(d,e);var f=i-k%i;k+=f;for(var g=0;g<f;++g)c+=" ";d=e+1}if(b){var l=j.appendChild(document.createElement("span"));l.className="cm-"+b.replace(/ +/g," cm-"),l.appendChild(document.createTextNode(c))}else j.appendChild(document.createTextNode(c))}}for(var l=a.splitLines(b),m=e&&e.state||a.startState(f),n=0,o=l.length;n<o;++n){n&&d("\n");var p=new a.StringStream(l[n]);for(!p.string&&f.blankLine&&f.blankLine(m);!p.eol();){var q=f.token(p,m);d(p.current(),q,n,p.start,m),p.start=p.pos}}}});
\ No newline at end of file
index 0913758..7744429 100644 (file)
@@ -1,10 +1 @@
-'use strict';function splitLines(a){return a.split(/\r\n?|\n/)}var countColumn=exports.countColumn=function(a,b,d,c,e){null==b&&(b=a.search(/[^\s\u00a0]/),-1==b&&(b=a.length));c=c||0;for(e=e||0;;){var f=a.indexOf("\t",c);if(0>f||f>=b)return e+(b-c);e+=f-c;e+=d-e%d;c=f+1}};function StringStream(a,b,d){this.pos=this.start=0;this.string=a;this.tabSize=b||8;this.lineStart=this.lastColumnPos=this.lastColumnValue=0;this.context=d}
-StringStream.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(a){var b=this.string.charAt(this.pos);if("string"==typeof a?b==a:b&&(a.test?a.test(b):a(b)))return++this.pos,b},eatWhile:function(a){for(var b=this.pos;this.eat(a););return this.pos>b},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;
-return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){a=this.string.indexOf(a,this.pos);if(-1<a)return this.pos=a,!0},backUp:function(a){this.pos-=a},column:function(){this.lastColumnPos<this.start&&(this.lastColumnValue=countColumn(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start);return this.lastColumnValue-(this.lineStart?countColumn(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return countColumn(this.string,
-null,this.tabSize)-(this.lineStart?countColumn(this.string,this.lineStart,this.tabSize):0)},match:function(a,b,d){if("string"==typeof a){var c=function(a){return d?a.toLowerCase():a},e=this.string.substr(this.pos,a.length);if(c(e)==c(a))return!1!==b&&(this.pos+=a.length),!0}else{if((a=this.string.slice(this.pos).match(a))&&0<a.index)return null;a&&!1!==b&&(this.pos+=a[0].length);return a}},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(a,b){this.lineStart+=
-a;try{return b()}finally{this.lineStart-=a}},lookAhead:function(a){a=this.context.line+a;return a>=this.context.lines.length?null:this.context.lines[a]}};exports.StringStream=StringStream;exports.startState=function(a,b,d){return a.startState?a.startState(b,d):!0};var modes=exports.modes={},mimeModes=exports.mimeModes={};exports.defineMode=function(a,b){2<arguments.length&&(b.dependencies=Array.prototype.slice.call(arguments,2));modes[a]=b};exports.defineMIME=function(a,b){mimeModes[a]=b};
-exports.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}});exports.defineMIME("text/plain","null");exports.resolveMode=function(a){"string"==typeof a&&mimeModes.hasOwnProperty(a)?a=mimeModes[a]:a&&"string"==typeof a.name&&mimeModes.hasOwnProperty(a.name)&&(a=mimeModes[a.name]);return"string"==typeof a?{name:a}:a||{name:"null"}};function copyObj(a,b,d){b||(b={});for(var c in a)!a.hasOwnProperty(c)||!1===d&&b.hasOwnProperty(c)||(b[c]=a[c]);return b}
-var modeExtensions=exports.modeExtensions={};exports.extendMode=function(a,b){a=modeExtensions.hasOwnProperty(a)?modeExtensions[a]:modeExtensions[a]={};copyObj(b,a)};
-exports.getMode=function(a,b){b=exports.resolveMode(b);var d=modes[b.name];if(!d)return exports.getMode(a,"text/plain");a=d(a,b);if(modeExtensions.hasOwnProperty(b.name)){var d=modeExtensions[b.name],c;for(c in d)d.hasOwnProperty(c)&&(a.hasOwnProperty(c)&&(a["_"+c]=a[c]),a[c]=d[c])}a.name=b.name;b.helperType&&(a.helperType=b.helperType);if(b.modeProps)for(c in b.modeProps)a[c]=b.modeProps[c];return a};exports.registerHelper=exports.registerGlobalHelper=Math.min;
-exports.runMode=function(a,b,d,c){b=exports.getMode({indentUnit:2},b);a=splitLines(a);c=c&&c.state||exports.startState(b);for(var e={lines:a,line:0},f=0,h=a.length;f<h;++f,++e.line){f&&d("\n");var g=new exports.StringStream(a[f],4,e);for(!g.string&&b.blankLine&&b.blankLine(c);!g.eol();){var k=b.token(g,c);d(g.current(),k,f,g.start,c);g.start=g.pos}}};require.cache[require.resolve("../../lib/codemirror")]=require.cache[require.resolve("./runmode.node")];
-require.cache[require.resolve("../../addon/runmode/runmode")]=require.cache[require.resolve("./runmode.node")];
+function splitLines(a){return a.split(/\r\n?|\n/)}function StringStream(a,b,c){this.pos=this.start=0,this.string=a,this.tabSize=b||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.context=c}function copyObj(a,b,c){b||(b={});for(var d in a)!a.hasOwnProperty(d)||c===!1&&b.hasOwnProperty(d)||(b[d]=a[d]);return b}var countColumn=exports.countColumn=function(a,b,c,d,e){null==b&&(b=a.search(/[^\s\u00a0]/),b==-1&&(b=a.length));for(var f=d||0,g=e||0;;){var h=a.indexOf("\t",f);if(h<0||h>=b)return g+(b-f);g+=h-f,g+=c-g%c,f=h+1}};StringStream.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(a){var b=this.string.charAt(this.pos);if("string"==typeof a)var c=b==a;else var c=b&&(a.test?a.test(b):a(b));if(c)return++this.pos,b},eatWhile:function(a){for(var b=this.pos;this.eat(a););return this.pos>b},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){var b=this.string.indexOf(a,this.pos);if(b>-1)return this.pos=b,!0},backUp:function(a){this.pos-=a},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=countColumn(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?countColumn(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return countColumn(this.string,null,this.tabSize)-(this.lineStart?countColumn(this.string,this.lineStart,this.tabSize):0)},match:function(a,b,c){if("string"!=typeof a){var d=this.string.slice(this.pos).match(a);return d&&d.index>0?null:(d&&b!==!1&&(this.pos+=d[0].length),d)}var e=function(a){return c?a.toLowerCase():a},f=this.string.substr(this.pos,a.length);if(e(f)==e(a))return b!==!1&&(this.pos+=a.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}},lookAhead:function(a){var b=this.context.line+a;return b>=this.context.lines.length?null:this.context.lines[b]}},exports.StringStream=StringStream,exports.startState=function(a,b,c){return!a.startState||a.startState(b,c)};var modes=exports.modes={},mimeModes=exports.mimeModes={};exports.defineMode=function(a,b){arguments.length>2&&(b.dependencies=Array.prototype.slice.call(arguments,2)),modes[a]=b},exports.defineMIME=function(a,b){mimeModes[a]=b},exports.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}}),exports.defineMIME("text/plain","null"),exports.resolveMode=function(a){return"string"==typeof a&&mimeModes.hasOwnProperty(a)?a=mimeModes[a]:a&&"string"==typeof a.name&&mimeModes.hasOwnProperty(a.name)&&(a=mimeModes[a.name]),"string"==typeof a?{name:a}:a||{name:"null"}};var modeExtensions=exports.modeExtensions={};exports.extendMode=function(a,b){var c=modeExtensions.hasOwnProperty(a)?modeExtensions[a]:modeExtensions[a]={};copyObj(b,c)},exports.getMode=function(a,b){var b=exports.resolveMode(b),c=modes[b.name];if(!c)return exports.getMode(a,"text/plain");var d=c(a,b);if(modeExtensions.hasOwnProperty(b.name)){var e=modeExtensions[b.name];for(var f in e)e.hasOwnProperty(f)&&(d.hasOwnProperty(f)&&(d["_"+f]=d[f]),d[f]=e[f])}if(d.name=b.name,b.helperType&&(d.helperType=b.helperType),b.modeProps)for(var f in b.modeProps)d[f]=b.modeProps[f];return d},exports.registerHelper=exports.registerGlobalHelper=Math.min,exports.runMode=function(a,b,c,d){for(var e=exports.getMode({indentUnit:2},b),f=splitLines(a),g=d&&d.state||exports.startState(e),h={lines:f,line:0},i=0,j=f.length;i<j;++i,++h.line){i&&c("\n");var k=new exports.StringStream(f[i],4,h);for(!k.string&&e.blankLine&&e.blankLine(g);!k.eol();){var l=e.token(k,g);c(k.current(),l,i,k.start,g),k.start=k.pos}}},require.cache[require.resolve("../../lib/codemirror")]=require.cache[require.resolve("./runmode.node")],require.cache[require.resolve("../../addon/runmode/runmode")]=require.cache[require.resolve("./runmode.node")];
\ No newline at end of file
index 48313ee..ebf6897 100644 (file)
@@ -1,6 +1 @@
-'use strict';(function(b){"object"==typeof exports&&"object"==typeof module?b(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],b):b(CodeMirror)})(function(b){function e(a,f){function c(a){clearTimeout(d.doRedraw);d.doRedraw=setTimeout(function(){d.redraw()},a)}this.cm=a;this.options=f;this.buttonHeight=f.scrollButtonHeight||a.getOption("scrollButtonHeight");this.annotations=[];this.doRedraw=this.doUpdate=null;this.div=a.getWrapperElement().appendChild(document.createElement("div"));
-this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none";this.computeScale();var d=this;a.on("refresh",this.resizeHandler=function(){clearTimeout(d.doUpdate);d.doUpdate=setTimeout(function(){d.computeScale()&&c(20)},100)});a.on("markerAdded",this.resizeHandler);a.on("markerCleared",this.resizeHandler);if(!1!==f.listenForChanges)a.on("change",this.changeHandler=function(){c(250)})}b.defineExtension("annotateScrollbar",function(a){"string"==typeof a&&(a={className:a});
-return new e(this,a)});b.defineOption("scrollButtonHeight",0);e.prototype.computeScale=function(){var a=this.cm,a=(a.getWrapperElement().clientHeight-a.display.barHeight-2*this.buttonHeight)/a.getScrollerElement().scrollHeight;if(a!=this.hScale)return this.hScale=a,!0};e.prototype.update=function(a){this.annotations=a;this.redraw()};e.prototype.redraw=function(a){function f(a,b){m!=a.line&&(m=a.line,k=c.getLineHandle(m));return k.widgets&&k.widgets.length||e&&k.height>t?c.charCoords(a,"local")[b?
-"top":"bottom"]:c.heightAtLine(k,"local")+(b?0:k.height)}!1!==a&&this.computeScale();var c=this.cm;a=this.hScale;var d=document.createDocumentFragment(),b=this.annotations,e=c.getOption("lineWrapping"),t=e&&1.5*c.defaultTextHeight(),m=null,k=null,r=c.lastLine();if(c.display.barWidth)for(var g=0,n;g<b.length;g++){var h=b[g];if(!(h.to.line>r)){for(var p=n||f(h.from,!0)*a,l=f(h.to,!1)*a;g<b.length-1&&!(b[g+1].to.line>r);){n=f(b[g+1].from,!0)*a;if(n>l+.9)break;h=b[++g];l=f(h.to,!1)*a}if(l!=p){var l=Math.max(l-
-p,3),q=d.appendChild(document.createElement("div"));q.style.cssText="position: absolute; right: 0px; width: "+Math.max(c.display.barWidth-1,2)+"px; top: "+(p+this.buttonHeight)+"px; height: "+l+"px";q.className=this.options.className;h.id&&q.setAttribute("annotation-id",h.id)}}}this.div.textContent="";this.div.appendChild(d)};e.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler);this.cm.off("markerAdded",this.resizeHandler);this.cm.off("markerCleared",this.resizeHandler);this.changeHandler&&
-this.cm.off("change",this.changeHandler);this.div.parentNode.removeChild(this.div)}});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){function c(a){clearTimeout(d.doRedraw),d.doRedraw=setTimeout(function(){d.redraw()},a)}this.cm=a,this.options=b,this.buttonHeight=b.scrollButtonHeight||a.getOption("scrollButtonHeight"),this.annotations=[],this.doRedraw=this.doUpdate=null,this.div=a.getWrapperElement().appendChild(document.createElement("div")),this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none",this.computeScale();var d=this;a.on("refresh",this.resizeHandler=function(){clearTimeout(d.doUpdate),d.doUpdate=setTimeout(function(){d.computeScale()&&c(20)},100)}),a.on("markerAdded",this.resizeHandler),a.on("markerCleared",this.resizeHandler),b.listenForChanges!==!1&&a.on("change",this.changeHandler=function(){c(250)})}a.defineExtension("annotateScrollbar",function(a){return"string"==typeof a&&(a={className:a}),new b(this,a)}),a.defineOption("scrollButtonHeight",0),b.prototype.computeScale=function(){var a=this.cm,b=(a.getWrapperElement().clientHeight-a.display.barHeight-2*this.buttonHeight)/a.getScrollerElement().scrollHeight;if(b!=this.hScale)return this.hScale=b,!0},b.prototype.update=function(a){this.annotations=a,this.redraw()},b.prototype.redraw=function(a){function b(a,b){if(i!=a.line&&(i=a.line,j=c.getLineHandle(i)),j.widgets&&j.widgets.length||g&&j.height>h)return c.charCoords(a,"local")[b?"top":"bottom"];var d=c.heightAtLine(j,"local");return d+(b?0:j.height)}a!==!1&&this.computeScale();var c=this.cm,d=this.hScale,e=document.createDocumentFragment(),f=this.annotations,g=c.getOption("lineWrapping"),h=g&&1.5*c.defaultTextHeight(),i=null,j=null,k=c.lastLine();if(c.display.barWidth)for(var l,m=0;m<f.length;m++){var n=f[m];if(!(n.to.line>k)){for(var o=l||b(n.from,!0)*d,p=b(n.to,!1)*d;m<f.length-1&&!(f[m+1].to.line>k)&&(l=b(f[m+1].from,!0)*d,!(l>p+.9));)n=f[++m],p=b(n.to,!1)*d;if(p!=o){var q=Math.max(p-o,3),r=e.appendChild(document.createElement("div"));r.style.cssText="position: absolute; right: 0px; width: "+Math.max(c.display.barWidth-1,2)+"px; top: "+(o+this.buttonHeight)+"px; height: "+q+"px",r.className=this.options.className,n.id&&r.setAttribute("annotation-id",n.id)}}}this.div.textContent="",this.div.appendChild(e)},b.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler),this.cm.off("markerAdded",this.resizeHandler),this.cm.off("markerCleared",this.resizeHandler),this.changeHandler&&this.cm.off("change",this.changeHandler),this.div.parentNode.removeChild(this.div)}});
\ No newline at end of file
index cc566ab..d2062a5 100644 (file)
@@ -1,2 +1 @@
-'use strict';(function(c){"object"==typeof exports&&"object"==typeof module?c(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],c):c(CodeMirror)})(function(c){function e(a,b){c.changeEnd(b).line==a.lastLine()&&d(a)}function d(a){var b="";if(1<a.lineCount())var b=a.display.scroller.clientHeight-30,c=a.getLineHandle(a.lastLine()).height,b=b-c+"px";a.state.scrollPastEndPadding!=b&&(a.state.scrollPastEndPadding=b,a.display.lineSpace.parentNode.style.paddingBottom=
-b,a.off("refresh",d),a.setSize(),a.on("refresh",d))}c.defineOption("scrollPastEnd",!1,function(a,b,f){f&&f!=c.Init&&(a.off("change",e),a.off("refresh",d),a.display.lineSpace.parentNode.style.paddingBottom="",a.state.scrollPastEndPadding=null);b&&(a.on("change",e),a.on("refresh",d),d(a))})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(b,d){a.changeEnd(d).line==b.lastLine()&&c(b)}function c(a){var b="";if(a.lineCount()>1){var d=a.display.scroller.clientHeight-30,e=a.getLineHandle(a.lastLine()).height;b=d-e+"px"}a.state.scrollPastEndPadding!=b&&(a.state.scrollPastEndPadding=b,a.display.lineSpace.parentNode.style.paddingBottom=b,a.off("refresh",c),a.setSize(),a.on("refresh",c))}a.defineOption("scrollPastEnd",!1,function(d,e,f){f&&f!=a.Init&&(d.off("change",b),d.off("refresh",c),d.display.lineSpace.parentNode.style.paddingBottom="",d.state.scrollPastEndPadding=null),e&&(d.on("change",b),d.on("refresh",c),c(d))})});
\ No newline at end of file
index 618a2f7..5eea7aa 100644 (file)
@@ -1 +1,66 @@
-.CodeMirror-simplescroll-horizontal div,.CodeMirror-simplescroll-vertical div{position:absolute;background:#ccc;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #bbb;border-radius:2px}.CodeMirror-simplescroll-horizontal,.CodeMirror-simplescroll-vertical{position:absolute;z-index:6;background:#eee}.CodeMirror-simplescroll-horizontal{bottom:0;left:0;height:8px}.CodeMirror-simplescroll-horizontal div{bottom:0;height:100%}.CodeMirror-simplescroll-vertical{right:0;top:0;width:8px}.CodeMirror-simplescroll-vertical div{right:0;width:100%}.CodeMirror-overlayscroll .CodeMirror-gutter-filler,.CodeMirror-overlayscroll .CodeMirror-scrollbar-filler{display:none}.CodeMirror-overlayscroll-horizontal div,.CodeMirror-overlayscroll-vertical div{position:absolute;background:#bcd;border-radius:3px}.CodeMirror-overlayscroll-horizontal,.CodeMirror-overlayscroll-vertical{position:absolute;z-index:6}.CodeMirror-overlayscroll-horizontal{bottom:0;left:0;height:6px}.CodeMirror-overlayscroll-horizontal div{bottom:0;height:100%}.CodeMirror-overlayscroll-vertical{right:0;top:0;width:6px}.CodeMirror-overlayscroll-vertical div{right:0;width:100%}
\ No newline at end of file
+.CodeMirror-simplescroll-horizontal div, .CodeMirror-simplescroll-vertical div {
+  position: absolute;
+  background: #ccc;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+  border: 1px solid #bbb;
+  border-radius: 2px;
+}
+
+.CodeMirror-simplescroll-horizontal, .CodeMirror-simplescroll-vertical {
+  position: absolute;
+  z-index: 6;
+  background: #eee;
+}
+
+.CodeMirror-simplescroll-horizontal {
+  bottom: 0; left: 0;
+  height: 8px;
+}
+.CodeMirror-simplescroll-horizontal div {
+  bottom: 0;
+  height: 100%;
+}
+
+.CodeMirror-simplescroll-vertical {
+  right: 0; top: 0;
+  width: 8px;
+}
+.CodeMirror-simplescroll-vertical div {
+  right: 0;
+  width: 100%;
+}
+
+
+.CodeMirror-overlayscroll .CodeMirror-scrollbar-filler, .CodeMirror-overlayscroll .CodeMirror-gutter-filler {
+  display: none;
+}
+
+.CodeMirror-overlayscroll-horizontal div, .CodeMirror-overlayscroll-vertical div {
+  position: absolute;
+  background: #bcd;
+  border-radius: 3px;
+}
+
+.CodeMirror-overlayscroll-horizontal, .CodeMirror-overlayscroll-vertical {
+  position: absolute;
+  z-index: 6;
+}
+
+.CodeMirror-overlayscroll-horizontal {
+  bottom: 0; left: 0;
+  height: 6px;
+}
+.CodeMirror-overlayscroll-horizontal div {
+  bottom: 0;
+  height: 100%;
+}
+
+.CodeMirror-overlayscroll-vertical {
+  right: 0; top: 0;
+  width: 6px;
+}
+.CodeMirror-overlayscroll-vertical div {
+  right: 0;
+  width: 100%;
+}
index d270216..425f43a 100644 (file)
@@ -1,6 +1 @@
-'use strict';(function(c){"object"==typeof exports&&"object"==typeof module?c(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],c):c(CodeMirror)})(function(c){function g(a,b,h){function e(a){var b=c.wheelEventPixels(a)["horizontal"==d.orientation?"x":"y"],h=d.pos;d.moveTo(d.pos+b);d.pos!=h&&c.e_preventDefault(a)}this.orientation=b;this.scroll=h;this.screen=this.total=this.size=1;this.pos=0;this.node=document.createElement("div");this.node.className=
-a+"-"+b;this.inner=this.node.appendChild(document.createElement("div"));var d=this;c.on(this.inner,"mousedown",function(a){function b(){c.off(document,"mousemove",h);c.off(document,"mouseup",b)}function h(a){if(1!=a.which)return b();d.moveTo(g+d.total/d.size*(a[e]-f))}if(1==a.which){c.e_preventDefault(a);var e="horizontal"==d.orientation?"pageX":"pageY",f=a[e],g=d.pos;c.on(document,"mousemove",h);c.on(document,"mouseup",b)}});c.on(this.node,"click",function(a){c.e_preventDefault(a);var b=d.inner.getBoundingClientRect();
-d.moveTo(d.pos+("horizontal"==d.orientation?a.clientX<b.left?-1:a.clientX>b.right?1:0:a.clientY<b.top?-1:a.clientY>b.bottom?1:0)*d.screen)});c.on(this.node,"mousewheel",e);c.on(this.node,"DOMMouseScroll",e)}function f(a,b,c){this.addClass=a;this.horiz=new g(a,"horizontal",c);b(this.horiz.node);this.vert=new g(a,"vertical",c);b(this.vert.node);this.width=null}g.prototype.setPos=function(a,b){0>a&&(a=0);a>this.total-this.screen&&(a=this.total-this.screen);if(!b&&a==this.pos)return!1;this.pos=a;this.inner.style["horizontal"==
-this.orientation?"left":"top"]=this.size/this.total*a+"px";return!0};g.prototype.moveTo=function(a){this.setPos(a)&&this.scroll(a,this.orientation)};g.prototype.update=function(a,b,c){var e=this.screen!=b||this.total!=a||this.size!=c;e&&(this.screen=b,this.total=a,this.size=c);a=this.size/this.total*this.screen;10>a&&(this.size-=10-a,a=10);this.inner.style["horizontal"==this.orientation?"width":"height"]=a+"px";this.setPos(this.pos,e)};f.prototype.update=function(a){if(null==this.width){var b=window.getComputedStyle?
-window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;b&&(this.width=parseInt(b.height))}var b=this.width||0,c=a.scrollWidth>a.clientWidth+1,e=a.scrollHeight>a.clientHeight+1;this.vert.node.style.display=e?"block":"none";this.horiz.node.style.display=c?"block":"none";e&&(this.vert.update(a.scrollHeight,a.clientHeight,a.viewHeight-(c?b:0)),this.vert.node.style.bottom=c?b+"px":"0");c&&(this.horiz.update(a.scrollWidth,a.clientWidth,a.viewWidth-(e?b:0)-a.barLeft),this.horiz.node.style.right=
-e?b+"px":"0",this.horiz.node.style.left=a.barLeft+"px");return{right:e?b:0,bottom:c?b:0}};f.prototype.setScrollTop=function(a){this.vert.setPos(a)};f.prototype.setScrollLeft=function(a){this.horiz.setPos(a)};f.prototype.clear=function(){var a=this.horiz.node.parentNode;a.removeChild(this.horiz.node);a.removeChild(this.vert.node)};c.scrollbarModel.simple=function(a,b){return new f("CodeMirror-simplescroll",a,b)};c.scrollbarModel.overlay=function(a,b){return new f("CodeMirror-overlayscroll",a,b)}});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(b,c,d){function e(b){var c=a.wheelEventPixels(b)["horizontal"==f.orientation?"x":"y"],d=f.pos;f.moveTo(f.pos+c),f.pos!=d&&a.e_preventDefault(b)}this.orientation=c,this.scroll=d,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=b+"-"+c,this.inner=this.node.appendChild(document.createElement("div"));var f=this;a.on(this.inner,"mousedown",function(b){function c(){a.off(document,"mousemove",d),a.off(document,"mouseup",c)}function d(a){return 1!=a.which?c():void f.moveTo(h+(a[e]-g)*(f.total/f.size))}if(1==b.which){a.e_preventDefault(b);var e="horizontal"==f.orientation?"pageX":"pageY",g=b[e],h=f.pos;a.on(document,"mousemove",d),a.on(document,"mouseup",c)}}),a.on(this.node,"click",function(b){a.e_preventDefault(b);var c,d=f.inner.getBoundingClientRect();c="horizontal"==f.orientation?b.clientX<d.left?-1:b.clientX>d.right?1:0:b.clientY<d.top?-1:b.clientY>d.bottom?1:0,f.moveTo(f.pos+c*f.screen)}),a.on(this.node,"mousewheel",e),a.on(this.node,"DOMMouseScroll",e)}function c(a,c,d){this.addClass=a,this.horiz=new b(a,"horizontal",d),c(this.horiz.node),this.vert=new b(a,"vertical",d),c(this.vert.node),this.width=null}b.prototype.setPos=function(a,b){return a<0&&(a=0),a>this.total-this.screen&&(a=this.total-this.screen),!(!b&&a==this.pos)&&(this.pos=a,this.inner.style["horizontal"==this.orientation?"left":"top"]=a*(this.size/this.total)+"px",!0)},b.prototype.moveTo=function(a){this.setPos(a)&&this.scroll(a,this.orientation)};var d=10;b.prototype.update=function(a,b,c){var e=this.screen!=b||this.total!=a||this.size!=c;e&&(this.screen=b,this.total=a,this.size=c);var f=this.screen*(this.size/this.total);f<d&&(this.size-=d-f,f=d),this.inner.style["horizontal"==this.orientation?"width":"height"]=f+"px",this.setPos(this.pos,e)},c.prototype.update=function(a){if(null==this.width){var b=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;b&&(this.width=parseInt(b.height))}var c=this.width||0,d=a.scrollWidth>a.clientWidth+1,e=a.scrollHeight>a.clientHeight+1;return this.vert.node.style.display=e?"block":"none",this.horiz.node.style.display=d?"block":"none",e&&(this.vert.update(a.scrollHeight,a.clientHeight,a.viewHeight-(d?c:0)),this.vert.node.style.bottom=d?c+"px":"0"),d&&(this.horiz.update(a.scrollWidth,a.clientWidth,a.viewWidth-(e?c:0)-a.barLeft),this.horiz.node.style.right=e?c+"px":"0",this.horiz.node.style.left=a.barLeft+"px"),{right:e?c:0,bottom:d?c:0}},c.prototype.setScrollTop=function(a){this.vert.setPos(a)},c.prototype.setScrollLeft=function(a){this.horiz.setPos(a)},c.prototype.clear=function(){var a=this.horiz.node.parentNode;a.removeChild(this.horiz.node),a.removeChild(this.vert.node)},a.scrollbarModel.simple=function(a,b){return new c("CodeMirror-simplescroll",a,b)},a.scrollbarModel.overlay=function(a,b){return new c("CodeMirror-overlayscroll",a,b)}});
\ No newline at end of file
index 2495eff..611b299 100644 (file)
@@ -1,2 +1 @@
-'use strict';(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../dialog/dialog"],e):e(CodeMirror)})(function(e){function g(a,d,b,c,e){a.openDialog?a.openDialog(d,e,{value:c,selectValueOnOpen:!0}):e(prompt(b,c))}function f(a,d){var b=Number(d);return/^[-+]/.test(d)?a.getCursor().line+b:b-1}e.commands.jumpToLine=function(a){var d=a.getCursor();g(a,'Jump to line: <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use line:column or scroll% syntax)</span>',
-"Jump to line:",d.line+1+":"+d.ch,function(b){if(b){var c;(c=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(b))?a.setCursor(f(a,c[1]),Number(c[2])):(c=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(b))?(b=Math.round(a.lineCount()*Number(c[1])/100),/^[-+]/.test(c[1])&&(b=d.line+b+1),a.setCursor(b-1,d.ch)):(c=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(b))&&a.setCursor(f(a,c[1]),d.ch)}})};e.keyMap["default"]["Alt-G"]="jumpToLine"});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../dialog/dialog"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b,c,d,e){a.openDialog?a.openDialog(b,e,{value:d,selectValueOnOpen:!0}):e(prompt(c,d))}function c(a,b){var c=Number(b);return/^[-+]/.test(b)?a.getCursor().line+c:c-1}var d='Jump to line: <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use line:column or scroll% syntax)</span>';a.commands.jumpToLine=function(a){var e=a.getCursor();b(a,d,"Jump to line:",e.line+1+":"+e.ch,function(b){if(b){var d;if(d=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(b))a.setCursor(c(a,d[1]),Number(d[2]));else if(d=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(b)){var f=Math.round(a.lineCount()*Number(d[1])/100);/^[-+]/.test(d[1])&&(f=e.line+f+1),a.setCursor(f-1,e.ch)}else(d=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(b))&&a.setCursor(c(a,d[1]),e.ch)}})},a.keyMap.default["Alt-G"]="jumpToLine"});
\ No newline at end of file
index 11f7bb1..f869a43 100644 (file)
@@ -1,6 +1 @@
-'use strict';(function(f){"object"==typeof exports&&"object"==typeof module?f(require("../../lib/codemirror"),require("./matchesonscrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./matchesonscrollbar"],f):f(CodeMirror)})(function(f){function q(a){this.options={};for(var b in g)this.options[b]=(a&&a.hasOwnProperty(b)?a:g)[b];this.matchesonscroll=this.overlay=this.timeout=null;this.active=!1}function h(a){var b=a.state.matchHighlighter;(b.active||a.hasFocus())&&k(a,
-b)}function l(a){var b=a.state.matchHighlighter;b.active||(b.active=!0,k(a,b))}function k(a,b){clearTimeout(b.timeout);b.timeout=setTimeout(function(){m(a)},b.options.delay)}function n(a,b,d,c){var e=a.state.matchHighlighter;a.addOverlay(e.overlay=r(b,d,c));e.options.annotateScrollbar&&a.showMatchesOnScrollbar&&(e.matchesonscroll=a.showMatchesOnScrollbar(d?new RegExp("\\b"+b+"\\b"):b,!1,{className:"CodeMirror-selection-highlight-scrollbar"}))}function p(a){var b=a.state.matchHighlighter;b.overlay&&
-(a.removeOverlay(b.overlay),b.overlay=null,b.matchesonscroll&&(b.matchesonscroll.clear(),b.matchesonscroll=null))}function m(a){a.operation(function(){var b=a.state.matchHighlighter;p(a);if(!a.somethingSelected()&&b.options.showToken){for(var d=!0===b.options.showToken?/[\w$]/:b.options.showToken,c=a.getCursor(),e=a.getLine(c.line),f=c=c.ch;c&&d.test(e.charAt(c-1));)--c;for(;f<e.length&&d.test(e.charAt(f));)++f;c<f&&n(a,e.slice(c,f),d,b.options.style)}else if(d=a.getCursor("from"),e=a.getCursor("to"),
-d.line==e.line){if(c=b.options.wordsOnly){a:if(null!==a.getRange(d,e).match(/^\w+$/)){if(0<d.ch&&(c={line:d.line,ch:d.ch-1},c=a.getRange(c,d),null===c.match(/\W/))){c=!1;break a}if(e.ch<a.getLine(d.line).length&&(c={line:e.line,ch:e.ch+1},c=a.getRange(e,c),null===c.match(/\W/))){c=!1;break a}c=!0}else c=!1;c=!c}c||(d=a.getRange(d,e),b.options.trim&&(d=d.replace(/^\s+|\s+$/g,"")),d.length>=b.options.minChars&&n(a,d,!1,b.options.style))}})}function r(a,b,d){return{token:function(c){var e;if(e=c.match(a))(e=
-!b)||(e=(!c.start||!b.test(c.string.charAt(c.start-1)))&&(c.pos==c.string.length||!b.test(c.string.charAt(c.pos))));if(e)return d;c.next();c.skipTo(a.charAt(0))||c.skipToEnd()}}}var g={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};f.defineOption("highlightSelectionMatches",!1,function(a,b,d){d&&d!=f.Init&&(p(a),clearTimeout(a.state.matchHighlighter.timeout),a.state.matchHighlighter=null,a.off("cursorActivity",h),a.off("focus",l));if(b){b=a.state.matchHighlighter=
-new q(b);if(a.hasFocus())b.active=!0,m(a);else a.on("focus",l);a.on("cursorActivity",h)}})});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("./matchesonscrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./matchesonscrollbar"],a):a(CodeMirror)}(function(a){"use strict";function b(a){this.options={};for(var b in l)this.options[b]=(a&&a.hasOwnProperty(b)?a:l)[b];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}function c(a){var b=a.state.matchHighlighter;(b.active||a.hasFocus())&&e(a,b)}function d(a){var b=a.state.matchHighlighter;b.active||(b.active=!0,e(a,b))}function e(a,b){clearTimeout(b.timeout),b.timeout=setTimeout(function(){h(a)},b.options.delay)}function f(a,b,c,d){var e=a.state.matchHighlighter;if(a.addOverlay(e.overlay=k(b,c,d)),e.options.annotateScrollbar&&a.showMatchesOnScrollbar){var f=c?new RegExp("\\b"+b+"\\b"):b;e.matchesonscroll=a.showMatchesOnScrollbar(f,!1,{className:"CodeMirror-selection-highlight-scrollbar"})}}function g(a){var b=a.state.matchHighlighter;b.overlay&&(a.removeOverlay(b.overlay),b.overlay=null,b.matchesonscroll&&(b.matchesonscroll.clear(),b.matchesonscroll=null))}function h(a){a.operation(function(){var b=a.state.matchHighlighter;if(g(a),!a.somethingSelected()&&b.options.showToken){for(var c=b.options.showToken===!0?/[\w$]/:b.options.showToken,d=a.getCursor(),e=a.getLine(d.line),h=d.ch,j=h;h&&c.test(e.charAt(h-1));)--h;for(;j<e.length&&c.test(e.charAt(j));)++j;return void(h<j&&f(a,e.slice(h,j),c,b.options.style))}var k=a.getCursor("from"),l=a.getCursor("to");if(k.line==l.line&&(!b.options.wordsOnly||i(a,k,l))){var m=a.getRange(k,l);b.options.trim&&(m=m.replace(/^\s+|\s+$/g,"")),m.length>=b.options.minChars&&f(a,m,!1,b.options.style)}})}function i(a,b,c){var d=a.getRange(b,c);if(null!==d.match(/^\w+$/)){if(b.ch>0){var e={line:b.line,ch:b.ch-1},f=a.getRange(e,b);if(null===f.match(/\W/))return!1}if(c.ch<a.getLine(b.line).length){var e={line:c.line,ch:c.ch+1},f=a.getRange(c,e);if(null===f.match(/\W/))return!1}return!0}return!1}function j(a,b){return!(a.start&&b.test(a.string.charAt(a.start-1))||a.pos!=a.string.length&&b.test(a.string.charAt(a.pos)))}function k(a,b,c){return{token:function(d){return!d.match(a)||b&&!j(d,b)?(d.next(),void(d.skipTo(a.charAt(0))||d.skipToEnd())):c}}}var l={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};a.defineOption("highlightSelectionMatches",!1,function(e,f,i){if(i&&i!=a.Init&&(g(e),clearTimeout(e.state.matchHighlighter.timeout),e.state.matchHighlighter=null,e.off("cursorActivity",c),e.off("focus",d)),f){var j=e.state.matchHighlighter=new b(f);e.hasFocus()?(j.active=!0,h(e)):e.on("focus",d),e.on("cursorActivity",c)}})});
\ No newline at end of file
index 16ee905..77932cc 100644 (file)
@@ -1 +1,8 @@
-.CodeMirror-search-match{background:gold;border-top:1px solid orange;border-bottom:1px solid orange;-moz-box-sizing:border-box;box-sizing:border-box;opacity:.5}
\ No newline at end of file
+.CodeMirror-search-match {
+  background: gold;
+  border-top: 1px solid orange;
+  border-bottom: 1px solid orange;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+  opacity: .5;
+}
index 4b8f912..b4dd2ff 100644 (file)
@@ -1,5 +1 @@
-'use strict';(function(d){"object"==typeof exports&&"object"==typeof module?d(require("../../lib/codemirror"),require("./searchcursor"),require("../scroll/annotatescrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../scroll/annotatescrollbar"],d):d(CodeMirror)})(function(d){function g(a,c,b,e){this.cm=a;this.options=e;var f={listenForChanges:!1},d;for(d in e)f[d]=e[d];f.className||(f.className="CodeMirror-search-match");this.annotation=a.annotateScrollbar(f);
-this.query=c;this.caseFold=b;this.gap={from:a.firstLine(),to:a.lastLine()+1};this.matches=[];this.update=null;this.findMatches();this.annotation.update(this.matches);var g=this;a.on("change",this.changeHandler=function(a,b){g.onChange(b)})}function h(a,c,b){return a<=c?a:Math.max(c,a+b)}d.defineExtension("showMatchesOnScrollbar",function(a,c,b){"string"==typeof b&&(b={className:b});b||(b={});return new g(this,a,c,b)});g.prototype.findMatches=function(){if(this.gap){for(var a=0;a<this.matches.length;a++){var c=
-this.matches[a];if(c.from.line>=this.gap.to)break;c.to.line>=this.gap.from&&this.matches.splice(a--,1)}for(var b=this.cm.getSearchCursor(this.query,d.Pos(this.gap.from,0),this.caseFold),e=this.options&&this.options.maxMatches||1E3;b.findNext();){c={from:b.from(),to:b.to()};if(c.from.line>=this.gap.to)break;this.matches.splice(a++,0,c);if(this.matches.length>e)break}this.gap=null}};g.prototype.onChange=function(a){var c=a.from.line,b=d.changeEnd(a).line,e=b-a.to.line;this.gap?(this.gap.from=Math.min(h(this.gap.from,
-c,e),a.from.line),this.gap.to=Math.max(h(this.gap.to,c,e),a.from.line)):this.gap={from:a.from.line,to:b+1};if(e)for(a=0;a<this.matches.length;a++){var b=this.matches[a],f=h(b.from.line,c,e);f!=b.from.line&&(b.from=d.Pos(f,b.from.ch));f=h(b.to.line,c,e);f!=b.to.line&&(b.to=d.Pos(f,b.to.ch))}clearTimeout(this.update);var g=this;this.update=setTimeout(function(){g.updateAfterChange()},250)};g.prototype.updateAfterChange=function(){this.findMatches();this.annotation.update(this.matches)};g.prototype.clear=
-function(){this.cm.off("change",this.changeHandler);this.annotation.clear()}});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("./searchcursor"),require("../scroll/annotatescrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../scroll/annotatescrollbar"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b,c,d){this.cm=a,this.options=d;var e={listenForChanges:!1};for(var f in d)e[f]=d[f];e.className||(e.className="CodeMirror-search-match"),this.annotation=a.annotateScrollbar(e),this.query=b,this.caseFold=c,this.gap={from:a.firstLine(),to:a.lastLine()+1},this.matches=[],this.update=null,this.findMatches(),this.annotation.update(this.matches);var g=this;a.on("change",this.changeHandler=function(a,b){g.onChange(b)})}function c(a,b,c){return a<=b?a:Math.max(b,a+c)}a.defineExtension("showMatchesOnScrollbar",function(a,c,d){return"string"==typeof d&&(d={className:d}),d||(d={}),new b(this,a,c,d)});var d=1e3;b.prototype.findMatches=function(){if(this.gap){for(var b=0;b<this.matches.length;b++){var c=this.matches[b];if(c.from.line>=this.gap.to)break;c.to.line>=this.gap.from&&this.matches.splice(b--,1)}for(var e=this.cm.getSearchCursor(this.query,a.Pos(this.gap.from,0),this.caseFold),f=this.options&&this.options.maxMatches||d;e.findNext();){var c={from:e.from(),to:e.to()};if(c.from.line>=this.gap.to)break;if(this.matches.splice(b++,0,c),this.matches.length>f)break}this.gap=null}},b.prototype.onChange=function(b){var d=b.from.line,e=a.changeEnd(b).line,f=e-b.to.line;if(this.gap?(this.gap.from=Math.min(c(this.gap.from,d,f),b.from.line),this.gap.to=Math.max(c(this.gap.to,d,f),b.from.line)):this.gap={from:b.from.line,to:e+1},f)for(var g=0;g<this.matches.length;g++){var h=this.matches[g],i=c(h.from.line,d,f);i!=h.from.line&&(h.from=a.Pos(i,h.from.ch));var j=c(h.to.line,d,f);j!=h.to.line&&(h.to=a.Pos(j,h.to.ch))}clearTimeout(this.update);var k=this;this.update=setTimeout(function(){k.updateAfterChange()},250)},b.prototype.updateAfterChange=function(){this.findMatches(),this.annotation.update(this.matches)},b.prototype.clear=function(){this.cm.off("change",this.changeHandler),this.annotation.clear()}});
\ No newline at end of file
index 5e833f9..9ba7f30 100644 (file)
@@ -1,14 +1 @@
-'use strict';var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(b,h,e){b instanceof String&&(b=String(b));for(var k=b.length,g=0;g<k;g++){var l=b[g];if(h.call(e,l,g,b))return{i:g,v:l}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,h,e){b!=Array.prototype&&b!=Object.prototype&&(b[h]=e.value)};
-$jscomp.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global&&null!=global?global:b};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(b,h,e,k){if(h){e=$jscomp.global;b=b.split(".");for(k=0;k<b.length-1;k++){var g=b[k];g in e||(e[g]={});e=e[g]}b=b[b.length-1];k=e[b];h=h(k);h!=k&&null!=h&&$jscomp.defineProperty(e,b,{configurable:!0,writable:!0,value:h})}};
-$jscomp.polyfill("Array.prototype.find",function(b){return b?b:function(b,e){return $jscomp.findInternal(this,b,e).v}},"es6-impl","es3");
-(function(b){"object"==typeof exports&&"object"==typeof module?b(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],b):b(CodeMirror)})(function(b){function h(a,c){"string"==typeof a?a=new RegExp(a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),c?"gi":"g"):a.global||(a=new RegExp(a.source,a.ignoreCase?"gi":"g"));return{token:function(c){a.lastIndex=c.pos;
-var b=a.exec(c.string);if(b&&b.index==c.pos)return c.pos+=b[0].length||1,"searching";b?c.pos=b.index:c.skipToEnd()}}}function e(){this.overlay=this.posFrom=this.posTo=this.lastQuery=this.query=null}function k(a){return a.state.search||(a.state.search=new e)}function g(a){return"string"==typeof a&&a==a.toLowerCase()}function l(a,c,b){return a.getSearchCursor(c,b,{caseFold:g(c),multiline:!0})}function y(a,c,b,f,d){a.openDialog(c,f,{value:b,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){n(a)},
-onKeyDown:d})}function r(a,c,b,f,d){a.openDialog?a.openDialog(c,d,{value:f,selectValueOnOpen:!0}):d(prompt(b,f))}function z(a,c,b,f){if(a.openConfirm)a.openConfirm(c,f);else if(confirm(b))f[0]()}function u(a){return a.replace(/\\(.)/g,function(a,b){return"n"==b?"\n":"r"==b?"\r":b})}function v(a){var b=a.match(/^\/(.*)\/([a-z]*)$/);if(b)try{a=new RegExp(b[1],-1==b[2].indexOf("i")?"":"i")}catch(A){}else a=u(a);if("string"==typeof a?""==a:a.test(""))a=/x^/;return a}function p(a,b,e){b.queryText=e;b.query=
-v(e);a.removeOverlay(b.overlay,g(b.query));b.overlay=h(b.query,g(b.query));a.addOverlay(b.overlay);a.showMatchesOnScrollbar&&(b.annotate&&(b.annotate.clear(),b.annotate=null),b.annotate=a.showMatchesOnScrollbar(b.query,g(b.query)))}function m(a,c,e,f){var d=k(a);if(d.query)return q(a,c);var g=a.getSelection()||d.lastQuery;if(e&&a.openDialog){var t=null,h=function(c,f){b.e_stop(f);c&&(c!=d.queryText&&(p(a,d,c),d.posFrom=d.posTo=a.getCursor()),t&&(t.style.opacity=1),q(a,f.shiftKey,function(b,c){var d;
-3>c.line&&document.querySelector&&(d=a.display.wrapper.querySelector(".CodeMirror-dialog"))&&d.getBoundingClientRect().bottom-4>a.cursorCoords(c,"window").top&&((t=d).style.opacity=.4)}))};y(a,'<span class="CodeMirror-search-label">Search:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>',g,h,function(c,d){var f=b.keyName(c),e=b.keyMap[a.getOption("keyMap")][f];e||(e=
-a.getOption("extraKeys")[f]);if("findNext"==e||"findPrev"==e||"findPersistentNext"==e||"findPersistentPrev"==e)b.e_stop(c),p(a,k(a),d),a.execCommand(e);else if("find"==e||"findPersistent"==e)b.e_stop(c),h(d,c)});f&&g&&(p(a,d,g),q(a,c))}else r(a,'<span class="CodeMirror-search-label">Search:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>',"Search for:",g,function(b){b&&
-!d.query&&a.operation(function(){p(a,d,b);d.posFrom=d.posTo=a.getCursor();q(a,c)})})}function q(a,c,e){a.operation(function(){var f=k(a),d=l(a,f.query,c?f.posFrom:f.posTo);if(!d.find(c)&&(d=l(a,f.query,c?b.Pos(a.lastLine()):b.Pos(a.firstLine(),0)),!d.find(c)))return;a.setSelection(d.from(),d.to());a.scrollIntoView({from:d.from(),to:d.to()},20);f.posFrom=d.from();f.posTo=d.to();e&&e(d.from(),d.to())})}function n(a){a.operation(function(){var b=k(a);if(b.lastQuery=b.query)b.query=b.queryText=null,a.removeOverlay(b.overlay),
-b.annotate&&(b.annotate.clear(),b.annotate=null)})}function w(a,b,e){a.operation(function(){for(var c=l(a,b);c.findNext();)if("string"!=typeof b){var d=a.getRange(c.from(),c.to()).match(b);c.replace(e.replace(/\$(\d)/g,function(a,b){return d[b]}))}else c.replace(e)})}function x(a,b){if(!a.getOption("readOnly")){var c=a.getSelection()||k(a).lastQuery,e='<span class="CodeMirror-search-label">'+(b?"Replace all:":"Replace:")+"</span>";r(a,e+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>',
-e,c,function(c){c&&(c=v(c),r(a,'<span class="CodeMirror-search-label">With:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>',"Replace with:","",function(e){e=u(e);if(b)w(a,c,e);else{n(a);var d=l(a,c,a.getCursor("from")),f=function(){var b=d.from(),h;if(!(h=d.findNext())&&(d=l(a,c),!(h=d.findNext())||b&&d.from().line==b.line&&d.from().ch==b.ch))return;a.setSelection(d.from(),d.to());a.scrollIntoView({from:d.from(),to:d.to()});z(a,'<span class="CodeMirror-search-label">Replace?</span> <button>Yes</button> <button>No</button> <button>All</button> <button>Stop</button>',
-"Replace?",[function(){g(h)},f,function(){w(a,c,e)}])},g=function(a){d.replace("string"==typeof c?e:e.replace(/\$(\d)/g,function(b,c){return a[c]}));f()};f()}}))})}}b.commands.find=function(a){n(a);m(a)};b.commands.findPersistent=function(a){n(a);m(a,!1,!0)};b.commands.findPersistentNext=function(a){m(a,!1,!0,!0)};b.commands.findPersistentPrev=function(a){m(a,!0,!0,!0)};b.commands.findNext=m;b.commands.findPrev=function(a){m(a,!0)};b.commands.clearSearch=n;b.commands.replace=x;b.commands.replaceAll=
-function(a){x(a,!0)}});
+!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){return"string"==typeof a?a=new RegExp(a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),b?"gi":"g"):a.global||(a=new RegExp(a.source,a.ignoreCase?"gi":"g")),{token:function(b){a.lastIndex=b.pos;var c=a.exec(b.string);return c&&c.index==b.pos?(b.pos+=c[0].length||1,"searching"):void(c?b.pos=c.index:b.skipToEnd())}}}function c(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function d(a){return a.state.search||(a.state.search=new c)}function e(a){return"string"==typeof a&&a==a.toLowerCase()}function f(a,b,c){return a.getSearchCursor(b,c,{caseFold:e(b),multiline:!0})}function g(a,b,c,d,e){a.openDialog(b,d,{value:c,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){o(a)},onKeyDown:e})}function h(a,b,c,d,e){a.openDialog?a.openDialog(b,e,{value:d,selectValueOnOpen:!0}):e(prompt(c,d))}function i(a,b,c,d){a.openConfirm?a.openConfirm(b,d):confirm(c)&&d[0]()}function j(a){return a.replace(/\\(.)/g,function(a,b){return"n"==b?"\n":"r"==b?"\r":b})}function k(a){var b=a.match(/^\/(.*)\/([a-z]*)$/);if(b)try{a=new RegExp(b[1],b[2].indexOf("i")==-1?"":"i")}catch(a){}else a=j(a);return("string"==typeof a?""==a:a.test(""))&&(a=/x^/),a}function l(a,c,d){c.queryText=d,c.query=k(d),a.removeOverlay(c.overlay,e(c.query)),c.overlay=b(c.query,e(c.query)),a.addOverlay(c.overlay),a.showMatchesOnScrollbar&&(c.annotate&&(c.annotate.clear(),c.annotate=null),c.annotate=a.showMatchesOnScrollbar(c.query,e(c.query)))}function m(b,c,e,f){var i=d(b);if(i.query)return n(b,c);var j=b.getSelection()||i.lastQuery;if(j instanceof RegExp&&"x^"==j.source&&(j=null),e&&b.openDialog){var k=null,m=function(c,d){a.e_stop(d),c&&(c!=i.queryText&&(l(b,i,c),i.posFrom=i.posTo=b.getCursor()),k&&(k.style.opacity=1),n(b,d.shiftKey,function(a,c){var d;c.line<3&&document.querySelector&&(d=b.display.wrapper.querySelector(".CodeMirror-dialog"))&&d.getBoundingClientRect().bottom-4>b.cursorCoords(c,"window").top&&((k=d).style.opacity=.4)}))};g(b,r,j,m,function(c,e){var f=a.keyName(c),g=b.getOption("extraKeys"),h=g&&g[f]||a.keyMap[b.getOption("keyMap")][f];"findNext"==h||"findPrev"==h||"findPersistentNext"==h||"findPersistentPrev"==h?(a.e_stop(c),l(b,d(b),e),b.execCommand(h)):"find"!=h&&"findPersistent"!=h||(a.e_stop(c),m(e,c))}),f&&j&&(l(b,i,j),n(b,c))}else h(b,r,"Search for:",j,function(a){a&&!i.query&&b.operation(function(){l(b,i,a),i.posFrom=i.posTo=b.getCursor(),n(b,c)})})}function n(b,c,e){b.operation(function(){var g=d(b),h=f(b,g.query,c?g.posFrom:g.posTo);(h.find(c)||(h=f(b,g.query,c?a.Pos(b.lastLine()):a.Pos(b.firstLine(),0)),h.find(c)))&&(b.setSelection(h.from(),h.to()),b.scrollIntoView({from:h.from(),to:h.to()},20),g.posFrom=h.from(),g.posTo=h.to(),e&&e(h.from(),h.to()))})}function o(a){a.operation(function(){var b=d(a);b.lastQuery=b.query,b.query&&(b.query=b.queryText=null,a.removeOverlay(b.overlay),b.annotate&&(b.annotate.clear(),b.annotate=null))})}function p(a,b,c){a.operation(function(){for(var d=f(a,b);d.findNext();)if("string"!=typeof b){var e=a.getRange(d.from(),d.to()).match(b);d.replace(c.replace(/\$(\d)/g,function(a,b){return e[b]}))}else d.replace(c)})}function q(a,b){if(!a.getOption("readOnly")){var c=a.getSelection()||d(a).lastQuery,e='<span class="CodeMirror-search-label">'+(b?"Replace all:":"Replace:")+"</span>";h(a,e+s,e,c,function(c){c&&(c=k(c),h(a,t,"Replace with:","",function(d){if(d=j(d),b)p(a,c,d);else{o(a);var e=f(a,c,a.getCursor("from")),g=function(){var b,j=e.from();!(b=e.findNext())&&(e=f(a,c),!(b=e.findNext())||j&&e.from().line==j.line&&e.from().ch==j.ch)||(a.setSelection(e.from(),e.to()),a.scrollIntoView({from:e.from(),to:e.to()}),i(a,u,"Replace?",[function(){h(b)},g,function(){p(a,c,d)}]))},h=function(a){e.replace("string"==typeof c?d:d.replace(/\$(\d)/g,function(b,c){return a[c]})),g()};g()}}))})}}var r='<span class="CodeMirror-search-label">Search:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>',s=' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>',t='<span class="CodeMirror-search-label">With:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>',u='<span class="CodeMirror-search-label">Replace?</span> <button>Yes</button> <button>No</button> <button>All</button> <button>Stop</button>';a.commands.find=function(a){o(a),m(a)},a.commands.findPersistent=function(a){o(a),m(a,!1,!0)},a.commands.findPersistentNext=function(a){m(a,!1,!0,!0)},a.commands.findPersistentPrev=function(a){m(a,!0,!0,!0)},a.commands.findNext=m,a.commands.findPrev=function(a){m(a,!0)},a.commands.clearSearch=o,a.commands.replace=q,a.commands.replaceAll=function(a){q(a,!0)}});
\ No newline at end of file