pollypost 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +15 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +674 -0
- data/README.md +165 -0
- data/Rakefile +9 -0
- data/assets/fonts/font-awesome-custom/fontawesome-custom.eot +0 -0
- data/assets/fonts/font-awesome-custom/fontawesome-custom.svg +15 -0
- data/assets/fonts/font-awesome-custom/fontawesome-custom.ttf +0 -0
- data/assets/fonts/font-awesome-custom/fontawesome-custom.woff +0 -0
- data/assets/javascripts/app.js +35 -0
- data/assets/javascripts/application.js +8 -0
- data/assets/javascripts/dom-tweaking.js +36 -0
- data/assets/javascripts/main.js +36 -0
- data/assets/javascripts/models/page_content.js +39 -0
- data/assets/javascripts/templates/bar_edit_mode.html +14 -0
- data/assets/javascripts/templates/bar_view_mode.html +13 -0
- data/assets/javascripts/templates/duplicate_page.html +20 -0
- data/assets/javascripts/templates/html_editor.html +18 -0
- data/assets/javascripts/templates/loading.html +9 -0
- data/assets/javascripts/templates/new_page.html +23 -0
- data/assets/javascripts/templates/settings.html +15 -0
- data/assets/javascripts/views/bar_edit_mode.js +117 -0
- data/assets/javascripts/views/bar_view_mode.js +40 -0
- data/assets/javascripts/views/duplicate_page.js +76 -0
- data/assets/javascripts/views/editier_bar.js +171 -0
- data/assets/javascripts/views/html_editor.js +116 -0
- data/assets/javascripts/views/loading.js +31 -0
- data/assets/javascripts/views/new_page.js +77 -0
- data/assets/javascripts/views/page_content.js +26 -0
- data/assets/javascripts/views/settings.js +89 -0
- data/assets/stylesheets/_bootstrap-custom.scss +50 -0
- data/assets/stylesheets/_editor.scss +303 -0
- data/assets/stylesheets/_font-awesome-custom.scss +17 -0
- data/assets/stylesheets/_variable-overrides.scss +13 -0
- data/assets/stylesheets/application.scss +41 -0
- data/assets/stylesheets/bootstrap/_normalize.scss +427 -0
- data/assets/stylesheets/bootstrap/_scaffolding.scss +150 -0
- data/assets/stylesheets/font-awesome/_core.scss +12 -0
- data/assets/stylesheets/font-awesome/_mixins.scss +26 -0
- data/assets/stylesheets/font-awesome/_path.scss +14 -0
- data/lib/pollypost.rb +13 -0
- data/lib/pollypost/rake.rb +55 -0
- data/lib/pollypost/version.rb +11 -0
- data/pollypost.gemspec +27 -0
- data/test/README.md +55 -0
- data/test/basic.html +19 -0
- data/test/page_content_test.js +69 -0
- data/test/qunit-1.17.1.css +280 -0
- data/test/qunit-1.17.1.js +2875 -0
- data/test/sinon-1.14.1.js +5931 -0
- data/test/sinon-qunit-1.0.0.js +62 -0
- data/test/test.html +16 -0
- data/test/testmain.js +28 -0
- data/test/tests.js +58 -0
- data/vendor/assets/ace-1.1.8/ace.js +129 -0
- data/vendor/assets/ace-1.1.8/anchor.js +245 -0
- data/vendor/assets/ace-1.1.8/anchor_test.js +223 -0
- data/vendor/assets/ace-1.1.8/autocomplete.js +485 -0
- data/vendor/assets/ace-1.1.8/autocomplete/popup.js +338 -0
- data/vendor/assets/ace-1.1.8/autocomplete/text_completer.js +78 -0
- data/vendor/assets/ace-1.1.8/autocomplete/util.js +74 -0
- data/vendor/assets/ace-1.1.8/background_tokenizer.js +250 -0
- data/vendor/assets/ace-1.1.8/background_tokenizer_test.js +85 -0
- data/vendor/assets/ace-1.1.8/commands/command_manager.js +118 -0
- data/vendor/assets/ace-1.1.8/commands/command_manager_test.js +199 -0
- data/vendor/assets/ace-1.1.8/commands/default_commands.js +708 -0
- data/vendor/assets/ace-1.1.8/commands/incremental_search_commands.js +232 -0
- data/vendor/assets/ace-1.1.8/commands/multi_select_commands.js +102 -0
- data/vendor/assets/ace-1.1.8/commands/occur_commands.js +110 -0
- data/vendor/assets/ace-1.1.8/config.js +301 -0
- data/vendor/assets/ace-1.1.8/config_test.js +128 -0
- data/vendor/assets/ace-1.1.8/css/codefolding-fold-button-states.png +0 -0
- data/vendor/assets/ace-1.1.8/css/editor.css +422 -0
- data/vendor/assets/ace-1.1.8/css/expand-marker.png +0 -0
- data/vendor/assets/ace-1.1.8/document.js +645 -0
- data/vendor/assets/ace-1.1.8/document_test.js +306 -0
- data/vendor/assets/ace-1.1.8/edit_session.js +2554 -0
- data/vendor/assets/ace-1.1.8/edit_session/bracket_match.js +221 -0
- data/vendor/assets/ace-1.1.8/edit_session/fold.js +140 -0
- data/vendor/assets/ace-1.1.8/edit_session/fold_line.js +269 -0
- data/vendor/assets/ace-1.1.8/edit_session/folding.js +851 -0
- data/vendor/assets/ace-1.1.8/edit_session_test.js +1075 -0
- data/vendor/assets/ace-1.1.8/editor.js +2658 -0
- data/vendor/assets/ace-1.1.8/editor_change_document_test.js +188 -0
- data/vendor/assets/ace-1.1.8/editor_highlight_selected_word_test.js +223 -0
- data/vendor/assets/ace-1.1.8/editor_navigation_test.js +164 -0
- data/vendor/assets/ace-1.1.8/editor_text_edit_test.js +557 -0
- data/vendor/assets/ace-1.1.8/ext/beautify.js +57 -0
- data/vendor/assets/ace-1.1.8/ext/beautify/php_rules.js +366 -0
- data/vendor/assets/ace-1.1.8/ext/chromevox.js +980 -0
- data/vendor/assets/ace-1.1.8/ext/elastic_tabstops_lite.js +319 -0
- data/vendor/assets/ace-1.1.8/ext/emmet.js +434 -0
- data/vendor/assets/ace-1.1.8/ext/error_marker.js +214 -0
- data/vendor/assets/ace-1.1.8/ext/keybinding_menu.js +86 -0
- data/vendor/assets/ace-1.1.8/ext/language_tools.js +229 -0
- data/vendor/assets/ace-1.1.8/ext/linking.js +78 -0
- data/vendor/assets/ace-1.1.8/ext/menu_tools/add_editor_menu_options.js +109 -0
- data/vendor/assets/ace-1.1.8/ext/menu_tools/element_generator.js +148 -0
- data/vendor/assets/ace-1.1.8/ext/menu_tools/generate_settings_menu.js +264 -0
- data/vendor/assets/ace-1.1.8/ext/menu_tools/get_editor_keyboard_shortcuts.js +91 -0
- data/vendor/assets/ace-1.1.8/ext/menu_tools/get_set_functions.js +141 -0
- data/vendor/assets/ace-1.1.8/ext/menu_tools/overlay_page.js +116 -0
- data/vendor/assets/ace-1.1.8/ext/menu_tools/settings_menu.css +48 -0
- data/vendor/assets/ace-1.1.8/ext/modelist.js +191 -0
- data/vendor/assets/ace-1.1.8/ext/old_ie.js +114 -0
- data/vendor/assets/ace-1.1.8/ext/old_ie_test.js +77 -0
- data/vendor/assets/ace-1.1.8/ext/searchbox.css +153 -0
- data/vendor/assets/ace-1.1.8/ext/searchbox.js +308 -0
- data/vendor/assets/ace-1.1.8/ext/settings_menu.js +76 -0
- data/vendor/assets/ace-1.1.8/ext/spellcheck.js +69 -0
- data/vendor/assets/ace-1.1.8/ext/split.js +40 -0
- data/vendor/assets/ace-1.1.8/ext/static.css +31 -0
- data/vendor/assets/ace-1.1.8/ext/static_highlight.js +190 -0
- data/vendor/assets/ace-1.1.8/ext/static_highlight_test.js +96 -0
- data/vendor/assets/ace-1.1.8/ext/statusbar.js +48 -0
- data/vendor/assets/ace-1.1.8/ext/textarea.js +521 -0
- data/vendor/assets/ace-1.1.8/ext/themelist.js +100 -0
- data/vendor/assets/ace-1.1.8/ext/whitespace.js +213 -0
- data/vendor/assets/ace-1.1.8/ext/whitespace_test.js +116 -0
- data/vendor/assets/ace-1.1.8/incremental_search.js +317 -0
- data/vendor/assets/ace-1.1.8/incremental_search_test.js +213 -0
- data/vendor/assets/ace-1.1.8/keyboard/emacs.js +652 -0
- data/vendor/assets/ace-1.1.8/keyboard/emacs_test.js +151 -0
- data/vendor/assets/ace-1.1.8/keyboard/hash_handler.js +231 -0
- data/vendor/assets/ace-1.1.8/keyboard/keybinding.js +145 -0
- data/vendor/assets/ace-1.1.8/keyboard/keybinding_test.js +69 -0
- data/vendor/assets/ace-1.1.8/keyboard/state_handler.js +249 -0
- data/vendor/assets/ace-1.1.8/keyboard/textarea.js +82 -0
- data/vendor/assets/ace-1.1.8/keyboard/textinput.js +495 -0
- data/vendor/assets/ace-1.1.8/keyboard/vim.js +199 -0
- data/vendor/assets/ace-1.1.8/keyboard/vim/commands.js +618 -0
- data/vendor/assets/ace-1.1.8/keyboard/vim/maps/aliases.js +94 -0
- data/vendor/assets/ace-1.1.8/keyboard/vim/maps/motions.js +681 -0
- data/vendor/assets/ace-1.1.8/keyboard/vim/maps/operators.js +201 -0
- data/vendor/assets/ace-1.1.8/keyboard/vim/maps/util.js +132 -0
- data/vendor/assets/ace-1.1.8/keyboard/vim/registers.js +42 -0
- data/vendor/assets/ace-1.1.8/keyboard/vim_test.js +528 -0
- data/vendor/assets/ace-1.1.8/layer/cursor.js +234 -0
- data/vendor/assets/ace-1.1.8/layer/font_metrics.js +176 -0
- data/vendor/assets/ace-1.1.8/layer/gutter.js +287 -0
- data/vendor/assets/ace-1.1.8/layer/marker.js +218 -0
- data/vendor/assets/ace-1.1.8/layer/text.js +575 -0
- data/vendor/assets/ace-1.1.8/layer/text_test.js +126 -0
- data/vendor/assets/ace-1.1.8/lib/dom.js +283 -0
- data/vendor/assets/ace-1.1.8/lib/es5-shim.js +1062 -0
- data/vendor/assets/ace-1.1.8/lib/event.js +381 -0
- data/vendor/assets/ace-1.1.8/lib/event_emitter.js +155 -0
- data/vendor/assets/ace-1.1.8/lib/event_emitter_test.js +65 -0
- data/vendor/assets/ace-1.1.8/lib/fixoldbrowsers.js +19 -0
- data/vendor/assets/ace-1.1.8/lib/keys.js +163 -0
- data/vendor/assets/ace-1.1.8/lib/lang.js +221 -0
- data/vendor/assets/ace-1.1.8/lib/net.js +51 -0
- data/vendor/assets/ace-1.1.8/lib/oop.js +57 -0
- data/vendor/assets/ace-1.1.8/lib/regexp.js +113 -0
- data/vendor/assets/ace-1.1.8/lib/useragent.js +106 -0
- data/vendor/assets/ace-1.1.8/line_widgets.js +297 -0
- data/vendor/assets/ace-1.1.8/mode/_test/Readme.md +9 -0
- data/vendor/assets/ace-1.1.8/mode/_test/highlight_rules_test.js +210 -0
- data/vendor/assets/ace-1.1.8/mode/_test/package.json +8 -0
- data/vendor/assets/ace-1.1.8/mode/_test/text_asciidoc.txt +111 -0
- data/vendor/assets/ace-1.1.8/mode/_test/text_coffee.txt +57 -0
- data/vendor/assets/ace-1.1.8/mode/_test/text_curly.txt +9 -0
- data/vendor/assets/ace-1.1.8/mode/_test/text_html.txt +10 -0
- data/vendor/assets/ace-1.1.8/mode/_test/text_javascript.txt +86 -0
- data/vendor/assets/ace-1.1.8/mode/_test/text_livescript.txt +1 -0
- data/vendor/assets/ace-1.1.8/mode/_test/text_lucene.txt +16 -0
- data/vendor/assets/ace-1.1.8/mode/_test/text_markdown.txt +22 -0
- data/vendor/assets/ace-1.1.8/mode/_test/text_php.txt +24 -0
- data/vendor/assets/ace-1.1.8/mode/_test/text_ruby.txt +34 -0
- data/vendor/assets/ace-1.1.8/mode/_test/text_xml.txt +7 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_abap.json +189 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_actionscript.json +263 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_ada.json +39 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_asciidoc.json +422 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_assembly_x86.json +114 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_autohotkey.json +261 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_batchfile.json +70 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_c9search.json +131 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_c_cpp.json +185 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_cirru.json +267 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_clojure.json +162 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_cobol.json +4 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_coffee.json +545 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_coldfusion.json +26 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_csharp.json +31 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_css.json +148 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_curly.json +56 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_d.json +111 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_dart.json +368 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_diff.json +262 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_dot.json +2254 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_eiffel.json +141 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_ejs.json +296 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_elixir.json +196 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_elm.json +198 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_erlang.json +166 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_forth.json +219 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_ftl.json +341 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_gcode.json +296 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_gherkin.json +142 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_gitignore.json +33 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_glsl.json +127 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_golang.json +256 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_groovy.json +410 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_haml.json +174 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_handlebars.json +81 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_haskell.json +156 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_haxe.json +143 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_html.json +63 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_html_ruby.json +257 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_ini.json +23 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_io.json +49 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_jack.json +1786 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_jade.json +188 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_java.json +95 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_javascript.json +593 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_json.json +412 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_jsoniq.json +4 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_jsp.json +435 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_jsx.json +51 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_julia.json +111 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_latex.json +127 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_less.json +204 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_liquid.json +551 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_lisp.json +248 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_livescript.json +6 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_logiql.json +190 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_lsl.json +503 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_lua.json +348 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_luapage.json +633 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_lucene.json +92 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_markdown.json +114 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_matlab.json +90 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_mel.json +257 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_mushcode.json +790 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_mysql.json +4 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_nix.json +360 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_objectivec.json +792 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_ocaml.json +200 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_pascal.json +297 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_perl.json +227 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_pgsql.json +889 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_php.json +171 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_powershell.json +184 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_prolog.json +245 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_properties.json +68 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_protobuf.json +136 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_python.json +152 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_r.json +235 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_rdoc.json +441 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_rhtml.json +106 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_ruby.json +234 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_rust.json +136 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_sass.json +229 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_scad.json +194 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_scala.json +542 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_scheme.json +216 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_scss.json +123 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_sh.json +334 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_sjs.json +276 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_smarty.json +98 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_snippets.json +159 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_soy_template.json +286 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_space.json +322 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_sql.json +54 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_stylus.json +271 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_svg.json +684 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_tcl.json +385 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_tex.json +130 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_text.json +29 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_textile.json +113 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_toml.json +131 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_twig.json +288 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_typescript.json +559 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_vala.json +158 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_vbscript.json +205 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_velocity.json +285 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_verilog.json +113 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_vhdl.json +271 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_xml.json +43 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_xquery.json +44 -0
- data/vendor/assets/ace-1.1.8/mode/_test/tokens_yaml.json +150 -0
- data/vendor/assets/ace-1.1.8/mode/abap.js +77 -0
- data/vendor/assets/ace-1.1.8/mode/abap_highlight_rules.js +134 -0
- data/vendor/assets/ace-1.1.8/mode/actionscript.js +58 -0
- data/vendor/assets/ace-1.1.8/mode/actionscript_highlight_rules.js +141 -0
- data/vendor/assets/ace-1.1.8/mode/ada.js +54 -0
- data/vendor/assets/ace-1.1.8/mode/ada_highlight_rules.js +93 -0
- data/vendor/assets/ace-1.1.8/mode/apache_conf.js +62 -0
- data/vendor/assets/ace-1.1.8/mode/apache_conf_highlight_rules.js +231 -0
- data/vendor/assets/ace-1.1.8/mode/applescript.js +55 -0
- data/vendor/assets/ace-1.1.8/mode/applescript_highlight_rules.js +139 -0
- data/vendor/assets/ace-1.1.8/mode/asciidoc.js +64 -0
- data/vendor/assets/ace-1.1.8/mode/asciidoc_highlight_rules.js +234 -0
- data/vendor/assets/ace-1.1.8/mode/assembly_x86.js +56 -0
- data/vendor/assets/ace-1.1.8/mode/assembly_x86_highlight_rules.js +114 -0
- data/vendor/assets/ace-1.1.8/mode/autohotkey.js +57 -0
- data/vendor/assets/ace-1.1.8/mode/autohotkey_highlight_rules.js +107 -0
- data/vendor/assets/ace-1.1.8/mode/batchfile.js +61 -0
- data/vendor/assets/ace-1.1.8/mode/batchfile_highlight_rules.js +97 -0
- data/vendor/assets/ace-1.1.8/mode/behaviour.js +90 -0
- data/vendor/assets/ace-1.1.8/mode/behaviour/behaviour_test.js +133 -0
- data/vendor/assets/ace-1.1.8/mode/behaviour/css.js +108 -0
- data/vendor/assets/ace-1.1.8/mode/behaviour/cstyle.js +400 -0
- data/vendor/assets/ace-1.1.8/mode/behaviour/html.js +46 -0
- data/vendor/assets/ace-1.1.8/mode/behaviour/xml.js +202 -0
- data/vendor/assets/ace-1.1.8/mode/behaviour/xquery.js +92 -0
- data/vendor/assets/ace-1.1.8/mode/c9search.js +67 -0
- data/vendor/assets/ace-1.1.8/mode/c9search_highlight_rules.js +182 -0
- data/vendor/assets/ace-1.1.8/mode/c_cpp.js +101 -0
- data/vendor/assets/ace-1.1.8/mode/c_cpp_highlight_rules.js +196 -0
- data/vendor/assets/ace-1.1.8/mode/cirru.js +51 -0
- data/vendor/assets/ace-1.1.8/mode/cirru_highlight_rules.js +125 -0
- data/vendor/assets/ace-1.1.8/mode/clojure.js +128 -0
- data/vendor/assets/ace-1.1.8/mode/clojure_highlight_rules.js +200 -0
- data/vendor/assets/ace-1.1.8/mode/cobol.js +53 -0
- data/vendor/assets/ace-1.1.8/mode/cobol_highlight_rules.js +100 -0
- data/vendor/assets/ace-1.1.8/mode/coffee.js +135 -0
- data/vendor/assets/ace-1.1.8/mode/coffee/coffee-script.js +62 -0
- data/vendor/assets/ace-1.1.8/mode/coffee/helpers.js +271 -0
- data/vendor/assets/ace-1.1.8/mode/coffee/lexer.js +935 -0
- data/vendor/assets/ace-1.1.8/mode/coffee/nodes.js +3106 -0
- data/vendor/assets/ace-1.1.8/mode/coffee/parser.js +724 -0
- data/vendor/assets/ace-1.1.8/mode/coffee/parser_test.js +88 -0
- data/vendor/assets/ace-1.1.8/mode/coffee/rewriter.js +516 -0
- data/vendor/assets/ace-1.1.8/mode/coffee/scope.js +174 -0
- data/vendor/assets/ace-1.1.8/mode/coffee_highlight_rules.js +233 -0
- data/vendor/assets/ace-1.1.8/mode/coffee_worker.js +74 -0
- data/vendor/assets/ace-1.1.8/mode/coldfusion.js +61 -0
- data/vendor/assets/ace-1.1.8/mode/coldfusion_highlight_rules.js +49 -0
- data/vendor/assets/ace-1.1.8/mode/coldfusion_test.js +67 -0
- data/vendor/assets/ace-1.1.8/mode/csharp.js +61 -0
- data/vendor/assets/ace-1.1.8/mode/csharp_highlight_rules.js +93 -0
- data/vendor/assets/ace-1.1.8/mode/css.js +100 -0
- data/vendor/assets/ace-1.1.8/mode/css/csslint.js +9628 -0
- data/vendor/assets/ace-1.1.8/mode/css_highlight_rules.js +179 -0
- data/vendor/assets/ace-1.1.8/mode/css_test.js +78 -0
- data/vendor/assets/ace-1.1.8/mode/css_worker.js +100 -0
- data/vendor/assets/ace-1.1.8/mode/css_worker_test.js +68 -0
- data/vendor/assets/ace-1.1.8/mode/curly.js +63 -0
- data/vendor/assets/ace-1.1.8/mode/curly_highlight_rules.js +66 -0
- data/vendor/assets/ace-1.1.8/mode/d.js +56 -0
- data/vendor/assets/ace-1.1.8/mode/d_highlight_rules.js +334 -0
- data/vendor/assets/ace-1.1.8/mode/dart.js +62 -0
- data/vendor/assets/ace-1.1.8/mode/dart_highlight_rules.js +186 -0
- data/vendor/assets/ace-1.1.8/mode/diff.js +52 -0
- data/vendor/assets/ace-1.1.8/mode/diff_highlight_rules.js +108 -0
- data/vendor/assets/ace-1.1.8/mode/django.js +119 -0
- data/vendor/assets/ace-1.1.8/mode/doc_comment_highlight_rules.js +79 -0
- data/vendor/assets/ace-1.1.8/mode/dockerfile.js +52 -0
- data/vendor/assets/ace-1.1.8/mode/dockerfile_highlight_rules.js +57 -0
- data/vendor/assets/ace-1.1.8/mode/dot.js +55 -0
- data/vendor/assets/ace-1.1.8/mode/dot_highlight_rules.js +126 -0
- data/vendor/assets/ace-1.1.8/mode/eiffel.js +52 -0
- data/vendor/assets/ace-1.1.8/mode/eiffel_highlight_rules.js +143 -0
- data/vendor/assets/ace-1.1.8/mode/ejs.js +109 -0
- data/vendor/assets/ace-1.1.8/mode/elixir.js +58 -0
- data/vendor/assets/ace-1.1.8/mode/elixir_highlight_rules.js +433 -0
- data/vendor/assets/ace-1.1.8/mode/elm.js +58 -0
- data/vendor/assets/ace-1.1.8/mode/elm_highlight_rules.js +162 -0
- data/vendor/assets/ace-1.1.8/mode/erlang.js +57 -0
- data/vendor/assets/ace-1.1.8/mode/erlang_highlight_rules.js +876 -0
- data/vendor/assets/ace-1.1.8/mode/folding/asciidoc.js +142 -0
- data/vendor/assets/ace-1.1.8/mode/folding/c9search.js +83 -0
- data/vendor/assets/ace-1.1.8/mode/folding/coffee.js +120 -0
- data/vendor/assets/ace-1.1.8/mode/folding/coffee_test.js +101 -0
- data/vendor/assets/ace-1.1.8/mode/folding/csharp.js +138 -0
- data/vendor/assets/ace-1.1.8/mode/folding/cstyle.js +124 -0
- data/vendor/assets/ace-1.1.8/mode/folding/cstyle_test.js +109 -0
- data/vendor/assets/ace-1.1.8/mode/folding/diff.js +69 -0
- data/vendor/assets/ace-1.1.8/mode/folding/fold_mode.js +120 -0
- data/vendor/assets/ace-1.1.8/mode/folding/html.js +48 -0
- data/vendor/assets/ace-1.1.8/mode/folding/html_test.js +162 -0
- data/vendor/assets/ace-1.1.8/mode/folding/ini.js +80 -0
- data/vendor/assets/ace-1.1.8/mode/folding/latex.js +162 -0
- data/vendor/assets/ace-1.1.8/mode/folding/lua.js +163 -0
- data/vendor/assets/ace-1.1.8/mode/folding/markdown.js +125 -0
- data/vendor/assets/ace-1.1.8/mode/folding/mixed.js +83 -0
- data/vendor/assets/ace-1.1.8/mode/folding/pythonic.js +58 -0
- data/vendor/assets/ace-1.1.8/mode/folding/pythonic_test.js +98 -0
- data/vendor/assets/ace-1.1.8/mode/folding/velocity.js +120 -0
- data/vendor/assets/ace-1.1.8/mode/folding/xml.js +277 -0
- data/vendor/assets/ace-1.1.8/mode/folding/xml_test.js +110 -0
- data/vendor/assets/ace-1.1.8/mode/forth.js +58 -0
- data/vendor/assets/ace-1.1.8/mode/forth_highlight_rules.js +164 -0
- data/vendor/assets/ace-1.1.8/mode/ftl.js +49 -0
- data/vendor/assets/ace-1.1.8/mode/ftl_highlight_rules.js +195 -0
- data/vendor/assets/ace-1.1.8/mode/gcode.js +51 -0
- data/vendor/assets/ace-1.1.8/mode/gcode_highlight_rules.js +94 -0
- data/vendor/assets/ace-1.1.8/mode/gherkin.js +80 -0
- data/vendor/assets/ace-1.1.8/mode/gherkin_highlight_rules.js +113 -0
- data/vendor/assets/ace-1.1.8/mode/gitignore.js +20 -0
- data/vendor/assets/ace-1.1.8/mode/gitignore_highlight_rules.js +31 -0
- data/vendor/assets/ace-1.1.8/mode/glsl.js +56 -0
- data/vendor/assets/ace-1.1.8/mode/glsl_highlight_rules.js +81 -0
- data/vendor/assets/ace-1.1.8/mode/golang.js +55 -0
- data/vendor/assets/ace-1.1.8/mode/golang_highlight_rules.js +108 -0
- data/vendor/assets/ace-1.1.8/mode/groovy.js +24 -0
- data/vendor/assets/ace-1.1.8/mode/groovy_highlight_rules.js +173 -0
- data/vendor/assets/ace-1.1.8/mode/haml.js +61 -0
- data/vendor/assets/ace-1.1.8/mode/haml_highlight_rules.js +132 -0
- data/vendor/assets/ace-1.1.8/mode/handlebars.js +29 -0
- data/vendor/assets/ace-1.1.8/mode/handlebars_highlight_rules.js +72 -0
- data/vendor/assets/ace-1.1.8/mode/haskell.js +62 -0
- data/vendor/assets/ace-1.1.8/mode/haskell_highlight_rules.js +246 -0
- data/vendor/assets/ace-1.1.8/mode/haxe.js +56 -0
- data/vendor/assets/ace-1.1.8/mode/haxe_highlight_rules.js +98 -0
- data/vendor/assets/ace-1.1.8/mode/html.js +106 -0
- data/vendor/assets/ace-1.1.8/mode/html/saxparser.js +10430 -0
- data/vendor/assets/ace-1.1.8/mode/html_completions.js +305 -0
- data/vendor/assets/ace-1.1.8/mode/html_highlight_rules.js +111 -0
- data/vendor/assets/ace-1.1.8/mode/html_ruby.js +59 -0
- data/vendor/assets/ace-1.1.8/mode/html_ruby_highlight_rules.js +84 -0
- data/vendor/assets/ace-1.1.8/mode/html_test.js +67 -0
- data/vendor/assets/ace-1.1.8/mode/html_worker.js +92 -0
- data/vendor/assets/ace-1.1.8/mode/ini.js +53 -0
- data/vendor/assets/ace-1.1.8/mode/ini_highlight_rules.js +112 -0
- data/vendor/assets/ace-1.1.8/mode/io.js +58 -0
- data/vendor/assets/ace-1.1.8/mode/io_highlight_rules.js +120 -0
- data/vendor/assets/ace-1.1.8/mode/jack.js +79 -0
- data/vendor/assets/ace-1.1.8/mode/jack_highlight_rules.js +142 -0
- data/vendor/assets/ace-1.1.8/mode/jade.js +57 -0
- data/vendor/assets/ace-1.1.8/mode/jade_highlight_rules.js +341 -0
- data/vendor/assets/ace-1.1.8/mode/java.js +24 -0
- data/vendor/assets/ace-1.1.8/mode/java_highlight_rules.js +128 -0
- data/vendor/assets/ace-1.1.8/mode/javascript.js +116 -0
- data/vendor/assets/ace-1.1.8/mode/javascript/jshint.js +9459 -0
- data/vendor/assets/ace-1.1.8/mode/javascript_highlight_rules.js +405 -0
- data/vendor/assets/ace-1.1.8/mode/javascript_test.js +213 -0
- data/vendor/assets/ace-1.1.8/mode/javascript_worker.js +187 -0
- data/vendor/assets/ace-1.1.8/mode/javascript_worker_test.js +106 -0
- data/vendor/assets/ace-1.1.8/mode/js_regex_highlight_rules.js +94 -0
- data/vendor/assets/ace-1.1.8/mode/json.js +93 -0
- data/vendor/assets/ace-1.1.8/mode/json/json_parse.js +346 -0
- data/vendor/assets/ace-1.1.8/mode/json_highlight_rules.js +100 -0
- data/vendor/assets/ace-1.1.8/mode/json_worker.js +68 -0
- data/vendor/assets/ace-1.1.8/mode/json_worker_test.js +101 -0
- data/vendor/assets/ace-1.1.8/mode/jsoniq.js +203 -0
- data/vendor/assets/ace-1.1.8/mode/jsp.js +55 -0
- data/vendor/assets/ace-1.1.8/mode/jsp_highlight_rules.js +91 -0
- data/vendor/assets/ace-1.1.8/mode/jsx.js +56 -0
- data/vendor/assets/ace-1.1.8/mode/jsx_highlight_rules.js +120 -0
- data/vendor/assets/ace-1.1.8/mode/julia.js +62 -0
- data/vendor/assets/ace-1.1.8/mode/julia_highlight_rules.js +170 -0
- data/vendor/assets/ace-1.1.8/mode/latex.js +26 -0
- data/vendor/assets/ace-1.1.8/mode/latex_highlight_rules.js +73 -0
- data/vendor/assets/ace-1.1.8/mode/less.js +84 -0
- data/vendor/assets/ace-1.1.8/mode/less_highlight_rules.js +271 -0
- data/vendor/assets/ace-1.1.8/mode/liquid.js +82 -0
- data/vendor/assets/ace-1.1.8/mode/liquid_highlight_rules.js +131 -0
- data/vendor/assets/ace-1.1.8/mode/lisp.js +56 -0
- data/vendor/assets/ace-1.1.8/mode/lisp_highlight_rules.js +124 -0
- data/vendor/assets/ace-1.1.8/mode/livescript.js +249 -0
- data/vendor/assets/ace-1.1.8/mode/logiql.js +139 -0
- data/vendor/assets/ace-1.1.8/mode/logiql_highlight_rules.js +119 -0
- data/vendor/assets/ace-1.1.8/mode/logiql_test.js +98 -0
- data/vendor/assets/ace-1.1.8/mode/lsl.js +92 -0
- data/vendor/assets/ace-1.1.8/mode/lsl_highlight_rules.js +123 -0
- data/vendor/assets/ace-1.1.8/mode/lua.js +168 -0
- data/vendor/assets/ace-1.1.8/mode/lua/luaparse.js +1989 -0
- data/vendor/assets/ace-1.1.8/mode/lua_highlight_rules.js +193 -0
- data/vendor/assets/ace-1.1.8/mode/lua_worker.js +71 -0
- data/vendor/assets/ace-1.1.8/mode/luapage.js +24 -0
- data/vendor/assets/ace-1.1.8/mode/luapage_highlight_rules.js +49 -0
- data/vendor/assets/ace-1.1.8/mode/lucene.js +19 -0
- data/vendor/assets/ace-1.1.8/mode/lucene_highlight_rules.js +49 -0
- data/vendor/assets/ace-1.1.8/mode/makefile.js +58 -0
- data/vendor/assets/ace-1.1.8/mode/makefile_highlight_rules.js +75 -0
- data/vendor/assets/ace-1.1.8/mode/markdown.js +76 -0
- data/vendor/assets/ace-1.1.8/mode/markdown_highlight_rules.js +228 -0
- data/vendor/assets/ace-1.1.8/mode/matching_brace_outdent.js +69 -0
- data/vendor/assets/ace-1.1.8/mode/matching_parens_outdent.js +74 -0
- data/vendor/assets/ace-1.1.8/mode/matlab.js +55 -0
- data/vendor/assets/ace-1.1.8/mode/matlab_highlight_rules.js +262 -0
- data/vendor/assets/ace-1.1.8/mode/mel.js +56 -0
- data/vendor/assets/ace-1.1.8/mode/mel_highlight_rules.js +133 -0
- data/vendor/assets/ace-1.1.8/mode/mushcode.js +116 -0
- data/vendor/assets/ace-1.1.8/mode/mushcode_highlight_rules.js +569 -0
- data/vendor/assets/ace-1.1.8/mode/mysql.js +51 -0
- data/vendor/assets/ace-1.1.8/mode/mysql_highlight_rules.js +122 -0
- data/vendor/assets/ace-1.1.8/mode/nix.js +62 -0
- data/vendor/assets/ace-1.1.8/mode/nix_highlight_rules.js +119 -0
- data/vendor/assets/ace-1.1.8/mode/objectivec.js +61 -0
- data/vendor/assets/ace-1.1.8/mode/objectivec_highlight_rules.js +331 -0
- data/vendor/assets/ace-1.1.8/mode/ocaml.js +97 -0
- data/vendor/assets/ace-1.1.8/mode/ocaml_highlight_rules.js +337 -0
- data/vendor/assets/ace-1.1.8/mode/pascal.js +67 -0
- data/vendor/assets/ace-1.1.8/mode/pascal_highlight_rules.js +127 -0
- data/vendor/assets/ace-1.1.8/mode/perl.js +90 -0
- data/vendor/assets/ace-1.1.8/mode/perl_highlight_rules.js +165 -0
- data/vendor/assets/ace-1.1.8/mode/pgsql.js +59 -0
- data/vendor/assets/ace-1.1.8/mode/pgsql_highlight_rules.js +619 -0
- data/vendor/assets/ace-1.1.8/mode/php.js +158 -0
- data/vendor/assets/ace-1.1.8/mode/php/php.js +5031 -0
- data/vendor/assets/ace-1.1.8/mode/php_highlight_rules.js +1085 -0
- data/vendor/assets/ace-1.1.8/mode/php_test.js +65 -0
- data/vendor/assets/ace-1.1.8/mode/php_worker.js +81 -0
- data/vendor/assets/ace-1.1.8/mode/plain_text.js +55 -0
- data/vendor/assets/ace-1.1.8/mode/plain_text_test.js +56 -0
- data/vendor/assets/ace-1.1.8/mode/powershell.js +61 -0
- data/vendor/assets/ace-1.1.8/mode/powershell_highlight_rules.js +145 -0
- data/vendor/assets/ace-1.1.8/mode/praat.js +84 -0
- data/vendor/assets/ace-1.1.8/mode/praat_highlight_rules.js +262 -0
- data/vendor/assets/ace-1.1.8/mode/prolog.js +62 -0
- data/vendor/assets/ace-1.1.8/mode/prolog_highlight_rules.js +238 -0
- data/vendor/assets/ace-1.1.8/mode/properties.js +48 -0
- data/vendor/assets/ace-1.1.8/mode/properties_highlight_rules.js +86 -0
- data/vendor/assets/ace-1.1.8/mode/protobuf.js +63 -0
- data/vendor/assets/ace-1.1.8/mode/protobuf_highlight_rules.js +66 -0
- data/vendor/assets/ace-1.1.8/mode/python.js +113 -0
- data/vendor/assets/ace-1.1.8/mode/python_highlight_rules.js +191 -0
- data/vendor/assets/ace-1.1.8/mode/python_test.js +79 -0
- data/vendor/assets/ace-1.1.8/mode/r.js +154 -0
- data/vendor/assets/ace-1.1.8/mode/r_highlight_rules.js +208 -0
- data/vendor/assets/ace-1.1.8/mode/rdoc.js +61 -0
- data/vendor/assets/ace-1.1.8/mode/rdoc_highlight_rules.js +119 -0
- data/vendor/assets/ace-1.1.8/mode/rhtml.js +87 -0
- data/vendor/assets/ace-1.1.8/mode/rhtml_highlight_rules.js +66 -0
- data/vendor/assets/ace-1.1.8/mode/ruby.js +100 -0
- data/vendor/assets/ace-1.1.8/mode/ruby_highlight_rules.js +323 -0
- data/vendor/assets/ace-1.1.8/mode/ruby_test.js +77 -0
- data/vendor/assets/ace-1.1.8/mode/rust.js +58 -0
- data/vendor/assets/ace-1.1.8/mode/rust_highlight_rules.js +158 -0
- data/vendor/assets/ace-1.1.8/mode/sass.js +52 -0
- data/vendor/assets/ace-1.1.8/mode/sass_highlight_rules.js +79 -0
- data/vendor/assets/ace-1.1.8/mode/scad.js +99 -0
- data/vendor/assets/ace-1.1.8/mode/scad_highlight_rules.js +142 -0
- data/vendor/assets/ace-1.1.8/mode/scala.js +25 -0
- data/vendor/assets/ace-1.1.8/mode/scala_highlight_rules.js +160 -0
- data/vendor/assets/ace-1.1.8/mode/scheme.js +56 -0
- data/vendor/assets/ace-1.1.8/mode/scheme_highlight_rules.js +123 -0
- data/vendor/assets/ace-1.1.8/mode/scss.js +84 -0
- data/vendor/assets/ace-1.1.8/mode/scss_highlight_rules.js +296 -0
- data/vendor/assets/ace-1.1.8/mode/sh.js +116 -0
- data/vendor/assets/ace-1.1.8/mode/sh_highlight_rules.js +203 -0
- data/vendor/assets/ace-1.1.8/mode/sjs.js +56 -0
- data/vendor/assets/ace-1.1.8/mode/sjs_highlight_rules.js +233 -0
- data/vendor/assets/ace-1.1.8/mode/smarty.js +51 -0
- data/vendor/assets/ace-1.1.8/mode/smarty_highlight_rules.js +139 -0
- data/vendor/assets/ace-1.1.8/mode/snippets.js +113 -0
- data/vendor/assets/ace-1.1.8/mode/soy_template.js +60 -0
- data/vendor/assets/ace-1.1.8/mode/soy_template_highlight_rules.js +356 -0
- data/vendor/assets/ace-1.1.8/mode/space.js +21 -0
- data/vendor/assets/ace-1.1.8/mode/space_highlight_rules.js +56 -0
- data/vendor/assets/ace-1.1.8/mode/sql.js +53 -0
- data/vendor/assets/ace-1.1.8/mode/sql_highlight_rules.js +99 -0
- data/vendor/assets/ace-1.1.8/mode/stylus.js +62 -0
- data/vendor/assets/ace-1.1.8/mode/stylus_highlight_rules.js +165 -0
- data/vendor/assets/ace-1.1.8/mode/svg.js +69 -0
- data/vendor/assets/ace-1.1.8/mode/svg_highlight_rules.js +49 -0
- data/vendor/assets/ace-1.1.8/mode/tcl.js +84 -0
- data/vendor/assets/ace-1.1.8/mode/tcl_highlight_rules.js +172 -0
- data/vendor/assets/ace-1.1.8/mode/tex.js +68 -0
- data/vendor/assets/ace-1.1.8/mode/tex_highlight_rules.js +127 -0
- data/vendor/assets/ace-1.1.8/mode/text.js +386 -0
- data/vendor/assets/ace-1.1.8/mode/text_highlight_rules.js +234 -0
- data/vendor/assets/ace-1.1.8/mode/text_test.js +64 -0
- data/vendor/assets/ace-1.1.8/mode/textile.js +67 -0
- data/vendor/assets/ace-1.1.8/mode/textile_highlight_rules.js +93 -0
- data/vendor/assets/ace-1.1.8/mode/toml.js +56 -0
- data/vendor/assets/ace-1.1.8/mode/toml_highlight_rules.js +103 -0
- data/vendor/assets/ace-1.1.8/mode/twig.js +81 -0
- data/vendor/assets/ace-1.1.8/mode/twig_highlight_rules.js +166 -0
- data/vendor/assets/ace-1.1.8/mode/typescript.js +62 -0
- data/vendor/assets/ace-1.1.8/mode/typescript_highlight_rules.js +98 -0
- data/vendor/assets/ace-1.1.8/mode/vala.js +105 -0
- data/vendor/assets/ace-1.1.8/mode/vala_highlight_rules.js +457 -0
- data/vendor/assets/ace-1.1.8/mode/vbscript.js +60 -0
- data/vendor/assets/ace-1.1.8/mode/vbscript_highlight_rules.js +246 -0
- data/vendor/assets/ace-1.1.8/mode/velocity.js +58 -0
- data/vendor/assets/ace-1.1.8/mode/velocity_highlight_rules.js +177 -0
- data/vendor/assets/ace-1.1.8/mode/verilog.js +54 -0
- data/vendor/assets/ace-1.1.8/mode/verilog_highlight_rules.js +101 -0
- data/vendor/assets/ace-1.1.8/mode/vhdl.js +52 -0
- data/vendor/assets/ace-1.1.8/mode/vhdl_highlight_rules.js +115 -0
- data/vendor/assets/ace-1.1.8/mode/xml.js +59 -0
- data/vendor/assets/ace-1.1.8/mode/xml_highlight_rules.js +242 -0
- data/vendor/assets/ace-1.1.8/mode/xml_test.js +75 -0
- data/vendor/assets/ace-1.1.8/mode/xquery.js +216 -0
- data/vendor/assets/ace-1.1.8/mode/xquery/Readme.md +1 -0
- data/vendor/assets/ace-1.1.8/mode/xquery/jsoniq_lexer.js +4453 -0
- data/vendor/assets/ace-1.1.8/mode/xquery/modules.js +4 -0
- data/vendor/assets/ace-1.1.8/mode/xquery/xqlint.js +78912 -0
- data/vendor/assets/ace-1.1.8/mode/xquery/xquery_lexer.js +4422 -0
- data/vendor/assets/ace-1.1.8/mode/xquery_worker.js +115 -0
- data/vendor/assets/ace-1.1.8/mode/yaml.js +78 -0
- data/vendor/assets/ace-1.1.8/mode/yaml_highlight_rules.js +113 -0
- data/vendor/assets/ace-1.1.8/model/editor.js +62 -0
- data/vendor/assets/ace-1.1.8/mouse/default_gutter_handler.js +181 -0
- data/vendor/assets/ace-1.1.8/mouse/default_handlers.js +278 -0
- data/vendor/assets/ace-1.1.8/mouse/dragdrop_handler.js +428 -0
- data/vendor/assets/ace-1.1.8/mouse/fold_handler.js +93 -0
- data/vendor/assets/ace-1.1.8/mouse/mouse_event.js +129 -0
- data/vendor/assets/ace-1.1.8/mouse/mouse_handler.js +203 -0
- data/vendor/assets/ace-1.1.8/mouse/mouse_handler_test.js +77 -0
- data/vendor/assets/ace-1.1.8/mouse/multi_select_handler.js +208 -0
- data/vendor/assets/ace-1.1.8/multi_select.js +996 -0
- data/vendor/assets/ace-1.1.8/multi_select_test.js +199 -0
- data/vendor/assets/ace-1.1.8/occur.js +193 -0
- data/vendor/assets/ace-1.1.8/occur_test.js +154 -0
- data/vendor/assets/ace-1.1.8/placeholder.js +274 -0
- data/vendor/assets/ace-1.1.8/placeholder_test.js +156 -0
- data/vendor/assets/ace-1.1.8/range.js +549 -0
- data/vendor/assets/ace-1.1.8/range_list.js +240 -0
- data/vendor/assets/ace-1.1.8/range_list_test.js +182 -0
- data/vendor/assets/ace-1.1.8/range_test.js +191 -0
- data/vendor/assets/ace-1.1.8/renderloop.js +75 -0
- data/vendor/assets/ace-1.1.8/requirejs/text.js +52 -0
- data/vendor/assets/ace-1.1.8/requirejs/text_build.js +60 -0
- data/vendor/assets/ace-1.1.8/scrollbar.js +270 -0
- data/vendor/assets/ace-1.1.8/search.js +396 -0
- data/vendor/assets/ace-1.1.8/search_highlight.js +82 -0
- data/vendor/assets/ace-1.1.8/search_test.js +461 -0
- data/vendor/assets/ace-1.1.8/selection.js +955 -0
- data/vendor/assets/ace-1.1.8/selection_test.js +480 -0
- data/vendor/assets/ace-1.1.8/snippets.js +949 -0
- data/vendor/assets/ace-1.1.8/snippets/_.snippets +240 -0
- data/vendor/assets/ace-1.1.8/snippets/_all_modes.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/_all_modes.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/abap.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/abap.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/actionscript.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/actionscript.snippets +157 -0
- data/vendor/assets/ace-1.1.8/snippets/ada.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/ada.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/all_modes.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/all_modes.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/apache.snippets +35 -0
- data/vendor/assets/ace-1.1.8/snippets/apache_conf.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/apache_conf.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/applescript.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/applescript.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/asciidoc.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/asciidoc.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/assembly_x86.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/assembly_x86.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/autohotkey.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/autohotkey.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/autoit.snippets +66 -0
- data/vendor/assets/ace-1.1.8/snippets/batchfile.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/batchfile.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/c.snippets +235 -0
- data/vendor/assets/ace-1.1.8/snippets/c9search.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/c9search.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/c_cpp.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/c_cpp.snippets +131 -0
- data/vendor/assets/ace-1.1.8/snippets/chef.snippets +204 -0
- data/vendor/assets/ace-1.1.8/snippets/cirru.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/cirru.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/clojure.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/clojure.snippets +90 -0
- data/vendor/assets/ace-1.1.8/snippets/cmake.snippets +58 -0
- data/vendor/assets/ace-1.1.8/snippets/cobol.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/cobol.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/coffee.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/coffee.snippets +95 -0
- data/vendor/assets/ace-1.1.8/snippets/coldfusion.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/coldfusion.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/cs.snippets +374 -0
- data/vendor/assets/ace-1.1.8/snippets/csharp.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/csharp.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/css.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/css.snippets +967 -0
- data/vendor/assets/ace-1.1.8/snippets/curly.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/curly.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/d.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/d.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/dart.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/dart.snippets +83 -0
- data/vendor/assets/ace-1.1.8/snippets/diff.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/diff.snippets +11 -0
- data/vendor/assets/ace-1.1.8/snippets/django.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/django.snippets +108 -0
- data/vendor/assets/ace-1.1.8/snippets/dockerfile.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/dockerfile.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/dot.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/dot.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/dummy.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/dummy_syntax.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/eiffel.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/eiffel.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/ejs.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/ejs.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/elixir.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/elixir.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/elm.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/elm.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/erlang.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/erlang.snippets +160 -0
- data/vendor/assets/ace-1.1.8/snippets/eruby.snippets +113 -0
- data/vendor/assets/ace-1.1.8/snippets/falcon.snippets +71 -0
- data/vendor/assets/ace-1.1.8/snippets/forth.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/forth.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/ftl.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/ftl.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/gcode.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/gcode.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/gherkin.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/gherkin.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/gitignore.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/gitignore.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/glsl.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/glsl.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/go.snippets +201 -0
- data/vendor/assets/ace-1.1.8/snippets/golang.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/golang.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/groovy.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/groovy.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/haml.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/haml.snippets +20 -0
- data/vendor/assets/ace-1.1.8/snippets/handlebars.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/handlebars.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/haskell.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/haskell.snippets +82 -0
- data/vendor/assets/ace-1.1.8/snippets/haxe.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/haxe.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/html.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/html.snippets +828 -0
- data/vendor/assets/ace-1.1.8/snippets/html_ruby.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/html_ruby.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/htmldjango.snippets +136 -0
- data/vendor/assets/ace-1.1.8/snippets/htmltornado.snippets +55 -0
- data/vendor/assets/ace-1.1.8/snippets/ini.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/ini.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/io.js +69 -0
- data/vendor/assets/ace-1.1.8/snippets/io.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/jack.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/jack.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/jade.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/jade.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/java.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/java.snippets +240 -0
- data/vendor/assets/ace-1.1.8/snippets/javascript-jquery.snippets +589 -0
- data/vendor/assets/ace-1.1.8/snippets/javascript.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/javascript.snippets +195 -0
- data/vendor/assets/ace-1.1.8/snippets/json.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/json.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/jsoniq.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/jsoniq.snippets +61 -0
- data/vendor/assets/ace-1.1.8/snippets/jsp.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/jsp.snippets +99 -0
- data/vendor/assets/ace-1.1.8/snippets/jsx.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/jsx.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/julia.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/julia.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/latex.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/latex.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/ledger.snippets +5 -0
- data/vendor/assets/ace-1.1.8/snippets/less.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/less.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/liquid.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/liquid.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/lisp.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/lisp.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/livescript.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/livescript.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/logiql.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/logiql.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/lsl.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/lsl.snippets +1066 -0
- data/vendor/assets/ace-1.1.8/snippets/lua.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/lua.snippets +21 -0
- data/vendor/assets/ace-1.1.8/snippets/luapage.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/luapage.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/lucene.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/lucene.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/makefile.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/makefile.snippets +4 -0
- data/vendor/assets/ace-1.1.8/snippets/mako.snippets +54 -0
- data/vendor/assets/ace-1.1.8/snippets/markdown.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/markdown.snippets +88 -0
- data/vendor/assets/ace-1.1.8/snippets/matlab.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/matlab.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/mel.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/mel.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/mushcode.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/mushcode.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/mushcode_high_rules.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/mushcode_high_rules.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/mysql.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/mysql.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/nix.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/nix.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/objc.snippets +247 -0
- data/vendor/assets/ace-1.1.8/snippets/objectivec.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/objectivec.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/ocaml.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/ocaml.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/pascal.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/pascal.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/perl.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/perl.snippets +347 -0
- data/vendor/assets/ace-1.1.8/snippets/pgsql.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/pgsql.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/php.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/php.snippets +377 -0
- data/vendor/assets/ace-1.1.8/snippets/plain_text.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/plain_text.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/powershell.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/powershell.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/praat.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/praat.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/prolog.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/prolog.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/properties.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/properties.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/protobuf.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/protobuf.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/python.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/python.snippets +158 -0
- data/vendor/assets/ace-1.1.8/snippets/r.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/r.snippets +121 -0
- data/vendor/assets/ace-1.1.8/snippets/rdoc.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/rdoc.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/rhtml.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/rhtml.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/rst.snippets +22 -0
- data/vendor/assets/ace-1.1.8/snippets/ruby.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/ruby.snippets +928 -0
- data/vendor/assets/ace-1.1.8/snippets/rust.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/rust.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/sass.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/sass.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/scad.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/scad.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/scala.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/scala.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/scheme.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/scheme.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/scss.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/scss.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/sh.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/sh.snippets +83 -0
- data/vendor/assets/ace-1.1.8/snippets/sjs.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/sjs.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/smarty.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/smarty.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/snippets.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/snippets.snippets +9 -0
- data/vendor/assets/ace-1.1.8/snippets/soy_template.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/soy_template.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/space.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/space.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/sql.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/sql.snippets +26 -0
- data/vendor/assets/ace-1.1.8/snippets/stylus.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/stylus.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/svg.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/svg.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/tcl.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/tcl.snippets +92 -0
- data/vendor/assets/ace-1.1.8/snippets/tex.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/tex.snippets +191 -0
- data/vendor/assets/ace-1.1.8/snippets/text.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/text.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/textile.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/textile.snippets +30 -0
- data/vendor/assets/ace-1.1.8/snippets/tmsnippet.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/toml.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/toml.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/twig.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/twig.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/typescript.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/typescript.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/vala.js +195 -0
- data/vendor/assets/ace-1.1.8/snippets/vala.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/vbscript.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/vbscript.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/velocity.js +8 -0
- data/vendor/assets/ace-1.1.8/snippets/velocity.snippets +28 -0
- data/vendor/assets/ace-1.1.8/snippets/verilog.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/verilog.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/vhdl.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/vhdl.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/xml.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/xml.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets/xquery.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/xquery.snippets +61 -0
- data/vendor/assets/ace-1.1.8/snippets/xslt.snippets +97 -0
- data/vendor/assets/ace-1.1.8/snippets/yaml.js +7 -0
- data/vendor/assets/ace-1.1.8/snippets/yaml.snippets +0 -0
- data/vendor/assets/ace-1.1.8/snippets_test.js +131 -0
- data/vendor/assets/ace-1.1.8/split.js +373 -0
- data/vendor/assets/ace-1.1.8/test/all.js +35 -0
- data/vendor/assets/ace-1.1.8/test/all_browser.js +141 -0
- data/vendor/assets/ace-1.1.8/test/assertions.js +56 -0
- data/vendor/assets/ace-1.1.8/test/asyncjs/assert.js +313 -0
- data/vendor/assets/ace-1.1.8/test/asyncjs/async.js +529 -0
- data/vendor/assets/ace-1.1.8/test/asyncjs/index.js +13 -0
- data/vendor/assets/ace-1.1.8/test/asyncjs/test.js +195 -0
- data/vendor/assets/ace-1.1.8/test/asyncjs/utils.js +65 -0
- data/vendor/assets/ace-1.1.8/test/benchmark.js +78 -0
- data/vendor/assets/ace-1.1.8/test/mockdom.js +10 -0
- data/vendor/assets/ace-1.1.8/test/mockrenderer.js +208 -0
- data/vendor/assets/ace-1.1.8/test/tests.html +46 -0
- data/vendor/assets/ace-1.1.8/theme/ambiance.css +221 -0
- data/vendor/assets/ace-1.1.8/theme/ambiance.js +33 -0
- data/vendor/assets/ace-1.1.8/theme/chaos.css +154 -0
- data/vendor/assets/ace-1.1.8/theme/chaos.js +33 -0
- data/vendor/assets/ace-1.1.8/theme/chrome.css +154 -0
- data/vendor/assets/ace-1.1.8/theme/chrome.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/clouds.css +112 -0
- data/vendor/assets/ace-1.1.8/theme/clouds.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/clouds_midnight.css +113 -0
- data/vendor/assets/ace-1.1.8/theme/clouds_midnight.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/cobalt.css +134 -0
- data/vendor/assets/ace-1.1.8/theme/cobalt.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/crimson_editor.css +143 -0
- data/vendor/assets/ace-1.1.8/theme/crimson_editor.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/dawn.css +127 -0
- data/vendor/assets/ace-1.1.8/theme/dawn.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/dreamweaver.css +176 -0
- data/vendor/assets/ace-1.1.8/theme/dreamweaver.js +38 -0
- data/vendor/assets/ace-1.1.8/theme/eclipse.css +113 -0
- data/vendor/assets/ace-1.1.8/theme/eclipse.js +41 -0
- data/vendor/assets/ace-1.1.8/theme/github.css +119 -0
- data/vendor/assets/ace-1.1.8/theme/github.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/idle_fingers.css +113 -0
- data/vendor/assets/ace-1.1.8/theme/idle_fingers.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/katzenmilch.css +140 -0
- data/vendor/assets/ace-1.1.8/theme/katzenmilch.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/kr_theme.css +124 -0
- data/vendor/assets/ace-1.1.8/theme/kr_theme.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/kuroir.css +67 -0
- data/vendor/assets/ace-1.1.8/theme/kuroir.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/merbivore.css +110 -0
- data/vendor/assets/ace-1.1.8/theme/merbivore.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/merbivore_soft.css +111 -0
- data/vendor/assets/ace-1.1.8/theme/merbivore_soft.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/mono_industrial.css +126 -0
- data/vendor/assets/ace-1.1.8/theme/mono_industrial.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/monokai.css +122 -0
- data/vendor/assets/ace-1.1.8/theme/monokai.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/pastel_on_dark.css +129 -0
- data/vendor/assets/ace-1.1.8/theme/pastel_on_dark.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/solarized_dark.css +101 -0
- data/vendor/assets/ace-1.1.8/theme/solarized_dark.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/solarized_light.css +106 -0
- data/vendor/assets/ace-1.1.8/theme/solarized_light.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/terminal.css +132 -0
- data/vendor/assets/ace-1.1.8/theme/terminal.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/textmate.css +155 -0
- data/vendor/assets/ace-1.1.8/theme/textmate.js +40 -0
- data/vendor/assets/ace-1.1.8/theme/tomorrow.css +125 -0
- data/vendor/assets/ace-1.1.8/theme/tomorrow.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/tomorrow_night.css +125 -0
- data/vendor/assets/ace-1.1.8/theme/tomorrow_night.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/tomorrow_night_blue.css +122 -0
- data/vendor/assets/ace-1.1.8/theme/tomorrow_night_blue.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/tomorrow_night_bright.css +141 -0
- data/vendor/assets/ace-1.1.8/theme/tomorrow_night_bright.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/tomorrow_night_eighties.css +125 -0
- data/vendor/assets/ace-1.1.8/theme/tomorrow_night_eighties.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/twilight.css +128 -0
- data/vendor/assets/ace-1.1.8/theme/twilight.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/vibrant_ink.css +110 -0
- data/vendor/assets/ace-1.1.8/theme/vibrant_ink.js +39 -0
- data/vendor/assets/ace-1.1.8/theme/xcode.css +103 -0
- data/vendor/assets/ace-1.1.8/theme/xcode.js +39 -0
- data/vendor/assets/ace-1.1.8/token_iterator.js +150 -0
- data/vendor/assets/ace-1.1.8/token_iterator_test.js +212 -0
- data/vendor/assets/ace-1.1.8/tokenizer.js +366 -0
- data/vendor/assets/ace-1.1.8/tokenizer_dev.js +183 -0
- data/vendor/assets/ace-1.1.8/tokenizer_test.js +97 -0
- data/vendor/assets/ace-1.1.8/tooltip.js +138 -0
- data/vendor/assets/ace-1.1.8/undomanager.js +168 -0
- data/vendor/assets/ace-1.1.8/unicode.js +107 -0
- data/vendor/assets/ace-1.1.8/virtual_renderer.js +1759 -0
- data/vendor/assets/ace-1.1.8/virtual_renderer_test.js +86 -0
- data/vendor/assets/ace-1.1.8/worker/mirror.js +49 -0
- data/vendor/assets/ace-1.1.8/worker/worker.js +193 -0
- data/vendor/assets/ace-1.1.8/worker/worker_client.js +255 -0
- data/vendor/assets/ace-1.1.8/worker/worker_test.js +125 -0
- data/vendor/assets/ckeditor-4.4.7/CHANGES.md +720 -0
- data/vendor/assets/ckeditor-4.4.7/LICENSE.md +1264 -0
- data/vendor/assets/ckeditor-4.4.7/README.md +39 -0
- data/vendor/assets/ckeditor-4.4.7/adapters/jquery.js +10 -0
- data/vendor/assets/ckeditor-4.4.7/build-config.js +83 -0
- data/vendor/assets/ckeditor-4.4.7/ckeditor.js +829 -0
- data/vendor/assets/ckeditor-4.4.7/config.js +34 -0
- data/vendor/assets/ckeditor-4.4.7/contents.css +134 -0
- data/vendor/assets/ckeditor-4.4.7/lang/en.js +5 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/clipboard/dialogs/paste.js +11 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/dialog/dialogDefinition.js +4 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/icons.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/icons_hidpi.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/image/dialogs/image.js +43 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/image/images/noimage.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/link/dialogs/anchor.js +7 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/link/dialogs/link.js +26 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/link/images/anchor.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/link/images/hidpi/anchor.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/magicline/images/hidpi/icon.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/magicline/images/icon-rtl.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/magicline/images/icon.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/pastefromword/filter/default.js +31 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_address.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_blockquote.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_div.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_h1.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_h2.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_h3.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_h4.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_h5.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_h6.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_p.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/showblocks/images/block_pre.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/af.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/ar.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/bg.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/ca.js +14 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/cs.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/cy.js +14 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/da.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/de.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/el.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/en-gb.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/en.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/eo.js +12 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/es.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/et.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/fa.js +12 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/fi.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/fr.js +11 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/gl.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/he.js +12 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/hr.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/hu.js +12 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/id.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/it.js +14 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/ja.js +9 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/km.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/ku.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/lt.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/lv.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/nb.js +11 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/nl.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/no.js +11 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/pl.js +12 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/pt.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/ru.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/si.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/sk.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/sl.js +12 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/sq.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/sv.js +11 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/th.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/tr.js +12 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/tt.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/ug.js +13 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/uk.js +12 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/vi.js +14 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/lang/zh.js +12 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/specialchar/dialogs/specialchar.js +14 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/table/dialogs/table.js +21 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/templates/dialogs/templates.css +84 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/templates/dialogs/templates.js +10 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/templates/templates/default.js +6 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/templates/templates/images/template1.gif +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/templates/templates/images/template2.gif +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/templates/templates/images/template3.gif +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/uploadcare/README.md +64 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/uploadcare/icons/hidpi/uploadcare.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/plugins/uploadcare/icons/uploadcare.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/samples/ajax.html +82 -0
- data/vendor/assets/ckeditor-4.4.7/samples/api.html +207 -0
- data/vendor/assets/ckeditor-4.4.7/samples/appendto.html +56 -0
- data/vendor/assets/ckeditor-4.4.7/samples/assets/inlineall/logo.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/samples/assets/outputxhtml/outputxhtml.css +204 -0
- data/vendor/assets/ckeditor-4.4.7/samples/assets/posteddata.php +59 -0
- data/vendor/assets/ckeditor-4.4.7/samples/assets/sample.jpg +0 -0
- data/vendor/assets/ckeditor-4.4.7/samples/assets/uilanguages/languages.js +7 -0
- data/vendor/assets/ckeditor-4.4.7/samples/datafiltering.html +401 -0
- data/vendor/assets/ckeditor-4.4.7/samples/divreplace.html +141 -0
- data/vendor/assets/ckeditor-4.4.7/samples/index.html +119 -0
- data/vendor/assets/ckeditor-4.4.7/samples/inlineall.html +311 -0
- data/vendor/assets/ckeditor-4.4.7/samples/inlinebycode.html +121 -0
- data/vendor/assets/ckeditor-4.4.7/samples/inlinetextarea.html +110 -0
- data/vendor/assets/ckeditor-4.4.7/samples/jquery.html +100 -0
- data/vendor/assets/ckeditor-4.4.7/samples/plugins/dialog/assets/my_dialog.js +48 -0
- data/vendor/assets/ckeditor-4.4.7/samples/plugins/dialog/dialog.html +187 -0
- data/vendor/assets/ckeditor-4.4.7/samples/plugins/enterkey/enterkey.html +103 -0
- data/vendor/assets/ckeditor-4.4.7/samples/plugins/magicline/magicline.html +206 -0
- data/vendor/assets/ckeditor-4.4.7/samples/plugins/toolbar/toolbar.html +232 -0
- data/vendor/assets/ckeditor-4.4.7/samples/readonly.html +73 -0
- data/vendor/assets/ckeditor-4.4.7/samples/replacebyclass.html +57 -0
- data/vendor/assets/ckeditor-4.4.7/samples/replacebycode.html +56 -0
- data/vendor/assets/ckeditor-4.4.7/samples/sample.css +365 -0
- data/vendor/assets/ckeditor-4.4.7/samples/sample.js +50 -0
- data/vendor/assets/ckeditor-4.4.7/samples/sample_posteddata.php +16 -0
- data/vendor/assets/ckeditor-4.4.7/samples/tabindex.html +75 -0
- data/vendor/assets/ckeditor-4.4.7/samples/uicolor.html +69 -0
- data/vendor/assets/ckeditor-4.4.7/samples/uilanguages.html +119 -0
- data/vendor/assets/ckeditor-4.4.7/samples/xhtmlstyle.html +231 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/dialog.css +5 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/dialog_ie.css +5 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/dialog_ie7.css +5 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/dialog_ie8.css +5 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/dialog_iequirks.css +5 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/editor.css +5 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/editor_gecko.css +5 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/editor_ie.css +5 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/editor_ie7.css +5 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/editor_ie8.css +5 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/editor_iequirks.css +5 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/icons.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/icons_hidpi.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/images/arrow.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/images/close.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/images/hidpi/close.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/images/hidpi/lock-open.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/images/hidpi/lock.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/images/hidpi/refresh.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/images/lock-open.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/images/lock.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/images/refresh.png +0 -0
- data/vendor/assets/ckeditor-4.4.7/skins/flat/readme.md +8 -0
- data/vendor/assets/ckeditor-4.4.7/styles.js +111 -0
- data/vendor/assets/javascripts/backbone.js +1608 -0
- data/vendor/assets/javascripts/backbone.memento.js +159 -0
- data/vendor/assets/javascripts/jquery-ui.js +14987 -0
- data/vendor/assets/javascripts/jquery.js +10346 -0
- data/vendor/assets/javascripts/jquery.noty.js +1436 -0
- data/vendor/assets/javascripts/require.js +36 -0
- data/vendor/assets/javascripts/text.js +391 -0
- data/vendor/assets/javascripts/underscore.js +1536 -0
- metadata +1287 -0
@@ -0,0 +1,36 @@
|
|
1
|
+
/*
|
2
|
+
RequireJS 2.1.16 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved.
|
3
|
+
Available via the MIT or new BSD license.
|
4
|
+
see: http://github.com/jrburke/requirejs for details
|
5
|
+
*/
|
6
|
+
var requirejs,require,define;
|
7
|
+
(function(ba){function G(b){return"[object Function]"===K.call(b)}function H(b){return"[object Array]"===K.call(b)}function v(b,c){if(b){var d;for(d=0;d<b.length&&(!b[d]||!c(b[d],d,b));d+=1);}}function T(b,c){if(b){var d;for(d=b.length-1;-1<d&&(!b[d]||!c(b[d],d,b));d-=1);}}function t(b,c){return fa.call(b,c)}function m(b,c){return t(b,c)&&b[c]}function B(b,c){for(var d in b)if(t(b,d)&&c(b[d],d))break}function U(b,c,d,e){c&&B(c,function(c,g){if(d||!t(b,g))e&&"object"===typeof c&&c&&!H(c)&&!G(c)&&!(c instanceof
|
8
|
+
RegExp)?(b[g]||(b[g]={}),U(b[g],c,d,e)):b[g]=c});return b}function u(b,c){return function(){return c.apply(b,arguments)}}function ca(b){throw b;}function da(b){if(!b)return b;var c=ba;v(b.split("."),function(b){c=c[b]});return c}function C(b,c,d,e){c=Error(c+"\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=e;d&&(c.originalError=d);return c}function ga(b){function c(a,k,b){var f,l,c,d,e,g,i,p,k=k&&k.split("/"),h=j.map,n=h&&h["*"];if(a){a=a.split("/");l=a.length-1;j.nodeIdCompat&&
|
9
|
+
Q.test(a[l])&&(a[l]=a[l].replace(Q,""));"."===a[0].charAt(0)&&k&&(l=k.slice(0,k.length-1),a=l.concat(a));l=a;for(c=0;c<l.length;c++)if(d=l[c],"."===d)l.splice(c,1),c-=1;else if(".."===d&&!(0===c||1==c&&".."===l[2]||".."===l[c-1])&&0<c)l.splice(c-1,2),c-=2;a=a.join("/")}if(b&&h&&(k||n)){l=a.split("/");c=l.length;a:for(;0<c;c-=1){e=l.slice(0,c).join("/");if(k)for(d=k.length;0<d;d-=1)if(b=m(h,k.slice(0,d).join("/")))if(b=m(b,e)){f=b;g=c;break a}!i&&(n&&m(n,e))&&(i=m(n,e),p=c)}!f&&i&&(f=i,g=p);f&&(l.splice(0,
|
10
|
+
g,f),a=l.join("/"))}return(f=m(j.pkgs,a))?f:a}function d(a){z&&v(document.getElementsByTagName("script"),function(k){if(k.getAttribute("data-requiremodule")===a&&k.getAttribute("data-requirecontext")===i.contextName)return k.parentNode.removeChild(k),!0})}function e(a){var k=m(j.paths,a);if(k&&H(k)&&1<k.length)return k.shift(),i.require.undef(a),i.makeRequire(null,{skipMap:!0})([a]),!0}function n(a){var k,c=a?a.indexOf("!"):-1;-1<c&&(k=a.substring(0,c),a=a.substring(c+1,a.length));return[k,a]}function p(a,
|
11
|
+
k,b,f){var l,d,e=null,g=k?k.name:null,j=a,p=!0,h="";a||(p=!1,a="_@r"+(K+=1));a=n(a);e=a[0];a=a[1];e&&(e=c(e,g,f),d=m(r,e));a&&(e?h=d&&d.normalize?d.normalize(a,function(a){return c(a,g,f)}):-1===a.indexOf("!")?c(a,g,f):a:(h=c(a,g,f),a=n(h),e=a[0],h=a[1],b=!0,l=i.nameToUrl(h)));b=e&&!d&&!b?"_unnormalized"+(O+=1):"";return{prefix:e,name:h,parentMap:k,unnormalized:!!b,url:l,originalName:j,isDefine:p,id:(e?e+"!"+h:h)+b}}function s(a){var k=a.id,b=m(h,k);b||(b=h[k]=new i.Module(a));return b}function q(a,
|
12
|
+
k,b){var f=a.id,c=m(h,f);if(t(r,f)&&(!c||c.defineEmitComplete))"defined"===k&&b(r[f]);else if(c=s(a),c.error&&"error"===k)b(c.error);else c.on(k,b)}function w(a,b){var c=a.requireModules,f=!1;if(b)b(a);else if(v(c,function(b){if(b=m(h,b))b.error=a,b.events.error&&(f=!0,b.emit("error",a))}),!f)g.onError(a)}function x(){R.length&&(ha.apply(A,[A.length,0].concat(R)),R=[])}function y(a){delete h[a];delete V[a]}function F(a,b,c){var f=a.map.id;a.error?a.emit("error",a.error):(b[f]=!0,v(a.depMaps,function(f,
|
13
|
+
d){var e=f.id,g=m(h,e);g&&(!a.depMatched[d]&&!c[e])&&(m(b,e)?(a.defineDep(d,r[e]),a.check()):F(g,b,c))}),c[f]=!0)}function D(){var a,b,c=(a=1E3*j.waitSeconds)&&i.startTime+a<(new Date).getTime(),f=[],l=[],g=!1,h=!0;if(!W){W=!0;B(V,function(a){var i=a.map,j=i.id;if(a.enabled&&(i.isDefine||l.push(a),!a.error))if(!a.inited&&c)e(j)?g=b=!0:(f.push(j),d(j));else if(!a.inited&&(a.fetched&&i.isDefine)&&(g=!0,!i.prefix))return h=!1});if(c&&f.length)return a=C("timeout","Load timeout for modules: "+f,null,
|
14
|
+
f),a.contextName=i.contextName,w(a);h&&v(l,function(a){F(a,{},{})});if((!c||b)&&g)if((z||ea)&&!X)X=setTimeout(function(){X=0;D()},50);W=!1}}function E(a){t(r,a[0])||s(p(a[0],null,!0)).init(a[1],a[2])}function I(a){var a=a.currentTarget||a.srcElement,b=i.onScriptLoad;a.detachEvent&&!Y?a.detachEvent("onreadystatechange",b):a.removeEventListener("load",b,!1);b=i.onScriptError;(!a.detachEvent||Y)&&a.removeEventListener("error",b,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}}function J(){var a;
|
15
|
+
for(x();A.length;){a=A.shift();if(null===a[0])return w(C("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));E(a)}}var W,Z,i,L,X,j={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},h={},V={},$={},A=[],r={},S={},aa={},K=1,O=1;L={require:function(a){return a.require?a.require:a.require=i.makeRequire(a.map)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports?r[a.map.id]=a.exports:a.exports=r[a.map.id]={}},module:function(a){return a.module?
|
16
|
+
a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){return m(j.config,a.map.id)||{}},exports:a.exports||(a.exports={})}}};Z=function(a){this.events=m($,a.id)||{};this.map=a;this.shim=m(j.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};Z.prototype={init:function(a,b,c,f){f=f||{};if(!this.inited){this.factory=b;if(c)this.on("error",c);else this.events.error&&(c=u(this,function(a){this.emit("error",a)}));this.depMaps=a&&a.slice(0);this.errback=
|
17
|
+
c;this.inited=!0;this.ignore=f.ignore;f.enabled||this.enabled?this.enable():this.check()}},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=b)},fetch:function(){if(!this.fetched){this.fetched=!0;i.startTime=(new Date).getTime();var a=this.map;if(this.shim)i.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],u(this,function(){return a.prefix?this.callPlugin():this.load()}));else return a.prefix?this.callPlugin():this.load()}},load:function(){var a=
|
18
|
+
this.map.url;S[a]||(S[a]=!0,i.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id;b=this.depExports;var f=this.exports,l=this.factory;if(this.inited)if(this.error)this.emit("error",this.error);else{if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(G(l)){if(this.events.error&&this.map.isDefine||g.onError!==ca)try{f=i.execCb(c,l,b,f)}catch(d){a=d}else f=i.execCb(c,l,b,f);this.map.isDefine&&void 0===f&&((b=this.module)?f=b.exports:this.usingExports&&
|
19
|
+
(f=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",w(this.error=a)}else f=l;this.exports=f;if(this.map.isDefine&&!this.ignore&&(r[c]=f,g.onResourceLoad))g.onResourceLoad(i,this.map,this.depMaps);y(c);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a=
|
20
|
+
this.map,b=a.id,d=p(a.prefix);this.depMaps.push(d);q(d,"defined",u(this,function(f){var l,d;d=m(aa,this.map.id);var e=this.map.name,P=this.map.parentMap?this.map.parentMap.name:null,n=i.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(f.normalize&&(e=f.normalize(e,function(a){return c(a,P,!0)})||""),f=p(a.prefix+"!"+e,this.map.parentMap),q(f,"defined",u(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),d=m(h,f.id)){this.depMaps.push(f);
|
21
|
+
if(this.events.error)d.on("error",u(this,function(a){this.emit("error",a)}));d.enable()}}else d?(this.map.url=i.nameToUrl(d),this.load()):(l=u(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),l.error=u(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];B(h,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&y(a.map.id)});w(a)}),l.fromText=u(this,function(f,c){var d=a.name,e=p(d),P=M;c&&(f=c);P&&(M=!1);s(e);t(j.config,b)&&(j.config[d]=j.config[b]);try{g.exec(f)}catch(h){return w(C("fromtexteval",
|
22
|
+
"fromText eval for "+b+" failed: "+h,h,[b]))}P&&(M=!0);this.depMaps.push(e);i.completeLoad(d);n([d],l)}),f.load(a.name,n,l,j))}));i.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){V[this.map.id]=this;this.enabling=this.enabled=!0;v(this.depMaps,u(this,function(a,b){var c,f;if("string"===typeof a){a=p(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=m(L,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;q(a,"defined",u(this,function(a){this.defineDep(b,
|
23
|
+
a);this.check()}));this.errback?q(a,"error",u(this,this.errback)):this.events.error&&q(a,"error",u(this,function(a){this.emit("error",a)}))}c=a.id;f=h[c];!t(L,c)&&(f&&!f.enabled)&&i.enable(a,this)}));B(this.pluginMaps,u(this,function(a){var b=m(h,a.id);b&&!b.enabled&&i.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){v(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};i={config:j,contextName:b,
|
24
|
+
registry:h,defined:r,urlFetched:S,defQueue:A,Module:Z,makeModuleMap:p,nextTick:g.nextTick,onError:w,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=j.shim,c={paths:!0,bundles:!0,config:!0,map:!0};B(a,function(a,b){c[b]?(j[b]||(j[b]={}),U(j[b],a,!0,!0)):j[b]=a});a.bundles&&B(a.bundles,function(a,b){v(a,function(a){a!==b&&(aa[a]=b)})});a.shim&&(B(a.shim,function(a,c){H(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=i.makeShimExports(a);
|
25
|
+
b[c]=a}),j.shim=b);a.packages&&v(a.packages,function(a){var b,a="string"===typeof a?{name:a}:a;b=a.name;a.location&&(j.paths[b]=a.location);j.pkgs[b]=a.name+"/"+(a.main||"main").replace(ia,"").replace(Q,"")});B(h,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=p(b))});if(a.deps||a.callback)i.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ba,arguments));return b||a.exports&&da(a.exports)}},makeRequire:function(a,e){function j(c,d,m){var n,
|
26
|
+
q;e.enableBuildCallback&&(d&&G(d))&&(d.__requireJsBuild=!0);if("string"===typeof c){if(G(d))return w(C("requireargs","Invalid require call"),m);if(a&&t(L,c))return L[c](h[a.id]);if(g.get)return g.get(i,c,a,j);n=p(c,a,!1,!0);n=n.id;return!t(r,n)?w(C("notloaded",'Module name "'+n+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):r[n]}J();i.nextTick(function(){J();q=s(p(null,a));q.skipMap=e.skipMap;q.init(c,d,m,{enabled:!0});D()});return j}e=e||{};U(j,{isBrowser:z,toUrl:function(b){var d,
|
27
|
+
e=b.lastIndexOf("."),k=b.split("/")[0];if(-1!==e&&(!("."===k||".."===k)||1<e))d=b.substring(e,b.length),b=b.substring(0,e);return i.nameToUrl(c(b,a&&a.id,!0),d,!0)},defined:function(b){return t(r,p(b,a,!1,!0).id)},specified:function(b){b=p(b,a,!1,!0).id;return t(r,b)||t(h,b)}});a||(j.undef=function(b){x();var c=p(b,a,!0),e=m(h,b);d(b);delete r[b];delete S[c.url];delete $[b];T(A,function(a,c){a[0]===b&&A.splice(c,1)});e&&(e.events.defined&&($[b]=e.events),y(b))});return j},enable:function(a){m(h,a.id)&&
|
28
|
+
s(a).enable()},completeLoad:function(a){var b,c,d=m(j.shim,a)||{},g=d.exports;for(x();A.length;){c=A.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]===a&&(b=!0);E(c)}c=m(h,a);if(!b&&!t(r,a)&&c&&!c.inited){if(j.enforceDefine&&(!g||!da(g)))return e(a)?void 0:w(C("nodefine","No define call for "+a,null,[a]));E([a,d.deps||[],d.exportsFn])}D()},nameToUrl:function(a,b,c){var d,e,h;(d=m(j.pkgs,a))&&(a=d);if(d=m(aa,a))return i.nameToUrl(d,b,c);if(g.jsExtRegExp.test(a))d=a+(b||"");else{d=j.paths;
|
29
|
+
a=a.split("/");for(e=a.length;0<e;e-=1)if(h=a.slice(0,e).join("/"),h=m(d,h)){H(h)&&(h=h[0]);a.splice(0,e,h);break}d=a.join("/");d+=b||(/^data\:|\?/.test(d)||c?"":".js");d=("/"===d.charAt(0)||d.match(/^[\w\+\.\-]+:/)?"":j.baseUrl)+d}return j.urlArgs?d+((-1===d.indexOf("?")?"?":"&")+j.urlArgs):d},load:function(a,b){g.load(i,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||ja.test((a.currentTarget||a.srcElement).readyState))N=null,a=I(a),i.completeLoad(a.id)},
|
30
|
+
onScriptError:function(a){var b=I(a);if(!e(b.id))return w(C("scripterror","Script error for: "+b.id,a,[b.id]))}};i.require=i.makeRequire();return i}var g,x,y,D,I,E,N,J,s,O,ka=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,la=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,Q=/\.js$/,ia=/^\.\//;x=Object.prototype;var K=x.toString,fa=x.hasOwnProperty,ha=Array.prototype.splice,z=!!("undefined"!==typeof window&&"undefined"!==typeof navigator&&window.document),ea=!z&&"undefined"!==typeof importScripts,ja=
|
31
|
+
z&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,Y="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),F={},q={},R=[],M=!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(G(requirejs))return;q=requirejs;requirejs=void 0}"undefined"!==typeof require&&!G(require)&&(q=require,require=void 0);g=requirejs=function(b,c,d,e){var n,p="_";!H(b)&&"string"!==typeof b&&(n=b,H(c)?(b=c,c=d,d=e):b=[]);n&&n.context&&(p=n.context);(e=m(F,p))||(e=F[p]=g.s.newContext(p));
|
32
|
+
n&&e.configure(n);return e.require(b,c,d)};g.config=function(b){return g(b)};g.nextTick="undefined"!==typeof setTimeout?function(b){setTimeout(b,4)}:function(b){b()};require||(require=g);g.version="2.1.16";g.jsExtRegExp=/^\/|:|\?|\.js$/;g.isBrowser=z;x=g.s={contexts:F,newContext:ga};g({});v(["toUrl","undef","defined","specified"],function(b){g[b]=function(){var c=F._;return c.require[b].apply(c,arguments)}});if(z&&(y=x.head=document.getElementsByTagName("head")[0],D=document.getElementsByTagName("base")[0]))y=
|
33
|
+
x.head=D.parentNode;g.onError=ca;g.createNode=function(b){var c=b.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");c.type=b.scriptType||"text/javascript";c.charset="utf-8";c.async=!0;return c};g.load=function(b,c,d){var e=b&&b.config||{};if(z)return e=g.createNode(e,c,d),e.setAttribute("data-requirecontext",b.contextName),e.setAttribute("data-requiremodule",c),e.attachEvent&&!(e.attachEvent.toString&&0>e.attachEvent.toString().indexOf("[native code"))&&
|
34
|
+
!Y?(M=!0,e.attachEvent("onreadystatechange",b.onScriptLoad)):(e.addEventListener("load",b.onScriptLoad,!1),e.addEventListener("error",b.onScriptError,!1)),e.src=d,J=e,D?y.insertBefore(e,D):y.appendChild(e),J=null,e;if(ea)try{importScripts(d),b.completeLoad(c)}catch(m){b.onError(C("importscripts","importScripts failed for "+c+" at "+d,m,[c]))}};z&&!q.skipDataMain&&T(document.getElementsByTagName("script"),function(b){y||(y=b.parentNode);if(I=b.getAttribute("data-main"))return s=I,q.baseUrl||(E=s.split("/"),
|
35
|
+
s=E.pop(),O=E.length?E.join("/")+"/":"./",q.baseUrl=O),s=s.replace(Q,""),g.jsExtRegExp.test(s)&&(s=I),q.deps=q.deps?q.deps.concat(s):[s],!0});define=function(b,c,d){var e,g;"string"!==typeof b&&(d=c,c=b,b=null);H(c)||(d=c,c=null);!c&&G(d)&&(c=[],d.length&&(d.toString().replace(ka,"").replace(la,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));if(M){if(!(e=J))N&&"interactive"===N.readyState||T(document.getElementsByTagName("script"),function(b){if("interactive"===
|
36
|
+
b.readyState)return N=b}),e=N;e&&(b||(b=e.getAttribute("data-requiremodule")),g=F[e.getAttribute("data-requirecontext")])}(g?g.defQueue:R).push([b,c,d])};define.amd={jQuery:!0};g.exec=function(b){return eval(b)};g(q)}})(this);
|
@@ -0,0 +1,391 @@
|
|
1
|
+
/**
|
2
|
+
* @license RequireJS text 2.0.14 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
|
3
|
+
* Available via the MIT or new BSD license.
|
4
|
+
* see: http://github.com/requirejs/text for details
|
5
|
+
*/
|
6
|
+
/*jslint regexp: true */
|
7
|
+
/*global require, XMLHttpRequest, ActiveXObject,
|
8
|
+
define, window, process, Packages,
|
9
|
+
java, location, Components, FileUtils */
|
10
|
+
|
11
|
+
define(['module'], function (module) {
|
12
|
+
'use strict';
|
13
|
+
|
14
|
+
var text, fs, Cc, Ci, xpcIsWindows,
|
15
|
+
progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'],
|
16
|
+
xmlRegExp = /^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,
|
17
|
+
bodyRegExp = /<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,
|
18
|
+
hasLocation = typeof location !== 'undefined' && location.href,
|
19
|
+
defaultProtocol = hasLocation && location.protocol && location.protocol.replace(/\:/, ''),
|
20
|
+
defaultHostName = hasLocation && location.hostname,
|
21
|
+
defaultPort = hasLocation && (location.port || undefined),
|
22
|
+
buildMap = {},
|
23
|
+
masterConfig = (module.config && module.config()) || {};
|
24
|
+
|
25
|
+
text = {
|
26
|
+
version: '2.0.14',
|
27
|
+
|
28
|
+
strip: function (content) {
|
29
|
+
//Strips <?xml ...?> declarations so that external SVG and XML
|
30
|
+
//documents can be added to a document without worry. Also, if the string
|
31
|
+
//is an HTML document, only the part inside the body tag is returned.
|
32
|
+
if (content) {
|
33
|
+
content = content.replace(xmlRegExp, "");
|
34
|
+
var matches = content.match(bodyRegExp);
|
35
|
+
if (matches) {
|
36
|
+
content = matches[1];
|
37
|
+
}
|
38
|
+
} else {
|
39
|
+
content = "";
|
40
|
+
}
|
41
|
+
return content;
|
42
|
+
},
|
43
|
+
|
44
|
+
jsEscape: function (content) {
|
45
|
+
return content.replace(/(['\\])/g, '\\$1')
|
46
|
+
.replace(/[\f]/g, "\\f")
|
47
|
+
.replace(/[\b]/g, "\\b")
|
48
|
+
.replace(/[\n]/g, "\\n")
|
49
|
+
.replace(/[\t]/g, "\\t")
|
50
|
+
.replace(/[\r]/g, "\\r")
|
51
|
+
.replace(/[\u2028]/g, "\\u2028")
|
52
|
+
.replace(/[\u2029]/g, "\\u2029");
|
53
|
+
},
|
54
|
+
|
55
|
+
createXhr: masterConfig.createXhr || function () {
|
56
|
+
//Would love to dump the ActiveX crap in here. Need IE 6 to die first.
|
57
|
+
var xhr, i, progId;
|
58
|
+
if (typeof XMLHttpRequest !== "undefined") {
|
59
|
+
return new XMLHttpRequest();
|
60
|
+
} else if (typeof ActiveXObject !== "undefined") {
|
61
|
+
for (i = 0; i < 3; i += 1) {
|
62
|
+
progId = progIds[i];
|
63
|
+
try {
|
64
|
+
xhr = new ActiveXObject(progId);
|
65
|
+
} catch (e) {}
|
66
|
+
|
67
|
+
if (xhr) {
|
68
|
+
progIds = [progId]; // so faster next time
|
69
|
+
break;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
return xhr;
|
75
|
+
},
|
76
|
+
|
77
|
+
/**
|
78
|
+
* Parses a resource name into its component parts. Resource names
|
79
|
+
* look like: module/name.ext!strip, where the !strip part is
|
80
|
+
* optional.
|
81
|
+
* @param {String} name the resource name
|
82
|
+
* @returns {Object} with properties "moduleName", "ext" and "strip"
|
83
|
+
* where strip is a boolean.
|
84
|
+
*/
|
85
|
+
parseName: function (name) {
|
86
|
+
var modName, ext, temp,
|
87
|
+
strip = false,
|
88
|
+
index = name.lastIndexOf("."),
|
89
|
+
isRelative = name.indexOf('./') === 0 ||
|
90
|
+
name.indexOf('../') === 0;
|
91
|
+
|
92
|
+
if (index !== -1 && (!isRelative || index > 1)) {
|
93
|
+
modName = name.substring(0, index);
|
94
|
+
ext = name.substring(index + 1);
|
95
|
+
} else {
|
96
|
+
modName = name;
|
97
|
+
}
|
98
|
+
|
99
|
+
temp = ext || modName;
|
100
|
+
index = temp.indexOf("!");
|
101
|
+
if (index !== -1) {
|
102
|
+
//Pull off the strip arg.
|
103
|
+
strip = temp.substring(index + 1) === "strip";
|
104
|
+
temp = temp.substring(0, index);
|
105
|
+
if (ext) {
|
106
|
+
ext = temp;
|
107
|
+
} else {
|
108
|
+
modName = temp;
|
109
|
+
}
|
110
|
+
}
|
111
|
+
|
112
|
+
return {
|
113
|
+
moduleName: modName,
|
114
|
+
ext: ext,
|
115
|
+
strip: strip
|
116
|
+
};
|
117
|
+
},
|
118
|
+
|
119
|
+
xdRegExp: /^((\w+)\:)?\/\/([^\/\\]+)/,
|
120
|
+
|
121
|
+
/**
|
122
|
+
* Is an URL on another domain. Only works for browser use, returns
|
123
|
+
* false in non-browser environments. Only used to know if an
|
124
|
+
* optimized .js version of a text resource should be loaded
|
125
|
+
* instead.
|
126
|
+
* @param {String} url
|
127
|
+
* @returns Boolean
|
128
|
+
*/
|
129
|
+
useXhr: function (url, protocol, hostname, port) {
|
130
|
+
var uProtocol, uHostName, uPort,
|
131
|
+
match = text.xdRegExp.exec(url);
|
132
|
+
if (!match) {
|
133
|
+
return true;
|
134
|
+
}
|
135
|
+
uProtocol = match[2];
|
136
|
+
uHostName = match[3];
|
137
|
+
|
138
|
+
uHostName = uHostName.split(':');
|
139
|
+
uPort = uHostName[1];
|
140
|
+
uHostName = uHostName[0];
|
141
|
+
|
142
|
+
return (!uProtocol || uProtocol === protocol) &&
|
143
|
+
(!uHostName || uHostName.toLowerCase() === hostname.toLowerCase()) &&
|
144
|
+
((!uPort && !uHostName) || uPort === port);
|
145
|
+
},
|
146
|
+
|
147
|
+
finishLoad: function (name, strip, content, onLoad) {
|
148
|
+
content = strip ? text.strip(content) : content;
|
149
|
+
if (masterConfig.isBuild) {
|
150
|
+
buildMap[name] = content;
|
151
|
+
}
|
152
|
+
onLoad(content);
|
153
|
+
},
|
154
|
+
|
155
|
+
load: function (name, req, onLoad, config) {
|
156
|
+
//Name has format: some.module.filext!strip
|
157
|
+
//The strip part is optional.
|
158
|
+
//if strip is present, then that means only get the string contents
|
159
|
+
//inside a body tag in an HTML string. For XML/SVG content it means
|
160
|
+
//removing the <?xml ...?> declarations so the content can be inserted
|
161
|
+
//into the current doc without problems.
|
162
|
+
|
163
|
+
// Do not bother with the work if a build and text will
|
164
|
+
// not be inlined.
|
165
|
+
if (config && config.isBuild && !config.inlineText) {
|
166
|
+
onLoad();
|
167
|
+
return;
|
168
|
+
}
|
169
|
+
|
170
|
+
masterConfig.isBuild = config && config.isBuild;
|
171
|
+
|
172
|
+
var parsed = text.parseName(name),
|
173
|
+
nonStripName = parsed.moduleName +
|
174
|
+
(parsed.ext ? '.' + parsed.ext : ''),
|
175
|
+
url = req.toUrl(nonStripName),
|
176
|
+
useXhr = (masterConfig.useXhr) ||
|
177
|
+
text.useXhr;
|
178
|
+
|
179
|
+
// Do not load if it is an empty: url
|
180
|
+
if (url.indexOf('empty:') === 0) {
|
181
|
+
onLoad();
|
182
|
+
return;
|
183
|
+
}
|
184
|
+
|
185
|
+
//Load the text. Use XHR if possible and in a browser.
|
186
|
+
if (!hasLocation || useXhr(url, defaultProtocol, defaultHostName, defaultPort)) {
|
187
|
+
text.get(url, function (content) {
|
188
|
+
text.finishLoad(name, parsed.strip, content, onLoad);
|
189
|
+
}, function (err) {
|
190
|
+
if (onLoad.error) {
|
191
|
+
onLoad.error(err);
|
192
|
+
}
|
193
|
+
});
|
194
|
+
} else {
|
195
|
+
//Need to fetch the resource across domains. Assume
|
196
|
+
//the resource has been optimized into a JS module. Fetch
|
197
|
+
//by the module name + extension, but do not include the
|
198
|
+
//!strip part to avoid file system issues.
|
199
|
+
req([nonStripName], function (content) {
|
200
|
+
text.finishLoad(parsed.moduleName + '.' + parsed.ext,
|
201
|
+
parsed.strip, content, onLoad);
|
202
|
+
});
|
203
|
+
}
|
204
|
+
},
|
205
|
+
|
206
|
+
write: function (pluginName, moduleName, write, config) {
|
207
|
+
if (buildMap.hasOwnProperty(moduleName)) {
|
208
|
+
var content = text.jsEscape(buildMap[moduleName]);
|
209
|
+
write.asModule(pluginName + "!" + moduleName,
|
210
|
+
"define(function () { return '" +
|
211
|
+
content +
|
212
|
+
"';});\n");
|
213
|
+
}
|
214
|
+
},
|
215
|
+
|
216
|
+
writeFile: function (pluginName, moduleName, req, write, config) {
|
217
|
+
var parsed = text.parseName(moduleName),
|
218
|
+
extPart = parsed.ext ? '.' + parsed.ext : '',
|
219
|
+
nonStripName = parsed.moduleName + extPart,
|
220
|
+
//Use a '.js' file name so that it indicates it is a
|
221
|
+
//script that can be loaded across domains.
|
222
|
+
fileName = req.toUrl(parsed.moduleName + extPart) + '.js';
|
223
|
+
|
224
|
+
//Leverage own load() method to load plugin value, but only
|
225
|
+
//write out values that do not have the strip argument,
|
226
|
+
//to avoid any potential issues with ! in file names.
|
227
|
+
text.load(nonStripName, req, function (value) {
|
228
|
+
//Use own write() method to construct full module value.
|
229
|
+
//But need to create shell that translates writeFile's
|
230
|
+
//write() to the right interface.
|
231
|
+
var textWrite = function (contents) {
|
232
|
+
return write(fileName, contents);
|
233
|
+
};
|
234
|
+
textWrite.asModule = function (moduleName, contents) {
|
235
|
+
return write.asModule(moduleName, fileName, contents);
|
236
|
+
};
|
237
|
+
|
238
|
+
text.write(pluginName, nonStripName, textWrite, config);
|
239
|
+
}, config);
|
240
|
+
}
|
241
|
+
};
|
242
|
+
|
243
|
+
if (masterConfig.env === 'node' || (!masterConfig.env &&
|
244
|
+
typeof process !== "undefined" &&
|
245
|
+
process.versions &&
|
246
|
+
!!process.versions.node &&
|
247
|
+
!process.versions['node-webkit'] &&
|
248
|
+
!process.versions['atom-shell'])) {
|
249
|
+
//Using special require.nodeRequire, something added by r.js.
|
250
|
+
fs = require.nodeRequire('fs');
|
251
|
+
|
252
|
+
text.get = function (url, callback, errback) {
|
253
|
+
try {
|
254
|
+
var file = fs.readFileSync(url, 'utf8');
|
255
|
+
//Remove BOM (Byte Mark Order) from utf8 files if it is there.
|
256
|
+
if (file[0] === '\uFEFF') {
|
257
|
+
file = file.substring(1);
|
258
|
+
}
|
259
|
+
callback(file);
|
260
|
+
} catch (e) {
|
261
|
+
if (errback) {
|
262
|
+
errback(e);
|
263
|
+
}
|
264
|
+
}
|
265
|
+
};
|
266
|
+
} else if (masterConfig.env === 'xhr' || (!masterConfig.env &&
|
267
|
+
text.createXhr())) {
|
268
|
+
text.get = function (url, callback, errback, headers) {
|
269
|
+
var xhr = text.createXhr(), header;
|
270
|
+
xhr.open('GET', url, true);
|
271
|
+
|
272
|
+
//Allow plugins direct access to xhr headers
|
273
|
+
if (headers) {
|
274
|
+
for (header in headers) {
|
275
|
+
if (headers.hasOwnProperty(header)) {
|
276
|
+
xhr.setRequestHeader(header.toLowerCase(), headers[header]);
|
277
|
+
}
|
278
|
+
}
|
279
|
+
}
|
280
|
+
|
281
|
+
//Allow overrides specified in config
|
282
|
+
if (masterConfig.onXhr) {
|
283
|
+
masterConfig.onXhr(xhr, url);
|
284
|
+
}
|
285
|
+
|
286
|
+
xhr.onreadystatechange = function (evt) {
|
287
|
+
var status, err;
|
288
|
+
//Do not explicitly handle errors, those should be
|
289
|
+
//visible via console output in the browser.
|
290
|
+
if (xhr.readyState === 4) {
|
291
|
+
status = xhr.status || 0;
|
292
|
+
if (status > 399 && status < 600) {
|
293
|
+
//An http 4xx or 5xx error. Signal an error.
|
294
|
+
err = new Error(url + ' HTTP status: ' + status);
|
295
|
+
err.xhr = xhr;
|
296
|
+
if (errback) {
|
297
|
+
errback(err);
|
298
|
+
}
|
299
|
+
} else {
|
300
|
+
callback(xhr.responseText);
|
301
|
+
}
|
302
|
+
|
303
|
+
if (masterConfig.onXhrComplete) {
|
304
|
+
masterConfig.onXhrComplete(xhr, url);
|
305
|
+
}
|
306
|
+
}
|
307
|
+
};
|
308
|
+
xhr.send(null);
|
309
|
+
};
|
310
|
+
} else if (masterConfig.env === 'rhino' || (!masterConfig.env &&
|
311
|
+
typeof Packages !== 'undefined' && typeof java !== 'undefined')) {
|
312
|
+
//Why Java, why is this so awkward?
|
313
|
+
text.get = function (url, callback) {
|
314
|
+
var stringBuffer, line,
|
315
|
+
encoding = "utf-8",
|
316
|
+
file = new java.io.File(url),
|
317
|
+
lineSeparator = java.lang.System.getProperty("line.separator"),
|
318
|
+
input = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(file), encoding)),
|
319
|
+
content = '';
|
320
|
+
try {
|
321
|
+
stringBuffer = new java.lang.StringBuffer();
|
322
|
+
line = input.readLine();
|
323
|
+
|
324
|
+
// Byte Order Mark (BOM) - The Unicode Standard, version 3.0, page 324
|
325
|
+
// http://www.unicode.org/faq/utf_bom.html
|
326
|
+
|
327
|
+
// Note that when we use utf-8, the BOM should appear as "EF BB BF", but it doesn't due to this bug in the JDK:
|
328
|
+
// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058
|
329
|
+
if (line && line.length() && line.charAt(0) === 0xfeff) {
|
330
|
+
// Eat the BOM, since we've already found the encoding on this file,
|
331
|
+
// and we plan to concatenating this buffer with others; the BOM should
|
332
|
+
// only appear at the top of a file.
|
333
|
+
line = line.substring(1);
|
334
|
+
}
|
335
|
+
|
336
|
+
if (line !== null) {
|
337
|
+
stringBuffer.append(line);
|
338
|
+
}
|
339
|
+
|
340
|
+
while ((line = input.readLine()) !== null) {
|
341
|
+
stringBuffer.append(lineSeparator);
|
342
|
+
stringBuffer.append(line);
|
343
|
+
}
|
344
|
+
//Make sure we return a JavaScript string and not a Java string.
|
345
|
+
content = String(stringBuffer.toString()); //String
|
346
|
+
} finally {
|
347
|
+
input.close();
|
348
|
+
}
|
349
|
+
callback(content);
|
350
|
+
};
|
351
|
+
} else if (masterConfig.env === 'xpconnect' || (!masterConfig.env &&
|
352
|
+
typeof Components !== 'undefined' && Components.classes &&
|
353
|
+
Components.interfaces)) {
|
354
|
+
//Avert your gaze!
|
355
|
+
Cc = Components.classes;
|
356
|
+
Ci = Components.interfaces;
|
357
|
+
Components.utils['import']('resource://gre/modules/FileUtils.jsm');
|
358
|
+
xpcIsWindows = ('@mozilla.org/windows-registry-key;1' in Cc);
|
359
|
+
|
360
|
+
text.get = function (url, callback) {
|
361
|
+
var inStream, convertStream, fileObj,
|
362
|
+
readData = {};
|
363
|
+
|
364
|
+
if (xpcIsWindows) {
|
365
|
+
url = url.replace(/\//g, '\\');
|
366
|
+
}
|
367
|
+
|
368
|
+
fileObj = new FileUtils.File(url);
|
369
|
+
|
370
|
+
//XPCOM, you so crazy
|
371
|
+
try {
|
372
|
+
inStream = Cc['@mozilla.org/network/file-input-stream;1']
|
373
|
+
.createInstance(Ci.nsIFileInputStream);
|
374
|
+
inStream.init(fileObj, 1, 0, false);
|
375
|
+
|
376
|
+
convertStream = Cc['@mozilla.org/intl/converter-input-stream;1']
|
377
|
+
.createInstance(Ci.nsIConverterInputStream);
|
378
|
+
convertStream.init(inStream, "utf-8", inStream.available(),
|
379
|
+
Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER);
|
380
|
+
|
381
|
+
convertStream.readString(inStream.available(), readData);
|
382
|
+
convertStream.close();
|
383
|
+
inStream.close();
|
384
|
+
callback(readData.value);
|
385
|
+
} catch (e) {
|
386
|
+
throw new Error((fileObj && fileObj.path || '') + ': ' + e);
|
387
|
+
}
|
388
|
+
};
|
389
|
+
}
|
390
|
+
return text;
|
391
|
+
});
|
@@ -0,0 +1,1536 @@
|
|
1
|
+
// Underscore.js 1.8.2
|
2
|
+
// http://underscorejs.org
|
3
|
+
// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
4
|
+
// Underscore may be freely distributed under the MIT license.
|
5
|
+
|
6
|
+
(function() {
|
7
|
+
|
8
|
+
// Baseline setup
|
9
|
+
// --------------
|
10
|
+
|
11
|
+
// Establish the root object, `window` in the browser, or `exports` on the server.
|
12
|
+
var root = this;
|
13
|
+
|
14
|
+
// Save the previous value of the `_` variable.
|
15
|
+
var previousUnderscore = root._;
|
16
|
+
|
17
|
+
// Save bytes in the minified (but not gzipped) version:
|
18
|
+
var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
|
19
|
+
|
20
|
+
// Create quick reference variables for speed access to core prototypes.
|
21
|
+
var
|
22
|
+
push = ArrayProto.push,
|
23
|
+
slice = ArrayProto.slice,
|
24
|
+
toString = ObjProto.toString,
|
25
|
+
hasOwnProperty = ObjProto.hasOwnProperty;
|
26
|
+
|
27
|
+
// All **ECMAScript 5** native function implementations that we hope to use
|
28
|
+
// are declared here.
|
29
|
+
var
|
30
|
+
nativeIsArray = Array.isArray,
|
31
|
+
nativeKeys = Object.keys,
|
32
|
+
nativeBind = FuncProto.bind,
|
33
|
+
nativeCreate = Object.create;
|
34
|
+
|
35
|
+
// Naked function reference for surrogate-prototype-swapping.
|
36
|
+
var Ctor = function(){};
|
37
|
+
|
38
|
+
// Create a safe reference to the Underscore object for use below.
|
39
|
+
var _ = function(obj) {
|
40
|
+
if (obj instanceof _) return obj;
|
41
|
+
if (!(this instanceof _)) return new _(obj);
|
42
|
+
this._wrapped = obj;
|
43
|
+
};
|
44
|
+
|
45
|
+
// Export the Underscore object for **Node.js**, with
|
46
|
+
// backwards-compatibility for the old `require()` API. If we're in
|
47
|
+
// the browser, add `_` as a global object.
|
48
|
+
if (typeof exports !== 'undefined') {
|
49
|
+
if (typeof module !== 'undefined' && module.exports) {
|
50
|
+
exports = module.exports = _;
|
51
|
+
}
|
52
|
+
exports._ = _;
|
53
|
+
} else {
|
54
|
+
root._ = _;
|
55
|
+
}
|
56
|
+
|
57
|
+
// Current version.
|
58
|
+
_.VERSION = '1.8.2';
|
59
|
+
|
60
|
+
// Internal function that returns an efficient (for current engines) version
|
61
|
+
// of the passed-in callback, to be repeatedly applied in other Underscore
|
62
|
+
// functions.
|
63
|
+
var optimizeCb = function(func, context, argCount) {
|
64
|
+
if (context === void 0) return func;
|
65
|
+
switch (argCount == null ? 3 : argCount) {
|
66
|
+
case 1: return function(value) {
|
67
|
+
return func.call(context, value);
|
68
|
+
};
|
69
|
+
case 2: return function(value, other) {
|
70
|
+
return func.call(context, value, other);
|
71
|
+
};
|
72
|
+
case 3: return function(value, index, collection) {
|
73
|
+
return func.call(context, value, index, collection);
|
74
|
+
};
|
75
|
+
case 4: return function(accumulator, value, index, collection) {
|
76
|
+
return func.call(context, accumulator, value, index, collection);
|
77
|
+
};
|
78
|
+
}
|
79
|
+
return function() {
|
80
|
+
return func.apply(context, arguments);
|
81
|
+
};
|
82
|
+
};
|
83
|
+
|
84
|
+
// A mostly-internal function to generate callbacks that can be applied
|
85
|
+
// to each element in a collection, returning the desired result — either
|
86
|
+
// identity, an arbitrary callback, a property matcher, or a property accessor.
|
87
|
+
var cb = function(value, context, argCount) {
|
88
|
+
if (value == null) return _.identity;
|
89
|
+
if (_.isFunction(value)) return optimizeCb(value, context, argCount);
|
90
|
+
if (_.isObject(value)) return _.matcher(value);
|
91
|
+
return _.property(value);
|
92
|
+
};
|
93
|
+
_.iteratee = function(value, context) {
|
94
|
+
return cb(value, context, Infinity);
|
95
|
+
};
|
96
|
+
|
97
|
+
// An internal function for creating assigner functions.
|
98
|
+
var createAssigner = function(keysFunc, undefinedOnly) {
|
99
|
+
return function(obj) {
|
100
|
+
var length = arguments.length;
|
101
|
+
if (length < 2 || obj == null) return obj;
|
102
|
+
for (var index = 1; index < length; index++) {
|
103
|
+
var source = arguments[index],
|
104
|
+
keys = keysFunc(source),
|
105
|
+
l = keys.length;
|
106
|
+
for (var i = 0; i < l; i++) {
|
107
|
+
var key = keys[i];
|
108
|
+
if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key];
|
109
|
+
}
|
110
|
+
}
|
111
|
+
return obj;
|
112
|
+
};
|
113
|
+
};
|
114
|
+
|
115
|
+
// An internal function for creating a new object that inherits from another.
|
116
|
+
var baseCreate = function(prototype) {
|
117
|
+
if (!_.isObject(prototype)) return {};
|
118
|
+
if (nativeCreate) return nativeCreate(prototype);
|
119
|
+
Ctor.prototype = prototype;
|
120
|
+
var result = new Ctor;
|
121
|
+
Ctor.prototype = null;
|
122
|
+
return result;
|
123
|
+
};
|
124
|
+
|
125
|
+
// Helper for collection methods to determine whether a collection
|
126
|
+
// should be iterated as an array or as an object
|
127
|
+
// Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
|
128
|
+
var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
|
129
|
+
var isArrayLike = function(collection) {
|
130
|
+
var length = collection && collection.length;
|
131
|
+
return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;
|
132
|
+
};
|
133
|
+
|
134
|
+
// Collection Functions
|
135
|
+
// --------------------
|
136
|
+
|
137
|
+
// The cornerstone, an `each` implementation, aka `forEach`.
|
138
|
+
// Handles raw objects in addition to array-likes. Treats all
|
139
|
+
// sparse array-likes as if they were dense.
|
140
|
+
_.each = _.forEach = function(obj, iteratee, context) {
|
141
|
+
iteratee = optimizeCb(iteratee, context);
|
142
|
+
var i, length;
|
143
|
+
if (isArrayLike(obj)) {
|
144
|
+
for (i = 0, length = obj.length; i < length; i++) {
|
145
|
+
iteratee(obj[i], i, obj);
|
146
|
+
}
|
147
|
+
} else {
|
148
|
+
var keys = _.keys(obj);
|
149
|
+
for (i = 0, length = keys.length; i < length; i++) {
|
150
|
+
iteratee(obj[keys[i]], keys[i], obj);
|
151
|
+
}
|
152
|
+
}
|
153
|
+
return obj;
|
154
|
+
};
|
155
|
+
|
156
|
+
// Return the results of applying the iteratee to each element.
|
157
|
+
_.map = _.collect = function(obj, iteratee, context) {
|
158
|
+
iteratee = cb(iteratee, context);
|
159
|
+
var keys = !isArrayLike(obj) && _.keys(obj),
|
160
|
+
length = (keys || obj).length,
|
161
|
+
results = Array(length);
|
162
|
+
for (var index = 0; index < length; index++) {
|
163
|
+
var currentKey = keys ? keys[index] : index;
|
164
|
+
results[index] = iteratee(obj[currentKey], currentKey, obj);
|
165
|
+
}
|
166
|
+
return results;
|
167
|
+
};
|
168
|
+
|
169
|
+
// Create a reducing function iterating left or right.
|
170
|
+
function createReduce(dir) {
|
171
|
+
// Optimized iterator function as using arguments.length
|
172
|
+
// in the main function will deoptimize the, see #1991.
|
173
|
+
function iterator(obj, iteratee, memo, keys, index, length) {
|
174
|
+
for (; index >= 0 && index < length; index += dir) {
|
175
|
+
var currentKey = keys ? keys[index] : index;
|
176
|
+
memo = iteratee(memo, obj[currentKey], currentKey, obj);
|
177
|
+
}
|
178
|
+
return memo;
|
179
|
+
}
|
180
|
+
|
181
|
+
return function(obj, iteratee, memo, context) {
|
182
|
+
iteratee = optimizeCb(iteratee, context, 4);
|
183
|
+
var keys = !isArrayLike(obj) && _.keys(obj),
|
184
|
+
length = (keys || obj).length,
|
185
|
+
index = dir > 0 ? 0 : length - 1;
|
186
|
+
// Determine the initial value if none is provided.
|
187
|
+
if (arguments.length < 3) {
|
188
|
+
memo = obj[keys ? keys[index] : index];
|
189
|
+
index += dir;
|
190
|
+
}
|
191
|
+
return iterator(obj, iteratee, memo, keys, index, length);
|
192
|
+
};
|
193
|
+
}
|
194
|
+
|
195
|
+
// **Reduce** builds up a single result from a list of values, aka `inject`,
|
196
|
+
// or `foldl`.
|
197
|
+
_.reduce = _.foldl = _.inject = createReduce(1);
|
198
|
+
|
199
|
+
// The right-associative version of reduce, also known as `foldr`.
|
200
|
+
_.reduceRight = _.foldr = createReduce(-1);
|
201
|
+
|
202
|
+
// Return the first value which passes a truth test. Aliased as `detect`.
|
203
|
+
_.find = _.detect = function(obj, predicate, context) {
|
204
|
+
var key;
|
205
|
+
if (isArrayLike(obj)) {
|
206
|
+
key = _.findIndex(obj, predicate, context);
|
207
|
+
} else {
|
208
|
+
key = _.findKey(obj, predicate, context);
|
209
|
+
}
|
210
|
+
if (key !== void 0 && key !== -1) return obj[key];
|
211
|
+
};
|
212
|
+
|
213
|
+
// Return all the elements that pass a truth test.
|
214
|
+
// Aliased as `select`.
|
215
|
+
_.filter = _.select = function(obj, predicate, context) {
|
216
|
+
var results = [];
|
217
|
+
predicate = cb(predicate, context);
|
218
|
+
_.each(obj, function(value, index, list) {
|
219
|
+
if (predicate(value, index, list)) results.push(value);
|
220
|
+
});
|
221
|
+
return results;
|
222
|
+
};
|
223
|
+
|
224
|
+
// Return all the elements for which a truth test fails.
|
225
|
+
_.reject = function(obj, predicate, context) {
|
226
|
+
return _.filter(obj, _.negate(cb(predicate)), context);
|
227
|
+
};
|
228
|
+
|
229
|
+
// Determine whether all of the elements match a truth test.
|
230
|
+
// Aliased as `all`.
|
231
|
+
_.every = _.all = function(obj, predicate, context) {
|
232
|
+
predicate = cb(predicate, context);
|
233
|
+
var keys = !isArrayLike(obj) && _.keys(obj),
|
234
|
+
length = (keys || obj).length;
|
235
|
+
for (var index = 0; index < length; index++) {
|
236
|
+
var currentKey = keys ? keys[index] : index;
|
237
|
+
if (!predicate(obj[currentKey], currentKey, obj)) return false;
|
238
|
+
}
|
239
|
+
return true;
|
240
|
+
};
|
241
|
+
|
242
|
+
// Determine if at least one element in the object matches a truth test.
|
243
|
+
// Aliased as `any`.
|
244
|
+
_.some = _.any = function(obj, predicate, context) {
|
245
|
+
predicate = cb(predicate, context);
|
246
|
+
var keys = !isArrayLike(obj) && _.keys(obj),
|
247
|
+
length = (keys || obj).length;
|
248
|
+
for (var index = 0; index < length; index++) {
|
249
|
+
var currentKey = keys ? keys[index] : index;
|
250
|
+
if (predicate(obj[currentKey], currentKey, obj)) return true;
|
251
|
+
}
|
252
|
+
return false;
|
253
|
+
};
|
254
|
+
|
255
|
+
// Determine if the array or object contains a given value (using `===`).
|
256
|
+
// Aliased as `includes` and `include`.
|
257
|
+
_.contains = _.includes = _.include = function(obj, target, fromIndex) {
|
258
|
+
if (!isArrayLike(obj)) obj = _.values(obj);
|
259
|
+
return _.indexOf(obj, target, typeof fromIndex == 'number' && fromIndex) >= 0;
|
260
|
+
};
|
261
|
+
|
262
|
+
// Invoke a method (with arguments) on every item in a collection.
|
263
|
+
_.invoke = function(obj, method) {
|
264
|
+
var args = slice.call(arguments, 2);
|
265
|
+
var isFunc = _.isFunction(method);
|
266
|
+
return _.map(obj, function(value) {
|
267
|
+
var func = isFunc ? method : value[method];
|
268
|
+
return func == null ? func : func.apply(value, args);
|
269
|
+
});
|
270
|
+
};
|
271
|
+
|
272
|
+
// Convenience version of a common use case of `map`: fetching a property.
|
273
|
+
_.pluck = function(obj, key) {
|
274
|
+
return _.map(obj, _.property(key));
|
275
|
+
};
|
276
|
+
|
277
|
+
// Convenience version of a common use case of `filter`: selecting only objects
|
278
|
+
// containing specific `key:value` pairs.
|
279
|
+
_.where = function(obj, attrs) {
|
280
|
+
return _.filter(obj, _.matcher(attrs));
|
281
|
+
};
|
282
|
+
|
283
|
+
// Convenience version of a common use case of `find`: getting the first object
|
284
|
+
// containing specific `key:value` pairs.
|
285
|
+
_.findWhere = function(obj, attrs) {
|
286
|
+
return _.find(obj, _.matcher(attrs));
|
287
|
+
};
|
288
|
+
|
289
|
+
// Return the maximum element (or element-based computation).
|
290
|
+
_.max = function(obj, iteratee, context) {
|
291
|
+
var result = -Infinity, lastComputed = -Infinity,
|
292
|
+
value, computed;
|
293
|
+
if (iteratee == null && obj != null) {
|
294
|
+
obj = isArrayLike(obj) ? obj : _.values(obj);
|
295
|
+
for (var i = 0, length = obj.length; i < length; i++) {
|
296
|
+
value = obj[i];
|
297
|
+
if (value > result) {
|
298
|
+
result = value;
|
299
|
+
}
|
300
|
+
}
|
301
|
+
} else {
|
302
|
+
iteratee = cb(iteratee, context);
|
303
|
+
_.each(obj, function(value, index, list) {
|
304
|
+
computed = iteratee(value, index, list);
|
305
|
+
if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
|
306
|
+
result = value;
|
307
|
+
lastComputed = computed;
|
308
|
+
}
|
309
|
+
});
|
310
|
+
}
|
311
|
+
return result;
|
312
|
+
};
|
313
|
+
|
314
|
+
// Return the minimum element (or element-based computation).
|
315
|
+
_.min = function(obj, iteratee, context) {
|
316
|
+
var result = Infinity, lastComputed = Infinity,
|
317
|
+
value, computed;
|
318
|
+
if (iteratee == null && obj != null) {
|
319
|
+
obj = isArrayLike(obj) ? obj : _.values(obj);
|
320
|
+
for (var i = 0, length = obj.length; i < length; i++) {
|
321
|
+
value = obj[i];
|
322
|
+
if (value < result) {
|
323
|
+
result = value;
|
324
|
+
}
|
325
|
+
}
|
326
|
+
} else {
|
327
|
+
iteratee = cb(iteratee, context);
|
328
|
+
_.each(obj, function(value, index, list) {
|
329
|
+
computed = iteratee(value, index, list);
|
330
|
+
if (computed < lastComputed || computed === Infinity && result === Infinity) {
|
331
|
+
result = value;
|
332
|
+
lastComputed = computed;
|
333
|
+
}
|
334
|
+
});
|
335
|
+
}
|
336
|
+
return result;
|
337
|
+
};
|
338
|
+
|
339
|
+
// Shuffle a collection, using the modern version of the
|
340
|
+
// [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
|
341
|
+
_.shuffle = function(obj) {
|
342
|
+
var set = isArrayLike(obj) ? obj : _.values(obj);
|
343
|
+
var length = set.length;
|
344
|
+
var shuffled = Array(length);
|
345
|
+
for (var index = 0, rand; index < length; index++) {
|
346
|
+
rand = _.random(0, index);
|
347
|
+
if (rand !== index) shuffled[index] = shuffled[rand];
|
348
|
+
shuffled[rand] = set[index];
|
349
|
+
}
|
350
|
+
return shuffled;
|
351
|
+
};
|
352
|
+
|
353
|
+
// Sample **n** random values from a collection.
|
354
|
+
// If **n** is not specified, returns a single random element.
|
355
|
+
// The internal `guard` argument allows it to work with `map`.
|
356
|
+
_.sample = function(obj, n, guard) {
|
357
|
+
if (n == null || guard) {
|
358
|
+
if (!isArrayLike(obj)) obj = _.values(obj);
|
359
|
+
return obj[_.random(obj.length - 1)];
|
360
|
+
}
|
361
|
+
return _.shuffle(obj).slice(0, Math.max(0, n));
|
362
|
+
};
|
363
|
+
|
364
|
+
// Sort the object's values by a criterion produced by an iteratee.
|
365
|
+
_.sortBy = function(obj, iteratee, context) {
|
366
|
+
iteratee = cb(iteratee, context);
|
367
|
+
return _.pluck(_.map(obj, function(value, index, list) {
|
368
|
+
return {
|
369
|
+
value: value,
|
370
|
+
index: index,
|
371
|
+
criteria: iteratee(value, index, list)
|
372
|
+
};
|
373
|
+
}).sort(function(left, right) {
|
374
|
+
var a = left.criteria;
|
375
|
+
var b = right.criteria;
|
376
|
+
if (a !== b) {
|
377
|
+
if (a > b || a === void 0) return 1;
|
378
|
+
if (a < b || b === void 0) return -1;
|
379
|
+
}
|
380
|
+
return left.index - right.index;
|
381
|
+
}), 'value');
|
382
|
+
};
|
383
|
+
|
384
|
+
// An internal function used for aggregate "group by" operations.
|
385
|
+
var group = function(behavior) {
|
386
|
+
return function(obj, iteratee, context) {
|
387
|
+
var result = {};
|
388
|
+
iteratee = cb(iteratee, context);
|
389
|
+
_.each(obj, function(value, index) {
|
390
|
+
var key = iteratee(value, index, obj);
|
391
|
+
behavior(result, value, key);
|
392
|
+
});
|
393
|
+
return result;
|
394
|
+
};
|
395
|
+
};
|
396
|
+
|
397
|
+
// Groups the object's values by a criterion. Pass either a string attribute
|
398
|
+
// to group by, or a function that returns the criterion.
|
399
|
+
_.groupBy = group(function(result, value, key) {
|
400
|
+
if (_.has(result, key)) result[key].push(value); else result[key] = [value];
|
401
|
+
});
|
402
|
+
|
403
|
+
// Indexes the object's values by a criterion, similar to `groupBy`, but for
|
404
|
+
// when you know that your index values will be unique.
|
405
|
+
_.indexBy = group(function(result, value, key) {
|
406
|
+
result[key] = value;
|
407
|
+
});
|
408
|
+
|
409
|
+
// Counts instances of an object that group by a certain criterion. Pass
|
410
|
+
// either a string attribute to count by, or a function that returns the
|
411
|
+
// criterion.
|
412
|
+
_.countBy = group(function(result, value, key) {
|
413
|
+
if (_.has(result, key)) result[key]++; else result[key] = 1;
|
414
|
+
});
|
415
|
+
|
416
|
+
// Safely create a real, live array from anything iterable.
|
417
|
+
_.toArray = function(obj) {
|
418
|
+
if (!obj) return [];
|
419
|
+
if (_.isArray(obj)) return slice.call(obj);
|
420
|
+
if (isArrayLike(obj)) return _.map(obj, _.identity);
|
421
|
+
return _.values(obj);
|
422
|
+
};
|
423
|
+
|
424
|
+
// Return the number of elements in an object.
|
425
|
+
_.size = function(obj) {
|
426
|
+
if (obj == null) return 0;
|
427
|
+
return isArrayLike(obj) ? obj.length : _.keys(obj).length;
|
428
|
+
};
|
429
|
+
|
430
|
+
// Split a collection into two arrays: one whose elements all satisfy the given
|
431
|
+
// predicate, and one whose elements all do not satisfy the predicate.
|
432
|
+
_.partition = function(obj, predicate, context) {
|
433
|
+
predicate = cb(predicate, context);
|
434
|
+
var pass = [], fail = [];
|
435
|
+
_.each(obj, function(value, key, obj) {
|
436
|
+
(predicate(value, key, obj) ? pass : fail).push(value);
|
437
|
+
});
|
438
|
+
return [pass, fail];
|
439
|
+
};
|
440
|
+
|
441
|
+
// Array Functions
|
442
|
+
// ---------------
|
443
|
+
|
444
|
+
// Get the first element of an array. Passing **n** will return the first N
|
445
|
+
// values in the array. Aliased as `head` and `take`. The **guard** check
|
446
|
+
// allows it to work with `_.map`.
|
447
|
+
_.first = _.head = _.take = function(array, n, guard) {
|
448
|
+
if (array == null) return void 0;
|
449
|
+
if (n == null || guard) return array[0];
|
450
|
+
return _.initial(array, array.length - n);
|
451
|
+
};
|
452
|
+
|
453
|
+
// Returns everything but the last entry of the array. Especially useful on
|
454
|
+
// the arguments object. Passing **n** will return all the values in
|
455
|
+
// the array, excluding the last N.
|
456
|
+
_.initial = function(array, n, guard) {
|
457
|
+
return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
|
458
|
+
};
|
459
|
+
|
460
|
+
// Get the last element of an array. Passing **n** will return the last N
|
461
|
+
// values in the array.
|
462
|
+
_.last = function(array, n, guard) {
|
463
|
+
if (array == null) return void 0;
|
464
|
+
if (n == null || guard) return array[array.length - 1];
|
465
|
+
return _.rest(array, Math.max(0, array.length - n));
|
466
|
+
};
|
467
|
+
|
468
|
+
// Returns everything but the first entry of the array. Aliased as `tail` and `drop`.
|
469
|
+
// Especially useful on the arguments object. Passing an **n** will return
|
470
|
+
// the rest N values in the array.
|
471
|
+
_.rest = _.tail = _.drop = function(array, n, guard) {
|
472
|
+
return slice.call(array, n == null || guard ? 1 : n);
|
473
|
+
};
|
474
|
+
|
475
|
+
// Trim out all falsy values from an array.
|
476
|
+
_.compact = function(array) {
|
477
|
+
return _.filter(array, _.identity);
|
478
|
+
};
|
479
|
+
|
480
|
+
// Internal implementation of a recursive `flatten` function.
|
481
|
+
var flatten = function(input, shallow, strict, startIndex) {
|
482
|
+
var output = [], idx = 0;
|
483
|
+
for (var i = startIndex || 0, length = input && input.length; i < length; i++) {
|
484
|
+
var value = input[i];
|
485
|
+
if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {
|
486
|
+
//flatten current level of array or arguments object
|
487
|
+
if (!shallow) value = flatten(value, shallow, strict);
|
488
|
+
var j = 0, len = value.length;
|
489
|
+
output.length += len;
|
490
|
+
while (j < len) {
|
491
|
+
output[idx++] = value[j++];
|
492
|
+
}
|
493
|
+
} else if (!strict) {
|
494
|
+
output[idx++] = value;
|
495
|
+
}
|
496
|
+
}
|
497
|
+
return output;
|
498
|
+
};
|
499
|
+
|
500
|
+
// Flatten out an array, either recursively (by default), or just one level.
|
501
|
+
_.flatten = function(array, shallow) {
|
502
|
+
return flatten(array, shallow, false);
|
503
|
+
};
|
504
|
+
|
505
|
+
// Return a version of the array that does not contain the specified value(s).
|
506
|
+
_.without = function(array) {
|
507
|
+
return _.difference(array, slice.call(arguments, 1));
|
508
|
+
};
|
509
|
+
|
510
|
+
// Produce a duplicate-free version of the array. If the array has already
|
511
|
+
// been sorted, you have the option of using a faster algorithm.
|
512
|
+
// Aliased as `unique`.
|
513
|
+
_.uniq = _.unique = function(array, isSorted, iteratee, context) {
|
514
|
+
if (array == null) return [];
|
515
|
+
if (!_.isBoolean(isSorted)) {
|
516
|
+
context = iteratee;
|
517
|
+
iteratee = isSorted;
|
518
|
+
isSorted = false;
|
519
|
+
}
|
520
|
+
if (iteratee != null) iteratee = cb(iteratee, context);
|
521
|
+
var result = [];
|
522
|
+
var seen = [];
|
523
|
+
for (var i = 0, length = array.length; i < length; i++) {
|
524
|
+
var value = array[i],
|
525
|
+
computed = iteratee ? iteratee(value, i, array) : value;
|
526
|
+
if (isSorted) {
|
527
|
+
if (!i || seen !== computed) result.push(value);
|
528
|
+
seen = computed;
|
529
|
+
} else if (iteratee) {
|
530
|
+
if (!_.contains(seen, computed)) {
|
531
|
+
seen.push(computed);
|
532
|
+
result.push(value);
|
533
|
+
}
|
534
|
+
} else if (!_.contains(result, value)) {
|
535
|
+
result.push(value);
|
536
|
+
}
|
537
|
+
}
|
538
|
+
return result;
|
539
|
+
};
|
540
|
+
|
541
|
+
// Produce an array that contains the union: each distinct element from all of
|
542
|
+
// the passed-in arrays.
|
543
|
+
_.union = function() {
|
544
|
+
return _.uniq(flatten(arguments, true, true));
|
545
|
+
};
|
546
|
+
|
547
|
+
// Produce an array that contains every item shared between all the
|
548
|
+
// passed-in arrays.
|
549
|
+
_.intersection = function(array) {
|
550
|
+
if (array == null) return [];
|
551
|
+
var result = [];
|
552
|
+
var argsLength = arguments.length;
|
553
|
+
for (var i = 0, length = array.length; i < length; i++) {
|
554
|
+
var item = array[i];
|
555
|
+
if (_.contains(result, item)) continue;
|
556
|
+
for (var j = 1; j < argsLength; j++) {
|
557
|
+
if (!_.contains(arguments[j], item)) break;
|
558
|
+
}
|
559
|
+
if (j === argsLength) result.push(item);
|
560
|
+
}
|
561
|
+
return result;
|
562
|
+
};
|
563
|
+
|
564
|
+
// Take the difference between one array and a number of other arrays.
|
565
|
+
// Only the elements present in just the first array will remain.
|
566
|
+
_.difference = function(array) {
|
567
|
+
var rest = flatten(arguments, true, true, 1);
|
568
|
+
return _.filter(array, function(value){
|
569
|
+
return !_.contains(rest, value);
|
570
|
+
});
|
571
|
+
};
|
572
|
+
|
573
|
+
// Zip together multiple lists into a single array -- elements that share
|
574
|
+
// an index go together.
|
575
|
+
_.zip = function() {
|
576
|
+
return _.unzip(arguments);
|
577
|
+
};
|
578
|
+
|
579
|
+
// Complement of _.zip. Unzip accepts an array of arrays and groups
|
580
|
+
// each array's elements on shared indices
|
581
|
+
_.unzip = function(array) {
|
582
|
+
var length = array && _.max(array, 'length').length || 0;
|
583
|
+
var result = Array(length);
|
584
|
+
|
585
|
+
for (var index = 0; index < length; index++) {
|
586
|
+
result[index] = _.pluck(array, index);
|
587
|
+
}
|
588
|
+
return result;
|
589
|
+
};
|
590
|
+
|
591
|
+
// Converts lists into objects. Pass either a single array of `[key, value]`
|
592
|
+
// pairs, or two parallel arrays of the same length -- one of keys, and one of
|
593
|
+
// the corresponding values.
|
594
|
+
_.object = function(list, values) {
|
595
|
+
var result = {};
|
596
|
+
for (var i = 0, length = list && list.length; i < length; i++) {
|
597
|
+
if (values) {
|
598
|
+
result[list[i]] = values[i];
|
599
|
+
} else {
|
600
|
+
result[list[i][0]] = list[i][1];
|
601
|
+
}
|
602
|
+
}
|
603
|
+
return result;
|
604
|
+
};
|
605
|
+
|
606
|
+
// Return the position of the first occurrence of an item in an array,
|
607
|
+
// or -1 if the item is not included in the array.
|
608
|
+
// If the array is large and already in sort order, pass `true`
|
609
|
+
// for **isSorted** to use binary search.
|
610
|
+
_.indexOf = function(array, item, isSorted) {
|
611
|
+
var i = 0, length = array && array.length;
|
612
|
+
if (typeof isSorted == 'number') {
|
613
|
+
i = isSorted < 0 ? Math.max(0, length + isSorted) : isSorted;
|
614
|
+
} else if (isSorted && length) {
|
615
|
+
i = _.sortedIndex(array, item);
|
616
|
+
return array[i] === item ? i : -1;
|
617
|
+
}
|
618
|
+
if (item !== item) {
|
619
|
+
return _.findIndex(slice.call(array, i), _.isNaN);
|
620
|
+
}
|
621
|
+
for (; i < length; i++) if (array[i] === item) return i;
|
622
|
+
return -1;
|
623
|
+
};
|
624
|
+
|
625
|
+
_.lastIndexOf = function(array, item, from) {
|
626
|
+
var idx = array ? array.length : 0;
|
627
|
+
if (typeof from == 'number') {
|
628
|
+
idx = from < 0 ? idx + from + 1 : Math.min(idx, from + 1);
|
629
|
+
}
|
630
|
+
if (item !== item) {
|
631
|
+
return _.findLastIndex(slice.call(array, 0, idx), _.isNaN);
|
632
|
+
}
|
633
|
+
while (--idx >= 0) if (array[idx] === item) return idx;
|
634
|
+
return -1;
|
635
|
+
};
|
636
|
+
|
637
|
+
// Generator function to create the findIndex and findLastIndex functions
|
638
|
+
function createIndexFinder(dir) {
|
639
|
+
return function(array, predicate, context) {
|
640
|
+
predicate = cb(predicate, context);
|
641
|
+
var length = array != null && array.length;
|
642
|
+
var index = dir > 0 ? 0 : length - 1;
|
643
|
+
for (; index >= 0 && index < length; index += dir) {
|
644
|
+
if (predicate(array[index], index, array)) return index;
|
645
|
+
}
|
646
|
+
return -1;
|
647
|
+
};
|
648
|
+
}
|
649
|
+
|
650
|
+
// Returns the first index on an array-like that passes a predicate test
|
651
|
+
_.findIndex = createIndexFinder(1);
|
652
|
+
|
653
|
+
_.findLastIndex = createIndexFinder(-1);
|
654
|
+
|
655
|
+
// Use a comparator function to figure out the smallest index at which
|
656
|
+
// an object should be inserted so as to maintain order. Uses binary search.
|
657
|
+
_.sortedIndex = function(array, obj, iteratee, context) {
|
658
|
+
iteratee = cb(iteratee, context, 1);
|
659
|
+
var value = iteratee(obj);
|
660
|
+
var low = 0, high = array.length;
|
661
|
+
while (low < high) {
|
662
|
+
var mid = Math.floor((low + high) / 2);
|
663
|
+
if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
|
664
|
+
}
|
665
|
+
return low;
|
666
|
+
};
|
667
|
+
|
668
|
+
// Generate an integer Array containing an arithmetic progression. A port of
|
669
|
+
// the native Python `range()` function. See
|
670
|
+
// [the Python documentation](http://docs.python.org/library/functions.html#range).
|
671
|
+
_.range = function(start, stop, step) {
|
672
|
+
if (arguments.length <= 1) {
|
673
|
+
stop = start || 0;
|
674
|
+
start = 0;
|
675
|
+
}
|
676
|
+
step = step || 1;
|
677
|
+
|
678
|
+
var length = Math.max(Math.ceil((stop - start) / step), 0);
|
679
|
+
var range = Array(length);
|
680
|
+
|
681
|
+
for (var idx = 0; idx < length; idx++, start += step) {
|
682
|
+
range[idx] = start;
|
683
|
+
}
|
684
|
+
|
685
|
+
return range;
|
686
|
+
};
|
687
|
+
|
688
|
+
// Function (ahem) Functions
|
689
|
+
// ------------------
|
690
|
+
|
691
|
+
// Determines whether to execute a function as a constructor
|
692
|
+
// or a normal function with the provided arguments
|
693
|
+
var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {
|
694
|
+
if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
|
695
|
+
var self = baseCreate(sourceFunc.prototype);
|
696
|
+
var result = sourceFunc.apply(self, args);
|
697
|
+
if (_.isObject(result)) return result;
|
698
|
+
return self;
|
699
|
+
};
|
700
|
+
|
701
|
+
// Create a function bound to a given object (assigning `this`, and arguments,
|
702
|
+
// optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if
|
703
|
+
// available.
|
704
|
+
_.bind = function(func, context) {
|
705
|
+
if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
|
706
|
+
if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');
|
707
|
+
var args = slice.call(arguments, 2);
|
708
|
+
var bound = function() {
|
709
|
+
return executeBound(func, bound, context, this, args.concat(slice.call(arguments)));
|
710
|
+
};
|
711
|
+
return bound;
|
712
|
+
};
|
713
|
+
|
714
|
+
// Partially apply a function by creating a version that has had some of its
|
715
|
+
// arguments pre-filled, without changing its dynamic `this` context. _ acts
|
716
|
+
// as a placeholder, allowing any combination of arguments to be pre-filled.
|
717
|
+
_.partial = function(func) {
|
718
|
+
var boundArgs = slice.call(arguments, 1);
|
719
|
+
var bound = function() {
|
720
|
+
var position = 0, length = boundArgs.length;
|
721
|
+
var args = Array(length);
|
722
|
+
for (var i = 0; i < length; i++) {
|
723
|
+
args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i];
|
724
|
+
}
|
725
|
+
while (position < arguments.length) args.push(arguments[position++]);
|
726
|
+
return executeBound(func, bound, this, this, args);
|
727
|
+
};
|
728
|
+
return bound;
|
729
|
+
};
|
730
|
+
|
731
|
+
// Bind a number of an object's methods to that object. Remaining arguments
|
732
|
+
// are the method names to be bound. Useful for ensuring that all callbacks
|
733
|
+
// defined on an object belong to it.
|
734
|
+
_.bindAll = function(obj) {
|
735
|
+
var i, length = arguments.length, key;
|
736
|
+
if (length <= 1) throw new Error('bindAll must be passed function names');
|
737
|
+
for (i = 1; i < length; i++) {
|
738
|
+
key = arguments[i];
|
739
|
+
obj[key] = _.bind(obj[key], obj);
|
740
|
+
}
|
741
|
+
return obj;
|
742
|
+
};
|
743
|
+
|
744
|
+
// Memoize an expensive function by storing its results.
|
745
|
+
_.memoize = function(func, hasher) {
|
746
|
+
var memoize = function(key) {
|
747
|
+
var cache = memoize.cache;
|
748
|
+
var address = '' + (hasher ? hasher.apply(this, arguments) : key);
|
749
|
+
if (!_.has(cache, address)) cache[address] = func.apply(this, arguments);
|
750
|
+
return cache[address];
|
751
|
+
};
|
752
|
+
memoize.cache = {};
|
753
|
+
return memoize;
|
754
|
+
};
|
755
|
+
|
756
|
+
// Delays a function for the given number of milliseconds, and then calls
|
757
|
+
// it with the arguments supplied.
|
758
|
+
_.delay = function(func, wait) {
|
759
|
+
var args = slice.call(arguments, 2);
|
760
|
+
return setTimeout(function(){
|
761
|
+
return func.apply(null, args);
|
762
|
+
}, wait);
|
763
|
+
};
|
764
|
+
|
765
|
+
// Defers a function, scheduling it to run after the current call stack has
|
766
|
+
// cleared.
|
767
|
+
_.defer = _.partial(_.delay, _, 1);
|
768
|
+
|
769
|
+
// Returns a function, that, when invoked, will only be triggered at most once
|
770
|
+
// during a given window of time. Normally, the throttled function will run
|
771
|
+
// as much as it can, without ever going more than once per `wait` duration;
|
772
|
+
// but if you'd like to disable the execution on the leading edge, pass
|
773
|
+
// `{leading: false}`. To disable execution on the trailing edge, ditto.
|
774
|
+
_.throttle = function(func, wait, options) {
|
775
|
+
var context, args, result;
|
776
|
+
var timeout = null;
|
777
|
+
var previous = 0;
|
778
|
+
if (!options) options = {};
|
779
|
+
var later = function() {
|
780
|
+
previous = options.leading === false ? 0 : _.now();
|
781
|
+
timeout = null;
|
782
|
+
result = func.apply(context, args);
|
783
|
+
if (!timeout) context = args = null;
|
784
|
+
};
|
785
|
+
return function() {
|
786
|
+
var now = _.now();
|
787
|
+
if (!previous && options.leading === false) previous = now;
|
788
|
+
var remaining = wait - (now - previous);
|
789
|
+
context = this;
|
790
|
+
args = arguments;
|
791
|
+
if (remaining <= 0 || remaining > wait) {
|
792
|
+
if (timeout) {
|
793
|
+
clearTimeout(timeout);
|
794
|
+
timeout = null;
|
795
|
+
}
|
796
|
+
previous = now;
|
797
|
+
result = func.apply(context, args);
|
798
|
+
if (!timeout) context = args = null;
|
799
|
+
} else if (!timeout && options.trailing !== false) {
|
800
|
+
timeout = setTimeout(later, remaining);
|
801
|
+
}
|
802
|
+
return result;
|
803
|
+
};
|
804
|
+
};
|
805
|
+
|
806
|
+
// Returns a function, that, as long as it continues to be invoked, will not
|
807
|
+
// be triggered. The function will be called after it stops being called for
|
808
|
+
// N milliseconds. If `immediate` is passed, trigger the function on the
|
809
|
+
// leading edge, instead of the trailing.
|
810
|
+
_.debounce = function(func, wait, immediate) {
|
811
|
+
var timeout, args, context, timestamp, result;
|
812
|
+
|
813
|
+
var later = function() {
|
814
|
+
var last = _.now() - timestamp;
|
815
|
+
|
816
|
+
if (last < wait && last >= 0) {
|
817
|
+
timeout = setTimeout(later, wait - last);
|
818
|
+
} else {
|
819
|
+
timeout = null;
|
820
|
+
if (!immediate) {
|
821
|
+
result = func.apply(context, args);
|
822
|
+
if (!timeout) context = args = null;
|
823
|
+
}
|
824
|
+
}
|
825
|
+
};
|
826
|
+
|
827
|
+
return function() {
|
828
|
+
context = this;
|
829
|
+
args = arguments;
|
830
|
+
timestamp = _.now();
|
831
|
+
var callNow = immediate && !timeout;
|
832
|
+
if (!timeout) timeout = setTimeout(later, wait);
|
833
|
+
if (callNow) {
|
834
|
+
result = func.apply(context, args);
|
835
|
+
context = args = null;
|
836
|
+
}
|
837
|
+
|
838
|
+
return result;
|
839
|
+
};
|
840
|
+
};
|
841
|
+
|
842
|
+
// Returns the first function passed as an argument to the second,
|
843
|
+
// allowing you to adjust arguments, run code before and after, and
|
844
|
+
// conditionally execute the original function.
|
845
|
+
_.wrap = function(func, wrapper) {
|
846
|
+
return _.partial(wrapper, func);
|
847
|
+
};
|
848
|
+
|
849
|
+
// Returns a negated version of the passed-in predicate.
|
850
|
+
_.negate = function(predicate) {
|
851
|
+
return function() {
|
852
|
+
return !predicate.apply(this, arguments);
|
853
|
+
};
|
854
|
+
};
|
855
|
+
|
856
|
+
// Returns a function that is the composition of a list of functions, each
|
857
|
+
// consuming the return value of the function that follows.
|
858
|
+
_.compose = function() {
|
859
|
+
var args = arguments;
|
860
|
+
var start = args.length - 1;
|
861
|
+
return function() {
|
862
|
+
var i = start;
|
863
|
+
var result = args[start].apply(this, arguments);
|
864
|
+
while (i--) result = args[i].call(this, result);
|
865
|
+
return result;
|
866
|
+
};
|
867
|
+
};
|
868
|
+
|
869
|
+
// Returns a function that will only be executed on and after the Nth call.
|
870
|
+
_.after = function(times, func) {
|
871
|
+
return function() {
|
872
|
+
if (--times < 1) {
|
873
|
+
return func.apply(this, arguments);
|
874
|
+
}
|
875
|
+
};
|
876
|
+
};
|
877
|
+
|
878
|
+
// Returns a function that will only be executed up to (but not including) the Nth call.
|
879
|
+
_.before = function(times, func) {
|
880
|
+
var memo;
|
881
|
+
return function() {
|
882
|
+
if (--times > 0) {
|
883
|
+
memo = func.apply(this, arguments);
|
884
|
+
}
|
885
|
+
if (times <= 1) func = null;
|
886
|
+
return memo;
|
887
|
+
};
|
888
|
+
};
|
889
|
+
|
890
|
+
// Returns a function that will be executed at most one time, no matter how
|
891
|
+
// often you call it. Useful for lazy initialization.
|
892
|
+
_.once = _.partial(_.before, 2);
|
893
|
+
|
894
|
+
// Object Functions
|
895
|
+
// ----------------
|
896
|
+
|
897
|
+
// Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
|
898
|
+
var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
|
899
|
+
var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
|
900
|
+
'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
|
901
|
+
|
902
|
+
function collectNonEnumProps(obj, keys) {
|
903
|
+
var nonEnumIdx = nonEnumerableProps.length;
|
904
|
+
var constructor = obj.constructor;
|
905
|
+
var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto;
|
906
|
+
|
907
|
+
// Constructor is a special case.
|
908
|
+
var prop = 'constructor';
|
909
|
+
if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);
|
910
|
+
|
911
|
+
while (nonEnumIdx--) {
|
912
|
+
prop = nonEnumerableProps[nonEnumIdx];
|
913
|
+
if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {
|
914
|
+
keys.push(prop);
|
915
|
+
}
|
916
|
+
}
|
917
|
+
}
|
918
|
+
|
919
|
+
// Retrieve the names of an object's own properties.
|
920
|
+
// Delegates to **ECMAScript 5**'s native `Object.keys`
|
921
|
+
_.keys = function(obj) {
|
922
|
+
if (!_.isObject(obj)) return [];
|
923
|
+
if (nativeKeys) return nativeKeys(obj);
|
924
|
+
var keys = [];
|
925
|
+
for (var key in obj) if (_.has(obj, key)) keys.push(key);
|
926
|
+
// Ahem, IE < 9.
|
927
|
+
if (hasEnumBug) collectNonEnumProps(obj, keys);
|
928
|
+
return keys;
|
929
|
+
};
|
930
|
+
|
931
|
+
// Retrieve all the property names of an object.
|
932
|
+
_.allKeys = function(obj) {
|
933
|
+
if (!_.isObject(obj)) return [];
|
934
|
+
var keys = [];
|
935
|
+
for (var key in obj) keys.push(key);
|
936
|
+
// Ahem, IE < 9.
|
937
|
+
if (hasEnumBug) collectNonEnumProps(obj, keys);
|
938
|
+
return keys;
|
939
|
+
};
|
940
|
+
|
941
|
+
// Retrieve the values of an object's properties.
|
942
|
+
_.values = function(obj) {
|
943
|
+
var keys = _.keys(obj);
|
944
|
+
var length = keys.length;
|
945
|
+
var values = Array(length);
|
946
|
+
for (var i = 0; i < length; i++) {
|
947
|
+
values[i] = obj[keys[i]];
|
948
|
+
}
|
949
|
+
return values;
|
950
|
+
};
|
951
|
+
|
952
|
+
// Returns the results of applying the iteratee to each element of the object
|
953
|
+
// In contrast to _.map it returns an object
|
954
|
+
_.mapObject = function(obj, iteratee, context) {
|
955
|
+
iteratee = cb(iteratee, context);
|
956
|
+
var keys = _.keys(obj),
|
957
|
+
length = keys.length,
|
958
|
+
results = {},
|
959
|
+
currentKey;
|
960
|
+
for (var index = 0; index < length; index++) {
|
961
|
+
currentKey = keys[index];
|
962
|
+
results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
|
963
|
+
}
|
964
|
+
return results;
|
965
|
+
};
|
966
|
+
|
967
|
+
// Convert an object into a list of `[key, value]` pairs.
|
968
|
+
_.pairs = function(obj) {
|
969
|
+
var keys = _.keys(obj);
|
970
|
+
var length = keys.length;
|
971
|
+
var pairs = Array(length);
|
972
|
+
for (var i = 0; i < length; i++) {
|
973
|
+
pairs[i] = [keys[i], obj[keys[i]]];
|
974
|
+
}
|
975
|
+
return pairs;
|
976
|
+
};
|
977
|
+
|
978
|
+
// Invert the keys and values of an object. The values must be serializable.
|
979
|
+
_.invert = function(obj) {
|
980
|
+
var result = {};
|
981
|
+
var keys = _.keys(obj);
|
982
|
+
for (var i = 0, length = keys.length; i < length; i++) {
|
983
|
+
result[obj[keys[i]]] = keys[i];
|
984
|
+
}
|
985
|
+
return result;
|
986
|
+
};
|
987
|
+
|
988
|
+
// Return a sorted list of the function names available on the object.
|
989
|
+
// Aliased as `methods`
|
990
|
+
_.functions = _.methods = function(obj) {
|
991
|
+
var names = [];
|
992
|
+
for (var key in obj) {
|
993
|
+
if (_.isFunction(obj[key])) names.push(key);
|
994
|
+
}
|
995
|
+
return names.sort();
|
996
|
+
};
|
997
|
+
|
998
|
+
// Extend a given object with all the properties in passed-in object(s).
|
999
|
+
_.extend = createAssigner(_.allKeys);
|
1000
|
+
|
1001
|
+
// Assigns a given object with all the own properties in the passed-in object(s)
|
1002
|
+
// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
|
1003
|
+
_.extendOwn = _.assign = createAssigner(_.keys);
|
1004
|
+
|
1005
|
+
// Returns the first key on an object that passes a predicate test
|
1006
|
+
_.findKey = function(obj, predicate, context) {
|
1007
|
+
predicate = cb(predicate, context);
|
1008
|
+
var keys = _.keys(obj), key;
|
1009
|
+
for (var i = 0, length = keys.length; i < length; i++) {
|
1010
|
+
key = keys[i];
|
1011
|
+
if (predicate(obj[key], key, obj)) return key;
|
1012
|
+
}
|
1013
|
+
};
|
1014
|
+
|
1015
|
+
// Return a copy of the object only containing the whitelisted properties.
|
1016
|
+
_.pick = function(object, oiteratee, context) {
|
1017
|
+
var result = {}, obj = object, iteratee, keys;
|
1018
|
+
if (obj == null) return result;
|
1019
|
+
if (_.isFunction(oiteratee)) {
|
1020
|
+
keys = _.allKeys(obj);
|
1021
|
+
iteratee = optimizeCb(oiteratee, context);
|
1022
|
+
} else {
|
1023
|
+
keys = flatten(arguments, false, false, 1);
|
1024
|
+
iteratee = function(value, key, obj) { return key in obj; };
|
1025
|
+
obj = Object(obj);
|
1026
|
+
}
|
1027
|
+
for (var i = 0, length = keys.length; i < length; i++) {
|
1028
|
+
var key = keys[i];
|
1029
|
+
var value = obj[key];
|
1030
|
+
if (iteratee(value, key, obj)) result[key] = value;
|
1031
|
+
}
|
1032
|
+
return result;
|
1033
|
+
};
|
1034
|
+
|
1035
|
+
// Return a copy of the object without the blacklisted properties.
|
1036
|
+
_.omit = function(obj, iteratee, context) {
|
1037
|
+
if (_.isFunction(iteratee)) {
|
1038
|
+
iteratee = _.negate(iteratee);
|
1039
|
+
} else {
|
1040
|
+
var keys = _.map(flatten(arguments, false, false, 1), String);
|
1041
|
+
iteratee = function(value, key) {
|
1042
|
+
return !_.contains(keys, key);
|
1043
|
+
};
|
1044
|
+
}
|
1045
|
+
return _.pick(obj, iteratee, context);
|
1046
|
+
};
|
1047
|
+
|
1048
|
+
// Fill in a given object with default properties.
|
1049
|
+
_.defaults = createAssigner(_.allKeys, true);
|
1050
|
+
|
1051
|
+
// Create a (shallow-cloned) duplicate of an object.
|
1052
|
+
_.clone = function(obj) {
|
1053
|
+
if (!_.isObject(obj)) return obj;
|
1054
|
+
return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
|
1055
|
+
};
|
1056
|
+
|
1057
|
+
// Invokes interceptor with the obj, and then returns obj.
|
1058
|
+
// The primary purpose of this method is to "tap into" a method chain, in
|
1059
|
+
// order to perform operations on intermediate results within the chain.
|
1060
|
+
_.tap = function(obj, interceptor) {
|
1061
|
+
interceptor(obj);
|
1062
|
+
return obj;
|
1063
|
+
};
|
1064
|
+
|
1065
|
+
// Returns whether an object has a given set of `key:value` pairs.
|
1066
|
+
_.isMatch = function(object, attrs) {
|
1067
|
+
var keys = _.keys(attrs), length = keys.length;
|
1068
|
+
if (object == null) return !length;
|
1069
|
+
var obj = Object(object);
|
1070
|
+
for (var i = 0; i < length; i++) {
|
1071
|
+
var key = keys[i];
|
1072
|
+
if (attrs[key] !== obj[key] || !(key in obj)) return false;
|
1073
|
+
}
|
1074
|
+
return true;
|
1075
|
+
};
|
1076
|
+
|
1077
|
+
|
1078
|
+
// Internal recursive comparison function for `isEqual`.
|
1079
|
+
var eq = function(a, b, aStack, bStack) {
|
1080
|
+
// Identical objects are equal. `0 === -0`, but they aren't identical.
|
1081
|
+
// See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).
|
1082
|
+
if (a === b) return a !== 0 || 1 / a === 1 / b;
|
1083
|
+
// A strict comparison is necessary because `null == undefined`.
|
1084
|
+
if (a == null || b == null) return a === b;
|
1085
|
+
// Unwrap any wrapped objects.
|
1086
|
+
if (a instanceof _) a = a._wrapped;
|
1087
|
+
if (b instanceof _) b = b._wrapped;
|
1088
|
+
// Compare `[[Class]]` names.
|
1089
|
+
var className = toString.call(a);
|
1090
|
+
if (className !== toString.call(b)) return false;
|
1091
|
+
switch (className) {
|
1092
|
+
// Strings, numbers, regular expressions, dates, and booleans are compared by value.
|
1093
|
+
case '[object RegExp]':
|
1094
|
+
// RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
|
1095
|
+
case '[object String]':
|
1096
|
+
// Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
|
1097
|
+
// equivalent to `new String("5")`.
|
1098
|
+
return '' + a === '' + b;
|
1099
|
+
case '[object Number]':
|
1100
|
+
// `NaN`s are equivalent, but non-reflexive.
|
1101
|
+
// Object(NaN) is equivalent to NaN
|
1102
|
+
if (+a !== +a) return +b !== +b;
|
1103
|
+
// An `egal` comparison is performed for other numeric values.
|
1104
|
+
return +a === 0 ? 1 / +a === 1 / b : +a === +b;
|
1105
|
+
case '[object Date]':
|
1106
|
+
case '[object Boolean]':
|
1107
|
+
// Coerce dates and booleans to numeric primitive values. Dates are compared by their
|
1108
|
+
// millisecond representations. Note that invalid dates with millisecond representations
|
1109
|
+
// of `NaN` are not equivalent.
|
1110
|
+
return +a === +b;
|
1111
|
+
}
|
1112
|
+
|
1113
|
+
var areArrays = className === '[object Array]';
|
1114
|
+
if (!areArrays) {
|
1115
|
+
if (typeof a != 'object' || typeof b != 'object') return false;
|
1116
|
+
|
1117
|
+
// Objects with different constructors are not equivalent, but `Object`s or `Array`s
|
1118
|
+
// from different frames are.
|
1119
|
+
var aCtor = a.constructor, bCtor = b.constructor;
|
1120
|
+
if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&
|
1121
|
+
_.isFunction(bCtor) && bCtor instanceof bCtor)
|
1122
|
+
&& ('constructor' in a && 'constructor' in b)) {
|
1123
|
+
return false;
|
1124
|
+
}
|
1125
|
+
}
|
1126
|
+
// Assume equality for cyclic structures. The algorithm for detecting cyclic
|
1127
|
+
// structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
|
1128
|
+
|
1129
|
+
// Initializing stack of traversed objects.
|
1130
|
+
// It's done here since we only need them for objects and arrays comparison.
|
1131
|
+
aStack = aStack || [];
|
1132
|
+
bStack = bStack || [];
|
1133
|
+
var length = aStack.length;
|
1134
|
+
while (length--) {
|
1135
|
+
// Linear search. Performance is inversely proportional to the number of
|
1136
|
+
// unique nested structures.
|
1137
|
+
if (aStack[length] === a) return bStack[length] === b;
|
1138
|
+
}
|
1139
|
+
|
1140
|
+
// Add the first object to the stack of traversed objects.
|
1141
|
+
aStack.push(a);
|
1142
|
+
bStack.push(b);
|
1143
|
+
|
1144
|
+
// Recursively compare objects and arrays.
|
1145
|
+
if (areArrays) {
|
1146
|
+
// Compare array lengths to determine if a deep comparison is necessary.
|
1147
|
+
length = a.length;
|
1148
|
+
if (length !== b.length) return false;
|
1149
|
+
// Deep compare the contents, ignoring non-numeric properties.
|
1150
|
+
while (length--) {
|
1151
|
+
if (!eq(a[length], b[length], aStack, bStack)) return false;
|
1152
|
+
}
|
1153
|
+
} else {
|
1154
|
+
// Deep compare objects.
|
1155
|
+
var keys = _.keys(a), key;
|
1156
|
+
length = keys.length;
|
1157
|
+
// Ensure that both objects contain the same number of properties before comparing deep equality.
|
1158
|
+
if (_.keys(b).length !== length) return false;
|
1159
|
+
while (length--) {
|
1160
|
+
// Deep compare each member
|
1161
|
+
key = keys[length];
|
1162
|
+
if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
|
1163
|
+
}
|
1164
|
+
}
|
1165
|
+
// Remove the first object from the stack of traversed objects.
|
1166
|
+
aStack.pop();
|
1167
|
+
bStack.pop();
|
1168
|
+
return true;
|
1169
|
+
};
|
1170
|
+
|
1171
|
+
// Perform a deep comparison to check if two objects are equal.
|
1172
|
+
_.isEqual = function(a, b) {
|
1173
|
+
return eq(a, b);
|
1174
|
+
};
|
1175
|
+
|
1176
|
+
// Is a given array, string, or object empty?
|
1177
|
+
// An "empty" object has no enumerable own-properties.
|
1178
|
+
_.isEmpty = function(obj) {
|
1179
|
+
if (obj == null) return true;
|
1180
|
+
if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;
|
1181
|
+
return _.keys(obj).length === 0;
|
1182
|
+
};
|
1183
|
+
|
1184
|
+
// Is a given value a DOM element?
|
1185
|
+
_.isElement = function(obj) {
|
1186
|
+
return !!(obj && obj.nodeType === 1);
|
1187
|
+
};
|
1188
|
+
|
1189
|
+
// Is a given value an array?
|
1190
|
+
// Delegates to ECMA5's native Array.isArray
|
1191
|
+
_.isArray = nativeIsArray || function(obj) {
|
1192
|
+
return toString.call(obj) === '[object Array]';
|
1193
|
+
};
|
1194
|
+
|
1195
|
+
// Is a given variable an object?
|
1196
|
+
_.isObject = function(obj) {
|
1197
|
+
var type = typeof obj;
|
1198
|
+
return type === 'function' || type === 'object' && !!obj;
|
1199
|
+
};
|
1200
|
+
|
1201
|
+
// Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError.
|
1202
|
+
_.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) {
|
1203
|
+
_['is' + name] = function(obj) {
|
1204
|
+
return toString.call(obj) === '[object ' + name + ']';
|
1205
|
+
};
|
1206
|
+
});
|
1207
|
+
|
1208
|
+
// Define a fallback version of the method in browsers (ahem, IE < 9), where
|
1209
|
+
// there isn't any inspectable "Arguments" type.
|
1210
|
+
if (!_.isArguments(arguments)) {
|
1211
|
+
_.isArguments = function(obj) {
|
1212
|
+
return _.has(obj, 'callee');
|
1213
|
+
};
|
1214
|
+
}
|
1215
|
+
|
1216
|
+
// Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,
|
1217
|
+
// IE 11 (#1621), and in Safari 8 (#1929).
|
1218
|
+
if (typeof /./ != 'function' && typeof Int8Array != 'object') {
|
1219
|
+
_.isFunction = function(obj) {
|
1220
|
+
return typeof obj == 'function' || false;
|
1221
|
+
};
|
1222
|
+
}
|
1223
|
+
|
1224
|
+
// Is a given object a finite number?
|
1225
|
+
_.isFinite = function(obj) {
|
1226
|
+
return isFinite(obj) && !isNaN(parseFloat(obj));
|
1227
|
+
};
|
1228
|
+
|
1229
|
+
// Is the given value `NaN`? (NaN is the only number which does not equal itself).
|
1230
|
+
_.isNaN = function(obj) {
|
1231
|
+
return _.isNumber(obj) && obj !== +obj;
|
1232
|
+
};
|
1233
|
+
|
1234
|
+
// Is a given value a boolean?
|
1235
|
+
_.isBoolean = function(obj) {
|
1236
|
+
return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
|
1237
|
+
};
|
1238
|
+
|
1239
|
+
// Is a given value equal to null?
|
1240
|
+
_.isNull = function(obj) {
|
1241
|
+
return obj === null;
|
1242
|
+
};
|
1243
|
+
|
1244
|
+
// Is a given variable undefined?
|
1245
|
+
_.isUndefined = function(obj) {
|
1246
|
+
return obj === void 0;
|
1247
|
+
};
|
1248
|
+
|
1249
|
+
// Shortcut function for checking if an object has a given property directly
|
1250
|
+
// on itself (in other words, not on a prototype).
|
1251
|
+
_.has = function(obj, key) {
|
1252
|
+
return obj != null && hasOwnProperty.call(obj, key);
|
1253
|
+
};
|
1254
|
+
|
1255
|
+
// Utility Functions
|
1256
|
+
// -----------------
|
1257
|
+
|
1258
|
+
// Run Underscore.js in *noConflict* mode, returning the `_` variable to its
|
1259
|
+
// previous owner. Returns a reference to the Underscore object.
|
1260
|
+
_.noConflict = function() {
|
1261
|
+
root._ = previousUnderscore;
|
1262
|
+
return this;
|
1263
|
+
};
|
1264
|
+
|
1265
|
+
// Keep the identity function around for default iteratees.
|
1266
|
+
_.identity = function(value) {
|
1267
|
+
return value;
|
1268
|
+
};
|
1269
|
+
|
1270
|
+
// Predicate-generating functions. Often useful outside of Underscore.
|
1271
|
+
_.constant = function(value) {
|
1272
|
+
return function() {
|
1273
|
+
return value;
|
1274
|
+
};
|
1275
|
+
};
|
1276
|
+
|
1277
|
+
_.noop = function(){};
|
1278
|
+
|
1279
|
+
_.property = function(key) {
|
1280
|
+
return function(obj) {
|
1281
|
+
return obj == null ? void 0 : obj[key];
|
1282
|
+
};
|
1283
|
+
};
|
1284
|
+
|
1285
|
+
// Generates a function for a given object that returns a given property.
|
1286
|
+
_.propertyOf = function(obj) {
|
1287
|
+
return obj == null ? function(){} : function(key) {
|
1288
|
+
return obj[key];
|
1289
|
+
};
|
1290
|
+
};
|
1291
|
+
|
1292
|
+
// Returns a predicate for checking whether an object has a given set of
|
1293
|
+
// `key:value` pairs.
|
1294
|
+
_.matcher = _.matches = function(attrs) {
|
1295
|
+
attrs = _.extendOwn({}, attrs);
|
1296
|
+
return function(obj) {
|
1297
|
+
return _.isMatch(obj, attrs);
|
1298
|
+
};
|
1299
|
+
};
|
1300
|
+
|
1301
|
+
// Run a function **n** times.
|
1302
|
+
_.times = function(n, iteratee, context) {
|
1303
|
+
var accum = Array(Math.max(0, n));
|
1304
|
+
iteratee = optimizeCb(iteratee, context, 1);
|
1305
|
+
for (var i = 0; i < n; i++) accum[i] = iteratee(i);
|
1306
|
+
return accum;
|
1307
|
+
};
|
1308
|
+
|
1309
|
+
// Return a random integer between min and max (inclusive).
|
1310
|
+
_.random = function(min, max) {
|
1311
|
+
if (max == null) {
|
1312
|
+
max = min;
|
1313
|
+
min = 0;
|
1314
|
+
}
|
1315
|
+
return min + Math.floor(Math.random() * (max - min + 1));
|
1316
|
+
};
|
1317
|
+
|
1318
|
+
// A (possibly faster) way to get the current timestamp as an integer.
|
1319
|
+
_.now = Date.now || function() {
|
1320
|
+
return new Date().getTime();
|
1321
|
+
};
|
1322
|
+
|
1323
|
+
// List of HTML entities for escaping.
|
1324
|
+
var escapeMap = {
|
1325
|
+
'&': '&',
|
1326
|
+
'<': '<',
|
1327
|
+
'>': '>',
|
1328
|
+
'"': '"',
|
1329
|
+
"'": ''',
|
1330
|
+
'`': '`'
|
1331
|
+
};
|
1332
|
+
var unescapeMap = _.invert(escapeMap);
|
1333
|
+
|
1334
|
+
// Functions for escaping and unescaping strings to/from HTML interpolation.
|
1335
|
+
var createEscaper = function(map) {
|
1336
|
+
var escaper = function(match) {
|
1337
|
+
return map[match];
|
1338
|
+
};
|
1339
|
+
// Regexes for identifying a key that needs to be escaped
|
1340
|
+
var source = '(?:' + _.keys(map).join('|') + ')';
|
1341
|
+
var testRegexp = RegExp(source);
|
1342
|
+
var replaceRegexp = RegExp(source, 'g');
|
1343
|
+
return function(string) {
|
1344
|
+
string = string == null ? '' : '' + string;
|
1345
|
+
return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
|
1346
|
+
};
|
1347
|
+
};
|
1348
|
+
_.escape = createEscaper(escapeMap);
|
1349
|
+
_.unescape = createEscaper(unescapeMap);
|
1350
|
+
|
1351
|
+
// If the value of the named `property` is a function then invoke it with the
|
1352
|
+
// `object` as context; otherwise, return it.
|
1353
|
+
_.result = function(object, property, fallback) {
|
1354
|
+
var value = object == null ? void 0 : object[property];
|
1355
|
+
if (value === void 0) {
|
1356
|
+
value = fallback;
|
1357
|
+
}
|
1358
|
+
return _.isFunction(value) ? value.call(object) : value;
|
1359
|
+
};
|
1360
|
+
|
1361
|
+
// Generate a unique integer id (unique within the entire client session).
|
1362
|
+
// Useful for temporary DOM ids.
|
1363
|
+
var idCounter = 0;
|
1364
|
+
_.uniqueId = function(prefix) {
|
1365
|
+
var id = ++idCounter + '';
|
1366
|
+
return prefix ? prefix + id : id;
|
1367
|
+
};
|
1368
|
+
|
1369
|
+
// By default, Underscore uses ERB-style template delimiters, change the
|
1370
|
+
// following template settings to use alternative delimiters.
|
1371
|
+
_.templateSettings = {
|
1372
|
+
evaluate : /<%([\s\S]+?)%>/g,
|
1373
|
+
interpolate : /<%=([\s\S]+?)%>/g,
|
1374
|
+
escape : /<%-([\s\S]+?)%>/g
|
1375
|
+
};
|
1376
|
+
|
1377
|
+
// When customizing `templateSettings`, if you don't want to define an
|
1378
|
+
// interpolation, evaluation or escaping regex, we need one that is
|
1379
|
+
// guaranteed not to match.
|
1380
|
+
var noMatch = /(.)^/;
|
1381
|
+
|
1382
|
+
// Certain characters need to be escaped so that they can be put into a
|
1383
|
+
// string literal.
|
1384
|
+
var escapes = {
|
1385
|
+
"'": "'",
|
1386
|
+
'\\': '\\',
|
1387
|
+
'\r': 'r',
|
1388
|
+
'\n': 'n',
|
1389
|
+
'\u2028': 'u2028',
|
1390
|
+
'\u2029': 'u2029'
|
1391
|
+
};
|
1392
|
+
|
1393
|
+
var escaper = /\\|'|\r|\n|\u2028|\u2029/g;
|
1394
|
+
|
1395
|
+
var escapeChar = function(match) {
|
1396
|
+
return '\\' + escapes[match];
|
1397
|
+
};
|
1398
|
+
|
1399
|
+
// JavaScript micro-templating, similar to John Resig's implementation.
|
1400
|
+
// Underscore templating handles arbitrary delimiters, preserves whitespace,
|
1401
|
+
// and correctly escapes quotes within interpolated code.
|
1402
|
+
// NB: `oldSettings` only exists for backwards compatibility.
|
1403
|
+
_.template = function(text, settings, oldSettings) {
|
1404
|
+
if (!settings && oldSettings) settings = oldSettings;
|
1405
|
+
settings = _.defaults({}, settings, _.templateSettings);
|
1406
|
+
|
1407
|
+
// Combine delimiters into one regular expression via alternation.
|
1408
|
+
var matcher = RegExp([
|
1409
|
+
(settings.escape || noMatch).source,
|
1410
|
+
(settings.interpolate || noMatch).source,
|
1411
|
+
(settings.evaluate || noMatch).source
|
1412
|
+
].join('|') + '|$', 'g');
|
1413
|
+
|
1414
|
+
// Compile the template source, escaping string literals appropriately.
|
1415
|
+
var index = 0;
|
1416
|
+
var source = "__p+='";
|
1417
|
+
text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
|
1418
|
+
source += text.slice(index, offset).replace(escaper, escapeChar);
|
1419
|
+
index = offset + match.length;
|
1420
|
+
|
1421
|
+
if (escape) {
|
1422
|
+
source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
|
1423
|
+
} else if (interpolate) {
|
1424
|
+
source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
|
1425
|
+
} else if (evaluate) {
|
1426
|
+
source += "';\n" + evaluate + "\n__p+='";
|
1427
|
+
}
|
1428
|
+
|
1429
|
+
// Adobe VMs need the match returned to produce the correct offest.
|
1430
|
+
return match;
|
1431
|
+
});
|
1432
|
+
source += "';\n";
|
1433
|
+
|
1434
|
+
// If a variable is not specified, place data values in local scope.
|
1435
|
+
if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
|
1436
|
+
|
1437
|
+
source = "var __t,__p='',__j=Array.prototype.join," +
|
1438
|
+
"print=function(){__p+=__j.call(arguments,'');};\n" +
|
1439
|
+
source + 'return __p;\n';
|
1440
|
+
|
1441
|
+
try {
|
1442
|
+
var render = new Function(settings.variable || 'obj', '_', source);
|
1443
|
+
} catch (e) {
|
1444
|
+
e.source = source;
|
1445
|
+
throw e;
|
1446
|
+
}
|
1447
|
+
|
1448
|
+
var template = function(data) {
|
1449
|
+
return render.call(this, data, _);
|
1450
|
+
};
|
1451
|
+
|
1452
|
+
// Provide the compiled source as a convenience for precompilation.
|
1453
|
+
var argument = settings.variable || 'obj';
|
1454
|
+
template.source = 'function(' + argument + '){\n' + source + '}';
|
1455
|
+
|
1456
|
+
return template;
|
1457
|
+
};
|
1458
|
+
|
1459
|
+
// Add a "chain" function. Start chaining a wrapped Underscore object.
|
1460
|
+
_.chain = function(obj) {
|
1461
|
+
var instance = _(obj);
|
1462
|
+
instance._chain = true;
|
1463
|
+
return instance;
|
1464
|
+
};
|
1465
|
+
|
1466
|
+
// OOP
|
1467
|
+
// ---------------
|
1468
|
+
// If Underscore is called as a function, it returns a wrapped object that
|
1469
|
+
// can be used OO-style. This wrapper holds altered versions of all the
|
1470
|
+
// underscore functions. Wrapped objects may be chained.
|
1471
|
+
|
1472
|
+
// Helper function to continue chaining intermediate results.
|
1473
|
+
var result = function(instance, obj) {
|
1474
|
+
return instance._chain ? _(obj).chain() : obj;
|
1475
|
+
};
|
1476
|
+
|
1477
|
+
// Add your own custom functions to the Underscore object.
|
1478
|
+
_.mixin = function(obj) {
|
1479
|
+
_.each(_.functions(obj), function(name) {
|
1480
|
+
var func = _[name] = obj[name];
|
1481
|
+
_.prototype[name] = function() {
|
1482
|
+
var args = [this._wrapped];
|
1483
|
+
push.apply(args, arguments);
|
1484
|
+
return result(this, func.apply(_, args));
|
1485
|
+
};
|
1486
|
+
});
|
1487
|
+
};
|
1488
|
+
|
1489
|
+
// Add all of the Underscore functions to the wrapper object.
|
1490
|
+
_.mixin(_);
|
1491
|
+
|
1492
|
+
// Add all mutator Array functions to the wrapper.
|
1493
|
+
_.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
|
1494
|
+
var method = ArrayProto[name];
|
1495
|
+
_.prototype[name] = function() {
|
1496
|
+
var obj = this._wrapped;
|
1497
|
+
method.apply(obj, arguments);
|
1498
|
+
if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];
|
1499
|
+
return result(this, obj);
|
1500
|
+
};
|
1501
|
+
});
|
1502
|
+
|
1503
|
+
// Add all accessor Array functions to the wrapper.
|
1504
|
+
_.each(['concat', 'join', 'slice'], function(name) {
|
1505
|
+
var method = ArrayProto[name];
|
1506
|
+
_.prototype[name] = function() {
|
1507
|
+
return result(this, method.apply(this._wrapped, arguments));
|
1508
|
+
};
|
1509
|
+
});
|
1510
|
+
|
1511
|
+
// Extracts the result from a wrapped and chained object.
|
1512
|
+
_.prototype.value = function() {
|
1513
|
+
return this._wrapped;
|
1514
|
+
};
|
1515
|
+
|
1516
|
+
// Provide unwrapping proxy for some methods used in engine operations
|
1517
|
+
// such as arithmetic and JSON stringification.
|
1518
|
+
_.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
|
1519
|
+
|
1520
|
+
_.prototype.toString = function() {
|
1521
|
+
return '' + this._wrapped;
|
1522
|
+
};
|
1523
|
+
|
1524
|
+
// AMD registration happens at the end for compatibility with AMD loaders
|
1525
|
+
// that may not enforce next-turn semantics on modules. Even though general
|
1526
|
+
// practice for AMD registration is to be anonymous, underscore registers
|
1527
|
+
// as a named module because, like jQuery, it is a base library that is
|
1528
|
+
// popular enough to be bundled in a third party lib, but not be part of
|
1529
|
+
// an AMD load request. Those cases could generate an error when an
|
1530
|
+
// anonymous define() is called outside of a loader request.
|
1531
|
+
if (typeof define === 'function' && define.amd) {
|
1532
|
+
define('underscore', [], function() {
|
1533
|
+
return _;
|
1534
|
+
});
|
1535
|
+
}
|
1536
|
+
}.call(this));
|