glebtv-ckeditor 4.2.1.5 → 4.3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +37 -1
- data/README.md +286 -0
- data/Rakefile +76 -63
- data/app/assets/javascripts/ckeditor/application.js +1 -0
- data/app/assets/javascripts/ckeditor/config.js.erb +59 -20
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/{application.js → application.js.erb} +11 -2
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.endless-scroll.js +300 -0
- data/app/assets/javascripts/ckeditor/filebrowser/stylesheets/{uploader.css → uploader.css.erb} +6 -2
- data/app/assets/javascripts/ckeditor/init.js.erb +1 -6
- data/app/assets/javascripts/ckeditor/override.js.erb +22 -0
- data/app/assets/stylesheets/ckcontent.css +103 -0
- data/app/controllers/ckeditor/application_controller.rb +5 -4
- data/app/controllers/ckeditor/attachment_files_controller.rb +12 -10
- data/app/controllers/ckeditor/pictures_controller.rb +12 -10
- data/app/helpers/ckeditor/application_helper.rb +1 -1
- data/app/views/ckeditor/attachment_files/index.html.erb +11 -5
- data/app/views/ckeditor/pictures/index.html.erb +12 -6
- data/app/views/ckeditor/shared/_asset.html.erb +2 -2
- data/app/views/ckeditor/shared/_asset_tmpl.html.erb +3 -3
- data/app/views/layouts/ckeditor/application.html.erb +0 -1
- data/config/locales/cs.ckeditor.yml +1 -0
- data/config/locales/de.ckeditor.yml +9 -0
- data/config/locales/el-GR.cdkeditor.yml +9 -0
- data/config/locales/en.ckeditor.yml +1 -0
- data/config/locales/es.ckeditor.yml +1 -0
- data/config/locales/fr.ckeditor.yml +1 -0
- data/config/locales/hu.ckeditor.yml +9 -0
- data/config/locales/it.ckeditor.yml +1 -0
- data/config/locales/nl.ckeditor.yml +2 -1
- data/config/locales/pl.ckeditor.yml +1 -0
- data/config/locales/pt-BR.ckeditor.yml +2 -1
- data/config/locales/pt-PT.ckeditor.yml +9 -0
- data/config/locales/ru.ckeditor.yml +1 -0
- data/config/locales/sv-SE.ckeditor.yml +1 -0
- data/config/locales/uk.ckeditor.yml +1 -0
- data/config/locales/zh-CN.ckeditor.yml +1 -0
- data/lib/ckeditor.rb +63 -13
- data/lib/ckeditor/backend/carrierwave.rb +9 -9
- data/lib/ckeditor/backend/dragonfly.rb +2 -2
- data/lib/ckeditor/backend/paperclip.rb +4 -4
- data/lib/ckeditor/engine.rb +6 -6
- data/lib/ckeditor/helpers/controllers.rb +7 -7
- data/lib/ckeditor/helpers/form_builder.rb +1 -1
- data/lib/ckeditor/helpers/form_helper.rb +2 -21
- data/lib/ckeditor/helpers/view_helper.rb +2 -13
- data/lib/ckeditor/hooks/cancan.rb +2 -2
- data/lib/ckeditor/hooks/formtastic.rb +1 -1
- data/lib/ckeditor/hooks/pundit.rb +47 -0
- data/lib/ckeditor/http.rb +8 -7
- data/lib/ckeditor/orm/active_record.rb +3 -3
- data/lib/ckeditor/orm/base.rb +4 -6
- data/lib/ckeditor/orm/mongoid.rb +4 -4
- data/lib/ckeditor/paginatable.rb +56 -0
- data/lib/ckeditor/text_area.rb +52 -0
- data/lib/ckeditor/utils.rb +54 -36
- data/lib/ckeditor/version.rb +1 -4
- data/lib/generators/ckeditor/install_generator.rb +10 -10
- data/lib/generators/ckeditor/pundit_policy_generator.rb +22 -0
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/asset.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +4 -4
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/attachment_file.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +2 -2
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_attachment_file_uploader.rb +1 -1
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_picture_uploader.rb +1 -1
- data/lib/generators/ckeditor/templates/ckeditor.rb +21 -16
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/asset.rb +1 -1
- data/lib/generators/ckeditor/templates/pundit_policy/attachment_file_policy.rb +20 -0
- data/lib/generators/ckeditor/templates/pundit_policy/picture_policy.rb +20 -0
- data/test/ckeditor_test.rb +54 -1
- data/test/controllers/attachment_files_controller_test.rb +15 -15
- data/test/controllers/pictures_controller_test.rb +15 -15
- data/test/dummy/app/views/posts/index.html.erb +1 -1
- data/test/dummy/config/routes.rb +1 -1
- data/test/dummy/log/test.log +301 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0ff571a66f03f4c98305b82fbc097934 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/1c2a2034cd1d6490a47e1f2b22a328f3 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/233a499dd1009ab5b2a8040346715629 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2a79c1fcf4595c4bfb3a1e77a732b9e9 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2bb1e656d1d1c20542dd47020608ce4b +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/371bf96e99717688ed7313a0c53f4212 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/3c088129885aa2261da0ab21707aa851 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/5296ab0e7196335ed50f33e398de0470 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/62133d9323b94de8b0cd2a3e490e0374 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/6fc757c2c8329244ca95d6909865bbc2 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/70f2d021b0f59639252116032aa12a5d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/73eff3be45044b7438486d533547c02c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/7869bf4c6f26bcd697a78ffd20655de5 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/88d81ff5585179f4acb7ba76bdcb1244 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/990c65e42e2a681340e62644dd07782b +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/aaf14684bcb6dafb17154d27c3d5a5de +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b2141ea733727ae31693b5129d431629 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c1469bfe5d5645440961cc1e8fd48120 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c479f0465142b7c9c5a9c58a256335d7 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c73d53992216d52410b542dce76742ad +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c7476f60577593bf79ca5b6334b86903 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cb4a5e7fc592c6023ed2acc5953b4685 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d7e7d3b3729ff516f81682711ea8a53a +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d9b8613a01ff7c7d9fe1a6b7cd5497ff +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e4513c04c145290b038978a8f471d244 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e65823156ac3891c4779224e828d4877 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f20469686afebc55828d93a978e5ff20 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f24d6c64fd96102c27c1f10e82ebf864 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f33022711bcfc1cae3955a1de79fe280 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f69b1a9a1323d97109283e5bd378c23d +0 -0
- data/test/functional/posts_controller_test.rb +4 -4
- data/test/generators/install_generator_test.rb +7 -7
- data/test/models/attachment_file_test.rb +2 -2
- data/test/models/picture_test.rb +2 -2
- data/test/models/utils_test.rb +4 -5
- data/test/support/helpers.rb +8 -8
- data/test/tmp/app/models/ckeditor/asset.rb +5 -0
- data/test/tmp/app/models/ckeditor/attachment_file.rb +12 -0
- data/test/tmp/app/models/ckeditor/picture.rb +13 -0
- data/test/tmp/config/initializers/ckeditor.rb +26 -0
- data/test/tmp/config/routes.rb +5 -0
- data/vendor/assets/javascripts/ckeditor/CHANGES.md +414 -0
- data/{app → vendor}/assets/javascripts/ckeditor/LICENSE.md +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/README.md +1 -1
- data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +10 -0
- data/vendor/assets/javascripts/ckeditor/build-config.js +165 -0
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +978 -0
- data/vendor/assets/javascripts/ckeditor/config.js +10 -0
- data/vendor/assets/javascripts/ckeditor/lang/en.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ru.js +5 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/ckcss.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/css/styles.css +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/dialogs/ckcss.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/lang/en.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/lang/ru.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/CKCss/plugin.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +4 -2
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +4 -2
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/AutoComplete.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/AutoFormat.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/CommentSelectedRange.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/SearchCode.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/UncommentSelectedRange.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +1 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/lang/en.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/lang/ru.js +3 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +335 -90
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-day.css +34 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-night.css +34 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance-mobile.css +5 -5
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance.css +75 -75
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-dark.css +34 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-light.css +34 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/blackboard.css +28 -25
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/cobalt.css +21 -18
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/eclipse.css +23 -25
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/elegant.css +13 -10
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/erlang-dark.css +30 -21
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +47 -44
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/mbo.css +37 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/midnight.css +43 -52
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +29 -28
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/neat.css +12 -9
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/night.css +24 -21
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-dark.css +34 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-light.css +34 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/rubyblue.css +23 -21
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +180 -207
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/the-matrix.css +26 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/tomorrow-night-eighties.css +34 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/twilight.css +28 -26
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/vibrant-ink.css +30 -27
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-dark.css +49 -46
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-light.css +43 -43
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +5 -5
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/fakeobjects/images/spacer.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +2 -2
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/{app/assets/javascripts/ckeditor/skins/moono → vendor/assets/javascripts/ckeditor/plugins}/icons_hidpi.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/iframe/images/placeholder.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/iframedialog/plugin.js +13 -13
- data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +43 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/image/images/noimage.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/ipsum/icon.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/ipsum/plugin.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +8 -7
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/magicline/images/icon.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/map/example_usage.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/map/map.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/map/plugin.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/mediaembed/icons/hidpi/mediaembed.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/mediaembed/icons/mediaembed.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/mediaembed/plugin.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/preview/preview.html +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/scayt/README.md +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +20 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +6 -6
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +4 -4
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/default.js +2 -2
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wordcount/css/wordcount.css +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +11 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +72 -31
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/README.md +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmp.html +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +31 -31
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc_ie.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/images/icon.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/youtube/lang/en.js +1 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/youtube/lang/ru.js +1 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/youtube/plugin.js +56 -15
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css.scss +768 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css.scss +809 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css.scss +841 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css.scss +822 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css.scss +813 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_opera.css.scss +781 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css.scss +2125 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css.scss +2134 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css.scss +2183 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css.scss +2351 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css.scss +2195 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css.scss +2243 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
- data/{app/assets/javascripts/ckeditor/plugins → vendor/assets/javascripts/ckeditor/skins/moono}/icons_hidpi.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/arrow.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/hidpi/close.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/lock-open.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/lock.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/images/refresh.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/moono/readme.md +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/styles.js +2 -2
- metadata +445 -352
- data/README.rdoc +0 -12
- data/app/assets/javascripts/ckeditor/CHANGES.md +0 -233
- data/app/assets/javascripts/ckeditor/build-config.js +0 -103
- data/app/assets/javascripts/ckeditor/ckeditor.js +0 -929
- data/app/assets/javascripts/ckeditor/contents.css +0 -103
- data/app/assets/javascripts/ckeditor/lang/en.js +0 -5
- data/app/assets/javascripts/ckeditor/lang/ru.js +0 -5
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +0 -10
- data/app/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +0 -1
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +0 -1
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +0 -5637
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.modes.min.js +0 -1
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.search-addons.min.js +0 -1
- data/app/assets/javascripts/ckeditor/plugins/font/lang/en.js +0 -14
- data/app/assets/javascripts/ckeditor/plugins/font/lang/ru.js +0 -14
- data/app/assets/javascripts/ckeditor/plugins/font/plugin.js +0 -225
- data/app/assets/javascripts/ckeditor/plugins/highslide/dialogs/hs.js +0 -73
- data/app/assets/javascripts/ckeditor/plugins/highslide/icon.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/highslide/lang/en.js +0 -7
- data/app/assets/javascripts/ckeditor/plugins/highslide/lang/ru.js +0 -7
- data/app/assets/javascripts/ckeditor/plugins/highslide/plugin.js +0 -26
- data/app/assets/javascripts/ckeditor/plugins/highslide/readme.txt +0 -55
- data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/docs/install.html +0 -93
- data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/docs/styles.css +0 -59
- data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/icon1.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/icon2.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/htmlbuttons/icon3.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/iframe/icons/hidpi/iframe.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/iframe/icons/iframe.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/iframe/lang/en.js +0 -11
- data/app/assets/javascripts/ckeditor/plugins/iframe/lang/ru.js +0 -11
- data/app/assets/javascripts/ckeditor/plugins/iframe/plugin.js +0 -83
- data/app/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +0 -43
- data/app/assets/javascripts/ckeditor/plugins/oembed/images/icon.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/oembed/images/placeholder.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/oembed/libs/jquery.oembed.js +0 -70
- data/app/assets/javascripts/ckeditor/plugins/oembed/libs/jquery.oembed.min.js +0 -71
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/images/icon.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/images/placeholder.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/lang/en.js +0 -23
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/lang/ru.js +0 -23
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/libs/jquery.oembed.js +0 -971
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/libs/jquery.oembed.min.js +0 -11
- data/app/assets/javascripts/ckeditor/plugins/oembed/oembed/plugin.js +0 -373
- data/app/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +0 -20
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/app/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/assets/sample.css +0 -70
- data/app/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/stylesheetparser.html +0 -82
- data/app/assets/javascripts/ckeditor/plugins/symbol/dialogs/lang/en.js +0 -181
- data/app/assets/javascripts/ckeditor/plugins/symbol/dialogs/symbol.js +0 -18
- data/app/assets/javascripts/ckeditor/plugins/symbol/icons/symbol.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/symbol/lang/en.js +0 -1
- data/app/assets/javascripts/ckeditor/plugins/symbol/plugin.js +0 -15
- data/app/assets/javascripts/ckeditor/plugins/uicolor/dialogs/uicolor.js +0 -9
- data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/yui.css +0 -15
- data/app/assets/javascripts/ckeditor/plugins/uicolor/yui/yui.js +0 -225
- data/app/assets/javascripts/ckeditor/plugins/youtube/images/icon.png +0 -0
- data/app/assets/javascripts/ckeditor/skins/moono/dialog.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/dialog_opera.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/editor.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/editor_ie.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +0 -5
- data/app/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
- data/lib/ckeditor/tasks.rake +0 -11
@@ -0,0 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
|
6
|
+
CKEDITOR.editorConfig = function( config ) {
|
7
|
+
// Define changes to default configuration here. For example:
|
8
|
+
// config.language = 'fr';
|
9
|
+
// config.uiColor = '#AADC6E';
|
10
|
+
};
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.lang['en']={"editor":"Rich Text Editor","editorPanel":"Rich Text Editor panel","common":{"editorHelp":"Press ALT 0 for help","browseServer":"Browse Server","url":"URL","protocol":"Protocol","upload":"Upload","uploadSubmit":"Send it to the Server","image":"Image","flash":"Flash","form":"Form","checkbox":"Checkbox","radio":"Radio Button","textField":"Text Field","textarea":"Textarea","hiddenField":"Hidden Field","button":"Button","select":"Selection Field","imageButton":"Image Button","notSet":"<not set>","id":"Id","name":"Name","langDir":"Language Direction","langDirLtr":"Left to Right (LTR)","langDirRtl":"Right to Left (RTL)","langCode":"Language Code","longDescr":"Long Description URL","cssClass":"Stylesheet Classes","advisoryTitle":"Advisory Title","cssStyle":"Style","ok":"OK","cancel":"Cancel","close":"Close","preview":"Preview","resize":"Resize","generalTab":"General","advancedTab":"Advanced","validateNumberFailed":"This value is not a number.","confirmNewPage":"Any unsaved changes to this content will be lost. Are you sure you want to load new page?","confirmCancel":"You have changed some options. Are you sure you want to close the dialog window?","options":"Options","target":"Target","targetNew":"New Window (_blank)","targetTop":"Topmost Window (_top)","targetSelf":"Same Window (_self)","targetParent":"Parent Window (_parent)","langDirLTR":"Left to Right (LTR)","langDirRTL":"Right to Left (RTL)","styles":"Style","cssClasses":"Stylesheet Classes","width":"Width","height":"Height","align":"Alignment","alignLeft":"Left","alignRight":"Right","alignCenter":"Center","alignTop":"Top","alignMiddle":"Middle","alignBottom":"Bottom","invalidValue":"Invalid value.","invalidHeight":"Height must be a number.","invalidWidth":"Width must be a number.","invalidCssLength":"Value specified for the \"%1\" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).","invalidHtmlLength":"Value specified for the \"%1\" field must be a positive number with or without a valid HTML measurement unit (px or %).","invalidInlineStyle":"Value specified for the inline style must consist of one or more tuples with the format of \"name : value\", separated by semi-colons.","cssLengthTooltip":"Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).","unavailable":"%1<span class=\"cke_accessibility\">, unavailable</span>"},"about":{"copy":"Copyright © $1. All rights reserved.","dlgTitle":"About CKEditor","help":"Check $1 for help.","moreInfo":"For licensing information please visit our web site:","title":"About CKEditor","userGuide":"CKEditor User's Guide"},"basicstyles":{"bold":"Bold","italic":"Italic","strike":"Strike Through","subscript":"Subscript","superscript":"Superscript","underline":"Underline"},"bidi":{"ltr":"Text direction from left to right","rtl":"Text direction from right to left"},"blockquote":{"toolbar":"Block Quote"},"clipboard":{"copy":"Copy","copyError":"Your browser security settings don't permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl/Cmd+C).","cut":"Cut","cutError":"Your browser security settings don't permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl/Cmd+X).","paste":"Paste","pasteArea":"Paste Area","pasteMsg":"Please paste inside the following box using the keyboard (<strong>Ctrl/Cmd+V</strong>) and hit OK","securityMsg":"Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.","title":"Paste"},"button":{"selectedLabel":"%1 (Selected)"},"colorbutton":{"auto":"Automatic","bgColorTitle":"Background Color","colors":{"000":"Black","800000":"Maroon","8B4513":"Saddle Brown","2F4F4F":"Dark Slate Gray","008080":"Teal","000080":"Navy","4B0082":"Indigo","696969":"Dark Gray","B22222":"Fire Brick","A52A2A":"Brown","DAA520":"Golden Rod","006400":"Dark Green","40E0D0":"Turquoise","0000CD":"Medium Blue","800080":"Purple","808080":"Gray","F00":"Red","FF8C00":"Dark Orange","FFD700":"Gold","008000":"Green","0FF":"Cyan","00F":"Blue","EE82EE":"Violet","A9A9A9":"Dim Gray","FFA07A":"Light Salmon","FFA500":"Orange","FFFF00":"Yellow","00FF00":"Lime","AFEEEE":"Pale Turquoise","ADD8E6":"Light Blue","DDA0DD":"Plum","D3D3D3":"Light Grey","FFF0F5":"Lavender Blush","FAEBD7":"Antique White","FFFFE0":"Light Yellow","F0FFF0":"Honeydew","F0FFFF":"Azure","F0F8FF":"Alice Blue","E6E6FA":"Lavender","FFF":"White"},"more":"More Colors...","panelTitle":"Colors","textColorTitle":"Text Color"},"colordialog":{"clear":"Clear","highlight":"Highlight","options":"Color Options","selected":"Selected Color","title":"Select color"},"templates":{"button":"Templates","emptyListMsg":"(No templates defined)","insertOption":"Replace actual contents","options":"Template Options","selectPromptMsg":"Please select the template to open in the editor","title":"Content Templates"},"contextmenu":{"options":"Context Menu Options"},"div":{"IdInputLabel":"Id","advisoryTitleInputLabel":"Advisory Title","cssClassInputLabel":"Stylesheet Classes","edit":"Edit Div","inlineStyleInputLabel":"Inline Style","langDirLTRLabel":"Left to Right (LTR)","langDirLabel":"Language Direction","langDirRTLLabel":"Right to Left (RTL)","languageCodeInputLabel":" Language Code","remove":"Remove Div","styleSelectLabel":"Style","title":"Create Div Container","toolbar":"Create Div Container"},"toolbar":{"toolbarCollapse":"Collapse Toolbar","toolbarExpand":"Expand Toolbar","toolbarGroups":{"document":"Document","clipboard":"Clipboard/Undo","editing":"Editing","forms":"Forms","basicstyles":"Basic Styles","paragraph":"Paragraph","links":"Links","insert":"Insert","styles":"Styles","colors":"Colors","tools":"Tools"},"toolbars":"Editor toolbars"},"elementspath":{"eleLabel":"Elements path","eleTitle":"%1 element"},"find":{"find":"Find","findOptions":"Find Options","findWhat":"Find what:","matchCase":"Match case","matchCyclic":"Match cyclic","matchWord":"Match whole word","notFoundMsg":"The specified text was not found.","replace":"Replace","replaceAll":"Replace All","replaceSuccessMsg":"%1 occurrence(s) replaced.","replaceWith":"Replace with:","title":"Find and Replace"},"fakeobjects":{"anchor":"Anchor","flash":"Flash Animation","hiddenfield":"Hidden Field","iframe":"IFrame","unknown":"Unknown Object"},"flash":{"access":"Script Access","accessAlways":"Always","accessNever":"Never","accessSameDomain":"Same domain","alignAbsBottom":"Abs Bottom","alignAbsMiddle":"Abs Middle","alignBaseline":"Baseline","alignTextTop":"Text Top","bgcolor":"Background color","chkFull":"Allow Fullscreen","chkLoop":"Loop","chkMenu":"Enable Flash Menu","chkPlay":"Auto Play","flashvars":"Variables for Flash","hSpace":"HSpace","properties":"Flash Properties","propertiesTab":"Properties","quality":"Quality","qualityAutoHigh":"Auto High","qualityAutoLow":"Auto Low","qualityBest":"Best","qualityHigh":"High","qualityLow":"Low","qualityMedium":"Medium","scale":"Scale","scaleAll":"Show all","scaleFit":"Exact Fit","scaleNoBorder":"No Border","title":"Flash Properties","vSpace":"VSpace","validateHSpace":"HSpace must be a number.","validateSrc":"URL must not be empty.","validateVSpace":"VSpace must be a number.","windowMode":"Window mode","windowModeOpaque":"Opaque","windowModeTransparent":"Transparent","windowModeWindow":"Window"},"font":{"fontSize":{"label":"Size","voiceLabel":"Font Size","panelTitle":"Font Size"},"label":"Font","panelTitle":"Font Name","voiceLabel":"Font"},"forms":{"button":{"title":"Button Properties","text":"Text (Value)","type":"Type","typeBtn":"Button","typeSbm":"Submit","typeRst":"Reset"},"checkboxAndRadio":{"checkboxTitle":"Checkbox Properties","radioTitle":"Radio Button Properties","value":"Value","selected":"Selected"},"form":{"title":"Form Properties","menu":"Form Properties","action":"Action","method":"Method","encoding":"Encoding"},"hidden":{"title":"Hidden Field Properties","name":"Name","value":"Value"},"select":{"title":"Selection Field Properties","selectInfo":"Select Info","opAvail":"Available Options","value":"Value","size":"Size","lines":"lines","chkMulti":"Allow multiple selections","opText":"Text","opValue":"Value","btnAdd":"Add","btnModify":"Modify","btnUp":"Up","btnDown":"Down","btnSetValue":"Set as selected value","btnDelete":"Delete"},"textarea":{"title":"Textarea Properties","cols":"Columns","rows":"Rows"},"textfield":{"title":"Text Field Properties","name":"Name","value":"Value","charWidth":"Character Width","maxChars":"Maximum Characters","type":"Type","typeText":"Text","typePass":"Password","typeEmail":"Email","typeSearch":"Search","typeTel":"Telephone Number","typeUrl":"URL"}},"format":{"label":"Format","panelTitle":"Paragraph Format","tag_address":"Address","tag_div":"Normal (DIV)","tag_h1":"Heading 1","tag_h2":"Heading 2","tag_h3":"Heading 3","tag_h4":"Heading 4","tag_h5":"Heading 5","tag_h6":"Heading 6","tag_p":"Normal","tag_pre":"Formatted"},"horizontalrule":{"toolbar":"Insert Horizontal Line"},"iframe":{"border":"Show frame border","noUrl":"Please type the iframe URL","scrolling":"Enable scrollbars","title":"IFrame Properties","toolbar":"IFrame"},"image":{"alertUrl":"Please type the image URL","alt":"Alternative Text","border":"Border","btnUpload":"Send it to the Server","button2Img":"Do you want to transform the selected image button on a simple image?","hSpace":"HSpace","img2Button":"Do you want to transform the selected image on a image button?","infoTab":"Image Info","linkTab":"Link","lockRatio":"Lock Ratio","menu":"Image Properties","resetSize":"Reset Size","title":"Image Properties","titleButton":"Image Button Properties","upload":"Upload","urlMissing":"Image source URL is missing.","vSpace":"VSpace","validateBorder":"Border must be a whole number.","validateHSpace":"HSpace must be a whole number.","validateVSpace":"VSpace must be a whole number."},"indent":{"indent":"Increase Indent","outdent":"Decrease Indent"},"smiley":{"options":"Smiley Options","title":"Insert a Smiley","toolbar":"Smiley"},"justify":{"block":"Justify","center":"Center","left":"Align Left","right":"Align Right"},"language":{"button":"Set language","remove":"Remove language"},"link":{"acccessKey":"Access Key","advanced":"Advanced","advisoryContentType":"Advisory Content Type","advisoryTitle":"Advisory Title","anchor":{"toolbar":"Anchor","menu":"Edit Anchor","title":"Anchor Properties","name":"Anchor Name","errorName":"Please type the anchor name","remove":"Remove Anchor"},"anchorId":"By Element Id","anchorName":"By Anchor Name","charset":"Linked Resource Charset","cssClasses":"Stylesheet Classes","emailAddress":"E-Mail Address","emailBody":"Message Body","emailSubject":"Message Subject","id":"Id","info":"Link Info","langCode":"Language Code","langDir":"Language Direction","langDirLTR":"Left to Right (LTR)","langDirRTL":"Right to Left (RTL)","menu":"Edit Link","name":"Name","noAnchors":"(No anchors available in the document)","noEmail":"Please type the e-mail address","noUrl":"Please type the link URL","other":"<other>","popupDependent":"Dependent (Netscape)","popupFeatures":"Popup Window Features","popupFullScreen":"Full Screen (IE)","popupLeft":"Left Position","popupLocationBar":"Location Bar","popupMenuBar":"Menu Bar","popupResizable":"Resizable","popupScrollBars":"Scroll Bars","popupStatusBar":"Status Bar","popupToolbar":"Toolbar","popupTop":"Top Position","rel":"Relationship","selectAnchor":"Select an Anchor","styles":"Style","tabIndex":"Tab Index","target":"Target","targetFrame":"<frame>","targetFrameName":"Target Frame Name","targetPopup":"<popup window>","targetPopupName":"Popup Window Name","title":"Link","toAnchor":"Link to anchor in the text","toEmail":"E-mail","toUrl":"URL","toolbar":"Link","type":"Link Type","unlink":"Unlink","upload":"Upload"},"list":{"bulletedlist":"Insert/Remove Bulleted List","numberedlist":"Insert/Remove Numbered List"},"liststyle":{"armenian":"Armenian numbering","bulletedTitle":"Bulleted List Properties","circle":"Circle","decimal":"Decimal (1, 2, 3, etc.)","decimalLeadingZero":"Decimal leading zero (01, 02, 03, etc.)","disc":"Disc","georgian":"Georgian numbering (an, ban, gan, etc.)","lowerAlpha":"Lower Alpha (a, b, c, d, e, etc.)","lowerGreek":"Lower Greek (alpha, beta, gamma, etc.)","lowerRoman":"Lower Roman (i, ii, iii, iv, v, etc.)","none":"None","notset":"<not set>","numberedTitle":"Numbered List Properties","square":"Square","start":"Start","type":"Type","upperAlpha":"Upper Alpha (A, B, C, D, E, etc.)","upperRoman":"Upper Roman (I, II, III, IV, V, etc.)","validateStartNumber":"List start number must be a whole number."},"magicline":{"title":"Insert paragraph here"},"maximize":{"maximize":"Maximize","minimize":"Minimize"},"newpage":{"toolbar":"New Page"},"pagebreak":{"alt":"Page Break","toolbar":"Insert Page Break for Printing"},"pastetext":{"button":"Paste as plain text","title":"Paste as Plain Text"},"pastefromword":{"confirmCleanup":"The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?","error":"It was not possible to clean up the pasted data due to an internal error","title":"Paste from Word","toolbar":"Paste from Word"},"preview":{"preview":"Preview"},"print":{"toolbar":"Print"},"removeformat":{"toolbar":"Remove Format"},"save":{"toolbar":"Save"},"selectall":{"toolbar":"Select All"},"showblocks":{"toolbar":"Show Blocks"},"sourcearea":{"toolbar":"Source"},"specialchar":{"options":"Special Character Options","title":"Select Special Character","toolbar":"Insert Special Character"},"scayt":{"about":"About SCAYT","aboutTab":"About","addWord":"Add Word","allCaps":"Ignore All-Caps Words","dic_create":"Create","dic_delete":"Delete","dic_field_name":"Dictionary name","dic_info":"Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.","dic_rename":"Rename","dic_restore":"Restore","dictionariesTab":"Dictionaries","disable":"Disable SCAYT","emptyDic":"Dictionary name should not be empty.","enable":"Enable SCAYT","ignore":"Ignore","ignoreAll":"Ignore All","ignoreDomainNames":"Ignore Domain Names","langs":"Languages","languagesTab":"Languages","mixedCase":"Ignore Words with Mixed Case","mixedWithDigits":"Ignore Words with Numbers","moreSuggestions":"More suggestions","opera_title":"Not supported by Opera","options":"Options","optionsTab":"Options","title":"Spell Check As You Type","toggle":"Toggle SCAYT","noSuggestions":"No suggestion"},"stylescombo":{"label":"Styles","panelTitle":"Formatting Styles","panelTitle1":"Block Styles","panelTitle2":"Inline Styles","panelTitle3":"Object Styles"},"table":{"border":"Border size","caption":"Caption","cell":{"menu":"Cell","insertBefore":"Insert Cell Before","insertAfter":"Insert Cell After","deleteCell":"Delete Cells","merge":"Merge Cells","mergeRight":"Merge Right","mergeDown":"Merge Down","splitHorizontal":"Split Cell Horizontally","splitVertical":"Split Cell Vertically","title":"Cell Properties","cellType":"Cell Type","rowSpan":"Rows Span","colSpan":"Columns Span","wordWrap":"Word Wrap","hAlign":"Horizontal Alignment","vAlign":"Vertical Alignment","alignBaseline":"Baseline","bgColor":"Background Color","borderColor":"Border Color","data":"Data","header":"Header","yes":"Yes","no":"No","invalidWidth":"Cell width must be a number.","invalidHeight":"Cell height must be a number.","invalidRowSpan":"Rows span must be a whole number.","invalidColSpan":"Columns span must be a whole number.","chooseColor":"Choose"},"cellPad":"Cell padding","cellSpace":"Cell spacing","column":{"menu":"Column","insertBefore":"Insert Column Before","insertAfter":"Insert Column After","deleteColumn":"Delete Columns"},"columns":"Columns","deleteTable":"Delete Table","headers":"Headers","headersBoth":"Both","headersColumn":"First column","headersNone":"None","headersRow":"First Row","invalidBorder":"Border size must be a number.","invalidCellPadding":"Cell padding must be a positive number.","invalidCellSpacing":"Cell spacing must be a positive number.","invalidCols":"Number of columns must be a number greater than 0.","invalidHeight":"Table height must be a number.","invalidRows":"Number of rows must be a number greater than 0.","invalidWidth":"Table width must be a number.","menu":"Table Properties","row":{"menu":"Row","insertBefore":"Insert Row Before","insertAfter":"Insert Row After","deleteRow":"Delete Rows"},"rows":"Rows","summary":"Summary","title":"Table Properties","toolbar":"Table","widthPc":"percent","widthPx":"pixels","widthUnit":"width unit"},"undo":{"redo":"Redo","undo":"Undo"},"wsc":{"btnIgnore":"Ignore","btnIgnoreAll":"Ignore All","btnReplace":"Replace","btnReplaceAll":"Replace All","btnUndo":"Undo","changeTo":"Change to","errorLoading":"Error loading application service host: %s.","ieSpellDownload":"Spell checker not installed. Do you want to download it now?","manyChanges":"Spell check complete: %1 words changed","noChanges":"Spell check complete: No words changed","noMispell":"Spell check complete: No misspellings found","noSuggestions":"- No suggestions -","notAvailable":"Sorry, but service is unavailable now.","notInDic":"Not in dictionary","oneChange":"Spell check complete: One word changed","progress":"Spell check in progress...","title":"Spell Check","toolbar":"Check Spelling"}};
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.lang['ru']={"editor":"Визуальный текстовый редактор","editorPanel":"Визуальный редактор текста","common":{"editorHelp":"Нажмите ALT-0 для открытия справки","browseServer":"Выбор на сервере","url":"Ссылка","protocol":"Протокол","upload":"Загрузка файла","uploadSubmit":"Загрузить на сервер","image":"Изображение","flash":"Flash","form":"Форма","checkbox":"Чекбокс","radio":"Радиокнопка","textField":"Текстовое поле","textarea":"Многострочное текстовое поле","hiddenField":"Скрытое поле","button":"Кнопка","select":"Выпадающий список","imageButton":"Кнопка-изображение","notSet":"<не указано>","id":"Идентификатор","name":"Имя","langDir":"Направление текста","langDirLtr":"Слева направо (LTR)","langDirRtl":"Справа налево (RTL)","langCode":"Код языка","longDescr":"Длинное описание ссылки","cssClass":"Класс CSS","advisoryTitle":"Заголовок","cssStyle":"Стиль","ok":"ОК","cancel":"Отмена","close":"Закрыть","preview":"Предпросмотр","resize":"Перетащите для изменения размера","generalTab":"Основное","advancedTab":"Дополнительно","validateNumberFailed":"Это значение не является числом.","confirmNewPage":"Несохранённые изменения будут потеряны! Вы действительно желаете перейти на другую страницу?","confirmCancel":"Некоторые параметры были изменены. Вы уверены, что желаете закрыть без сохранения?","options":"Параметры","target":"Цель","targetNew":"Новое окно (_blank)","targetTop":"Главное окно (_top)","targetSelf":"Текущее окно (_self)","targetParent":"Родительское окно (_parent)","langDirLTR":"Слева направо (LTR)","langDirRTL":"Справа налево (RTL)","styles":"Стиль","cssClasses":"CSS классы","width":"Ширина","height":"Высота","align":"Выравнивание","alignLeft":"По левому краю","alignRight":"По правому краю","alignCenter":"По центру","alignTop":"Поверху","alignMiddle":"Посередине","alignBottom":"Понизу","invalidValue":"Недопустимое значение.","invalidHeight":"Высота задается числом.","invalidWidth":"Ширина задается числом.","invalidCssLength":"Значение, указанное в поле \"%1\", должно быть положительным целым числом. Допускается указание единиц меры CSS (px, %, in, cm, mm, em, ex, pt или pc).","invalidHtmlLength":"Значение, указанное в поле \"%1\", должно быть положительным целым числом. Допускается указание единиц меры HTML (px или %).","invalidInlineStyle":"Значение, указанное для стиля элемента, должно состоять из одной или нескольких пар данных в формате \"параметр : значение\", разделённых точкой с запятой.","cssLengthTooltip":"Введите значение в пикселях, либо число с корректной единицей меры CSS (px, %, in, cm, mm, em, ex, pt или pc).","unavailable":"%1<span class=\"cke_accessibility\">, недоступно</span>"},"about":{"copy":"Copyright © $1. Все права защищены.","dlgTitle":"О CKEditor","help":"$1 содержит подробную справку по использованию.","moreInfo":"Для получения информации о лицензии, пожалуйста, перейдите на наш сайт:","title":"О CKEditor","userGuide":"Руководство пользователя CKEditor"},"basicstyles":{"bold":"Полужирный","italic":"Курсив","strike":"Зачеркнутый","subscript":"Подстрочный индекс","superscript":"Надстрочный индекс","underline":"Подчеркнутый"},"bidi":{"ltr":"Направление текста слева направо","rtl":"Направление текста справа налево"},"blockquote":{"toolbar":"Цитата"},"clipboard":{"copy":"Копировать","copyError":"Настройки безопасности вашего браузера не разрешают редактору выполнять операции по копированию текста. Пожалуйста, используйте для этого клавиатуру (Ctrl/Cmd+C).","cut":"Вырезать","cutError":"Настройки безопасности вашего браузера не разрешают редактору выполнять операции по вырезке текста. Пожалуйста, используйте для этого клавиатуру (Ctrl/Cmd+X).","paste":"Вставить","pasteArea":"Зона для вставки","pasteMsg":"Пожалуйста, вставьте текст в зону ниже, используя клавиатуру (<strong>Ctrl/Cmd+V</strong>) и нажмите кнопку \"OK\".","securityMsg":"Настройки безопасности вашего браузера не разрешают редактору напрямую обращаться к буферу обмена. Вы должны вставить текст снова в это окно.","title":"Вставить"},"button":{"selectedLabel":"%1 (Selected)"},"colorbutton":{"auto":"Автоматически","bgColorTitle":"Цвет фона","colors":{"000":"Чёрный","800000":"Бордовый","8B4513":"Кожано-коричневый","2F4F4F":"Темный синевато-серый","008080":"Сине-зелёный","000080":"Тёмно-синий","4B0082":"Индиго","696969":"Тёмно-серый","B22222":"Кирпичный","A52A2A":"Коричневый","DAA520":"Золотисто-берёзовый","006400":"Темно-зелёный","40E0D0":"Бирюзовый","0000CD":"Умеренно синий","800080":"Пурпурный","808080":"Серый","F00":"Красный","FF8C00":"Темно-оранжевый","FFD700":"Золотистый","008000":"Зелёный","0FF":"Васильковый","00F":"Синий","EE82EE":"Фиолетовый","A9A9A9":"Тускло-серый","FFA07A":"Светло-лососевый","FFA500":"Оранжевый","FFFF00":"Жёлтый","00FF00":"Лайма","AFEEEE":"Бледно-синий","ADD8E6":"Свелто-голубой","DDA0DD":"Сливовый","D3D3D3":"Светло-серый","FFF0F5":"Розово-лавандовый","FAEBD7":"Античный белый","FFFFE0":"Светло-жёлтый","F0FFF0":"Медвяной росы","F0FFFF":"Лазурный","F0F8FF":"Бледно-голубой","E6E6FA":"Лавандовый","FFF":"Белый"},"more":"Ещё цвета...","panelTitle":"Цвета","textColorTitle":"Цвет текста"},"colordialog":{"clear":"Очистить","highlight":"Под курсором","options":"Настройки цвета","selected":"Выбранный цвет","title":"Выберите цвет"},"templates":{"button":"Шаблоны","emptyListMsg":"(не определено ни одного шаблона)","insertOption":"Заменить текущее содержимое","options":"Параметры шаблона","selectPromptMsg":"Пожалуйста, выберите, какой шаблон следует открыть в редакторе","title":"Шаблоны содержимого"},"contextmenu":{"options":"Параметры контекстного меню"},"div":{"IdInputLabel":"Идентификатор","advisoryTitleInputLabel":"Заголовок","cssClassInputLabel":"Классы CSS","edit":"Редактировать контейнер","inlineStyleInputLabel":"Стиль элемента","langDirLTRLabel":"Слева направо (LTR)","langDirLabel":"Направление текста","langDirRTLLabel":"Справа налево (RTL)","languageCodeInputLabel":"Код языка","remove":"Удалить контейнер","styleSelectLabel":"Стиль","title":"Создать Div-контейнер","toolbar":"Создать Div-контейнер"},"toolbar":{"toolbarCollapse":"Свернуть панель инструментов","toolbarExpand":"Развернуть панель инструментов","toolbarGroups":{"document":"Документ","clipboard":"Буфер обмена / Отмена действий","editing":"Корректировка","forms":"Формы","basicstyles":"Простые стили","paragraph":"Абзац","links":"Ссылки","insert":"Вставка","styles":"Стили","colors":"Цвета","tools":"Инструменты"},"toolbars":"Панели инструментов редактора"},"elementspath":{"eleLabel":"Путь элементов","eleTitle":"Элемент %1"},"find":{"find":"Найти","findOptions":"Опции поиска","findWhat":"Найти:","matchCase":"Учитывать регистр","matchCyclic":"По всему тексту","matchWord":"Только слово целиком","notFoundMsg":"Искомый текст не найден.","replace":"Заменить","replaceAll":"Заменить всё","replaceSuccessMsg":"Успешно заменено %1 раз(а).","replaceWith":"Заменить на:","title":"Поиск и замена"},"fakeobjects":{"anchor":"Якорь","flash":"Flash анимация","hiddenfield":"Скрытое поле","iframe":"iFrame","unknown":"Неизвестный объект"},"flash":{"access":"Доступ к скриптам","accessAlways":"Всегда","accessNever":"Никогда","accessSameDomain":"В том же домене","alignAbsBottom":"По низу текста","alignAbsMiddle":"По середине текста","alignBaseline":"По базовой линии","alignTextTop":"По верху текста","bgcolor":"Цвет фона","chkFull":"Разрешить полноэкранный режим","chkLoop":"Повторять","chkMenu":"Включить меню Flash","chkPlay":"Автоматическое воспроизведение","flashvars":"Переменные для Flash","hSpace":"Гориз. отступ","properties":"Свойства Flash","propertiesTab":"Свойства","quality":"Качество","qualityAutoHigh":"Запуск на высоком","qualityAutoLow":"Запуск на низком","qualityBest":"Лучшее","qualityHigh":"Высокое","qualityLow":"Низкое","qualityMedium":"Среднее","scale":"Масштабировать","scaleAll":"Пропорционально","scaleFit":"Заполнять","scaleNoBorder":"Заходить за границы","title":"Свойства Flash","vSpace":"Вертик. отступ","validateHSpace":"Горизонтальный отступ задается числом.","validateSrc":"Вы должны ввести ссылку","validateVSpace":"Вертикальный отступ задается числом.","windowMode":"Взаимодействие с окном","windowModeOpaque":"Непрозрачный","windowModeTransparent":"Прозрачный","windowModeWindow":"Обычный"},"font":{"fontSize":{"label":"Размер","voiceLabel":"Размер шрифта","panelTitle":"Размер шрифта"},"label":"Шрифт","panelTitle":"Шрифт","voiceLabel":"Шрифт"},"forms":{"button":{"title":"Свойства кнопки","text":"Текст (Значение)","type":"Тип","typeBtn":"Кнопка","typeSbm":"Отправка","typeRst":"Сброс"},"checkboxAndRadio":{"checkboxTitle":"Свойства флаговой кнопки","radioTitle":"Свойства кнопки выбора","value":"Значение","selected":"Выбрано"},"form":{"title":"Свойства формы","menu":"Свойства формы","action":"Действие","method":"Метод","encoding":"Кодировка"},"hidden":{"title":"Свойства скрытого поля","name":"Имя","value":"Значение"},"select":{"title":"Свойства списка выбора","selectInfo":"Информация о списке выбора","opAvail":"Доступные варианты","value":"Значение","size":"Размер","lines":"строк(и)","chkMulti":"Разрешить выбор нескольких вариантов","opText":"Текст","opValue":"Значение","btnAdd":"Добавить","btnModify":"Изменить","btnUp":"Поднять","btnDown":"Опустить","btnSetValue":"Пометить как выбранное","btnDelete":"Удалить"},"textarea":{"title":"Свойства многострочного текстового поля","cols":"Колонок","rows":"Строк"},"textfield":{"title":"Свойства текстового поля","name":"Имя","value":"Значение","charWidth":"Ширина поля (в символах)","maxChars":"Макс. количество символов","type":"Тип содержимого","typeText":"Текст","typePass":"Пароль","typeEmail":"Email","typeSearch":"Поиск","typeTel":"Номер телефона","typeUrl":"Ссылка"}},"format":{"label":"Форматирование","panelTitle":"Форматирование","tag_address":"Адрес","tag_div":"Обычное (div)","tag_h1":"Заголовок 1","tag_h2":"Заголовок 2","tag_h3":"Заголовок 3","tag_h4":"Заголовок 4","tag_h5":"Заголовок 5","tag_h6":"Заголовок 6","tag_p":"Обычное","tag_pre":"Моноширинное"},"horizontalrule":{"toolbar":"Вставить горизонтальную линию"},"iframe":{"border":"Показать границы фрейма","noUrl":"Пожалуйста, введите ссылку фрейма","scrolling":"Отображать полосы прокрутки","title":"Свойства iFrame","toolbar":"iFrame"},"image":{"alertUrl":"Пожалуйста, введите ссылку на изображение","alt":"Альтернативный текст","border":"Граница","btnUpload":"Загрузить на сервер","button2Img":"Вы желаете преобразовать это изображение-кнопку в обычное изображение?","hSpace":"Гориз. отступ","img2Button":"Вы желаете преобразовать это обычное изображение в изображение-кнопку?","infoTab":"Данные об изображении","linkTab":"Ссылка","lockRatio":"Сохранять пропорции","menu":"Свойства изображения","resetSize":"Вернуть обычные размеры","title":"Свойства изображения","titleButton":"Свойства изображения-кнопки","upload":"Загрузить","urlMissing":"Не указана ссылка на изображение.","vSpace":"Вертик. отступ","validateBorder":"Размер границ должен быть задан числом.","validateHSpace":"Горизонтальный отступ должен быть задан числом.","validateVSpace":"Вертикальный отступ должен быть задан числом."},"indent":{"indent":"Увеличить отступ","outdent":"Уменьшить отступ"},"smiley":{"options":"Выбор смайла","title":"Вставить смайл","toolbar":"Смайлы"},"justify":{"block":"По ширине","center":"По центру","left":"По левому краю","right":"По правому краю"},"language":{"button":"Установка языка","remove":"Удалить язык"},"link":{"acccessKey":"Клавиша доступа","advanced":"Дополнительно","advisoryContentType":"Тип содержимого","advisoryTitle":"Заголовок","anchor":{"toolbar":"Вставить / редактировать якорь","menu":"Изменить якорь","title":"Свойства якоря","name":"Имя якоря","errorName":"Пожалуйста, введите имя якоря","remove":"Удалить якорь"},"anchorId":"По идентификатору","anchorName":"По имени","charset":"Кодировка ресурса","cssClasses":"Классы CSS","emailAddress":"Email адрес","emailBody":"Текст сообщения","emailSubject":"Тема сообщения","id":"Идентификатор","info":"Информация о ссылке","langCode":"Код языка","langDir":"Направление текста","langDirLTR":"Слева направо (LTR)","langDirRTL":"Справа налево (RTL)","menu":"Редактировать ссылку","name":"Имя","noAnchors":"(В документе нет ни одного якоря)","noEmail":"Пожалуйста, введите email адрес","noUrl":"Пожалуйста, введите ссылку","other":"<другой>","popupDependent":"Зависимое (Netscape)","popupFeatures":"Параметры всплывающего окна","popupFullScreen":"Полноэкранное (IE)","popupLeft":"Отступ слева","popupLocationBar":"Панель адреса","popupMenuBar":"Панель меню","popupResizable":"Изменяемый размер","popupScrollBars":"Полосы прокрутки","popupStatusBar":"Строка состояния","popupToolbar":"Панель инструментов","popupTop":"Отступ сверху","rel":"Отношение","selectAnchor":"Выберите якорь","styles":"Стиль","tabIndex":"Последовательность перехода","target":"Цель","targetFrame":"<фрейм>","targetFrameName":"Имя целевого фрейма","targetPopup":"<всплывающее окно>","targetPopupName":"Имя всплывающего окна","title":"Ссылка","toAnchor":"Ссылка на якорь в тексте","toEmail":"Email","toUrl":"Ссылка","toolbar":"Вставить/Редактировать ссылку","type":"Тип ссылки","unlink":"Убрать ссылку","upload":"Загрузка"},"list":{"bulletedlist":"Вставить / удалить маркированный список","numberedlist":"Вставить / удалить нумерованный список"},"liststyle":{"armenian":"Армянская нумерация","bulletedTitle":"Свойства маркированного списка","circle":"Круг","decimal":"Десятичные (1, 2, 3, и т.д.)","decimalLeadingZero":"Десятичные с ведущим нулём (01, 02, 03, и т.д.)","disc":"Окружность","georgian":"Грузинская нумерация (ани, бани, гани, и т.д.)","lowerAlpha":"Строчные латинские (a, b, c, d, e, и т.д.)","lowerGreek":"Строчные греческие (альфа, бета, гамма, и т.д.)","lowerRoman":"Строчные римские (i, ii, iii, iv, v, и т.д.)","none":"Нет","notset":"<не указано>","numberedTitle":"Свойства нумерованного списка","square":"Квадрат","start":"Начиная с","type":"Тип","upperAlpha":"Заглавные латинские (A, B, C, D, E, и т.д.)","upperRoman":"Заглавные римские (I, II, III, IV, V, и т.д.)","validateStartNumber":"Первый номер списка должен быть задан обычным целым числом."},"magicline":{"title":"Вставить здесь параграф"},"maximize":{"maximize":"Развернуть","minimize":"Свернуть"},"newpage":{"toolbar":"Новая страница"},"pagebreak":{"alt":"Разрыв страницы","toolbar":"Вставить разрыв страницы для печати"},"pastetext":{"button":"Вставить только текст","title":"Вставить только текст"},"pastefromword":{"confirmCleanup":"Текст, который вы желаете вставить, по всей видимости, был скопирован из Word. Следует ли очистить его перед вставкой?","error":"Невозможно очистить вставленные данные из-за внутренней ошибки","title":"Вставить из Word","toolbar":"Вставить из Word"},"preview":{"preview":"Предварительный просмотр"},"print":{"toolbar":"Печать"},"removeformat":{"toolbar":"Убрать форматирование"},"save":{"toolbar":"Сохранить"},"selectall":{"toolbar":"Выделить все"},"showblocks":{"toolbar":"Отображать блоки"},"sourcearea":{"toolbar":"Источник"},"specialchar":{"options":"Выбор специального символа","title":"Выберите специальный символ","toolbar":"Вставить специальный символ"},"scayt":{"about":"О SCAYT","aboutTab":"О SCAYT","addWord":"Добавить слово","allCaps":"Игнорировать слова из заглавных букв","dic_create":"Создать","dic_delete":"Удалить","dic_field_name":"Название словаря","dic_info":"Изначально, пользовательский словарь хранится в cookie, которые ограничены в размере. Когда словарь пользователя вырастает до размеров, что его невозможно хранить в cookie, он переносится на хранение на наш сервер. Чтобы сохранить ваш словарь на нашем сервере, вам следует указать название вашего словаря. Если у вас уже был словарь, который вы сохраняли на нашем сервере, то укажите здесь его название и нажмите кнопку Восстановить.","dic_rename":"Переименовать","dic_restore":"Восстановить","dictionariesTab":"Словари","disable":"Отключить SCAYT","emptyDic":"Вы должны указать название словаря.","enable":"Включить SCAYT","ignore":"Пропустить","ignoreAll":"Пропустить всё","ignoreDomainNames":"Игнорировать доменные имена","langs":"Языки","languagesTab":"Языки","mixedCase":"Игнорировать слова из букв в разном регистре","mixedWithDigits":"Игнорировать слова, содержащие цифры","moreSuggestions":"Ещё варианты","opera_title":"Не поддерживается Opera","options":"Настройки","optionsTab":"Параметры","title":"Проверка орфографии по мере ввода (SCAYT)","toggle":"Переключить SCAYT","noSuggestions":"Нет вариантов"},"stylescombo":{"label":"Стили","panelTitle":"Стили форматирования","panelTitle1":"Стили блока","panelTitle2":"Стили элемента","panelTitle3":"Стили объекта"},"table":{"border":"Размер границ","caption":"Заголовок","cell":{"menu":"Ячейка","insertBefore":"Вставить ячейку слева","insertAfter":"Вставить ячейку справа","deleteCell":"Удалить ячейки","merge":"Объединить ячейки","mergeRight":"Объединить с правой","mergeDown":"Объединить с нижней","splitHorizontal":"Разделить ячейку по горизонтали","splitVertical":"Разделить ячейку по вертикали","title":"Свойства ячейки","cellType":"Тип ячейки","rowSpan":"Объединяет строк","colSpan":"Объединяет колонок","wordWrap":"Перенос по словам","hAlign":"Горизонтальное выравнивание","vAlign":"Вертикальное выравнивание","alignBaseline":"По базовой линии","bgColor":"Цвет фона","borderColor":"Цвет границ","data":"Данные","header":"Заголовок","yes":"Да","no":"Нет","invalidWidth":"Ширина ячейки должна быть числом.","invalidHeight":"Высота ячейки должна быть числом.","invalidRowSpan":"Количество объединяемых строк должно быть задано числом.","invalidColSpan":"Количество объединяемых колонок должно быть задано числом.","chooseColor":"Выберите"},"cellPad":"Внутренний отступ ячеек","cellSpace":"Внешний отступ ячеек","column":{"menu":"Колонка","insertBefore":"Вставить колонку слева","insertAfter":"Вставить колонку справа","deleteColumn":"Удалить колонки"},"columns":"Колонки","deleteTable":"Удалить таблицу","headers":"Заголовки","headersBoth":"Сверху и слева","headersColumn":"Левая колонка","headersNone":"Без заголовков","headersRow":"Верхняя строка","invalidBorder":"Размер границ должен быть числом.","invalidCellPadding":"Внутренний отступ ячеек (cellpadding) должен быть числом.","invalidCellSpacing":"Внешний отступ ячеек (cellspacing) должен быть числом.","invalidCols":"Количество столбцов должно быть больше 0.","invalidHeight":"Высота таблицы должна быть числом.","invalidRows":"Количество строк должно быть больше 0.","invalidWidth":"Ширина таблицы должна быть числом.","menu":"Свойства таблицы","row":{"menu":"Строка","insertBefore":"Вставить строку сверху","insertAfter":"Вставить строку снизу","deleteRow":"Удалить строки"},"rows":"Строки","summary":"Итоги","title":"Свойства таблицы","toolbar":"Таблица","widthPc":"процентов","widthPx":"пикселей","widthUnit":"единица измерения"},"undo":{"redo":"Повторить","undo":"Отменить"},"wsc":{"btnIgnore":"Пропустить","btnIgnoreAll":"Пропустить всё","btnReplace":"Заменить","btnReplaceAll":"Заменить всё","btnUndo":"Отменить","changeTo":"Изменить на","errorLoading":"Произошла ошибка при подключении к серверу проверки орфографии: %s.","ieSpellDownload":"Модуль проверки орфографии не установлен. Хотите скачать его?","manyChanges":"Проверка орфографии завершена. Изменено слов: %1","noChanges":"Проверка орфографии завершена. Не изменено ни одного слова","noMispell":"Проверка орфографии завершена. Ошибок не найдено","noSuggestions":"- Варианты отсутствуют -","notAvailable":"Извините, но в данный момент сервис недоступен.","notInDic":"Отсутствует в словаре","oneChange":"Проверка орфографии завершена. Изменено одно слово","progress":"Орфография проверяется...","title":"Проверка орфографии","toolbar":"Проверить орфографию"}};
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -11,10 +11,10 @@
|
|
11
11
|
{
|
12
12
|
type: 'text/css',
|
13
13
|
rel: 'stylesheet',
|
14
|
-
href:
|
14
|
+
href: CKEDITOR.getUrl('plugins/CKCss/css/styles.css')
|
15
15
|
}
|
16
16
|
})
|
17
|
-
);
|
17
|
+
);
|
18
18
|
},
|
19
19
|
init: function (editor) {
|
20
20
|
var pluginName = 'CKCss';
|
@@ -23,7 +23,7 @@
|
|
23
23
|
editor.ui.addButton('CKCss',
|
24
24
|
{
|
25
25
|
label: 'CSS Editor for CKEditor', command: pluginName,
|
26
|
-
icon: CKEDITOR.
|
26
|
+
icon: CKEDITOR.getUrl('plugins/CKCss/ckcss.png')
|
27
27
|
});
|
28
28
|
},
|
29
29
|
afterInit: function (editor) {
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.md or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.dialog.add("a11yHelp",function(j){var a=j.lang.a11yhelp,l=CKEDITOR.tools.getNextId(),e={8:a.backspace,9:a.tab,13:a.enter,16:a.shift,17:a.ctrl,18:a.alt,19:a.pause,20:a.capslock,27:a.escape,33:a.pageUp,34:a.pageDown,35:a.end,36:a.home,37:a.leftArrow,38:a.upArrow,39:a.rightArrow,40:a.downArrow,45:a.insert,46:a["delete"],91:a.leftWindowKey,92:a.rightWindowKey,93:a.selectKey,96:a.numpad0,97:a.numpad1,98:a.numpad2,99:a.numpad3,100:a.numpad4,101:a.numpad5,102:a.numpad6,103:a.numpad7,104:a.numpad8,
|
6
|
+
105:a.numpad9,106:a.multiply,107:a.add,109:a.subtract,110:a.decimalPoint,111:a.divide,112:a.f1,113:a.f2,114:a.f3,115:a.f4,116:a.f5,117:a.f6,118:a.f7,119:a.f8,120:a.f9,121:a.f10,122:a.f11,123:a.f12,144:a.numLock,145:a.scrollLock,186:a.semiColon,187:a.equalSign,188:a.comma,189:a.dash,190:a.period,191:a.forwardSlash,192:a.graveAccent,219:a.openBracket,220:a.backSlash,221:a.closeBracket,222:a.singleQuote};e[CKEDITOR.ALT]=a.alt;e[CKEDITOR.SHIFT]=a.shift;e[CKEDITOR.CTRL]=a.ctrl;var f=[CKEDITOR.ALT,CKEDITOR.SHIFT,
|
7
|
+
CKEDITOR.CTRL],m=/\$\{(.*?)\}/g,p=function(){var a=j.keystrokeHandler.keystrokes,g={},c;for(c in a)g[a[c]]=c;return function(a,c){var b;if(g[c]){b=g[c];for(var h,i,k=[],d=0;d<f.length;d++)i=f[d],h=b/f[d],1<h&&2>=h&&(b-=i,k.push(e[i]));k.push(e[b]||String.fromCharCode(b));b=k.join("+")}else b=a;return b}}();return{title:a.title,minWidth:600,minHeight:400,contents:[{id:"info",label:j.lang.common.generalTab,expand:!0,elements:[{type:"html",id:"legends",style:"white-space:normal;",focus:function(){this.getElement().focus()},
|
8
|
+
html:function(){for(var e='<div class="cke_accessibility_legend" role="document" aria-labelledby="'+l+'_arialbl" tabIndex="-1">%1</div><span id="'+l+'_arialbl" class="cke_voice_label">'+a.contents+" </span>",g=[],c=a.legend,j=c.length,f=0;f<j;f++){for(var b=c[f],h=[],i=b.items,k=i.length,d=0;d<k;d++){var n=i[d],o=n.legend.replace(m,p);o.match(m)||h.push("<dt>%1</dt><dd>%2</dd>".replace("%1",n.name).replace("%2",o))}g.push("<h1>%1</h1><dl>%2</dl>".replace("%1",b.name).replace("%2",h.join("")))}return e.replace("%1",
|
9
|
+
g.join(""))}()+'<style type="text/css">.cke_accessibility_legend{width:600px;height:400px;padding-right:5px;overflow-y:auto;overflow-x:hidden;}.cke_browser_quirks .cke_accessibility_legend,.cke_browser_ie6 .cke_accessibility_legend{height:390px}.cke_accessibility_legend *{white-space:normal;}.cke_accessibility_legend h1{font-size: 20px;border-bottom: 1px solid #AAA;margin: 5px 0px 15px;}.cke_accessibility_legend dl{margin-left: 5px;}.cke_accessibility_legend dt{font-size: 13px;font-weight: bold;}.cke_accessibility_legend dd{margin:10px}</style>'}]}],
|
10
|
+
buttons:[CKEDITOR.dialog.cancelButton]}});
|
@@ -1,9 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
Copyright (c) 2003-
|
2
|
+
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
3
3
|
For licensing, see LICENSE.md or http://ckeditor.com/license
|
4
4
|
*/
|
5
5
|
CKEDITOR.plugins.setLang("a11yhelp","en",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"General",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page."},
|
6
6
|
{name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
|
7
7
|
{name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
|
8
8
|
legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},
|
9
|
-
{name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}]
|
9
|
+
{name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}],backspace:"Backspace",tab:"Tab",enter:"Enter",shift:"Shift",ctrl:"Ctrl",alt:"Alt",pause:"Pause",capslock:"Caps Lock",escape:"Escape",pageUp:"Page Up",pageDown:"Page Down",end:"End",home:"Home",leftArrow:"Left Arrow",upArrow:"Up Arrow",rightArrow:"Right Arrow",downArrow:"Down Arrow",insert:"Insert","delete":"Delete",leftWindowKey:"Left Windows key",rightWindowKey:"Right Windows key",selectKey:"Select key",numpad0:"Numpad 0",numpad1:"Numpad 1",
|
10
|
+
numpad2:"Numpad 2",numpad3:"Numpad 3",numpad4:"Numpad 4",numpad5:"Numpad 5",numpad6:"Numpad 6",numpad7:"Numpad 7",numpad8:"Numpad 8",numpad9:"Numpad 9",multiply:"Multiply",add:"Add",subtract:"Subtract",decimalPoint:"Decimal Point",divide:"Divide",f1:"F1",f2:"F2",f3:"F3",f4:"F4",f5:"F5",f6:"F6",f7:"F7",f8:"F8",f9:"F9",f10:"F10",f11:"F11",f12:"F12",numLock:"Num Lock",scrollLock:"Scroll Lock",semiColon:"Semicolon",equalSign:"Equal Sign",comma:"Comma",dash:"Dash",period:"Period",forwardSlash:"Forward Slash",
|
11
|
+
graveAccent:"Grave Accent",openBracket:"Open Bracket",backSlash:"Backslash",closeBracket:"Close Bracket",singleQuote:"Single Quote"});
|
@@ -1,9 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
Copyright (c) 2003-
|
2
|
+
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
3
3
|
For licensing, see LICENSE.md or http://ckeditor.com/license
|
4
4
|
*/
|
5
5
|
CKEDITOR.plugins.setLang("a11yhelp","ru",{title:"Горячие клавиши",contents:"Помощь. Для закрытия этого окна нажмите ESC.",legend:[{name:"Основное",items:[{name:"Панель инструментов",legend:"Нажмите ${toolbarFocus} для перехода к панели инструментов. Для перемещения между группами панели инструментов используйте TAB и SHIFT-TAB. Для перемещения между кнопками панели иструментов используйте кнопки ВПРАВО или ВЛЕВО. Нажмите ПРОБЕЛ или ENTER для запуска кнопки панели инструментов."},{name:"Диалоги",legend:"В диалоговом окне, нажмите клавишу TAB для перехода к следующему диалоговому полю, нажмите клавиши SHIFT + TAB, чтобы перейти к предыдущему полю, нажмите ENTER, чтобы отправить данные, нажмите клавишу ESC, для отмены. Для окон, которые имеют несколько вкладок, нажмите ALT + F10 для перехода к списку вкладок. Переход к следующей вкладке TAB ИЛИ ПРАВУЮ СТРЕЛКУ. Переход к предыдущей вкладке с помощью SHIFT + TAB или ЛЕВАЯ СТРЕЛКА. Нажмите ПРОБЕЛ или ENTER, чтобы выбрать вкладку."},
|
6
6
|
{name:"Контекстное меню",legend:'Нажмите ${contextMenu} или клавишу APPLICATION, чтобы открыть контекстное меню. Затем перейдите к следующему пункту меню с помощью TAB или стрелкой "ВНИЗ". Переход к предыдущей опции - SHIFT+TAB или стрелкой "ВВЕРХ". Нажмите SPACE, или ENTER, чтобы задействовать опцию меню. Открыть подменю текущей опции - SPACE или ENTER или стрелкой "ВПРАВО". Возврат к родительскому пункту меню - ESC или стрелкой "ВЛЕВО". Закрытие контекстного меню - ESC.'},{name:"Редактор списка",
|
7
7
|
legend:'Внутри окна списка, переход к следующему пункту списка - TAB или стрелкой "ВНИЗ". Переход к предыдущему пункту списка - SHIFT + TAB или стрелкой "ВВЕРХ". Нажмите SPACE, или ENTER, чтобы задействовать опцию списка. Нажмите ESC, чтобы закрыть окно списка.'},{name:"Путь к элементу",legend:'Нажмите ${elementsPathFocus}, чтобы перейти к панели пути элементов. Переход к следующей кнопке элемента - TAB или стрелкой "ВПРАВО". Переход к предыдущей кнопку - SHIFT+TAB или стрелкой "ВЛЕВО". Нажмите SPACE, или ENTER, чтобы выбрать элемент в редакторе.'}]},
|
8
8
|
{name:"Команды",items:[{name:"Отменить",legend:"Нажмите ${undo}"},{name:"Повторить",legend:"Нажмите ${redo}"},{name:"Полужирный",legend:"Нажмите ${bold}"},{name:"Курсив",legend:"Нажмите ${italic}"},{name:"Подчеркнутый",legend:"Нажмите ${underline}"},{name:"Гиперссылка",legend:"Нажмите ${link}"},{name:"Свернуть панель инструментов",legend:"Нажмите ${toolbarCollapse}"},{name:"Команды доступа к предыдущему фокусному пространству",legend:'Нажмите ${accessPreviousSpace}, чтобы обратиться к ближайшему недостижимому фокусному пространству перед символом "^", например: два смежных HR элемента. Повторите комбинацию клавиш, чтобы достичь отдаленных фокусных пространств.'},
|
9
|
-
{name:"Команды доступа к следующему фокусному пространству",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:"Справка по горячим клавишам",legend:"Нажмите ${a11yHelp}"}]}]
|
9
|
+
{name:"Команды доступа к следующему фокусному пространству",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:"Справка по горячим клавишам",legend:"Нажмите ${a11yHelp}"}]}],backspace:"Backspace",tab:"Tab",enter:"Enter",shift:"Shift",ctrl:"Ctrl",alt:"Alt",pause:"Pause",capslock:"Caps Lock",escape:"Escape",pageUp:"Page Up",pageDown:"Page Down",end:"End",
|
10
|
+
home:"Home",leftArrow:"Left Arrow",upArrow:"Up Arrow",rightArrow:"Right Arrow",downArrow:"Down Arrow",insert:"Insert","delete":"Delete",leftWindowKey:"Left Windows key",rightWindowKey:"Right Windows key",selectKey:"Select key",numpad0:"Numpad 0",numpad1:"Numpad 1",numpad2:"Numpad 2",numpad3:"Numpad 3",numpad4:"Numpad 4",numpad5:"Numpad 5",numpad6:"Numpad 6",numpad7:"Numpad 7",numpad8:"Numpad 8",numpad9:"Numpad 9",multiply:"Multiply",add:"Add",subtract:"Subtract",decimalPoint:"Decimal Point",divide:"Divide",
|
11
|
+
f1:"F1",f2:"F2",f3:"F3",f4:"F4",f5:"F5",f6:"F6",f7:"F7",f8:"F8",f9:"F9",f10:"F10",f11:"F11",f12:"F12",numLock:"Num Lock",scrollLock:"Scroll Lock",semiColon:"Semicolon",equalSign:"Equal Sign",comma:"Comma",dash:"Dash",period:"Period",forwardSlash:"Forward Slash",graveAccent:"Grave Accent",openBracket:"Open Bracket",backSlash:"Backslash",closeBracket:"Close Bracket",singleQuote:"Single Quote"});
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
Copyright (c) 2003-
|
2
|
+
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
3
3
|
For licensing, see LICENSE.md or http://ckeditor.com/license
|
4
4
|
*/
|
5
5
|
CKEDITOR.dialog.add("about",function(a){var a=a.lang.about,b=CKEDITOR.plugins.get("about").path+"dialogs/"+(CKEDITOR.env.hidpi?"hidpi/":"")+"logo_ckeditor.png";return{title:CKEDITOR.env.ie?a.dlgTitle:a.title,minWidth:390,minHeight:230,contents:[{id:"tab1",label:"",title:"",expand:!0,padding:0,elements:[{type:"html",html:'<style type="text/css">.cke_about_container{color:#000 !important;padding:10px 10px 0;margin-top:5px}.cke_about_container p{margin: 0 0 10px;}.cke_about_container .cke_about_logo{height:81px;background-color:#fff;background-image:url('+
|
data/{app → vendor}/assets/javascripts/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png
RENAMED
File without changes
|
File without changes
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
Copyright (c) 2003-
|
2
|
+
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
3
3
|
For licensing, see LICENSE.md or http://ckeditor.com/license
|
4
4
|
*/
|
5
5
|
CKEDITOR.dialog.add("paste",function(c){function h(a){var b=new CKEDITOR.dom.document(a.document),f=b.getBody(),d=b.getById("cke_actscrpt");d&&d.remove();f.setAttribute("contenteditable",!0);if(CKEDITOR.env.ie&&8>CKEDITOR.env.version)b.getWindow().on("blur",function(){b.$.selection.empty()});b.on("keydown",function(a){var a=a.data,b;switch(a.getKeystroke()){case 27:this.hide();b=1;break;case 9:case CKEDITOR.SHIFT+9:this.changeFocus(1),b=1}b&&a.preventDefault()},this);c.fire("ariaWidget",new CKEDITOR.dom.element(a.frameElement));
|
@@ -0,0 +1 @@
|
|
1
|
+
.CodeMirror{font-family:monospace;height:300px}.CodeMirror-scroll{overflow:auto}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumbers{}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #000;z-index:3}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7;z-index:1}.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite{}.cm-tab{display:inline-block}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable{color:#000}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-property{color:#000}.cm-s-default .cm-operator{color:#000}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{line-height:1;position:relative;overflow:hidden;background:#fff;color:#000}.CodeMirror-scroll{margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;padding-right:30px;height:100%;outline:none;position:relative;-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-sizer{position:relative}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;padding-bottom:30px;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;-moz-box-sizing:content-box;box-sizing:content-box;padding-bottom:30px;margin-bottom:-32px;display:inline-block;*zoom:1;*display:inline}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-code pre{border-right:30px solid transparent;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.CodeMirror-wrap .CodeMirror-code pre{border-right:none;width:auto}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-widget{}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;visibility:hidden;border-right:none;width:0}.CodeMirror-focused div.CodeMirror-cursor{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.CodeMirror span{*vertical-align:text-bottom}@media print{.CodeMirror div.CodeMirror-cursor{visibility:hidden}}.CodeMirror{font:13px/1.4em monospace}.CodeMirror .activeline{background:#e8f2ff}.CodeMirror .CodeMirror-foldmarker{color:blue;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.searchCodeButton span,.autoFormat span,.CommentSelectedRange span,.UncommentSelectedRange span{width:16px;height:16px;margin-left:6px}.searchCodeButton span{background:url("../icons/SearchCode.png") no-repeat}.autoFormat span{background:url("../icons/AutoFormat.png") no-repeat}.CommentSelectedRange span{background:url("../icons/CommentSelectedRange.png") no-repeat}.UncommentSelectedRange span{background:url("../icons/UncommentSelectedRange.png") no-repeat}.cke_reset_all .CodeMirror-scroll *{white-space:normal}.cke_reset_all .cm-s-cobalt *,.cke_reset_all .cm-s-erlang-dark *,.cke_reset_all .cm-s-lesser-dark *,.cke_reset_all .cm-s-monokai *,.cke_reset_all .cm-s-night *,.cke_reset_all .cm-s-rubyblue *,.cke_reset_all .cm-s-twilight *,.cke_reset_all .cm-s-xq-dark *,.cke_reset_all .cm-s-base16-dark *,.cke_reset_all .cm-s-3024-night *,.cke_reset_all .cm-s-the-matrix *,.cke_reset_all .cm-s-paraiso-dark *,.cke_reset_all .cm-s-paraiso-light *{color:inherit;font:inherit}.cm-s-cobalt .CodeMirror-selected{background:#b36539!important}.cm-s-erlang-dark .CodeMirror-selected{background:#b36539!important}.cm-s-lesser-dark .CodeMirror-selected{background:#45443b!important}.cm-s-monokai .CodeMirror-selected{background:#49483e!important}.cm-s-night .CodeMirror-selected{background:#447!important}.cm-s-rubyblue .CodeMirror-selected{background:#38566f!important}.cm-s-twilight .CodeMirror-selected{background:#323232!important}.cm-s-xq-dark .CodeMirror-selected{background:#a8f!important}.cm-s-the-matrix .CodeMirror-selected{background:rgba(255,150,0,.3)!important}.cm-s-mbo .CodeMirror-selected{background:#716c62!important}.cm-s-blackboard .activeline,.cm-s-cobalt .activeline,.cm-s-erlang-dark .activeline,.cm-s-lesser-dark .activeline,.cm-s-monokai .activeline,.cm-s-night .activeline,.cm-s-rubyblue .activeline,.cm-s-vibrant-ink .activeline,.cm-s-xq-dark .activeline,.cm-s-base16-dark .activeline,.cm-s-3024-night .activeline,.cm-s-paraiso-light .activeline,.cm-s-paraiso-dark .activeline{background:#757575}.cm-s-mbo .activeline{background:#716c62}.cm-s-twilight .activeline{background:#494949}.cm-s-the-matrix .activeline{background:#060}.CodeMirror-focused .cm-matchhighlight{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);background-position:bottom;background-repeat:repeat-x}.CodeMirror-dialog{position:absolute;left:0;right:0;background:#fff;z-index:15;padding:.1em .8em;overflow:hidden;color:#333}.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.CodeMirror-dialog input{border:none;outline:none;background:transparent;width:20em;color:inherit;font-family:monospace}.CodeMirror-dialog button{font-size:70%}.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:#000;cursor:pointer}.CodeMirror-hint-active{background:#08f;color:#fff}.cm-trailingspace{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}
|
File without changes
|
File without changes
|
data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/CommentSelectedRange.png
RENAMED
File without changes
|
File without changes
|
data/{app → vendor}/assets/javascripts/ckeditor/plugins/codemirror/icons/UncommentSelectedRange.png
RENAMED
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){function n(n,t){var i=n.getRange(CodeMirror.Pos(t.line,t.ch-1),CodeMirror.Pos(t.line,t.ch+1));return i.length==2?i:null}function u(t){for(var u={name:"autoCloseBrackets",Backspace:function(i){if(i.somethingSelected())return CodeMirror.Pass;var r=i.getCursor(),u=n(i,r);if(u&&t.indexOf(u)%2==0)i.replaceRange("",CodeMirror.Pos(r.line,r.ch-1),CodeMirror.Pos(r.line,r.ch+1));else return CodeMirror.Pass}},f="",i=0;i<t.length;i+=2)(function(n,t){function e(i){var r=i.getSelection();i.replaceSelection(n+r+t)}function i(n){var i=n.getCursor(),r=n.getRange(i,CodeMirror.Pos(i.line,i.ch+1));if(r!=t||n.somethingSelected())return CodeMirror.Pass;n.execCommand("goCharRight")}n!=t&&(f+=t),u["'"+n+"'"]=function(u){if(n=="'"&&u.getTokenAt(u.getCursor()).type=="comment")return CodeMirror.Pass;if(u.somethingSelected())return e(u);if(n!=t||i(u)==CodeMirror.Pass){var o=u.getCursor(),h=CodeMirror.Pos(o.line,o.ch+1),s=u.getLine(o.line),c=s.charAt(o.ch),l=o.ch>0?s.charAt(o.ch-1):"";if(n==t&&CodeMirror.isWordChar(l))return CodeMirror.Pass;if(s.length==o.ch||f.indexOf(c)>=0||r.test(c))u.replaceSelection(n+t,{head:h,anchor:h});else return CodeMirror.Pass}},n!=t&&(u["'"+t+"'"]=i)})(t.charAt(i),t.charAt(i+1));return u}function f(t){return function(i){var r=i.getCursor(),u=n(i,r);if(!u||t.indexOf(u)%2!=0)return CodeMirror.Pass;i.operation(function(){var n=CodeMirror.Pos(r.line+1,0);i.replaceSelection("\n\n",{anchor:n,head:n},"+input"),i.indentLine(r.line+1,null,!0),i.indentLine(r.line+2,null,!0)})}}var t="()[]{}''\"\"",i="[]{}",r=/\s/;CodeMirror.defineOption("autoCloseBrackets",!1,function(n,r,e){var o,s,h;(e!=CodeMirror.Init&&e&&n.removeKeyMap("autoCloseBrackets"),r)&&(o=t,s=i,typeof r=="string"?o=r:typeof r=="object"&&(r.pairs!=null&&(o=r.pairs),r.explode!=null&&(s=r.explode)),h=u(o),s&&(h.Enter=f(s)),n.addKeyMap(h))})})(),function(){function r(r){var f=r.getCursor(),u=r.getTokenAt(f),h=CodeMirror.innerMode(r.getMode(),u.state),c=h.state,l,s,a;if(h.mode.name!="xml"||!c.tagName)return CodeMirror.Pass;var o=r.getOption("autoCloseTags"),v=h.mode.configuration=="html",y=typeof o=="object"&&o.dontCloseTags||v&&t,p=typeof o=="object"&&o.indentTags||v&&i,e=c.tagName;if(u.end>f.ch&&(e=e.slice(0,e.length-u.end+f.ch)),l=e.toLowerCase(),u.type=="string"&&(u.end!=f.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||u.string.length==1)||u.type=="tag"&&c.type=="closeTag"||u.string.indexOf("/")==u.string.length-1||y&&n(y,l)>-1)return CodeMirror.Pass;s=p&&n(p,l)>-1,a=s?CodeMirror.Pos(f.line+1,0):CodeMirror.Pos(f.line,f.ch+1),r.replaceSelection(">"+(s?"\n\n":"")+"<\/"+e+">",{head:a,anchor:a}),s&&(r.indentLine(f.line+1),r.indentLine(f.line+2))}function u(n){var r=n.getCursor(),t=n.getTokenAt(r),u=CodeMirror.innerMode(n.getMode(),t.state),f=u.state,i;if(t.type=="string"||t.string.charAt(0)!="<"||t.start!=r.ch-1||u.mode.name!="xml")return CodeMirror.Pass;i=f.context&&f.context.tagName,i&&n.replaceSelection("/"+i+">","end")}function n(n,t){if(n.indexOf)return n.indexOf(t);for(var i=0,r=n.length;i<r;++i)if(n[i]==t)return i;return-1}CodeMirror.defineOption("autoCloseTags",!1,function(n,t,i){if(i!=CodeMirror.Init&&i&&n.removeKeyMap("autoCloseTags"),t){var f={name:"autoCloseTags"};(typeof t!="object"||t.whenClosing)&&(f["'/'"]=function(n){return u(n)}),(typeof t!="object"||t.whenOpening)&&(f["'>'"]=function(n){return r(n)}),n.addKeyMap(f)}});var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],i=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"]}(),function(){function i(n){var e=n.getCursor(),t=n.getTokenAt(e),i=CodeMirror.innerMode(n.getMode(),t.state).mode,r,o,u,f,s;if(t.type=="comment"&&i.blockCommentStart&&(o=t.string.indexOf(i.blockCommentEnd),u=n.getRange(CodeMirror.Pos(e.line,0),CodeMirror.Pos(e.line,t.end)),o==-1||o!=t.string.length-i.blockCommentEnd.length))if(t.string.indexOf(i.blockCommentStart)==0){if(r=u.slice(0,t.start),!/^\s*$/.test(r))for(r="",s=0;s<t.start;++s)r+=" "}else(f=u.indexOf(i.blockCommentContinue))!=-1&&f+i.blockCommentContinue.length>t.start&&/^\s*$/.test(u.slice(0,f))&&(r=u.slice(0,f));if(r!=null)n.replaceSelection("\n"+r+i.blockCommentContinue,"end");else return CodeMirror.Pass}for(var t=["clike","css","javascript"],n=0;n<t.length;++n)CodeMirror.extendMode(t[n],{blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * "});CodeMirror.defineOption("continueComments",null,function(n,t,r){r&&r!=CodeMirror.Init&&n.removeKeyMap("continueComment");var u={name:"continueComment"};u[typeof t=="string"?t:"Enter"]=i,n.addKeyMap(u)})}(),function(){function r(t,r,u){function w(r,u,f){var e,c,s,h;if(r.text){if(e=o?0:r.text.length-1,c=o?r.text.length:-1,r.text.length>k)return null;for(f!=null&&(e=f+a);e!=c;e+=a)if(s=r.text.charAt(e),g.test(s)&&t.getTokenTypeAt(n(u,e+1))==d)if(h=i[s],h.charAt(1)==">"==o)v.push(s);else{if(v.pop()!=h.charAt(0))return{pos:e,match:!1};if(!v.length)return{pos:e,match:!0}}}}var c=t.state.matchBrackets,k=c&&c.maxScanLineLength||1e4,y=c&&c.maxScanLines||100,s=r||t.getCursor(),l=t.getLineHandle(s.line),e=s.ch-1,p=e>=0&&i[l.text.charAt(e)]||i[l.text.charAt(++e)],o,a,f,h,b;if(!p||(o=p.charAt(1)==">",a=o?1:-1,u&&o!=(e==s.ch)))return null;var d=t.getTokenTypeAt(n(s.line,e+1)),v=[l.text.charAt(e)],g=/[(){}[\]]/;for(f=s.line,b=o?Math.min(f+y,t.lineCount()):Math.max(-1,f-y);f!=b;f+=a)if(h=f==s.line?w(l,f,e):w(t.getLineHandle(f),f),h)break;return{from:n(s.line,e),to:h&&n(f,h.pos),match:h&&h.match,forward:o}}function u(t,i){var o=t.state.matchBrackets.maxHighlightLineLength||1e3,u=r(t),f;if(u&&!(t.getLine(u.from.line).length>o)&&(!u.to||!(t.getLine(u.to.line).length>o))){var s=u.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket",c=t.markText(u.from,n(u.from.line,u.from.ch+1),{className:s}),h=u.to&&t.markText(u.to,n(u.to.line,u.to.ch+1),{className:s});if(e&&t.state.focused&&t.display.input.focus(),f=function(){t.operation(function(){c.clear(),h&&h.clear()})},i)setTimeout(f,800);else return f}}function f(n){n.operation(function(){t&&(t(),t=null),n.somethingSelected()||(t=u(n,!1))})}var e=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),n=CodeMirror.Pos,i={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},t=null;CodeMirror.defineOption("matchBrackets",!1,function(n,t,i){if(i&&i!=CodeMirror.Init&&n.off("cursorActivity",f),t){n.state.matchBrackets=typeof t=="object"?t:{};n.on("cursorActivity",f)}}),CodeMirror.defineExtension("matchBrackets",function(){u(this,!0)}),CodeMirror.defineExtension("findMatchingBracket",function(n,t){return r(this,n,t)})}(),function(){"use strict";function t(n){n.state.tagHit&&n.state.tagHit.clear(),n.state.tagOther&&n.state.tagOther.clear(),n.state.tagHit=n.state.tagOther=null}function n(n){n.state.failedTagMatch=!1,n.operation(function(){var u,r,i,f,e;(t(n),n.somethingSelected())||(u=n.getCursor(),r=n.getViewport(),r.from=Math.min(r.from,u.line),r.to=Math.max(u.line+1,r.to),i=CodeMirror.findMatchingTag(n,u,r),i)&&(n.state.matchBothTags&&(f=i.at=="open"?i.open:i.close,f&&(n.state.tagHit=n.markText(f.from,f.to,{className:"CodeMirror-matchingtag"}))),e=i.at=="close"?i.open:i.close,e?n.state.tagOther=n.markText(e.from,e.to,{className:"CodeMirror-matchingtag"}):n.state.failedTagMatch=!0)})}function i(t){t.state.failedTagMatch&&n(t)}CodeMirror.defineOption("matchTags",!1,function(r,u,f){if(f&&f!=CodeMirror.Init&&(r.off("cursorActivity",n),r.off("viewportChange",i),t(r)),u){r.state.matchBothTags=typeof u=="object"&&u.bothTags;r.on("cursorActivity",n);r.on("viewportChange",i);n(r)}}),CodeMirror.commands.toMatchingTag=function(n){var t=CodeMirror.findMatchingTag(n,n.getCursor()),i;t&&(i=t.at=="close"?t.open:t.close,i&&n.setSelection(i.to,i.from))}}(),CodeMirror.defineOption("showTrailingSpace",!1,function(n,t,i){i==CodeMirror.Init&&(i=!1),i&&!t?n.removeOverlay("trailingspace"):!i&&t&&n.addOverlay({token:function(n){for(var i=n.string.length,t=i;t&&/\s/.test(n.string.charAt(t-1));--t);return t>n.pos?(n.pos=t,null):(n.pos=i,"trailingspace")},name:"trailingspace"})}),function(){"use strict";function n(n,i,r,u){function c(t){var r=e(n,i),o,f;if(!r||r.to.line-r.from.line<h)return null;for(o=n.findMarksAt(r.from),f=0;f<o.length;++f)if(o[f].__isFold&&u!=="fold"){if(!t)return null;r.cleared=!0,o[f].clear()}return r}var e=r&&(r.call?r:r.rangeFinder),h,f,o,s;if(e||(e=n.getHelper(i,"fold")),e){if(typeof i=="number"&&(i=CodeMirror.Pos(i,0)),h=r&&r.minFoldSize||0,f=c(!0),r&&r.scanUp)while(!f&&i.line>n.firstLine())i=CodeMirror.Pos(i.line-1,0),f=c(!1);if(f&&!f.cleared&&u!=="unfold"){o=t(r);CodeMirror.on(o,"mousedown",function(){s.clear()});s=n.markText(f.from,f.to,{replacedWith:o,clearOnEnter:!0,__isFold:!0});s.on("clear",function(t,i){CodeMirror.signal(n,"unfold",n,t,i)});CodeMirror.signal(n,"fold",n,f.from,f.to)}}}function t(n){var t=n&&n.widget||"↔",i;return typeof t=="string"&&(i=document.createTextNode(t),t=document.createElement("span"),t.appendChild(i),t.className="CodeMirror-foldmarker"),t}CodeMirror.newFoldFunction=function(t,i){return function(r,u){n(r,u,{rangeFinder:t,widget:i})}},CodeMirror.defineExtension("foldCode",function(t,i,r){n(this,t,i,r)}),CodeMirror.registerHelper("fold","combine",function(){var n=Array.prototype.slice.call(arguments,0);return function(t,i){for(var u,r=0;r<n.length;++r)if(u=n[r](t,i),u)return u}})}(),CodeMirror.registerHelper("fold","brace",function(n,t){function y(i){for(var r,u=t.ch,e=0;;){if(r=u<=0?-1:v.lastIndexOf(i,u-1),r==-1){if(e==1)break;e=1,u=v.length;continue}if(e==1&&r<t.ch)break;if(c=n.getTokenTypeAt(CodeMirror.Pos(f,r+1)),!/^(comment|string)/.test(c))return r+1;u=r-1}}var f=t.line,v=n.getLine(f),c,p="{",w="}",r=y("{"),l,b,s,a,u,e,i,o,h;if(r==null&&(p="[",w="]",r=y("[")),r!=null){l=1,b=n.lastLine();n:for(u=f;u<=b;++u)for(e=n.getLine(u),i=u==f?r:0;;){if(o=e.indexOf(p,i),h=e.indexOf(w,i),o<0&&(o=e.length),h<0&&(h=e.length),i=Math.min(o,h),i==e.length)break;if(n.getTokenTypeAt(CodeMirror.Pos(u,i+1))==c)if(i==o)++l;else if(!--l){s=u,a=i;break n}++i}if(s!=null&&(f!=s||a!=r))return{from:CodeMirror.Pos(f,r),to:CodeMirror.Pos(s,a)}}}),CodeMirror.braceRangeFinder=CodeMirror.fold.brace,CodeMirror.registerHelper("fold","import",function(n,t){function i(t){var i,r,f,e,u;if(t<n.firstLine()||t>n.lastLine()||(i=n.getTokenAt(CodeMirror.Pos(t,1)),/\S/.test(i.string)||(i=n.getTokenAt(CodeMirror.Pos(t,i.end+1))),i.type!="keyword"||i.string!="import"))return null;for(r=t,f=Math.min(n.lastLine(),t+10);r<=f;++r)if(e=n.getLine(r),u=e.indexOf(";"),u!=-1)return{startCh:i.end,end:CodeMirror.Pos(r,u)}}var t=t.line,u=i(t),e,r,f;if(!u||i(t-1)||(e=i(t-2))&&e.end.line==t-1)return null;for(r=u.end;;){if(f=i(r.line+1),f==null)break;r=f.end}return{from:n.clipPos(CodeMirror.Pos(t,u.startCh+1)),to:r}}),CodeMirror.importRangeFinder=CodeMirror.fold["import"],CodeMirror.registerHelper("fold","include",function(n,t){function r(t){if(t<n.firstLine()||t>n.lastLine())return null;var i=n.getTokenAt(CodeMirror.Pos(t,1));return/\S/.test(i.string)||(i=n.getTokenAt(CodeMirror.Pos(t,i.end+1))),i.type=="meta"&&i.string.slice(0,8)=="#include"?i.start+8:void 0}var t=t.line,u=r(t),i,f;if(u==null||r(t-1)!=null)return null;for(i=t;;){if(f=r(i+1),f==null)break;++i}return{from:CodeMirror.Pos(t,u+1),to:n.clipPos(CodeMirror.Pos(i))}}),CodeMirror.includeRangeFinder=CodeMirror.fold.include,function(){"use strict";function a(n,t){return n.line-t.line||n.ch-t.ch}function t(n,t,i,r){this.line=t,this.ch=i,this.cm=n,this.text=n.getLine(t),this.min=r?r.from:n.firstLine(),this.max=r?r.to-1:n.lastLine()}function r(t,i){var r=t.cm.getTokenTypeAt(n(t.line,i));return r&&/\btag\b/.test(r)}function s(n){if(!(n.line>=n.max))return n.ch=0,n.text=n.cm.getLine(++n.line),!0}function h(n){if(!(n.line<=n.min))return n.text=n.cm.getLine(--n.line),n.ch=n.text.length,!0}function u(n){for(var t,i,u;;){if(t=n.text.indexOf(">",n.ch),t==-1)if(s(n))continue;else return;if(!r(n,t+1)){n.ch=t+1;continue}return i=n.text.lastIndexOf("/",t),u=i>-1&&!/\S/.test(n.text.slice(i+1,t)),n.ch=t+1,u?"selfClose":"regular"}}function f(n){for(var t,u;;){if(t=n.ch?n.text.lastIndexOf("<",n.ch-1):-1,t==-1)if(h(n))continue;else return;if(!r(n,t+1)){n.ch=t;continue}if(i.lastIndex=t,n.ch=t,u=i.exec(n.text),u&&u.index==t)return u}}function c(n){for(;;){i.lastIndex=n.ch;var t=i.exec(n.text);if(!t)if(s(n))continue;else return;if(!r(n,t.index+1)){n.ch=t.index+1;continue}return n.ch=t.index+t[0].length,t}}function y(n){for(var t,i,u;;){if(t=n.ch?n.text.lastIndexOf(">",n.ch-1):-1,t==-1)if(h(n))continue;else return;if(!r(n,t+1)){n.ch=t;continue}return i=n.text.lastIndexOf("/",t),u=i>-1&&!/\S/.test(n.text.slice(i+1,t)),n.ch=t+1,u?"selfClose":"regular"}}function e(t,i){for(var e=[],f;;){var r=c(t),o,s=t.line,h=t.ch-(r?r[0].length:0);if(!r||!(o=u(t)))return;if(o!="selfClose")if(r[1]){for(f=e.length-1;f>=0;--f)if(e[f]==r[2]){e.length=f;break}if(f<0&&(!i||i==r[2]))return{tag:r[2],from:n(s,h),to:n(t.line,t.ch)}}else e.push(r[2])}}function l(t,i){for(var e=[],o,u;;){if(o=y(t),!o)return;if(o=="selfClose"){f(t);continue}var s=t.line,h=t.ch,r=f(t);if(!r)return;if(r[1])e.push(r[2]);else{for(u=e.length-1;u>=0;--u)if(e[u]==r[2]){e.length=u;break}if(u<0&&(!i||i==r[2]))return{tag:r[2],from:n(t.line,t.ch),to:n(s,h)}}}}var n=CodeMirror.Pos,o="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",v=o+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",i=new RegExp("<(/?)(["+o+"]["+v+"]*)","g");CodeMirror.registerHelper("fold","xml",function(i,r){for(var f=new t(i,r.line,0),o,h,r,s;;){if(o=c(f),!o||f.line!=r.line||!(h=u(f)))return;if(!o[1]&&h!="selfClose")return r=n(f.line,f.ch),s=e(f,o[2]),s&&{from:r,to:s.from}}}),CodeMirror.tagRangeFinder=CodeMirror.fold.xml,CodeMirror.findMatchingTag=function(i,r,o){var s=new t(i,r.line,r.ch,o),y;if(s.text.indexOf(">")!=-1||s.text.indexOf("<")!=-1){var c=u(s),v=c&&n(s.line,s.ch),h=c&&f(s);if(c&&c!="selfClose"&&h&&!(a(s,r)>0))return y={from:n(s.line,s.ch),to:v,tag:h[2]},h[1]?{open:l(s,h[2]),close:y,at:"close"}:(s=new t(i,v.line,v.ch,o),{open:y,close:e(s,h[2]),at:"open"})}},CodeMirror.findEnclosingTag=function(n,i,r){for(var s=new t(n,i.line,i.ch,r),u,o,f;;){if(u=l(s),!u)break;if(o=new t(n,i.line,i.ch,r),f=e(o,u.tag),f)return{open:u,close:f}}}}(),function(){CodeMirror.defineExtension("autoFormatAll",function(n,t){function v(){h+="\n",e=!0,++a}for(var r=this,f=r.getMode(),o=r.getRange(n,t).split("\n"),s=CodeMirror.copyState(f,r.getTokenAt(n).state),y=r.getOption("tabSize"),h="",a=0,e=n.ch==0,i,u=0;u<o.length;++u){for(i=new CodeMirror.StringStream(o[u],y);!i.eol();){var c=CodeMirror.innerMode(f,s),p=f.token(i,s),l=i.current();i.start=i.pos,(!e||/\S/.test(l))&&(h+=l,e=!1),!e&&c.mode.newlineAfterToken&&c.mode.newlineAfterToken(p,l,i.string.slice(i.pos)||o[u+1]||"",c.state)&&v()}!i.pos&&f.blankLine&&f.blankLine(s),!e&&u<o.length-1&&v()}r.operation(function(){r.replaceRange(h,n,t);for(var i=n.line+1,u=n.line+a;i<=u;++i)r.indentLine(i,"smart");r.setCursor({line:0,ch:0})})})}(),function(){function n(n){for(var f=[/for\s*?\((.*?)\)/g,/&#?[a-z0-9]+;[\s\S]/g,/\"(.*?)((\")|$)/g,/\/\*(.*?)(\*\/|$)/g,/^\/\/.*/g],u=[],i,t,r=0;r<f.length;r++)for(i=0;i<n.length;)if(t=n.substr(i).match(f[r]),t!=null)u.push({start:i+t.index,end:i+t.index+t[0].length}),i+=t.index+Math.max(1,t[0].length);else break;return u.sort(function(n,t){return n.start-t.start}),u}CodeMirror.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(n,t){return/^[;{}]$/.test(t)}}),CodeMirror.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",wordWrapChars:[";","\\{","\\}"],autoFormatLineBreaks:function(t){var r=0,e=this.jsonMode?function(n){return n.replace(/([,{])/g,"$1\n").replace(/}/g,"\n}")}:function(n){return n.replace(/(;|\{|\})([^\r\n;])/g,"$1\n$2")},u=n(t),f="",i;if(u!=null){for(i=0;i<u.length;i++)u[i].start>r&&(f+=e(t.substring(r,u[i].start)),r=u[i].start),u[i].start<=r&&u[i].end>=r&&(f+=t.substring(r,u[i].end),r=u[i].end);r<t.length&&(f+=e(t.substr(r)))}else f=e(t);return f.replace(/^\n*|\n*$/,"")}});CodeMirror.extendMode("xml",{commentStart:"<!--",commentEnd:"-->",noBreak:!1,noBreakEmpty:null,tagType:"",tagName:"",isXML:!1,newlineAfterToken:function(n,t,i){var o="a|b|bdi|bdo|big|center|cite|del|em|font|i|img|ins|s|small|span|strike|strong|sub|sup|u",e="label|li|option|textarea|title|"+o,f=!1,r=null,u="",s;if(this.isXML=this.configuration=="xml"?!0:!1,n=="comment"||/<!--/.test(i))return!1;if(n=="tag"){if(t.indexOf("<")==0&&!t.indexOf("<\/")==0&&(this.tagType="open",r=t.match(/^<\s*?([\w]+?)$/i),this.tagName=r!=null?r[1]:"",u=this.tagName.toLowerCase(),("|"+e+"|").indexOf("|"+u+"|")!=-1&&(this.noBreak=!0)),t.indexOf(">")==0&&this.tagType=="open")return(this.tagType="",s=this.isXML?"[^<]*?":"",RegExp("^"+s+"<\/s*?"+this.tagName+"s*?>","i").test(i))?(this.noBreak=!1,this.isXML||(this.tagName=""),!1):(f=this.noBreak,this.noBreak=!1,f?!1:!0);if(t.indexOf("<\/")==0&&(this.tagType="close",r=t.match(/^<\/\s*?([\w]+?)$/i),r!=null&&(u=r[1].toLowerCase()),("|"+o+"|").indexOf("|"+u+"|")!=-1&&(this.noBreak=!0)),t.indexOf(">")==0&&this.tagType=="close")return(this.tagType="",i.indexOf("<")==0&&(r=i.match(/^<\/?\s*?([\w]+?)(\s|>)/i),u=r!=null?r[1].toLowerCase():"",("|"+e+"|").indexOf("|"+u+"|")==-1))?(this.noBreak=!1,!0):(f=this.noBreak,this.noBreak=!1,f?!1:!0)}return i.indexOf("<")==0?(this.noBreak=!1,this.isXML&&this.tagName!="")?(this.tagName="",!1):(r=i.match(/^<\/?\s*?([\w]+?)(\s|>)/i),u=r!=null?r[1].toLowerCase():"",("|"+e+"|").indexOf("|"+u+"|")!=-1?!1:!0):!1}}),CodeMirror.defineExtension("commentRange",function(n,t,i){var r=this,u=CodeMirror.innerMode(r.getMode(),r.getTokenAt(t).state).mode;r.operation(function(){if(n)r.replaceRange(u.commentEnd,i),r.replaceRange(u.commentStart,t),t.line==i.line&&t.ch==i.ch&&r.setCursor(t.line,t.ch+u.commentStart.length);else{var f=r.getRange(t,i),e=f.indexOf(u.commentStart),o=f.lastIndexOf(u.commentEnd);e>-1&&o>-1&&o>e&&(f=f.substr(0,e)+f.substring(e+u.commentStart.length,o)+f.substr(o+u.commentEnd.length)),r.replaceRange(f,t,i)}})}),CodeMirror.defineExtension("autoIndentRange",function(n,t){var i=this;this.operation(function(){for(var r=n.line;r<=t.line;r++)i.indentLine(r,"smart")})}),CodeMirror.defineExtension("autoFormatRange",function(n,t){function v(){h+="\n",e=!0,++a}for(var i=this,f=i.getMode(),o=i.getRange(n,t).split("\n"),s=CodeMirror.copyState(f,i.getTokenAt(n).state),y=i.getOption("tabSize"),h="",a=0,e=n.ch==0,r,u=0;u<o.length;++u){for(r=new CodeMirror.StringStream(o[u],y);!r.eol();){var c=CodeMirror.innerMode(f,s),p=f.token(r,s),l=r.current();r.start=r.pos,(!e||/\S/.test(l))&&(h+=l,e=!1),!e&&c.mode.newlineAfterToken&&c.mode.newlineAfterToken(p,l,r.string.slice(r.pos)||o[u+1]||"",c.state)&&v()}!r.pos&&f.blankLine&&f.blankLine(s),!e&&u<o.length-1&&v()}i.operation(function(){i.replaceRange(h,n,t);for(var r=n.line+1,u=n.line+a;r<=u;++r)i.indentLine(r,"smart");i.setSelection(n,i.getCursor(!1))})})}(),function(){function e(n){typeof n=="object"&&(this.minChars=n.minChars,this.style=n.style,this.showToken=n.showToken,this.delay=n.delay),this.style==null&&(this.style=u),this.minChars==null&&(this.minChars=r),this.delay==null&&(this.delay=f),this.overlay=this.timeout=null}function n(n){var i=n.state.matchHighlighter;clearTimeout(i.timeout),i.timeout=setTimeout(function(){t(n)},i.delay)}function t(n){n.operation(function(){var t=n.state.matchHighlighter,o;if(t.overlay&&(n.removeOverlay(t.overlay),t.overlay=null),!n.somethingSelected()&&t.showToken){for(var e=t.showToken===!0?/[\w$]/:t.showToken,s=n.getCursor(),f=n.getLine(s.line),r=s.ch,u=r;r&&e.test(f.charAt(r-1));)--r;while(u<f.length&&e.test(f.charAt(u)))++u;r<u&&n.addOverlay(t.overlay=i(f.slice(r,u),e,t.style));return}n.getCursor("head").line==n.getCursor("anchor").line&&(o=n.getSelection().replace(/^\s+|\s+$/g,""),o.length>=t.minChars&&n.addOverlay(t.overlay=i(o,!1,t.style)))})}function o(n,t){return(!n.start||!t.test(n.string.charAt(n.start-1)))&&(n.pos==n.string.length||!t.test(n.string.charAt(n.pos)))}function i(n,t,i){return{token:function(r){if(r.match(n)&&(!t||o(r,t)))return i;r.next(),r.skipTo(n.charAt(0))||r.skipToEnd()}}}var r=2,u="matchhighlight",f=100;CodeMirror.defineOption("highlightSelectionMatches",!1,function(i,r,u){if(u&&u!=CodeMirror.Init){var f=i.state.matchHighlighter.overlay;f&&i.removeOverlay(f),clearTimeout(i.state.matchHighlighter.timeout),i.state.matchHighlighter=null,i.off("cursorActivity",n)}if(r){i.state.matchHighlighter=new e(r),t(i);i.on("cursorActivity",n)}})}()
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){function n(n,t,i){var u=n.getWrapperElement(),r;return r=u.appendChild(document.createElement("div")),r.className=i?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top",typeof t=="string"?r.innerHTML=t:r.appendChild(t),r}function t(n,t){n.state.currentNotificationClose&&n.state.currentNotificationClose(),n.state.currentNotificationClose=t}CodeMirror.defineExtension("openDialog",function(i,r,u){function e(){h||(h=!0,o.parentNode.removeChild(o))}var f,s;t(this,null);var o=n(this,i,u&&u.bottom),h=!1,c=this;if(f=o.getElementsByTagName("input")[0],f){CodeMirror.on(f,"keydown",function(n){u&&u.onKeyDown&&u.onKeyDown(n,f.value,e)||(n.keyCode==13||n.keyCode==27)&&(CodeMirror.e_stop(n),e(),c.focus(),n.keyCode==13&&r(f.value))});if(u&&u.onKeyUp)CodeMirror.on(f,"keyup",function(n){u.onKeyUp(n,f.value,e)});u&&u.value&&(f.value=u.value),f.focus();CodeMirror.on(f,"blur",e)}else if(s=o.getElementsByTagName("button")[0]){CodeMirror.on(s,"click",function(){e(),c.focus()});s.focus();CodeMirror.on(s,"blur",e)}return e}),CodeMirror.defineExtension("openConfirm",function(i,r,u){function a(){c||(c=!0,o.parentNode.removeChild(o),l.focus())}var f,e;t(this,null);var o=n(this,i,u&&u.bottom),s=o.getElementsByTagName("button"),c=!1,l=this,h=1;for(s[0].focus(),f=0;f<s.length;++f){e=s[f],function(n){CodeMirror.on(e,"click",function(t){CodeMirror.e_preventDefault(t),a(),n&&n(l)})}(r[f]);CodeMirror.on(e,"blur",function(){--h,setTimeout(function(){h<=0&&a()},200)});CodeMirror.on(e,"focus",function(){++h})}}),CodeMirror.defineExtension("openNotification",function(i,r){function f(){e||(e=!0,clearTimeout(o),u.parentNode.removeChild(u))}t(this,f);var u=n(this,i,r&&r.bottom),s=r&&(r.duration===undefined?5e3:r.duration),e=!1,o;CodeMirror.on(u,"click",function(n){CodeMirror.e_preventDefault(n),f()});s&&(o=setTimeout(f,r.duration))})})(),function(){function s(n){return typeof n=="string"?{token:function(t){if(t.match(n))return"searching";t.next(),t.skipTo(n.charAt(0))||t.skipToEnd()}}:{token:function(t){if(t.match(n))return"searching";while(!t.eol())if(t.next(),t.match(n,!1))break}}}function h(){this.posFrom=this.posTo=this.query=null,this.overlay=null}function t(n){return n.state.search||(n.state.search=new h)}function n(n,t,i){return n.getSearchCursor(t,i,typeof t=="string"&&t==t.toLowerCase())}function i(n,t,i,r){n.openDialog?n.openDialog(t,r):r(prompt(i,""))}function c(n,t,i,r){n.openConfirm?n.openConfirm(t,r):confirm(i)&&r[0]()}function f(n){var t=n.match(/^\/(.*)\/([a-z]*)$/);return t?new RegExp(t[1],t[2].indexOf("i")==-1?"":"i"):n}function r(n,r){var u=t(n);if(u.query)return e(n,r);i(n,l,"Search for:",function(t){n.operation(function(){t&&!u.query&&(u.query=f(t),n.removeOverlay(u.overlay),u.overlay=s(u.query),n.addOverlay(u.overlay),u.posFrom=u.posTo=n.getCursor(),e(n,r))})})}function e(i,r){i.operation(function(){var f=t(i),u=n(i,f.query,r?f.posFrom:f.posTo);(u.find(r)||(u=n(i,f.query,r?CodeMirror.Pos(i.lastLine()):CodeMirror.Pos(i.firstLine(),0)),u.find(r)))&&(i.setSelection(u.from(),u.to()),i.scrollIntoView({from:u.from(),to:u.to()}),f.posFrom=u.from(),f.posTo=u.to())})}function u(n){n.operation(function(){var i=t(n);i.query&&(i.query=null,n.removeOverlay(i.overlay))})}function o(t,r){i(t,a,"Replace:",function(e){e&&(e=f(e),i(t,v,"Replace with:",function(i){if(r)t.operation(function(){for(var u,r=n(t,e);r.findNext();)typeof e!="string"?(u=t.getRange(r.from(),r.to()).match(e),r.replace(i.replace(/\$(\d)/,function(n,t){return u[t]}))):r.replace(i)});else{u(t);var f=n(t,e,t.getCursor()),o=function(){var i=f.from(),r;((r=f.findNext())||(f=n(t,e),(r=f.findNext())&&(!i||f.from().line!=i.line||f.from().ch!=i.ch)))&&(t.setSelection(f.from(),f.to()),t.scrollIntoView({from:f.from(),to:f.to()}),c(t,y,"Replace?",[function(){s(r)},o]))},s=function(n){f.replace(typeof e=="string"?i:i.replace(/\$(\d)/,function(t,i){return n[i]})),o()};o()}}))})}var l='Search: <input type="text" style="width: 10em"/> <span style="color: #888">(Use /re/ syntax for regexp search)<\/span>',a='Replace: <input type="text" style="width: 10em"/> <span style="color: #888">(Use /re/ syntax for regexp search)<\/span>',v='With: <input type="text" style="width: 10em"/>',y="Replace? <button>Yes<\/button> <button>No<\/button> <button>Stop<\/button>";CodeMirror.commands.find=function(n){u(n),r(n)},CodeMirror.commands.findNext=r,CodeMirror.commands.findPrev=function(n){r(n,!0)},CodeMirror.commands.clearSearch=u,CodeMirror.commands.replace=o,CodeMirror.commands.replaceAll=function(n){o(n,!0)}}(),function(){function t(t,i,r,u){if(this.atOccurrence=!1,this.doc=t,u==null&&typeof i=="string"&&(u=!1),r=r?t.clipPos(r):n(0,0),this.pos={from:r,to:r},typeof i!="string")i.global||(i=new RegExp(i.source,i.ignoreCase?"ig":"g")),this.matches=function(r,u){var o,h,f,s,c,e;if(r){for(i.lastIndex=0,o=t.getLine(u.line).slice(0,u.ch),h=0;;){if(i.lastIndex=h,c=i.exec(o),!c)break;if(f=c,s=f.index,h=f.index+(f[0].length||1),h==o.length)break}e=f&&f[0].length||0,e||(s==0&&o.length==0?f=undefined:s!=t.getLine(u.line).length&&e++)}else{i.lastIndex=u.ch;var o=t.getLine(u.line),f=i.exec(o),e=f&&f[0].length||0,s=f&&f.index;s+e==o.length||e||(e=1)}if(f&&e)return{from:n(u.line,s),to:n(u.line,s+e),match:f}};else{u&&(i=i.toLowerCase());var e=u?function(n){return n.toLowerCase()}:function(n){return n},f=i.split("\n");this.matches=f.length==1?i.length?function(r,u){var s=e(t.getLine(u.line)),o=i.length,f;if(r?u.ch>=o&&(f=s.lastIndexOf(i,u.ch-o))!=-1:(f=s.indexOf(i,u.ch))!=-1)return{from:n(u.line,f),to:n(u.line,f+o)}}:function(){}:function(i,r){var s=r.line,h=i?f.length-1:0,u=f[h],o=e(t.getLine(s)),c=i?o.indexOf(u)+u.length:o.lastIndexOf(u),l,a,v;if(!(i?c>r.ch||c!=u.length:c<r.ch||c!=o.length-u.length))for(;;){if(i?!s:s==t.lineCount()-1)return;if(o=e(t.getLine(s+=i?-1:1)),u=f[i?--h:++h],h>0&&h<f.length-1){if(o!=u)return;continue}return(l=i?o.lastIndexOf(u):o.indexOf(u)+u.length,i?l!=o.length-u.length:l!=u.length)?void 0:(a=n(r.line,c),v=n(s,l),{from:i?v:a,to:i?a:v})}}}}var n=CodeMirror.Pos;t.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){function f(t){var i=n(t,0);return u.pos={from:i,to:i},u.atOccurrence=!1,!1}for(var u=this,i=this.doc.clipPos(t?this.pos.from:this.pos.to),r;;){if(this.pos=this.matches(t,i))return this.pos.from&&this.pos.to||console.log(this.matches,this.pos),this.atOccurrence=!0,this.pos.match||!0;if(t){if(!i.line)return f(0);i=n(i.line-1,this.doc.getLine(i.line-1).length)}else{if(r=this.doc.lineCount(),i.line==r-1)return f(r);i=n(i.line+1,0)}}},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t){if(this.atOccurrence){var i=CodeMirror.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to),this.pos.to=n(this.pos.from.line+i.length-1,i[i.length-1].length+(i.length==1?this.pos.from.ch:0))}}},CodeMirror.defineExtension("getSearchCursor",function(n,i,r){return new t(this.doc,n,i,r)}),CodeMirror.defineDocExtension("getSearchCursor",function(n,i,r){return new t(this,n,i,r)})}()
|
@@ -0,0 +1 @@
|
|
1
|
+
window.CodeMirror=(function(){var bB=/gecko\/\d/i.test(navigator.userAgent);var cs=/MSIE \d/.test(navigator.userAgent);var by=cs&&(document.documentMode==null||document.documentMode<8);var bx=cs&&(document.documentMode==null||document.documentMode<9);var dr=/Trident\/([7-9]|\d{2,})\./.test(navigator.userAgent);var b1=/WebKit\//.test(navigator.userAgent);var cv=b1&&/Qt\/\d+\.\d+/.test(navigator.userAgent);var b8=/Chrome\//.test(navigator.userAgent);var dQ=/Opera\//.test(navigator.userAgent);var ad=/Apple Computer/.test(navigator.vendor);var aC=/KHTML\//.test(navigator.userAgent);var bM=/Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent);var b5=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent);var dN=/PhantomJS/.test(navigator.userAgent);var dm=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent);var cM=dm||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent);var bk=dm||/Mac/.test(navigator.platform);var al=/win/i.test(navigator.platform);var cY=dQ&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);if(cY){cY=Number(cY[1])}if(cY&&cY>=15){dQ=false;b1=true}var ba=bk&&(cv||dQ&&(cY==null||cY<12.11));var bQ=bB||(cs&&!bx);var ef=false,ay=false;function y(el,em){if(!(this instanceof y)){return new y(el,em)}this.options=em=em||{};for(var en in dp){if(!em.hasOwnProperty(en)&&dp.hasOwnProperty(en)){em[en]=dp[en]}}bs(em);var er=typeof em.value=="string"?0:em.value.first;var eq=this.display=f(el,er);eq.wrapper.CodeMirror=this;cI(this);if(em.autofocus&&!cM){c1(this)}this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:false,focused:false,suppressEdits:false,pasteIncoming:false,draggingText:false,highlight:new ek()};bV(this);if(em.lineWrapping){this.display.wrapper.className+=" CodeMirror-wrap"}var ep=em.value;if(typeof ep=="string"){ep=new X(em.value,em.mode)}b2(this,cH)(this,ep);if(cs){setTimeout(bH(dJ,this,true),20)}d3(this);var es;try{es=(document.activeElement==eq.input)}catch(eo){}if(es||(em.autofocus&&!cM)){setTimeout(bH(bL,this),20)}else{aq(this)}b2(this,function(){for(var eu in aF){if(aF.propertyIsEnumerable(eu)){aF[eu](this,em[eu],bq)}}for(var et=0;et<az.length;++et){az[et](this)}})()}function f(el,en){var eo={};var em=eo.input=d8("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none; font-size: 4px;");if(b1){em.style.width="1000px"}else{em.setAttribute("wrap","off")}if(dm){em.style.border="1px solid black"}em.setAttribute("autocorrect","off");em.setAttribute("autocapitalize","off");em.setAttribute("spellcheck","false");eo.inputDiv=d8("div",[em],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");eo.scrollbarH=d8("div",[d8("div",null,null,"height: 1px")],"CodeMirror-hscrollbar");eo.scrollbarV=d8("div",[d8("div",null,null,"width: 1px")],"CodeMirror-vscrollbar");eo.scrollbarFiller=d8("div",null,"CodeMirror-scrollbar-filler");eo.gutterFiller=d8("div",null,"CodeMirror-gutter-filler");eo.lineDiv=d8("div",null,"CodeMirror-code");eo.selectionDiv=d8("div",null,null,"position: relative; z-index: 1");eo.cursor=d8("div","\u00a0","CodeMirror-cursor");eo.otherCursor=d8("div","\u00a0","CodeMirror-cursor CodeMirror-secondarycursor");eo.measure=d8("div",null,"CodeMirror-measure");eo.lineSpace=d8("div",[eo.measure,eo.selectionDiv,eo.lineDiv,eo.cursor,eo.otherCursor],null,"position: relative; outline: none");eo.mover=d8("div",[d8("div",[eo.lineSpace],"CodeMirror-lines")],null,"position: relative");eo.sizer=d8("div",[eo.mover],"CodeMirror-sizer");eo.heightForcer=d8("div",null,null,"position: absolute; height: "+aJ+"px; width: 1px;");eo.gutters=d8("div",null,"CodeMirror-gutters");eo.lineGutter=null;eo.scroller=d8("div",[eo.sizer,eo.heightForcer,eo.gutters],"CodeMirror-scroll");eo.scroller.setAttribute("tabIndex","-1");eo.wrapper=d8("div",[eo.inputDiv,eo.scrollbarH,eo.scrollbarV,eo.scrollbarFiller,eo.gutterFiller,eo.scroller],"CodeMirror");if(by){eo.gutters.style.zIndex=-1;eo.scroller.style.paddingRight=0}if(el.appendChild){el.appendChild(eo.wrapper)}else{el(eo.wrapper)}if(dm){em.style.width="0px"}if(!b1){eo.scroller.draggable=true}if(aC){eo.inputDiv.style.height="1px";eo.inputDiv.style.position="absolute"}else{if(by){eo.scrollbarH.style.minWidth=eo.scrollbarV.style.minWidth="18px"}}eo.viewOffset=eo.lastSizeC=0;eo.showingFrom=eo.showingTo=en;eo.lineNumWidth=eo.lineNumInnerWidth=eo.lineNumChars=null;eo.prevInput="";eo.alignWidgets=false;eo.pollingFast=false;eo.poll=new ek();eo.cachedCharWidth=eo.cachedTextHeight=null;eo.measureLineCache=[];eo.measureLineCachePos=0;eo.inaccurateSelection=false;eo.maxLine=null;eo.maxLineLength=0;eo.maxLineChanged=false;eo.wheelDX=eo.wheelDY=eo.wheelStartX=eo.wheelStartY=null;return eo}function aR(el){el.doc.mode=y.getMode(el.options,el.doc.modeOption);el.doc.iter(function(em){if(em.stateAfter){em.stateAfter=null}if(em.styles){em.styles=null}});el.doc.frontier=el.doc.first;cL(el,100);el.state.modeGen++;if(el.curOp){N(el)}}function c9(el){if(el.options.lineWrapping){el.display.wrapper.className+=" CodeMirror-wrap";el.display.sizer.style.minWidth=""}else{el.display.wrapper.className=el.display.wrapper.className.replace(" CodeMirror-wrap","");eb(el)}I(el);N(el);Q(el);setTimeout(function(){dk(el)},100)}function aE(el){var en=at(el.display),em=el.options.lineWrapping;var eo=em&&Math.max(5,el.display.scroller.clientWidth/cq(el.display)-3);return function(ep){if(dO(el.doc,ep)){return 0}else{if(em){return(Math.ceil(ep.text.length/eo)||1)*en}else{return en}}}}function I(el){var en=el.doc,em=aE(el);en.iter(function(eo){var ep=em(eo);if(ep!=eo.height){ed(eo,ep)}})}function ei(el){var en=du[el.options.keyMap],em=en.style;el.display.wrapper.className=el.display.wrapper.className.replace(/\s*cm-keymap-\S+/g,"")+(em?" cm-keymap-"+em:"");el.state.disableInput=en.disableInput}function bV(el){el.display.wrapper.className=el.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+el.options.theme.replace(/(^|\s)\s*/g," cm-s-");Q(el)}function cl(el){cI(el);N(el);setTimeout(function(){c5(el)},20)}function cI(el){var em=el.display.gutters,eq=el.options.gutters;cB(em);for(var en=0;en<eq.length;++en){var eo=eq[en];var ep=em.appendChild(d8("div",null,"CodeMirror-gutter "+eo));if(eo=="CodeMirror-linenumbers"){el.display.lineGutter=ep;ep.style.width=(el.display.lineNumWidth||1)+"px"}}em.style.display=en?"":"none"}function cQ(ep,en){if(en.height==0){return 0}var em=en.text.length,el,eq=en;while(el=dc(eq)){var eo=el.find();eq=dy(ep,eo.from.line);em+=eo.from.ch-eo.to.ch}eq=en;while(el=cV(eq)){var eo=el.find();em-=eq.text.length-eo.from.ch;eq=dy(ep,eo.to.line);em+=eq.text.length-eo.to.ch}return em}function eb(el){var en=el.display,em=el.doc;en.maxLine=dy(em,em.first);en.maxLineLength=cQ(em,en.maxLine);en.maxLineChanged=true;em.iter(function(ep){var eo=cQ(em,ep);if(eo>en.maxLineLength){en.maxLineLength=eo;en.maxLine=ep}})}function bs(el){var em=cd(el.gutters,"CodeMirror-linenumbers");if(em==-1&&el.lineNumbers){el.gutters=el.gutters.concat(["CodeMirror-linenumbers"])}else{if(em>-1&&!el.lineNumbers){el.gutters=el.gutters.slice(0);el.gutters.splice(em,1)}}}function dk(el){var er=el.display,em=el.doc.height;var eo=em+a3(er);er.sizer.style.minHeight=er.heightForcer.style.top=eo+"px";er.gutters.style.height=Math.max(eo,er.scroller.clientHeight-aJ)+"px";var ep=Math.max(eo,er.scroller.scrollHeight);var eq=er.scroller.scrollWidth>(er.scroller.clientWidth+1);var en=ep>(er.scroller.clientHeight+1);if(en){er.scrollbarV.style.display="block";er.scrollbarV.style.bottom=eq?i(er.measure)+"px":"0";er.scrollbarV.firstChild.style.height=(ep-er.scroller.clientHeight+er.scrollbarV.clientHeight)+"px"}else{er.scrollbarV.style.display="";er.scrollbarV.firstChild.style.height="0"}if(eq){er.scrollbarH.style.display="block";er.scrollbarH.style.right=en?i(er.measure)+"px":"0";er.scrollbarH.firstChild.style.width=(er.scroller.scrollWidth-er.scroller.clientWidth+er.scrollbarH.clientWidth)+"px"}else{er.scrollbarH.style.display="";er.scrollbarH.firstChild.style.width="0"}if(eq&&en){er.scrollbarFiller.style.display="block";er.scrollbarFiller.style.height=er.scrollbarFiller.style.width=i(er.measure)+"px"}else{er.scrollbarFiller.style.display=""}if(eq&&el.options.coverGutterNextToScrollbar&&el.options.fixedGutter){er.gutterFiller.style.display="block";er.gutterFiller.style.height=i(er.measure)+"px";er.gutterFiller.style.width=er.gutters.offsetWidth+"px"}else{er.gutterFiller.style.display=""}if(bM&&i(er.measure)===0){er.scrollbarV.style.minWidth=er.scrollbarH.style.minHeight=b5?"18px":"12px";er.scrollbarV.style.pointerEvents=er.scrollbarH.style.pointerEvents="none"}}function bj(eq,ep,eo){var en=eq.scroller.scrollTop,el=eq.wrapper.clientHeight;if(typeof eo=="number"){en=eo}else{if(eo){en=eo.top;el=eo.bottom-eo.top}}en=Math.floor(en-ds(eq));var em=Math.ceil(en+el);return{from:a1(ep,en),to:a1(ep,em)}}function c5(el){var er=el.display;if(!er.alignWidgets&&(!er.gutters.firstChild||!el.options.fixedGutter)){return}var eo=cA(er)-er.scroller.scrollLeft+el.doc.scrollLeft;var eq=er.gutters.offsetWidth,en=eo+"px";for(var es=er.lineDiv.firstChild;es;es=es.nextSibling){if(es.alignable){for(var ep=0,em=es.alignable;ep<em.length;++ep){em[ep].style.left=en}}}if(el.options.fixedGutter){er.gutters.style.left=(eo+eq)+"px"}}function cD(el){if(!el.options.lineNumbers){return false}var eq=el.doc,em=cT(el.options,eq.first+eq.size-1),ep=el.display;if(em.length!=ep.lineNumChars){var er=ep.measure.appendChild(d8("div",[d8("div",em)],"CodeMirror-linenumber CodeMirror-gutter-elt"));var en=er.firstChild.offsetWidth,eo=er.offsetWidth-en;ep.lineGutter.style.width="";ep.lineNumInnerWidth=Math.max(en,ep.lineGutter.offsetWidth-eo);ep.lineNumWidth=ep.lineNumInnerWidth+eo;ep.lineNumChars=ep.lineNumInnerWidth?em.length:-1;ep.lineGutter.style.width=ep.lineNumWidth+"px";return true}return false}function cT(el,em){return String(el.lineNumberFormatter(em+el.firstLineNumber))}function cA(el){return ak(el.scroller).left-ak(el.sizer).left}function ct(eq,ep,et,eu){var es=eq.display.showingFrom,er=eq.display.showingTo,eo;var el=bj(eq.display,eq.doc,et);for(var en=true;;en=false){var em=eq.display.scroller.clientWidth;if(!cb(eq,ep,el,eu)){break}eo=true;ep=[];aY(eq);dk(eq);if(en&&eq.options.lineWrapping&&em!=eq.display.scroller.clientWidth){eu=true;continue}eu=false;if(et){et=Math.min(eq.display.scroller.scrollHeight-eq.display.scroller.clientHeight,typeof et=="number"?et:et.top)}el=bj(eq.display,eq.doc,et);if(el.from>=eq.display.showingFrom&&el.to<=eq.display.showingTo){break}}if(eo){L(eq,"update",eq);if(eq.display.showingFrom!=es||eq.display.showingTo!=er){L(eq,"viewportChange",eq,eq.display.showingFrom,eq.display.showingTo)}}return eo}function cb(ep,eD,em,eB){var ev=ep.display,eE=ep.doc;if(!ev.wrapper.clientWidth){ev.showingFrom=ev.showingTo=eE.first;ev.viewOffset=0;return}if(!eB&&eD.length==0&&em.from>ev.showingFrom&&em.to<ev.showingTo){return}if(cD(ep)){eD=[{from:eE.first,to:eE.first+eE.size}]}var eA=ev.sizer.style.marginLeft=ev.gutters.offsetWidth+"px";ev.scrollbarH.style.left=ep.options.fixedGutter?eA:"0";var en=Infinity;if(ep.options.lineNumbers){for(var ew=0;ew<eD.length;++ew){if(eD[ew].diff&&eD[ew].from<en){en=eD[ew].from}}}var eo=eE.first+eE.size;var eu=Math.max(em.from-ep.options.viewportMargin,eE.first);var el=Math.min(eo,em.to+ep.options.viewportMargin);if(ev.showingFrom<eu&&eu-ev.showingFrom<20){eu=Math.max(eE.first,ev.showingFrom)}if(ev.showingTo>el&&ev.showingTo-el<20){el=Math.min(eo,ev.showingTo)}if(ay){eu=a8(s(eE,dy(eE,eu)));while(el<eo&&dO(eE,dy(eE,el))){++el}}var ey=[{from:Math.max(ev.showingFrom,eE.first),to:Math.min(ev.showingTo,eo)}];if(ey[0].from>=ey[0].to){ey=[]}else{ey=dI(ey,eD)}if(ay){for(var ew=0;ew<ey.length;++ew){var er=ey[ew],ez;while(ez=cV(dy(eE,er.to-1))){var eC=ez.find().from.line;if(eC>er.from){er.to=eC}else{ey.splice(ew--,1);break}}}}var et=0;for(var ew=0;ew<ey.length;++ew){var er=ey[ew];if(er.from<eu){er.from=eu}if(er.to>el){er.to=el}if(er.from>=er.to){ey.splice(ew--,1)}else{et+=er.to-er.from}}if(!eB&&et==el-eu&&eu==ev.showingFrom&&el==ev.showingTo){h(ep);return}ey.sort(function(eG,eF){return eG.from-eF.from});try{var eq=document.activeElement}catch(ex){}if(et<(el-eu)*0.7){ev.lineDiv.style.display="none"}bz(ep,eu,el,ey,en);ev.lineDiv.style.display="";if(eq&&document.activeElement!=eq&&eq.offsetHeight){eq.focus()}var es=eu!=ev.showingFrom||el!=ev.showingTo||ev.lastSizeC!=ev.wrapper.clientHeight;if(es){ev.lastSizeC=ev.wrapper.clientHeight;cL(ep,400)}ev.showingFrom=eu;ev.showingTo=el;aA(ep);h(ep);return true}function aA(et){var eq=et.display;var em=eq.lineDiv.offsetTop;for(var el=eq.lineDiv.firstChild,eu;el;el=el.nextSibling){if(el.lineObj){if(by){var ep=el.offsetTop+el.offsetHeight;eu=ep-em;em=ep}else{var eo=ak(el);eu=eo.bottom-eo.top}var es=el.lineObj.height-eu;if(eu<2){eu=at(eq)}if(es>0.001||es<-0.001){ed(el.lineObj,eu);var er=el.lineObj.widgets;if(er){for(var en=0;en<er.length;++en){er[en].height=er[en].node.offsetHeight}}}}}}function h(el){var em=el.display.viewOffset=a7(el,dy(el.doc,el.display.showingFrom));el.display.mover.style.top=em+"px"}function dI(eu,es){for(var ep=0,en=es.length||0;ep<en;++ep){var er=es[ep],el=[],et=er.diff||0;for(var eo=0,em=eu.length;eo<em;++eo){var eq=eu[eo];if(er.to<=eq.from&&er.diff){el.push({from:eq.from+et,to:eq.to+et})}else{if(er.to<=eq.from||er.from>=eq.to){el.push(eq)}else{if(er.from>eq.from){el.push({from:eq.from,to:er.from})}if(er.to<eq.to){el.push({from:er.to+et,to:eq.to+et})}}}}eu=el}return eu}function dv(el){var ep=el.display,eo={},en={};for(var eq=ep.gutters.firstChild,em=0;eq;eq=eq.nextSibling,++em){eo[el.options.gutters[em]]=eq.offsetLeft;en[el.options.gutters[em]]=eq.offsetWidth}return{fixedPos:cA(ep),gutterTotalWidth:ep.gutters.offsetWidth,gutterLeft:eo,gutterWidth:en,wrapperWidth:ep.wrapper.clientWidth}}function bz(eu,er,es,ex,em){var et=dv(eu);var eq=eu.display,ew=eu.options.lineNumbers;if(!ex.length&&(!b1||!eu.display.currentWheelTarget)){cB(eq.lineDiv)}var el=eq.lineDiv,ev=el.firstChild;function ep(ez){var ey=ez.nextSibling;if(b1&&bk&&eu.display.currentWheelTarget==ez){ez.style.display="none";ez.lineObj=null}else{ez.parentNode.removeChild(ez)}return ey}var en=ex.shift(),eo=er;eu.doc.iter(er,es,function(eH){if(en&&en.to==eo){en=ex.shift()}if(dO(eu.doc,eH)){if(eH.height!=0){ed(eH,0)}if(eH.widgets&&ev&&ev.previousSibling){for(var eC=0;eC<eH.widgets.length;++eC){var eE=eH.widgets[eC];if(eE.showIfHidden){var eA=ev.previousSibling;if(/pre/i.test(eA.nodeName)){var ez=d8("div",null,null,"position: relative");eA.parentNode.replaceChild(ez,eA);ez.appendChild(eA);eA=ez}var eF=eA.appendChild(d8("div",[eE.node],"CodeMirror-linewidget"));if(!eE.handleMouseEvents){eF.ignoreEvents=true}a0(eE,eF,eA,et)}}}}else{if(en&&en.from<=eo&&en.to>eo){while(ev.lineObj!=eH){ev=ep(ev)}if(ew&&em<=eo&&ev.lineNumber){m(ev.lineNumber,cT(eu.options,eo))}ev=ev.nextSibling}else{if(eH.widgets){for(var eB=0,eG=ev,eD;eG&&eB<20;++eB,eG=eG.nextSibling){if(eG.lineObj==eH&&/div/i.test(eG.nodeName)){eD=eG;break}}}var ey=af(eu,eH,eo,et,eD);if(ey!=eD){el.insertBefore(ey,ev)}else{while(ev!=eD){ev=ep(ev)}ev=ev.nextSibling}ey.lineObj=eH}}++eo});while(ev){ev=ep(ev)}}function af(es,eu,ev,ey,en){var er=de(es,eu),eE=er.pre;var eH=eu.gutterMarkers,eF=es.display,et;var em=er.bgClass?er.bgClass+" "+(eu.bgClass||""):eu.bgClass;if(!es.options.lineNumbers&&!eH&&!em&&!eu.wrapClass&&!eu.widgets){return eE}if(en){en.alignable=null;var eI=true,eq=0,eo=null;for(var eA=en.firstChild,ez;eA;eA=ez){ez=eA.nextSibling;if(!/\bCodeMirror-linewidget\b/.test(eA.className)){en.removeChild(eA)}else{for(var eG=0;eG<eu.widgets.length;++eG){var ep=eu.widgets[eG];if(ep.node==eA.firstChild){if(!ep.above&&!eo){eo=eA}a0(ep,eA,en,ey);++eq;break}}if(eG==eu.widgets.length){eI=false;break}}}en.insertBefore(eE,eo);if(eI&&eq==eu.widgets.length){et=en;en.className=eu.wrapClass||""}}if(!et){et=d8("div",null,eu.wrapClass,"position: relative");et.appendChild(eE)}if(em){et.insertBefore(d8("div",null,em+" CodeMirror-linebackground"),et.firstChild)}if(es.options.lineNumbers||eH){var eC=et.insertBefore(d8("div",null,null,"position: absolute; left: "+(es.options.fixedGutter?ey.fixedPos:-ey.gutterTotalWidth)+"px"),et.firstChild);if(es.options.fixedGutter){(et.alignable||(et.alignable=[])).push(eC)}if(es.options.lineNumbers&&(!eH||!eH["CodeMirror-linenumbers"])){et.lineNumber=eC.appendChild(d8("div",cT(es.options,ev),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+ey.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+eF.lineNumInnerWidth+"px"))}if(eH){for(var eD=0;eD<es.options.gutters.length;++eD){var ex=es.options.gutters[eD],ew=eH.hasOwnProperty(ex)&&eH[ex];if(ew){eC.appendChild(d8("div",[ew],"CodeMirror-gutter-elt","left: "+ey.gutterLeft[ex]+"px; width: "+ey.gutterWidth[ex]+"px"))}}}}if(by){et.style.zIndex=2}if(eu.widgets&&et!=en){for(var eG=0,el=eu.widgets;eG<el.length;++eG){var ep=el[eG],eB=d8("div",[ep.node],"CodeMirror-linewidget");if(!ep.handleMouseEvents){eB.ignoreEvents=true}a0(ep,eB,et,ey);if(ep.above){et.insertBefore(eB,es.options.lineNumbers&&eu.height!=0?eC:eE)}else{et.appendChild(eB)}L(ep,"redraw")}}return et}function a0(eo,en,em,ep){if(eo.noHScroll){(em.alignable||(em.alignable=[])).push(en);var el=ep.wrapperWidth;en.style.left=ep.fixedPos+"px";if(!eo.coverGutter){el-=ep.gutterTotalWidth;en.style.paddingLeft=ep.gutterTotalWidth+"px"}en.style.width=el+"px"}if(eo.coverGutter){en.style.zIndex=5;en.style.position="relative";if(!eo.noHScroll){en.style.marginLeft=-ep.gutterTotalWidth+"px"}}}function aY(el){var eo=el.display;var ep=dX(el.doc.sel.from,el.doc.sel.to);if(ep||el.options.showCursorWhenSelecting){z(el)}else{eo.cursor.style.display=eo.otherCursor.style.display="none"}if(!ep){S(el)}else{eo.selectionDiv.style.display="none"}if(el.options.moveInputWithCursor){var eq=cy(el,el.doc.sel.head,"div");var em=ak(eo.wrapper),en=ak(eo.lineDiv);eo.inputDiv.style.top=Math.max(0,Math.min(eo.wrapper.clientHeight-10,eq.top+en.top-em.top))+"px";eo.inputDiv.style.left=Math.max(0,Math.min(eo.wrapper.clientWidth-10,eq.left+en.left-em.left))+"px"}}function z(el){var em=el.display,en=cy(el,el.doc.sel.head,"div");em.cursor.style.left=en.left+"px";em.cursor.style.top=en.top+"px";em.cursor.style.height=Math.max(0,en.bottom-en.top)*el.options.cursorHeight+"px";em.cursor.style.display="";if(en.other){em.otherCursor.style.display="";em.otherCursor.style.left=en.other.left+"px";em.otherCursor.style.top=en.other.top+"px";em.otherCursor.style.height=(en.other.bottom-en.other.top)*0.85+"px"}else{em.otherCursor.style.display="none"}}function S(ew){var er=ew.display,ev=ew.doc,el=ew.doc.sel;var ep=document.createDocumentFragment();var eu=er.lineSpace.offsetWidth,en=ar(ew.display);function ey(eC,eB,eA,ez){if(eB<0){eB=0}ep.appendChild(d8("div",null,"CodeMirror-selected","position: absolute; left: "+eC+"px; top: "+eB+"px; width: "+(eA==null?eu-eC:eA)+"px; height: "+(ez-eB)+"px"))}function et(eA,eC,eF){var eB=dy(ev,eA);var eD=eB.text.length;var eG,ez;function eE(eI,eH){return bS(ew,H(eA,eI),"div",eB,eH)}cC(a(eB),eC||0,eF==null?eD:eF,function(eO,eN,eH){var eK=eE(eO,"left"),eL,eM,eJ;if(eO==eN){eL=eK;eM=eJ=eK.left}else{eL=eE(eN-1,"right");if(eH=="rtl"){var eI=eK;eK=eL;eL=eI}eM=eK.left;eJ=eL.right}if(eC==null&&eO==0){eM=en}if(eL.top-eK.top>3){ey(eM,eK.top,null,eK.bottom);eM=en;if(eK.bottom<eL.top){ey(eM,eK.bottom,null,eL.top)}}if(eF==null&&eN==eD){eJ=eu}if(!eG||eK.top<eG.top||eK.top==eG.top&&eK.left<eG.left){eG=eK}if(!ez||eL.bottom>ez.bottom||eL.bottom==ez.bottom&&eL.right>ez.right){ez=eL}if(eM<en+1){eM=en}ey(eM,eL.top,eJ-eM,eL.bottom)});return{start:eG,end:ez}}if(el.from.line==el.to.line){et(el.from.line,el.from.ch,el.to.ch)}else{var eo=dy(ev,el.from.line),em=dy(ev,el.to.line);var eq=s(ev,eo)==s(ev,em);var ex=et(el.from.line,el.from.ch,eq?eo.text.length:null).end;var es=et(el.to.line,eq?0:null,el.to.ch).start;if(eq){if(ex.top<es.top-2){ey(ex.right,ex.top,null,ex.bottom);ey(en,es.top,es.left,es.bottom)}else{ey(ex.right,ex.top,es.left-ex.right,ex.bottom)}}if(ex.bottom<es.top){ey(en,ex.bottom,null,es.top)}}bc(er.selectionDiv,ep);er.selectionDiv.style.display=""}function k(el){if(!el.state.focused){return}var en=el.display;clearInterval(en.blinker);var em=true;en.cursor.style.visibility=en.otherCursor.style.visibility="";if(el.options.cursorBlinkRate>0){en.blinker=setInterval(function(){en.cursor.style.visibility=en.otherCursor.style.visibility=(em=!em)?"":"hidden"},el.options.cursorBlinkRate)}}function cL(el,em){if(el.doc.mode.startState&&el.doc.frontier<el.display.showingTo){el.state.highlight.set(em,bH(bW,el))}}function bW(el){var eo=el.doc;if(eo.frontier<eo.first){eo.frontier=eo.first}if(eo.frontier>=el.display.showingTo){return}var em=+new Date+el.options.workTime;var en=bi(eo.mode,co(el,eo.frontier));var eq=[],ep;eo.iter(eo.frontier,Math.min(eo.first+eo.size,el.display.showingTo+500),function(er){if(eo.frontier>=el.display.showingFrom){var et=er.styles;er.styles=dT(el,er,en,true);var eu=!et||et.length!=er.styles.length;for(var es=0;!eu&&es<et.length;++es){eu=et[es]!=er.styles[es]}if(eu){if(ep&&ep.end==eo.frontier){ep.end++}else{eq.push(ep={start:eo.frontier,end:eo.frontier+1})}}er.stateAfter=bi(eo.mode,en)}else{cm(el,er.text,en);er.stateAfter=eo.frontier%5==0?bi(eo.mode,en):null}++eo.frontier;if(+new Date>em){cL(el,el.options.workDelay);return true}});if(eq.length){b2(el,function(){for(var er=0;er<eq.length;++er){N(this,eq[er].start,eq[er].end)}})()}}function bJ(er,el,eo){var em,ep,eq=er.doc;var en=eo?-1:el-(er.doc.mode.innerMode?1000:100);for(var eu=el;eu>en;--eu){if(eu<=eq.first){return eq.first}var et=dy(eq,eu-1);if(et.stateAfter&&(!eo||eu<=eq.frontier)){return eu}var es=bb(et.text,null,er.options.tabSize);if(ep==null||em>es){ep=eu-1;em=es}}return ep}function co(el,er,em){var ep=el.doc,eo=el.display;if(!ep.mode.startState){return true}var eq=bJ(el,er,em),en=eq>ep.first&&dy(ep,eq-1).stateAfter;if(!en){en=bh(ep.mode)}else{en=bi(ep.mode,en)}ep.iter(eq,er,function(es){cm(el,es.text,en);var et=eq==er-1||eq%5==0||eq>=eo.showingFrom&&eq<eo.showingTo;es.stateAfter=et?bi(ep.mode,en):null;++eq});if(em){ep.frontier=eq}return en}function ds(el){return el.lineSpace.offsetTop}function a3(el){return el.mover.offsetHeight-el.lineSpace.offsetHeight}function ar(em){var el=bc(em.measure,d8("pre",null,null,"text-align: left")).appendChild(d8("span","x"));return el.offsetLeft}function cN(es,et,em,ep,eq){var eo=-1;ep=ep||a4(es,et);if(ep.crude){var en=ep.left+em*ep.width;return{left:en,right:en+ep.width,top:ep.top,bottom:ep.bottom}}for(var er=em;;er+=eo){var el=ep[er];if(el){break}if(eo<0&&er==0){eo=1}}eq=er>em?"left":er<em?"right":eq;if(eq=="left"&&el.leftSide){el=el.leftSide}else{if(eq=="right"&&el.rightSide){el=el.rightSide}}return{left:er<em?el.right:el.left,right:er>em?el.left:el.right,top:el.top,bottom:el.bottom}}function dq(el,em){var eo=el.display.measureLineCache;for(var ep=0;ep<eo.length;++ep){var en=eo[ep];if(en.text==em.text&&en.markedSpans==em.markedSpans&&el.display.scroller.clientWidth==en.width&&en.classes==em.textClass+"|"+em.wrapClass){return en}}}function d1(el,em){var en=dq(el,em);if(en){en.text=en.measure=en.markedSpans=null}}function a4(el,em){var eq=dq(el,em);if(eq){return eq.measure}var ep=ca(el,em);var eo=el.display.measureLineCache;var en={text:em.text,width:el.display.scroller.clientWidth,markedSpans:em.markedSpans,measure:ep,classes:em.textClass+"|"+em.wrapClass};if(eo.length==16){eo[++el.display.measureLineCachePos%16]=en}else{eo.push(en)}return ep}function ca(es,eu){if(!es.options.lineWrapping&&eu.text.length>=es.options.crudeMeasuringFrom){return d9(es,eu)}var eA=es.display,eq=R(eu.text.length);var ex=de(es,eu,eq,true).pre;if(cs&&!by&&!es.options.lineWrapping&&ex.childNodes.length>100){var en=document.createDocumentFragment();var ev=10,ey=ex.childNodes.length;for(var eC=0,ew=Math.ceil(ey/ev);eC<ew;++eC){var et=d8("div",null,null,"display: inline-block");for(var eB=0;eB<ev&&ey;++eB){et.appendChild(ex.firstChild);--ey}en.appendChild(et)}ex.appendChild(en)}bc(eA.measure,ex);var em=ak(eA.lineDiv);var el=[],eF=R(eu.text.length),eE=ex.offsetHeight;if(bx&&eA.measure.first!=ex){bc(eA.measure,ex)}function eD(eI){var eK=eI.top-em.top,eM=eI.bottom-em.top;if(eM>eE){eM=eE}if(eK<0){eK=0}for(var eH=el.length-2;eH>=0;eH-=2){var eJ=el[eH],eL=el[eH+1];if(eJ>eM||eL<eK){continue}if(eJ<=eK&&eL>=eM||eK<=eJ&&eM>=eL||Math.min(eM,eL)-Math.max(eK,eJ)>=(eM-eK)>>1){el[eH]=Math.min(eK,eJ);el[eH+1]=Math.max(eM,eL);break}}if(eH<0){eH=el.length;el.push(eK,eM)}return{left:eI.left-em.left,right:eI.right-em.left,top:eH,bottom:null}}function eG(eH){eH.bottom=el[eH.top+1];eH.top=el[eH.top]}for(var eC=0,ep;eC<eq.length;++eC){if(ep=eq[eC]){var ez=ep,eo=null;if(/\bCodeMirror-widget\b/.test(ep.className)&&ep.getClientRects){if(ep.firstChild.nodeType==1){ez=ep.firstChild}var er=ez.getClientRects();if(er.length>1){eo=eF[eC]=eD(er[0]);eo.rightSide=eD(er[er.length-1])}}if(!eo){eo=eF[eC]=eD(ak(ez))}if(ep.measureRight){eo.right=ak(ep.measureRight).left}if(ep.leftSide){eo.leftSide=eD(ak(ep.leftSide))}}}cB(es.display.measure);for(var eC=0,ep;eC<eF.length;++eC){if(ep=eF[eC]){eG(ep);if(ep.leftSide){eG(ep.leftSide)}if(ep.rightSide){eG(ep.rightSide)}}}return eF}function d9(el,em){var eq=new ec(em.text.slice(0,100),null);if(em.textClass){eq.textClass=em.textClass}var eo=ca(el,eq);var ep=cN(el,eq,0,eo,"left");var en=cN(el,eq,99,eo,"right");return{crude:true,top:ep.top,left:ep.left,bottom:ep.bottom,width:(en.right-ep.left)/100}}function c6(el,en){var es=false;if(en.markedSpans){for(var eo=0;eo<en.markedSpans;++eo){var eq=en.markedSpans[eo];if(eq.collapsed&&(eq.to==null||eq.to==en.text.length)){es=true}}}var ep=!es&&dq(el,en);if(ep||en.text.length>=el.options.crudeMeasuringFrom){return cN(el,en,en.text.length,ep&&ep.measure,"right").right}var er=de(el,en,null,true).pre;var em=er.appendChild(aN(el.display.measure));bc(el.display.measure,er);return ak(em).right-ak(el.display.lineDiv).left}function Q(el){el.display.measureLineCache.length=el.display.measureLineCachePos=0;el.display.cachedCharWidth=el.display.cachedTextHeight=null;if(!el.options.lineWrapping){el.display.maxLineChanged=true}el.display.lineNumChars=null}function bG(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function bF(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function dd(er,eo,eq,em){if(eo.widgets){for(var en=0;en<eo.widgets.length;++en){if(eo.widgets[en].above){var et=bZ(eo.widgets[en]);eq.top+=et;eq.bottom+=et}}}if(em=="line"){return eq}if(!em){em="local"}var ep=a7(er,eo);if(em=="local"){ep+=ds(er.display)}else{ep-=er.display.viewOffset}if(em=="page"||em=="window"){var el=ak(er.display.lineSpace);ep+=el.top+(em=="window"?0:bF());var es=el.left+(em=="window"?0:bG());eq.left+=es;eq.right+=es}eq.top+=ep;eq.bottom+=ep;return eq}function eh(em,ep,en){if(en=="div"){return ep}var er=ep.left,eq=ep.top;if(en=="page"){er-=bG();eq-=bF()}else{if(en=="local"||!en){var eo=ak(em.display.sizer);er+=eo.left;eq+=eo.top}}var el=ak(em.display.lineSpace);return{left:er-el.left,top:eq-el.top}}function bS(el,ep,eo,en,em){if(!en){en=dy(el.doc,ep.line)}return dd(el,en,cN(el,en,ep.ch,null,em),eo)}function cy(eu,et,en,es,eq){es=es||dy(eu.doc,et.line);if(!eq){eq=a4(eu,es)}function ep(ey,ex){var ew=cN(eu,es,ey,eq,ex?"right":"left");if(ex){ew.left=ew.right}else{ew.right=ew.left}return dd(eu,es,ew,en)}function ev(ez,ew){var ex=er[ew],ey=ex.level%2;if(ez==cn(ex)&&ew&&ex.level<er[ew-1].level){ex=er[--ew];ez=eg(ex)-(ex.level%2?0:1);ey=true}else{if(ez==eg(ex)&&ew<er.length-1&&ex.level<er[ew+1].level){ex=er[++ew];ez=cn(ex)-ex.level%2;ey=false}}if(ey&&ez==ex.to&&ez>ex.from){return ep(ez-1)}return ep(ez,ey)}var er=a(es),el=et.ch;if(!er){return ep(el)}var em=ag(er,el);var eo=ev(el,em);if(dn!=null){eo.other=ev(el,dn)}return eo}function d7(el,em,en,ep){var eo=new H(el,em);eo.xRel=ep;if(en){eo.outside=true}return eo}function d2(es,ep,eo){var er=es.doc;eo+=es.display.viewOffset;if(eo<0){return d7(er.first,0,true,-1)}var em=a1(er,eo),et=er.first+er.size-1;if(em>et){return d7(er.first+er.size-1,dy(er,et).text.length,true,1)}if(ep<0){ep=0}for(;;){var en=dy(er,em);var eu=b0(es,en,em,ep,eo);var eq=cV(en);var el=eq&&eq.find();if(eq&&(eu.ch>el.from.ch||eu.ch==el.from.ch&&eu.xRel>0)){em=el.to.line}else{return eu}}}function b0(ev,en,ey,ex,ew){var eu=ew-a7(ev,en);var er=false,eE=2*ev.display.wrapper.clientWidth;var eD=a4(ev,en);function eI(eK){var eL=cy(ev,H(ey,eK),"line",en,eD);er=true;if(eu>eL.bottom){return eL.left-eE}else{if(eu<eL.top){return eL.left+eE}else{er=false}}return eL.left}var eA=a(en),eC=en.text.length;var eF=bN(en),eo=bX(en);var eB=eI(eF),el=er,em=eI(eo),eq=er;if(ex>em){return d7(ey,eo,eq,1)}for(;;){if(eA?eo==eF||eo==p(en,eF,1):eo-eF<=1){var ez=ex<eB||ex-eB<=em-ex?eF:eo;var eH=ex-(ez==eF?eB:em);while(dK.test(en.text.charAt(ez))){++ez}var et=d7(ey,ez,ez==eF?el:eq,eH<0?-1:eH?1:0);return et}var es=Math.ceil(eC/2),eJ=eF+es;if(eA){eJ=eF;for(var eG=0;eG<es;++eG){eJ=p(en,eJ,1)}}var ep=eI(eJ);if(ep>ex){eo=eJ;em=ep;if(eq=er){em+=1000}eC=es}else{eF=eJ;eB=ep;el=er;eC-=es}}}var ah;function at(en){if(en.cachedTextHeight!=null){return en.cachedTextHeight}if(ah==null){ah=d8("pre");for(var em=0;em<49;++em){ah.appendChild(document.createTextNode("x"));ah.appendChild(d8("br"))}ah.appendChild(document.createTextNode("x"))}bc(en.measure,ah);var el=ah.offsetHeight/50;if(el>3){en.cachedTextHeight=el}cB(en.measure);return el||1}function cq(eo){if(eo.cachedCharWidth!=null){return eo.cachedCharWidth}var el=d8("span","x");var en=d8("pre",[el]);bc(eo.measure,en);var em=el.offsetWidth;if(em>2){eo.cachedCharWidth=em}return em||10}var cF=0;function bR(el){el.curOp={changes:[],forceUpdate:false,updateInput:null,userSelChange:null,textChanged:null,selectionChanged:false,cursorActivity:false,updateMaxLine:false,updateScrollPos:false,id:++cF};if(!bE++){aO=[]}}function T(ez){var et=ez.curOp,ey=ez.doc,eu=ez.display;ez.curOp=null;if(et.updateMaxLine){eb(ez)}if(eu.maxLineChanged&&!ez.options.lineWrapping&&eu.maxLine){var em=c6(ez,eu.maxLine);eu.sizer.style.minWidth=Math.max(0,em+3+aJ)+"px";eu.maxLineChanged=false;var ew=Math.max(0,eu.sizer.offsetLeft+eu.sizer.offsetWidth-eu.scroller.clientWidth);if(ew<ey.scrollLeft&&!et.updateScrollPos){aZ(ez,Math.min(eu.scroller.scrollLeft,ew),true)}}var en,er;if(et.updateScrollPos){en=et.updateScrollPos}else{if(et.selectionChanged&&eu.scroller.clientHeight){var ex=cy(ez,ey.sel.head);en=x(ez,ex.left,ex.top,ex.left,ex.bottom)}}if(et.changes.length||et.forceUpdate||en&&en.scrollTop!=null){er=ct(ez,et.changes,en&&en.scrollTop,et.forceUpdate);if(ez.display.scroller.offsetHeight){ez.doc.scrollTop=ez.display.scroller.scrollTop}}if(!er&&et.selectionChanged){aY(ez)}if(et.updateScrollPos){var ev=Math.max(0,Math.min(eu.scroller.scrollHeight-eu.scroller.clientHeight,en.scrollTop));var eo=Math.max(0,Math.min(eu.scroller.scrollWidth-eu.scroller.clientWidth,en.scrollLeft));eu.scroller.scrollTop=eu.scrollbarV.scrollTop=ey.scrollTop=ev;eu.scroller.scrollLeft=eu.scrollbarH.scrollLeft=ey.scrollLeft=eo;c5(ez);if(et.scrollToPos){u(ez,dY(ez.doc,et.scrollToPos.from),dY(ez.doc,et.scrollToPos.to),et.scrollToPos.margin)}}else{if(en){ab(ez)}}if(et.selectionChanged){k(ez)}if(ez.state.focused&&et.updateInput){dJ(ez,et.userSelChange)}var es=et.maybeHiddenMarkers,el=et.maybeUnhiddenMarkers;if(es){for(var eq=0;eq<es.length;++eq){if(!es[eq].lines.length){ae(es[eq],"hide")}}}if(el){for(var eq=0;eq<el.length;++eq){if(el[eq].lines.length){ae(el[eq],"unhide")}}}var ep;if(!--bE){ep=aO;aO=null}if(et.textChanged){ae(ez,"change",ez,et.textChanged)}if(et.cursorActivity){ae(ez,"cursorActivity",ez)}if(ep){for(var eq=0;eq<ep.length;++eq){ep[eq]()}}}function b2(el,em){return function(){var eo=el||this,ep=!eo.curOp;if(ep){bR(eo)}try{var en=em.apply(eo,arguments)}finally{if(ep){T(eo)}}return en}}function dS(el){return function(){var en=this.cm&&!this.cm.curOp,em;if(en){bR(this.cm)}try{em=el.apply(this,arguments)}finally{if(en){T(this.cm)}}return em}}function bU(em,eo){var en=!em.curOp,el;if(en){bR(em)}try{el=eo()}finally{if(en){T(em)}}return el}function N(el,eo,en,em){if(eo==null){eo=el.doc.first}if(en==null){en=el.doc.first+el.doc.size}el.curOp.changes.push({from:eo,to:en,diff:em})}function aM(el){if(el.display.pollingFast){return}el.display.poll.set(el.options.pollInterval,function(){bu(el);if(el.state.focused){aM(el)}})}function t(el){var em=false;el.display.pollingFast=true;function en(){var eo=bu(el);if(!eo&&!em){em=true;el.display.poll.set(60,en)}else{el.display.pollingFast=false;aM(el)}}el.display.poll.set(20,en)}function bu(ew){var er=ew.display.input,eo=ew.display.prevInput,ev=ew.doc,el=ev.sel;if(!ew.state.focused||aS(er)||P(ew)||ew.state.disableInput){return false}if(ew.state.pasteIncoming&&ew.state.fakedLastChar){er.value=er.value.substring(0,er.value.length-1);ew.state.fakedLastChar=false}var ex=er.value;if(ex==eo&&dX(el.from,el.to)){return false}if(cs&&!bx&&ew.display.inputHasSelection===ex){dJ(ew,true);return false}var en=!ew.curOp;if(en){bR(ew)}el.shift=false;var eq=0,em=Math.min(eo.length,ex.length);while(eq<em&&eo.charCodeAt(eq)==ex.charCodeAt(eq)){++eq}var eu=el.from,et=el.to;if(eq<eo.length){eu=H(eu.line,eu.ch-(eo.length-eq))}else{if(ew.state.overwrite&&dX(eu,et)&&!ew.state.pasteIncoming){et=H(et.line,Math.min(dy(ev,et.line).text.length,et.ch+(ex.length-eq)))}}var ep=ew.curOp.updateInput;var es={from:eu,to:et,text:av(ex.slice(eq)),origin:ew.state.pasteIncoming?"paste":"+input"};aG(ew.doc,es,"end");ew.curOp.updateInput=ep;L(ew,"inputRead",ew,es);if(ex.length>1000||ex.indexOf("\n")>-1){er.value=ew.display.prevInput=""}else{ew.display.prevInput=ex}if(en){T(ew)}ew.state.pasteIncoming=false;return true}function dJ(el,en){var em,eo,eq=el.doc;if(!dX(eq.sel.from,eq.sel.to)){el.display.prevInput="";em=b7&&(eq.sel.to.line-eq.sel.from.line>100||(eo=el.getSelection()).length>1000);var ep=em?"-":eo||el.getSelection();el.display.input.value=ep;if(el.state.focused){cu(el.display.input)}if(cs&&!bx){el.display.inputHasSelection=ep}}else{if(en){el.display.prevInput=el.display.input.value="";if(cs&&!bx){el.display.inputHasSelection=null}}}el.display.inaccurateSelection=em}function c1(el){if(el.options.readOnly!="nocursor"&&(!cM||document.activeElement!=el.display.input)){el.display.input.focus()}}function P(el){return el.options.readOnly||el.doc.cantEdit}function d3(em){var er=em.display;bf(er.scroller,"mousedown",b2(em,cU));if(cs){bf(er.scroller,"dblclick",b2(em,function(eu){if(ao(em,eu)){return}var ev=bA(em,eu);if(!ev||j(em,eu)||aB(em.display,eu)){return}bO(eu);var et=Y(dy(em.doc,ev.line).text,ev);d5(em.doc,et.from,et.to)}))}else{bf(er.scroller,"dblclick",function(et){ao(em,et)||bO(et)})}bf(er.lineSpace,"selectstart",function(et){if(!aB(er,et)){bO(et)}});if(!bQ){bf(er.scroller,"contextmenu",function(et){aa(em,et)})}bf(er.scroller,"scroll",function(){if(er.scroller.clientHeight){C(em,er.scroller.scrollTop);aZ(em,er.scroller.scrollLeft,true);ae(em,"scroll",em)}});bf(er.scrollbarV,"scroll",function(){if(er.scroller.clientHeight){C(em,er.scrollbarV.scrollTop)}});bf(er.scrollbarH,"scroll",function(){if(er.scroller.clientHeight){aZ(em,er.scrollbarH.scrollLeft)}});bf(er.scroller,"mousewheel",function(et){b(em,et)});bf(er.scroller,"DOMMouseScroll",function(et){b(em,et)});function es(){if(em.state.focused){setTimeout(bH(c1,em),0)}}bf(er.scrollbarH,"mousedown",es);bf(er.scrollbarV,"mousedown",es);bf(er.wrapper,"scroll",function(){er.wrapper.scrollTop=er.wrapper.scrollLeft=0});var el;function ep(){if(el==null){el=setTimeout(function(){el=null;er.cachedCharWidth=er.cachedTextHeight=cW=null;Q(em);bU(em,bH(N,em))},100)}}bf(window,"resize",ep);function eo(){for(var et=er.wrapper.parentNode;et&&et!=document.body;et=et.parentNode){}if(et){setTimeout(eo,5000)}else{cK(window,"resize",ep)}}setTimeout(eo,5000);bf(er.input,"keyup",b2(em,function(et){if(ao(em,et)||em.options.onKeyEvent&&em.options.onKeyEvent(em,V(et))){return}if(et.keyCode==16){em.doc.sel.shift=false}}));bf(er.input,"input",function(){if(cs&&!bx&&em.display.inputHasSelection){em.display.inputHasSelection=null}t(em)});bf(er.input,"keydown",b2(em,l));bf(er.input,"keypress",b2(em,bI));bf(er.input,"focus",bH(bL,em));bf(er.input,"blur",bH(aq,em));function en(et){if(ao(em,et)||em.options.onDragEvent&&em.options.onDragEvent(em,V(et))){return}cS(et)}if(em.options.dragDrop){bf(er.scroller,"dragstart",function(et){F(em,et)});bf(er.scroller,"dragenter",en);bf(er.scroller,"dragover",en);bf(er.scroller,"drop",b2(em,aI))}bf(er.scroller,"paste",function(et){if(aB(er,et)){return}c1(em);t(em)});bf(er.input,"paste",function(){if(b1&&!em.state.fakedLastChar&&!(new Date-em.state.lastMiddleDown<200)){var eu=er.input.selectionStart,et=er.input.selectionEnd;er.input.value+="$";er.input.selectionStart=eu;er.input.selectionEnd=et;em.state.fakedLastChar=true}em.state.pasteIncoming=true;t(em)});function eq(){if(er.inaccurateSelection){er.prevInput="";er.inaccurateSelection=false;er.input.value=em.getSelection();cu(er.input)}}bf(er.input,"cut",eq);bf(er.input,"copy",eq);if(aC){bf(er.sizer,"mouseup",function(){if(document.activeElement==er.input){er.input.blur()}c1(em)})}}function aB(em,el){for(var en=A(el);en!=em.wrapper;en=en.parentNode){if(!en||en.ignoreEvents||en.parentNode==em.sizer&&en!=em.mover){return true}}}function bA(em,er,eo){var eq=em.display;if(!eo){var ep=A(er);if(ep==eq.scrollbarH||ep==eq.scrollbarH.firstChild||ep==eq.scrollbarV||ep==eq.scrollbarV.firstChild||ep==eq.scrollbarFiller||ep==eq.gutterFiller){return null}}var el,es,en=ak(eq.lineSpace);try{el=er.clientX;es=er.clientY}catch(er){return null}return d2(em,el-en.left,es-en.top)}var cf,b9;function cU(eD){if(ao(this,eD)){return}var eo=this,ey=eo.display,eF=eo.doc,ew=eF.sel;ew.shift=eD.shiftKey;if(aB(ey,eD)){if(!b1){ey.scroller.draggable=false;setTimeout(function(){ey.scroller.draggable=true},100)}return}if(j(eo,eD)){return}var en=bA(eo,eD);switch(d0(eD)){case 3:if(bQ){aa.call(eo,eo,eD)}return;case 2:if(b1){eo.state.lastMiddleDown=+new Date}if(en){d5(eo.doc,en)}setTimeout(bH(c1,eo),20);bO(eD);return}if(!en){if(A(eD)==ey.scroller){bO(eD)}return}if(!eo.state.focused){bL(eo)}var el=+new Date,em="single";if(b9&&b9.time>el-400&&dX(b9.pos,en)){em="triple";bO(eD);setTimeout(bH(c1,eo),20);aL(eo,en.line)}else{if(cf&&cf.time>el-400&&dX(cf.pos,en)){em="double";b9={time:el,pos:en};bO(eD);var eA=Y(dy(eF,en.line).text,en);d5(eo.doc,eA.from,eA.to)}else{cf={time:el,pos:en}}}var ep=en;if(eo.options.dragDrop&&db&&!P(eo)&&!dX(ew.from,ew.to)&&!dz(en,ew.from)&&!dz(ew.to,en)&&em=="single"){var ez=b2(eo,function(eG){if(b1){ey.scroller.draggable=false}eo.state.draggingText=false;cK(document,"mouseup",ez);cK(ey.scroller,"drop",ez);if(Math.abs(eD.clientX-eG.clientX)+Math.abs(eD.clientY-eG.clientY)<10){bO(eG);d5(eo.doc,en);c1(eo)}});if(b1){ey.scroller.draggable=true}eo.state.draggingText=ez;if(ey.scroller.dragDrop){ey.scroller.dragDrop()}bf(document,"mouseup",ez);bf(ey.scroller,"drop",ez);return}bO(eD);if(em=="single"){d5(eo.doc,dY(eF,en))}var eE=ew.from,et=ew.to,ex=en;function eB(eH){if(dX(ex,eH)){return}ex=eH;if(em=="single"){d5(eo.doc,dY(eF,en),eH);return}eE=dY(eF,eE);et=dY(eF,et);if(em=="double"){var eG=Y(dy(eF,eH.line).text,eH);if(dz(eH,eE)){d5(eo.doc,eG.from,et)}else{d5(eo.doc,eE,eG.to)}}else{if(em=="triple"){if(dz(eH,eE)){d5(eo.doc,et,dY(eF,H(eH.line,0)))}else{d5(eo.doc,eE,dY(eF,H(eH.line+1,0)))}}}}var eu=ak(ey.wrapper);var eq=0;function eC(eI){var eG=++eq;var eK=bA(eo,eI,true);if(!eK){return}if(!dX(eK,ep)){if(!eo.state.focused){bL(eo)}ep=eK;eB(eK);var eJ=bj(ey,eF);if(eK.line>=eJ.to||eK.line<eJ.from){setTimeout(b2(eo,function(){if(eq==eG){eC(eI)}}),150)}}else{var eH=eI.clientY<eu.top?-20:eI.clientY>eu.bottom?20:0;if(eH){setTimeout(b2(eo,function(){if(eq!=eG){return}ey.scroller.scrollTop+=eH;eC(eI)}),50)}}}function es(eG){eq=Infinity;bO(eG);c1(eo);cK(document,"mousemove",ev);cK(document,"mouseup",er)}var ev=b2(eo,function(eG){if(!cs&&!d0(eG)){es(eG)}else{eC(eG)}});var er=b2(eo,es);bf(document,"mousemove",ev);bf(document,"mouseup",er)}function ej(ew,es,eu,ev,eo){try{var em=es.clientX,el=es.clientY}catch(es){return false}if(em>=Math.floor(ak(ew.display.gutters).right)){return false}if(ev){bO(es)}var et=ew.display;var er=ak(et.lineDiv);if(el>er.bottom||!dE(ew,eu)){return a6(es)}el-=er.top-et.viewOffset;for(var ep=0;ep<ew.options.gutters.length;++ep){var eq=et.gutters.childNodes[ep];if(eq&&ak(eq).right>=em){var ex=a1(ew.doc,el);var en=ew.options.gutters[ep];eo(ew,eu,ew,ex,en,es);return a6(es)}}}function cc(el,em){if(!dE(el,"gutterContextMenu")){return false}return ej(el,em,"gutterContextMenu",false,ae)}function j(el,em){return ej(el,em,"gutterClick",true,L)}var M=0;function aI(er){var et=this;if(ao(et,er)||aB(et.display,er)||(et.options.onDragEvent&&et.options.onDragEvent(et,V(er)))){return}bO(er);if(cs){M=+new Date}var es=bA(et,er,true),el=er.dataTransfer.files;if(!es||P(et)){return}if(el&&el.length&&window.FileReader&&window.File){var en=el.length,ev=Array(en),em=0;var eo=function(ey,ex){var ew=new FileReader;ew.onload=function(){ev[ex]=ew.result;if(++em==en){es=dY(et.doc,es);aG(et.doc,{from:es,to:es,text:av(ev.join("\n")),origin:"paste"},"around")}};ew.readAsText(ey)};for(var ep=0;ep<en;++ep){eo(el[ep],ep)}}else{if(et.state.draggingText&&!(dz(es,et.doc.sel.from)||dz(et.doc.sel.to,es))){et.state.draggingText(er);setTimeout(bH(c1,et),20);return}try{var ev=er.dataTransfer.getData("Text");if(ev){var eu=et.doc.sel.from,eq=et.doc.sel.to;bd(et.doc,es,es);if(et.state.draggingText){aw(et.doc,"",eu,eq,"paste")}et.replaceSelection(ev,null,"paste");c1(et)}}catch(er){}}}function F(em,eo){if(cs&&(!em.state.draggingText||+new Date-M<100)){cS(eo);return}if(ao(em,eo)||aB(em.display,eo)){return}var el=em.getSelection();eo.dataTransfer.setData("Text",el);if(eo.dataTransfer.setDragImage&&!ad){var en=d8("img",null,null,"position: fixed; left: 0; top: 0;");en.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(dQ){en.width=en.height=1;em.display.wrapper.appendChild(en);en._top=en.offsetTop}eo.dataTransfer.setDragImage(en,0,0);if(dQ){en.parentNode.removeChild(en)}}}function C(el,em){if(Math.abs(el.doc.scrollTop-em)<2){return}el.doc.scrollTop=em;if(!bB){ct(el,[],em)}if(el.display.scroller.scrollTop!=em){el.display.scroller.scrollTop=em}if(el.display.scrollbarV.scrollTop!=em){el.display.scrollbarV.scrollTop=em}if(bB){ct(el,[])}cL(el,100)}function aZ(el,en,em){if(em?en==el.doc.scrollLeft:Math.abs(el.doc.scrollLeft-en)<2){return}en=Math.min(en,el.display.scroller.scrollWidth-el.display.scroller.clientWidth);el.doc.scrollLeft=en;c5(el);if(el.display.scroller.scrollLeft!=en){el.display.scroller.scrollLeft=en}if(el.display.scrollbarH.scrollLeft!=en){el.display.scrollbarH.scrollLeft=en}}var dF=0,bt=null;if(cs){bt=-0.53}else{if(bB){bt=15}else{if(b8){bt=-0.7}else{if(ad){bt=-1/3}}}}function b(er,em){var eu=em.wheelDeltaX,et=em.wheelDeltaY;if(eu==null&&em.detail&&em.axis==em.HORIZONTAL_AXIS){eu=em.detail}if(et==null&&em.detail&&em.axis==em.VERTICAL_AXIS){et=em.detail}else{if(et==null){et=em.wheelDelta}}var eo=er.display,eq=eo.scroller;if(!(eu&&eq.scrollWidth>eq.clientWidth||et&&eq.scrollHeight>eq.clientHeight)){return}if(et&&bk&&b1){for(var es=em.target;es!=eq;es=es.parentNode){if(es.lineObj){er.display.currentWheelTarget=es;break}}}if(eu&&!bB&&!dQ&&bt!=null){if(et){C(er,Math.max(0,Math.min(eq.scrollTop+et*bt,eq.scrollHeight-eq.clientHeight)))}aZ(er,Math.max(0,Math.min(eq.scrollLeft+eu*bt,eq.scrollWidth-eq.clientWidth)));bO(em);eo.wheelStartX=null;return}if(et&&bt!=null){var el=et*bt;var ep=er.doc.scrollTop,en=ep+eo.wrapper.clientHeight;if(el<0){ep=Math.max(0,ep+el-50)}else{en=Math.min(er.doc.height,en+el+50)}ct(er,[],{top:ep,bottom:en})}if(dF<20){if(eo.wheelStartX==null){eo.wheelStartX=eq.scrollLeft;eo.wheelStartY=eq.scrollTop;eo.wheelDX=eu;eo.wheelDY=et;setTimeout(function(){if(eo.wheelStartX==null){return}var ev=eq.scrollLeft-eo.wheelStartX;var ex=eq.scrollTop-eo.wheelStartY;var ew=(ex&&eo.wheelDY&&ex/eo.wheelDY)||(ev&&eo.wheelDX&&ev/eo.wheelDX);eo.wheelStartX=eo.wheelStartY=null;if(!ew){return}bt=(bt*dF+ew)/(dF+1);++dF},200)}else{eo.wheelDX+=eu;eo.wheelDY+=et}}}function d4(em,ep,el){if(typeof ep=="string"){ep=c3[ep];if(!ep){return false}}if(em.display.pollingFast&&bu(em)){em.display.pollingFast=false}var eq=em.doc,eo=eq.sel.shift,en=false;try{if(P(em)){em.state.suppressEdits=true}if(el){eq.sel.shift=false}en=ep(em)!=bp}finally{eq.sel.shift=eo;em.state.suppressEdits=false}return en}function cj(el){var em=el.state.keyMaps.slice(0);if(el.options.extraKeys){em.push(el.options.extraKeys)}em.push(el.options.keyMap);return em}var W;function dC(el,er){var em=d6(el.options.keyMap),ep=em.auto;clearTimeout(W);if(ep&&!c2(er)){W=setTimeout(function(){if(d6(el.options.keyMap)==em){el.options.keyMap=(ep.call?ep.call(null,el):ep);ei(el)}},50)}var eo=dL(er,true),eq=false;if(!eo){return false}var en=cj(el);if(er.shiftKey){eq=g("Shift-"+eo,en,function(es){return d4(el,es,true)})||g(eo,en,function(es){if(typeof es=="string"?/^go[A-Z]/.test(es):es.motion){return d4(el,es)}})}else{eq=g(eo,en,function(es){return d4(el,es)})}if(eq){bO(er);k(el);if(bx){er.oldKeyCode=er.keyCode;er.keyCode=0}L(el,"keyHandled",el,eo,er)}return eq}function cO(el,eo,em){var en=g("'"+em+"'",cj(el),function(ep){return d4(el,ep,true)});if(en){bO(eo);k(el);L(el,"keyHandled",el,"'"+em+"'",eo)}return en}var ce=null;function l(eo){var el=this;if(!el.state.focused){bL(el)}if(ao(el,eo)||el.options.onKeyEvent&&el.options.onKeyEvent(el,V(eo))){return}if(cs&&eo.keyCode==27){eo.returnValue=false}var em=eo.keyCode;el.doc.sel.shift=em==16||eo.shiftKey;var en=dC(el,eo);if(dQ){ce=en?em:null;if(!en&&em==88&&!b7&&(bk?eo.metaKey:eo.ctrlKey)){el.replaceSelection("")}}}function bI(ep){var el=this;if(ao(el,ep)||el.options.onKeyEvent&&el.options.onKeyEvent(el,V(ep))){return}var eo=ep.keyCode,em=ep.charCode;if(dQ&&eo==ce){ce=null;bO(ep);return}if(((dQ&&(!ep.which||ep.which<10))||aC)&&dC(el,ep)){return}var en=String.fromCharCode(em==null?eo:em);if(this.options.electricChars&&this.doc.mode.electricChars&&this.options.smartIndent&&!P(this)&&this.doc.mode.electricChars.indexOf(en)>-1){setTimeout(b2(el,function(){K(el,el.doc.sel.to.line,"smart")}),75)}if(cO(el,ep,en)){return}if(cs&&!bx){el.display.inputHasSelection=null}t(el)}function bL(el){if(el.options.readOnly=="nocursor"){return}if(!el.state.focused){ae(el,"focus",el);el.state.focused=true;if(el.display.wrapper.className.search(/\bCodeMirror-focused\b/)==-1){el.display.wrapper.className+=" CodeMirror-focused"}if(!el.curOp){dJ(el,true);if(b1){setTimeout(bH(dJ,el,true),0)}}}aM(el);k(el)}function aq(el){if(el.state.focused){ae(el,"blur",el);el.state.focused=false;el.display.wrapper.className=el.display.wrapper.className.replace(" CodeMirror-focused","")}clearInterval(el.display.blinker);setTimeout(function(){if(!el.state.focused){el.doc.sel.shift=false}},150)}var dU;function aa(ev,eq){if(ao(ev,eq,"contextmenu")){return}var es=ev.display,em=ev.doc.sel;if(aB(es,eq)||cc(ev,eq)){return}var eu=bA(ev,eq),el=es.scroller.scrollTop;if(!eu||dQ){return}var ep=ev.options.resetSelectionOnContextMenu;if(ep&&(dX(em.from,em.to)||dz(eu,em.from)||!dz(eu,em.to))){b2(ev,bd)(ev.doc,eu,eu)}var er=es.input.style.cssText;es.inputDiv.style.position="absolute";es.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(eq.clientY-5)+"px; left: "+(eq.clientX-5)+"px; z-index: 1000; background: white; outline: none;border-width: 0; outline: none; overflow: hidden; opacity: .05; -ms-opacity: .05; filter: alpha(opacity=5);";c1(ev);dJ(ev,true);if(dX(em.from,em.to)){es.input.value=es.prevInput=" "}function eo(){if(es.input.selectionStart!=null){var ew=es.input.value="\u200b"+(dX(em.from,em.to)?"":es.input.value);es.prevInput="\u200b";es.input.selectionStart=1;es.input.selectionEnd=ew.length}}function et(){es.inputDiv.style.position="relative";es.input.style.cssText=er;if(bx){es.scrollbarV.scrollTop=es.scroller.scrollTop=el}aM(ev);if(es.input.selectionStart!=null){if(!cs||bx){eo()}clearTimeout(dU);var ew=0,ex=function(){if(es.prevInput==" "&&es.input.selectionStart==0){b2(ev,c3.selectAll)(ev)}else{if(ew++<10){dU=setTimeout(ex,500)}else{dJ(ev)}}};dU=setTimeout(ex,200)}}if(cs&&!bx){eo()}if(bQ){cS(eq);var en=function(){cK(window,"mouseup",en);setTimeout(et,20)};bf(window,"mouseup",en)}else{setTimeout(et,50)}}var bY=y.changeEnd=function(el){if(!el.text){return el.to}return H(el.from.line+el.text.length-1,dW(el.text).length+(el.text.length==1?el.from.ch:0))};function c4(ep,er,eq){if(!dz(er.from,eq)){return dY(ep,eq)}var eo=(er.text.length-1)-(er.to.line-er.from.line);if(eq.line>er.to.line+eo){var en=eq.line-eo,em=ep.first+ep.size-1;if(en>em){return H(em,dy(ep,em).text.length)}return dM(eq,dy(ep,en).text.length)}if(eq.line==er.to.line+eo){return dM(eq,dW(er.text).length+(er.text.length==1?er.from.ch:0)+dy(ep,er.to.line).text.length-er.to.ch)}var el=eq.line-er.from.line;return dM(eq,er.text[el].length+(el?0:er.from.ch))}function dD(em,ep,en){if(en&&typeof en=="object"){return{anchor:c4(em,ep,en.anchor),head:c4(em,ep,en.head)}}if(en=="start"){return{anchor:ep.from,head:ep.from}}var el=bY(ep);if(en=="around"){return{anchor:ep.from,head:el}}if(en=="end"){return{anchor:el,head:el}}var eo=function(es){if(dz(es,ep.from)){return es}if(!dz(ep.to,es)){return el}var eq=es.line+ep.text.length-(ep.to.line-ep.from.line)-1,er=es.ch;if(es.line==ep.to.line){er+=el.ch-ep.to.ch}return H(eq,er)};return{anchor:eo(em.sel.anchor),head:eo(em.sel.head)}}function cx(em,eo,en){var el={canceled:false,from:eo.from,to:eo.to,text:eo.text,origin:eo.origin,cancel:function(){this.canceled=true}};if(en){el.update=function(es,er,eq,ep){if(es){this.from=dY(em,es)}if(er){this.to=dY(em,er)}if(eq){this.text=eq}if(ep!==undefined){this.origin=ep}}}ae(em,"beforeChange",em,el);if(em.cm){ae(em.cm,"beforeChange",em.cm,el)}if(el.canceled){return null}return{from:el.from,to:el.to,text:el.text,origin:el.origin}}function aG(eo,eq,ep,en){if(eo.cm){if(!eo.cm.curOp){return b2(eo.cm,aG)(eo,eq,ep,en)}if(eo.cm.state.suppressEdits){return}}if(dE(eo,"beforeChange")||eo.cm&&dE(eo.cm,"beforeChange")){eq=cx(eo,eq,true);if(!eq){return}}var em=ef&&!en&&bP(eo,eq.from,eq.to);if(em){for(var el=em.length-1;el>=1;--el){am(eo,{from:em[el].from,to:em[el].to,text:[""]})}if(em.length){am(eo,{from:em[0].from,to:em[0].to,text:eq.text},ep)}}else{am(eo,eq,ep)}}function am(en,ep,eo){if(ep.text.length==1&&ep.text[0]==""&&dX(ep.from,ep.to)){return}var em=dD(en,ep,eo);c8(en,ep,em,en.cm?en.cm.curOp.id:NaN);cJ(en,ep,em,cP(en,ep));var el=[];cE(en,function(er,eq){if(!eq&&cd(el,er.history)==-1){cr(er.history,ep);el.push(er.history)}cJ(er,ep,null,cP(er,ep))})}function bm(eu,er){if(eu.cm&&eu.cm.state.suppressEdits){return}var eq=eu.history;var em=(er=="undo"?eq.done:eq.undone).pop();if(!em){return}var es={changes:[],anchorBefore:em.anchorAfter,headBefore:em.headAfter,anchorAfter:em.anchorBefore,headAfter:em.headBefore,generation:eq.generation};(er=="undo"?eq.undone:eq.done).push(es);eq.generation=em.generation||++eq.maxGeneration;var en=dE(eu,"beforeChange")||eu.cm&&dE(eu.cm,"beforeChange");for(var eo=em.changes.length-1;eo>=0;--eo){var et=em.changes[eo];et.origin=er;if(en&&!cx(eu,et,false)){(er=="undo"?eq.done:eq.undone).length=0;return}es.changes.push(ck(eu,et));var el=eo?dD(eu,et,null):{anchor:em.anchorBefore,head:em.headBefore};cJ(eu,et,el,cG(eu,et));var ep=[];cE(eu,function(ew,ev){if(!ev&&cd(ep,ew.history)==-1){cr(ew.history,et);ep.push(ew.history)}cJ(ew,et,null,cG(ew,et))})}}function dG(el,en){function em(eo){return H(eo.line+en,eo.ch)}el.first+=en;if(el.cm){N(el.cm,el.first,el.first,en)}el.sel.head=em(el.sel.head);el.sel.anchor=em(el.sel.anchor);el.sel.from=em(el.sel.from);el.sel.to=em(el.sel.to)}function cJ(ep,eq,eo,em){if(ep.cm&&!ep.cm.curOp){return b2(ep.cm,cJ)(ep,eq,eo,em)}if(eq.to.line<ep.first){dG(ep,eq.text.length-1-(eq.to.line-eq.from.line));return}if(eq.from.line>ep.lastLine()){return}if(eq.from.line<ep.first){var el=eq.text.length-1-(ep.first-eq.from.line);dG(ep,el);eq={from:H(ep.first,0),to:H(eq.to.line+el,eq.to.ch),text:[dW(eq.text)],origin:eq.origin}}var en=ep.lastLine();if(eq.to.line>en){eq={from:eq.from,to:H(en,dy(ep,en).text.length),text:[eq.text[0]],origin:eq.origin}}eq.removed=ea(ep,eq.from,eq.to);if(!eo){eo=dD(ep,eq,null)}if(ep.cm){ai(ep.cm,eq,em,eo)}else{dR(ep,eq,em,eo)}}function ai(ev,er,eo,el){var eu=ev.doc,eq=ev.display,es=er.from,et=er.to;var em=false,en=es.line;if(!ev.options.lineWrapping){en=a8(s(eu,dy(eu,es.line)));eu.iter(en,et.line+1,function(ey){if(ey==eq.maxLine){em=true;return true}})}if(!dz(eu.sel.head,er.from)&&!dz(er.to,eu.sel.head)){ev.curOp.cursorActivity=true}dR(eu,er,eo,el,aE(ev));if(!ev.options.lineWrapping){eu.iter(en,es.line+er.text.length,function(ez){var ey=cQ(eu,ez);if(ey>eq.maxLineLength){eq.maxLine=ez;eq.maxLineLength=ey;eq.maxLineChanged=true;em=false}});if(em){ev.curOp.updateMaxLine=true}}eu.frontier=Math.min(eu.frontier,es.line);cL(ev,400);var ex=er.text.length-(et.line-es.line)-1;N(ev,es.line,et.line+1,ex);if(dE(ev,"change")){var ep={from:es,to:et,text:er.text,removed:er.removed,origin:er.origin};if(ev.curOp.textChanged){for(var ew=ev.curOp.textChanged;ew.next;ew=ew.next){}ew.next=ep}else{ev.curOp.textChanged=ep}}}function aw(eo,en,eq,ep,el){if(!ep){ep=eq}if(dz(ep,eq)){var em=ep;ep=eq;eq=em}if(typeof en=="string"){en=av(en)}aG(eo,{from:eq,to:ep,text:en,origin:el},null)}function H(el,em){if(!(this instanceof H)){return new H(el,em)}this.line=el;this.ch=em}y.Pos=H;function dX(em,el){return em.line==el.line&&em.ch==el.ch}function dz(em,el){return em.line<el.line||(em.line==el.line&&em.ch<el.ch)}function bv(el){return H(el.line,el.ch)}function b4(el,em){return Math.max(el.first,Math.min(em,el.first+el.size-1))}function dY(em,en){if(en.line<em.first){return H(em.first,0)}var el=em.first+em.size-1;if(en.line>el){return H(el,dy(em,el).text.length)}return dM(en,dy(em,en.line).text.length)}function dM(en,em){var el=en.ch;if(el==null||el>em){return H(en.line,em)}else{if(el<0){return H(en.line,0)}else{return en}}}function bn(em,el){return el>=em.first&&el<em.first+em.size}function d5(ep,eq,el,em){if(ep.sel.shift||ep.sel.extend){var eo=ep.sel.anchor;if(el){var en=dz(eq,eo);if(en!=dz(el,eo)){eo=eq;eq=el}else{if(en!=dz(eq,el)){eq=el}}}bd(ep,eo,eq,em)}else{bd(ep,eq,el||eq,em)}if(ep.cm){ep.cm.curOp.userSelChange=true}}function c(eo,el,em){var en={anchor:el,head:em};ae(eo,"beforeSelectionChange",eo,en);if(eo.cm){ae(eo.cm,"beforeSelectionChange",eo.cm,en)}en.anchor=dY(eo,en.anchor);en.head=dY(eo,en.head);return en}function bd(es,ep,eq,en,em){if(!em&&dE(es,"beforeSelectionChange")||es.cm&&dE(es.cm,"beforeSelectionChange")){var eo=c(es,ep,eq);eq=eo.head;ep=eo.anchor}var er=es.sel;er.goalColumn=null;if(en==null){en=dz(eq,er.head)?-1:1}if(em||!dX(ep,er.anchor)){ep=be(es,ep,en,em!="push")}if(em||!dX(eq,er.head)){eq=be(es,eq,en,em!="push")}if(dX(er.anchor,ep)&&dX(er.head,eq)){return}er.anchor=ep;er.head=eq;var el=dz(eq,ep);er.from=el?eq:ep;er.to=el?ep:eq;if(es.cm){es.cm.curOp.updateInput=es.cm.curOp.selectionChanged=es.cm.curOp.cursorActivity=true}L(es,"cursorActivity",es)}function cX(el){bd(el.doc,el.doc.sel.from,el.doc.sel.to,null,"push")}function be(eu,et,eq,er){var ev=false,en=et;var eo=eq||1;eu.cantEdit=false;search:for(;;){var ew=dy(eu,en.line);if(ew.markedSpans){for(var ep=0;ep<ew.markedSpans.length;++ep){var el=ew.markedSpans[ep],em=el.marker;if((el.from==null||(em.inclusiveLeft?el.from<=en.ch:el.from<en.ch))&&(el.to==null||(em.inclusiveRight?el.to>=en.ch:el.to>en.ch))){if(er){ae(em,"beforeCursorEnter");if(em.explicitlyCleared){if(!ew.markedSpans){break}else{--ep;continue}}}if(!em.atomic){continue}var es=em.find()[eo<0?"from":"to"];if(dX(es,en)){es.ch+=eo;if(es.ch<0){if(es.line>eu.first){es=dY(eu,H(es.line-1))}else{es=null}}else{if(es.ch>ew.text.length){if(es.line<eu.first+eu.size-1){es=H(es.line+1,0)}else{es=null}}}if(!es){if(ev){if(!er){return be(eu,et,eq,true)}eu.cantEdit=true;return H(eu.first,0)}ev=true;es=et;eo=-eo}}en=es;continue search}}}return en}}function ab(em){var ep=u(em,em.doc.sel.head,null,em.options.cursorScrollMargin);if(!em.state.focused){return}var eq=em.display,en=ak(eq.sizer),el=null;if(ep.top+en.top<0){el=true}else{if(ep.bottom+en.top>(window.innerHeight||document.documentElement.clientHeight)){el=false}}if(el!=null&&!dN){var eo=eq.cursor.style.display=="none";if(eo){eq.cursor.style.display="";eq.cursor.style.left=ep.left+"px";eq.cursor.style.top=(ep.top-eq.viewOffset)+"px"}eq.cursor.scrollIntoView(el);if(eo){eq.cursor.style.display="none"}}}function u(eu,es,ep,eo){if(eo==null){eo=0}for(;;){var eq=false,et=cy(eu,es);var el=!ep||ep==es?et:cy(eu,ep);var en=x(eu,Math.min(et.left,el.left),Math.min(et.top,el.top)-eo,Math.max(et.left,el.left),Math.max(et.bottom,el.bottom)+eo);var er=eu.doc.scrollTop,em=eu.doc.scrollLeft;if(en.scrollTop!=null){C(eu,en.scrollTop);if(Math.abs(eu.doc.scrollTop-er)>1){eq=true}}if(en.scrollLeft!=null){aZ(eu,en.scrollLeft);if(Math.abs(eu.doc.scrollLeft-em)>1){eq=true}}if(!eq){return et}}}function w(el,en,ep,em,eo){var eq=x(el,en,ep,em,eo);if(eq.scrollTop!=null){C(el,eq.scrollTop)}if(eq.scrollLeft!=null){aZ(el,eq.scrollLeft)}}function x(er,ez,eo,ey,en){var ew=er.display,ev=at(er.display);if(eo<0){eo=0}var em=ew.scroller.clientHeight-aJ,eu=ew.scroller.scrollTop,et={};var eB=er.doc.height+a3(ew);var eC=eo<ev,ex=en>eB-ev;if(eo<eu){et.scrollTop=eC?0:eo}else{if(en>eu+em){var es=Math.min(eo,(ex?eB:en)-em);if(es!=eu){et.scrollTop=es}}}var eq=ew.scroller.clientWidth-aJ,el=ew.scroller.scrollLeft;ez+=ew.gutters.offsetWidth;ey+=ew.gutters.offsetWidth;var ep=ew.gutters.offsetWidth;var eA=ez<ep+10;if(ez<el+ep||eA){if(eA){ez=0}et.scrollLeft=Math.max(0,ez-10-ep)}else{if(ey>eq+el-3){et.scrollLeft=ey+10-eq}}return et}function v(el,en,em){el.curOp.updateScrollPos={scrollLeft:en==null?el.doc.scrollLeft:en,scrollTop:em==null?el.doc.scrollTop:em}}function bT(em,eo,en){var ep=em.curOp.updateScrollPos||(em.curOp.updateScrollPos={scrollLeft:em.doc.scrollLeft,scrollTop:em.doc.scrollTop});var el=em.display.scroller;ep.scrollTop=Math.max(0,Math.min(el.scrollHeight-el.clientHeight,ep.scrollTop+en));ep.scrollLeft=Math.max(0,Math.min(el.scrollWidth-el.clientWidth,ep.scrollLeft+eo))}function K(ex,eo,ew,en){var ev=ex.doc;if(ew==null){ew="add"}if(ew=="smart"){if(!ex.doc.mode.indent){ew="prev"}else{var em=co(ex,eo)}}var er=ex.options.tabSize;var ey=dy(ev,eo),eq=bb(ey.text,null,er);var el=ey.text.match(/^\s*/)[0],et;if(ew=="smart"){et=ex.doc.mode.indent(em,ey.text.slice(el.length),ey.text);if(et==bp){if(!en){return}ew="prev"}}if(ew=="prev"){if(eo>ev.first){et=bb(dy(ev,eo-1).text,null,er)}else{et=0}}else{if(ew=="add"){et=eq+ex.options.indentUnit}else{if(ew=="subtract"){et=eq-ex.options.indentUnit}else{if(typeof ew=="number"){et=eq+ew}}}}et=Math.max(0,et);var eu="",es=0;if(ex.options.indentWithTabs){for(var ep=Math.floor(et/er);ep;--ep){es+=er;eu+="\t"}}if(es<et){eu+=bC(et-es)}if(eu!=el){aw(ex.doc,eu,H(eo,0),H(eo,el.length),"+input")}else{if(ev.sel.head.line==eo&&ev.sel.head.ch<el.length){bd(ev,H(eo,el.length),H(eo,el.length),1)}}ey.stateAfter=null}function cZ(el,en,eq){var ep=en,em=en,eo=el.doc;if(typeof en=="number"){em=dy(eo,b4(eo,en))}else{ep=a8(en)}if(ep==null){return null}if(eq(em,ep)){N(el,ep,ep+1)}else{return null}return em}function aU(eC,eo,ew,ev,eq){var et=eo.line,eu=eo.ch,eB=ew;var el=dy(eC,et);var ez=true;function eA(){var eD=et+ew;if(eD<eC.first||eD>=eC.first+eC.size){return(ez=false)}et=eD;return el=dy(eC,eD)}function ey(eE){var eD=(eq?p:O)(el,eu,ew,true);if(eD==null){if(!eE&&eA()){if(eq){eu=(ew<0?bX:bN)(el)}else{eu=ew<0?el.text.length:0}}else{return(ez=false)}}else{eu=eD}return true}if(ev=="char"){ey()}else{if(ev=="column"){ey(true)}else{if(ev=="word"||ev=="group"){var ex=null,er=ev=="group";for(var ep=true;;ep=false){if(ew<0&&!ey(!ep)){break}var em=el.text.charAt(eu)||"\n";var en=bK(em)?"w":!er?null:/\s/.test(em)?null:"p";if(ex&&ex!=en){if(ew<0){ew=1;ey()}break}if(en){ex=en}if(ew>0&&!ey(!ep)){break}}}}}var es=be(eC,H(et,eu),eB,true);if(!ez){es.hitSide=true}return es}function aQ(et,eo,el,es){var er=et.doc,eq=eo.left,ep;if(es=="page"){var en=Math.min(et.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);ep=eo.top+el*(en-(el<0?1.5:0.5)*at(et.display))}else{if(es=="line"){ep=el>0?eo.bottom+3:eo.top-3}}for(;;){var em=d2(et,eq,ep);if(!em.outside){break}if(el<0?ep<=0:ep>=er.height){em.hitSide=true;break}ep+=el*5}return em}function Y(eo,eq){var ep=eq.ch,en=eq.ch;if(eo){if((eq.xRel<0||en==eo.length)&&ep){--ep}else{++en}var em=eo.charAt(ep);var el=bK(em)?bK:/\s/.test(em)?function(er){return/\s/.test(er)}:function(er){return !/\s/.test(er)&&!bK(er)};while(ep>0&&el(eo.charAt(ep-1))){--ep}while(en<eo.length&&el(eo.charAt(en))){++en}}return{from:H(eq.line,ep),to:H(eq.line,en)}}function aL(el,em){d5(el.doc,H(em,0),dY(el.doc,H(em+1,0)))}y.prototype={constructor:y,focus:function(){window.focus();c1(this);t(this)},setOption:function(en,eo){var em=this.options,el=em[en];if(em[en]==eo&&en!="mode"){return}em[en]=eo;if(aF.hasOwnProperty(en)){b2(this,aF[en])(this,eo,el)}},getOption:function(el){return this.options[el]},getDoc:function(){return this.doc},addKeyMap:function(em,el){this.state.keyMaps[el?"push":"unshift"](em)},removeKeyMap:function(em){var en=this.state.keyMaps;for(var el=0;el<en.length;++el){if(en[el]==em||(typeof en[el]!="string"&&en[el].name==em)){en.splice(el,1);return true}}},addOverlay:b2(null,function(el,em){var en=el.token?el:y.getMode(this.options,el);if(en.startState){throw new Error("Overlays may not be stateful.")}this.state.overlays.push({mode:en,modeSpec:el,opaque:em&&em.opaque});this.state.modeGen++;N(this)}),removeOverlay:b2(null,function(el){var en=this.state.overlays;for(var em=0;em<en.length;++em){var eo=en[em].modeSpec;if(eo==el||typeof el=="string"&&eo.name==el){en.splice(em,1);this.state.modeGen++;N(this);return}}}),indentLine:b2(null,function(en,el,em){if(typeof el!="string"&&typeof el!="number"){if(el==null){el=this.options.smartIndent?"smart":"prev"}else{el=el?"add":"subtract"}}if(bn(this.doc,en)){K(this,en,el,em)}}),indentSelection:b2(null,function(em){var en=this.doc.sel;if(dX(en.from,en.to)){return K(this,en.from.line,em)}var eo=en.to.line-(en.to.ch?0:1);for(var el=en.from.line;el<=eo;++el){K(this,el,em)}}),getTokenAt:function(es,em){var ep=this.doc;es=dY(ep,es);var eo=co(this,es.line,em),er=this.doc.mode;var el=dy(ep,es.line);var eq=new dg(el.text,this.options.tabSize);while(eq.pos<es.ch&&!eq.eol()){eq.start=eq.pos;var en=er.token(eq,eo)}return{start:eq.start,end:eq.pos,string:eq.current(),className:en||null,type:en||null,state:eo}},getTokenTypeAt:function(eq){eq=dY(this.doc,eq);var en=b6(this,dy(this.doc,eq.line));var eo=0,ep=(en.length-1)/2,em=eq.ch;if(em==0){return en[2]}for(;;){var el=(eo+ep)>>1;if((el?en[el*2-1]:0)>=em){ep=el}else{if(en[el*2+1]<em){eo=el+1}else{return en[el*2+2]}}}},getModeAt:function(em){var el=this.doc.mode;if(!el.innerMode){return el}return y.innerMode(el,this.getTokenAt(em).state).mode},getHelper:function(eo,em){if(!dH.hasOwnProperty(em)){return}var el=dH[em],en=this.getModeAt(eo);return en[em]&&el[en[em]]||en.helperType&&el[en.helperType]||el[en.name]},getStateAfter:function(em,el){var en=this.doc;em=b4(en,em==null?en.first+en.size-1:em);return co(this,em+1,el)},cursorCoords:function(eo,em){var en,el=this.doc.sel;if(eo==null){en=el.head}else{if(typeof eo=="object"){en=dY(this.doc,eo)}else{en=eo?el.from:el.to}}return cy(this,en,em||"page")},charCoords:function(em,el){return bS(this,dY(this.doc,em),el||"page")},coordsChar:function(el,em){el=eh(this,el,em||"page");return d2(this,el.left,el.top)},lineAtHeight:function(el,em){el=eh(this,{top:el,left:0},em||"page").top;return a1(this.doc,el+this.display.viewOffset)},heightAtLine:function(em,ep){var el=false,eo=this.doc.first+this.doc.size-1;if(em<this.doc.first){em=this.doc.first}else{if(em>eo){em=eo;el=true}}var en=dy(this.doc,em);return dd(this,dy(this.doc,em),{top:0,left:0},ep||"page").top+(el?en.height:0)},defaultTextHeight:function(){return at(this.display)},defaultCharWidth:function(){return cq(this.display)},setGutterMarker:b2(null,function(el,em,en){return cZ(this,el,function(eo){var ep=eo.gutterMarkers||(eo.gutterMarkers={});ep[em]=en;if(!en&&dh(ep)){eo.gutterMarkers=null}return true})}),clearGutter:b2(null,function(en){var el=this,eo=el.doc,em=eo.first;eo.iter(function(ep){if(ep.gutterMarkers&&ep.gutterMarkers[en]){ep.gutterMarkers[en]=null;N(el,em,em+1);if(dh(ep.gutterMarkers)){ep.gutterMarkers=null}}++em})}),addLineClass:b2(null,function(en,em,el){return cZ(this,en,function(eo){var ep=em=="text"?"textClass":em=="background"?"bgClass":"wrapClass";if(!eo[ep]){eo[ep]=el}else{if(new RegExp("(?:^|\\s)"+el+"(?:$|\\s)").test(eo[ep])){return false}else{eo[ep]+=" "+el}}return true})}),removeLineClass:b2(null,function(en,em,el){return cZ(this,en,function(ep){var es=em=="text"?"textClass":em=="background"?"bgClass":"wrapClass";var er=ep[es];if(!er){return false}else{if(el==null){ep[es]=null}else{var eq=er.match(new RegExp("(?:^|\\s+)"+el+"(?:$|\\s+)"));if(!eq){return false}var eo=eq.index+eq[0].length;ep[es]=er.slice(0,eq.index)+(!eq.index||eo==er.length?"":" ")+er.slice(eo)||null}}return true})}),addLineWidget:b2(null,function(en,em,el){return a2(this,en,em,el)}),removeLineWidget:function(el){el.clear()},lineInfo:function(el){if(typeof el=="number"){if(!bn(this.doc,el)){return null}var em=el;el=dy(this.doc,el);if(!el){return null}}else{var em=a8(el);if(em==null){return null}}return{line:em,handle:el,text:el.text,gutterMarkers:el.gutterMarkers,textClass:el.textClass,bgClass:el.bgClass,wrapClass:el.wrapClass,widgets:el.widgets}},getViewport:function(){return{from:this.display.showingFrom,to:this.display.showingTo}},addWidget:function(eq,en,es,eo,eu){var ep=this.display;eq=cy(this,dY(this.doc,eq));var er=eq.bottom,em=eq.left;en.style.position="absolute";ep.sizer.appendChild(en);if(eo=="over"){er=eq.top}else{if(eo=="above"||eo=="near"){var el=Math.max(ep.wrapper.clientHeight,this.doc.height),et=Math.max(ep.sizer.clientWidth,ep.lineSpace.clientWidth);if((eo=="above"||eq.bottom+en.offsetHeight>el)&&eq.top>en.offsetHeight){er=eq.top-en.offsetHeight}else{if(eq.bottom+en.offsetHeight<=el){er=eq.bottom}}if(em+en.offsetWidth>et){em=et-en.offsetWidth}}}en.style.top=er+"px";en.style.left=en.style.right="";if(eu=="right"){em=ep.sizer.clientWidth-en.offsetWidth;en.style.right="0px"}else{if(eu=="left"){em=0}else{if(eu=="middle"){em=(ep.sizer.clientWidth-en.offsetWidth)/2}}en.style.left=em+"px"}if(es){w(this,em,er,em+en.offsetWidth,er+en.offsetHeight)}},triggerOnKeyDown:b2(null,l),execCommand:function(el){return c3[el](this)},findPosH:function(er,eo,ep,em){var el=1;if(eo<0){el=-1;eo=-eo}for(var en=0,eq=dY(this.doc,er);en<eo;++en){eq=aU(this.doc,eq,el,ep,em);if(eq.hitSide){break}}return eq},moveH:b2(null,function(el,em){var en=this.doc.sel,eo;if(en.shift||en.extend||dX(en.from,en.to)){eo=aU(this.doc,en.head,el,em,this.options.rtlMoveVisually)}else{eo=el<0?en.from:en.to}d5(this.doc,eo,eo,el)}),deleteH:b2(null,function(el,em){var en=this.doc.sel;if(!dX(en.from,en.to)){aw(this.doc,"",en.from,en.to,"+delete")}else{aw(this.doc,"",en.from,aU(this.doc,en.head,el,em,false),"+delete")}this.curOp.userSelChange=true}),findPosV:function(eq,en,er,et){var el=1,ep=et;if(en<0){el=-1;en=-en}for(var em=0,es=dY(this.doc,eq);em<en;++em){var eo=cy(this,es,"div");if(ep==null){ep=eo.left}else{eo.left=ep}es=aQ(this,eo,el,er);if(es.hitSide){break}}return es},moveV:b2(null,function(el,em){var en=this.doc.sel;var ep=cy(this,en.head,"div");if(en.goalColumn!=null){ep.left=en.goalColumn}var eo=aQ(this,ep,el,em);if(em=="page"){bT(this,0,bS(this,eo,"div").top-ep.top)}d5(this.doc,eo,eo,el);en.goalColumn=ep.left}),toggleOverwrite:function(el){if(el!=null&&el==this.state.overwrite){return}if(this.state.overwrite=!this.state.overwrite){this.display.cursor.className+=" CodeMirror-overwrite"}else{this.display.cursor.className=this.display.cursor.className.replace(" CodeMirror-overwrite","")}},hasFocus:function(){return this.state.focused},scrollTo:b2(null,function(el,em){v(this,el,em)}),getScrollInfo:function(){var el=this.display.scroller,em=aJ;return{left:el.scrollLeft,top:el.scrollTop,height:el.scrollHeight-em,width:el.scrollWidth-em,clientHeight:el.clientHeight-em,clientWidth:el.clientWidth-em}},scrollIntoView:b2(null,function(em,eo){if(em==null){em={from:this.doc.sel.head,to:null}}else{if(typeof em=="number"){em={from:H(em,0),to:null}}else{if(em.from==null){em={from:em,to:null}}}}if(!em.to){em.to=em.from}if(!eo){eo=0}var en=em;if(em.from.line!=null){this.curOp.scrollToPos={from:em.from,to:em.to,margin:eo};en={from:cy(this,em.from),to:cy(this,em.to)}}var el=x(this,Math.min(en.from.left,en.to.left),Math.min(en.from.top,en.to.top)-eo,Math.max(en.from.right,en.to.right),Math.max(en.from.bottom,en.to.bottom)+eo);v(this,el.scrollLeft,el.scrollTop)}),setSize:b2(null,function(en,el){function em(eo){return typeof eo=="number"||/^\d+$/.test(String(eo))?eo+"px":eo}if(en!=null){this.display.wrapper.style.width=em(en)}if(el!=null){this.display.wrapper.style.height=em(el)}if(this.options.lineWrapping){this.display.measureLineCache.length=this.display.measureLineCachePos=0}this.curOp.forceUpdate=true}),operation:function(el){return bU(this,el)},refresh:b2(null,function(){var el=this.display.cachedTextHeight==null;Q(this);v(this,this.doc.scrollLeft,this.doc.scrollTop);N(this);if(el){I(this)}}),swapDoc:b2(null,function(em){var el=this.doc;el.cm=null;cH(this,em);Q(this);dJ(this,true);v(this,em.scrollLeft,em.scrollTop);L(this,"swapDoc",this,el);return el}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}};aV(y);var aF=y.optionHandlers={};var dp=y.defaults={};function n(el,eo,en,em){y.defaults[el]=eo;if(en){aF[el]=em?function(ep,er,eq){if(eq!=bq){en(ep,er,eq)}}:en}}var bq=y.Init={toString:function(){return"CodeMirror.Init"}};n("value","",function(el,em){el.setValue(em)},true);n("mode",null,function(el,em){el.doc.modeOption=em;aR(el)},true);n("indentUnit",2,aR,true);n("indentWithTabs",false);n("smartIndent",true);n("tabSize",4,function(el){aR(el);Q(el);N(el)},true);n("specialChars",/[\t\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/g,function(el,em){el.options.specialChars=new RegExp(em.source+(em.test("\t")?"":"|\t"),"g");el.refresh()},true);n("specialCharPlaceholder",dw,function(el){el.refresh()},true);n("electricChars",true);n("rtlMoveVisually",!al);n("wholeLineUpdateBefore",true);n("theme","default",function(el){bV(el);cl(el)},true);n("keyMap","default",ei);n("extraKeys",null);n("onKeyEvent",null);n("onDragEvent",null);n("lineWrapping",false,c9,true);n("gutters",[],function(el){bs(el.options);cl(el)},true);n("fixedGutter",true,function(el,em){el.display.gutters.style.left=em?cA(el.display)+"px":"0";el.refresh()},true);n("coverGutterNextToScrollbar",false,dk,true);n("lineNumbers",false,function(el){bs(el.options);cl(el)},true);n("firstLineNumber",1,cl,true);n("lineNumberFormatter",function(el){return el},cl,true);n("showCursorWhenSelecting",false,aY,true);n("resetSelectionOnContextMenu",true);n("readOnly",false,function(el,em){if(em=="nocursor"){aq(el);el.display.input.blur();el.display.disabled=true}else{el.display.disabled=false;if(!em){dJ(el,true)}}});n("dragDrop",true);n("cursorBlinkRate",530);n("cursorScrollMargin",0);n("cursorHeight",1);n("workTime",100);n("workDelay",100);n("flattenSpans",true);n("pollInterval",100);n("undoDepth",40,function(el,em){el.doc.history.undoDepth=em});n("historyEventDelay",500);n("viewportMargin",10,function(el){el.refresh()},true);n("maxHighlightLength",10000,function(el){aR(el);el.refresh()},true);n("crudeMeasuringFrom",10000);n("moveInputWithCursor",true,function(el,em){if(!em){el.display.inputDiv.style.top=el.display.inputDiv.style.left=0}});n("tabindex",null,function(el,em){el.display.input.tabIndex=em||""});n("autofocus",null);var ci=y.modes={},ap=y.mimeModes={};y.defineMode=function(el,en){if(!y.defaults.mode&&el!="null"){y.defaults.mode=el}if(arguments.length>2){en.dependencies=[];for(var em=2;em<arguments.length;++em){en.dependencies.push(arguments[em])}}ci[el]=en};y.defineMIME=function(em,el){ap[em]=el};y.resolveMode=function(el){if(typeof el=="string"&&ap.hasOwnProperty(el)){el=ap[el]}else{if(el&&typeof el.name=="string"&&ap.hasOwnProperty(el.name)){var em=ap[el.name];el=bw(em,el);el.name=em.name}else{if(typeof el=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(el)){return y.resolveMode("application/xml")}}}if(typeof el=="string"){return{name:el}}else{return el||{name:"null"}}};y.getMode=function(em,el){var el=y.resolveMode(el);var eo=ci[el.name];if(!eo){return y.getMode(em,"text/plain")}var ep=eo(em,el);if(cg.hasOwnProperty(el.name)){var en=cg[el.name];for(var eq in en){if(!en.hasOwnProperty(eq)){continue}if(ep.hasOwnProperty(eq)){ep["_"+eq]=ep[eq]}ep[eq]=en[eq]}}ep.name=el.name;return ep};y.defineMode("null",function(){return{token:function(el){el.skipToEnd()}}});y.defineMIME("text/plain","null");var cg=y.modeExtensions={};y.extendMode=function(en,em){var el=cg.hasOwnProperty(en)?cg[en]:(cg[en]={});aj(em,el)};y.defineExtension=function(el,em){y.prototype[el]=em};y.defineDocExtension=function(el,em){X.prototype[el]=em};y.defineOption=n;var az=[];y.defineInitHook=function(el){az.push(el)};var dH=y.helpers={};y.registerHelper=function(em,el,en){if(!dH.hasOwnProperty(em)){dH[em]=y[em]={}}dH[em][el]=en};y.isWordChar=bK;function bi(eo,el){if(el===true){return el}if(eo.copyState){return eo.copyState(el)}var en={};for(var ep in el){var em=el[ep];if(em instanceof Array){em=em.concat([])}en[ep]=em}return en}y.copyState=bi;function bh(en,em,el){return en.startState?en.startState(em,el):true}y.startState=bh;y.innerMode=function(en,el){while(en.innerMode){var em=en.innerMode(el);if(!em||em.mode==en){break}el=em.state;en=em.mode}return em||{mode:en,state:el}};var c3=y.commands={selectAll:function(el){el.setSelection(H(el.firstLine(),0),H(el.lastLine()))},killLine:function(el){var eo=el.getCursor(true),en=el.getCursor(false),em=!dX(eo,en);if(!em&&el.getLine(eo.line).length==eo.ch){el.replaceRange("",eo,H(eo.line+1,0),"+delete")}else{el.replaceRange("",eo,em?en:H(eo.line),"+delete")}},deleteLine:function(el){var em=el.getCursor().line;el.replaceRange("",H(em,0),H(em),"+delete")},delLineLeft:function(el){var em=el.getCursor();el.replaceRange("",H(em.line,0),em,"+delete")},undo:function(el){el.undo()},redo:function(el){el.redo()},goDocStart:function(el){el.extendSelection(H(el.firstLine(),0))},goDocEnd:function(el){el.extendSelection(H(el.lastLine()))},goLineStart:function(el){el.extendSelection(aT(el,el.getCursor().line))},goLineStartSmart:function(em){var eq=em.getCursor(),er=aT(em,eq.line);var en=em.getLineHandle(er.line);var el=a(en);if(!el||el[0].level==0){var ep=Math.max(0,en.text.search(/\S/));var eo=eq.line==er.line&&eq.ch<=ep&&eq.ch;em.extendSelection(H(er.line,eo?0:ep))}else{em.extendSelection(er)}},goLineEnd:function(el){el.extendSelection(cw(el,el.getCursor().line))},goLineRight:function(el){var em=el.charCoords(el.getCursor(),"div").top+5;el.extendSelection(el.coordsChar({left:el.display.lineDiv.offsetWidth+100,top:em},"div"))},goLineLeft:function(el){var em=el.charCoords(el.getCursor(),"div").top+5;el.extendSelection(el.coordsChar({left:0,top:em},"div"))},goLineUp:function(el){el.moveV(-1,"line")},goLineDown:function(el){el.moveV(1,"line")},goPageUp:function(el){el.moveV(-1,"page")},goPageDown:function(el){el.moveV(1,"page")},goCharLeft:function(el){el.moveH(-1,"char")},goCharRight:function(el){el.moveH(1,"char")},goColumnLeft:function(el){el.moveH(-1,"column")},goColumnRight:function(el){el.moveH(1,"column")},goWordLeft:function(el){el.moveH(-1,"word")},goGroupRight:function(el){el.moveH(1,"group")},goGroupLeft:function(el){el.moveH(-1,"group")},goWordRight:function(el){el.moveH(1,"word")},delCharBefore:function(el){el.deleteH(-1,"char")},delCharAfter:function(el){el.deleteH(1,"char")},delWordBefore:function(el){el.deleteH(-1,"word")},delWordAfter:function(el){el.deleteH(1,"word")},delGroupBefore:function(el){el.deleteH(-1,"group")},delGroupAfter:function(el){el.deleteH(1,"group")},indentAuto:function(el){el.indentSelection("smart")},indentMore:function(el){el.indentSelection("add")},indentLess:function(el){el.indentSelection("subtract")},insertTab:function(el){el.replaceSelection("\t","end","+input")},defaultTab:function(el){if(el.somethingSelected()){el.indentSelection("add")}else{el.replaceSelection("\t","end","+input")}},transposeChars:function(el){var en=el.getCursor(),em=el.getLine(en.line);if(en.ch>0&&en.ch<em.length-1){el.replaceRange(em.charAt(en.ch)+em.charAt(en.ch-1),H(en.line,en.ch-1),H(en.line,en.ch+1))}},newlineAndIndent:function(el){b2(el,function(){el.replaceSelection("\n","end","+input");el.indentLine(el.getCursor().line,null,true)})()},toggleOverwrite:function(el){el.toggleOverwrite()}};var du=y.keyMap={};du.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite"};du.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Alt-Up":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Down":"goDocEnd","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore",fallthrough:"basic"};du.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineStart","Cmd-Right":"goLineEnd","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delLineLeft",fallthrough:["basic","emacsy"]};du["default"]=bk?du.macDefault:du.pcDefault;du.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"};function d6(el){if(typeof el=="string"){return du[el]}else{return el}}function g(em,eq,eo){function ep(ew){ew=d6(ew);var eu=ew[em];if(eu===false){return"stop"}if(eu!=null&&eo(eu)){return true}if(ew.nofallthrough){return"stop"}var et=ew.fallthrough;if(et==null){return false}if(Object.prototype.toString.call(et)!="[object Array]"){return ep(et)}for(var es=0,ev=et.length;es<ev;++es){var er=ep(et[es]);if(er){return er}}return false}for(var en=0;en<eq.length;++en){var el=ep(eq[en]);if(el){return el!="stop"}}}function c2(em){var el=dA[em.keyCode];return el=="Ctrl"||el=="Alt"||el=="Shift"||el=="Mod"}function dL(em,en){if(dQ&&em.keyCode==34&&em["char"]){return false}var el=dA[em.keyCode];if(el==null||em.altGraphKey){return false}if(em.altKey){el="Alt-"+el}if(ba?em.metaKey:em.ctrlKey){el="Ctrl-"+el}if(ba?em.ctrlKey:em.metaKey){el="Cmd-"+el}if(!en&&em.shiftKey){el="Shift-"+el}return el}y.lookupKey=g;y.isModifierKey=c2;y.keyName=dL;y.fromTextArea=function(es,et){if(!et){et={}}et.value=es.value;if(!et.tabindex&&es.tabindex){et.tabindex=es.tabindex}if(!et.placeholder&&es.placeholder){et.placeholder=es.placeholder}if(et.autofocus==null){var el=document.body;try{el=document.activeElement}catch(en){}et.autofocus=el==es||es.getAttribute("autofocus")!=null&&el==document.body}function ep(){es.value=er.getValue()}if(es.form){bf(es.form,"submit",ep);if(!et.leaveSubmitMethodAlone){var em=es.form,eq=em.submit;try{var eo=em.submit=function(){ep();em.submit=eq;em.submit();em.submit=eo}}catch(en){}}}es.style.display="none";var er=y(function(eu){es.parentNode.insertBefore(eu,es.nextSibling)},et);er.save=ep;er.getTextArea=function(){return es};er.toTextArea=function(){ep();es.parentNode.removeChild(er.getWrapperElement());es.style.display="";if(es.form){cK(es.form,"submit",ep);if(typeof es.form.submit=="function"){es.form.submit=eq}}};return er};function dg(el,em){this.pos=this.start=0;this.string=el;this.tabSize=em||8;this.lastColumnPos=this.lastColumnValue=0}dg.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==0},peek:function(){return this.string.charAt(this.pos)||undefined},next:function(){if(this.pos<this.string.length){return this.string.charAt(this.pos++)}},eat:function(el){var en=this.string.charAt(this.pos);if(typeof el=="string"){var em=en==el}else{var em=en&&(el.test?el.test(en):el(en))}if(em){++this.pos;return en}},eatWhile:function(el){var em=this.pos;while(this.eat(el)){}return this.pos>em},eatSpace:function(){var el=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++this.pos}return this.pos>el},skipToEnd:function(){this.pos=this.string.length},skipTo:function(el){var em=this.string.indexOf(el,this.pos);if(em>-1){this.pos=em;return true}},backUp:function(el){this.pos-=el},column:function(){if(this.lastColumnPos<this.start){this.lastColumnValue=bb(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue);this.lastColumnPos=this.start}return this.lastColumnValue},indentation:function(){return bb(this.string,null,this.tabSize)},match:function(ep,em,el){if(typeof ep=="string"){var eq=function(er){return el?er.toLowerCase():er};var eo=this.string.substr(this.pos,ep.length);if(eq(eo)==eq(ep)){if(em!==false){this.pos+=ep.length}return true}}else{var en=this.string.slice(this.pos).match(ep);if(en&&en.index>0){return null}if(en&&em!==false){this.pos+=en[0].length}return en}},current:function(){return this.string.slice(this.start,this.pos)}};y.StringStream=dg;function E(em,el){this.lines=[];this.type=el;this.doc=em}y.TextMarker=E;aV(E);E.prototype.clear=function(){if(this.explicitlyCleared){return}var es=this.doc.cm,em=es&&!es.curOp;if(em){bR(es)}if(dE(this,"clear")){var et=this.find();if(et){L(this,"clear",et.from,et.to)}}var en=null,eq=null;for(var eo=0;eo<this.lines.length;++eo){var eu=this.lines[eo];var er=dt(eu.markedSpans,this);if(er.to!=null){eq=a8(eu)}eu.markedSpans=da(eu.markedSpans,er);if(er.from!=null){en=a8(eu)}else{if(this.collapsed&&!dO(this.doc,eu)&&es){ed(eu,at(es.display))}}}if(es&&this.collapsed&&!es.options.lineWrapping){for(var eo=0;eo<this.lines.length;++eo){var el=s(es.doc,this.lines[eo]),ep=cQ(es.doc,el);if(ep>es.display.maxLineLength){es.display.maxLine=el;es.display.maxLineLength=ep;es.display.maxLineChanged=true}}}if(en!=null&&es){N(es,en,eq+1)}this.lines.length=0;this.explicitlyCleared=true;if(this.atomic&&this.doc.cantEdit){this.doc.cantEdit=false;if(es){cX(es)}}if(em){T(es)}};E.prototype.find=function(){var eq,ep;for(var em=0;em<this.lines.length;++em){var el=this.lines[em];var en=dt(el.markedSpans,this);if(en.from!=null||en.to!=null){var eo=a8(el);if(en.from!=null){eq=H(eo,en.from)}if(en.to!=null){ep=H(eo,en.to)}}}if(this.type=="bookmark"){return eq}return eq&&{from:eq,to:ep}};E.prototype.changed=function(){var eo=this.find(),el=this.doc.cm;if(!eo||!el){return}if(this.type!="bookmark"){eo=eo.from}var em=dy(this.doc,eo.line);d1(el,em);if(eo.line>=el.display.showingFrom&&eo.line<el.display.showingTo){for(var en=el.display.lineDiv.firstChild;en;en=en.nextSibling){if(en.lineObj==em){if(en.offsetHeight!=em.height){ed(em,en.offsetHeight)}break}}bU(el,function(){el.curOp.selectionChanged=el.curOp.forceUpdate=el.curOp.updateMaxLine=true})}};E.prototype.attachLine=function(el){if(!this.lines.length&&this.doc.cm){var em=this.doc.cm.curOp;if(!em.maybeHiddenMarkers||cd(em.maybeHiddenMarkers,this)==-1){(em.maybeUnhiddenMarkers||(em.maybeUnhiddenMarkers=[])).push(this)}}this.lines.push(el)};E.prototype.detachLine=function(el){this.lines.splice(cd(this.lines,el),1);if(!this.lines.length&&this.doc.cm){var em=this.doc.cm.curOp;(em.maybeHiddenMarkers||(em.maybeHiddenMarkers=[])).push(this)}};function c7(eu,es,et,ew,eq){if(ew&&ew.shared){return D(eu,es,et,ew,eq)}if(eu.cm&&!eu.cm.curOp){return b2(eu.cm,c7)(eu,es,et,ew,eq)}var ep=new E(eu,eq);if(dz(et,es)||dX(es,et)&&eq=="range"&&!(ew.inclusiveLeft&&ew.inclusiveRight)){return ep}if(ew){aj(ew,ep)}if(ep.replacedWith){ep.collapsed=true;ep.replacedWith=d8("span",[ep.replacedWith],"CodeMirror-widget");if(!ew.handleMouseEvents){ep.replacedWith.ignoreEvents=true}}if(ep.collapsed){ay=true}if(ep.addToHistory){c8(eu,{from:es,to:et,origin:"markText"},{head:eu.sel.head,anchor:eu.sel.anchor},NaN)}var em=es.line,ev=0,eo,en,er=eu.cm,el;eu.iter(em,et.line+1,function(ex){if(er&&ep.collapsed&&!er.options.lineWrapping&&s(eu,ex)==er.display.maxLine){el=true}var ey={from:null,to:null,marker:ep};ev+=ex.text.length;if(em==es.line){ey.from=es.ch;ev-=es.ch}if(em==et.line){ey.to=et.ch;ev-=ex.text.length-et.ch}if(ep.collapsed){if(em==et.line){en=aW(ex,et.ch)}if(em==es.line){eo=aW(ex,es.ch)}else{ed(ex,0)}}br(ex,ey);++em});if(ep.collapsed){eu.iter(es.line,et.line+1,function(ex){if(dO(eu,ex)){ed(ex,0)}})}if(ep.clearOnEnter){bf(ep,"beforeCursorEnter",function(){ep.clear()})}if(ep.readOnly){ef=true;if(eu.history.done.length||eu.history.undone.length){eu.clearHistory()}}if(ep.collapsed){if(eo!=en){throw new Error("Inserting collapsed marker overlapping an existing one")}ep.size=ev;ep.atomic=true}if(er){if(el){er.curOp.updateMaxLine=true}if(ep.className||ep.title||ep.startStyle||ep.endStyle||ep.collapsed){N(er,es.line,et.line+1)}if(ep.atomic){cX(er)}}return ep}function r(eo,em){this.markers=eo;this.primary=em;for(var el=0,en=this;el<eo.length;++el){eo[el].parent=this;bf(eo[el],"clear",function(){en.clear()})}}y.SharedTextMarker=r;aV(r);r.prototype.clear=function(){if(this.explicitlyCleared){return}this.explicitlyCleared=true;for(var el=0;el<this.markers.length;++el){this.markers[el].clear()}L(this,"clear")};r.prototype.find=function(){return this.primary.find()};function D(ep,es,er,el,en){el=aj(el);el.shared=false;var eq=[c7(ep,es,er,el,en)],em=eq[0];var eo=el.replacedWith;cE(ep,function(eu){if(eo){el.replacedWith=eo.cloneNode(true)}eq.push(c7(eu,dY(eu,es),dY(eu,er),el,en));for(var et=0;et<eu.linked.length;++et){if(eu.linked[et].isParent){return}}em=dW(eq)});return new r(eq,em)}function dt(en,el){if(en){for(var em=0;em<en.length;++em){var eo=en[em];if(eo.marker==el){return eo}}}}function da(em,en){for(var eo,el=0;el<em.length;++el){if(em[el]!=en){(eo||(eo=[])).push(em[el])}}return eo}function br(el,em){el.markedSpans=el.markedSpans?el.markedSpans.concat([em]):[em];em.marker.attachLine(el)}function an(em,en,er){if(em){for(var ep=0,es;ep<em.length;++ep){var et=em[ep],eq=et.marker;var el=et.from==null||(eq.inclusiveLeft?et.from<=en:et.from<en);if(el||(eq.inclusiveLeft&&eq.inclusiveRight||eq.type=="bookmark")&&et.from==en&&(!er||!et.marker.insertLeft)){var eo=et.to==null||(eq.inclusiveRight?et.to>=en:et.to>en);(es||(es=[])).push({from:et.from,to:eo?null:et.to,marker:eq})}}}return es}function ac(em,eo,er){if(em){for(var ep=0,es;ep<em.length;++ep){var et=em[ep],eq=et.marker;var en=et.to==null||(eq.inclusiveRight?et.to>=eo:et.to>eo);if(en||eq.type=="bookmark"&&et.from==eo&&(!er||et.marker.insertLeft)){var el=et.from==null||(eq.inclusiveLeft?et.from<=eo:et.from<eo);(es||(es=[])).push({from:el?null:et.from-eo,to:et.to==null?null:et.to-eo,marker:eq})}}}return es}function cP(ex,eu){var et=bn(ex,eu.from.line)&&dy(ex,eu.from.line).markedSpans;var eA=bn(ex,eu.to.line)&&dy(ex,eu.to.line).markedSpans;if(!et&&!eA){return null}var em=eu.from.ch,ep=eu.to.ch,es=dX(eu.from,eu.to);var er=an(et,em,es);var ez=ac(eA,ep,es);var ey=eu.text.length==1,en=dW(eu.text).length+(ey?em:0);if(er){for(var eo=0;eo<er.length;++eo){var ew=er[eo];if(ew.to==null){var eB=dt(ez,ew.marker);if(!eB){ew.to=em}else{if(ey){ew.to=eB.to==null?null:eB.to+en}}}}}if(ez){for(var eo=0;eo<ez.length;++eo){var ew=ez[eo];if(ew.to!=null){ew.to+=en}if(ew.from==null){var eB=dt(er,ew.marker);if(!eB){ew.from=en;if(ey){(er||(er=[])).push(ew)}}}else{ew.from+=en;if(ey){(er||(er=[])).push(ew)}}}}if(ey&&er){for(var eo=0;eo<er.length;++eo){if(er[eo].from!=null&&er[eo].from==er[eo].to&&er[eo].marker.type!="bookmark"){er.splice(eo--,1)}}if(!er.length){er=null}}var eq=[er];if(!ey){var ev=eu.text.length-2,el;if(ev>0&&er){for(var eo=0;eo<er.length;++eo){if(er[eo].to==null){(el||(el=[])).push({from:null,to:null,marker:er[eo].marker})}}}for(var eo=0;eo<ev;++eo){eq.push(el)}eq.push(ez)}return eq}function cG(et,er){var el=bl(et,er);var eu=cP(et,er);if(!el){return eu}if(!eu){return el}for(var eo=0;eo<el.length;++eo){var ep=el[eo],eq=eu[eo];if(ep&&eq){spans:for(var en=0;en<eq.length;++en){var es=eq[en];for(var em=0;em<ep.length;++em){if(ep[em].marker==es.marker){continue spans}}ep.push(es)}}else{if(eq){el[eo]=eq}}}return el}function bP(ev,et,eu){var eo=null;ev.iter(et.line,eu.line+1,function(ew){if(ew.markedSpans){for(var ex=0;ex<ew.markedSpans.length;++ex){var ey=ew.markedSpans[ex].marker;if(ey.readOnly&&(!eo||cd(eo,ey)==-1)){(eo||(eo=[])).push(ey)}}}});if(!eo){return null}var ep=[{from:et,to:eu}];for(var eq=0;eq<eo.length;++eq){var er=eo[eq],em=er.find();for(var en=0;en<ep.length;++en){var el=ep[en];if(dz(el.to,em.from)||dz(em.to,el.from)){continue}var es=[en,1];if(dz(el.from,em.from)||!er.inclusiveLeft&&dX(el.from,em.from)){es.push({from:el.from,to:em.from})}if(dz(em.to,el.to)||!er.inclusiveRight&&dX(el.to,em.to)){es.push({from:em.to,to:el.to})}ep.splice.apply(ep,es);en+=es.length-1}}return ep}function aW(em,eo){var el=ay&&em.markedSpans,eq;if(el){for(var ep,en=0;en<el.length;++en){ep=el[en];if(!ep.marker.collapsed){continue}if((ep.from==null||ep.from<eo)&&(ep.to==null||ep.to>eo)&&(!eq||eq.width<ep.marker.width)){eq=ep.marker}}}return eq}function dc(el){return aW(el,-1)}function cV(el){return aW(el,el.text.length+1)}function s(en,em){var el;while(el=dc(em)){em=dy(en,el.find().from.line)}return em}function dO(ep,em){var el=ay&&em.markedSpans;if(el){for(var eo,en=0;en<el.length;++en){eo=el[en];if(!eo.marker.collapsed){continue}if(eo.from==null){return true}if(eo.marker.replacedWith){continue}if(eo.from==0&&eo.marker.inclusiveLeft&&G(ep,em,eo)){return true}}}}function G(er,em,eo){if(eo.to==null){var el=eo.marker.find().to,ep=dy(er,el.line);return G(er,ep,dt(ep.markedSpans,eo.marker))}if(eo.marker.inclusiveRight&&eo.to==em.text.length){return true}for(var eq,en=0;en<em.markedSpans.length;++en){eq=em.markedSpans[en];if(eq.marker.collapsed&&!eq.marker.replacedWith&&eq.from==eo.to&&(eq.marker.inclusiveLeft||eo.marker.inclusiveRight)&&G(er,em,eq)){return true}}}function ee(el){var en=el.markedSpans;if(!en){return}for(var em=0;em<en.length;++em){en[em].marker.detachLine(el)}el.markedSpans=null}function b3(el,en){if(!en){return}for(var em=0;em<en.length;++em){en[em].marker.attachLine(el)}el.markedSpans=en}var cp=y.LineWidget=function(el,eo,em){if(em){for(var en in em){if(em.hasOwnProperty(en)){this[en]=em[en]}}}this.cm=el;this.node=eo};aV(cp);function B(el){return function(){var en=!this.cm.curOp;if(en){bR(this.cm)}try{var em=el.apply(this,arguments)}finally{if(en){T(this.cm)}}return em}}cp.prototype.clear=B(function(){var em=this.line.widgets,eo=a8(this.line);if(eo==null||!em){return}for(var en=0;en<em.length;++en){if(em[en]==this){em.splice(en--,1)}}if(!em.length){this.line.widgets=null}var el=a7(this.cm,this.line)<this.cm.doc.scrollTop;ed(this.line,Math.max(0,this.line.height-bZ(this)));if(el){bT(this.cm,0,-this.height)}N(this.cm,eo,eo+1)});cp.prototype.changed=B(function(){var el=this.height;this.height=null;var em=bZ(this)-el;if(!em){return}ed(this.line,this.line.height+em);var en=a8(this.line);N(this.cm,en,en+1)});function bZ(el){if(el.height!=null){return el.height}if(!el.node.parentNode||el.node.parentNode.nodeType!=1){bc(el.cm.display.measure,d8("div",[el.node],null,"position: relative"))}return el.height=el.node.offsetHeight}function a2(el,ep,en,em){var eo=new cp(el,en,em);if(eo.noHScroll){el.display.alignWidgets=true}cZ(el,ep,function(er){var es=er.widgets||(er.widgets=[]);if(eo.insertAt==null){es.push(eo)}else{es.splice(Math.min(es.length-1,Math.max(0,eo.insertAt)),0,eo)}eo.line=er;if(!dO(el.doc,er)||eo.showIfHidden){var eq=a7(el,er)<el.doc.scrollTop;ed(er,er.height+bZ(eo));if(eq){bT(el,0,eo.height)}}return true});return eo}var ec=y.Line=function(en,em,el){this.text=en;b3(this,em);this.height=el?el(this):1};aV(ec);ec.prototype.lineNo=function(){return a8(this)};function cR(em,ep,en,el){em.text=ep;if(em.stateAfter){em.stateAfter=null}if(em.styles){em.styles=null}if(em.order!=null){em.order=null}ee(em);b3(em,en);var eo=el?el(em):1;if(eo!=em.height){ed(em,eo)}}function aX(el){el.parent=null;ee(el)}function q(eu,ew,ep,em,eq,eo){var en=ep.flattenSpans;if(en==null){en=eu.options.flattenSpans}var es=0,er=null;var ev=new dg(ew,eu.options.tabSize),el;if(ew==""&&ep.blankLine){ep.blankLine(em)}while(!ev.eol()){if(ev.pos>eu.options.maxHighlightLength){en=false;if(eo){cm(eu,ew,em,ev.pos)}ev.pos=ew.length;el=null}else{el=ep.token(ev,em)}if(!en||er!=el){if(es<ev.start){eq(ev.start,er)}es=ev.start;er=el}ev.start=ev.pos}while(es<ev.pos){var et=Math.min(ev.pos,es+50000);eq(et,er);es=et}}function dT(er,et,el,eo){var es=[er.state.modeGen];q(er,et.text,er.doc.mode,el,function(eu,ev){es.push(eu,ev)},eo);for(var em=0;em<er.state.overlays.length;++em){var ep=er.state.overlays[em],eq=1,en=0;q(er,et.text,ep.mode,true,function(eu,ew){var ey=eq;while(en<eu){var ev=es[eq];if(ev>eu){es.splice(eq,1,eu,es[eq+1],ev)}eq+=2;en=Math.min(eu,ev)}if(!ew){return}if(ep.opaque){es.splice(ey,eq-ey,eu,ew);eq=ey+2}else{for(;ey<eq;ey+=2){var ex=es[ey+1];es[ey+1]=ex?ex+" "+ew:ew}}})}return es}function b6(el,em){if(!em.styles||em.styles[0]!=el.state.modeGen){em.styles=dT(el,em,em.stateAfter=co(el,a8(em)))}return em.styles}function cm(el,eq,en,em){var ep=el.doc.mode;var eo=new dg(eq,el.options.tabSize);eo.start=eo.pos=em||0;if(eq==""&&ep.blankLine){ep.blankLine(en)}while(!eo.eol()&&eo.pos<=el.options.maxHighlightLength){ep.token(eo,en);eo.start=eo.pos}}var cz={};function di(en,em){if(!en){return null}for(;;){var el=en.match(/(?:^|\s)line-(background-)?(\S+)/);if(!el){break}en=en.slice(0,el.index)+en.slice(el.index+el[0].length);var eo=el[1]?"bgClass":"textClass";if(em[eo]==null){em[eo]=el[2]}else{if(!(new RegExp("(?:^|s)"+el[2]+"(?:$|s)")).test(em[eo])){em[eo]+=" "+el[2]}}}return cz[en]||(cz[en]="cm-"+en.replace(/ +/g," cm-"))}function de(eu,ey,el,ex){var ev,ez=ey,eq=true;while(ev=dc(ez)){ez=dy(eu.doc,ev.find().from.line)}var er={pre:d8("pre"),col:0,pos:0,measure:null,measuredSomething:false,cm:eu,copyWidgets:ex};do{if(ez.text){eq=false}er.measure=ez==ey&⪙er.pos=0;er.addToken=er.measure?e:o;if((cs||b1)&&eu.getOption("lineWrapping")){er.addToken=dV(er.addToken)}var ep=aP(ez,er,b6(eu,ez));if(el&&ez==ey&&!er.measuredSomething){el[0]=er.pre.appendChild(aN(eu.display.measure));er.measuredSomething=true}if(ep){ez=dy(eu.doc,ep.to.line)}}while(ep);if(el&&!er.measuredSomething&&!el[0]){el[0]=er.pre.appendChild(eq?d8("span","\u00a0"):aN(eu.display.measure))}if(!er.pre.firstChild&&!dO(eu.doc,ey)){er.pre.appendChild(document.createTextNode("\u00a0"))}var em;if(el&&(cs||dr)&&(em=a(ez))){var eo=em.length-1;if(em[eo].from==em[eo].to){--eo}var ew=em[eo],en=em[eo-1];if(ew.from+1==ew.to&&en&&ew.level<en.level){var et=el[er.pos-1];if(et){et.parentNode.insertBefore(et.measureRight=aN(eu.display.measure),et.nextSibling)}}}var es=er.textClass?er.textClass+" "+(ey.textClass||""):ey.textClass;if(es){er.pre.className=es}ae(eu,"renderLine",eu,ey,er.pre);return er}function dw(em){var el=d8("span","\u2022","cm-invalidchar");el.title="\\u"+em.charCodeAt(0).toString(16);return el}function o(ep,ey,el,eo,ez,ex){if(!ey){return}var et=ep.cm.options.specialChars;if(!et.test(ey)){ep.col+=ey.length;var es=document.createTextNode(ey)}else{var es=document.createDocumentFragment(),ev=0;while(true){et.lastIndex=ev;var em=et.exec(ey);var er=em?em.index-ev:ey.length-ev;if(er){es.appendChild(document.createTextNode(ey.slice(ev,ev+er)));ep.col+=er}if(!em){break}ev+=er+1;if(em[0]=="\t"){var eq=ep.cm.options.tabSize,eu=eq-ep.col%eq;es.appendChild(d8("span",bC(eu),"cm-tab"));ep.col+=eu}else{var en=ep.cm.options.specialCharPlaceholder(em[0]);es.appendChild(en);ep.col+=1}}}if(el||eo||ez||ep.measure){var ew=el||"";if(eo){ew+=eo}if(ez){ew+=ez}var en=d8("span",[es],ew);if(ex){en.title=ex}return ep.pre.appendChild(en)}ep.pre.appendChild(es)}function e(es,eu,em,ep,ev){var er=es.cm.options.lineWrapping;for(var eq=0;eq<eu.length;++eq){var el=eu.charAt(eq),en=eq==0;if(el>="\ud800"&&el<"\udbff"&&eq<eu.length-1){el=eu.slice(eq,eq+2);++eq}else{if(eq&&er&&bo(eu,eq)){es.pre.appendChild(d8("wbr"))}}var eo=es.measure[es.pos];var et=es.measure[es.pos]=o(es,el,em,en&&ep,eq==eu.length-1&&ev);if(eo){et.leftSide=eo.leftSide||eo}if(cs&&er&&el==" "&&eq&&!/\s/.test(eu.charAt(eq-1))&&eq<eu.length-1&&!/\s/.test(eu.charAt(eq+1))){et.style.whiteSpace="normal"}es.pos+=el.length}if(eu.length){es.measuredSomething=true}}function dV(el){function em(en){var eo=" ";for(var ep=0;ep<en.length-2;++ep){eo+=ep%2?" ":"\u00a0"}eo+=" ";return eo}return function(eo,es,ep,en,er,eq){return el(eo,es.replace(/ {3,}/g,em),ep,en,er,eq)}}function J(em,ep,el,eo){var eq=!eo&&el.replacedWith;if(eq){if(em.copyWidgets){eq=eq.cloneNode(true)}em.pre.appendChild(eq);if(em.measure){if(ep){em.measure[em.pos]=eq}else{var en=aN(em.cm.display.measure);if(el.type=="bookmark"&&!el.insertLeft){em.measure[em.pos]=em.pre.appendChild(en)}else{if(em.measure[em.pos]){return}else{em.measure[em.pos]=em.pre.insertBefore(en,eq)}}}em.measuredSomething=true}}em.pos+=ep}function aP(eu,eA,et){var eq=eu.markedSpans,es=eu.text,ey=0;if(!eq){for(var eD=1;eD<et.length;eD+=2){eA.addToken(eA,es.slice(ey,ey=et[eD]),di(et[eD+1],eA))}return}var eE=es.length,ep=0,eD=1,ew="",eF;var eH=0,el,eG,ex,eI,en;for(;;){if(eH==ep){el=eG=ex=eI="";en=null;eH=Infinity;var er=[];for(var eB=0;eB<eq.length;++eB){var eC=eq[eB],ez=eC.marker;if(eC.from<=ep&&(eC.to==null||eC.to>ep)){if(eC.to!=null&&eH>eC.to){eH=eC.to;eG=""}if(ez.className){el+=" "+ez.className}if(ez.startStyle&&eC.from==ep){ex+=" "+ez.startStyle}if(ez.endStyle&&eC.to==eH){eG+=" "+ez.endStyle}if(ez.title&&!eI){eI=ez.title}if(ez.collapsed&&(!en||en.marker.size<ez.size)){en=eC}}else{if(eC.from>ep&&eH>eC.from){eH=eC.from}}if(ez.type=="bookmark"&&eC.from==ep&&ez.replacedWith){er.push(ez)}}if(en&&(en.from||0)==ep){J(eA,(en.to==null?eE:en.to)-ep,en.marker,en.from==null);if(en.to==null){return en.marker.find()}}if(!en&&er.length){for(var eB=0;eB<er.length;++eB){J(eA,0,er[eB])}}}if(ep>=eE){break}var ev=Math.min(eE,eH);while(true){if(ew){var em=ep+ew.length;if(!en){var eo=em>ev?ew.slice(0,ev-ep):ew;eA.addToken(eA,eo,eF?eF+el:el,ex,ep+eo.length==eH?eG:"",eI)}if(em>=ev){ew=ew.slice(ev-ep);ep=ev;break}ep=em;ex=""}ew=es.slice(ey,ey=et[eD++]);eF=di(et[eD++],eA)}}}function dR(eC,et,ep,ex,er){function eo(eD){return ep?ep[eD]:null}function es(eD,eF,eE){cR(eD,eF,eE,er);L(eD,"change",eD,et)}var ey=et.from,em=et.to,ev=et.text;var eu=dy(eC,ey.line),el=dy(eC,em.line);var en=dW(ev),eA=eo(ev.length-1),ew=em.line-ey.line;if(ey.ch==0&&em.ch==0&&en==""&&(!eC.cm||eC.cm.options.wholeLineUpdateBefore)){for(var ez=0,eB=ev.length-1,eq=[];ez<eB;++ez){eq.push(new ec(ev[ez],eo(ez),er))}es(el,el.text,eA);if(ew){eC.remove(ey.line,ew)}if(eq.length){eC.insert(ey.line,eq)}}else{if(eu==el){if(ev.length==1){es(eu,eu.text.slice(0,ey.ch)+en+eu.text.slice(em.ch),eA)}else{for(var eq=[],ez=1,eB=ev.length-1;ez<eB;++ez){eq.push(new ec(ev[ez],eo(ez),er))}eq.push(new ec(en+eu.text.slice(em.ch),eA,er));es(eu,eu.text.slice(0,ey.ch)+ev[0],eo(0));eC.insert(ey.line+1,eq)}}else{if(ev.length==1){es(eu,eu.text.slice(0,ey.ch)+ev[0]+el.text.slice(em.ch),eo(0));eC.remove(ey.line+1,ew)}else{es(eu,eu.text.slice(0,ey.ch)+ev[0],eo(0));es(el,en+el.text.slice(em.ch),eA);for(var ez=1,eB=ev.length-1,eq=[];ez<eB;++ez){eq.push(new ec(ev[ez],eo(ez),er))}if(ew>1){eC.remove(ey.line+1,ew-1)}eC.insert(ey.line+1,eq)}}}L(eC,"change",eC,et);bd(eC,ex.anchor,ex.head,null,true)}function dl(em){this.lines=em;this.parent=null;for(var en=0,eo=em.length,el=0;en<eo;++en){em[en].parent=this;el+=em[en].height}this.height=el}dl.prototype={chunkSize:function(){return this.lines.length},removeInner:function(el,ep){for(var en=el,eo=el+ep;en<eo;++en){var em=this.lines[en];this.height-=em.height;aX(em);L(em,"delete")}this.lines.splice(el,ep)},collapse:function(el){el.splice.apply(el,[el.length,0].concat(this.lines))},insertInner:function(em,en,el){this.height+=el;this.lines=this.lines.slice(0,em).concat(en).concat(this.lines.slice(em));for(var eo=0,ep=en.length;eo<ep;++eo){en[eo].parent=this}},iterN:function(el,eo,en){for(var em=el+eo;el<em;++el){if(en(this.lines[el])){return true}}}};function dP(eo){this.children=eo;var en=0,el=0;for(var em=0,eq=eo.length;em<eq;++em){var ep=eo[em];en+=ep.chunkSize();el+=ep.height;ep.parent=this}this.size=en;this.height=el;this.parent=null}dP.prototype={chunkSize:function(){return this.size},removeInner:function(el,es){this.size-=es;for(var en=0;en<this.children.length;++en){var er=this.children[en],ep=er.chunkSize();if(el<ep){var eo=Math.min(es,ep-el),eq=er.height;er.removeInner(el,eo);this.height-=eq-er.height;if(ep==eo){this.children.splice(en--,1);er.parent=null}if((es-=eo)==0){break}el=0}else{el-=ep}}if(this.size-es<25){var em=[];this.collapse(em);this.children=[new dl(em)];this.children[0].parent=this}},collapse:function(el){for(var em=0,en=this.children.length;em<en;++em){this.children[em].collapse(el)}},insertInner:function(em,et,es){this.size+=et.length;this.height+=es;for(var en=0,ep=this.children.length;en<ep;++en){var el=this.children[en],eq=el.chunkSize();if(em<=eq){el.insertInner(em,et,es);if(el.lines&&el.lines.length>50){while(el.lines.length>50){var eo=el.lines.splice(el.lines.length-25,25);var er=new dl(eo);el.height-=er.height;this.children.splice(en+1,0,er);er.parent=this}this.maybeSpill()}break}em-=eq}},maybeSpill:function(){if(this.children.length<=10){return}var eo=this;do{var em=eo.children.splice(eo.children.length-5,5);var en=new dP(em);if(!eo.parent){var ep=new dP(eo.children);ep.parent=eo;eo.children=[ep,en];eo=ep}else{eo.size-=en.size;eo.height-=en.height;var el=cd(eo.parent.children,eo);eo.parent.children.splice(el+1,0,en)}en.parent=eo.parent}while(eo.children.length>10);eo.parent.maybeSpill()},iterN:function(el,es,er){for(var em=0,ep=this.children.length;em<ep;++em){var eq=this.children[em],eo=eq.chunkSize();if(el<eo){var en=Math.min(es,eo-el);if(eq.iterN(el,en,er)){return true}if((es-=en)==0){break}el=0}else{el-=eo}}}};var bD=0;var X=y.Doc=function(en,em,el){if(!(this instanceof X)){return new X(en,em,el)}if(el==null){el=0}dP.call(this,[new dl([new ec("",null)])]);this.first=el;this.scrollTop=this.scrollLeft=0;this.cantEdit=false;this.history=Z();this.cleanGeneration=1;this.frontier=el;var eo=H(el,0);this.sel={from:eo,to:eo,head:eo,anchor:eo,shift:false,extend:false,goalColumn:null};this.id=++bD;this.modeOption=em;if(typeof en=="string"){en=av(en)}dR(this,{from:eo,to:eo,text:en},null,{head:eo,anchor:eo})};X.prototype=bw(dP.prototype,{constructor:X,iter:function(en,em,el){if(el){this.iterN(en-this.first,em-en,el)}else{this.iterN(this.first,this.first+this.size,en)}},insert:function(em,en){var el=0;for(var eo=0,ep=en.length;eo<ep;++eo){el+=en[eo].height}this.insertInner(em-this.first,en,el)},remove:function(el,em){this.removeInner(el-this.first,em)},getValue:function(em){var el=ax(this,this.first,this.first+this.size);if(em===false){return el}return el.join(em||"\n")},setValue:function(em){var en=H(this.first,0),el=this.first+this.size-1;aG(this,{from:en,to:H(el,dy(this,el).text.length),text:av(em),origin:"setValue"},{head:en,anchor:en},true)},replaceRange:function(em,eo,en,el){eo=dY(this,eo);en=en?dY(this,en):eo;aw(this,em,eo,en,el)},getRange:function(eo,en,em){var el=ea(this,dY(this,eo),dY(this,en));if(em===false){return el}return el.join(em||"\n")},getLine:function(em){var el=this.getLineHandle(em);return el&&el.text},setLine:function(el,em){if(bn(this,el)){aw(this,em,H(el,0),dY(this,H(el)))}},removeLine:function(el){if(el){aw(this,"",dY(this,H(el-1)),dY(this,H(el)))}else{aw(this,"",H(0,0),dY(this,H(1,0)))}},getLineHandle:function(el){if(bn(this,el)){return dy(this,el)}},getLineNumber:function(el){return a8(el)},getLineHandleVisualStart:function(el){if(typeof el=="number"){el=dy(this,el)}return s(this,el)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(el){return dY(this,el)},getCursor:function(en){var el=this.sel,em;if(en==null||en=="head"){em=el.head}else{if(en=="anchor"){em=el.anchor}else{if(en=="end"||en===false){em=el.to}else{em=el.from}}}return bv(em)},somethingSelected:function(){return !dX(this.sel.head,this.sel.anchor)},setCursor:dS(function(el,em,eo){var en=dY(this,typeof el=="number"?H(el,em||0):el);if(eo){d5(this,en)}else{bd(this,en,en)}}),setSelection:dS(function(em,en,el){bd(this,dY(this,em),dY(this,en||em),el)}),extendSelection:dS(function(en,em,el){d5(this,dY(this,en),em&&dY(this,em),el)}),getSelection:function(el){return this.getRange(this.sel.from,this.sel.to,el)},replaceSelection:function(em,en,el){aG(this,{from:this.sel.from,to:this.sel.to,text:av(em),origin:el},en||"around")},undo:dS(function(){bm(this,"undo")}),redo:dS(function(){bm(this,"redo")}),setExtending:function(el){this.sel.extend=el},historySize:function(){var el=this.history;return{undo:el.done.length,redo:el.undone.length}},clearHistory:function(){this.history=Z(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration()},changeGeneration:function(){this.history.lastOp=this.history.lastOrigin=null;return this.history.generation},isClean:function(el){return this.history.generation==(el||this.cleanGeneration)},getHistory:function(){return{done:a9(this.history.done),undone:a9(this.history.undone)}},setHistory:function(em){var el=this.history=Z(this.history.maxGeneration);el.done=em.done.slice(0);el.undone=em.undone.slice(0)},markText:function(en,em,el){return c7(this,dY(this,en),dY(this,em),el,"range")},setBookmark:function(en,el){var em={replacedWith:el&&(el.nodeType==null?el.widget:el),insertLeft:el&&el.insertLeft};en=dY(this,en);return c7(this,en,en,em,"bookmark")},findMarksAt:function(ep){ep=dY(this,ep);var eo=[],em=dy(this,ep.line).markedSpans;if(em){for(var el=0;el<em.length;++el){var en=em[el];if((en.from==null||en.from<=ep.ch)&&(en.to==null||en.to>=ep.ch)){eo.push(en.marker.parent||en.marker)}}}return eo},getAllMarks:function(){var el=[];this.iter(function(en){var em=en.markedSpans;if(em){for(var eo=0;eo<em.length;++eo){if(em[eo].from!=null){el.push(em[eo].marker)}}}});return el},posFromIndex:function(em){var el,en=this.first;this.iter(function(eo){var ep=eo.text.length+1;if(ep>em){el=em;return true}em-=ep;++en});return dY(this,H(en,el))},indexFromPos:function(em){em=dY(this,em);var el=em.ch;if(em.line<this.first||em.ch<0){return 0}this.iter(this.first,em.line,function(en){el+=en.text.length+1});return el},copy:function(el){var em=new X(ax(this,this.first,this.first+this.size),this.modeOption,this.first);em.scrollTop=this.scrollTop;em.scrollLeft=this.scrollLeft;em.sel={from:this.sel.from,to:this.sel.to,head:this.sel.head,anchor:this.sel.anchor,shift:this.sel.shift,extend:false,goalColumn:this.sel.goalColumn};if(el){em.history.undoDepth=this.history.undoDepth;em.setHistory(this.getHistory())}return em},linkedDoc:function(el){if(!el){el={}}var eo=this.first,en=this.first+this.size;if(el.from!=null&&el.from>eo){eo=el.from}if(el.to!=null&&el.to<en){en=el.to}var em=new X(ax(this,eo,en),el.mode||this.modeOption,eo);if(el.sharedHist){em.history=this.history}(this.linked||(this.linked=[])).push({doc:em,sharedHist:el.sharedHist});em.linked=[{doc:this,isParent:true,sharedHist:el.sharedHist}];return em},unlinkDoc:function(em){if(em instanceof y){em=em.doc}if(this.linked){for(var en=0;en<this.linked.length;++en){var eo=this.linked[en];if(eo.doc!=em){continue}this.linked.splice(en,1);em.unlinkDoc(this);break}}if(em.history==this.history){var el=[em.id];cE(em,function(ep){el.push(ep.id)},true);em.history=Z();em.history.done=a9(this.history.done,el);em.history.undone=a9(this.history.undone,el)}},iterLinkedDocs:function(el){cE(this,el)},getMode:function(){return this.mode},getEditor:function(){return this.cm}});X.prototype.eachLine=X.prototype.iter;var d="iter insert remove copy getEditor".split(" ");for(var a5 in X.prototype){if(X.prototype.hasOwnProperty(a5)&&cd(d,a5)<0){y.prototype[a5]=(function(el){return function(){return el.apply(this.doc,arguments)}})(X.prototype[a5])}}aV(X);function cE(eo,en,em){function el(eu,es,eq){if(eu.linked){for(var er=0;er<eu.linked.length;++er){var ep=eu.linked[er];if(ep.doc==es){continue}var et=eq&&ep.sharedHist;if(em&&!et){continue}en(ep.doc,et);el(ep.doc,eu,et)}}}el(eo,null,true)}function cH(el,em){if(em.cm){throw new Error("This document is already in use.")}el.doc=em;em.cm=el;I(el);aR(el);if(!el.options.lineWrapping){eb(el)}el.options.mode=em.modeOption;N(el)}function dy(el,ep){ep-=el.first;while(!el.lines){for(var em=0;;++em){var eo=el.children[em],en=eo.chunkSize();if(ep<en){el=eo;break}ep-=en}}return el.lines[ep]}function ea(en,ep,el){var em=[],eo=ep.line;en.iter(ep.line,el.line+1,function(eq){var er=eq.text;if(eo==el.line){er=er.slice(0,el.ch)}if(eo==ep.line){er=er.slice(ep.ch)}em.push(er);++eo});return em}function ax(em,eo,en){var el=[];em.iter(eo,en,function(ep){el.push(ep.text)});return el}function ed(em,el){var en=el-em.height;for(var eo=em;eo;eo=eo.parent){eo.height+=en}}function a8(el){if(el.parent==null){return null}var ep=el.parent,eo=cd(ep.lines,el);for(var em=ep.parent;em;ep=em,em=em.parent){for(var en=0;;++en){if(em.children[en]==ep){break}eo+=em.children[en].chunkSize()}}return eo+ep.first}function a1(er,ep){var en=er.first;outer:do{for(var eo=0,eq=er.children.length;eo<eq;++eo){var em=er.children[eo],el=em.height;if(ep<el){er=em;continue outer}ep-=el;en+=em.chunkSize()}return en}while(!er.lines);for(var eo=0,eq=er.lines.length;eo<eq;++eo){var et=er.lines[eo],es=et.height;if(ep<es){break}ep-=es}return en+eo}function a7(el,eo){eo=s(el.doc,eo);var eq=0,en=eo.parent;for(var ep=0;ep<en.lines.length;++ep){var em=en.lines[ep];if(em==eo){break}else{eq+=em.height}}for(var er=en.parent;er;en=er,er=en.parent){for(var ep=0;ep<er.children.length;++ep){var es=er.children[ep];if(es==en){break}else{eq+=es.height}}}return eq}function a(em){var el=em.order;if(el==null){el=em.order=aH(em.text)}return el}function Z(el){return{done:[],undone:[],undoDepth:Infinity,lastTime:0,lastOp:null,lastOrigin:null,generation:el||1,maxGeneration:el||1}}function bg(em,eq,ep,eo){var el=eq["spans_"+em.id],en=0;em.iter(Math.max(em.first,ep),Math.min(em.first+em.size,eo),function(er){if(er.markedSpans){(el||(el=eq["spans_"+em.id]={}))[en]=er.markedSpans}++en})}function ck(el,eo){var en={line:eo.from.line,ch:eo.from.ch};var em={from:en,to:bY(eo),text:ea(el,eo.from,eo.to)};bg(el,em,eo.from.line,eo.to.line+1);cE(el,function(ep){bg(ep,em,eo.from.line,eo.to.line+1)},true);return em}function c8(eq,es,ep,el){var eo=eq.history;eo.undone.length=0;var en=+new Date,er=dW(eo.done);if(er&&(eo.lastOp==el||eo.lastOrigin==es.origin&&es.origin&&((es.origin.charAt(0)=="+"&&eq.cm&&eo.lastTime>en-eq.cm.options.historyEventDelay)||es.origin.charAt(0)=="*"))){var em=dW(er.changes);if(dX(es.from,es.to)&&dX(es.from,em.to)){em.to=bY(es)}else{er.changes.push(ck(eq,es))}er.anchorAfter=ep.anchor;er.headAfter=ep.head}else{er={changes:[ck(eq,es)],generation:eo.generation,anchorBefore:eq.sel.anchor,headBefore:eq.sel.head,anchorAfter:ep.anchor,headAfter:ep.head};eo.done.push(er);eo.generation=++eo.maxGeneration;while(eo.done.length>eo.undoDepth){eo.done.shift()}}eo.lastTime=en;eo.lastOp=el;eo.lastOrigin=es.origin}function aK(en){if(!en){return null}for(var em=0,el;em<en.length;++em){if(en[em].marker.explicitlyCleared){if(!el){el=en.slice(0,em)}}else{if(el){el.push(en[em])}}}return !el?en:el.length?el:null}function bl(eo,ep){var en=ep["spans_"+eo.id];if(!en){return null}for(var em=0,el=[];em<ep.text.length;++em){el.push(aK(en[em]))}return el}function a9(ev,eo){for(var er=0,em=[];er<ev.length;++er){var en=ev[er],et=en.changes,eu=[];em.push({changes:eu,anchorBefore:en.anchorBefore,headBefore:en.headBefore,anchorAfter:en.anchorAfter,headAfter:en.headAfter});for(var eq=0;eq<et.length;++eq){var es=et[eq],ep;eu.push({from:es.from,to:es.to,text:es.text});if(eo){for(var el in es){if(ep=el.match(/^spans_(\d+)$/)){if(cd(eo,Number(ep[1]))>-1){dW(eu)[el]=es[el];delete es[el]}}}}}}return em}function dj(eo,en,em,el){if(em<eo.line){eo.line+=el}else{if(en<eo.line){eo.line=en;eo.ch=0}}}function dB(eo,eq,er,es){for(var en=0;en<eo.length;++en){var el=eo[en],ep=true;for(var em=0;em<el.changes.length;++em){var et=el.changes[em];if(!el.copied){et.from=bv(et.from);et.to=bv(et.to)}if(er<et.from.line){et.from.line+=es;et.to.line+=es}else{if(eq<=et.to.line){ep=false;break}}}if(!el.copied){el.anchorBefore=bv(el.anchorBefore);el.headBefore=bv(el.headBefore);el.anchorAfter=bv(el.anchorAfter);el.readAfter=bv(el.headAfter);el.copied=true}if(!ep){eo.splice(0,en+1);en=0}else{dj(el.anchorBefore);dj(el.headBefore);dj(el.anchorAfter);dj(el.headAfter)}}}function cr(em,ep){var eo=ep.from.line,en=ep.to.line,el=ep.text.length-(en-eo)-1;dB(em.done,eo,en,el);dB(em.undone,eo,en,el)}function df(){cS(this)}function V(el){if(!el.stop){el.stop=df}return el}function bO(el){if(el.preventDefault){el.preventDefault()}else{el.returnValue=false}}function ch(el){if(el.stopPropagation){el.stopPropagation()}else{el.cancelBubble=true}}function a6(el){return el.defaultPrevented!=null?el.defaultPrevented:el.returnValue==false}function cS(el){bO(el);ch(el)}y.e_stop=cS;y.e_preventDefault=bO;y.e_stopPropagation=ch;function A(el){return el.target||el.srcElement}function d0(em){var el=em.which;if(el==null){if(em.button&1){el=1}else{if(em.button&2){el=3}else{if(em.button&4){el=2}}}}if(bk&&em.ctrlKey&&el==1){el=3}return el}function bf(eo,em,en){if(eo.addEventListener){eo.addEventListener(em,en,false)}else{if(eo.attachEvent){eo.attachEvent("on"+em,en)}else{var ep=eo._handlers||(eo._handlers={});var el=ep[em]||(ep[em]=[]);el.push(en)}}}function cK(ep,en,eo){if(ep.removeEventListener){ep.removeEventListener(en,eo,false)}else{if(ep.detachEvent){ep.detachEvent("on"+en,eo)}else{var el=ep._handlers&&ep._handlers[en];if(!el){return}for(var em=0;em<el.length;++em){if(el[em]==eo){el.splice(em,1);break}}}}}function ae(ep,eo){var el=ep._handlers&&ep._handlers[eo];if(!el){return}var em=Array.prototype.slice.call(arguments,2);for(var en=0;en<el.length;++en){el[en].apply(null,em)}}var aO,bE=0;function L(eq,ep){var el=eq._handlers&&eq._handlers[ep];if(!el){return}var en=Array.prototype.slice.call(arguments,2);if(!aO){++bE;aO=[];setTimeout(c0,0)}function em(er){return function(){er.apply(null,en)}}for(var eo=0;eo<el.length;++eo){aO.push(em(el[eo]))}}function ao(el,en,em){ae(el,em||en.type,el,en);return a6(en)||en.codemirrorIgnore}function c0(){--bE;var el=aO;aO=null;for(var em=0;em<el.length;++em){el[em]()}}function dE(en,em){var el=en._handlers&&en._handlers[em];return el&&el.length>0}y.on=bf;y.off=cK;y.signal=ae;function aV(el){el.prototype.on=function(em,en){bf(this,em,en)};el.prototype.off=function(em,en){cK(this,em,en)}}var aJ=30;var bp=y.Pass={toString:function(){return"CodeMirror.Pass"}};function ek(){this.id=null}ek.prototype={set:function(el,em){clearTimeout(this.id);this.id=setTimeout(em,el)}};function bb(en,el,ep,eq,em){if(el==null){el=en.search(/[^\s\u00a0]/);if(el==-1){el=en.length}}for(var eo=eq||0,er=em||0;eo<el;++eo){if(en.charAt(eo)=="\t"){er+=ep-(er%ep)}else{++er}}return er}y.countColumn=bb;var au=[""];function bC(el){while(au.length<=el){au.push(dW(au)+" ")}return au[el]}function dW(el){return el[el.length-1]}function cu(em){if(dm){em.selectionStart=0;em.selectionEnd=em.value.length}else{try{em.select()}catch(el){}}}function cd(eo,el){if(eo.indexOf){return eo.indexOf(el)}for(var em=0,en=eo.length;em<en;++em){if(eo[em]==el){return em}}return -1}function bw(eo,em){function el(){}el.prototype=eo;var en=new el();if(em){aj(em,en)}return en}function aj(em,el){if(!el){el={}}for(var en in em){if(em.hasOwnProperty(en)){el[en]=em[en]}}return el}function R(en){for(var el=[],em=0;em<en;++em){el.push(undefined)}return el}function bH(em){var el=Array.prototype.slice.call(arguments,1);return function(){return em.apply(null,el)}}var aD=/[\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function bK(el){return/\w/.test(el)||el>"\x80"&&(el.toUpperCase()!=el.toLowerCase()||aD.test(el))}function dh(el){for(var em in el){if(el.hasOwnProperty(em)&&el[em]){return false}}return true}var dK=/[\u0300-\u036F\u0483-\u0487\u0488-\u0489\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\uA66F\u1DC0–\u1DFF\u20D0–\u20FF\uA670-\uA672\uA674-\uA67D\uA69F\udc00-\udfff\uFE20–\uFE2F]/;function d8(el,ep,eo,en){var eq=document.createElement(el);if(eo){eq.className=eo}if(en){eq.style.cssText=en}if(typeof ep=="string"){m(eq,ep)}else{if(ep){for(var em=0;em<ep.length;++em){eq.appendChild(ep[em])}}}return eq}function cB(em){for(var el=em.childNodes.length;el>0;--el){em.removeChild(em.firstChild)}return em}function bc(el,em){return cB(el).appendChild(em)}function m(el,em){if(bx){el.innerHTML="";el.appendChild(document.createTextNode(em))}else{el.textContent=em}}function ak(el){return el.getBoundingClientRect()}y.replaceGetRect=function(el){ak=el};var db=function(){if(bx){return false}var el=d8("div");return"draggable" in el||"dragDrop" in el}();function bo(){return false}if(bB){bo=function(em,el){return em.charCodeAt(el-1)==36&&em.charCodeAt(el)==39}}else{if(ad&&!/Version\/([6-9]|\d\d)\b/.test(navigator.userAgent)){bo=function(em,el){return/\-[^ \-?]|\?[^ !\'\"\),.\-\/:;\?\]\}]/.test(em.slice(el-1,el+1))}}else{if(b1&&/Chrome\/(?:29|[3-9]\d|\d\d\d)\./.test(navigator.userAgent)){bo=function(en,el){var em=en.charCodeAt(el-1);return em>=8208&&em<=8212}}else{if(b1){bo=function(em,el){if(el>1&&em.charCodeAt(el-1)==45){if(/\w/.test(em.charAt(el-2))&&/[^\-?\.]/.test(em.charAt(el))){return true}if(el>2&&/[\d\.,]/.test(em.charAt(el-2))&&/[\d\.,]/.test(em.charAt(el))){return false}}return/[~!#%&*)=+}\]\\|\"\.>,:;][({[<]|-[^\-?\.\u2010-\u201f\u2026]|\?[\w~`@#$%\^&*(_=+{[|><]|…[\w~`@#$%\^&*(_=+{[><]/.test(em.slice(el-1,el+1))}}}}}var cW;function i(el){if(cW!=null){return cW}var em=d8("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");bc(el,em);if(em.offsetWidth){cW=em.offsetHeight-em.clientHeight}return cW||0}var dZ;function aN(el){if(dZ==null){var em=d8("span","\u200b");bc(el,d8("span",[em,document.createTextNode("x")]));if(el.firstChild.offsetHeight!=0){dZ=em.offsetWidth<=1&&em.offsetHeight>2&&!by}}if(dZ){return d8("span","\u200b")}else{return d8("span","\u00a0",null,"display: inline-block; width: 1px; margin-right: -1px")}}var av="\n\nb".split(/\n/).length!=3?function(eq){var er=0,el=[],ep=eq.length;while(er<=ep){var eo=eq.indexOf("\n",er);if(eo==-1){eo=eq.length}var en=eq.slice(er,eq.charAt(eo-1)=="\r"?eo-1:eo);var em=en.indexOf("\r");if(em!=-1){el.push(en.slice(0,em));er+=em+1}else{el.push(en);er=eo+1}}return el}:function(el){return el.split(/\r\n?|\n/)};y.splitLines=av;var aS=window.getSelection?function(em){try{return em.selectionStart!=em.selectionEnd}catch(el){return false}}:function(en){try{var el=en.ownerDocument.selection.createRange()}catch(em){}if(!el||el.parentElement()!=en){return false}return el.compareEndPoints("StartToEnd",el)!=0};var b7=(function(){var el=d8("div");if("oncopy" in el){return true}el.setAttribute("oncopy","return;");return typeof el.oncopy=="function"})();var dA={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",91:"Mod",92:"Mod",93:"Mod",109:"-",107:"=",127:"Delete",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63276:"PageUp",63277:"PageDown",63275:"End",63273:"Home",63234:"Left",63232:"Up",63235:"Right",63233:"Down",63302:"Insert",63272:"Delete"};y.keyNames=dA;(function(){for(var el=0;el<10;el++){dA[el+48]=String(el)}for(var el=65;el<=90;el++){dA[el]=String.fromCharCode(el)}for(var el=1;el<=12;el++){dA[el+111]=dA[el+63235]="F"+el}})();function cC(el,er,eq,ep){if(!el){return ep(er,eq,"ltr")}var eo=false;for(var en=0;en<el.length;++en){var em=el[en];if(em.from<eq&&em.to>er||er==eq&&em.to==er){ep(Math.max(em.from,er),Math.min(em.to,eq),em.level==1?"rtl":"ltr");eo=true}}if(!eo){ep(er,eq,"ltr")}}function cn(el){return el.level%2?el.to:el.from}function eg(el){return el.level%2?el.from:el.to}function bN(em){var el=a(em);return el?cn(el[0]):0}function bX(em){var el=a(em);if(!el){return em.text.length}return eg(dW(el))}function aT(em,ep){var en=dy(em.doc,ep);var eq=s(em.doc,en);if(eq!=en){ep=a8(eq)}var el=a(eq);var eo=!el?0:el[0].level%2?bX(eq):bN(eq);return H(ep,eo)}function cw(en,eq){var em,eo;while(em=cV(eo=dy(en.doc,eq))){eq=em.find().to.line}var el=a(eo);var ep=!el?eo.text.length:el[0].level%2?bN(eo):bX(eo);return H(eq,ep)}function U(em,en,el){var eo=em[0].level;if(en==eo){return true}if(el==eo){return false}return en<el}var dn;function ag(el,ep){for(var em=0,en;em<el.length;++em){var eo=el[em];if(eo.from<ep&&eo.to>ep){dn=null;return em}if(eo.from==ep||eo.to==ep){if(en==null){en=em}else{if(U(el,eo.level,el[en].level)){dn=en;return em}else{dn=em;return en}}}}dn=null;return en}function dx(el,eo,em,en){if(!en){return eo+em}do{eo+=em}while(eo>0&&dK.test(el.text.charAt(eo)));return eo}function p(el,es,en,eo){var ep=a(el);if(!ep){return O(el,es,en,eo)}var er=ag(ep,es),em=ep[er];var eq=dx(el,es,em.level%2?-en:en,eo);for(;;){if(eq>em.from&&eq<em.to){return eq}if(eq==em.from||eq==em.to){if(ag(ep,eq)==er){return eq}em=ep[er+=en];return(en>0)==em.level%2?em.to:em.from}else{em=ep[er+=en];if(!em){return null}if((en>0)==em.level%2){eq=dx(el,em.to,-1,eo)}else{eq=dx(el,em.from,1,eo)}}}}function O(el,ep,em,en){var eo=ep+em;if(en){while(eo>0&&dK.test(el.text.charAt(eo))){eo+=em}}return eo<0||eo>el.text.length?null:eo}var aH=(function(){var er="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL";var ep="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr";function eo(eu){if(eu<=255){return er.charAt(eu)}else{if(1424<=eu&&eu<=1524){return"R"}else{if(1536<=eu&&eu<=1791){return ep.charAt(eu-1536)}else{if(1792<=eu&&eu<=2220){return"r"}else{return"L"}}}}}var el=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;var et=/[stwN]/,en=/[LRr]/,em=/[Lb1n]/,eq=/[1n]/;var es="L";return function(eE){if(!el.test(eE)){return false}var eK=eE.length,eA=[];for(var eJ=0,ew;eJ<eK;++eJ){eA.push(ew=eo(eE.charCodeAt(eJ)))}for(var eJ=0,eD=es;eJ<eK;++eJ){var ew=eA[eJ];if(ew=="m"){eA[eJ]=eD}else{eD=ew}}for(var eJ=0,eu=es;eJ<eK;++eJ){var ew=eA[eJ];if(ew=="1"&&eu=="r"){eA[eJ]="n"}else{if(en.test(ew)){eu=ew;if(ew=="r"){eA[eJ]="R"}}}}for(var eJ=1,eD=eA[0];eJ<eK-1;++eJ){var ew=eA[eJ];if(ew=="+"&&eD=="1"&&eA[eJ+1]=="1"){eA[eJ]="1"}else{if(ew==","&&eD==eA[eJ+1]&&(eD=="1"||eD=="n")){eA[eJ]=eD}}eD=ew}for(var eJ=0;eJ<eK;++eJ){var ew=eA[eJ];if(ew==","){eA[eJ]="N"}else{if(ew=="%"){for(var ex=eJ+1;ex<eK&&eA[ex]=="%";++ex){}var eL=(eJ&&eA[eJ-1]=="!")||(ex<eK-1&&eA[ex]=="1")?"1":"N";for(var eH=eJ;eH<ex;++eH){eA[eH]=eL}eJ=ex-1}}}for(var eJ=0,eu=es;eJ<eK;++eJ){var ew=eA[eJ];if(eu=="L"&&ew=="1"){eA[eJ]="L"}else{if(en.test(ew)){eu=ew}}}for(var eJ=0;eJ<eK;++eJ){if(et.test(eA[eJ])){for(var ex=eJ+1;ex<eK&&et.test(eA[ex]);++ex){}var eB=(eJ?eA[eJ-1]:es)=="L";var ev=(ex<eK-1?eA[ex]:es)=="L";var eL=eB||ev?"L":"R";for(var eH=eJ;eH<ex;++eH){eA[eH]=eL}eJ=ex-1}}var eI=[],eF;for(var eJ=0;eJ<eK;){if(em.test(eA[eJ])){var ey=eJ;for(++eJ;eJ<eK&&em.test(eA[eJ]);++eJ){}eI.push({from:ey,to:eJ,level:0})}else{var ez=eJ,eC=eI.length;for(++eJ;eJ<eK&&eA[eJ]!="L";++eJ){}for(var eH=ez;eH<eJ;){if(eq.test(eA[eH])){if(ez<eH){eI.splice(eC,0,{from:ez,to:eH,level:1})}var eG=eH;for(++eH;eH<eJ&&eq.test(eA[eH]);++eH){}eI.splice(eC,0,{from:eG,to:eH,level:2});ez=eH}else{++eH}}if(ez<eJ){eI.splice(eC,0,{from:ez,to:eJ,level:1})}}}if(eI[0].level==1&&(eF=eE.match(/^\s+/))){eI[0].from=eF[0].length;eI.unshift({from:0,to:eF[0].length,level:0})}if(dW(eI).level==1&&(eF=eE.match(/\s+$/))){dW(eI).to-=eF[0].length;eI.push({from:eK-eF[0].length,to:eK,level:0})}if(eI[0].level!=dW(eI).level){eI.push({from:eK,to:eK,level:eI[0].level})}return eI}})();y.version="3.20.0";return y})();
|
data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
CodeMirror.defineMode("xml",function(B,l){var s=B.indentUnit;var A=l.multilineTagIndentFactor||1;var c=l.multilineTagIndentPastTag||true;var y=l.htmlMode?{autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false};var b=l.alignCDATA;var g,h;function p(I,H){function F(K){H.tokenize=K;return K(I,H)}var G=I.next();if(G=="<"){if(I.eat("!")){if(I.eat("[")){if(I.match("CDATA[")){return F(x("atom","]]>"))}else{return null}}else{if(I.match("--")){return F(x("comment","-->"))}else{if(I.match("DOCTYPE",true,true)){I.eatWhile(/[\w\._\-]/);return F(C(1))}else{return null}}}}else{if(I.eat("?")){I.eatWhile(/[\w\._\-]/);H.tokenize=x("meta","?>");return"meta"}else{var D=I.eat("/");g="";var J;while((J=I.eat(/[^\s\u00a0=<>\"\'\/?]/))){g+=J}if(!g){return"tag error"}h=D?"closeTag":"openTag";H.tokenize=o;return"tag"}}}else{if(G=="&"){var E;if(I.eat("#")){if(I.eat("x")){E=I.eatWhile(/[a-fA-F\d]/)&&I.eat(";")}else{E=I.eatWhile(/[\d]/)&&I.eat(";")}}else{E=I.eatWhile(/[\w\.\-:]/)&&I.eat(";")}return E?"atom":"error"}else{I.eatWhile(/[^&<]/);return null}}}function o(G,F){var E=G.next();if(E==">"||(E=="/"&&G.eat(">"))){F.tokenize=p;h=E==">"?"endTag":"selfcloseTag";return"tag"}else{if(E=="="){h="equals";return null}else{if(E=="<"){F.tokenize=p;var D=F.tokenize(G,F);return D?D+" error":"error"}else{if(/[\'\"]/.test(E)){F.tokenize=k(E);F.stringStartCol=G.column();return F.tokenize(G,F)}else{G.eatWhile(/[^\s\u00a0=<>\"\']/);return"word"}}}}}function k(D){var E=function(G,F){while(!G.eol()){if(G.next()==D){F.tokenize=o;break}}return"string"};E.isInAttribute=true;return E}function x(E,D){return function(G,F){while(!G.eol()){if(G.match(D)){F.tokenize=p;break}G.next()}return E}}function C(D){return function(G,F){var E;while((E=G.next())!=null){if(E=="<"){F.tokenize=C(D+1);return F.tokenize(G,F)}else{if(E==">"){if(D==1){F.tokenize=p;break}else{F.tokenize=C(D-1);return F.tokenize(G,F)}}}}return"meta"}}var m,z,i;function a(){for(var D=arguments.length-1;D>=0;D--){m.cc.push(arguments[D])}}function f(){a.apply(null,arguments);return true}function j(D,F){var E=y.doNotIndent.hasOwnProperty(D)||(m.context&&m.context.noIndent);m.context={prev:m.context,tagName:D,indent:m.indented,startOfLine:F,noIndent:E}}function v(){if(m.context){m.context=m.context.prev}}function e(D){if(D=="openTag"){m.tagName=g;m.tagStart=z.column();return f(n,d(m.startOfLine))}else{if(D=="closeTag"){var E=false;if(m.context){if(m.context.tagName!=g){if(y.implicitlyClosed.hasOwnProperty(m.context.tagName.toLowerCase())){v()}E=!m.context||m.context.tagName!=g}}else{E=true}if(E){i="error"}return f(t(E))}}return f()}function d(D){return function(F){var E=m.tagName;m.tagName=m.tagStart=null;if(F=="selfcloseTag"||(F=="endTag"&&y.autoSelfClosers.hasOwnProperty(E.toLowerCase()))){r(E.toLowerCase());return f()}if(F=="endTag"){r(E.toLowerCase());j(E,D);return f()}return f()}}function t(D){return function(E){if(D){i="error"}if(E=="endTag"){v();return f()}i="error";return f(arguments.callee)}}function r(E){var D;while(true){if(!m.context){return}D=m.context.tagName.toLowerCase();if(!y.contextGrabbers.hasOwnProperty(D)||!y.contextGrabbers[D].hasOwnProperty(E)){return}v()}}function n(D){if(D=="word"){i="attribute";return f(q,n)}if(D=="endTag"||D=="selfcloseTag"){return a()}i="error";return f(n)}function q(D){if(D=="equals"){return f(w,n)}if(!y.allowMissing){i="error"}else{if(D=="word"){i="attribute";return f(q,n)}}return(D=="endTag"||D=="selfcloseTag")?a():f()}function w(D){if(D=="string"){return f(u)}if(D=="word"&&y.allowUnquoted){i="string";return f()}i="error";return(D=="endTag"||D=="selfCloseTag")?a():f()}function u(D){if(D=="string"){return f(u)}else{return a()}}return{startState:function(){return{tokenize:p,cc:[],indented:0,startOfLine:true,tagName:null,tagStart:null,context:null}},token:function(G,F){if(!F.tagName&&G.sol()){F.startOfLine=true;F.indented=G.indentation()}if(G.eatSpace()){return null}i=h=g=null;var E=F.tokenize(G,F);F.type=h;if((E||h)&&E!="comment"){m=F;z=G;while(true){var D=F.cc.pop()||e;if(D(h||E)){break}}}F.startOfLine=false;if(i){E=i=="error"?E+" error":i}return E},indent:function(G,D,F){var E=G.context;if(G.tokenize.isInAttribute){return G.stringStartCol+1}if((G.tokenize!=o&&G.tokenize!=p)||E&&E.noIndent){return F?F.match(/^(\s*)/)[0].length:0}if(G.tagName){if(c){return G.tagStart+G.tagName.length+2}else{return G.tagStart+s*A}}if(b&&/<!\[CDATA\[/.test(D)){return 0}if(E&&/^<\//.test(D)){E=E.prev}while(E&&!E.startOfLine){E=E.prev}if(E){return E.indent+s}else{return 0}},electricChars:"/",blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml"}});CodeMirror.defineMIME("text/xml","xml");CodeMirror.defineMIME("application/xml","xml");if(!CodeMirror.mimeModes.hasOwnProperty("text/html")){CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:true})}CodeMirror.defineMode("javascript",function(U,af){var i=U.indentUnit;var v=af.statementIndent;var u=af.json;var e=af.typescript;var al=function(){function aH(aJ){return{type:aJ,style:"keyword"}}var aC=aH("keyword a"),aA=aH("keyword b"),az=aH("keyword c");var aB=aH("operator"),aF={type:"atom",style:"atom"};var aD={"if":aH("if"),"while":aC,"with":aC,"else":aA,"do":aA,"try":aA,"finally":aA,"return":az,"break":az,"continue":az,"new":az,"delete":az,"throw":az,"var":aH("var"),"const":aH("var"),let:aH("var"),"function":aH("function"),"catch":aH("catch"),"for":aH("for"),"switch":aH("switch"),"case":aH("case"),"default":aH("default"),"in":aB,"typeof":aB,"instanceof":aB,"true":aF,"false":aF,"null":aF,"undefined":aF,"NaN":aF,"Infinity":aF,"this":aH("this"),module:aH("module"),"class":aH("class"),"super":aH("atom"),yield:az,"export":aH("export"),"import":aH("import"),"extends":az};if(e){var aI={type:"variable",style:"variable-3"};var aE={"interface":aH("interface"),"extends":aH("extends"),constructor:aH("constructor"),"public":aH("public"),"private":aH("private"),"protected":aH("protected"),"static":aH("static"),string:aI,number:aI,bool:aI,any:aI};for(var aG in aE){aD[aG]=aE[aG]}}return aD}();var J=/[+\-*&%=<>!?|~^]/;function ab(aC,az){var aB=false,aA;while((aA=aC.next())!=null){if(aA==az&&!aB){return false}aB=!aB&&aA=="\\"}return aB}var M,A;function F(aB,aA,az){M=aB;A=az;return aA}function O(aD,aB){var az=aD.next();if(az=='"'||az=="'"){aB.tokenize=L(az);return aB.tokenize(aD,aB)}else{if(az=="."&&aD.match(/^\d+(?:[eE][+\-]?\d+)?/)){return F("number","number")}else{if(az=="."&&aD.match("..")){return F("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(az)){return F(az)}else{if(az=="="&&aD.eat(">")){return F("=>")}else{if(az=="0"&&aD.eat(/x/i)){aD.eatWhile(/[\da-f]/i);return F("number","number")}else{if(/\d/.test(az)){aD.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return F("number","number")}else{if(az=="/"){if(aD.eat("*")){aB.tokenize=aq;return aq(aD,aB)}else{if(aD.eat("/")){aD.skipToEnd();return F("comment","comment")}else{if(aB.lastType=="operator"||aB.lastType=="keyword c"||aB.lastType=="sof"||/^[\[{}\(,;:]$/.test(aB.lastType)){ab(aD,"/");aD.eatWhile(/[gimy]/);return F("regexp","string-2")}else{aD.eatWhile(J);return F("operator",null,aD.current())}}}}else{if(az=="`"){aB.tokenize=ar;return ar(aD,aB)}else{if(az=="#"){aD.skipToEnd();return F("error","error")}else{if(J.test(az)){aD.eatWhile(J);return F("operator",null,aD.current())}else{aD.eatWhile(/[\w\$_]/);var aC=aD.current(),aA=al.propertyIsEnumerable(aC)&&al[aC];return(aA&&aB.lastType!=".")?F(aA.type,aA.style,aC):F("variable","variable",aC)}}}}}}}}}}}}function L(az){return function(aB,aA){if(!ab(aB,az)){aA.tokenize=O}return F("string","string")}}function aq(aC,aB){var az=false,aA;while(aA=aC.next()){if(aA=="/"&&az){aB.tokenize=O;break}az=(aA=="*")}return F("comment","comment")}function ar(aC,aA){var aB=false,az;while((az=aC.next())!=null){if(!aB&&(az=="`"||az=="$"&&aC.eat("{"))){aA.tokenize=O;break}aB=!aB&&az=="\\"}return F("quasi","string-2",aC.current())}var j="([{}])";function ao(aF,aC){if(aC.fatArrowAt){aC.fatArrowAt=null}var aB=aF.string.indexOf("=>",aF.start);if(aB<0){return}var aE=0,aA=false;for(var aG=aB-1;aG>=0;--aG){var az=aF.string.charAt(aG);var aD=j.indexOf(az);if(aD>=0&&aD<3){if(!aE){++aG;break}if(--aE==0){break}}else{if(aD>=3&&aD<6){++aE}else{if(/[$\w]/.test(az)){aA=true}else{if(aA&&!aE){++aG;break}}}}}if(aA&&!aE){aC.fatArrowAt=aG}}var a={atom:true,number:true,variable:true,string:true,regexp:true,"this":true};function D(aE,aA,az,aD,aB,aC){this.indented=aE;this.column=aA;this.type=az;this.prev=aB;this.info=aC;if(aD!=null){this.align=aD}}function n(aC,aB){for(var aA=aC.localVars;aA;aA=aA.next){if(aA.name==aB){return true}}for(var az=aC.context;az;az=az.prev){for(var aA=az.vars;aA;aA=aA.next){if(aA.name==aB){return true}}}}function d(aD,aA,az,aC,aE){var aF=aD.cc;y.state=aD;y.stream=aE;y.marked=null,y.cc=aF;if(!aD.lexical.hasOwnProperty("align")){aD.lexical.align=true}while(true){var aB=aF.length?aF.pop():u?aj:ax;if(aB(az,aC)){while(aF.length&&aF[aF.length-1].lex){aF.pop()()}if(y.marked){return y.marked}if(az=="variable"&&n(aD,aC)){return"variable-2"}return aA}}}var y={state:null,column:null,marked:null,cc:null};function V(){for(var az=arguments.length-1;az>=0;az--){y.cc.push(arguments[az])}}function Z(){V.apply(null,arguments);return true}function an(aA){function az(aD){for(var aC=aD;aC;aC=aC.next){if(aC.name==aA){return true}}return false}var aB=y.state;if(aB.context){y.marked="def";if(az(aB.localVars)){return}aB.localVars={name:aA,next:aB.localVars}}else{if(az(aB.globalVars)){return}if(af.globalVars){aB.globalVars={name:aA,next:aB.globalVars}}}}var l={name:"this",next:{name:"arguments"}};function r(){y.state.context={prev:y.state.context,vars:y.state.localVars};y.state.localVars=l}function s(){y.state.localVars=y.state.context.vars;y.state.context=y.state.context.prev}function av(aA,aB){var az=function(){var aD=y.state,aC=aD.indented;if(aD.lexical.type=="stat"){aC=aD.lexical.indented}aD.lexical=new D(aC,y.stream.column(),aA,null,aD.lexical,aB)};az.lex=true;return az}function f(){var az=y.state;if(az.lexical.prev){if(az.lexical.type==")"){az.indented=az.lexical.indented}az.lexical=az.lexical.prev}}f.lex=true;function m(az){return function(aA){if(aA==az){return Z()}else{if(az==";"){return V()}else{return Z(arguments.callee)}}}}function ax(az,aA){if(az=="var"){return Z(av("vardef",aA.length),b,m(";"),f)}if(az=="keyword a"){return Z(av("form"),aj,ax,f)}if(az=="keyword b"){return Z(av("form"),ax,f)}if(az=="{"){return Z(av("}"),t,f)}if(az==";"){return Z()}if(az=="if"){return Z(av("form"),aj,ax,f,c)}if(az=="function"){return Z(G)}if(az=="for"){return Z(av("form"),p,f,ax,f)}if(az=="variable"){return Z(av("stat"),ay)}if(az=="switch"){return Z(av("form"),aj,av("}","switch"),m("{"),t,f,f)}if(az=="case"){return Z(aj,m(":"))}if(az=="default"){return Z(m(":"))}if(az=="catch"){return Z(av("form"),r,m("("),aa,m(")"),ax,f,s)}if(az=="module"){return Z(av("form"),r,B,s,f)}if(az=="class"){return Z(av("form"),Q,P,f)}if(az=="export"){return Z(av("form"),aw,f)}if(az=="import"){return Z(av("form"),ac,f)}return V(av("stat"),aj,m(";"),f)}function aj(az){return T(az,false)}function au(az){return T(az,true)}function T(aA,aC){if(y.state.fatArrowAt==y.stream.start){var az=aC?H:R;if(aA=="("){return Z(r,am(g,")"),m("=>"),az,s)}else{if(aA=="variable"){return V(r,g,m("=>"),az,s)}}}var aB=aC?h:W;if(a.hasOwnProperty(aA)){return Z(aB)}if(aA=="function"){return Z(G)}if(aA=="keyword c"){return Z(aC?ag:ae)}if(aA=="("){return Z(av(")"),ae,ap,m(")"),f,aB)}if(aA=="operator"||aA=="spread"){return Z(aC?au:aj)}if(aA=="["){return Z(av("]"),au,ai,f,aB)}if(aA=="{"){return Z(am(o,"}"),aB)}return Z()}function ae(az){if(az.match(/[;\}\)\],]/)){return V()}return V(aj)}function ag(az){if(az.match(/[;\}\)\],]/)){return V()}return V(au)}function W(az,aA){if(az==","){return Z(aj)}return h(az,aA,false)}function h(az,aB,aD){var aA=aD==false?W:h;var aC=aD==false?aj:au;if(aB=="=>"){return Z(r,aD?H:R,s)}if(az=="operator"){if(/\+\+|--/.test(aB)){return Z(aA)}if(aB=="?"){return Z(aj,m(":"),aC)}return Z(aC)}if(az=="quasi"){y.cc.push(aA);return K(aB)}if(az==";"){return}if(az=="("){return Z(am(au,")","call"),aA)}if(az=="."){return Z(ah,aA)}if(az=="["){return Z(av("]"),ae,m("]"),f,aA)}}function K(az){if(!az){}if(az.slice(az.length-2)!="${"){return Z()}return Z(aj,k)}function k(az){if(az=="}"){y.marked="string-2";y.state.tokenize=ar;return Z()}}function R(az){ao(y.stream,y.state);if(az=="{"){return V(ax)}return V(aj)}function H(az){ao(y.stream,y.state);if(az=="{"){return V(ax)}return V(au)}function ay(az){if(az==":"){return Z(f,ax)}return V(W,m(";"),f)}function ah(az){if(az=="variable"){y.marked="property";return Z()}}function o(az,aA){if(az=="variable"){y.marked="property";if(aA=="get"||aA=="set"){return Z(C)}}else{if(az=="number"||az=="string"){y.marked=az+" property"}else{if(az=="["){return Z(aj,m("]"),E)}}}if(a.hasOwnProperty(az)){return Z(E)}}function C(az){if(az!="variable"){return V(E)}y.marked="property";return Z(G)}function E(az){if(az==":"){return Z(au)}if(az=="("){return V(G)}}function am(aC,az,aB){function aA(aE){if(aE==","){var aD=y.state.lexical;if(aD.info=="call"){aD.pos=(aD.pos||0)+1}return Z(aC,aA)}if(aE==az){return Z()}return Z(m(az))}return function(aD){if(aD==az){return Z()}if(aB===false){return V(aC,aA)}return V(av(az,aB),aC,aA,f)}}function t(az){if(az=="}"){return Z()}return V(ax,t)}function N(az){if(e&&az==":"){return Z(Y)}}function Y(az){if(az=="variable"){y.marked="variable-3";return Z()}}function b(){return V(g,N,X,S)}function g(az,aA){if(az=="variable"){an(aA);return Z()}if(az=="["){return Z(am(g,"]"))}if(az=="{"){return Z(am(at,"}"))}}function at(az,aA){if(az=="variable"&&!y.stream.match(/^\s*:/,false)){an(aA);return Z(X)}if(az=="variable"){y.marked="property"}return Z(m(":"),g,X)}function X(az,aA){if(aA=="="){return Z(au)}}function S(az){if(az==","){return Z(b)}}function c(az,aA){if(az=="keyword b"&&aA=="else"){return Z(av("form"),ax,f)}}function p(az){if(az=="("){return Z(av(")"),z,m(")"))}}function z(az){if(az=="var"){return Z(b,m(";"),x)}if(az==";"){return Z(x)}if(az=="variable"){return Z(q)}return V(aj,m(";"),x)}function q(az,aA){if(aA=="in"||aA=="of"){y.marked="keyword";return Z(aj)}return Z(W,x)}function x(az,aA){if(az==";"){return Z(w)}if(aA=="in"||aA=="of"){y.marked="keyword";return Z(aj)}return V(aj,m(";"),w)}function w(az){if(az!=")"){Z(aj)}}function G(az,aA){if(aA=="*"){y.marked="keyword";return Z(G)}if(az=="variable"){an(aA);return Z(G)}if(az=="("){return Z(r,am(aa,")"),ax,s)}}function aa(az){if(az=="spread"){return Z(aa)}return V(g,N)}function Q(az,aA){if(az=="variable"){an(aA);return Z(I)}}function I(az,aA){if(aA=="extends"){return Z(aj)}}function P(az){if(az=="{"){return Z(am(o,"}"))}}function B(az,aA){if(az=="string"){return Z(ax)}if(az=="variable"){an(aA);return Z(ad)}}function aw(az,aA){if(aA=="*"){y.marked="keyword";return Z(ad,m(";"))}if(aA=="default"){y.marked="keyword";return Z(aj,m(";"))}return V(ax)}function ac(az){if(az=="string"){return Z()}return V(ak,ad)}function ak(az,aA){if(az=="{"){return Z(am(ak,"}"))}if(az=="variable"){an(aA)}return Z()}function ad(az,aA){if(aA=="from"){y.marked="keyword";return Z(aj)}}function ai(az){if(az=="for"){return V(ap)}if(az==","){return Z(am(au,"]",false))}return V(am(au,"]",false))}function ap(az){if(az=="for"){return Z(p,ap)}if(az=="if"){return Z(aj,ap)}}return{startState:function(aA){var az={tokenize:O,lastType:"sof",cc:[],lexical:new D((aA||0)-i,0,"block",false),localVars:af.localVars,context:af.localVars&&{vars:af.localVars},indented:0};if(af.globalVars){az.globalVars=af.globalVars}return az},token:function(aB,aA){if(aB.sol()){if(!aA.lexical.hasOwnProperty("align")){aA.lexical.align=false}aA.indented=aB.indentation();ao(aB,aA)}if(aA.tokenize!=aq&&aB.eatSpace()){return null}var az=aA.tokenize(aB,aA);if(M=="comment"){return az}aA.lastType=M=="operator"&&(A=="++"||A=="--")?"incdec":M;return d(aA,az,M,A,aB)},indent:function(aF,az){if(aF.tokenize==aq){return CodeMirror.Pass}if(aF.tokenize!=O){return 0}var aE=az&&az.charAt(0),aC=aF.lexical;for(var aB=aF.cc.length-1;aB>=0;--aB){var aG=aF.cc[aB];if(aG==f){aC=aC.prev}else{if(aG!=c){break}}}if(aC.type=="stat"&&aE=="}"){aC=aC.prev}if(v&&aC.type==")"&&aC.prev.type=="stat"){aC=aC.prev}var aD=aC.type,aA=aE==aD;if(aD=="vardef"){return aC.indented+(aF.lastType=="operator"||aF.lastType==","?aC.info+1:0)}else{if(aD=="form"&&aE=="{"){return aC.indented}else{if(aD=="form"){return aC.indented+i}else{if(aD=="stat"){return aC.indented+(aF.lastType=="operator"||aF.lastType==","?v||i:0)}else{if(aC.info=="switch"&&!aA&&af.doubleIndentSwitch!=false){return aC.indented+(/^(?:case|default)\b/.test(az)?i:2*i)}else{if(aC.align){return aC.column+(aA?0:1)}else{return aC.indented+(aA?0:i)}}}}}}},electricChars:":{}",blockCommentStart:u?null:"/*",blockCommentEnd:u?null:"*/",lineComment:u?null:"//",fold:"brace",helperType:u?"json":"javascript",jsonMode:u}});CodeMirror.defineMIME("text/javascript","javascript");CodeMirror.defineMIME("text/ecmascript","javascript");CodeMirror.defineMIME("application/javascript","javascript");CodeMirror.defineMIME("application/ecmascript","javascript");CodeMirror.defineMIME("application/json",{name:"javascript",json:true});CodeMirror.defineMIME("application/x-json",{name:"javascript",json:true});CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:true});CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:true});CodeMirror.defineMode("css",function(b,d){if(!d.propertyKeywords){d=CodeMirror.resolveMode("text/css")}var e=b.indentUnit||b.tabSize||2,o=d.hooks||{},n=d.atMediaTypes||{},k=d.atMediaFeatures||{},j=d.propertyKeywords||{},l=d.colorKeywords||{},h=d.valueKeywords||{},a=!!d.allowNested,i=null;function g(p,q){i=q;return p}function c(s,r){var q=s.next();if(o[q]){var p=o[q](s,r);if(p!==false){return p}}if(q=="@"){s.eatWhile(/[\w\\\-]/);return g("def",s.current())}else{if(q=="="){g(null,"compare")}else{if((q=="~"||q=="|")&&s.eat("=")){return g(null,"compare")}else{if(q=='"'||q=="'"){r.tokenize=m(q);return r.tokenize(s,r)}else{if(q=="#"){s.eatWhile(/[\w\\\-]/);return g("atom","hash")}else{if(q=="!"){s.match(/^\s*\w*/);return g("keyword","important")}else{if(/\d/.test(q)||q=="."&&s.eat(/\d/)){s.eatWhile(/[\w.%]/);return g("number","unit")}else{if(q==="-"){if(/\d/.test(s.peek())){s.eatWhile(/[\w.%]/);return g("number","unit")}else{if(s.match(/^[^-]+-/)){return g("meta","meta")}}}else{if(/[,+>*\/]/.test(q)){return g(null,"select-op")}else{if(q=="."&&s.match(/^-?[_a-z][_a-z0-9-]*/i)){return g("qualifier","qualifier")}else{if(q==":"){return g("operator",q)}else{if(/[;{}\[\]\(\)]/.test(q)){return g(null,q)}else{if(q=="u"&&s.match("rl(")){s.backUp(1);r.tokenize=f;return g("property","variable")}else{s.eatWhile(/[\w\\\-]/);return g("property","variable")}}}}}}}}}}}}}}function m(p,q){return function(u,s){var t=false,r;while((r=u.next())!=null){if(r==p&&!t){break}t=!t&&r=="\\"}if(!t){if(q){u.backUp(1)}s.tokenize=c}return g("string","string")}}function f(q,p){q.next();if(!q.match(/\s*[\"\']/,false)){p.tokenize=m(")",true)}else{p.tokenize=c}return g(null,"(")}return{startState:function(p){return{tokenize:c,baseIndent:p||0,stack:[],lastToken:null}},token:function(u,r){r.tokenize=r.tokenize||c;if(r.tokenize==c&&u.eatSpace()){return null}var q=r.tokenize(u,r);if(q&&typeof q!="string"){q=g(q[0],q[1])}var p=r.stack[r.stack.length-1];if(q=="variable"){if(i=="variable-definition"){r.stack.push("propertyValue")}return r.lastToken="variable-2"}else{if(q=="property"){var t=u.current().toLowerCase();if(p=="propertyValue"){if(h.hasOwnProperty(t)){q="string-2"}else{if(l.hasOwnProperty(t)){q="keyword"}else{q="variable-2"}}}else{if(p=="rule"){if(!j.hasOwnProperty(t)){q+=" error"}}else{if(p=="block"){if(j.hasOwnProperty(t)){q="property"}else{if(l.hasOwnProperty(t)){q="keyword"}else{if(h.hasOwnProperty(t)){q="string-2"}else{q="tag"}}}}else{if(!p||p=="@media{"){q="tag"}else{if(p=="@media"){if(n[u.current()]){q="attribute"}else{if(/^(only|not)$/.test(t)){q="keyword"}else{if(t=="and"){q="error"}else{if(k.hasOwnProperty(t)){q="error"}else{q="attribute error"}}}}}else{if(p=="@mediaType"){if(n.hasOwnProperty(t)){q="attribute"}else{if(t=="and"){q="operator"}else{if(/^(only|not)$/.test(t)){q="error"}else{q="error"}}}}else{if(p=="@mediaType("){if(j.hasOwnProperty(t)){}else{if(n.hasOwnProperty(t)){q="error"}else{if(t=="and"){q="operator"}else{if(/^(only|not)$/.test(t)){q="error"}else{q+=" error"}}}}}else{if(p=="@import"){q="tag"}else{q="error"}}}}}}}}}else{if(q=="atom"){if(!p||p=="@media{"||p=="block"){q="builtin"}else{if(p=="propertyValue"){if(!/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(u.current())){q+=" error"}}else{q="error"}}}else{if(p=="@media"&&i=="{"){q="error"}}}}if(i=="{"){if(p=="@media"||p=="@mediaType"){r.stack[r.stack.length-1]="@media{"}else{var v=a?"block":"rule";r.stack.push(v)}}else{if(i=="}"){if(p=="interpolation"){q="operator"}while(r.stack.length){var s=r.stack.pop();if(s.indexOf("{")>-1||s=="block"||s=="rule"){break}}}else{if(i=="interpolation"){r.stack.push("interpolation")}else{if(i=="@media"){r.stack.push("@media")}else{if(i=="@import"){r.stack.push("@import")}else{if(p=="@media"&&/\b(keyword|attribute)\b/.test(q)){r.stack[r.stack.length-1]="@mediaType"}else{if(p=="@mediaType"&&u.current()==","){r.stack[r.stack.length-1]="@media"}else{if(i=="("){if(p=="@media"||p=="@mediaType"){r.stack[r.stack.length-1]="@mediaType";r.stack.push("@mediaType(")}else{r.stack.push("(")}}else{if(i==")"){while(r.stack.length){var s=r.stack.pop();if(s.indexOf("(")>-1){break}}}else{if(i==":"&&r.lastToken=="property"){r.stack.push("propertyValue")}else{if(p=="propertyValue"&&i==";"){r.stack.pop()}else{if(p=="@import"&&i==";"){r.stack.pop()}}}}}}}}}}}}return r.lastToken=q},indent:function(q,p){var r=q.stack.length;if(/^\}/.test(p)){r-=q.stack[r-1]=="propertyValue"?2:1}return q.baseIndent+r*e},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});(function(){function b(k){var j={};for(var h=0;h<k.length;++h){j[k[h]]=true}return j}var e=b(["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"]);var g=b(["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid"]);var d=b(["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid-cell","grid-column","grid-column-align","grid-column-sizing","grid-column-span","grid-columns","grid-flow","grid-row","grid-row-align","grid-row-sizing","grid-row-span","grid-rows","grid-template","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-inside","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index","zoom","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-profile","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","kerning","text-anchor","writing-mode"]);var c=b(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"]);var f=b(["above","absolute","activeborder","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","contain","content","content-box","context-menu","continuous","copy","cover","crop","cross","crosshair","currentcolor","cursive","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ew-resize","expanded","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-table","inset","inside","intrinsic","invert","italic","justify","kannada","katakana","katakana-iroha","keep-all","khmer","landscape","lao","large","larger","left","level","lighter","line-through","linear","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","single","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","x-large","x-small","xor","xx-large","xx-small"]);function a(k,j){var h=false,i;while((i=k.next())!=null){if(h&&i=="/"){j.tokenize=null;break}h=(i=="*")}return["comment","comment"]}CodeMirror.defineMIME("text/css",{atMediaTypes:e,atMediaFeatures:g,propertyKeywords:d,colorKeywords:c,valueKeywords:f,hooks:{"<":function(j,i){function h(n,m){var l=0,k;while((k=n.next())!=null){if(l>=2&&k==">"){m.tokenize=null;break}l=(k=="-")?l+1:0}return["comment","comment"]}if(j.eat("!")){i.tokenize=h;return h(j,i)}},"/":function(i,h){if(i.eat("*")){h.tokenize=a;return a(i,h)}return false}},name:"css"});CodeMirror.defineMIME("text/x-scss",{atMediaTypes:e,atMediaFeatures:g,propertyKeywords:d,colorKeywords:c,valueKeywords:f,allowNested:true,hooks:{":":function(h){if(h.match(/\s*{/)){return[null,"{"]}return false},"$":function(h){h.match(/^[\w-]+/);if(h.peek()==":"){return["variable","variable-definition"]}return["variable","variable"]},",":function(i,h){if(h.stack[h.stack.length-1]=="propertyValue"&&i.match(/^ *\$/,false)){return["operator",";"]}},"/":function(i,h){if(i.eat("/")){i.skipToEnd();return["comment","comment"]}else{if(i.eat("*")){h.tokenize=a;return a(i,h)}else{return["operator","operator"]}}},"#":function(h){if(h.eat("{")){return["operator","interpolation"]}else{h.eatWhile(/[\w\\\-]/);return["atom","hash"]}}},name:"css"})})();CodeMirror.defineMode("htmlmixed",function(b,c){var a=CodeMirror.getMode(b,{name:"xml",htmlMode:true});var m=CodeMirror.getMode(b,"css");var k=[],j=c&&c.scriptTypes;k.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:CodeMirror.getMode(b,"javascript")});if(j){for(var d=0;d<j.length;++d){var h=j[d];k.push({matches:h.matches,mode:h.mode&&CodeMirror.getMode(b,h.mode)})}}k.push({matches:/./,mode:CodeMirror.getMode(b,"text/plain")});function e(s,q){var o=q.htmlState.tagName;var p=a.token(s,q.htmlState);if(o=="script"&&/\btag\b/.test(p)&&s.current()==">"){var t=s.string.slice(Math.max(0,s.pos-100),s.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);t=t?t[1]:"";if(t&&/[\"\']/.test(t.charAt(0))){t=t.slice(1,t.length-1)}for(var n=0;n<k.length;++n){var r=k[n];if(typeof r.matches=="string"?t==r.matches:r.matches.test(t)){if(r.mode){q.token=l;q.localMode=r.mode;q.localState=r.mode.startState&&r.mode.startState(a.indent(q.htmlState,""))}break}}}else{if(o=="style"&&/\btag\b/.test(p)&&s.current()==">"){q.token=f;q.localMode=m;q.localState=m.startState(a.indent(q.htmlState,""))}}return p}function g(r,n,o){var q=r.current();var p=q.search(n),i;if(p>-1){r.backUp(q.length-p)}else{if(i=q.match(/<\/?$/)){r.backUp(q.length);if(!r.match(n,false)){r.match(q)}}}return o}function l(n,i){if(n.match(/^<\/\s*script\s*>/i,false)){i.token=e;i.localState=i.localMode=null;return e(n,i)}return g(n,/<\/\s*script\s*>/,i.localMode.token(n,i.localState))}function f(n,i){if(n.match(/^<\/\s*style\s*>/i,false)){i.token=e;i.localState=i.localMode=null;return e(n,i)}return g(n,/<\/\s*style\s*>/,m.token(n,i.localState))}return{startState:function(){var i=a.startState();return{token:e,localMode:null,localState:null,htmlState:i}},copyState:function(n){if(n.localState){var i=CodeMirror.copyState(n.localMode,n.localState)}return{token:n.token,localMode:n.localMode,localState:i,htmlState:CodeMirror.copyState(a,n.htmlState)}},token:function(n,i){return i.token(n,i)},indent:function(n,i){if(!n.localMode||/^\s*<\//.test(i)){return a.indent(n.htmlState,i)}else{if(n.localMode.indent){return n.localMode.indent(n.localState,i)}else{return CodeMirror.Pass}}},electricChars:"/{}:",innerMode:function(i){return{state:i.localState||i.htmlState,mode:i.localMode||a}}}},"xml","javascript","css");CodeMirror.defineMIME("text/html","htmlmixed");
|
data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
CodeMirror.defineMode("javascript",function(U,af){var i=U.indentUnit;var v=af.statementIndent;var u=af.json;var e=af.typescript;var al=function(){function aH(aJ){return{type:aJ,style:"keyword"}}var aC=aH("keyword a"),aA=aH("keyword b"),az=aH("keyword c");var aB=aH("operator"),aF={type:"atom",style:"atom"};var aD={"if":aH("if"),"while":aC,"with":aC,"else":aA,"do":aA,"try":aA,"finally":aA,"return":az,"break":az,"continue":az,"new":az,"delete":az,"throw":az,"var":aH("var"),"const":aH("var"),let:aH("var"),"function":aH("function"),"catch":aH("catch"),"for":aH("for"),"switch":aH("switch"),"case":aH("case"),"default":aH("default"),"in":aB,"typeof":aB,"instanceof":aB,"true":aF,"false":aF,"null":aF,"undefined":aF,"NaN":aF,"Infinity":aF,"this":aH("this"),module:aH("module"),"class":aH("class"),"super":aH("atom"),yield:az,"export":aH("export"),"import":aH("import"),"extends":az};if(e){var aI={type:"variable",style:"variable-3"};var aE={"interface":aH("interface"),"extends":aH("extends"),constructor:aH("constructor"),"public":aH("public"),"private":aH("private"),"protected":aH("protected"),"static":aH("static"),string:aI,number:aI,bool:aI,any:aI};for(var aG in aE){aD[aG]=aE[aG]}}return aD}();var J=/[+\-*&%=<>!?|~^]/;function ab(aC,az){var aB=false,aA;while((aA=aC.next())!=null){if(aA==az&&!aB){return false}aB=!aB&&aA=="\\"}return aB}var M,A;function F(aB,aA,az){M=aB;A=az;return aA}function O(aD,aB){var az=aD.next();if(az=='"'||az=="'"){aB.tokenize=L(az);return aB.tokenize(aD,aB)}else{if(az=="."&&aD.match(/^\d+(?:[eE][+\-]?\d+)?/)){return F("number","number")}else{if(az=="."&&aD.match("..")){return F("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(az)){return F(az)}else{if(az=="="&&aD.eat(">")){return F("=>")}else{if(az=="0"&&aD.eat(/x/i)){aD.eatWhile(/[\da-f]/i);return F("number","number")}else{if(/\d/.test(az)){aD.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return F("number","number")}else{if(az=="/"){if(aD.eat("*")){aB.tokenize=aq;return aq(aD,aB)}else{if(aD.eat("/")){aD.skipToEnd();return F("comment","comment")}else{if(aB.lastType=="operator"||aB.lastType=="keyword c"||aB.lastType=="sof"||/^[\[{}\(,;:]$/.test(aB.lastType)){ab(aD,"/");aD.eatWhile(/[gimy]/);return F("regexp","string-2")}else{aD.eatWhile(J);return F("operator",null,aD.current())}}}}else{if(az=="`"){aB.tokenize=ar;return ar(aD,aB)}else{if(az=="#"){aD.skipToEnd();return F("error","error")}else{if(J.test(az)){aD.eatWhile(J);return F("operator",null,aD.current())}else{aD.eatWhile(/[\w\$_]/);var aC=aD.current(),aA=al.propertyIsEnumerable(aC)&&al[aC];return(aA&&aB.lastType!=".")?F(aA.type,aA.style,aC):F("variable","variable",aC)}}}}}}}}}}}}function L(az){return function(aB,aA){if(!ab(aB,az)){aA.tokenize=O}return F("string","string")}}function aq(aC,aB){var az=false,aA;while(aA=aC.next()){if(aA=="/"&&az){aB.tokenize=O;break}az=(aA=="*")}return F("comment","comment")}function ar(aC,aA){var aB=false,az;while((az=aC.next())!=null){if(!aB&&(az=="`"||az=="$"&&aC.eat("{"))){aA.tokenize=O;break}aB=!aB&&az=="\\"}return F("quasi","string-2",aC.current())}var j="([{}])";function ao(aF,aC){if(aC.fatArrowAt){aC.fatArrowAt=null}var aB=aF.string.indexOf("=>",aF.start);if(aB<0){return}var aE=0,aA=false;for(var aG=aB-1;aG>=0;--aG){var az=aF.string.charAt(aG);var aD=j.indexOf(az);if(aD>=0&&aD<3){if(!aE){++aG;break}if(--aE==0){break}}else{if(aD>=3&&aD<6){++aE}else{if(/[$\w]/.test(az)){aA=true}else{if(aA&&!aE){++aG;break}}}}}if(aA&&!aE){aC.fatArrowAt=aG}}var a={atom:true,number:true,variable:true,string:true,regexp:true,"this":true};function D(aE,aA,az,aD,aB,aC){this.indented=aE;this.column=aA;this.type=az;this.prev=aB;this.info=aC;if(aD!=null){this.align=aD}}function n(aC,aB){for(var aA=aC.localVars;aA;aA=aA.next){if(aA.name==aB){return true}}for(var az=aC.context;az;az=az.prev){for(var aA=az.vars;aA;aA=aA.next){if(aA.name==aB){return true}}}}function d(aD,aA,az,aC,aE){var aF=aD.cc;y.state=aD;y.stream=aE;y.marked=null,y.cc=aF;if(!aD.lexical.hasOwnProperty("align")){aD.lexical.align=true}while(true){var aB=aF.length?aF.pop():u?aj:ax;if(aB(az,aC)){while(aF.length&&aF[aF.length-1].lex){aF.pop()()}if(y.marked){return y.marked}if(az=="variable"&&n(aD,aC)){return"variable-2"}return aA}}}var y={state:null,column:null,marked:null,cc:null};function V(){for(var az=arguments.length-1;az>=0;az--){y.cc.push(arguments[az])}}function Z(){V.apply(null,arguments);return true}function an(aA){function az(aD){for(var aC=aD;aC;aC=aC.next){if(aC.name==aA){return true}}return false}var aB=y.state;if(aB.context){y.marked="def";if(az(aB.localVars)){return}aB.localVars={name:aA,next:aB.localVars}}else{if(az(aB.globalVars)){return}if(af.globalVars){aB.globalVars={name:aA,next:aB.globalVars}}}}var l={name:"this",next:{name:"arguments"}};function r(){y.state.context={prev:y.state.context,vars:y.state.localVars};y.state.localVars=l}function s(){y.state.localVars=y.state.context.vars;y.state.context=y.state.context.prev}function av(aA,aB){var az=function(){var aD=y.state,aC=aD.indented;if(aD.lexical.type=="stat"){aC=aD.lexical.indented}aD.lexical=new D(aC,y.stream.column(),aA,null,aD.lexical,aB)};az.lex=true;return az}function f(){var az=y.state;if(az.lexical.prev){if(az.lexical.type==")"){az.indented=az.lexical.indented}az.lexical=az.lexical.prev}}f.lex=true;function m(az){return function(aA){if(aA==az){return Z()}else{if(az==";"){return V()}else{return Z(arguments.callee)}}}}function ax(az,aA){if(az=="var"){return Z(av("vardef",aA.length),b,m(";"),f)}if(az=="keyword a"){return Z(av("form"),aj,ax,f)}if(az=="keyword b"){return Z(av("form"),ax,f)}if(az=="{"){return Z(av("}"),t,f)}if(az==";"){return Z()}if(az=="if"){return Z(av("form"),aj,ax,f,c)}if(az=="function"){return Z(G)}if(az=="for"){return Z(av("form"),p,f,ax,f)}if(az=="variable"){return Z(av("stat"),ay)}if(az=="switch"){return Z(av("form"),aj,av("}","switch"),m("{"),t,f,f)}if(az=="case"){return Z(aj,m(":"))}if(az=="default"){return Z(m(":"))}if(az=="catch"){return Z(av("form"),r,m("("),aa,m(")"),ax,f,s)}if(az=="module"){return Z(av("form"),r,B,s,f)}if(az=="class"){return Z(av("form"),Q,P,f)}if(az=="export"){return Z(av("form"),aw,f)}if(az=="import"){return Z(av("form"),ac,f)}return V(av("stat"),aj,m(";"),f)}function aj(az){return T(az,false)}function au(az){return T(az,true)}function T(aA,aC){if(y.state.fatArrowAt==y.stream.start){var az=aC?H:R;if(aA=="("){return Z(r,am(g,")"),m("=>"),az,s)}else{if(aA=="variable"){return V(r,g,m("=>"),az,s)}}}var aB=aC?h:W;if(a.hasOwnProperty(aA)){return Z(aB)}if(aA=="function"){return Z(G)}if(aA=="keyword c"){return Z(aC?ag:ae)}if(aA=="("){return Z(av(")"),ae,ap,m(")"),f,aB)}if(aA=="operator"||aA=="spread"){return Z(aC?au:aj)}if(aA=="["){return Z(av("]"),au,ai,f,aB)}if(aA=="{"){return Z(am(o,"}"),aB)}return Z()}function ae(az){if(az.match(/[;\}\)\],]/)){return V()}return V(aj)}function ag(az){if(az.match(/[;\}\)\],]/)){return V()}return V(au)}function W(az,aA){if(az==","){return Z(aj)}return h(az,aA,false)}function h(az,aB,aD){var aA=aD==false?W:h;var aC=aD==false?aj:au;if(aB=="=>"){return Z(r,aD?H:R,s)}if(az=="operator"){if(/\+\+|--/.test(aB)){return Z(aA)}if(aB=="?"){return Z(aj,m(":"),aC)}return Z(aC)}if(az=="quasi"){y.cc.push(aA);return K(aB)}if(az==";"){return}if(az=="("){return Z(am(au,")","call"),aA)}if(az=="."){return Z(ah,aA)}if(az=="["){return Z(av("]"),ae,m("]"),f,aA)}}function K(az){if(!az){}if(az.slice(az.length-2)!="${"){return Z()}return Z(aj,k)}function k(az){if(az=="}"){y.marked="string-2";y.state.tokenize=ar;return Z()}}function R(az){ao(y.stream,y.state);if(az=="{"){return V(ax)}return V(aj)}function H(az){ao(y.stream,y.state);if(az=="{"){return V(ax)}return V(au)}function ay(az){if(az==":"){return Z(f,ax)}return V(W,m(";"),f)}function ah(az){if(az=="variable"){y.marked="property";return Z()}}function o(az,aA){if(az=="variable"){y.marked="property";if(aA=="get"||aA=="set"){return Z(C)}}else{if(az=="number"||az=="string"){y.marked=az+" property"}else{if(az=="["){return Z(aj,m("]"),E)}}}if(a.hasOwnProperty(az)){return Z(E)}}function C(az){if(az!="variable"){return V(E)}y.marked="property";return Z(G)}function E(az){if(az==":"){return Z(au)}if(az=="("){return V(G)}}function am(aC,az,aB){function aA(aE){if(aE==","){var aD=y.state.lexical;if(aD.info=="call"){aD.pos=(aD.pos||0)+1}return Z(aC,aA)}if(aE==az){return Z()}return Z(m(az))}return function(aD){if(aD==az){return Z()}if(aB===false){return V(aC,aA)}return V(av(az,aB),aC,aA,f)}}function t(az){if(az=="}"){return Z()}return V(ax,t)}function N(az){if(e&&az==":"){return Z(Y)}}function Y(az){if(az=="variable"){y.marked="variable-3";return Z()}}function b(){return V(g,N,X,S)}function g(az,aA){if(az=="variable"){an(aA);return Z()}if(az=="["){return Z(am(g,"]"))}if(az=="{"){return Z(am(at,"}"))}}function at(az,aA){if(az=="variable"&&!y.stream.match(/^\s*:/,false)){an(aA);return Z(X)}if(az=="variable"){y.marked="property"}return Z(m(":"),g,X)}function X(az,aA){if(aA=="="){return Z(au)}}function S(az){if(az==","){return Z(b)}}function c(az,aA){if(az=="keyword b"&&aA=="else"){return Z(av("form"),ax,f)}}function p(az){if(az=="("){return Z(av(")"),z,m(")"))}}function z(az){if(az=="var"){return Z(b,m(";"),x)}if(az==";"){return Z(x)}if(az=="variable"){return Z(q)}return V(aj,m(";"),x)}function q(az,aA){if(aA=="in"||aA=="of"){y.marked="keyword";return Z(aj)}return Z(W,x)}function x(az,aA){if(az==";"){return Z(w)}if(aA=="in"||aA=="of"){y.marked="keyword";return Z(aj)}return V(aj,m(";"),w)}function w(az){if(az!=")"){Z(aj)}}function G(az,aA){if(aA=="*"){y.marked="keyword";return Z(G)}if(az=="variable"){an(aA);return Z(G)}if(az=="("){return Z(r,am(aa,")"),ax,s)}}function aa(az){if(az=="spread"){return Z(aa)}return V(g,N)}function Q(az,aA){if(az=="variable"){an(aA);return Z(I)}}function I(az,aA){if(aA=="extends"){return Z(aj)}}function P(az){if(az=="{"){return Z(am(o,"}"))}}function B(az,aA){if(az=="string"){return Z(ax)}if(az=="variable"){an(aA);return Z(ad)}}function aw(az,aA){if(aA=="*"){y.marked="keyword";return Z(ad,m(";"))}if(aA=="default"){y.marked="keyword";return Z(aj,m(";"))}return V(ax)}function ac(az){if(az=="string"){return Z()}return V(ak,ad)}function ak(az,aA){if(az=="{"){return Z(am(ak,"}"))}if(az=="variable"){an(aA)}return Z()}function ad(az,aA){if(aA=="from"){y.marked="keyword";return Z(aj)}}function ai(az){if(az=="for"){return V(ap)}if(az==","){return Z(am(au,"]",false))}return V(am(au,"]",false))}function ap(az){if(az=="for"){return Z(p,ap)}if(az=="if"){return Z(aj,ap)}}return{startState:function(aA){var az={tokenize:O,lastType:"sof",cc:[],lexical:new D((aA||0)-i,0,"block",false),localVars:af.localVars,context:af.localVars&&{vars:af.localVars},indented:0};if(af.globalVars){az.globalVars=af.globalVars}return az},token:function(aB,aA){if(aB.sol()){if(!aA.lexical.hasOwnProperty("align")){aA.lexical.align=false}aA.indented=aB.indentation();ao(aB,aA)}if(aA.tokenize!=aq&&aB.eatSpace()){return null}var az=aA.tokenize(aB,aA);if(M=="comment"){return az}aA.lastType=M=="operator"&&(A=="++"||A=="--")?"incdec":M;return d(aA,az,M,A,aB)},indent:function(aF,az){if(aF.tokenize==aq){return CodeMirror.Pass}if(aF.tokenize!=O){return 0}var aE=az&&az.charAt(0),aC=aF.lexical;for(var aB=aF.cc.length-1;aB>=0;--aB){var aG=aF.cc[aB];if(aG==f){aC=aC.prev}else{if(aG!=c){break}}}if(aC.type=="stat"&&aE=="}"){aC=aC.prev}if(v&&aC.type==")"&&aC.prev.type=="stat"){aC=aC.prev}var aD=aC.type,aA=aE==aD;if(aD=="vardef"){return aC.indented+(aF.lastType=="operator"||aF.lastType==","?aC.info+1:0)}else{if(aD=="form"&&aE=="{"){return aC.indented}else{if(aD=="form"){return aC.indented+i}else{if(aD=="stat"){return aC.indented+(aF.lastType=="operator"||aF.lastType==","?v||i:0)}else{if(aC.info=="switch"&&!aA&&af.doubleIndentSwitch!=false){return aC.indented+(/^(?:case|default)\b/.test(az)?i:2*i)}else{if(aC.align){return aC.column+(aA?0:1)}else{return aC.indented+(aA?0:i)}}}}}}},electricChars:":{}",blockCommentStart:u?null:"/*",blockCommentEnd:u?null:"*/",lineComment:u?null:"//",fold:"brace",helperType:u?"json":"javascript",jsonMode:u}});CodeMirror.defineMIME("text/javascript","javascript");CodeMirror.defineMIME("text/ecmascript","javascript");CodeMirror.defineMIME("application/javascript","javascript");CodeMirror.defineMIME("application/ecmascript","javascript");CodeMirror.defineMIME("application/json",{name:"javascript",json:true});CodeMirror.defineMIME("application/x-json",{name:"javascript",json:true});CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:true});CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:true});
|
@@ -0,0 +1 @@
|
|
1
|
+
CodeMirror.defineMode("htmlmixed",function(b,c){var a=CodeMirror.getMode(b,{name:"xml",htmlMode:true});var m=CodeMirror.getMode(b,"css");var k=[],j=c&&c.scriptTypes;k.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:CodeMirror.getMode(b,"javascript")});if(j){for(var d=0;d<j.length;++d){var h=j[d];k.push({matches:h.matches,mode:h.mode&&CodeMirror.getMode(b,h.mode)})}}k.push({matches:/./,mode:CodeMirror.getMode(b,"text/plain")});function e(s,q){var o=q.htmlState.tagName;var p=a.token(s,q.htmlState);if(o=="script"&&/\btag\b/.test(p)&&s.current()==">"){var t=s.string.slice(Math.max(0,s.pos-100),s.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);t=t?t[1]:"";if(t&&/[\"\']/.test(t.charAt(0))){t=t.slice(1,t.length-1)}for(var n=0;n<k.length;++n){var r=k[n];if(typeof r.matches=="string"?t==r.matches:r.matches.test(t)){if(r.mode){q.token=l;q.localMode=r.mode;q.localState=r.mode.startState&&r.mode.startState(a.indent(q.htmlState,""))}break}}}else{if(o=="style"&&/\btag\b/.test(p)&&s.current()==">"){q.token=f;q.localMode=m;q.localState=m.startState(a.indent(q.htmlState,""))}}return p}function g(r,n,o){var q=r.current();var p=q.search(n),i;if(p>-1){r.backUp(q.length-p)}else{if(i=q.match(/<\/?$/)){r.backUp(q.length);if(!r.match(n,false)){r.match(q)}}}return o}function l(n,i){if(n.match(/^<\/\s*script\s*>/i,false)){i.token=e;i.localState=i.localMode=null;return e(n,i)}return g(n,/<\/\s*script\s*>/,i.localMode.token(n,i.localState))}function f(n,i){if(n.match(/^<\/\s*style\s*>/i,false)){i.token=e;i.localState=i.localMode=null;return e(n,i)}return g(n,/<\/\s*style\s*>/,m.token(n,i.localState))}return{startState:function(){var i=a.startState();return{token:e,localMode:null,localState:null,htmlState:i}},copyState:function(n){if(n.localState){var i=CodeMirror.copyState(n.localMode,n.localState)}return{token:n.token,localMode:n.localMode,localState:i,htmlState:CodeMirror.copyState(a,n.htmlState)}},token:function(n,i){return i.token(n,i)},indent:function(n,i){if(!n.localMode||/^\s*<\//.test(i)){return a.indent(n.htmlState,i)}else{if(n.localMode.indent){return n.localMode.indent(n.localState,i)}else{return CodeMirror.Pass}}},electricChars:"/{}:",innerMode:function(i){return{state:i.localState||i.htmlState,mode:i.localMode||a}}}},"xml","javascript","css");CodeMirror.defineMIME("text/html","htmlmixed");CodeMirror.defineMode("xml",function(B,l){var s=B.indentUnit;var A=l.multilineTagIndentFactor||1;var c=l.multilineTagIndentPastTag||true;var y=l.htmlMode?{autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false};var b=l.alignCDATA;var g,h;function p(I,H){function F(K){H.tokenize=K;return K(I,H)}var G=I.next();if(G=="<"){if(I.eat("!")){if(I.eat("[")){if(I.match("CDATA[")){return F(x("atom","]]>"))}else{return null}}else{if(I.match("--")){return F(x("comment","-->"))}else{if(I.match("DOCTYPE",true,true)){I.eatWhile(/[\w\._\-]/);return F(C(1))}else{return null}}}}else{if(I.eat("?")){I.eatWhile(/[\w\._\-]/);H.tokenize=x("meta","?>");return"meta"}else{var D=I.eat("/");g="";var J;while((J=I.eat(/[^\s\u00a0=<>\"\'\/?]/))){g+=J}if(!g){return"tag error"}h=D?"closeTag":"openTag";H.tokenize=o;return"tag"}}}else{if(G=="&"){var E;if(I.eat("#")){if(I.eat("x")){E=I.eatWhile(/[a-fA-F\d]/)&&I.eat(";")}else{E=I.eatWhile(/[\d]/)&&I.eat(";")}}else{E=I.eatWhile(/[\w\.\-:]/)&&I.eat(";")}return E?"atom":"error"}else{I.eatWhile(/[^&<]/);return null}}}function o(G,F){var E=G.next();if(E==">"||(E=="/"&&G.eat(">"))){F.tokenize=p;h=E==">"?"endTag":"selfcloseTag";return"tag"}else{if(E=="="){h="equals";return null}else{if(E=="<"){F.tokenize=p;var D=F.tokenize(G,F);return D?D+" error":"error"}else{if(/[\'\"]/.test(E)){F.tokenize=k(E);F.stringStartCol=G.column();return F.tokenize(G,F)}else{G.eatWhile(/[^\s\u00a0=<>\"\']/);return"word"}}}}}function k(D){var E=function(G,F){while(!G.eol()){if(G.next()==D){F.tokenize=o;break}}return"string"};E.isInAttribute=true;return E}function x(E,D){return function(G,F){while(!G.eol()){if(G.match(D)){F.tokenize=p;break}G.next()}return E}}function C(D){return function(G,F){var E;while((E=G.next())!=null){if(E=="<"){F.tokenize=C(D+1);return F.tokenize(G,F)}else{if(E==">"){if(D==1){F.tokenize=p;break}else{F.tokenize=C(D-1);return F.tokenize(G,F)}}}}return"meta"}}var m,z,i;function a(){for(var D=arguments.length-1;D>=0;D--){m.cc.push(arguments[D])}}function f(){a.apply(null,arguments);return true}function j(D,F){var E=y.doNotIndent.hasOwnProperty(D)||(m.context&&m.context.noIndent);m.context={prev:m.context,tagName:D,indent:m.indented,startOfLine:F,noIndent:E}}function v(){if(m.context){m.context=m.context.prev}}function e(D){if(D=="openTag"){m.tagName=g;m.tagStart=z.column();return f(n,d(m.startOfLine))}else{if(D=="closeTag"){var E=false;if(m.context){if(m.context.tagName!=g){if(y.implicitlyClosed.hasOwnProperty(m.context.tagName.toLowerCase())){v()}E=!m.context||m.context.tagName!=g}}else{E=true}if(E){i="error"}return f(t(E))}}return f()}function d(D){return function(F){var E=m.tagName;m.tagName=m.tagStart=null;if(F=="selfcloseTag"||(F=="endTag"&&y.autoSelfClosers.hasOwnProperty(E.toLowerCase()))){r(E.toLowerCase());return f()}if(F=="endTag"){r(E.toLowerCase());j(E,D);return f()}return f()}}function t(D){return function(E){if(D){i="error"}if(E=="endTag"){v();return f()}i="error";return f(arguments.callee)}}function r(E){var D;while(true){if(!m.context){return}D=m.context.tagName.toLowerCase();if(!y.contextGrabbers.hasOwnProperty(D)||!y.contextGrabbers[D].hasOwnProperty(E)){return}v()}}function n(D){if(D=="word"){i="attribute";return f(q,n)}if(D=="endTag"||D=="selfcloseTag"){return a()}i="error";return f(n)}function q(D){if(D=="equals"){return f(w,n)}if(!y.allowMissing){i="error"}else{if(D=="word"){i="attribute";return f(q,n)}}return(D=="endTag"||D=="selfcloseTag")?a():f()}function w(D){if(D=="string"){return f(u)}if(D=="word"&&y.allowUnquoted){i="string";return f()}i="error";return(D=="endTag"||D=="selfCloseTag")?a():f()}function u(D){if(D=="string"){return f(u)}else{return a()}}return{startState:function(){return{tokenize:p,cc:[],indented:0,startOfLine:true,tagName:null,tagStart:null,context:null}},token:function(G,F){if(!F.tagName&&G.sol()){F.startOfLine=true;F.indented=G.indentation()}if(G.eatSpace()){return null}i=h=g=null;var E=F.tokenize(G,F);F.type=h;if((E||h)&&E!="comment"){m=F;z=G;while(true){var D=F.cc.pop()||e;if(D(h||E)){break}}}F.startOfLine=false;if(i){E=i=="error"?E+" error":i}return E},indent:function(G,D,F){var E=G.context;if(G.tokenize.isInAttribute){return G.stringStartCol+1}if((G.tokenize!=o&&G.tokenize!=p)||E&&E.noIndent){return F?F.match(/^(\s*)/)[0].length:0}if(G.tagName){if(c){return G.tagStart+G.tagName.length+2}else{return G.tagStart+s*A}}if(b&&/<!\[CDATA\[/.test(D)){return 0}if(E&&/^<\//.test(D)){E=E.prev}while(E&&!E.startOfLine){E=E.prev}if(E){return E.indent+s}else{return 0}},electricChars:"/",blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml"}});CodeMirror.defineMIME("text/xml","xml");CodeMirror.defineMIME("application/xml","xml");if(!CodeMirror.mimeModes.hasOwnProperty("text/html")){CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:true})}CodeMirror.defineMode("javascript",function(U,af){var i=U.indentUnit;var v=af.statementIndent;var u=af.json;var e=af.typescript;var al=function(){function aH(aJ){return{type:aJ,style:"keyword"}}var aC=aH("keyword a"),aA=aH("keyword b"),az=aH("keyword c");var aB=aH("operator"),aF={type:"atom",style:"atom"};var aD={"if":aH("if"),"while":aC,"with":aC,"else":aA,"do":aA,"try":aA,"finally":aA,"return":az,"break":az,"continue":az,"new":az,"delete":az,"throw":az,"var":aH("var"),"const":aH("var"),let:aH("var"),"function":aH("function"),"catch":aH("catch"),"for":aH("for"),"switch":aH("switch"),"case":aH("case"),"default":aH("default"),"in":aB,"typeof":aB,"instanceof":aB,"true":aF,"false":aF,"null":aF,"undefined":aF,"NaN":aF,"Infinity":aF,"this":aH("this"),module:aH("module"),"class":aH("class"),"super":aH("atom"),yield:az,"export":aH("export"),"import":aH("import"),"extends":az};if(e){var aI={type:"variable",style:"variable-3"};var aE={"interface":aH("interface"),"extends":aH("extends"),constructor:aH("constructor"),"public":aH("public"),"private":aH("private"),"protected":aH("protected"),"static":aH("static"),string:aI,number:aI,bool:aI,any:aI};for(var aG in aE){aD[aG]=aE[aG]}}return aD}();var J=/[+\-*&%=<>!?|~^]/;function ab(aC,az){var aB=false,aA;while((aA=aC.next())!=null){if(aA==az&&!aB){return false}aB=!aB&&aA=="\\"}return aB}var M,A;function F(aB,aA,az){M=aB;A=az;return aA}function O(aD,aB){var az=aD.next();if(az=='"'||az=="'"){aB.tokenize=L(az);return aB.tokenize(aD,aB)}else{if(az=="."&&aD.match(/^\d+(?:[eE][+\-]?\d+)?/)){return F("number","number")}else{if(az=="."&&aD.match("..")){return F("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(az)){return F(az)}else{if(az=="="&&aD.eat(">")){return F("=>")}else{if(az=="0"&&aD.eat(/x/i)){aD.eatWhile(/[\da-f]/i);return F("number","number")}else{if(/\d/.test(az)){aD.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return F("number","number")}else{if(az=="/"){if(aD.eat("*")){aB.tokenize=aq;return aq(aD,aB)}else{if(aD.eat("/")){aD.skipToEnd();return F("comment","comment")}else{if(aB.lastType=="operator"||aB.lastType=="keyword c"||aB.lastType=="sof"||/^[\[{}\(,;:]$/.test(aB.lastType)){ab(aD,"/");aD.eatWhile(/[gimy]/);return F("regexp","string-2")}else{aD.eatWhile(J);return F("operator",null,aD.current())}}}}else{if(az=="`"){aB.tokenize=ar;return ar(aD,aB)}else{if(az=="#"){aD.skipToEnd();return F("error","error")}else{if(J.test(az)){aD.eatWhile(J);return F("operator",null,aD.current())}else{aD.eatWhile(/[\w\$_]/);var aC=aD.current(),aA=al.propertyIsEnumerable(aC)&&al[aC];return(aA&&aB.lastType!=".")?F(aA.type,aA.style,aC):F("variable","variable",aC)}}}}}}}}}}}}function L(az){return function(aB,aA){if(!ab(aB,az)){aA.tokenize=O}return F("string","string")}}function aq(aC,aB){var az=false,aA;while(aA=aC.next()){if(aA=="/"&&az){aB.tokenize=O;break}az=(aA=="*")}return F("comment","comment")}function ar(aC,aA){var aB=false,az;while((az=aC.next())!=null){if(!aB&&(az=="`"||az=="$"&&aC.eat("{"))){aA.tokenize=O;break}aB=!aB&&az=="\\"}return F("quasi","string-2",aC.current())}var j="([{}])";function ao(aF,aC){if(aC.fatArrowAt){aC.fatArrowAt=null}var aB=aF.string.indexOf("=>",aF.start);if(aB<0){return}var aE=0,aA=false;for(var aG=aB-1;aG>=0;--aG){var az=aF.string.charAt(aG);var aD=j.indexOf(az);if(aD>=0&&aD<3){if(!aE){++aG;break}if(--aE==0){break}}else{if(aD>=3&&aD<6){++aE}else{if(/[$\w]/.test(az)){aA=true}else{if(aA&&!aE){++aG;break}}}}}if(aA&&!aE){aC.fatArrowAt=aG}}var a={atom:true,number:true,variable:true,string:true,regexp:true,"this":true};function D(aE,aA,az,aD,aB,aC){this.indented=aE;this.column=aA;this.type=az;this.prev=aB;this.info=aC;if(aD!=null){this.align=aD}}function n(aC,aB){for(var aA=aC.localVars;aA;aA=aA.next){if(aA.name==aB){return true}}for(var az=aC.context;az;az=az.prev){for(var aA=az.vars;aA;aA=aA.next){if(aA.name==aB){return true}}}}function d(aD,aA,az,aC,aE){var aF=aD.cc;y.state=aD;y.stream=aE;y.marked=null,y.cc=aF;if(!aD.lexical.hasOwnProperty("align")){aD.lexical.align=true}while(true){var aB=aF.length?aF.pop():u?aj:ax;if(aB(az,aC)){while(aF.length&&aF[aF.length-1].lex){aF.pop()()}if(y.marked){return y.marked}if(az=="variable"&&n(aD,aC)){return"variable-2"}return aA}}}var y={state:null,column:null,marked:null,cc:null};function V(){for(var az=arguments.length-1;az>=0;az--){y.cc.push(arguments[az])}}function Z(){V.apply(null,arguments);return true}function an(aA){function az(aD){for(var aC=aD;aC;aC=aC.next){if(aC.name==aA){return true}}return false}var aB=y.state;if(aB.context){y.marked="def";if(az(aB.localVars)){return}aB.localVars={name:aA,next:aB.localVars}}else{if(az(aB.globalVars)){return}if(af.globalVars){aB.globalVars={name:aA,next:aB.globalVars}}}}var l={name:"this",next:{name:"arguments"}};function r(){y.state.context={prev:y.state.context,vars:y.state.localVars};y.state.localVars=l}function s(){y.state.localVars=y.state.context.vars;y.state.context=y.state.context.prev}function av(aA,aB){var az=function(){var aD=y.state,aC=aD.indented;if(aD.lexical.type=="stat"){aC=aD.lexical.indented}aD.lexical=new D(aC,y.stream.column(),aA,null,aD.lexical,aB)};az.lex=true;return az}function f(){var az=y.state;if(az.lexical.prev){if(az.lexical.type==")"){az.indented=az.lexical.indented}az.lexical=az.lexical.prev}}f.lex=true;function m(az){return function(aA){if(aA==az){return Z()}else{if(az==";"){return V()}else{return Z(arguments.callee)}}}}function ax(az,aA){if(az=="var"){return Z(av("vardef",aA.length),b,m(";"),f)}if(az=="keyword a"){return Z(av("form"),aj,ax,f)}if(az=="keyword b"){return Z(av("form"),ax,f)}if(az=="{"){return Z(av("}"),t,f)}if(az==";"){return Z()}if(az=="if"){return Z(av("form"),aj,ax,f,c)}if(az=="function"){return Z(G)}if(az=="for"){return Z(av("form"),p,f,ax,f)}if(az=="variable"){return Z(av("stat"),ay)}if(az=="switch"){return Z(av("form"),aj,av("}","switch"),m("{"),t,f,f)}if(az=="case"){return Z(aj,m(":"))}if(az=="default"){return Z(m(":"))}if(az=="catch"){return Z(av("form"),r,m("("),aa,m(")"),ax,f,s)}if(az=="module"){return Z(av("form"),r,B,s,f)}if(az=="class"){return Z(av("form"),Q,P,f)}if(az=="export"){return Z(av("form"),aw,f)}if(az=="import"){return Z(av("form"),ac,f)}return V(av("stat"),aj,m(";"),f)}function aj(az){return T(az,false)}function au(az){return T(az,true)}function T(aA,aC){if(y.state.fatArrowAt==y.stream.start){var az=aC?H:R;if(aA=="("){return Z(r,am(g,")"),m("=>"),az,s)}else{if(aA=="variable"){return V(r,g,m("=>"),az,s)}}}var aB=aC?h:W;if(a.hasOwnProperty(aA)){return Z(aB)}if(aA=="function"){return Z(G)}if(aA=="keyword c"){return Z(aC?ag:ae)}if(aA=="("){return Z(av(")"),ae,ap,m(")"),f,aB)}if(aA=="operator"||aA=="spread"){return Z(aC?au:aj)}if(aA=="["){return Z(av("]"),au,ai,f,aB)}if(aA=="{"){return Z(am(o,"}"),aB)}return Z()}function ae(az){if(az.match(/[;\}\)\],]/)){return V()}return V(aj)}function ag(az){if(az.match(/[;\}\)\],]/)){return V()}return V(au)}function W(az,aA){if(az==","){return Z(aj)}return h(az,aA,false)}function h(az,aB,aD){var aA=aD==false?W:h;var aC=aD==false?aj:au;if(aB=="=>"){return Z(r,aD?H:R,s)}if(az=="operator"){if(/\+\+|--/.test(aB)){return Z(aA)}if(aB=="?"){return Z(aj,m(":"),aC)}return Z(aC)}if(az=="quasi"){y.cc.push(aA);return K(aB)}if(az==";"){return}if(az=="("){return Z(am(au,")","call"),aA)}if(az=="."){return Z(ah,aA)}if(az=="["){return Z(av("]"),ae,m("]"),f,aA)}}function K(az){if(!az){}if(az.slice(az.length-2)!="${"){return Z()}return Z(aj,k)}function k(az){if(az=="}"){y.marked="string-2";y.state.tokenize=ar;return Z()}}function R(az){ao(y.stream,y.state);if(az=="{"){return V(ax)}return V(aj)}function H(az){ao(y.stream,y.state);if(az=="{"){return V(ax)}return V(au)}function ay(az){if(az==":"){return Z(f,ax)}return V(W,m(";"),f)}function ah(az){if(az=="variable"){y.marked="property";return Z()}}function o(az,aA){if(az=="variable"){y.marked="property";if(aA=="get"||aA=="set"){return Z(C)}}else{if(az=="number"||az=="string"){y.marked=az+" property"}else{if(az=="["){return Z(aj,m("]"),E)}}}if(a.hasOwnProperty(az)){return Z(E)}}function C(az){if(az!="variable"){return V(E)}y.marked="property";return Z(G)}function E(az){if(az==":"){return Z(au)}if(az=="("){return V(G)}}function am(aC,az,aB){function aA(aE){if(aE==","){var aD=y.state.lexical;if(aD.info=="call"){aD.pos=(aD.pos||0)+1}return Z(aC,aA)}if(aE==az){return Z()}return Z(m(az))}return function(aD){if(aD==az){return Z()}if(aB===false){return V(aC,aA)}return V(av(az,aB),aC,aA,f)}}function t(az){if(az=="}"){return Z()}return V(ax,t)}function N(az){if(e&&az==":"){return Z(Y)}}function Y(az){if(az=="variable"){y.marked="variable-3";return Z()}}function b(){return V(g,N,X,S)}function g(az,aA){if(az=="variable"){an(aA);return Z()}if(az=="["){return Z(am(g,"]"))}if(az=="{"){return Z(am(at,"}"))}}function at(az,aA){if(az=="variable"&&!y.stream.match(/^\s*:/,false)){an(aA);return Z(X)}if(az=="variable"){y.marked="property"}return Z(m(":"),g,X)}function X(az,aA){if(aA=="="){return Z(au)}}function S(az){if(az==","){return Z(b)}}function c(az,aA){if(az=="keyword b"&&aA=="else"){return Z(av("form"),ax,f)}}function p(az){if(az=="("){return Z(av(")"),z,m(")"))}}function z(az){if(az=="var"){return Z(b,m(";"),x)}if(az==";"){return Z(x)}if(az=="variable"){return Z(q)}return V(aj,m(";"),x)}function q(az,aA){if(aA=="in"||aA=="of"){y.marked="keyword";return Z(aj)}return Z(W,x)}function x(az,aA){if(az==";"){return Z(w)}if(aA=="in"||aA=="of"){y.marked="keyword";return Z(aj)}return V(aj,m(";"),w)}function w(az){if(az!=")"){Z(aj)}}function G(az,aA){if(aA=="*"){y.marked="keyword";return Z(G)}if(az=="variable"){an(aA);return Z(G)}if(az=="("){return Z(r,am(aa,")"),ax,s)}}function aa(az){if(az=="spread"){return Z(aa)}return V(g,N)}function Q(az,aA){if(az=="variable"){an(aA);return Z(I)}}function I(az,aA){if(aA=="extends"){return Z(aj)}}function P(az){if(az=="{"){return Z(am(o,"}"))}}function B(az,aA){if(az=="string"){return Z(ax)}if(az=="variable"){an(aA);return Z(ad)}}function aw(az,aA){if(aA=="*"){y.marked="keyword";return Z(ad,m(";"))}if(aA=="default"){y.marked="keyword";return Z(aj,m(";"))}return V(ax)}function ac(az){if(az=="string"){return Z()}return V(ak,ad)}function ak(az,aA){if(az=="{"){return Z(am(ak,"}"))}if(az=="variable"){an(aA)}return Z()}function ad(az,aA){if(aA=="from"){y.marked="keyword";return Z(aj)}}function ai(az){if(az=="for"){return V(ap)}if(az==","){return Z(am(au,"]",false))}return V(am(au,"]",false))}function ap(az){if(az=="for"){return Z(p,ap)}if(az=="if"){return Z(aj,ap)}}return{startState:function(aA){var az={tokenize:O,lastType:"sof",cc:[],lexical:new D((aA||0)-i,0,"block",false),localVars:af.localVars,context:af.localVars&&{vars:af.localVars},indented:0};if(af.globalVars){az.globalVars=af.globalVars}return az},token:function(aB,aA){if(aB.sol()){if(!aA.lexical.hasOwnProperty("align")){aA.lexical.align=false}aA.indented=aB.indentation();ao(aB,aA)}if(aA.tokenize!=aq&&aB.eatSpace()){return null}var az=aA.tokenize(aB,aA);if(M=="comment"){return az}aA.lastType=M=="operator"&&(A=="++"||A=="--")?"incdec":M;return d(aA,az,M,A,aB)},indent:function(aF,az){if(aF.tokenize==aq){return CodeMirror.Pass}if(aF.tokenize!=O){return 0}var aE=az&&az.charAt(0),aC=aF.lexical;for(var aB=aF.cc.length-1;aB>=0;--aB){var aG=aF.cc[aB];if(aG==f){aC=aC.prev}else{if(aG!=c){break}}}if(aC.type=="stat"&&aE=="}"){aC=aC.prev}if(v&&aC.type==")"&&aC.prev.type=="stat"){aC=aC.prev}var aD=aC.type,aA=aE==aD;if(aD=="vardef"){return aC.indented+(aF.lastType=="operator"||aF.lastType==","?aC.info+1:0)}else{if(aD=="form"&&aE=="{"){return aC.indented}else{if(aD=="form"){return aC.indented+i}else{if(aD=="stat"){return aC.indented+(aF.lastType=="operator"||aF.lastType==","?v||i:0)}else{if(aC.info=="switch"&&!aA&&af.doubleIndentSwitch!=false){return aC.indented+(/^(?:case|default)\b/.test(az)?i:2*i)}else{if(aC.align){return aC.column+(aA?0:1)}else{return aC.indented+(aA?0:i)}}}}}}},electricChars:":{}",blockCommentStart:u?null:"/*",blockCommentEnd:u?null:"*/",lineComment:u?null:"//",fold:"brace",helperType:u?"json":"javascript",jsonMode:u}});CodeMirror.defineMIME("text/javascript","javascript");CodeMirror.defineMIME("text/ecmascript","javascript");CodeMirror.defineMIME("application/javascript","javascript");CodeMirror.defineMIME("application/ecmascript","javascript");CodeMirror.defineMIME("application/json",{name:"javascript",json:true});CodeMirror.defineMIME("application/x-json",{name:"javascript",json:true});CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:true});CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:true});CodeMirror.defineMode("css",function(b,d){if(!d.propertyKeywords){d=CodeMirror.resolveMode("text/css")}var e=b.indentUnit||b.tabSize||2,o=d.hooks||{},n=d.atMediaTypes||{},k=d.atMediaFeatures||{},j=d.propertyKeywords||{},l=d.colorKeywords||{},h=d.valueKeywords||{},a=!!d.allowNested,i=null;function g(p,q){i=q;return p}function c(s,r){var q=s.next();if(o[q]){var p=o[q](s,r);if(p!==false){return p}}if(q=="@"){s.eatWhile(/[\w\\\-]/);return g("def",s.current())}else{if(q=="="){g(null,"compare")}else{if((q=="~"||q=="|")&&s.eat("=")){return g(null,"compare")}else{if(q=='"'||q=="'"){r.tokenize=m(q);return r.tokenize(s,r)}else{if(q=="#"){s.eatWhile(/[\w\\\-]/);return g("atom","hash")}else{if(q=="!"){s.match(/^\s*\w*/);return g("keyword","important")}else{if(/\d/.test(q)||q=="."&&s.eat(/\d/)){s.eatWhile(/[\w.%]/);return g("number","unit")}else{if(q==="-"){if(/\d/.test(s.peek())){s.eatWhile(/[\w.%]/);return g("number","unit")}else{if(s.match(/^[^-]+-/)){return g("meta","meta")}}}else{if(/[,+>*\/]/.test(q)){return g(null,"select-op")}else{if(q=="."&&s.match(/^-?[_a-z][_a-z0-9-]*/i)){return g("qualifier","qualifier")}else{if(q==":"){return g("operator",q)}else{if(/[;{}\[\]\(\)]/.test(q)){return g(null,q)}else{if(q=="u"&&s.match("rl(")){s.backUp(1);r.tokenize=f;return g("property","variable")}else{s.eatWhile(/[\w\\\-]/);return g("property","variable")}}}}}}}}}}}}}}function m(p,q){return function(u,s){var t=false,r;while((r=u.next())!=null){if(r==p&&!t){break}t=!t&&r=="\\"}if(!t){if(q){u.backUp(1)}s.tokenize=c}return g("string","string")}}function f(q,p){q.next();if(!q.match(/\s*[\"\']/,false)){p.tokenize=m(")",true)}else{p.tokenize=c}return g(null,"(")}return{startState:function(p){return{tokenize:c,baseIndent:p||0,stack:[],lastToken:null}},token:function(u,r){r.tokenize=r.tokenize||c;if(r.tokenize==c&&u.eatSpace()){return null}var q=r.tokenize(u,r);if(q&&typeof q!="string"){q=g(q[0],q[1])}var p=r.stack[r.stack.length-1];if(q=="variable"){if(i=="variable-definition"){r.stack.push("propertyValue")}return r.lastToken="variable-2"}else{if(q=="property"){var t=u.current().toLowerCase();if(p=="propertyValue"){if(h.hasOwnProperty(t)){q="string-2"}else{if(l.hasOwnProperty(t)){q="keyword"}else{q="variable-2"}}}else{if(p=="rule"){if(!j.hasOwnProperty(t)){q+=" error"}}else{if(p=="block"){if(j.hasOwnProperty(t)){q="property"}else{if(l.hasOwnProperty(t)){q="keyword"}else{if(h.hasOwnProperty(t)){q="string-2"}else{q="tag"}}}}else{if(!p||p=="@media{"){q="tag"}else{if(p=="@media"){if(n[u.current()]){q="attribute"}else{if(/^(only|not)$/.test(t)){q="keyword"}else{if(t=="and"){q="error"}else{if(k.hasOwnProperty(t)){q="error"}else{q="attribute error"}}}}}else{if(p=="@mediaType"){if(n.hasOwnProperty(t)){q="attribute"}else{if(t=="and"){q="operator"}else{if(/^(only|not)$/.test(t)){q="error"}else{q="error"}}}}else{if(p=="@mediaType("){if(j.hasOwnProperty(t)){}else{if(n.hasOwnProperty(t)){q="error"}else{if(t=="and"){q="operator"}else{if(/^(only|not)$/.test(t)){q="error"}else{q+=" error"}}}}}else{if(p=="@import"){q="tag"}else{q="error"}}}}}}}}}else{if(q=="atom"){if(!p||p=="@media{"||p=="block"){q="builtin"}else{if(p=="propertyValue"){if(!/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(u.current())){q+=" error"}}else{q="error"}}}else{if(p=="@media"&&i=="{"){q="error"}}}}if(i=="{"){if(p=="@media"||p=="@mediaType"){r.stack[r.stack.length-1]="@media{"}else{var v=a?"block":"rule";r.stack.push(v)}}else{if(i=="}"){if(p=="interpolation"){q="operator"}while(r.stack.length){var s=r.stack.pop();if(s.indexOf("{")>-1||s=="block"||s=="rule"){break}}}else{if(i=="interpolation"){r.stack.push("interpolation")}else{if(i=="@media"){r.stack.push("@media")}else{if(i=="@import"){r.stack.push("@import")}else{if(p=="@media"&&/\b(keyword|attribute)\b/.test(q)){r.stack[r.stack.length-1]="@mediaType"}else{if(p=="@mediaType"&&u.current()==","){r.stack[r.stack.length-1]="@media"}else{if(i=="("){if(p=="@media"||p=="@mediaType"){r.stack[r.stack.length-1]="@mediaType";r.stack.push("@mediaType(")}else{r.stack.push("(")}}else{if(i==")"){while(r.stack.length){var s=r.stack.pop();if(s.indexOf("(")>-1){break}}}else{if(i==":"&&r.lastToken=="property"){r.stack.push("propertyValue")}else{if(p=="propertyValue"&&i==";"){r.stack.pop()}else{if(p=="@import"&&i==";"){r.stack.pop()}}}}}}}}}}}}return r.lastToken=q},indent:function(q,p){var r=q.stack.length;if(/^\}/.test(p)){r-=q.stack[r-1]=="propertyValue"?2:1}return q.baseIndent+r*e},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});(function(){function b(k){var j={};for(var h=0;h<k.length;++h){j[k[h]]=true}return j}var e=b(["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"]);var g=b(["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid"]);var d=b(["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid-cell","grid-column","grid-column-align","grid-column-sizing","grid-column-span","grid-columns","grid-flow","grid-row","grid-row-align","grid-row-sizing","grid-row-span","grid-rows","grid-template","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-inside","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index","zoom","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-profile","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","kerning","text-anchor","writing-mode"]);var c=b(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"]);var f=b(["above","absolute","activeborder","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","contain","content","content-box","context-menu","continuous","copy","cover","crop","cross","crosshair","currentcolor","cursive","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ew-resize","expanded","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-table","inset","inside","intrinsic","invert","italic","justify","kannada","katakana","katakana-iroha","keep-all","khmer","landscape","lao","large","larger","left","level","lighter","line-through","linear","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","single","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","x-large","x-small","xor","xx-large","xx-small"]);function a(k,j){var h=false,i;while((i=k.next())!=null){if(h&&i=="/"){j.tokenize=null;break}h=(i=="*")}return["comment","comment"]}CodeMirror.defineMIME("text/css",{atMediaTypes:e,atMediaFeatures:g,propertyKeywords:d,colorKeywords:c,valueKeywords:f,hooks:{"<":function(j,i){function h(n,m){var l=0,k;while((k=n.next())!=null){if(l>=2&&k==">"){m.tokenize=null;break}l=(k=="-")?l+1:0}return["comment","comment"]}if(j.eat("!")){i.tokenize=h;return h(j,i)}},"/":function(i,h){if(i.eat("*")){h.tokenize=a;return a(i,h)}return false}},name:"css"});CodeMirror.defineMIME("text/x-scss",{atMediaTypes:e,atMediaFeatures:g,propertyKeywords:d,colorKeywords:c,valueKeywords:f,allowNested:true,hooks:{":":function(h){if(h.match(/\s*{/)){return[null,"{"]}return false},"$":function(h){h.match(/^[\w-]+/);if(h.peek()==":"){return["variable","variable-definition"]}return["variable","variable"]},",":function(i,h){if(h.stack[h.stack.length-1]=="propertyValue"&&i.match(/^ *\$/,false)){return["operator",";"]}},"/":function(i,h){if(i.eat("/")){i.skipToEnd();return["comment","comment"]}else{if(i.eat("*")){h.tokenize=a;return a(i,h)}else{return["operator","operator"]}}},"#":function(h){if(h.eat("{")){return["operator","interpolation"]}else{h.eatWhile(/[\w\\\-]/);return["atom","hash"]}}},name:"css"})})();CodeMirror.defineMode("clike",function(q,d){var k=q.indentUnit,i=d.statementIndentUnit||k,l=d.dontAlignCalls,f=d.keywords||{},r=d.builtin||{},m=d.blockKeywords||{},b=d.atoms||{},a=d.hooks||{},h=d.multiLineStrings;var g=/[+\-*&%=<>!?|\/]/;var o;function s(x,v){var u=x.next();if(a[u]){var t=a[u](x,v);if(t!==false){return t}}if(u=='"'||u=="'"){v.tokenize=e(u);return v.tokenize(x,v)}if(/[\[\]{}\(\),;\:\.]/.test(u)){o=u;return null}if(/\d/.test(u)){x.eatWhile(/[\w\.]/);return"number"}if(u=="/"){if(x.eat("*")){v.tokenize=j;return j(x,v)}if(x.eat("/")){x.skipToEnd();return"comment"}}if(g.test(u)){x.eatWhile(g);return"operator"}x.eatWhile(/[\w\$_]/);var w=x.current();if(f.propertyIsEnumerable(w)){if(m.propertyIsEnumerable(w)){o="newstatement"}return"keyword"}if(r.propertyIsEnumerable(w)){if(m.propertyIsEnumerable(w)){o="newstatement"}return"builtin"}if(b.propertyIsEnumerable(w)){return"atom"}return"variable"}function e(t){return function(y,w){var x=false,v,u=false;while((v=y.next())!=null){if(v==t&&!x){u=true;break}x=!x&&v=="\\"}if(u||!(x||h)){w.tokenize=null}return"string"}}function j(w,v){var t=false,u;while(u=w.next()){if(u=="/"&&t){v.tokenize=null;break}t=(u=="*")}return"comment"}function n(x,u,t,w,v){this.indented=x;this.column=u;this.type=t;this.align=w;this.prev=v}function c(w,u,v){var t=w.indented;if(w.context&&w.context.type=="statement"){t=w.context.indented}return w.context=new n(t,u,v,null,w.context)}function p(v){var u=v.context.type;if(u==")"||u=="]"||u=="}"){v.indented=v.context.indented}return v.context=v.context.prev}return{startState:function(t){return{tokenize:null,context:new n((t||0)-k,0,"top",false),indented:0,startOfLine:true}},token:function(w,v){var t=v.context;if(w.sol()){if(t.align==null){t.align=false}v.indented=w.indentation();v.startOfLine=true}if(w.eatSpace()){return null}o=null;var u=(v.tokenize||s)(w,v);if(u=="comment"||u=="meta"){return u}if(t.align==null){t.align=true}if((o==";"||o==":"||o==",")&&t.type=="statement"){p(v)}else{if(o=="{"){c(v,w.column(),"}")}else{if(o=="["){c(v,w.column(),"]")}else{if(o=="("){c(v,w.column(),")")}else{if(o=="}"){while(t.type=="statement"){t=p(v)}if(t.type=="}"){t=p(v)}while(t.type=="statement"){t=p(v)}}else{if(o==t.type){p(v)}else{if(((t.type=="}"||t.type=="top")&&o!=";")||(t.type=="statement"&&o=="newstatement")){c(v,w.column(),"statement")}}}}}}}v.startOfLine=false;return u},indent:function(x,u){if(x.tokenize!=s&&x.tokenize!=null){return CodeMirror.Pass}var t=x.context,w=u&&u.charAt(0);if(t.type=="statement"&&w=="}"){t=t.prev}var v=w==t.type;if(t.type=="statement"){return t.indented+(w=="{"?0:i)}else{if(t.align&&(!l||t.type!=")")){return t.column+(v?0:1)}else{if(t.type==")"&&!v){return t.indented+i}else{return t.indented+(v?0:k)}}}},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}});(function(){function d(j){var g={},h=j.split(" ");for(var f=0;f<h.length;++f){g[h[f]]=true}return g}var b="auto if break int case long char register continue return default short do sizeof double static else struct entry switch extern typedef float union for unsigned goto while enum void const signed volatile";function e(g,f){if(!f.startOfLine){return false}for(;;){if(g.skipTo("\\")){g.next();if(g.eol()){f.tokenize=e;break}}else{g.skipToEnd();f.tokenize=null;break}}return"meta"}function c(h,g){var f;while((f=h.next())!=null){if(f=='"'&&!h.eat('"')){g.tokenize=null;break}}return"string"}function a(f,h){for(var g=0;g<f.length;++g){CodeMirror.defineMIME(f[g],h)}}a(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:d(b),blockKeywords:d("case do else for if switch while struct"),atoms:d("null"),hooks:{"#":e}});a(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:d(b+" asm dynamic_cast namespace reinterpret_cast try bool explicit new static_cast typeid catch operator template typename class friend private this using const_cast inline public throw virtual delete mutable protected wchar_t"),blockKeywords:d("catch class do else finally for if struct switch try while"),atoms:d("true false null"),hooks:{"#":e}});CodeMirror.defineMIME("text/x-java",{name:"clike",keywords:d("abstract assert boolean break byte case catch char class const continue default do double else enum extends final finally float for goto if implements import instanceof int interface long native new package private protected public return short static strictfp super switch synchronized this throw throws transient try void volatile while"),blockKeywords:d("catch class do else finally for if switch try while"),atoms:d("true false null"),hooks:{"@":function(f){f.eatWhile(/[\w\$_]/);return"meta"}}});CodeMirror.defineMIME("text/x-csharp",{name:"clike",keywords:d("abstract as base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),blockKeywords:d("catch class do else finally for foreach if struct switch try while"),builtin:d("Boolean Byte Char DateTime DateTimeOffset Decimal Double Guid Int16 Int32 Int64 Object SByte Single String TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),atoms:d("true false null"),hooks:{"@":function(g,f){if(g.eat('"')){f.tokenize=c;return c(g,f)}g.eatWhile(/[\w\$_]/);return"meta"}}});CodeMirror.defineMIME("text/x-scala",{name:"clike",keywords:d("abstract case catch class def do else extends false final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try trye type val var while with yield _ : = => <- <: <% >: # @ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),blockKeywords:d("catch class do else finally for forSome if match switch try while"),atoms:d("true false null"),hooks:{"@":function(f){f.eatWhile(/[\w\$_]/);return"meta"}}});a(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:d("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4 sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadowconst attribute uniform varying break continue discard return for while do if else struct in out inout"),blockKeywords:d("for while do if else struct"),builtin:d("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smootstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:d("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragColor gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),hooks:{"#":e}})}());(function(){function c(g){var e={},f=g.split(" ");for(var d=0;d<f.length;++d){e[f[d]]=true}return e}function a(d){return function(f,e){if(f.match(d)){e.tokenize=null}else{f.skipToEnd()}return"string"}}var b={name:"clike",keywords:c("abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally"),blockKeywords:c("catch do else elseif for foreach if switch try while finally"),atoms:c("true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__"),builtin:c("func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once"),multiLineStrings:true,hooks:{"$":function(d){d.eatWhile(/[\w\$_]/);return"variable-2"},"<":function(e,d){if(e.match(/<</)){e.eatWhile(/[\w\.]/);d.tokenize=a(e.current().slice(3));return d.tokenize(e,d)}return false},"#":function(d){while(!d.eol()&&!d.match("?>",false)){d.next()}return"comment"},"/":function(d){if(d.eat("/")){while(!d.eol()&&!d.match("?>",false)){d.next()}return"comment"}return false}}};CodeMirror.defineMode("php",function(f,g){var h=CodeMirror.getMode(f,"text/html");var d=CodeMirror.getMode(f,b);function e(n,l){var k=l.curMode==d;if(n.sol()&&l.pending!='"'){l.pending=null}if(!k){if(n.match(/^<\?\w*/)){l.curMode=d;l.curState=l.php;return"meta"}if(l.pending=='"'){while(!n.eol()&&n.next()!='"'){}var j="string"}else{if(l.pending&&n.pos<l.pending.end){n.pos=l.pending.end;var j=l.pending.style}else{var j=h.token(n,l.curState)}}l.pending=null;var m=n.current(),i=m.search(/<\?/);if(i!=-1){if(j=="string"&&/\"$/.test(m)&&!/\?>/.test(m)){l.pending='"'}else{l.pending={end:n.pos,style:j}}n.backUp(m.length-i)}return j}else{if(k&&l.php.tokenize==null&&n.match("?>")){l.curMode=h;l.curState=l.html;return"meta"}else{return d.token(n,l.curState)}}}return{startState:function(){var i=CodeMirror.startState(h),j=CodeMirror.startState(d);return{html:i,php:j,curMode:g.startOpen?d:h,curState:g.startOpen?j:i,pending:null}},copyState:function(l){var j=l.html,k=CodeMirror.copyState(h,j),n=l.php,i=CodeMirror.copyState(d,n),m;if(l.curMode==h){m=k}else{m=i}return{html:k,php:i,curMode:l.curMode,curState:m,pending:l.pending}},token:e,indent:function(j,i){if((j.curMode!=d&&/^\s*<\//.test(i))||(j.curMode==d&&/^\?>/.test(i))){return h.indent(j.html,i)}return j.curMode.indent(j.curState,i)},electricChars:"/{}:",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(i){return{state:i.curState,mode:i.curMode}}}},"htmlmixed","clike");CodeMirror.defineMIME("application/x-httpd-php","php");CodeMirror.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:true});CodeMirror.defineMIME("text/x-php",b)})();
|
File without changes
|
@@ -4,7 +4,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
|
4
4
|
*/
|
5
5
|
CKEDITOR.plugins.setLang( 'codemirror', 'ru', {
|
6
6
|
toolbar: 'Источник',
|
7
|
+
searchCode: 'Search Source',
|
7
8
|
autoFormat: 'Format Selection',
|
8
9
|
commentSelectedRange: 'Comment Selection',
|
9
|
-
uncommentSelectedRange: 'Uncomment Selection'
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
10
12
|
});
|
@@ -10,36 +10,40 @@
|
|
10
10
|
CKEDITOR.plugins.add('codemirror', {
|
11
11
|
icons: 'SearchCode,AutoFormat,CommentSelectedRange,UncommentSelectedRange,AutoComplete',
|
12
12
|
lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en-au,en-ca,en-gb,en,eo,es,et,eu,fa,fi,fo,fr-ca,fr,gl,gu,he,hi,hr,hu,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt-br,pt,ro,ru,sk,sl,sr-latn,sr,sv,th,tr,ug,uk,vi,zh-cn,zh',
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
13
|
+
version: 1.10,
|
14
|
+
init: function (editor) {
|
15
|
+
var rootPath = this.path,
|
16
|
+
defaultConfig = {
|
17
|
+
autoCloseBrackets: true,
|
18
|
+
autoCloseTags: true,
|
19
|
+
autoFormatOnStart: false,
|
20
|
+
autoFormatOnUncomment: true,
|
21
|
+
continueComments: true,
|
22
|
+
enableCodeFolding: true,
|
23
|
+
enableCodeFormatting: true,
|
24
|
+
enableSearchTools: true,
|
25
|
+
highlightActiveLine: true,
|
26
|
+
highlightMatches: true,
|
27
|
+
indentWithTabs: false,
|
28
|
+
lineNumbers: true,
|
29
|
+
lineWrapping: true,
|
30
|
+
mode: 'htmlmixed',
|
31
|
+
matchBrackets: true,
|
32
|
+
matchTags: true,
|
33
|
+
showAutoCompleteButton: true,
|
34
|
+
showCommentButton: true,
|
35
|
+
showFormatButton: true,
|
36
|
+
showSearchButton: true,
|
37
|
+
showTrailingSpace: true,
|
38
|
+
showUncommentButton: true,
|
39
|
+
theme: 'default',
|
40
|
+
useBeautify: false
|
41
|
+
};
|
39
42
|
|
40
43
|
// Get Config & Lang
|
41
|
-
var config = CKEDITOR.tools.extend(defaultConfig, editor.config.codemirror || {}, true)
|
42
|
-
|
44
|
+
var config = CKEDITOR.tools.extend(defaultConfig, editor.config.codemirror || {}, true),
|
45
|
+
lang = editor.lang.codemirror;
|
46
|
+
|
43
47
|
// check for old config settings for legacy support
|
44
48
|
if (editor.config.codemirror_theme) {
|
45
49
|
config.theme = editor.config.codemirror_theme;
|
@@ -53,23 +57,18 @@
|
|
53
57
|
|
54
58
|
// Override Source Dialog
|
55
59
|
CKEDITOR.dialog.add('sourcedialog', function (editor) {
|
56
|
-
var size = CKEDITOR.document.getWindow().getViewPaneSize()
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
// Make it use 2/3 of the viewport height.
|
62
|
-
var height = size.height / 1.5;
|
63
|
-
|
64
|
-
// Store old editor data to avoid unnecessary setData.
|
65
|
-
var oldData;
|
60
|
+
var size = CKEDITOR.document.getWindow().getViewPaneSize(),
|
61
|
+
width = Math.min(size.width - 70, 800),
|
62
|
+
height = size.height / 1.5,
|
63
|
+
oldData;
|
66
64
|
|
67
65
|
function loadCodeMirrorInline(editor, textarea) {
|
68
66
|
var delay;
|
69
67
|
|
70
68
|
window["codemirror_" + editor.id] = CodeMirror.fromTextArea(textarea, {
|
71
|
-
mode:
|
69
|
+
mode: config.mode,
|
72
70
|
matchBrackets: config.matchBrackets,
|
71
|
+
matchTags: config.matchTags,
|
73
72
|
workDelay: 300,
|
74
73
|
workTime: 35,
|
75
74
|
readOnly: editor.config.readOnly,
|
@@ -79,7 +78,10 @@
|
|
79
78
|
autoCloseBrackets: config.autoCloseBrackets,
|
80
79
|
highligctionMatches: config.highlightMatches,
|
81
80
|
continueComments: config.continueComments,
|
81
|
+
indentWithTabs: config.indentWithTabs,
|
82
82
|
theme: config.theme,
|
83
|
+
showTrailingSpace: config.showTrailingSpace,
|
84
|
+
showCursorWhenSelecting: true,
|
83
85
|
viewportMargin: Infinity,
|
84
86
|
//extraKeys: {"Ctrl-Space": "autocomplete"},
|
85
87
|
extraKeys: { "Ctrl-Q": function (codeMirror_Editor) { window["foldFunc_" + editor.id](codeMirror_Editor, codeMirror_Editor.getCursor().line); } },
|
@@ -96,6 +98,9 @@
|
|
96
98
|
} else if (evt.type === "keydown" && evt.ctrlKey && evt.keyCode === 75 && !evt.shiftKey && evt.altKey) {
|
97
99
|
window["codemirror_" + editor.id].autoFormatRange(range.from, range.to);
|
98
100
|
}
|
101
|
+
/*else if (evt.type === "keydown") {
|
102
|
+
CodeMirror.commands.newlineAndIndentContinueMarkdownList(window["codemirror_" + editor.id]);
|
103
|
+
}*/
|
99
104
|
}
|
100
105
|
}
|
101
106
|
});
|
@@ -108,9 +113,9 @@
|
|
108
113
|
|
109
114
|
if (config.autoFormatOnStart) {
|
110
115
|
if (config.useBeautify) {
|
111
|
-
var indent_size = 4
|
112
|
-
|
113
|
-
|
116
|
+
var indent_size = 4,
|
117
|
+
indent_char = ' ',
|
118
|
+
brace_style = 'collapse'; //collapse, expand, end-expand
|
114
119
|
|
115
120
|
var source = window["codemirror_" + editor.id].getValue();
|
116
121
|
|
@@ -136,7 +141,11 @@
|
|
136
141
|
window["codemirror_" + editor.id].on("change", function () {
|
137
142
|
clearTimeout(delay);
|
138
143
|
delay = setTimeout(function () {
|
139
|
-
window["codemirror_" + editor.id]
|
144
|
+
var cm = window["codemirror_" + editor.id];
|
145
|
+
|
146
|
+
if (cm) {
|
147
|
+
cm.save();
|
148
|
+
}
|
140
149
|
}, 300);
|
141
150
|
});
|
142
151
|
|
@@ -201,12 +210,13 @@
|
|
201
210
|
|
202
211
|
|
203
212
|
},
|
204
|
-
onCancel: function() {
|
205
|
-
|
213
|
+
onCancel: function (event) {
|
214
|
+
if (event.data.hide) {
|
215
|
+
window["codemirror_" + editor.id].toTextArea();
|
206
216
|
|
207
|
-
|
208
|
-
|
209
|
-
|
217
|
+
// Free Memory
|
218
|
+
window["codemirror_" + editor.id] = null;
|
219
|
+
}
|
210
220
|
},
|
211
221
|
onOk: (function () {
|
212
222
|
|
@@ -226,8 +236,7 @@
|
|
226
236
|
return function () {
|
227
237
|
window["codemirror_" + editor.id].toTextArea();
|
228
238
|
|
229
|
-
// Free Memory
|
230
|
-
window["editable_" + editor.id] = null;
|
239
|
+
// Free Memory
|
231
240
|
window["codemirror_" + editor.id] = null;
|
232
241
|
|
233
242
|
// Remove CR from input data for reliable comparison with editor data.
|
@@ -239,10 +248,7 @@
|
|
239
248
|
return true;
|
240
249
|
|
241
250
|
// Set data asynchronously to avoid errors in IE.
|
242
|
-
CKEDITOR.env.ie ?
|
243
|
-
CKEDITOR.tools.setTimeout(setData, 0, this, newData)
|
244
|
-
:
|
245
|
-
setData.call(this, newData);
|
251
|
+
CKEDITOR.env.ie ? CKEDITOR.tools.setTimeout(setData, 0, this, newData) : setData.call(this, newData);
|
246
252
|
|
247
253
|
// Don't let the dialog close before setData is over.
|
248
254
|
return false;
|
@@ -327,7 +333,7 @@
|
|
327
333
|
'height:' + height + 'px;' +
|
328
334
|
'tab-size:4;' +
|
329
335
|
'text-align:left;',
|
330
|
-
'class': 'cke_source cke_enable_context_menu'
|
336
|
+
'class': 'cke_source cke_enable_context_menu'
|
331
337
|
}
|
332
338
|
]
|
333
339
|
}]
|
@@ -336,8 +342,118 @@
|
|
336
342
|
|
337
343
|
return;
|
338
344
|
}
|
339
|
-
|
345
|
+
|
340
346
|
var sourcearea = CKEDITOR.plugins.sourcearea;
|
347
|
+
|
348
|
+
// check if sourcearea plugin is overrriden
|
349
|
+
if (!sourcearea.commands.searchCode) {
|
350
|
+
|
351
|
+
CKEDITOR.plugins.sourcearea.commands = {
|
352
|
+
source: {
|
353
|
+
modes: {
|
354
|
+
wysiwyg: 1,
|
355
|
+
source: 1
|
356
|
+
},
|
357
|
+
editorFocus: false,
|
358
|
+
readOnly: 1,
|
359
|
+
exec: function(editorInstance) {
|
360
|
+
if (editorInstance.mode === 'wysiwyg') {
|
361
|
+
editorInstance.fire('saveSnapshot');
|
362
|
+
}
|
363
|
+
editorInstance.getCommand('source').setState(CKEDITOR.TRISTATE_DISABLED);
|
364
|
+
editorInstance.setMode(editorInstance.mode === 'source' ? 'wysiwyg' : 'source');
|
365
|
+
},
|
366
|
+
canUndo: false
|
367
|
+
},
|
368
|
+
searchCode: {
|
369
|
+
modes: {
|
370
|
+
wysiwyg: 0,
|
371
|
+
source: 1
|
372
|
+
},
|
373
|
+
editorFocus: false,
|
374
|
+
readOnly: 1,
|
375
|
+
exec: function (editorInstance) {
|
376
|
+
CodeMirror.commands.find(window["codemirror_" + editorInstance.id]);
|
377
|
+
},
|
378
|
+
canUndo: true
|
379
|
+
},
|
380
|
+
autoFormat: {
|
381
|
+
modes: {
|
382
|
+
wysiwyg: 0,
|
383
|
+
source: 1
|
384
|
+
},
|
385
|
+
editorFocus: false,
|
386
|
+
readOnly: 1,
|
387
|
+
exec: function (editorInstance) {
|
388
|
+
var range = {
|
389
|
+
from: window["codemirror_" + editorInstance.id].getCursor(true),
|
390
|
+
to: window["codemirror_" + editorInstance.id].getCursor(false)
|
391
|
+
};
|
392
|
+
window["codemirror_" + editorInstance.id].autoFormatRange(range.from, range.to);
|
393
|
+
},
|
394
|
+
canUndo: true
|
395
|
+
},
|
396
|
+
commentSelectedRange: {
|
397
|
+
modes: {
|
398
|
+
wysiwyg: 0,
|
399
|
+
source: 1
|
400
|
+
},
|
401
|
+
editorFocus: false,
|
402
|
+
readOnly: 1,
|
403
|
+
exec: function (editorInstance) {
|
404
|
+
var range = {
|
405
|
+
from: window["codemirror_" + editorInstance.id].getCursor(true),
|
406
|
+
to: window["codemirror_" + editorInstance.id].getCursor(false)
|
407
|
+
};
|
408
|
+
window["codemirror_" + editorInstance.id].commentRange(true, range.from, range.to);
|
409
|
+
},
|
410
|
+
canUndo: true
|
411
|
+
},
|
412
|
+
uncommentSelectedRange: {
|
413
|
+
modes: {
|
414
|
+
wysiwyg: 0,
|
415
|
+
source: 1
|
416
|
+
},
|
417
|
+
editorFocus: false,
|
418
|
+
readOnly: 1,
|
419
|
+
exec: function (editorInstance) {
|
420
|
+
var range = {
|
421
|
+
from: window["codemirror_" + editorInstance.id].getCursor(true),
|
422
|
+
to: window["codemirror_" + editorInstance.id].getCursor(false)
|
423
|
+
};
|
424
|
+
window["codemirror_" + editorInstance.id].commentRange(false, range.from, range.to);
|
425
|
+
if (window["codemirror_" + editorInstance.id].config.autoFormatOnUncomment) {
|
426
|
+
window["codemirror_" + editorInstance.id].autoFormatRange(
|
427
|
+
range.from,
|
428
|
+
range.to);
|
429
|
+
}
|
430
|
+
},
|
431
|
+
canUndo: true
|
432
|
+
},
|
433
|
+
autoCompleteToggle: {
|
434
|
+
modes: {
|
435
|
+
wysiwyg: 0,
|
436
|
+
source: 1
|
437
|
+
},
|
438
|
+
editorFocus: false,
|
439
|
+
readOnly: 1,
|
440
|
+
exec: function (editorInstance) {
|
441
|
+
if (this.state == CKEDITOR.TRISTATE_ON) {
|
442
|
+
window["codemirror_" + editorInstance.id].setOption("autoCloseTags", false);
|
443
|
+
} else if (this.state == CKEDITOR.TRISTATE_OFF) {
|
444
|
+
window["codemirror_" + editorInstance.id].setOption("autoCloseTags", true);
|
445
|
+
}
|
446
|
+
|
447
|
+
this.toggleState();
|
448
|
+
},
|
449
|
+
canUndo: true
|
450
|
+
}
|
451
|
+
};
|
452
|
+
}
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
|
341
457
|
editor.addMode('source', function(callback) {
|
342
458
|
if (typeof (CodeMirror) == 'undefined') {
|
343
459
|
|
@@ -363,14 +479,43 @@
|
|
363
479
|
});
|
364
480
|
|
365
481
|
function getCodeMirrorScripts() {
|
366
|
-
var scriptFiles = [rootPath + 'js/codemirror.
|
482
|
+
var scriptFiles = [rootPath + 'js/codemirror.addons.min.js'];
|
483
|
+
|
484
|
+
switch (config.mode) {
|
485
|
+
case "htmlmixed":
|
486
|
+
{
|
487
|
+
scriptFiles.push(rootPath + 'js/codemirror.mode.htmlmixed.min.js');
|
488
|
+
}
|
489
|
+
|
490
|
+
break;
|
491
|
+
case "text/html":
|
492
|
+
{
|
493
|
+
scriptFiles.push(rootPath + 'js/codemirror.mode.htmlmixed.min.js');
|
494
|
+
}
|
495
|
+
|
496
|
+
break;
|
497
|
+
case "application/x-httpd-php":
|
498
|
+
{
|
499
|
+
scriptFiles.push(rootPath + 'js/codemirror.mode.php.min.js');
|
500
|
+
}
|
501
|
+
|
502
|
+
break;
|
503
|
+
case "text/javascript":
|
504
|
+
{
|
505
|
+
scriptFiles.push(rootPath + 'js/codemirror.mode.javascript.min.js');
|
506
|
+
}
|
507
|
+
|
508
|
+
break;
|
509
|
+
default:
|
510
|
+
scriptFiles.push(rootPath + 'js/codemirror.mode.htmlmixed.min.js');
|
511
|
+
}
|
367
512
|
|
368
513
|
if (config.useBeautify) {
|
369
514
|
scriptFiles.push(rootPath + 'js/beautify.min.js');
|
370
515
|
}
|
371
516
|
|
372
517
|
if (config.enableSearchTools) {
|
373
|
-
scriptFiles.push(rootPath + 'js/codemirror.
|
518
|
+
scriptFiles.push(rootPath + 'js/codemirror.addons.search.min.js');
|
374
519
|
}
|
375
520
|
return scriptFiles;
|
376
521
|
}
|
@@ -381,8 +526,8 @@
|
|
381
526
|
|
382
527
|
textarea.setStyles(
|
383
528
|
CKEDITOR.tools.extend({
|
384
|
-
|
385
|
-
|
529
|
+
// IE7 has overflow the <textarea> from wrapping table cell.
|
530
|
+
width: CKEDITOR.env.ie7Compat ? '99%' : '100%',
|
386
531
|
height: '100%',
|
387
532
|
resize: 'none',
|
388
533
|
outline: 'none',
|
@@ -421,6 +566,7 @@
|
|
421
566
|
window["codemirror_" + editor.id] = CodeMirror.fromTextArea(sourceAreaElement.$, {
|
422
567
|
mode: config.mode,
|
423
568
|
matchBrackets: config.matchBrackets,
|
569
|
+
matchTags: config.matchTags,
|
424
570
|
workDelay: 300,
|
425
571
|
workTime: 35,
|
426
572
|
readOnly: editor.config.readOnly,
|
@@ -430,7 +576,10 @@
|
|
430
576
|
autoCloseBrackets: config.autoCloseBrackets,
|
431
577
|
highlightSelectionMatches: config.highlightMatches,
|
432
578
|
continueComments: config.continueComments,
|
579
|
+
indentWithTabs: config.indentWithTabs,
|
433
580
|
theme: config.theme,
|
581
|
+
showTrailingSpace: config.showTrailingSpace,
|
582
|
+
showCursorWhenSelecting: true,
|
434
583
|
//extraKeys: {"Ctrl-Space": "autocomplete"},
|
435
584
|
extraKeys: { "Ctrl-Q": function(codeMirror_Editor) { window["foldFunc_" + editor.id](codeMirror_Editor, codeMirror_Editor.getCursor().line); } },
|
436
585
|
onKeyEvent: function(codeMirror_Editor, evt) {
|
@@ -445,7 +594,9 @@
|
|
445
594
|
}
|
446
595
|
} else if (evt.type === "keydown" && evt.ctrlKey && evt.keyCode === 75 && !evt.shiftKey && evt.altKey) {
|
447
596
|
window["codemirror_" + editor.id].autoFormatRange(range.from, range.to);
|
448
|
-
}
|
597
|
+
}/* else if (evt.type === "keydown") {
|
598
|
+
CodeMirror.commands.newlineAndIndentContinueMarkdownList(window["codemirror_" + editor.id]);
|
599
|
+
}*/
|
449
600
|
}
|
450
601
|
}
|
451
602
|
});
|
@@ -482,10 +633,14 @@
|
|
482
633
|
};
|
483
634
|
}
|
484
635
|
|
485
|
-
window["codemirror_" + editor.id].on("change", function(
|
636
|
+
window["codemirror_" + editor.id].on("change", function () {
|
486
637
|
clearTimeout(delay);
|
487
|
-
delay = setTimeout(function() {
|
488
|
-
window["codemirror_" + editor.id]
|
638
|
+
delay = setTimeout(function () {
|
639
|
+
var cm = window["codemirror_" + editor.id];
|
640
|
+
|
641
|
+
if (cm) {
|
642
|
+
cm.save();
|
643
|
+
}
|
489
644
|
}, 300);
|
490
645
|
});
|
491
646
|
window["codemirror_" + editor.id].setSize(holderWidth, holderHeight);
|
@@ -497,11 +652,18 @@
|
|
497
652
|
// Highlight Active Line
|
498
653
|
if (config.highlightActiveLine) {
|
499
654
|
window["codemirror_" + editor.id].hlLine = window["codemirror_" + editor.id].addLineClass(0, "background", "activeline");
|
500
|
-
window["codemirror_" + editor.id].on("cursorActivity", function() {
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
655
|
+
window["codemirror_" + editor.id].on("cursorActivity", function () {
|
656
|
+
try {
|
657
|
+
var cur = window["codemirror_" + editor.id].getLineHandle(window["codemirror_" + editor.id].getCursor().line);
|
658
|
+
} catch(e) {
|
659
|
+
cur = null;
|
660
|
+
} finally {
|
661
|
+
if (cur != null) {
|
662
|
+
if (cur != window["codemirror_" + editor.id].hlLine) {
|
663
|
+
window["codemirror_" + editor.id].removeLineClass(window["codemirror_" + editor.id].hlLine, "background", "activeline");
|
664
|
+
window["codemirror_" + editor.id].hlLine = window["codemirror_" + editor.id].addLineClass(cur, "background", "activeline");
|
665
|
+
}
|
666
|
+
}
|
505
667
|
}
|
506
668
|
});
|
507
669
|
}
|
@@ -568,11 +730,43 @@
|
|
568
730
|
}
|
569
731
|
}
|
570
732
|
}
|
733
|
+
|
734
|
+
editor.on('beforeModeUnload', function (evt) {
|
735
|
+
if (editor.mode === 'source' && editor.plugins.textselection) {
|
736
|
+
var range = editor.getTextSelection();
|
737
|
+
|
738
|
+
range.startOffset = LineChanngelToOffSet(window["codemirror_" + editor.id], window["codemirror_" + editor.id].getCursor(true));
|
739
|
+
range.endOffset = LineChanngelToOffSet(window["codemirror_" + editor.id], window["codemirror_" + editor.id].getCursor(false));
|
740
|
+
|
741
|
+
// Fly the range when create bookmark.
|
742
|
+
delete range.element;
|
743
|
+
range.createBookmark();
|
744
|
+
sourceBookmark = true;
|
745
|
+
evt.data = range.content;
|
746
|
+
}
|
747
|
+
});
|
571
748
|
editor.on('mode', function () {
|
572
749
|
editor.getCommand('source').setState(editor.mode === 'source' ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF);
|
573
750
|
|
574
751
|
if (editor.mode === 'source') {
|
575
|
-
|
752
|
+
editor.getCommand('autoCompleteToggle').setState(window["codemirror_" + editor.id].config.autoCloseTags ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF);
|
753
|
+
|
754
|
+
|
755
|
+
if (editor.plugins.textselection && textRange) {
|
756
|
+
textRange.element = new CKEDITOR.dom.element(editor._.editable.$);
|
757
|
+
textRange.select();
|
758
|
+
|
759
|
+
var start, end;
|
760
|
+
|
761
|
+
start = OffSetToLineChannel(window["codemirror_" + editor.id], textRange.startOffset);
|
762
|
+
|
763
|
+
if (typeof (textRange.endOffset) == 'undefined') {
|
764
|
+
window["codemirror_" + editor.id].setCursor(start);
|
765
|
+
} else {
|
766
|
+
end = OffSetToLineChannel(window["codemirror_" + editor.id], textRange.endOffset);
|
767
|
+
window["codemirror_" + editor.id].setSelection(start, end);
|
768
|
+
}
|
769
|
+
}
|
576
770
|
}
|
577
771
|
|
578
772
|
});
|
@@ -586,32 +780,54 @@
|
|
586
780
|
});
|
587
781
|
|
588
782
|
editor.on('readOnly', function () {
|
589
|
-
window["
|
590
|
-
|
783
|
+
if (window["editable_" + editor.id] && editor.mode === 'source') {
|
784
|
+
window["codemirror_" + editor.id].setOption("readOnly", this.readOnly);
|
785
|
+
}
|
591
786
|
});
|
592
787
|
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
788
|
+
editor.on('instanceReady', function () {
|
789
|
+
var selectAllCommand = editor.commands.selectAll;
|
790
|
+
|
791
|
+
// Replace Complete SelectAll command from the plugin, otherwise it will not work in IE10
|
792
|
+
if (selectAllCommand != null) {
|
793
|
+
selectAllCommand.exec = function () {
|
794
|
+
if (editor.mode === 'source') {
|
795
|
+
window["codemirror_" + editor.id].setSelection({
|
796
|
+
line: 0,
|
797
|
+
ch: 0
|
798
|
+
}, {
|
799
|
+
line: window["codemirror_" + editor.id].lineCount(),
|
800
|
+
ch: 0
|
801
|
+
});
|
802
|
+
} else {
|
803
|
+
var editable = editor.editable();
|
804
|
+
if (editable.is('body'))
|
805
|
+
editor.document.$.execCommand('SelectAll', false, null);
|
806
|
+
else {
|
807
|
+
var range = editor.createRange();
|
808
|
+
range.selectNodeContents(editable);
|
809
|
+
range.select();
|
810
|
+
}
|
811
|
+
|
812
|
+
// Force triggering selectionChange (#7008)
|
813
|
+
editor.forceNextSelectionCheck();
|
814
|
+
editor.selectionChange();
|
815
|
+
}
|
816
|
+
};
|
817
|
+
}
|
818
|
+
});
|
819
|
+
|
820
|
+
editor.on('setData', function (data) {
|
821
|
+
if (window["editable_" + editor.id] && editor.mode === 'source') {
|
822
|
+
window["codemirror_" + editor.id].setValue(data.data.dataValue);
|
823
|
+
}
|
824
|
+
});
|
608
825
|
}
|
609
826
|
});
|
610
827
|
var sourceEditable = CKEDITOR.tools.createClass({
|
611
828
|
base: CKEDITOR.editable,
|
612
829
|
proto: {
|
613
830
|
setData: function(data) {
|
614
|
-
|
615
831
|
this.setValue(data);
|
616
832
|
|
617
833
|
if (this.codeMirror != null) {
|
@@ -663,6 +879,7 @@ CKEDITOR.plugins.sourcearea = {
|
|
663
879
|
if (editor.mode === 'wysiwyg') {
|
664
880
|
editor.fire('saveSnapshot');
|
665
881
|
}
|
882
|
+
|
666
883
|
editor.getCommand('source').setState(CKEDITOR.TRISTATE_DISABLED);
|
667
884
|
editor.setMode(editor.mode === 'source' ? 'wysiwyg' : 'source');
|
668
885
|
},
|
@@ -726,7 +943,9 @@ CKEDITOR.plugins.sourcearea = {
|
|
726
943
|
};
|
727
944
|
window["codemirror_" + editor.id].commentRange(false, range.from, range.to);
|
728
945
|
if (window["codemirror_" + editor.id].config.autoFormatOnUncomment) {
|
729
|
-
window["codemirror_" + editor.id].autoFormatRange(
|
946
|
+
window["codemirror_" + editor.id].autoFormatRange(
|
947
|
+
range.from,
|
948
|
+
range.to);
|
730
949
|
}
|
731
950
|
},
|
732
951
|
canUndo: true
|
@@ -750,4 +969,30 @@ CKEDITOR.plugins.sourcearea = {
|
|
750
969
|
canUndo: true
|
751
970
|
}
|
752
971
|
}
|
753
|
-
};
|
972
|
+
};
|
973
|
+
|
974
|
+
function LineChanngelToOffSet(ed, linech) {
|
975
|
+
var line = linech.line;
|
976
|
+
var ch = linech.ch;
|
977
|
+
var n = line + ch; //for the \n s & chars in the line
|
978
|
+
for (i = 0; i < line; i++) {
|
979
|
+
n += (ed.getLine(i)).length;//for the chars in all preceeding lines
|
980
|
+
}
|
981
|
+
return n;
|
982
|
+
}
|
983
|
+
|
984
|
+
function OffSetToLineChannel(ed, n) {
|
985
|
+
var line = 0, ch = 0, index = 0;
|
986
|
+
for (i = 0; i < ed.lineCount() ; i++) {
|
987
|
+
len = (ed.getLine(i)).length;
|
988
|
+
if (n < index + len) {
|
989
|
+
//alert(len+","+index+","+(n-index));
|
990
|
+
line = i;
|
991
|
+
ch = n - index;
|
992
|
+
return { line: line, ch: ch };
|
993
|
+
}
|
994
|
+
len++;//for \n char
|
995
|
+
index += len;
|
996
|
+
}
|
997
|
+
return { line: line, ch: ch };
|
998
|
+
}
|